Debian Codegraph @

metastore/v2/metastore-gen.go

raw symbols SCIP
1 // Copyright 2025 Google LLC.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Code generated file. DO NOT EDIT.
6
7 // Package metastore provides access to the Dataproc Metastore API.
8 //
9 // For product documentation, see: https://cloud.google.com/dataproc-metastore/docs
10 //
11 // # Library status
12 //
13 // These client libraries are officially supported by Google. However, this
14 // library is considered complete and is in maintenance mode. This means
15 // that we will address critical bugs and security issues but will not add
16 // any new features.
17 //
18 // When possible, we recommend using our newer
19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go)
20 // that are still actively being worked and iterated on.
21 //
22 // # Creating a client
23 //
24 // Usage example:
25 //
26 // import "google.golang.org/api/metastore/v2"
27 // ...
28 // ctx := context.Background()
29 // metastoreService, err := metastore.NewService(ctx)
30 //
31 // In this example, Google Application Default Credentials are used for
32 // authentication. For information on how to create and obtain Application
33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
34 //
35 // # Other authentication options
36 //
37 // To use an API key for authentication (note: some APIs do not support API
38 // keys), use [google.golang.org/api/option.WithAPIKey]:
39 //
40 // metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza..."))
41 //
42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
43 // flow, use [google.golang.org/api/option.WithTokenSource]:
44 //
45 // config := &oauth2.Config{...}
46 // // ...
47 // token, err := config.Exchange(ctx, ...)
48 // metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
49 //
50 // See [google.golang.org/api/option.ClientOption] for details on options.
51 package metastore // import "google.golang.org/api/metastore/v2"
52
53 import (
54 "bytes"
55 "context"
56 "encoding/json"
57 "errors"
58 "fmt"
59 "io"
60 "log/slog"
61 "net/http"
62 "net/url"
63 "strconv"
64 "strings"
65
66 "github.com/googleapis/gax-go/v2/internallog"
67 googleapi "google.golang.org/api/googleapi"
68 internal "google.golang.org/api/internal"
69 gensupport "google.golang.org/api/internal/gensupport"
70 option "google.golang.org/api/option"
71 internaloption "google.golang.org/api/option/internaloption"
72 htransport "google.golang.org/api/transport/http"
73 )
74
75 // Always reference these packages, just in case the auto-generated code
76 // below doesn't.
77 var _ = bytes.NewBuffer
78 var _ = strconv.Itoa
79 var _ = fmt.Sprintf
80 var _ = json.NewDecoder
81 var _ = io.Copy
82 var _ = url.Parse
83 var _ = gensupport.MarshalJSON
84 var _ = googleapi.Version
85 var _ = errors.New
86 var _ = strings.Replace
87 var _ = context.Canceled
88 var _ = internaloption.WithDefaultEndpoint
89 var _ = internal.Version
90 var _ = internallog.New
91
92 const apiId = "metastore:v2"
93 const apiName = "metastore"
94 const apiVersion = "v2"
95 const basePath = "https://metastore.googleapis.com/"
96 const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/"
97 const mtlsBasePath = "https://metastore.mtls.googleapis.com/"
98
99 // OAuth2 scopes used by this API.
100 const (
101 // See, edit, configure, and delete your Google Cloud data and see the email
102 // address for your Google Account.
103 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
104 )
105
106 // NewService creates a new Service.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
108 scopesOption := internaloption.WithDefaultScopes(
109 "https://www.googleapis.com/auth/cloud-platform",
110 )
111 // NOTE: prepend, so we don't override user-specified scopes.
112 opts = append([]option.ClientOption{scopesOption}, opts...)
113 opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
114 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
115 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
116 opts = append(opts, internaloption.EnableNewAuthLibrary())
117 client, endpoint, err := htransport.NewClient(ctx, opts...)
118 if err != nil {
119 return nil, err
120 }
121 s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)}
122 s.Projects = NewProjectsService(s)
123 if endpoint != "" {
124 s.BasePath = endpoint
125 }
126 return s, nil
127 }
128
129 // New creates a new Service. It uses the provided http.Client for requests.
130 //
131 // Deprecated: please use NewService instead.
132 // To provide a custom HTTP client, use option.WithHTTPClient.
133 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
134 func New(client *http.Client) (*Service, error) {
135 if client == nil {
136 return nil, errors.New("client is nil")
137 }
138 return NewService(context.TODO(), option.WithHTTPClient(client))
139 }
140
141 type Service struct {
142 client *http.Client
143 logger *slog.Logger
144 BasePath string // API endpoint base URL
145 UserAgent string // optional additional User-Agent fragment
146
147 Projects *ProjectsService
148 }
149
150 func (s *Service) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *Service) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *Service
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Services = NewProjectsLocationsServicesService(s)
172 return rs
173 }
174
175 type ProjectsLocationsService struct {
176 s *Service
177
178 Services *ProjectsLocationsServicesService
179 }
180
181 func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService {
182 rs := &ProjectsLocationsServicesService{s: s}
183 rs.Backups = NewProjectsLocationsServicesBackupsService(s)
184 return rs
185 }
186
187 type ProjectsLocationsServicesService struct {
188 s *Service
189
190 Backups *ProjectsLocationsServicesBackupsService
191 }
192
193 func NewProjectsLocationsServicesBackupsService(s *Service) *ProjectsLocationsServicesBackupsService {
194 rs := &ProjectsLocationsServicesBackupsService{s: s}
195 return rs
196 }
197
198 type ProjectsLocationsServicesBackupsService struct {
199 s *Service
200 }
201
202 // GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse: Response
203 // message for DataprocMetastore.AlterMetadataResourceLocation.
204 type GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse struct {
205 }
206
207 // GoogleCloudMetastoreV1CustomRegionMetadata: Metadata about a custom region.
208 // This is only populated if the region is a custom region. For single/multi
209 // regions, it will be empty.
210 type GoogleCloudMetastoreV1CustomRegionMetadata struct {
211 // OptionalReadOnlyRegions: The read-only regions for this custom region.
212 OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"`
213 // RequiredReadWriteRegions: The read-write regions for this custom region.
214 RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"`
215 // WitnessRegion: The Spanner witness region for this custom region.
216 WitnessRegion string `json:"witnessRegion,omitempty"`
217 // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
218 // unconditionally include in API requests. By default, fields with empty or
219 // default values are omitted from API requests. See
220 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
221 // details.
222 ForceSendFields []string `json:"-"`
223 // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
224 // include in API requests with the JSON null value. By default, fields with
225 // empty values are omitted from API requests. See
226 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
227 NullFields []string `json:"-"`
228 }
229
230 func (s GoogleCloudMetastoreV1CustomRegionMetadata) MarshalJSON() ([]byte, error) {
231 type NoMethod GoogleCloudMetastoreV1CustomRegionMetadata
232 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
233 }
234
235 // GoogleCloudMetastoreV1ErrorDetails: Error details in public error message
236 // for DataprocMetastore.QueryMetadata.
237 type GoogleCloudMetastoreV1ErrorDetails struct {
238 // Details: Additional structured details about this error.Keys define the
239 // failure items. Value describes the exception or details of the item.
240 Details map[string]string `json:"details,omitempty"`
241 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
242 // include in API requests. By default, fields with empty or default values are
243 // omitted from API requests. See
244 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
245 // details.
246 ForceSendFields []string `json:"-"`
247 // NullFields is a list of field names (e.g. "Details") to include in API
248 // requests with the JSON null value. By default, fields with empty values are
249 // omitted from API requests. See
250 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
251 NullFields []string `json:"-"`
252 }
253
254 func (s GoogleCloudMetastoreV1ErrorDetails) MarshalJSON() ([]byte, error) {
255 type NoMethod GoogleCloudMetastoreV1ErrorDetails
256 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
257 }
258
259 // GoogleCloudMetastoreV1HiveMetastoreVersion: A specification of a supported
260 // version of the Hive Metastore software.
261 type GoogleCloudMetastoreV1HiveMetastoreVersion struct {
262 // IsDefault: Whether version will be chosen by the server if a metastore
263 // service is created with a HiveMetastoreConfig that omits the version.
264 IsDefault bool `json:"isDefault,omitempty"`
265 // Version: The semantic version of the Hive Metastore software.
266 Version string `json:"version,omitempty"`
267 // ForceSendFields is a list of field names (e.g. "IsDefault") to
268 // unconditionally include in API requests. By default, fields with empty or
269 // default values are omitted from API requests. See
270 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
271 // details.
272 ForceSendFields []string `json:"-"`
273 // NullFields is a list of field names (e.g. "IsDefault") to include in API
274 // requests with the JSON null value. By default, fields with empty values are
275 // omitted from API requests. See
276 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
277 NullFields []string `json:"-"`
278 }
279
280 func (s GoogleCloudMetastoreV1HiveMetastoreVersion) MarshalJSON() ([]byte, error) {
281 type NoMethod GoogleCloudMetastoreV1HiveMetastoreVersion
282 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
283 }
284
285 // GoogleCloudMetastoreV1LocationMetadata: Metadata about the service in a
286 // location.
287 type GoogleCloudMetastoreV1LocationMetadata struct {
288 // CustomRegionMetadata: Possible configurations supported if the current
289 // region is a custom region.
290 CustomRegionMetadata []*GoogleCloudMetastoreV1CustomRegionMetadata `json:"customRegionMetadata,omitempty"`
291 // MultiRegionMetadata: The multi-region metadata if the current region is a
292 // multi-region.
293 MultiRegionMetadata *GoogleCloudMetastoreV1MultiRegionMetadata `json:"multiRegionMetadata,omitempty"`
294 // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be
295 // used when creating a new metastore service in this location. The server
296 // guarantees that exactly one HiveMetastoreVersion in the list will set
297 // is_default.
298 SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"`
299 // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to
300 // unconditionally include in API requests. By default, fields with empty or
301 // default values are omitted from API requests. See
302 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
303 // details.
304 ForceSendFields []string `json:"-"`
305 // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include
306 // in API requests with the JSON null value. By default, fields with empty
307 // values are omitted from API requests. See
308 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
309 NullFields []string `json:"-"`
310 }
311
312 func (s GoogleCloudMetastoreV1LocationMetadata) MarshalJSON() ([]byte, error) {
313 type NoMethod GoogleCloudMetastoreV1LocationMetadata
314 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
315 }
316
317 // GoogleCloudMetastoreV1MoveTableToDatabaseResponse: Response message for
318 // DataprocMetastore.MoveTableToDatabase.
319 type GoogleCloudMetastoreV1MoveTableToDatabaseResponse struct {
320 }
321
322 // GoogleCloudMetastoreV1MultiRegionMetadata: The metadata for the multi-region
323 // that includes the constituent regions. The metadata is only populated if the
324 // region is multi-region. For single region or custom dual region, it will be
325 // empty.
326 type GoogleCloudMetastoreV1MultiRegionMetadata struct {
327 // ConstituentRegions: The regions constituting the multi-region.
328 ConstituentRegions []string `json:"constituentRegions,omitempty"`
329 // Continent: The continent for this multi-region.
330 Continent string `json:"continent,omitempty"`
331 // WitnessRegion: The Spanner witness region for this multi-region.
332 WitnessRegion string `json:"witnessRegion,omitempty"`
333 // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to
334 // unconditionally include in API requests. By default, fields with empty or
335 // default values are omitted from API requests. See
336 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
337 // details.
338 ForceSendFields []string `json:"-"`
339 // NullFields is a list of field names (e.g. "ConstituentRegions") to include
340 // in API requests with the JSON null value. By default, fields with empty
341 // values are omitted from API requests. See
342 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
343 NullFields []string `json:"-"`
344 }
345
346 func (s GoogleCloudMetastoreV1MultiRegionMetadata) MarshalJSON() ([]byte, error) {
347 type NoMethod GoogleCloudMetastoreV1MultiRegionMetadata
348 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
349 }
350
351 // GoogleCloudMetastoreV1OperationMetadata: Represents the metadata of a
352 // long-running operation.
353 type GoogleCloudMetastoreV1OperationMetadata struct {
354 // ApiVersion: Output only. API version used to start the operation.
355 ApiVersion string `json:"apiVersion,omitempty"`
356 // CreateTime: Output only. The time the operation was created.
357 CreateTime string `json:"createTime,omitempty"`
358 // EndTime: Output only. The time the operation finished running.
359 EndTime string `json:"endTime,omitempty"`
360 // RequestedCancellation: Output only. Identifies whether the caller has
361 // requested cancellation of the operation. Operations that have successfully
362 // been cancelled have google.longrunning.Operation.error value with a
363 // google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
364 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
365 // StatusMessage: Output only. Human-readable status of the operation, if any.
366 StatusMessage string `json:"statusMessage,omitempty"`
367 // Target: Output only. Server-defined resource path for the target of the
368 // operation.
369 Target string `json:"target,omitempty"`
370 // Verb: Output only. Name of the verb executed by the operation.
371 Verb string `json:"verb,omitempty"`
372 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
373 // unconditionally include in API requests. By default, fields with empty or
374 // default values are omitted from API requests. See
375 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
376 // details.
377 ForceSendFields []string `json:"-"`
378 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
379 // requests with the JSON null value. By default, fields with empty values are
380 // omitted from API requests. See
381 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
382 NullFields []string `json:"-"`
383 }
384
385 func (s GoogleCloudMetastoreV1OperationMetadata) MarshalJSON() ([]byte, error) {
386 type NoMethod GoogleCloudMetastoreV1OperationMetadata
387 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
388 }
389
390 // GoogleCloudMetastoreV1QueryMetadataResponse: Response message for
391 // DataprocMetastore.QueryMetadata.
392 type GoogleCloudMetastoreV1QueryMetadataResponse struct {
393 // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud
394 // Storage. This instance manifests immediately along with
395 // QueryMetadataResponse. The content of the URI is not retriable until the
396 // long-running operation query against the metadata finishes.
397 ResultManifestUri string `json:"resultManifestUri,omitempty"`
398 // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to
399 // unconditionally include in API requests. By default, fields with empty or
400 // default values are omitted from API requests. See
401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
402 // details.
403 ForceSendFields []string `json:"-"`
404 // NullFields is a list of field names (e.g. "ResultManifestUri") to include in
405 // API requests with the JSON null value. By default, fields with empty values
406 // are omitted from API requests. See
407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
408 NullFields []string `json:"-"`
409 }
410
411 func (s GoogleCloudMetastoreV1QueryMetadataResponse) MarshalJSON() ([]byte, error) {
412 type NoMethod GoogleCloudMetastoreV1QueryMetadataResponse
413 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
414 }
415
416 // GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse: Response
417 // message for DataprocMetastore.AlterMetadataResourceLocation.
418 type GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse struct {
419 }
420
421 // GoogleCloudMetastoreV1alphaCancelMigrationResponse: Response message for
422 // DataprocMetastore.CancelMigration.
423 type GoogleCloudMetastoreV1alphaCancelMigrationResponse struct {
424 // MigrationExecution: The relative resource name of the migration execution,
425 // in the following
426 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
427 // migrationExecutions/{migration_execution_id}.
428 MigrationExecution string `json:"migrationExecution,omitempty"`
429 // ForceSendFields is a list of field names (e.g. "MigrationExecution") to
430 // unconditionally include in API requests. By default, fields with empty or
431 // default values are omitted from API requests. See
432 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
433 // details.
434 ForceSendFields []string `json:"-"`
435 // NullFields is a list of field names (e.g. "MigrationExecution") to include
436 // in API requests with the JSON null value. By default, fields with empty
437 // values are omitted from API requests. See
438 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
439 NullFields []string `json:"-"`
440 }
441
442 func (s GoogleCloudMetastoreV1alphaCancelMigrationResponse) MarshalJSON() ([]byte, error) {
443 type NoMethod GoogleCloudMetastoreV1alphaCancelMigrationResponse
444 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
445 }
446
447 // GoogleCloudMetastoreV1alphaCompleteMigrationResponse: Response message for
448 // DataprocMetastore.CompleteMigration.
449 type GoogleCloudMetastoreV1alphaCompleteMigrationResponse struct {
450 // MigrationExecution: The relative resource name of the migration execution,
451 // in the following
452 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
453 // migrationExecutions/{migration_execution_id}.
454 MigrationExecution string `json:"migrationExecution,omitempty"`
455 // ForceSendFields is a list of field names (e.g. "MigrationExecution") to
456 // unconditionally include in API requests. By default, fields with empty or
457 // default values are omitted from API requests. See
458 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
459 // details.
460 ForceSendFields []string `json:"-"`
461 // NullFields is a list of field names (e.g. "MigrationExecution") to include
462 // in API requests with the JSON null value. By default, fields with empty
463 // values are omitted from API requests. See
464 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
465 NullFields []string `json:"-"`
466 }
467
468 func (s GoogleCloudMetastoreV1alphaCompleteMigrationResponse) MarshalJSON() ([]byte, error) {
469 type NoMethod GoogleCloudMetastoreV1alphaCompleteMigrationResponse
470 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
471 }
472
473 // GoogleCloudMetastoreV1alphaCustomRegionMetadata: Metadata about a custom
474 // region. This is only populated if the region is a custom region. For
475 // single/multi regions, it will be empty.
476 type GoogleCloudMetastoreV1alphaCustomRegionMetadata struct {
477 // OptionalReadOnlyRegions: The read-only regions for this custom region.
478 OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"`
479 // RequiredReadWriteRegions: The read-write regions for this custom region.
480 RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"`
481 // WitnessRegion: The Spanner witness region for this custom region.
482 WitnessRegion string `json:"witnessRegion,omitempty"`
483 // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
484 // unconditionally include in API requests. By default, fields with empty or
485 // default values are omitted from API requests. See
486 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
487 // details.
488 ForceSendFields []string `json:"-"`
489 // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
490 // include in API requests with the JSON null value. By default, fields with
491 // empty values are omitted from API requests. See
492 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
493 NullFields []string `json:"-"`
494 }
495
496 func (s GoogleCloudMetastoreV1alphaCustomRegionMetadata) MarshalJSON() ([]byte, error) {
497 type NoMethod GoogleCloudMetastoreV1alphaCustomRegionMetadata
498 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
499 }
500
501 // GoogleCloudMetastoreV1alphaErrorDetails: Error details in public error
502 // message for DataprocMetastore.QueryMetadata.
503 type GoogleCloudMetastoreV1alphaErrorDetails struct {
504 // Details: Additional structured details about this error.Keys define the
505 // failure items. Value describes the exception or details of the item.
506 Details map[string]string `json:"details,omitempty"`
507 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
508 // include in API requests. By default, fields with empty or default values are
509 // omitted from API requests. See
510 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
511 // details.
512 ForceSendFields []string `json:"-"`
513 // NullFields is a list of field names (e.g. "Details") to include in API
514 // requests with the JSON null value. By default, fields with empty values are
515 // omitted from API requests. See
516 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
517 NullFields []string `json:"-"`
518 }
519
520 func (s GoogleCloudMetastoreV1alphaErrorDetails) MarshalJSON() ([]byte, error) {
521 type NoMethod GoogleCloudMetastoreV1alphaErrorDetails
522 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
523 }
524
525 // GoogleCloudMetastoreV1alphaHiveMetastoreVersion: A specification of a
526 // supported version of the Hive Metastore software.
527 type GoogleCloudMetastoreV1alphaHiveMetastoreVersion struct {
528 // IsDefault: Whether version will be chosen by the server if a metastore
529 // service is created with a HiveMetastoreConfig that omits the version.
530 IsDefault bool `json:"isDefault,omitempty"`
531 // Version: The semantic version of the Hive Metastore software.
532 Version string `json:"version,omitempty"`
533 // ForceSendFields is a list of field names (e.g. "IsDefault") to
534 // unconditionally include in API requests. By default, fields with empty or
535 // default values are omitted from API requests. See
536 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
537 // details.
538 ForceSendFields []string `json:"-"`
539 // NullFields is a list of field names (e.g. "IsDefault") to include in API
540 // requests with the JSON null value. By default, fields with empty values are
541 // omitted from API requests. See
542 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
543 NullFields []string `json:"-"`
544 }
545
546 func (s GoogleCloudMetastoreV1alphaHiveMetastoreVersion) MarshalJSON() ([]byte, error) {
547 type NoMethod GoogleCloudMetastoreV1alphaHiveMetastoreVersion
548 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
549 }
550
551 // GoogleCloudMetastoreV1alphaLocationMetadata: Metadata about the service in a
552 // location.
553 type GoogleCloudMetastoreV1alphaLocationMetadata struct {
554 // CustomRegionMetadata: Possible configurations supported if the current
555 // region is a custom region.
556 CustomRegionMetadata []*GoogleCloudMetastoreV1alphaCustomRegionMetadata `json:"customRegionMetadata,omitempty"`
557 // MultiRegionMetadata: The multi-region metadata if the current region is a
558 // multi-region.
559 MultiRegionMetadata *GoogleCloudMetastoreV1alphaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"`
560 // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be
561 // used when creating a new metastore service in this location. The server
562 // guarantees that exactly one HiveMetastoreVersion in the list will set
563 // is_default.
564 SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1alphaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"`
565 // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to
566 // unconditionally include in API requests. By default, fields with empty or
567 // default values are omitted from API requests. See
568 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
569 // details.
570 ForceSendFields []string `json:"-"`
571 // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include
572 // in API requests with the JSON null value. By default, fields with empty
573 // values are omitted from API requests. See
574 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
575 NullFields []string `json:"-"`
576 }
577
578 func (s GoogleCloudMetastoreV1alphaLocationMetadata) MarshalJSON() ([]byte, error) {
579 type NoMethod GoogleCloudMetastoreV1alphaLocationMetadata
580 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
581 }
582
583 // GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse: Response message for
584 // DataprocMetastore.MoveTableToDatabase.
585 type GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse struct {
586 }
587
588 // GoogleCloudMetastoreV1alphaMultiRegionMetadata: The metadata for the
589 // multi-region that includes the constituent regions. The metadata is only
590 // populated if the region is multi-region. For single region or custom dual
591 // region, it will be empty.
592 type GoogleCloudMetastoreV1alphaMultiRegionMetadata struct {
593 // ConstituentRegions: The regions constituting the multi-region.
594 ConstituentRegions []string `json:"constituentRegions,omitempty"`
595 // Continent: The continent for this multi-region.
596 Continent string `json:"continent,omitempty"`
597 // WitnessRegion: The Spanner witness region for this multi-region.
598 WitnessRegion string `json:"witnessRegion,omitempty"`
599 // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to
600 // unconditionally include in API requests. By default, fields with empty or
601 // default values are omitted from API requests. See
602 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
603 // details.
604 ForceSendFields []string `json:"-"`
605 // NullFields is a list of field names (e.g. "ConstituentRegions") to include
606 // in API requests with the JSON null value. By default, fields with empty
607 // values are omitted from API requests. See
608 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
609 NullFields []string `json:"-"`
610 }
611
612 func (s GoogleCloudMetastoreV1alphaMultiRegionMetadata) MarshalJSON() ([]byte, error) {
613 type NoMethod GoogleCloudMetastoreV1alphaMultiRegionMetadata
614 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
615 }
616
617 // GoogleCloudMetastoreV1alphaOperationMetadata: Represents the metadata of a
618 // long-running operation.
619 type GoogleCloudMetastoreV1alphaOperationMetadata struct {
620 // ApiVersion: Output only. API version used to start the operation.
621 ApiVersion string `json:"apiVersion,omitempty"`
622 // CreateTime: Output only. The time the operation was created.
623 CreateTime string `json:"createTime,omitempty"`
624 // EndTime: Output only. The time the operation finished running.
625 EndTime string `json:"endTime,omitempty"`
626 // RequestedCancellation: Output only. Identifies whether the caller has
627 // requested cancellation of the operation. Operations that have successfully
628 // been cancelled have google.longrunning.Operation.error value with a
629 // google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
630 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
631 // StatusMessage: Output only. Human-readable status of the operation, if any.
632 StatusMessage string `json:"statusMessage,omitempty"`
633 // Target: Output only. Server-defined resource path for the target of the
634 // operation.
635 Target string `json:"target,omitempty"`
636 // Verb: Output only. Name of the verb executed by the operation.
637 Verb string `json:"verb,omitempty"`
638 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
639 // unconditionally include in API requests. By default, fields with empty or
640 // default values are omitted from API requests. See
641 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
642 // details.
643 ForceSendFields []string `json:"-"`
644 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
645 // requests with the JSON null value. By default, fields with empty values are
646 // omitted from API requests. See
647 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
648 NullFields []string `json:"-"`
649 }
650
651 func (s GoogleCloudMetastoreV1alphaOperationMetadata) MarshalJSON() ([]byte, error) {
652 type NoMethod GoogleCloudMetastoreV1alphaOperationMetadata
653 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
654 }
655
656 // GoogleCloudMetastoreV1alphaQueryMetadataResponse: Response message for
657 // DataprocMetastore.QueryMetadata.
658 type GoogleCloudMetastoreV1alphaQueryMetadataResponse struct {
659 // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud
660 // Storage. This instance manifests immediately along with
661 // QueryMetadataResponse. The content of the URI is not retriable until the
662 // long-running operation query against the metadata finishes.
663 ResultManifestUri string `json:"resultManifestUri,omitempty"`
664 // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to
665 // unconditionally include in API requests. By default, fields with empty or
666 // default values are omitted from API requests. See
667 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
668 // details.
669 ForceSendFields []string `json:"-"`
670 // NullFields is a list of field names (e.g. "ResultManifestUri") to include in
671 // API requests with the JSON null value. By default, fields with empty values
672 // are omitted from API requests. See
673 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
674 NullFields []string `json:"-"`
675 }
676
677 func (s GoogleCloudMetastoreV1alphaQueryMetadataResponse) MarshalJSON() ([]byte, error) {
678 type NoMethod GoogleCloudMetastoreV1alphaQueryMetadataResponse
679 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
680 }
681
682 // GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse: Response
683 // message for DataprocMetastore.AlterMetadataResourceLocation.
684 type GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse struct {
685 }
686
687 // GoogleCloudMetastoreV1betaCancelMigrationResponse: Response message for
688 // DataprocMetastore.CancelMigration.
689 type GoogleCloudMetastoreV1betaCancelMigrationResponse struct {
690 // MigrationExecution: The relative resource name of the migration execution,
691 // in the following
692 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
693 // migrationExecutions/{migration_execution_id}.
694 MigrationExecution string `json:"migrationExecution,omitempty"`
695 // ForceSendFields is a list of field names (e.g. "MigrationExecution") to
696 // unconditionally include in API requests. By default, fields with empty or
697 // default values are omitted from API requests. See
698 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
699 // details.
700 ForceSendFields []string `json:"-"`
701 // NullFields is a list of field names (e.g. "MigrationExecution") to include
702 // in API requests with the JSON null value. By default, fields with empty
703 // values are omitted from API requests. See
704 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
705 NullFields []string `json:"-"`
706 }
707
708 func (s GoogleCloudMetastoreV1betaCancelMigrationResponse) MarshalJSON() ([]byte, error) {
709 type NoMethod GoogleCloudMetastoreV1betaCancelMigrationResponse
710 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
711 }
712
713 // GoogleCloudMetastoreV1betaCompleteMigrationResponse: Response message for
714 // DataprocMetastore.CompleteMigration.
715 type GoogleCloudMetastoreV1betaCompleteMigrationResponse struct {
716 // MigrationExecution: The relative resource name of the migration execution,
717 // in the following
718 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
719 // migrationExecutions/{migration_execution_id}.
720 MigrationExecution string `json:"migrationExecution,omitempty"`
721 // ForceSendFields is a list of field names (e.g. "MigrationExecution") to
722 // unconditionally include in API requests. By default, fields with empty or
723 // default values are omitted from API requests. See
724 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
725 // details.
726 ForceSendFields []string `json:"-"`
727 // NullFields is a list of field names (e.g. "MigrationExecution") to include
728 // in API requests with the JSON null value. By default, fields with empty
729 // values are omitted from API requests. See
730 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
731 NullFields []string `json:"-"`
732 }
733
734 func (s GoogleCloudMetastoreV1betaCompleteMigrationResponse) MarshalJSON() ([]byte, error) {
735 type NoMethod GoogleCloudMetastoreV1betaCompleteMigrationResponse
736 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
737 }
738
739 // GoogleCloudMetastoreV1betaCustomRegionMetadata: Metadata about a custom
740 // region. This is only populated if the region is a custom region. For
741 // single/multi regions, it will be empty.
742 type GoogleCloudMetastoreV1betaCustomRegionMetadata struct {
743 // OptionalReadOnlyRegions: The read-only regions for this custom region.
744 OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"`
745 // RequiredReadWriteRegions: The read-write regions for this custom region.
746 RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"`
747 // WitnessRegion: The Spanner witness region for this custom region.
748 WitnessRegion string `json:"witnessRegion,omitempty"`
749 // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
750 // unconditionally include in API requests. By default, fields with empty or
751 // default values are omitted from API requests. See
752 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
753 // details.
754 ForceSendFields []string `json:"-"`
755 // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
756 // include in API requests with the JSON null value. By default, fields with
757 // empty values are omitted from API requests. See
758 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
759 NullFields []string `json:"-"`
760 }
761
762 func (s GoogleCloudMetastoreV1betaCustomRegionMetadata) MarshalJSON() ([]byte, error) {
763 type NoMethod GoogleCloudMetastoreV1betaCustomRegionMetadata
764 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
765 }
766
767 // GoogleCloudMetastoreV1betaErrorDetails: Error details in public error
768 // message for DataprocMetastore.QueryMetadata.
769 type GoogleCloudMetastoreV1betaErrorDetails struct {
770 // Details: Additional structured details about this error.Keys define the
771 // failure items. Value describes the exception or details of the item.
772 Details map[string]string `json:"details,omitempty"`
773 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
774 // include in API requests. By default, fields with empty or default values are
775 // omitted from API requests. See
776 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
777 // details.
778 ForceSendFields []string `json:"-"`
779 // NullFields is a list of field names (e.g. "Details") to include in API
780 // requests with the JSON null value. By default, fields with empty values are
781 // omitted from API requests. See
782 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
783 NullFields []string `json:"-"`
784 }
785
786 func (s GoogleCloudMetastoreV1betaErrorDetails) MarshalJSON() ([]byte, error) {
787 type NoMethod GoogleCloudMetastoreV1betaErrorDetails
788 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
789 }
790
791 // GoogleCloudMetastoreV1betaHiveMetastoreVersion: A specification of a
792 // supported version of the Hive Metastore software.
793 type GoogleCloudMetastoreV1betaHiveMetastoreVersion struct {
794 // IsDefault: Whether version will be chosen by the server if a metastore
795 // service is created with a HiveMetastoreConfig that omits the version.
796 IsDefault bool `json:"isDefault,omitempty"`
797 // Version: The semantic version of the Hive Metastore software.
798 Version string `json:"version,omitempty"`
799 // ForceSendFields is a list of field names (e.g. "IsDefault") to
800 // unconditionally include in API requests. By default, fields with empty or
801 // default values are omitted from API requests. See
802 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
803 // details.
804 ForceSendFields []string `json:"-"`
805 // NullFields is a list of field names (e.g. "IsDefault") to include in API
806 // requests with the JSON null value. By default, fields with empty values are
807 // omitted from API requests. See
808 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
809 NullFields []string `json:"-"`
810 }
811
812 func (s GoogleCloudMetastoreV1betaHiveMetastoreVersion) MarshalJSON() ([]byte, error) {
813 type NoMethod GoogleCloudMetastoreV1betaHiveMetastoreVersion
814 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
815 }
816
817 // GoogleCloudMetastoreV1betaLocationMetadata: Metadata about the service in a
818 // location.
819 type GoogleCloudMetastoreV1betaLocationMetadata struct {
820 // CustomRegionMetadata: Possible configurations supported if the current
821 // region is a custom region.
822 CustomRegionMetadata []*GoogleCloudMetastoreV1betaCustomRegionMetadata `json:"customRegionMetadata,omitempty"`
823 // MultiRegionMetadata: The multi-region metadata if the current region is a
824 // multi-region.
825 MultiRegionMetadata *GoogleCloudMetastoreV1betaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"`
826 // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be
827 // used when creating a new metastore service in this location. The server
828 // guarantees that exactly one HiveMetastoreVersion in the list will set
829 // is_default.
830 SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1betaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"`
831 // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to
832 // unconditionally include in API requests. By default, fields with empty or
833 // default values are omitted from API requests. See
834 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
835 // details.
836 ForceSendFields []string `json:"-"`
837 // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include
838 // in API requests with the JSON null value. By default, fields with empty
839 // values are omitted from API requests. See
840 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
841 NullFields []string `json:"-"`
842 }
843
844 func (s GoogleCloudMetastoreV1betaLocationMetadata) MarshalJSON() ([]byte, error) {
845 type NoMethod GoogleCloudMetastoreV1betaLocationMetadata
846 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
847 }
848
849 // GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse: Response message for
850 // DataprocMetastore.MoveTableToDatabase.
851 type GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse struct {
852 }
853
854 // GoogleCloudMetastoreV1betaMultiRegionMetadata: The metadata for the
855 // multi-region that includes the constituent regions. The metadata is only
856 // populated if the region is multi-region. For single region or custom dual
857 // region, it will be empty.
858 type GoogleCloudMetastoreV1betaMultiRegionMetadata struct {
859 // ConstituentRegions: The regions constituting the multi-region.
860 ConstituentRegions []string `json:"constituentRegions,omitempty"`
861 // Continent: The continent for this multi-region.
862 Continent string `json:"continent,omitempty"`
863 // WitnessRegion: The Spanner witness region for this multi-region.
864 WitnessRegion string `json:"witnessRegion,omitempty"`
865 // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to
866 // unconditionally include in API requests. By default, fields with empty or
867 // default values are omitted from API requests. See
868 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
869 // details.
870 ForceSendFields []string `json:"-"`
871 // NullFields is a list of field names (e.g. "ConstituentRegions") to include
872 // in API requests with the JSON null value. By default, fields with empty
873 // values are omitted from API requests. See
874 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
875 NullFields []string `json:"-"`
876 }
877
878 func (s GoogleCloudMetastoreV1betaMultiRegionMetadata) MarshalJSON() ([]byte, error) {
879 type NoMethod GoogleCloudMetastoreV1betaMultiRegionMetadata
880 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
881 }
882
883 // GoogleCloudMetastoreV1betaOperationMetadata: Represents the metadata of a
884 // long-running operation.
885 type GoogleCloudMetastoreV1betaOperationMetadata struct {
886 // ApiVersion: Output only. API version used to start the operation.
887 ApiVersion string `json:"apiVersion,omitempty"`
888 // CreateTime: Output only. The time the operation was created.
889 CreateTime string `json:"createTime,omitempty"`
890 // EndTime: Output only. The time the operation finished running.
891 EndTime string `json:"endTime,omitempty"`
892 // RequestedCancellation: Output only. Identifies whether the caller has
893 // requested cancellation of the operation. Operations that have successfully
894 // been cancelled have google.longrunning.Operation.error value with a
895 // google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
896 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
897 // StatusMessage: Output only. Human-readable status of the operation, if any.
898 StatusMessage string `json:"statusMessage,omitempty"`
899 // Target: Output only. Server-defined resource path for the target of the
900 // operation.
901 Target string `json:"target,omitempty"`
902 // Verb: Output only. Name of the verb executed by the operation.
903 Verb string `json:"verb,omitempty"`
904 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
905 // unconditionally include in API requests. By default, fields with empty or
906 // default values are omitted from API requests. See
907 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
908 // details.
909 ForceSendFields []string `json:"-"`
910 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
911 // requests with the JSON null value. By default, fields with empty values are
912 // omitted from API requests. See
913 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
914 NullFields []string `json:"-"`
915 }
916
917 func (s GoogleCloudMetastoreV1betaOperationMetadata) MarshalJSON() ([]byte, error) {
918 type NoMethod GoogleCloudMetastoreV1betaOperationMetadata
919 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
920 }
921
922 // GoogleCloudMetastoreV1betaQueryMetadataResponse: Response message for
923 // DataprocMetastore.QueryMetadata.
924 type GoogleCloudMetastoreV1betaQueryMetadataResponse struct {
925 // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud
926 // Storage. This instance manifests immediately along with
927 // QueryMetadataResponse. The content of the URI is not retriable until the
928 // long-running operation query against the metadata finishes.
929 ResultManifestUri string `json:"resultManifestUri,omitempty"`
930 // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to
931 // unconditionally include in API requests. By default, fields with empty or
932 // default values are omitted from API requests. See
933 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
934 // details.
935 ForceSendFields []string `json:"-"`
936 // NullFields is a list of field names (e.g. "ResultManifestUri") to include in
937 // API requests with the JSON null value. By default, fields with empty values
938 // are omitted from API requests. See
939 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
940 NullFields []string `json:"-"`
941 }
942
943 func (s GoogleCloudMetastoreV1betaQueryMetadataResponse) MarshalJSON() ([]byte, error) {
944 type NoMethod GoogleCloudMetastoreV1betaQueryMetadataResponse
945 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
946 }
947
948 // GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest: Request message
949 // for DataprocMetastore.AlterMetadataResourceLocation.
950 type GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest struct {
951 // LocationUri: Required. The new location URI for the metadata resource.
952 LocationUri string `json:"locationUri,omitempty"`
953 // ResourceName: Required. The relative metadata resource name in the following
954 // format.databases/{database_id} or databases/{database_id}/tables/{table_id}
955 // or databases/{database_id}/tables/{table_id}/partitions/{partition_id}
956 ResourceName string `json:"resourceName,omitempty"`
957 // ForceSendFields is a list of field names (e.g. "LocationUri") to
958 // unconditionally include in API requests. By default, fields with empty or
959 // default values are omitted from API requests. See
960 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
961 // details.
962 ForceSendFields []string `json:"-"`
963 // NullFields is a list of field names (e.g. "LocationUri") to include in API
964 // requests with the JSON null value. By default, fields with empty values are
965 // omitted from API requests. See
966 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
967 NullFields []string `json:"-"`
968 }
969
970 func (s GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) {
971 type NoMethod GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest
972 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
973 }
974
975 // GoogleCloudMetastoreV2AlterTablePropertiesRequest: Request message for
976 // DataprocMetastore.AlterTableProperties.
977 type GoogleCloudMetastoreV2AlterTablePropertiesRequest struct {
978 // Properties: A map that describes the desired values to mutate. If
979 // update_mask is empty, the properties will not update. Otherwise, the
980 // properties only alters the value whose associated paths exist in the update
981 // mask
982 Properties map[string]string `json:"properties,omitempty"`
983 // TableName: Required. The name of the table containing the properties you're
984 // altering in the following format.databases/{database_id}/tables/{table_id}
985 TableName string `json:"tableName,omitempty"`
986 // UpdateMask: A field mask that specifies the metadata table properties that
987 // are overwritten by the update. Fields specified in the update_mask are
988 // relative to the resource (not to the full request). A field is overwritten
989 // if it is in the mask.For example, given the target properties: properties {
990 // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if
991 // the field mask is:paths: "properties.b", "properties.c"then the result will
992 // be: properties { a: 1 b: 3 c: 4 }
993 UpdateMask string `json:"updateMask,omitempty"`
994 // ForceSendFields is a list of field names (e.g. "Properties") to
995 // unconditionally include in API requests. By default, fields with empty or
996 // default values are omitted from API requests. See
997 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
998 // details.
999 ForceSendFields []string `json:"-"`
1000 // NullFields is a list of field names (e.g. "Properties") to include in API
1001 // requests with the JSON null value. By default, fields with empty values are
1002 // omitted from API requests. See
1003 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1004 NullFields []string `json:"-"`
1005 }
1006
1007 func (s GoogleCloudMetastoreV2AlterTablePropertiesRequest) MarshalJSON() ([]byte, error) {
1008 type NoMethod GoogleCloudMetastoreV2AlterTablePropertiesRequest
1009 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1010 }
1011
1012 // GoogleCloudMetastoreV2AuxiliaryVersionConfig: Configuration information for
1013 // the auxiliary service versions.
1014 type GoogleCloudMetastoreV2AuxiliaryVersionConfig struct {
1015 // ConfigOverrides: A mapping of Hive metastore configuration key-value pairs
1016 // to apply to the auxiliary Hive metastore (configured in hive-site.xml) in
1017 // addition to the primary version's overrides. If keys are present in both the
1018 // auxiliary version's overrides and the primary version's overrides, the value
1019 // from the auxiliary version's overrides takes precedence.
1020 ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
1021 // Endpoints: Output only. The list of endpoints used to access the auxiliary
1022 // metastore service, includes version and region data.
1023 Endpoints []*GoogleCloudMetastoreV2Endpoint `json:"endpoints,omitempty"`
1024 // Version: The Hive metastore version of the auxiliary service. It must be
1025 // less than the primary Hive metastore service's version.
1026 Version string `json:"version,omitempty"`
1027 // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to
1028 // unconditionally include in API requests. By default, fields with empty or
1029 // default values are omitted from API requests. See
1030 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1031 // details.
1032 ForceSendFields []string `json:"-"`
1033 // NullFields is a list of field names (e.g. "ConfigOverrides") to include in
1034 // API requests with the JSON null value. By default, fields with empty values
1035 // are omitted from API requests. See
1036 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1037 NullFields []string `json:"-"`
1038 }
1039
1040 func (s GoogleCloudMetastoreV2AuxiliaryVersionConfig) MarshalJSON() ([]byte, error) {
1041 type NoMethod GoogleCloudMetastoreV2AuxiliaryVersionConfig
1042 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1043 }
1044
1045 // GoogleCloudMetastoreV2Backup: The details of a backup resource.
1046 type GoogleCloudMetastoreV2Backup struct {
1047 // CreateTime: Output only. The time when the backup was started.
1048 CreateTime string `json:"createTime,omitempty"`
1049 // Description: The description of the backup.
1050 Description string `json:"description,omitempty"`
1051 // EndTime: Output only. The time when the backup finished creating.
1052 EndTime string `json:"endTime,omitempty"`
1053 // Name: Immutable. The relative resource name of the backup, in the following
1054 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
1055 // backups/{backup_id}
1056 Name string `json:"name,omitempty"`
1057 // RestoringServices: Output only. Services that are restoring from the backup.
1058 RestoringServices []string `json:"restoringServices,omitempty"`
1059 // ServiceRevision: Output only. The revision of the service at the time of
1060 // backup.
1061 ServiceRevision *GoogleCloudMetastoreV2Service `json:"serviceRevision,omitempty"`
1062 // State: Output only. The current state of the backup.
1063 //
1064 // Possible values:
1065 // "STATE_UNSPECIFIED" - The state of the backup is unknown.
1066 // "CREATING" - The backup is being created.
1067 // "DELETING" - The backup is being deleted.
1068 // "ACTIVE" - The backup is active and ready to use.
1069 // "FAILED" - The backup failed.
1070 // "RESTORING" - The backup is being restored.
1071 State string `json:"state,omitempty"`
1072
1073 // ServerResponse contains the HTTP response code and headers from the server.
1074 googleapi.ServerResponse `json:"-"`
1075 // ForceSendFields is a list of field names (e.g. "CreateTime") to
1076 // unconditionally include in API requests. By default, fields with empty or
1077 // default values are omitted from API requests. See
1078 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1079 // details.
1080 ForceSendFields []string `json:"-"`
1081 // NullFields is a list of field names (e.g. "CreateTime") to include in API
1082 // requests with the JSON null value. By default, fields with empty values are
1083 // omitted from API requests. See
1084 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1085 NullFields []string `json:"-"`
1086 }
1087
1088 func (s GoogleCloudMetastoreV2Backup) MarshalJSON() ([]byte, error) {
1089 type NoMethod GoogleCloudMetastoreV2Backup
1090 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1091 }
1092
1093 // GoogleCloudMetastoreV2DataCatalogConfig: Specifies how metastore metadata
1094 // should be integrated with the Data Catalog service.
1095 type GoogleCloudMetastoreV2DataCatalogConfig struct {
1096 // Enabled: Optional. Defines whether the metastore metadata should be synced
1097 // to Data Catalog. The default value is to disable syncing metastore metadata
1098 // to Data Catalog.
1099 Enabled bool `json:"enabled,omitempty"`
1100 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
1101 // include in API requests. By default, fields with empty or default values are
1102 // omitted from API requests. See
1103 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1104 // details.
1105 ForceSendFields []string `json:"-"`
1106 // NullFields is a list of field names (e.g. "Enabled") to include in API
1107 // requests with the JSON null value. By default, fields with empty values are
1108 // omitted from API requests. See
1109 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1110 NullFields []string `json:"-"`
1111 }
1112
1113 func (s GoogleCloudMetastoreV2DataCatalogConfig) MarshalJSON() ([]byte, error) {
1114 type NoMethod GoogleCloudMetastoreV2DataCatalogConfig
1115 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1116 }
1117
1118 // GoogleCloudMetastoreV2DatabaseDump: A specification of the location and
1119 // metadata type for a database dump from a relational database management
1120 // system.
1121 type GoogleCloudMetastoreV2DatabaseDump struct {
1122 // GcsUri: Required. A Cloud Storage object or folder URI that specifies the
1123 // source from which to import metadata. It must begin with gs://.
1124 GcsUri string `json:"gcsUri,omitempty"`
1125 // Type: Optional. The type of the database dump. If unspecified, defaults to
1126 // MYSQL.
1127 //
1128 // Possible values:
1129 // "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
1130 // "MYSQL" - Database dump is a MySQL dump file.
1131 // "AVRO" - Database dump contains Avro files.
1132 Type string `json:"type,omitempty"`
1133 // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally
1134 // include in API requests. By default, fields with empty or default values are
1135 // omitted from API requests. See
1136 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1137 // details.
1138 ForceSendFields []string `json:"-"`
1139 // NullFields is a list of field names (e.g. "GcsUri") to include in API
1140 // requests with the JSON null value. By default, fields with empty values are
1141 // omitted from API requests. See
1142 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1143 NullFields []string `json:"-"`
1144 }
1145
1146 func (s GoogleCloudMetastoreV2DatabaseDump) MarshalJSON() ([]byte, error) {
1147 type NoMethod GoogleCloudMetastoreV2DatabaseDump
1148 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1149 }
1150
1151 // GoogleCloudMetastoreV2EncryptionConfig: Encryption settings for the service.
1152 type GoogleCloudMetastoreV2EncryptionConfig struct {
1153 }
1154
1155 // GoogleCloudMetastoreV2Endpoint: An endpoint used to access the metastore
1156 // service.
1157 type GoogleCloudMetastoreV2Endpoint struct {
1158 // EndpointUri: Output only. The URI of the endpoint used to access the
1159 // metastore service.
1160 EndpointUri string `json:"endpointUri,omitempty"`
1161 // Region: Output only. The region where the endpoint is located.
1162 Region string `json:"region,omitempty"`
1163 // ForceSendFields is a list of field names (e.g. "EndpointUri") to
1164 // unconditionally include in API requests. By default, fields with empty or
1165 // default values are omitted from API requests. See
1166 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1167 // details.
1168 ForceSendFields []string `json:"-"`
1169 // NullFields is a list of field names (e.g. "EndpointUri") to include in API
1170 // requests with the JSON null value. By default, fields with empty values are
1171 // omitted from API requests. See
1172 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1173 NullFields []string `json:"-"`
1174 }
1175
1176 func (s GoogleCloudMetastoreV2Endpoint) MarshalJSON() ([]byte, error) {
1177 type NoMethod GoogleCloudMetastoreV2Endpoint
1178 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1179 }
1180
1181 // GoogleCloudMetastoreV2ExportMetadataRequest: Request message for
1182 // DataprocMetastore.ExportMetadata.
1183 type GoogleCloudMetastoreV2ExportMetadataRequest struct {
1184 // DatabaseDumpType: Optional. The type of the database dump. If unspecified,
1185 // defaults to MYSQL.
1186 //
1187 // Possible values:
1188 // "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
1189 // "MYSQL" - Database dump is a MySQL dump file.
1190 // "AVRO" - Database dump contains Avro files.
1191 DatabaseDumpType string `json:"databaseDumpType,omitempty"`
1192 // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///.
1193 // A sub-folder containing exported files will be created below it.
1194 DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"`
1195 // RequestId: Optional. A request ID. Specify a unique request ID to allow the
1196 // server to ignore the request if it has completed. The server will ignore
1197 // subsequent requests that provide a duplicate request ID for at least 60
1198 // minutes after the first request.For example, if an initial request times
1199 // out, followed by another request with the same request ID, the server
1200 // ignores the second request to prevent the creation of duplicate
1201 // commitments.The request ID must be a valid UUID
1202 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero
1203 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
1204 RequestId string `json:"requestId,omitempty"`
1205 // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to
1206 // unconditionally include in API requests. By default, fields with empty or
1207 // default values are omitted from API requests. See
1208 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1209 // details.
1210 ForceSendFields []string `json:"-"`
1211 // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in
1212 // API requests with the JSON null value. By default, fields with empty values
1213 // are omitted from API requests. See
1214 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1215 NullFields []string `json:"-"`
1216 }
1217
1218 func (s GoogleCloudMetastoreV2ExportMetadataRequest) MarshalJSON() ([]byte, error) {
1219 type NoMethod GoogleCloudMetastoreV2ExportMetadataRequest
1220 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1221 }
1222
1223 // GoogleCloudMetastoreV2HiveMetastoreConfig: Specifies configuration
1224 // information specific to running Hive metastore software as the metastore
1225 // service.
1226 type GoogleCloudMetastoreV2HiveMetastoreConfig struct {
1227 // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the
1228 // auxiliary version configuration. When specified, a secondary Hive metastore
1229 // service is created along with the primary service. All auxiliary versions
1230 // must be less than the service's primary version. The key is the auxiliary
1231 // service name and it must match the regular expression a-z?. This means that
1232 // the first character must be a lowercase letter, and all the following
1233 // characters must be hyphens, lowercase letters, or digits, except the last
1234 // character, which cannot be a hyphen.
1235 AuxiliaryVersions map[string]GoogleCloudMetastoreV2AuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"`
1236 // ConfigOverrides: Optional. A mapping of Hive metastore configuration
1237 // key-value pairs to apply to the Hive metastore (configured in
1238 // hive-site.xml). The mappings override system defaults (some keys cannot be
1239 // overridden). These overrides are also applied to auxiliary versions and can
1240 // be further customized in the auxiliary version's AuxiliaryVersionConfig.
1241 ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
1242 // EndpointProtocol: Optional. The protocol to use for the metastore service
1243 // endpoint. If unspecified, defaults to GRPC.
1244 //
1245 // Possible values:
1246 // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set.
1247 // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service
1248 // endpoint.
1249 // "GRPC" - Use the modernized gRPC protocol for the metastore service
1250 // endpoint.
1251 EndpointProtocol string `json:"endpointProtocol,omitempty"`
1252 // Version: Immutable. The Hive metastore schema version.
1253 Version string `json:"version,omitempty"`
1254 // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to
1255 // unconditionally include in API requests. By default, fields with empty or
1256 // default values are omitted from API requests. See
1257 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1258 // details.
1259 ForceSendFields []string `json:"-"`
1260 // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in
1261 // API requests with the JSON null value. By default, fields with empty values
1262 // are omitted from API requests. See
1263 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1264 NullFields []string `json:"-"`
1265 }
1266
1267 func (s GoogleCloudMetastoreV2HiveMetastoreConfig) MarshalJSON() ([]byte, error) {
1268 type NoMethod GoogleCloudMetastoreV2HiveMetastoreConfig
1269 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1270 }
1271
1272 // GoogleCloudMetastoreV2ImportMetadataRequest: Request message for
1273 // DataprocMetastore.CreateMetadataImport.
1274 type GoogleCloudMetastoreV2ImportMetadataRequest struct {
1275 // DatabaseDump: Immutable. A database dump from a pre-existing metastore's
1276 // database.
1277 DatabaseDump *GoogleCloudMetastoreV2DatabaseDump `json:"databaseDump,omitempty"`
1278 // Description: Optional. The description of the metadata import.
1279 Description string `json:"description,omitempty"`
1280 // RequestId: Optional. A request ID. Specify a unique request ID to allow the
1281 // server to ignore the request if it has completed. The server will ignore
1282 // subsequent requests that provide a duplicate request ID for at least 60
1283 // minutes after the first request.For example, if an initial request times
1284 // out, followed by another request with the same request ID, the server
1285 // ignores the second request to prevent the creation of duplicate
1286 // commitments.The request ID must be a valid UUID
1287 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero
1288 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
1289 RequestId string `json:"requestId,omitempty"`
1290 // ForceSendFields is a list of field names (e.g. "DatabaseDump") to
1291 // unconditionally include in API requests. By default, fields with empty or
1292 // default values are omitted from API requests. See
1293 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1294 // details.
1295 ForceSendFields []string `json:"-"`
1296 // NullFields is a list of field names (e.g. "DatabaseDump") to include in API
1297 // requests with the JSON null value. By default, fields with empty values are
1298 // omitted from API requests. See
1299 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1300 NullFields []string `json:"-"`
1301 }
1302
1303 func (s GoogleCloudMetastoreV2ImportMetadataRequest) MarshalJSON() ([]byte, error) {
1304 type NoMethod GoogleCloudMetastoreV2ImportMetadataRequest
1305 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1306 }
1307
1308 // GoogleCloudMetastoreV2LatestBackup: The details of the latest scheduled
1309 // backup.
1310 type GoogleCloudMetastoreV2LatestBackup struct {
1311 // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if
1312 // no backup is in progress.
1313 BackupId string `json:"backupId,omitempty"`
1314 // Duration: Output only. The duration of the backup completion.
1315 Duration string `json:"duration,omitempty"`
1316 // StartTime: Output only. The time when the backup was started.
1317 StartTime string `json:"startTime,omitempty"`
1318 // State: Output only. The current state of the backup.
1319 //
1320 // Possible values:
1321 // "STATE_UNSPECIFIED" - The state of the backup is unknown.
1322 // "IN_PROGRESS" - The backup is in progress.
1323 // "SUCCEEDED" - The backup completed.
1324 // "FAILED" - The backup failed.
1325 State string `json:"state,omitempty"`
1326 // ForceSendFields is a list of field names (e.g. "BackupId") to
1327 // unconditionally include in API requests. By default, fields with empty or
1328 // default values are omitted from API requests. See
1329 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1330 // details.
1331 ForceSendFields []string `json:"-"`
1332 // NullFields is a list of field names (e.g. "BackupId") to include in API
1333 // requests with the JSON null value. By default, fields with empty values are
1334 // omitted from API requests. See
1335 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1336 NullFields []string `json:"-"`
1337 }
1338
1339 func (s GoogleCloudMetastoreV2LatestBackup) MarshalJSON() ([]byte, error) {
1340 type NoMethod GoogleCloudMetastoreV2LatestBackup
1341 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1342 }
1343
1344 // GoogleCloudMetastoreV2ListBackupsResponse: Response message for
1345 // DataprocMetastore.ListBackups.
1346 type GoogleCloudMetastoreV2ListBackupsResponse struct {
1347 // Backups: The backups of the specified service.
1348 Backups []*GoogleCloudMetastoreV2Backup `json:"backups,omitempty"`
1349 // NextPageToken: A token that can be sent as page_token to retrieve the next
1350 // page. If this field is omitted, there are no subsequent pages.
1351 NextPageToken string `json:"nextPageToken,omitempty"`
1352 // Unreachable: Locations that could not be reached.
1353 Unreachable []string `json:"unreachable,omitempty"`
1354
1355 // ServerResponse contains the HTTP response code and headers from the server.
1356 googleapi.ServerResponse `json:"-"`
1357 // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally
1358 // include in API requests. By default, fields with empty or default values are
1359 // omitted from API requests. See
1360 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1361 // details.
1362 ForceSendFields []string `json:"-"`
1363 // NullFields is a list of field names (e.g. "Backups") to include in API
1364 // requests with the JSON null value. By default, fields with empty values are
1365 // omitted from API requests. See
1366 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1367 NullFields []string `json:"-"`
1368 }
1369
1370 func (s GoogleCloudMetastoreV2ListBackupsResponse) MarshalJSON() ([]byte, error) {
1371 type NoMethod GoogleCloudMetastoreV2ListBackupsResponse
1372 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1373 }
1374
1375 // GoogleCloudMetastoreV2ListServicesResponse: Response message for
1376 // DataprocMetastore.ListServices.
1377 type GoogleCloudMetastoreV2ListServicesResponse struct {
1378 // NextPageToken: A token that can be sent as page_token to retrieve the next
1379 // page. If this field is omitted, there are no subsequent pages.
1380 NextPageToken string `json:"nextPageToken,omitempty"`
1381 // Services: The services in the specified location.
1382 Services []*GoogleCloudMetastoreV2Service `json:"services,omitempty"`
1383 // Unreachable: Locations that could not be reached.
1384 Unreachable []string `json:"unreachable,omitempty"`
1385
1386 // ServerResponse contains the HTTP response code and headers from the server.
1387 googleapi.ServerResponse `json:"-"`
1388 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
1389 // unconditionally include in API requests. By default, fields with empty or
1390 // default values are omitted from API requests. See
1391 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1392 // details.
1393 ForceSendFields []string `json:"-"`
1394 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
1395 // requests with the JSON null value. By default, fields with empty values are
1396 // omitted from API requests. See
1397 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1398 NullFields []string `json:"-"`
1399 }
1400
1401 func (s GoogleCloudMetastoreV2ListServicesResponse) MarshalJSON() ([]byte, error) {
1402 type NoMethod GoogleCloudMetastoreV2ListServicesResponse
1403 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1404 }
1405
1406 // GoogleCloudMetastoreV2MetadataIntegration: Specifies how metastore metadata
1407 // should be integrated with external services.
1408 type GoogleCloudMetastoreV2MetadataIntegration struct {
1409 // DataCatalogConfig: Optional. The integration config for the Data Catalog
1410 // service.
1411 DataCatalogConfig *GoogleCloudMetastoreV2DataCatalogConfig `json:"dataCatalogConfig,omitempty"`
1412 // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to
1413 // unconditionally include in API requests. By default, fields with empty or
1414 // default values are omitted from API requests. See
1415 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1416 // details.
1417 ForceSendFields []string `json:"-"`
1418 // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in
1419 // API requests with the JSON null value. By default, fields with empty values
1420 // are omitted from API requests. See
1421 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1422 NullFields []string `json:"-"`
1423 }
1424
1425 func (s GoogleCloudMetastoreV2MetadataIntegration) MarshalJSON() ([]byte, error) {
1426 type NoMethod GoogleCloudMetastoreV2MetadataIntegration
1427 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1428 }
1429
1430 // GoogleCloudMetastoreV2MoveTableToDatabaseRequest: Request message for
1431 // DataprocMetastore.MoveTableToDatabase.
1432 type GoogleCloudMetastoreV2MoveTableToDatabaseRequest struct {
1433 // DbName: Required. The name of the database where the table resides.
1434 DbName string `json:"dbName,omitempty"`
1435 // DestinationDbName: Required. The name of the database where the table should
1436 // be moved.
1437 DestinationDbName string `json:"destinationDbName,omitempty"`
1438 // TableName: Required. The name of the table to be moved.
1439 TableName string `json:"tableName,omitempty"`
1440 // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally
1441 // include in API requests. By default, fields with empty or default values are
1442 // omitted from API requests. See
1443 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1444 // details.
1445 ForceSendFields []string `json:"-"`
1446 // NullFields is a list of field names (e.g. "DbName") to include in API
1447 // requests with the JSON null value. By default, fields with empty values are
1448 // omitted from API requests. See
1449 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1450 NullFields []string `json:"-"`
1451 }
1452
1453 func (s GoogleCloudMetastoreV2MoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) {
1454 type NoMethod GoogleCloudMetastoreV2MoveTableToDatabaseRequest
1455 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1456 }
1457
1458 // GoogleCloudMetastoreV2QueryMetadataRequest: Request message for
1459 // DataprocMetastore.QueryMetadata.
1460 type GoogleCloudMetastoreV2QueryMetadataRequest struct {
1461 // Query: Required. A read-only SQL query to execute against the metadata
1462 // database. The query cannot change or mutate the data.
1463 Query string `json:"query,omitempty"`
1464 // ForceSendFields is a list of field names (e.g. "Query") to unconditionally
1465 // include in API requests. By default, fields with empty or default values are
1466 // omitted from API requests. See
1467 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1468 // details.
1469 ForceSendFields []string `json:"-"`
1470 // NullFields is a list of field names (e.g. "Query") to include in API
1471 // requests with the JSON null value. By default, fields with empty values are
1472 // omitted from API requests. See
1473 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1474 NullFields []string `json:"-"`
1475 }
1476
1477 func (s GoogleCloudMetastoreV2QueryMetadataRequest) MarshalJSON() ([]byte, error) {
1478 type NoMethod GoogleCloudMetastoreV2QueryMetadataRequest
1479 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1480 }
1481
1482 // GoogleCloudMetastoreV2RestoreServiceRequest: Request message for
1483 // DataprocMetastore.Restore.
1484 type GoogleCloudMetastoreV2RestoreServiceRequest struct {
1485 // Backup: Optional. The relative resource name of the metastore service backup
1486 // to restore from, in the following
1487 // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back
1488 // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of
1489 // the two must be set.
1490 Backup string `json:"backup,omitempty"`
1491 // BackupLocation: Optional. A Cloud Storage URI specifying the location of the
1492 // backup artifacts, namely - backup avro files under "avro/",
1493 // backup_metastore.json and service.json, in the following form:gs://.
1494 // Mutually exclusive with backup, and exactly one of the two must be set.
1495 BackupLocation string `json:"backupLocation,omitempty"`
1496 // RequestId: Optional. A request ID. Specify a unique request ID to allow the
1497 // server to ignore the request if it has completed. The server will ignore
1498 // subsequent requests that provide a duplicate request ID for at least 60
1499 // minutes after the first request.For example, if an initial request times
1500 // out, followed by another request with the same request ID, the server
1501 // ignores the second request to prevent the creation of duplicate
1502 // commitments.The request ID must be a valid UUID
1503 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero
1504 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
1505 RequestId string `json:"requestId,omitempty"`
1506 // RestoreType: Optional. The type of restore. If unspecified, defaults to
1507 // METADATA_ONLY.
1508 //
1509 // Possible values:
1510 // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown.
1511 // "FULL" - The service's metadata and configuration are restored.
1512 // "METADATA_ONLY" - Only the service's metadata is restored.
1513 RestoreType string `json:"restoreType,omitempty"`
1514 // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
1515 // include in API requests. By default, fields with empty or default values are
1516 // omitted from API requests. See
1517 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1518 // details.
1519 ForceSendFields []string `json:"-"`
1520 // NullFields is a list of field names (e.g. "Backup") to include in API
1521 // requests with the JSON null value. By default, fields with empty values are
1522 // omitted from API requests. See
1523 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1524 NullFields []string `json:"-"`
1525 }
1526
1527 func (s GoogleCloudMetastoreV2RestoreServiceRequest) MarshalJSON() ([]byte, error) {
1528 type NoMethod GoogleCloudMetastoreV2RestoreServiceRequest
1529 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1530 }
1531
1532 // GoogleCloudMetastoreV2ScalingConfig: Represents the scaling configuration of
1533 // a metastore service.
1534 type GoogleCloudMetastoreV2ScalingConfig struct {
1535 // ScalingFactor: Optional. Scaling factor from 1 to 5, increments of 1.
1536 ScalingFactor int64 `json:"scalingFactor,omitempty"`
1537 // ForceSendFields is a list of field names (e.g. "ScalingFactor") to
1538 // unconditionally include in API requests. By default, fields with empty or
1539 // default values are omitted from API requests. See
1540 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1541 // details.
1542 ForceSendFields []string `json:"-"`
1543 // NullFields is a list of field names (e.g. "ScalingFactor") to include in API
1544 // requests with the JSON null value. By default, fields with empty values are
1545 // omitted from API requests. See
1546 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1547 NullFields []string `json:"-"`
1548 }
1549
1550 func (s GoogleCloudMetastoreV2ScalingConfig) MarshalJSON() ([]byte, error) {
1551 type NoMethod GoogleCloudMetastoreV2ScalingConfig
1552 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1553 }
1554
1555 // GoogleCloudMetastoreV2ScheduledBackup: This specifies the configuration of
1556 // scheduled backup.
1557 type GoogleCloudMetastoreV2ScheduledBackup struct {
1558 // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format
1559 // gs:///. A sub-folder containing backup files will be stored below it.
1560 BackupLocation string `json:"backupLocation,omitempty"`
1561 // CronSchedule: Optional. The scheduled interval in Cron format, see
1562 // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is
1563 // not enabled. Must be specified to enable scheduled backups.
1564 CronSchedule string `json:"cronSchedule,omitempty"`
1565 // Enabled: Optional. Defines whether the scheduled backup is enabled. The
1566 // default value is false.
1567 Enabled bool `json:"enabled,omitempty"`
1568 // LatestBackup: Output only. The details of the latest scheduled backup.
1569 LatestBackup *GoogleCloudMetastoreV2LatestBackup `json:"latestBackup,omitempty"`
1570 // NextScheduledTime: Output only. The time when the next backups execution is
1571 // scheduled to start.
1572 NextScheduledTime string `json:"nextScheduledTime,omitempty"`
1573 // TimeZone: Optional. Specifies the time zone to be used when interpreting
1574 // cron_schedule. Must be a time zone name from the time zone database
1575 // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g.
1576 // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is
1577 // UTC.
1578 TimeZone string `json:"timeZone,omitempty"`
1579 // ForceSendFields is a list of field names (e.g. "BackupLocation") to
1580 // unconditionally include in API requests. By default, fields with empty or
1581 // default values are omitted from API requests. See
1582 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1583 // details.
1584 ForceSendFields []string `json:"-"`
1585 // NullFields is a list of field names (e.g. "BackupLocation") to include in
1586 // API requests with the JSON null value. By default, fields with empty values
1587 // are omitted from API requests. See
1588 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1589 NullFields []string `json:"-"`
1590 }
1591
1592 func (s GoogleCloudMetastoreV2ScheduledBackup) MarshalJSON() ([]byte, error) {
1593 type NoMethod GoogleCloudMetastoreV2ScheduledBackup
1594 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1595 }
1596
1597 // GoogleCloudMetastoreV2Service: A managed metastore service that serves
1598 // metadata queries.
1599 type GoogleCloudMetastoreV2Service struct {
1600 // CreateTime: Output only. The time when the metastore service was created.
1601 CreateTime string `json:"createTime,omitempty"`
1602 // EncryptionConfig: Immutable. Information used to configure the Dataproc
1603 // Metastore service to encrypt customer data at rest. Cannot be updated.
1604 EncryptionConfig *GoogleCloudMetastoreV2EncryptionConfig `json:"encryptionConfig,omitempty"`
1605 // Endpoints: Output only. The list of endpoints used to access the metastore
1606 // service.
1607 Endpoints []*GoogleCloudMetastoreV2Endpoint `json:"endpoints,omitempty"`
1608 // HiveMetastoreConfig: Configuration information specific to running Hive
1609 // metastore software as the metastore service.
1610 HiveMetastoreConfig *GoogleCloudMetastoreV2HiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"`
1611 // Labels: User-defined labels for the metastore service.
1612 Labels map[string]string `json:"labels,omitempty"`
1613 // MetadataIntegration: Optional. The setting that defines how metastore
1614 // metadata should be integrated with external services and systems.
1615 MetadataIntegration *GoogleCloudMetastoreV2MetadataIntegration `json:"metadataIntegration,omitempty"`
1616 // Name: Immutable. The relative resource name of the metastore service, in the
1617 // following
1618 // format:projects/{project_number}/locations/{location_id}/services/{service_id
1619 // }.
1620 Name string `json:"name,omitempty"`
1621 // ScalingConfig: Optional. Scaling configuration of the metastore service.
1622 ScalingConfig *GoogleCloudMetastoreV2ScalingConfig `json:"scalingConfig,omitempty"`
1623 // ScheduledBackup: Optional. The configuration of scheduled backup for the
1624 // metastore service.
1625 ScheduledBackup *GoogleCloudMetastoreV2ScheduledBackup `json:"scheduledBackup,omitempty"`
1626 // State: Output only. The current state of the metastore service.
1627 //
1628 // Possible values:
1629 // "STATE_UNSPECIFIED" - The state of the metastore service is unknown.
1630 // "CREATING" - The metastore service is in the process of being created.
1631 // "ACTIVE" - The metastore service is running and ready to serve queries.
1632 // "SUSPENDING" - The metastore service is entering suspension. Its
1633 // query-serving availability may cease unexpectedly.
1634 // "SUSPENDED" - The metastore service is suspended and unable to serve
1635 // queries.
1636 // "UPDATING" - The metastore service is being updated. It remains usable but
1637 // cannot accept additional update requests or be deleted at this time.
1638 // "DELETING" - The metastore service is undergoing deletion. It cannot be
1639 // used.
1640 // "ERROR" - The metastore service has encountered an error and cannot be
1641 // used. The metastore service should be deleted.
1642 State string `json:"state,omitempty"`
1643 // StateMessage: Output only. Additional information about the current state of
1644 // the metastore service, if available.
1645 StateMessage string `json:"stateMessage,omitempty"`
1646 // Uid: Output only. The globally unique resource identifier of the metastore
1647 // service.
1648 Uid string `json:"uid,omitempty"`
1649 // UpdateTime: Output only. The time when the metastore service was last
1650 // updated.
1651 UpdateTime string `json:"updateTime,omitempty"`
1652 // WarehouseGcsUri: Required. A Cloud Storage URI (starting with gs://) that
1653 // specifies the default warehouse directory of the Hive Metastore.
1654 WarehouseGcsUri string `json:"warehouseGcsUri,omitempty"`
1655
1656 // ServerResponse contains the HTTP response code and headers from the server.
1657 googleapi.ServerResponse `json:"-"`
1658 // ForceSendFields is a list of field names (e.g. "CreateTime") to
1659 // unconditionally include in API requests. By default, fields with empty or
1660 // default values are omitted from API requests. See
1661 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1662 // details.
1663 ForceSendFields []string `json:"-"`
1664 // NullFields is a list of field names (e.g. "CreateTime") to include in API
1665 // requests with the JSON null value. By default, fields with empty values are
1666 // omitted from API requests. See
1667 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1668 NullFields []string `json:"-"`
1669 }
1670
1671 func (s GoogleCloudMetastoreV2Service) MarshalJSON() ([]byte, error) {
1672 type NoMethod GoogleCloudMetastoreV2Service
1673 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1674 }
1675
1676 // GoogleLongrunningOperation: This resource represents a long-running
1677 // operation that is the result of a network API call.
1678 type GoogleLongrunningOperation struct {
1679 // Done: If the value is false, it means the operation is still in progress. If
1680 // true, the operation is completed, and either error or response is available.
1681 Done bool `json:"done,omitempty"`
1682 // Error: The error result of the operation in case of failure or cancellation.
1683 Error *GoogleRpcStatus `json:"error,omitempty"`
1684 // Metadata: Service-specific metadata associated with the operation. It
1685 // typically contains progress information and common metadata such as create
1686 // time. Some services might not provide such metadata. Any method that returns
1687 // a long-running operation should document the metadata type, if any.
1688 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1689 // Name: The server-assigned name, which is only unique within the same service
1690 // that originally returns it. If you use the default HTTP mapping, the name
1691 // should be a resource name ending with operations/{unique_id}.
1692 Name string `json:"name,omitempty"`
1693 // Response: The normal, successful response of the operation. If the original
1694 // method returns no data on success, such as Delete, the response is
1695 // google.protobuf.Empty. If the original method is standard Get/Create/Update,
1696 // the response should be the resource. For other methods, the response should
1697 // have the type XxxResponse, where Xxx is the original method name. For
1698 // example, if the original method name is TakeSnapshot(), the inferred
1699 // response type is TakeSnapshotResponse.
1700 Response googleapi.RawMessage `json:"response,omitempty"`
1701
1702 // ServerResponse contains the HTTP response code and headers from the server.
1703 googleapi.ServerResponse `json:"-"`
1704 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
1705 // include in API requests. By default, fields with empty or default values are
1706 // omitted from API requests. See
1707 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1708 // details.
1709 ForceSendFields []string `json:"-"`
1710 // NullFields is a list of field names (e.g. "Done") to include in API requests
1711 // with the JSON null value. By default, fields with empty values are omitted
1712 // from API requests. See
1713 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1714 NullFields []string `json:"-"`
1715 }
1716
1717 func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
1718 type NoMethod GoogleLongrunningOperation
1719 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1720 }
1721
1722 // GoogleRpcStatus: The Status type defines a logical error model that is
1723 // suitable for different programming environments, including REST APIs and RPC
1724 // APIs. It is used by gRPC (https://github.com/grpc). Each Status message
1725 // contains three pieces of data: error code, error message, and error
1726 // details.You can find out more about this error model and how to work with it
1727 // in the API Design Guide (https://cloud.google.com/apis/design/errors).
1728 type GoogleRpcStatus struct {
1729 // Code: The status code, which should be an enum value of google.rpc.Code.
1730 Code int64 `json:"code,omitempty"`
1731 // Details: A list of messages that carry the error details. There is a common
1732 // set of message types for APIs to use.
1733 Details []googleapi.RawMessage `json:"details,omitempty"`
1734 // Message: A developer-facing error message, which should be in English. Any
1735 // user-facing error message should be localized and sent in the
1736 // google.rpc.Status.details field, or localized by the client.
1737 Message string `json:"message,omitempty"`
1738 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
1739 // include in API requests. By default, fields with empty or default values are
1740 // omitted from API requests. See
1741 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1742 // details.
1743 ForceSendFields []string `json:"-"`
1744 // NullFields is a list of field names (e.g. "Code") to include in API requests
1745 // with the JSON null value. By default, fields with empty values are omitted
1746 // from API requests. See
1747 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1748 NullFields []string `json:"-"`
1749 }
1750
1751 func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) {
1752 type NoMethod GoogleRpcStatus
1753 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1754 }
1755
1756 type ProjectsLocationsServicesAlterLocationCall struct {
1757 s *Service
1758 service string
1759 googlecloudmetastorev2altermetadataresourcelocationrequest *GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest
1760 urlParams_ gensupport.URLParams
1761 ctx_ context.Context
1762 header_ http.Header
1763 }
1764
1765 // AlterLocation: Alter metadata resource location. The metadata resource can
1766 // be a database, table, or partition. This functionality only updates the
1767 // parent directory for the respective metadata resource and does not transfer
1768 // any existing data to the new location.
1769 //
1770 // - service: The relative resource name of the metastore service to mutate
1771 // metadata, in the following
1772 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
1773 func (r *ProjectsLocationsServicesService) AlterLocation(service string, googlecloudmetastorev2altermetadataresourcelocationrequest *GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall {
1774 c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1775 c.service = service
1776 c.googlecloudmetastorev2altermetadataresourcelocationrequest = googlecloudmetastorev2altermetadataresourcelocationrequest
1777 return c
1778 }
1779
1780 // Fields allows partial responses to be retrieved. See
1781 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
1782 // details.
1783 func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall {
1784 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1785 return c
1786 }
1787
1788 // Context sets the context to be used in this call's Do method.
1789 func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall {
1790 c.ctx_ = ctx
1791 return c
1792 }
1793
1794 // Header returns a http.Header that can be modified by the caller to add
1795 // headers to the request.
1796 func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header {
1797 if c.header_ == nil {
1798 c.header_ = make(http.Header)
1799 }
1800 return c.header_
1801 }
1802
1803 func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) {
1804 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1805 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2altermetadataresourcelocationrequest)
1806 if err != nil {
1807 return nil, err
1808 }
1809 c.urlParams_.Set("alt", alt)
1810 c.urlParams_.Set("prettyPrint", "false")
1811 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:alterLocation")
1812 urls += "?" + c.urlParams_.Encode()
1813 req, err := http.NewRequest("POST", urls, body)
1814 if err != nil {
1815 return nil, err
1816 }
1817 req.Header = reqHeaders
1818 googleapi.Expand(req.URL, map[string]string{
1819 "service": c.service,
1820 })
1821 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterLocation", "request", internallog.HTTPRequest(req, body.Bytes()))
1822 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1823 }
1824
1825 // Do executes the "metastore.projects.locations.services.alterLocation" call.
1826 // Any non-2xx status code is an error. Response headers are in either
1827 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
1828 // returned at all) in error.(*googleapi.Error).Header. Use
1829 // googleapi.IsNotModified to check whether the returned error was because
1830 // http.StatusNotModified was returned.
1831 func (c *ProjectsLocationsServicesAlterLocationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
1832 gensupport.SetOptions(c.urlParams_, opts...)
1833 res, err := c.doRequest("json")
1834 if res != nil && res.StatusCode == http.StatusNotModified {
1835 if res.Body != nil {
1836 res.Body.Close()
1837 }
1838 return nil, gensupport.WrapError(&googleapi.Error{
1839 Code: res.StatusCode,
1840 Header: res.Header,
1841 })
1842 }
1843 if err != nil {
1844 return nil, err
1845 }
1846 defer googleapi.CloseBody(res)
1847 if err := googleapi.CheckResponse(res); err != nil {
1848 return nil, gensupport.WrapError(err)
1849 }
1850 ret := &GoogleLongrunningOperation{
1851 ServerResponse: googleapi.ServerResponse{
1852 Header: res.Header,
1853 HTTPStatusCode: res.StatusCode,
1854 },
1855 }
1856 target := &ret
1857 b, err := gensupport.DecodeResponseBytes(target, res)
1858 if err != nil {
1859 return nil, err
1860 }
1861 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterLocation", "response", internallog.HTTPResponse(res, b))
1862 return ret, nil
1863 }
1864
1865 type ProjectsLocationsServicesAlterTablePropertiesCall struct {
1866 s *Service
1867 service string
1868 googlecloudmetastorev2altertablepropertiesrequest *GoogleCloudMetastoreV2AlterTablePropertiesRequest
1869 urlParams_ gensupport.URLParams
1870 ctx_ context.Context
1871 header_ http.Header
1872 }
1873
1874 // AlterTableProperties: Alter metadata table properties.
1875 //
1876 // - service: The relative resource name of the Dataproc Metastore service
1877 // that's being used to mutate metadata table properties, in the following
1878 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
1879 func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, googlecloudmetastorev2altertablepropertiesrequest *GoogleCloudMetastoreV2AlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall {
1880 c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1881 c.service = service
1882 c.googlecloudmetastorev2altertablepropertiesrequest = googlecloudmetastorev2altertablepropertiesrequest
1883 return c
1884 }
1885
1886 // Fields allows partial responses to be retrieved. See
1887 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
1888 // details.
1889 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall {
1890 c.urlParams_.Set("fields", googleapi.CombineFields(s))
1891 return c
1892 }
1893
1894 // Context sets the context to be used in this call's Do method.
1895 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall {
1896 c.ctx_ = ctx
1897 return c
1898 }
1899
1900 // Header returns a http.Header that can be modified by the caller to add
1901 // headers to the request.
1902 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header {
1903 if c.header_ == nil {
1904 c.header_ = make(http.Header)
1905 }
1906 return c.header_
1907 }
1908
1909 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) {
1910 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
1911 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2altertablepropertiesrequest)
1912 if err != nil {
1913 return nil, err
1914 }
1915 c.urlParams_.Set("alt", alt)
1916 c.urlParams_.Set("prettyPrint", "false")
1917 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:alterTableProperties")
1918 urls += "?" + c.urlParams_.Encode()
1919 req, err := http.NewRequest("POST", urls, body)
1920 if err != nil {
1921 return nil, err
1922 }
1923 req.Header = reqHeaders
1924 googleapi.Expand(req.URL, map[string]string{
1925 "service": c.service,
1926 })
1927 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterTableProperties", "request", internallog.HTTPRequest(req, body.Bytes()))
1928 return gensupport.SendRequest(c.ctx_, c.s.client, req)
1929 }
1930
1931 // Do executes the "metastore.projects.locations.services.alterTableProperties" call.
1932 // Any non-2xx status code is an error. Response headers are in either
1933 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
1934 // returned at all) in error.(*googleapi.Error).Header. Use
1935 // googleapi.IsNotModified to check whether the returned error was because
1936 // http.StatusNotModified was returned.
1937 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
1938 gensupport.SetOptions(c.urlParams_, opts...)
1939 res, err := c.doRequest("json")
1940 if res != nil && res.StatusCode == http.StatusNotModified {
1941 if res.Body != nil {
1942 res.Body.Close()
1943 }
1944 return nil, gensupport.WrapError(&googleapi.Error{
1945 Code: res.StatusCode,
1946 Header: res.Header,
1947 })
1948 }
1949 if err != nil {
1950 return nil, err
1951 }
1952 defer googleapi.CloseBody(res)
1953 if err := googleapi.CheckResponse(res); err != nil {
1954 return nil, gensupport.WrapError(err)
1955 }
1956 ret := &GoogleLongrunningOperation{
1957 ServerResponse: googleapi.ServerResponse{
1958 Header: res.Header,
1959 HTTPStatusCode: res.StatusCode,
1960 },
1961 }
1962 target := &ret
1963 b, err := gensupport.DecodeResponseBytes(target, res)
1964 if err != nil {
1965 return nil, err
1966 }
1967 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterTableProperties", "response", internallog.HTTPResponse(res, b))
1968 return ret, nil
1969 }
1970
1971 type ProjectsLocationsServicesCreateCall struct {
1972 s *Service
1973 parent string
1974 googlecloudmetastorev2service *GoogleCloudMetastoreV2Service
1975 urlParams_ gensupport.URLParams
1976 ctx_ context.Context
1977 header_ http.Header
1978 }
1979
1980 // Create: Creates a metastore service in a project and location.
1981 //
1982 // - parent: The relative resource name of the location in which to create a
1983 // metastore service, in the following
1984 // form:projects/{project_number}/locations/{location_id}.
1985 func (r *ProjectsLocationsServicesService) Create(parent string, googlecloudmetastorev2service *GoogleCloudMetastoreV2Service) *ProjectsLocationsServicesCreateCall {
1986 c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1987 c.parent = parent
1988 c.googlecloudmetastorev2service = googlecloudmetastorev2service
1989 return c
1990 }
1991
1992 // RequestId sets the optional parameter "requestId": A request ID. Specify a
1993 // unique request ID to allow the server to ignore the request if it has
1994 // completed. The server will ignore subsequent requests that provide a
1995 // duplicate request ID for at least 60 minutes after the first request.For
1996 // example, if an initial request times out, followed by another request with
1997 // the same request ID, the server ignores the second request to prevent the
1998 // creation of duplicate commitments.The request ID must be a valid UUID
1999 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
2000 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
2001 func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall {
2002 c.urlParams_.Set("requestId", requestId)
2003 return c
2004 }
2005
2006 // ServiceId sets the optional parameter "serviceId": Required. The ID of the
2007 // metastore service, which is used as the final component of the metastore
2008 // service's name.This value must be between 2 and 63 characters long
2009 // inclusive, begin with a letter, end with a letter or number, and consist of
2010 // alpha-numeric ASCII characters or hyphens.
2011 func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall {
2012 c.urlParams_.Set("serviceId", serviceId)
2013 return c
2014 }
2015
2016 // Fields allows partial responses to be retrieved. See
2017 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2018 // details.
2019 func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall {
2020 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2021 return c
2022 }
2023
2024 // Context sets the context to be used in this call's Do method.
2025 func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall {
2026 c.ctx_ = ctx
2027 return c
2028 }
2029
2030 // Header returns a http.Header that can be modified by the caller to add
2031 // headers to the request.
2032 func (c *ProjectsLocationsServicesCreateCall) Header() http.Header {
2033 if c.header_ == nil {
2034 c.header_ = make(http.Header)
2035 }
2036 return c.header_
2037 }
2038
2039 func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) {
2040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2041 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2service)
2042 if err != nil {
2043 return nil, err
2044 }
2045 c.urlParams_.Set("alt", alt)
2046 c.urlParams_.Set("prettyPrint", "false")
2047 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/services")
2048 urls += "?" + c.urlParams_.Encode()
2049 req, err := http.NewRequest("POST", urls, body)
2050 if err != nil {
2051 return nil, err
2052 }
2053 req.Header = reqHeaders
2054 googleapi.Expand(req.URL, map[string]string{
2055 "parent": c.parent,
2056 })
2057 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.create", "request", internallog.HTTPRequest(req, body.Bytes()))
2058 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2059 }
2060
2061 // Do executes the "metastore.projects.locations.services.create" call.
2062 // Any non-2xx status code is an error. Response headers are in either
2063 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
2064 // returned at all) in error.(*googleapi.Error).Header. Use
2065 // googleapi.IsNotModified to check whether the returned error was because
2066 // http.StatusNotModified was returned.
2067 func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2068 gensupport.SetOptions(c.urlParams_, opts...)
2069 res, err := c.doRequest("json")
2070 if res != nil && res.StatusCode == http.StatusNotModified {
2071 if res.Body != nil {
2072 res.Body.Close()
2073 }
2074 return nil, gensupport.WrapError(&googleapi.Error{
2075 Code: res.StatusCode,
2076 Header: res.Header,
2077 })
2078 }
2079 if err != nil {
2080 return nil, err
2081 }
2082 defer googleapi.CloseBody(res)
2083 if err := googleapi.CheckResponse(res); err != nil {
2084 return nil, gensupport.WrapError(err)
2085 }
2086 ret := &GoogleLongrunningOperation{
2087 ServerResponse: googleapi.ServerResponse{
2088 Header: res.Header,
2089 HTTPStatusCode: res.StatusCode,
2090 },
2091 }
2092 target := &ret
2093 b, err := gensupport.DecodeResponseBytes(target, res)
2094 if err != nil {
2095 return nil, err
2096 }
2097 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.create", "response", internallog.HTTPResponse(res, b))
2098 return ret, nil
2099 }
2100
2101 type ProjectsLocationsServicesDeleteCall struct {
2102 s *Service
2103 name string
2104 urlParams_ gensupport.URLParams
2105 ctx_ context.Context
2106 header_ http.Header
2107 }
2108
2109 // Delete: Deletes a single service.
2110 //
2111 // - name: The relative resource name of the metastore service to delete, in
2112 // the following
2113 // form:projects/{project_number}/locations/{location_id}/services/{service_id
2114 // }.
2115 func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall {
2116 c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2117 c.name = name
2118 return c
2119 }
2120
2121 // RequestId sets the optional parameter "requestId": A request ID. Specify a
2122 // unique request ID to allow the server to ignore the request if it has
2123 // completed. The server will ignore subsequent requests that provide a
2124 // duplicate request ID for at least 60 minutes after the first request.For
2125 // example, if an initial request times out, followed by another request with
2126 // the same request ID, the server ignores the second request to prevent the
2127 // creation of duplicate commitments.The request ID must be a valid UUID
2128 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
2129 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
2130 func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall {
2131 c.urlParams_.Set("requestId", requestId)
2132 return c
2133 }
2134
2135 // Fields allows partial responses to be retrieved. See
2136 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2137 // details.
2138 func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall {
2139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2140 return c
2141 }
2142
2143 // Context sets the context to be used in this call's Do method.
2144 func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall {
2145 c.ctx_ = ctx
2146 return c
2147 }
2148
2149 // Header returns a http.Header that can be modified by the caller to add
2150 // headers to the request.
2151 func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header {
2152 if c.header_ == nil {
2153 c.header_ = make(http.Header)
2154 }
2155 return c.header_
2156 }
2157
2158 func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
2159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2160 c.urlParams_.Set("alt", alt)
2161 c.urlParams_.Set("prettyPrint", "false")
2162 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
2163 urls += "?" + c.urlParams_.Encode()
2164 req, err := http.NewRequest("DELETE", urls, nil)
2165 if err != nil {
2166 return nil, err
2167 }
2168 req.Header = reqHeaders
2169 googleapi.Expand(req.URL, map[string]string{
2170 "name": c.name,
2171 })
2172 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.delete", "request", internallog.HTTPRequest(req, nil))
2173 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2174 }
2175
2176 // Do executes the "metastore.projects.locations.services.delete" call.
2177 // Any non-2xx status code is an error. Response headers are in either
2178 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
2179 // returned at all) in error.(*googleapi.Error).Header. Use
2180 // googleapi.IsNotModified to check whether the returned error was because
2181 // http.StatusNotModified was returned.
2182 func (c *ProjectsLocationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2183 gensupport.SetOptions(c.urlParams_, opts...)
2184 res, err := c.doRequest("json")
2185 if res != nil && res.StatusCode == http.StatusNotModified {
2186 if res.Body != nil {
2187 res.Body.Close()
2188 }
2189 return nil, gensupport.WrapError(&googleapi.Error{
2190 Code: res.StatusCode,
2191 Header: res.Header,
2192 })
2193 }
2194 if err != nil {
2195 return nil, err
2196 }
2197 defer googleapi.CloseBody(res)
2198 if err := googleapi.CheckResponse(res); err != nil {
2199 return nil, gensupport.WrapError(err)
2200 }
2201 ret := &GoogleLongrunningOperation{
2202 ServerResponse: googleapi.ServerResponse{
2203 Header: res.Header,
2204 HTTPStatusCode: res.StatusCode,
2205 },
2206 }
2207 target := &ret
2208 b, err := gensupport.DecodeResponseBytes(target, res)
2209 if err != nil {
2210 return nil, err
2211 }
2212 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.delete", "response", internallog.HTTPResponse(res, b))
2213 return ret, nil
2214 }
2215
2216 type ProjectsLocationsServicesExportMetadataCall struct {
2217 s *Service
2218 service string
2219 googlecloudmetastorev2exportmetadatarequest *GoogleCloudMetastoreV2ExportMetadataRequest
2220 urlParams_ gensupport.URLParams
2221 ctx_ context.Context
2222 header_ http.Header
2223 }
2224
2225 // ExportMetadata: Exports metadata from a service.
2226 //
2227 // - service: The relative resource name of the metastore service to run
2228 // export, in the following
2229 // form:projects/{project_id}/locations/{location_id}/services/{service_id}.
2230 func (r *ProjectsLocationsServicesService) ExportMetadata(service string, googlecloudmetastorev2exportmetadatarequest *GoogleCloudMetastoreV2ExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall {
2231 c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2232 c.service = service
2233 c.googlecloudmetastorev2exportmetadatarequest = googlecloudmetastorev2exportmetadatarequest
2234 return c
2235 }
2236
2237 // Fields allows partial responses to be retrieved. See
2238 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2239 // details.
2240 func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall {
2241 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2242 return c
2243 }
2244
2245 // Context sets the context to be used in this call's Do method.
2246 func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall {
2247 c.ctx_ = ctx
2248 return c
2249 }
2250
2251 // Header returns a http.Header that can be modified by the caller to add
2252 // headers to the request.
2253 func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header {
2254 if c.header_ == nil {
2255 c.header_ = make(http.Header)
2256 }
2257 return c.header_
2258 }
2259
2260 func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) {
2261 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2262 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2exportmetadatarequest)
2263 if err != nil {
2264 return nil, err
2265 }
2266 c.urlParams_.Set("alt", alt)
2267 c.urlParams_.Set("prettyPrint", "false")
2268 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:exportMetadata")
2269 urls += "?" + c.urlParams_.Encode()
2270 req, err := http.NewRequest("POST", urls, body)
2271 if err != nil {
2272 return nil, err
2273 }
2274 req.Header = reqHeaders
2275 googleapi.Expand(req.URL, map[string]string{
2276 "service": c.service,
2277 })
2278 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.exportMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
2279 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2280 }
2281
2282 // Do executes the "metastore.projects.locations.services.exportMetadata" call.
2283 // Any non-2xx status code is an error. Response headers are in either
2284 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
2285 // returned at all) in error.(*googleapi.Error).Header. Use
2286 // googleapi.IsNotModified to check whether the returned error was because
2287 // http.StatusNotModified was returned.
2288 func (c *ProjectsLocationsServicesExportMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2289 gensupport.SetOptions(c.urlParams_, opts...)
2290 res, err := c.doRequest("json")
2291 if res != nil && res.StatusCode == http.StatusNotModified {
2292 if res.Body != nil {
2293 res.Body.Close()
2294 }
2295 return nil, gensupport.WrapError(&googleapi.Error{
2296 Code: res.StatusCode,
2297 Header: res.Header,
2298 })
2299 }
2300 if err != nil {
2301 return nil, err
2302 }
2303 defer googleapi.CloseBody(res)
2304 if err := googleapi.CheckResponse(res); err != nil {
2305 return nil, gensupport.WrapError(err)
2306 }
2307 ret := &GoogleLongrunningOperation{
2308 ServerResponse: googleapi.ServerResponse{
2309 Header: res.Header,
2310 HTTPStatusCode: res.StatusCode,
2311 },
2312 }
2313 target := &ret
2314 b, err := gensupport.DecodeResponseBytes(target, res)
2315 if err != nil {
2316 return nil, err
2317 }
2318 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.exportMetadata", "response", internallog.HTTPResponse(res, b))
2319 return ret, nil
2320 }
2321
2322 type ProjectsLocationsServicesGetCall struct {
2323 s *Service
2324 name string
2325 urlParams_ gensupport.URLParams
2326 ifNoneMatch_ string
2327 ctx_ context.Context
2328 header_ http.Header
2329 }
2330
2331 // Get: Gets the details of a single service.
2332 //
2333 // - name: The relative resource name of the metastore service to retrieve, in
2334 // the following
2335 // form:projects/{project_number}/locations/{location_id}/services/{service_id
2336 // }.
2337 func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall {
2338 c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2339 c.name = name
2340 return c
2341 }
2342
2343 // Fields allows partial responses to be retrieved. See
2344 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2345 // details.
2346 func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall {
2347 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2348 return c
2349 }
2350
2351 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2352 // object's ETag matches the given value. This is useful for getting updates
2353 // only after the object has changed since the last request.
2354 func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall {
2355 c.ifNoneMatch_ = entityTag
2356 return c
2357 }
2358
2359 // Context sets the context to be used in this call's Do method.
2360 func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall {
2361 c.ctx_ = ctx
2362 return c
2363 }
2364
2365 // Header returns a http.Header that can be modified by the caller to add
2366 // headers to the request.
2367 func (c *ProjectsLocationsServicesGetCall) Header() http.Header {
2368 if c.header_ == nil {
2369 c.header_ = make(http.Header)
2370 }
2371 return c.header_
2372 }
2373
2374 func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) {
2375 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2376 if c.ifNoneMatch_ != "" {
2377 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2378 }
2379 c.urlParams_.Set("alt", alt)
2380 c.urlParams_.Set("prettyPrint", "false")
2381 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
2382 urls += "?" + c.urlParams_.Encode()
2383 req, err := http.NewRequest("GET", urls, nil)
2384 if err != nil {
2385 return nil, err
2386 }
2387 req.Header = reqHeaders
2388 googleapi.Expand(req.URL, map[string]string{
2389 "name": c.name,
2390 })
2391 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.get", "request", internallog.HTTPRequest(req, nil))
2392 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2393 }
2394
2395 // Do executes the "metastore.projects.locations.services.get" call.
2396 // Any non-2xx status code is an error. Response headers are in either
2397 // *GoogleCloudMetastoreV2Service.ServerResponse.Header or (if a response was
2398 // returned at all) in error.(*googleapi.Error).Header. Use
2399 // googleapi.IsNotModified to check whether the returned error was because
2400 // http.StatusNotModified was returned.
2401 func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2Service, error) {
2402 gensupport.SetOptions(c.urlParams_, opts...)
2403 res, err := c.doRequest("json")
2404 if res != nil && res.StatusCode == http.StatusNotModified {
2405 if res.Body != nil {
2406 res.Body.Close()
2407 }
2408 return nil, gensupport.WrapError(&googleapi.Error{
2409 Code: res.StatusCode,
2410 Header: res.Header,
2411 })
2412 }
2413 if err != nil {
2414 return nil, err
2415 }
2416 defer googleapi.CloseBody(res)
2417 if err := googleapi.CheckResponse(res); err != nil {
2418 return nil, gensupport.WrapError(err)
2419 }
2420 ret := &GoogleCloudMetastoreV2Service{
2421 ServerResponse: googleapi.ServerResponse{
2422 Header: res.Header,
2423 HTTPStatusCode: res.StatusCode,
2424 },
2425 }
2426 target := &ret
2427 b, err := gensupport.DecodeResponseBytes(target, res)
2428 if err != nil {
2429 return nil, err
2430 }
2431 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.get", "response", internallog.HTTPResponse(res, b))
2432 return ret, nil
2433 }
2434
2435 type ProjectsLocationsServicesImportMetadataCall struct {
2436 s *Service
2437 name string
2438 googlecloudmetastorev2importmetadatarequest *GoogleCloudMetastoreV2ImportMetadataRequest
2439 urlParams_ gensupport.URLParams
2440 ctx_ context.Context
2441 header_ http.Header
2442 }
2443
2444 // ImportMetadata: Imports Metadata into a Dataproc Metastore service.
2445 //
2446 // - name: Immutable. The relative resource name of the metastore service to
2447 // run import, in the following
2448 // form:projects/{project_id}/locations/{location_id}/services/{service_id}.
2449 func (r *ProjectsLocationsServicesService) ImportMetadata(name string, googlecloudmetastorev2importmetadatarequest *GoogleCloudMetastoreV2ImportMetadataRequest) *ProjectsLocationsServicesImportMetadataCall {
2450 c := &ProjectsLocationsServicesImportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2451 c.name = name
2452 c.googlecloudmetastorev2importmetadatarequest = googlecloudmetastorev2importmetadatarequest
2453 return c
2454 }
2455
2456 // Fields allows partial responses to be retrieved. See
2457 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2458 // details.
2459 func (c *ProjectsLocationsServicesImportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesImportMetadataCall {
2460 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2461 return c
2462 }
2463
2464 // Context sets the context to be used in this call's Do method.
2465 func (c *ProjectsLocationsServicesImportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesImportMetadataCall {
2466 c.ctx_ = ctx
2467 return c
2468 }
2469
2470 // Header returns a http.Header that can be modified by the caller to add
2471 // headers to the request.
2472 func (c *ProjectsLocationsServicesImportMetadataCall) Header() http.Header {
2473 if c.header_ == nil {
2474 c.header_ = make(http.Header)
2475 }
2476 return c.header_
2477 }
2478
2479 func (c *ProjectsLocationsServicesImportMetadataCall) doRequest(alt string) (*http.Response, error) {
2480 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2481 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2importmetadatarequest)
2482 if err != nil {
2483 return nil, err
2484 }
2485 c.urlParams_.Set("alt", alt)
2486 c.urlParams_.Set("prettyPrint", "false")
2487 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:importMetadata")
2488 urls += "?" + c.urlParams_.Encode()
2489 req, err := http.NewRequest("POST", urls, body)
2490 if err != nil {
2491 return nil, err
2492 }
2493 req.Header = reqHeaders
2494 googleapi.Expand(req.URL, map[string]string{
2495 "name": c.name,
2496 })
2497 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.importMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
2498 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2499 }
2500
2501 // Do executes the "metastore.projects.locations.services.importMetadata" call.
2502 // Any non-2xx status code is an error. Response headers are in either
2503 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
2504 // returned at all) in error.(*googleapi.Error).Header. Use
2505 // googleapi.IsNotModified to check whether the returned error was because
2506 // http.StatusNotModified was returned.
2507 func (c *ProjectsLocationsServicesImportMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2508 gensupport.SetOptions(c.urlParams_, opts...)
2509 res, err := c.doRequest("json")
2510 if res != nil && res.StatusCode == http.StatusNotModified {
2511 if res.Body != nil {
2512 res.Body.Close()
2513 }
2514 return nil, gensupport.WrapError(&googleapi.Error{
2515 Code: res.StatusCode,
2516 Header: res.Header,
2517 })
2518 }
2519 if err != nil {
2520 return nil, err
2521 }
2522 defer googleapi.CloseBody(res)
2523 if err := googleapi.CheckResponse(res); err != nil {
2524 return nil, gensupport.WrapError(err)
2525 }
2526 ret := &GoogleLongrunningOperation{
2527 ServerResponse: googleapi.ServerResponse{
2528 Header: res.Header,
2529 HTTPStatusCode: res.StatusCode,
2530 },
2531 }
2532 target := &ret
2533 b, err := gensupport.DecodeResponseBytes(target, res)
2534 if err != nil {
2535 return nil, err
2536 }
2537 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.importMetadata", "response", internallog.HTTPResponse(res, b))
2538 return ret, nil
2539 }
2540
2541 type ProjectsLocationsServicesListCall struct {
2542 s *Service
2543 parent string
2544 urlParams_ gensupport.URLParams
2545 ifNoneMatch_ string
2546 ctx_ context.Context
2547 header_ http.Header
2548 }
2549
2550 // List: Lists services in a project and location.
2551 //
2552 // - parent: The relative resource name of the location of metastore services
2553 // to list, in the following
2554 // form:projects/{project_number}/locations/{location_id}.
2555 func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall {
2556 c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2557 c.parent = parent
2558 return c
2559 }
2560
2561 // Filter sets the optional parameter "filter": The filter to apply to list
2562 // results.
2563 func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall {
2564 c.urlParams_.Set("filter", filter)
2565 return c
2566 }
2567
2568 // OrderBy sets the optional parameter "orderBy": Specify the ordering of
2569 // results as described in Sorting Order
2570 // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
2571 // specified, the results will be sorted in the default order.
2572 func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall {
2573 c.urlParams_.Set("orderBy", orderBy)
2574 return c
2575 }
2576
2577 // PageSize sets the optional parameter "pageSize": The maximum number of
2578 // services to return. The response may contain less than the maximum number.
2579 // If unspecified, no more than 500 services are returned. The maximum value is
2580 // 1000; values above 1000 are changed to 1000.
2581 func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall {
2582 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2583 return c
2584 }
2585
2586 // PageToken sets the optional parameter "pageToken": A page token, received
2587 // from a previous DataprocMetastore.ListServices call. Provide this token to
2588 // retrieve the subsequent page.To retrieve the first page, supply an empty
2589 // page token.When paginating, other parameters provided to
2590 // DataprocMetastore.ListServices must match the call that provided the page
2591 // token.
2592 func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall {
2593 c.urlParams_.Set("pageToken", pageToken)
2594 return c
2595 }
2596
2597 // Fields allows partial responses to be retrieved. See
2598 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2599 // details.
2600 func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall {
2601 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2602 return c
2603 }
2604
2605 // IfNoneMatch sets an optional parameter which makes the operation fail if the
2606 // object's ETag matches the given value. This is useful for getting updates
2607 // only after the object has changed since the last request.
2608 func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall {
2609 c.ifNoneMatch_ = entityTag
2610 return c
2611 }
2612
2613 // Context sets the context to be used in this call's Do method.
2614 func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall {
2615 c.ctx_ = ctx
2616 return c
2617 }
2618
2619 // Header returns a http.Header that can be modified by the caller to add
2620 // headers to the request.
2621 func (c *ProjectsLocationsServicesListCall) Header() http.Header {
2622 if c.header_ == nil {
2623 c.header_ = make(http.Header)
2624 }
2625 return c.header_
2626 }
2627
2628 func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) {
2629 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
2630 if c.ifNoneMatch_ != "" {
2631 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2632 }
2633 c.urlParams_.Set("alt", alt)
2634 c.urlParams_.Set("prettyPrint", "false")
2635 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/services")
2636 urls += "?" + c.urlParams_.Encode()
2637 req, err := http.NewRequest("GET", urls, nil)
2638 if err != nil {
2639 return nil, err
2640 }
2641 req.Header = reqHeaders
2642 googleapi.Expand(req.URL, map[string]string{
2643 "parent": c.parent,
2644 })
2645 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.list", "request", internallog.HTTPRequest(req, nil))
2646 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2647 }
2648
2649 // Do executes the "metastore.projects.locations.services.list" call.
2650 // Any non-2xx status code is an error. Response headers are in either
2651 // *GoogleCloudMetastoreV2ListServicesResponse.ServerResponse.Header or (if a
2652 // response was returned at all) in error.(*googleapi.Error).Header. Use
2653 // googleapi.IsNotModified to check whether the returned error was because
2654 // http.StatusNotModified was returned.
2655 func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2ListServicesResponse, error) {
2656 gensupport.SetOptions(c.urlParams_, opts...)
2657 res, err := c.doRequest("json")
2658 if res != nil && res.StatusCode == http.StatusNotModified {
2659 if res.Body != nil {
2660 res.Body.Close()
2661 }
2662 return nil, gensupport.WrapError(&googleapi.Error{
2663 Code: res.StatusCode,
2664 Header: res.Header,
2665 })
2666 }
2667 if err != nil {
2668 return nil, err
2669 }
2670 defer googleapi.CloseBody(res)
2671 if err := googleapi.CheckResponse(res); err != nil {
2672 return nil, gensupport.WrapError(err)
2673 }
2674 ret := &GoogleCloudMetastoreV2ListServicesResponse{
2675 ServerResponse: googleapi.ServerResponse{
2676 Header: res.Header,
2677 HTTPStatusCode: res.StatusCode,
2678 },
2679 }
2680 target := &ret
2681 b, err := gensupport.DecodeResponseBytes(target, res)
2682 if err != nil {
2683 return nil, err
2684 }
2685 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.list", "response", internallog.HTTPResponse(res, b))
2686 return ret, nil
2687 }
2688
2689 // Pages invokes f for each page of results.
2690 // A non-nil error returned from f will halt the iteration.
2691 // The provided context supersedes any context provided to the Context method.
2692 func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2ListServicesResponse) error) error {
2693 c.ctx_ = ctx
2694 defer c.PageToken(c.urlParams_.Get("pageToken"))
2695 for {
2696 x, err := c.Do()
2697 if err != nil {
2698 return err
2699 }
2700 if err := f(x); err != nil {
2701 return err
2702 }
2703 if x.NextPageToken == "" {
2704 return nil
2705 }
2706 c.PageToken(x.NextPageToken)
2707 }
2708 }
2709
2710 type ProjectsLocationsServicesMoveTableToDatabaseCall struct {
2711 s *Service
2712 service string
2713 googlecloudmetastorev2movetabletodatabaserequest *GoogleCloudMetastoreV2MoveTableToDatabaseRequest
2714 urlParams_ gensupport.URLParams
2715 ctx_ context.Context
2716 header_ http.Header
2717 }
2718
2719 // MoveTableToDatabase: Move a table to another database.
2720 //
2721 // - service: The relative resource name of the metastore service to mutate
2722 // metadata, in the following
2723 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
2724 func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, googlecloudmetastorev2movetabletodatabaserequest *GoogleCloudMetastoreV2MoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall {
2725 c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2726 c.service = service
2727 c.googlecloudmetastorev2movetabletodatabaserequest = googlecloudmetastorev2movetabletodatabaserequest
2728 return c
2729 }
2730
2731 // Fields allows partial responses to be retrieved. See
2732 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2733 // details.
2734 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall {
2735 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2736 return c
2737 }
2738
2739 // Context sets the context to be used in this call's Do method.
2740 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall {
2741 c.ctx_ = ctx
2742 return c
2743 }
2744
2745 // Header returns a http.Header that can be modified by the caller to add
2746 // headers to the request.
2747 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header {
2748 if c.header_ == nil {
2749 c.header_ = make(http.Header)
2750 }
2751 return c.header_
2752 }
2753
2754 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) {
2755 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2756 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2movetabletodatabaserequest)
2757 if err != nil {
2758 return nil, err
2759 }
2760 c.urlParams_.Set("alt", alt)
2761 c.urlParams_.Set("prettyPrint", "false")
2762 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:moveTableToDatabase")
2763 urls += "?" + c.urlParams_.Encode()
2764 req, err := http.NewRequest("POST", urls, body)
2765 if err != nil {
2766 return nil, err
2767 }
2768 req.Header = reqHeaders
2769 googleapi.Expand(req.URL, map[string]string{
2770 "service": c.service,
2771 })
2772 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.moveTableToDatabase", "request", internallog.HTTPRequest(req, body.Bytes()))
2773 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2774 }
2775
2776 // Do executes the "metastore.projects.locations.services.moveTableToDatabase" call.
2777 // Any non-2xx status code is an error. Response headers are in either
2778 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
2779 // returned at all) in error.(*googleapi.Error).Header. Use
2780 // googleapi.IsNotModified to check whether the returned error was because
2781 // http.StatusNotModified was returned.
2782 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2783 gensupport.SetOptions(c.urlParams_, opts...)
2784 res, err := c.doRequest("json")
2785 if res != nil && res.StatusCode == http.StatusNotModified {
2786 if res.Body != nil {
2787 res.Body.Close()
2788 }
2789 return nil, gensupport.WrapError(&googleapi.Error{
2790 Code: res.StatusCode,
2791 Header: res.Header,
2792 })
2793 }
2794 if err != nil {
2795 return nil, err
2796 }
2797 defer googleapi.CloseBody(res)
2798 if err := googleapi.CheckResponse(res); err != nil {
2799 return nil, gensupport.WrapError(err)
2800 }
2801 ret := &GoogleLongrunningOperation{
2802 ServerResponse: googleapi.ServerResponse{
2803 Header: res.Header,
2804 HTTPStatusCode: res.StatusCode,
2805 },
2806 }
2807 target := &ret
2808 b, err := gensupport.DecodeResponseBytes(target, res)
2809 if err != nil {
2810 return nil, err
2811 }
2812 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.moveTableToDatabase", "response", internallog.HTTPResponse(res, b))
2813 return ret, nil
2814 }
2815
2816 type ProjectsLocationsServicesPatchCall struct {
2817 s *Service
2818 name string
2819 googlecloudmetastorev2service *GoogleCloudMetastoreV2Service
2820 urlParams_ gensupport.URLParams
2821 ctx_ context.Context
2822 header_ http.Header
2823 }
2824
2825 // Patch: Updates the parameters of a single service.
2826 //
2827 // - name: Immutable. The relative resource name of the metastore service, in
2828 // the following
2829 // format:projects/{project_number}/locations/{location_id}/services/{service_
2830 // id}.
2831 func (r *ProjectsLocationsServicesService) Patch(name string, googlecloudmetastorev2service *GoogleCloudMetastoreV2Service) *ProjectsLocationsServicesPatchCall {
2832 c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2833 c.name = name
2834 c.googlecloudmetastorev2service = googlecloudmetastorev2service
2835 return c
2836 }
2837
2838 // RequestId sets the optional parameter "requestId": A request ID. Specify a
2839 // unique request ID to allow the server to ignore the request if it has
2840 // completed. The server will ignore subsequent requests that provide a
2841 // duplicate request ID for at least 60 minutes after the first request.For
2842 // example, if an initial request times out, followed by another request with
2843 // the same request ID, the server ignores the second request to prevent the
2844 // creation of duplicate commitments.The request ID must be a valid UUID
2845 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
2846 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
2847 func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall {
2848 c.urlParams_.Set("requestId", requestId)
2849 return c
2850 }
2851
2852 // UpdateMask sets the optional parameter "updateMask": Required. A field mask
2853 // used to specify the fields to be overwritten in the metastore service
2854 // resource by the update. Fields specified in the update_mask are relative to
2855 // the resource (not to the full request). A field is overwritten if it is in
2856 // the mask.
2857 func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall {
2858 c.urlParams_.Set("updateMask", updateMask)
2859 return c
2860 }
2861
2862 // Fields allows partial responses to be retrieved. See
2863 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2864 // details.
2865 func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall {
2866 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2867 return c
2868 }
2869
2870 // Context sets the context to be used in this call's Do method.
2871 func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall {
2872 c.ctx_ = ctx
2873 return c
2874 }
2875
2876 // Header returns a http.Header that can be modified by the caller to add
2877 // headers to the request.
2878 func (c *ProjectsLocationsServicesPatchCall) Header() http.Header {
2879 if c.header_ == nil {
2880 c.header_ = make(http.Header)
2881 }
2882 return c.header_
2883 }
2884
2885 func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
2886 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2887 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2service)
2888 if err != nil {
2889 return nil, err
2890 }
2891 c.urlParams_.Set("alt", alt)
2892 c.urlParams_.Set("prettyPrint", "false")
2893 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
2894 urls += "?" + c.urlParams_.Encode()
2895 req, err := http.NewRequest("PATCH", urls, body)
2896 if err != nil {
2897 return nil, err
2898 }
2899 req.Header = reqHeaders
2900 googleapi.Expand(req.URL, map[string]string{
2901 "name": c.name,
2902 })
2903 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
2904 return gensupport.SendRequest(c.ctx_, c.s.client, req)
2905 }
2906
2907 // Do executes the "metastore.projects.locations.services.patch" call.
2908 // Any non-2xx status code is an error. Response headers are in either
2909 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
2910 // returned at all) in error.(*googleapi.Error).Header. Use
2911 // googleapi.IsNotModified to check whether the returned error was because
2912 // http.StatusNotModified was returned.
2913 func (c *ProjectsLocationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
2914 gensupport.SetOptions(c.urlParams_, opts...)
2915 res, err := c.doRequest("json")
2916 if res != nil && res.StatusCode == http.StatusNotModified {
2917 if res.Body != nil {
2918 res.Body.Close()
2919 }
2920 return nil, gensupport.WrapError(&googleapi.Error{
2921 Code: res.StatusCode,
2922 Header: res.Header,
2923 })
2924 }
2925 if err != nil {
2926 return nil, err
2927 }
2928 defer googleapi.CloseBody(res)
2929 if err := googleapi.CheckResponse(res); err != nil {
2930 return nil, gensupport.WrapError(err)
2931 }
2932 ret := &GoogleLongrunningOperation{
2933 ServerResponse: googleapi.ServerResponse{
2934 Header: res.Header,
2935 HTTPStatusCode: res.StatusCode,
2936 },
2937 }
2938 target := &ret
2939 b, err := gensupport.DecodeResponseBytes(target, res)
2940 if err != nil {
2941 return nil, err
2942 }
2943 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.patch", "response", internallog.HTTPResponse(res, b))
2944 return ret, nil
2945 }
2946
2947 type ProjectsLocationsServicesQueryMetadataCall struct {
2948 s *Service
2949 service string
2950 googlecloudmetastorev2querymetadatarequest *GoogleCloudMetastoreV2QueryMetadataRequest
2951 urlParams_ gensupport.URLParams
2952 ctx_ context.Context
2953 header_ http.Header
2954 }
2955
2956 // QueryMetadata: Query Dataproc Metastore metadata.
2957 //
2958 // - service: The relative resource name of the metastore service to query
2959 // metadata, in the following
2960 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
2961 func (r *ProjectsLocationsServicesService) QueryMetadata(service string, googlecloudmetastorev2querymetadatarequest *GoogleCloudMetastoreV2QueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall {
2962 c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2963 c.service = service
2964 c.googlecloudmetastorev2querymetadatarequest = googlecloudmetastorev2querymetadatarequest
2965 return c
2966 }
2967
2968 // Fields allows partial responses to be retrieved. See
2969 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
2970 // details.
2971 func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall {
2972 c.urlParams_.Set("fields", googleapi.CombineFields(s))
2973 return c
2974 }
2975
2976 // Context sets the context to be used in this call's Do method.
2977 func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall {
2978 c.ctx_ = ctx
2979 return c
2980 }
2981
2982 // Header returns a http.Header that can be modified by the caller to add
2983 // headers to the request.
2984 func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header {
2985 if c.header_ == nil {
2986 c.header_ = make(http.Header)
2987 }
2988 return c.header_
2989 }
2990
2991 func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) {
2992 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
2993 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2querymetadatarequest)
2994 if err != nil {
2995 return nil, err
2996 }
2997 c.urlParams_.Set("alt", alt)
2998 c.urlParams_.Set("prettyPrint", "false")
2999 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:queryMetadata")
3000 urls += "?" + c.urlParams_.Encode()
3001 req, err := http.NewRequest("POST", urls, body)
3002 if err != nil {
3003 return nil, err
3004 }
3005 req.Header = reqHeaders
3006 googleapi.Expand(req.URL, map[string]string{
3007 "service": c.service,
3008 })
3009 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.queryMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
3010 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3011 }
3012
3013 // Do executes the "metastore.projects.locations.services.queryMetadata" call.
3014 // Any non-2xx status code is an error. Response headers are in either
3015 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
3016 // returned at all) in error.(*googleapi.Error).Header. Use
3017 // googleapi.IsNotModified to check whether the returned error was because
3018 // http.StatusNotModified was returned.
3019 func (c *ProjectsLocationsServicesQueryMetadataCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3020 gensupport.SetOptions(c.urlParams_, opts...)
3021 res, err := c.doRequest("json")
3022 if res != nil && res.StatusCode == http.StatusNotModified {
3023 if res.Body != nil {
3024 res.Body.Close()
3025 }
3026 return nil, gensupport.WrapError(&googleapi.Error{
3027 Code: res.StatusCode,
3028 Header: res.Header,
3029 })
3030 }
3031 if err != nil {
3032 return nil, err
3033 }
3034 defer googleapi.CloseBody(res)
3035 if err := googleapi.CheckResponse(res); err != nil {
3036 return nil, gensupport.WrapError(err)
3037 }
3038 ret := &GoogleLongrunningOperation{
3039 ServerResponse: googleapi.ServerResponse{
3040 Header: res.Header,
3041 HTTPStatusCode: res.StatusCode,
3042 },
3043 }
3044 target := &ret
3045 b, err := gensupport.DecodeResponseBytes(target, res)
3046 if err != nil {
3047 return nil, err
3048 }
3049 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.queryMetadata", "response", internallog.HTTPResponse(res, b))
3050 return ret, nil
3051 }
3052
3053 type ProjectsLocationsServicesRestoreCall struct {
3054 s *Service
3055 service string
3056 googlecloudmetastorev2restoreservicerequest *GoogleCloudMetastoreV2RestoreServiceRequest
3057 urlParams_ gensupport.URLParams
3058 ctx_ context.Context
3059 header_ http.Header
3060 }
3061
3062 // Restore: Restores a service from a backup.
3063 //
3064 // - service: The relative resource name of the metastore service to run
3065 // restore, in the following
3066 // form:projects/{project_id}/locations/{location_id}/services/{service_id}.
3067 func (r *ProjectsLocationsServicesService) Restore(service string, googlecloudmetastorev2restoreservicerequest *GoogleCloudMetastoreV2RestoreServiceRequest) *ProjectsLocationsServicesRestoreCall {
3068 c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3069 c.service = service
3070 c.googlecloudmetastorev2restoreservicerequest = googlecloudmetastorev2restoreservicerequest
3071 return c
3072 }
3073
3074 // Fields allows partial responses to be retrieved. See
3075 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3076 // details.
3077 func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall {
3078 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3079 return c
3080 }
3081
3082 // Context sets the context to be used in this call's Do method.
3083 func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall {
3084 c.ctx_ = ctx
3085 return c
3086 }
3087
3088 // Header returns a http.Header that can be modified by the caller to add
3089 // headers to the request.
3090 func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header {
3091 if c.header_ == nil {
3092 c.header_ = make(http.Header)
3093 }
3094 return c.header_
3095 }
3096
3097 func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) {
3098 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3099 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2restoreservicerequest)
3100 if err != nil {
3101 return nil, err
3102 }
3103 c.urlParams_.Set("alt", alt)
3104 c.urlParams_.Set("prettyPrint", "false")
3105 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:restore")
3106 urls += "?" + c.urlParams_.Encode()
3107 req, err := http.NewRequest("POST", urls, body)
3108 if err != nil {
3109 return nil, err
3110 }
3111 req.Header = reqHeaders
3112 googleapi.Expand(req.URL, map[string]string{
3113 "service": c.service,
3114 })
3115 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.restore", "request", internallog.HTTPRequest(req, body.Bytes()))
3116 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3117 }
3118
3119 // Do executes the "metastore.projects.locations.services.restore" call.
3120 // Any non-2xx status code is an error. Response headers are in either
3121 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
3122 // returned at all) in error.(*googleapi.Error).Header. Use
3123 // googleapi.IsNotModified to check whether the returned error was because
3124 // http.StatusNotModified was returned.
3125 func (c *ProjectsLocationsServicesRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3126 gensupport.SetOptions(c.urlParams_, opts...)
3127 res, err := c.doRequest("json")
3128 if res != nil && res.StatusCode == http.StatusNotModified {
3129 if res.Body != nil {
3130 res.Body.Close()
3131 }
3132 return nil, gensupport.WrapError(&googleapi.Error{
3133 Code: res.StatusCode,
3134 Header: res.Header,
3135 })
3136 }
3137 if err != nil {
3138 return nil, err
3139 }
3140 defer googleapi.CloseBody(res)
3141 if err := googleapi.CheckResponse(res); err != nil {
3142 return nil, gensupport.WrapError(err)
3143 }
3144 ret := &GoogleLongrunningOperation{
3145 ServerResponse: googleapi.ServerResponse{
3146 Header: res.Header,
3147 HTTPStatusCode: res.StatusCode,
3148 },
3149 }
3150 target := &ret
3151 b, err := gensupport.DecodeResponseBytes(target, res)
3152 if err != nil {
3153 return nil, err
3154 }
3155 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.restore", "response", internallog.HTTPResponse(res, b))
3156 return ret, nil
3157 }
3158
3159 type ProjectsLocationsServicesBackupsCreateCall struct {
3160 s *Service
3161 parent string
3162 googlecloudmetastorev2backup *GoogleCloudMetastoreV2Backup
3163 urlParams_ gensupport.URLParams
3164 ctx_ context.Context
3165 header_ http.Header
3166 }
3167
3168 // Create: Creates a new backup in a given project and location.
3169 //
3170 // - parent: The relative resource name of the service in which to create a
3171 // backup of the following
3172 // form:projects/{project_number}/locations/{location_id}/services/{service_id
3173 // }.
3174 func (r *ProjectsLocationsServicesBackupsService) Create(parent string, googlecloudmetastorev2backup *GoogleCloudMetastoreV2Backup) *ProjectsLocationsServicesBackupsCreateCall {
3175 c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3176 c.parent = parent
3177 c.googlecloudmetastorev2backup = googlecloudmetastorev2backup
3178 return c
3179 }
3180
3181 // BackupId sets the optional parameter "backupId": Required. The ID of the
3182 // backup, which is used as the final component of the backup's name.This value
3183 // must be between 1 and 64 characters long, begin with a letter, end with a
3184 // letter or number, and consist of alpha-numeric ASCII characters or hyphens.
3185 func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall {
3186 c.urlParams_.Set("backupId", backupId)
3187 return c
3188 }
3189
3190 // RequestId sets the optional parameter "requestId": A request ID. Specify a
3191 // unique request ID to allow the server to ignore the request if it has
3192 // completed. The server will ignore subsequent requests that provide a
3193 // duplicate request ID for at least 60 minutes after the first request.For
3194 // example, if an initial request times out, followed by another request with
3195 // the same request ID, the server ignores the second request to prevent the
3196 // creation of duplicate commitments.The request ID must be a valid UUID
3197 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
3198 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
3199 func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall {
3200 c.urlParams_.Set("requestId", requestId)
3201 return c
3202 }
3203
3204 // Fields allows partial responses to be retrieved. See
3205 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3206 // details.
3207 func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall {
3208 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3209 return c
3210 }
3211
3212 // Context sets the context to be used in this call's Do method.
3213 func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall {
3214 c.ctx_ = ctx
3215 return c
3216 }
3217
3218 // Header returns a http.Header that can be modified by the caller to add
3219 // headers to the request.
3220 func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header {
3221 if c.header_ == nil {
3222 c.header_ = make(http.Header)
3223 }
3224 return c.header_
3225 }
3226
3227 func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
3228 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3229 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googlecloudmetastorev2backup)
3230 if err != nil {
3231 return nil, err
3232 }
3233 c.urlParams_.Set("alt", alt)
3234 c.urlParams_.Set("prettyPrint", "false")
3235 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups")
3236 urls += "?" + c.urlParams_.Encode()
3237 req, err := http.NewRequest("POST", urls, body)
3238 if err != nil {
3239 return nil, err
3240 }
3241 req.Header = reqHeaders
3242 googleapi.Expand(req.URL, map[string]string{
3243 "parent": c.parent,
3244 })
3245 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.create", "request", internallog.HTTPRequest(req, body.Bytes()))
3246 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3247 }
3248
3249 // Do executes the "metastore.projects.locations.services.backups.create" call.
3250 // Any non-2xx status code is an error. Response headers are in either
3251 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
3252 // returned at all) in error.(*googleapi.Error).Header. Use
3253 // googleapi.IsNotModified to check whether the returned error was because
3254 // http.StatusNotModified was returned.
3255 func (c *ProjectsLocationsServicesBackupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3256 gensupport.SetOptions(c.urlParams_, opts...)
3257 res, err := c.doRequest("json")
3258 if res != nil && res.StatusCode == http.StatusNotModified {
3259 if res.Body != nil {
3260 res.Body.Close()
3261 }
3262 return nil, gensupport.WrapError(&googleapi.Error{
3263 Code: res.StatusCode,
3264 Header: res.Header,
3265 })
3266 }
3267 if err != nil {
3268 return nil, err
3269 }
3270 defer googleapi.CloseBody(res)
3271 if err := googleapi.CheckResponse(res); err != nil {
3272 return nil, gensupport.WrapError(err)
3273 }
3274 ret := &GoogleLongrunningOperation{
3275 ServerResponse: googleapi.ServerResponse{
3276 Header: res.Header,
3277 HTTPStatusCode: res.StatusCode,
3278 },
3279 }
3280 target := &ret
3281 b, err := gensupport.DecodeResponseBytes(target, res)
3282 if err != nil {
3283 return nil, err
3284 }
3285 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.create", "response", internallog.HTTPResponse(res, b))
3286 return ret, nil
3287 }
3288
3289 type ProjectsLocationsServicesBackupsDeleteCall struct {
3290 s *Service
3291 name string
3292 urlParams_ gensupport.URLParams
3293 ctx_ context.Context
3294 header_ http.Header
3295 }
3296
3297 // Delete: Deletes a single backup.
3298 //
3299 // - name: The relative resource name of the backup to delete, in the following
3300 // form:projects/{project_number}/locations/{location_id}/services/{service_id
3301 // }/backups/{backup_id}.
3302 func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall {
3303 c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3304 c.name = name
3305 return c
3306 }
3307
3308 // RequestId sets the optional parameter "requestId": A request ID. Specify a
3309 // unique request ID to allow the server to ignore the request if it has
3310 // completed. The server will ignore subsequent requests that provide a
3311 // duplicate request ID for at least 60 minutes after the first request.For
3312 // example, if an initial request times out, followed by another request with
3313 // the same request ID, the server ignores the second request to prevent the
3314 // creation of duplicate commitments.The request ID must be a valid UUID
3315 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
3316 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
3317 func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall {
3318 c.urlParams_.Set("requestId", requestId)
3319 return c
3320 }
3321
3322 // Fields allows partial responses to be retrieved. See
3323 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3324 // details.
3325 func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall {
3326 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3327 return c
3328 }
3329
3330 // Context sets the context to be used in this call's Do method.
3331 func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall {
3332 c.ctx_ = ctx
3333 return c
3334 }
3335
3336 // Header returns a http.Header that can be modified by the caller to add
3337 // headers to the request.
3338 func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header {
3339 if c.header_ == nil {
3340 c.header_ = make(http.Header)
3341 }
3342 return c.header_
3343 }
3344
3345 func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
3346 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3347 c.urlParams_.Set("alt", alt)
3348 c.urlParams_.Set("prettyPrint", "false")
3349 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3350 urls += "?" + c.urlParams_.Encode()
3351 req, err := http.NewRequest("DELETE", urls, nil)
3352 if err != nil {
3353 return nil, err
3354 }
3355 req.Header = reqHeaders
3356 googleapi.Expand(req.URL, map[string]string{
3357 "name": c.name,
3358 })
3359 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.delete", "request", internallog.HTTPRequest(req, nil))
3360 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3361 }
3362
3363 // Do executes the "metastore.projects.locations.services.backups.delete" call.
3364 // Any non-2xx status code is an error. Response headers are in either
3365 // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
3366 // returned at all) in error.(*googleapi.Error).Header. Use
3367 // googleapi.IsNotModified to check whether the returned error was because
3368 // http.StatusNotModified was returned.
3369 func (c *ProjectsLocationsServicesBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
3370 gensupport.SetOptions(c.urlParams_, opts...)
3371 res, err := c.doRequest("json")
3372 if res != nil && res.StatusCode == http.StatusNotModified {
3373 if res.Body != nil {
3374 res.Body.Close()
3375 }
3376 return nil, gensupport.WrapError(&googleapi.Error{
3377 Code: res.StatusCode,
3378 Header: res.Header,
3379 })
3380 }
3381 if err != nil {
3382 return nil, err
3383 }
3384 defer googleapi.CloseBody(res)
3385 if err := googleapi.CheckResponse(res); err != nil {
3386 return nil, gensupport.WrapError(err)
3387 }
3388 ret := &GoogleLongrunningOperation{
3389 ServerResponse: googleapi.ServerResponse{
3390 Header: res.Header,
3391 HTTPStatusCode: res.StatusCode,
3392 },
3393 }
3394 target := &ret
3395 b, err := gensupport.DecodeResponseBytes(target, res)
3396 if err != nil {
3397 return nil, err
3398 }
3399 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.delete", "response", internallog.HTTPResponse(res, b))
3400 return ret, nil
3401 }
3402
3403 type ProjectsLocationsServicesBackupsGetCall struct {
3404 s *Service
3405 name string
3406 urlParams_ gensupport.URLParams
3407 ifNoneMatch_ string
3408 ctx_ context.Context
3409 header_ http.Header
3410 }
3411
3412 // Get: Gets details of a single backup.
3413 //
3414 // - name: The relative resource name of the backup to retrieve, in the
3415 // following
3416 // form:projects/{project_number}/locations/{location_id}/services/{service_id
3417 // }/backups/{backup_id}.
3418 func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall {
3419 c := &ProjectsLocationsServicesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3420 c.name = name
3421 return c
3422 }
3423
3424 // Fields allows partial responses to be retrieved. See
3425 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3426 // details.
3427 func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall {
3428 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3429 return c
3430 }
3431
3432 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3433 // object's ETag matches the given value. This is useful for getting updates
3434 // only after the object has changed since the last request.
3435 func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall {
3436 c.ifNoneMatch_ = entityTag
3437 return c
3438 }
3439
3440 // Context sets the context to be used in this call's Do method.
3441 func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall {
3442 c.ctx_ = ctx
3443 return c
3444 }
3445
3446 // Header returns a http.Header that can be modified by the caller to add
3447 // headers to the request.
3448 func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header {
3449 if c.header_ == nil {
3450 c.header_ = make(http.Header)
3451 }
3452 return c.header_
3453 }
3454
3455 func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) {
3456 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3457 if c.ifNoneMatch_ != "" {
3458 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3459 }
3460 c.urlParams_.Set("alt", alt)
3461 c.urlParams_.Set("prettyPrint", "false")
3462 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}")
3463 urls += "?" + c.urlParams_.Encode()
3464 req, err := http.NewRequest("GET", urls, nil)
3465 if err != nil {
3466 return nil, err
3467 }
3468 req.Header = reqHeaders
3469 googleapi.Expand(req.URL, map[string]string{
3470 "name": c.name,
3471 })
3472 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.get", "request", internallog.HTTPRequest(req, nil))
3473 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3474 }
3475
3476 // Do executes the "metastore.projects.locations.services.backups.get" call.
3477 // Any non-2xx status code is an error. Response headers are in either
3478 // *GoogleCloudMetastoreV2Backup.ServerResponse.Header or (if a response was
3479 // returned at all) in error.(*googleapi.Error).Header. Use
3480 // googleapi.IsNotModified to check whether the returned error was because
3481 // http.StatusNotModified was returned.
3482 func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2Backup, error) {
3483 gensupport.SetOptions(c.urlParams_, opts...)
3484 res, err := c.doRequest("json")
3485 if res != nil && res.StatusCode == http.StatusNotModified {
3486 if res.Body != nil {
3487 res.Body.Close()
3488 }
3489 return nil, gensupport.WrapError(&googleapi.Error{
3490 Code: res.StatusCode,
3491 Header: res.Header,
3492 })
3493 }
3494 if err != nil {
3495 return nil, err
3496 }
3497 defer googleapi.CloseBody(res)
3498 if err := googleapi.CheckResponse(res); err != nil {
3499 return nil, gensupport.WrapError(err)
3500 }
3501 ret := &GoogleCloudMetastoreV2Backup{
3502 ServerResponse: googleapi.ServerResponse{
3503 Header: res.Header,
3504 HTTPStatusCode: res.StatusCode,
3505 },
3506 }
3507 target := &ret
3508 b, err := gensupport.DecodeResponseBytes(target, res)
3509 if err != nil {
3510 return nil, err
3511 }
3512 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.get", "response", internallog.HTTPResponse(res, b))
3513 return ret, nil
3514 }
3515
3516 type ProjectsLocationsServicesBackupsListCall struct {
3517 s *Service
3518 parent string
3519 urlParams_ gensupport.URLParams
3520 ifNoneMatch_ string
3521 ctx_ context.Context
3522 header_ http.Header
3523 }
3524
3525 // List: Lists backups in a service.
3526 //
3527 // - parent: The relative resource name of the service whose backups to list,
3528 // in the following
3529 // form:projects/{project_number}/locations/{location_id}/services/{service_id
3530 // }/backups.
3531 func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall {
3532 c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3533 c.parent = parent
3534 return c
3535 }
3536
3537 // Filter sets the optional parameter "filter": The filter to apply to list
3538 // results.
3539 func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall {
3540 c.urlParams_.Set("filter", filter)
3541 return c
3542 }
3543
3544 // OrderBy sets the optional parameter "orderBy": Specify the ordering of
3545 // results as described in Sorting Order
3546 // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
3547 // specified, the results will be sorted in the default order.
3548 func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall {
3549 c.urlParams_.Set("orderBy", orderBy)
3550 return c
3551 }
3552
3553 // PageSize sets the optional parameter "pageSize": The maximum number of
3554 // backups to return. The response may contain less than the maximum number. If
3555 // unspecified, no more than 500 backups are returned. The maximum value is
3556 // 1000; values above 1000 are changed to 1000.
3557 func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall {
3558 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3559 return c
3560 }
3561
3562 // PageToken sets the optional parameter "pageToken": A page token, received
3563 // from a previous DataprocMetastore.ListBackups call. Provide this token to
3564 // retrieve the subsequent page.To retrieve the first page, supply an empty
3565 // page token.When paginating, other parameters provided to
3566 // DataprocMetastore.ListBackups must match the call that provided the page
3567 // token.
3568 func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall {
3569 c.urlParams_.Set("pageToken", pageToken)
3570 return c
3571 }
3572
3573 // Fields allows partial responses to be retrieved. See
3574 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3575 // details.
3576 func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall {
3577 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3578 return c
3579 }
3580
3581 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3582 // object's ETag matches the given value. This is useful for getting updates
3583 // only after the object has changed since the last request.
3584 func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall {
3585 c.ifNoneMatch_ = entityTag
3586 return c
3587 }
3588
3589 // Context sets the context to be used in this call's Do method.
3590 func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall {
3591 c.ctx_ = ctx
3592 return c
3593 }
3594
3595 // Header returns a http.Header that can be modified by the caller to add
3596 // headers to the request.
3597 func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header {
3598 if c.header_ == nil {
3599 c.header_ = make(http.Header)
3600 }
3601 return c.header_
3602 }
3603
3604 func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) {
3605 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3606 if c.ifNoneMatch_ != "" {
3607 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3608 }
3609 c.urlParams_.Set("alt", alt)
3610 c.urlParams_.Set("prettyPrint", "false")
3611 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups")
3612 urls += "?" + c.urlParams_.Encode()
3613 req, err := http.NewRequest("GET", urls, nil)
3614 if err != nil {
3615 return nil, err
3616 }
3617 req.Header = reqHeaders
3618 googleapi.Expand(req.URL, map[string]string{
3619 "parent": c.parent,
3620 })
3621 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.list", "request", internallog.HTTPRequest(req, nil))
3622 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3623 }
3624
3625 // Do executes the "metastore.projects.locations.services.backups.list" call.
3626 // Any non-2xx status code is an error. Response headers are in either
3627 // *GoogleCloudMetastoreV2ListBackupsResponse.ServerResponse.Header or (if a
3628 // response was returned at all) in error.(*googleapi.Error).Header. Use
3629 // googleapi.IsNotModified to check whether the returned error was because
3630 // http.StatusNotModified was returned.
3631 func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2ListBackupsResponse, error) {
3632 gensupport.SetOptions(c.urlParams_, opts...)
3633 res, err := c.doRequest("json")
3634 if res != nil && res.StatusCode == http.StatusNotModified {
3635 if res.Body != nil {
3636 res.Body.Close()
3637 }
3638 return nil, gensupport.WrapError(&googleapi.Error{
3639 Code: res.StatusCode,
3640 Header: res.Header,
3641 })
3642 }
3643 if err != nil {
3644 return nil, err
3645 }
3646 defer googleapi.CloseBody(res)
3647 if err := googleapi.CheckResponse(res); err != nil {
3648 return nil, gensupport.WrapError(err)
3649 }
3650 ret := &GoogleCloudMetastoreV2ListBackupsResponse{
3651 ServerResponse: googleapi.ServerResponse{
3652 Header: res.Header,
3653 HTTPStatusCode: res.StatusCode,
3654 },
3655 }
3656 target := &ret
3657 b, err := gensupport.DecodeResponseBytes(target, res)
3658 if err != nil {
3659 return nil, err
3660 }
3661 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.list", "response", internallog.HTTPResponse(res, b))
3662 return ret, nil
3663 }
3664
3665 // Pages invokes f for each page of results.
3666 // A non-nil error returned from f will halt the iteration.
3667 // The provided context supersedes any context provided to the Context method.
3668 func (c *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2ListBackupsResponse) error) error {
3669 c.ctx_ = ctx
3670 defer c.PageToken(c.urlParams_.Get("pageToken"))
3671 for {
3672 x, err := c.Do()
3673 if err != nil {
3674 return err
3675 }
3676 if err := f(x); err != nil {
3677 return err
3678 }
3679 if x.NextPageToken == "" {
3680 return nil
3681 }
3682 c.PageToken(x.NextPageToken)
3683 }
3684 }