...

Source file src/google.golang.org/api/metastore/v1/metastore-gen.go

Documentation: google.golang.org/api/metastore/v1

     1  // Copyright 2024 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/v1"
    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/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "metastore:v1"
    90  const apiName = "metastore"
    91  const apiVersion = "v1"
    92  const basePath = "https://metastore.googleapis.com/"
    93  const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://metastore.mtls.googleapis.com/"
    95  
    96  // OAuth2 scopes used by this API.
    97  const (
    98  	// See, edit, configure, and delete your Google Cloud data and see the email
    99  	// address for your Google Account.
   100  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   101  )
   102  
   103  // NewService creates a new APIService.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*APIService, error) {
   105  	scopesOption := internaloption.WithDefaultScopes(
   106  		"https://www.googleapis.com/auth/cloud-platform",
   107  	)
   108  	// NOTE: prepend, so we don't override user-specified scopes.
   109  	opts = append([]option.ClientOption{scopesOption}, opts...)
   110  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   111  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   112  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   113  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   114  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   115  	if err != nil {
   116  		return nil, err
   117  	}
   118  	s, err := New(client)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	if endpoint != "" {
   123  		s.BasePath = endpoint
   124  	}
   125  	return s, nil
   126  }
   127  
   128  // New creates a new APIService. It uses the provided http.Client for requests.
   129  //
   130  // Deprecated: please use NewService instead.
   131  // To provide a custom HTTP client, use option.WithHTTPClient.
   132  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   133  func New(client *http.Client) (*APIService, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &APIService{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type APIService struct {
   143  	client    *http.Client
   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.MetadataImports = NewProjectsLocationsServicesMetadataImportsService(s)
   209  	return rs
   210  }
   211  
   212  type ProjectsLocationsServicesService struct {
   213  	s *APIService
   214  
   215  	Backups *ProjectsLocationsServicesBackupsService
   216  
   217  	MetadataImports *ProjectsLocationsServicesMetadataImportsService
   218  }
   219  
   220  func NewProjectsLocationsServicesBackupsService(s *APIService) *ProjectsLocationsServicesBackupsService {
   221  	rs := &ProjectsLocationsServicesBackupsService{s: s}
   222  	return rs
   223  }
   224  
   225  type ProjectsLocationsServicesBackupsService struct {
   226  	s *APIService
   227  }
   228  
   229  func NewProjectsLocationsServicesMetadataImportsService(s *APIService) *ProjectsLocationsServicesMetadataImportsService {
   230  	rs := &ProjectsLocationsServicesMetadataImportsService{s: s}
   231  	return rs
   232  }
   233  
   234  type ProjectsLocationsServicesMetadataImportsService struct {
   235  	s *APIService
   236  }
   237  
   238  // AlterMetadataResourceLocationRequest: Request message for
   239  // DataprocMetastore.AlterMetadataResourceLocation.
   240  type AlterMetadataResourceLocationRequest struct {
   241  	// LocationUri: Required. The new location URI for the metadata resource.
   242  	LocationUri string `json:"locationUri,omitempty"`
   243  	// ResourceName: Required. The relative metadata resource name in the following
   244  	// format.databases/{database_id} or databases/{database_id}/tables/{table_id}
   245  	// or databases/{database_id}/tables/{table_id}/partitions/{partition_id}
   246  	ResourceName string `json:"resourceName,omitempty"`
   247  	// ForceSendFields is a list of field names (e.g. "LocationUri") to
   248  	// unconditionally include in API requests. By default, fields with empty or
   249  	// default values are omitted from API requests. See
   250  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   251  	// details.
   252  	ForceSendFields []string `json:"-"`
   253  	// NullFields is a list of field names (e.g. "LocationUri") to include in API
   254  	// requests with the JSON null value. By default, fields with empty values are
   255  	// omitted from API requests. See
   256  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   257  	NullFields []string `json:"-"`
   258  }
   259  
   260  func (s *AlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) {
   261  	type NoMethod AlterMetadataResourceLocationRequest
   262  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   263  }
   264  
   265  // AlterMetadataResourceLocationResponse: Response message for
   266  // DataprocMetastore.AlterMetadataResourceLocation.
   267  type AlterMetadataResourceLocationResponse struct {
   268  }
   269  
   270  // AlterTablePropertiesRequest: Request message for
   271  // DataprocMetastore.AlterTableProperties.
   272  type AlterTablePropertiesRequest struct {
   273  	// Properties: A map that describes the desired values to mutate. If
   274  	// update_mask is empty, the properties will not update. Otherwise, the
   275  	// properties only alters the value whose associated paths exist in the update
   276  	// mask
   277  	Properties map[string]string `json:"properties,omitempty"`
   278  	// TableName: Required. The name of the table containing the properties you're
   279  	// altering in the following format.databases/{database_id}/tables/{table_id}
   280  	TableName string `json:"tableName,omitempty"`
   281  	// UpdateMask: A field mask that specifies the metadata table properties that
   282  	// are overwritten by the update. Fields specified in the update_mask are
   283  	// relative to the resource (not to the full request). A field is overwritten
   284  	// if it is in the mask.For example, given the target properties: properties {
   285  	// a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if
   286  	// the field mask is:paths: "properties.b", "properties.c"then the result will
   287  	// be: properties { a: 1 b: 3 c: 4 }
   288  	UpdateMask string `json:"updateMask,omitempty"`
   289  	// ForceSendFields is a list of field names (e.g. "Properties") to
   290  	// unconditionally include in API requests. By default, fields with empty or
   291  	// default values are omitted from API requests. See
   292  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   293  	// details.
   294  	ForceSendFields []string `json:"-"`
   295  	// NullFields is a list of field names (e.g. "Properties") to include in API
   296  	// requests with the JSON null value. By default, fields with empty values are
   297  	// omitted from API requests. See
   298  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   299  	NullFields []string `json:"-"`
   300  }
   301  
   302  func (s *AlterTablePropertiesRequest) MarshalJSON() ([]byte, error) {
   303  	type NoMethod AlterTablePropertiesRequest
   304  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   305  }
   306  
   307  // AuditConfig: Specifies the audit configuration for a service. The
   308  // configuration determines which permission types are logged, and what
   309  // identities, if any, are exempted from logging. An AuditConfig must have one
   310  // or more AuditLogConfigs.If there are AuditConfigs for both allServices and a
   311  // specific service, the union of the two AuditConfigs is used for that
   312  // service: the log_types specified in each AuditConfig are enabled, and the
   313  // exempted_members in each AuditLogConfig are exempted.Example Policy with
   314  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   315  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   316  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   317  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   318  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   319  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   320  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   321  // logging. It also exempts jose@example.com from DATA_READ logging, and
   322  // aliya@example.com from DATA_WRITE logging.
   323  type AuditConfig struct {
   324  	// AuditLogConfigs: The configuration for logging of each type of permission.
   325  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   326  	// Service: Specifies a service that will be enabled for audit logging. For
   327  	// example, storage.googleapis.com, cloudsql.googleapis.com. allServices is a
   328  	// special value that covers all services.
   329  	Service string `json:"service,omitempty"`
   330  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   331  	// unconditionally include in API requests. By default, fields with empty or
   332  	// default values are omitted from API requests. See
   333  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   334  	// details.
   335  	ForceSendFields []string `json:"-"`
   336  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   337  	// API requests with the JSON null value. By default, fields with empty values
   338  	// are omitted from API requests. See
   339  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   340  	NullFields []string `json:"-"`
   341  }
   342  
   343  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   344  	type NoMethod AuditConfig
   345  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   346  }
   347  
   348  // AuditLogConfig: Provides the configuration for logging a type of
   349  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   350  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   351  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   352  // exempting jose@example.com from DATA_READ logging.
   353  type AuditLogConfig struct {
   354  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   355  	// type of permission. Follows the same format of Binding.members.
   356  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   357  	// LogType: The log type that this config enables.
   358  	//
   359  	// Possible values:
   360  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   361  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   362  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   363  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   364  	LogType string `json:"logType,omitempty"`
   365  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   366  	// unconditionally include in API requests. By default, fields with empty or
   367  	// default values are omitted from API requests. See
   368  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   369  	// details.
   370  	ForceSendFields []string `json:"-"`
   371  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   372  	// API requests with the JSON null value. By default, fields with empty values
   373  	// are omitted from API requests. See
   374  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   375  	NullFields []string `json:"-"`
   376  }
   377  
   378  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   379  	type NoMethod AuditLogConfig
   380  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   381  }
   382  
   383  // AuxiliaryVersionConfig: Configuration information for the auxiliary service
   384  // versions.
   385  type AuxiliaryVersionConfig struct {
   386  	// ConfigOverrides: A mapping of Hive metastore configuration key-value pairs
   387  	// to apply to the auxiliary Hive metastore (configured in hive-site.xml) in
   388  	// addition to the primary version's overrides. If keys are present in both the
   389  	// auxiliary version's overrides and the primary version's overrides, the value
   390  	// from the auxiliary version's overrides takes precedence.
   391  	ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
   392  	// NetworkConfig: Output only. The network configuration contains the endpoint
   393  	// URI(s) of the auxiliary Hive metastore service.
   394  	NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
   395  	// Version: The Hive metastore version of the auxiliary service. It must be
   396  	// less than the primary Hive metastore service's version.
   397  	Version string `json:"version,omitempty"`
   398  	// ForceSendFields is a list of field names (e.g. "ConfigOverrides") to
   399  	// unconditionally include in API requests. By default, fields with empty or
   400  	// default values are omitted from API requests. See
   401  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   402  	// details.
   403  	ForceSendFields []string `json:"-"`
   404  	// NullFields is a list of field names (e.g. "ConfigOverrides") to include in
   405  	// API requests with the JSON null value. By default, fields with empty values
   406  	// are omitted from API requests. See
   407  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   408  	NullFields []string `json:"-"`
   409  }
   410  
   411  func (s *AuxiliaryVersionConfig) MarshalJSON() ([]byte, error) {
   412  	type NoMethod AuxiliaryVersionConfig
   413  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   414  }
   415  
   416  // BackendMetastore: Represents a backend metastore for the federation.
   417  type BackendMetastore struct {
   418  	// MetastoreType: The type of the backend metastore.
   419  	//
   420  	// Possible values:
   421  	//   "METASTORE_TYPE_UNSPECIFIED" - The metastore type is not set.
   422  	//   "BIGQUERY" - The backend metastore is BigQuery.
   423  	//   "DATAPROC_METASTORE" - The backend metastore is Dataproc Metastore.
   424  	MetastoreType string `json:"metastoreType,omitempty"`
   425  	// Name: The relative resource name of the metastore that is being federated.
   426  	// The formats of the relative resource names for the currently supported
   427  	// metastores are listed below: BigQuery projects/{project_id} Dataproc
   428  	// Metastore projects/{project_id}/locations/{location}/services/{service_id}
   429  	Name string `json:"name,omitempty"`
   430  	// ForceSendFields is a list of field names (e.g. "MetastoreType") 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. "MetastoreType") to include in API
   437  	// requests with the JSON null value. By default, fields with empty values are
   438  	// 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 *BackendMetastore) MarshalJSON() ([]byte, error) {
   444  	type NoMethod BackendMetastore
   445  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   446  }
   447  
   448  // Backup: The details of a backup resource.
   449  type Backup struct {
   450  	// CreateTime: Output only. The time when the backup was started.
   451  	CreateTime string `json:"createTime,omitempty"`
   452  	// Description: The description of the backup.
   453  	Description string `json:"description,omitempty"`
   454  	// EndTime: Output only. The time when the backup finished creating.
   455  	EndTime string `json:"endTime,omitempty"`
   456  	// Name: Immutable. The relative resource name of the backup, in the following
   457  	// form:projects/{project_number}/locations/{location_id}/services/{service_id}/
   458  	// backups/{backup_id}
   459  	Name string `json:"name,omitempty"`
   460  	// RestoringServices: Output only. Services that are restoring from the backup.
   461  	RestoringServices []string `json:"restoringServices,omitempty"`
   462  	// ServiceRevision: Output only. The revision of the service at the time of
   463  	// backup.
   464  	ServiceRevision *Service `json:"serviceRevision,omitempty"`
   465  	// State: Output only. The current state of the backup.
   466  	//
   467  	// Possible values:
   468  	//   "STATE_UNSPECIFIED" - The state of the backup is unknown.
   469  	//   "CREATING" - The backup is being created.
   470  	//   "DELETING" - The backup is being deleted.
   471  	//   "ACTIVE" - The backup is active and ready to use.
   472  	//   "FAILED" - The backup failed.
   473  	//   "RESTORING" - The backup is being restored.
   474  	State string `json:"state,omitempty"`
   475  
   476  	// ServerResponse contains the HTTP response code and headers from the server.
   477  	googleapi.ServerResponse `json:"-"`
   478  	// ForceSendFields is a list of field names (e.g. "CreateTime") 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. "CreateTime") to include in API
   485  	// requests with the JSON null value. By default, fields with empty values are
   486  	// 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 *Backup) MarshalJSON() ([]byte, error) {
   492  	type NoMethod Backup
   493  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   494  }
   495  
   496  // Binding: Associates members, or principals, with a role.
   497  type Binding struct {
   498  	// Condition: The condition that is associated with this binding.If the
   499  	// condition evaluates to true, then this binding applies to the current
   500  	// request.If the condition evaluates to false, then this binding does not
   501  	// apply to the current request. However, a different role binding might grant
   502  	// the same role to one or more of the principals in this binding.To learn
   503  	// which resources support conditions in their IAM policies, see the IAM
   504  	// documentation
   505  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   506  	Condition *Expr `json:"condition,omitempty"`
   507  	// Members: Specifies the principals requesting access for a Google Cloud
   508  	// resource. members can have the following values: allUsers: A special
   509  	// identifier that represents anyone who is on the internet; with or without a
   510  	// Google account. allAuthenticatedUsers: A special identifier that represents
   511  	// anyone who is authenticated with a Google account or a service account. Does
   512  	// not include identities that come from external identity providers (IdPs)
   513  	// through identity federation. user:{emailid}: An email address that
   514  	// represents a specific Google account. For example, alice@example.com .
   515  	// serviceAccount:{emailid}: An email address that represents a Google service
   516  	// account. For example, my-other-app@appspot.gserviceaccount.com.
   517  	// serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]: An
   518  	// identifier for a Kubernetes service account
   519  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   520  	// For example, my-project.svc.id.goog[my-namespace/my-kubernetes-sa].
   521  	// group:{emailid}: An email address that represents a Google group. For
   522  	// example, admins@example.com. domain:{domain}: The G Suite domain (primary)
   523  	// that represents all the users of that domain. For example, google.com or
   524  	// example.com.
   525  	// principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subj
   526  	// ect/{subject_attribute_value}: A single identity in a workforce identity
   527  	// pool.
   528  	// principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/g
   529  	// roup/{group_id}: All workforce identities in a group.
   530  	// principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/a
   531  	// ttribute.{attribute_name}/{attribute_value}: All workforce identities with a
   532  	// specific attribute value.
   533  	// principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*
   534  	// : All identities in a workforce identity pool.
   535  	// principal://iam.googleapis.com/projects/{project_number}/locations/global/wor
   536  	// kloadIdentityPools/{pool_id}/subject/{subject_attribute_value}: A single
   537  	// identity in a workload identity pool.
   538  	// principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
   539  	// workloadIdentityPools/{pool_id}/group/{group_id}: A workload identity pool
   540  	// group.
   541  	// principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
   542  	// workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}:
   543  	//  All identities in a workload identity pool with a certain attribute.
   544  	// principalSet://iam.googleapis.com/projects/{project_number}/locations/global/
   545  	// workloadIdentityPools/{pool_id}/*: All identities in a workload identity
   546  	// pool. deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique
   547  	// identifier) representing a user that has been recently deleted. For example,
   548  	// alice@example.com?uid=123456789012345678901. If the user is recovered, this
   549  	// value reverts to user:{emailid} and the recovered user retains the role in
   550  	// the binding. deleted:serviceAccount:{emailid}?uid={uniqueid}: An email
   551  	// address (plus unique identifier) representing a service account that has
   552  	// been recently deleted. For example,
   553  	// my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901. If the
   554  	// service account is undeleted, this value reverts to serviceAccount:{emailid}
   555  	// and the undeleted service account retains the role in the binding.
   556  	// deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique
   557  	// identifier) representing a Google group that has been recently deleted. For
   558  	// example, admins@example.com?uid=123456789012345678901. If the group is
   559  	// recovered, this value reverts to group:{emailid} and the recovered group
   560  	// retains the role in the binding.
   561  	// deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_
   562  	// id}/subject/{subject_attribute_value}: Deleted single identity in a
   563  	// workforce identity pool. For example,
   564  	// deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-poo
   565  	// l-id/subject/my-subject-attribute-value.
   566  	Members []string `json:"members,omitempty"`
   567  	// Role: Role that is assigned to the list of members, or principals. For
   568  	// example, roles/viewer, roles/editor, or roles/owner.For an overview of the
   569  	// IAM roles and permissions, see the IAM documentation
   570  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   571  	// available pre-defined roles, see here
   572  	// (https://cloud.google.com/iam/docs/understanding-roles).
   573  	Role string `json:"role,omitempty"`
   574  	// ForceSendFields is a list of field names (e.g. "Condition") to
   575  	// unconditionally include in API requests. By default, fields with empty or
   576  	// default values are omitted from API requests. See
   577  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   578  	// details.
   579  	ForceSendFields []string `json:"-"`
   580  	// NullFields is a list of field names (e.g. "Condition") to include in API
   581  	// requests with the JSON null value. By default, fields with empty values are
   582  	// omitted from API requests. See
   583  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   584  	NullFields []string `json:"-"`
   585  }
   586  
   587  func (s *Binding) MarshalJSON() ([]byte, error) {
   588  	type NoMethod Binding
   589  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   590  }
   591  
   592  // CancelOperationRequest: The request message for Operations.CancelOperation.
   593  type CancelOperationRequest struct {
   594  }
   595  
   596  // Consumer: Contains information of the customer's network configurations.
   597  type Consumer struct {
   598  	// EndpointLocation: Output only. The location of the endpoint URI. Format:
   599  	// projects/{project}/locations/{location}.
   600  	EndpointLocation string `json:"endpointLocation,omitempty"`
   601  	// EndpointUri: Output only. The URI of the endpoint used to access the
   602  	// metastore service.
   603  	EndpointUri string `json:"endpointUri,omitempty"`
   604  	// Subnetwork: Immutable. The subnetwork of the customer project from which an
   605  	// IP address is reserved and used as the Dataproc Metastore service's
   606  	// endpoint. It is accessible to hosts in the subnet and to all hosts in a
   607  	// subnet in the same region and same network. There must be at least one IP
   608  	// address available in the subnet's primary range. The subnet is specified in
   609  	// the following
   610  	// form:projects/{project_number}/regions/{region_id}/subnetworks/{subnetwork_id
   611  	// }
   612  	Subnetwork string `json:"subnetwork,omitempty"`
   613  	// ForceSendFields is a list of field names (e.g. "EndpointLocation") to
   614  	// unconditionally include in API requests. By default, fields with empty or
   615  	// default values are omitted from API requests. See
   616  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   617  	// details.
   618  	ForceSendFields []string `json:"-"`
   619  	// NullFields is a list of field names (e.g. "EndpointLocation") to include in
   620  	// API requests with the JSON null value. By default, fields with empty values
   621  	// are omitted from API requests. See
   622  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   623  	NullFields []string `json:"-"`
   624  }
   625  
   626  func (s *Consumer) MarshalJSON() ([]byte, error) {
   627  	type NoMethod Consumer
   628  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   629  }
   630  
   631  // DataCatalogConfig: Specifies how metastore metadata should be integrated
   632  // with the Data Catalog service.
   633  type DataCatalogConfig struct {
   634  	// Enabled: Optional. Defines whether the metastore metadata should be synced
   635  	// to Data Catalog. The default value is to disable syncing metastore metadata
   636  	// to Data Catalog.
   637  	Enabled bool `json:"enabled,omitempty"`
   638  	// ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally
   639  	// include in API requests. By default, fields with empty or default values are
   640  	// omitted from API requests. See
   641  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   642  	// details.
   643  	ForceSendFields []string `json:"-"`
   644  	// NullFields is a list of field names (e.g. "Enabled") to include in API
   645  	// requests with the JSON null value. By default, fields with empty values are
   646  	// omitted from API requests. See
   647  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   648  	NullFields []string `json:"-"`
   649  }
   650  
   651  func (s *DataCatalogConfig) MarshalJSON() ([]byte, error) {
   652  	type NoMethod DataCatalogConfig
   653  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   654  }
   655  
   656  // DatabaseDump: A specification of the location of and metadata about a
   657  // database dump from a relational database management system.
   658  type DatabaseDump struct {
   659  	// DatabaseType: The type of the database.
   660  	//
   661  	// Possible values:
   662  	//   "DATABASE_TYPE_UNSPECIFIED" - The type of the source database is unknown.
   663  	//   "MYSQL" - The type of the source database is MySQL.
   664  	DatabaseType string `json:"databaseType,omitempty"`
   665  	// GcsUri: A Cloud Storage object or folder URI that specifies the source from
   666  	// which to import metadata. It must begin with gs://.
   667  	GcsUri string `json:"gcsUri,omitempty"`
   668  	// SourceDatabase: The name of the source database.
   669  	SourceDatabase string `json:"sourceDatabase,omitempty"`
   670  	// Type: Optional. The type of the database dump. If unspecified, defaults to
   671  	// MYSQL.
   672  	//
   673  	// Possible values:
   674  	//   "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
   675  	//   "MYSQL" - Database dump is a MySQL dump file.
   676  	//   "AVRO" - Database dump contains Avro files.
   677  	Type string `json:"type,omitempty"`
   678  	// ForceSendFields is a list of field names (e.g. "DatabaseType") to
   679  	// unconditionally include in API requests. By default, fields with empty or
   680  	// default values are omitted from API requests. See
   681  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   682  	// details.
   683  	ForceSendFields []string `json:"-"`
   684  	// NullFields is a list of field names (e.g. "DatabaseType") to include in API
   685  	// requests with the JSON null value. By default, fields with empty values are
   686  	// omitted from API requests. See
   687  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   688  	NullFields []string `json:"-"`
   689  }
   690  
   691  func (s *DatabaseDump) MarshalJSON() ([]byte, error) {
   692  	type NoMethod DatabaseDump
   693  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   694  }
   695  
   696  // Empty: A generic empty message that you can re-use to avoid defining
   697  // duplicated empty messages in your APIs. A typical example is to use it as
   698  // the request or the response type of an API method. For instance: service Foo
   699  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   700  type Empty struct {
   701  	// ServerResponse contains the HTTP response code and headers from the server.
   702  	googleapi.ServerResponse `json:"-"`
   703  }
   704  
   705  // EncryptionConfig: Encryption settings for the service.
   706  type EncryptionConfig struct {
   707  	// KmsKey: The fully qualified customer provided Cloud KMS key name to use for
   708  	// customer data encryption, in the following
   709  	// format:projects/{project_number}/locations/{location_id}/keyRings/{key_ring_i
   710  	// d}/cryptoKeys/{crypto_key_id}.
   711  	KmsKey string `json:"kmsKey,omitempty"`
   712  	// ForceSendFields is a list of field names (e.g. "KmsKey") to unconditionally
   713  	// include in API requests. By default, fields with empty or default values are
   714  	// omitted from API requests. See
   715  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   716  	// details.
   717  	ForceSendFields []string `json:"-"`
   718  	// NullFields is a list of field names (e.g. "KmsKey") to include in API
   719  	// requests with the JSON null value. By default, fields with empty values are
   720  	// omitted from API requests. See
   721  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   722  	NullFields []string `json:"-"`
   723  }
   724  
   725  func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
   726  	type NoMethod EncryptionConfig
   727  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   728  }
   729  
   730  // ErrorDetails: Error details in public error message for
   731  // DataprocMetastore.QueryMetadata.
   732  type ErrorDetails struct {
   733  	// Details: Additional structured details about this error.Keys define the
   734  	// failure items. Value describes the exception or details of the item.
   735  	Details map[string]string `json:"details,omitempty"`
   736  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
   737  	// include in API requests. By default, fields with empty or default values are
   738  	// omitted from API requests. See
   739  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   740  	// details.
   741  	ForceSendFields []string `json:"-"`
   742  	// NullFields is a list of field names (e.g. "Details") to include in API
   743  	// requests with the JSON null value. By default, fields with empty values are
   744  	// omitted from API requests. See
   745  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   746  	NullFields []string `json:"-"`
   747  }
   748  
   749  func (s *ErrorDetails) MarshalJSON() ([]byte, error) {
   750  	type NoMethod ErrorDetails
   751  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   752  }
   753  
   754  // ExportMetadataRequest: Request message for DataprocMetastore.ExportMetadata.
   755  type ExportMetadataRequest struct {
   756  	// DatabaseDumpType: Optional. The type of the database dump. If unspecified,
   757  	// defaults to MYSQL.
   758  	//
   759  	// Possible values:
   760  	//   "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
   761  	//   "MYSQL" - Database dump is a MySQL dump file.
   762  	//   "AVRO" - Database dump contains Avro files.
   763  	DatabaseDumpType string `json:"databaseDumpType,omitempty"`
   764  	// DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///.
   765  	// A sub-folder containing exported files will be created below it.
   766  	DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"`
   767  	// RequestId: Optional. A request ID. Specify a unique request ID to allow the
   768  	// server to ignore the request if it has completed. The server will ignore
   769  	// subsequent requests that provide a duplicate request ID for at least 60
   770  	// minutes after the first request.For example, if an initial request times
   771  	// out, followed by another request with the same request ID, the server
   772  	// ignores the second request to prevent the creation of duplicate
   773  	// commitments.The request ID must be a valid UUID
   774  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero
   775  	// UUID (00000000-0000-0000-0000-000000000000) is not supported.
   776  	RequestId string `json:"requestId,omitempty"`
   777  	// ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to
   778  	// unconditionally include in API requests. By default, fields with empty or
   779  	// default values are omitted from API requests. See
   780  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   781  	// details.
   782  	ForceSendFields []string `json:"-"`
   783  	// NullFields is a list of field names (e.g. "DatabaseDumpType") to include in
   784  	// API requests with the JSON null value. By default, fields with empty values
   785  	// are omitted from API requests. See
   786  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   787  	NullFields []string `json:"-"`
   788  }
   789  
   790  func (s *ExportMetadataRequest) MarshalJSON() ([]byte, error) {
   791  	type NoMethod ExportMetadataRequest
   792  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   793  }
   794  
   795  // Expr: Represents a textual expression in the Common Expression Language
   796  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   797  // of CEL are documented at https://github.com/google/cel-spec.Example
   798  // (Comparison): title: "Summary size limit" description: "Determines if a
   799  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   800  // Example (Equality): title: "Requestor is owner" description: "Determines if
   801  // requestor is the document owner" expression: "document.owner ==
   802  // request.auth.claims.email" Example (Logic): title: "Public documents"
   803  // description: "Determine whether the document should be publicly visible"
   804  // expression: "document.type != 'private' && document.type != 'internal'"
   805  // Example (Data Manipulation): title: "Notification string" description:
   806  // "Create a notification string with a timestamp." expression: "'New message
   807  // received at ' + string(document.create_time)" The exact variables and
   808  // functions that may be referenced within an expression are determined by the
   809  // service that evaluates it. See the service documentation for additional
   810  // information.
   811  type Expr struct {
   812  	// Description: Optional. Description of the expression. This is a longer text
   813  	// which describes the expression, e.g. when hovered over it in a UI.
   814  	Description string `json:"description,omitempty"`
   815  	// Expression: Textual representation of an expression in Common Expression
   816  	// Language syntax.
   817  	Expression string `json:"expression,omitempty"`
   818  	// Location: Optional. String indicating the location of the expression for
   819  	// error reporting, e.g. a file name and a position in the file.
   820  	Location string `json:"location,omitempty"`
   821  	// Title: Optional. Title for the expression, i.e. a short string describing
   822  	// its purpose. This can be used e.g. in UIs which allow to enter the
   823  	// expression.
   824  	Title string `json:"title,omitempty"`
   825  	// ForceSendFields is a list of field names (e.g. "Description") to
   826  	// unconditionally include in API requests. By default, fields with empty or
   827  	// default values are omitted from API requests. See
   828  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   829  	// details.
   830  	ForceSendFields []string `json:"-"`
   831  	// NullFields is a list of field names (e.g. "Description") to include in API
   832  	// requests with the JSON null value. By default, fields with empty values are
   833  	// omitted from API requests. See
   834  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   835  	NullFields []string `json:"-"`
   836  }
   837  
   838  func (s *Expr) MarshalJSON() ([]byte, error) {
   839  	type NoMethod Expr
   840  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   841  }
   842  
   843  // Federation: Represents a federation of multiple backend metastores.
   844  type Federation struct {
   845  	// BackendMetastores: A map from BackendMetastore rank to BackendMetastores
   846  	// from which the federation service serves metadata at query time. The map key
   847  	// represents the order in which BackendMetastores should be evaluated to
   848  	// resolve database names at query time and should be greater than or equal to
   849  	// zero. A BackendMetastore with a lower number will be evaluated before a
   850  	// BackendMetastore with a higher number.
   851  	BackendMetastores map[string]BackendMetastore `json:"backendMetastores,omitempty"`
   852  	// CreateTime: Output only. The time when the metastore federation was created.
   853  	CreateTime string `json:"createTime,omitempty"`
   854  	// EndpointUri: Output only. The federation endpoint.
   855  	EndpointUri string `json:"endpointUri,omitempty"`
   856  	// Labels: User-defined labels for the metastore federation.
   857  	Labels map[string]string `json:"labels,omitempty"`
   858  	// Name: Immutable. The relative resource name of the federation, of the form:
   859  	// projects/{project_number}/locations/{location_id}/federations/{federation_id}
   860  	// `.
   861  	Name string `json:"name,omitempty"`
   862  	// State: Output only. The current state of the federation.
   863  	//
   864  	// Possible values:
   865  	//   "STATE_UNSPECIFIED" - The state of the metastore federation is unknown.
   866  	//   "CREATING" - The metastore federation is in the process of being created.
   867  	//   "ACTIVE" - The metastore federation is running and ready to serve queries.
   868  	//   "UPDATING" - The metastore federation is being updated. It remains usable
   869  	// but cannot accept additional update requests or be deleted at this time.
   870  	//   "DELETING" - The metastore federation is undergoing deletion. It cannot be
   871  	// used.
   872  	//   "ERROR" - The metastore federation has encountered an error and cannot be
   873  	// used. The metastore federation should be deleted.
   874  	State string `json:"state,omitempty"`
   875  	// StateMessage: Output only. Additional information about the current state of
   876  	// the metastore federation, if available.
   877  	StateMessage string `json:"stateMessage,omitempty"`
   878  	// Uid: Output only. The globally unique resource identifier of the metastore
   879  	// federation.
   880  	Uid string `json:"uid,omitempty"`
   881  	// UpdateTime: Output only. The time when the metastore federation was last
   882  	// updated.
   883  	UpdateTime string `json:"updateTime,omitempty"`
   884  	// Version: Immutable. The Apache Hive metastore version of the federation. All
   885  	// backend metastore versions must be compatible with the federation version.
   886  	Version string `json:"version,omitempty"`
   887  
   888  	// ServerResponse contains the HTTP response code and headers from the server.
   889  	googleapi.ServerResponse `json:"-"`
   890  	// ForceSendFields is a list of field names (e.g. "BackendMetastores") to
   891  	// unconditionally include in API requests. By default, fields with empty or
   892  	// default values are omitted from API requests. See
   893  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   894  	// details.
   895  	ForceSendFields []string `json:"-"`
   896  	// NullFields is a list of field names (e.g. "BackendMetastores") to include in
   897  	// API requests with the JSON null value. By default, fields with empty values
   898  	// are omitted from API requests. See
   899  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   900  	NullFields []string `json:"-"`
   901  }
   902  
   903  func (s *Federation) MarshalJSON() ([]byte, error) {
   904  	type NoMethod Federation
   905  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   906  }
   907  
   908  // HiveMetastoreConfig: Specifies configuration information specific to running
   909  // Hive metastore software as the metastore service.
   910  type HiveMetastoreConfig struct {
   911  	// AuxiliaryVersions: A mapping of Hive metastore version to the auxiliary
   912  	// version configuration. When specified, a secondary Hive metastore service is
   913  	// created along with the primary service. All auxiliary versions must be less
   914  	// than the service's primary version. The key is the auxiliary service name
   915  	// and it must match the regular expression a-z?. This means that the first
   916  	// character must be a lowercase letter, and all the following characters must
   917  	// be hyphens, lowercase letters, or digits, except the last character, which
   918  	// cannot be a hyphen.
   919  	AuxiliaryVersions map[string]AuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"`
   920  	// ConfigOverrides: A mapping of Hive metastore configuration key-value pairs
   921  	// to apply to the Hive metastore (configured in hive-site.xml). The mappings
   922  	// override system defaults (some keys cannot be overridden). These overrides
   923  	// are also applied to auxiliary versions and can be further customized in the
   924  	// auxiliary version's AuxiliaryVersionConfig.
   925  	ConfigOverrides map[string]string `json:"configOverrides,omitempty"`
   926  	// EndpointProtocol: The protocol to use for the metastore service endpoint. If
   927  	// unspecified, defaults to THRIFT.
   928  	//
   929  	// Possible values:
   930  	//   "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set.
   931  	//   "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service
   932  	// endpoint.
   933  	//   "GRPC" - Use the modernized gRPC protocol for the metastore service
   934  	// endpoint.
   935  	EndpointProtocol string `json:"endpointProtocol,omitempty"`
   936  	// KerberosConfig: Information used to configure the Hive metastore service as
   937  	// a service principal in a Kerberos realm. To disable Kerberos, use the
   938  	// UpdateService method and specify this field's path
   939  	// (hive_metastore_config.kerberos_config) in the request's update_mask while
   940  	// omitting this field from the request's service.
   941  	KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"`
   942  	// Version: Immutable. The Hive metastore schema version.
   943  	Version string `json:"version,omitempty"`
   944  	// ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to
   945  	// unconditionally include in API requests. By default, fields with empty or
   946  	// default values are omitted from API requests. See
   947  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   948  	// details.
   949  	ForceSendFields []string `json:"-"`
   950  	// NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in
   951  	// API requests with the JSON null value. By default, fields with empty values
   952  	// are omitted from API requests. See
   953  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   954  	NullFields []string `json:"-"`
   955  }
   956  
   957  func (s *HiveMetastoreConfig) MarshalJSON() ([]byte, error) {
   958  	type NoMethod HiveMetastoreConfig
   959  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   960  }
   961  
   962  // HiveMetastoreVersion: A specification of a supported version of the Hive
   963  // Metastore software.
   964  type HiveMetastoreVersion struct {
   965  	// IsDefault: Whether version will be chosen by the server if a metastore
   966  	// service is created with a HiveMetastoreConfig that omits the version.
   967  	IsDefault bool `json:"isDefault,omitempty"`
   968  	// Version: The semantic version of the Hive Metastore software.
   969  	Version string `json:"version,omitempty"`
   970  	// ForceSendFields is a list of field names (e.g. "IsDefault") to
   971  	// unconditionally include in API requests. By default, fields with empty or
   972  	// default values are omitted from API requests. See
   973  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   974  	// details.
   975  	ForceSendFields []string `json:"-"`
   976  	// NullFields is a list of field names (e.g. "IsDefault") to include in API
   977  	// requests with the JSON null value. By default, fields with empty values are
   978  	// omitted from API requests. See
   979  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   980  	NullFields []string `json:"-"`
   981  }
   982  
   983  func (s *HiveMetastoreVersion) MarshalJSON() ([]byte, error) {
   984  	type NoMethod HiveMetastoreVersion
   985  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   986  }
   987  
   988  // KerberosConfig: Configuration information for a Kerberos principal.
   989  type KerberosConfig struct {
   990  	// Keytab: A Kerberos keytab file that can be used to authenticate a service
   991  	// principal with a Kerberos Key Distribution Center (KDC).
   992  	Keytab *Secret `json:"keytab,omitempty"`
   993  	// Krb5ConfigGcsUri: A Cloud Storage URI that specifies the path to a krb5.conf
   994  	// file. It is of the form gs://{bucket_name}/path/to/krb5.conf, although the
   995  	// file does not need to be named krb5.conf explicitly.
   996  	Krb5ConfigGcsUri string `json:"krb5ConfigGcsUri,omitempty"`
   997  	// Principal: A Kerberos principal that exists in the both the keytab the KDC
   998  	// to authenticate as. A typical principal is of the form
   999  	// primary/instance@REALM, but there is no exact format.
  1000  	Principal string `json:"principal,omitempty"`
  1001  	// ForceSendFields is a list of field names (e.g. "Keytab") to unconditionally
  1002  	// include in API requests. By default, fields with empty or default values are
  1003  	// omitted from API requests. See
  1004  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1005  	// details.
  1006  	ForceSendFields []string `json:"-"`
  1007  	// NullFields is a list of field names (e.g. "Keytab") to include in API
  1008  	// requests with the JSON null value. By default, fields with empty values are
  1009  	// omitted from API requests. See
  1010  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1011  	NullFields []string `json:"-"`
  1012  }
  1013  
  1014  func (s *KerberosConfig) MarshalJSON() ([]byte, error) {
  1015  	type NoMethod KerberosConfig
  1016  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1017  }
  1018  
  1019  // LatestBackup: The details of the latest scheduled backup.
  1020  type LatestBackup struct {
  1021  	// BackupId: Output only. The ID of an in-progress scheduled backup. Empty if
  1022  	// no backup is in progress.
  1023  	BackupId string `json:"backupId,omitempty"`
  1024  	// Duration: Output only. The duration of the backup completion.
  1025  	Duration string `json:"duration,omitempty"`
  1026  	// StartTime: Output only. The time when the backup was started.
  1027  	StartTime string `json:"startTime,omitempty"`
  1028  	// State: Output only. The current state of the backup.
  1029  	//
  1030  	// Possible values:
  1031  	//   "STATE_UNSPECIFIED" - The state of the backup is unknown.
  1032  	//   "IN_PROGRESS" - The backup is in progress.
  1033  	//   "SUCCEEDED" - The backup completed.
  1034  	//   "FAILED" - The backup failed.
  1035  	State string `json:"state,omitempty"`
  1036  	// ForceSendFields is a list of field names (e.g. "BackupId") to
  1037  	// unconditionally include in API requests. By default, fields with empty or
  1038  	// default values are omitted from API requests. See
  1039  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1040  	// details.
  1041  	ForceSendFields []string `json:"-"`
  1042  	// NullFields is a list of field names (e.g. "BackupId") to include in API
  1043  	// requests with the JSON null value. By default, fields with empty values are
  1044  	// omitted from API requests. See
  1045  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1046  	NullFields []string `json:"-"`
  1047  }
  1048  
  1049  func (s *LatestBackup) MarshalJSON() ([]byte, error) {
  1050  	type NoMethod LatestBackup
  1051  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1052  }
  1053  
  1054  // ListBackupsResponse: Response message for DataprocMetastore.ListBackups.
  1055  type ListBackupsResponse struct {
  1056  	// Backups: The backups of the specified service.
  1057  	Backups []*Backup `json:"backups,omitempty"`
  1058  	// NextPageToken: A token that can be sent as page_token to retrieve the next
  1059  	// page. If this field is omitted, there are no subsequent pages.
  1060  	NextPageToken string `json:"nextPageToken,omitempty"`
  1061  	// Unreachable: Locations that could not be reached.
  1062  	Unreachable []string `json:"unreachable,omitempty"`
  1063  
  1064  	// ServerResponse contains the HTTP response code and headers from the server.
  1065  	googleapi.ServerResponse `json:"-"`
  1066  	// ForceSendFields is a list of field names (e.g. "Backups") to unconditionally
  1067  	// include in API requests. By default, fields with empty or default values are
  1068  	// omitted from API requests. See
  1069  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1070  	// details.
  1071  	ForceSendFields []string `json:"-"`
  1072  	// NullFields is a list of field names (e.g. "Backups") to include in API
  1073  	// requests with the JSON null value. By default, fields with empty values are
  1074  	// omitted from API requests. See
  1075  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1076  	NullFields []string `json:"-"`
  1077  }
  1078  
  1079  func (s *ListBackupsResponse) MarshalJSON() ([]byte, error) {
  1080  	type NoMethod ListBackupsResponse
  1081  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1082  }
  1083  
  1084  // ListFederationsResponse: Response message for ListFederations
  1085  type ListFederationsResponse struct {
  1086  	// Federations: The services in the specified location.
  1087  	Federations []*Federation `json:"federations,omitempty"`
  1088  	// NextPageToken: A token that can be sent as page_token to retrieve the next
  1089  	// page. If this field is omitted, there are no subsequent pages.
  1090  	NextPageToken string `json:"nextPageToken,omitempty"`
  1091  	// Unreachable: Locations that could not be reached.
  1092  	Unreachable []string `json:"unreachable,omitempty"`
  1093  
  1094  	// ServerResponse contains the HTTP response code and headers from the server.
  1095  	googleapi.ServerResponse `json:"-"`
  1096  	// ForceSendFields is a list of field names (e.g. "Federations") to
  1097  	// unconditionally include in API requests. By default, fields with empty or
  1098  	// default values are omitted from API requests. See
  1099  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1100  	// details.
  1101  	ForceSendFields []string `json:"-"`
  1102  	// NullFields is a list of field names (e.g. "Federations") to include in API
  1103  	// requests with the JSON null value. By default, fields with empty values are
  1104  	// omitted from API requests. See
  1105  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1106  	NullFields []string `json:"-"`
  1107  }
  1108  
  1109  func (s *ListFederationsResponse) MarshalJSON() ([]byte, error) {
  1110  	type NoMethod ListFederationsResponse
  1111  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1112  }
  1113  
  1114  // ListLocationsResponse: The response message for Locations.ListLocations.
  1115  type ListLocationsResponse struct {
  1116  	// Locations: A list of locations that matches the specified filter in the
  1117  	// request.
  1118  	Locations []*Location `json:"locations,omitempty"`
  1119  	// NextPageToken: The standard List next-page token.
  1120  	NextPageToken string `json:"nextPageToken,omitempty"`
  1121  
  1122  	// ServerResponse contains the HTTP response code and headers from the server.
  1123  	googleapi.ServerResponse `json:"-"`
  1124  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1125  	// unconditionally include in API requests. By default, fields with empty or
  1126  	// default values are omitted from API requests. See
  1127  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1128  	// details.
  1129  	ForceSendFields []string `json:"-"`
  1130  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1131  	// requests with the JSON null value. By default, fields with empty values are
  1132  	// omitted from API requests. See
  1133  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1134  	NullFields []string `json:"-"`
  1135  }
  1136  
  1137  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1138  	type NoMethod ListLocationsResponse
  1139  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1140  }
  1141  
  1142  // ListMetadataImportsResponse: Response message for
  1143  // DataprocMetastore.ListMetadataImports.
  1144  type ListMetadataImportsResponse struct {
  1145  	// MetadataImports: The imports in the specified service.
  1146  	MetadataImports []*MetadataImport `json:"metadataImports,omitempty"`
  1147  	// NextPageToken: A token that can be sent as page_token to retrieve the next
  1148  	// page. If this field is omitted, there are no subsequent pages.
  1149  	NextPageToken string `json:"nextPageToken,omitempty"`
  1150  	// Unreachable: Locations that could not be reached.
  1151  	Unreachable []string `json:"unreachable,omitempty"`
  1152  
  1153  	// ServerResponse contains the HTTP response code and headers from the server.
  1154  	googleapi.ServerResponse `json:"-"`
  1155  	// ForceSendFields is a list of field names (e.g. "MetadataImports") to
  1156  	// unconditionally include in API requests. By default, fields with empty or
  1157  	// default values are omitted from API requests. See
  1158  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1159  	// details.
  1160  	ForceSendFields []string `json:"-"`
  1161  	// NullFields is a list of field names (e.g. "MetadataImports") to include in
  1162  	// API requests with the JSON null value. By default, fields with empty values
  1163  	// are omitted from API requests. See
  1164  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1165  	NullFields []string `json:"-"`
  1166  }
  1167  
  1168  func (s *ListMetadataImportsResponse) MarshalJSON() ([]byte, error) {
  1169  	type NoMethod ListMetadataImportsResponse
  1170  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1171  }
  1172  
  1173  // ListOperationsResponse: The response message for Operations.ListOperations.
  1174  type ListOperationsResponse struct {
  1175  	// NextPageToken: The standard List next-page token.
  1176  	NextPageToken string `json:"nextPageToken,omitempty"`
  1177  	// Operations: A list of operations that matches the specified filter in the
  1178  	// request.
  1179  	Operations []*Operation `json:"operations,omitempty"`
  1180  
  1181  	// ServerResponse contains the HTTP response code and headers from the server.
  1182  	googleapi.ServerResponse `json:"-"`
  1183  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1184  	// unconditionally include in API requests. By default, fields with empty or
  1185  	// default values are omitted from API requests. See
  1186  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1187  	// details.
  1188  	ForceSendFields []string `json:"-"`
  1189  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1190  	// requests with the JSON null value. By default, fields with empty values are
  1191  	// omitted from API requests. See
  1192  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1193  	NullFields []string `json:"-"`
  1194  }
  1195  
  1196  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1197  	type NoMethod ListOperationsResponse
  1198  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1199  }
  1200  
  1201  // ListServicesResponse: Response message for DataprocMetastore.ListServices.
  1202  type ListServicesResponse struct {
  1203  	// NextPageToken: A token that can be sent as page_token to retrieve the next
  1204  	// page. If this field is omitted, there are no subsequent pages.
  1205  	NextPageToken string `json:"nextPageToken,omitempty"`
  1206  	// Services: The services in the specified location.
  1207  	Services []*Service `json:"services,omitempty"`
  1208  	// Unreachable: Locations that could not be reached.
  1209  	Unreachable []string `json:"unreachable,omitempty"`
  1210  
  1211  	// ServerResponse contains the HTTP response code and headers from the server.
  1212  	googleapi.ServerResponse `json:"-"`
  1213  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1214  	// unconditionally include in API requests. By default, fields with empty or
  1215  	// default values are omitted from API requests. See
  1216  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1217  	// details.
  1218  	ForceSendFields []string `json:"-"`
  1219  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1220  	// requests with the JSON null value. By default, fields with empty values are
  1221  	// omitted from API requests. See
  1222  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1223  	NullFields []string `json:"-"`
  1224  }
  1225  
  1226  func (s *ListServicesResponse) MarshalJSON() ([]byte, error) {
  1227  	type NoMethod ListServicesResponse
  1228  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1229  }
  1230  
  1231  // Location: A resource that represents a Google Cloud location.
  1232  type Location struct {
  1233  	// DisplayName: The friendly name for this location, typically a nearby city
  1234  	// name. For example, "Tokyo".
  1235  	DisplayName string `json:"displayName,omitempty"`
  1236  	// Labels: Cross-service attributes for the location. For example
  1237  	// {"cloud.googleapis.com/region": "us-east1"}
  1238  	Labels map[string]string `json:"labels,omitempty"`
  1239  	// LocationId: The canonical id for this location. For example: "us-east1".
  1240  	LocationId string `json:"locationId,omitempty"`
  1241  	// Metadata: Service-specific metadata. For example the available capacity at
  1242  	// the given location.
  1243  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1244  	// Name: Resource name for the location, which may vary between
  1245  	// implementations. For example: "projects/example-project/locations/us-east1"
  1246  	Name string `json:"name,omitempty"`
  1247  
  1248  	// ServerResponse contains the HTTP response code and headers from the server.
  1249  	googleapi.ServerResponse `json:"-"`
  1250  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1251  	// unconditionally include in API requests. By default, fields with empty or
  1252  	// default values are omitted from API requests. See
  1253  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1254  	// details.
  1255  	ForceSendFields []string `json:"-"`
  1256  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1257  	// requests with the JSON null value. By default, fields with empty values are
  1258  	// omitted from API requests. See
  1259  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1260  	NullFields []string `json:"-"`
  1261  }
  1262  
  1263  func (s *Location) MarshalJSON() ([]byte, error) {
  1264  	type NoMethod Location
  1265  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1266  }
  1267  
  1268  // LocationMetadata: Metadata about the service in a location.
  1269  type LocationMetadata struct {
  1270  	// MultiRegionMetadata: The multi-region metadata if the current region is a
  1271  	// multi-region.
  1272  	MultiRegionMetadata *MultiRegionMetadata `json:"multiRegionMetadata,omitempty"`
  1273  	// SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be
  1274  	// used when creating a new metastore service in this location. The server
  1275  	// guarantees that exactly one HiveMetastoreVersion in the list will set
  1276  	// is_default.
  1277  	SupportedHiveMetastoreVersions []*HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"`
  1278  	// ForceSendFields is a list of field names (e.g. "MultiRegionMetadata") to
  1279  	// unconditionally include in API requests. By default, fields with empty or
  1280  	// default values are omitted from API requests. See
  1281  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1282  	// details.
  1283  	ForceSendFields []string `json:"-"`
  1284  	// NullFields is a list of field names (e.g. "MultiRegionMetadata") to include
  1285  	// in API requests with the JSON null value. By default, fields with empty
  1286  	// values are omitted from API requests. See
  1287  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1288  	NullFields []string `json:"-"`
  1289  }
  1290  
  1291  func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1292  	type NoMethod LocationMetadata
  1293  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1294  }
  1295  
  1296  // MaintenanceWindow: Maintenance window. This specifies when Dataproc
  1297  // Metastore may perform system maintenance operation to the service.
  1298  type MaintenanceWindow struct {
  1299  	// DayOfWeek: The day of week, when the window starts.
  1300  	//
  1301  	// Possible values:
  1302  	//   "DAY_OF_WEEK_UNSPECIFIED" - The day of the week is unspecified.
  1303  	//   "MONDAY" - Monday
  1304  	//   "TUESDAY" - Tuesday
  1305  	//   "WEDNESDAY" - Wednesday
  1306  	//   "THURSDAY" - Thursday
  1307  	//   "FRIDAY" - Friday
  1308  	//   "SATURDAY" - Saturday
  1309  	//   "SUNDAY" - Sunday
  1310  	DayOfWeek string `json:"dayOfWeek,omitempty"`
  1311  	// HourOfDay: The hour of day (0-23) when the window starts.
  1312  	HourOfDay int64 `json:"hourOfDay,omitempty"`
  1313  	// ForceSendFields is a list of field names (e.g. "DayOfWeek") to
  1314  	// unconditionally include in API requests. By default, fields with empty or
  1315  	// default values are omitted from API requests. See
  1316  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1317  	// details.
  1318  	ForceSendFields []string `json:"-"`
  1319  	// NullFields is a list of field names (e.g. "DayOfWeek") to include in API
  1320  	// requests with the JSON null value. By default, fields with empty values are
  1321  	// omitted from API requests. See
  1322  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1323  	NullFields []string `json:"-"`
  1324  }
  1325  
  1326  func (s *MaintenanceWindow) MarshalJSON() ([]byte, error) {
  1327  	type NoMethod MaintenanceWindow
  1328  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1329  }
  1330  
  1331  // MetadataExport: The details of a metadata export operation.
  1332  type MetadataExport struct {
  1333  	// DatabaseDumpType: Output only. The type of the database dump.
  1334  	//
  1335  	// Possible values:
  1336  	//   "TYPE_UNSPECIFIED" - The type of the database dump is unknown.
  1337  	//   "MYSQL" - Database dump is a MySQL dump file.
  1338  	//   "AVRO" - Database dump contains Avro files.
  1339  	DatabaseDumpType string `json:"databaseDumpType,omitempty"`
  1340  	// DestinationGcsUri: Output only. A Cloud Storage URI of a folder that
  1341  	// metadata are exported to, in the form of gs:////, where is automatically
  1342  	// generated.
  1343  	DestinationGcsUri string `json:"destinationGcsUri,omitempty"`
  1344  	// EndTime: Output only. The time when the export ended.
  1345  	EndTime string `json:"endTime,omitempty"`
  1346  	// StartTime: Output only. The time when the export started.
  1347  	StartTime string `json:"startTime,omitempty"`
  1348  	// State: Output only. The current state of the export.
  1349  	//
  1350  	// Possible values:
  1351  	//   "STATE_UNSPECIFIED" - The state of the metadata export is unknown.
  1352  	//   "RUNNING" - The metadata export is running.
  1353  	//   "SUCCEEDED" - The metadata export completed successfully.
  1354  	//   "FAILED" - The metadata export failed.
  1355  	//   "CANCELLED" - The metadata export is cancelled.
  1356  	State string `json:"state,omitempty"`
  1357  	// ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to
  1358  	// unconditionally include in API requests. By default, fields with empty or
  1359  	// default values are omitted from API requests. See
  1360  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1361  	// details.
  1362  	ForceSendFields []string `json:"-"`
  1363  	// NullFields is a list of field names (e.g. "DatabaseDumpType") to include in
  1364  	// API requests with the JSON null value. By default, fields with empty values
  1365  	// are omitted from API requests. See
  1366  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1367  	NullFields []string `json:"-"`
  1368  }
  1369  
  1370  func (s *MetadataExport) MarshalJSON() ([]byte, error) {
  1371  	type NoMethod MetadataExport
  1372  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1373  }
  1374  
  1375  // MetadataImport: A metastore resource that imports metadata.
  1376  type MetadataImport struct {
  1377  	// CreateTime: Output only. The time when the metadata import was started.
  1378  	CreateTime string `json:"createTime,omitempty"`
  1379  	// DatabaseDump: Immutable. A database dump from a pre-existing metastore's
  1380  	// database.
  1381  	DatabaseDump *DatabaseDump `json:"databaseDump,omitempty"`
  1382  	// Description: The description of the metadata import.
  1383  	Description string `json:"description,omitempty"`
  1384  	// EndTime: Output only. The time when the metadata import finished.
  1385  	EndTime string `json:"endTime,omitempty"`
  1386  	// Name: Immutable. The relative resource name of the metadata import, of the
  1387  	// form:projects/{project_number}/locations/{location_id}/services/{service_id}/
  1388  	// metadataImports/{metadata_import_id}.
  1389  	Name string `json:"name,omitempty"`
  1390  	// State: Output only. The current state of the metadata import.
  1391  	//
  1392  	// Possible values:
  1393  	//   "STATE_UNSPECIFIED" - The state of the metadata import is unknown.
  1394  	//   "RUNNING" - The metadata import is running.
  1395  	//   "SUCCEEDED" - The metadata import completed successfully.
  1396  	//   "UPDATING" - The metadata import is being updated.
  1397  	//   "FAILED" - The metadata import failed, and attempted metadata changes were
  1398  	// rolled back.
  1399  	State string `json:"state,omitempty"`
  1400  	// UpdateTime: Output only. The time when the metadata import was last updated.
  1401  	UpdateTime string `json:"updateTime,omitempty"`
  1402  
  1403  	// ServerResponse contains the HTTP response code and headers from the server.
  1404  	googleapi.ServerResponse `json:"-"`
  1405  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1406  	// unconditionally include in API requests. By default, fields with empty or
  1407  	// default values are omitted from API requests. See
  1408  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1409  	// details.
  1410  	ForceSendFields []string `json:"-"`
  1411  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1412  	// requests with the JSON null value. By default, fields with empty values are
  1413  	// omitted from API requests. See
  1414  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1415  	NullFields []string `json:"-"`
  1416  }
  1417  
  1418  func (s *MetadataImport) MarshalJSON() ([]byte, error) {
  1419  	type NoMethod MetadataImport
  1420  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1421  }
  1422  
  1423  // MetadataIntegration: Specifies how metastore metadata should be integrated
  1424  // with external services.
  1425  type MetadataIntegration struct {
  1426  	// DataCatalogConfig: Optional. The integration config for the Data Catalog
  1427  	// service.
  1428  	DataCatalogConfig *DataCatalogConfig `json:"dataCatalogConfig,omitempty"`
  1429  	// ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to
  1430  	// unconditionally include in API requests. By default, fields with empty or
  1431  	// default values are omitted from API requests. See
  1432  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1433  	// details.
  1434  	ForceSendFields []string `json:"-"`
  1435  	// NullFields is a list of field names (e.g. "DataCatalogConfig") to include in
  1436  	// API requests with the JSON null value. By default, fields with empty values
  1437  	// are omitted from API requests. See
  1438  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1439  	NullFields []string `json:"-"`
  1440  }
  1441  
  1442  func (s *MetadataIntegration) MarshalJSON() ([]byte, error) {
  1443  	type NoMethod MetadataIntegration
  1444  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1445  }
  1446  
  1447  // MetadataManagementActivity: The metadata management activities of the
  1448  // metastore service.
  1449  type MetadataManagementActivity struct {
  1450  	// MetadataExports: Output only. The latest metadata exports of the metastore
  1451  	// service.
  1452  	MetadataExports []*MetadataExport `json:"metadataExports,omitempty"`
  1453  	// Restores: Output only. The latest restores of the metastore service.
  1454  	Restores []*Restore `json:"restores,omitempty"`
  1455  	// ForceSendFields is a list of field names (e.g. "MetadataExports") to
  1456  	// unconditionally include in API requests. By default, fields with empty or
  1457  	// default values are omitted from API requests. See
  1458  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1459  	// details.
  1460  	ForceSendFields []string `json:"-"`
  1461  	// NullFields is a list of field names (e.g. "MetadataExports") to include in
  1462  	// API requests with the JSON null value. By default, fields with empty values
  1463  	// are omitted from API requests. See
  1464  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1465  	NullFields []string `json:"-"`
  1466  }
  1467  
  1468  func (s *MetadataManagementActivity) MarshalJSON() ([]byte, error) {
  1469  	type NoMethod MetadataManagementActivity
  1470  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1471  }
  1472  
  1473  // MoveTableToDatabaseRequest: Request message for
  1474  // DataprocMetastore.MoveTableToDatabase.
  1475  type MoveTableToDatabaseRequest struct {
  1476  	// DbName: Required. The name of the database where the table resides.
  1477  	DbName string `json:"dbName,omitempty"`
  1478  	// DestinationDbName: Required. The name of the database where the table should
  1479  	// be moved.
  1480  	DestinationDbName string `json:"destinationDbName,omitempty"`
  1481  	// TableName: Required. The name of the table to be moved.
  1482  	TableName string `json:"tableName,omitempty"`
  1483  	// ForceSendFields is a list of field names (e.g. "DbName") to unconditionally
  1484  	// include in API requests. By default, fields with empty or default values are
  1485  	// omitted from API requests. See
  1486  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1487  	// details.
  1488  	ForceSendFields []string `json:"-"`
  1489  	// NullFields is a list of field names (e.g. "DbName") to include in API
  1490  	// requests with the JSON null value. By default, fields with empty values are
  1491  	// omitted from API requests. See
  1492  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1493  	NullFields []string `json:"-"`
  1494  }
  1495  
  1496  func (s *MoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) {
  1497  	type NoMethod MoveTableToDatabaseRequest
  1498  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1499  }
  1500  
  1501  // MoveTableToDatabaseResponse: Response message for
  1502  // DataprocMetastore.MoveTableToDatabase.
  1503  type MoveTableToDatabaseResponse struct {
  1504  }
  1505  
  1506  // MultiRegionMetadata: The metadata for the multi-region that includes the
  1507  // constituent regions. The metadata is only populated if the region is
  1508  // multi-region. For single region, it will be empty.
  1509  type MultiRegionMetadata struct {
  1510  	// ConstituentRegions: The regions constituting the multi-region.
  1511  	ConstituentRegions []string `json:"constituentRegions,omitempty"`
  1512  	// ForceSendFields is a list of field names (e.g. "ConstituentRegions") to
  1513  	// unconditionally include in API requests. By default, fields with empty or
  1514  	// default values are omitted from API requests. See
  1515  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1516  	// details.
  1517  	ForceSendFields []string `json:"-"`
  1518  	// NullFields is a list of field names (e.g. "ConstituentRegions") to include
  1519  	// in API requests with the JSON null value. By default, fields with empty
  1520  	// values are omitted from API requests. See
  1521  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1522  	NullFields []string `json:"-"`
  1523  }
  1524  
  1525  func (s *MultiRegionMetadata) MarshalJSON() ([]byte, error) {
  1526  	type NoMethod MultiRegionMetadata
  1527  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1528  }
  1529  
  1530  // NetworkConfig: Network configuration for the Dataproc Metastore service.
  1531  type NetworkConfig struct {
  1532  	// Consumers: Immutable. The consumer-side network configuration for the
  1533  	// Dataproc Metastore instance.
  1534  	Consumers []*Consumer `json:"consumers,omitempty"`
  1535  	// ForceSendFields is a list of field names (e.g. "Consumers") to
  1536  	// unconditionally include in API requests. By default, fields with empty or
  1537  	// default values are omitted from API requests. See
  1538  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1539  	// details.
  1540  	ForceSendFields []string `json:"-"`
  1541  	// NullFields is a list of field names (e.g. "Consumers") to include in API
  1542  	// requests with the JSON null value. By default, fields with empty values are
  1543  	// omitted from API requests. See
  1544  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1545  	NullFields []string `json:"-"`
  1546  }
  1547  
  1548  func (s *NetworkConfig) MarshalJSON() ([]byte, error) {
  1549  	type NoMethod NetworkConfig
  1550  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1551  }
  1552  
  1553  // Operation: This resource represents a long-running operation that is the
  1554  // result of a network API call.
  1555  type Operation struct {
  1556  	// Done: If the value is false, it means the operation is still in progress. If
  1557  	// true, the operation is completed, and either error or response is available.
  1558  	Done bool `json:"done,omitempty"`
  1559  	// Error: The error result of the operation in case of failure or cancellation.
  1560  	Error *Status `json:"error,omitempty"`
  1561  	// Metadata: Service-specific metadata associated with the operation. It
  1562  	// typically contains progress information and common metadata such as create
  1563  	// time. Some services might not provide such metadata. Any method that returns
  1564  	// a long-running operation should document the metadata type, if any.
  1565  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1566  	// Name: The server-assigned name, which is only unique within the same service
  1567  	// that originally returns it. If you use the default HTTP mapping, the name
  1568  	// should be a resource name ending with operations/{unique_id}.
  1569  	Name string `json:"name,omitempty"`
  1570  	// Response: The normal, successful response of the operation. If the original
  1571  	// method returns no data on success, such as Delete, the response is
  1572  	// google.protobuf.Empty. If the original method is standard Get/Create/Update,
  1573  	// the response should be the resource. For other methods, the response should
  1574  	// have the type XxxResponse, where Xxx is the original method name. For
  1575  	// example, if the original method name is TakeSnapshot(), the inferred
  1576  	// response type is TakeSnapshotResponse.
  1577  	Response googleapi.RawMessage `json:"response,omitempty"`
  1578  
  1579  	// ServerResponse contains the HTTP response code and headers from the server.
  1580  	googleapi.ServerResponse `json:"-"`
  1581  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  1582  	// include in API requests. By default, fields with empty or default values are
  1583  	// omitted from API requests. See
  1584  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1585  	// details.
  1586  	ForceSendFields []string `json:"-"`
  1587  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  1588  	// with the JSON null value. By default, fields with empty values are omitted
  1589  	// from API requests. See
  1590  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1591  	NullFields []string `json:"-"`
  1592  }
  1593  
  1594  func (s *Operation) MarshalJSON() ([]byte, error) {
  1595  	type NoMethod Operation
  1596  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1597  }
  1598  
  1599  // OperationMetadata: Represents the metadata of a long-running operation.
  1600  type OperationMetadata struct {
  1601  	// ApiVersion: Output only. API version used to start the operation.
  1602  	ApiVersion string `json:"apiVersion,omitempty"`
  1603  	// CreateTime: Output only. The time the operation was created.
  1604  	CreateTime string `json:"createTime,omitempty"`
  1605  	// EndTime: Output only. The time the operation finished running.
  1606  	EndTime string `json:"endTime,omitempty"`
  1607  	// RequestedCancellation: Output only. Identifies whether the caller has
  1608  	// requested cancellation of the operation. Operations that have successfully
  1609  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  1610  	// 1, corresponding to Code.CANCELLED.
  1611  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1612  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1613  	StatusMessage string `json:"statusMessage,omitempty"`
  1614  	// Target: Output only. Server-defined resource path for the target of the
  1615  	// operation.
  1616  	Target string `json:"target,omitempty"`
  1617  	// Verb: Output only. Name of the verb executed by the operation.
  1618  	Verb string `json:"verb,omitempty"`
  1619  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1620  	// unconditionally include in API requests. By default, fields with empty or
  1621  	// default values are omitted from API requests. See
  1622  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1623  	// details.
  1624  	ForceSendFields []string `json:"-"`
  1625  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1626  	// requests with the JSON null value. By default, fields with empty values are
  1627  	// omitted from API requests. See
  1628  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1629  	NullFields []string `json:"-"`
  1630  }
  1631  
  1632  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1633  	type NoMethod OperationMetadata
  1634  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1635  }
  1636  
  1637  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1638  // access controls for Google Cloud resources.A Policy is a collection of
  1639  // bindings. A binding binds one or more members, or principals, to a single
  1640  // role. Principals can be user accounts, service accounts, Google groups, and
  1641  // domains (such as G Suite). A role is a named list of permissions; each role
  1642  // can be an IAM predefined role or a user-created custom role.For some types
  1643  // of Google Cloud resources, a binding can also specify a condition, which is
  1644  // a logical expression that allows access to a resource only if the expression
  1645  // evaluates to true. A condition can add constraints based on attributes of
  1646  // the request, the resource, or both. To learn which resources support
  1647  // conditions in their IAM policies, see the IAM documentation
  1648  // (https://cloud.google.com/iam/help/conditions/resource-policies).JSON
  1649  // example: { "bindings": [ { "role":
  1650  // "roles/resourcemanager.organizationAdmin", "members": [
  1651  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1652  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1653  // "roles/resourcemanager.organizationViewer", "members": [
  1654  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1655  // "description": "Does not grant access after Sep 2020", "expression":
  1656  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1657  // "BwWWja0YfJA=", "version": 3 } YAML example: bindings: - members: -
  1658  // user:mike@example.com - group:admins@example.com - domain:google.com -
  1659  // serviceAccount:my-project-id@appspot.gserviceaccount.com role:
  1660  // roles/resourcemanager.organizationAdmin - members: - user:eve@example.com
  1661  // role: roles/resourcemanager.organizationViewer condition: title: expirable
  1662  // access description: Does not grant access after Sep 2020 expression:
  1663  // request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA=
  1664  // version: 3 For a description of IAM and its features, see the IAM
  1665  // documentation (https://cloud.google.com/iam/docs/).
  1666  type Policy struct {
  1667  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1668  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1669  	// Bindings: Associates a list of members, or principals, with a role.
  1670  	// Optionally, may specify a condition that determines how and when the
  1671  	// bindings are applied. Each of the bindings must contain at least one
  1672  	// principal.The bindings in a Policy can refer to up to 1,500 principals; up
  1673  	// to 250 of these principals can be Google groups. Each occurrence of a
  1674  	// principal counts towards these limits. For example, if the bindings grant 50
  1675  	// different roles to user:alice@example.com, and not to any other principal,
  1676  	// then you can add another 1,450 principals to the bindings in the Policy.
  1677  	Bindings []*Binding `json:"bindings,omitempty"`
  1678  	// Etag: etag is used for optimistic concurrency control as a way to help
  1679  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1680  	// strongly suggested that systems make use of the etag in the
  1681  	// read-modify-write cycle to perform policy updates in order to avoid race
  1682  	// conditions: An etag is returned in the response to getIamPolicy, and systems
  1683  	// are expected to put that etag in the request to setIamPolicy to ensure that
  1684  	// their change will be applied to the same version of the policy.Important: If
  1685  	// you use IAM Conditions, you must include the etag field whenever you call
  1686  	// setIamPolicy. If you omit this field, then IAM allows you to overwrite a
  1687  	// version 3 policy with a version 1 policy, and all of the conditions in the
  1688  	// version 3 policy are lost.
  1689  	Etag string `json:"etag,omitempty"`
  1690  	// Version: Specifies the format of the policy.Valid values are 0, 1, and 3.
  1691  	// Requests that specify an invalid value are rejected.Any operation that
  1692  	// affects conditional role bindings must specify version 3. This requirement
  1693  	// applies to the following operations: Getting a policy that includes a
  1694  	// conditional role binding Adding a conditional role binding to a policy
  1695  	// Changing a conditional role binding in a policy Removing any role binding,
  1696  	// with or without a condition, from a policy that includes
  1697  	// conditionsImportant: If you use IAM Conditions, you must include the etag
  1698  	// field whenever you call setIamPolicy. If you omit this field, then IAM
  1699  	// allows you to overwrite a version 3 policy with a version 1 policy, and all
  1700  	// of the conditions in the version 3 policy are lost.If a policy does not
  1701  	// include any conditions, operations on that policy may specify any valid
  1702  	// version or leave the field unset.To learn which resources support conditions
  1703  	// in their IAM policies, see the IAM documentation
  1704  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1705  	Version int64 `json:"version,omitempty"`
  1706  
  1707  	// ServerResponse contains the HTTP response code and headers from the server.
  1708  	googleapi.ServerResponse `json:"-"`
  1709  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1710  	// unconditionally include in API requests. By default, fields with empty or
  1711  	// default values are omitted from API requests. See
  1712  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1713  	// details.
  1714  	ForceSendFields []string `json:"-"`
  1715  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1716  	// requests with the JSON null value. By default, fields with empty values are
  1717  	// omitted from API requests. See
  1718  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1719  	NullFields []string `json:"-"`
  1720  }
  1721  
  1722  func (s *Policy) MarshalJSON() ([]byte, error) {
  1723  	type NoMethod Policy
  1724  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1725  }
  1726  
  1727  // QueryMetadataRequest: Request message for DataprocMetastore.QueryMetadata.
  1728  type QueryMetadataRequest struct {
  1729  	// Query: Required. A read-only SQL query to execute against the metadata
  1730  	// database. The query cannot change or mutate the data.
  1731  	Query string `json:"query,omitempty"`
  1732  	// ForceSendFields is a list of field names (e.g. "Query") to unconditionally
  1733  	// include in API requests. By default, fields with empty or default values are
  1734  	// omitted from API requests. See
  1735  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1736  	// details.
  1737  	ForceSendFields []string `json:"-"`
  1738  	// NullFields is a list of field names (e.g. "Query") to include in API
  1739  	// requests with the JSON null value. By default, fields with empty values are
  1740  	// omitted from API requests. See
  1741  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1742  	NullFields []string `json:"-"`
  1743  }
  1744  
  1745  func (s *QueryMetadataRequest) MarshalJSON() ([]byte, error) {
  1746  	type NoMethod QueryMetadataRequest
  1747  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1748  }
  1749  
  1750  // QueryMetadataResponse: Response message for DataprocMetastore.QueryMetadata.
  1751  type QueryMetadataResponse struct {
  1752  	// ResultManifestUri: The manifest URI is link to a JSON instance in Cloud
  1753  	// Storage. This instance manifests immediately along with
  1754  	// QueryMetadataResponse. The content of the URI is not retriable until the
  1755  	// long-running operation query against the metadata finishes.
  1756  	ResultManifestUri string `json:"resultManifestUri,omitempty"`
  1757  	// ForceSendFields is a list of field names (e.g. "ResultManifestUri") 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. "ResultManifestUri") to include in
  1764  	// API requests with the JSON null value. By default, fields with empty values
  1765  	// 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 *QueryMetadataResponse) MarshalJSON() ([]byte, error) {
  1771  	type NoMethod QueryMetadataResponse
  1772  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1773  }
  1774  
  1775  // Restore: The details of a metadata restore operation.
  1776  type Restore struct {
  1777  	// Backup: Output only. The relative resource name of the metastore service
  1778  	// backup to restore from, in the following
  1779  	// form:projects/{project_id}/locations/{location_id}/services/{service_id}/back
  1780  	// ups/{backup_id}.
  1781  	Backup string `json:"backup,omitempty"`
  1782  	// BackupLocation: Optional. A Cloud Storage URI specifying where the backup
  1783  	// artifacts are stored, in the format gs:///.
  1784  	BackupLocation string `json:"backupLocation,omitempty"`
  1785  	// Details: Output only. The restore details containing the revision of the
  1786  	// service to be restored to, in format of JSON.
  1787  	Details string `json:"details,omitempty"`
  1788  	// EndTime: Output only. The time when the restore ended.
  1789  	EndTime string `json:"endTime,omitempty"`
  1790  	// StartTime: Output only. The time when the restore started.
  1791  	StartTime string `json:"startTime,omitempty"`
  1792  	// State: Output only. The current state of the restore.
  1793  	//
  1794  	// Possible values:
  1795  	//   "STATE_UNSPECIFIED" - The state of the metadata restore is unknown.
  1796  	//   "RUNNING" - The metadata restore is running.
  1797  	//   "SUCCEEDED" - The metadata restore completed successfully.
  1798  	//   "FAILED" - The metadata restore failed.
  1799  	//   "CANCELLED" - The metadata restore is cancelled.
  1800  	State string `json:"state,omitempty"`
  1801  	// Type: Output only. The type of restore.
  1802  	//
  1803  	// Possible values:
  1804  	//   "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown.
  1805  	//   "FULL" - The service's metadata and configuration are restored.
  1806  	//   "METADATA_ONLY" - Only the service's metadata is restored.
  1807  	Type string `json:"type,omitempty"`
  1808  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
  1809  	// include in API requests. By default, fields with empty or default values are
  1810  	// omitted from API requests. See
  1811  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1812  	// details.
  1813  	ForceSendFields []string `json:"-"`
  1814  	// NullFields is a list of field names (e.g. "Backup") to include in API
  1815  	// requests with the JSON null value. By default, fields with empty values are
  1816  	// omitted from API requests. See
  1817  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1818  	NullFields []string `json:"-"`
  1819  }
  1820  
  1821  func (s *Restore) MarshalJSON() ([]byte, error) {
  1822  	type NoMethod Restore
  1823  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1824  }
  1825  
  1826  // RestoreServiceRequest: Request message for DataprocMetastore.Restore.
  1827  type RestoreServiceRequest struct {
  1828  	// Backup: Optional. The relative resource name of the metastore service backup
  1829  	// to restore from, in the following
  1830  	// form:projects/{project_id}/locations/{location_id}/services/{service_id}/back
  1831  	// ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of
  1832  	// the two must be set.
  1833  	Backup string `json:"backup,omitempty"`
  1834  	// BackupLocation: Optional. A Cloud Storage URI specifying the location of the
  1835  	// backup artifacts, namely - backup avro files under "avro/",
  1836  	// backup_metastore.json and service.json, in the following form:gs://.
  1837  	// Mutually exclusive with backup, and exactly one of the two must be set.
  1838  	BackupLocation string `json:"backupLocation,omitempty"`
  1839  	// RequestId: Optional. A request ID. Specify a unique request ID to allow the
  1840  	// server to ignore the request if it has completed. The server will ignore
  1841  	// subsequent requests that provide a duplicate request ID for at least 60
  1842  	// minutes after the first request.For example, if an initial request times
  1843  	// out, followed by another request with the same request ID, the server
  1844  	// ignores the second request to prevent the creation of duplicate
  1845  	// commitments.The request ID must be a valid UUID
  1846  	// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero
  1847  	// UUID (00000000-0000-0000-0000-000000000000) is not supported.
  1848  	RequestId string `json:"requestId,omitempty"`
  1849  	// RestoreType: Optional. The type of restore. If unspecified, defaults to
  1850  	// METADATA_ONLY.
  1851  	//
  1852  	// Possible values:
  1853  	//   "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown.
  1854  	//   "FULL" - The service's metadata and configuration are restored.
  1855  	//   "METADATA_ONLY" - Only the service's metadata is restored.
  1856  	RestoreType string `json:"restoreType,omitempty"`
  1857  	// ForceSendFields is a list of field names (e.g. "Backup") to unconditionally
  1858  	// include in API requests. By default, fields with empty or default values are
  1859  	// omitted from API requests. See
  1860  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1861  	// details.
  1862  	ForceSendFields []string `json:"-"`
  1863  	// NullFields is a list of field names (e.g. "Backup") to include in API
  1864  	// requests with the JSON null value. By default, fields with empty values are
  1865  	// omitted from API requests. See
  1866  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1867  	NullFields []string `json:"-"`
  1868  }
  1869  
  1870  func (s *RestoreServiceRequest) MarshalJSON() ([]byte, error) {
  1871  	type NoMethod RestoreServiceRequest
  1872  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1873  }
  1874  
  1875  // ScalingConfig: Represents the scaling configuration of a metastore service.
  1876  type ScalingConfig struct {
  1877  	// InstanceSize: An enum of readable instance sizes, with each instance size
  1878  	// mapping to a float value (e.g. InstanceSize.EXTRA_SMALL =
  1879  	// scaling_factor(0.1))
  1880  	//
  1881  	// Possible values:
  1882  	//   "INSTANCE_SIZE_UNSPECIFIED" - Unspecified instance size
  1883  	//   "EXTRA_SMALL" - Extra small instance size, maps to a scaling factor of
  1884  	// 0.1.
  1885  	//   "SMALL" - Small instance size, maps to a scaling factor of 0.5.
  1886  	//   "MEDIUM" - Medium instance size, maps to a scaling factor of 1.0.
  1887  	//   "LARGE" - Large instance size, maps to a scaling factor of 3.0.
  1888  	//   "EXTRA_LARGE" - Extra large instance size, maps to a scaling factor of
  1889  	// 6.0.
  1890  	InstanceSize string `json:"instanceSize,omitempty"`
  1891  	// ScalingFactor: Scaling factor, increments of 0.1 for values less than 1.0,
  1892  	// and increments of 1.0 for values greater than 1.0.
  1893  	ScalingFactor float64 `json:"scalingFactor,omitempty"`
  1894  	// ForceSendFields is a list of field names (e.g. "InstanceSize") to
  1895  	// unconditionally include in API requests. By default, fields with empty or
  1896  	// default values are omitted from API requests. See
  1897  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1898  	// details.
  1899  	ForceSendFields []string `json:"-"`
  1900  	// NullFields is a list of field names (e.g. "InstanceSize") to include in API
  1901  	// requests with the JSON null value. By default, fields with empty values are
  1902  	// omitted from API requests. See
  1903  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1904  	NullFields []string `json:"-"`
  1905  }
  1906  
  1907  func (s *ScalingConfig) MarshalJSON() ([]byte, error) {
  1908  	type NoMethod ScalingConfig
  1909  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1910  }
  1911  
  1912  func (s *ScalingConfig) UnmarshalJSON(data []byte) error {
  1913  	type NoMethod ScalingConfig
  1914  	var s1 struct {
  1915  		ScalingFactor gensupport.JSONFloat64 `json:"scalingFactor"`
  1916  		*NoMethod
  1917  	}
  1918  	s1.NoMethod = (*NoMethod)(s)
  1919  	if err := json.Unmarshal(data, &s1); err != nil {
  1920  		return err
  1921  	}
  1922  	s.ScalingFactor = float64(s1.ScalingFactor)
  1923  	return nil
  1924  }
  1925  
  1926  // ScheduledBackup: This specifies the configuration of scheduled backup.
  1927  type ScheduledBackup struct {
  1928  	// BackupLocation: Optional. A Cloud Storage URI of a folder, in the format
  1929  	// gs:///. A sub-folder containing backup files will be stored below it.
  1930  	BackupLocation string `json:"backupLocation,omitempty"`
  1931  	// CronSchedule: Optional. The scheduled interval in Cron format, see
  1932  	// https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is
  1933  	// not enabled. Must be specified to enable scheduled backups.
  1934  	CronSchedule string `json:"cronSchedule,omitempty"`
  1935  	// Enabled: Optional. Defines whether the scheduled backup is enabled. The
  1936  	// default value is false.
  1937  	Enabled bool `json:"enabled,omitempty"`
  1938  	// LatestBackup: Output only. The details of the latest scheduled backup.
  1939  	LatestBackup *LatestBackup `json:"latestBackup,omitempty"`
  1940  	// NextScheduledTime: Output only. The time when the next backups execution is
  1941  	// scheduled to start.
  1942  	NextScheduledTime string `json:"nextScheduledTime,omitempty"`
  1943  	// TimeZone: Optional. Specifies the time zone to be used when interpreting
  1944  	// cron_schedule. Must be a time zone name from the time zone database
  1945  	// (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g.
  1946  	// America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is
  1947  	// UTC.
  1948  	TimeZone string `json:"timeZone,omitempty"`
  1949  	// ForceSendFields is a list of field names (e.g. "BackupLocation") 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. "BackupLocation") 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 *ScheduledBackup) MarshalJSON() ([]byte, error) {
  1963  	type NoMethod ScheduledBackup
  1964  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1965  }
  1966  
  1967  // Secret: A securely stored value.
  1968  type Secret struct {
  1969  	// CloudSecret: The relative resource name of a Secret Manager secret version,
  1970  	// in the following
  1971  	// form:projects/{project_number}/secrets/{secret_id}/versions/{version_id}.
  1972  	CloudSecret string `json:"cloudSecret,omitempty"`
  1973  	// ForceSendFields is a list of field names (e.g. "CloudSecret") to
  1974  	// unconditionally include in API requests. By default, fields with empty or
  1975  	// default values are omitted from API requests. See
  1976  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1977  	// details.
  1978  	ForceSendFields []string `json:"-"`
  1979  	// NullFields is a list of field names (e.g. "CloudSecret") to include in API
  1980  	// requests with the JSON null value. By default, fields with empty values are
  1981  	// omitted from API requests. See
  1982  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1983  	NullFields []string `json:"-"`
  1984  }
  1985  
  1986  func (s *Secret) MarshalJSON() ([]byte, error) {
  1987  	type NoMethod Secret
  1988  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1989  }
  1990  
  1991  // Service: A managed metastore service that serves metadata queries.
  1992  type Service struct {
  1993  	// ArtifactGcsUri: Output only. A Cloud Storage URI (starting with gs://) that
  1994  	// specifies where artifacts related to the metastore service are stored.
  1995  	ArtifactGcsUri string `json:"artifactGcsUri,omitempty"`
  1996  	// CreateTime: Output only. The time when the metastore service was created.
  1997  	CreateTime string `json:"createTime,omitempty"`
  1998  	// DatabaseType: Immutable. The database type that the Metastore service stores
  1999  	// its data.
  2000  	//
  2001  	// Possible values:
  2002  	//   "DATABASE_TYPE_UNSPECIFIED" - The DATABASE_TYPE is not set.
  2003  	//   "MYSQL" - MySQL is used to persist the metastore data.
  2004  	//   "SPANNER" - Spanner is used to persist the metastore data.
  2005  	DatabaseType string `json:"databaseType,omitempty"`
  2006  	// EncryptionConfig: Immutable. Information used to configure the Dataproc
  2007  	// Metastore service to encrypt customer data at rest. Cannot be updated.
  2008  	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
  2009  	// EndpointUri: Output only. The URI of the endpoint used to access the
  2010  	// metastore service.
  2011  	EndpointUri string `json:"endpointUri,omitempty"`
  2012  	// HiveMetastoreConfig: Configuration information specific to running Hive
  2013  	// metastore software as the metastore service.
  2014  	HiveMetastoreConfig *HiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"`
  2015  	// Labels: User-defined labels for the metastore service.
  2016  	Labels map[string]string `json:"labels,omitempty"`
  2017  	// MaintenanceWindow: The one hour maintenance window of the metastore service.
  2018  	// This specifies when the service can be restarted for maintenance purposes in
  2019  	// UTC time. Maintenance window is not needed for services with the SPANNER
  2020  	// database type.
  2021  	MaintenanceWindow *MaintenanceWindow `json:"maintenanceWindow,omitempty"`
  2022  	// MetadataIntegration: Optional. The setting that defines how metastore
  2023  	// metadata should be integrated with external services and systems.
  2024  	MetadataIntegration *MetadataIntegration `json:"metadataIntegration,omitempty"`
  2025  	// MetadataManagementActivity: Output only. The metadata management activities
  2026  	// of the metastore service.
  2027  	MetadataManagementActivity *MetadataManagementActivity `json:"metadataManagementActivity,omitempty"`
  2028  	// Name: Immutable. The relative resource name of the metastore service, in the
  2029  	// following
  2030  	// format:projects/{project_number}/locations/{location_id}/services/{service_id
  2031  	// }.
  2032  	Name string `json:"name,omitempty"`
  2033  	// Network: Immutable. The relative resource name of the VPC network on which
  2034  	// the instance can be accessed. It is specified in the following
  2035  	// form:projects/{project_number}/global/networks/{network_id}.
  2036  	Network string `json:"network,omitempty"`
  2037  	// NetworkConfig: The configuration specifying the network settings for the
  2038  	// Dataproc Metastore service.
  2039  	NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"`
  2040  	// Port: The TCP port at which the metastore service is reached. Default: 9083.
  2041  	Port int64 `json:"port,omitempty"`
  2042  	// ReleaseChannel: Immutable. The release channel of the service. If
  2043  	// unspecified, defaults to STABLE.
  2044  	//
  2045  	// Possible values:
  2046  	//   "RELEASE_CHANNEL_UNSPECIFIED" - Release channel is not specified.
  2047  	//   "CANARY" - The CANARY release channel contains the newest features, which
  2048  	// may be unstable and subject to unresolved issues with no known workarounds.
  2049  	// Services using the CANARY release channel are not subject to any SLAs.
  2050  	//   "STABLE" - The STABLE release channel contains features that are
  2051  	// considered stable and have been validated for production use.
  2052  	ReleaseChannel string `json:"releaseChannel,omitempty"`
  2053  	// ScalingConfig: Scaling configuration of the metastore service.
  2054  	ScalingConfig *ScalingConfig `json:"scalingConfig,omitempty"`
  2055  	// ScheduledBackup: Optional. The configuration of scheduled backup for the
  2056  	// metastore service.
  2057  	ScheduledBackup *ScheduledBackup `json:"scheduledBackup,omitempty"`
  2058  	// State: Output only. The current state of the metastore service.
  2059  	//
  2060  	// Possible values:
  2061  	//   "STATE_UNSPECIFIED" - The state of the metastore service is unknown.
  2062  	//   "CREATING" - The metastore service is in the process of being created.
  2063  	//   "ACTIVE" - The metastore service is running and ready to serve queries.
  2064  	//   "SUSPENDING" - The metastore service is entering suspension. Its
  2065  	// query-serving availability may cease unexpectedly.
  2066  	//   "SUSPENDED" - The metastore service is suspended and unable to serve
  2067  	// queries.
  2068  	//   "UPDATING" - The metastore service is being updated. It remains usable but
  2069  	// cannot accept additional update requests or be deleted at this time.
  2070  	//   "DELETING" - The metastore service is undergoing deletion. It cannot be
  2071  	// used.
  2072  	//   "ERROR" - The metastore service has encountered an error and cannot be
  2073  	// used. The metastore service should be deleted.
  2074  	State string `json:"state,omitempty"`
  2075  	// StateMessage: Output only. Additional information about the current state of
  2076  	// the metastore service, if available.
  2077  	StateMessage string `json:"stateMessage,omitempty"`
  2078  	// TelemetryConfig: The configuration specifying telemetry settings for the
  2079  	// Dataproc Metastore service. If unspecified defaults to JSON.
  2080  	TelemetryConfig *TelemetryConfig `json:"telemetryConfig,omitempty"`
  2081  	// Tier: The tier of the service.
  2082  	//
  2083  	// Possible values:
  2084  	//   "TIER_UNSPECIFIED" - The tier is not set.
  2085  	//   "DEVELOPER" - The developer tier provides limited scalability and no fault
  2086  	// tolerance. Good for low-cost proof-of-concept.
  2087  	//   "ENTERPRISE" - The enterprise tier provides multi-zone high availability,
  2088  	// and sufficient scalability for enterprise-level Dataproc Metastore
  2089  	// workloads.
  2090  	Tier string `json:"tier,omitempty"`
  2091  	// Uid: Output only. The globally unique resource identifier of the metastore
  2092  	// service.
  2093  	Uid string `json:"uid,omitempty"`
  2094  	// UpdateTime: Output only. The time when the metastore service was last
  2095  	// updated.
  2096  	UpdateTime string `json:"updateTime,omitempty"`
  2097  
  2098  	// ServerResponse contains the HTTP response code and headers from the server.
  2099  	googleapi.ServerResponse `json:"-"`
  2100  	// ForceSendFields is a list of field names (e.g. "ArtifactGcsUri") to
  2101  	// unconditionally include in API requests. By default, fields with empty or
  2102  	// default values are omitted from API requests. See
  2103  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2104  	// details.
  2105  	ForceSendFields []string `json:"-"`
  2106  	// NullFields is a list of field names (e.g. "ArtifactGcsUri") to include in
  2107  	// API requests with the JSON null value. By default, fields with empty values
  2108  	// are omitted from API requests. See
  2109  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2110  	NullFields []string `json:"-"`
  2111  }
  2112  
  2113  func (s *Service) MarshalJSON() ([]byte, error) {
  2114  	type NoMethod Service
  2115  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2116  }
  2117  
  2118  // SetIamPolicyRequest: Request message for SetIamPolicy method.
  2119  type SetIamPolicyRequest struct {
  2120  	// Policy: REQUIRED: The complete policy to be applied to the resource. The
  2121  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  2122  	// policy but certain Google Cloud services (such as Projects) might reject
  2123  	// them.
  2124  	Policy *Policy `json:"policy,omitempty"`
  2125  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  2126  	// modify. Only the fields in the mask will be modified. If no mask is
  2127  	// provided, the following default mask is used:paths: "bindings, etag"
  2128  	UpdateMask string `json:"updateMask,omitempty"`
  2129  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  2130  	// include in API requests. By default, fields with empty or default values are
  2131  	// omitted from API requests. See
  2132  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2133  	// details.
  2134  	ForceSendFields []string `json:"-"`
  2135  	// NullFields is a list of field names (e.g. "Policy") to include in API
  2136  	// requests with the JSON null value. By default, fields with empty values are
  2137  	// omitted from API requests. See
  2138  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2139  	NullFields []string `json:"-"`
  2140  }
  2141  
  2142  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  2143  	type NoMethod SetIamPolicyRequest
  2144  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2145  }
  2146  
  2147  // Status: The Status type defines a logical error model that is suitable for
  2148  // different programming environments, including REST APIs and RPC APIs. It is
  2149  // used by gRPC (https://github.com/grpc). Each Status message contains three
  2150  // pieces of data: error code, error message, and error details.You can find
  2151  // out more about this error model and how to work with it in the API Design
  2152  // Guide (https://cloud.google.com/apis/design/errors).
  2153  type Status struct {
  2154  	// Code: The status code, which should be an enum value of google.rpc.Code.
  2155  	Code int64 `json:"code,omitempty"`
  2156  	// Details: A list of messages that carry the error details. There is a common
  2157  	// set of message types for APIs to use.
  2158  	Details []googleapi.RawMessage `json:"details,omitempty"`
  2159  	// Message: A developer-facing error message, which should be in English. Any
  2160  	// user-facing error message should be localized and sent in the
  2161  	// google.rpc.Status.details field, or localized by the client.
  2162  	Message string `json:"message,omitempty"`
  2163  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  2164  	// include in API requests. By default, fields with empty or default values are
  2165  	// omitted from API requests. See
  2166  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2167  	// details.
  2168  	ForceSendFields []string `json:"-"`
  2169  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  2170  	// with the JSON null value. By default, fields with empty values are omitted
  2171  	// from API requests. See
  2172  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2173  	NullFields []string `json:"-"`
  2174  }
  2175  
  2176  func (s *Status) MarshalJSON() ([]byte, error) {
  2177  	type NoMethod Status
  2178  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2179  }
  2180  
  2181  // TelemetryConfig: Telemetry Configuration for the Dataproc Metastore service.
  2182  type TelemetryConfig struct {
  2183  	// LogFormat: The output format of the Dataproc Metastore service's logs.
  2184  	//
  2185  	// Possible values:
  2186  	//   "LOG_FORMAT_UNSPECIFIED" - The LOG_FORMAT is not set.
  2187  	//   "LEGACY" - Logging output uses the legacy textPayload format.
  2188  	//   "JSON" - Logging output uses the jsonPayload format.
  2189  	LogFormat string `json:"logFormat,omitempty"`
  2190  	// ForceSendFields is a list of field names (e.g. "LogFormat") to
  2191  	// unconditionally include in API requests. By default, fields with empty or
  2192  	// default values are omitted from API requests. See
  2193  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2194  	// details.
  2195  	ForceSendFields []string `json:"-"`
  2196  	// NullFields is a list of field names (e.g. "LogFormat") to include in API
  2197  	// requests with the JSON null value. By default, fields with empty values are
  2198  	// omitted from API requests. See
  2199  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2200  	NullFields []string `json:"-"`
  2201  }
  2202  
  2203  func (s *TelemetryConfig) MarshalJSON() ([]byte, error) {
  2204  	type NoMethod TelemetryConfig
  2205  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2206  }
  2207  
  2208  // TestIamPermissionsRequest: Request message for TestIamPermissions method.
  2209  type TestIamPermissionsRequest struct {
  2210  	// Permissions: The set of permissions to check for the resource. Permissions
  2211  	// with wildcards (such as * or storage.*) are not allowed. For more
  2212  	// information see IAM Overview
  2213  	// (https://cloud.google.com/iam/docs/overview#permissions).
  2214  	Permissions []string `json:"permissions,omitempty"`
  2215  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2216  	// unconditionally include in API requests. By default, fields with empty or
  2217  	// default values are omitted from API requests. See
  2218  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2219  	// details.
  2220  	ForceSendFields []string `json:"-"`
  2221  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2222  	// requests with the JSON null value. By default, fields with empty values are
  2223  	// omitted from API requests. See
  2224  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2225  	NullFields []string `json:"-"`
  2226  }
  2227  
  2228  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  2229  	type NoMethod TestIamPermissionsRequest
  2230  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2231  }
  2232  
  2233  // TestIamPermissionsResponse: Response message for TestIamPermissions method.
  2234  type TestIamPermissionsResponse struct {
  2235  	// Permissions: A subset of TestPermissionsRequest.permissions that the caller
  2236  	// is allowed.
  2237  	Permissions []string `json:"permissions,omitempty"`
  2238  
  2239  	// ServerResponse contains the HTTP response code and headers from the server.
  2240  	googleapi.ServerResponse `json:"-"`
  2241  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  2242  	// unconditionally include in API requests. By default, fields with empty or
  2243  	// default values are omitted from API requests. See
  2244  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2245  	// details.
  2246  	ForceSendFields []string `json:"-"`
  2247  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  2248  	// requests with the JSON null value. By default, fields with empty values are
  2249  	// omitted from API requests. See
  2250  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2251  	NullFields []string `json:"-"`
  2252  }
  2253  
  2254  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  2255  	type NoMethod TestIamPermissionsResponse
  2256  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2257  }
  2258  
  2259  type ProjectsLocationsGetCall struct {
  2260  	s            *APIService
  2261  	name         string
  2262  	urlParams_   gensupport.URLParams
  2263  	ifNoneMatch_ string
  2264  	ctx_         context.Context
  2265  	header_      http.Header
  2266  }
  2267  
  2268  // Get: Gets information about a location.
  2269  //
  2270  // - name: Resource name for the location.
  2271  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  2272  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2273  	c.name = name
  2274  	return c
  2275  }
  2276  
  2277  // Fields allows partial responses to be retrieved. See
  2278  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2279  // details.
  2280  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  2281  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2282  	return c
  2283  }
  2284  
  2285  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2286  // object's ETag matches the given value. This is useful for getting updates
  2287  // only after the object has changed since the last request.
  2288  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  2289  	c.ifNoneMatch_ = entityTag
  2290  	return c
  2291  }
  2292  
  2293  // Context sets the context to be used in this call's Do method.
  2294  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  2295  	c.ctx_ = ctx
  2296  	return c
  2297  }
  2298  
  2299  // Header returns a http.Header that can be modified by the caller to add
  2300  // headers to the request.
  2301  func (c *ProjectsLocationsGetCall) Header() http.Header {
  2302  	if c.header_ == nil {
  2303  		c.header_ = make(http.Header)
  2304  	}
  2305  	return c.header_
  2306  }
  2307  
  2308  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  2309  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2310  	if c.ifNoneMatch_ != "" {
  2311  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2312  	}
  2313  	var body io.Reader = nil
  2314  	c.urlParams_.Set("alt", alt)
  2315  	c.urlParams_.Set("prettyPrint", "false")
  2316  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2317  	urls += "?" + c.urlParams_.Encode()
  2318  	req, err := http.NewRequest("GET", urls, body)
  2319  	if err != nil {
  2320  		return nil, err
  2321  	}
  2322  	req.Header = reqHeaders
  2323  	googleapi.Expand(req.URL, map[string]string{
  2324  		"name": c.name,
  2325  	})
  2326  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2327  }
  2328  
  2329  // Do executes the "metastore.projects.locations.get" call.
  2330  // Any non-2xx status code is an error. Response headers are in either
  2331  // *Location.ServerResponse.Header or (if a response was returned at all) in
  2332  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2333  // whether the returned error was because http.StatusNotModified was returned.
  2334  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  2335  	gensupport.SetOptions(c.urlParams_, opts...)
  2336  	res, err := c.doRequest("json")
  2337  	if res != nil && res.StatusCode == http.StatusNotModified {
  2338  		if res.Body != nil {
  2339  			res.Body.Close()
  2340  		}
  2341  		return nil, gensupport.WrapError(&googleapi.Error{
  2342  			Code:   res.StatusCode,
  2343  			Header: res.Header,
  2344  		})
  2345  	}
  2346  	if err != nil {
  2347  		return nil, err
  2348  	}
  2349  	defer googleapi.CloseBody(res)
  2350  	if err := googleapi.CheckResponse(res); err != nil {
  2351  		return nil, gensupport.WrapError(err)
  2352  	}
  2353  	ret := &Location{
  2354  		ServerResponse: googleapi.ServerResponse{
  2355  			Header:         res.Header,
  2356  			HTTPStatusCode: res.StatusCode,
  2357  		},
  2358  	}
  2359  	target := &ret
  2360  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2361  		return nil, err
  2362  	}
  2363  	return ret, nil
  2364  }
  2365  
  2366  type ProjectsLocationsListCall struct {
  2367  	s            *APIService
  2368  	name         string
  2369  	urlParams_   gensupport.URLParams
  2370  	ifNoneMatch_ string
  2371  	ctx_         context.Context
  2372  	header_      http.Header
  2373  }
  2374  
  2375  // List: Lists information about the supported locations for this service.
  2376  //
  2377  // - name: The resource that owns the locations collection, if applicable.
  2378  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  2379  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2380  	c.name = name
  2381  	return c
  2382  }
  2383  
  2384  // Filter sets the optional parameter "filter": A filter to narrow down results
  2385  // to a preferred subset. The filtering language accepts strings like
  2386  // "displayName=tokyo", and is documented in more detail in AIP-160
  2387  // (https://google.aip.dev/160).
  2388  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  2389  	c.urlParams_.Set("filter", filter)
  2390  	return c
  2391  }
  2392  
  2393  // PageSize sets the optional parameter "pageSize": The maximum number of
  2394  // results to return. If not set, the service selects a default.
  2395  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  2396  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2397  	return c
  2398  }
  2399  
  2400  // PageToken sets the optional parameter "pageToken": A page token received
  2401  // from the next_page_token field in the response. Send that page token to
  2402  // receive the subsequent page.
  2403  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  2404  	c.urlParams_.Set("pageToken", pageToken)
  2405  	return c
  2406  }
  2407  
  2408  // Fields allows partial responses to be retrieved. See
  2409  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2410  // details.
  2411  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  2412  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2413  	return c
  2414  }
  2415  
  2416  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2417  // object's ETag matches the given value. This is useful for getting updates
  2418  // only after the object has changed since the last request.
  2419  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  2420  	c.ifNoneMatch_ = entityTag
  2421  	return c
  2422  }
  2423  
  2424  // Context sets the context to be used in this call's Do method.
  2425  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  2426  	c.ctx_ = ctx
  2427  	return c
  2428  }
  2429  
  2430  // Header returns a http.Header that can be modified by the caller to add
  2431  // headers to the request.
  2432  func (c *ProjectsLocationsListCall) Header() http.Header {
  2433  	if c.header_ == nil {
  2434  		c.header_ = make(http.Header)
  2435  	}
  2436  	return c.header_
  2437  }
  2438  
  2439  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  2440  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2441  	if c.ifNoneMatch_ != "" {
  2442  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2443  	}
  2444  	var body io.Reader = nil
  2445  	c.urlParams_.Set("alt", alt)
  2446  	c.urlParams_.Set("prettyPrint", "false")
  2447  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  2448  	urls += "?" + c.urlParams_.Encode()
  2449  	req, err := http.NewRequest("GET", urls, body)
  2450  	if err != nil {
  2451  		return nil, err
  2452  	}
  2453  	req.Header = reqHeaders
  2454  	googleapi.Expand(req.URL, map[string]string{
  2455  		"name": c.name,
  2456  	})
  2457  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2458  }
  2459  
  2460  // Do executes the "metastore.projects.locations.list" call.
  2461  // Any non-2xx status code is an error. Response headers are in either
  2462  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  2463  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2464  // check whether the returned error was because http.StatusNotModified was
  2465  // returned.
  2466  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  2467  	gensupport.SetOptions(c.urlParams_, opts...)
  2468  	res, err := c.doRequest("json")
  2469  	if res != nil && res.StatusCode == http.StatusNotModified {
  2470  		if res.Body != nil {
  2471  			res.Body.Close()
  2472  		}
  2473  		return nil, gensupport.WrapError(&googleapi.Error{
  2474  			Code:   res.StatusCode,
  2475  			Header: res.Header,
  2476  		})
  2477  	}
  2478  	if err != nil {
  2479  		return nil, err
  2480  	}
  2481  	defer googleapi.CloseBody(res)
  2482  	if err := googleapi.CheckResponse(res); err != nil {
  2483  		return nil, gensupport.WrapError(err)
  2484  	}
  2485  	ret := &ListLocationsResponse{
  2486  		ServerResponse: googleapi.ServerResponse{
  2487  			Header:         res.Header,
  2488  			HTTPStatusCode: res.StatusCode,
  2489  		},
  2490  	}
  2491  	target := &ret
  2492  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2493  		return nil, err
  2494  	}
  2495  	return ret, nil
  2496  }
  2497  
  2498  // Pages invokes f for each page of results.
  2499  // A non-nil error returned from f will halt the iteration.
  2500  // The provided context supersedes any context provided to the Context method.
  2501  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  2502  	c.ctx_ = ctx
  2503  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2504  	for {
  2505  		x, err := c.Do()
  2506  		if err != nil {
  2507  			return err
  2508  		}
  2509  		if err := f(x); err != nil {
  2510  			return err
  2511  		}
  2512  		if x.NextPageToken == "" {
  2513  			return nil
  2514  		}
  2515  		c.PageToken(x.NextPageToken)
  2516  	}
  2517  }
  2518  
  2519  type ProjectsLocationsFederationsCreateCall struct {
  2520  	s          *APIService
  2521  	parent     string
  2522  	federation *Federation
  2523  	urlParams_ gensupport.URLParams
  2524  	ctx_       context.Context
  2525  	header_    http.Header
  2526  }
  2527  
  2528  // Create: Creates a metastore federation in a project and location.
  2529  //
  2530  //   - parent: The relative resource name of the location in which to create a
  2531  //     federation service, in the following
  2532  //     form:projects/{project_number}/locations/{location_id}.
  2533  func (r *ProjectsLocationsFederationsService) Create(parent string, federation *Federation) *ProjectsLocationsFederationsCreateCall {
  2534  	c := &ProjectsLocationsFederationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2535  	c.parent = parent
  2536  	c.federation = federation
  2537  	return c
  2538  }
  2539  
  2540  // FederationId sets the optional parameter "federationId": Required. The ID of
  2541  // the metastore federation, which is used as the final component of the
  2542  // metastore federation's name.This value must be between 2 and 63 characters
  2543  // long inclusive, begin with a letter, end with a letter or number, and
  2544  // consist of alpha-numeric ASCII characters or hyphens.
  2545  func (c *ProjectsLocationsFederationsCreateCall) FederationId(federationId string) *ProjectsLocationsFederationsCreateCall {
  2546  	c.urlParams_.Set("federationId", federationId)
  2547  	return c
  2548  }
  2549  
  2550  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  2551  // unique request ID to allow the server to ignore the request if it has
  2552  // completed. The server will ignore subsequent requests that provide a
  2553  // duplicate request ID for at least 60 minutes after the first request.For
  2554  // example, if an initial request times out, followed by another request with
  2555  // the same request ID, the server ignores the second request to prevent the
  2556  // creation of duplicate commitments.The request ID must be a valid UUID
  2557  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  2558  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  2559  func (c *ProjectsLocationsFederationsCreateCall) RequestId(requestId string) *ProjectsLocationsFederationsCreateCall {
  2560  	c.urlParams_.Set("requestId", requestId)
  2561  	return c
  2562  }
  2563  
  2564  // Fields allows partial responses to be retrieved. See
  2565  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2566  // details.
  2567  func (c *ProjectsLocationsFederationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsCreateCall {
  2568  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2569  	return c
  2570  }
  2571  
  2572  // Context sets the context to be used in this call's Do method.
  2573  func (c *ProjectsLocationsFederationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFederationsCreateCall {
  2574  	c.ctx_ = ctx
  2575  	return c
  2576  }
  2577  
  2578  // Header returns a http.Header that can be modified by the caller to add
  2579  // headers to the request.
  2580  func (c *ProjectsLocationsFederationsCreateCall) Header() http.Header {
  2581  	if c.header_ == nil {
  2582  		c.header_ = make(http.Header)
  2583  	}
  2584  	return c.header_
  2585  }
  2586  
  2587  func (c *ProjectsLocationsFederationsCreateCall) doRequest(alt string) (*http.Response, error) {
  2588  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2589  	var body io.Reader = nil
  2590  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.federation)
  2591  	if err != nil {
  2592  		return nil, err
  2593  	}
  2594  	c.urlParams_.Set("alt", alt)
  2595  	c.urlParams_.Set("prettyPrint", "false")
  2596  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/federations")
  2597  	urls += "?" + c.urlParams_.Encode()
  2598  	req, err := http.NewRequest("POST", urls, body)
  2599  	if err != nil {
  2600  		return nil, err
  2601  	}
  2602  	req.Header = reqHeaders
  2603  	googleapi.Expand(req.URL, map[string]string{
  2604  		"parent": c.parent,
  2605  	})
  2606  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2607  }
  2608  
  2609  // Do executes the "metastore.projects.locations.federations.create" call.
  2610  // Any non-2xx status code is an error. Response headers are in either
  2611  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2612  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2613  // whether the returned error was because http.StatusNotModified was returned.
  2614  func (c *ProjectsLocationsFederationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2615  	gensupport.SetOptions(c.urlParams_, opts...)
  2616  	res, err := c.doRequest("json")
  2617  	if res != nil && res.StatusCode == http.StatusNotModified {
  2618  		if res.Body != nil {
  2619  			res.Body.Close()
  2620  		}
  2621  		return nil, gensupport.WrapError(&googleapi.Error{
  2622  			Code:   res.StatusCode,
  2623  			Header: res.Header,
  2624  		})
  2625  	}
  2626  	if err != nil {
  2627  		return nil, err
  2628  	}
  2629  	defer googleapi.CloseBody(res)
  2630  	if err := googleapi.CheckResponse(res); err != nil {
  2631  		return nil, gensupport.WrapError(err)
  2632  	}
  2633  	ret := &Operation{
  2634  		ServerResponse: googleapi.ServerResponse{
  2635  			Header:         res.Header,
  2636  			HTTPStatusCode: res.StatusCode,
  2637  		},
  2638  	}
  2639  	target := &ret
  2640  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2641  		return nil, err
  2642  	}
  2643  	return ret, nil
  2644  }
  2645  
  2646  type ProjectsLocationsFederationsDeleteCall struct {
  2647  	s          *APIService
  2648  	name       string
  2649  	urlParams_ gensupport.URLParams
  2650  	ctx_       context.Context
  2651  	header_    http.Header
  2652  }
  2653  
  2654  // Delete: Deletes a single federation.
  2655  //
  2656  //   - name: The relative resource name of the metastore federation to delete, in
  2657  //     the following
  2658  //     form:projects/{project_number}/locations/{location_id}/federations/{federat
  2659  //     ion_id}.
  2660  func (r *ProjectsLocationsFederationsService) Delete(name string) *ProjectsLocationsFederationsDeleteCall {
  2661  	c := &ProjectsLocationsFederationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2662  	c.name = name
  2663  	return c
  2664  }
  2665  
  2666  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  2667  // unique request ID to allow the server to ignore the request if it has
  2668  // completed. The server will ignore subsequent requests that provide a
  2669  // duplicate request ID for at least 60 minutes after the first request.For
  2670  // example, if an initial request times out, followed by another request with
  2671  // the same request ID, the server ignores the second request to prevent the
  2672  // creation of duplicate commitments.The request ID must be a valid UUID
  2673  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  2674  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  2675  func (c *ProjectsLocationsFederationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFederationsDeleteCall {
  2676  	c.urlParams_.Set("requestId", requestId)
  2677  	return c
  2678  }
  2679  
  2680  // Fields allows partial responses to be retrieved. See
  2681  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2682  // details.
  2683  func (c *ProjectsLocationsFederationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsDeleteCall {
  2684  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2685  	return c
  2686  }
  2687  
  2688  // Context sets the context to be used in this call's Do method.
  2689  func (c *ProjectsLocationsFederationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFederationsDeleteCall {
  2690  	c.ctx_ = ctx
  2691  	return c
  2692  }
  2693  
  2694  // Header returns a http.Header that can be modified by the caller to add
  2695  // headers to the request.
  2696  func (c *ProjectsLocationsFederationsDeleteCall) Header() http.Header {
  2697  	if c.header_ == nil {
  2698  		c.header_ = make(http.Header)
  2699  	}
  2700  	return c.header_
  2701  }
  2702  
  2703  func (c *ProjectsLocationsFederationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2704  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2705  	var body io.Reader = nil
  2706  	c.urlParams_.Set("alt", alt)
  2707  	c.urlParams_.Set("prettyPrint", "false")
  2708  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2709  	urls += "?" + c.urlParams_.Encode()
  2710  	req, err := http.NewRequest("DELETE", urls, body)
  2711  	if err != nil {
  2712  		return nil, err
  2713  	}
  2714  	req.Header = reqHeaders
  2715  	googleapi.Expand(req.URL, map[string]string{
  2716  		"name": c.name,
  2717  	})
  2718  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2719  }
  2720  
  2721  // Do executes the "metastore.projects.locations.federations.delete" call.
  2722  // Any non-2xx status code is an error. Response headers are in either
  2723  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  2724  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2725  // whether the returned error was because http.StatusNotModified was returned.
  2726  func (c *ProjectsLocationsFederationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2727  	gensupport.SetOptions(c.urlParams_, opts...)
  2728  	res, err := c.doRequest("json")
  2729  	if res != nil && res.StatusCode == http.StatusNotModified {
  2730  		if res.Body != nil {
  2731  			res.Body.Close()
  2732  		}
  2733  		return nil, gensupport.WrapError(&googleapi.Error{
  2734  			Code:   res.StatusCode,
  2735  			Header: res.Header,
  2736  		})
  2737  	}
  2738  	if err != nil {
  2739  		return nil, err
  2740  	}
  2741  	defer googleapi.CloseBody(res)
  2742  	if err := googleapi.CheckResponse(res); err != nil {
  2743  		return nil, gensupport.WrapError(err)
  2744  	}
  2745  	ret := &Operation{
  2746  		ServerResponse: googleapi.ServerResponse{
  2747  			Header:         res.Header,
  2748  			HTTPStatusCode: res.StatusCode,
  2749  		},
  2750  	}
  2751  	target := &ret
  2752  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2753  		return nil, err
  2754  	}
  2755  	return ret, nil
  2756  }
  2757  
  2758  type ProjectsLocationsFederationsGetCall struct {
  2759  	s            *APIService
  2760  	name         string
  2761  	urlParams_   gensupport.URLParams
  2762  	ifNoneMatch_ string
  2763  	ctx_         context.Context
  2764  	header_      http.Header
  2765  }
  2766  
  2767  // Get: Gets the details of a single federation.
  2768  //
  2769  //   - name: The relative resource name of the metastore federation to retrieve,
  2770  //     in the following
  2771  //     form:projects/{project_number}/locations/{location_id}/federations/{federat
  2772  //     ion_id}.
  2773  func (r *ProjectsLocationsFederationsService) Get(name string) *ProjectsLocationsFederationsGetCall {
  2774  	c := &ProjectsLocationsFederationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2775  	c.name = name
  2776  	return c
  2777  }
  2778  
  2779  // Fields allows partial responses to be retrieved. See
  2780  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2781  // details.
  2782  func (c *ProjectsLocationsFederationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetCall {
  2783  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2784  	return c
  2785  }
  2786  
  2787  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2788  // object's ETag matches the given value. This is useful for getting updates
  2789  // only after the object has changed since the last request.
  2790  func (c *ProjectsLocationsFederationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetCall {
  2791  	c.ifNoneMatch_ = entityTag
  2792  	return c
  2793  }
  2794  
  2795  // Context sets the context to be used in this call's Do method.
  2796  func (c *ProjectsLocationsFederationsGetCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetCall {
  2797  	c.ctx_ = ctx
  2798  	return c
  2799  }
  2800  
  2801  // Header returns a http.Header that can be modified by the caller to add
  2802  // headers to the request.
  2803  func (c *ProjectsLocationsFederationsGetCall) Header() http.Header {
  2804  	if c.header_ == nil {
  2805  		c.header_ = make(http.Header)
  2806  	}
  2807  	return c.header_
  2808  }
  2809  
  2810  func (c *ProjectsLocationsFederationsGetCall) doRequest(alt string) (*http.Response, error) {
  2811  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2812  	if c.ifNoneMatch_ != "" {
  2813  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2814  	}
  2815  	var body io.Reader = nil
  2816  	c.urlParams_.Set("alt", alt)
  2817  	c.urlParams_.Set("prettyPrint", "false")
  2818  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  2819  	urls += "?" + c.urlParams_.Encode()
  2820  	req, err := http.NewRequest("GET", urls, body)
  2821  	if err != nil {
  2822  		return nil, err
  2823  	}
  2824  	req.Header = reqHeaders
  2825  	googleapi.Expand(req.URL, map[string]string{
  2826  		"name": c.name,
  2827  	})
  2828  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2829  }
  2830  
  2831  // Do executes the "metastore.projects.locations.federations.get" call.
  2832  // Any non-2xx status code is an error. Response headers are in either
  2833  // *Federation.ServerResponse.Header or (if a response was returned at all) in
  2834  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2835  // whether the returned error was because http.StatusNotModified was returned.
  2836  func (c *ProjectsLocationsFederationsGetCall) Do(opts ...googleapi.CallOption) (*Federation, error) {
  2837  	gensupport.SetOptions(c.urlParams_, opts...)
  2838  	res, err := c.doRequest("json")
  2839  	if res != nil && res.StatusCode == http.StatusNotModified {
  2840  		if res.Body != nil {
  2841  			res.Body.Close()
  2842  		}
  2843  		return nil, gensupport.WrapError(&googleapi.Error{
  2844  			Code:   res.StatusCode,
  2845  			Header: res.Header,
  2846  		})
  2847  	}
  2848  	if err != nil {
  2849  		return nil, err
  2850  	}
  2851  	defer googleapi.CloseBody(res)
  2852  	if err := googleapi.CheckResponse(res); err != nil {
  2853  		return nil, gensupport.WrapError(err)
  2854  	}
  2855  	ret := &Federation{
  2856  		ServerResponse: googleapi.ServerResponse{
  2857  			Header:         res.Header,
  2858  			HTTPStatusCode: res.StatusCode,
  2859  		},
  2860  	}
  2861  	target := &ret
  2862  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2863  		return nil, err
  2864  	}
  2865  	return ret, nil
  2866  }
  2867  
  2868  type ProjectsLocationsFederationsGetIamPolicyCall struct {
  2869  	s            *APIService
  2870  	resource     string
  2871  	urlParams_   gensupport.URLParams
  2872  	ifNoneMatch_ string
  2873  	ctx_         context.Context
  2874  	header_      http.Header
  2875  }
  2876  
  2877  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  2878  // empty policy if the resource exists and does not have a policy set.
  2879  //
  2880  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2881  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2882  //     for the appropriate value for this field.
  2883  func (r *ProjectsLocationsFederationsService) GetIamPolicy(resource string) *ProjectsLocationsFederationsGetIamPolicyCall {
  2884  	c := &ProjectsLocationsFederationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2885  	c.resource = resource
  2886  	return c
  2887  }
  2888  
  2889  // OptionsRequestedPolicyVersion sets the optional parameter
  2890  // "options.requestedPolicyVersion": The maximum policy version that will be
  2891  // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
  2892  // an invalid value will be rejected.Requests for policies with any conditional
  2893  // role bindings must specify version 3. Policies with no conditional role
  2894  // bindings may specify any valid value or leave the field unset.The policy in
  2895  // the response might use the policy version that you specified, or it might
  2896  // use a lower policy version. For example, if you specify version 3, but the
  2897  // policy has no conditional role bindings, the response uses version 1.To
  2898  // learn which resources support conditions in their IAM policies, see the IAM
  2899  // documentation
  2900  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  2901  func (c *ProjectsLocationsFederationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFederationsGetIamPolicyCall {
  2902  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  2903  	return c
  2904  }
  2905  
  2906  // Fields allows partial responses to be retrieved. See
  2907  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2908  // details.
  2909  func (c *ProjectsLocationsFederationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsGetIamPolicyCall {
  2910  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2911  	return c
  2912  }
  2913  
  2914  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2915  // object's ETag matches the given value. This is useful for getting updates
  2916  // only after the object has changed since the last request.
  2917  func (c *ProjectsLocationsFederationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsGetIamPolicyCall {
  2918  	c.ifNoneMatch_ = entityTag
  2919  	return c
  2920  }
  2921  
  2922  // Context sets the context to be used in this call's Do method.
  2923  func (c *ProjectsLocationsFederationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsGetIamPolicyCall {
  2924  	c.ctx_ = ctx
  2925  	return c
  2926  }
  2927  
  2928  // Header returns a http.Header that can be modified by the caller to add
  2929  // headers to the request.
  2930  func (c *ProjectsLocationsFederationsGetIamPolicyCall) Header() http.Header {
  2931  	if c.header_ == nil {
  2932  		c.header_ = make(http.Header)
  2933  	}
  2934  	return c.header_
  2935  }
  2936  
  2937  func (c *ProjectsLocationsFederationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2938  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2939  	if c.ifNoneMatch_ != "" {
  2940  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2941  	}
  2942  	var body io.Reader = nil
  2943  	c.urlParams_.Set("alt", alt)
  2944  	c.urlParams_.Set("prettyPrint", "false")
  2945  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  2946  	urls += "?" + c.urlParams_.Encode()
  2947  	req, err := http.NewRequest("GET", urls, body)
  2948  	if err != nil {
  2949  		return nil, err
  2950  	}
  2951  	req.Header = reqHeaders
  2952  	googleapi.Expand(req.URL, map[string]string{
  2953  		"resource": c.resource,
  2954  	})
  2955  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2956  }
  2957  
  2958  // Do executes the "metastore.projects.locations.federations.getIamPolicy" call.
  2959  // Any non-2xx status code is an error. Response headers are in either
  2960  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2961  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2962  // whether the returned error was because http.StatusNotModified was returned.
  2963  func (c *ProjectsLocationsFederationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2964  	gensupport.SetOptions(c.urlParams_, opts...)
  2965  	res, err := c.doRequest("json")
  2966  	if res != nil && res.StatusCode == http.StatusNotModified {
  2967  		if res.Body != nil {
  2968  			res.Body.Close()
  2969  		}
  2970  		return nil, gensupport.WrapError(&googleapi.Error{
  2971  			Code:   res.StatusCode,
  2972  			Header: res.Header,
  2973  		})
  2974  	}
  2975  	if err != nil {
  2976  		return nil, err
  2977  	}
  2978  	defer googleapi.CloseBody(res)
  2979  	if err := googleapi.CheckResponse(res); err != nil {
  2980  		return nil, gensupport.WrapError(err)
  2981  	}
  2982  	ret := &Policy{
  2983  		ServerResponse: googleapi.ServerResponse{
  2984  			Header:         res.Header,
  2985  			HTTPStatusCode: res.StatusCode,
  2986  		},
  2987  	}
  2988  	target := &ret
  2989  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2990  		return nil, err
  2991  	}
  2992  	return ret, nil
  2993  }
  2994  
  2995  type ProjectsLocationsFederationsListCall struct {
  2996  	s            *APIService
  2997  	parent       string
  2998  	urlParams_   gensupport.URLParams
  2999  	ifNoneMatch_ string
  3000  	ctx_         context.Context
  3001  	header_      http.Header
  3002  }
  3003  
  3004  // List: Lists federations in a project and location.
  3005  //
  3006  //   - parent: The relative resource name of the location of metastore
  3007  //     federations to list, in the following form:
  3008  //     projects/{project_number}/locations/{location_id}.
  3009  func (r *ProjectsLocationsFederationsService) List(parent string) *ProjectsLocationsFederationsListCall {
  3010  	c := &ProjectsLocationsFederationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3011  	c.parent = parent
  3012  	return c
  3013  }
  3014  
  3015  // Filter sets the optional parameter "filter": The filter to apply to list
  3016  // results.
  3017  func (c *ProjectsLocationsFederationsListCall) Filter(filter string) *ProjectsLocationsFederationsListCall {
  3018  	c.urlParams_.Set("filter", filter)
  3019  	return c
  3020  }
  3021  
  3022  // OrderBy sets the optional parameter "orderBy": Specify the ordering of
  3023  // results as described in Sorting Order
  3024  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
  3025  // specified, the results will be sorted in the default order.
  3026  func (c *ProjectsLocationsFederationsListCall) OrderBy(orderBy string) *ProjectsLocationsFederationsListCall {
  3027  	c.urlParams_.Set("orderBy", orderBy)
  3028  	return c
  3029  }
  3030  
  3031  // PageSize sets the optional parameter "pageSize": The maximum number of
  3032  // federations to return. The response may contain less than the maximum
  3033  // number. If unspecified, no more than 500 services are returned. The maximum
  3034  // value is 1000; values above 1000 are changed to 1000.
  3035  func (c *ProjectsLocationsFederationsListCall) PageSize(pageSize int64) *ProjectsLocationsFederationsListCall {
  3036  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3037  	return c
  3038  }
  3039  
  3040  // PageToken sets the optional parameter "pageToken": A page token, received
  3041  // from a previous ListFederationServices call. Provide this token to retrieve
  3042  // the subsequent page.To retrieve the first page, supply an empty page
  3043  // token.When paginating, other parameters provided to ListFederationServices
  3044  // must match the call that provided the page token.
  3045  func (c *ProjectsLocationsFederationsListCall) PageToken(pageToken string) *ProjectsLocationsFederationsListCall {
  3046  	c.urlParams_.Set("pageToken", pageToken)
  3047  	return c
  3048  }
  3049  
  3050  // Fields allows partial responses to be retrieved. See
  3051  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3052  // details.
  3053  func (c *ProjectsLocationsFederationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsListCall {
  3054  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3055  	return c
  3056  }
  3057  
  3058  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3059  // object's ETag matches the given value. This is useful for getting updates
  3060  // only after the object has changed since the last request.
  3061  func (c *ProjectsLocationsFederationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFederationsListCall {
  3062  	c.ifNoneMatch_ = entityTag
  3063  	return c
  3064  }
  3065  
  3066  // Context sets the context to be used in this call's Do method.
  3067  func (c *ProjectsLocationsFederationsListCall) Context(ctx context.Context) *ProjectsLocationsFederationsListCall {
  3068  	c.ctx_ = ctx
  3069  	return c
  3070  }
  3071  
  3072  // Header returns a http.Header that can be modified by the caller to add
  3073  // headers to the request.
  3074  func (c *ProjectsLocationsFederationsListCall) Header() http.Header {
  3075  	if c.header_ == nil {
  3076  		c.header_ = make(http.Header)
  3077  	}
  3078  	return c.header_
  3079  }
  3080  
  3081  func (c *ProjectsLocationsFederationsListCall) doRequest(alt string) (*http.Response, error) {
  3082  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3083  	if c.ifNoneMatch_ != "" {
  3084  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3085  	}
  3086  	var body io.Reader = nil
  3087  	c.urlParams_.Set("alt", alt)
  3088  	c.urlParams_.Set("prettyPrint", "false")
  3089  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/federations")
  3090  	urls += "?" + c.urlParams_.Encode()
  3091  	req, err := http.NewRequest("GET", urls, body)
  3092  	if err != nil {
  3093  		return nil, err
  3094  	}
  3095  	req.Header = reqHeaders
  3096  	googleapi.Expand(req.URL, map[string]string{
  3097  		"parent": c.parent,
  3098  	})
  3099  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3100  }
  3101  
  3102  // Do executes the "metastore.projects.locations.federations.list" call.
  3103  // Any non-2xx status code is an error. Response headers are in either
  3104  // *ListFederationsResponse.ServerResponse.Header or (if a response was
  3105  // returned at all) in error.(*googleapi.Error).Header. Use
  3106  // googleapi.IsNotModified to check whether the returned error was because
  3107  // http.StatusNotModified was returned.
  3108  func (c *ProjectsLocationsFederationsListCall) Do(opts ...googleapi.CallOption) (*ListFederationsResponse, error) {
  3109  	gensupport.SetOptions(c.urlParams_, opts...)
  3110  	res, err := c.doRequest("json")
  3111  	if res != nil && res.StatusCode == http.StatusNotModified {
  3112  		if res.Body != nil {
  3113  			res.Body.Close()
  3114  		}
  3115  		return nil, gensupport.WrapError(&googleapi.Error{
  3116  			Code:   res.StatusCode,
  3117  			Header: res.Header,
  3118  		})
  3119  	}
  3120  	if err != nil {
  3121  		return nil, err
  3122  	}
  3123  	defer googleapi.CloseBody(res)
  3124  	if err := googleapi.CheckResponse(res); err != nil {
  3125  		return nil, gensupport.WrapError(err)
  3126  	}
  3127  	ret := &ListFederationsResponse{
  3128  		ServerResponse: googleapi.ServerResponse{
  3129  			Header:         res.Header,
  3130  			HTTPStatusCode: res.StatusCode,
  3131  		},
  3132  	}
  3133  	target := &ret
  3134  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3135  		return nil, err
  3136  	}
  3137  	return ret, nil
  3138  }
  3139  
  3140  // Pages invokes f for each page of results.
  3141  // A non-nil error returned from f will halt the iteration.
  3142  // The provided context supersedes any context provided to the Context method.
  3143  func (c *ProjectsLocationsFederationsListCall) Pages(ctx context.Context, f func(*ListFederationsResponse) error) error {
  3144  	c.ctx_ = ctx
  3145  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3146  	for {
  3147  		x, err := c.Do()
  3148  		if err != nil {
  3149  			return err
  3150  		}
  3151  		if err := f(x); err != nil {
  3152  			return err
  3153  		}
  3154  		if x.NextPageToken == "" {
  3155  			return nil
  3156  		}
  3157  		c.PageToken(x.NextPageToken)
  3158  	}
  3159  }
  3160  
  3161  type ProjectsLocationsFederationsPatchCall struct {
  3162  	s          *APIService
  3163  	name       string
  3164  	federation *Federation
  3165  	urlParams_ gensupport.URLParams
  3166  	ctx_       context.Context
  3167  	header_    http.Header
  3168  }
  3169  
  3170  // Patch: Updates the fields of a federation.
  3171  //
  3172  //   - name: Immutable. The relative resource name of the federation, of the
  3173  //     form:
  3174  //     projects/{project_number}/locations/{location_id}/federations/{federation_i
  3175  //     d}`.
  3176  func (r *ProjectsLocationsFederationsService) Patch(name string, federation *Federation) *ProjectsLocationsFederationsPatchCall {
  3177  	c := &ProjectsLocationsFederationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3178  	c.name = name
  3179  	c.federation = federation
  3180  	return c
  3181  }
  3182  
  3183  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  3184  // unique request ID to allow the server to ignore the request if it has
  3185  // completed. The server will ignore subsequent requests that provide a
  3186  // duplicate request ID for at least 60 minutes after the first request.For
  3187  // example, if an initial request times out, followed by another request with
  3188  // the same request ID, the server ignores the second request to prevent the
  3189  // creation of duplicate commitments.The request ID must be a valid UUID
  3190  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  3191  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  3192  func (c *ProjectsLocationsFederationsPatchCall) RequestId(requestId string) *ProjectsLocationsFederationsPatchCall {
  3193  	c.urlParams_.Set("requestId", requestId)
  3194  	return c
  3195  }
  3196  
  3197  // UpdateMask sets the optional parameter "updateMask": Required. A field mask
  3198  // used to specify the fields to be overwritten in the metastore federation
  3199  // resource by the update. Fields specified in the update_mask are relative to
  3200  // the resource (not to the full request). A field is overwritten if it is in
  3201  // the mask.
  3202  func (c *ProjectsLocationsFederationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFederationsPatchCall {
  3203  	c.urlParams_.Set("updateMask", updateMask)
  3204  	return c
  3205  }
  3206  
  3207  // Fields allows partial responses to be retrieved. See
  3208  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3209  // details.
  3210  func (c *ProjectsLocationsFederationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsPatchCall {
  3211  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3212  	return c
  3213  }
  3214  
  3215  // Context sets the context to be used in this call's Do method.
  3216  func (c *ProjectsLocationsFederationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFederationsPatchCall {
  3217  	c.ctx_ = ctx
  3218  	return c
  3219  }
  3220  
  3221  // Header returns a http.Header that can be modified by the caller to add
  3222  // headers to the request.
  3223  func (c *ProjectsLocationsFederationsPatchCall) Header() http.Header {
  3224  	if c.header_ == nil {
  3225  		c.header_ = make(http.Header)
  3226  	}
  3227  	return c.header_
  3228  }
  3229  
  3230  func (c *ProjectsLocationsFederationsPatchCall) doRequest(alt string) (*http.Response, error) {
  3231  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3232  	var body io.Reader = nil
  3233  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.federation)
  3234  	if err != nil {
  3235  		return nil, err
  3236  	}
  3237  	c.urlParams_.Set("alt", alt)
  3238  	c.urlParams_.Set("prettyPrint", "false")
  3239  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3240  	urls += "?" + c.urlParams_.Encode()
  3241  	req, err := http.NewRequest("PATCH", urls, body)
  3242  	if err != nil {
  3243  		return nil, err
  3244  	}
  3245  	req.Header = reqHeaders
  3246  	googleapi.Expand(req.URL, map[string]string{
  3247  		"name": c.name,
  3248  	})
  3249  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3250  }
  3251  
  3252  // Do executes the "metastore.projects.locations.federations.patch" call.
  3253  // Any non-2xx status code is an error. Response headers are in either
  3254  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3255  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3256  // whether the returned error was because http.StatusNotModified was returned.
  3257  func (c *ProjectsLocationsFederationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3258  	gensupport.SetOptions(c.urlParams_, opts...)
  3259  	res, err := c.doRequest("json")
  3260  	if res != nil && res.StatusCode == http.StatusNotModified {
  3261  		if res.Body != nil {
  3262  			res.Body.Close()
  3263  		}
  3264  		return nil, gensupport.WrapError(&googleapi.Error{
  3265  			Code:   res.StatusCode,
  3266  			Header: res.Header,
  3267  		})
  3268  	}
  3269  	if err != nil {
  3270  		return nil, err
  3271  	}
  3272  	defer googleapi.CloseBody(res)
  3273  	if err := googleapi.CheckResponse(res); err != nil {
  3274  		return nil, gensupport.WrapError(err)
  3275  	}
  3276  	ret := &Operation{
  3277  		ServerResponse: googleapi.ServerResponse{
  3278  			Header:         res.Header,
  3279  			HTTPStatusCode: res.StatusCode,
  3280  		},
  3281  	}
  3282  	target := &ret
  3283  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3284  		return nil, err
  3285  	}
  3286  	return ret, nil
  3287  }
  3288  
  3289  type ProjectsLocationsFederationsSetIamPolicyCall struct {
  3290  	s                   *APIService
  3291  	resource            string
  3292  	setiampolicyrequest *SetIamPolicyRequest
  3293  	urlParams_          gensupport.URLParams
  3294  	ctx_                context.Context
  3295  	header_             http.Header
  3296  }
  3297  
  3298  // SetIamPolicy: Sets the access control policy on the specified resource.
  3299  // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
  3300  // PERMISSION_DENIED errors.
  3301  //
  3302  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3303  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3304  //     for the appropriate value for this field.
  3305  func (r *ProjectsLocationsFederationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsFederationsSetIamPolicyCall {
  3306  	c := &ProjectsLocationsFederationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3307  	c.resource = resource
  3308  	c.setiampolicyrequest = setiampolicyrequest
  3309  	return c
  3310  }
  3311  
  3312  // Fields allows partial responses to be retrieved. See
  3313  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3314  // details.
  3315  func (c *ProjectsLocationsFederationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsSetIamPolicyCall {
  3316  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3317  	return c
  3318  }
  3319  
  3320  // Context sets the context to be used in this call's Do method.
  3321  func (c *ProjectsLocationsFederationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFederationsSetIamPolicyCall {
  3322  	c.ctx_ = ctx
  3323  	return c
  3324  }
  3325  
  3326  // Header returns a http.Header that can be modified by the caller to add
  3327  // headers to the request.
  3328  func (c *ProjectsLocationsFederationsSetIamPolicyCall) Header() http.Header {
  3329  	if c.header_ == nil {
  3330  		c.header_ = make(http.Header)
  3331  	}
  3332  	return c.header_
  3333  }
  3334  
  3335  func (c *ProjectsLocationsFederationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3336  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3337  	var body io.Reader = nil
  3338  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  3339  	if err != nil {
  3340  		return nil, err
  3341  	}
  3342  	c.urlParams_.Set("alt", alt)
  3343  	c.urlParams_.Set("prettyPrint", "false")
  3344  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  3345  	urls += "?" + c.urlParams_.Encode()
  3346  	req, err := http.NewRequest("POST", urls, body)
  3347  	if err != nil {
  3348  		return nil, err
  3349  	}
  3350  	req.Header = reqHeaders
  3351  	googleapi.Expand(req.URL, map[string]string{
  3352  		"resource": c.resource,
  3353  	})
  3354  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3355  }
  3356  
  3357  // Do executes the "metastore.projects.locations.federations.setIamPolicy" call.
  3358  // Any non-2xx status code is an error. Response headers are in either
  3359  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  3360  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3361  // whether the returned error was because http.StatusNotModified was returned.
  3362  func (c *ProjectsLocationsFederationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  3363  	gensupport.SetOptions(c.urlParams_, opts...)
  3364  	res, err := c.doRequest("json")
  3365  	if res != nil && res.StatusCode == http.StatusNotModified {
  3366  		if res.Body != nil {
  3367  			res.Body.Close()
  3368  		}
  3369  		return nil, gensupport.WrapError(&googleapi.Error{
  3370  			Code:   res.StatusCode,
  3371  			Header: res.Header,
  3372  		})
  3373  	}
  3374  	if err != nil {
  3375  		return nil, err
  3376  	}
  3377  	defer googleapi.CloseBody(res)
  3378  	if err := googleapi.CheckResponse(res); err != nil {
  3379  		return nil, gensupport.WrapError(err)
  3380  	}
  3381  	ret := &Policy{
  3382  		ServerResponse: googleapi.ServerResponse{
  3383  			Header:         res.Header,
  3384  			HTTPStatusCode: res.StatusCode,
  3385  		},
  3386  	}
  3387  	target := &ret
  3388  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3389  		return nil, err
  3390  	}
  3391  	return ret, nil
  3392  }
  3393  
  3394  type ProjectsLocationsFederationsTestIamPermissionsCall struct {
  3395  	s                         *APIService
  3396  	resource                  string
  3397  	testiampermissionsrequest *TestIamPermissionsRequest
  3398  	urlParams_                gensupport.URLParams
  3399  	ctx_                      context.Context
  3400  	header_                   http.Header
  3401  }
  3402  
  3403  // TestIamPermissions: Returns permissions that a caller has on the specified
  3404  // resource. If the resource does not exist, this will return an empty set of
  3405  // permissions, not a NOT_FOUND error.Note: This operation is designed to be
  3406  // used for building permission-aware UIs and command-line tools, not for
  3407  // authorization checking. This operation may "fail open" without warning.
  3408  //
  3409  //   - resource: REQUIRED: The resource for which the policy detail is being
  3410  //     requested. See Resource names
  3411  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3412  //     value for this field.
  3413  func (r *ProjectsLocationsFederationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsFederationsTestIamPermissionsCall {
  3414  	c := &ProjectsLocationsFederationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3415  	c.resource = resource
  3416  	c.testiampermissionsrequest = testiampermissionsrequest
  3417  	return c
  3418  }
  3419  
  3420  // Fields allows partial responses to be retrieved. See
  3421  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3422  // details.
  3423  func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFederationsTestIamPermissionsCall {
  3424  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3425  	return c
  3426  }
  3427  
  3428  // Context sets the context to be used in this call's Do method.
  3429  func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFederationsTestIamPermissionsCall {
  3430  	c.ctx_ = ctx
  3431  	return c
  3432  }
  3433  
  3434  // Header returns a http.Header that can be modified by the caller to add
  3435  // headers to the request.
  3436  func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Header() http.Header {
  3437  	if c.header_ == nil {
  3438  		c.header_ = make(http.Header)
  3439  	}
  3440  	return c.header_
  3441  }
  3442  
  3443  func (c *ProjectsLocationsFederationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3444  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3445  	var body io.Reader = nil
  3446  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  3447  	if err != nil {
  3448  		return nil, err
  3449  	}
  3450  	c.urlParams_.Set("alt", alt)
  3451  	c.urlParams_.Set("prettyPrint", "false")
  3452  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  3453  	urls += "?" + c.urlParams_.Encode()
  3454  	req, err := http.NewRequest("POST", urls, body)
  3455  	if err != nil {
  3456  		return nil, err
  3457  	}
  3458  	req.Header = reqHeaders
  3459  	googleapi.Expand(req.URL, map[string]string{
  3460  		"resource": c.resource,
  3461  	})
  3462  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3463  }
  3464  
  3465  // Do executes the "metastore.projects.locations.federations.testIamPermissions" call.
  3466  // Any non-2xx status code is an error. Response headers are in either
  3467  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  3468  // returned at all) in error.(*googleapi.Error).Header. Use
  3469  // googleapi.IsNotModified to check whether the returned error was because
  3470  // http.StatusNotModified was returned.
  3471  func (c *ProjectsLocationsFederationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  3472  	gensupport.SetOptions(c.urlParams_, opts...)
  3473  	res, err := c.doRequest("json")
  3474  	if res != nil && res.StatusCode == http.StatusNotModified {
  3475  		if res.Body != nil {
  3476  			res.Body.Close()
  3477  		}
  3478  		return nil, gensupport.WrapError(&googleapi.Error{
  3479  			Code:   res.StatusCode,
  3480  			Header: res.Header,
  3481  		})
  3482  	}
  3483  	if err != nil {
  3484  		return nil, err
  3485  	}
  3486  	defer googleapi.CloseBody(res)
  3487  	if err := googleapi.CheckResponse(res); err != nil {
  3488  		return nil, gensupport.WrapError(err)
  3489  	}
  3490  	ret := &TestIamPermissionsResponse{
  3491  		ServerResponse: googleapi.ServerResponse{
  3492  			Header:         res.Header,
  3493  			HTTPStatusCode: res.StatusCode,
  3494  		},
  3495  	}
  3496  	target := &ret
  3497  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3498  		return nil, err
  3499  	}
  3500  	return ret, nil
  3501  }
  3502  
  3503  type ProjectsLocationsOperationsCancelCall struct {
  3504  	s                      *APIService
  3505  	name                   string
  3506  	canceloperationrequest *CancelOperationRequest
  3507  	urlParams_             gensupport.URLParams
  3508  	ctx_                   context.Context
  3509  	header_                http.Header
  3510  }
  3511  
  3512  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  3513  // server makes a best effort to cancel the operation, but success is not
  3514  // guaranteed. If the server doesn't support this method, it returns
  3515  // google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or
  3516  // other methods to check whether the cancellation succeeded or whether the
  3517  // operation completed despite cancellation. On successful cancellation, the
  3518  // operation is not deleted; instead, it becomes an operation with an
  3519  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  3520  // Code.CANCELLED.
  3521  //
  3522  // - name: The name of the operation resource to be cancelled.
  3523  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  3524  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3525  	c.name = name
  3526  	c.canceloperationrequest = canceloperationrequest
  3527  	return c
  3528  }
  3529  
  3530  // Fields allows partial responses to be retrieved. See
  3531  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3532  // details.
  3533  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  3534  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3535  	return c
  3536  }
  3537  
  3538  // Context sets the context to be used in this call's Do method.
  3539  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  3540  	c.ctx_ = ctx
  3541  	return c
  3542  }
  3543  
  3544  // Header returns a http.Header that can be modified by the caller to add
  3545  // headers to the request.
  3546  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  3547  	if c.header_ == nil {
  3548  		c.header_ = make(http.Header)
  3549  	}
  3550  	return c.header_
  3551  }
  3552  
  3553  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  3554  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3555  	var body io.Reader = nil
  3556  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  3557  	if err != nil {
  3558  		return nil, err
  3559  	}
  3560  	c.urlParams_.Set("alt", alt)
  3561  	c.urlParams_.Set("prettyPrint", "false")
  3562  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  3563  	urls += "?" + c.urlParams_.Encode()
  3564  	req, err := http.NewRequest("POST", urls, body)
  3565  	if err != nil {
  3566  		return nil, err
  3567  	}
  3568  	req.Header = reqHeaders
  3569  	googleapi.Expand(req.URL, map[string]string{
  3570  		"name": c.name,
  3571  	})
  3572  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3573  }
  3574  
  3575  // Do executes the "metastore.projects.locations.operations.cancel" call.
  3576  // Any non-2xx status code is an error. Response headers are in either
  3577  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3578  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3579  // whether the returned error was because http.StatusNotModified was returned.
  3580  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3581  	gensupport.SetOptions(c.urlParams_, opts...)
  3582  	res, err := c.doRequest("json")
  3583  	if res != nil && res.StatusCode == http.StatusNotModified {
  3584  		if res.Body != nil {
  3585  			res.Body.Close()
  3586  		}
  3587  		return nil, gensupport.WrapError(&googleapi.Error{
  3588  			Code:   res.StatusCode,
  3589  			Header: res.Header,
  3590  		})
  3591  	}
  3592  	if err != nil {
  3593  		return nil, err
  3594  	}
  3595  	defer googleapi.CloseBody(res)
  3596  	if err := googleapi.CheckResponse(res); err != nil {
  3597  		return nil, gensupport.WrapError(err)
  3598  	}
  3599  	ret := &Empty{
  3600  		ServerResponse: googleapi.ServerResponse{
  3601  			Header:         res.Header,
  3602  			HTTPStatusCode: res.StatusCode,
  3603  		},
  3604  	}
  3605  	target := &ret
  3606  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3607  		return nil, err
  3608  	}
  3609  	return ret, nil
  3610  }
  3611  
  3612  type ProjectsLocationsOperationsDeleteCall struct {
  3613  	s          *APIService
  3614  	name       string
  3615  	urlParams_ gensupport.URLParams
  3616  	ctx_       context.Context
  3617  	header_    http.Header
  3618  }
  3619  
  3620  // Delete: Deletes a long-running operation. This method indicates that the
  3621  // client is no longer interested in the operation result. It does not cancel
  3622  // the operation. If the server doesn't support this method, it returns
  3623  // google.rpc.Code.UNIMPLEMENTED.
  3624  //
  3625  // - name: The name of the operation resource to be deleted.
  3626  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  3627  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3628  	c.name = name
  3629  	return c
  3630  }
  3631  
  3632  // Fields allows partial responses to be retrieved. See
  3633  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3634  // details.
  3635  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  3636  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3637  	return c
  3638  }
  3639  
  3640  // Context sets the context to be used in this call's Do method.
  3641  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  3642  	c.ctx_ = ctx
  3643  	return c
  3644  }
  3645  
  3646  // Header returns a http.Header that can be modified by the caller to add
  3647  // headers to the request.
  3648  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  3649  	if c.header_ == nil {
  3650  		c.header_ = make(http.Header)
  3651  	}
  3652  	return c.header_
  3653  }
  3654  
  3655  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3656  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3657  	var body io.Reader = nil
  3658  	c.urlParams_.Set("alt", alt)
  3659  	c.urlParams_.Set("prettyPrint", "false")
  3660  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3661  	urls += "?" + c.urlParams_.Encode()
  3662  	req, err := http.NewRequest("DELETE", urls, body)
  3663  	if err != nil {
  3664  		return nil, err
  3665  	}
  3666  	req.Header = reqHeaders
  3667  	googleapi.Expand(req.URL, map[string]string{
  3668  		"name": c.name,
  3669  	})
  3670  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3671  }
  3672  
  3673  // Do executes the "metastore.projects.locations.operations.delete" call.
  3674  // Any non-2xx status code is an error. Response headers are in either
  3675  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  3676  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3677  // whether the returned error was because http.StatusNotModified was returned.
  3678  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3679  	gensupport.SetOptions(c.urlParams_, opts...)
  3680  	res, err := c.doRequest("json")
  3681  	if res != nil && res.StatusCode == http.StatusNotModified {
  3682  		if res.Body != nil {
  3683  			res.Body.Close()
  3684  		}
  3685  		return nil, gensupport.WrapError(&googleapi.Error{
  3686  			Code:   res.StatusCode,
  3687  			Header: res.Header,
  3688  		})
  3689  	}
  3690  	if err != nil {
  3691  		return nil, err
  3692  	}
  3693  	defer googleapi.CloseBody(res)
  3694  	if err := googleapi.CheckResponse(res); err != nil {
  3695  		return nil, gensupport.WrapError(err)
  3696  	}
  3697  	ret := &Empty{
  3698  		ServerResponse: googleapi.ServerResponse{
  3699  			Header:         res.Header,
  3700  			HTTPStatusCode: res.StatusCode,
  3701  		},
  3702  	}
  3703  	target := &ret
  3704  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3705  		return nil, err
  3706  	}
  3707  	return ret, nil
  3708  }
  3709  
  3710  type ProjectsLocationsOperationsGetCall struct {
  3711  	s            *APIService
  3712  	name         string
  3713  	urlParams_   gensupport.URLParams
  3714  	ifNoneMatch_ string
  3715  	ctx_         context.Context
  3716  	header_      http.Header
  3717  }
  3718  
  3719  // Get: Gets the latest state of a long-running operation. Clients can use this
  3720  // method to poll the operation result at intervals as recommended by the API
  3721  // service.
  3722  //
  3723  // - name: The name of the operation resource.
  3724  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  3725  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3726  	c.name = name
  3727  	return c
  3728  }
  3729  
  3730  // Fields allows partial responses to be retrieved. See
  3731  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3732  // details.
  3733  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  3734  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3735  	return c
  3736  }
  3737  
  3738  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3739  // object's ETag matches the given value. This is useful for getting updates
  3740  // only after the object has changed since the last request.
  3741  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  3742  	c.ifNoneMatch_ = entityTag
  3743  	return c
  3744  }
  3745  
  3746  // Context sets the context to be used in this call's Do method.
  3747  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  3748  	c.ctx_ = ctx
  3749  	return c
  3750  }
  3751  
  3752  // Header returns a http.Header that can be modified by the caller to add
  3753  // headers to the request.
  3754  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  3755  	if c.header_ == nil {
  3756  		c.header_ = make(http.Header)
  3757  	}
  3758  	return c.header_
  3759  }
  3760  
  3761  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  3762  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3763  	if c.ifNoneMatch_ != "" {
  3764  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3765  	}
  3766  	var body io.Reader = nil
  3767  	c.urlParams_.Set("alt", alt)
  3768  	c.urlParams_.Set("prettyPrint", "false")
  3769  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3770  	urls += "?" + c.urlParams_.Encode()
  3771  	req, err := http.NewRequest("GET", urls, body)
  3772  	if err != nil {
  3773  		return nil, err
  3774  	}
  3775  	req.Header = reqHeaders
  3776  	googleapi.Expand(req.URL, map[string]string{
  3777  		"name": c.name,
  3778  	})
  3779  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3780  }
  3781  
  3782  // Do executes the "metastore.projects.locations.operations.get" call.
  3783  // Any non-2xx status code is an error. Response headers are in either
  3784  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3785  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3786  // whether the returned error was because http.StatusNotModified was returned.
  3787  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3788  	gensupport.SetOptions(c.urlParams_, opts...)
  3789  	res, err := c.doRequest("json")
  3790  	if res != nil && res.StatusCode == http.StatusNotModified {
  3791  		if res.Body != nil {
  3792  			res.Body.Close()
  3793  		}
  3794  		return nil, gensupport.WrapError(&googleapi.Error{
  3795  			Code:   res.StatusCode,
  3796  			Header: res.Header,
  3797  		})
  3798  	}
  3799  	if err != nil {
  3800  		return nil, err
  3801  	}
  3802  	defer googleapi.CloseBody(res)
  3803  	if err := googleapi.CheckResponse(res); err != nil {
  3804  		return nil, gensupport.WrapError(err)
  3805  	}
  3806  	ret := &Operation{
  3807  		ServerResponse: googleapi.ServerResponse{
  3808  			Header:         res.Header,
  3809  			HTTPStatusCode: res.StatusCode,
  3810  		},
  3811  	}
  3812  	target := &ret
  3813  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3814  		return nil, err
  3815  	}
  3816  	return ret, nil
  3817  }
  3818  
  3819  type ProjectsLocationsOperationsListCall struct {
  3820  	s            *APIService
  3821  	name         string
  3822  	urlParams_   gensupport.URLParams
  3823  	ifNoneMatch_ string
  3824  	ctx_         context.Context
  3825  	header_      http.Header
  3826  }
  3827  
  3828  // List: Lists operations that match the specified filter in the request. If
  3829  // the server doesn't support this method, it returns UNIMPLEMENTED.
  3830  //
  3831  // - name: The name of the operation's parent resource.
  3832  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  3833  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3834  	c.name = name
  3835  	return c
  3836  }
  3837  
  3838  // Filter sets the optional parameter "filter": The standard list filter.
  3839  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  3840  	c.urlParams_.Set("filter", filter)
  3841  	return c
  3842  }
  3843  
  3844  // PageSize sets the optional parameter "pageSize": The standard list page
  3845  // size.
  3846  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  3847  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3848  	return c
  3849  }
  3850  
  3851  // PageToken sets the optional parameter "pageToken": The standard list page
  3852  // token.
  3853  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  3854  	c.urlParams_.Set("pageToken", pageToken)
  3855  	return c
  3856  }
  3857  
  3858  // Fields allows partial responses to be retrieved. See
  3859  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3860  // details.
  3861  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  3862  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3863  	return c
  3864  }
  3865  
  3866  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3867  // object's ETag matches the given value. This is useful for getting updates
  3868  // only after the object has changed since the last request.
  3869  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  3870  	c.ifNoneMatch_ = entityTag
  3871  	return c
  3872  }
  3873  
  3874  // Context sets the context to be used in this call's Do method.
  3875  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  3876  	c.ctx_ = ctx
  3877  	return c
  3878  }
  3879  
  3880  // Header returns a http.Header that can be modified by the caller to add
  3881  // headers to the request.
  3882  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  3883  	if c.header_ == nil {
  3884  		c.header_ = make(http.Header)
  3885  	}
  3886  	return c.header_
  3887  }
  3888  
  3889  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  3890  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3891  	if c.ifNoneMatch_ != "" {
  3892  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3893  	}
  3894  	var body io.Reader = nil
  3895  	c.urlParams_.Set("alt", alt)
  3896  	c.urlParams_.Set("prettyPrint", "false")
  3897  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  3898  	urls += "?" + c.urlParams_.Encode()
  3899  	req, err := http.NewRequest("GET", urls, body)
  3900  	if err != nil {
  3901  		return nil, err
  3902  	}
  3903  	req.Header = reqHeaders
  3904  	googleapi.Expand(req.URL, map[string]string{
  3905  		"name": c.name,
  3906  	})
  3907  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3908  }
  3909  
  3910  // Do executes the "metastore.projects.locations.operations.list" call.
  3911  // Any non-2xx status code is an error. Response headers are in either
  3912  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  3913  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3914  // check whether the returned error was because http.StatusNotModified was
  3915  // returned.
  3916  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  3917  	gensupport.SetOptions(c.urlParams_, opts...)
  3918  	res, err := c.doRequest("json")
  3919  	if res != nil && res.StatusCode == http.StatusNotModified {
  3920  		if res.Body != nil {
  3921  			res.Body.Close()
  3922  		}
  3923  		return nil, gensupport.WrapError(&googleapi.Error{
  3924  			Code:   res.StatusCode,
  3925  			Header: res.Header,
  3926  		})
  3927  	}
  3928  	if err != nil {
  3929  		return nil, err
  3930  	}
  3931  	defer googleapi.CloseBody(res)
  3932  	if err := googleapi.CheckResponse(res); err != nil {
  3933  		return nil, gensupport.WrapError(err)
  3934  	}
  3935  	ret := &ListOperationsResponse{
  3936  		ServerResponse: googleapi.ServerResponse{
  3937  			Header:         res.Header,
  3938  			HTTPStatusCode: res.StatusCode,
  3939  		},
  3940  	}
  3941  	target := &ret
  3942  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3943  		return nil, err
  3944  	}
  3945  	return ret, nil
  3946  }
  3947  
  3948  // Pages invokes f for each page of results.
  3949  // A non-nil error returned from f will halt the iteration.
  3950  // The provided context supersedes any context provided to the Context method.
  3951  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  3952  	c.ctx_ = ctx
  3953  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3954  	for {
  3955  		x, err := c.Do()
  3956  		if err != nil {
  3957  			return err
  3958  		}
  3959  		if err := f(x); err != nil {
  3960  			return err
  3961  		}
  3962  		if x.NextPageToken == "" {
  3963  			return nil
  3964  		}
  3965  		c.PageToken(x.NextPageToken)
  3966  	}
  3967  }
  3968  
  3969  type ProjectsLocationsServicesAlterLocationCall struct {
  3970  	s                                    *APIService
  3971  	service                              string
  3972  	altermetadataresourcelocationrequest *AlterMetadataResourceLocationRequest
  3973  	urlParams_                           gensupport.URLParams
  3974  	ctx_                                 context.Context
  3975  	header_                              http.Header
  3976  }
  3977  
  3978  // AlterLocation: Alter metadata resource location. The metadata resource can
  3979  // be a database, table, or partition. This functionality only updates the
  3980  // parent directory for the respective metadata resource and does not transfer
  3981  // any existing data to the new location.
  3982  //
  3983  //   - service: The relative resource name of the metastore service to mutate
  3984  //     metadata, in the following
  3985  //     format:projects/{project_id}/locations/{location_id}/services/{service_id}.
  3986  func (r *ProjectsLocationsServicesService) AlterLocation(service string, altermetadataresourcelocationrequest *AlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall {
  3987  	c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3988  	c.service = service
  3989  	c.altermetadataresourcelocationrequest = altermetadataresourcelocationrequest
  3990  	return c
  3991  }
  3992  
  3993  // Fields allows partial responses to be retrieved. See
  3994  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3995  // details.
  3996  func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall {
  3997  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3998  	return c
  3999  }
  4000  
  4001  // Context sets the context to be used in this call's Do method.
  4002  func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall {
  4003  	c.ctx_ = ctx
  4004  	return c
  4005  }
  4006  
  4007  // Header returns a http.Header that can be modified by the caller to add
  4008  // headers to the request.
  4009  func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header {
  4010  	if c.header_ == nil {
  4011  		c.header_ = make(http.Header)
  4012  	}
  4013  	return c.header_
  4014  }
  4015  
  4016  func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) {
  4017  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4018  	var body io.Reader = nil
  4019  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.altermetadataresourcelocationrequest)
  4020  	if err != nil {
  4021  		return nil, err
  4022  	}
  4023  	c.urlParams_.Set("alt", alt)
  4024  	c.urlParams_.Set("prettyPrint", "false")
  4025  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:alterLocation")
  4026  	urls += "?" + c.urlParams_.Encode()
  4027  	req, err := http.NewRequest("POST", urls, body)
  4028  	if err != nil {
  4029  		return nil, err
  4030  	}
  4031  	req.Header = reqHeaders
  4032  	googleapi.Expand(req.URL, map[string]string{
  4033  		"service": c.service,
  4034  	})
  4035  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4036  }
  4037  
  4038  // Do executes the "metastore.projects.locations.services.alterLocation" call.
  4039  // Any non-2xx status code is an error. Response headers are in either
  4040  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4041  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4042  // whether the returned error was because http.StatusNotModified was returned.
  4043  func (c *ProjectsLocationsServicesAlterLocationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4044  	gensupport.SetOptions(c.urlParams_, opts...)
  4045  	res, err := c.doRequest("json")
  4046  	if res != nil && res.StatusCode == http.StatusNotModified {
  4047  		if res.Body != nil {
  4048  			res.Body.Close()
  4049  		}
  4050  		return nil, gensupport.WrapError(&googleapi.Error{
  4051  			Code:   res.StatusCode,
  4052  			Header: res.Header,
  4053  		})
  4054  	}
  4055  	if err != nil {
  4056  		return nil, err
  4057  	}
  4058  	defer googleapi.CloseBody(res)
  4059  	if err := googleapi.CheckResponse(res); err != nil {
  4060  		return nil, gensupport.WrapError(err)
  4061  	}
  4062  	ret := &Operation{
  4063  		ServerResponse: googleapi.ServerResponse{
  4064  			Header:         res.Header,
  4065  			HTTPStatusCode: res.StatusCode,
  4066  		},
  4067  	}
  4068  	target := &ret
  4069  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4070  		return nil, err
  4071  	}
  4072  	return ret, nil
  4073  }
  4074  
  4075  type ProjectsLocationsServicesAlterTablePropertiesCall struct {
  4076  	s                           *APIService
  4077  	service                     string
  4078  	altertablepropertiesrequest *AlterTablePropertiesRequest
  4079  	urlParams_                  gensupport.URLParams
  4080  	ctx_                        context.Context
  4081  	header_                     http.Header
  4082  }
  4083  
  4084  // AlterTableProperties: Alter metadata table properties.
  4085  //
  4086  //   - service: The relative resource name of the Dataproc Metastore service
  4087  //     that's being used to mutate metadata table properties, in the following
  4088  //     format:projects/{project_id}/locations/{location_id}/services/{service_id}.
  4089  func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, altertablepropertiesrequest *AlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall {
  4090  	c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4091  	c.service = service
  4092  	c.altertablepropertiesrequest = altertablepropertiesrequest
  4093  	return c
  4094  }
  4095  
  4096  // Fields allows partial responses to be retrieved. See
  4097  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4098  // details.
  4099  func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall {
  4100  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4101  	return c
  4102  }
  4103  
  4104  // Context sets the context to be used in this call's Do method.
  4105  func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall {
  4106  	c.ctx_ = ctx
  4107  	return c
  4108  }
  4109  
  4110  // Header returns a http.Header that can be modified by the caller to add
  4111  // headers to the request.
  4112  func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header {
  4113  	if c.header_ == nil {
  4114  		c.header_ = make(http.Header)
  4115  	}
  4116  	return c.header_
  4117  }
  4118  
  4119  func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) {
  4120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4121  	var body io.Reader = nil
  4122  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.altertablepropertiesrequest)
  4123  	if err != nil {
  4124  		return nil, err
  4125  	}
  4126  	c.urlParams_.Set("alt", alt)
  4127  	c.urlParams_.Set("prettyPrint", "false")
  4128  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:alterTableProperties")
  4129  	urls += "?" + c.urlParams_.Encode()
  4130  	req, err := http.NewRequest("POST", urls, body)
  4131  	if err != nil {
  4132  		return nil, err
  4133  	}
  4134  	req.Header = reqHeaders
  4135  	googleapi.Expand(req.URL, map[string]string{
  4136  		"service": c.service,
  4137  	})
  4138  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4139  }
  4140  
  4141  // Do executes the "metastore.projects.locations.services.alterTableProperties" call.
  4142  // Any non-2xx status code is an error. Response headers are in either
  4143  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4144  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4145  // whether the returned error was because http.StatusNotModified was returned.
  4146  func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4147  	gensupport.SetOptions(c.urlParams_, opts...)
  4148  	res, err := c.doRequest("json")
  4149  	if res != nil && res.StatusCode == http.StatusNotModified {
  4150  		if res.Body != nil {
  4151  			res.Body.Close()
  4152  		}
  4153  		return nil, gensupport.WrapError(&googleapi.Error{
  4154  			Code:   res.StatusCode,
  4155  			Header: res.Header,
  4156  		})
  4157  	}
  4158  	if err != nil {
  4159  		return nil, err
  4160  	}
  4161  	defer googleapi.CloseBody(res)
  4162  	if err := googleapi.CheckResponse(res); err != nil {
  4163  		return nil, gensupport.WrapError(err)
  4164  	}
  4165  	ret := &Operation{
  4166  		ServerResponse: googleapi.ServerResponse{
  4167  			Header:         res.Header,
  4168  			HTTPStatusCode: res.StatusCode,
  4169  		},
  4170  	}
  4171  	target := &ret
  4172  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4173  		return nil, err
  4174  	}
  4175  	return ret, nil
  4176  }
  4177  
  4178  type ProjectsLocationsServicesCreateCall struct {
  4179  	s          *APIService
  4180  	parent     string
  4181  	service    *Service
  4182  	urlParams_ gensupport.URLParams
  4183  	ctx_       context.Context
  4184  	header_    http.Header
  4185  }
  4186  
  4187  // Create: Creates a metastore service in a project and location.
  4188  //
  4189  //   - parent: The relative resource name of the location in which to create a
  4190  //     metastore service, in the following
  4191  //     form:projects/{project_number}/locations/{location_id}.
  4192  func (r *ProjectsLocationsServicesService) Create(parent string, service *Service) *ProjectsLocationsServicesCreateCall {
  4193  	c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4194  	c.parent = parent
  4195  	c.service = service
  4196  	return c
  4197  }
  4198  
  4199  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  4200  // unique request ID to allow the server to ignore the request if it has
  4201  // completed. The server will ignore subsequent requests that provide a
  4202  // duplicate request ID for at least 60 minutes after the first request.For
  4203  // example, if an initial request times out, followed by another request with
  4204  // the same request ID, the server ignores the second request to prevent the
  4205  // creation of duplicate commitments.The request ID must be a valid UUID
  4206  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  4207  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  4208  func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall {
  4209  	c.urlParams_.Set("requestId", requestId)
  4210  	return c
  4211  }
  4212  
  4213  // ServiceId sets the optional parameter "serviceId": Required. The ID of the
  4214  // metastore service, which is used as the final component of the metastore
  4215  // service's name.This value must be between 2 and 63 characters long
  4216  // inclusive, begin with a letter, end with a letter or number, and consist of
  4217  // alpha-numeric ASCII characters or hyphens.
  4218  func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall {
  4219  	c.urlParams_.Set("serviceId", serviceId)
  4220  	return c
  4221  }
  4222  
  4223  // Fields allows partial responses to be retrieved. See
  4224  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4225  // details.
  4226  func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall {
  4227  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4228  	return c
  4229  }
  4230  
  4231  // Context sets the context to be used in this call's Do method.
  4232  func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall {
  4233  	c.ctx_ = ctx
  4234  	return c
  4235  }
  4236  
  4237  // Header returns a http.Header that can be modified by the caller to add
  4238  // headers to the request.
  4239  func (c *ProjectsLocationsServicesCreateCall) Header() http.Header {
  4240  	if c.header_ == nil {
  4241  		c.header_ = make(http.Header)
  4242  	}
  4243  	return c.header_
  4244  }
  4245  
  4246  func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) {
  4247  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4248  	var body io.Reader = nil
  4249  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  4250  	if err != nil {
  4251  		return nil, err
  4252  	}
  4253  	c.urlParams_.Set("alt", alt)
  4254  	c.urlParams_.Set("prettyPrint", "false")
  4255  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services")
  4256  	urls += "?" + c.urlParams_.Encode()
  4257  	req, err := http.NewRequest("POST", urls, body)
  4258  	if err != nil {
  4259  		return nil, err
  4260  	}
  4261  	req.Header = reqHeaders
  4262  	googleapi.Expand(req.URL, map[string]string{
  4263  		"parent": c.parent,
  4264  	})
  4265  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4266  }
  4267  
  4268  // Do executes the "metastore.projects.locations.services.create" call.
  4269  // Any non-2xx status code is an error. Response headers are in either
  4270  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4271  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4272  // whether the returned error was because http.StatusNotModified was returned.
  4273  func (c *ProjectsLocationsServicesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, 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 := &Operation{
  4293  		ServerResponse: googleapi.ServerResponse{
  4294  			Header:         res.Header,
  4295  			HTTPStatusCode: res.StatusCode,
  4296  		},
  4297  	}
  4298  	target := &ret
  4299  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4300  		return nil, err
  4301  	}
  4302  	return ret, nil
  4303  }
  4304  
  4305  type ProjectsLocationsServicesDeleteCall struct {
  4306  	s          *APIService
  4307  	name       string
  4308  	urlParams_ gensupport.URLParams
  4309  	ctx_       context.Context
  4310  	header_    http.Header
  4311  }
  4312  
  4313  // Delete: Deletes a single service.
  4314  //
  4315  //   - name: The relative resource name of the metastore service to delete, in
  4316  //     the following
  4317  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  4318  //     }.
  4319  func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall {
  4320  	c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4321  	c.name = name
  4322  	return c
  4323  }
  4324  
  4325  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  4326  // unique request ID to allow the server to ignore the request if it has
  4327  // completed. The server will ignore subsequent requests that provide a
  4328  // duplicate request ID for at least 60 minutes after the first request.For
  4329  // example, if an initial request times out, followed by another request with
  4330  // the same request ID, the server ignores the second request to prevent the
  4331  // creation of duplicate commitments.The request ID must be a valid UUID
  4332  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  4333  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  4334  func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall {
  4335  	c.urlParams_.Set("requestId", requestId)
  4336  	return c
  4337  }
  4338  
  4339  // Fields allows partial responses to be retrieved. See
  4340  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4341  // details.
  4342  func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall {
  4343  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4344  	return c
  4345  }
  4346  
  4347  // Context sets the context to be used in this call's Do method.
  4348  func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall {
  4349  	c.ctx_ = ctx
  4350  	return c
  4351  }
  4352  
  4353  // Header returns a http.Header that can be modified by the caller to add
  4354  // headers to the request.
  4355  func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header {
  4356  	if c.header_ == nil {
  4357  		c.header_ = make(http.Header)
  4358  	}
  4359  	return c.header_
  4360  }
  4361  
  4362  func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4363  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4364  	var body io.Reader = nil
  4365  	c.urlParams_.Set("alt", alt)
  4366  	c.urlParams_.Set("prettyPrint", "false")
  4367  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4368  	urls += "?" + c.urlParams_.Encode()
  4369  	req, err := http.NewRequest("DELETE", urls, body)
  4370  	if err != nil {
  4371  		return nil, err
  4372  	}
  4373  	req.Header = reqHeaders
  4374  	googleapi.Expand(req.URL, map[string]string{
  4375  		"name": c.name,
  4376  	})
  4377  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4378  }
  4379  
  4380  // Do executes the "metastore.projects.locations.services.delete" call.
  4381  // Any non-2xx status code is an error. Response headers are in either
  4382  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4383  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4384  // whether the returned error was because http.StatusNotModified was returned.
  4385  func (c *ProjectsLocationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4386  	gensupport.SetOptions(c.urlParams_, opts...)
  4387  	res, err := c.doRequest("json")
  4388  	if res != nil && res.StatusCode == http.StatusNotModified {
  4389  		if res.Body != nil {
  4390  			res.Body.Close()
  4391  		}
  4392  		return nil, gensupport.WrapError(&googleapi.Error{
  4393  			Code:   res.StatusCode,
  4394  			Header: res.Header,
  4395  		})
  4396  	}
  4397  	if err != nil {
  4398  		return nil, err
  4399  	}
  4400  	defer googleapi.CloseBody(res)
  4401  	if err := googleapi.CheckResponse(res); err != nil {
  4402  		return nil, gensupport.WrapError(err)
  4403  	}
  4404  	ret := &Operation{
  4405  		ServerResponse: googleapi.ServerResponse{
  4406  			Header:         res.Header,
  4407  			HTTPStatusCode: res.StatusCode,
  4408  		},
  4409  	}
  4410  	target := &ret
  4411  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4412  		return nil, err
  4413  	}
  4414  	return ret, nil
  4415  }
  4416  
  4417  type ProjectsLocationsServicesExportMetadataCall struct {
  4418  	s                     *APIService
  4419  	service               string
  4420  	exportmetadatarequest *ExportMetadataRequest
  4421  	urlParams_            gensupport.URLParams
  4422  	ctx_                  context.Context
  4423  	header_               http.Header
  4424  }
  4425  
  4426  // ExportMetadata: Exports metadata from a service.
  4427  //
  4428  //   - service: The relative resource name of the metastore service to run
  4429  //     export, in the following
  4430  //     form:projects/{project_id}/locations/{location_id}/services/{service_id}.
  4431  func (r *ProjectsLocationsServicesService) ExportMetadata(service string, exportmetadatarequest *ExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall {
  4432  	c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4433  	c.service = service
  4434  	c.exportmetadatarequest = exportmetadatarequest
  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 *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall {
  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 *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall {
  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 *ProjectsLocationsServicesExportMetadataCall) Header() http.Header {
  4455  	if c.header_ == nil {
  4456  		c.header_ = make(http.Header)
  4457  	}
  4458  	return c.header_
  4459  }
  4460  
  4461  func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) {
  4462  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4463  	var body io.Reader = nil
  4464  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportmetadatarequest)
  4465  	if err != nil {
  4466  		return nil, err
  4467  	}
  4468  	c.urlParams_.Set("alt", alt)
  4469  	c.urlParams_.Set("prettyPrint", "false")
  4470  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:exportMetadata")
  4471  	urls += "?" + c.urlParams_.Encode()
  4472  	req, err := http.NewRequest("POST", urls, body)
  4473  	if err != nil {
  4474  		return nil, err
  4475  	}
  4476  	req.Header = reqHeaders
  4477  	googleapi.Expand(req.URL, map[string]string{
  4478  		"service": c.service,
  4479  	})
  4480  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4481  }
  4482  
  4483  // Do executes the "metastore.projects.locations.services.exportMetadata" call.
  4484  // Any non-2xx status code is an error. Response headers are in either
  4485  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4486  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4487  // whether the returned error was because http.StatusNotModified was returned.
  4488  func (c *ProjectsLocationsServicesExportMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4489  	gensupport.SetOptions(c.urlParams_, opts...)
  4490  	res, err := c.doRequest("json")
  4491  	if res != nil && res.StatusCode == http.StatusNotModified {
  4492  		if res.Body != nil {
  4493  			res.Body.Close()
  4494  		}
  4495  		return nil, gensupport.WrapError(&googleapi.Error{
  4496  			Code:   res.StatusCode,
  4497  			Header: res.Header,
  4498  		})
  4499  	}
  4500  	if err != nil {
  4501  		return nil, err
  4502  	}
  4503  	defer googleapi.CloseBody(res)
  4504  	if err := googleapi.CheckResponse(res); err != nil {
  4505  		return nil, gensupport.WrapError(err)
  4506  	}
  4507  	ret := &Operation{
  4508  		ServerResponse: googleapi.ServerResponse{
  4509  			Header:         res.Header,
  4510  			HTTPStatusCode: res.StatusCode,
  4511  		},
  4512  	}
  4513  	target := &ret
  4514  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4515  		return nil, err
  4516  	}
  4517  	return ret, nil
  4518  }
  4519  
  4520  type ProjectsLocationsServicesGetCall struct {
  4521  	s            *APIService
  4522  	name         string
  4523  	urlParams_   gensupport.URLParams
  4524  	ifNoneMatch_ string
  4525  	ctx_         context.Context
  4526  	header_      http.Header
  4527  }
  4528  
  4529  // Get: Gets the details of a single service.
  4530  //
  4531  //   - name: The relative resource name of the metastore service to retrieve, in
  4532  //     the following
  4533  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  4534  //     }.
  4535  func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall {
  4536  	c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4537  	c.name = name
  4538  	return c
  4539  }
  4540  
  4541  // Fields allows partial responses to be retrieved. See
  4542  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4543  // details.
  4544  func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall {
  4545  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4546  	return c
  4547  }
  4548  
  4549  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4550  // object's ETag matches the given value. This is useful for getting updates
  4551  // only after the object has changed since the last request.
  4552  func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall {
  4553  	c.ifNoneMatch_ = entityTag
  4554  	return c
  4555  }
  4556  
  4557  // Context sets the context to be used in this call's Do method.
  4558  func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall {
  4559  	c.ctx_ = ctx
  4560  	return c
  4561  }
  4562  
  4563  // Header returns a http.Header that can be modified by the caller to add
  4564  // headers to the request.
  4565  func (c *ProjectsLocationsServicesGetCall) Header() http.Header {
  4566  	if c.header_ == nil {
  4567  		c.header_ = make(http.Header)
  4568  	}
  4569  	return c.header_
  4570  }
  4571  
  4572  func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) {
  4573  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4574  	if c.ifNoneMatch_ != "" {
  4575  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4576  	}
  4577  	var body io.Reader = nil
  4578  	c.urlParams_.Set("alt", alt)
  4579  	c.urlParams_.Set("prettyPrint", "false")
  4580  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4581  	urls += "?" + c.urlParams_.Encode()
  4582  	req, err := http.NewRequest("GET", urls, body)
  4583  	if err != nil {
  4584  		return nil, err
  4585  	}
  4586  	req.Header = reqHeaders
  4587  	googleapi.Expand(req.URL, map[string]string{
  4588  		"name": c.name,
  4589  	})
  4590  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4591  }
  4592  
  4593  // Do executes the "metastore.projects.locations.services.get" call.
  4594  // Any non-2xx status code is an error. Response headers are in either
  4595  // *Service.ServerResponse.Header or (if a response was returned at all) in
  4596  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4597  // whether the returned error was because http.StatusNotModified was returned.
  4598  func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*Service, error) {
  4599  	gensupport.SetOptions(c.urlParams_, opts...)
  4600  	res, err := c.doRequest("json")
  4601  	if res != nil && res.StatusCode == http.StatusNotModified {
  4602  		if res.Body != nil {
  4603  			res.Body.Close()
  4604  		}
  4605  		return nil, gensupport.WrapError(&googleapi.Error{
  4606  			Code:   res.StatusCode,
  4607  			Header: res.Header,
  4608  		})
  4609  	}
  4610  	if err != nil {
  4611  		return nil, err
  4612  	}
  4613  	defer googleapi.CloseBody(res)
  4614  	if err := googleapi.CheckResponse(res); err != nil {
  4615  		return nil, gensupport.WrapError(err)
  4616  	}
  4617  	ret := &Service{
  4618  		ServerResponse: googleapi.ServerResponse{
  4619  			Header:         res.Header,
  4620  			HTTPStatusCode: res.StatusCode,
  4621  		},
  4622  	}
  4623  	target := &ret
  4624  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4625  		return nil, err
  4626  	}
  4627  	return ret, nil
  4628  }
  4629  
  4630  type ProjectsLocationsServicesGetIamPolicyCall struct {
  4631  	s            *APIService
  4632  	resource     string
  4633  	urlParams_   gensupport.URLParams
  4634  	ifNoneMatch_ string
  4635  	ctx_         context.Context
  4636  	header_      http.Header
  4637  }
  4638  
  4639  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4640  // empty policy if the resource exists and does not have a policy set.
  4641  //
  4642  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4643  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4644  //     for the appropriate value for this field.
  4645  func (r *ProjectsLocationsServicesService) GetIamPolicy(resource string) *ProjectsLocationsServicesGetIamPolicyCall {
  4646  	c := &ProjectsLocationsServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4647  	c.resource = resource
  4648  	return c
  4649  }
  4650  
  4651  // OptionsRequestedPolicyVersion sets the optional parameter
  4652  // "options.requestedPolicyVersion": The maximum policy version that will be
  4653  // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
  4654  // an invalid value will be rejected.Requests for policies with any conditional
  4655  // role bindings must specify version 3. Policies with no conditional role
  4656  // bindings may specify any valid value or leave the field unset.The policy in
  4657  // the response might use the policy version that you specified, or it might
  4658  // use a lower policy version. For example, if you specify version 3, but the
  4659  // policy has no conditional role bindings, the response uses version 1.To
  4660  // learn which resources support conditions in their IAM policies, see the IAM
  4661  // documentation
  4662  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4663  func (c *ProjectsLocationsServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesGetIamPolicyCall {
  4664  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4665  	return c
  4666  }
  4667  
  4668  // Fields allows partial responses to be retrieved. See
  4669  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4670  // details.
  4671  func (c *ProjectsLocationsServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetIamPolicyCall {
  4672  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4673  	return c
  4674  }
  4675  
  4676  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4677  // object's ETag matches the given value. This is useful for getting updates
  4678  // only after the object has changed since the last request.
  4679  func (c *ProjectsLocationsServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetIamPolicyCall {
  4680  	c.ifNoneMatch_ = entityTag
  4681  	return c
  4682  }
  4683  
  4684  // Context sets the context to be used in this call's Do method.
  4685  func (c *ProjectsLocationsServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesGetIamPolicyCall {
  4686  	c.ctx_ = ctx
  4687  	return c
  4688  }
  4689  
  4690  // Header returns a http.Header that can be modified by the caller to add
  4691  // headers to the request.
  4692  func (c *ProjectsLocationsServicesGetIamPolicyCall) Header() http.Header {
  4693  	if c.header_ == nil {
  4694  		c.header_ = make(http.Header)
  4695  	}
  4696  	return c.header_
  4697  }
  4698  
  4699  func (c *ProjectsLocationsServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4700  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4701  	if c.ifNoneMatch_ != "" {
  4702  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4703  	}
  4704  	var body io.Reader = nil
  4705  	c.urlParams_.Set("alt", alt)
  4706  	c.urlParams_.Set("prettyPrint", "false")
  4707  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4708  	urls += "?" + c.urlParams_.Encode()
  4709  	req, err := http.NewRequest("GET", urls, body)
  4710  	if err != nil {
  4711  		return nil, err
  4712  	}
  4713  	req.Header = reqHeaders
  4714  	googleapi.Expand(req.URL, map[string]string{
  4715  		"resource": c.resource,
  4716  	})
  4717  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4718  }
  4719  
  4720  // Do executes the "metastore.projects.locations.services.getIamPolicy" call.
  4721  // Any non-2xx status code is an error. Response headers are in either
  4722  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4723  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4724  // whether the returned error was because http.StatusNotModified was returned.
  4725  func (c *ProjectsLocationsServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4726  	gensupport.SetOptions(c.urlParams_, opts...)
  4727  	res, err := c.doRequest("json")
  4728  	if res != nil && res.StatusCode == http.StatusNotModified {
  4729  		if res.Body != nil {
  4730  			res.Body.Close()
  4731  		}
  4732  		return nil, gensupport.WrapError(&googleapi.Error{
  4733  			Code:   res.StatusCode,
  4734  			Header: res.Header,
  4735  		})
  4736  	}
  4737  	if err != nil {
  4738  		return nil, err
  4739  	}
  4740  	defer googleapi.CloseBody(res)
  4741  	if err := googleapi.CheckResponse(res); err != nil {
  4742  		return nil, gensupport.WrapError(err)
  4743  	}
  4744  	ret := &Policy{
  4745  		ServerResponse: googleapi.ServerResponse{
  4746  			Header:         res.Header,
  4747  			HTTPStatusCode: res.StatusCode,
  4748  		},
  4749  	}
  4750  	target := &ret
  4751  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4752  		return nil, err
  4753  	}
  4754  	return ret, nil
  4755  }
  4756  
  4757  type ProjectsLocationsServicesListCall struct {
  4758  	s            *APIService
  4759  	parent       string
  4760  	urlParams_   gensupport.URLParams
  4761  	ifNoneMatch_ string
  4762  	ctx_         context.Context
  4763  	header_      http.Header
  4764  }
  4765  
  4766  // List: Lists services in a project and location.
  4767  //
  4768  //   - parent: The relative resource name of the location of metastore services
  4769  //     to list, in the following
  4770  //     form:projects/{project_number}/locations/{location_id}.
  4771  func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall {
  4772  	c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4773  	c.parent = parent
  4774  	return c
  4775  }
  4776  
  4777  // Filter sets the optional parameter "filter": The filter to apply to list
  4778  // results.
  4779  func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall {
  4780  	c.urlParams_.Set("filter", filter)
  4781  	return c
  4782  }
  4783  
  4784  // OrderBy sets the optional parameter "orderBy": Specify the ordering of
  4785  // results as described in Sorting Order
  4786  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
  4787  // specified, the results will be sorted in the default order.
  4788  func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall {
  4789  	c.urlParams_.Set("orderBy", orderBy)
  4790  	return c
  4791  }
  4792  
  4793  // PageSize sets the optional parameter "pageSize": The maximum number of
  4794  // services to return. The response may contain less than the maximum number.
  4795  // If unspecified, no more than 500 services are returned. The maximum value is
  4796  // 1000; values above 1000 are changed to 1000.
  4797  func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall {
  4798  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4799  	return c
  4800  }
  4801  
  4802  // PageToken sets the optional parameter "pageToken": A page token, received
  4803  // from a previous DataprocMetastore.ListServices call. Provide this token to
  4804  // retrieve the subsequent page.To retrieve the first page, supply an empty
  4805  // page token.When paginating, other parameters provided to
  4806  // DataprocMetastore.ListServices must match the call that provided the page
  4807  // token.
  4808  func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall {
  4809  	c.urlParams_.Set("pageToken", pageToken)
  4810  	return c
  4811  }
  4812  
  4813  // Fields allows partial responses to be retrieved. See
  4814  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4815  // details.
  4816  func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall {
  4817  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4818  	return c
  4819  }
  4820  
  4821  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4822  // object's ETag matches the given value. This is useful for getting updates
  4823  // only after the object has changed since the last request.
  4824  func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall {
  4825  	c.ifNoneMatch_ = entityTag
  4826  	return c
  4827  }
  4828  
  4829  // Context sets the context to be used in this call's Do method.
  4830  func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall {
  4831  	c.ctx_ = ctx
  4832  	return c
  4833  }
  4834  
  4835  // Header returns a http.Header that can be modified by the caller to add
  4836  // headers to the request.
  4837  func (c *ProjectsLocationsServicesListCall) Header() http.Header {
  4838  	if c.header_ == nil {
  4839  		c.header_ = make(http.Header)
  4840  	}
  4841  	return c.header_
  4842  }
  4843  
  4844  func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) {
  4845  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4846  	if c.ifNoneMatch_ != "" {
  4847  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4848  	}
  4849  	var body io.Reader = nil
  4850  	c.urlParams_.Set("alt", alt)
  4851  	c.urlParams_.Set("prettyPrint", "false")
  4852  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/services")
  4853  	urls += "?" + c.urlParams_.Encode()
  4854  	req, err := http.NewRequest("GET", urls, body)
  4855  	if err != nil {
  4856  		return nil, err
  4857  	}
  4858  	req.Header = reqHeaders
  4859  	googleapi.Expand(req.URL, map[string]string{
  4860  		"parent": c.parent,
  4861  	})
  4862  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4863  }
  4864  
  4865  // Do executes the "metastore.projects.locations.services.list" call.
  4866  // Any non-2xx status code is an error. Response headers are in either
  4867  // *ListServicesResponse.ServerResponse.Header or (if a response was returned
  4868  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4869  // check whether the returned error was because http.StatusNotModified was
  4870  // returned.
  4871  func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*ListServicesResponse, error) {
  4872  	gensupport.SetOptions(c.urlParams_, opts...)
  4873  	res, err := c.doRequest("json")
  4874  	if res != nil && res.StatusCode == http.StatusNotModified {
  4875  		if res.Body != nil {
  4876  			res.Body.Close()
  4877  		}
  4878  		return nil, gensupport.WrapError(&googleapi.Error{
  4879  			Code:   res.StatusCode,
  4880  			Header: res.Header,
  4881  		})
  4882  	}
  4883  	if err != nil {
  4884  		return nil, err
  4885  	}
  4886  	defer googleapi.CloseBody(res)
  4887  	if err := googleapi.CheckResponse(res); err != nil {
  4888  		return nil, gensupport.WrapError(err)
  4889  	}
  4890  	ret := &ListServicesResponse{
  4891  		ServerResponse: googleapi.ServerResponse{
  4892  			Header:         res.Header,
  4893  			HTTPStatusCode: res.StatusCode,
  4894  		},
  4895  	}
  4896  	target := &ret
  4897  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4898  		return nil, err
  4899  	}
  4900  	return ret, nil
  4901  }
  4902  
  4903  // Pages invokes f for each page of results.
  4904  // A non-nil error returned from f will halt the iteration.
  4905  // The provided context supersedes any context provided to the Context method.
  4906  func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*ListServicesResponse) error) error {
  4907  	c.ctx_ = ctx
  4908  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4909  	for {
  4910  		x, err := c.Do()
  4911  		if err != nil {
  4912  			return err
  4913  		}
  4914  		if err := f(x); err != nil {
  4915  			return err
  4916  		}
  4917  		if x.NextPageToken == "" {
  4918  			return nil
  4919  		}
  4920  		c.PageToken(x.NextPageToken)
  4921  	}
  4922  }
  4923  
  4924  type ProjectsLocationsServicesMoveTableToDatabaseCall struct {
  4925  	s                          *APIService
  4926  	service                    string
  4927  	movetabletodatabaserequest *MoveTableToDatabaseRequest
  4928  	urlParams_                 gensupport.URLParams
  4929  	ctx_                       context.Context
  4930  	header_                    http.Header
  4931  }
  4932  
  4933  // MoveTableToDatabase: Move a table to another database.
  4934  //
  4935  //   - service: The relative resource name of the metastore service to mutate
  4936  //     metadata, in the following
  4937  //     format:projects/{project_id}/locations/{location_id}/services/{service_id}.
  4938  func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, movetabletodatabaserequest *MoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall {
  4939  	c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4940  	c.service = service
  4941  	c.movetabletodatabaserequest = movetabletodatabaserequest
  4942  	return c
  4943  }
  4944  
  4945  // Fields allows partial responses to be retrieved. See
  4946  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4947  // details.
  4948  func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall {
  4949  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4950  	return c
  4951  }
  4952  
  4953  // Context sets the context to be used in this call's Do method.
  4954  func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall {
  4955  	c.ctx_ = ctx
  4956  	return c
  4957  }
  4958  
  4959  // Header returns a http.Header that can be modified by the caller to add
  4960  // headers to the request.
  4961  func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header {
  4962  	if c.header_ == nil {
  4963  		c.header_ = make(http.Header)
  4964  	}
  4965  	return c.header_
  4966  }
  4967  
  4968  func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) {
  4969  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4970  	var body io.Reader = nil
  4971  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.movetabletodatabaserequest)
  4972  	if err != nil {
  4973  		return nil, err
  4974  	}
  4975  	c.urlParams_.Set("alt", alt)
  4976  	c.urlParams_.Set("prettyPrint", "false")
  4977  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:moveTableToDatabase")
  4978  	urls += "?" + c.urlParams_.Encode()
  4979  	req, err := http.NewRequest("POST", urls, body)
  4980  	if err != nil {
  4981  		return nil, err
  4982  	}
  4983  	req.Header = reqHeaders
  4984  	googleapi.Expand(req.URL, map[string]string{
  4985  		"service": c.service,
  4986  	})
  4987  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4988  }
  4989  
  4990  // Do executes the "metastore.projects.locations.services.moveTableToDatabase" call.
  4991  // Any non-2xx status code is an error. Response headers are in either
  4992  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4993  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4994  // whether the returned error was because http.StatusNotModified was returned.
  4995  func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4996  	gensupport.SetOptions(c.urlParams_, opts...)
  4997  	res, err := c.doRequest("json")
  4998  	if res != nil && res.StatusCode == http.StatusNotModified {
  4999  		if res.Body != nil {
  5000  			res.Body.Close()
  5001  		}
  5002  		return nil, gensupport.WrapError(&googleapi.Error{
  5003  			Code:   res.StatusCode,
  5004  			Header: res.Header,
  5005  		})
  5006  	}
  5007  	if err != nil {
  5008  		return nil, err
  5009  	}
  5010  	defer googleapi.CloseBody(res)
  5011  	if err := googleapi.CheckResponse(res); err != nil {
  5012  		return nil, gensupport.WrapError(err)
  5013  	}
  5014  	ret := &Operation{
  5015  		ServerResponse: googleapi.ServerResponse{
  5016  			Header:         res.Header,
  5017  			HTTPStatusCode: res.StatusCode,
  5018  		},
  5019  	}
  5020  	target := &ret
  5021  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5022  		return nil, err
  5023  	}
  5024  	return ret, nil
  5025  }
  5026  
  5027  type ProjectsLocationsServicesPatchCall struct {
  5028  	s          *APIService
  5029  	name       string
  5030  	service    *Service
  5031  	urlParams_ gensupport.URLParams
  5032  	ctx_       context.Context
  5033  	header_    http.Header
  5034  }
  5035  
  5036  // Patch: Updates the parameters of a single service.
  5037  //
  5038  //   - name: Immutable. The relative resource name of the metastore service, in
  5039  //     the following
  5040  //     format:projects/{project_number}/locations/{location_id}/services/{service_
  5041  //     id}.
  5042  func (r *ProjectsLocationsServicesService) Patch(name string, service *Service) *ProjectsLocationsServicesPatchCall {
  5043  	c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5044  	c.name = name
  5045  	c.service = service
  5046  	return c
  5047  }
  5048  
  5049  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  5050  // unique request ID to allow the server to ignore the request if it has
  5051  // completed. The server will ignore subsequent requests that provide a
  5052  // duplicate request ID for at least 60 minutes after the first request.For
  5053  // example, if an initial request times out, followed by another request with
  5054  // the same request ID, the server ignores the second request to prevent the
  5055  // creation of duplicate commitments.The request ID must be a valid UUID
  5056  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  5057  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  5058  func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall {
  5059  	c.urlParams_.Set("requestId", requestId)
  5060  	return c
  5061  }
  5062  
  5063  // UpdateMask sets the optional parameter "updateMask": Required. A field mask
  5064  // used to specify the fields to be overwritten in the metastore service
  5065  // resource by the update. Fields specified in the update_mask are relative to
  5066  // the resource (not to the full request). A field is overwritten if it is in
  5067  // the mask.
  5068  func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall {
  5069  	c.urlParams_.Set("updateMask", updateMask)
  5070  	return c
  5071  }
  5072  
  5073  // Fields allows partial responses to be retrieved. See
  5074  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5075  // details.
  5076  func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall {
  5077  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5078  	return c
  5079  }
  5080  
  5081  // Context sets the context to be used in this call's Do method.
  5082  func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall {
  5083  	c.ctx_ = ctx
  5084  	return c
  5085  }
  5086  
  5087  // Header returns a http.Header that can be modified by the caller to add
  5088  // headers to the request.
  5089  func (c *ProjectsLocationsServicesPatchCall) Header() http.Header {
  5090  	if c.header_ == nil {
  5091  		c.header_ = make(http.Header)
  5092  	}
  5093  	return c.header_
  5094  }
  5095  
  5096  func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) {
  5097  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5098  	var body io.Reader = nil
  5099  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.service)
  5100  	if err != nil {
  5101  		return nil, err
  5102  	}
  5103  	c.urlParams_.Set("alt", alt)
  5104  	c.urlParams_.Set("prettyPrint", "false")
  5105  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5106  	urls += "?" + c.urlParams_.Encode()
  5107  	req, err := http.NewRequest("PATCH", urls, body)
  5108  	if err != nil {
  5109  		return nil, err
  5110  	}
  5111  	req.Header = reqHeaders
  5112  	googleapi.Expand(req.URL, map[string]string{
  5113  		"name": c.name,
  5114  	})
  5115  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5116  }
  5117  
  5118  // Do executes the "metastore.projects.locations.services.patch" call.
  5119  // Any non-2xx status code is an error. Response headers are in either
  5120  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5121  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5122  // whether the returned error was because http.StatusNotModified was returned.
  5123  func (c *ProjectsLocationsServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5124  	gensupport.SetOptions(c.urlParams_, opts...)
  5125  	res, err := c.doRequest("json")
  5126  	if res != nil && res.StatusCode == http.StatusNotModified {
  5127  		if res.Body != nil {
  5128  			res.Body.Close()
  5129  		}
  5130  		return nil, gensupport.WrapError(&googleapi.Error{
  5131  			Code:   res.StatusCode,
  5132  			Header: res.Header,
  5133  		})
  5134  	}
  5135  	if err != nil {
  5136  		return nil, err
  5137  	}
  5138  	defer googleapi.CloseBody(res)
  5139  	if err := googleapi.CheckResponse(res); err != nil {
  5140  		return nil, gensupport.WrapError(err)
  5141  	}
  5142  	ret := &Operation{
  5143  		ServerResponse: googleapi.ServerResponse{
  5144  			Header:         res.Header,
  5145  			HTTPStatusCode: res.StatusCode,
  5146  		},
  5147  	}
  5148  	target := &ret
  5149  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5150  		return nil, err
  5151  	}
  5152  	return ret, nil
  5153  }
  5154  
  5155  type ProjectsLocationsServicesQueryMetadataCall struct {
  5156  	s                    *APIService
  5157  	service              string
  5158  	querymetadatarequest *QueryMetadataRequest
  5159  	urlParams_           gensupport.URLParams
  5160  	ctx_                 context.Context
  5161  	header_              http.Header
  5162  }
  5163  
  5164  // QueryMetadata: Query Dataproc Metastore metadata.
  5165  //
  5166  //   - service: The relative resource name of the metastore service to query
  5167  //     metadata, in the following
  5168  //     format:projects/{project_id}/locations/{location_id}/services/{service_id}.
  5169  func (r *ProjectsLocationsServicesService) QueryMetadata(service string, querymetadatarequest *QueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall {
  5170  	c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5171  	c.service = service
  5172  	c.querymetadatarequest = querymetadatarequest
  5173  	return c
  5174  }
  5175  
  5176  // Fields allows partial responses to be retrieved. See
  5177  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5178  // details.
  5179  func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall {
  5180  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5181  	return c
  5182  }
  5183  
  5184  // Context sets the context to be used in this call's Do method.
  5185  func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall {
  5186  	c.ctx_ = ctx
  5187  	return c
  5188  }
  5189  
  5190  // Header returns a http.Header that can be modified by the caller to add
  5191  // headers to the request.
  5192  func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header {
  5193  	if c.header_ == nil {
  5194  		c.header_ = make(http.Header)
  5195  	}
  5196  	return c.header_
  5197  }
  5198  
  5199  func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) {
  5200  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5201  	var body io.Reader = nil
  5202  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.querymetadatarequest)
  5203  	if err != nil {
  5204  		return nil, err
  5205  	}
  5206  	c.urlParams_.Set("alt", alt)
  5207  	c.urlParams_.Set("prettyPrint", "false")
  5208  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:queryMetadata")
  5209  	urls += "?" + c.urlParams_.Encode()
  5210  	req, err := http.NewRequest("POST", urls, body)
  5211  	if err != nil {
  5212  		return nil, err
  5213  	}
  5214  	req.Header = reqHeaders
  5215  	googleapi.Expand(req.URL, map[string]string{
  5216  		"service": c.service,
  5217  	})
  5218  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5219  }
  5220  
  5221  // Do executes the "metastore.projects.locations.services.queryMetadata" call.
  5222  // Any non-2xx status code is an error. Response headers are in either
  5223  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5224  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5225  // whether the returned error was because http.StatusNotModified was returned.
  5226  func (c *ProjectsLocationsServicesQueryMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5227  	gensupport.SetOptions(c.urlParams_, opts...)
  5228  	res, err := c.doRequest("json")
  5229  	if res != nil && res.StatusCode == http.StatusNotModified {
  5230  		if res.Body != nil {
  5231  			res.Body.Close()
  5232  		}
  5233  		return nil, gensupport.WrapError(&googleapi.Error{
  5234  			Code:   res.StatusCode,
  5235  			Header: res.Header,
  5236  		})
  5237  	}
  5238  	if err != nil {
  5239  		return nil, err
  5240  	}
  5241  	defer googleapi.CloseBody(res)
  5242  	if err := googleapi.CheckResponse(res); err != nil {
  5243  		return nil, gensupport.WrapError(err)
  5244  	}
  5245  	ret := &Operation{
  5246  		ServerResponse: googleapi.ServerResponse{
  5247  			Header:         res.Header,
  5248  			HTTPStatusCode: res.StatusCode,
  5249  		},
  5250  	}
  5251  	target := &ret
  5252  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5253  		return nil, err
  5254  	}
  5255  	return ret, nil
  5256  }
  5257  
  5258  type ProjectsLocationsServicesRestoreCall struct {
  5259  	s                     *APIService
  5260  	service               string
  5261  	restoreservicerequest *RestoreServiceRequest
  5262  	urlParams_            gensupport.URLParams
  5263  	ctx_                  context.Context
  5264  	header_               http.Header
  5265  }
  5266  
  5267  // Restore: Restores a service from a backup.
  5268  //
  5269  //   - service: The relative resource name of the metastore service to run
  5270  //     restore, in the following
  5271  //     form:projects/{project_id}/locations/{location_id}/services/{service_id}.
  5272  func (r *ProjectsLocationsServicesService) Restore(service string, restoreservicerequest *RestoreServiceRequest) *ProjectsLocationsServicesRestoreCall {
  5273  	c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5274  	c.service = service
  5275  	c.restoreservicerequest = restoreservicerequest
  5276  	return c
  5277  }
  5278  
  5279  // Fields allows partial responses to be retrieved. See
  5280  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5281  // details.
  5282  func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall {
  5283  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5284  	return c
  5285  }
  5286  
  5287  // Context sets the context to be used in this call's Do method.
  5288  func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall {
  5289  	c.ctx_ = ctx
  5290  	return c
  5291  }
  5292  
  5293  // Header returns a http.Header that can be modified by the caller to add
  5294  // headers to the request.
  5295  func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header {
  5296  	if c.header_ == nil {
  5297  		c.header_ = make(http.Header)
  5298  	}
  5299  	return c.header_
  5300  }
  5301  
  5302  func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) {
  5303  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5304  	var body io.Reader = nil
  5305  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.restoreservicerequest)
  5306  	if err != nil {
  5307  		return nil, err
  5308  	}
  5309  	c.urlParams_.Set("alt", alt)
  5310  	c.urlParams_.Set("prettyPrint", "false")
  5311  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+service}:restore")
  5312  	urls += "?" + c.urlParams_.Encode()
  5313  	req, err := http.NewRequest("POST", urls, body)
  5314  	if err != nil {
  5315  		return nil, err
  5316  	}
  5317  	req.Header = reqHeaders
  5318  	googleapi.Expand(req.URL, map[string]string{
  5319  		"service": c.service,
  5320  	})
  5321  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5322  }
  5323  
  5324  // Do executes the "metastore.projects.locations.services.restore" call.
  5325  // Any non-2xx status code is an error. Response headers are in either
  5326  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5327  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5328  // whether the returned error was because http.StatusNotModified was returned.
  5329  func (c *ProjectsLocationsServicesRestoreCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5330  	gensupport.SetOptions(c.urlParams_, opts...)
  5331  	res, err := c.doRequest("json")
  5332  	if res != nil && res.StatusCode == http.StatusNotModified {
  5333  		if res.Body != nil {
  5334  			res.Body.Close()
  5335  		}
  5336  		return nil, gensupport.WrapError(&googleapi.Error{
  5337  			Code:   res.StatusCode,
  5338  			Header: res.Header,
  5339  		})
  5340  	}
  5341  	if err != nil {
  5342  		return nil, err
  5343  	}
  5344  	defer googleapi.CloseBody(res)
  5345  	if err := googleapi.CheckResponse(res); err != nil {
  5346  		return nil, gensupport.WrapError(err)
  5347  	}
  5348  	ret := &Operation{
  5349  		ServerResponse: googleapi.ServerResponse{
  5350  			Header:         res.Header,
  5351  			HTTPStatusCode: res.StatusCode,
  5352  		},
  5353  	}
  5354  	target := &ret
  5355  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5356  		return nil, err
  5357  	}
  5358  	return ret, nil
  5359  }
  5360  
  5361  type ProjectsLocationsServicesSetIamPolicyCall struct {
  5362  	s                   *APIService
  5363  	resource            string
  5364  	setiampolicyrequest *SetIamPolicyRequest
  5365  	urlParams_          gensupport.URLParams
  5366  	ctx_                context.Context
  5367  	header_             http.Header
  5368  }
  5369  
  5370  // SetIamPolicy: Sets the access control policy on the specified resource.
  5371  // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
  5372  // PERMISSION_DENIED errors.
  5373  //
  5374  //   - resource: REQUIRED: The resource for which the policy is being specified.
  5375  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5376  //     for the appropriate value for this field.
  5377  func (r *ProjectsLocationsServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesSetIamPolicyCall {
  5378  	c := &ProjectsLocationsServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5379  	c.resource = resource
  5380  	c.setiampolicyrequest = setiampolicyrequest
  5381  	return c
  5382  }
  5383  
  5384  // Fields allows partial responses to be retrieved. See
  5385  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5386  // details.
  5387  func (c *ProjectsLocationsServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesSetIamPolicyCall {
  5388  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5389  	return c
  5390  }
  5391  
  5392  // Context sets the context to be used in this call's Do method.
  5393  func (c *ProjectsLocationsServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesSetIamPolicyCall {
  5394  	c.ctx_ = ctx
  5395  	return c
  5396  }
  5397  
  5398  // Header returns a http.Header that can be modified by the caller to add
  5399  // headers to the request.
  5400  func (c *ProjectsLocationsServicesSetIamPolicyCall) Header() http.Header {
  5401  	if c.header_ == nil {
  5402  		c.header_ = make(http.Header)
  5403  	}
  5404  	return c.header_
  5405  }
  5406  
  5407  func (c *ProjectsLocationsServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5408  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5409  	var body io.Reader = nil
  5410  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5411  	if err != nil {
  5412  		return nil, err
  5413  	}
  5414  	c.urlParams_.Set("alt", alt)
  5415  	c.urlParams_.Set("prettyPrint", "false")
  5416  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  5417  	urls += "?" + c.urlParams_.Encode()
  5418  	req, err := http.NewRequest("POST", urls, body)
  5419  	if err != nil {
  5420  		return nil, err
  5421  	}
  5422  	req.Header = reqHeaders
  5423  	googleapi.Expand(req.URL, map[string]string{
  5424  		"resource": c.resource,
  5425  	})
  5426  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5427  }
  5428  
  5429  // Do executes the "metastore.projects.locations.services.setIamPolicy" call.
  5430  // Any non-2xx status code is an error. Response headers are in either
  5431  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5432  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5433  // whether the returned error was because http.StatusNotModified was returned.
  5434  func (c *ProjectsLocationsServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5435  	gensupport.SetOptions(c.urlParams_, opts...)
  5436  	res, err := c.doRequest("json")
  5437  	if res != nil && res.StatusCode == http.StatusNotModified {
  5438  		if res.Body != nil {
  5439  			res.Body.Close()
  5440  		}
  5441  		return nil, gensupport.WrapError(&googleapi.Error{
  5442  			Code:   res.StatusCode,
  5443  			Header: res.Header,
  5444  		})
  5445  	}
  5446  	if err != nil {
  5447  		return nil, err
  5448  	}
  5449  	defer googleapi.CloseBody(res)
  5450  	if err := googleapi.CheckResponse(res); err != nil {
  5451  		return nil, gensupport.WrapError(err)
  5452  	}
  5453  	ret := &Policy{
  5454  		ServerResponse: googleapi.ServerResponse{
  5455  			Header:         res.Header,
  5456  			HTTPStatusCode: res.StatusCode,
  5457  		},
  5458  	}
  5459  	target := &ret
  5460  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5461  		return nil, err
  5462  	}
  5463  	return ret, nil
  5464  }
  5465  
  5466  type ProjectsLocationsServicesTestIamPermissionsCall struct {
  5467  	s                         *APIService
  5468  	resource                  string
  5469  	testiampermissionsrequest *TestIamPermissionsRequest
  5470  	urlParams_                gensupport.URLParams
  5471  	ctx_                      context.Context
  5472  	header_                   http.Header
  5473  }
  5474  
  5475  // TestIamPermissions: Returns permissions that a caller has on the specified
  5476  // resource. If the resource does not exist, this will return an empty set of
  5477  // permissions, not a NOT_FOUND error.Note: This operation is designed to be
  5478  // used for building permission-aware UIs and command-line tools, not for
  5479  // authorization checking. This operation may "fail open" without warning.
  5480  //
  5481  //   - resource: REQUIRED: The resource for which the policy detail is being
  5482  //     requested. See Resource names
  5483  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5484  //     value for this field.
  5485  func (r *ProjectsLocationsServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServicesTestIamPermissionsCall {
  5486  	c := &ProjectsLocationsServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5487  	c.resource = resource
  5488  	c.testiampermissionsrequest = testiampermissionsrequest
  5489  	return c
  5490  }
  5491  
  5492  // Fields allows partial responses to be retrieved. See
  5493  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5494  // details.
  5495  func (c *ProjectsLocationsServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesTestIamPermissionsCall {
  5496  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5497  	return c
  5498  }
  5499  
  5500  // Context sets the context to be used in this call's Do method.
  5501  func (c *ProjectsLocationsServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServicesTestIamPermissionsCall {
  5502  	c.ctx_ = ctx
  5503  	return c
  5504  }
  5505  
  5506  // Header returns a http.Header that can be modified by the caller to add
  5507  // headers to the request.
  5508  func (c *ProjectsLocationsServicesTestIamPermissionsCall) Header() http.Header {
  5509  	if c.header_ == nil {
  5510  		c.header_ = make(http.Header)
  5511  	}
  5512  	return c.header_
  5513  }
  5514  
  5515  func (c *ProjectsLocationsServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5516  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5517  	var body io.Reader = nil
  5518  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5519  	if err != nil {
  5520  		return nil, err
  5521  	}
  5522  	c.urlParams_.Set("alt", alt)
  5523  	c.urlParams_.Set("prettyPrint", "false")
  5524  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  5525  	urls += "?" + c.urlParams_.Encode()
  5526  	req, err := http.NewRequest("POST", urls, body)
  5527  	if err != nil {
  5528  		return nil, err
  5529  	}
  5530  	req.Header = reqHeaders
  5531  	googleapi.Expand(req.URL, map[string]string{
  5532  		"resource": c.resource,
  5533  	})
  5534  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5535  }
  5536  
  5537  // Do executes the "metastore.projects.locations.services.testIamPermissions" call.
  5538  // Any non-2xx status code is an error. Response headers are in either
  5539  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  5540  // returned at all) in error.(*googleapi.Error).Header. Use
  5541  // googleapi.IsNotModified to check whether the returned error was because
  5542  // http.StatusNotModified was returned.
  5543  func (c *ProjectsLocationsServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5544  	gensupport.SetOptions(c.urlParams_, opts...)
  5545  	res, err := c.doRequest("json")
  5546  	if res != nil && res.StatusCode == http.StatusNotModified {
  5547  		if res.Body != nil {
  5548  			res.Body.Close()
  5549  		}
  5550  		return nil, gensupport.WrapError(&googleapi.Error{
  5551  			Code:   res.StatusCode,
  5552  			Header: res.Header,
  5553  		})
  5554  	}
  5555  	if err != nil {
  5556  		return nil, err
  5557  	}
  5558  	defer googleapi.CloseBody(res)
  5559  	if err := googleapi.CheckResponse(res); err != nil {
  5560  		return nil, gensupport.WrapError(err)
  5561  	}
  5562  	ret := &TestIamPermissionsResponse{
  5563  		ServerResponse: googleapi.ServerResponse{
  5564  			Header:         res.Header,
  5565  			HTTPStatusCode: res.StatusCode,
  5566  		},
  5567  	}
  5568  	target := &ret
  5569  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5570  		return nil, err
  5571  	}
  5572  	return ret, nil
  5573  }
  5574  
  5575  type ProjectsLocationsServicesBackupsCreateCall struct {
  5576  	s          *APIService
  5577  	parent     string
  5578  	backup     *Backup
  5579  	urlParams_ gensupport.URLParams
  5580  	ctx_       context.Context
  5581  	header_    http.Header
  5582  }
  5583  
  5584  // Create: Creates a new backup in a given project and location.
  5585  //
  5586  //   - parent: The relative resource name of the service in which to create a
  5587  //     backup of the following
  5588  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  5589  //     }.
  5590  func (r *ProjectsLocationsServicesBackupsService) Create(parent string, backup *Backup) *ProjectsLocationsServicesBackupsCreateCall {
  5591  	c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5592  	c.parent = parent
  5593  	c.backup = backup
  5594  	return c
  5595  }
  5596  
  5597  // BackupId sets the optional parameter "backupId": Required. The ID of the
  5598  // backup, which is used as the final component of the backup's name.This value
  5599  // must be between 1 and 64 characters long, begin with a letter, end with a
  5600  // letter or number, and consist of alpha-numeric ASCII characters or hyphens.
  5601  func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall {
  5602  	c.urlParams_.Set("backupId", backupId)
  5603  	return c
  5604  }
  5605  
  5606  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  5607  // unique request ID to allow the server to ignore the request if it has
  5608  // completed. The server will ignore subsequent requests that provide a
  5609  // duplicate request ID for at least 60 minutes after the first request.For
  5610  // example, if an initial request times out, followed by another request with
  5611  // the same request ID, the server ignores the second request to prevent the
  5612  // creation of duplicate commitments.The request ID must be a valid UUID
  5613  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  5614  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  5615  func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall {
  5616  	c.urlParams_.Set("requestId", requestId)
  5617  	return c
  5618  }
  5619  
  5620  // Fields allows partial responses to be retrieved. See
  5621  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5622  // details.
  5623  func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall {
  5624  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5625  	return c
  5626  }
  5627  
  5628  // Context sets the context to be used in this call's Do method.
  5629  func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall {
  5630  	c.ctx_ = ctx
  5631  	return c
  5632  }
  5633  
  5634  // Header returns a http.Header that can be modified by the caller to add
  5635  // headers to the request.
  5636  func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header {
  5637  	if c.header_ == nil {
  5638  		c.header_ = make(http.Header)
  5639  	}
  5640  	return c.header_
  5641  }
  5642  
  5643  func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) {
  5644  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5645  	var body io.Reader = nil
  5646  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.backup)
  5647  	if err != nil {
  5648  		return nil, err
  5649  	}
  5650  	c.urlParams_.Set("alt", alt)
  5651  	c.urlParams_.Set("prettyPrint", "false")
  5652  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
  5653  	urls += "?" + c.urlParams_.Encode()
  5654  	req, err := http.NewRequest("POST", urls, body)
  5655  	if err != nil {
  5656  		return nil, err
  5657  	}
  5658  	req.Header = reqHeaders
  5659  	googleapi.Expand(req.URL, map[string]string{
  5660  		"parent": c.parent,
  5661  	})
  5662  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5663  }
  5664  
  5665  // Do executes the "metastore.projects.locations.services.backups.create" call.
  5666  // Any non-2xx status code is an error. Response headers are in either
  5667  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5668  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5669  // whether the returned error was because http.StatusNotModified was returned.
  5670  func (c *ProjectsLocationsServicesBackupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5671  	gensupport.SetOptions(c.urlParams_, opts...)
  5672  	res, err := c.doRequest("json")
  5673  	if res != nil && res.StatusCode == http.StatusNotModified {
  5674  		if res.Body != nil {
  5675  			res.Body.Close()
  5676  		}
  5677  		return nil, gensupport.WrapError(&googleapi.Error{
  5678  			Code:   res.StatusCode,
  5679  			Header: res.Header,
  5680  		})
  5681  	}
  5682  	if err != nil {
  5683  		return nil, err
  5684  	}
  5685  	defer googleapi.CloseBody(res)
  5686  	if err := googleapi.CheckResponse(res); err != nil {
  5687  		return nil, gensupport.WrapError(err)
  5688  	}
  5689  	ret := &Operation{
  5690  		ServerResponse: googleapi.ServerResponse{
  5691  			Header:         res.Header,
  5692  			HTTPStatusCode: res.StatusCode,
  5693  		},
  5694  	}
  5695  	target := &ret
  5696  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5697  		return nil, err
  5698  	}
  5699  	return ret, nil
  5700  }
  5701  
  5702  type ProjectsLocationsServicesBackupsDeleteCall struct {
  5703  	s          *APIService
  5704  	name       string
  5705  	urlParams_ gensupport.URLParams
  5706  	ctx_       context.Context
  5707  	header_    http.Header
  5708  }
  5709  
  5710  // Delete: Deletes a single backup.
  5711  //
  5712  //   - name: The relative resource name of the backup to delete, in the following
  5713  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  5714  //     }/backups/{backup_id}.
  5715  func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall {
  5716  	c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5717  	c.name = name
  5718  	return c
  5719  }
  5720  
  5721  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  5722  // unique request ID to allow the server to ignore the request if it has
  5723  // completed. The server will ignore subsequent requests that provide a
  5724  // duplicate request ID for at least 60 minutes after the first request.For
  5725  // example, if an initial request times out, followed by another request with
  5726  // the same request ID, the server ignores the second request to prevent the
  5727  // creation of duplicate commitments.The request ID must be a valid UUID
  5728  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  5729  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  5730  func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall {
  5731  	c.urlParams_.Set("requestId", requestId)
  5732  	return c
  5733  }
  5734  
  5735  // Fields allows partial responses to be retrieved. See
  5736  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5737  // details.
  5738  func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall {
  5739  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5740  	return c
  5741  }
  5742  
  5743  // Context sets the context to be used in this call's Do method.
  5744  func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall {
  5745  	c.ctx_ = ctx
  5746  	return c
  5747  }
  5748  
  5749  // Header returns a http.Header that can be modified by the caller to add
  5750  // headers to the request.
  5751  func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header {
  5752  	if c.header_ == nil {
  5753  		c.header_ = make(http.Header)
  5754  	}
  5755  	return c.header_
  5756  }
  5757  
  5758  func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5759  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5760  	var body io.Reader = nil
  5761  	c.urlParams_.Set("alt", alt)
  5762  	c.urlParams_.Set("prettyPrint", "false")
  5763  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5764  	urls += "?" + c.urlParams_.Encode()
  5765  	req, err := http.NewRequest("DELETE", urls, body)
  5766  	if err != nil {
  5767  		return nil, err
  5768  	}
  5769  	req.Header = reqHeaders
  5770  	googleapi.Expand(req.URL, map[string]string{
  5771  		"name": c.name,
  5772  	})
  5773  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5774  }
  5775  
  5776  // Do executes the "metastore.projects.locations.services.backups.delete" call.
  5777  // Any non-2xx status code is an error. Response headers are in either
  5778  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5779  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5780  // whether the returned error was because http.StatusNotModified was returned.
  5781  func (c *ProjectsLocationsServicesBackupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5782  	gensupport.SetOptions(c.urlParams_, opts...)
  5783  	res, err := c.doRequest("json")
  5784  	if res != nil && res.StatusCode == http.StatusNotModified {
  5785  		if res.Body != nil {
  5786  			res.Body.Close()
  5787  		}
  5788  		return nil, gensupport.WrapError(&googleapi.Error{
  5789  			Code:   res.StatusCode,
  5790  			Header: res.Header,
  5791  		})
  5792  	}
  5793  	if err != nil {
  5794  		return nil, err
  5795  	}
  5796  	defer googleapi.CloseBody(res)
  5797  	if err := googleapi.CheckResponse(res); err != nil {
  5798  		return nil, gensupport.WrapError(err)
  5799  	}
  5800  	ret := &Operation{
  5801  		ServerResponse: googleapi.ServerResponse{
  5802  			Header:         res.Header,
  5803  			HTTPStatusCode: res.StatusCode,
  5804  		},
  5805  	}
  5806  	target := &ret
  5807  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5808  		return nil, err
  5809  	}
  5810  	return ret, nil
  5811  }
  5812  
  5813  type ProjectsLocationsServicesBackupsGetCall struct {
  5814  	s            *APIService
  5815  	name         string
  5816  	urlParams_   gensupport.URLParams
  5817  	ifNoneMatch_ string
  5818  	ctx_         context.Context
  5819  	header_      http.Header
  5820  }
  5821  
  5822  // Get: Gets details of a single backup.
  5823  //
  5824  //   - name: The relative resource name of the backup to retrieve, in the
  5825  //     following
  5826  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  5827  //     }/backups/{backup_id}.
  5828  func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall {
  5829  	c := &ProjectsLocationsServicesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5830  	c.name = name
  5831  	return c
  5832  }
  5833  
  5834  // Fields allows partial responses to be retrieved. See
  5835  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5836  // details.
  5837  func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall {
  5838  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5839  	return c
  5840  }
  5841  
  5842  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5843  // object's ETag matches the given value. This is useful for getting updates
  5844  // only after the object has changed since the last request.
  5845  func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall {
  5846  	c.ifNoneMatch_ = entityTag
  5847  	return c
  5848  }
  5849  
  5850  // Context sets the context to be used in this call's Do method.
  5851  func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall {
  5852  	c.ctx_ = ctx
  5853  	return c
  5854  }
  5855  
  5856  // Header returns a http.Header that can be modified by the caller to add
  5857  // headers to the request.
  5858  func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header {
  5859  	if c.header_ == nil {
  5860  		c.header_ = make(http.Header)
  5861  	}
  5862  	return c.header_
  5863  }
  5864  
  5865  func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) {
  5866  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5867  	if c.ifNoneMatch_ != "" {
  5868  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5869  	}
  5870  	var body io.Reader = nil
  5871  	c.urlParams_.Set("alt", alt)
  5872  	c.urlParams_.Set("prettyPrint", "false")
  5873  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5874  	urls += "?" + c.urlParams_.Encode()
  5875  	req, err := http.NewRequest("GET", urls, body)
  5876  	if err != nil {
  5877  		return nil, err
  5878  	}
  5879  	req.Header = reqHeaders
  5880  	googleapi.Expand(req.URL, map[string]string{
  5881  		"name": c.name,
  5882  	})
  5883  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5884  }
  5885  
  5886  // Do executes the "metastore.projects.locations.services.backups.get" call.
  5887  // Any non-2xx status code is an error. Response headers are in either
  5888  // *Backup.ServerResponse.Header or (if a response was returned at all) in
  5889  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5890  // whether the returned error was because http.StatusNotModified was returned.
  5891  func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*Backup, error) {
  5892  	gensupport.SetOptions(c.urlParams_, opts...)
  5893  	res, err := c.doRequest("json")
  5894  	if res != nil && res.StatusCode == http.StatusNotModified {
  5895  		if res.Body != nil {
  5896  			res.Body.Close()
  5897  		}
  5898  		return nil, gensupport.WrapError(&googleapi.Error{
  5899  			Code:   res.StatusCode,
  5900  			Header: res.Header,
  5901  		})
  5902  	}
  5903  	if err != nil {
  5904  		return nil, err
  5905  	}
  5906  	defer googleapi.CloseBody(res)
  5907  	if err := googleapi.CheckResponse(res); err != nil {
  5908  		return nil, gensupport.WrapError(err)
  5909  	}
  5910  	ret := &Backup{
  5911  		ServerResponse: googleapi.ServerResponse{
  5912  			Header:         res.Header,
  5913  			HTTPStatusCode: res.StatusCode,
  5914  		},
  5915  	}
  5916  	target := &ret
  5917  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5918  		return nil, err
  5919  	}
  5920  	return ret, nil
  5921  }
  5922  
  5923  type ProjectsLocationsServicesBackupsGetIamPolicyCall struct {
  5924  	s            *APIService
  5925  	resource     string
  5926  	urlParams_   gensupport.URLParams
  5927  	ifNoneMatch_ string
  5928  	ctx_         context.Context
  5929  	header_      http.Header
  5930  }
  5931  
  5932  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  5933  // empty policy if the resource exists and does not have a policy set.
  5934  //
  5935  //   - resource: REQUIRED: The resource for which the policy is being requested.
  5936  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5937  //     for the appropriate value for this field.
  5938  func (r *ProjectsLocationsServicesBackupsService) GetIamPolicy(resource string) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
  5939  	c := &ProjectsLocationsServicesBackupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5940  	c.resource = resource
  5941  	return c
  5942  }
  5943  
  5944  // OptionsRequestedPolicyVersion sets the optional parameter
  5945  // "options.requestedPolicyVersion": The maximum policy version that will be
  5946  // used to format the policy.Valid values are 0, 1, and 3. Requests specifying
  5947  // an invalid value will be rejected.Requests for policies with any conditional
  5948  // role bindings must specify version 3. Policies with no conditional role
  5949  // bindings may specify any valid value or leave the field unset.The policy in
  5950  // the response might use the policy version that you specified, or it might
  5951  // use a lower policy version. For example, if you specify version 3, but the
  5952  // policy has no conditional role bindings, the response uses version 1.To
  5953  // learn which resources support conditions in their IAM policies, see the IAM
  5954  // documentation
  5955  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  5956  func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
  5957  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  5958  	return c
  5959  }
  5960  
  5961  // Fields allows partial responses to be retrieved. See
  5962  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5963  // details.
  5964  func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
  5965  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5966  	return c
  5967  }
  5968  
  5969  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5970  // object's ETag matches the given value. This is useful for getting updates
  5971  // only after the object has changed since the last request.
  5972  func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
  5973  	c.ifNoneMatch_ = entityTag
  5974  	return c
  5975  }
  5976  
  5977  // Context sets the context to be used in this call's Do method.
  5978  func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetIamPolicyCall {
  5979  	c.ctx_ = ctx
  5980  	return c
  5981  }
  5982  
  5983  // Header returns a http.Header that can be modified by the caller to add
  5984  // headers to the request.
  5985  func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Header() http.Header {
  5986  	if c.header_ == nil {
  5987  		c.header_ = make(http.Header)
  5988  	}
  5989  	return c.header_
  5990  }
  5991  
  5992  func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5993  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5994  	if c.ifNoneMatch_ != "" {
  5995  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5996  	}
  5997  	var body io.Reader = nil
  5998  	c.urlParams_.Set("alt", alt)
  5999  	c.urlParams_.Set("prettyPrint", "false")
  6000  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  6001  	urls += "?" + c.urlParams_.Encode()
  6002  	req, err := http.NewRequest("GET", urls, body)
  6003  	if err != nil {
  6004  		return nil, err
  6005  	}
  6006  	req.Header = reqHeaders
  6007  	googleapi.Expand(req.URL, map[string]string{
  6008  		"resource": c.resource,
  6009  	})
  6010  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6011  }
  6012  
  6013  // Do executes the "metastore.projects.locations.services.backups.getIamPolicy" call.
  6014  // Any non-2xx status code is an error. Response headers are in either
  6015  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6016  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6017  // whether the returned error was because http.StatusNotModified was returned.
  6018  func (c *ProjectsLocationsServicesBackupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6019  	gensupport.SetOptions(c.urlParams_, opts...)
  6020  	res, err := c.doRequest("json")
  6021  	if res != nil && res.StatusCode == http.StatusNotModified {
  6022  		if res.Body != nil {
  6023  			res.Body.Close()
  6024  		}
  6025  		return nil, gensupport.WrapError(&googleapi.Error{
  6026  			Code:   res.StatusCode,
  6027  			Header: res.Header,
  6028  		})
  6029  	}
  6030  	if err != nil {
  6031  		return nil, err
  6032  	}
  6033  	defer googleapi.CloseBody(res)
  6034  	if err := googleapi.CheckResponse(res); err != nil {
  6035  		return nil, gensupport.WrapError(err)
  6036  	}
  6037  	ret := &Policy{
  6038  		ServerResponse: googleapi.ServerResponse{
  6039  			Header:         res.Header,
  6040  			HTTPStatusCode: res.StatusCode,
  6041  		},
  6042  	}
  6043  	target := &ret
  6044  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6045  		return nil, err
  6046  	}
  6047  	return ret, nil
  6048  }
  6049  
  6050  type ProjectsLocationsServicesBackupsListCall struct {
  6051  	s            *APIService
  6052  	parent       string
  6053  	urlParams_   gensupport.URLParams
  6054  	ifNoneMatch_ string
  6055  	ctx_         context.Context
  6056  	header_      http.Header
  6057  }
  6058  
  6059  // List: Lists backups in a service.
  6060  //
  6061  //   - parent: The relative resource name of the service whose backups to list,
  6062  //     in the following
  6063  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  6064  //     }/backups.
  6065  func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall {
  6066  	c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6067  	c.parent = parent
  6068  	return c
  6069  }
  6070  
  6071  // Filter sets the optional parameter "filter": The filter to apply to list
  6072  // results.
  6073  func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall {
  6074  	c.urlParams_.Set("filter", filter)
  6075  	return c
  6076  }
  6077  
  6078  // OrderBy sets the optional parameter "orderBy": Specify the ordering of
  6079  // results as described in Sorting Order
  6080  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
  6081  // specified, the results will be sorted in the default order.
  6082  func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall {
  6083  	c.urlParams_.Set("orderBy", orderBy)
  6084  	return c
  6085  }
  6086  
  6087  // PageSize sets the optional parameter "pageSize": The maximum number of
  6088  // backups to return. The response may contain less than the maximum number. If
  6089  // unspecified, no more than 500 backups are returned. The maximum value is
  6090  // 1000; values above 1000 are changed to 1000.
  6091  func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall {
  6092  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6093  	return c
  6094  }
  6095  
  6096  // PageToken sets the optional parameter "pageToken": A page token, received
  6097  // from a previous DataprocMetastore.ListBackups call. Provide this token to
  6098  // retrieve the subsequent page.To retrieve the first page, supply an empty
  6099  // page token.When paginating, other parameters provided to
  6100  // DataprocMetastore.ListBackups must match the call that provided the page
  6101  // token.
  6102  func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall {
  6103  	c.urlParams_.Set("pageToken", pageToken)
  6104  	return c
  6105  }
  6106  
  6107  // Fields allows partial responses to be retrieved. See
  6108  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6109  // details.
  6110  func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall {
  6111  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6112  	return c
  6113  }
  6114  
  6115  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6116  // object's ETag matches the given value. This is useful for getting updates
  6117  // only after the object has changed since the last request.
  6118  func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall {
  6119  	c.ifNoneMatch_ = entityTag
  6120  	return c
  6121  }
  6122  
  6123  // Context sets the context to be used in this call's Do method.
  6124  func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall {
  6125  	c.ctx_ = ctx
  6126  	return c
  6127  }
  6128  
  6129  // Header returns a http.Header that can be modified by the caller to add
  6130  // headers to the request.
  6131  func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header {
  6132  	if c.header_ == nil {
  6133  		c.header_ = make(http.Header)
  6134  	}
  6135  	return c.header_
  6136  }
  6137  
  6138  func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) {
  6139  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6140  	if c.ifNoneMatch_ != "" {
  6141  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6142  	}
  6143  	var body io.Reader = nil
  6144  	c.urlParams_.Set("alt", alt)
  6145  	c.urlParams_.Set("prettyPrint", "false")
  6146  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/backups")
  6147  	urls += "?" + c.urlParams_.Encode()
  6148  	req, err := http.NewRequest("GET", urls, body)
  6149  	if err != nil {
  6150  		return nil, err
  6151  	}
  6152  	req.Header = reqHeaders
  6153  	googleapi.Expand(req.URL, map[string]string{
  6154  		"parent": c.parent,
  6155  	})
  6156  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6157  }
  6158  
  6159  // Do executes the "metastore.projects.locations.services.backups.list" call.
  6160  // Any non-2xx status code is an error. Response headers are in either
  6161  // *ListBackupsResponse.ServerResponse.Header or (if a response was returned at
  6162  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6163  // check whether the returned error was because http.StatusNotModified was
  6164  // returned.
  6165  func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*ListBackupsResponse, error) {
  6166  	gensupport.SetOptions(c.urlParams_, opts...)
  6167  	res, err := c.doRequest("json")
  6168  	if res != nil && res.StatusCode == http.StatusNotModified {
  6169  		if res.Body != nil {
  6170  			res.Body.Close()
  6171  		}
  6172  		return nil, gensupport.WrapError(&googleapi.Error{
  6173  			Code:   res.StatusCode,
  6174  			Header: res.Header,
  6175  		})
  6176  	}
  6177  	if err != nil {
  6178  		return nil, err
  6179  	}
  6180  	defer googleapi.CloseBody(res)
  6181  	if err := googleapi.CheckResponse(res); err != nil {
  6182  		return nil, gensupport.WrapError(err)
  6183  	}
  6184  	ret := &ListBackupsResponse{
  6185  		ServerResponse: googleapi.ServerResponse{
  6186  			Header:         res.Header,
  6187  			HTTPStatusCode: res.StatusCode,
  6188  		},
  6189  	}
  6190  	target := &ret
  6191  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6192  		return nil, err
  6193  	}
  6194  	return ret, nil
  6195  }
  6196  
  6197  // Pages invokes f for each page of results.
  6198  // A non-nil error returned from f will halt the iteration.
  6199  // The provided context supersedes any context provided to the Context method.
  6200  func (c *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*ListBackupsResponse) error) error {
  6201  	c.ctx_ = ctx
  6202  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6203  	for {
  6204  		x, err := c.Do()
  6205  		if err != nil {
  6206  			return err
  6207  		}
  6208  		if err := f(x); err != nil {
  6209  			return err
  6210  		}
  6211  		if x.NextPageToken == "" {
  6212  			return nil
  6213  		}
  6214  		c.PageToken(x.NextPageToken)
  6215  	}
  6216  }
  6217  
  6218  type ProjectsLocationsServicesBackupsSetIamPolicyCall struct {
  6219  	s                   *APIService
  6220  	resource            string
  6221  	setiampolicyrequest *SetIamPolicyRequest
  6222  	urlParams_          gensupport.URLParams
  6223  	ctx_                context.Context
  6224  	header_             http.Header
  6225  }
  6226  
  6227  // SetIamPolicy: Sets the access control policy on the specified resource.
  6228  // Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and
  6229  // PERMISSION_DENIED errors.
  6230  //
  6231  //   - resource: REQUIRED: The resource for which the policy is being specified.
  6232  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6233  //     for the appropriate value for this field.
  6234  func (r *ProjectsLocationsServicesBackupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
  6235  	c := &ProjectsLocationsServicesBackupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6236  	c.resource = resource
  6237  	c.setiampolicyrequest = setiampolicyrequest
  6238  	return c
  6239  }
  6240  
  6241  // Fields allows partial responses to be retrieved. See
  6242  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6243  // details.
  6244  func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
  6245  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6246  	return c
  6247  }
  6248  
  6249  // Context sets the context to be used in this call's Do method.
  6250  func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsSetIamPolicyCall {
  6251  	c.ctx_ = ctx
  6252  	return c
  6253  }
  6254  
  6255  // Header returns a http.Header that can be modified by the caller to add
  6256  // headers to the request.
  6257  func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Header() http.Header {
  6258  	if c.header_ == nil {
  6259  		c.header_ = make(http.Header)
  6260  	}
  6261  	return c.header_
  6262  }
  6263  
  6264  func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6265  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6266  	var body io.Reader = nil
  6267  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  6268  	if err != nil {
  6269  		return nil, err
  6270  	}
  6271  	c.urlParams_.Set("alt", alt)
  6272  	c.urlParams_.Set("prettyPrint", "false")
  6273  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  6274  	urls += "?" + c.urlParams_.Encode()
  6275  	req, err := http.NewRequest("POST", urls, body)
  6276  	if err != nil {
  6277  		return nil, err
  6278  	}
  6279  	req.Header = reqHeaders
  6280  	googleapi.Expand(req.URL, map[string]string{
  6281  		"resource": c.resource,
  6282  	})
  6283  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6284  }
  6285  
  6286  // Do executes the "metastore.projects.locations.services.backups.setIamPolicy" call.
  6287  // Any non-2xx status code is an error. Response headers are in either
  6288  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6289  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6290  // whether the returned error was because http.StatusNotModified was returned.
  6291  func (c *ProjectsLocationsServicesBackupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6292  	gensupport.SetOptions(c.urlParams_, opts...)
  6293  	res, err := c.doRequest("json")
  6294  	if res != nil && res.StatusCode == http.StatusNotModified {
  6295  		if res.Body != nil {
  6296  			res.Body.Close()
  6297  		}
  6298  		return nil, gensupport.WrapError(&googleapi.Error{
  6299  			Code:   res.StatusCode,
  6300  			Header: res.Header,
  6301  		})
  6302  	}
  6303  	if err != nil {
  6304  		return nil, err
  6305  	}
  6306  	defer googleapi.CloseBody(res)
  6307  	if err := googleapi.CheckResponse(res); err != nil {
  6308  		return nil, gensupport.WrapError(err)
  6309  	}
  6310  	ret := &Policy{
  6311  		ServerResponse: googleapi.ServerResponse{
  6312  			Header:         res.Header,
  6313  			HTTPStatusCode: res.StatusCode,
  6314  		},
  6315  	}
  6316  	target := &ret
  6317  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6318  		return nil, err
  6319  	}
  6320  	return ret, nil
  6321  }
  6322  
  6323  type ProjectsLocationsServicesMetadataImportsCreateCall struct {
  6324  	s              *APIService
  6325  	parent         string
  6326  	metadataimport *MetadataImport
  6327  	urlParams_     gensupport.URLParams
  6328  	ctx_           context.Context
  6329  	header_        http.Header
  6330  }
  6331  
  6332  // Create: Creates a new MetadataImport in a given project and location.
  6333  //
  6334  //   - parent: The relative resource name of the service in which to create a
  6335  //     metastore import, in the following
  6336  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  6337  //     }.
  6338  func (r *ProjectsLocationsServicesMetadataImportsService) Create(parent string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsCreateCall {
  6339  	c := &ProjectsLocationsServicesMetadataImportsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6340  	c.parent = parent
  6341  	c.metadataimport = metadataimport
  6342  	return c
  6343  }
  6344  
  6345  // MetadataImportId sets the optional parameter "metadataImportId": Required.
  6346  // The ID of the metadata import, which is used as the final component of the
  6347  // metadata import's name.This value must be between 1 and 64 characters long,
  6348  // begin with a letter, end with a letter or number, and consist of
  6349  // alpha-numeric ASCII characters or hyphens.
  6350  func (c *ProjectsLocationsServicesMetadataImportsCreateCall) MetadataImportId(metadataImportId string) *ProjectsLocationsServicesMetadataImportsCreateCall {
  6351  	c.urlParams_.Set("metadataImportId", metadataImportId)
  6352  	return c
  6353  }
  6354  
  6355  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  6356  // unique request ID to allow the server to ignore the request if it has
  6357  // completed. The server will ignore subsequent requests that provide a
  6358  // duplicate request ID for at least 60 minutes after the first request.For
  6359  // example, if an initial request times out, followed by another request with
  6360  // the same request ID, the server ignores the second request to prevent the
  6361  // creation of duplicate commitments.The request ID must be a valid UUID
  6362  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  6363  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  6364  func (c *ProjectsLocationsServicesMetadataImportsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsCreateCall {
  6365  	c.urlParams_.Set("requestId", requestId)
  6366  	return c
  6367  }
  6368  
  6369  // Fields allows partial responses to be retrieved. See
  6370  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6371  // details.
  6372  func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsCreateCall {
  6373  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6374  	return c
  6375  }
  6376  
  6377  // Context sets the context to be used in this call's Do method.
  6378  func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsCreateCall {
  6379  	c.ctx_ = ctx
  6380  	return c
  6381  }
  6382  
  6383  // Header returns a http.Header that can be modified by the caller to add
  6384  // headers to the request.
  6385  func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Header() http.Header {
  6386  	if c.header_ == nil {
  6387  		c.header_ = make(http.Header)
  6388  	}
  6389  	return c.header_
  6390  }
  6391  
  6392  func (c *ProjectsLocationsServicesMetadataImportsCreateCall) doRequest(alt string) (*http.Response, error) {
  6393  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6394  	var body io.Reader = nil
  6395  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadataimport)
  6396  	if err != nil {
  6397  		return nil, err
  6398  	}
  6399  	c.urlParams_.Set("alt", alt)
  6400  	c.urlParams_.Set("prettyPrint", "false")
  6401  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataImports")
  6402  	urls += "?" + c.urlParams_.Encode()
  6403  	req, err := http.NewRequest("POST", urls, body)
  6404  	if err != nil {
  6405  		return nil, err
  6406  	}
  6407  	req.Header = reqHeaders
  6408  	googleapi.Expand(req.URL, map[string]string{
  6409  		"parent": c.parent,
  6410  	})
  6411  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6412  }
  6413  
  6414  // Do executes the "metastore.projects.locations.services.metadataImports.create" call.
  6415  // Any non-2xx status code is an error. Response headers are in either
  6416  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6417  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6418  // whether the returned error was because http.StatusNotModified was returned.
  6419  func (c *ProjectsLocationsServicesMetadataImportsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6420  	gensupport.SetOptions(c.urlParams_, opts...)
  6421  	res, err := c.doRequest("json")
  6422  	if res != nil && res.StatusCode == http.StatusNotModified {
  6423  		if res.Body != nil {
  6424  			res.Body.Close()
  6425  		}
  6426  		return nil, gensupport.WrapError(&googleapi.Error{
  6427  			Code:   res.StatusCode,
  6428  			Header: res.Header,
  6429  		})
  6430  	}
  6431  	if err != nil {
  6432  		return nil, err
  6433  	}
  6434  	defer googleapi.CloseBody(res)
  6435  	if err := googleapi.CheckResponse(res); err != nil {
  6436  		return nil, gensupport.WrapError(err)
  6437  	}
  6438  	ret := &Operation{
  6439  		ServerResponse: googleapi.ServerResponse{
  6440  			Header:         res.Header,
  6441  			HTTPStatusCode: res.StatusCode,
  6442  		},
  6443  	}
  6444  	target := &ret
  6445  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6446  		return nil, err
  6447  	}
  6448  	return ret, nil
  6449  }
  6450  
  6451  type ProjectsLocationsServicesMetadataImportsGetCall struct {
  6452  	s            *APIService
  6453  	name         string
  6454  	urlParams_   gensupport.URLParams
  6455  	ifNoneMatch_ string
  6456  	ctx_         context.Context
  6457  	header_      http.Header
  6458  }
  6459  
  6460  // Get: Gets details of a single import.
  6461  //
  6462  //   - name: The relative resource name of the metadata import to retrieve, in
  6463  //     the following
  6464  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  6465  //     }/metadataImports/{import_id}.
  6466  func (r *ProjectsLocationsServicesMetadataImportsService) Get(name string) *ProjectsLocationsServicesMetadataImportsGetCall {
  6467  	c := &ProjectsLocationsServicesMetadataImportsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6468  	c.name = name
  6469  	return c
  6470  }
  6471  
  6472  // Fields allows partial responses to be retrieved. See
  6473  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6474  // details.
  6475  func (c *ProjectsLocationsServicesMetadataImportsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsGetCall {
  6476  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6477  	return c
  6478  }
  6479  
  6480  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6481  // object's ETag matches the given value. This is useful for getting updates
  6482  // only after the object has changed since the last request.
  6483  func (c *ProjectsLocationsServicesMetadataImportsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsGetCall {
  6484  	c.ifNoneMatch_ = entityTag
  6485  	return c
  6486  }
  6487  
  6488  // Context sets the context to be used in this call's Do method.
  6489  func (c *ProjectsLocationsServicesMetadataImportsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsGetCall {
  6490  	c.ctx_ = ctx
  6491  	return c
  6492  }
  6493  
  6494  // Header returns a http.Header that can be modified by the caller to add
  6495  // headers to the request.
  6496  func (c *ProjectsLocationsServicesMetadataImportsGetCall) Header() http.Header {
  6497  	if c.header_ == nil {
  6498  		c.header_ = make(http.Header)
  6499  	}
  6500  	return c.header_
  6501  }
  6502  
  6503  func (c *ProjectsLocationsServicesMetadataImportsGetCall) doRequest(alt string) (*http.Response, error) {
  6504  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6505  	if c.ifNoneMatch_ != "" {
  6506  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6507  	}
  6508  	var body io.Reader = nil
  6509  	c.urlParams_.Set("alt", alt)
  6510  	c.urlParams_.Set("prettyPrint", "false")
  6511  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6512  	urls += "?" + c.urlParams_.Encode()
  6513  	req, err := http.NewRequest("GET", urls, body)
  6514  	if err != nil {
  6515  		return nil, err
  6516  	}
  6517  	req.Header = reqHeaders
  6518  	googleapi.Expand(req.URL, map[string]string{
  6519  		"name": c.name,
  6520  	})
  6521  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6522  }
  6523  
  6524  // Do executes the "metastore.projects.locations.services.metadataImports.get" call.
  6525  // Any non-2xx status code is an error. Response headers are in either
  6526  // *MetadataImport.ServerResponse.Header or (if a response was returned at all)
  6527  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6528  // whether the returned error was because http.StatusNotModified was returned.
  6529  func (c *ProjectsLocationsServicesMetadataImportsGetCall) Do(opts ...googleapi.CallOption) (*MetadataImport, error) {
  6530  	gensupport.SetOptions(c.urlParams_, opts...)
  6531  	res, err := c.doRequest("json")
  6532  	if res != nil && res.StatusCode == http.StatusNotModified {
  6533  		if res.Body != nil {
  6534  			res.Body.Close()
  6535  		}
  6536  		return nil, gensupport.WrapError(&googleapi.Error{
  6537  			Code:   res.StatusCode,
  6538  			Header: res.Header,
  6539  		})
  6540  	}
  6541  	if err != nil {
  6542  		return nil, err
  6543  	}
  6544  	defer googleapi.CloseBody(res)
  6545  	if err := googleapi.CheckResponse(res); err != nil {
  6546  		return nil, gensupport.WrapError(err)
  6547  	}
  6548  	ret := &MetadataImport{
  6549  		ServerResponse: googleapi.ServerResponse{
  6550  			Header:         res.Header,
  6551  			HTTPStatusCode: res.StatusCode,
  6552  		},
  6553  	}
  6554  	target := &ret
  6555  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6556  		return nil, err
  6557  	}
  6558  	return ret, nil
  6559  }
  6560  
  6561  type ProjectsLocationsServicesMetadataImportsListCall struct {
  6562  	s            *APIService
  6563  	parent       string
  6564  	urlParams_   gensupport.URLParams
  6565  	ifNoneMatch_ string
  6566  	ctx_         context.Context
  6567  	header_      http.Header
  6568  }
  6569  
  6570  // List: Lists imports in a service.
  6571  //
  6572  //   - parent: The relative resource name of the service whose metadata imports
  6573  //     to list, in the following
  6574  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  6575  //     }/metadataImports.
  6576  func (r *ProjectsLocationsServicesMetadataImportsService) List(parent string) *ProjectsLocationsServicesMetadataImportsListCall {
  6577  	c := &ProjectsLocationsServicesMetadataImportsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6578  	c.parent = parent
  6579  	return c
  6580  }
  6581  
  6582  // Filter sets the optional parameter "filter": The filter to apply to list
  6583  // results.
  6584  func (c *ProjectsLocationsServicesMetadataImportsListCall) Filter(filter string) *ProjectsLocationsServicesMetadataImportsListCall {
  6585  	c.urlParams_.Set("filter", filter)
  6586  	return c
  6587  }
  6588  
  6589  // OrderBy sets the optional parameter "orderBy": Specify the ordering of
  6590  // results as described in Sorting Order
  6591  // (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not
  6592  // specified, the results will be sorted in the default order.
  6593  func (c *ProjectsLocationsServicesMetadataImportsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMetadataImportsListCall {
  6594  	c.urlParams_.Set("orderBy", orderBy)
  6595  	return c
  6596  }
  6597  
  6598  // PageSize sets the optional parameter "pageSize": The maximum number of
  6599  // imports to return. The response may contain less than the maximum number. If
  6600  // unspecified, no more than 500 imports are returned. The maximum value is
  6601  // 1000; values above 1000 are changed to 1000.
  6602  func (c *ProjectsLocationsServicesMetadataImportsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMetadataImportsListCall {
  6603  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6604  	return c
  6605  }
  6606  
  6607  // PageToken sets the optional parameter "pageToken": A page token, received
  6608  // from a previous DataprocMetastore.ListServices call. Provide this token to
  6609  // retrieve the subsequent page.To retrieve the first page, supply an empty
  6610  // page token.When paginating, other parameters provided to
  6611  // DataprocMetastore.ListServices must match the call that provided the page
  6612  // token.
  6613  func (c *ProjectsLocationsServicesMetadataImportsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMetadataImportsListCall {
  6614  	c.urlParams_.Set("pageToken", pageToken)
  6615  	return c
  6616  }
  6617  
  6618  // Fields allows partial responses to be retrieved. See
  6619  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6620  // details.
  6621  func (c *ProjectsLocationsServicesMetadataImportsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsListCall {
  6622  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6623  	return c
  6624  }
  6625  
  6626  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6627  // object's ETag matches the given value. This is useful for getting updates
  6628  // only after the object has changed since the last request.
  6629  func (c *ProjectsLocationsServicesMetadataImportsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMetadataImportsListCall {
  6630  	c.ifNoneMatch_ = entityTag
  6631  	return c
  6632  }
  6633  
  6634  // Context sets the context to be used in this call's Do method.
  6635  func (c *ProjectsLocationsServicesMetadataImportsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsListCall {
  6636  	c.ctx_ = ctx
  6637  	return c
  6638  }
  6639  
  6640  // Header returns a http.Header that can be modified by the caller to add
  6641  // headers to the request.
  6642  func (c *ProjectsLocationsServicesMetadataImportsListCall) Header() http.Header {
  6643  	if c.header_ == nil {
  6644  		c.header_ = make(http.Header)
  6645  	}
  6646  	return c.header_
  6647  }
  6648  
  6649  func (c *ProjectsLocationsServicesMetadataImportsListCall) doRequest(alt string) (*http.Response, error) {
  6650  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6651  	if c.ifNoneMatch_ != "" {
  6652  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6653  	}
  6654  	var body io.Reader = nil
  6655  	c.urlParams_.Set("alt", alt)
  6656  	c.urlParams_.Set("prettyPrint", "false")
  6657  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataImports")
  6658  	urls += "?" + c.urlParams_.Encode()
  6659  	req, err := http.NewRequest("GET", urls, body)
  6660  	if err != nil {
  6661  		return nil, err
  6662  	}
  6663  	req.Header = reqHeaders
  6664  	googleapi.Expand(req.URL, map[string]string{
  6665  		"parent": c.parent,
  6666  	})
  6667  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6668  }
  6669  
  6670  // Do executes the "metastore.projects.locations.services.metadataImports.list" call.
  6671  // Any non-2xx status code is an error. Response headers are in either
  6672  // *ListMetadataImportsResponse.ServerResponse.Header or (if a response was
  6673  // returned at all) in error.(*googleapi.Error).Header. Use
  6674  // googleapi.IsNotModified to check whether the returned error was because
  6675  // http.StatusNotModified was returned.
  6676  func (c *ProjectsLocationsServicesMetadataImportsListCall) Do(opts ...googleapi.CallOption) (*ListMetadataImportsResponse, error) {
  6677  	gensupport.SetOptions(c.urlParams_, opts...)
  6678  	res, err := c.doRequest("json")
  6679  	if res != nil && res.StatusCode == http.StatusNotModified {
  6680  		if res.Body != nil {
  6681  			res.Body.Close()
  6682  		}
  6683  		return nil, gensupport.WrapError(&googleapi.Error{
  6684  			Code:   res.StatusCode,
  6685  			Header: res.Header,
  6686  		})
  6687  	}
  6688  	if err != nil {
  6689  		return nil, err
  6690  	}
  6691  	defer googleapi.CloseBody(res)
  6692  	if err := googleapi.CheckResponse(res); err != nil {
  6693  		return nil, gensupport.WrapError(err)
  6694  	}
  6695  	ret := &ListMetadataImportsResponse{
  6696  		ServerResponse: googleapi.ServerResponse{
  6697  			Header:         res.Header,
  6698  			HTTPStatusCode: res.StatusCode,
  6699  		},
  6700  	}
  6701  	target := &ret
  6702  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6703  		return nil, err
  6704  	}
  6705  	return ret, nil
  6706  }
  6707  
  6708  // Pages invokes f for each page of results.
  6709  // A non-nil error returned from f will halt the iteration.
  6710  // The provided context supersedes any context provided to the Context method.
  6711  func (c *ProjectsLocationsServicesMetadataImportsListCall) Pages(ctx context.Context, f func(*ListMetadataImportsResponse) error) error {
  6712  	c.ctx_ = ctx
  6713  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6714  	for {
  6715  		x, err := c.Do()
  6716  		if err != nil {
  6717  			return err
  6718  		}
  6719  		if err := f(x); err != nil {
  6720  			return err
  6721  		}
  6722  		if x.NextPageToken == "" {
  6723  			return nil
  6724  		}
  6725  		c.PageToken(x.NextPageToken)
  6726  	}
  6727  }
  6728  
  6729  type ProjectsLocationsServicesMetadataImportsPatchCall struct {
  6730  	s              *APIService
  6731  	name           string
  6732  	metadataimport *MetadataImport
  6733  	urlParams_     gensupport.URLParams
  6734  	ctx_           context.Context
  6735  	header_        http.Header
  6736  }
  6737  
  6738  // Patch: Updates a single import. Only the description field of MetadataImport
  6739  // is supported to be updated.
  6740  //
  6741  //   - name: Immutable. The relative resource name of the metadata import, of the
  6742  //     form:projects/{project_number}/locations/{location_id}/services/{service_id
  6743  //     }/metadataImports/{metadata_import_id}.
  6744  func (r *ProjectsLocationsServicesMetadataImportsService) Patch(name string, metadataimport *MetadataImport) *ProjectsLocationsServicesMetadataImportsPatchCall {
  6745  	c := &ProjectsLocationsServicesMetadataImportsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6746  	c.name = name
  6747  	c.metadataimport = metadataimport
  6748  	return c
  6749  }
  6750  
  6751  // RequestId sets the optional parameter "requestId": A request ID. Specify a
  6752  // unique request ID to allow the server to ignore the request if it has
  6753  // completed. The server will ignore subsequent requests that provide a
  6754  // duplicate request ID for at least 60 minutes after the first request.For
  6755  // example, if an initial request times out, followed by another request with
  6756  // the same request ID, the server ignores the second request to prevent the
  6757  // creation of duplicate commitments.The request ID must be a valid UUID
  6758  // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero
  6759  // UUID (00000000-0000-0000-0000-000000000000) is not supported.
  6760  func (c *ProjectsLocationsServicesMetadataImportsPatchCall) RequestId(requestId string) *ProjectsLocationsServicesMetadataImportsPatchCall {
  6761  	c.urlParams_.Set("requestId", requestId)
  6762  	return c
  6763  }
  6764  
  6765  // UpdateMask sets the optional parameter "updateMask": Required. A field mask
  6766  // used to specify the fields to be overwritten in the metadata import resource
  6767  // by the update. Fields specified in the update_mask are relative to the
  6768  // resource (not to the full request). A field is overwritten if it is in the
  6769  // mask.
  6770  func (c *ProjectsLocationsServicesMetadataImportsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesMetadataImportsPatchCall {
  6771  	c.urlParams_.Set("updateMask", updateMask)
  6772  	return c
  6773  }
  6774  
  6775  // Fields allows partial responses to be retrieved. See
  6776  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6777  // details.
  6778  func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMetadataImportsPatchCall {
  6779  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6780  	return c
  6781  }
  6782  
  6783  // Context sets the context to be used in this call's Do method.
  6784  func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesMetadataImportsPatchCall {
  6785  	c.ctx_ = ctx
  6786  	return c
  6787  }
  6788  
  6789  // Header returns a http.Header that can be modified by the caller to add
  6790  // headers to the request.
  6791  func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Header() http.Header {
  6792  	if c.header_ == nil {
  6793  		c.header_ = make(http.Header)
  6794  	}
  6795  	return c.header_
  6796  }
  6797  
  6798  func (c *ProjectsLocationsServicesMetadataImportsPatchCall) doRequest(alt string) (*http.Response, error) {
  6799  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6800  	var body io.Reader = nil
  6801  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadataimport)
  6802  	if err != nil {
  6803  		return nil, err
  6804  	}
  6805  	c.urlParams_.Set("alt", alt)
  6806  	c.urlParams_.Set("prettyPrint", "false")
  6807  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6808  	urls += "?" + c.urlParams_.Encode()
  6809  	req, err := http.NewRequest("PATCH", urls, body)
  6810  	if err != nil {
  6811  		return nil, err
  6812  	}
  6813  	req.Header = reqHeaders
  6814  	googleapi.Expand(req.URL, map[string]string{
  6815  		"name": c.name,
  6816  	})
  6817  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6818  }
  6819  
  6820  // Do executes the "metastore.projects.locations.services.metadataImports.patch" call.
  6821  // Any non-2xx status code is an error. Response headers are in either
  6822  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6823  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6824  // whether the returned error was because http.StatusNotModified was returned.
  6825  func (c *ProjectsLocationsServicesMetadataImportsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6826  	gensupport.SetOptions(c.urlParams_, opts...)
  6827  	res, err := c.doRequest("json")
  6828  	if res != nil && res.StatusCode == http.StatusNotModified {
  6829  		if res.Body != nil {
  6830  			res.Body.Close()
  6831  		}
  6832  		return nil, gensupport.WrapError(&googleapi.Error{
  6833  			Code:   res.StatusCode,
  6834  			Header: res.Header,
  6835  		})
  6836  	}
  6837  	if err != nil {
  6838  		return nil, err
  6839  	}
  6840  	defer googleapi.CloseBody(res)
  6841  	if err := googleapi.CheckResponse(res); err != nil {
  6842  		return nil, gensupport.WrapError(err)
  6843  	}
  6844  	ret := &Operation{
  6845  		ServerResponse: googleapi.ServerResponse{
  6846  			Header:         res.Header,
  6847  			HTTPStatusCode: res.StatusCode,
  6848  		},
  6849  	}
  6850  	target := &ret
  6851  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6852  		return nil, err
  6853  	}
  6854  	return ret, nil
  6855  }
  6856  

View as plain text