Debian Codegraph @

metastore/v1beta/metastore-gen.go

raw symbols SCIP
1 // Copyright 2026 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/v1beta"
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/v1beta"
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:v1beta"
93 const apiName = "metastore"
94 const apiVersion = "v1beta"
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 APIService.
107 func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, 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 := &APIService{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 APIService. 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) (*APIService, 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 APIService 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 *APIService) userAgent() string {
151 if s.UserAgent == "" {
152 return googleapi.UserAgent
153 }
154 return googleapi.UserAgent + " " + s.UserAgent
155 }
156
157 func NewProjectsService(s *APIService) *ProjectsService {
158 rs := &ProjectsService{s: s}
159 rs.Locations = NewProjectsLocationsService(s)
160 return rs
161 }
162
163 type ProjectsService struct {
164 s *APIService
165
166 Locations *ProjectsLocationsService
167 }
168
169 func NewProjectsLocationsService(s *APIService) *ProjectsLocationsService {
170 rs := &ProjectsLocationsService{s: s}
171 rs.Federations = NewProjectsLocationsFederationsService(s)
172 rs.Operations = NewProjectsLocationsOperationsService(s)
173 rs.Services = NewProjectsLocationsServicesService(s)
174 return rs
175 }
176
177 type ProjectsLocationsService struct {
178 s *APIService
179
180 Federations *ProjectsLocationsFederationsService
181
182 Operations *ProjectsLocationsOperationsService
183
184 Services *ProjectsLocationsServicesService
185 }
186
187 func NewProjectsLocationsFederationsService(s *APIService) *ProjectsLocationsFederationsService {
188 rs := &ProjectsLocationsFederationsService{s: s}
189 return rs
190 }
191
192 type ProjectsLocationsFederationsService struct {
193 s *APIService
194 }
195
196 func NewProjectsLocationsOperationsService(s *APIService) *ProjectsLocationsOperationsService {
197 rs := &ProjectsLocationsOperationsService{s: s}
198 return rs
199 }
200
201 type ProjectsLocationsOperationsService struct {
202 s *APIService
203 }
204
205 func NewProjectsLocationsServicesService(s *APIService) *ProjectsLocationsServicesService {
206 rs := &ProjectsLocationsServicesService{s: s}
207 rs.Backups = NewProjectsLocationsServicesBackupsService(s)
208 rs.Databases = NewProjectsLocationsServicesDatabasesService(s)
209 rs.MetadataImports = NewProjectsLocationsServicesMetadataImportsService(s)
210 rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s)
211 return rs
212 }
213
214 type ProjectsLocationsServicesService struct {
215 s *APIService
216
217 Backups *ProjectsLocationsServicesBackupsService
218
219 Databases *ProjectsLocationsServicesDatabasesService
220
221 MetadataImports *ProjectsLocationsServicesMetadataImportsService
222
223 MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService
224 }
225
226 func NewProjectsLocationsServicesBackupsService(s *APIService) *ProjectsLocationsServicesBackupsService {
227 rs := &ProjectsLocationsServicesBackupsService{s: s}
228 return rs
229 }
230
231 type ProjectsLocationsServicesBackupsService struct {
232 s *APIService
233 }
234
235 func NewProjectsLocationsServicesDatabasesService(s *APIService) *ProjectsLocationsServicesDatabasesService {
236 rs := &ProjectsLocationsServicesDatabasesService{s: s}
237 rs.Tables = NewProjectsLocationsServicesDatabasesTablesService(s)
238 return rs
239 }
240
241 type ProjectsLocationsServicesDatabasesService struct {
242 s *APIService
243
244 Tables *ProjectsLocationsServicesDatabasesTablesService
245 }
246
247 func NewProjectsLocationsServicesDatabasesTablesService(s *APIService) *ProjectsLocationsServicesDatabasesTablesService {
248 rs := &ProjectsLocationsServicesDatabasesTablesService{s: s}
249 return rs
250 }
251
252 type ProjectsLocationsServicesDatabasesTablesService struct {
253 s *APIService
254 }
255
256 func NewProjectsLocationsServicesMetadataImportsService(s *APIService) *ProjectsLocationsServicesMetadataImportsService {
257 rs := &ProjectsLocationsServicesMetadataImportsService{s: s}
258 return rs
259 }
260
261 type ProjectsLocationsServicesMetadataImportsService struct {
262 s *APIService
263 }
264
265 func NewProjectsLocationsServicesMigrationExecutionsService(s *APIService) *ProjectsLocationsServicesMigrationExecutionsService {
266 rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s}
267 return rs
268 }
269
270 type ProjectsLocationsServicesMigrationExecutionsService struct {
271 s *APIService
272 }
273
274 // AlterMetadataResourceLocationRequest: Request message for
275 // DataprocMetastore.AlterMetadataResourceLocation.
276 type AlterMetadataResourceLocationRequest struct {
277 // LocationUri: Required. The new location URI for the metadata resource.
278 LocationUri string `json:"locationUri,omitempty"`
279 // ResourceName: Required. The relative metadata resource name in the following
280 // format.databases/{database_id} or databases/{database_id}/tables/{table_id}
281 // or databases/{database_id}/tables/{table_id}/partitions/{partition_id}
282 ResourceName string `json:"resourceName,omitempty"`
283 // ForceSendFields is a list of field names (e.g. "LocationUri") to
284 // unconditionally include in API requests. By default, fields with empty or
285 // default values are omitted from API requests. See
286 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
287 // details.
288 ForceSendFields []string `json:"-"`
289 // NullFields is a list of field names (e.g. "LocationUri") to include in API
290 // requests with the JSON null value. By default, fields with empty values are
291 // omitted from API requests. See
292 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
293 NullFields []string `json:"-"`
294 }
295
296 func (s AlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) {
297 type NoMethod AlterMetadataResourceLocationRequest
298 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
299 }
300
301 // AlterMetadataResourceLocationResponse: Response message for
302 // DataprocMetastore.AlterMetadataResourceLocation.
303 type AlterMetadataResourceLocationResponse struct {
304 }
305
306 // AlterTablePropertiesRequest: Request message for
307 // DataprocMetastore.AlterTableProperties.
308 type AlterTablePropertiesRequest struct {
309 // Properties: A map that describes the desired values to mutate. If
310 // update_mask is empty, the properties will not update. Otherwise, the
311 // properties only alters the value whose associated paths exist in the update
312 // mask
313 Properties map[string]string `json:"properties,omitempty"`
314 // TableName: Required. The name of the table containing the properties you're
315 // altering in the following format.databases/{database_id}/tables/{table_id}
316 TableName string `json:"tableName,omitempty"`
317 // UpdateMask: A field mask that specifies the metadata table properties that
318 // are overwritten by the update. Fields specified in the update_mask are
319 // relative to the resource (not to the full request). A field is overwritten
320 // if it is in the mask.For example, given the target properties: properties {
321 // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if
322 // the field mask is:paths: "properties.b", "properties.c"then the result will
323 // be: properties { a: 1 b: 3 c: 4 }
324 UpdateMask string `json:"updateMask,omitempty"`
325 // ForceSendFields is a list of field names (e.g. "Properties") to
326 // unconditionally include in API requests. By default, fields with empty or
327 // default values are omitted from API requests. See
328 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
329 // details.
330 ForceSendFields []string `json:"-"`
331 // NullFields is a list of field names (e.g. "Properties") to include in API
332 // requests with the JSON null value. By default, fields with empty values are
333 // omitted from API requests. See
334 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
335 NullFields []string `json:"-"`
336 }
337
338 func (s AlterTablePropertiesRequest) MarshalJSON() ([]byte, error) {
339 type NoMethod AlterTablePropertiesRequest
340 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
341 }
342
343 // AuditConfig: Specifies the audit configuration for a service. The
344 // configuration determines which permission types are logged, and what
345 // identities, if any, are exempted from logging. An AuditConfig must have one
346 // or more AuditLogConfigs.If there are AuditConfigs for both allServices and a
347 // specific service, the union of the two AuditConfigs is used for that
348 // service: the log_types specified in each AuditConfig are enabled, and the
349 // exempted_members in each AuditLogConfig are exempted.Example Policy with
350 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
351 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
352 // "user:[email protected]" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
353 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
354 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
355 // "DATA_WRITE", "exempted_members": [ "user:[email protected]" ] } ] } ] } For
356 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
357 // logging. It also exempts [email protected] from DATA_READ logging, and
358 // [email protected] from DATA_WRITE logging.
359 type AuditConfig struct {
360 // AuditLogConfigs: The configuration for logging of each type of permission.
361 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
362 // Service: Specifies a service that will be enabled for audit logging. For
363 // example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a
364 // special value that covers all services.
365 Service string `json:"service,omitempty"`
366 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
367 // unconditionally include in API requests. By default, fields with empty or
368 // default values are omitted from API requests. See
369 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
370 // details.
371 ForceSendFields []string `json:"-"`
372 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
373 // API requests with the JSON null value. By default, fields with empty values
374 // are omitted from API requests. See
375 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
376 NullFields []string `json:"-"`
377 }
378
379 func (s AuditConfig) MarshalJSON() ([]byte, error) {
380 type NoMethod AuditConfig
381 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
382 }
383
384 // AuditLogConfig: Provides the configuration for logging a type of
385 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
386 // "exempted_members": [ "user:[email protected]" ] }, { "log_type":
387 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
388 // exempting [email protected] from DATA_READ logging.
389 type AuditLogConfig struct {
390 // ExemptedMembers: Specifies the identities that do not cause logging for this
391 // type of permission. Follows the same format of Binding.members.
392 ExemptedMembers []string `json:"exemptedMembers,omitempty"`
393 // LogType: The log type that this config enables.
394 //
395 // Possible values:
396 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
397 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
398 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create
399 // "DATA_READ" - Data reads. Example: CloudSQL Users list
400 LogType string `json:"logType,omitempty"`
401 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
402 // unconditionally include in API requests. By default, fields with empty or
403 // default values are omitted from API requests. See
404 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
405 // details.
406 ForceSendFields []string `json:"-"`
407 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in
408 // API requests with the JSON null value. By default, fields with empty values
409 // are omitted from API requests. See
410 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
411 NullFields []string `json:"-"`
412 }
413
414 func (s AuditLogConfig) MarshalJSON() ([]byte, error) {
415 type NoMethod AuditLogConfig
416 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
417 }
418
419 // AutoscalingConfig: Represents the autoscaling configuration of a metastore
420 // service.
421 type AutoscalingConfig struct {
422 // AutoscalingEnabled: Optional. Whether or not autoscaling is enabled for this
423 // service.
424 AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"`
425 // AutoscalingFactor: Output only. The scaling factor of a service with
426 // autoscaling enabled.
427 AutoscalingFactor float64 `json:"autoscalingFactor,omitempty"`
428 // LimitConfig: Optional. The LimitConfig of the service.
429 LimitConfig *LimitConfig `json:"limitConfig,omitempty"`
430 // ForceSendFields is a list of field names (e.g. "AutoscalingEnabled") to
431 // unconditionally include in API requests. By default, fields with empty or
432 // default values are omitted from API requests. See
433 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
434 // details.
435 ForceSendFields []string `json:"-"`
436 // NullFields is a list of field names (e.g. "AutoscalingEnabled") to include
437 // in API requests with the JSON null value. By default, fields with empty
438 // values are omitted from API requests. See
439 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
440 NullFields []string `json:"-"`
441 }
442
443 func (s AutoscalingConfig) MarshalJSON() ([]byte, error) {
444 type NoMethod AutoscalingConfig
445 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
446 }
447
448 func (s *AutoscalingConfig) UnmarshalJSON(data []byte) error {
449 type NoMethod AutoscalingConfig
450 var s1 struct {
451 AutoscalingFactor gensupport.JSONFloat64 `json:"autoscalingFactor"`
452 *NoMethod
453 }
454 s1.NoMethod = (*NoMethod)(s)
455 if err := json.Unmarshal(data, &s1); err != nil {
456 return err
457 }
458 s.AutoscalingFactor = float64(s1.AutoscalingFactor)
459 return nil
460 }
461
462 // AuxiliaryVersionConfig: Configuration information for the auxiliary service
463 // versions.
464 type AuxiliaryVersionConfig struct {
465 // ConfigOverrides: Optional. A mapping of Hive metastore configuration
466 // key-value pairs to apply to the auxiliary Hive metastore (configured in
467 // hive-site.xml) in addition to the primary version's overrides. If keys are
468 // present in both the auxiliary version's overrides and the primary version's
469 // overrides, the value from the auxiliary version's overrides takes
470 // precedence.
471 ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
472 // NetworkConfig: Output only. The network configuration contains the endpoint
473 // URI(s) of the auxiliary Hive metastore service.
474 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
475 // Version: Optional. The Hive metastore version of the auxiliary service. It
476 // must be less than the primary Hive metastore service's version.
477 Version string `json:"version,omitempty"`
478 // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to
479 // unconditionally include in API requests. By default, fields with empty or
480 // default values are omitted from API requests. See
481 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
482 // details.
483 ForceSendFields []string `json:"-"`
484 // NullFields is a list of field names (e.g. "ConfigOverrides") to include in
485 // API requests with the JSON null value. By default, fields with empty values
486 // are omitted from API requests. See
487 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
488 NullFields []string `json:"-"`
489 }
490
491 func (s AuxiliaryVersionConfig) MarshalJSON() ([]byte, error) {
492 type NoMethod AuxiliaryVersionConfig
493 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
494 }
495
496 // BackendMetastore: Represents a backend metastore for the federation.
497 type BackendMetastore struct {
498 // MetastoreType: The type of the backend metastore.
499 //
500 // Possible values:
501 // "METASTORE_TYPE_UNSPECIFIED" - The metastore type is not set.
502 // "DATAPLEX" - The backend metastore is Dataplex.
503 // "BIGQUERY" - The backend metastore is BigQuery.
504 // "DATAPROC_METASTORE" - The backend metastore is Dataproc Metastore.
505 MetastoreType string `json:"metastoreType,omitempty"`
506 // Name: The relative resource name of the metastore that is being federated.
507 // The formats of the relative resource names for the currently supported
508 // metastores are listed below: BigQuery projects/{project_id} Dataproc
509 // Metastore projects/{project_id}/locations/{location}/services/{service_id}
510 Name string `json:"name,omitempty"`
511 // ForceSendFields is a list of field names (e.g. "MetastoreType") to
512 // unconditionally include in API requests. By default, fields with empty or
513 // default values are omitted from API requests. See
514 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
515 // details.
516 ForceSendFields []string `json:"-"`
517 // NullFields is a list of field names (e.g. "MetastoreType") to include in API
518 // requests with the JSON null value. By default, fields with empty values are
519 // omitted from API requests. See
520 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
521 NullFields []string `json:"-"`
522 }
523
524 func (s BackendMetastore) MarshalJSON() ([]byte, error) {
525 type NoMethod BackendMetastore
526 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
527 }
528
529 // Backup: The details of a backup resource.
530 type Backup struct {
531 // CreateTime: Output only. The time when the backup was started.
532 CreateTime string `json:"createTime,omitempty"`
533 // Description: Optional. The description of the backup.
534 Description string `json:"description,omitempty"`
535 // EndTime: Output only. The time when the backup finished creating.
536 EndTime string `json:"endTime,omitempty"`
537 // Name: Immutable. Identifier. The relative resource name of the backup, in
538 // the following
539 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
540 // backups/{backup_id}
541 Name string `json:"name,omitempty"`
542 // RestoringServices: Output only. Services that are restoring from the backup.
543 RestoringServices []string `json:"restoringServices,omitempty"`
544 // ServiceRevision: Output only. The revision of the service at the time of
545 // backup.
546 ServiceRevision *Service `json:"serviceRevision,omitempty"`
547 // State: Output only. The current state of the backup.
548 //
549 // Possible values:
550 // "STATE_UNSPECIFIED" - The state of the backup is unknown.
551 // "CREATING" - The backup is being created.
552 // "DELETING" - The backup is being deleted.
553 // "ACTIVE" - The backup is active and ready to use.
554 // "FAILED" - The backup failed.
555 // "RESTORING" - The backup is being restored.
556 State string `json:"state,omitempty"`
557
558 // ServerResponse contains the HTTP response code and headers from the server.
559 googleapi.ServerResponse `json:"-"`
560 // ForceSendFields is a list of field names (e.g. "CreateTime") to
561 // unconditionally include in API requests. By default, fields with empty or
562 // default values are omitted from API requests. See
563 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
564 // details.
565 ForceSendFields []string `json:"-"`
566 // NullFields is a list of field names (e.g. "CreateTime") to include in API
567 // requests with the JSON null value. By default, fields with empty values are
568 // omitted from API requests. See
569 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
570 NullFields []string `json:"-"`
571 }
572
573 func (s Backup) MarshalJSON() ([]byte, error) {
574 type NoMethod Backup
575 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
576 }
577
578 // Binding: Associates members, or principals, with a role.
579 type Binding struct {
580 // Condition: The condition that is associated with this binding.If the
581 // condition evaluates to true, then this binding applies to the current
582 // request.If the condition evaluates to false, then this binding does not
583 // apply to the current request. However, a different role binding might grant
584 // the same role to one or more of the principals in this binding.To learn
585 // which resources support conditions in their IAM policies, see the IAM
586 // documentation
587 // (https://cloud.google.com/iam/help/conditions/resource-policies).
588 Condition *Expr `json:"condition,omitempty"`
589 // Members: Specifies the principals requesting access for a Google Cloud
590 // resource. members can have the following values: allUsers: A special
591 // identifier that represents anyone who is on the internet; with or without a
592 // Google account. allAuthenticatedUsers: A special identifier that represents
593 // anyone who is authenticated with a Google account or a service account. Does
594 // not include identities that come from external identity providers (IdPs)
595 // through identity federation. user:{emailid}: An email address that
596 // represents a specific Google account. For example, [email protected] .
597 // serviceAccount:{emailid}: An email address that represents a Google service
598 // account. For example, [email protected].
599 // serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: An
600 // identifier for a Kubernetes service account
601 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
602 // For example, my-project.svc.id.goog[my-namespace/my-kubernetes-sa].
603 // group:{emailid}: An email address that represents a Google group. For
604 // example, [email protected]. domain:{domain}: The G Suite domain (primary)
605 // that represents all the users of that domain. For example, google.com or
606 // example.com.
607 // principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subj
608 // ect/{subject_attribute_value}: A single identity in a workforce identity
609 // pool.
610 // principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/g
611 // roup/{group_id}: All workforce identities in a group.
612 // principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/a
613 // ttribute.{attribute_name}/{attribute_value}: All workforce identities with a
614 // specific attribute value.
615 // principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*
616 // : All identities in a workforce identity pool.
617 // principal://iam.googleapis.com/projects/{project_number}/locations/global/wor
618 // kloadIdentityPools/{pool_id}/subject/{subject_attribute_value}: A single
619 // identity in a workload identity pool.
620 // principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
621 // workloadIdentityPools/{pool_id}/group/{group_id}: A workload identity pool
622 // group.
623 // principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
624 // workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}:
625 // All identities in a workload identity pool with a certain attribute.
626 // principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
627 // workloadIdentityPools/{pool_id}/*: All identities in a workload identity
628 // pool. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique
629 // identifier) representing a user that has been recently deleted. For example,
630 // [email protected]?uid=123456789012345678901. If the user is recovered, this
631 // value reverts to user:{emailid} and the recovered user retains the role in
632 // the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email
633 // address (plus unique identifier) representing a service account that has
634 // been recently deleted. For example,
635 // [email protected]?uid=123456789012345678901. If the
636 // service account is undeleted, this value reverts to serviceAccount:{emailid}
637 // and the undeleted service account retains the role in the binding.
638 // deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique
639 // identifier) representing a Google group that has been recently deleted. For
640 // example, [email protected]?uid=123456789012345678901. If the group is
641 // recovered, this value reverts to group:{emailid} and the recovered group
642 // retains the role in the binding.
643 // deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_
644 // id}/subject/{subject_attribute_value}: Deleted single identity in a
645 // workforce identity pool. For example,
646 // deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-poo
647 // l-id/subject/my-subject-attribute-value.
648 Members []string `json:"members,omitempty"`
649 // Role: Role that is assigned to the list of members, or principals. For
650 // example, roles/viewer, roles/editor, or roles/owner.For an overview of the
651 // IAM roles and permissions, see the IAM documentation
652 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the
653 // available pre-defined roles, see here
654 // (https://cloud.google.com/iam/docs/understanding-roles).
655 Role string `json:"role,omitempty"`
656 // ForceSendFields is a list of field names (e.g. "Condition") to
657 // unconditionally include in API requests. By default, fields with empty or
658 // default values are omitted from API requests. See
659 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
660 // details.
661 ForceSendFields []string `json:"-"`
662 // NullFields is a list of field names (e.g. "Condition") to include in API
663 // requests with the JSON null value. By default, fields with empty values are
664 // omitted from API requests. See
665 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
666 NullFields []string `json:"-"`
667 }
668
669 func (s Binding) MarshalJSON() ([]byte, error) {
670 type NoMethod Binding
671 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
672 }
673
674 // CancelMigrationRequest: Request message for
675 // DataprocMetastore.CancelMigration.
676 type CancelMigrationRequest struct {
677 }
678
679 // CancelMigrationResponse: Response message for
680 // DataprocMetastore.CancelMigration.
681 type CancelMigrationResponse struct {
682 // MigrationExecution: The relative resource name of the migration execution,
683 // in the following
684 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
685 // migrationExecutions/{migration_execution_id}.
686 MigrationExecution string `json:"migrationExecution,omitempty"`
687 // ForceSendFields is a list of field names (e.g. "MigrationExecution") to
688 // unconditionally include in API requests. By default, fields with empty or
689 // default values are omitted from API requests. See
690 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
691 // details.
692 ForceSendFields []string `json:"-"`
693 // NullFields is a list of field names (e.g. "MigrationExecution") to include
694 // in API requests with the JSON null value. By default, fields with empty
695 // values are omitted from API requests. See
696 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
697 NullFields []string `json:"-"`
698 }
699
700 func (s CancelMigrationResponse) MarshalJSON() ([]byte, error) {
701 type NoMethod CancelMigrationResponse
702 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
703 }
704
705 // CancelOperationRequest: The request message for Operations.CancelOperation.
706 type CancelOperationRequest struct {
707 }
708
709 // CdcConfig: Configuration information to start the Change Data Capture (CDC)
710 // streams from customer database to backend database of Dataproc Metastore.
711 type CdcConfig struct {
712 // Bucket: Optional. The bucket to write the intermediate stream event data in.
713 // The bucket name must be without any prefix like "gs://". See the bucket
714 // naming requirements (https://cloud.google.com/storage/docs/buckets#naming).
715 // This field is optional. If not set, the Artifacts Cloud Storage bucket will
716 // be used.
717 Bucket string `json:"bucket,omitempty"`
718 // Password: Required. Input only. The password for the user that Datastream
719 // service should use for the MySQL connection. This field is not returned on
720 // request.
721 Password string `json:"password,omitempty"`
722 // ReverseProxySubnet: Required. The URL of the subnetwork resource to create
723 // the VM instance hosting the reverse proxy in. More context in
724 // https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy
725 // The subnetwork should reside in the network provided in the request that
726 // Datastream will peer to and should be in the same region as Datastream, in
727 // the following format.
728 // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}
729 ReverseProxySubnet string `json:"reverseProxySubnet,omitempty"`
730 // RootPath: Optional. The root path inside the Cloud Storage bucket. The
731 // stream event data will be written to this path. The default value is
732 // /migration.
733 RootPath string `json:"rootPath,omitempty"`
734 // SubnetIpRange: Required. A /29 CIDR IP range for peering with datastream.
735 SubnetIpRange string `json:"subnetIpRange,omitempty"`
736 // Username: Required. The username that the Datastream service should use for
737 // the MySQL connection.
738 Username string `json:"username,omitempty"`
739 // VpcNetwork: Required. Fully qualified name of the Cloud SQL instance's VPC
740 // network or the shared VPC network that Datastream will peer to, in the
741 // following format:
742 // projects/{project_id}/locations/global/networks/{network_id}. More context
743 // in
744 // https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity
745 VpcNetwork string `json:"vpcNetwork,omitempty"`
746 // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally
747 // include in API requests. By default, fields with empty or default values are
748 // omitted from API requests. See
749 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
750 // details.
751 ForceSendFields []string `json:"-"`
752 // NullFields is a list of field names (e.g. "Bucket") to include in API
753 // requests with the JSON null value. By default, fields with empty values are
754 // omitted from API requests. See
755 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
756 NullFields []string `json:"-"`
757 }
758
759 func (s CdcConfig) MarshalJSON() ([]byte, error) {
760 type NoMethod CdcConfig
761 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
762 }
763
764 // CloudSQLConnectionConfig: Configuration information to establish customer
765 // database connection before the cutover phase of migration
766 type CloudSQLConnectionConfig struct {
767 // HiveDatabaseName: Required. The hive database name.
768 HiveDatabaseName string `json:"hiveDatabaseName,omitempty"`
769 // InstanceConnectionName: Required. Cloud SQL database connection name
770 // (project_id:region:instance_name)
771 InstanceConnectionName string `json:"instanceConnectionName,omitempty"`
772 // IpAddress: Required. The private IP address of the Cloud SQL instance.
773 IpAddress string `json:"ipAddress,omitempty"`
774 // NatSubnet: Required. The relative resource name of the subnetwork to be used
775 // for Private Service Connect. Note that this cannot be a regular subnet and
776 // is used only for NAT.
777 // (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets)
778 // This subnet is used to publish the SOCKS5 proxy service. The subnet size
779 // must be at least /29 and it should reside in a network through which the
780 // Cloud SQL instance is accessible. The resource name should be in the format,
781 // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}
782 NatSubnet string `json:"natSubnet,omitempty"`
783 // Password: Required. Input only. The password for the user that Dataproc
784 // Metastore service will be using to connect to the database. This field is
785 // not returned on request.
786 Password string `json:"password,omitempty"`
787 // Port: Required. The network port of the database.
788 Port int64 `json:"port,omitempty"`
789 // ProxySubnet: Required. The relative resource name of the subnetwork to
790 // deploy the SOCKS5 proxy service in. The subnetwork should reside in a
791 // network through which the Cloud SQL instance is accessible. The resource
792 // name should be in the format,
793 // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}
794 ProxySubnet string `json:"proxySubnet,omitempty"`
795 // Username: Required. The username that Dataproc Metastore service will use to
796 // connect to the database.
797 Username string `json:"username,omitempty"`
798 // ForceSendFields is a list of field names (e.g. "HiveDatabaseName") to
799 // unconditionally include in API requests. By default, fields with empty or
800 // default values are omitted from API requests. See
801 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
802 // details.
803 ForceSendFields []string `json:"-"`
804 // NullFields is a list of field names (e.g. "HiveDatabaseName") to include in
805 // API requests with the JSON null value. By default, fields with empty values
806 // are omitted from API requests. See
807 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
808 NullFields []string `json:"-"`
809 }
810
811 func (s CloudSQLConnectionConfig) MarshalJSON() ([]byte, error) {
812 type NoMethod CloudSQLConnectionConfig
813 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
814 }
815
816 // CloudSQLMigrationConfig: Deprecated: Migrations to Dataproc Metastore are no
817 // longer supported. Use BigLake Metastore migration instead. Configuration
818 // information for migrating from self-managed hive metastore on Google Cloud
819 // using Cloud SQL as the backend database to Dataproc Metastore.
820 type CloudSQLMigrationConfig struct {
821 // CdcConfig: Required. Configuration information to start the Change Data
822 // Capture (CDC) streams from customer database to backend database of Dataproc
823 // Metastore. Dataproc Metastore switches to using its backend database after
824 // the cutover phase of migration.
825 CdcConfig *CdcConfig `json:"cdcConfig,omitempty"`
826 // CloudSqlConnectionConfig: Required. Configuration information to establish
827 // customer database connection before the cutover phase of migration
828 CloudSqlConnectionConfig *CloudSQLConnectionConfig `json:"cloudSqlConnectionConfig,omitempty"`
829 // ForceSendFields is a list of field names (e.g. "CdcConfig") to
830 // unconditionally include in API requests. By default, fields with empty or
831 // default values are omitted from API requests. See
832 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
833 // details.
834 ForceSendFields []string `json:"-"`
835 // NullFields is a list of field names (e.g. "CdcConfig") to include in API
836 // requests with the JSON null value. By default, fields with empty values are
837 // omitted from API requests. See
838 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
839 NullFields []string `json:"-"`
840 }
841
842 func (s CloudSQLMigrationConfig) MarshalJSON() ([]byte, error) {
843 type NoMethod CloudSQLMigrationConfig
844 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
845 }
846
847 // CompleteMigrationRequest: Request message for
848 // DataprocMetastore.CompleteMigration.
849 type CompleteMigrationRequest struct {
850 }
851
852 // CompleteMigrationResponse: Response message for
853 // DataprocMetastore.CompleteMigration.
854 type CompleteMigrationResponse struct {
855 // MigrationExecution: The relative resource name of the migration execution,
856 // in the following
857 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
858 // migrationExecutions/{migration_execution_id}.
859 MigrationExecution string `json:"migrationExecution,omitempty"`
860 // ForceSendFields is a list of field names (e.g. "MigrationExecution") to
861 // unconditionally include in API requests. By default, fields with empty or
862 // default values are omitted from API requests. See
863 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
864 // details.
865 ForceSendFields []string `json:"-"`
866 // NullFields is a list of field names (e.g. "MigrationExecution") to include
867 // in API requests with the JSON null value. By default, fields with empty
868 // values are omitted from API requests. See
869 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
870 NullFields []string `json:"-"`
871 }
872
873 func (s CompleteMigrationResponse) MarshalJSON() ([]byte, error) {
874 type NoMethod CompleteMigrationResponse
875 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
876 }
877
878 // Consumer: Contains information of the customer's network configurations.
879 type Consumer struct {
880 // EndpointLocation: Output only. The location of the endpoint URI. Format:
881 // projects/{project}/locations/{location}.
882 EndpointLocation string `json:"endpointLocation,omitempty"`
883 // EndpointUri: Output only. The URI of the endpoint used to access the
884 // metastore service.
885 EndpointUri string `json:"endpointUri,omitempty"`
886 // Subnetwork: Immutable. The subnetwork of the customer project from which an
887 // IP address is reserved and used as the Dataproc Metastore service's
888 // endpoint. It is accessible to hosts in the subnet and to all hosts in a
889 // subnet in the same region and same network. There must be at least one IP
890 // address available in the subnet's primary range. The subnet is specified in
891 // the following
892 // form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id
893 // }
894 Subnetwork string `json:"subnetwork,omitempty"`
895 // ForceSendFields is a list of field names (e.g. "EndpointLocation") to
896 // unconditionally include in API requests. By default, fields with empty or
897 // default values are omitted from API requests. See
898 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
899 // details.
900 ForceSendFields []string `json:"-"`
901 // NullFields is a list of field names (e.g. "EndpointLocation") to include in
902 // API requests with the JSON null value. By default, fields with empty values
903 // are omitted from API requests. See
904 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
905 NullFields []string `json:"-"`
906 }
907
908 func (s Consumer) MarshalJSON() ([]byte, error) {
909 type NoMethod Consumer
910 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
911 }
912
913 // CustomRegionConfig: Deprecated: Use a single region service instead. Custom
914 // configuration used to specify regions that the metastore service runs in.
915 // Currently only supported in the us multi-region.
916 type CustomRegionConfig struct {
917 // ReadOnlyRegions: Optional. The list of read-only regions where the metastore
918 // service runs in. These regions should be part (or subset) of the
919 // multi-region.
920 ReadOnlyRegions []string `json:"readOnlyRegions,omitempty"`
921 // ReadWriteRegions: Required. The list of read-write regions where the
922 // metastore service runs in. These regions should be part (or subset) of the
923 // multi-region.
924 ReadWriteRegions []string `json:"readWriteRegions,omitempty"`
925 // ForceSendFields is a list of field names (e.g. "ReadOnlyRegions") to
926 // unconditionally include in API requests. By default, fields with empty or
927 // default values are omitted from API requests. See
928 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
929 // details.
930 ForceSendFields []string `json:"-"`
931 // NullFields is a list of field names (e.g. "ReadOnlyRegions") to include in
932 // API requests with the JSON null value. By default, fields with empty values
933 // are omitted from API requests. See
934 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
935 NullFields []string `json:"-"`
936 }
937
938 func (s CustomRegionConfig) MarshalJSON() ([]byte, error) {
939 type NoMethod CustomRegionConfig
940 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
941 }
942
943 // CustomRegionMetadata: Deprecated: Use a single region service instead.
944 // Metadata about a custom region. This is only populated if the region is a
945 // custom region. For single/multi regions, it will be empty.
946 type CustomRegionMetadata struct {
947 // OptionalReadOnlyRegions: The read-only regions for this custom region.
948 OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"`
949 // RequiredReadWriteRegions: The read-write regions for this custom region.
950 RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"`
951 // WitnessRegion: The Spanner witness region for this custom region.
952 WitnessRegion string `json:"witnessRegion,omitempty"`
953 // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
954 // unconditionally include in API requests. By default, fields with empty or
955 // default values are omitted from API requests. See
956 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
957 // details.
958 ForceSendFields []string `json:"-"`
959 // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to
960 // include in API requests with the JSON null value. By default, fields with
961 // empty values are omitted from API requests. See
962 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
963 NullFields []string `json:"-"`
964 }
965
966 func (s CustomRegionMetadata) MarshalJSON() ([]byte, error) {
967 type NoMethod CustomRegionMetadata
968 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
969 }
970
971 // DataCatalogConfig: Specifies how metastore metadata should be integrated
972 // with the Data Catalog service.
973 type DataCatalogConfig struct {
974 // Enabled: Optional. Defines whether the metastore metadata should be synced
975 // to Data Catalog. The default value is to disable syncing metastore metadata
976 // to Data Catalog.
977 Enabled bool `json:"enabled,omitempty"`
978 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
979 // include in API requests. By default, fields with empty or default values are
980 // omitted from API requests. See
981 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
982 // details.
983 ForceSendFields []string `json:"-"`
984 // NullFields is a list of field names (e.g. "Enabled") to include in API
985 // requests with the JSON null value. By default, fields with empty values are
986 // omitted from API requests. See
987 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
988 NullFields []string `json:"-"`
989 }
990
991 func (s DataCatalogConfig) MarshalJSON() ([]byte, error) {
992 type NoMethod DataCatalogConfig
993 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
994 }
995
996 // DatabaseDump: A specification of the location of and metadata about a
997 // database dump from a relational database management system.
998 type DatabaseDump struct {
999 // DatabaseType: The type of the database.
1000 //
1001 // Possible values:
1002 // "DATABASE_TYPE_UNSPECIFIED" - The type of the source database is unknown.
1003 // "MYSQL" - The type of the source database is MySQL.
1004 DatabaseType string `json:"databaseType,omitempty"`
1005 // GcsUri: Optional. A Cloud Storage object or folder URI that specifies the
1006 // source from which to import metadata. It must begin with gs://.
1007 GcsUri string `json:"gcsUri,omitempty"`
1008 // SourceDatabase: Optional. The name of the source database.
1009 SourceDatabase string `json:"sourceDatabase,omitempty"`
1010 // Type: Optional. The type of the database dump. If unspecified, defaults to
1011 // MYSQL.
1012 //
1013 // Possible values:
1014 // "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
1015 // "MYSQL" - Database dump is a MySQL dump file.
1016 // "AVRO" - Database dump contains Avro files.
1017 Type string `json:"type,omitempty"`
1018 // ForceSendFields is a list of field names (e.g. "DatabaseType") to
1019 // unconditionally include in API requests. By default, fields with empty or
1020 // default values are omitted from API requests. See
1021 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1022 // details.
1023 ForceSendFields []string `json:"-"`
1024 // NullFields is a list of field names (e.g. "DatabaseType") to include in API
1025 // requests with the JSON null value. By default, fields with empty values are
1026 // omitted from API requests. See
1027 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1028 NullFields []string `json:"-"`
1029 }
1030
1031 func (s DatabaseDump) MarshalJSON() ([]byte, error) {
1032 type NoMethod DatabaseDump
1033 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1034 }
1035
1036 // DataplexConfig: Specifies how metastore metadata should be integrated with
1037 // the Dataplex service.
1038 type DataplexConfig struct {
1039 // LakeResources: Optional. A reference to the Lake resources that this
1040 // metastore service is attached to. The key is the lake resource name.
1041 // Example: projects/{project_number}/locations/{location_id}/lakes/{lake_id}.
1042 LakeResources map[string]Lake `json:"lakeResources,omitempty"`
1043 // ForceSendFields is a list of field names (e.g. "LakeResources") to
1044 // unconditionally include in API requests. By default, fields with empty or
1045 // default values are omitted from API requests. See
1046 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1047 // details.
1048 ForceSendFields []string `json:"-"`
1049 // NullFields is a list of field names (e.g. "LakeResources") to include in API
1050 // requests with the JSON null value. By default, fields with empty values are
1051 // omitted from API requests. See
1052 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1053 NullFields []string `json:"-"`
1054 }
1055
1056 func (s DataplexConfig) MarshalJSON() ([]byte, error) {
1057 type NoMethod DataplexConfig
1058 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1059 }
1060
1061 // Empty: A generic empty message that you can re-use to avoid defining
1062 // duplicated empty messages in your APIs. A typical example is to use it as
1063 // the request or the response type of an API method. For instance: service Foo
1064 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
1065 type Empty struct {
1066 // ServerResponse contains the HTTP response code and headers from the server.
1067 googleapi.ServerResponse `json:"-"`
1068 }
1069
1070 // EncryptionConfig: Encryption settings for the service.
1071 type EncryptionConfig struct {
1072 // KmsKey: Optional. The fully qualified customer provided Cloud KMS key name
1073 // to use for customer data encryption, in the following
1074 // format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_i
1075 // d}/cryptoKeys/{crypto_key_id}.
1076 KmsKey string `json:"kmsKey,omitempty"`
1077 // KmsKeys: Optional. The list of fully qualified customer provided Cloud KMS
1078 // key names for the multi-regional service. Each key must be in the following
1079 // format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_i
1080 // d}/cryptoKeys/{crypto_key_id}.
1081 KmsKeys []string `json:"kmsKeys,omitempty"`
1082 // ForceSendFields is a list of field names (e.g. "KmsKey") to unconditionally
1083 // include in API requests. By default, fields with empty or default values are
1084 // omitted from API requests. See
1085 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1086 // details.
1087 ForceSendFields []string `json:"-"`
1088 // NullFields is a list of field names (e.g. "KmsKey") to include in API
1089 // requests with the JSON null value. By default, fields with empty values are
1090 // omitted from API requests. See
1091 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1092 NullFields []string `json:"-"`
1093 }
1094
1095 func (s EncryptionConfig) MarshalJSON() ([]byte, error) {
1096 type NoMethod EncryptionConfig
1097 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1098 }
1099
1100 // ErrorDetails: Error details in public error message for
1101 // DataprocMetastore.QueryMetadata.
1102 type ErrorDetails struct {
1103 // Details: Additional structured details about this error.Keys define the
1104 // failure items. Value describes the exception or details of the item.
1105 Details map[string]string `json:"details,omitempty"`
1106 // ForceSendFields is a list of field names (e.g. "Details") to unconditionally
1107 // include in API requests. By default, fields with empty or default values are
1108 // omitted from API requests. See
1109 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1110 // details.
1111 ForceSendFields []string `json:"-"`
1112 // NullFields is a list of field names (e.g. "Details") to include in API
1113 // requests with the JSON null value. By default, fields with empty values are
1114 // omitted from API requests. See
1115 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1116 NullFields []string `json:"-"`
1117 }
1118
1119 func (s ErrorDetails) MarshalJSON() ([]byte, error) {
1120 type NoMethod ErrorDetails
1121 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1122 }
1123
1124 // ExportMetadataRequest: Request message for DataprocMetastore.ExportMetadata.
1125 type ExportMetadataRequest struct {
1126 // DatabaseDumpType: Optional. The type of the database dump. If unspecified,
1127 // defaults to MYSQL.
1128 //
1129 // Possible values:
1130 // "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
1131 // "MYSQL" - Database dump is a MySQL dump file.
1132 // "AVRO" - Database dump contains Avro files.
1133 DatabaseDumpType string `json:"databaseDumpType,omitempty"`
1134 // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///.
1135 // A sub-folder containing exported files will be created below it.
1136 DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"`
1137 // RequestId: Optional. A request ID. Specify a unique request ID to allow the
1138 // server to ignore the request if it has completed. The server will ignore
1139 // subsequent requests that provide a duplicate request ID for at least 60
1140 // minutes after the first request.For example, if an initial request times
1141 // out, followed by another request with the same request ID, the server
1142 // ignores the second request to prevent the creation of duplicate
1143 // commitments.The request ID must be a valid UUID
1144 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero
1145 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
1146 RequestId string `json:"requestId,omitempty"`
1147 // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to
1148 // unconditionally include in API requests. By default, fields with empty or
1149 // default values are omitted from API requests. See
1150 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1151 // details.
1152 ForceSendFields []string `json:"-"`
1153 // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in
1154 // API requests with the JSON null value. By default, fields with empty values
1155 // are omitted from API requests. See
1156 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1157 NullFields []string `json:"-"`
1158 }
1159
1160 func (s ExportMetadataRequest) MarshalJSON() ([]byte, error) {
1161 type NoMethod ExportMetadataRequest
1162 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1163 }
1164
1165 // Expr: Represents a textual expression in the Common Expression Language
1166 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
1167 // of CEL are documented at https://github.com/google/cel-spec.Example
1168 // (Comparison): title: "Summary size limit" description: "Determines if a
1169 // summary is less than 100 chars" expression: "document.summary.size() < 100"
1170 // Example (Equality): title: "Requestor is owner" description: "Determines if
1171 // requestor is the document owner" expression: "document.owner ==
1172 // request.auth.claims.email" Example (Logic): title: "Public documents"
1173 // description: "Determine whether the document should be publicly visible"
1174 // expression: "document.type != 'private' && document.type != 'internal'"
1175 // Example (Data Manipulation): title: "Notification string" description:
1176 // "Create a notification string with a timestamp." expression: "'New message
1177 // received at ' + string(document.create_time)" The exact variables and
1178 // functions that may be referenced within an expression are determined by the
1179 // service that evaluates it. See the service documentation for additional
1180 // information.
1181 type Expr struct {
1182 // Description: Optional. Description of the expression. This is a longer text
1183 // which describes the expression, e.g. when hovered over it in a UI.
1184 Description string `json:"description,omitempty"`
1185 // Expression: Textual representation of an expression in Common Expression
1186 // Language syntax.
1187 Expression string `json:"expression,omitempty"`
1188 // Location: Optional. String indicating the location of the expression for
1189 // error reporting, e.g. a file name and a position in the file.
1190 Location string `json:"location,omitempty"`
1191 // Title: Optional. Title for the expression, i.e. a short string describing
1192 // its purpose. This can be used e.g. in UIs which allow to enter the
1193 // expression.
1194 Title string `json:"title,omitempty"`
1195 // ForceSendFields is a list of field names (e.g. "Description") to
1196 // unconditionally include in API requests. By default, fields with empty or
1197 // default values are omitted from API requests. See
1198 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1199 // details.
1200 ForceSendFields []string `json:"-"`
1201 // NullFields is a list of field names (e.g. "Description") to include in API
1202 // requests with the JSON null value. By default, fields with empty values are
1203 // omitted from API requests. See
1204 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1205 NullFields []string `json:"-"`
1206 }
1207
1208 func (s Expr) MarshalJSON() ([]byte, error) {
1209 type NoMethod Expr
1210 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1211 }
1212
1213 // Federation: Represents a federation of multiple backend metastores.
1214 type Federation struct {
1215 // BackendMetastores: A map from BackendMetastore rank to BackendMetastores
1216 // from which the federation service serves metadata at query time. The map key
1217 // represents the order in which BackendMetastores should be evaluated to
1218 // resolve database names at query time and should be greater than or equal to
1219 // zero. A BackendMetastore with a lower number will be evaluated before a
1220 // BackendMetastore with a higher number.
1221 BackendMetastores map[string]BackendMetastore `json:"backendMetastores,omitempty"`
1222 // CreateTime: Output only. The time when the metastore federation was created.
1223 CreateTime string `json:"createTime,omitempty"`
1224 // EndpointUri: Output only. The federation endpoint.
1225 EndpointUri string `json:"endpointUri,omitempty"`
1226 // Labels: User-defined labels for the metastore federation.
1227 Labels map[string]string `json:"labels,omitempty"`
1228 // Name: Immutable. The relative resource name of the federation, of the form:
1229 // projects/{project_number}/locations/{location_id}/federations/{federation_id}
1230 // `.
1231 Name string `json:"name,omitempty"`
1232 // State: Output only. The current state of the federation.
1233 //
1234 // Possible values:
1235 // "STATE_UNSPECIFIED" - The state of the metastore federation is unknown.
1236 // "CREATING" - The metastore federation is in the process of being created.
1237 // "ACTIVE" - The metastore federation is running and ready to serve queries.
1238 // "UPDATING" - The metastore federation is being updated. It remains usable
1239 // but cannot accept additional update requests or be deleted at this time.
1240 // "DELETING" - The metastore federation is undergoing deletion. It cannot be
1241 // used.
1242 // "ERROR" - The metastore federation has encountered an error and cannot be
1243 // used. The metastore federation should be deleted.
1244 State string `json:"state,omitempty"`
1245 // StateMessage: Output only. Additional information about the current state of
1246 // the metastore federation, if available.
1247 StateMessage string `json:"stateMessage,omitempty"`
1248 // Tags: Optional. Input only. Immutable. Tag keys/values directly bound to
1249 // this resource. For example: "123/environment": "production",
1250 // "123/costCenter": "marketing"
1251 Tags map[string]string `json:"tags,omitempty"`
1252 // Uid: Output only. The globally unique resource identifier of the metastore
1253 // federation.
1254 Uid string `json:"uid,omitempty"`
1255 // UpdateTime: Output only. The time when the metastore federation was last
1256 // updated.
1257 UpdateTime string `json:"updateTime,omitempty"`
1258 // Version: Immutable. The Apache Hive metastore version of the federation. All
1259 // backend metastore versions must be compatible with the federation version.
1260 Version string `json:"version,omitempty"`
1261
1262 // ServerResponse contains the HTTP response code and headers from the server.
1263 googleapi.ServerResponse `json:"-"`
1264 // ForceSendFields is a list of field names (e.g. "BackendMetastores") to
1265 // unconditionally include in API requests. By default, fields with empty or
1266 // default values are omitted from API requests. See
1267 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1268 // details.
1269 ForceSendFields []string `json:"-"`
1270 // NullFields is a list of field names (e.g. "BackendMetastores") to include in
1271 // API requests with the JSON null value. By default, fields with empty values
1272 // are omitted from API requests. See
1273 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1274 NullFields []string `json:"-"`
1275 }
1276
1277 func (s Federation) MarshalJSON() ([]byte, error) {
1278 type NoMethod Federation
1279 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1280 }
1281
1282 // HiveMetastoreConfig: Specifies configuration information specific to running
1283 // Hive metastore software as the metastore service.
1284 type HiveMetastoreConfig struct {
1285 // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the
1286 // auxiliary version configuration. When specified, a secondary Hive metastore
1287 // service is created along with the primary service. All auxiliary versions
1288 // must be less than the service's primary version. The key is the auxiliary
1289 // service name and it must match the regular expression a-z?. This means that
1290 // the first character must be a lowercase letter, and all the following
1291 // characters must be hyphens, lowercase letters, or digits, except the last
1292 // character, which cannot be a hyphen.
1293 AuxiliaryVersions map[string]AuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"`
1294 // ConfigOverrides: Optional. A mapping of Hive metastore configuration
1295 // key-value pairs to apply to the Hive metastore (configured in
1296 // hive-site.xml). The mappings override system defaults (some keys cannot be
1297 // overridden). These overrides are also applied to auxiliary versions and can
1298 // be further customized in the auxiliary version's AuxiliaryVersionConfig.
1299 ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
1300 // EndpointProtocol: Optional. The protocol to use for the metastore service
1301 // endpoint. If unspecified, defaults to THRIFT.
1302 //
1303 // Possible values:
1304 // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set.
1305 // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service
1306 // endpoint.
1307 // "GRPC" - Use the modernized gRPC protocol for the metastore service
1308 // endpoint.
1309 EndpointProtocol string `json:"endpointProtocol,omitempty"`
1310 // KerberosConfig: Optional. Information used to configure the Hive metastore
1311 // service as a service principal in a Kerberos realm. To disable Kerberos, use
1312 // the UpdateService method and specify this field's path
1313 // (hive_metastore_config.kerberos_config) in the request's update_mask while
1314 // omitting this field from the request's service.
1315 KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"`
1316 // Version: Immutable. The Hive metastore schema version.
1317 Version string `json:"version,omitempty"`
1318 // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to
1319 // unconditionally include in API requests. By default, fields with empty or
1320 // default values are omitted from API requests. See
1321 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1322 // details.
1323 ForceSendFields []string `json:"-"`
1324 // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in
1325 // API requests with the JSON null value. By default, fields with empty values
1326 // are omitted from API requests. See
1327 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1328 NullFields []string `json:"-"`
1329 }
1330
1331 func (s HiveMetastoreConfig) MarshalJSON() ([]byte, error) {
1332 type NoMethod HiveMetastoreConfig
1333 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1334 }
1335
1336 // HiveMetastoreVersion: A specification of a supported version of the Hive
1337 // Metastore software.
1338 type HiveMetastoreVersion struct {
1339 // IsDefault: Whether version will be chosen by the server if a metastore
1340 // service is created with a HiveMetastoreConfig that omits the version.
1341 IsDefault bool `json:"isDefault,omitempty"`
1342 // Version: The semantic version of the Hive Metastore software.
1343 Version string `json:"version,omitempty"`
1344 // ForceSendFields is a list of field names (e.g. "IsDefault") to
1345 // unconditionally include in API requests. By default, fields with empty or
1346 // default values are omitted from API requests. See
1347 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1348 // details.
1349 ForceSendFields []string `json:"-"`
1350 // NullFields is a list of field names (e.g. "IsDefault") to include in API
1351 // requests with the JSON null value. By default, fields with empty values are
1352 // omitted from API requests. See
1353 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1354 NullFields []string `json:"-"`
1355 }
1356
1357 func (s HiveMetastoreVersion) MarshalJSON() ([]byte, error) {
1358 type NoMethod HiveMetastoreVersion
1359 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1360 }
1361
1362 // KerberosConfig: Configuration information for a Kerberos principal.
1363 type KerberosConfig struct {
1364 // Keytab: Optional. A Kerberos keytab file that can be used to authenticate a
1365 // service principal with a Kerberos Key Distribution Center (KDC).
1366 Keytab *Secret `json:"keytab,omitempty"`
1367 // Krb5ConfigGcsUri: Optional. A Cloud Storage URI that specifies the path to a
1368 // krb5.conf file. It is of the form gs://{bucket_name}/path/to/krb5.conf,
1369 // although the file does not need to be named krb5.conf explicitly.
1370 Krb5ConfigGcsUri string `json:"krb5ConfigGcsUri,omitempty"`
1371 // Principal: Optional. A Kerberos principal that exists in the both the keytab
1372 // the KDC to authenticate as. A typical principal is of the form
1373 // primary/instance@REALM, but there is no exact format.
1374 Principal string `json:"principal,omitempty"`
1375 // ForceSendFields is a list of field names (e.g. "Keytab") to unconditionally
1376 // include in API requests. By default, fields with empty or default values are
1377 // omitted from API requests. See
1378 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1379 // details.
1380 ForceSendFields []string `json:"-"`
1381 // NullFields is a list of field names (e.g. "Keytab") to include in API
1382 // requests with the JSON null value. By default, fields with empty values are
1383 // omitted from API requests. See
1384 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1385 NullFields []string `json:"-"`
1386 }
1387
1388 func (s KerberosConfig) MarshalJSON() ([]byte, error) {
1389 type NoMethod KerberosConfig
1390 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1391 }
1392
1393 // Lake: Represents a Lake resource
1394 type Lake struct {
1395 // Name: The Lake resource name. Example:
1396 // projects/{project_number}/locations/{location_id}/lakes/{lake_id}
1397 Name string `json:"name,omitempty"`
1398 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally
1399 // include in API requests. By default, fields with empty or default values are
1400 // omitted from API requests. See
1401 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1402 // details.
1403 ForceSendFields []string `json:"-"`
1404 // NullFields is a list of field names (e.g. "Name") to include in API requests
1405 // with the JSON null value. By default, fields with empty values are omitted
1406 // from API requests. See
1407 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1408 NullFields []string `json:"-"`
1409 }
1410
1411 func (s Lake) MarshalJSON() ([]byte, error) {
1412 type NoMethod Lake
1413 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1414 }
1415
1416 // LatestBackup: The details of the latest scheduled backup.
1417 type LatestBackup struct {
1418 // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if
1419 // no backup is in progress.
1420 BackupId string `json:"backupId,omitempty"`
1421 // Duration: Output only. The duration of the backup completion.
1422 Duration string `json:"duration,omitempty"`
1423 // StartTime: Output only. The time when the backup was started.
1424 StartTime string `json:"startTime,omitempty"`
1425 // State: Output only. The current state of the backup.
1426 //
1427 // Possible values:
1428 // "STATE_UNSPECIFIED" - The state of the backup is unknown.
1429 // "IN_PROGRESS" - The backup is in progress.
1430 // "SUCCEEDED" - The backup completed.
1431 // "FAILED" - The backup failed.
1432 State string `json:"state,omitempty"`
1433 // ForceSendFields is a list of field names (e.g. "BackupId") to
1434 // unconditionally include in API requests. By default, fields with empty or
1435 // default values are omitted from API requests. See
1436 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1437 // details.
1438 ForceSendFields []string `json:"-"`
1439 // NullFields is a list of field names (e.g. "BackupId") to include in API
1440 // requests with the JSON null value. By default, fields with empty values are
1441 // omitted from API requests. See
1442 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1443 NullFields []string `json:"-"`
1444 }
1445
1446 func (s LatestBackup) MarshalJSON() ([]byte, error) {
1447 type NoMethod LatestBackup
1448 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1449 }
1450
1451 // LimitConfig: Represents the autoscaling limit configuration of a metastore
1452 // service.
1453 type LimitConfig struct {
1454 // MaxScalingFactor: Optional. The highest scaling factor that the service
1455 // should be autoscaled to.
1456 MaxScalingFactor float64 `json:"maxScalingFactor,omitempty"`
1457 // MinScalingFactor: Optional. The lowest scaling factor that the service
1458 // should be autoscaled to.
1459 MinScalingFactor float64 `json:"minScalingFactor,omitempty"`
1460 // ForceSendFields is a list of field names (e.g. "MaxScalingFactor") to
1461 // unconditionally include in API requests. By default, fields with empty or
1462 // default values are omitted from API requests. See
1463 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1464 // details.
1465 ForceSendFields []string `json:"-"`
1466 // NullFields is a list of field names (e.g. "MaxScalingFactor") to include in
1467 // API requests with the JSON null value. By default, fields with empty values
1468 // are omitted from API requests. See
1469 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1470 NullFields []string `json:"-"`
1471 }
1472
1473 func (s LimitConfig) MarshalJSON() ([]byte, error) {
1474 type NoMethod LimitConfig
1475 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1476 }
1477
1478 func (s *LimitConfig) UnmarshalJSON(data []byte) error {
1479 type NoMethod LimitConfig
1480 var s1 struct {
1481 MaxScalingFactor gensupport.JSONFloat64 `json:"maxScalingFactor"`
1482 MinScalingFactor gensupport.JSONFloat64 `json:"minScalingFactor"`
1483 *NoMethod
1484 }
1485 s1.NoMethod = (*NoMethod)(s)
1486 if err := json.Unmarshal(data, &s1); err != nil {
1487 return err
1488 }
1489 s.MaxScalingFactor = float64(s1.MaxScalingFactor)
1490 s.MinScalingFactor = float64(s1.MinScalingFactor)
1491 return nil
1492 }
1493
1494 // ListBackupsResponse: Response message for DataprocMetastore.ListBackups.
1495 type ListBackupsResponse struct {
1496 // Backups: The backups of the specified service.
1497 Backups []*Backup `json:"backups,omitempty"`
1498 // NextPageToken: A token that can be sent as page_token to retrieve the next
1499 // page. If this field is omitted, there are no subsequent pages.
1500 NextPageToken string `json:"nextPageToken,omitempty"`
1501 // Unreachable: Locations that could not be reached.
1502 Unreachable []string `json:"unreachable,omitempty"`
1503
1504 // ServerResponse contains the HTTP response code and headers from the server.
1505 googleapi.ServerResponse `json:"-"`
1506 // ForceSendFields is a list of field names (e.g. "Backups") to unconditionally
1507 // include in API requests. By default, fields with empty or default values are
1508 // omitted from API requests. See
1509 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1510 // details.
1511 ForceSendFields []string `json:"-"`
1512 // NullFields is a list of field names (e.g. "Backups") to include in API
1513 // requests with the JSON null value. By default, fields with empty values are
1514 // omitted from API requests. See
1515 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1516 NullFields []string `json:"-"`
1517 }
1518
1519 func (s ListBackupsResponse) MarshalJSON() ([]byte, error) {
1520 type NoMethod ListBackupsResponse
1521 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1522 }
1523
1524 // ListFederationsResponse: Response message for ListFederations
1525 type ListFederationsResponse struct {
1526 // Federations: The services in the specified location.
1527 Federations []*Federation `json:"federations,omitempty"`
1528 // NextPageToken: A token that can be sent as page_token to retrieve the next
1529 // page. If this field is omitted, there are no subsequent pages.
1530 NextPageToken string `json:"nextPageToken,omitempty"`
1531 // Unreachable: Locations that could not be reached.
1532 Unreachable []string `json:"unreachable,omitempty"`
1533
1534 // ServerResponse contains the HTTP response code and headers from the server.
1535 googleapi.ServerResponse `json:"-"`
1536 // ForceSendFields is a list of field names (e.g. "Federations") to
1537 // unconditionally include in API requests. By default, fields with empty or
1538 // default values are omitted from API requests. See
1539 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1540 // details.
1541 ForceSendFields []string `json:"-"`
1542 // NullFields is a list of field names (e.g. "Federations") to include in API
1543 // requests with the JSON null value. By default, fields with empty values are
1544 // omitted from API requests. See
1545 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1546 NullFields []string `json:"-"`
1547 }
1548
1549 func (s ListFederationsResponse) MarshalJSON() ([]byte, error) {
1550 type NoMethod ListFederationsResponse
1551 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1552 }
1553
1554 // ListLocationsResponse: The response message for Locations.ListLocations.
1555 type ListLocationsResponse struct {
1556 // Locations: A list of locations that matches the specified filter in the
1557 // request.
1558 Locations []*Location `json:"locations,omitempty"`
1559 // NextPageToken: The standard List next-page token.
1560 NextPageToken string `json:"nextPageToken,omitempty"`
1561
1562 // ServerResponse contains the HTTP response code and headers from the server.
1563 googleapi.ServerResponse `json:"-"`
1564 // ForceSendFields is a list of field names (e.g. "Locations") to
1565 // unconditionally include in API requests. By default, fields with empty or
1566 // default values are omitted from API requests. See
1567 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1568 // details.
1569 ForceSendFields []string `json:"-"`
1570 // NullFields is a list of field names (e.g. "Locations") to include in API
1571 // requests with the JSON null value. By default, fields with empty values are
1572 // omitted from API requests. See
1573 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1574 NullFields []string `json:"-"`
1575 }
1576
1577 func (s ListLocationsResponse) MarshalJSON() ([]byte, error) {
1578 type NoMethod ListLocationsResponse
1579 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1580 }
1581
1582 // ListMetadataImportsResponse: Response message for
1583 // DataprocMetastore.ListMetadataImports.
1584 type ListMetadataImportsResponse struct {
1585 // MetadataImports: The imports in the specified service.
1586 MetadataImports []*MetadataImport `json:"metadataImports,omitempty"`
1587 // NextPageToken: A token that can be sent as page_token to retrieve the next
1588 // page. If this field is omitted, there are no subsequent pages.
1589 NextPageToken string `json:"nextPageToken,omitempty"`
1590 // Unreachable: Locations that could not be reached.
1591 Unreachable []string `json:"unreachable,omitempty"`
1592
1593 // ServerResponse contains the HTTP response code and headers from the server.
1594 googleapi.ServerResponse `json:"-"`
1595 // ForceSendFields is a list of field names (e.g. "MetadataImports") to
1596 // unconditionally include in API requests. By default, fields with empty or
1597 // default values are omitted from API requests. See
1598 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1599 // details.
1600 ForceSendFields []string `json:"-"`
1601 // NullFields is a list of field names (e.g. "MetadataImports") to include in
1602 // API requests with the JSON null value. By default, fields with empty values
1603 // are omitted from API requests. See
1604 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1605 NullFields []string `json:"-"`
1606 }
1607
1608 func (s ListMetadataImportsResponse) MarshalJSON() ([]byte, error) {
1609 type NoMethod ListMetadataImportsResponse
1610 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1611 }
1612
1613 // ListMigrationExecutionsResponse: Response message for
1614 // DataprocMetastore.ListMigrationExecutions.
1615 type ListMigrationExecutionsResponse struct {
1616 // MigrationExecutions: The migration executions on the specified service.
1617 MigrationExecutions []*MigrationExecution `json:"migrationExecutions,omitempty"`
1618 // NextPageToken: A token that can be sent as page_token to retrieve the next
1619 // page. If this field is omitted, there are no subsequent pages.
1620 NextPageToken string `json:"nextPageToken,omitempty"`
1621 // Unreachable: Locations that could not be reached.
1622 Unreachable []string `json:"unreachable,omitempty"`
1623
1624 // ServerResponse contains the HTTP response code and headers from the server.
1625 googleapi.ServerResponse `json:"-"`
1626 // ForceSendFields is a list of field names (e.g. "MigrationExecutions") to
1627 // unconditionally include in API requests. By default, fields with empty or
1628 // default values are omitted from API requests. See
1629 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1630 // details.
1631 ForceSendFields []string `json:"-"`
1632 // NullFields is a list of field names (e.g. "MigrationExecutions") to include
1633 // in API requests with the JSON null value. By default, fields with empty
1634 // values are omitted from API requests. See
1635 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1636 NullFields []string `json:"-"`
1637 }
1638
1639 func (s ListMigrationExecutionsResponse) MarshalJSON() ([]byte, error) {
1640 type NoMethod ListMigrationExecutionsResponse
1641 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1642 }
1643
1644 // ListOperationsResponse: The response message for Operations.ListOperations.
1645 type ListOperationsResponse struct {
1646 // NextPageToken: The standard List next-page token.
1647 NextPageToken string `json:"nextPageToken,omitempty"`
1648 // Operations: A list of operations that matches the specified filter in the
1649 // request.
1650 Operations []*Operation `json:"operations,omitempty"`
1651 // Unreachable: Unordered list. Unreachable resources. Populated when the
1652 // request sets ListOperationsRequest.return_partial_success and reads across
1653 // collections. For example, when attempting to list all resources across all
1654 // supported locations.
1655 Unreachable []string `json:"unreachable,omitempty"`
1656
1657 // ServerResponse contains the HTTP response code and headers from the server.
1658 googleapi.ServerResponse `json:"-"`
1659 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
1660 // unconditionally include in API requests. By default, fields with empty or
1661 // default values are omitted from API requests. See
1662 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1663 // details.
1664 ForceSendFields []string `json:"-"`
1665 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
1666 // requests with the JSON null value. By default, fields with empty values are
1667 // omitted from API requests. See
1668 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1669 NullFields []string `json:"-"`
1670 }
1671
1672 func (s ListOperationsResponse) MarshalJSON() ([]byte, error) {
1673 type NoMethod ListOperationsResponse
1674 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1675 }
1676
1677 // ListServicesResponse: Response message for DataprocMetastore.ListServices.
1678 type ListServicesResponse struct {
1679 // NextPageToken: A token that can be sent as page_token to retrieve the next
1680 // page. If this field is omitted, there are no subsequent pages.
1681 NextPageToken string `json:"nextPageToken,omitempty"`
1682 // Services: The services in the specified location.
1683 Services []*Service `json:"services,omitempty"`
1684 // Unreachable: Locations that could not be reached.
1685 Unreachable []string `json:"unreachable,omitempty"`
1686
1687 // ServerResponse contains the HTTP response code and headers from the server.
1688 googleapi.ServerResponse `json:"-"`
1689 // ForceSendFields is a list of field names (e.g. "NextPageToken") to
1690 // unconditionally include in API requests. By default, fields with empty or
1691 // default values are omitted from API requests. See
1692 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1693 // details.
1694 ForceSendFields []string `json:"-"`
1695 // NullFields is a list of field names (e.g. "NextPageToken") to include in API
1696 // requests with the JSON null value. By default, fields with empty values are
1697 // omitted from API requests. See
1698 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1699 NullFields []string `json:"-"`
1700 }
1701
1702 func (s ListServicesResponse) MarshalJSON() ([]byte, error) {
1703 type NoMethod ListServicesResponse
1704 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1705 }
1706
1707 // Location: A resource that represents a Google Cloud location.
1708 type Location struct {
1709 // DisplayName: The friendly name for this location, typically a nearby city
1710 // name. For example, "Tokyo".
1711 DisplayName string `json:"displayName,omitempty"`
1712 // Labels: Cross-service attributes for the location. For example
1713 // {"cloud.googleapis.com/region": "us-east1"}
1714 Labels map[string]string `json:"labels,omitempty"`
1715 // LocationId: The canonical id for this location. For example: "us-east1".
1716 LocationId string `json:"locationId,omitempty"`
1717 // Metadata: Service-specific metadata. For example the available capacity at
1718 // the given location.
1719 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
1720 // Name: Resource name for the location, which may vary between
1721 // implementations. For example: "projects/example-project/locations/us-east1"
1722 Name string `json:"name,omitempty"`
1723
1724 // ServerResponse contains the HTTP response code and headers from the server.
1725 googleapi.ServerResponse `json:"-"`
1726 // ForceSendFields is a list of field names (e.g. "DisplayName") to
1727 // unconditionally include in API requests. By default, fields with empty or
1728 // default values are omitted from API requests. See
1729 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1730 // details.
1731 ForceSendFields []string `json:"-"`
1732 // NullFields is a list of field names (e.g. "DisplayName") to include in API
1733 // requests with the JSON null value. By default, fields with empty values are
1734 // omitted from API requests. See
1735 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1736 NullFields []string `json:"-"`
1737 }
1738
1739 func (s Location) MarshalJSON() ([]byte, error) {
1740 type NoMethod Location
1741 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1742 }
1743
1744 // LocationMetadata: Metadata about the service in a location.
1745 type LocationMetadata struct {
1746 // CustomRegionMetadata: Deprecated: Use a single region service instead.
1747 // Possible configurations supported if the current region is a custom region.
1748 CustomRegionMetadata []*CustomRegionMetadata `json:"customRegionMetadata,omitempty"`
1749 // MultiRegionMetadata: Deprecated: Use a single region service instead. The
1750 // multi-region metadata if the current region is a multi-region.
1751 MultiRegionMetadata *MultiRegionMetadata `json:"multiRegionMetadata,omitempty"`
1752 // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be
1753 // used when creating a new metastore service in this location. The server
1754 // guarantees that exactly one HiveMetastoreVersion in the list will set
1755 // is_default.
1756 SupportedHiveMetastoreVersions []*HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"`
1757 // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to
1758 // unconditionally include in API requests. By default, fields with empty or
1759 // default values are omitted from API requests. See
1760 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1761 // details.
1762 ForceSendFields []string `json:"-"`
1763 // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include
1764 // in API requests with the JSON null value. By default, fields with empty
1765 // values are omitted from API requests. See
1766 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1767 NullFields []string `json:"-"`
1768 }
1769
1770 func (s LocationMetadata) MarshalJSON() ([]byte, error) {
1771 type NoMethod LocationMetadata
1772 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1773 }
1774
1775 // MaintenanceWindow: Maintenance window. This specifies when Dataproc
1776 // Metastore may perform system maintenance operation to the service.
1777 type MaintenanceWindow struct {
1778 // DayOfWeek: Optional. The day of week, when the window starts.
1779 //
1780 // Possible values:
1781 // "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
1782 // "MONDAY" - Monday
1783 // "TUESDAY" - Tuesday
1784 // "WEDNESDAY" - Wednesday
1785 // "THURSDAY" - Thursday
1786 // "FRIDAY" - Friday
1787 // "SATURDAY" - Saturday
1788 // "SUNDAY" - Sunday
1789 DayOfWeek string `json:"dayOfWeek,omitempty"`
1790 // HourOfDay: Optional. The hour of day (0-23) when the window starts.
1791 HourOfDay int64 `json:"hourOfDay,omitempty"`
1792 // ForceSendFields is a list of field names (e.g. "DayOfWeek") to
1793 // unconditionally include in API requests. By default, fields with empty or
1794 // default values are omitted from API requests. See
1795 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1796 // details.
1797 ForceSendFields []string `json:"-"`
1798 // NullFields is a list of field names (e.g. "DayOfWeek") to include in API
1799 // requests with the JSON null value. By default, fields with empty values are
1800 // omitted from API requests. See
1801 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1802 NullFields []string `json:"-"`
1803 }
1804
1805 func (s MaintenanceWindow) MarshalJSON() ([]byte, error) {
1806 type NoMethod MaintenanceWindow
1807 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1808 }
1809
1810 // MessageSet: This is proto2's version of MessageSet.DEPRECATED: DO NOT USE
1811 // FOR NEW FIELDS.If you are using editions or proto2, please make your own
1812 // extendable messages for your use case. If you are using proto3, please use
1813 // Any instead.MessageSet was the implementation of extensions for proto1. When
1814 // proto2 was introduced, extensions were implemented as a first-class feature.
1815 // This schema for MessageSet was meant to be a "bridge" solution to migrate
1816 // MessageSet-bearing messages from proto1 to proto2.This schema has been
1817 // open-sourced only to facilitate the migration of Google products with
1818 // MessageSet-bearing messages to open-source environments.
1819 type MessageSet struct {
1820 }
1821
1822 // MetadataExport: The details of a metadata export operation.
1823 type MetadataExport struct {
1824 // DatabaseDumpType: Output only. The type of the database dump.
1825 //
1826 // Possible values:
1827 // "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
1828 // "MYSQL" - Database dump is a MySQL dump file.
1829 // "AVRO" - Database dump contains Avro files.
1830 DatabaseDumpType string `json:"databaseDumpType,omitempty"`
1831 // DestinationGcsUri: Output only. A Cloud Storage URI of a folder that
1832 // metadata are exported to, in the form of gs:////, where is automatically
1833 // generated.
1834 DestinationGcsUri string `json:"destinationGcsUri,omitempty"`
1835 // EndTime: Output only. The time when the export ended.
1836 EndTime string `json:"endTime,omitempty"`
1837 // StartTime: Output only. The time when the export started.
1838 StartTime string `json:"startTime,omitempty"`
1839 // State: Output only. The current state of the export.
1840 //
1841 // Possible values:
1842 // "STATE_UNSPECIFIED" - The state of the metadata export is unknown.
1843 // "RUNNING" - The metadata export is running.
1844 // "SUCCEEDED" - The metadata export completed successfully.
1845 // "FAILED" - The metadata export failed.
1846 // "CANCELLED" - The metadata export is cancelled.
1847 State string `json:"state,omitempty"`
1848 // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to
1849 // unconditionally include in API requests. By default, fields with empty or
1850 // default values are omitted from API requests. See
1851 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1852 // details.
1853 ForceSendFields []string `json:"-"`
1854 // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in
1855 // API requests with the JSON null value. By default, fields with empty values
1856 // are omitted from API requests. See
1857 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1858 NullFields []string `json:"-"`
1859 }
1860
1861 func (s MetadataExport) MarshalJSON() ([]byte, error) {
1862 type NoMethod MetadataExport
1863 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1864 }
1865
1866 // MetadataImport: A metastore resource that imports metadata.
1867 type MetadataImport struct {
1868 // CreateTime: Output only. The time when the metadata import was started.
1869 CreateTime string `json:"createTime,omitempty"`
1870 // DatabaseDump: Immutable. A database dump from a pre-existing metastore's
1871 // database.
1872 DatabaseDump *DatabaseDump `json:"databaseDump,omitempty"`
1873 // Description: Optional. The description of the metadata import.
1874 Description string `json:"description,omitempty"`
1875 // EndTime: Output only. The time when the metadata import finished.
1876 EndTime string `json:"endTime,omitempty"`
1877 // Name: Immutable. Identifier. The relative resource name of the metadata
1878 // import, of the
1879 // form:projects/{project_number}/locations/{location_id}/services/{service_id}/
1880 // metadataImports/{metadata_import_id}.
1881 Name string `json:"name,omitempty"`
1882 // State: Output only. The current state of the metadata import.
1883 //
1884 // Possible values:
1885 // "STATE_UNSPECIFIED" - The state of the metadata import is unknown.
1886 // "RUNNING" - The metadata import is running.
1887 // "SUCCEEDED" - The metadata import completed successfully.
1888 // "UPDATING" - The metadata import is being updated.
1889 // "FAILED" - The metadata import failed, and attempted metadata changes were
1890 // rolled back.
1891 State string `json:"state,omitempty"`
1892 // UpdateTime: Output only. The time when the metadata import was last updated.
1893 UpdateTime string `json:"updateTime,omitempty"`
1894
1895 // ServerResponse contains the HTTP response code and headers from the server.
1896 googleapi.ServerResponse `json:"-"`
1897 // ForceSendFields is a list of field names (e.g. "CreateTime") to
1898 // unconditionally include in API requests. By default, fields with empty or
1899 // default values are omitted from API requests. See
1900 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1901 // details.
1902 ForceSendFields []string `json:"-"`
1903 // NullFields is a list of field names (e.g. "CreateTime") to include in API
1904 // requests with the JSON null value. By default, fields with empty values are
1905 // omitted from API requests. See
1906 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1907 NullFields []string `json:"-"`
1908 }
1909
1910 func (s MetadataImport) MarshalJSON() ([]byte, error) {
1911 type NoMethod MetadataImport
1912 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1913 }
1914
1915 // MetadataIntegration: Specifies how metastore metadata should be integrated
1916 // with external services.
1917 type MetadataIntegration struct {
1918 // DataCatalogConfig: Optional. The integration config for the Data Catalog
1919 // service.
1920 DataCatalogConfig *DataCatalogConfig `json:"dataCatalogConfig,omitempty"`
1921 // DataplexConfig: Optional. The integration config for the Dataplex service.
1922 DataplexConfig *DataplexConfig `json:"dataplexConfig,omitempty"`
1923 // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to
1924 // unconditionally include in API requests. By default, fields with empty or
1925 // default values are omitted from API requests. See
1926 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1927 // details.
1928 ForceSendFields []string `json:"-"`
1929 // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in
1930 // API requests with the JSON null value. By default, fields with empty values
1931 // are omitted from API requests. See
1932 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1933 NullFields []string `json:"-"`
1934 }
1935
1936 func (s MetadataIntegration) MarshalJSON() ([]byte, error) {
1937 type NoMethod MetadataIntegration
1938 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1939 }
1940
1941 // MetadataManagementActivity: The metadata management activities of the
1942 // metastore service.
1943 type MetadataManagementActivity struct {
1944 // MetadataExports: Output only. The latest metadata exports of the metastore
1945 // service.
1946 MetadataExports []*MetadataExport `json:"metadataExports,omitempty"`
1947 // Restores: Output only. The latest restores of the metastore service.
1948 Restores []*Restore `json:"restores,omitempty"`
1949 // ForceSendFields is a list of field names (e.g. "MetadataExports") to
1950 // unconditionally include in API requests. By default, fields with empty or
1951 // default values are omitted from API requests. See
1952 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
1953 // details.
1954 ForceSendFields []string `json:"-"`
1955 // NullFields is a list of field names (e.g. "MetadataExports") to include in
1956 // API requests with the JSON null value. By default, fields with empty values
1957 // are omitted from API requests. See
1958 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
1959 NullFields []string `json:"-"`
1960 }
1961
1962 func (s MetadataManagementActivity) MarshalJSON() ([]byte, error) {
1963 type NoMethod MetadataManagementActivity
1964 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
1965 }
1966
1967 // MigrationExecution: The details of a migration execution resource.
1968 type MigrationExecution struct {
1969 // CloudSqlMigrationConfig: Deprecated: Migrations to Dataproc Metastore are no
1970 // longer supported. Use BigLake Metastore migration instead. Configuration
1971 // information specific to migrating from self-managed hive metastore on Google
1972 // Cloud using Cloud SQL as the backend database to Dataproc Metastore.
1973 CloudSqlMigrationConfig *CloudSQLMigrationConfig `json:"cloudSqlMigrationConfig,omitempty"`
1974 // CreateTime: Output only. The time when the migration execution was started.
1975 CreateTime string `json:"createTime,omitempty"`
1976 // EndTime: Output only. The time when the migration execution finished.
1977 EndTime string `json:"endTime,omitempty"`
1978 // Name: Output only. The relative resource name of the migration execution, in
1979 // the following form:
1980 // projects/{project_number}/locations/{location_id}/services/{service_id}/migra
1981 // tionExecutions/{migration_execution_id}
1982 Name string `json:"name,omitempty"`
1983 // Phase: Output only. Deprecated: Phase was designed for incoming migrations
1984 // to Dataproc Metastore, not applicable when migrating away from it. The
1985 // current phase of the migration execution.
1986 //
1987 // Possible values:
1988 // "PHASE_UNSPECIFIED" - The phase of the migration execution is unknown.
1989 // "REPLICATION" - Replication phase refers to the migration phase when
1990 // Dataproc Metastore is running a pipeline to replicate changes in the
1991 // customer database to its backend database. During this phase, Dataproc
1992 // Metastore uses the customer database as the hive metastore backend database.
1993 // "CUTOVER" - Cutover phase refers to the migration phase when Dataproc
1994 // Metastore switches to using its own backend database. Migration enters this
1995 // phase when customer is done migrating all their clusters/workloads to
1996 // Dataproc Metastore and triggers CompleteMigration.
1997 Phase string `json:"phase,omitempty"`
1998 // State: Output only. The current state of the migration execution.
1999 //
2000 // Possible values:
2001 // "STATE_UNSPECIFIED" - The state of the migration execution is unknown.
2002 // "STARTING" - The migration execution is starting.
2003 // "RUNNING" - The migration execution is running.
2004 // "CANCELLING" - The migration execution is in the process of being
2005 // cancelled.
2006 // "AWAITING_USER_ACTION" - The migration execution is awaiting user action.
2007 // "SUCCEEDED" - The migration execution has completed successfully.
2008 // "FAILED" - The migration execution has failed.
2009 // "CANCELLED" - The migration execution is cancelled.
2010 // "DELETING" - The migration execution is being deleted.
2011 State string `json:"state,omitempty"`
2012 // StateMessage: Output only. Additional information about the current state of
2013 // the migration execution.
2014 StateMessage string `json:"stateMessage,omitempty"`
2015
2016 // ServerResponse contains the HTTP response code and headers from the server.
2017 googleapi.ServerResponse `json:"-"`
2018 // ForceSendFields is a list of field names (e.g. "CloudSqlMigrationConfig") to
2019 // unconditionally include in API requests. By default, fields with empty or
2020 // default values are omitted from API requests. See
2021 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2022 // details.
2023 ForceSendFields []string `json:"-"`
2024 // NullFields is a list of field names (e.g. "CloudSqlMigrationConfig") to
2025 // include in API requests with the JSON null value. By default, fields with
2026 // empty values are omitted from API requests. See
2027 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2028 NullFields []string `json:"-"`
2029 }
2030
2031 func (s MigrationExecution) MarshalJSON() ([]byte, error) {
2032 type NoMethod MigrationExecution
2033 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2034 }
2035
2036 // MoveTableToDatabaseRequest: Request message for
2037 // DataprocMetastore.MoveTableToDatabase.
2038 type MoveTableToDatabaseRequest struct {
2039 // DbName: Required. The name of the database where the table resides.
2040 DbName string `json:"dbName,omitempty"`
2041 // DestinationDbName: Required. The name of the database where the table should
2042 // be moved.
2043 DestinationDbName string `json:"destinationDbName,omitempty"`
2044 // TableName: Required. The name of the table to be moved.
2045 TableName string `json:"tableName,omitempty"`
2046 // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally
2047 // include in API requests. By default, fields with empty or default values are
2048 // omitted from API requests. See
2049 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2050 // details.
2051 ForceSendFields []string `json:"-"`
2052 // NullFields is a list of field names (e.g. "DbName") to include in API
2053 // requests with the JSON null value. By default, fields with empty values are
2054 // omitted from API requests. See
2055 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2056 NullFields []string `json:"-"`
2057 }
2058
2059 func (s MoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) {
2060 type NoMethod MoveTableToDatabaseRequest
2061 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2062 }
2063
2064 // MoveTableToDatabaseResponse: Response message for
2065 // DataprocMetastore.MoveTableToDatabase.
2066 type MoveTableToDatabaseResponse struct {
2067 }
2068
2069 // MultiRegionConfig: Deprecated: Use a single region service instead. The
2070 // multi-region config for the Dataproc Metastore service.
2071 type MultiRegionConfig struct {
2072 // Certificates: Output only. Deprecated: Use a single region service instead.
2073 // The list of root CA certificates that a gRPC client uses to connect to a
2074 // multi-regional Dataproc Metastore service.
2075 Certificates []*RootCACertificate `json:"certificates,omitempty"`
2076 // CustomRegionConfig: Immutable. Deprecated: Use a single region service
2077 // instead.
2078 CustomRegionConfig *CustomRegionConfig `json:"customRegionConfig,omitempty"`
2079 // ForceSendFields is a list of field names (e.g. "Certificates") to
2080 // unconditionally include in API requests. By default, fields with empty or
2081 // default values are omitted from API requests. See
2082 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2083 // details.
2084 ForceSendFields []string `json:"-"`
2085 // NullFields is a list of field names (e.g. "Certificates") to include in API
2086 // requests with the JSON null value. By default, fields with empty values are
2087 // omitted from API requests. See
2088 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2089 NullFields []string `json:"-"`
2090 }
2091
2092 func (s MultiRegionConfig) MarshalJSON() ([]byte, error) {
2093 type NoMethod MultiRegionConfig
2094 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2095 }
2096
2097 // MultiRegionMetadata: Deprecated: Use a single region service instead. The
2098 // metadata for the multi-region that includes the constituent regions. The
2099 // metadata is only populated if the region is multi-region. For single region
2100 // or custom dual region, it will be empty.
2101 type MultiRegionMetadata struct {
2102 // ConstituentRegions: The regions constituting the multi-region.
2103 ConstituentRegions []string `json:"constituentRegions,omitempty"`
2104 // Continent: The continent for this multi-region.
2105 Continent string `json:"continent,omitempty"`
2106 // WitnessRegion: The Spanner witness region for this multi-region.
2107 WitnessRegion string `json:"witnessRegion,omitempty"`
2108 // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to
2109 // unconditionally include in API requests. By default, fields with empty or
2110 // default values are omitted from API requests. See
2111 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2112 // details.
2113 ForceSendFields []string `json:"-"`
2114 // NullFields is a list of field names (e.g. "ConstituentRegions") to include
2115 // in API requests with the JSON null value. By default, fields with empty
2116 // values are omitted from API requests. See
2117 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2118 NullFields []string `json:"-"`
2119 }
2120
2121 func (s MultiRegionMetadata) MarshalJSON() ([]byte, error) {
2122 type NoMethod MultiRegionMetadata
2123 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2124 }
2125
2126 // NetworkConfig: Network configuration for the Dataproc Metastore service.
2127 type NetworkConfig struct {
2128 // Consumers: Immutable. The consumer-side network configuration for the
2129 // Dataproc Metastore instance.
2130 Consumers []*Consumer `json:"consumers,omitempty"`
2131 // CustomRoutesEnabled: Optional. Enables custom routes to be imported and
2132 // exported for the Dataproc Metastore service's peered VPC network.
2133 CustomRoutesEnabled bool `json:"customRoutesEnabled,omitempty"`
2134 // ForceSendFields is a list of field names (e.g. "Consumers") to
2135 // unconditionally include in API requests. By default, fields with empty or
2136 // default values are omitted from API requests. See
2137 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2138 // details.
2139 ForceSendFields []string `json:"-"`
2140 // NullFields is a list of field names (e.g. "Consumers") to include in API
2141 // requests with the JSON null value. By default, fields with empty values are
2142 // omitted from API requests. See
2143 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2144 NullFields []string `json:"-"`
2145 }
2146
2147 func (s NetworkConfig) MarshalJSON() ([]byte, error) {
2148 type NoMethod NetworkConfig
2149 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2150 }
2151
2152 // Operation: This resource represents a long-running operation that is the
2153 // result of a network API call.
2154 type Operation struct {
2155 // Done: If the value is false, it means the operation is still in progress. If
2156 // true, the operation is completed, and either error or response is available.
2157 Done bool `json:"done,omitempty"`
2158 // Error: The error result of the operation in case of failure or cancellation.
2159 Error *Status `json:"error,omitempty"`
2160 // Metadata: Service-specific metadata associated with the operation. It
2161 // typically contains progress information and common metadata such as create
2162 // time. Some services might not provide such metadata. Any method that returns
2163 // a long-running operation should document the metadata type, if any.
2164 Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2165 // Name: The server-assigned name, which is only unique within the same service
2166 // that originally returns it. If you use the default HTTP mapping, the name
2167 // should be a resource name ending with operations/{unique_id}.
2168 Name string `json:"name,omitempty"`
2169 // Response: The normal, successful response of the operation. If the original
2170 // method returns no data on success, such as Delete, the response is
2171 // google.protobuf.Empty. If the original method is standard Get/Create/Update,
2172 // the response should be the resource. For other methods, the response should
2173 // have the type XxxResponse, where Xxx is the original method name. For
2174 // example, if the original method name is TakeSnapshot(), the inferred
2175 // response type is TakeSnapshotResponse.
2176 Response googleapi.RawMessage `json:"response,omitempty"`
2177
2178 // ServerResponse contains the HTTP response code and headers from the server.
2179 googleapi.ServerResponse `json:"-"`
2180 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally
2181 // include in API requests. By default, fields with empty or default values are
2182 // omitted from API requests. See
2183 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2184 // details.
2185 ForceSendFields []string `json:"-"`
2186 // NullFields is a list of field names (e.g. "Done") to include in API requests
2187 // with the JSON null value. By default, fields with empty values are omitted
2188 // from API requests. See
2189 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2190 NullFields []string `json:"-"`
2191 }
2192
2193 func (s Operation) MarshalJSON() ([]byte, error) {
2194 type NoMethod Operation
2195 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2196 }
2197
2198 // OperationMetadata: Represents the metadata of a long-running operation.
2199 type OperationMetadata struct {
2200 // ApiVersion: Output only. API version used to start the operation.
2201 ApiVersion string `json:"apiVersion,omitempty"`
2202 // CreateTime: Output only. The time the operation was created.
2203 CreateTime string `json:"createTime,omitempty"`
2204 // EndTime: Output only. The time the operation finished running.
2205 EndTime string `json:"endTime,omitempty"`
2206 // RequestedCancellation: Output only. Identifies whether the caller has
2207 // requested cancellation of the operation. Operations that have successfully
2208 // been cancelled have google.longrunning.Operation.error value with a
2209 // google.rpc.Status.code of 1, corresponding to Code.CANCELLED.
2210 RequestedCancellation bool `json:"requestedCancellation,omitempty"`
2211 // StatusMessage: Output only. Human-readable status of the operation, if any.
2212 StatusMessage string `json:"statusMessage,omitempty"`
2213 // Target: Output only. Server-defined resource path for the target of the
2214 // operation.
2215 Target string `json:"target,omitempty"`
2216 // Verb: Output only. Name of the verb executed by the operation.
2217 Verb string `json:"verb,omitempty"`
2218 // ForceSendFields is a list of field names (e.g. "ApiVersion") to
2219 // unconditionally include in API requests. By default, fields with empty or
2220 // default values are omitted from API requests. See
2221 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2222 // details.
2223 ForceSendFields []string `json:"-"`
2224 // NullFields is a list of field names (e.g. "ApiVersion") to include in API
2225 // requests with the JSON null value. By default, fields with empty values are
2226 // omitted from API requests. See
2227 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2228 NullFields []string `json:"-"`
2229 }
2230
2231 func (s OperationMetadata) MarshalJSON() ([]byte, error) {
2232 type NoMethod OperationMetadata
2233 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2234 }
2235
2236 // Policy: An Identity and Access Management (IAM) policy, which specifies
2237 // access controls for Google Cloud resources.A Policy is a collection of
2238 // bindings. A binding binds one or more members, or principals, to a single
2239 // role. Principals can be user accounts, service accounts, Google groups, and
2240 // domains (such as G Suite). A role is a named list of permissions; each role
2241 // can be an IAM predefined role or a user-created custom role.For some types
2242 // of Google Cloud resources, a binding can also specify a condition, which is
2243 // a logical expression that allows access to a resource only if the expression
2244 // evaluates to true. A condition can add constraints based on attributes of
2245 // the request, the resource, or both. To learn which resources support
2246 // conditions in their IAM policies, see the IAM documentation
2247 // (https://cloud.google.com/iam/help/conditions/resource-policies).JSON
2248 // example: { "bindings": [ { "role":
2249 // "roles/resourcemanager.organizationAdmin", "members": [
2250 // "user:[email protected]", "group:[email protected]", "domain:google.com",
2251 // "serviceAccount:[email protected]" ] }, { "role":
2252 // "roles/resourcemanager.organizationViewer", "members": [
2253 // "user:[email protected]" ], "condition": { "title": "expirable access",
2254 // "description": "Does not grant access after Sep 2020", "expression":
2255 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
2256 // "BwWWja0YfJA=", "version": 3 } YAML example: bindings: - members: -
2257 // user:[email protected] - group:[email protected] - domain:google.com -
2258 // serviceAccount:[email protected] role:
2259 // roles/resourcemanager.organizationAdmin - members: - user:[email protected]
2260 // role: roles/resourcemanager.organizationViewer condition: title: expirable
2261 // access description: Does not grant access after Sep 2020 expression:
2262 // request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA=
2263 // version: 3 For a description of IAM and its features, see the IAM
2264 // documentation (https://cloud.google.com/iam/docs/).
2265 type Policy struct {
2266 // AuditConfigs: Specifies cloud audit logging configuration for this policy.
2267 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
2268 // Bindings: Associates a list of members, or principals, with a role.
2269 // Optionally, may specify a condition that determines how and when the
2270 // bindings are applied. Each of the bindings must contain at least one
2271 // principal.The bindings in a Policy can refer to up to 1,500 principals; up
2272 // to 250 of these principals can be Google groups. Each occurrence of a
2273 // principal counts towards these limits. For example, if the bindings grant 50
2274 // different roles to user:[email protected], and not to any other principal,
2275 // then you can add another 1,450 principals to the bindings in the Policy.
2276 Bindings []*Binding `json:"bindings,omitempty"`
2277 // Etag: etag is used for optimistic concurrency control as a way to help
2278 // prevent simultaneous updates of a policy from overwriting each other. It is
2279 // strongly suggested that systems make use of the etag in the
2280 // read-modify-write cycle to perform policy updates in order to avoid race
2281 // conditions: An etag is returned in the response to getIamPolicy, and systems
2282 // are expected to put that etag in the request to setIamPolicy to ensure that
2283 // their change will be applied to the same version of the policy.Important: If
2284 // you use IAM Conditions, you must include the etag field whenever you call
2285 // setIamPolicy. If you omit this field, then IAM allows you to overwrite a
2286 // version 3 policy with a version 1 policy, and all of the conditions in the
2287 // version 3 policy are lost.
2288 Etag string `json:"etag,omitempty"`
2289 // Version: Specifies the format of the policy.Valid values are 0, 1, and 3.
2290 // Requests that specify an invalid value are rejected.Any operation that
2291 // affects conditional role bindings must specify version 3. This requirement
2292 // applies to the following operations: Getting a policy that includes a
2293 // conditional role binding Adding a conditional role binding to a policy
2294 // Changing a conditional role binding in a policy Removing any role binding,
2295 // with or without a condition, from a policy that includes
2296 // conditionsImportant: If you use IAM Conditions, you must include the etag
2297 // field whenever you call setIamPolicy. If you omit this field, then IAM
2298 // allows you to overwrite a version 3 policy with a version 1 policy, and all
2299 // of the conditions in the version 3 policy are lost.If a policy does not
2300 // include any conditions, operations on that policy may specify any valid
2301 // version or leave the field unset.To learn which resources support conditions
2302 // in their IAM policies, see the IAM documentation
2303 // (https://cloud.google.com/iam/help/conditions/resource-policies).
2304 Version int64 `json:"version,omitempty"`
2305
2306 // ServerResponse contains the HTTP response code and headers from the server.
2307 googleapi.ServerResponse `json:"-"`
2308 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to
2309 // unconditionally include in API requests. By default, fields with empty or
2310 // default values are omitted from API requests. See
2311 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2312 // details.
2313 ForceSendFields []string `json:"-"`
2314 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API
2315 // requests with the JSON null value. By default, fields with empty values are
2316 // omitted from API requests. See
2317 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2318 NullFields []string `json:"-"`
2319 }
2320
2321 func (s Policy) MarshalJSON() ([]byte, error) {
2322 type NoMethod Policy
2323 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2324 }
2325
2326 // QueryMetadataRequest: Request message for DataprocMetastore.QueryMetadata.
2327 type QueryMetadataRequest struct {
2328 // Query: Required. A read-only SQL query to execute against the metadata
2329 // database. The query cannot change or mutate the data.
2330 Query string `json:"query,omitempty"`
2331 // ForceSendFields is a list of field names (e.g. "Query") to unconditionally
2332 // include in API requests. By default, fields with empty or default values are
2333 // omitted from API requests. See
2334 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2335 // details.
2336 ForceSendFields []string `json:"-"`
2337 // NullFields is a list of field names (e.g. "Query") to include in API
2338 // requests with the JSON null value. By default, fields with empty values are
2339 // omitted from API requests. See
2340 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2341 NullFields []string `json:"-"`
2342 }
2343
2344 func (s QueryMetadataRequest) MarshalJSON() ([]byte, error) {
2345 type NoMethod QueryMetadataRequest
2346 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2347 }
2348
2349 // QueryMetadataResponse: Response message for DataprocMetastore.QueryMetadata.
2350 type QueryMetadataResponse struct {
2351 // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud
2352 // Storage. This instance manifests immediately along with
2353 // QueryMetadataResponse. The content of the URI is not retriable until the
2354 // long-running operation query against the metadata finishes.
2355 ResultManifestUri string `json:"resultManifestUri,omitempty"`
2356 // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to
2357 // unconditionally include in API requests. By default, fields with empty or
2358 // default values are omitted from API requests. See
2359 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2360 // details.
2361 ForceSendFields []string `json:"-"`
2362 // NullFields is a list of field names (e.g. "ResultManifestUri") to include in
2363 // API requests with the JSON null value. By default, fields with empty values
2364 // are omitted from API requests. See
2365 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2366 NullFields []string `json:"-"`
2367 }
2368
2369 func (s QueryMetadataResponse) MarshalJSON() ([]byte, error) {
2370 type NoMethod QueryMetadataResponse
2371 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2372 }
2373
2374 // RemoveIamPolicyRequest: Request message for
2375 // DataprocMetastore.RemoveIamPolicy.
2376 type RemoveIamPolicyRequest struct {
2377 // Asynchronous: Optional. Removes IAM policy attached to database or table
2378 // asynchronously when it is set. The default is false.
2379 Asynchronous bool `json:"asynchronous,omitempty"`
2380 // ForceSendFields is a list of field names (e.g. "Asynchronous") to
2381 // unconditionally include in API requests. By default, fields with empty or
2382 // default values are omitted from API requests. See
2383 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2384 // details.
2385 ForceSendFields []string `json:"-"`
2386 // NullFields is a list of field names (e.g. "Asynchronous") to include in API
2387 // requests with the JSON null value. By default, fields with empty values are
2388 // omitted from API requests. See
2389 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2390 NullFields []string `json:"-"`
2391 }
2392
2393 func (s RemoveIamPolicyRequest) MarshalJSON() ([]byte, error) {
2394 type NoMethod RemoveIamPolicyRequest
2395 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2396 }
2397
2398 // RemoveIamPolicyResponse: Response message for
2399 // DataprocMetastore.RemoveIamPolicy.
2400 type RemoveIamPolicyResponse struct {
2401 // Success: True if the policy is successfully removed.
2402 Success bool `json:"success,omitempty"`
2403
2404 // ServerResponse contains the HTTP response code and headers from the server.
2405 googleapi.ServerResponse `json:"-"`
2406 // ForceSendFields is a list of field names (e.g. "Success") to unconditionally
2407 // include in API requests. By default, fields with empty or default values are
2408 // omitted from API requests. See
2409 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2410 // details.
2411 ForceSendFields []string `json:"-"`
2412 // NullFields is a list of field names (e.g. "Success") to include in API
2413 // requests with the JSON null value. By default, fields with empty values are
2414 // omitted from API requests. See
2415 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2416 NullFields []string `json:"-"`
2417 }
2418
2419 func (s RemoveIamPolicyResponse) MarshalJSON() ([]byte, error) {
2420 type NoMethod RemoveIamPolicyResponse
2421 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2422 }
2423
2424 // Restore: The details of a metadata restore operation.
2425 type Restore struct {
2426 // Backup: Output only. The relative resource name of the metastore service
2427 // backup to restore from, in the following
2428 // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back
2429 // ups/{backup_id}.
2430 Backup string `json:"backup,omitempty"`
2431 // BackupLocation: Optional. A Cloud Storage URI specifying where the backup
2432 // artifacts are stored, in the format gs:///.
2433 BackupLocation string `json:"backupLocation,omitempty"`
2434 // Details: Output only. The restore details containing the revision of the
2435 // service to be restored to, in format of JSON.
2436 Details string `json:"details,omitempty"`
2437 // EndTime: Output only. The time when the restore ended.
2438 EndTime string `json:"endTime,omitempty"`
2439 // StartTime: Output only. The time when the restore started.
2440 StartTime string `json:"startTime,omitempty"`
2441 // State: Output only. The current state of the restore.
2442 //
2443 // Possible values:
2444 // "STATE_UNSPECIFIED" - The state of the metadata restore is unknown.
2445 // "RUNNING" - The metadata restore is running.
2446 // "SUCCEEDED" - The metadata restore completed successfully.
2447 // "FAILED" - The metadata restore failed.
2448 // "CANCELLED" - The metadata restore is cancelled.
2449 State string `json:"state,omitempty"`
2450 // Type: Output only. The type of restore.
2451 //
2452 // Possible values:
2453 // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown.
2454 // "FULL" - The service's metadata and configuration are restored.
2455 // "METADATA_ONLY" - Only the service's metadata is restored.
2456 Type string `json:"type,omitempty"`
2457 // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
2458 // include in API requests. By default, fields with empty or default values are
2459 // omitted from API requests. See
2460 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2461 // details.
2462 ForceSendFields []string `json:"-"`
2463 // NullFields is a list of field names (e.g. "Backup") to include in API
2464 // requests with the JSON null value. By default, fields with empty values are
2465 // omitted from API requests. See
2466 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2467 NullFields []string `json:"-"`
2468 }
2469
2470 func (s Restore) MarshalJSON() ([]byte, error) {
2471 type NoMethod Restore
2472 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2473 }
2474
2475 // RestoreServiceRequest: Request message for DataprocMetastore.RestoreService.
2476 type RestoreServiceRequest struct {
2477 // Backup: Optional. The relative resource name of the metastore service backup
2478 // to restore from, in the following
2479 // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back
2480 // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of
2481 // the two must be set.
2482 Backup string `json:"backup,omitempty"`
2483 // BackupLocation: Optional. A Cloud Storage URI specifying the location of the
2484 // backup artifacts, namely - backup avro files under "avro/",
2485 // backup_metastore.json and service.json, in the following form:gs://.
2486 // Mutually exclusive with backup, and exactly one of the two must be set.
2487 BackupLocation string `json:"backupLocation,omitempty"`
2488 // RequestId: Optional. A request ID. Specify a unique request ID to allow the
2489 // server to ignore the request if it has completed. The server will ignore
2490 // subsequent requests that provide a duplicate request ID for at least 60
2491 // minutes after the first request.For example, if an initial request times
2492 // out, followed by another request with the same request ID, the server
2493 // ignores the second request to prevent the creation of duplicate
2494 // commitments.The request ID must be a valid UUID
2495 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero
2496 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
2497 RequestId string `json:"requestId,omitempty"`
2498 // RestoreType: Optional. The type of restore. If unspecified, defaults to
2499 // METADATA_ONLY.
2500 //
2501 // Possible values:
2502 // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown.
2503 // "FULL" - The service's metadata and configuration are restored.
2504 // "METADATA_ONLY" - Only the service's metadata is restored.
2505 RestoreType string `json:"restoreType,omitempty"`
2506 // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
2507 // include in API requests. By default, fields with empty or default values are
2508 // omitted from API requests. See
2509 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2510 // details.
2511 ForceSendFields []string `json:"-"`
2512 // NullFields is a list of field names (e.g. "Backup") to include in API
2513 // requests with the JSON null value. By default, fields with empty values are
2514 // omitted from API requests. See
2515 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2516 NullFields []string `json:"-"`
2517 }
2518
2519 func (s RestoreServiceRequest) MarshalJSON() ([]byte, error) {
2520 type NoMethod RestoreServiceRequest
2521 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2522 }
2523
2524 // RootCACertificate: Deprecated: Use a single region service instead. A gRPC
2525 // client must install all root CA certificates to connect to a multi-regional
2526 // Dataproc Metastore service and achieve failover.
2527 type RootCACertificate struct {
2528 // Certificate: Deprecated: Use a single region service instead. The root CA
2529 // certificate in PEM format. The maximum length is 65536 bytes.
2530 Certificate string `json:"certificate,omitempty"`
2531 // ExpirationTime: Deprecated: Use a single region service instead. The
2532 // certificate expiration time in timestamp format.
2533 ExpirationTime string `json:"expirationTime,omitempty"`
2534 // ForceSendFields is a list of field names (e.g. "Certificate") to
2535 // unconditionally include in API requests. By default, fields with empty or
2536 // default values are omitted from API requests. See
2537 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2538 // details.
2539 ForceSendFields []string `json:"-"`
2540 // NullFields is a list of field names (e.g. "Certificate") to include in API
2541 // requests with the JSON null value. By default, fields with empty values are
2542 // omitted from API requests. See
2543 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2544 NullFields []string `json:"-"`
2545 }
2546
2547 func (s RootCACertificate) MarshalJSON() ([]byte, error) {
2548 type NoMethod RootCACertificate
2549 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2550 }
2551
2552 // ScalingConfig: Represents the scaling configuration of a metastore service.
2553 type ScalingConfig struct {
2554 // AutoscalingConfig: Optional. The autoscaling configuration.
2555 AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`
2556 // InstanceSize: An enum of readable instance sizes, with each instance size
2557 // mapping to a float value (e.g. InstanceSize.EXTRA_SMALL =
2558 // scaling_factor(0.1))
2559 //
2560 // Possible values:
2561 // "INSTANCE_SIZE_UNSPECIFIED" - Unspecified instance size
2562 // "EXTRA_SMALL" - Extra small instance size, maps to a scaling factor of
2563 // 0.1.
2564 // "SMALL" - Small instance size, maps to a scaling factor of 0.5.
2565 // "MEDIUM" - Medium instance size, maps to a scaling factor of 1.0.
2566 // "LARGE" - Large instance size, maps to a scaling factor of 3.0.
2567 // "EXTRA_LARGE" - Extra large instance size, maps to a scaling factor of
2568 // 6.0.
2569 InstanceSize string `json:"instanceSize,omitempty"`
2570 // ScalingFactor: Scaling factor, increments of 0.1 for values less than 1.0,
2571 // and increments of 1.0 for values greater than 1.0.
2572 ScalingFactor float64 `json:"scalingFactor,omitempty"`
2573 // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to
2574 // unconditionally include in API requests. By default, fields with empty or
2575 // default values are omitted from API requests. See
2576 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2577 // details.
2578 ForceSendFields []string `json:"-"`
2579 // NullFields is a list of field names (e.g. "AutoscalingConfig") to include in
2580 // API requests with the JSON null value. By default, fields with empty values
2581 // are omitted from API requests. See
2582 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2583 NullFields []string `json:"-"`
2584 }
2585
2586 func (s ScalingConfig) MarshalJSON() ([]byte, error) {
2587 type NoMethod ScalingConfig
2588 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2589 }
2590
2591 func (s *ScalingConfig) UnmarshalJSON(data []byte) error {
2592 type NoMethod ScalingConfig
2593 var s1 struct {
2594 ScalingFactor gensupport.JSONFloat64 `json:"scalingFactor"`
2595 *NoMethod
2596 }
2597 s1.NoMethod = (*NoMethod)(s)
2598 if err := json.Unmarshal(data, &s1); err != nil {
2599 return err
2600 }
2601 s.ScalingFactor = float64(s1.ScalingFactor)
2602 return nil
2603 }
2604
2605 // ScheduledBackup: This specifies the configuration of scheduled backup.
2606 type ScheduledBackup struct {
2607 // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format
2608 // gs:///. A sub-folder containing backup files will be stored below it.
2609 BackupLocation string `json:"backupLocation,omitempty"`
2610 // CronSchedule: Optional. The scheduled interval in Cron format, see
2611 // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is
2612 // not enabled. Must be specified to enable scheduled backups.
2613 CronSchedule string `json:"cronSchedule,omitempty"`
2614 // Enabled: Optional. Defines whether the scheduled backup is enabled. The
2615 // default value is false.
2616 Enabled bool `json:"enabled,omitempty"`
2617 // LatestBackup: Output only. The details of the latest scheduled backup.
2618 LatestBackup *LatestBackup `json:"latestBackup,omitempty"`
2619 // NextScheduledTime: Output only. The time when the next backups execution is
2620 // scheduled to start.
2621 NextScheduledTime string `json:"nextScheduledTime,omitempty"`
2622 // TimeZone: Optional. Specifies the time zone to be used when interpreting
2623 // cron_schedule. Must be a time zone name from the time zone database
2624 // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g.
2625 // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is
2626 // UTC.
2627 TimeZone string `json:"timeZone,omitempty"`
2628 // ForceSendFields is a list of field names (e.g. "BackupLocation") to
2629 // unconditionally include in API requests. By default, fields with empty or
2630 // default values are omitted from API requests. See
2631 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2632 // details.
2633 ForceSendFields []string `json:"-"`
2634 // NullFields is a list of field names (e.g. "BackupLocation") to include in
2635 // API requests with the JSON null value. By default, fields with empty values
2636 // are omitted from API requests. See
2637 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2638 NullFields []string `json:"-"`
2639 }
2640
2641 func (s ScheduledBackup) MarshalJSON() ([]byte, error) {
2642 type NoMethod ScheduledBackup
2643 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2644 }
2645
2646 // Secret: A securely stored value.
2647 type Secret struct {
2648 // CloudSecret: Optional. The relative resource name of a Secret Manager secret
2649 // version, in the following
2650 // form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}.
2651 CloudSecret string `json:"cloudSecret,omitempty"`
2652 // ForceSendFields is a list of field names (e.g. "CloudSecret") to
2653 // unconditionally include in API requests. By default, fields with empty or
2654 // default values are omitted from API requests. See
2655 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2656 // details.
2657 ForceSendFields []string `json:"-"`
2658 // NullFields is a list of field names (e.g. "CloudSecret") to include in API
2659 // requests with the JSON null value. By default, fields with empty values are
2660 // omitted from API requests. See
2661 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2662 NullFields []string `json:"-"`
2663 }
2664
2665 func (s Secret) MarshalJSON() ([]byte, error) {
2666 type NoMethod Secret
2667 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2668 }
2669
2670 // Service: A managed metastore service that serves metadata queries.
2671 type Service struct {
2672 // ArtifactGcsUri: Output only. A Cloud Storage URI (starting with gs://) that
2673 // specifies where artifacts related to the metastore service are stored.
2674 ArtifactGcsUri string `json:"artifactGcsUri,omitempty"`
2675 // CreateTime: Output only. The time when the metastore service was created.
2676 CreateTime string `json:"createTime,omitempty"`
2677 // DatabaseType: Immutable. The database type that the Metastore service stores
2678 // its data.
2679 //
2680 // Possible values:
2681 // "DATABASE_TYPE_UNSPECIFIED" - The DATABASE_TYPE is not set.
2682 // "MYSQL" - MySQL is used to persist the metastore data.
2683 // "SPANNER" - Spanner is used to persist the metastore data.
2684 DatabaseType string `json:"databaseType,omitempty"`
2685 // DeletionProtection: Optional. Indicates if the dataproc metastore should be
2686 // protected against accidental deletions.
2687 DeletionProtection bool `json:"deletionProtection,omitempty"`
2688 // EncryptionConfig: Immutable. Information used to configure the Dataproc
2689 // Metastore service to encrypt customer data at rest. Cannot be updated.
2690 EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
2691 // EndpointUri: Output only. The URI of the endpoint used to access the
2692 // metastore service.
2693 EndpointUri string `json:"endpointUri,omitempty"`
2694 // HiveMetastoreConfig: Configuration information specific to running Hive
2695 // metastore software as the metastore service.
2696 HiveMetastoreConfig *HiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"`
2697 // Labels: User-defined labels for the metastore service.
2698 Labels map[string]string `json:"labels,omitempty"`
2699 // MaintenanceWindow: Optional. The one hour maintenance window of the
2700 // metastore service. This specifies when the service can be restarted for
2701 // maintenance purposes in UTC time. Maintenance window is not needed for
2702 // services with the SPANNER database type.
2703 MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
2704 // MetadataIntegration: Optional. The setting that defines how metastore
2705 // metadata should be integrated with external services and systems.
2706 MetadataIntegration *MetadataIntegration `json:"metadataIntegration,omitempty"`
2707 // MetadataManagementActivity: Output only. The metadata management activities
2708 // of the metastore service.
2709 MetadataManagementActivity *MetadataManagementActivity `json:"metadataManagementActivity,omitempty"`
2710 // MultiRegionConfig: Optional. Deprecated: Use a single region service
2711 // instead. Specifies the multi-region configuration information for the Hive
2712 // metastore service.
2713 MultiRegionConfig *MultiRegionConfig `json:"multiRegionConfig,omitempty"`
2714 // Name: Immutable. Identifier. The relative resource name of the metastore
2715 // service, in the following
2716 // format:projects/{project_number}/locations/{location_id}/services/{service_id
2717 // }.
2718 Name string `json:"name,omitempty"`
2719 // Network: Immutable. The relative resource name of the VPC network on which
2720 // the instance can be accessed. It is specified in the following
2721 // form:projects/{project_number}/global/networks/{network_id}.
2722 Network string `json:"network,omitempty"`
2723 // NetworkConfig: Optional. The configuration specifying the network settings
2724 // for the Dataproc Metastore service.
2725 NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
2726 // Port: Optional. The TCP port at which the metastore service is reached.
2727 // Default: 9083.
2728 Port int64 `json:"port,omitempty"`
2729 // ReleaseChannel: Immutable. The release channel of the service. If
2730 // unspecified, defaults to STABLE.
2731 //
2732 // Possible values:
2733 // "RELEASE_CHANNEL_UNSPECIFIED" - Release channel is not specified.
2734 // "CANARY" - The CANARY release channel contains the newest features, which
2735 // may be unstable and subject to unresolved issues with no known workarounds.
2736 // Services using the CANARY release channel are not subject to any SLAs.
2737 // "STABLE" - The STABLE release channel contains features that are
2738 // considered stable and have been validated for production use.
2739 ReleaseChannel string `json:"releaseChannel,omitempty"`
2740 // ScalingConfig: Optional. Scaling configuration of the metastore service.
2741 ScalingConfig *ScalingConfig `json:"scalingConfig,omitempty"`
2742 // ScheduledBackup: Optional. The configuration of scheduled backup for the
2743 // metastore service.
2744 ScheduledBackup *ScheduledBackup `json:"scheduledBackup,omitempty"`
2745 // State: Output only. The current state of the metastore service.
2746 //
2747 // Possible values:
2748 // "STATE_UNSPECIFIED" - The state of the metastore service is unknown.
2749 // "CREATING" - The metastore service is in the process of being created.
2750 // "ACTIVE" - The metastore service is running and ready to serve queries.
2751 // "SUSPENDING" - The metastore service is entering suspension. Its
2752 // query-serving availability may cease unexpectedly.
2753 // "SUSPENDED" - The metastore service is suspended and unable to serve
2754 // queries.
2755 // "UPDATING" - The metastore service is being updated. It remains usable but
2756 // cannot accept additional update requests or be deleted at this time.
2757 // "DELETING" - The metastore service is undergoing deletion. It cannot be
2758 // used.
2759 // "ERROR" - The metastore service has encountered an error and cannot be
2760 // used. The metastore service should be deleted.
2761 // "AUTOSCALING" - The Dataproc Metastore service 2 is being scaled up or
2762 // down.
2763 // "MIGRATING" - The metastore service is processing a managed migration.
2764 State string `json:"state,omitempty"`
2765 // StateMessage: Output only. Additional information about the current state of
2766 // the metastore service, if available.
2767 StateMessage string `json:"stateMessage,omitempty"`
2768 // Tags: Optional. Input only. Immutable. Tag keys/values directly bound to
2769 // this resource. For example: "123/environment": "production",
2770 // "123/costCenter": "marketing"
2771 Tags map[string]string `json:"tags,omitempty"`
2772 // TelemetryConfig: Optional. The configuration specifying telemetry settings
2773 // for the Dataproc Metastore service. If unspecified defaults to JSON.
2774 TelemetryConfig *TelemetryConfig `json:"telemetryConfig,omitempty"`
2775 // Tier: Optional. The tier of the service.
2776 //
2777 // Possible values:
2778 // "TIER_UNSPECIFIED" - The tier is not set.
2779 // "DEVELOPER" - The developer tier provides limited scalability and no fault
2780 // tolerance. Good for low-cost proof-of-concept.
2781 // "ENTERPRISE" - The enterprise tier provides multi-zone high availability,
2782 // and sufficient scalability for enterprise-level Dataproc Metastore
2783 // workloads.
2784 Tier string `json:"tier,omitempty"`
2785 // Uid: Output only. The globally unique resource identifier of the metastore
2786 // service.
2787 Uid string `json:"uid,omitempty"`
2788 // UpdateTime: Output only. The time when the metastore service was last
2789 // updated.
2790 UpdateTime string `json:"updateTime,omitempty"`
2791
2792 // ServerResponse contains the HTTP response code and headers from the server.
2793 googleapi.ServerResponse `json:"-"`
2794 // ForceSendFields is a list of field names (e.g. "ArtifactGcsUri") to
2795 // unconditionally include in API requests. By default, fields with empty or
2796 // default values are omitted from API requests. See
2797 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2798 // details.
2799 ForceSendFields []string `json:"-"`
2800 // NullFields is a list of field names (e.g. "ArtifactGcsUri") to include in
2801 // API requests with the JSON null value. By default, fields with empty values
2802 // are omitted from API requests. See
2803 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2804 NullFields []string `json:"-"`
2805 }
2806
2807 func (s Service) MarshalJSON() ([]byte, error) {
2808 type NoMethod Service
2809 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2810 }
2811
2812 // SetIamPolicyRequest: Request message for SetIamPolicy method.
2813 type SetIamPolicyRequest struct {
2814 // Policy: REQUIRED: The complete policy to be applied to the resource. The
2815 // size of the policy is limited to a few 10s of KB. An empty policy is a valid
2816 // policy but certain Google Cloud services (such as Projects) might reject
2817 // them.
2818 Policy *Policy `json:"policy,omitempty"`
2819 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
2820 // modify. Only the fields in the mask will be modified. If no mask is
2821 // provided, the following default mask is used:paths: "bindings, etag"
2822 UpdateMask string `json:"updateMask,omitempty"`
2823 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
2824 // include in API requests. By default, fields with empty or default values are
2825 // omitted from API requests. See
2826 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2827 // details.
2828 ForceSendFields []string `json:"-"`
2829 // NullFields is a list of field names (e.g. "Policy") to include in API
2830 // requests with the JSON null value. By default, fields with empty values are
2831 // omitted from API requests. See
2832 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2833 NullFields []string `json:"-"`
2834 }
2835
2836 func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
2837 type NoMethod SetIamPolicyRequest
2838 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2839 }
2840
2841 // StartMigrationRequest: Request message for DataprocMetastore.StartMigration.
2842 type StartMigrationRequest struct {
2843 // MigrationExecution: Required. The configuration details for the migration.
2844 MigrationExecution *MigrationExecution `json:"migrationExecution,omitempty"`
2845 // RequestId: Optional. A request ID. Specify a unique request ID to allow the
2846 // server to ignore the request if it has completed. The server will ignore
2847 // subsequent requests that provide a duplicate request ID for at least 60
2848 // minutes after the first request.For example, if an initial request times
2849 // out, followed by another request with the same request ID, the server
2850 // ignores the second request to prevent the creation of duplicate
2851 // commitments.The request ID must be a valid UUID
2852 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
2853 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
2854 RequestId string `json:"requestId,omitempty"`
2855 // ForceSendFields is a list of field names (e.g. "MigrationExecution") to
2856 // unconditionally include in API requests. By default, fields with empty or
2857 // default values are omitted from API requests. See
2858 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2859 // details.
2860 ForceSendFields []string `json:"-"`
2861 // NullFields is a list of field names (e.g. "MigrationExecution") to include
2862 // in API requests with the JSON null value. By default, fields with empty
2863 // values are omitted from API requests. See
2864 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2865 NullFields []string `json:"-"`
2866 }
2867
2868 func (s StartMigrationRequest) MarshalJSON() ([]byte, error) {
2869 type NoMethod StartMigrationRequest
2870 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2871 }
2872
2873 // Status: The Status type defines a logical error model that is suitable for
2874 // different programming environments, including REST APIs and RPC APIs. It is
2875 // used by gRPC (https://github.com/grpc). Each Status message contains three
2876 // pieces of data: error code, error message, and error details.You can find
2877 // out more about this error model and how to work with it in the API Design
2878 // Guide (https://cloud.google.com/apis/design/errors).
2879 type Status struct {
2880 // Code: The status code, which should be an enum value of google.rpc.Code.
2881 Code int64 `json:"code,omitempty"`
2882 // Details: A list of messages that carry the error details. There is a common
2883 // set of message types for APIs to use.
2884 Details []googleapi.RawMessage `json:"details,omitempty"`
2885 // Message: A developer-facing error message, which should be in English. Any
2886 // user-facing error message should be localized and sent in the
2887 // google.rpc.Status.details field, or localized by the client.
2888 Message string `json:"message,omitempty"`
2889 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally
2890 // include in API requests. By default, fields with empty or default values are
2891 // omitted from API requests. See
2892 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2893 // details.
2894 ForceSendFields []string `json:"-"`
2895 // NullFields is a list of field names (e.g. "Code") to include in API requests
2896 // with the JSON null value. By default, fields with empty values are omitted
2897 // from API requests. See
2898 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2899 NullFields []string `json:"-"`
2900 }
2901
2902 func (s Status) MarshalJSON() ([]byte, error) {
2903 type NoMethod Status
2904 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2905 }
2906
2907 // StatusProto: Wire-format for a Status object
2908 type StatusProto struct {
2909 // CanonicalCode: copybara:strip_begin(b/383363683)
2910 // copybara:strip_end_and_replace optional int32 canonical_code = 6;
2911 CanonicalCode int64 `json:"canonicalCode,omitempty"`
2912 // Code: Numeric code drawn from the space specified below. Often, this is the
2913 // canonical error space, and code is drawn from google3/util/task/codes.proto
2914 // copybara:strip_begin(b/383363683) copybara:strip_end_and_replace optional
2915 // int32 code = 1;
2916 Code int64 `json:"code,omitempty"`
2917 // Message: Detail message copybara:strip_begin(b/383363683)
2918 // copybara:strip_end_and_replace optional string message = 3;
2919 Message string `json:"message,omitempty"`
2920 // MessageSet: message_set associates an arbitrary proto message with the
2921 // status. copybara:strip_begin(b/383363683) copybara:strip_end_and_replace
2922 // optional proto2.bridge.MessageSet message_set = 5;
2923 MessageSet *MessageSet `json:"messageSet,omitempty"`
2924 // Space: copybara:strip_begin(b/383363683) Space to which this status belongs
2925 // copybara:strip_end_and_replace optional string space = 2; // Space to which
2926 // this status belongs
2927 Space string `json:"space,omitempty"`
2928 // ForceSendFields is a list of field names (e.g. "CanonicalCode") to
2929 // unconditionally include in API requests. By default, fields with empty or
2930 // default values are omitted from API requests. See
2931 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2932 // details.
2933 ForceSendFields []string `json:"-"`
2934 // NullFields is a list of field names (e.g. "CanonicalCode") to include in API
2935 // requests with the JSON null value. By default, fields with empty values are
2936 // omitted from API requests. See
2937 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2938 NullFields []string `json:"-"`
2939 }
2940
2941 func (s StatusProto) MarshalJSON() ([]byte, error) {
2942 type NoMethod StatusProto
2943 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2944 }
2945
2946 // TelemetryConfig: Telemetry Configuration for the Dataproc Metastore service.
2947 type TelemetryConfig struct {
2948 // LogFormat: Optional. The output format of the Dataproc Metastore service's
2949 // logs.
2950 //
2951 // Possible values:
2952 // "LOG_FORMAT_UNSPECIFIED" - The LOG_FORMAT is not set.
2953 // "LEGACY" - Logging output uses the legacy textPayload format.
2954 // "JSON" - Logging output uses the jsonPayload format.
2955 LogFormat string `json:"logFormat,omitempty"`
2956 // ForceSendFields is a list of field names (e.g. "LogFormat") to
2957 // unconditionally include in API requests. By default, fields with empty or
2958 // default values are omitted from API requests. See
2959 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2960 // details.
2961 ForceSendFields []string `json:"-"`
2962 // NullFields is a list of field names (e.g. "LogFormat") to include in API
2963 // requests with the JSON null value. By default, fields with empty values are
2964 // omitted from API requests. See
2965 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2966 NullFields []string `json:"-"`
2967 }
2968
2969 func (s TelemetryConfig) MarshalJSON() ([]byte, error) {
2970 type NoMethod TelemetryConfig
2971 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2972 }
2973
2974 // TestIamPermissionsRequest: Request message for TestIamPermissions method.
2975 type TestIamPermissionsRequest struct {
2976 // Permissions: The set of permissions to check for the resource. Permissions
2977 // with wildcards (such as * or storage.*) are not allowed. For more
2978 // information see IAM Overview
2979 // (https://cloud.google.com/iam/docs/overview#permissions).
2980 Permissions []string `json:"permissions,omitempty"`
2981 // ForceSendFields is a list of field names (e.g. "Permissions") to
2982 // unconditionally include in API requests. By default, fields with empty or
2983 // default values are omitted from API requests. See
2984 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
2985 // details.
2986 ForceSendFields []string `json:"-"`
2987 // NullFields is a list of field names (e.g. "Permissions") to include in API
2988 // requests with the JSON null value. By default, fields with empty values are
2989 // omitted from API requests. See
2990 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
2991 NullFields []string `json:"-"`
2992 }
2993
2994 func (s TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
2995 type NoMethod TestIamPermissionsRequest
2996 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
2997 }
2998
2999 // TestIamPermissionsResponse: Response message for TestIamPermissions method.
3000 type TestIamPermissionsResponse struct {
3001 // Permissions: A subset of TestPermissionsRequest.permissions that the caller
3002 // is allowed.
3003 Permissions []string `json:"permissions,omitempty"`
3004
3005 // ServerResponse contains the HTTP response code and headers from the server.
3006 googleapi.ServerResponse `json:"-"`
3007 // ForceSendFields is a list of field names (e.g. "Permissions") to
3008 // unconditionally include in API requests. By default, fields with empty or
3009 // default values are omitted from API requests. See
3010 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
3011 // details.
3012 ForceSendFields []string `json:"-"`
3013 // NullFields is a list of field names (e.g. "Permissions") to include in API
3014 // requests with the JSON null value. By default, fields with empty values are
3015 // omitted from API requests. See
3016 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
3017 NullFields []string `json:"-"`
3018 }
3019
3020 func (s TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3021 type NoMethod TestIamPermissionsResponse
3022 return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
3023 }
3024
3025 type ProjectsLocationsGetCall struct {
3026 s *APIService
3027 name string
3028 urlParams_ gensupport.URLParams
3029 ifNoneMatch_ string
3030 ctx_ context.Context
3031 header_ http.Header
3032 }
3033
3034 // Get: Gets information about a location.
3035 //
3036 // - name: Resource name for the location.
3037 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
3038 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3039 c.name = name
3040 return c
3041 }
3042
3043 // Fields allows partial responses to be retrieved. See
3044 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3045 // details.
3046 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
3047 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3048 return c
3049 }
3050
3051 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3052 // object's ETag matches the given value. This is useful for getting updates
3053 // only after the object has changed since the last request.
3054 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
3055 c.ifNoneMatch_ = entityTag
3056 return c
3057 }
3058
3059 // Context sets the context to be used in this call's Do method.
3060 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
3061 c.ctx_ = ctx
3062 return c
3063 }
3064
3065 // Header returns a http.Header that can be modified by the caller to add
3066 // headers to the request.
3067 func (c *ProjectsLocationsGetCall) Header() http.Header {
3068 if c.header_ == nil {
3069 c.header_ = make(http.Header)
3070 }
3071 return c.header_
3072 }
3073
3074 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
3075 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3076 if c.ifNoneMatch_ != "" {
3077 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3078 }
3079 c.urlParams_.Set("alt", alt)
3080 c.urlParams_.Set("prettyPrint", "false")
3081 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
3082 urls += "?" + c.urlParams_.Encode()
3083 req, err := http.NewRequest("GET", urls, nil)
3084 if err != nil {
3085 return nil, err
3086 }
3087 req.Header = reqHeaders
3088 googleapi.Expand(req.URL, map[string]string{
3089 "name": c.name,
3090 })
3091 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.get", "request", internallog.HTTPRequest(req, nil))
3092 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3093 }
3094
3095 // Do executes the "metastore.projects.locations.get" call.
3096 // Any non-2xx status code is an error. Response headers are in either
3097 // *Location.ServerResponse.Header or (if a response was returned at all) in
3098 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3099 // whether the returned error was because http.StatusNotModified was returned.
3100 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
3101 gensupport.SetOptions(c.urlParams_, opts...)
3102 res, err := c.doRequest("json")
3103 if res != nil && res.StatusCode == http.StatusNotModified {
3104 if res.Body != nil {
3105 res.Body.Close()
3106 }
3107 return nil, gensupport.WrapError(&googleapi.Error{
3108 Code: res.StatusCode,
3109 Header: res.Header,
3110 })
3111 }
3112 if err != nil {
3113 return nil, err
3114 }
3115 defer googleapi.CloseBody(res)
3116 if err := googleapi.CheckResponse(res); err != nil {
3117 return nil, gensupport.WrapError(err)
3118 }
3119 ret := &Location{
3120 ServerResponse: googleapi.ServerResponse{
3121 Header: res.Header,
3122 HTTPStatusCode: res.StatusCode,
3123 },
3124 }
3125 target := &ret
3126 b, err := gensupport.DecodeResponseBytes(target, res)
3127 if err != nil {
3128 return nil, err
3129 }
3130 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.get", "response", internallog.HTTPResponse(res, b))
3131 return ret, nil
3132 }
3133
3134 type ProjectsLocationsListCall struct {
3135 s *APIService
3136 name string
3137 urlParams_ gensupport.URLParams
3138 ifNoneMatch_ string
3139 ctx_ context.Context
3140 header_ http.Header
3141 }
3142
3143 // List: Lists information about the supported locations for this service.This
3144 // method lists locations based on the resource scope provided in the
3145 // ListLocationsRequest.name field: Global locations: If name is empty, the
3146 // method lists the public locations available to all projects.
3147 // Project-specific locations: If name follows the format projects/{project},
3148 // the method lists locations visible to that specific project. This includes
3149 // public, private, or other project-specific locations enabled for the
3150 // project.For gRPC and client library implementations, the resource name is
3151 // passed as the name field. For direct service calls, the resource name is
3152 // incorporated into the request path based on the specific service
3153 // implementation and version.
3154 //
3155 // - name: The resource that owns the locations collection, if applicable.
3156 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
3157 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3158 c.name = name
3159 return c
3160 }
3161
3162 // ExtraLocationTypes sets the optional parameter "extraLocationTypes": Do not
3163 // use this field. It is unsupported and is ignored unless explicitly
3164 // documented otherwise. This is primarily for internal usage.
3165 func (c *ProjectsLocationsListCall) ExtraLocationTypes(extraLocationTypes ...string) *ProjectsLocationsListCall {
3166 c.urlParams_.SetMulti("extraLocationTypes", append([]string{}, extraLocationTypes...))
3167 return c
3168 }
3169
3170 // Filter sets the optional parameter "filter": A filter to narrow down results
3171 // to a preferred subset. The filtering language accepts strings like
3172 // "displayName=tokyo", and is documented in more detail in AIP-160
3173 // (https://google.aip.dev/160).
3174 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
3175 c.urlParams_.Set("filter", filter)
3176 return c
3177 }
3178
3179 // PageSize sets the optional parameter "pageSize": The maximum number of
3180 // results to return. If not set, the service selects a default.
3181 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
3182 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3183 return c
3184 }
3185
3186 // PageToken sets the optional parameter "pageToken": A page token received
3187 // from the next_page_token field in the response. Send that page token to
3188 // receive the subsequent page.
3189 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
3190 c.urlParams_.Set("pageToken", pageToken)
3191 return c
3192 }
3193
3194 // Fields allows partial responses to be retrieved. See
3195 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3196 // details.
3197 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
3198 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3199 return c
3200 }
3201
3202 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3203 // object's ETag matches the given value. This is useful for getting updates
3204 // only after the object has changed since the last request.
3205 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
3206 c.ifNoneMatch_ = entityTag
3207 return c
3208 }
3209
3210 // Context sets the context to be used in this call's Do method.
3211 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
3212 c.ctx_ = ctx
3213 return c
3214 }
3215
3216 // Header returns a http.Header that can be modified by the caller to add
3217 // headers to the request.
3218 func (c *ProjectsLocationsListCall) Header() http.Header {
3219 if c.header_ == nil {
3220 c.header_ = make(http.Header)
3221 }
3222 return c.header_
3223 }
3224
3225 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
3226 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3227 if c.ifNoneMatch_ != "" {
3228 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3229 }
3230 c.urlParams_.Set("alt", alt)
3231 c.urlParams_.Set("prettyPrint", "false")
3232 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/locations")
3233 urls += "?" + c.urlParams_.Encode()
3234 req, err := http.NewRequest("GET", urls, nil)
3235 if err != nil {
3236 return nil, err
3237 }
3238 req.Header = reqHeaders
3239 googleapi.Expand(req.URL, map[string]string{
3240 "name": c.name,
3241 })
3242 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.list", "request", internallog.HTTPRequest(req, nil))
3243 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3244 }
3245
3246 // Do executes the "metastore.projects.locations.list" call.
3247 // Any non-2xx status code is an error. Response headers are in either
3248 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
3249 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3250 // check whether the returned error was because http.StatusNotModified was
3251 // returned.
3252 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
3253 gensupport.SetOptions(c.urlParams_, opts...)
3254 res, err := c.doRequest("json")
3255 if res != nil && res.StatusCode == http.StatusNotModified {
3256 if res.Body != nil {
3257 res.Body.Close()
3258 }
3259 return nil, gensupport.WrapError(&googleapi.Error{
3260 Code: res.StatusCode,
3261 Header: res.Header,
3262 })
3263 }
3264 if err != nil {
3265 return nil, err
3266 }
3267 defer googleapi.CloseBody(res)
3268 if err := googleapi.CheckResponse(res); err != nil {
3269 return nil, gensupport.WrapError(err)
3270 }
3271 ret := &ListLocationsResponse{
3272 ServerResponse: googleapi.ServerResponse{
3273 Header: res.Header,
3274 HTTPStatusCode: res.StatusCode,
3275 },
3276 }
3277 target := &ret
3278 b, err := gensupport.DecodeResponseBytes(target, res)
3279 if err != nil {
3280 return nil, err
3281 }
3282 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.list", "response", internallog.HTTPResponse(res, b))
3283 return ret, nil
3284 }
3285
3286 // Pages invokes f for each page of results.
3287 // A non-nil error returned from f will halt the iteration.
3288 // The provided context supersedes any context provided to the Context method.
3289 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
3290 c.ctx_ = ctx
3291 defer c.PageToken(c.urlParams_.Get("pageToken"))
3292 for {
3293 x, err := c.Do()
3294 if err != nil {
3295 return err
3296 }
3297 if err := f(x); err != nil {
3298 return err
3299 }
3300 if x.NextPageToken == "" {
3301 return nil
3302 }
3303 c.PageToken(x.NextPageToken)
3304 }
3305 }
3306
3307 type ProjectsLocationsFederationsCreateCall struct {
3308 s *APIService
3309 parent string
3310 federation *Federation
3311 urlParams_ gensupport.URLParams
3312 ctx_ context.Context
3313 header_ http.Header
3314 }
3315
3316 // Create: Creates a metastore federation in a project and location.
3317 //
3318 // - parent: The relative resource name of the location in which to create a
3319 // federation service, in the following
3320 // form:projects/{project_number}/locations/{location_id}.
3321 func (r *ProjectsLocationsFederationsService) Create(parent string, federation *Federation) *ProjectsLocationsFederationsCreateCall {
3322 c := &ProjectsLocationsFederationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3323 c.parent = parent
3324 c.federation = federation
3325 return c
3326 }
3327
3328 // FederationId sets the optional parameter "federationId": Required. The ID of
3329 // the metastore federation, which is used as the final component of the
3330 // metastore federation's name.This value must be between 2 and 63 characters
3331 // long inclusive, begin with a letter, end with a letter or number, and
3332 // consist of alpha-numeric ASCII characters or hyphens.
3333 func (c *ProjectsLocationsFederationsCreateCall) FederationId(federationId string) *ProjectsLocationsFederationsCreateCall {
3334 c.urlParams_.Set("federationId", federationId)
3335 return c
3336 }
3337
3338 // RequestId sets the optional parameter "requestId": A request ID. Specify a
3339 // unique request ID to allow the server to ignore the request if it has
3340 // completed. The server will ignore subsequent requests that provide a
3341 // duplicate request ID for at least 60 minutes after the first request.For
3342 // example, if an initial request times out, followed by another request with
3343 // the same request ID, the server ignores the second request to prevent the
3344 // creation of duplicate commitments.The request ID must be a valid UUID
3345 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
3346 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
3347 func (c *ProjectsLocationsFederationsCreateCall) RequestId(requestId string) *ProjectsLocationsFederationsCreateCall {
3348 c.urlParams_.Set("requestId", requestId)
3349 return c
3350 }
3351
3352 // Fields allows partial responses to be retrieved. See
3353 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3354 // details.
3355 func (c *ProjectsLocationsFederationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsCreateCall {
3356 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3357 return c
3358 }
3359
3360 // Context sets the context to be used in this call's Do method.
3361 func (c *ProjectsLocationsFederationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFederationsCreateCall {
3362 c.ctx_ = ctx
3363 return c
3364 }
3365
3366 // Header returns a http.Header that can be modified by the caller to add
3367 // headers to the request.
3368 func (c *ProjectsLocationsFederationsCreateCall) Header() http.Header {
3369 if c.header_ == nil {
3370 c.header_ = make(http.Header)
3371 }
3372 return c.header_
3373 }
3374
3375 func (c *ProjectsLocationsFederationsCreateCall) doRequest(alt string) (*http.Response, error) {
3376 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
3377 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.federation)
3378 if err != nil {
3379 return nil, err
3380 }
3381 c.urlParams_.Set("alt", alt)
3382 c.urlParams_.Set("prettyPrint", "false")
3383 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/federations")
3384 urls += "?" + c.urlParams_.Encode()
3385 req, err := http.NewRequest("POST", urls, body)
3386 if err != nil {
3387 return nil, err
3388 }
3389 req.Header = reqHeaders
3390 googleapi.Expand(req.URL, map[string]string{
3391 "parent": c.parent,
3392 })
3393 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.create", "request", internallog.HTTPRequest(req, body.Bytes()))
3394 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3395 }
3396
3397 // Do executes the "metastore.projects.locations.federations.create" call.
3398 // Any non-2xx status code is an error. Response headers are in either
3399 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3400 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3401 // whether the returned error was because http.StatusNotModified was returned.
3402 func (c *ProjectsLocationsFederationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3403 gensupport.SetOptions(c.urlParams_, opts...)
3404 res, err := c.doRequest("json")
3405 if res != nil && res.StatusCode == http.StatusNotModified {
3406 if res.Body != nil {
3407 res.Body.Close()
3408 }
3409 return nil, gensupport.WrapError(&googleapi.Error{
3410 Code: res.StatusCode,
3411 Header: res.Header,
3412 })
3413 }
3414 if err != nil {
3415 return nil, err
3416 }
3417 defer googleapi.CloseBody(res)
3418 if err := googleapi.CheckResponse(res); err != nil {
3419 return nil, gensupport.WrapError(err)
3420 }
3421 ret := &Operation{
3422 ServerResponse: googleapi.ServerResponse{
3423 Header: res.Header,
3424 HTTPStatusCode: res.StatusCode,
3425 },
3426 }
3427 target := &ret
3428 b, err := gensupport.DecodeResponseBytes(target, res)
3429 if err != nil {
3430 return nil, err
3431 }
3432 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.create", "response", internallog.HTTPResponse(res, b))
3433 return ret, nil
3434 }
3435
3436 type ProjectsLocationsFederationsDeleteCall struct {
3437 s *APIService
3438 name string
3439 urlParams_ gensupport.URLParams
3440 ctx_ context.Context
3441 header_ http.Header
3442 }
3443
3444 // Delete: Deletes a single federation.
3445 //
3446 // - name: The relative resource name of the metastore federation to delete, in
3447 // the following
3448 // form:projects/{project_number}/locations/{location_id}/federations/{federat
3449 // ion_id}.
3450 func (r *ProjectsLocationsFederationsService) Delete(name string) *ProjectsLocationsFederationsDeleteCall {
3451 c := &ProjectsLocationsFederationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3452 c.name = name
3453 return c
3454 }
3455
3456 // RequestId sets the optional parameter "requestId": A request ID. Specify a
3457 // unique request ID to allow the server to ignore the request if it has
3458 // completed. The server will ignore subsequent requests that provide a
3459 // duplicate request ID for at least 60 minutes after the first request.For
3460 // example, if an initial request times out, followed by another request with
3461 // the same request ID, the server ignores the second request to prevent the
3462 // creation of duplicate commitments.The request ID must be a valid UUID
3463 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
3464 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
3465 func (c *ProjectsLocationsFederationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFederationsDeleteCall {
3466 c.urlParams_.Set("requestId", requestId)
3467 return c
3468 }
3469
3470 // Fields allows partial responses to be retrieved. See
3471 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3472 // details.
3473 func (c *ProjectsLocationsFederationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsDeleteCall {
3474 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3475 return c
3476 }
3477
3478 // Context sets the context to be used in this call's Do method.
3479 func (c *ProjectsLocationsFederationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFederationsDeleteCall {
3480 c.ctx_ = ctx
3481 return c
3482 }
3483
3484 // Header returns a http.Header that can be modified by the caller to add
3485 // headers to the request.
3486 func (c *ProjectsLocationsFederationsDeleteCall) Header() http.Header {
3487 if c.header_ == nil {
3488 c.header_ = make(http.Header)
3489 }
3490 return c.header_
3491 }
3492
3493 func (c *ProjectsLocationsFederationsDeleteCall) doRequest(alt string) (*http.Response, error) {
3494 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3495 c.urlParams_.Set("alt", alt)
3496 c.urlParams_.Set("prettyPrint", "false")
3497 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
3498 urls += "?" + c.urlParams_.Encode()
3499 req, err := http.NewRequest("DELETE", urls, nil)
3500 if err != nil {
3501 return nil, err
3502 }
3503 req.Header = reqHeaders
3504 googleapi.Expand(req.URL, map[string]string{
3505 "name": c.name,
3506 })
3507 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.delete", "request", internallog.HTTPRequest(req, nil))
3508 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3509 }
3510
3511 // Do executes the "metastore.projects.locations.federations.delete" call.
3512 // Any non-2xx status code is an error. Response headers are in either
3513 // *Operation.ServerResponse.Header or (if a response was returned at all) in
3514 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3515 // whether the returned error was because http.StatusNotModified was returned.
3516 func (c *ProjectsLocationsFederationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
3517 gensupport.SetOptions(c.urlParams_, opts...)
3518 res, err := c.doRequest("json")
3519 if res != nil && res.StatusCode == http.StatusNotModified {
3520 if res.Body != nil {
3521 res.Body.Close()
3522 }
3523 return nil, gensupport.WrapError(&googleapi.Error{
3524 Code: res.StatusCode,
3525 Header: res.Header,
3526 })
3527 }
3528 if err != nil {
3529 return nil, err
3530 }
3531 defer googleapi.CloseBody(res)
3532 if err := googleapi.CheckResponse(res); err != nil {
3533 return nil, gensupport.WrapError(err)
3534 }
3535 ret := &Operation{
3536 ServerResponse: googleapi.ServerResponse{
3537 Header: res.Header,
3538 HTTPStatusCode: res.StatusCode,
3539 },
3540 }
3541 target := &ret
3542 b, err := gensupport.DecodeResponseBytes(target, res)
3543 if err != nil {
3544 return nil, err
3545 }
3546 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.delete", "response", internallog.HTTPResponse(res, b))
3547 return ret, nil
3548 }
3549
3550 type ProjectsLocationsFederationsGetCall struct {
3551 s *APIService
3552 name string
3553 urlParams_ gensupport.URLParams
3554 ifNoneMatch_ string
3555 ctx_ context.Context
3556 header_ http.Header
3557 }
3558
3559 // Get: Gets the details of a single federation.
3560 //
3561 // - name: The relative resource name of the metastore federation to retrieve,
3562 // in the following
3563 // form:projects/{project_number}/locations/{location_id}/federations/{federat
3564 // ion_id}.
3565 func (r *ProjectsLocationsFederationsService) Get(name string) *ProjectsLocationsFederationsGetCall {
3566 c := &ProjectsLocationsFederationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3567 c.name = name
3568 return c
3569 }
3570
3571 // Fields allows partial responses to be retrieved. See
3572 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3573 // details.
3574 func (c *ProjectsLocationsFederationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetCall {
3575 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3576 return c
3577 }
3578
3579 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3580 // object's ETag matches the given value. This is useful for getting updates
3581 // only after the object has changed since the last request.
3582 func (c *ProjectsLocationsFederationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetCall {
3583 c.ifNoneMatch_ = entityTag
3584 return c
3585 }
3586
3587 // Context sets the context to be used in this call's Do method.
3588 func (c *ProjectsLocationsFederationsGetCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetCall {
3589 c.ctx_ = ctx
3590 return c
3591 }
3592
3593 // Header returns a http.Header that can be modified by the caller to add
3594 // headers to the request.
3595 func (c *ProjectsLocationsFederationsGetCall) Header() http.Header {
3596 if c.header_ == nil {
3597 c.header_ = make(http.Header)
3598 }
3599 return c.header_
3600 }
3601
3602 func (c *ProjectsLocationsFederationsGetCall) doRequest(alt string) (*http.Response, error) {
3603 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3604 if c.ifNoneMatch_ != "" {
3605 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3606 }
3607 c.urlParams_.Set("alt", alt)
3608 c.urlParams_.Set("prettyPrint", "false")
3609 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
3610 urls += "?" + c.urlParams_.Encode()
3611 req, err := http.NewRequest("GET", urls, nil)
3612 if err != nil {
3613 return nil, err
3614 }
3615 req.Header = reqHeaders
3616 googleapi.Expand(req.URL, map[string]string{
3617 "name": c.name,
3618 })
3619 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.get", "request", internallog.HTTPRequest(req, nil))
3620 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3621 }
3622
3623 // Do executes the "metastore.projects.locations.federations.get" call.
3624 // Any non-2xx status code is an error. Response headers are in either
3625 // *Federation.ServerResponse.Header or (if a response was returned at all) in
3626 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3627 // whether the returned error was because http.StatusNotModified was returned.
3628 func (c *ProjectsLocationsFederationsGetCall) Do(opts ...googleapi.CallOption) (*Federation, error) {
3629 gensupport.SetOptions(c.urlParams_, opts...)
3630 res, err := c.doRequest("json")
3631 if res != nil && res.StatusCode == http.StatusNotModified {
3632 if res.Body != nil {
3633 res.Body.Close()
3634 }
3635 return nil, gensupport.WrapError(&googleapi.Error{
3636 Code: res.StatusCode,
3637 Header: res.Header,
3638 })
3639 }
3640 if err != nil {
3641 return nil, err
3642 }
3643 defer googleapi.CloseBody(res)
3644 if err := googleapi.CheckResponse(res); err != nil {
3645 return nil, gensupport.WrapError(err)
3646 }
3647 ret := &Federation{
3648 ServerResponse: googleapi.ServerResponse{
3649 Header: res.Header,
3650 HTTPStatusCode: res.StatusCode,
3651 },
3652 }
3653 target := &ret
3654 b, err := gensupport.DecodeResponseBytes(target, res)
3655 if err != nil {
3656 return nil, err
3657 }
3658 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.get", "response", internallog.HTTPResponse(res, b))
3659 return ret, nil
3660 }
3661
3662 type ProjectsLocationsFederationsGetIamPolicyCall struct {
3663 s *APIService
3664 resource string
3665 urlParams_ gensupport.URLParams
3666 ifNoneMatch_ string
3667 ctx_ context.Context
3668 header_ http.Header
3669 }
3670
3671 // GetIamPolicy: Gets the access control policy for a resource. Returns an
3672 // empty policy if the resource exists and does not have a policy set.
3673 //
3674 // - resource: REQUIRED: The resource for which the policy is being requested.
3675 // See Resource names (https://cloud.google.com/apis/design/resource_names)
3676 // for the appropriate value for this field.
3677 func (r *ProjectsLocationsFederationsService) GetIamPolicy(resource string) *ProjectsLocationsFederationsGetIamPolicyCall {
3678 c := &ProjectsLocationsFederationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3679 c.resource = resource
3680 return c
3681 }
3682
3683 // OptionsRequestedPolicyVersion sets the optional parameter
3684 // "options.requestedPolicyVersion": The maximum policy version that will be
3685 // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
3686 // an invalid value will be rejected.Requests for policies with any conditional
3687 // role bindings must specify version 3. Policies with no conditional role
3688 // bindings may specify any valid value or leave the field unset.The policy in
3689 // the response might use the policy version that you specified, or it might
3690 // use a lower policy version. For example, if you specify version 3, but the
3691 // policy has no conditional role bindings, the response uses version 1.To
3692 // learn which resources support conditions in their IAM policies, see the IAM
3693 // documentation
3694 // (https://cloud.google.com/iam/help/conditions/resource-policies).
3695 func (c *ProjectsLocationsFederationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFederationsGetIamPolicyCall {
3696 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
3697 return c
3698 }
3699
3700 // Fields allows partial responses to be retrieved. See
3701 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3702 // details.
3703 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetIamPolicyCall {
3704 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3705 return c
3706 }
3707
3708 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3709 // object's ETag matches the given value. This is useful for getting updates
3710 // only after the object has changed since the last request.
3711 func (c *ProjectsLocationsFederationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetIamPolicyCall {
3712 c.ifNoneMatch_ = entityTag
3713 return c
3714 }
3715
3716 // Context sets the context to be used in this call's Do method.
3717 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetIamPolicyCall {
3718 c.ctx_ = ctx
3719 return c
3720 }
3721
3722 // Header returns a http.Header that can be modified by the caller to add
3723 // headers to the request.
3724 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Header() http.Header {
3725 if c.header_ == nil {
3726 c.header_ = make(http.Header)
3727 }
3728 return c.header_
3729 }
3730
3731 func (c *ProjectsLocationsFederationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3732 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3733 if c.ifNoneMatch_ != "" {
3734 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3735 }
3736 c.urlParams_.Set("alt", alt)
3737 c.urlParams_.Set("prettyPrint", "false")
3738 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
3739 urls += "?" + c.urlParams_.Encode()
3740 req, err := http.NewRequest("GET", urls, nil)
3741 if err != nil {
3742 return nil, err
3743 }
3744 req.Header = reqHeaders
3745 googleapi.Expand(req.URL, map[string]string{
3746 "resource": c.resource,
3747 })
3748 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
3749 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3750 }
3751
3752 // Do executes the "metastore.projects.locations.federations.getIamPolicy" call.
3753 // Any non-2xx status code is an error. Response headers are in either
3754 // *Policy.ServerResponse.Header or (if a response was returned at all) in
3755 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
3756 // whether the returned error was because http.StatusNotModified was returned.
3757 func (c *ProjectsLocationsFederationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3758 gensupport.SetOptions(c.urlParams_, opts...)
3759 res, err := c.doRequest("json")
3760 if res != nil && res.StatusCode == http.StatusNotModified {
3761 if res.Body != nil {
3762 res.Body.Close()
3763 }
3764 return nil, gensupport.WrapError(&googleapi.Error{
3765 Code: res.StatusCode,
3766 Header: res.Header,
3767 })
3768 }
3769 if err != nil {
3770 return nil, err
3771 }
3772 defer googleapi.CloseBody(res)
3773 if err := googleapi.CheckResponse(res); err != nil {
3774 return nil, gensupport.WrapError(err)
3775 }
3776 ret := &Policy{
3777 ServerResponse: googleapi.ServerResponse{
3778 Header: res.Header,
3779 HTTPStatusCode: res.StatusCode,
3780 },
3781 }
3782 target := &ret
3783 b, err := gensupport.DecodeResponseBytes(target, res)
3784 if err != nil {
3785 return nil, err
3786 }
3787 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.getIamPolicy", "response", internallog.HTTPResponse(res, b))
3788 return ret, nil
3789 }
3790
3791 type ProjectsLocationsFederationsListCall struct {
3792 s *APIService
3793 parent string
3794 urlParams_ gensupport.URLParams
3795 ifNoneMatch_ string
3796 ctx_ context.Context
3797 header_ http.Header
3798 }
3799
3800 // List: Lists federations in a project and location.
3801 //
3802 // - parent: The relative resource name of the location of metastore
3803 // federations to list, in the following form:
3804 // projects/{project_number}/locations/{location_id}.
3805 func (r *ProjectsLocationsFederationsService) List(parent string) *ProjectsLocationsFederationsListCall {
3806 c := &ProjectsLocationsFederationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3807 c.parent = parent
3808 return c
3809 }
3810
3811 // Filter sets the optional parameter "filter": The filter to apply to list
3812 // results.
3813 func (c *ProjectsLocationsFederationsListCall) Filter(filter string) *ProjectsLocationsFederationsListCall {
3814 c.urlParams_.Set("filter", filter)
3815 return c
3816 }
3817
3818 // OrderBy sets the optional parameter "orderBy": Specify the ordering of
3819 // results as described in Sorting Order
3820 // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
3821 // specified, the results will be sorted in the default order.
3822 func (c *ProjectsLocationsFederationsListCall) OrderBy(orderBy string) *ProjectsLocationsFederationsListCall {
3823 c.urlParams_.Set("orderBy", orderBy)
3824 return c
3825 }
3826
3827 // PageSize sets the optional parameter "pageSize": The maximum number of
3828 // federations to return. The response may contain less than the maximum
3829 // number. If unspecified, no more than 500 services are returned. The maximum
3830 // value is 1000; values above 1000 are changed to 1000.
3831 func (c *ProjectsLocationsFederationsListCall) PageSize(pageSize int64) *ProjectsLocationsFederationsListCall {
3832 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
3833 return c
3834 }
3835
3836 // PageToken sets the optional parameter "pageToken": A page token, received
3837 // from a previous ListFederationServices call. Provide this token to retrieve
3838 // the subsequent page.To retrieve the first page, supply an empty page
3839 // token.When paginating, other parameters provided to ListFederationServices
3840 // must match the call that provided the page token.
3841 func (c *ProjectsLocationsFederationsListCall) PageToken(pageToken string) *ProjectsLocationsFederationsListCall {
3842 c.urlParams_.Set("pageToken", pageToken)
3843 return c
3844 }
3845
3846 // Fields allows partial responses to be retrieved. See
3847 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
3848 // details.
3849 func (c *ProjectsLocationsFederationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsListCall {
3850 c.urlParams_.Set("fields", googleapi.CombineFields(s))
3851 return c
3852 }
3853
3854 // IfNoneMatch sets an optional parameter which makes the operation fail if the
3855 // object's ETag matches the given value. This is useful for getting updates
3856 // only after the object has changed since the last request.
3857 func (c *ProjectsLocationsFederationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsListCall {
3858 c.ifNoneMatch_ = entityTag
3859 return c
3860 }
3861
3862 // Context sets the context to be used in this call's Do method.
3863 func (c *ProjectsLocationsFederationsListCall) Context(ctx context.Context) *ProjectsLocationsFederationsListCall {
3864 c.ctx_ = ctx
3865 return c
3866 }
3867
3868 // Header returns a http.Header that can be modified by the caller to add
3869 // headers to the request.
3870 func (c *ProjectsLocationsFederationsListCall) Header() http.Header {
3871 if c.header_ == nil {
3872 c.header_ = make(http.Header)
3873 }
3874 return c.header_
3875 }
3876
3877 func (c *ProjectsLocationsFederationsListCall) doRequest(alt string) (*http.Response, error) {
3878 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
3879 if c.ifNoneMatch_ != "" {
3880 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3881 }
3882 c.urlParams_.Set("alt", alt)
3883 c.urlParams_.Set("prettyPrint", "false")
3884 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/federations")
3885 urls += "?" + c.urlParams_.Encode()
3886 req, err := http.NewRequest("GET", urls, nil)
3887 if err != nil {
3888 return nil, err
3889 }
3890 req.Header = reqHeaders
3891 googleapi.Expand(req.URL, map[string]string{
3892 "parent": c.parent,
3893 })
3894 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.list", "request", internallog.HTTPRequest(req, nil))
3895 return gensupport.SendRequest(c.ctx_, c.s.client, req)
3896 }
3897
3898 // Do executes the "metastore.projects.locations.federations.list" call.
3899 // Any non-2xx status code is an error. Response headers are in either
3900 // *ListFederationsResponse.ServerResponse.Header or (if a response was
3901 // returned at all) in error.(*googleapi.Error).Header. Use
3902 // googleapi.IsNotModified to check whether the returned error was because
3903 // http.StatusNotModified was returned.
3904 func (c *ProjectsLocationsFederationsListCall) Do(opts ...googleapi.CallOption) (*ListFederationsResponse, error) {
3905 gensupport.SetOptions(c.urlParams_, opts...)
3906 res, err := c.doRequest("json")
3907 if res != nil && res.StatusCode == http.StatusNotModified {
3908 if res.Body != nil {
3909 res.Body.Close()
3910 }
3911 return nil, gensupport.WrapError(&googleapi.Error{
3912 Code: res.StatusCode,
3913 Header: res.Header,
3914 })
3915 }
3916 if err != nil {
3917 return nil, err
3918 }
3919 defer googleapi.CloseBody(res)
3920 if err := googleapi.CheckResponse(res); err != nil {
3921 return nil, gensupport.WrapError(err)
3922 }
3923 ret := &ListFederationsResponse{
3924 ServerResponse: googleapi.ServerResponse{
3925 Header: res.Header,
3926 HTTPStatusCode: res.StatusCode,
3927 },
3928 }
3929 target := &ret
3930 b, err := gensupport.DecodeResponseBytes(target, res)
3931 if err != nil {
3932 return nil, err
3933 }
3934 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.list", "response", internallog.HTTPResponse(res, b))
3935 return ret, nil
3936 }
3937
3938 // Pages invokes f for each page of results.
3939 // A non-nil error returned from f will halt the iteration.
3940 // The provided context supersedes any context provided to the Context method.
3941 func (c *ProjectsLocationsFederationsListCall) Pages(ctx context.Context, f func(*ListFederationsResponse) error) error {
3942 c.ctx_ = ctx
3943 defer c.PageToken(c.urlParams_.Get("pageToken"))
3944 for {
3945 x, err := c.Do()
3946 if err != nil {
3947 return err
3948 }
3949 if err := f(x); err != nil {
3950 return err
3951 }
3952 if x.NextPageToken == "" {
3953 return nil
3954 }
3955 c.PageToken(x.NextPageToken)
3956 }
3957 }
3958
3959 type ProjectsLocationsFederationsPatchCall struct {
3960 s *APIService
3961 name string
3962 federation *Federation
3963 urlParams_ gensupport.URLParams
3964 ctx_ context.Context
3965 header_ http.Header
3966 }
3967
3968 // Patch: Updates the fields of a federation.
3969 //
3970 // - name: Immutable. The relative resource name of the federation, of the
3971 // form:
3972 // projects/{project_number}/locations/{location_id}/federations/{federation_i
3973 // d}`.
3974 func (r *ProjectsLocationsFederationsService) Patch(name string, federation *Federation) *ProjectsLocationsFederationsPatchCall {
3975 c := &ProjectsLocationsFederationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3976 c.name = name
3977 c.federation = federation
3978 return c
3979 }
3980
3981 // RequestId sets the optional parameter "requestId": A request ID. Specify a
3982 // unique request ID to allow the server to ignore the request if it has
3983 // completed. The server will ignore subsequent requests that provide a
3984 // duplicate request ID for at least 60 minutes after the first request.For
3985 // example, if an initial request times out, followed by another request with
3986 // the same request ID, the server ignores the second request to prevent the
3987 // creation of duplicate commitments.The request ID must be a valid UUID
3988 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
3989 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
3990 func (c *ProjectsLocationsFederationsPatchCall) RequestId(requestId string) *ProjectsLocationsFederationsPatchCall {
3991 c.urlParams_.Set("requestId", requestId)
3992 return c
3993 }
3994
3995 // UpdateMask sets the optional parameter "updateMask": Required. A field mask
3996 // used to specify the fields to be overwritten in the metastore federation
3997 // resource by the update. Fields specified in the update_mask are relative to
3998 // the resource (not to the full request). A field is overwritten if it is in
3999 // the mask.
4000 func (c *ProjectsLocationsFederationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFederationsPatchCall {
4001 c.urlParams_.Set("updateMask", updateMask)
4002 return c
4003 }
4004
4005 // Fields allows partial responses to be retrieved. See
4006 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4007 // details.
4008 func (c *ProjectsLocationsFederationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsPatchCall {
4009 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4010 return c
4011 }
4012
4013 // Context sets the context to be used in this call's Do method.
4014 func (c *ProjectsLocationsFederationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFederationsPatchCall {
4015 c.ctx_ = ctx
4016 return c
4017 }
4018
4019 // Header returns a http.Header that can be modified by the caller to add
4020 // headers to the request.
4021 func (c *ProjectsLocationsFederationsPatchCall) Header() http.Header {
4022 if c.header_ == nil {
4023 c.header_ = make(http.Header)
4024 }
4025 return c.header_
4026 }
4027
4028 func (c *ProjectsLocationsFederationsPatchCall) doRequest(alt string) (*http.Response, error) {
4029 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4030 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.federation)
4031 if err != nil {
4032 return nil, err
4033 }
4034 c.urlParams_.Set("alt", alt)
4035 c.urlParams_.Set("prettyPrint", "false")
4036 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
4037 urls += "?" + c.urlParams_.Encode()
4038 req, err := http.NewRequest("PATCH", urls, body)
4039 if err != nil {
4040 return nil, err
4041 }
4042 req.Header = reqHeaders
4043 googleapi.Expand(req.URL, map[string]string{
4044 "name": c.name,
4045 })
4046 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
4047 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4048 }
4049
4050 // Do executes the "metastore.projects.locations.federations.patch" call.
4051 // Any non-2xx status code is an error. Response headers are in either
4052 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4053 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4054 // whether the returned error was because http.StatusNotModified was returned.
4055 func (c *ProjectsLocationsFederationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4056 gensupport.SetOptions(c.urlParams_, opts...)
4057 res, err := c.doRequest("json")
4058 if res != nil && res.StatusCode == http.StatusNotModified {
4059 if res.Body != nil {
4060 res.Body.Close()
4061 }
4062 return nil, gensupport.WrapError(&googleapi.Error{
4063 Code: res.StatusCode,
4064 Header: res.Header,
4065 })
4066 }
4067 if err != nil {
4068 return nil, err
4069 }
4070 defer googleapi.CloseBody(res)
4071 if err := googleapi.CheckResponse(res); err != nil {
4072 return nil, gensupport.WrapError(err)
4073 }
4074 ret := &Operation{
4075 ServerResponse: googleapi.ServerResponse{
4076 Header: res.Header,
4077 HTTPStatusCode: res.StatusCode,
4078 },
4079 }
4080 target := &ret
4081 b, err := gensupport.DecodeResponseBytes(target, res)
4082 if err != nil {
4083 return nil, err
4084 }
4085 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.patch", "response", internallog.HTTPResponse(res, b))
4086 return ret, nil
4087 }
4088
4089 type ProjectsLocationsFederationsSetIamPolicyCall struct {
4090 s *APIService
4091 resource string
4092 setiampolicyrequest *SetIamPolicyRequest
4093 urlParams_ gensupport.URLParams
4094 ctx_ context.Context
4095 header_ http.Header
4096 }
4097
4098 // SetIamPolicy: Sets the access control policy on the specified resource.
4099 // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
4100 // PERMISSION_DENIED errors.
4101 //
4102 // - resource: REQUIRED: The resource for which the policy is being specified.
4103 // See Resource names (https://cloud.google.com/apis/design/resource_names)
4104 // for the appropriate value for this field.
4105 func (r *ProjectsLocationsFederationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFederationsSetIamPolicyCall {
4106 c := &ProjectsLocationsFederationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4107 c.resource = resource
4108 c.setiampolicyrequest = setiampolicyrequest
4109 return c
4110 }
4111
4112 // Fields allows partial responses to be retrieved. See
4113 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4114 // details.
4115 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsSetIamPolicyCall {
4116 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4117 return c
4118 }
4119
4120 // Context sets the context to be used in this call's Do method.
4121 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsSetIamPolicyCall {
4122 c.ctx_ = ctx
4123 return c
4124 }
4125
4126 // Header returns a http.Header that can be modified by the caller to add
4127 // headers to the request.
4128 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Header() http.Header {
4129 if c.header_ == nil {
4130 c.header_ = make(http.Header)
4131 }
4132 return c.header_
4133 }
4134
4135 func (c *ProjectsLocationsFederationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4136 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4137 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
4138 if err != nil {
4139 return nil, err
4140 }
4141 c.urlParams_.Set("alt", alt)
4142 c.urlParams_.Set("prettyPrint", "false")
4143 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
4144 urls += "?" + c.urlParams_.Encode()
4145 req, err := http.NewRequest("POST", urls, body)
4146 if err != nil {
4147 return nil, err
4148 }
4149 req.Header = reqHeaders
4150 googleapi.Expand(req.URL, map[string]string{
4151 "resource": c.resource,
4152 })
4153 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
4154 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4155 }
4156
4157 // Do executes the "metastore.projects.locations.federations.setIamPolicy" call.
4158 // Any non-2xx status code is an error. Response headers are in either
4159 // *Policy.ServerResponse.Header or (if a response was returned at all) in
4160 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4161 // whether the returned error was because http.StatusNotModified was returned.
4162 func (c *ProjectsLocationsFederationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4163 gensupport.SetOptions(c.urlParams_, opts...)
4164 res, err := c.doRequest("json")
4165 if res != nil && res.StatusCode == http.StatusNotModified {
4166 if res.Body != nil {
4167 res.Body.Close()
4168 }
4169 return nil, gensupport.WrapError(&googleapi.Error{
4170 Code: res.StatusCode,
4171 Header: res.Header,
4172 })
4173 }
4174 if err != nil {
4175 return nil, err
4176 }
4177 defer googleapi.CloseBody(res)
4178 if err := googleapi.CheckResponse(res); err != nil {
4179 return nil, gensupport.WrapError(err)
4180 }
4181 ret := &Policy{
4182 ServerResponse: googleapi.ServerResponse{
4183 Header: res.Header,
4184 HTTPStatusCode: res.StatusCode,
4185 },
4186 }
4187 target := &ret
4188 b, err := gensupport.DecodeResponseBytes(target, res)
4189 if err != nil {
4190 return nil, err
4191 }
4192 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.setIamPolicy", "response", internallog.HTTPResponse(res, b))
4193 return ret, nil
4194 }
4195
4196 type ProjectsLocationsFederationsTestIamPermissionsCall struct {
4197 s *APIService
4198 resource string
4199 testiampermissionsrequest *TestIamPermissionsRequest
4200 urlParams_ gensupport.URLParams
4201 ctx_ context.Context
4202 header_ http.Header
4203 }
4204
4205 // TestIamPermissions: Returns permissions that a caller has on the specified
4206 // resource. If the resource does not exist, this will return an empty set of
4207 // permissions, not a NOT_FOUND error.Note: This operation is designed to be
4208 // used for building permission-aware UIs and command-line tools, not for
4209 // authorization checking. This operation may "fail open" without warning.
4210 //
4211 // - resource: REQUIRED: The resource for which the policy detail is being
4212 // requested. See Resource names
4213 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
4214 // value for this field.
4215 func (r *ProjectsLocationsFederationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFederationsTestIamPermissionsCall {
4216 c := &ProjectsLocationsFederationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4217 c.resource = resource
4218 c.testiampermissionsrequest = testiampermissionsrequest
4219 return c
4220 }
4221
4222 // Fields allows partial responses to be retrieved. See
4223 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4224 // details.
4225 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsTestIamPermissionsCall {
4226 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4227 return c
4228 }
4229
4230 // Context sets the context to be used in this call's Do method.
4231 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFederationsTestIamPermissionsCall {
4232 c.ctx_ = ctx
4233 return c
4234 }
4235
4236 // Header returns a http.Header that can be modified by the caller to add
4237 // headers to the request.
4238 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Header() http.Header {
4239 if c.header_ == nil {
4240 c.header_ = make(http.Header)
4241 }
4242 return c.header_
4243 }
4244
4245 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4246 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4247 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
4248 if err != nil {
4249 return nil, err
4250 }
4251 c.urlParams_.Set("alt", alt)
4252 c.urlParams_.Set("prettyPrint", "false")
4253 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
4254 urls += "?" + c.urlParams_.Encode()
4255 req, err := http.NewRequest("POST", urls, body)
4256 if err != nil {
4257 return nil, err
4258 }
4259 req.Header = reqHeaders
4260 googleapi.Expand(req.URL, map[string]string{
4261 "resource": c.resource,
4262 })
4263 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
4264 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4265 }
4266
4267 // Do executes the "metastore.projects.locations.federations.testIamPermissions" call.
4268 // Any non-2xx status code is an error. Response headers are in either
4269 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
4270 // returned at all) in error.(*googleapi.Error).Header. Use
4271 // googleapi.IsNotModified to check whether the returned error was because
4272 // http.StatusNotModified was returned.
4273 func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4274 gensupport.SetOptions(c.urlParams_, opts...)
4275 res, err := c.doRequest("json")
4276 if res != nil && res.StatusCode == http.StatusNotModified {
4277 if res.Body != nil {
4278 res.Body.Close()
4279 }
4280 return nil, gensupport.WrapError(&googleapi.Error{
4281 Code: res.StatusCode,
4282 Header: res.Header,
4283 })
4284 }
4285 if err != nil {
4286 return nil, err
4287 }
4288 defer googleapi.CloseBody(res)
4289 if err := googleapi.CheckResponse(res); err != nil {
4290 return nil, gensupport.WrapError(err)
4291 }
4292 ret := &TestIamPermissionsResponse{
4293 ServerResponse: googleapi.ServerResponse{
4294 Header: res.Header,
4295 HTTPStatusCode: res.StatusCode,
4296 },
4297 }
4298 target := &ret
4299 b, err := gensupport.DecodeResponseBytes(target, res)
4300 if err != nil {
4301 return nil, err
4302 }
4303 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.federations.testIamPermissions", "response", internallog.HTTPResponse(res, b))
4304 return ret, nil
4305 }
4306
4307 type ProjectsLocationsOperationsCancelCall struct {
4308 s *APIService
4309 name string
4310 canceloperationrequest *CancelOperationRequest
4311 urlParams_ gensupport.URLParams
4312 ctx_ context.Context
4313 header_ http.Header
4314 }
4315
4316 // Cancel: Starts asynchronous cancellation on a long-running operation. The
4317 // server makes a best effort to cancel the operation, but success is not
4318 // guaranteed. If the server doesn't support this method, it returns
4319 // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
4320 // other methods to check whether the cancellation succeeded or whether the
4321 // operation completed despite cancellation. On successful cancellation, the
4322 // operation is not deleted; instead, it becomes an operation with an
4323 // Operation.error value with a google.rpc.Status.code of 1, corresponding to
4324 // Code.CANCELLED.
4325 //
4326 // - name: The name of the operation resource to be cancelled.
4327 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
4328 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4329 c.name = name
4330 c.canceloperationrequest = canceloperationrequest
4331 return c
4332 }
4333
4334 // Fields allows partial responses to be retrieved. See
4335 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4336 // details.
4337 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
4338 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4339 return c
4340 }
4341
4342 // Context sets the context to be used in this call's Do method.
4343 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
4344 c.ctx_ = ctx
4345 return c
4346 }
4347
4348 // Header returns a http.Header that can be modified by the caller to add
4349 // headers to the request.
4350 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
4351 if c.header_ == nil {
4352 c.header_ = make(http.Header)
4353 }
4354 return c.header_
4355 }
4356
4357 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
4358 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4359 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.canceloperationrequest)
4360 if err != nil {
4361 return nil, err
4362 }
4363 c.urlParams_.Set("alt", alt)
4364 c.urlParams_.Set("prettyPrint", "false")
4365 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel")
4366 urls += "?" + c.urlParams_.Encode()
4367 req, err := http.NewRequest("POST", urls, body)
4368 if err != nil {
4369 return nil, err
4370 }
4371 req.Header = reqHeaders
4372 googleapi.Expand(req.URL, map[string]string{
4373 "name": c.name,
4374 })
4375 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.cancel", "request", internallog.HTTPRequest(req, body.Bytes()))
4376 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4377 }
4378
4379 // Do executes the "metastore.projects.locations.operations.cancel" call.
4380 // Any non-2xx status code is an error. Response headers are in either
4381 // *Empty.ServerResponse.Header or (if a response was returned at all) in
4382 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4383 // whether the returned error was because http.StatusNotModified was returned.
4384 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4385 gensupport.SetOptions(c.urlParams_, opts...)
4386 res, err := c.doRequest("json")
4387 if res != nil && res.StatusCode == http.StatusNotModified {
4388 if res.Body != nil {
4389 res.Body.Close()
4390 }
4391 return nil, gensupport.WrapError(&googleapi.Error{
4392 Code: res.StatusCode,
4393 Header: res.Header,
4394 })
4395 }
4396 if err != nil {
4397 return nil, err
4398 }
4399 defer googleapi.CloseBody(res)
4400 if err := googleapi.CheckResponse(res); err != nil {
4401 return nil, gensupport.WrapError(err)
4402 }
4403 ret := &Empty{
4404 ServerResponse: googleapi.ServerResponse{
4405 Header: res.Header,
4406 HTTPStatusCode: res.StatusCode,
4407 },
4408 }
4409 target := &ret
4410 b, err := gensupport.DecodeResponseBytes(target, res)
4411 if err != nil {
4412 return nil, err
4413 }
4414 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.cancel", "response", internallog.HTTPResponse(res, b))
4415 return ret, nil
4416 }
4417
4418 type ProjectsLocationsOperationsDeleteCall struct {
4419 s *APIService
4420 name string
4421 urlParams_ gensupport.URLParams
4422 ctx_ context.Context
4423 header_ http.Header
4424 }
4425
4426 // Delete: Deletes a long-running operation. This method indicates that the
4427 // client is no longer interested in the operation result. It does not cancel
4428 // the operation. If the server doesn't support this method, it returns
4429 // google.rpc.Code.UNIMPLEMENTED.
4430 //
4431 // - name: The name of the operation resource to be deleted.
4432 func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
4433 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4434 c.name = name
4435 return c
4436 }
4437
4438 // Fields allows partial responses to be retrieved. See
4439 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4440 // details.
4441 func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
4442 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4443 return c
4444 }
4445
4446 // Context sets the context to be used in this call's Do method.
4447 func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
4448 c.ctx_ = ctx
4449 return c
4450 }
4451
4452 // Header returns a http.Header that can be modified by the caller to add
4453 // headers to the request.
4454 func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
4455 if c.header_ == nil {
4456 c.header_ = make(http.Header)
4457 }
4458 return c.header_
4459 }
4460
4461 func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
4462 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4463 c.urlParams_.Set("alt", alt)
4464 c.urlParams_.Set("prettyPrint", "false")
4465 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
4466 urls += "?" + c.urlParams_.Encode()
4467 req, err := http.NewRequest("DELETE", urls, nil)
4468 if err != nil {
4469 return nil, err
4470 }
4471 req.Header = reqHeaders
4472 googleapi.Expand(req.URL, map[string]string{
4473 "name": c.name,
4474 })
4475 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.delete", "request", internallog.HTTPRequest(req, nil))
4476 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4477 }
4478
4479 // Do executes the "metastore.projects.locations.operations.delete" call.
4480 // Any non-2xx status code is an error. Response headers are in either
4481 // *Empty.ServerResponse.Header or (if a response was returned at all) in
4482 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4483 // whether the returned error was because http.StatusNotModified was returned.
4484 func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4485 gensupport.SetOptions(c.urlParams_, opts...)
4486 res, err := c.doRequest("json")
4487 if res != nil && res.StatusCode == http.StatusNotModified {
4488 if res.Body != nil {
4489 res.Body.Close()
4490 }
4491 return nil, gensupport.WrapError(&googleapi.Error{
4492 Code: res.StatusCode,
4493 Header: res.Header,
4494 })
4495 }
4496 if err != nil {
4497 return nil, err
4498 }
4499 defer googleapi.CloseBody(res)
4500 if err := googleapi.CheckResponse(res); err != nil {
4501 return nil, gensupport.WrapError(err)
4502 }
4503 ret := &Empty{
4504 ServerResponse: googleapi.ServerResponse{
4505 Header: res.Header,
4506 HTTPStatusCode: res.StatusCode,
4507 },
4508 }
4509 target := &ret
4510 b, err := gensupport.DecodeResponseBytes(target, res)
4511 if err != nil {
4512 return nil, err
4513 }
4514 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.delete", "response", internallog.HTTPResponse(res, b))
4515 return ret, nil
4516 }
4517
4518 type ProjectsLocationsOperationsGetCall struct {
4519 s *APIService
4520 name string
4521 urlParams_ gensupport.URLParams
4522 ifNoneMatch_ string
4523 ctx_ context.Context
4524 header_ http.Header
4525 }
4526
4527 // Get: Gets the latest state of a long-running operation. Clients can use this
4528 // method to poll the operation result at intervals as recommended by the API
4529 // service.
4530 //
4531 // - name: The name of the operation resource.
4532 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
4533 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4534 c.name = name
4535 return c
4536 }
4537
4538 // Fields allows partial responses to be retrieved. See
4539 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4540 // details.
4541 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
4542 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4543 return c
4544 }
4545
4546 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4547 // object's ETag matches the given value. This is useful for getting updates
4548 // only after the object has changed since the last request.
4549 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
4550 c.ifNoneMatch_ = entityTag
4551 return c
4552 }
4553
4554 // Context sets the context to be used in this call's Do method.
4555 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
4556 c.ctx_ = ctx
4557 return c
4558 }
4559
4560 // Header returns a http.Header that can be modified by the caller to add
4561 // headers to the request.
4562 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
4563 if c.header_ == nil {
4564 c.header_ = make(http.Header)
4565 }
4566 return c.header_
4567 }
4568
4569 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
4570 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4571 if c.ifNoneMatch_ != "" {
4572 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4573 }
4574 c.urlParams_.Set("alt", alt)
4575 c.urlParams_.Set("prettyPrint", "false")
4576 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
4577 urls += "?" + c.urlParams_.Encode()
4578 req, err := http.NewRequest("GET", urls, nil)
4579 if err != nil {
4580 return nil, err
4581 }
4582 req.Header = reqHeaders
4583 googleapi.Expand(req.URL, map[string]string{
4584 "name": c.name,
4585 })
4586 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.get", "request", internallog.HTTPRequest(req, nil))
4587 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4588 }
4589
4590 // Do executes the "metastore.projects.locations.operations.get" call.
4591 // Any non-2xx status code is an error. Response headers are in either
4592 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4593 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4594 // whether the returned error was because http.StatusNotModified was returned.
4595 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4596 gensupport.SetOptions(c.urlParams_, opts...)
4597 res, err := c.doRequest("json")
4598 if res != nil && res.StatusCode == http.StatusNotModified {
4599 if res.Body != nil {
4600 res.Body.Close()
4601 }
4602 return nil, gensupport.WrapError(&googleapi.Error{
4603 Code: res.StatusCode,
4604 Header: res.Header,
4605 })
4606 }
4607 if err != nil {
4608 return nil, err
4609 }
4610 defer googleapi.CloseBody(res)
4611 if err := googleapi.CheckResponse(res); err != nil {
4612 return nil, gensupport.WrapError(err)
4613 }
4614 ret := &Operation{
4615 ServerResponse: googleapi.ServerResponse{
4616 Header: res.Header,
4617 HTTPStatusCode: res.StatusCode,
4618 },
4619 }
4620 target := &ret
4621 b, err := gensupport.DecodeResponseBytes(target, res)
4622 if err != nil {
4623 return nil, err
4624 }
4625 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.get", "response", internallog.HTTPResponse(res, b))
4626 return ret, nil
4627 }
4628
4629 type ProjectsLocationsOperationsListCall struct {
4630 s *APIService
4631 name string
4632 urlParams_ gensupport.URLParams
4633 ifNoneMatch_ string
4634 ctx_ context.Context
4635 header_ http.Header
4636 }
4637
4638 // List: Lists operations that match the specified filter in the request. If
4639 // the server doesn't support this method, it returns UNIMPLEMENTED.
4640 //
4641 // - name: The name of the operation's parent resource.
4642 func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
4643 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4644 c.name = name
4645 return c
4646 }
4647
4648 // Filter sets the optional parameter "filter": The standard list filter.
4649 func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
4650 c.urlParams_.Set("filter", filter)
4651 return c
4652 }
4653
4654 // PageSize sets the optional parameter "pageSize": The standard list page
4655 // size.
4656 func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
4657 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4658 return c
4659 }
4660
4661 // PageToken sets the optional parameter "pageToken": The standard list page
4662 // token.
4663 func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
4664 c.urlParams_.Set("pageToken", pageToken)
4665 return c
4666 }
4667
4668 // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess":
4669 // When set to true, operations that are reachable are returned as normal, and
4670 // those that are unreachable are returned in the
4671 // ListOperationsResponse.unreachable field.This can only be true when reading
4672 // across collections. For example, when parent is set to
4673 // "projects/example/locations/-".This field is not supported by default and
4674 // will result in an UNIMPLEMENTED error if set unless explicitly documented
4675 // otherwise in service or product specific documentation.
4676 func (c *ProjectsLocationsOperationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsLocationsOperationsListCall {
4677 c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess))
4678 return c
4679 }
4680
4681 // Fields allows partial responses to be retrieved. See
4682 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4683 // details.
4684 func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
4685 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4686 return c
4687 }
4688
4689 // IfNoneMatch sets an optional parameter which makes the operation fail if the
4690 // object's ETag matches the given value. This is useful for getting updates
4691 // only after the object has changed since the last request.
4692 func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
4693 c.ifNoneMatch_ = entityTag
4694 return c
4695 }
4696
4697 // Context sets the context to be used in this call's Do method.
4698 func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
4699 c.ctx_ = ctx
4700 return c
4701 }
4702
4703 // Header returns a http.Header that can be modified by the caller to add
4704 // headers to the request.
4705 func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
4706 if c.header_ == nil {
4707 c.header_ = make(http.Header)
4708 }
4709 return c.header_
4710 }
4711
4712 func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
4713 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
4714 if c.ifNoneMatch_ != "" {
4715 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4716 }
4717 c.urlParams_.Set("alt", alt)
4718 c.urlParams_.Set("prettyPrint", "false")
4719 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations")
4720 urls += "?" + c.urlParams_.Encode()
4721 req, err := http.NewRequest("GET", urls, nil)
4722 if err != nil {
4723 return nil, err
4724 }
4725 req.Header = reqHeaders
4726 googleapi.Expand(req.URL, map[string]string{
4727 "name": c.name,
4728 })
4729 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.list", "request", internallog.HTTPRequest(req, nil))
4730 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4731 }
4732
4733 // Do executes the "metastore.projects.locations.operations.list" call.
4734 // Any non-2xx status code is an error. Response headers are in either
4735 // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
4736 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4737 // check whether the returned error was because http.StatusNotModified was
4738 // returned.
4739 func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
4740 gensupport.SetOptions(c.urlParams_, opts...)
4741 res, err := c.doRequest("json")
4742 if res != nil && res.StatusCode == http.StatusNotModified {
4743 if res.Body != nil {
4744 res.Body.Close()
4745 }
4746 return nil, gensupport.WrapError(&googleapi.Error{
4747 Code: res.StatusCode,
4748 Header: res.Header,
4749 })
4750 }
4751 if err != nil {
4752 return nil, err
4753 }
4754 defer googleapi.CloseBody(res)
4755 if err := googleapi.CheckResponse(res); err != nil {
4756 return nil, gensupport.WrapError(err)
4757 }
4758 ret := &ListOperationsResponse{
4759 ServerResponse: googleapi.ServerResponse{
4760 Header: res.Header,
4761 HTTPStatusCode: res.StatusCode,
4762 },
4763 }
4764 target := &ret
4765 b, err := gensupport.DecodeResponseBytes(target, res)
4766 if err != nil {
4767 return nil, err
4768 }
4769 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.operations.list", "response", internallog.HTTPResponse(res, b))
4770 return ret, nil
4771 }
4772
4773 // Pages invokes f for each page of results.
4774 // A non-nil error returned from f will halt the iteration.
4775 // The provided context supersedes any context provided to the Context method.
4776 func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
4777 c.ctx_ = ctx
4778 defer c.PageToken(c.urlParams_.Get("pageToken"))
4779 for {
4780 x, err := c.Do()
4781 if err != nil {
4782 return err
4783 }
4784 if err := f(x); err != nil {
4785 return err
4786 }
4787 if x.NextPageToken == "" {
4788 return nil
4789 }
4790 c.PageToken(x.NextPageToken)
4791 }
4792 }
4793
4794 type ProjectsLocationsServicesAlterLocationCall struct {
4795 s *APIService
4796 service string
4797 altermetadataresourcelocationrequest *AlterMetadataResourceLocationRequest
4798 urlParams_ gensupport.URLParams
4799 ctx_ context.Context
4800 header_ http.Header
4801 }
4802
4803 // AlterLocation: Alter metadata resource location. The metadata resource can
4804 // be a database, table, or partition. This functionality only updates the
4805 // parent directory for the respective metadata resource and does not transfer
4806 // any existing data to the new location.
4807 //
4808 // - service: The relative resource name of the metastore service to mutate
4809 // metadata, in the following
4810 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
4811 func (r *ProjectsLocationsServicesService) AlterLocation(service string, altermetadataresourcelocationrequest *AlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall {
4812 c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4813 c.service = service
4814 c.altermetadataresourcelocationrequest = altermetadataresourcelocationrequest
4815 return c
4816 }
4817
4818 // Fields allows partial responses to be retrieved. See
4819 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4820 // details.
4821 func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall {
4822 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4823 return c
4824 }
4825
4826 // Context sets the context to be used in this call's Do method.
4827 func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall {
4828 c.ctx_ = ctx
4829 return c
4830 }
4831
4832 // Header returns a http.Header that can be modified by the caller to add
4833 // headers to the request.
4834 func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header {
4835 if c.header_ == nil {
4836 c.header_ = make(http.Header)
4837 }
4838 return c.header_
4839 }
4840
4841 func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) {
4842 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4843 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.altermetadataresourcelocationrequest)
4844 if err != nil {
4845 return nil, err
4846 }
4847 c.urlParams_.Set("alt", alt)
4848 c.urlParams_.Set("prettyPrint", "false")
4849 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:alterLocation")
4850 urls += "?" + c.urlParams_.Encode()
4851 req, err := http.NewRequest("POST", urls, body)
4852 if err != nil {
4853 return nil, err
4854 }
4855 req.Header = reqHeaders
4856 googleapi.Expand(req.URL, map[string]string{
4857 "service": c.service,
4858 })
4859 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterLocation", "request", internallog.HTTPRequest(req, body.Bytes()))
4860 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4861 }
4862
4863 // Do executes the "metastore.projects.locations.services.alterLocation" call.
4864 // Any non-2xx status code is an error. Response headers are in either
4865 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4866 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4867 // whether the returned error was because http.StatusNotModified was returned.
4868 func (c *ProjectsLocationsServicesAlterLocationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4869 gensupport.SetOptions(c.urlParams_, opts...)
4870 res, err := c.doRequest("json")
4871 if res != nil && res.StatusCode == http.StatusNotModified {
4872 if res.Body != nil {
4873 res.Body.Close()
4874 }
4875 return nil, gensupport.WrapError(&googleapi.Error{
4876 Code: res.StatusCode,
4877 Header: res.Header,
4878 })
4879 }
4880 if err != nil {
4881 return nil, err
4882 }
4883 defer googleapi.CloseBody(res)
4884 if err := googleapi.CheckResponse(res); err != nil {
4885 return nil, gensupport.WrapError(err)
4886 }
4887 ret := &Operation{
4888 ServerResponse: googleapi.ServerResponse{
4889 Header: res.Header,
4890 HTTPStatusCode: res.StatusCode,
4891 },
4892 }
4893 target := &ret
4894 b, err := gensupport.DecodeResponseBytes(target, res)
4895 if err != nil {
4896 return nil, err
4897 }
4898 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterLocation", "response", internallog.HTTPResponse(res, b))
4899 return ret, nil
4900 }
4901
4902 type ProjectsLocationsServicesAlterTablePropertiesCall struct {
4903 s *APIService
4904 service string
4905 altertablepropertiesrequest *AlterTablePropertiesRequest
4906 urlParams_ gensupport.URLParams
4907 ctx_ context.Context
4908 header_ http.Header
4909 }
4910
4911 // AlterTableProperties: Alter metadata table properties.
4912 //
4913 // - service: The relative resource name of the Dataproc Metastore service
4914 // that's being used to mutate metadata table properties, in the following
4915 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
4916 func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, altertablepropertiesrequest *AlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall {
4917 c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4918 c.service = service
4919 c.altertablepropertiesrequest = altertablepropertiesrequest
4920 return c
4921 }
4922
4923 // Fields allows partial responses to be retrieved. See
4924 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
4925 // details.
4926 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall {
4927 c.urlParams_.Set("fields", googleapi.CombineFields(s))
4928 return c
4929 }
4930
4931 // Context sets the context to be used in this call's Do method.
4932 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall {
4933 c.ctx_ = ctx
4934 return c
4935 }
4936
4937 // Header returns a http.Header that can be modified by the caller to add
4938 // headers to the request.
4939 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header {
4940 if c.header_ == nil {
4941 c.header_ = make(http.Header)
4942 }
4943 return c.header_
4944 }
4945
4946 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) {
4947 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
4948 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.altertablepropertiesrequest)
4949 if err != nil {
4950 return nil, err
4951 }
4952 c.urlParams_.Set("alt", alt)
4953 c.urlParams_.Set("prettyPrint", "false")
4954 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:alterTableProperties")
4955 urls += "?" + c.urlParams_.Encode()
4956 req, err := http.NewRequest("POST", urls, body)
4957 if err != nil {
4958 return nil, err
4959 }
4960 req.Header = reqHeaders
4961 googleapi.Expand(req.URL, map[string]string{
4962 "service": c.service,
4963 })
4964 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterTableProperties", "request", internallog.HTTPRequest(req, body.Bytes()))
4965 return gensupport.SendRequest(c.ctx_, c.s.client, req)
4966 }
4967
4968 // Do executes the "metastore.projects.locations.services.alterTableProperties" call.
4969 // Any non-2xx status code is an error. Response headers are in either
4970 // *Operation.ServerResponse.Header or (if a response was returned at all) in
4971 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4972 // whether the returned error was because http.StatusNotModified was returned.
4973 func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
4974 gensupport.SetOptions(c.urlParams_, opts...)
4975 res, err := c.doRequest("json")
4976 if res != nil && res.StatusCode == http.StatusNotModified {
4977 if res.Body != nil {
4978 res.Body.Close()
4979 }
4980 return nil, gensupport.WrapError(&googleapi.Error{
4981 Code: res.StatusCode,
4982 Header: res.Header,
4983 })
4984 }
4985 if err != nil {
4986 return nil, err
4987 }
4988 defer googleapi.CloseBody(res)
4989 if err := googleapi.CheckResponse(res); err != nil {
4990 return nil, gensupport.WrapError(err)
4991 }
4992 ret := &Operation{
4993 ServerResponse: googleapi.ServerResponse{
4994 Header: res.Header,
4995 HTTPStatusCode: res.StatusCode,
4996 },
4997 }
4998 target := &ret
4999 b, err := gensupport.DecodeResponseBytes(target, res)
5000 if err != nil {
5001 return nil, err
5002 }
5003 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.alterTableProperties", "response", internallog.HTTPResponse(res, b))
5004 return ret, nil
5005 }
5006
5007 type ProjectsLocationsServicesCancelMigrationCall struct {
5008 s *APIService
5009 service string
5010 cancelmigrationrequest *CancelMigrationRequest
5011 urlParams_ gensupport.URLParams
5012 ctx_ context.Context
5013 header_ http.Header
5014 }
5015
5016 // CancelMigration: Cancels the ongoing Managed Migration process.
5017 //
5018 // - service: The relative resource name of the metastore service to cancel the
5019 // ongoing migration to, in the following
5020 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
5021 func (r *ProjectsLocationsServicesService) CancelMigration(service string, cancelmigrationrequest *CancelMigrationRequest) *ProjectsLocationsServicesCancelMigrationCall {
5022 c := &ProjectsLocationsServicesCancelMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5023 c.service = service
5024 c.cancelmigrationrequest = cancelmigrationrequest
5025 return c
5026 }
5027
5028 // Fields allows partial responses to be retrieved. See
5029 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5030 // details.
5031 func (c *ProjectsLocationsServicesCancelMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCancelMigrationCall {
5032 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5033 return c
5034 }
5035
5036 // Context sets the context to be used in this call's Do method.
5037 func (c *ProjectsLocationsServicesCancelMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCancelMigrationCall {
5038 c.ctx_ = ctx
5039 return c
5040 }
5041
5042 // Header returns a http.Header that can be modified by the caller to add
5043 // headers to the request.
5044 func (c *ProjectsLocationsServicesCancelMigrationCall) Header() http.Header {
5045 if c.header_ == nil {
5046 c.header_ = make(http.Header)
5047 }
5048 return c.header_
5049 }
5050
5051 func (c *ProjectsLocationsServicesCancelMigrationCall) doRequest(alt string) (*http.Response, error) {
5052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5053 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.cancelmigrationrequest)
5054 if err != nil {
5055 return nil, err
5056 }
5057 c.urlParams_.Set("alt", alt)
5058 c.urlParams_.Set("prettyPrint", "false")
5059 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:cancelMigration")
5060 urls += "?" + c.urlParams_.Encode()
5061 req, err := http.NewRequest("POST", urls, body)
5062 if err != nil {
5063 return nil, err
5064 }
5065 req.Header = reqHeaders
5066 googleapi.Expand(req.URL, map[string]string{
5067 "service": c.service,
5068 })
5069 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.cancelMigration", "request", internallog.HTTPRequest(req, body.Bytes()))
5070 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5071 }
5072
5073 // Do executes the "metastore.projects.locations.services.cancelMigration" call.
5074 // Any non-2xx status code is an error. Response headers are in either
5075 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5076 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5077 // whether the returned error was because http.StatusNotModified was returned.
5078 func (c *ProjectsLocationsServicesCancelMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5079 gensupport.SetOptions(c.urlParams_, opts...)
5080 res, err := c.doRequest("json")
5081 if res != nil && res.StatusCode == http.StatusNotModified {
5082 if res.Body != nil {
5083 res.Body.Close()
5084 }
5085 return nil, gensupport.WrapError(&googleapi.Error{
5086 Code: res.StatusCode,
5087 Header: res.Header,
5088 })
5089 }
5090 if err != nil {
5091 return nil, err
5092 }
5093 defer googleapi.CloseBody(res)
5094 if err := googleapi.CheckResponse(res); err != nil {
5095 return nil, gensupport.WrapError(err)
5096 }
5097 ret := &Operation{
5098 ServerResponse: googleapi.ServerResponse{
5099 Header: res.Header,
5100 HTTPStatusCode: res.StatusCode,
5101 },
5102 }
5103 target := &ret
5104 b, err := gensupport.DecodeResponseBytes(target, res)
5105 if err != nil {
5106 return nil, err
5107 }
5108 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.cancelMigration", "response", internallog.HTTPResponse(res, b))
5109 return ret, nil
5110 }
5111
5112 type ProjectsLocationsServicesCompleteMigrationCall struct {
5113 s *APIService
5114 service string
5115 completemigrationrequest *CompleteMigrationRequest
5116 urlParams_ gensupport.URLParams
5117 ctx_ context.Context
5118 header_ http.Header
5119 }
5120
5121 // CompleteMigration: Completes the managed migration process. The Dataproc
5122 // Metastore service will switch to using its own backend database after
5123 // successful migration.
5124 //
5125 // - service: The relative resource name of the metastore service to complete
5126 // the migration to, in the following
5127 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
5128 func (r *ProjectsLocationsServicesService) CompleteMigration(service string, completemigrationrequest *CompleteMigrationRequest) *ProjectsLocationsServicesCompleteMigrationCall {
5129 c := &ProjectsLocationsServicesCompleteMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5130 c.service = service
5131 c.completemigrationrequest = completemigrationrequest
5132 return c
5133 }
5134
5135 // Fields allows partial responses to be retrieved. See
5136 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5137 // details.
5138 func (c *ProjectsLocationsServicesCompleteMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCompleteMigrationCall {
5139 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5140 return c
5141 }
5142
5143 // Context sets the context to be used in this call's Do method.
5144 func (c *ProjectsLocationsServicesCompleteMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCompleteMigrationCall {
5145 c.ctx_ = ctx
5146 return c
5147 }
5148
5149 // Header returns a http.Header that can be modified by the caller to add
5150 // headers to the request.
5151 func (c *ProjectsLocationsServicesCompleteMigrationCall) Header() http.Header {
5152 if c.header_ == nil {
5153 c.header_ = make(http.Header)
5154 }
5155 return c.header_
5156 }
5157
5158 func (c *ProjectsLocationsServicesCompleteMigrationCall) doRequest(alt string) (*http.Response, error) {
5159 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5160 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.completemigrationrequest)
5161 if err != nil {
5162 return nil, err
5163 }
5164 c.urlParams_.Set("alt", alt)
5165 c.urlParams_.Set("prettyPrint", "false")
5166 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:completeMigration")
5167 urls += "?" + c.urlParams_.Encode()
5168 req, err := http.NewRequest("POST", urls, body)
5169 if err != nil {
5170 return nil, err
5171 }
5172 req.Header = reqHeaders
5173 googleapi.Expand(req.URL, map[string]string{
5174 "service": c.service,
5175 })
5176 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.completeMigration", "request", internallog.HTTPRequest(req, body.Bytes()))
5177 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5178 }
5179
5180 // Do executes the "metastore.projects.locations.services.completeMigration" call.
5181 // Any non-2xx status code is an error. Response headers are in either
5182 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5183 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5184 // whether the returned error was because http.StatusNotModified was returned.
5185 func (c *ProjectsLocationsServicesCompleteMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5186 gensupport.SetOptions(c.urlParams_, opts...)
5187 res, err := c.doRequest("json")
5188 if res != nil && res.StatusCode == http.StatusNotModified {
5189 if res.Body != nil {
5190 res.Body.Close()
5191 }
5192 return nil, gensupport.WrapError(&googleapi.Error{
5193 Code: res.StatusCode,
5194 Header: res.Header,
5195 })
5196 }
5197 if err != nil {
5198 return nil, err
5199 }
5200 defer googleapi.CloseBody(res)
5201 if err := googleapi.CheckResponse(res); err != nil {
5202 return nil, gensupport.WrapError(err)
5203 }
5204 ret := &Operation{
5205 ServerResponse: googleapi.ServerResponse{
5206 Header: res.Header,
5207 HTTPStatusCode: res.StatusCode,
5208 },
5209 }
5210 target := &ret
5211 b, err := gensupport.DecodeResponseBytes(target, res)
5212 if err != nil {
5213 return nil, err
5214 }
5215 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.completeMigration", "response", internallog.HTTPResponse(res, b))
5216 return ret, nil
5217 }
5218
5219 type ProjectsLocationsServicesCreateCall struct {
5220 s *APIService
5221 parent string
5222 service *Service
5223 urlParams_ gensupport.URLParams
5224 ctx_ context.Context
5225 header_ http.Header
5226 }
5227
5228 // Create: Creates a metastore service in a project and location.
5229 //
5230 // - parent: The relative resource name of the location in which to create a
5231 // metastore service, in the following
5232 // form:projects/{project_number}/locations/{location_id}.
5233 func (r *ProjectsLocationsServicesService) Create(parent string, service *Service) *ProjectsLocationsServicesCreateCall {
5234 c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5235 c.parent = parent
5236 c.service = service
5237 return c
5238 }
5239
5240 // RequestId sets the optional parameter "requestId": A request ID. Specify a
5241 // unique request ID to allow the server to ignore the request if it has
5242 // completed. The server will ignore subsequent requests that provide a
5243 // duplicate request ID for at least 60 minutes after the first request.For
5244 // example, if an initial request times out, followed by another request with
5245 // the same request ID, the server ignores the second request to prevent the
5246 // creation of duplicate commitments.The request ID must be a valid UUID
5247 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
5248 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
5249 func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall {
5250 c.urlParams_.Set("requestId", requestId)
5251 return c
5252 }
5253
5254 // ServiceId sets the optional parameter "serviceId": Required. The ID of the
5255 // metastore service, which is used as the final component of the metastore
5256 // service's name.This value must be between 2 and 63 characters long
5257 // inclusive, begin with a letter, end with a letter or number, and consist of
5258 // alpha-numeric ASCII characters or hyphens.
5259 func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall {
5260 c.urlParams_.Set("serviceId", serviceId)
5261 return c
5262 }
5263
5264 // Fields allows partial responses to be retrieved. See
5265 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5266 // details.
5267 func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall {
5268 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5269 return c
5270 }
5271
5272 // Context sets the context to be used in this call's Do method.
5273 func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall {
5274 c.ctx_ = ctx
5275 return c
5276 }
5277
5278 // Header returns a http.Header that can be modified by the caller to add
5279 // headers to the request.
5280 func (c *ProjectsLocationsServicesCreateCall) Header() http.Header {
5281 if c.header_ == nil {
5282 c.header_ = make(http.Header)
5283 }
5284 return c.header_
5285 }
5286
5287 func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) {
5288 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5289 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.service)
5290 if err != nil {
5291 return nil, err
5292 }
5293 c.urlParams_.Set("alt", alt)
5294 c.urlParams_.Set("prettyPrint", "false")
5295 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/services")
5296 urls += "?" + c.urlParams_.Encode()
5297 req, err := http.NewRequest("POST", urls, body)
5298 if err != nil {
5299 return nil, err
5300 }
5301 req.Header = reqHeaders
5302 googleapi.Expand(req.URL, map[string]string{
5303 "parent": c.parent,
5304 })
5305 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.create", "request", internallog.HTTPRequest(req, body.Bytes()))
5306 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5307 }
5308
5309 // Do executes the "metastore.projects.locations.services.create" call.
5310 // Any non-2xx status code is an error. Response headers are in either
5311 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5312 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5313 // whether the returned error was because http.StatusNotModified was returned.
5314 func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5315 gensupport.SetOptions(c.urlParams_, opts...)
5316 res, err := c.doRequest("json")
5317 if res != nil && res.StatusCode == http.StatusNotModified {
5318 if res.Body != nil {
5319 res.Body.Close()
5320 }
5321 return nil, gensupport.WrapError(&googleapi.Error{
5322 Code: res.StatusCode,
5323 Header: res.Header,
5324 })
5325 }
5326 if err != nil {
5327 return nil, err
5328 }
5329 defer googleapi.CloseBody(res)
5330 if err := googleapi.CheckResponse(res); err != nil {
5331 return nil, gensupport.WrapError(err)
5332 }
5333 ret := &Operation{
5334 ServerResponse: googleapi.ServerResponse{
5335 Header: res.Header,
5336 HTTPStatusCode: res.StatusCode,
5337 },
5338 }
5339 target := &ret
5340 b, err := gensupport.DecodeResponseBytes(target, res)
5341 if err != nil {
5342 return nil, err
5343 }
5344 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.create", "response", internallog.HTTPResponse(res, b))
5345 return ret, nil
5346 }
5347
5348 type ProjectsLocationsServicesDeleteCall struct {
5349 s *APIService
5350 name string
5351 urlParams_ gensupport.URLParams
5352 ctx_ context.Context
5353 header_ http.Header
5354 }
5355
5356 // Delete: Deletes a single service.
5357 //
5358 // - name: The relative resource name of the metastore service to delete, in
5359 // the following
5360 // form:projects/{project_number}/locations/{location_id}/services/{service_id
5361 // }.
5362 func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall {
5363 c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5364 c.name = name
5365 return c
5366 }
5367
5368 // RequestId sets the optional parameter "requestId": A request ID. Specify a
5369 // unique request ID to allow the server to ignore the request if it has
5370 // completed. The server will ignore subsequent requests that provide a
5371 // duplicate request ID for at least 60 minutes after the first request.For
5372 // example, if an initial request times out, followed by another request with
5373 // the same request ID, the server ignores the second request to prevent the
5374 // creation of duplicate commitments.The request ID must be a valid UUID
5375 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
5376 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
5377 func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall {
5378 c.urlParams_.Set("requestId", requestId)
5379 return c
5380 }
5381
5382 // Fields allows partial responses to be retrieved. See
5383 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5384 // details.
5385 func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall {
5386 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5387 return c
5388 }
5389
5390 // Context sets the context to be used in this call's Do method.
5391 func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall {
5392 c.ctx_ = ctx
5393 return c
5394 }
5395
5396 // Header returns a http.Header that can be modified by the caller to add
5397 // headers to the request.
5398 func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header {
5399 if c.header_ == nil {
5400 c.header_ = make(http.Header)
5401 }
5402 return c.header_
5403 }
5404
5405 func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
5406 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5407 c.urlParams_.Set("alt", alt)
5408 c.urlParams_.Set("prettyPrint", "false")
5409 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
5410 urls += "?" + c.urlParams_.Encode()
5411 req, err := http.NewRequest("DELETE", urls, nil)
5412 if err != nil {
5413 return nil, err
5414 }
5415 req.Header = reqHeaders
5416 googleapi.Expand(req.URL, map[string]string{
5417 "name": c.name,
5418 })
5419 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.delete", "request", internallog.HTTPRequest(req, nil))
5420 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5421 }
5422
5423 // Do executes the "metastore.projects.locations.services.delete" call.
5424 // Any non-2xx status code is an error. Response headers are in either
5425 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5426 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5427 // whether the returned error was because http.StatusNotModified was returned.
5428 func (c *ProjectsLocationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5429 gensupport.SetOptions(c.urlParams_, opts...)
5430 res, err := c.doRequest("json")
5431 if res != nil && res.StatusCode == http.StatusNotModified {
5432 if res.Body != nil {
5433 res.Body.Close()
5434 }
5435 return nil, gensupport.WrapError(&googleapi.Error{
5436 Code: res.StatusCode,
5437 Header: res.Header,
5438 })
5439 }
5440 if err != nil {
5441 return nil, err
5442 }
5443 defer googleapi.CloseBody(res)
5444 if err := googleapi.CheckResponse(res); err != nil {
5445 return nil, gensupport.WrapError(err)
5446 }
5447 ret := &Operation{
5448 ServerResponse: googleapi.ServerResponse{
5449 Header: res.Header,
5450 HTTPStatusCode: res.StatusCode,
5451 },
5452 }
5453 target := &ret
5454 b, err := gensupport.DecodeResponseBytes(target, res)
5455 if err != nil {
5456 return nil, err
5457 }
5458 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.delete", "response", internallog.HTTPResponse(res, b))
5459 return ret, nil
5460 }
5461
5462 type ProjectsLocationsServicesExportMetadataCall struct {
5463 s *APIService
5464 service string
5465 exportmetadatarequest *ExportMetadataRequest
5466 urlParams_ gensupport.URLParams
5467 ctx_ context.Context
5468 header_ http.Header
5469 }
5470
5471 // ExportMetadata: Exports metadata from a service.
5472 //
5473 // - service: The relative resource name of the metastore service to run
5474 // export, in the following
5475 // form:projects/{project_id}/locations/{location_id}/services/{service_id}.
5476 func (r *ProjectsLocationsServicesService) ExportMetadata(service string, exportmetadatarequest *ExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall {
5477 c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5478 c.service = service
5479 c.exportmetadatarequest = exportmetadatarequest
5480 return c
5481 }
5482
5483 // Fields allows partial responses to be retrieved. See
5484 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5485 // details.
5486 func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall {
5487 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5488 return c
5489 }
5490
5491 // Context sets the context to be used in this call's Do method.
5492 func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall {
5493 c.ctx_ = ctx
5494 return c
5495 }
5496
5497 // Header returns a http.Header that can be modified by the caller to add
5498 // headers to the request.
5499 func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header {
5500 if c.header_ == nil {
5501 c.header_ = make(http.Header)
5502 }
5503 return c.header_
5504 }
5505
5506 func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) {
5507 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
5508 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.exportmetadatarequest)
5509 if err != nil {
5510 return nil, err
5511 }
5512 c.urlParams_.Set("alt", alt)
5513 c.urlParams_.Set("prettyPrint", "false")
5514 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:exportMetadata")
5515 urls += "?" + c.urlParams_.Encode()
5516 req, err := http.NewRequest("POST", urls, body)
5517 if err != nil {
5518 return nil, err
5519 }
5520 req.Header = reqHeaders
5521 googleapi.Expand(req.URL, map[string]string{
5522 "service": c.service,
5523 })
5524 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.exportMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
5525 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5526 }
5527
5528 // Do executes the "metastore.projects.locations.services.exportMetadata" call.
5529 // Any non-2xx status code is an error. Response headers are in either
5530 // *Operation.ServerResponse.Header or (if a response was returned at all) in
5531 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5532 // whether the returned error was because http.StatusNotModified was returned.
5533 func (c *ProjectsLocationsServicesExportMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5534 gensupport.SetOptions(c.urlParams_, opts...)
5535 res, err := c.doRequest("json")
5536 if res != nil && res.StatusCode == http.StatusNotModified {
5537 if res.Body != nil {
5538 res.Body.Close()
5539 }
5540 return nil, gensupport.WrapError(&googleapi.Error{
5541 Code: res.StatusCode,
5542 Header: res.Header,
5543 })
5544 }
5545 if err != nil {
5546 return nil, err
5547 }
5548 defer googleapi.CloseBody(res)
5549 if err := googleapi.CheckResponse(res); err != nil {
5550 return nil, gensupport.WrapError(err)
5551 }
5552 ret := &Operation{
5553 ServerResponse: googleapi.ServerResponse{
5554 Header: res.Header,
5555 HTTPStatusCode: res.StatusCode,
5556 },
5557 }
5558 target := &ret
5559 b, err := gensupport.DecodeResponseBytes(target, res)
5560 if err != nil {
5561 return nil, err
5562 }
5563 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.exportMetadata", "response", internallog.HTTPResponse(res, b))
5564 return ret, nil
5565 }
5566
5567 type ProjectsLocationsServicesGetCall struct {
5568 s *APIService
5569 name string
5570 urlParams_ gensupport.URLParams
5571 ifNoneMatch_ string
5572 ctx_ context.Context
5573 header_ http.Header
5574 }
5575
5576 // Get: Gets the details of a single service.
5577 //
5578 // - name: The relative resource name of the metastore service to retrieve, in
5579 // the following
5580 // form:projects/{project_number}/locations/{location_id}/services/{service_id
5581 // }.
5582 func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall {
5583 c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5584 c.name = name
5585 return c
5586 }
5587
5588 // Fields allows partial responses to be retrieved. See
5589 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5590 // details.
5591 func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall {
5592 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5593 return c
5594 }
5595
5596 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5597 // object's ETag matches the given value. This is useful for getting updates
5598 // only after the object has changed since the last request.
5599 func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall {
5600 c.ifNoneMatch_ = entityTag
5601 return c
5602 }
5603
5604 // Context sets the context to be used in this call's Do method.
5605 func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall {
5606 c.ctx_ = ctx
5607 return c
5608 }
5609
5610 // Header returns a http.Header that can be modified by the caller to add
5611 // headers to the request.
5612 func (c *ProjectsLocationsServicesGetCall) Header() http.Header {
5613 if c.header_ == nil {
5614 c.header_ = make(http.Header)
5615 }
5616 return c.header_
5617 }
5618
5619 func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) {
5620 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5621 if c.ifNoneMatch_ != "" {
5622 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5623 }
5624 c.urlParams_.Set("alt", alt)
5625 c.urlParams_.Set("prettyPrint", "false")
5626 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
5627 urls += "?" + c.urlParams_.Encode()
5628 req, err := http.NewRequest("GET", urls, nil)
5629 if err != nil {
5630 return nil, err
5631 }
5632 req.Header = reqHeaders
5633 googleapi.Expand(req.URL, map[string]string{
5634 "name": c.name,
5635 })
5636 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.get", "request", internallog.HTTPRequest(req, nil))
5637 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5638 }
5639
5640 // Do executes the "metastore.projects.locations.services.get" call.
5641 // Any non-2xx status code is an error. Response headers are in either
5642 // *Service.ServerResponse.Header or (if a response was returned at all) in
5643 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5644 // whether the returned error was because http.StatusNotModified was returned.
5645 func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
5646 gensupport.SetOptions(c.urlParams_, opts...)
5647 res, err := c.doRequest("json")
5648 if res != nil && res.StatusCode == http.StatusNotModified {
5649 if res.Body != nil {
5650 res.Body.Close()
5651 }
5652 return nil, gensupport.WrapError(&googleapi.Error{
5653 Code: res.StatusCode,
5654 Header: res.Header,
5655 })
5656 }
5657 if err != nil {
5658 return nil, err
5659 }
5660 defer googleapi.CloseBody(res)
5661 if err := googleapi.CheckResponse(res); err != nil {
5662 return nil, gensupport.WrapError(err)
5663 }
5664 ret := &Service{
5665 ServerResponse: googleapi.ServerResponse{
5666 Header: res.Header,
5667 HTTPStatusCode: res.StatusCode,
5668 },
5669 }
5670 target := &ret
5671 b, err := gensupport.DecodeResponseBytes(target, res)
5672 if err != nil {
5673 return nil, err
5674 }
5675 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.get", "response", internallog.HTTPResponse(res, b))
5676 return ret, nil
5677 }
5678
5679 type ProjectsLocationsServicesGetIamPolicyCall struct {
5680 s *APIService
5681 resource string
5682 urlParams_ gensupport.URLParams
5683 ifNoneMatch_ string
5684 ctx_ context.Context
5685 header_ http.Header
5686 }
5687
5688 // GetIamPolicy: Gets the access control policy for a resource. Returns an
5689 // empty policy if the resource exists and does not have a policy set.
5690 //
5691 // - resource: REQUIRED: The resource for which the policy is being requested.
5692 // See Resource names (https://cloud.google.com/apis/design/resource_names)
5693 // for the appropriate value for this field.
5694 func (r *ProjectsLocationsServicesService) GetIamPolicy(resource string) *ProjectsLocationsServicesGetIamPolicyCall {
5695 c := &ProjectsLocationsServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5696 c.resource = resource
5697 return c
5698 }
5699
5700 // OptionsRequestedPolicyVersion sets the optional parameter
5701 // "options.requestedPolicyVersion": The maximum policy version that will be
5702 // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
5703 // an invalid value will be rejected.Requests for policies with any conditional
5704 // role bindings must specify version 3. Policies with no conditional role
5705 // bindings may specify any valid value or leave the field unset.The policy in
5706 // the response might use the policy version that you specified, or it might
5707 // use a lower policy version. For example, if you specify version 3, but the
5708 // policy has no conditional role bindings, the response uses version 1.To
5709 // learn which resources support conditions in their IAM policies, see the IAM
5710 // documentation
5711 // (https://cloud.google.com/iam/help/conditions/resource-policies).
5712 func (c *ProjectsLocationsServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesGetIamPolicyCall {
5713 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
5714 return c
5715 }
5716
5717 // Fields allows partial responses to be retrieved. See
5718 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5719 // details.
5720 func (c *ProjectsLocationsServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetIamPolicyCall {
5721 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5722 return c
5723 }
5724
5725 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5726 // object's ETag matches the given value. This is useful for getting updates
5727 // only after the object has changed since the last request.
5728 func (c *ProjectsLocationsServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetIamPolicyCall {
5729 c.ifNoneMatch_ = entityTag
5730 return c
5731 }
5732
5733 // Context sets the context to be used in this call's Do method.
5734 func (c *ProjectsLocationsServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesGetIamPolicyCall {
5735 c.ctx_ = ctx
5736 return c
5737 }
5738
5739 // Header returns a http.Header that can be modified by the caller to add
5740 // headers to the request.
5741 func (c *ProjectsLocationsServicesGetIamPolicyCall) Header() http.Header {
5742 if c.header_ == nil {
5743 c.header_ = make(http.Header)
5744 }
5745 return c.header_
5746 }
5747
5748 func (c *ProjectsLocationsServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5749 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5750 if c.ifNoneMatch_ != "" {
5751 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5752 }
5753 c.urlParams_.Set("alt", alt)
5754 c.urlParams_.Set("prettyPrint", "false")
5755 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
5756 urls += "?" + c.urlParams_.Encode()
5757 req, err := http.NewRequest("GET", urls, nil)
5758 if err != nil {
5759 return nil, err
5760 }
5761 req.Header = reqHeaders
5762 googleapi.Expand(req.URL, map[string]string{
5763 "resource": c.resource,
5764 })
5765 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
5766 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5767 }
5768
5769 // Do executes the "metastore.projects.locations.services.getIamPolicy" call.
5770 // Any non-2xx status code is an error. Response headers are in either
5771 // *Policy.ServerResponse.Header or (if a response was returned at all) in
5772 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
5773 // whether the returned error was because http.StatusNotModified was returned.
5774 func (c *ProjectsLocationsServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5775 gensupport.SetOptions(c.urlParams_, opts...)
5776 res, err := c.doRequest("json")
5777 if res != nil && res.StatusCode == http.StatusNotModified {
5778 if res.Body != nil {
5779 res.Body.Close()
5780 }
5781 return nil, gensupport.WrapError(&googleapi.Error{
5782 Code: res.StatusCode,
5783 Header: res.Header,
5784 })
5785 }
5786 if err != nil {
5787 return nil, err
5788 }
5789 defer googleapi.CloseBody(res)
5790 if err := googleapi.CheckResponse(res); err != nil {
5791 return nil, gensupport.WrapError(err)
5792 }
5793 ret := &Policy{
5794 ServerResponse: googleapi.ServerResponse{
5795 Header: res.Header,
5796 HTTPStatusCode: res.StatusCode,
5797 },
5798 }
5799 target := &ret
5800 b, err := gensupport.DecodeResponseBytes(target, res)
5801 if err != nil {
5802 return nil, err
5803 }
5804 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.getIamPolicy", "response", internallog.HTTPResponse(res, b))
5805 return ret, nil
5806 }
5807
5808 type ProjectsLocationsServicesListCall struct {
5809 s *APIService
5810 parent string
5811 urlParams_ gensupport.URLParams
5812 ifNoneMatch_ string
5813 ctx_ context.Context
5814 header_ http.Header
5815 }
5816
5817 // List: Lists services in a project and location.
5818 //
5819 // - parent: The relative resource name of the location of metastore services
5820 // to list, in the following
5821 // form:projects/{project_number}/locations/{location_id}.
5822 func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall {
5823 c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5824 c.parent = parent
5825 return c
5826 }
5827
5828 // Filter sets the optional parameter "filter": The filter to apply to list
5829 // results.
5830 func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall {
5831 c.urlParams_.Set("filter", filter)
5832 return c
5833 }
5834
5835 // OrderBy sets the optional parameter "orderBy": Specify the ordering of
5836 // results as described in Sorting Order
5837 // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
5838 // specified, the results will be sorted in the default order.
5839 func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall {
5840 c.urlParams_.Set("orderBy", orderBy)
5841 return c
5842 }
5843
5844 // PageSize sets the optional parameter "pageSize": The maximum number of
5845 // services to return. The response may contain less than the maximum number.
5846 // If unspecified, no more than 500 services are returned. The maximum value is
5847 // 1000; values above 1000 are changed to 1000.
5848 func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall {
5849 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5850 return c
5851 }
5852
5853 // PageToken sets the optional parameter "pageToken": A page token, received
5854 // from a previous DataprocMetastore.ListServices call. Provide this token to
5855 // retrieve the subsequent page.To retrieve the first page, supply an empty
5856 // page token.When paginating, other parameters provided to
5857 // DataprocMetastore.ListServices must match the call that provided the page
5858 // token.
5859 func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall {
5860 c.urlParams_.Set("pageToken", pageToken)
5861 return c
5862 }
5863
5864 // Fields allows partial responses to be retrieved. See
5865 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
5866 // details.
5867 func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall {
5868 c.urlParams_.Set("fields", googleapi.CombineFields(s))
5869 return c
5870 }
5871
5872 // IfNoneMatch sets an optional parameter which makes the operation fail if the
5873 // object's ETag matches the given value. This is useful for getting updates
5874 // only after the object has changed since the last request.
5875 func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall {
5876 c.ifNoneMatch_ = entityTag
5877 return c
5878 }
5879
5880 // Context sets the context to be used in this call's Do method.
5881 func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall {
5882 c.ctx_ = ctx
5883 return c
5884 }
5885
5886 // Header returns a http.Header that can be modified by the caller to add
5887 // headers to the request.
5888 func (c *ProjectsLocationsServicesListCall) Header() http.Header {
5889 if c.header_ == nil {
5890 c.header_ = make(http.Header)
5891 }
5892 return c.header_
5893 }
5894
5895 func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) {
5896 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
5897 if c.ifNoneMatch_ != "" {
5898 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5899 }
5900 c.urlParams_.Set("alt", alt)
5901 c.urlParams_.Set("prettyPrint", "false")
5902 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/services")
5903 urls += "?" + c.urlParams_.Encode()
5904 req, err := http.NewRequest("GET", urls, nil)
5905 if err != nil {
5906 return nil, err
5907 }
5908 req.Header = reqHeaders
5909 googleapi.Expand(req.URL, map[string]string{
5910 "parent": c.parent,
5911 })
5912 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.list", "request", internallog.HTTPRequest(req, nil))
5913 return gensupport.SendRequest(c.ctx_, c.s.client, req)
5914 }
5915
5916 // Do executes the "metastore.projects.locations.services.list" call.
5917 // Any non-2xx status code is an error. Response headers are in either
5918 // *ListServicesResponse.ServerResponse.Header or (if a response was returned
5919 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5920 // check whether the returned error was because http.StatusNotModified was
5921 // returned.
5922 func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
5923 gensupport.SetOptions(c.urlParams_, opts...)
5924 res, err := c.doRequest("json")
5925 if res != nil && res.StatusCode == http.StatusNotModified {
5926 if res.Body != nil {
5927 res.Body.Close()
5928 }
5929 return nil, gensupport.WrapError(&googleapi.Error{
5930 Code: res.StatusCode,
5931 Header: res.Header,
5932 })
5933 }
5934 if err != nil {
5935 return nil, err
5936 }
5937 defer googleapi.CloseBody(res)
5938 if err := googleapi.CheckResponse(res); err != nil {
5939 return nil, gensupport.WrapError(err)
5940 }
5941 ret := &ListServicesResponse{
5942 ServerResponse: googleapi.ServerResponse{
5943 Header: res.Header,
5944 HTTPStatusCode: res.StatusCode,
5945 },
5946 }
5947 target := &ret
5948 b, err := gensupport.DecodeResponseBytes(target, res)
5949 if err != nil {
5950 return nil, err
5951 }
5952 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.list", "response", internallog.HTTPResponse(res, b))
5953 return ret, nil
5954 }
5955
5956 // Pages invokes f for each page of results.
5957 // A non-nil error returned from f will halt the iteration.
5958 // The provided context supersedes any context provided to the Context method.
5959 func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
5960 c.ctx_ = ctx
5961 defer c.PageToken(c.urlParams_.Get("pageToken"))
5962 for {
5963 x, err := c.Do()
5964 if err != nil {
5965 return err
5966 }
5967 if err := f(x); err != nil {
5968 return err
5969 }
5970 if x.NextPageToken == "" {
5971 return nil
5972 }
5973 c.PageToken(x.NextPageToken)
5974 }
5975 }
5976
5977 type ProjectsLocationsServicesMoveTableToDatabaseCall struct {
5978 s *APIService
5979 service string
5980 movetabletodatabaserequest *MoveTableToDatabaseRequest
5981 urlParams_ gensupport.URLParams
5982 ctx_ context.Context
5983 header_ http.Header
5984 }
5985
5986 // MoveTableToDatabase: Move a table to another database.
5987 //
5988 // - service: The relative resource name of the metastore service to mutate
5989 // metadata, in the following
5990 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
5991 func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, movetabletodatabaserequest *MoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall {
5992 c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5993 c.service = service
5994 c.movetabletodatabaserequest = movetabletodatabaserequest
5995 return c
5996 }
5997
5998 // Fields allows partial responses to be retrieved. See
5999 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6000 // details.
6001 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall {
6002 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6003 return c
6004 }
6005
6006 // Context sets the context to be used in this call's Do method.
6007 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall {
6008 c.ctx_ = ctx
6009 return c
6010 }
6011
6012 // Header returns a http.Header that can be modified by the caller to add
6013 // headers to the request.
6014 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header {
6015 if c.header_ == nil {
6016 c.header_ = make(http.Header)
6017 }
6018 return c.header_
6019 }
6020
6021 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) {
6022 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6023 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.movetabletodatabaserequest)
6024 if err != nil {
6025 return nil, err
6026 }
6027 c.urlParams_.Set("alt", alt)
6028 c.urlParams_.Set("prettyPrint", "false")
6029 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:moveTableToDatabase")
6030 urls += "?" + c.urlParams_.Encode()
6031 req, err := http.NewRequest("POST", urls, body)
6032 if err != nil {
6033 return nil, err
6034 }
6035 req.Header = reqHeaders
6036 googleapi.Expand(req.URL, map[string]string{
6037 "service": c.service,
6038 })
6039 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.moveTableToDatabase", "request", internallog.HTTPRequest(req, body.Bytes()))
6040 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6041 }
6042
6043 // Do executes the "metastore.projects.locations.services.moveTableToDatabase" call.
6044 // Any non-2xx status code is an error. Response headers are in either
6045 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6046 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6047 // whether the returned error was because http.StatusNotModified was returned.
6048 func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6049 gensupport.SetOptions(c.urlParams_, opts...)
6050 res, err := c.doRequest("json")
6051 if res != nil && res.StatusCode == http.StatusNotModified {
6052 if res.Body != nil {
6053 res.Body.Close()
6054 }
6055 return nil, gensupport.WrapError(&googleapi.Error{
6056 Code: res.StatusCode,
6057 Header: res.Header,
6058 })
6059 }
6060 if err != nil {
6061 return nil, err
6062 }
6063 defer googleapi.CloseBody(res)
6064 if err := googleapi.CheckResponse(res); err != nil {
6065 return nil, gensupport.WrapError(err)
6066 }
6067 ret := &Operation{
6068 ServerResponse: googleapi.ServerResponse{
6069 Header: res.Header,
6070 HTTPStatusCode: res.StatusCode,
6071 },
6072 }
6073 target := &ret
6074 b, err := gensupport.DecodeResponseBytes(target, res)
6075 if err != nil {
6076 return nil, err
6077 }
6078 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.moveTableToDatabase", "response", internallog.HTTPResponse(res, b))
6079 return ret, nil
6080 }
6081
6082 type ProjectsLocationsServicesPatchCall struct {
6083 s *APIService
6084 name string
6085 service *Service
6086 urlParams_ gensupport.URLParams
6087 ctx_ context.Context
6088 header_ http.Header
6089 }
6090
6091 // Patch: Updates the parameters of a single service.
6092 //
6093 // - name: Immutable. Identifier. The relative resource name of the metastore
6094 // service, in the following
6095 // format:projects/{project_number}/locations/{location_id}/services/{service_
6096 // id}.
6097 func (r *ProjectsLocationsServicesService) Patch(name string, service *Service) *ProjectsLocationsServicesPatchCall {
6098 c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6099 c.name = name
6100 c.service = service
6101 return c
6102 }
6103
6104 // RequestId sets the optional parameter "requestId": A request ID. Specify a
6105 // unique request ID to allow the server to ignore the request if it has
6106 // completed. The server will ignore subsequent requests that provide a
6107 // duplicate request ID for at least 60 minutes after the first request.For
6108 // example, if an initial request times out, followed by another request with
6109 // the same request ID, the server ignores the second request to prevent the
6110 // creation of duplicate commitments.The request ID must be a valid UUID
6111 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
6112 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
6113 func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall {
6114 c.urlParams_.Set("requestId", requestId)
6115 return c
6116 }
6117
6118 // UpdateMask sets the optional parameter "updateMask": Required. A field mask
6119 // used to specify the fields to be overwritten in the metastore service
6120 // resource by the update. Fields specified in the update_mask are relative to
6121 // the resource (not to the full request). A field is overwritten if it is in
6122 // the mask.
6123 func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall {
6124 c.urlParams_.Set("updateMask", updateMask)
6125 return c
6126 }
6127
6128 // Fields allows partial responses to be retrieved. See
6129 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6130 // details.
6131 func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall {
6132 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6133 return c
6134 }
6135
6136 // Context sets the context to be used in this call's Do method.
6137 func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall {
6138 c.ctx_ = ctx
6139 return c
6140 }
6141
6142 // Header returns a http.Header that can be modified by the caller to add
6143 // headers to the request.
6144 func (c *ProjectsLocationsServicesPatchCall) Header() http.Header {
6145 if c.header_ == nil {
6146 c.header_ = make(http.Header)
6147 }
6148 return c.header_
6149 }
6150
6151 func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
6152 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6153 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.service)
6154 if err != nil {
6155 return nil, err
6156 }
6157 c.urlParams_.Set("alt", alt)
6158 c.urlParams_.Set("prettyPrint", "false")
6159 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
6160 urls += "?" + c.urlParams_.Encode()
6161 req, err := http.NewRequest("PATCH", urls, body)
6162 if err != nil {
6163 return nil, err
6164 }
6165 req.Header = reqHeaders
6166 googleapi.Expand(req.URL, map[string]string{
6167 "name": c.name,
6168 })
6169 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
6170 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6171 }
6172
6173 // Do executes the "metastore.projects.locations.services.patch" call.
6174 // Any non-2xx status code is an error. Response headers are in either
6175 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6176 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6177 // whether the returned error was because http.StatusNotModified was returned.
6178 func (c *ProjectsLocationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6179 gensupport.SetOptions(c.urlParams_, opts...)
6180 res, err := c.doRequest("json")
6181 if res != nil && res.StatusCode == http.StatusNotModified {
6182 if res.Body != nil {
6183 res.Body.Close()
6184 }
6185 return nil, gensupport.WrapError(&googleapi.Error{
6186 Code: res.StatusCode,
6187 Header: res.Header,
6188 })
6189 }
6190 if err != nil {
6191 return nil, err
6192 }
6193 defer googleapi.CloseBody(res)
6194 if err := googleapi.CheckResponse(res); err != nil {
6195 return nil, gensupport.WrapError(err)
6196 }
6197 ret := &Operation{
6198 ServerResponse: googleapi.ServerResponse{
6199 Header: res.Header,
6200 HTTPStatusCode: res.StatusCode,
6201 },
6202 }
6203 target := &ret
6204 b, err := gensupport.DecodeResponseBytes(target, res)
6205 if err != nil {
6206 return nil, err
6207 }
6208 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.patch", "response", internallog.HTTPResponse(res, b))
6209 return ret, nil
6210 }
6211
6212 type ProjectsLocationsServicesQueryMetadataCall struct {
6213 s *APIService
6214 service string
6215 querymetadatarequest *QueryMetadataRequest
6216 urlParams_ gensupport.URLParams
6217 ctx_ context.Context
6218 header_ http.Header
6219 }
6220
6221 // QueryMetadata: Query Dataproc Metastore metadata.
6222 //
6223 // - service: The relative resource name of the metastore service to query
6224 // metadata, in the following
6225 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
6226 func (r *ProjectsLocationsServicesService) QueryMetadata(service string, querymetadatarequest *QueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall {
6227 c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6228 c.service = service
6229 c.querymetadatarequest = querymetadatarequest
6230 return c
6231 }
6232
6233 // Fields allows partial responses to be retrieved. See
6234 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6235 // details.
6236 func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall {
6237 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6238 return c
6239 }
6240
6241 // Context sets the context to be used in this call's Do method.
6242 func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall {
6243 c.ctx_ = ctx
6244 return c
6245 }
6246
6247 // Header returns a http.Header that can be modified by the caller to add
6248 // headers to the request.
6249 func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header {
6250 if c.header_ == nil {
6251 c.header_ = make(http.Header)
6252 }
6253 return c.header_
6254 }
6255
6256 func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) {
6257 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6258 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.querymetadatarequest)
6259 if err != nil {
6260 return nil, err
6261 }
6262 c.urlParams_.Set("alt", alt)
6263 c.urlParams_.Set("prettyPrint", "false")
6264 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:queryMetadata")
6265 urls += "?" + c.urlParams_.Encode()
6266 req, err := http.NewRequest("POST", urls, body)
6267 if err != nil {
6268 return nil, err
6269 }
6270 req.Header = reqHeaders
6271 googleapi.Expand(req.URL, map[string]string{
6272 "service": c.service,
6273 })
6274 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.queryMetadata", "request", internallog.HTTPRequest(req, body.Bytes()))
6275 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6276 }
6277
6278 // Do executes the "metastore.projects.locations.services.queryMetadata" call.
6279 // Any non-2xx status code is an error. Response headers are in either
6280 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6281 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6282 // whether the returned error was because http.StatusNotModified was returned.
6283 func (c *ProjectsLocationsServicesQueryMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6284 gensupport.SetOptions(c.urlParams_, opts...)
6285 res, err := c.doRequest("json")
6286 if res != nil && res.StatusCode == http.StatusNotModified {
6287 if res.Body != nil {
6288 res.Body.Close()
6289 }
6290 return nil, gensupport.WrapError(&googleapi.Error{
6291 Code: res.StatusCode,
6292 Header: res.Header,
6293 })
6294 }
6295 if err != nil {
6296 return nil, err
6297 }
6298 defer googleapi.CloseBody(res)
6299 if err := googleapi.CheckResponse(res); err != nil {
6300 return nil, gensupport.WrapError(err)
6301 }
6302 ret := &Operation{
6303 ServerResponse: googleapi.ServerResponse{
6304 Header: res.Header,
6305 HTTPStatusCode: res.StatusCode,
6306 },
6307 }
6308 target := &ret
6309 b, err := gensupport.DecodeResponseBytes(target, res)
6310 if err != nil {
6311 return nil, err
6312 }
6313 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.queryMetadata", "response", internallog.HTTPResponse(res, b))
6314 return ret, nil
6315 }
6316
6317 type ProjectsLocationsServicesRemoveIamPolicyCall struct {
6318 s *APIService
6319 resource string
6320 removeiampolicyrequest *RemoveIamPolicyRequest
6321 urlParams_ gensupport.URLParams
6322 ctx_ context.Context
6323 header_ http.Header
6324 }
6325
6326 // RemoveIamPolicy: Removes the attached IAM policies for a resource
6327 //
6328 // - resource: The relative resource name of the dataplane resource to remove
6329 // IAM policy, in the following
6330 // form:projects/{project_id}/locations/{location_id}/services/{service_id}/da
6331 // tabases/{database_id} or
6332 // projects/{project_id}/locations/{location_id}/services/{service_id}/databas
6333 // es/{database_id}/tables/{table_id}.
6334 func (r *ProjectsLocationsServicesService) RemoveIamPolicy(resource string, removeiampolicyrequest *RemoveIamPolicyRequest) *ProjectsLocationsServicesRemoveIamPolicyCall {
6335 c := &ProjectsLocationsServicesRemoveIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6336 c.resource = resource
6337 c.removeiampolicyrequest = removeiampolicyrequest
6338 return c
6339 }
6340
6341 // Fields allows partial responses to be retrieved. See
6342 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6343 // details.
6344 func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRemoveIamPolicyCall {
6345 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6346 return c
6347 }
6348
6349 // Context sets the context to be used in this call's Do method.
6350 func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesRemoveIamPolicyCall {
6351 c.ctx_ = ctx
6352 return c
6353 }
6354
6355 // Header returns a http.Header that can be modified by the caller to add
6356 // headers to the request.
6357 func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Header() http.Header {
6358 if c.header_ == nil {
6359 c.header_ = make(http.Header)
6360 }
6361 return c.header_
6362 }
6363
6364 func (c *ProjectsLocationsServicesRemoveIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6365 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6366 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.removeiampolicyrequest)
6367 if err != nil {
6368 return nil, err
6369 }
6370 c.urlParams_.Set("alt", alt)
6371 c.urlParams_.Set("prettyPrint", "false")
6372 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:removeIamPolicy")
6373 urls += "?" + c.urlParams_.Encode()
6374 req, err := http.NewRequest("POST", urls, body)
6375 if err != nil {
6376 return nil, err
6377 }
6378 req.Header = reqHeaders
6379 googleapi.Expand(req.URL, map[string]string{
6380 "resource": c.resource,
6381 })
6382 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.removeIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
6383 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6384 }
6385
6386 // Do executes the "metastore.projects.locations.services.removeIamPolicy" call.
6387 // Any non-2xx status code is an error. Response headers are in either
6388 // *RemoveIamPolicyResponse.ServerResponse.Header or (if a response was
6389 // returned at all) in error.(*googleapi.Error).Header. Use
6390 // googleapi.IsNotModified to check whether the returned error was because
6391 // http.StatusNotModified was returned.
6392 func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Do(opts ...googleapi.CallOption) (*RemoveIamPolicyResponse, error) {
6393 gensupport.SetOptions(c.urlParams_, opts...)
6394 res, err := c.doRequest("json")
6395 if res != nil && res.StatusCode == http.StatusNotModified {
6396 if res.Body != nil {
6397 res.Body.Close()
6398 }
6399 return nil, gensupport.WrapError(&googleapi.Error{
6400 Code: res.StatusCode,
6401 Header: res.Header,
6402 })
6403 }
6404 if err != nil {
6405 return nil, err
6406 }
6407 defer googleapi.CloseBody(res)
6408 if err := googleapi.CheckResponse(res); err != nil {
6409 return nil, gensupport.WrapError(err)
6410 }
6411 ret := &RemoveIamPolicyResponse{
6412 ServerResponse: googleapi.ServerResponse{
6413 Header: res.Header,
6414 HTTPStatusCode: res.StatusCode,
6415 },
6416 }
6417 target := &ret
6418 b, err := gensupport.DecodeResponseBytes(target, res)
6419 if err != nil {
6420 return nil, err
6421 }
6422 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.removeIamPolicy", "response", internallog.HTTPResponse(res, b))
6423 return ret, nil
6424 }
6425
6426 type ProjectsLocationsServicesRestoreCall struct {
6427 s *APIService
6428 service string
6429 restoreservicerequest *RestoreServiceRequest
6430 urlParams_ gensupport.URLParams
6431 ctx_ context.Context
6432 header_ http.Header
6433 }
6434
6435 // Restore: Restores a service from a backup.
6436 //
6437 // - service: The relative resource name of the metastore service to run
6438 // restore, in the following
6439 // form:projects/{project_id}/locations/{location_id}/services/{service_id}.
6440 func (r *ProjectsLocationsServicesService) Restore(service string, restoreservicerequest *RestoreServiceRequest) *ProjectsLocationsServicesRestoreCall {
6441 c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6442 c.service = service
6443 c.restoreservicerequest = restoreservicerequest
6444 return c
6445 }
6446
6447 // Fields allows partial responses to be retrieved. See
6448 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6449 // details.
6450 func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall {
6451 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6452 return c
6453 }
6454
6455 // Context sets the context to be used in this call's Do method.
6456 func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall {
6457 c.ctx_ = ctx
6458 return c
6459 }
6460
6461 // Header returns a http.Header that can be modified by the caller to add
6462 // headers to the request.
6463 func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header {
6464 if c.header_ == nil {
6465 c.header_ = make(http.Header)
6466 }
6467 return c.header_
6468 }
6469
6470 func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) {
6471 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6472 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.restoreservicerequest)
6473 if err != nil {
6474 return nil, err
6475 }
6476 c.urlParams_.Set("alt", alt)
6477 c.urlParams_.Set("prettyPrint", "false")
6478 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:restore")
6479 urls += "?" + c.urlParams_.Encode()
6480 req, err := http.NewRequest("POST", urls, body)
6481 if err != nil {
6482 return nil, err
6483 }
6484 req.Header = reqHeaders
6485 googleapi.Expand(req.URL, map[string]string{
6486 "service": c.service,
6487 })
6488 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.restore", "request", internallog.HTTPRequest(req, body.Bytes()))
6489 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6490 }
6491
6492 // Do executes the "metastore.projects.locations.services.restore" call.
6493 // Any non-2xx status code is an error. Response headers are in either
6494 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6495 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6496 // whether the returned error was because http.StatusNotModified was returned.
6497 func (c *ProjectsLocationsServicesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6498 gensupport.SetOptions(c.urlParams_, opts...)
6499 res, err := c.doRequest("json")
6500 if res != nil && res.StatusCode == http.StatusNotModified {
6501 if res.Body != nil {
6502 res.Body.Close()
6503 }
6504 return nil, gensupport.WrapError(&googleapi.Error{
6505 Code: res.StatusCode,
6506 Header: res.Header,
6507 })
6508 }
6509 if err != nil {
6510 return nil, err
6511 }
6512 defer googleapi.CloseBody(res)
6513 if err := googleapi.CheckResponse(res); err != nil {
6514 return nil, gensupport.WrapError(err)
6515 }
6516 ret := &Operation{
6517 ServerResponse: googleapi.ServerResponse{
6518 Header: res.Header,
6519 HTTPStatusCode: res.StatusCode,
6520 },
6521 }
6522 target := &ret
6523 b, err := gensupport.DecodeResponseBytes(target, res)
6524 if err != nil {
6525 return nil, err
6526 }
6527 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.restore", "response", internallog.HTTPResponse(res, b))
6528 return ret, nil
6529 }
6530
6531 type ProjectsLocationsServicesSetIamPolicyCall struct {
6532 s *APIService
6533 resource string
6534 setiampolicyrequest *SetIamPolicyRequest
6535 urlParams_ gensupport.URLParams
6536 ctx_ context.Context
6537 header_ http.Header
6538 }
6539
6540 // SetIamPolicy: Sets the access control policy on the specified resource.
6541 // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
6542 // PERMISSION_DENIED errors.
6543 //
6544 // - resource: REQUIRED: The resource for which the policy is being specified.
6545 // See Resource names (https://cloud.google.com/apis/design/resource_names)
6546 // for the appropriate value for this field.
6547 func (r *ProjectsLocationsServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesSetIamPolicyCall {
6548 c := &ProjectsLocationsServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6549 c.resource = resource
6550 c.setiampolicyrequest = setiampolicyrequest
6551 return c
6552 }
6553
6554 // Fields allows partial responses to be retrieved. See
6555 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6556 // details.
6557 func (c *ProjectsLocationsServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesSetIamPolicyCall {
6558 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6559 return c
6560 }
6561
6562 // Context sets the context to be used in this call's Do method.
6563 func (c *ProjectsLocationsServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesSetIamPolicyCall {
6564 c.ctx_ = ctx
6565 return c
6566 }
6567
6568 // Header returns a http.Header that can be modified by the caller to add
6569 // headers to the request.
6570 func (c *ProjectsLocationsServicesSetIamPolicyCall) Header() http.Header {
6571 if c.header_ == nil {
6572 c.header_ = make(http.Header)
6573 }
6574 return c.header_
6575 }
6576
6577 func (c *ProjectsLocationsServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6578 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6579 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
6580 if err != nil {
6581 return nil, err
6582 }
6583 c.urlParams_.Set("alt", alt)
6584 c.urlParams_.Set("prettyPrint", "false")
6585 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
6586 urls += "?" + c.urlParams_.Encode()
6587 req, err := http.NewRequest("POST", urls, body)
6588 if err != nil {
6589 return nil, err
6590 }
6591 req.Header = reqHeaders
6592 googleapi.Expand(req.URL, map[string]string{
6593 "resource": c.resource,
6594 })
6595 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
6596 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6597 }
6598
6599 // Do executes the "metastore.projects.locations.services.setIamPolicy" call.
6600 // Any non-2xx status code is an error. Response headers are in either
6601 // *Policy.ServerResponse.Header or (if a response was returned at all) in
6602 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6603 // whether the returned error was because http.StatusNotModified was returned.
6604 func (c *ProjectsLocationsServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6605 gensupport.SetOptions(c.urlParams_, opts...)
6606 res, err := c.doRequest("json")
6607 if res != nil && res.StatusCode == http.StatusNotModified {
6608 if res.Body != nil {
6609 res.Body.Close()
6610 }
6611 return nil, gensupport.WrapError(&googleapi.Error{
6612 Code: res.StatusCode,
6613 Header: res.Header,
6614 })
6615 }
6616 if err != nil {
6617 return nil, err
6618 }
6619 defer googleapi.CloseBody(res)
6620 if err := googleapi.CheckResponse(res); err != nil {
6621 return nil, gensupport.WrapError(err)
6622 }
6623 ret := &Policy{
6624 ServerResponse: googleapi.ServerResponse{
6625 Header: res.Header,
6626 HTTPStatusCode: res.StatusCode,
6627 },
6628 }
6629 target := &ret
6630 b, err := gensupport.DecodeResponseBytes(target, res)
6631 if err != nil {
6632 return nil, err
6633 }
6634 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.setIamPolicy", "response", internallog.HTTPResponse(res, b))
6635 return ret, nil
6636 }
6637
6638 type ProjectsLocationsServicesStartMigrationCall struct {
6639 s *APIService
6640 service string
6641 startmigrationrequest *StartMigrationRequest
6642 urlParams_ gensupport.URLParams
6643 ctx_ context.Context
6644 header_ http.Header
6645 }
6646
6647 // StartMigration: Starts the Managed Migration process.
6648 //
6649 // - service: The relative resource name of the metastore service to start
6650 // migrating to, in the following
6651 // format:projects/{project_id}/locations/{location_id}/services/{service_id}.
6652 func (r *ProjectsLocationsServicesService) StartMigration(service string, startmigrationrequest *StartMigrationRequest) *ProjectsLocationsServicesStartMigrationCall {
6653 c := &ProjectsLocationsServicesStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6654 c.service = service
6655 c.startmigrationrequest = startmigrationrequest
6656 return c
6657 }
6658
6659 // Fields allows partial responses to be retrieved. See
6660 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6661 // details.
6662 func (c *ProjectsLocationsServicesStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesStartMigrationCall {
6663 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6664 return c
6665 }
6666
6667 // Context sets the context to be used in this call's Do method.
6668 func (c *ProjectsLocationsServicesStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesStartMigrationCall {
6669 c.ctx_ = ctx
6670 return c
6671 }
6672
6673 // Header returns a http.Header that can be modified by the caller to add
6674 // headers to the request.
6675 func (c *ProjectsLocationsServicesStartMigrationCall) Header() http.Header {
6676 if c.header_ == nil {
6677 c.header_ = make(http.Header)
6678 }
6679 return c.header_
6680 }
6681
6682 func (c *ProjectsLocationsServicesStartMigrationCall) doRequest(alt string) (*http.Response, error) {
6683 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6684 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.startmigrationrequest)
6685 if err != nil {
6686 return nil, err
6687 }
6688 c.urlParams_.Set("alt", alt)
6689 c.urlParams_.Set("prettyPrint", "false")
6690 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+service}:startMigration")
6691 urls += "?" + c.urlParams_.Encode()
6692 req, err := http.NewRequest("POST", urls, body)
6693 if err != nil {
6694 return nil, err
6695 }
6696 req.Header = reqHeaders
6697 googleapi.Expand(req.URL, map[string]string{
6698 "service": c.service,
6699 })
6700 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.startMigration", "request", internallog.HTTPRequest(req, body.Bytes()))
6701 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6702 }
6703
6704 // Do executes the "metastore.projects.locations.services.startMigration" call.
6705 // Any non-2xx status code is an error. Response headers are in either
6706 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6707 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6708 // whether the returned error was because http.StatusNotModified was returned.
6709 func (c *ProjectsLocationsServicesStartMigrationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6710 gensupport.SetOptions(c.urlParams_, opts...)
6711 res, err := c.doRequest("json")
6712 if res != nil && res.StatusCode == http.StatusNotModified {
6713 if res.Body != nil {
6714 res.Body.Close()
6715 }
6716 return nil, gensupport.WrapError(&googleapi.Error{
6717 Code: res.StatusCode,
6718 Header: res.Header,
6719 })
6720 }
6721 if err != nil {
6722 return nil, err
6723 }
6724 defer googleapi.CloseBody(res)
6725 if err := googleapi.CheckResponse(res); err != nil {
6726 return nil, gensupport.WrapError(err)
6727 }
6728 ret := &Operation{
6729 ServerResponse: googleapi.ServerResponse{
6730 Header: res.Header,
6731 HTTPStatusCode: res.StatusCode,
6732 },
6733 }
6734 target := &ret
6735 b, err := gensupport.DecodeResponseBytes(target, res)
6736 if err != nil {
6737 return nil, err
6738 }
6739 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.startMigration", "response", internallog.HTTPResponse(res, b))
6740 return ret, nil
6741 }
6742
6743 type ProjectsLocationsServicesTestIamPermissionsCall struct {
6744 s *APIService
6745 resource string
6746 testiampermissionsrequest *TestIamPermissionsRequest
6747 urlParams_ gensupport.URLParams
6748 ctx_ context.Context
6749 header_ http.Header
6750 }
6751
6752 // TestIamPermissions: Returns permissions that a caller has on the specified
6753 // resource. If the resource does not exist, this will return an empty set of
6754 // permissions, not a NOT_FOUND error.Note: This operation is designed to be
6755 // used for building permission-aware UIs and command-line tools, not for
6756 // authorization checking. This operation may "fail open" without warning.
6757 //
6758 // - resource: REQUIRED: The resource for which the policy detail is being
6759 // requested. See Resource names
6760 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
6761 // value for this field.
6762 func (r *ProjectsLocationsServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesTestIamPermissionsCall {
6763 c := &ProjectsLocationsServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6764 c.resource = resource
6765 c.testiampermissionsrequest = testiampermissionsrequest
6766 return c
6767 }
6768
6769 // Fields allows partial responses to be retrieved. See
6770 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6771 // details.
6772 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesTestIamPermissionsCall {
6773 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6774 return c
6775 }
6776
6777 // Context sets the context to be used in this call's Do method.
6778 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesTestIamPermissionsCall {
6779 c.ctx_ = ctx
6780 return c
6781 }
6782
6783 // Header returns a http.Header that can be modified by the caller to add
6784 // headers to the request.
6785 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Header() http.Header {
6786 if c.header_ == nil {
6787 c.header_ = make(http.Header)
6788 }
6789 return c.header_
6790 }
6791
6792 func (c *ProjectsLocationsServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
6793 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6794 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
6795 if err != nil {
6796 return nil, err
6797 }
6798 c.urlParams_.Set("alt", alt)
6799 c.urlParams_.Set("prettyPrint", "false")
6800 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
6801 urls += "?" + c.urlParams_.Encode()
6802 req, err := http.NewRequest("POST", urls, body)
6803 if err != nil {
6804 return nil, err
6805 }
6806 req.Header = reqHeaders
6807 googleapi.Expand(req.URL, map[string]string{
6808 "resource": c.resource,
6809 })
6810 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
6811 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6812 }
6813
6814 // Do executes the "metastore.projects.locations.services.testIamPermissions" call.
6815 // Any non-2xx status code is an error. Response headers are in either
6816 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
6817 // returned at all) in error.(*googleapi.Error).Header. Use
6818 // googleapi.IsNotModified to check whether the returned error was because
6819 // http.StatusNotModified was returned.
6820 func (c *ProjectsLocationsServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
6821 gensupport.SetOptions(c.urlParams_, opts...)
6822 res, err := c.doRequest("json")
6823 if res != nil && res.StatusCode == http.StatusNotModified {
6824 if res.Body != nil {
6825 res.Body.Close()
6826 }
6827 return nil, gensupport.WrapError(&googleapi.Error{
6828 Code: res.StatusCode,
6829 Header: res.Header,
6830 })
6831 }
6832 if err != nil {
6833 return nil, err
6834 }
6835 defer googleapi.CloseBody(res)
6836 if err := googleapi.CheckResponse(res); err != nil {
6837 return nil, gensupport.WrapError(err)
6838 }
6839 ret := &TestIamPermissionsResponse{
6840 ServerResponse: googleapi.ServerResponse{
6841 Header: res.Header,
6842 HTTPStatusCode: res.StatusCode,
6843 },
6844 }
6845 target := &ret
6846 b, err := gensupport.DecodeResponseBytes(target, res)
6847 if err != nil {
6848 return nil, err
6849 }
6850 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.testIamPermissions", "response", internallog.HTTPResponse(res, b))
6851 return ret, nil
6852 }
6853
6854 type ProjectsLocationsServicesBackupsCreateCall struct {
6855 s *APIService
6856 parent string
6857 backup *Backup
6858 urlParams_ gensupport.URLParams
6859 ctx_ context.Context
6860 header_ http.Header
6861 }
6862
6863 // Create: Creates a new backup in a given project and location.
6864 //
6865 // - parent: The relative resource name of the service in which to create a
6866 // backup of the following
6867 // form:projects/{project_number}/locations/{location_id}/services/{service_id
6868 // }.
6869 func (r *ProjectsLocationsServicesBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsServicesBackupsCreateCall {
6870 c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6871 c.parent = parent
6872 c.backup = backup
6873 return c
6874 }
6875
6876 // BackupId sets the optional parameter "backupId": Required. The ID of the
6877 // backup, which is used as the final component of the backup's name.This value
6878 // must be between 1 and 64 characters long, begin with a letter, end with a
6879 // letter or number, and consist of alpha-numeric ASCII characters or hyphens.
6880 func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall {
6881 c.urlParams_.Set("backupId", backupId)
6882 return c
6883 }
6884
6885 // RequestId sets the optional parameter "requestId": A request ID. Specify a
6886 // unique request ID to allow the server to ignore the request if it has
6887 // completed. The server will ignore subsequent requests that provide a
6888 // duplicate request ID for at least 60 minutes after the first request.For
6889 // example, if an initial request times out, followed by another request with
6890 // the same request ID, the server ignores the second request to prevent the
6891 // creation of duplicate commitments.The request ID must be a valid UUID
6892 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
6893 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
6894 func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall {
6895 c.urlParams_.Set("requestId", requestId)
6896 return c
6897 }
6898
6899 // Fields allows partial responses to be retrieved. See
6900 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
6901 // details.
6902 func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall {
6903 c.urlParams_.Set("fields", googleapi.CombineFields(s))
6904 return c
6905 }
6906
6907 // Context sets the context to be used in this call's Do method.
6908 func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall {
6909 c.ctx_ = ctx
6910 return c
6911 }
6912
6913 // Header returns a http.Header that can be modified by the caller to add
6914 // headers to the request.
6915 func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header {
6916 if c.header_ == nil {
6917 c.header_ = make(http.Header)
6918 }
6919 return c.header_
6920 }
6921
6922 func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
6923 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
6924 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.backup)
6925 if err != nil {
6926 return nil, err
6927 }
6928 c.urlParams_.Set("alt", alt)
6929 c.urlParams_.Set("prettyPrint", "false")
6930 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/backups")
6931 urls += "?" + c.urlParams_.Encode()
6932 req, err := http.NewRequest("POST", urls, body)
6933 if err != nil {
6934 return nil, err
6935 }
6936 req.Header = reqHeaders
6937 googleapi.Expand(req.URL, map[string]string{
6938 "parent": c.parent,
6939 })
6940 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.create", "request", internallog.HTTPRequest(req, body.Bytes()))
6941 return gensupport.SendRequest(c.ctx_, c.s.client, req)
6942 }
6943
6944 // Do executes the "metastore.projects.locations.services.backups.create" call.
6945 // Any non-2xx status code is an error. Response headers are in either
6946 // *Operation.ServerResponse.Header or (if a response was returned at all) in
6947 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
6948 // whether the returned error was because http.StatusNotModified was returned.
6949 func (c *ProjectsLocationsServicesBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6950 gensupport.SetOptions(c.urlParams_, opts...)
6951 res, err := c.doRequest("json")
6952 if res != nil && res.StatusCode == http.StatusNotModified {
6953 if res.Body != nil {
6954 res.Body.Close()
6955 }
6956 return nil, gensupport.WrapError(&googleapi.Error{
6957 Code: res.StatusCode,
6958 Header: res.Header,
6959 })
6960 }
6961 if err != nil {
6962 return nil, err
6963 }
6964 defer googleapi.CloseBody(res)
6965 if err := googleapi.CheckResponse(res); err != nil {
6966 return nil, gensupport.WrapError(err)
6967 }
6968 ret := &Operation{
6969 ServerResponse: googleapi.ServerResponse{
6970 Header: res.Header,
6971 HTTPStatusCode: res.StatusCode,
6972 },
6973 }
6974 target := &ret
6975 b, err := gensupport.DecodeResponseBytes(target, res)
6976 if err != nil {
6977 return nil, err
6978 }
6979 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.create", "response", internallog.HTTPResponse(res, b))
6980 return ret, nil
6981 }
6982
6983 type ProjectsLocationsServicesBackupsDeleteCall struct {
6984 s *APIService
6985 name string
6986 urlParams_ gensupport.URLParams
6987 ctx_ context.Context
6988 header_ http.Header
6989 }
6990
6991 // Delete: Deletes a single backup.
6992 //
6993 // - name: The relative resource name of the backup to delete, in the following
6994 // form:projects/{project_number}/locations/{location_id}/services/{service_id
6995 // }/backups/{backup_id}.
6996 func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall {
6997 c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6998 c.name = name
6999 return c
7000 }
7001
7002 // RequestId sets the optional parameter "requestId": A request ID. Specify a
7003 // unique request ID to allow the server to ignore the request if it has
7004 // completed. The server will ignore subsequent requests that provide a
7005 // duplicate request ID for at least 60 minutes after the first request.For
7006 // example, if an initial request times out, followed by another request with
7007 // the same request ID, the server ignores the second request to prevent the
7008 // creation of duplicate commitments.The request ID must be a valid UUID
7009 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
7010 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
7011 func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall {
7012 c.urlParams_.Set("requestId", requestId)
7013 return c
7014 }
7015
7016 // Fields allows partial responses to be retrieved. See
7017 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7018 // details.
7019 func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall {
7020 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7021 return c
7022 }
7023
7024 // Context sets the context to be used in this call's Do method.
7025 func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall {
7026 c.ctx_ = ctx
7027 return c
7028 }
7029
7030 // Header returns a http.Header that can be modified by the caller to add
7031 // headers to the request.
7032 func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header {
7033 if c.header_ == nil {
7034 c.header_ = make(http.Header)
7035 }
7036 return c.header_
7037 }
7038
7039 func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
7040 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7041 c.urlParams_.Set("alt", alt)
7042 c.urlParams_.Set("prettyPrint", "false")
7043 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
7044 urls += "?" + c.urlParams_.Encode()
7045 req, err := http.NewRequest("DELETE", urls, nil)
7046 if err != nil {
7047 return nil, err
7048 }
7049 req.Header = reqHeaders
7050 googleapi.Expand(req.URL, map[string]string{
7051 "name": c.name,
7052 })
7053 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.delete", "request", internallog.HTTPRequest(req, nil))
7054 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7055 }
7056
7057 // Do executes the "metastore.projects.locations.services.backups.delete" call.
7058 // Any non-2xx status code is an error. Response headers are in either
7059 // *Operation.ServerResponse.Header or (if a response was returned at all) in
7060 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7061 // whether the returned error was because http.StatusNotModified was returned.
7062 func (c *ProjectsLocationsServicesBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7063 gensupport.SetOptions(c.urlParams_, opts...)
7064 res, err := c.doRequest("json")
7065 if res != nil && res.StatusCode == http.StatusNotModified {
7066 if res.Body != nil {
7067 res.Body.Close()
7068 }
7069 return nil, gensupport.WrapError(&googleapi.Error{
7070 Code: res.StatusCode,
7071 Header: res.Header,
7072 })
7073 }
7074 if err != nil {
7075 return nil, err
7076 }
7077 defer googleapi.CloseBody(res)
7078 if err := googleapi.CheckResponse(res); err != nil {
7079 return nil, gensupport.WrapError(err)
7080 }
7081 ret := &Operation{
7082 ServerResponse: googleapi.ServerResponse{
7083 Header: res.Header,
7084 HTTPStatusCode: res.StatusCode,
7085 },
7086 }
7087 target := &ret
7088 b, err := gensupport.DecodeResponseBytes(target, res)
7089 if err != nil {
7090 return nil, err
7091 }
7092 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.delete", "response", internallog.HTTPResponse(res, b))
7093 return ret, nil
7094 }
7095
7096 type ProjectsLocationsServicesBackupsGetCall struct {
7097 s *APIService
7098 name string
7099 urlParams_ gensupport.URLParams
7100 ifNoneMatch_ string
7101 ctx_ context.Context
7102 header_ http.Header
7103 }
7104
7105 // Get: Gets details of a single backup.
7106 //
7107 // - name: The relative resource name of the backup to retrieve, in the
7108 // following
7109 // form:projects/{project_number}/locations/{location_id}/services/{service_id
7110 // }/backups/{backup_id}.
7111 func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall {
7112 c := &ProjectsLocationsServicesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7113 c.name = name
7114 return c
7115 }
7116
7117 // Fields allows partial responses to be retrieved. See
7118 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7119 // details.
7120 func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall {
7121 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7122 return c
7123 }
7124
7125 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7126 // object's ETag matches the given value. This is useful for getting updates
7127 // only after the object has changed since the last request.
7128 func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall {
7129 c.ifNoneMatch_ = entityTag
7130 return c
7131 }
7132
7133 // Context sets the context to be used in this call's Do method.
7134 func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall {
7135 c.ctx_ = ctx
7136 return c
7137 }
7138
7139 // Header returns a http.Header that can be modified by the caller to add
7140 // headers to the request.
7141 func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header {
7142 if c.header_ == nil {
7143 c.header_ = make(http.Header)
7144 }
7145 return c.header_
7146 }
7147
7148 func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) {
7149 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7150 if c.ifNoneMatch_ != "" {
7151 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7152 }
7153 c.urlParams_.Set("alt", alt)
7154 c.urlParams_.Set("prettyPrint", "false")
7155 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
7156 urls += "?" + c.urlParams_.Encode()
7157 req, err := http.NewRequest("GET", urls, nil)
7158 if err != nil {
7159 return nil, err
7160 }
7161 req.Header = reqHeaders
7162 googleapi.Expand(req.URL, map[string]string{
7163 "name": c.name,
7164 })
7165 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.get", "request", internallog.HTTPRequest(req, nil))
7166 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7167 }
7168
7169 // Do executes the "metastore.projects.locations.services.backups.get" call.
7170 // Any non-2xx status code is an error. Response headers are in either
7171 // *Backup.ServerResponse.Header or (if a response was returned at all) in
7172 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7173 // whether the returned error was because http.StatusNotModified was returned.
7174 func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
7175 gensupport.SetOptions(c.urlParams_, opts...)
7176 res, err := c.doRequest("json")
7177 if res != nil && res.StatusCode == http.StatusNotModified {
7178 if res.Body != nil {
7179 res.Body.Close()
7180 }
7181 return nil, gensupport.WrapError(&googleapi.Error{
7182 Code: res.StatusCode,
7183 Header: res.Header,
7184 })
7185 }
7186 if err != nil {
7187 return nil, err
7188 }
7189 defer googleapi.CloseBody(res)
7190 if err := googleapi.CheckResponse(res); err != nil {
7191 return nil, gensupport.WrapError(err)
7192 }
7193 ret := &Backup{
7194 ServerResponse: googleapi.ServerResponse{
7195 Header: res.Header,
7196 HTTPStatusCode: res.StatusCode,
7197 },
7198 }
7199 target := &ret
7200 b, err := gensupport.DecodeResponseBytes(target, res)
7201 if err != nil {
7202 return nil, err
7203 }
7204 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.get", "response", internallog.HTTPResponse(res, b))
7205 return ret, nil
7206 }
7207
7208 type ProjectsLocationsServicesBackupsGetIamPolicyCall struct {
7209 s *APIService
7210 resource string
7211 urlParams_ gensupport.URLParams
7212 ifNoneMatch_ string
7213 ctx_ context.Context
7214 header_ http.Header
7215 }
7216
7217 // GetIamPolicy: Gets the access control policy for a resource. Returns an
7218 // empty policy if the resource exists and does not have a policy set.
7219 //
7220 // - resource: REQUIRED: The resource for which the policy is being requested.
7221 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7222 // for the appropriate value for this field.
7223 func (r *ProjectsLocationsServicesBackupsService) GetIamPolicy(resource string) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
7224 c := &ProjectsLocationsServicesBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7225 c.resource = resource
7226 return c
7227 }
7228
7229 // OptionsRequestedPolicyVersion sets the optional parameter
7230 // "options.requestedPolicyVersion": The maximum policy version that will be
7231 // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
7232 // an invalid value will be rejected.Requests for policies with any conditional
7233 // role bindings must specify version 3. Policies with no conditional role
7234 // bindings may specify any valid value or leave the field unset.The policy in
7235 // the response might use the policy version that you specified, or it might
7236 // use a lower policy version. For example, if you specify version 3, but the
7237 // policy has no conditional role bindings, the response uses version 1.To
7238 // learn which resources support conditions in their IAM policies, see the IAM
7239 // documentation
7240 // (https://cloud.google.com/iam/help/conditions/resource-policies).
7241 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
7242 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7243 return c
7244 }
7245
7246 // Fields allows partial responses to be retrieved. See
7247 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7248 // details.
7249 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
7250 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7251 return c
7252 }
7253
7254 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7255 // object's ETag matches the given value. This is useful for getting updates
7256 // only after the object has changed since the last request.
7257 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
7258 c.ifNoneMatch_ = entityTag
7259 return c
7260 }
7261
7262 // Context sets the context to be used in this call's Do method.
7263 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
7264 c.ctx_ = ctx
7265 return c
7266 }
7267
7268 // Header returns a http.Header that can be modified by the caller to add
7269 // headers to the request.
7270 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Header() http.Header {
7271 if c.header_ == nil {
7272 c.header_ = make(http.Header)
7273 }
7274 return c.header_
7275 }
7276
7277 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7278 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7279 if c.ifNoneMatch_ != "" {
7280 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7281 }
7282 c.urlParams_.Set("alt", alt)
7283 c.urlParams_.Set("prettyPrint", "false")
7284 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
7285 urls += "?" + c.urlParams_.Encode()
7286 req, err := http.NewRequest("GET", urls, nil)
7287 if err != nil {
7288 return nil, err
7289 }
7290 req.Header = reqHeaders
7291 googleapi.Expand(req.URL, map[string]string{
7292 "resource": c.resource,
7293 })
7294 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
7295 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7296 }
7297
7298 // Do executes the "metastore.projects.locations.services.backups.getIamPolicy" call.
7299 // Any non-2xx status code is an error. Response headers are in either
7300 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7301 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7302 // whether the returned error was because http.StatusNotModified was returned.
7303 func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7304 gensupport.SetOptions(c.urlParams_, opts...)
7305 res, err := c.doRequest("json")
7306 if res != nil && res.StatusCode == http.StatusNotModified {
7307 if res.Body != nil {
7308 res.Body.Close()
7309 }
7310 return nil, gensupport.WrapError(&googleapi.Error{
7311 Code: res.StatusCode,
7312 Header: res.Header,
7313 })
7314 }
7315 if err != nil {
7316 return nil, err
7317 }
7318 defer googleapi.CloseBody(res)
7319 if err := googleapi.CheckResponse(res); err != nil {
7320 return nil, gensupport.WrapError(err)
7321 }
7322 ret := &Policy{
7323 ServerResponse: googleapi.ServerResponse{
7324 Header: res.Header,
7325 HTTPStatusCode: res.StatusCode,
7326 },
7327 }
7328 target := &ret
7329 b, err := gensupport.DecodeResponseBytes(target, res)
7330 if err != nil {
7331 return nil, err
7332 }
7333 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.getIamPolicy", "response", internallog.HTTPResponse(res, b))
7334 return ret, nil
7335 }
7336
7337 type ProjectsLocationsServicesBackupsListCall struct {
7338 s *APIService
7339 parent string
7340 urlParams_ gensupport.URLParams
7341 ifNoneMatch_ string
7342 ctx_ context.Context
7343 header_ http.Header
7344 }
7345
7346 // List: Lists backups in a service.
7347 //
7348 // - parent: The relative resource name of the service whose backups to list,
7349 // in the following
7350 // form:projects/{project_number}/locations/{location_id}/services/{service_id
7351 // }/backups.
7352 func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall {
7353 c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7354 c.parent = parent
7355 return c
7356 }
7357
7358 // Filter sets the optional parameter "filter": The filter to apply to list
7359 // results.
7360 func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall {
7361 c.urlParams_.Set("filter", filter)
7362 return c
7363 }
7364
7365 // OrderBy sets the optional parameter "orderBy": Specify the ordering of
7366 // results as described in Sorting Order
7367 // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
7368 // specified, the results will be sorted in the default order.
7369 func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall {
7370 c.urlParams_.Set("orderBy", orderBy)
7371 return c
7372 }
7373
7374 // PageSize sets the optional parameter "pageSize": The maximum number of
7375 // backups to return. The response may contain less than the maximum number. If
7376 // unspecified, no more than 500 backups are returned. The maximum value is
7377 // 1000; values above 1000 are changed to 1000.
7378 func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall {
7379 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7380 return c
7381 }
7382
7383 // PageToken sets the optional parameter "pageToken": A page token, received
7384 // from a previous DataprocMetastore.ListBackups call. Provide this token to
7385 // retrieve the subsequent page.To retrieve the first page, supply an empty
7386 // page token.When paginating, other parameters provided to
7387 // DataprocMetastore.ListBackups must match the call that provided the page
7388 // token.
7389 func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall {
7390 c.urlParams_.Set("pageToken", pageToken)
7391 return c
7392 }
7393
7394 // Fields allows partial responses to be retrieved. See
7395 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7396 // details.
7397 func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall {
7398 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7399 return c
7400 }
7401
7402 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7403 // object's ETag matches the given value. This is useful for getting updates
7404 // only after the object has changed since the last request.
7405 func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall {
7406 c.ifNoneMatch_ = entityTag
7407 return c
7408 }
7409
7410 // Context sets the context to be used in this call's Do method.
7411 func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall {
7412 c.ctx_ = ctx
7413 return c
7414 }
7415
7416 // Header returns a http.Header that can be modified by the caller to add
7417 // headers to the request.
7418 func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header {
7419 if c.header_ == nil {
7420 c.header_ = make(http.Header)
7421 }
7422 return c.header_
7423 }
7424
7425 func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) {
7426 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7427 if c.ifNoneMatch_ != "" {
7428 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7429 }
7430 c.urlParams_.Set("alt", alt)
7431 c.urlParams_.Set("prettyPrint", "false")
7432 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/backups")
7433 urls += "?" + c.urlParams_.Encode()
7434 req, err := http.NewRequest("GET", urls, nil)
7435 if err != nil {
7436 return nil, err
7437 }
7438 req.Header = reqHeaders
7439 googleapi.Expand(req.URL, map[string]string{
7440 "parent": c.parent,
7441 })
7442 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.list", "request", internallog.HTTPRequest(req, nil))
7443 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7444 }
7445
7446 // Do executes the "metastore.projects.locations.services.backups.list" call.
7447 // Any non-2xx status code is an error. Response headers are in either
7448 // *ListBackupsResponse.ServerResponse.Header or (if a response was returned at
7449 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7450 // check whether the returned error was because http.StatusNotModified was
7451 // returned.
7452 func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
7453 gensupport.SetOptions(c.urlParams_, opts...)
7454 res, err := c.doRequest("json")
7455 if res != nil && res.StatusCode == http.StatusNotModified {
7456 if res.Body != nil {
7457 res.Body.Close()
7458 }
7459 return nil, gensupport.WrapError(&googleapi.Error{
7460 Code: res.StatusCode,
7461 Header: res.Header,
7462 })
7463 }
7464 if err != nil {
7465 return nil, err
7466 }
7467 defer googleapi.CloseBody(res)
7468 if err := googleapi.CheckResponse(res); err != nil {
7469 return nil, gensupport.WrapError(err)
7470 }
7471 ret := &ListBackupsResponse{
7472 ServerResponse: googleapi.ServerResponse{
7473 Header: res.Header,
7474 HTTPStatusCode: res.StatusCode,
7475 },
7476 }
7477 target := &ret
7478 b, err := gensupport.DecodeResponseBytes(target, res)
7479 if err != nil {
7480 return nil, err
7481 }
7482 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.list", "response", internallog.HTTPResponse(res, b))
7483 return ret, nil
7484 }
7485
7486 // Pages invokes f for each page of results.
7487 // A non-nil error returned from f will halt the iteration.
7488 // The provided context supersedes any context provided to the Context method.
7489 func (c *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
7490 c.ctx_ = ctx
7491 defer c.PageToken(c.urlParams_.Get("pageToken"))
7492 for {
7493 x, err := c.Do()
7494 if err != nil {
7495 return err
7496 }
7497 if err := f(x); err != nil {
7498 return err
7499 }
7500 if x.NextPageToken == "" {
7501 return nil
7502 }
7503 c.PageToken(x.NextPageToken)
7504 }
7505 }
7506
7507 type ProjectsLocationsServicesBackupsSetIamPolicyCall struct {
7508 s *APIService
7509 resource string
7510 setiampolicyrequest *SetIamPolicyRequest
7511 urlParams_ gensupport.URLParams
7512 ctx_ context.Context
7513 header_ http.Header
7514 }
7515
7516 // SetIamPolicy: Sets the access control policy on the specified resource.
7517 // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
7518 // PERMISSION_DENIED errors.
7519 //
7520 // - resource: REQUIRED: The resource for which the policy is being specified.
7521 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7522 // for the appropriate value for this field.
7523 func (r *ProjectsLocationsServicesBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
7524 c := &ProjectsLocationsServicesBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7525 c.resource = resource
7526 c.setiampolicyrequest = setiampolicyrequest
7527 return c
7528 }
7529
7530 // Fields allows partial responses to be retrieved. See
7531 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7532 // details.
7533 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
7534 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7535 return c
7536 }
7537
7538 // Context sets the context to be used in this call's Do method.
7539 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
7540 c.ctx_ = ctx
7541 return c
7542 }
7543
7544 // Header returns a http.Header that can be modified by the caller to add
7545 // headers to the request.
7546 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Header() http.Header {
7547 if c.header_ == nil {
7548 c.header_ = make(http.Header)
7549 }
7550 return c.header_
7551 }
7552
7553 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7554 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7555 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
7556 if err != nil {
7557 return nil, err
7558 }
7559 c.urlParams_.Set("alt", alt)
7560 c.urlParams_.Set("prettyPrint", "false")
7561 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
7562 urls += "?" + c.urlParams_.Encode()
7563 req, err := http.NewRequest("POST", urls, body)
7564 if err != nil {
7565 return nil, err
7566 }
7567 req.Header = reqHeaders
7568 googleapi.Expand(req.URL, map[string]string{
7569 "resource": c.resource,
7570 })
7571 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
7572 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7573 }
7574
7575 // Do executes the "metastore.projects.locations.services.backups.setIamPolicy" call.
7576 // Any non-2xx status code is an error. Response headers are in either
7577 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7578 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7579 // whether the returned error was because http.StatusNotModified was returned.
7580 func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7581 gensupport.SetOptions(c.urlParams_, opts...)
7582 res, err := c.doRequest("json")
7583 if res != nil && res.StatusCode == http.StatusNotModified {
7584 if res.Body != nil {
7585 res.Body.Close()
7586 }
7587 return nil, gensupport.WrapError(&googleapi.Error{
7588 Code: res.StatusCode,
7589 Header: res.Header,
7590 })
7591 }
7592 if err != nil {
7593 return nil, err
7594 }
7595 defer googleapi.CloseBody(res)
7596 if err := googleapi.CheckResponse(res); err != nil {
7597 return nil, gensupport.WrapError(err)
7598 }
7599 ret := &Policy{
7600 ServerResponse: googleapi.ServerResponse{
7601 Header: res.Header,
7602 HTTPStatusCode: res.StatusCode,
7603 },
7604 }
7605 target := &ret
7606 b, err := gensupport.DecodeResponseBytes(target, res)
7607 if err != nil {
7608 return nil, err
7609 }
7610 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.setIamPolicy", "response", internallog.HTTPResponse(res, b))
7611 return ret, nil
7612 }
7613
7614 type ProjectsLocationsServicesBackupsTestIamPermissionsCall struct {
7615 s *APIService
7616 resource string
7617 testiampermissionsrequest *TestIamPermissionsRequest
7618 urlParams_ gensupport.URLParams
7619 ctx_ context.Context
7620 header_ http.Header
7621 }
7622
7623 // TestIamPermissions: Returns permissions that a caller has on the specified
7624 // resource. If the resource does not exist, this will return an empty set of
7625 // permissions, not a NOT_FOUND error.Note: This operation is designed to be
7626 // used for building permission-aware UIs and command-line tools, not for
7627 // authorization checking. This operation may "fail open" without warning.
7628 //
7629 // - resource: REQUIRED: The resource for which the policy detail is being
7630 // requested. See Resource names
7631 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
7632 // value for this field.
7633 func (r *ProjectsLocationsServicesBackupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesBackupsTestIamPermissionsCall {
7634 c := &ProjectsLocationsServicesBackupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7635 c.resource = resource
7636 c.testiampermissionsrequest = testiampermissionsrequest
7637 return c
7638 }
7639
7640 // Fields allows partial responses to be retrieved. See
7641 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7642 // details.
7643 func (c *ProjectsLocationsServicesBackupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsTestIamPermissionsCall {
7644 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7645 return c
7646 }
7647
7648 // Context sets the context to be used in this call's Do method.
7649 func (c *ProjectsLocationsServicesBackupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsTestIamPermissionsCall {
7650 c.ctx_ = ctx
7651 return c
7652 }
7653
7654 // Header returns a http.Header that can be modified by the caller to add
7655 // headers to the request.
7656 func (c *ProjectsLocationsServicesBackupsTestIamPermissionsCall) Header() http.Header {
7657 if c.header_ == nil {
7658 c.header_ = make(http.Header)
7659 }
7660 return c.header_
7661 }
7662
7663 func (c *ProjectsLocationsServicesBackupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7664 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7665 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
7666 if err != nil {
7667 return nil, err
7668 }
7669 c.urlParams_.Set("alt", alt)
7670 c.urlParams_.Set("prettyPrint", "false")
7671 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
7672 urls += "?" + c.urlParams_.Encode()
7673 req, err := http.NewRequest("POST", urls, body)
7674 if err != nil {
7675 return nil, err
7676 }
7677 req.Header = reqHeaders
7678 googleapi.Expand(req.URL, map[string]string{
7679 "resource": c.resource,
7680 })
7681 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
7682 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7683 }
7684
7685 // Do executes the "metastore.projects.locations.services.backups.testIamPermissions" call.
7686 // Any non-2xx status code is an error. Response headers are in either
7687 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
7688 // returned at all) in error.(*googleapi.Error).Header. Use
7689 // googleapi.IsNotModified to check whether the returned error was because
7690 // http.StatusNotModified was returned.
7691 func (c *ProjectsLocationsServicesBackupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7692 gensupport.SetOptions(c.urlParams_, opts...)
7693 res, err := c.doRequest("json")
7694 if res != nil && res.StatusCode == http.StatusNotModified {
7695 if res.Body != nil {
7696 res.Body.Close()
7697 }
7698 return nil, gensupport.WrapError(&googleapi.Error{
7699 Code: res.StatusCode,
7700 Header: res.Header,
7701 })
7702 }
7703 if err != nil {
7704 return nil, err
7705 }
7706 defer googleapi.CloseBody(res)
7707 if err := googleapi.CheckResponse(res); err != nil {
7708 return nil, gensupport.WrapError(err)
7709 }
7710 ret := &TestIamPermissionsResponse{
7711 ServerResponse: googleapi.ServerResponse{
7712 Header: res.Header,
7713 HTTPStatusCode: res.StatusCode,
7714 },
7715 }
7716 target := &ret
7717 b, err := gensupport.DecodeResponseBytes(target, res)
7718 if err != nil {
7719 return nil, err
7720 }
7721 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.backups.testIamPermissions", "response", internallog.HTTPResponse(res, b))
7722 return ret, nil
7723 }
7724
7725 type ProjectsLocationsServicesDatabasesGetIamPolicyCall struct {
7726 s *APIService
7727 resource string
7728 urlParams_ gensupport.URLParams
7729 ifNoneMatch_ string
7730 ctx_ context.Context
7731 header_ http.Header
7732 }
7733
7734 // GetIamPolicy: Gets the access control policy for a resource. Returns an
7735 // empty policy if the resource exists and does not have a policy set.
7736 //
7737 // - resource: REQUIRED: The resource for which the policy is being requested.
7738 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7739 // for the appropriate value for this field.
7740 func (r *ProjectsLocationsServicesDatabasesService) GetIamPolicy(resource string) *ProjectsLocationsServicesDatabasesGetIamPolicyCall {
7741 c := &ProjectsLocationsServicesDatabasesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7742 c.resource = resource
7743 return c
7744 }
7745
7746 // OptionsRequestedPolicyVersion sets the optional parameter
7747 // "options.requestedPolicyVersion": The maximum policy version that will be
7748 // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
7749 // an invalid value will be rejected.Requests for policies with any conditional
7750 // role bindings must specify version 3. Policies with no conditional role
7751 // bindings may specify any valid value or leave the field unset.The policy in
7752 // the response might use the policy version that you specified, or it might
7753 // use a lower policy version. For example, if you specify version 3, but the
7754 // policy has no conditional role bindings, the response uses version 1.To
7755 // learn which resources support conditions in their IAM policies, see the IAM
7756 // documentation
7757 // (https://cloud.google.com/iam/help/conditions/resource-policies).
7758 func (c *ProjectsLocationsServicesDatabasesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesDatabasesGetIamPolicyCall {
7759 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7760 return c
7761 }
7762
7763 // Fields allows partial responses to be retrieved. See
7764 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7765 // details.
7766 func (c *ProjectsLocationsServicesDatabasesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDatabasesGetIamPolicyCall {
7767 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7768 return c
7769 }
7770
7771 // IfNoneMatch sets an optional parameter which makes the operation fail if the
7772 // object's ETag matches the given value. This is useful for getting updates
7773 // only after the object has changed since the last request.
7774 func (c *ProjectsLocationsServicesDatabasesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesDatabasesGetIamPolicyCall {
7775 c.ifNoneMatch_ = entityTag
7776 return c
7777 }
7778
7779 // Context sets the context to be used in this call's Do method.
7780 func (c *ProjectsLocationsServicesDatabasesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesDatabasesGetIamPolicyCall {
7781 c.ctx_ = ctx
7782 return c
7783 }
7784
7785 // Header returns a http.Header that can be modified by the caller to add
7786 // headers to the request.
7787 func (c *ProjectsLocationsServicesDatabasesGetIamPolicyCall) Header() http.Header {
7788 if c.header_ == nil {
7789 c.header_ = make(http.Header)
7790 }
7791 return c.header_
7792 }
7793
7794 func (c *ProjectsLocationsServicesDatabasesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7795 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
7796 if c.ifNoneMatch_ != "" {
7797 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7798 }
7799 c.urlParams_.Set("alt", alt)
7800 c.urlParams_.Set("prettyPrint", "false")
7801 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
7802 urls += "?" + c.urlParams_.Encode()
7803 req, err := http.NewRequest("GET", urls, nil)
7804 if err != nil {
7805 return nil, err
7806 }
7807 req.Header = reqHeaders
7808 googleapi.Expand(req.URL, map[string]string{
7809 "resource": c.resource,
7810 })
7811 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
7812 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7813 }
7814
7815 // Do executes the "metastore.projects.locations.services.databases.getIamPolicy" call.
7816 // Any non-2xx status code is an error. Response headers are in either
7817 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7818 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7819 // whether the returned error was because http.StatusNotModified was returned.
7820 func (c *ProjectsLocationsServicesDatabasesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7821 gensupport.SetOptions(c.urlParams_, opts...)
7822 res, err := c.doRequest("json")
7823 if res != nil && res.StatusCode == http.StatusNotModified {
7824 if res.Body != nil {
7825 res.Body.Close()
7826 }
7827 return nil, gensupport.WrapError(&googleapi.Error{
7828 Code: res.StatusCode,
7829 Header: res.Header,
7830 })
7831 }
7832 if err != nil {
7833 return nil, err
7834 }
7835 defer googleapi.CloseBody(res)
7836 if err := googleapi.CheckResponse(res); err != nil {
7837 return nil, gensupport.WrapError(err)
7838 }
7839 ret := &Policy{
7840 ServerResponse: googleapi.ServerResponse{
7841 Header: res.Header,
7842 HTTPStatusCode: res.StatusCode,
7843 },
7844 }
7845 target := &ret
7846 b, err := gensupport.DecodeResponseBytes(target, res)
7847 if err != nil {
7848 return nil, err
7849 }
7850 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.getIamPolicy", "response", internallog.HTTPResponse(res, b))
7851 return ret, nil
7852 }
7853
7854 type ProjectsLocationsServicesDatabasesSetIamPolicyCall struct {
7855 s *APIService
7856 resource string
7857 setiampolicyrequest *SetIamPolicyRequest
7858 urlParams_ gensupport.URLParams
7859 ctx_ context.Context
7860 header_ http.Header
7861 }
7862
7863 // SetIamPolicy: Sets the access control policy on the specified resource.
7864 // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
7865 // PERMISSION_DENIED errors.
7866 //
7867 // - resource: REQUIRED: The resource for which the policy is being specified.
7868 // See Resource names (https://cloud.google.com/apis/design/resource_names)
7869 // for the appropriate value for this field.
7870 func (r *ProjectsLocationsServicesDatabasesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesDatabasesSetIamPolicyCall {
7871 c := &ProjectsLocationsServicesDatabasesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7872 c.resource = resource
7873 c.setiampolicyrequest = setiampolicyrequest
7874 return c
7875 }
7876
7877 // Fields allows partial responses to be retrieved. See
7878 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7879 // details.
7880 func (c *ProjectsLocationsServicesDatabasesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDatabasesSetIamPolicyCall {
7881 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7882 return c
7883 }
7884
7885 // Context sets the context to be used in this call's Do method.
7886 func (c *ProjectsLocationsServicesDatabasesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesDatabasesSetIamPolicyCall {
7887 c.ctx_ = ctx
7888 return c
7889 }
7890
7891 // Header returns a http.Header that can be modified by the caller to add
7892 // headers to the request.
7893 func (c *ProjectsLocationsServicesDatabasesSetIamPolicyCall) Header() http.Header {
7894 if c.header_ == nil {
7895 c.header_ = make(http.Header)
7896 }
7897 return c.header_
7898 }
7899
7900 func (c *ProjectsLocationsServicesDatabasesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7901 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
7902 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
7903 if err != nil {
7904 return nil, err
7905 }
7906 c.urlParams_.Set("alt", alt)
7907 c.urlParams_.Set("prettyPrint", "false")
7908 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
7909 urls += "?" + c.urlParams_.Encode()
7910 req, err := http.NewRequest("POST", urls, body)
7911 if err != nil {
7912 return nil, err
7913 }
7914 req.Header = reqHeaders
7915 googleapi.Expand(req.URL, map[string]string{
7916 "resource": c.resource,
7917 })
7918 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
7919 return gensupport.SendRequest(c.ctx_, c.s.client, req)
7920 }
7921
7922 // Do executes the "metastore.projects.locations.services.databases.setIamPolicy" call.
7923 // Any non-2xx status code is an error. Response headers are in either
7924 // *Policy.ServerResponse.Header or (if a response was returned at all) in
7925 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
7926 // whether the returned error was because http.StatusNotModified was returned.
7927 func (c *ProjectsLocationsServicesDatabasesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7928 gensupport.SetOptions(c.urlParams_, opts...)
7929 res, err := c.doRequest("json")
7930 if res != nil && res.StatusCode == http.StatusNotModified {
7931 if res.Body != nil {
7932 res.Body.Close()
7933 }
7934 return nil, gensupport.WrapError(&googleapi.Error{
7935 Code: res.StatusCode,
7936 Header: res.Header,
7937 })
7938 }
7939 if err != nil {
7940 return nil, err
7941 }
7942 defer googleapi.CloseBody(res)
7943 if err := googleapi.CheckResponse(res); err != nil {
7944 return nil, gensupport.WrapError(err)
7945 }
7946 ret := &Policy{
7947 ServerResponse: googleapi.ServerResponse{
7948 Header: res.Header,
7949 HTTPStatusCode: res.StatusCode,
7950 },
7951 }
7952 target := &ret
7953 b, err := gensupport.DecodeResponseBytes(target, res)
7954 if err != nil {
7955 return nil, err
7956 }
7957 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.setIamPolicy", "response", internallog.HTTPResponse(res, b))
7958 return ret, nil
7959 }
7960
7961 type ProjectsLocationsServicesDatabasesTestIamPermissionsCall struct {
7962 s *APIService
7963 resource string
7964 testiampermissionsrequest *TestIamPermissionsRequest
7965 urlParams_ gensupport.URLParams
7966 ctx_ context.Context
7967 header_ http.Header
7968 }
7969
7970 // TestIamPermissions: Returns permissions that a caller has on the specified
7971 // resource. If the resource does not exist, this will return an empty set of
7972 // permissions, not a NOT_FOUND error.Note: This operation is designed to be
7973 // used for building permission-aware UIs and command-line tools, not for
7974 // authorization checking. This operation may "fail open" without warning.
7975 //
7976 // - resource: REQUIRED: The resource for which the policy detail is being
7977 // requested. See Resource names
7978 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
7979 // value for this field.
7980 func (r *ProjectsLocationsServicesDatabasesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesDatabasesTestIamPermissionsCall {
7981 c := &ProjectsLocationsServicesDatabasesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7982 c.resource = resource
7983 c.testiampermissionsrequest = testiampermissionsrequest
7984 return c
7985 }
7986
7987 // Fields allows partial responses to be retrieved. See
7988 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
7989 // details.
7990 func (c *ProjectsLocationsServicesDatabasesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDatabasesTestIamPermissionsCall {
7991 c.urlParams_.Set("fields", googleapi.CombineFields(s))
7992 return c
7993 }
7994
7995 // Context sets the context to be used in this call's Do method.
7996 func (c *ProjectsLocationsServicesDatabasesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesDatabasesTestIamPermissionsCall {
7997 c.ctx_ = ctx
7998 return c
7999 }
8000
8001 // Header returns a http.Header that can be modified by the caller to add
8002 // headers to the request.
8003 func (c *ProjectsLocationsServicesDatabasesTestIamPermissionsCall) Header() http.Header {
8004 if c.header_ == nil {
8005 c.header_ = make(http.Header)
8006 }
8007 return c.header_
8008 }
8009
8010 func (c *ProjectsLocationsServicesDatabasesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8011 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8012 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
8013 if err != nil {
8014 return nil, err
8015 }
8016 c.urlParams_.Set("alt", alt)
8017 c.urlParams_.Set("prettyPrint", "false")
8018 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
8019 urls += "?" + c.urlParams_.Encode()
8020 req, err := http.NewRequest("POST", urls, body)
8021 if err != nil {
8022 return nil, err
8023 }
8024 req.Header = reqHeaders
8025 googleapi.Expand(req.URL, map[string]string{
8026 "resource": c.resource,
8027 })
8028 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
8029 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8030 }
8031
8032 // Do executes the "metastore.projects.locations.services.databases.testIamPermissions" call.
8033 // Any non-2xx status code is an error. Response headers are in either
8034 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
8035 // returned at all) in error.(*googleapi.Error).Header. Use
8036 // googleapi.IsNotModified to check whether the returned error was because
8037 // http.StatusNotModified was returned.
8038 func (c *ProjectsLocationsServicesDatabasesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8039 gensupport.SetOptions(c.urlParams_, opts...)
8040 res, err := c.doRequest("json")
8041 if res != nil && res.StatusCode == http.StatusNotModified {
8042 if res.Body != nil {
8043 res.Body.Close()
8044 }
8045 return nil, gensupport.WrapError(&googleapi.Error{
8046 Code: res.StatusCode,
8047 Header: res.Header,
8048 })
8049 }
8050 if err != nil {
8051 return nil, err
8052 }
8053 defer googleapi.CloseBody(res)
8054 if err := googleapi.CheckResponse(res); err != nil {
8055 return nil, gensupport.WrapError(err)
8056 }
8057 ret := &TestIamPermissionsResponse{
8058 ServerResponse: googleapi.ServerResponse{
8059 Header: res.Header,
8060 HTTPStatusCode: res.StatusCode,
8061 },
8062 }
8063 target := &ret
8064 b, err := gensupport.DecodeResponseBytes(target, res)
8065 if err != nil {
8066 return nil, err
8067 }
8068 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.testIamPermissions", "response", internallog.HTTPResponse(res, b))
8069 return ret, nil
8070 }
8071
8072 type ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall struct {
8073 s *APIService
8074 resource string
8075 urlParams_ gensupport.URLParams
8076 ifNoneMatch_ string
8077 ctx_ context.Context
8078 header_ http.Header
8079 }
8080
8081 // GetIamPolicy: Gets the access control policy for a resource. Returns an
8082 // empty policy if the resource exists and does not have a policy set.
8083 //
8084 // - resource: REQUIRED: The resource for which the policy is being requested.
8085 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8086 // for the appropriate value for this field.
8087 func (r *ProjectsLocationsServicesDatabasesTablesService) GetIamPolicy(resource string) *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall {
8088 c := &ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8089 c.resource = resource
8090 return c
8091 }
8092
8093 // OptionsRequestedPolicyVersion sets the optional parameter
8094 // "options.requestedPolicyVersion": The maximum policy version that will be
8095 // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
8096 // an invalid value will be rejected.Requests for policies with any conditional
8097 // role bindings must specify version 3. Policies with no conditional role
8098 // bindings may specify any valid value or leave the field unset.The policy in
8099 // the response might use the policy version that you specified, or it might
8100 // use a lower policy version. For example, if you specify version 3, but the
8101 // policy has no conditional role bindings, the response uses version 1.To
8102 // learn which resources support conditions in their IAM policies, see the IAM
8103 // documentation
8104 // (https://cloud.google.com/iam/help/conditions/resource-policies).
8105 func (c *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall {
8106 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8107 return c
8108 }
8109
8110 // Fields allows partial responses to be retrieved. See
8111 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8112 // details.
8113 func (c *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall {
8114 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8115 return c
8116 }
8117
8118 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8119 // object's ETag matches the given value. This is useful for getting updates
8120 // only after the object has changed since the last request.
8121 func (c *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall {
8122 c.ifNoneMatch_ = entityTag
8123 return c
8124 }
8125
8126 // Context sets the context to be used in this call's Do method.
8127 func (c *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall {
8128 c.ctx_ = ctx
8129 return c
8130 }
8131
8132 // Header returns a http.Header that can be modified by the caller to add
8133 // headers to the request.
8134 func (c *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall) Header() http.Header {
8135 if c.header_ == nil {
8136 c.header_ = make(http.Header)
8137 }
8138 return c.header_
8139 }
8140
8141 func (c *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8142 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8143 if c.ifNoneMatch_ != "" {
8144 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8145 }
8146 c.urlParams_.Set("alt", alt)
8147 c.urlParams_.Set("prettyPrint", "false")
8148 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
8149 urls += "?" + c.urlParams_.Encode()
8150 req, err := http.NewRequest("GET", urls, nil)
8151 if err != nil {
8152 return nil, err
8153 }
8154 req.Header = reqHeaders
8155 googleapi.Expand(req.URL, map[string]string{
8156 "resource": c.resource,
8157 })
8158 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.tables.getIamPolicy", "request", internallog.HTTPRequest(req, nil))
8159 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8160 }
8161
8162 // Do executes the "metastore.projects.locations.services.databases.tables.getIamPolicy" call.
8163 // Any non-2xx status code is an error. Response headers are in either
8164 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8165 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8166 // whether the returned error was because http.StatusNotModified was returned.
8167 func (c *ProjectsLocationsServicesDatabasesTablesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8168 gensupport.SetOptions(c.urlParams_, opts...)
8169 res, err := c.doRequest("json")
8170 if res != nil && res.StatusCode == http.StatusNotModified {
8171 if res.Body != nil {
8172 res.Body.Close()
8173 }
8174 return nil, gensupport.WrapError(&googleapi.Error{
8175 Code: res.StatusCode,
8176 Header: res.Header,
8177 })
8178 }
8179 if err != nil {
8180 return nil, err
8181 }
8182 defer googleapi.CloseBody(res)
8183 if err := googleapi.CheckResponse(res); err != nil {
8184 return nil, gensupport.WrapError(err)
8185 }
8186 ret := &Policy{
8187 ServerResponse: googleapi.ServerResponse{
8188 Header: res.Header,
8189 HTTPStatusCode: res.StatusCode,
8190 },
8191 }
8192 target := &ret
8193 b, err := gensupport.DecodeResponseBytes(target, res)
8194 if err != nil {
8195 return nil, err
8196 }
8197 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.tables.getIamPolicy", "response", internallog.HTTPResponse(res, b))
8198 return ret, nil
8199 }
8200
8201 type ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall struct {
8202 s *APIService
8203 resource string
8204 setiampolicyrequest *SetIamPolicyRequest
8205 urlParams_ gensupport.URLParams
8206 ctx_ context.Context
8207 header_ http.Header
8208 }
8209
8210 // SetIamPolicy: Sets the access control policy on the specified resource.
8211 // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
8212 // PERMISSION_DENIED errors.
8213 //
8214 // - resource: REQUIRED: The resource for which the policy is being specified.
8215 // See Resource names (https://cloud.google.com/apis/design/resource_names)
8216 // for the appropriate value for this field.
8217 func (r *ProjectsLocationsServicesDatabasesTablesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall {
8218 c := &ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8219 c.resource = resource
8220 c.setiampolicyrequest = setiampolicyrequest
8221 return c
8222 }
8223
8224 // Fields allows partial responses to be retrieved. See
8225 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8226 // details.
8227 func (c *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall {
8228 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8229 return c
8230 }
8231
8232 // Context sets the context to be used in this call's Do method.
8233 func (c *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall {
8234 c.ctx_ = ctx
8235 return c
8236 }
8237
8238 // Header returns a http.Header that can be modified by the caller to add
8239 // headers to the request.
8240 func (c *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall) Header() http.Header {
8241 if c.header_ == nil {
8242 c.header_ = make(http.Header)
8243 }
8244 return c.header_
8245 }
8246
8247 func (c *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8248 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8249 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.setiampolicyrequest)
8250 if err != nil {
8251 return nil, err
8252 }
8253 c.urlParams_.Set("alt", alt)
8254 c.urlParams_.Set("prettyPrint", "false")
8255 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
8256 urls += "?" + c.urlParams_.Encode()
8257 req, err := http.NewRequest("POST", urls, body)
8258 if err != nil {
8259 return nil, err
8260 }
8261 req.Header = reqHeaders
8262 googleapi.Expand(req.URL, map[string]string{
8263 "resource": c.resource,
8264 })
8265 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.tables.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes()))
8266 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8267 }
8268
8269 // Do executes the "metastore.projects.locations.services.databases.tables.setIamPolicy" call.
8270 // Any non-2xx status code is an error. Response headers are in either
8271 // *Policy.ServerResponse.Header or (if a response was returned at all) in
8272 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8273 // whether the returned error was because http.StatusNotModified was returned.
8274 func (c *ProjectsLocationsServicesDatabasesTablesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8275 gensupport.SetOptions(c.urlParams_, opts...)
8276 res, err := c.doRequest("json")
8277 if res != nil && res.StatusCode == http.StatusNotModified {
8278 if res.Body != nil {
8279 res.Body.Close()
8280 }
8281 return nil, gensupport.WrapError(&googleapi.Error{
8282 Code: res.StatusCode,
8283 Header: res.Header,
8284 })
8285 }
8286 if err != nil {
8287 return nil, err
8288 }
8289 defer googleapi.CloseBody(res)
8290 if err := googleapi.CheckResponse(res); err != nil {
8291 return nil, gensupport.WrapError(err)
8292 }
8293 ret := &Policy{
8294 ServerResponse: googleapi.ServerResponse{
8295 Header: res.Header,
8296 HTTPStatusCode: res.StatusCode,
8297 },
8298 }
8299 target := &ret
8300 b, err := gensupport.DecodeResponseBytes(target, res)
8301 if err != nil {
8302 return nil, err
8303 }
8304 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.tables.setIamPolicy", "response", internallog.HTTPResponse(res, b))
8305 return ret, nil
8306 }
8307
8308 type ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall struct {
8309 s *APIService
8310 resource string
8311 testiampermissionsrequest *TestIamPermissionsRequest
8312 urlParams_ gensupport.URLParams
8313 ctx_ context.Context
8314 header_ http.Header
8315 }
8316
8317 // TestIamPermissions: Returns permissions that a caller has on the specified
8318 // resource. If the resource does not exist, this will return an empty set of
8319 // permissions, not a NOT_FOUND error.Note: This operation is designed to be
8320 // used for building permission-aware UIs and command-line tools, not for
8321 // authorization checking. This operation may "fail open" without warning.
8322 //
8323 // - resource: REQUIRED: The resource for which the policy detail is being
8324 // requested. See Resource names
8325 // (https://cloud.google.com/apis/design/resource_names) for the appropriate
8326 // value for this field.
8327 func (r *ProjectsLocationsServicesDatabasesTablesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall {
8328 c := &ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8329 c.resource = resource
8330 c.testiampermissionsrequest = testiampermissionsrequest
8331 return c
8332 }
8333
8334 // Fields allows partial responses to be retrieved. See
8335 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8336 // details.
8337 func (c *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall {
8338 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8339 return c
8340 }
8341
8342 // Context sets the context to be used in this call's Do method.
8343 func (c *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall {
8344 c.ctx_ = ctx
8345 return c
8346 }
8347
8348 // Header returns a http.Header that can be modified by the caller to add
8349 // headers to the request.
8350 func (c *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall) Header() http.Header {
8351 if c.header_ == nil {
8352 c.header_ = make(http.Header)
8353 }
8354 return c.header_
8355 }
8356
8357 func (c *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8358 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8359 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.testiampermissionsrequest)
8360 if err != nil {
8361 return nil, err
8362 }
8363 c.urlParams_.Set("alt", alt)
8364 c.urlParams_.Set("prettyPrint", "false")
8365 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
8366 urls += "?" + c.urlParams_.Encode()
8367 req, err := http.NewRequest("POST", urls, body)
8368 if err != nil {
8369 return nil, err
8370 }
8371 req.Header = reqHeaders
8372 googleapi.Expand(req.URL, map[string]string{
8373 "resource": c.resource,
8374 })
8375 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.tables.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes()))
8376 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8377 }
8378
8379 // Do executes the "metastore.projects.locations.services.databases.tables.testIamPermissions" call.
8380 // Any non-2xx status code is an error. Response headers are in either
8381 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
8382 // returned at all) in error.(*googleapi.Error).Header. Use
8383 // googleapi.IsNotModified to check whether the returned error was because
8384 // http.StatusNotModified was returned.
8385 func (c *ProjectsLocationsServicesDatabasesTablesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8386 gensupport.SetOptions(c.urlParams_, opts...)
8387 res, err := c.doRequest("json")
8388 if res != nil && res.StatusCode == http.StatusNotModified {
8389 if res.Body != nil {
8390 res.Body.Close()
8391 }
8392 return nil, gensupport.WrapError(&googleapi.Error{
8393 Code: res.StatusCode,
8394 Header: res.Header,
8395 })
8396 }
8397 if err != nil {
8398 return nil, err
8399 }
8400 defer googleapi.CloseBody(res)
8401 if err := googleapi.CheckResponse(res); err != nil {
8402 return nil, gensupport.WrapError(err)
8403 }
8404 ret := &TestIamPermissionsResponse{
8405 ServerResponse: googleapi.ServerResponse{
8406 Header: res.Header,
8407 HTTPStatusCode: res.StatusCode,
8408 },
8409 }
8410 target := &ret
8411 b, err := gensupport.DecodeResponseBytes(target, res)
8412 if err != nil {
8413 return nil, err
8414 }
8415 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.databases.tables.testIamPermissions", "response", internallog.HTTPResponse(res, b))
8416 return ret, nil
8417 }
8418
8419 type ProjectsLocationsServicesMetadataImportsCreateCall struct {
8420 s *APIService
8421 parent string
8422 metadataimport *MetadataImport
8423 urlParams_ gensupport.URLParams
8424 ctx_ context.Context
8425 header_ http.Header
8426 }
8427
8428 // Create: Creates a new MetadataImport in a given project and location.
8429 //
8430 // - parent: The relative resource name of the service in which to create a
8431 // metastore import, in the following
8432 // form:projects/{project_number}/locations/{location_id}/services/{service_id
8433 // }.
8434 func (r *ProjectsLocationsServicesMetadataImportsService) Create(parent string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsCreateCall {
8435 c := &ProjectsLocationsServicesMetadataImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8436 c.parent = parent
8437 c.metadataimport = metadataimport
8438 return c
8439 }
8440
8441 // MetadataImportId sets the optional parameter "metadataImportId": Required.
8442 // The ID of the metadata import, which is used as the final component of the
8443 // metadata import's name.This value must be between 1 and 64 characters long,
8444 // begin with a letter, end with a letter or number, and consist of
8445 // alpha-numeric ASCII characters or hyphens.
8446 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) MetadataImportId(metadataImportId string) *ProjectsLocationsServicesMetadataImportsCreateCall {
8447 c.urlParams_.Set("metadataImportId", metadataImportId)
8448 return c
8449 }
8450
8451 // RequestId sets the optional parameter "requestId": A request ID. Specify a
8452 // unique request ID to allow the server to ignore the request if it has
8453 // completed. The server will ignore subsequent requests that provide a
8454 // duplicate request ID for at least 60 minutes after the first request.For
8455 // example, if an initial request times out, followed by another request with
8456 // the same request ID, the server ignores the second request to prevent the
8457 // creation of duplicate commitments.The request ID must be a valid UUID
8458 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
8459 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
8460 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsCreateCall {
8461 c.urlParams_.Set("requestId", requestId)
8462 return c
8463 }
8464
8465 // Fields allows partial responses to be retrieved. See
8466 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8467 // details.
8468 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsCreateCall {
8469 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8470 return c
8471 }
8472
8473 // Context sets the context to be used in this call's Do method.
8474 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsCreateCall {
8475 c.ctx_ = ctx
8476 return c
8477 }
8478
8479 // Header returns a http.Header that can be modified by the caller to add
8480 // headers to the request.
8481 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Header() http.Header {
8482 if c.header_ == nil {
8483 c.header_ = make(http.Header)
8484 }
8485 return c.header_
8486 }
8487
8488 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) doRequest(alt string) (*http.Response, error) {
8489 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8490 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.metadataimport)
8491 if err != nil {
8492 return nil, err
8493 }
8494 c.urlParams_.Set("alt", alt)
8495 c.urlParams_.Set("prettyPrint", "false")
8496 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/metadataImports")
8497 urls += "?" + c.urlParams_.Encode()
8498 req, err := http.NewRequest("POST", urls, body)
8499 if err != nil {
8500 return nil, err
8501 }
8502 req.Header = reqHeaders
8503 googleapi.Expand(req.URL, map[string]string{
8504 "parent": c.parent,
8505 })
8506 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.create", "request", internallog.HTTPRequest(req, body.Bytes()))
8507 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8508 }
8509
8510 // Do executes the "metastore.projects.locations.services.metadataImports.create" call.
8511 // Any non-2xx status code is an error. Response headers are in either
8512 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8513 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8514 // whether the returned error was because http.StatusNotModified was returned.
8515 func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8516 gensupport.SetOptions(c.urlParams_, opts...)
8517 res, err := c.doRequest("json")
8518 if res != nil && res.StatusCode == http.StatusNotModified {
8519 if res.Body != nil {
8520 res.Body.Close()
8521 }
8522 return nil, gensupport.WrapError(&googleapi.Error{
8523 Code: res.StatusCode,
8524 Header: res.Header,
8525 })
8526 }
8527 if err != nil {
8528 return nil, err
8529 }
8530 defer googleapi.CloseBody(res)
8531 if err := googleapi.CheckResponse(res); err != nil {
8532 return nil, gensupport.WrapError(err)
8533 }
8534 ret := &Operation{
8535 ServerResponse: googleapi.ServerResponse{
8536 Header: res.Header,
8537 HTTPStatusCode: res.StatusCode,
8538 },
8539 }
8540 target := &ret
8541 b, err := gensupport.DecodeResponseBytes(target, res)
8542 if err != nil {
8543 return nil, err
8544 }
8545 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.create", "response", internallog.HTTPResponse(res, b))
8546 return ret, nil
8547 }
8548
8549 type ProjectsLocationsServicesMetadataImportsGetCall struct {
8550 s *APIService
8551 name string
8552 urlParams_ gensupport.URLParams
8553 ifNoneMatch_ string
8554 ctx_ context.Context
8555 header_ http.Header
8556 }
8557
8558 // Get: Gets details of a single import.
8559 //
8560 // - name: The relative resource name of the metadata import to retrieve, in
8561 // the following
8562 // form:projects/{project_number}/locations/{location_id}/services/{service_id
8563 // }/metadataImports/{import_id}.
8564 func (r *ProjectsLocationsServicesMetadataImportsService) Get(name string) *ProjectsLocationsServicesMetadataImportsGetCall {
8565 c := &ProjectsLocationsServicesMetadataImportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8566 c.name = name
8567 return c
8568 }
8569
8570 // Fields allows partial responses to be retrieved. See
8571 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8572 // details.
8573 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsGetCall {
8574 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8575 return c
8576 }
8577
8578 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8579 // object's ETag matches the given value. This is useful for getting updates
8580 // only after the object has changed since the last request.
8581 func (c *ProjectsLocationsServicesMetadataImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsGetCall {
8582 c.ifNoneMatch_ = entityTag
8583 return c
8584 }
8585
8586 // Context sets the context to be used in this call's Do method.
8587 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsGetCall {
8588 c.ctx_ = ctx
8589 return c
8590 }
8591
8592 // Header returns a http.Header that can be modified by the caller to add
8593 // headers to the request.
8594 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Header() http.Header {
8595 if c.header_ == nil {
8596 c.header_ = make(http.Header)
8597 }
8598 return c.header_
8599 }
8600
8601 func (c *ProjectsLocationsServicesMetadataImportsGetCall) doRequest(alt string) (*http.Response, error) {
8602 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8603 if c.ifNoneMatch_ != "" {
8604 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8605 }
8606 c.urlParams_.Set("alt", alt)
8607 c.urlParams_.Set("prettyPrint", "false")
8608 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
8609 urls += "?" + c.urlParams_.Encode()
8610 req, err := http.NewRequest("GET", urls, nil)
8611 if err != nil {
8612 return nil, err
8613 }
8614 req.Header = reqHeaders
8615 googleapi.Expand(req.URL, map[string]string{
8616 "name": c.name,
8617 })
8618 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.get", "request", internallog.HTTPRequest(req, nil))
8619 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8620 }
8621
8622 // Do executes the "metastore.projects.locations.services.metadataImports.get" call.
8623 // Any non-2xx status code is an error. Response headers are in either
8624 // *MetadataImport.ServerResponse.Header or (if a response was returned at all)
8625 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8626 // whether the returned error was because http.StatusNotModified was returned.
8627 func (c *ProjectsLocationsServicesMetadataImportsGetCall) Do(opts ...googleapi.CallOption) (*MetadataImport, error) {
8628 gensupport.SetOptions(c.urlParams_, opts...)
8629 res, err := c.doRequest("json")
8630 if res != nil && res.StatusCode == http.StatusNotModified {
8631 if res.Body != nil {
8632 res.Body.Close()
8633 }
8634 return nil, gensupport.WrapError(&googleapi.Error{
8635 Code: res.StatusCode,
8636 Header: res.Header,
8637 })
8638 }
8639 if err != nil {
8640 return nil, err
8641 }
8642 defer googleapi.CloseBody(res)
8643 if err := googleapi.CheckResponse(res); err != nil {
8644 return nil, gensupport.WrapError(err)
8645 }
8646 ret := &MetadataImport{
8647 ServerResponse: googleapi.ServerResponse{
8648 Header: res.Header,
8649 HTTPStatusCode: res.StatusCode,
8650 },
8651 }
8652 target := &ret
8653 b, err := gensupport.DecodeResponseBytes(target, res)
8654 if err != nil {
8655 return nil, err
8656 }
8657 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.get", "response", internallog.HTTPResponse(res, b))
8658 return ret, nil
8659 }
8660
8661 type ProjectsLocationsServicesMetadataImportsListCall struct {
8662 s *APIService
8663 parent string
8664 urlParams_ gensupport.URLParams
8665 ifNoneMatch_ string
8666 ctx_ context.Context
8667 header_ http.Header
8668 }
8669
8670 // List: Lists imports in a service.
8671 //
8672 // - parent: The relative resource name of the service whose metadata imports
8673 // to list, in the following
8674 // form:projects/{project_number}/locations/{location_id}/services/{service_id
8675 // }/metadataImports.
8676 func (r *ProjectsLocationsServicesMetadataImportsService) List(parent string) *ProjectsLocationsServicesMetadataImportsListCall {
8677 c := &ProjectsLocationsServicesMetadataImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8678 c.parent = parent
8679 return c
8680 }
8681
8682 // Filter sets the optional parameter "filter": The filter to apply to list
8683 // results.
8684 func (c *ProjectsLocationsServicesMetadataImportsListCall) Filter(filter string) *ProjectsLocationsServicesMetadataImportsListCall {
8685 c.urlParams_.Set("filter", filter)
8686 return c
8687 }
8688
8689 // OrderBy sets the optional parameter "orderBy": Specify the ordering of
8690 // results as described in Sorting Order
8691 // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
8692 // specified, the results will be sorted in the default order.
8693 func (c *ProjectsLocationsServicesMetadataImportsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMetadataImportsListCall {
8694 c.urlParams_.Set("orderBy", orderBy)
8695 return c
8696 }
8697
8698 // PageSize sets the optional parameter "pageSize": The maximum number of
8699 // imports to return. The response may contain less than the maximum number. If
8700 // unspecified, no more than 500 imports are returned. The maximum value is
8701 // 1000; values above 1000 are changed to 1000.
8702 func (c *ProjectsLocationsServicesMetadataImportsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMetadataImportsListCall {
8703 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8704 return c
8705 }
8706
8707 // PageToken sets the optional parameter "pageToken": A page token, received
8708 // from a previous DataprocMetastore.ListServices call. Provide this token to
8709 // retrieve the subsequent page.To retrieve the first page, supply an empty
8710 // page token.When paginating, other parameters provided to
8711 // DataprocMetastore.ListServices must match the call that provided the page
8712 // token.
8713 func (c *ProjectsLocationsServicesMetadataImportsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMetadataImportsListCall {
8714 c.urlParams_.Set("pageToken", pageToken)
8715 return c
8716 }
8717
8718 // Fields allows partial responses to be retrieved. See
8719 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8720 // details.
8721 func (c *ProjectsLocationsServicesMetadataImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsListCall {
8722 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8723 return c
8724 }
8725
8726 // IfNoneMatch sets an optional parameter which makes the operation fail if the
8727 // object's ETag matches the given value. This is useful for getting updates
8728 // only after the object has changed since the last request.
8729 func (c *ProjectsLocationsServicesMetadataImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsListCall {
8730 c.ifNoneMatch_ = entityTag
8731 return c
8732 }
8733
8734 // Context sets the context to be used in this call's Do method.
8735 func (c *ProjectsLocationsServicesMetadataImportsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsListCall {
8736 c.ctx_ = ctx
8737 return c
8738 }
8739
8740 // Header returns a http.Header that can be modified by the caller to add
8741 // headers to the request.
8742 func (c *ProjectsLocationsServicesMetadataImportsListCall) Header() http.Header {
8743 if c.header_ == nil {
8744 c.header_ = make(http.Header)
8745 }
8746 return c.header_
8747 }
8748
8749 func (c *ProjectsLocationsServicesMetadataImportsListCall) doRequest(alt string) (*http.Response, error) {
8750 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
8751 if c.ifNoneMatch_ != "" {
8752 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8753 }
8754 c.urlParams_.Set("alt", alt)
8755 c.urlParams_.Set("prettyPrint", "false")
8756 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/metadataImports")
8757 urls += "?" + c.urlParams_.Encode()
8758 req, err := http.NewRequest("GET", urls, nil)
8759 if err != nil {
8760 return nil, err
8761 }
8762 req.Header = reqHeaders
8763 googleapi.Expand(req.URL, map[string]string{
8764 "parent": c.parent,
8765 })
8766 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.list", "request", internallog.HTTPRequest(req, nil))
8767 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8768 }
8769
8770 // Do executes the "metastore.projects.locations.services.metadataImports.list" call.
8771 // Any non-2xx status code is an error. Response headers are in either
8772 // *ListMetadataImportsResponse.ServerResponse.Header or (if a response was
8773 // returned at all) in error.(*googleapi.Error).Header. Use
8774 // googleapi.IsNotModified to check whether the returned error was because
8775 // http.StatusNotModified was returned.
8776 func (c *ProjectsLocationsServicesMetadataImportsListCall) Do(opts ...googleapi.CallOption) (*ListMetadataImportsResponse, error) {
8777 gensupport.SetOptions(c.urlParams_, opts...)
8778 res, err := c.doRequest("json")
8779 if res != nil && res.StatusCode == http.StatusNotModified {
8780 if res.Body != nil {
8781 res.Body.Close()
8782 }
8783 return nil, gensupport.WrapError(&googleapi.Error{
8784 Code: res.StatusCode,
8785 Header: res.Header,
8786 })
8787 }
8788 if err != nil {
8789 return nil, err
8790 }
8791 defer googleapi.CloseBody(res)
8792 if err := googleapi.CheckResponse(res); err != nil {
8793 return nil, gensupport.WrapError(err)
8794 }
8795 ret := &ListMetadataImportsResponse{
8796 ServerResponse: googleapi.ServerResponse{
8797 Header: res.Header,
8798 HTTPStatusCode: res.StatusCode,
8799 },
8800 }
8801 target := &ret
8802 b, err := gensupport.DecodeResponseBytes(target, res)
8803 if err != nil {
8804 return nil, err
8805 }
8806 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.list", "response", internallog.HTTPResponse(res, b))
8807 return ret, nil
8808 }
8809
8810 // Pages invokes f for each page of results.
8811 // A non-nil error returned from f will halt the iteration.
8812 // The provided context supersedes any context provided to the Context method.
8813 func (c *ProjectsLocationsServicesMetadataImportsListCall) Pages(ctx context.Context, f func(*ListMetadataImportsResponse) error) error {
8814 c.ctx_ = ctx
8815 defer c.PageToken(c.urlParams_.Get("pageToken"))
8816 for {
8817 x, err := c.Do()
8818 if err != nil {
8819 return err
8820 }
8821 if err := f(x); err != nil {
8822 return err
8823 }
8824 if x.NextPageToken == "" {
8825 return nil
8826 }
8827 c.PageToken(x.NextPageToken)
8828 }
8829 }
8830
8831 type ProjectsLocationsServicesMetadataImportsPatchCall struct {
8832 s *APIService
8833 name string
8834 metadataimport *MetadataImport
8835 urlParams_ gensupport.URLParams
8836 ctx_ context.Context
8837 header_ http.Header
8838 }
8839
8840 // Patch: Updates a single import. Only the description field of MetadataImport
8841 // is supported to be updated.
8842 //
8843 // - name: Immutable. Identifier. The relative resource name of the metadata
8844 // import, of the
8845 // form:projects/{project_number}/locations/{location_id}/services/{service_id
8846 // }/metadataImports/{metadata_import_id}.
8847 func (r *ProjectsLocationsServicesMetadataImportsService) Patch(name string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsPatchCall {
8848 c := &ProjectsLocationsServicesMetadataImportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8849 c.name = name
8850 c.metadataimport = metadataimport
8851 return c
8852 }
8853
8854 // RequestId sets the optional parameter "requestId": A request ID. Specify a
8855 // unique request ID to allow the server to ignore the request if it has
8856 // completed. The server will ignore subsequent requests that provide a
8857 // duplicate request ID for at least 60 minutes after the first request.For
8858 // example, if an initial request times out, followed by another request with
8859 // the same request ID, the server ignores the second request to prevent the
8860 // creation of duplicate commitments.The request ID must be a valid UUID
8861 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
8862 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
8863 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsPatchCall {
8864 c.urlParams_.Set("requestId", requestId)
8865 return c
8866 }
8867
8868 // UpdateMask sets the optional parameter "updateMask": Required. A field mask
8869 // used to specify the fields to be overwritten in the metadata import resource
8870 // by the update. Fields specified in the update_mask are relative to the
8871 // resource (not to the full request). A field is overwritten if it is in the
8872 // mask.
8873 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesMetadataImportsPatchCall {
8874 c.urlParams_.Set("updateMask", updateMask)
8875 return c
8876 }
8877
8878 // Fields allows partial responses to be retrieved. See
8879 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8880 // details.
8881 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsPatchCall {
8882 c.urlParams_.Set("fields", googleapi.CombineFields(s))
8883 return c
8884 }
8885
8886 // Context sets the context to be used in this call's Do method.
8887 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsPatchCall {
8888 c.ctx_ = ctx
8889 return c
8890 }
8891
8892 // Header returns a http.Header that can be modified by the caller to add
8893 // headers to the request.
8894 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Header() http.Header {
8895 if c.header_ == nil {
8896 c.header_ = make(http.Header)
8897 }
8898 return c.header_
8899 }
8900
8901 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) doRequest(alt string) (*http.Response, error) {
8902 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
8903 body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.metadataimport)
8904 if err != nil {
8905 return nil, err
8906 }
8907 c.urlParams_.Set("alt", alt)
8908 c.urlParams_.Set("prettyPrint", "false")
8909 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
8910 urls += "?" + c.urlParams_.Encode()
8911 req, err := http.NewRequest("PATCH", urls, body)
8912 if err != nil {
8913 return nil, err
8914 }
8915 req.Header = reqHeaders
8916 googleapi.Expand(req.URL, map[string]string{
8917 "name": c.name,
8918 })
8919 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.patch", "request", internallog.HTTPRequest(req, body.Bytes()))
8920 return gensupport.SendRequest(c.ctx_, c.s.client, req)
8921 }
8922
8923 // Do executes the "metastore.projects.locations.services.metadataImports.patch" call.
8924 // Any non-2xx status code is an error. Response headers are in either
8925 // *Operation.ServerResponse.Header or (if a response was returned at all) in
8926 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
8927 // whether the returned error was because http.StatusNotModified was returned.
8928 func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8929 gensupport.SetOptions(c.urlParams_, opts...)
8930 res, err := c.doRequest("json")
8931 if res != nil && res.StatusCode == http.StatusNotModified {
8932 if res.Body != nil {
8933 res.Body.Close()
8934 }
8935 return nil, gensupport.WrapError(&googleapi.Error{
8936 Code: res.StatusCode,
8937 Header: res.Header,
8938 })
8939 }
8940 if err != nil {
8941 return nil, err
8942 }
8943 defer googleapi.CloseBody(res)
8944 if err := googleapi.CheckResponse(res); err != nil {
8945 return nil, gensupport.WrapError(err)
8946 }
8947 ret := &Operation{
8948 ServerResponse: googleapi.ServerResponse{
8949 Header: res.Header,
8950 HTTPStatusCode: res.StatusCode,
8951 },
8952 }
8953 target := &ret
8954 b, err := gensupport.DecodeResponseBytes(target, res)
8955 if err != nil {
8956 return nil, err
8957 }
8958 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.metadataImports.patch", "response", internallog.HTTPResponse(res, b))
8959 return ret, nil
8960 }
8961
8962 type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct {
8963 s *APIService
8964 name string
8965 urlParams_ gensupport.URLParams
8966 ctx_ context.Context
8967 header_ http.Header
8968 }
8969
8970 // Delete: Deletes a single migration execution.
8971 //
8972 // - name: The relative resource name of the migrationExecution to delete, in
8973 // the following
8974 // form:projects/{project_number}/locations/{location_id}/services/{service_id
8975 // }/migrationExecutions/{migration_execution_id}.
8976 func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall {
8977 c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8978 c.name = name
8979 return c
8980 }
8981
8982 // RequestId sets the optional parameter "requestId": A request ID. Specify a
8983 // unique request ID to allow the server to ignore the request if it has
8984 // completed. The server will ignore subsequent requests that provide a
8985 // duplicate request ID for at least 60 minutes after the first request.For
8986 // example, if an initial request times out, followed by another request with
8987 // the same request ID, the server ignores the second request to prevent the
8988 // creation of duplicate commitments.The request ID must be a valid UUID
8989 // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
8990 // UUID (00000000-0000-0000-0000-000000000000) is not supported.
8991 func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall {
8992 c.urlParams_.Set("requestId", requestId)
8993 return c
8994 }
8995
8996 // Fields allows partial responses to be retrieved. See
8997 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
8998 // details.
8999 func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall {
9000 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9001 return c
9002 }
9003
9004 // Context sets the context to be used in this call's Do method.
9005 func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall {
9006 c.ctx_ = ctx
9007 return c
9008 }
9009
9010 // Header returns a http.Header that can be modified by the caller to add
9011 // headers to the request.
9012 func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header {
9013 if c.header_ == nil {
9014 c.header_ = make(http.Header)
9015 }
9016 return c.header_
9017 }
9018
9019 func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) {
9020 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9021 c.urlParams_.Set("alt", alt)
9022 c.urlParams_.Set("prettyPrint", "false")
9023 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
9024 urls += "?" + c.urlParams_.Encode()
9025 req, err := http.NewRequest("DELETE", urls, nil)
9026 if err != nil {
9027 return nil, err
9028 }
9029 req.Header = reqHeaders
9030 googleapi.Expand(req.URL, map[string]string{
9031 "name": c.name,
9032 })
9033 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.migrationExecutions.delete", "request", internallog.HTTPRequest(req, nil))
9034 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9035 }
9036
9037 // Do executes the "metastore.projects.locations.services.migrationExecutions.delete" call.
9038 // Any non-2xx status code is an error. Response headers are in either
9039 // *Operation.ServerResponse.Header or (if a response was returned at all) in
9040 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9041 // whether the returned error was because http.StatusNotModified was returned.
9042 func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9043 gensupport.SetOptions(c.urlParams_, opts...)
9044 res, err := c.doRequest("json")
9045 if res != nil && res.StatusCode == http.StatusNotModified {
9046 if res.Body != nil {
9047 res.Body.Close()
9048 }
9049 return nil, gensupport.WrapError(&googleapi.Error{
9050 Code: res.StatusCode,
9051 Header: res.Header,
9052 })
9053 }
9054 if err != nil {
9055 return nil, err
9056 }
9057 defer googleapi.CloseBody(res)
9058 if err := googleapi.CheckResponse(res); err != nil {
9059 return nil, gensupport.WrapError(err)
9060 }
9061 ret := &Operation{
9062 ServerResponse: googleapi.ServerResponse{
9063 Header: res.Header,
9064 HTTPStatusCode: res.StatusCode,
9065 },
9066 }
9067 target := &ret
9068 b, err := gensupport.DecodeResponseBytes(target, res)
9069 if err != nil {
9070 return nil, err
9071 }
9072 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.migrationExecutions.delete", "response", internallog.HTTPResponse(res, b))
9073 return ret, nil
9074 }
9075
9076 type ProjectsLocationsServicesMigrationExecutionsGetCall struct {
9077 s *APIService
9078 name string
9079 urlParams_ gensupport.URLParams
9080 ifNoneMatch_ string
9081 ctx_ context.Context
9082 header_ http.Header
9083 }
9084
9085 // Get: Gets details of a single migration execution.
9086 //
9087 // - name: The relative resource name of the migration execution to retrieve,
9088 // in the following
9089 // form:projects/{project_number}/locations/{location_id}/services/{service_id
9090 // }/migrationExecutions/{migration_execution_id}.
9091 func (r *ProjectsLocationsServicesMigrationExecutionsService) Get(name string) *ProjectsLocationsServicesMigrationExecutionsGetCall {
9092 c := &ProjectsLocationsServicesMigrationExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9093 c.name = name
9094 return c
9095 }
9096
9097 // Fields allows partial responses to be retrieved. See
9098 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9099 // details.
9100 func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsGetCall {
9101 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9102 return c
9103 }
9104
9105 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9106 // object's ETag matches the given value. This is useful for getting updates
9107 // only after the object has changed since the last request.
9108 func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsGetCall {
9109 c.ifNoneMatch_ = entityTag
9110 return c
9111 }
9112
9113 // Context sets the context to be used in this call's Do method.
9114 func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsGetCall {
9115 c.ctx_ = ctx
9116 return c
9117 }
9118
9119 // Header returns a http.Header that can be modified by the caller to add
9120 // headers to the request.
9121 func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Header() http.Header {
9122 if c.header_ == nil {
9123 c.header_ = make(http.Header)
9124 }
9125 return c.header_
9126 }
9127
9128 func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) doRequest(alt string) (*http.Response, error) {
9129 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9130 if c.ifNoneMatch_ != "" {
9131 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9132 }
9133 c.urlParams_.Set("alt", alt)
9134 c.urlParams_.Set("prettyPrint", "false")
9135 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
9136 urls += "?" + c.urlParams_.Encode()
9137 req, err := http.NewRequest("GET", urls, nil)
9138 if err != nil {
9139 return nil, err
9140 }
9141 req.Header = reqHeaders
9142 googleapi.Expand(req.URL, map[string]string{
9143 "name": c.name,
9144 })
9145 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.migrationExecutions.get", "request", internallog.HTTPRequest(req, nil))
9146 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9147 }
9148
9149 // Do executes the "metastore.projects.locations.services.migrationExecutions.get" call.
9150 // Any non-2xx status code is an error. Response headers are in either
9151 // *MigrationExecution.ServerResponse.Header or (if a response was returned at
9152 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9153 // check whether the returned error was because http.StatusNotModified was
9154 // returned.
9155 func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Do(opts ...googleapi.CallOption) (*MigrationExecution, error) {
9156 gensupport.SetOptions(c.urlParams_, opts...)
9157 res, err := c.doRequest("json")
9158 if res != nil && res.StatusCode == http.StatusNotModified {
9159 if res.Body != nil {
9160 res.Body.Close()
9161 }
9162 return nil, gensupport.WrapError(&googleapi.Error{
9163 Code: res.StatusCode,
9164 Header: res.Header,
9165 })
9166 }
9167 if err != nil {
9168 return nil, err
9169 }
9170 defer googleapi.CloseBody(res)
9171 if err := googleapi.CheckResponse(res); err != nil {
9172 return nil, gensupport.WrapError(err)
9173 }
9174 ret := &MigrationExecution{
9175 ServerResponse: googleapi.ServerResponse{
9176 Header: res.Header,
9177 HTTPStatusCode: res.StatusCode,
9178 },
9179 }
9180 target := &ret
9181 b, err := gensupport.DecodeResponseBytes(target, res)
9182 if err != nil {
9183 return nil, err
9184 }
9185 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.migrationExecutions.get", "response", internallog.HTTPResponse(res, b))
9186 return ret, nil
9187 }
9188
9189 type ProjectsLocationsServicesMigrationExecutionsListCall struct {
9190 s *APIService
9191 parent string
9192 urlParams_ gensupport.URLParams
9193 ifNoneMatch_ string
9194 ctx_ context.Context
9195 header_ http.Header
9196 }
9197
9198 // List: Lists migration executions on a service.
9199 //
9200 // - parent: The relative resource name of the service whose migration
9201 // executions to list, in the following
9202 // form:projects/{project_number}/locations/{location_id}/services/{service_id
9203 // }/migrationExecutions.
9204 func (r *ProjectsLocationsServicesMigrationExecutionsService) List(parent string) *ProjectsLocationsServicesMigrationExecutionsListCall {
9205 c := &ProjectsLocationsServicesMigrationExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9206 c.parent = parent
9207 return c
9208 }
9209
9210 // Filter sets the optional parameter "filter": The filter to apply to list
9211 // results.
9212 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Filter(filter string) *ProjectsLocationsServicesMigrationExecutionsListCall {
9213 c.urlParams_.Set("filter", filter)
9214 return c
9215 }
9216
9217 // OrderBy sets the optional parameter "orderBy": Specify the ordering of
9218 // results as described in Sorting Order
9219 // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
9220 // specified, the results will be sorted in the default order.
9221 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMigrationExecutionsListCall {
9222 c.urlParams_.Set("orderBy", orderBy)
9223 return c
9224 }
9225
9226 // PageSize sets the optional parameter "pageSize": The maximum number of
9227 // migration executions to return. The response may contain less than the
9228 // maximum number. If unspecified, no more than 500 migration executions are
9229 // returned. The maximum value is 1000; values above 1000 are changed to 1000.
9230 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMigrationExecutionsListCall {
9231 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9232 return c
9233 }
9234
9235 // PageToken sets the optional parameter "pageToken": A page token, received
9236 // from a previous DataprocMetastore.ListMigrationExecutions call. Provide this
9237 // token to retrieve the subsequent page.To retrieve the first page, supply an
9238 // empty page token.When paginating, other parameters provided to
9239 // DataprocMetastore.ListMigrationExecutions must match the call that provided
9240 // the page token.
9241 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMigrationExecutionsListCall {
9242 c.urlParams_.Set("pageToken", pageToken)
9243 return c
9244 }
9245
9246 // Fields allows partial responses to be retrieved. See
9247 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
9248 // details.
9249 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsListCall {
9250 c.urlParams_.Set("fields", googleapi.CombineFields(s))
9251 return c
9252 }
9253
9254 // IfNoneMatch sets an optional parameter which makes the operation fail if the
9255 // object's ETag matches the given value. This is useful for getting updates
9256 // only after the object has changed since the last request.
9257 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsListCall {
9258 c.ifNoneMatch_ = entityTag
9259 return c
9260 }
9261
9262 // Context sets the context to be used in this call's Do method.
9263 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsListCall {
9264 c.ctx_ = ctx
9265 return c
9266 }
9267
9268 // Header returns a http.Header that can be modified by the caller to add
9269 // headers to the request.
9270 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Header() http.Header {
9271 if c.header_ == nil {
9272 c.header_ = make(http.Header)
9273 }
9274 return c.header_
9275 }
9276
9277 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) doRequest(alt string) (*http.Response, error) {
9278 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
9279 if c.ifNoneMatch_ != "" {
9280 reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9281 }
9282 c.urlParams_.Set("alt", alt)
9283 c.urlParams_.Set("prettyPrint", "false")
9284 urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/migrationExecutions")
9285 urls += "?" + c.urlParams_.Encode()
9286 req, err := http.NewRequest("GET", urls, nil)
9287 if err != nil {
9288 return nil, err
9289 }
9290 req.Header = reqHeaders
9291 googleapi.Expand(req.URL, map[string]string{
9292 "parent": c.parent,
9293 })
9294 c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.migrationExecutions.list", "request", internallog.HTTPRequest(req, nil))
9295 return gensupport.SendRequest(c.ctx_, c.s.client, req)
9296 }
9297
9298 // Do executes the "metastore.projects.locations.services.migrationExecutions.list" call.
9299 // Any non-2xx status code is an error. Response headers are in either
9300 // *ListMigrationExecutionsResponse.ServerResponse.Header or (if a response was
9301 // returned at all) in error.(*googleapi.Error).Header. Use
9302 // googleapi.IsNotModified to check whether the returned error was because
9303 // http.StatusNotModified was returned.
9304 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Do(opts ...googleapi.CallOption) (*ListMigrationExecutionsResponse, error) {
9305 gensupport.SetOptions(c.urlParams_, opts...)
9306 res, err := c.doRequest("json")
9307 if res != nil && res.StatusCode == http.StatusNotModified {
9308 if res.Body != nil {
9309 res.Body.Close()
9310 }
9311 return nil, gensupport.WrapError(&googleapi.Error{
9312 Code: res.StatusCode,
9313 Header: res.Header,
9314 })
9315 }
9316 if err != nil {
9317 return nil, err
9318 }
9319 defer googleapi.CloseBody(res)
9320 if err := googleapi.CheckResponse(res); err != nil {
9321 return nil, gensupport.WrapError(err)
9322 }
9323 ret := &ListMigrationExecutionsResponse{
9324 ServerResponse: googleapi.ServerResponse{
9325 Header: res.Header,
9326 HTTPStatusCode: res.StatusCode,
9327 },
9328 }
9329 target := &ret
9330 b, err := gensupport.DecodeResponseBytes(target, res)
9331 if err != nil {
9332 return nil, err
9333 }
9334 c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "metastore.projects.locations.services.migrationExecutions.list", "response", internallog.HTTPResponse(res, b))
9335 return ret, nil
9336 }
9337
9338 // Pages invokes f for each page of results.
9339 // A non-nil error returned from f will halt the iteration.
9340 // The provided context supersedes any context provided to the Context method.
9341 func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Pages(ctx context.Context, f func(*ListMigrationExecutionsResponse) error) error {
9342 c.ctx_ = ctx
9343 defer c.PageToken(c.urlParams_.Get("pageToken"))
9344 for {
9345 x, err := c.Do()
9346 if err != nil {
9347 return err
9348 }
9349 if err := f(x); err != nil {
9350 return err
9351 }
9352 if x.NextPageToken == "" {
9353 return nil
9354 }
9355 c.PageToken(x.NextPageToken)
9356 }
9357 }