...

Source file src/google.golang.org/api/apigateway/v1beta/apigateway-gen.go

Documentation: google.golang.org/api/apigateway/v1beta

     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 apigateway provides access to the API Gateway API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/api-gateway/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/apigateway/v1beta"
    27  //	...
    28  //	ctx := context.Background()
    29  //	apigatewayService, err := apigateway.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  //	apigatewayService, err := apigateway.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  //	apigatewayService, err := apigateway.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package apigateway // import "google.golang.org/api/apigateway/v1beta"
    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 = "apigateway:v1beta"
    90  const apiName = "apigateway"
    91  const apiVersion = "v1beta"
    92  const basePath = "https://apigateway.googleapis.com/"
    93  const basePathTemplate = "https://apigateway.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://apigateway.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 Service.
   104  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, 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 Service. 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) (*Service, error) {
   134  	if client == nil {
   135  		return nil, errors.New("client is nil")
   136  	}
   137  	s := &Service{client: client, BasePath: basePath}
   138  	s.Projects = NewProjectsService(s)
   139  	return s, nil
   140  }
   141  
   142  type Service 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 *Service) userAgent() string {
   151  	if s.UserAgent == "" {
   152  		return googleapi.UserAgent
   153  	}
   154  	return googleapi.UserAgent + " " + s.UserAgent
   155  }
   156  
   157  func NewProjectsService(s *Service) *ProjectsService {
   158  	rs := &ProjectsService{s: s}
   159  	rs.Locations = NewProjectsLocationsService(s)
   160  	return rs
   161  }
   162  
   163  type ProjectsService struct {
   164  	s *Service
   165  
   166  	Locations *ProjectsLocationsService
   167  }
   168  
   169  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   170  	rs := &ProjectsLocationsService{s: s}
   171  	rs.Apis = NewProjectsLocationsApisService(s)
   172  	rs.Gateways = NewProjectsLocationsGatewaysService(s)
   173  	rs.Operations = NewProjectsLocationsOperationsService(s)
   174  	return rs
   175  }
   176  
   177  type ProjectsLocationsService struct {
   178  	s *Service
   179  
   180  	Apis *ProjectsLocationsApisService
   181  
   182  	Gateways *ProjectsLocationsGatewaysService
   183  
   184  	Operations *ProjectsLocationsOperationsService
   185  }
   186  
   187  func NewProjectsLocationsApisService(s *Service) *ProjectsLocationsApisService {
   188  	rs := &ProjectsLocationsApisService{s: s}
   189  	rs.Configs = NewProjectsLocationsApisConfigsService(s)
   190  	return rs
   191  }
   192  
   193  type ProjectsLocationsApisService struct {
   194  	s *Service
   195  
   196  	Configs *ProjectsLocationsApisConfigsService
   197  }
   198  
   199  func NewProjectsLocationsApisConfigsService(s *Service) *ProjectsLocationsApisConfigsService {
   200  	rs := &ProjectsLocationsApisConfigsService{s: s}
   201  	return rs
   202  }
   203  
   204  type ProjectsLocationsApisConfigsService struct {
   205  	s *Service
   206  }
   207  
   208  func NewProjectsLocationsGatewaysService(s *Service) *ProjectsLocationsGatewaysService {
   209  	rs := &ProjectsLocationsGatewaysService{s: s}
   210  	return rs
   211  }
   212  
   213  type ProjectsLocationsGatewaysService struct {
   214  	s *Service
   215  }
   216  
   217  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   218  	rs := &ProjectsLocationsOperationsService{s: s}
   219  	return rs
   220  }
   221  
   222  type ProjectsLocationsOperationsService struct {
   223  	s *Service
   224  }
   225  
   226  // ApigatewayApi: An API that can be served by one or more Gateways.
   227  type ApigatewayApi struct {
   228  	// CreateTime: Output only. Created time.
   229  	CreateTime string `json:"createTime,omitempty"`
   230  	// DisplayName: Optional. Display name.
   231  	DisplayName string `json:"displayName,omitempty"`
   232  	// Labels: Optional. Resource labels to represent user-provided metadata. Refer
   233  	// to cloud documentation on labels for more details.
   234  	// https://cloud.google.com/compute/docs/labeling-resources
   235  	Labels map[string]string `json:"labels,omitempty"`
   236  	// ManagedService: Optional. Immutable. The name of a Google Managed Service (
   237  	// https://cloud.google.com/service-infrastructure/docs/glossary#managed). If
   238  	// not specified, a new Service will automatically be created in the same
   239  	// project as this API.
   240  	ManagedService string `json:"managedService,omitempty"`
   241  	// Name: Output only. Resource name of the API. Format:
   242  	// projects/{project}/locations/global/apis/{api}
   243  	Name string `json:"name,omitempty"`
   244  	// State: Output only. State of the API.
   245  	//
   246  	// Possible values:
   247  	//   "STATE_UNSPECIFIED" - API does not have a state yet.
   248  	//   "CREATING" - API is being created.
   249  	//   "ACTIVE" - API is active.
   250  	//   "FAILED" - API creation failed.
   251  	//   "DELETING" - API is being deleted.
   252  	//   "UPDATING" - API is being updated.
   253  	State string `json:"state,omitempty"`
   254  	// UpdateTime: Output only. Updated time.
   255  	UpdateTime string `json:"updateTime,omitempty"`
   256  
   257  	// ServerResponse contains the HTTP response code and headers from the server.
   258  	googleapi.ServerResponse `json:"-"`
   259  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   260  	// unconditionally include in API requests. By default, fields with empty or
   261  	// default values are omitted from API requests. See
   262  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   263  	// details.
   264  	ForceSendFields []string `json:"-"`
   265  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   266  	// requests with the JSON null value. By default, fields with empty values are
   267  	// omitted from API requests. See
   268  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   269  	NullFields []string `json:"-"`
   270  }
   271  
   272  func (s *ApigatewayApi) MarshalJSON() ([]byte, error) {
   273  	type NoMethod ApigatewayApi
   274  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   275  }
   276  
   277  // ApigatewayApiConfig: An API Configuration is a combination of settings for
   278  // both the Managed Service and Gateways serving this API Config.
   279  type ApigatewayApiConfig struct {
   280  	// CreateTime: Output only. Created time.
   281  	CreateTime string `json:"createTime,omitempty"`
   282  	// DisplayName: Optional. Display name.
   283  	DisplayName string `json:"displayName,omitempty"`
   284  	// GatewayConfig: Immutable. Gateway specific configuration.
   285  	GatewayConfig *ApigatewayGatewayConfig `json:"gatewayConfig,omitempty"`
   286  	// GatewayServiceAccount: Immutable. The Google Cloud IAM Service Account that
   287  	// Gateways serving this config should use to authenticate to other services.
   288  	// This may either be the Service Account's email
   289  	// (`{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com`) or its full resource name
   290  	// (`projects/{PROJECT}/accounts/{UNIQUE_ID}`). This is most often used when
   291  	// the service is a GCP resource such as a Cloud Run Service or an IAP-secured
   292  	// service.
   293  	GatewayServiceAccount string `json:"gatewayServiceAccount,omitempty"`
   294  	// GrpcServices: Optional. gRPC service definition files. If specified,
   295  	// openapi_documents must not be included.
   296  	GrpcServices []*ApigatewayApiConfigGrpcServiceDefinition `json:"grpcServices,omitempty"`
   297  	// Labels: Optional. Resource labels to represent user-provided metadata. Refer
   298  	// to cloud documentation on labels for more details.
   299  	// https://cloud.google.com/compute/docs/labeling-resources
   300  	Labels map[string]string `json:"labels,omitempty"`
   301  	// ManagedServiceConfigs: Optional. Service Configuration files. At least one
   302  	// must be included when using gRPC service definitions. See
   303  	// https://cloud.google.com/endpoints/docs/grpc/grpc-service-config#service_configuration_overview
   304  	// for the expected file contents. If multiple files are specified, the files
   305  	// are merged with the following rules: * All singular scalar fields are merged
   306  	// using "last one wins" semantics in the order of the files uploaded. *
   307  	// Repeated fields are concatenated. * Singular embedded messages are merged
   308  	// using these rules for nested fields.
   309  	ManagedServiceConfigs []*ApigatewayApiConfigFile `json:"managedServiceConfigs,omitempty"`
   310  	// Name: Output only. Resource name of the API Config. Format:
   311  	// projects/{project}/locations/global/apis/{api}/configs/{api_config}
   312  	Name string `json:"name,omitempty"`
   313  	// OpenapiDocuments: Optional. OpenAPI specification documents. If specified,
   314  	// grpc_services and managed_service_configs must not be included.
   315  	OpenapiDocuments []*ApigatewayApiConfigOpenApiDocument `json:"openapiDocuments,omitempty"`
   316  	// ServiceConfigId: Output only. The ID of the associated Service Config (
   317  	// https://cloud.google.com/service-infrastructure/docs/glossary#config).
   318  	ServiceConfigId string `json:"serviceConfigId,omitempty"`
   319  	// State: Output only. State of the API Config.
   320  	//
   321  	// Possible values:
   322  	//   "STATE_UNSPECIFIED" - API Config does not have a state yet.
   323  	//   "CREATING" - API Config is being created and deployed to the API
   324  	// Controller.
   325  	//   "ACTIVE" - API Config is ready for use by Gateways.
   326  	//   "FAILED" - API Config creation failed.
   327  	//   "DELETING" - API Config is being deleted.
   328  	//   "UPDATING" - API Config is being updated.
   329  	//   "ACTIVATING" - API Config settings are being activated in downstream
   330  	// systems. API Configs in this state cannot be used by Gateways.
   331  	State string `json:"state,omitempty"`
   332  	// UpdateTime: Output only. Updated time.
   333  	UpdateTime string `json:"updateTime,omitempty"`
   334  
   335  	// ServerResponse contains the HTTP response code and headers from the server.
   336  	googleapi.ServerResponse `json:"-"`
   337  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   338  	// unconditionally include in API requests. By default, fields with empty or
   339  	// default values are omitted from API requests. See
   340  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   341  	// details.
   342  	ForceSendFields []string `json:"-"`
   343  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   344  	// requests with the JSON null value. By default, fields with empty values are
   345  	// omitted from API requests. See
   346  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   347  	NullFields []string `json:"-"`
   348  }
   349  
   350  func (s *ApigatewayApiConfig) MarshalJSON() ([]byte, error) {
   351  	type NoMethod ApigatewayApiConfig
   352  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   353  }
   354  
   355  // ApigatewayApiConfigFile: A lightweight description of a file.
   356  type ApigatewayApiConfigFile struct {
   357  	// Contents: The bytes that constitute the file.
   358  	Contents string `json:"contents,omitempty"`
   359  	// Path: The file path (full or relative path). This is typically the path of
   360  	// the file when it is uploaded.
   361  	Path string `json:"path,omitempty"`
   362  	// ForceSendFields is a list of field names (e.g. "Contents") to
   363  	// unconditionally include in API requests. By default, fields with empty or
   364  	// default values are omitted from API requests. See
   365  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   366  	// details.
   367  	ForceSendFields []string `json:"-"`
   368  	// NullFields is a list of field names (e.g. "Contents") to include in API
   369  	// requests with the JSON null value. By default, fields with empty values are
   370  	// omitted from API requests. See
   371  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   372  	NullFields []string `json:"-"`
   373  }
   374  
   375  func (s *ApigatewayApiConfigFile) MarshalJSON() ([]byte, error) {
   376  	type NoMethod ApigatewayApiConfigFile
   377  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   378  }
   379  
   380  // ApigatewayApiConfigGrpcServiceDefinition: A gRPC service definition.
   381  type ApigatewayApiConfigGrpcServiceDefinition struct {
   382  	// FileDescriptorSet: Input only. File descriptor set, generated by protoc. To
   383  	// generate, use protoc with imports and source info included. For an example
   384  	// test.proto file, the following command would put the value in a new file
   385  	// named out.pb. $ protoc --include_imports --include_source_info test.proto -o
   386  	// out.pb
   387  	FileDescriptorSet *ApigatewayApiConfigFile `json:"fileDescriptorSet,omitempty"`
   388  	// Source: Optional. Uncompiled proto files associated with the descriptor set,
   389  	// used for display purposes (server-side compilation is not supported). These
   390  	// should match the inputs to 'protoc' command used to generate
   391  	// file_descriptor_set.
   392  	Source []*ApigatewayApiConfigFile `json:"source,omitempty"`
   393  	// ForceSendFields is a list of field names (e.g. "FileDescriptorSet") to
   394  	// unconditionally include in API requests. By default, fields with empty or
   395  	// default values are omitted from API requests. See
   396  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   397  	// details.
   398  	ForceSendFields []string `json:"-"`
   399  	// NullFields is a list of field names (e.g. "FileDescriptorSet") to include in
   400  	// API requests with the JSON null value. By default, fields with empty values
   401  	// are omitted from API requests. See
   402  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   403  	NullFields []string `json:"-"`
   404  }
   405  
   406  func (s *ApigatewayApiConfigGrpcServiceDefinition) MarshalJSON() ([]byte, error) {
   407  	type NoMethod ApigatewayApiConfigGrpcServiceDefinition
   408  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   409  }
   410  
   411  // ApigatewayApiConfigOpenApiDocument: An OpenAPI Specification Document
   412  // describing an API.
   413  type ApigatewayApiConfigOpenApiDocument struct {
   414  	// Document: The OpenAPI Specification document file.
   415  	Document *ApigatewayApiConfigFile `json:"document,omitempty"`
   416  	// ForceSendFields is a list of field names (e.g. "Document") to
   417  	// unconditionally include in API requests. By default, fields with empty or
   418  	// default values are omitted from API requests. See
   419  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   420  	// details.
   421  	ForceSendFields []string `json:"-"`
   422  	// NullFields is a list of field names (e.g. "Document") to include in API
   423  	// requests with the JSON null value. By default, fields with empty values are
   424  	// omitted from API requests. See
   425  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   426  	NullFields []string `json:"-"`
   427  }
   428  
   429  func (s *ApigatewayApiConfigOpenApiDocument) MarshalJSON() ([]byte, error) {
   430  	type NoMethod ApigatewayApiConfigOpenApiDocument
   431  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   432  }
   433  
   434  // ApigatewayAuditConfig: Specifies the audit configuration for a service. The
   435  // configuration determines which permission types are logged, and what
   436  // identities, if any, are exempted from logging. An AuditConfig must have one
   437  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   438  // and a specific service, the union of the two AuditConfigs is used for that
   439  // service: the log_types specified in each AuditConfig are enabled, and the
   440  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   441  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   442  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   443  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   444  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   445  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   446  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   447  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   448  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   449  // `aliya@example.com` from DATA_WRITE logging.
   450  type ApigatewayAuditConfig struct {
   451  	// AuditLogConfigs: The configuration for logging of each type of permission.
   452  	AuditLogConfigs []*ApigatewayAuditLogConfig `json:"auditLogConfigs,omitempty"`
   453  	// Service: Specifies a service that will be enabled for audit logging. For
   454  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   455  	// is a special value that covers all services.
   456  	Service string `json:"service,omitempty"`
   457  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   458  	// unconditionally include in API requests. By default, fields with empty or
   459  	// default values are omitted from API requests. See
   460  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   461  	// details.
   462  	ForceSendFields []string `json:"-"`
   463  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   464  	// API requests with the JSON null value. By default, fields with empty values
   465  	// are omitted from API requests. See
   466  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   467  	NullFields []string `json:"-"`
   468  }
   469  
   470  func (s *ApigatewayAuditConfig) MarshalJSON() ([]byte, error) {
   471  	type NoMethod ApigatewayAuditConfig
   472  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   473  }
   474  
   475  // ApigatewayAuditLogConfig: Provides the configuration for logging a type of
   476  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   477  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   478  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   479  // exempting jose@example.com from DATA_READ logging.
   480  type ApigatewayAuditLogConfig struct {
   481  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   482  	// type of permission. Follows the same format of Binding.members.
   483  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   484  	// LogType: The log type that this config enables.
   485  	//
   486  	// Possible values:
   487  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   488  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   489  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   490  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   491  	LogType string `json:"logType,omitempty"`
   492  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   493  	// unconditionally include in API requests. By default, fields with empty or
   494  	// default values are omitted from API requests. See
   495  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   496  	// details.
   497  	ForceSendFields []string `json:"-"`
   498  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   499  	// API requests with the JSON null value. By default, fields with empty values
   500  	// are omitted from API requests. See
   501  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   502  	NullFields []string `json:"-"`
   503  }
   504  
   505  func (s *ApigatewayAuditLogConfig) MarshalJSON() ([]byte, error) {
   506  	type NoMethod ApigatewayAuditLogConfig
   507  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   508  }
   509  
   510  // ApigatewayBackendConfig: Configuration for all backends.
   511  type ApigatewayBackendConfig struct {
   512  	// GoogleServiceAccount: Google Cloud IAM service account used to sign OIDC
   513  	// tokens for backends that have authentication configured
   514  	// (https://cloud.google.com/service-infrastructure/docs/service-management/reference/rest/v1/services.configs#backend).
   515  	// This may either be the Service Account's email (i.e.
   516  	// "{ACCOUNT_ID}@{PROJECT}.iam.gserviceaccount.com") or its full resource name
   517  	// (i.e. "projects/{PROJECT}/accounts/{UNIQUE_ID}"). This is most often used
   518  	// when the backend is a GCP resource such as a Cloud Run Service or an
   519  	// IAP-secured service. Note that this token is always sent as an authorization
   520  	// header bearer token. The audience of the OIDC token is configured in the
   521  	// associated Service Config in the BackendRule option
   522  	// (https://github.com/googleapis/googleapis/blob/master/google/api/backend.proto#L125).
   523  	GoogleServiceAccount string `json:"googleServiceAccount,omitempty"`
   524  	// ForceSendFields is a list of field names (e.g. "GoogleServiceAccount") to
   525  	// unconditionally include in API requests. By default, fields with empty or
   526  	// default values are omitted from API requests. See
   527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   528  	// details.
   529  	ForceSendFields []string `json:"-"`
   530  	// NullFields is a list of field names (e.g. "GoogleServiceAccount") to include
   531  	// in API requests with the JSON null value. By default, fields with empty
   532  	// values are omitted from API requests. See
   533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   534  	NullFields []string `json:"-"`
   535  }
   536  
   537  func (s *ApigatewayBackendConfig) MarshalJSON() ([]byte, error) {
   538  	type NoMethod ApigatewayBackendConfig
   539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   540  }
   541  
   542  // ApigatewayBinding: Associates `members`, or principals, with a `role`.
   543  type ApigatewayBinding struct {
   544  	// Condition: The condition that is associated with this binding. If the
   545  	// condition evaluates to `true`, then this binding applies to the current
   546  	// request. If the condition evaluates to `false`, then this binding does not
   547  	// apply to the current request. However, a different role binding might grant
   548  	// the same role to one or more of the principals in this binding. To learn
   549  	// which resources support conditions in their IAM policies, see the IAM
   550  	// documentation
   551  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   552  	Condition *ApigatewayExpr `json:"condition,omitempty"`
   553  	// Members: Specifies the principals requesting access for a Google Cloud
   554  	// resource. `members` can have the following values: * `allUsers`: A special
   555  	// identifier that represents anyone who is on the internet; with or without a
   556  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   557  	// represents anyone who is authenticated with a Google account or a service
   558  	// account. Does not include identities that come from external identity
   559  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   560  	// address that represents a specific Google account. For example,
   561  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   562  	// represents a Google service account. For example,
   563  	// `my-other-app@appspot.gserviceaccount.com`. *
   564  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   565  	// identifier for a Kubernetes service account
   566  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   567  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   568  	// `group:{emailid}`: An email address that represents a Google group. For
   569  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   570  	// (primary) that represents all the users of that domain. For example,
   571  	// `google.com` or `example.com`. *
   572  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   573  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   574  	// pool. *
   575  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   576  	// group/{group_id}`: All workforce identities in a group. *
   577  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   578  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   579  	// a specific attribute value. *
   580  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   581  	// *`: All identities in a workforce identity pool. *
   582  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   583  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   584  	// identity in a workload identity pool. *
   585  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   586  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   587  	// group. *
   588  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   589  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   590  	// `: All identities in a workload identity pool with a certain attribute. *
   591  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   592  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   593  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   594  	// unique identifier) representing a user that has been recently deleted. For
   595  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   596  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   597  	// retains the role in the binding. *
   598  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   599  	// unique identifier) representing a service account that has been recently
   600  	// deleted. For example,
   601  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   602  	// service account is undeleted, this value reverts to
   603  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   604  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   605  	// address (plus unique identifier) representing a Google group that has been
   606  	// recently deleted. For example,
   607  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   608  	// this value reverts to `group:{emailid}` and the recovered group retains the
   609  	// role in the binding. *
   610  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   611  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   612  	// workforce identity pool. For example,
   613  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   614  	// ol-id/subject/my-subject-attribute-value`.
   615  	Members []string `json:"members,omitempty"`
   616  	// Role: Role that is assigned to the list of `members`, or principals. For
   617  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   618  	// of the IAM roles and permissions, see the IAM documentation
   619  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   620  	// available pre-defined roles, see here
   621  	// (https://cloud.google.com/iam/docs/understanding-roles).
   622  	Role string `json:"role,omitempty"`
   623  	// ForceSendFields is a list of field names (e.g. "Condition") to
   624  	// unconditionally include in API requests. By default, fields with empty or
   625  	// default values are omitted from API requests. See
   626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   627  	// details.
   628  	ForceSendFields []string `json:"-"`
   629  	// NullFields is a list of field names (e.g. "Condition") to include in API
   630  	// requests with the JSON null value. By default, fields with empty values are
   631  	// omitted from API requests. See
   632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   633  	NullFields []string `json:"-"`
   634  }
   635  
   636  func (s *ApigatewayBinding) MarshalJSON() ([]byte, error) {
   637  	type NoMethod ApigatewayBinding
   638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   639  }
   640  
   641  // ApigatewayCancelOperationRequest: The request message for
   642  // Operations.CancelOperation.
   643  type ApigatewayCancelOperationRequest struct {
   644  }
   645  
   646  // ApigatewayExpr: Represents a textual expression in the Common Expression
   647  // Language (CEL) syntax. CEL is a C-like expression language. The syntax and
   648  // semantics of CEL are documented at https://github.com/google/cel-spec.
   649  // Example (Comparison): title: "Summary size limit" description: "Determines
   650  // if a summary is less than 100 chars" expression: "document.summary.size() <
   651  // 100" Example (Equality): title: "Requestor is owner" description:
   652  // "Determines if requestor is the document owner" expression: "document.owner
   653  // == request.auth.claims.email" Example (Logic): title: "Public documents"
   654  // description: "Determine whether the document should be publicly visible"
   655  // expression: "document.type != 'private' && document.type != 'internal'"
   656  // Example (Data Manipulation): title: "Notification string" description:
   657  // "Create a notification string with a timestamp." expression: "'New message
   658  // received at ' + string(document.create_time)" The exact variables and
   659  // functions that may be referenced within an expression are determined by the
   660  // service that evaluates it. See the service documentation for additional
   661  // information.
   662  type ApigatewayExpr struct {
   663  	// Description: Optional. Description of the expression. This is a longer text
   664  	// which describes the expression, e.g. when hovered over it in a UI.
   665  	Description string `json:"description,omitempty"`
   666  	// Expression: Textual representation of an expression in Common Expression
   667  	// Language syntax.
   668  	Expression string `json:"expression,omitempty"`
   669  	// Location: Optional. String indicating the location of the expression for
   670  	// error reporting, e.g. a file name and a position in the file.
   671  	Location string `json:"location,omitempty"`
   672  	// Title: Optional. Title for the expression, i.e. a short string describing
   673  	// its purpose. This can be used e.g. in UIs which allow to enter the
   674  	// expression.
   675  	Title string `json:"title,omitempty"`
   676  	// ForceSendFields is a list of field names (e.g. "Description") to
   677  	// unconditionally include in API requests. By default, fields with empty or
   678  	// default values are omitted from API requests. See
   679  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   680  	// details.
   681  	ForceSendFields []string `json:"-"`
   682  	// NullFields is a list of field names (e.g. "Description") to include in API
   683  	// requests with the JSON null value. By default, fields with empty values are
   684  	// omitted from API requests. See
   685  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   686  	NullFields []string `json:"-"`
   687  }
   688  
   689  func (s *ApigatewayExpr) MarshalJSON() ([]byte, error) {
   690  	type NoMethod ApigatewayExpr
   691  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   692  }
   693  
   694  // ApigatewayGateway: A Gateway is an API-aware HTTP proxy. It performs
   695  // API-Method and/or API-Consumer specific actions based on an API Config such
   696  // as authentication, policy enforcement, and backend selection.
   697  type ApigatewayGateway struct {
   698  	// ApiConfig: Required. Resource name of the API Config for this Gateway.
   699  	// Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}
   700  	ApiConfig string `json:"apiConfig,omitempty"`
   701  	// CreateTime: Output only. Created time.
   702  	CreateTime string `json:"createTime,omitempty"`
   703  	// DefaultHostname: Output only. The default API Gateway host name of the form
   704  	// `{gateway_id}-{hash}.{region_code}.gateway.dev`.
   705  	DefaultHostname string `json:"defaultHostname,omitempty"`
   706  	// DisplayName: Optional. Display name.
   707  	DisplayName string `json:"displayName,omitempty"`
   708  	// Labels: Optional. Resource labels to represent user-provided metadata. Refer
   709  	// to cloud documentation on labels for more details.
   710  	// https://cloud.google.com/compute/docs/labeling-resources
   711  	Labels map[string]string `json:"labels,omitempty"`
   712  	// Name: Output only. Resource name of the Gateway. Format:
   713  	// projects/{project}/locations/{location}/gateways/{gateway}
   714  	Name string `json:"name,omitempty"`
   715  	// State: Output only. The current state of the Gateway.
   716  	//
   717  	// Possible values:
   718  	//   "STATE_UNSPECIFIED" - Gateway does not have a state yet.
   719  	//   "CREATING" - Gateway is being created.
   720  	//   "ACTIVE" - Gateway is running and ready for requests.
   721  	//   "FAILED" - Gateway creation failed.
   722  	//   "DELETING" - Gateway is being deleted.
   723  	//   "UPDATING" - Gateway is being updated.
   724  	State string `json:"state,omitempty"`
   725  	// UpdateTime: Output only. Updated time.
   726  	UpdateTime string `json:"updateTime,omitempty"`
   727  
   728  	// ServerResponse contains the HTTP response code and headers from the server.
   729  	googleapi.ServerResponse `json:"-"`
   730  	// ForceSendFields is a list of field names (e.g. "ApiConfig") to
   731  	// unconditionally include in API requests. By default, fields with empty or
   732  	// default values are omitted from API requests. See
   733  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   734  	// details.
   735  	ForceSendFields []string `json:"-"`
   736  	// NullFields is a list of field names (e.g. "ApiConfig") to include in API
   737  	// requests with the JSON null value. By default, fields with empty values are
   738  	// omitted from API requests. See
   739  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   740  	NullFields []string `json:"-"`
   741  }
   742  
   743  func (s *ApigatewayGateway) MarshalJSON() ([]byte, error) {
   744  	type NoMethod ApigatewayGateway
   745  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   746  }
   747  
   748  // ApigatewayGatewayConfig: Configuration settings for Gateways.
   749  type ApigatewayGatewayConfig struct {
   750  	// BackendConfig: Required. Backend settings that are applied to all backends
   751  	// of the Gateway.
   752  	BackendConfig *ApigatewayBackendConfig `json:"backendConfig,omitempty"`
   753  	// ForceSendFields is a list of field names (e.g. "BackendConfig") to
   754  	// unconditionally include in API requests. By default, fields with empty or
   755  	// default values are omitted from API requests. See
   756  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   757  	// details.
   758  	ForceSendFields []string `json:"-"`
   759  	// NullFields is a list of field names (e.g. "BackendConfig") to include in API
   760  	// requests with the JSON null value. By default, fields with empty values are
   761  	// omitted from API requests. See
   762  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   763  	NullFields []string `json:"-"`
   764  }
   765  
   766  func (s *ApigatewayGatewayConfig) MarshalJSON() ([]byte, error) {
   767  	type NoMethod ApigatewayGatewayConfig
   768  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   769  }
   770  
   771  // ApigatewayListApiConfigsResponse: Response message for
   772  // ApiGatewayService.ListApiConfigs
   773  type ApigatewayListApiConfigsResponse struct {
   774  	// ApiConfigs: API Configs.
   775  	ApiConfigs []*ApigatewayApiConfig `json:"apiConfigs,omitempty"`
   776  	// NextPageToken: Next page token.
   777  	NextPageToken string `json:"nextPageToken,omitempty"`
   778  	// UnreachableLocations: Locations that could not be reached.
   779  	UnreachableLocations []string `json:"unreachableLocations,omitempty"`
   780  
   781  	// ServerResponse contains the HTTP response code and headers from the server.
   782  	googleapi.ServerResponse `json:"-"`
   783  	// ForceSendFields is a list of field names (e.g. "ApiConfigs") to
   784  	// unconditionally include in API requests. By default, fields with empty or
   785  	// default values are omitted from API requests. See
   786  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   787  	// details.
   788  	ForceSendFields []string `json:"-"`
   789  	// NullFields is a list of field names (e.g. "ApiConfigs") to include in API
   790  	// requests with the JSON null value. By default, fields with empty values are
   791  	// omitted from API requests. See
   792  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   793  	NullFields []string `json:"-"`
   794  }
   795  
   796  func (s *ApigatewayListApiConfigsResponse) MarshalJSON() ([]byte, error) {
   797  	type NoMethod ApigatewayListApiConfigsResponse
   798  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   799  }
   800  
   801  // ApigatewayListApisResponse: Response message for ApiGatewayService.ListApis
   802  type ApigatewayListApisResponse struct {
   803  	// Apis: APIs.
   804  	Apis []*ApigatewayApi `json:"apis,omitempty"`
   805  	// NextPageToken: Next page token.
   806  	NextPageToken string `json:"nextPageToken,omitempty"`
   807  	// UnreachableLocations: Locations that could not be reached.
   808  	UnreachableLocations []string `json:"unreachableLocations,omitempty"`
   809  
   810  	// ServerResponse contains the HTTP response code and headers from the server.
   811  	googleapi.ServerResponse `json:"-"`
   812  	// ForceSendFields is a list of field names (e.g. "Apis") to unconditionally
   813  	// include in API requests. By default, fields with empty or default values are
   814  	// omitted from API requests. See
   815  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   816  	// details.
   817  	ForceSendFields []string `json:"-"`
   818  	// NullFields is a list of field names (e.g. "Apis") to include in API requests
   819  	// with the JSON null value. By default, fields with empty values are omitted
   820  	// from API requests. See
   821  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   822  	NullFields []string `json:"-"`
   823  }
   824  
   825  func (s *ApigatewayListApisResponse) MarshalJSON() ([]byte, error) {
   826  	type NoMethod ApigatewayListApisResponse
   827  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   828  }
   829  
   830  // ApigatewayListGatewaysResponse: Response message for
   831  // ApiGatewayService.ListGateways
   832  type ApigatewayListGatewaysResponse struct {
   833  	// Gateways: Gateways.
   834  	Gateways []*ApigatewayGateway `json:"gateways,omitempty"`
   835  	// NextPageToken: Next page token.
   836  	NextPageToken string `json:"nextPageToken,omitempty"`
   837  	// UnreachableLocations: Locations that could not be reached.
   838  	UnreachableLocations []string `json:"unreachableLocations,omitempty"`
   839  
   840  	// ServerResponse contains the HTTP response code and headers from the server.
   841  	googleapi.ServerResponse `json:"-"`
   842  	// ForceSendFields is a list of field names (e.g. "Gateways") to
   843  	// unconditionally include in API requests. By default, fields with empty or
   844  	// default values are omitted from API requests. See
   845  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   846  	// details.
   847  	ForceSendFields []string `json:"-"`
   848  	// NullFields is a list of field names (e.g. "Gateways") to include in API
   849  	// requests with the JSON null value. By default, fields with empty values are
   850  	// omitted from API requests. See
   851  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   852  	NullFields []string `json:"-"`
   853  }
   854  
   855  func (s *ApigatewayListGatewaysResponse) MarshalJSON() ([]byte, error) {
   856  	type NoMethod ApigatewayListGatewaysResponse
   857  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   858  }
   859  
   860  // ApigatewayListLocationsResponse: The response message for
   861  // Locations.ListLocations.
   862  type ApigatewayListLocationsResponse struct {
   863  	// Locations: A list of locations that matches the specified filter in the
   864  	// request.
   865  	Locations []*ApigatewayLocation `json:"locations,omitempty"`
   866  	// NextPageToken: The standard List next-page token.
   867  	NextPageToken string `json:"nextPageToken,omitempty"`
   868  
   869  	// ServerResponse contains the HTTP response code and headers from the server.
   870  	googleapi.ServerResponse `json:"-"`
   871  	// ForceSendFields is a list of field names (e.g. "Locations") to
   872  	// unconditionally include in API requests. By default, fields with empty or
   873  	// default values are omitted from API requests. See
   874  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   875  	// details.
   876  	ForceSendFields []string `json:"-"`
   877  	// NullFields is a list of field names (e.g. "Locations") to include in API
   878  	// requests with the JSON null value. By default, fields with empty values are
   879  	// omitted from API requests. See
   880  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   881  	NullFields []string `json:"-"`
   882  }
   883  
   884  func (s *ApigatewayListLocationsResponse) MarshalJSON() ([]byte, error) {
   885  	type NoMethod ApigatewayListLocationsResponse
   886  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   887  }
   888  
   889  // ApigatewayListOperationsResponse: The response message for
   890  // Operations.ListOperations.
   891  type ApigatewayListOperationsResponse struct {
   892  	// NextPageToken: The standard List next-page token.
   893  	NextPageToken string `json:"nextPageToken,omitempty"`
   894  	// Operations: A list of operations that matches the specified filter in the
   895  	// request.
   896  	Operations []*ApigatewayOperation `json:"operations,omitempty"`
   897  
   898  	// ServerResponse contains the HTTP response code and headers from the server.
   899  	googleapi.ServerResponse `json:"-"`
   900  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   901  	// unconditionally include in API requests. By default, fields with empty or
   902  	// default values are omitted from API requests. See
   903  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   904  	// details.
   905  	ForceSendFields []string `json:"-"`
   906  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   907  	// requests with the JSON null value. By default, fields with empty values are
   908  	// omitted from API requests. See
   909  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   910  	NullFields []string `json:"-"`
   911  }
   912  
   913  func (s *ApigatewayListOperationsResponse) MarshalJSON() ([]byte, error) {
   914  	type NoMethod ApigatewayListOperationsResponse
   915  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   916  }
   917  
   918  // ApigatewayLocation: A resource that represents a Google Cloud location.
   919  type ApigatewayLocation struct {
   920  	// DisplayName: The friendly name for this location, typically a nearby city
   921  	// name. For example, "Tokyo".
   922  	DisplayName string `json:"displayName,omitempty"`
   923  	// Labels: Cross-service attributes for the location. For example
   924  	// {"cloud.googleapis.com/region": "us-east1"}
   925  	Labels map[string]string `json:"labels,omitempty"`
   926  	// LocationId: The canonical id for this location. For example: "us-east1".
   927  	LocationId string `json:"locationId,omitempty"`
   928  	// Metadata: Service-specific metadata. For example the available capacity at
   929  	// the given location.
   930  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   931  	// Name: Resource name for the location, which may vary between
   932  	// implementations. For example:
   933  	// "projects/example-project/locations/us-east1"
   934  	Name string `json:"name,omitempty"`
   935  
   936  	// ServerResponse contains the HTTP response code and headers from the server.
   937  	googleapi.ServerResponse `json:"-"`
   938  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
   939  	// unconditionally include in API requests. By default, fields with empty or
   940  	// default values are omitted from API requests. See
   941  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   942  	// details.
   943  	ForceSendFields []string `json:"-"`
   944  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
   945  	// requests with the JSON null value. By default, fields with empty values are
   946  	// omitted from API requests. See
   947  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   948  	NullFields []string `json:"-"`
   949  }
   950  
   951  func (s *ApigatewayLocation) MarshalJSON() ([]byte, error) {
   952  	type NoMethod ApigatewayLocation
   953  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   954  }
   955  
   956  // ApigatewayOperation: This resource represents a long-running operation that
   957  // is the result of a network API call.
   958  type ApigatewayOperation struct {
   959  	// Done: If the value is `false`, it means the operation is still in progress.
   960  	// If `true`, the operation is completed, and either `error` or `response` is
   961  	// available.
   962  	Done bool `json:"done,omitempty"`
   963  	// Error: The error result of the operation in case of failure or cancellation.
   964  	Error *ApigatewayStatus `json:"error,omitempty"`
   965  	// Metadata: Service-specific metadata associated with the operation. It
   966  	// typically contains progress information and common metadata such as create
   967  	// time. Some services might not provide such metadata. Any method that returns
   968  	// a long-running operation should document the metadata type, if any.
   969  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   970  	// Name: The server-assigned name, which is only unique within the same service
   971  	// that originally returns it. If you use the default HTTP mapping, the `name`
   972  	// should be a resource name ending with `operations/{unique_id}`.
   973  	Name string `json:"name,omitempty"`
   974  	// Response: The normal, successful response of the operation. If the original
   975  	// method returns no data on success, such as `Delete`, the response is
   976  	// `google.protobuf.Empty`. If the original method is standard
   977  	// `Get`/`Create`/`Update`, the response should be the resource. For other
   978  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
   979  	// original method name. For example, if the original method name is
   980  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
   981  	Response googleapi.RawMessage `json:"response,omitempty"`
   982  
   983  	// ServerResponse contains the HTTP response code and headers from the server.
   984  	googleapi.ServerResponse `json:"-"`
   985  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
   986  	// include in API requests. By default, fields with empty or default values are
   987  	// omitted from API requests. See
   988  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   989  	// details.
   990  	ForceSendFields []string `json:"-"`
   991  	// NullFields is a list of field names (e.g. "Done") to include in API requests
   992  	// with the JSON null value. By default, fields with empty values are omitted
   993  	// from API requests. See
   994  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   995  	NullFields []string `json:"-"`
   996  }
   997  
   998  func (s *ApigatewayOperation) MarshalJSON() ([]byte, error) {
   999  	type NoMethod ApigatewayOperation
  1000  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1001  }
  1002  
  1003  // ApigatewayOperationMetadata: Represents the metadata of the long-running
  1004  // operation.
  1005  type ApigatewayOperationMetadata struct {
  1006  	// ApiVersion: Output only. API version used to start the operation.
  1007  	ApiVersion string `json:"apiVersion,omitempty"`
  1008  	// CreateTime: Output only. The time the operation was created.
  1009  	CreateTime string `json:"createTime,omitempty"`
  1010  	// Diagnostics: Output only. Diagnostics generated during processing of
  1011  	// configuration source files.
  1012  	Diagnostics []*ApigatewayOperationMetadataDiagnostic `json:"diagnostics,omitempty"`
  1013  	// EndTime: Output only. The time the operation finished running.
  1014  	EndTime string `json:"endTime,omitempty"`
  1015  	// RequestedCancellation: Output only. Identifies whether the user has
  1016  	// requested cancellation of the operation. Operations that have successfully
  1017  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  1018  	// 1, corresponding to `Code.CANCELLED`.
  1019  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1020  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1021  	StatusMessage string `json:"statusMessage,omitempty"`
  1022  	// Target: Output only. Server-defined resource path for the target of the
  1023  	// operation.
  1024  	Target string `json:"target,omitempty"`
  1025  	// Verb: Output only. Name of the verb executed by the operation.
  1026  	Verb string `json:"verb,omitempty"`
  1027  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1028  	// unconditionally include in API requests. By default, fields with empty or
  1029  	// default values are omitted from API requests. See
  1030  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1031  	// details.
  1032  	ForceSendFields []string `json:"-"`
  1033  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1034  	// requests with the JSON null value. By default, fields with empty values are
  1035  	// omitted from API requests. See
  1036  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1037  	NullFields []string `json:"-"`
  1038  }
  1039  
  1040  func (s *ApigatewayOperationMetadata) MarshalJSON() ([]byte, error) {
  1041  	type NoMethod ApigatewayOperationMetadata
  1042  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1043  }
  1044  
  1045  // ApigatewayOperationMetadataDiagnostic: Diagnostic information from
  1046  // configuration processing.
  1047  type ApigatewayOperationMetadataDiagnostic struct {
  1048  	// Location: Location of the diagnostic.
  1049  	Location string `json:"location,omitempty"`
  1050  	// Message: The diagnostic message.
  1051  	Message string `json:"message,omitempty"`
  1052  	// ForceSendFields is a list of field names (e.g. "Location") to
  1053  	// unconditionally include in API requests. By default, fields with empty or
  1054  	// default values are omitted from API requests. See
  1055  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1056  	// details.
  1057  	ForceSendFields []string `json:"-"`
  1058  	// NullFields is a list of field names (e.g. "Location") to include in API
  1059  	// requests with the JSON null value. By default, fields with empty values are
  1060  	// omitted from API requests. See
  1061  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1062  	NullFields []string `json:"-"`
  1063  }
  1064  
  1065  func (s *ApigatewayOperationMetadataDiagnostic) MarshalJSON() ([]byte, error) {
  1066  	type NoMethod ApigatewayOperationMetadataDiagnostic
  1067  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1068  }
  1069  
  1070  // ApigatewayPolicy: An Identity and Access Management (IAM) policy, which
  1071  // specifies access controls for Google Cloud resources. A `Policy` is a
  1072  // collection of `bindings`. A `binding` binds one or more `members`, or
  1073  // principals, to a single `role`. Principals can be user accounts, service
  1074  // accounts, Google groups, and domains (such as G Suite). A `role` is a named
  1075  // list of permissions; each `role` can be an IAM predefined role or a
  1076  // user-created custom role. For some types of Google Cloud resources, a
  1077  // `binding` can also specify a `condition`, which is a logical expression that
  1078  // allows access to a resource only if the expression evaluates to `true`. A
  1079  // condition can add constraints based on attributes of the request, the
  1080  // resource, or both. To learn which resources support conditions in their IAM
  1081  // policies, see the IAM documentation
  1082  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1083  // example:** ``` { "bindings": [ { "role":
  1084  // "roles/resourcemanager.organizationAdmin", "members": [
  1085  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1086  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1087  // "roles/resourcemanager.organizationViewer", "members": [
  1088  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1089  // "description": "Does not grant access after Sep 2020", "expression":
  1090  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1091  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1092  // members: - user:mike@example.com - group:admins@example.com -
  1093  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1094  // role: roles/resourcemanager.organizationAdmin - members: -
  1095  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1096  // condition: title: expirable access description: Does not grant access after
  1097  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1098  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1099  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1100  type ApigatewayPolicy struct {
  1101  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1102  	AuditConfigs []*ApigatewayAuditConfig `json:"auditConfigs,omitempty"`
  1103  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1104  	// Optionally, may specify a `condition` that determines how and when the
  1105  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1106  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1107  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1108  	// principal counts towards these limits. For example, if the `bindings` grant
  1109  	// 50 different roles to `user:alice@example.com`, and not to any other
  1110  	// principal, then you can add another 1,450 principals to the `bindings` in
  1111  	// the `Policy`.
  1112  	Bindings []*ApigatewayBinding `json:"bindings,omitempty"`
  1113  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1114  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1115  	// strongly suggested that systems make use of the `etag` in the
  1116  	// read-modify-write cycle to perform policy updates in order to avoid race
  1117  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1118  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1119  	// ensure that their change will be applied to the same version of the policy.
  1120  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1121  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1122  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1123  	// the conditions in the version `3` policy are lost.
  1124  	Etag string `json:"etag,omitempty"`
  1125  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1126  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1127  	// affects conditional role bindings must specify version `3`. This requirement
  1128  	// applies to the following operations: * Getting a policy that includes a
  1129  	// conditional role binding * Adding a conditional role binding to a policy *
  1130  	// Changing a conditional role binding in a policy * Removing any role binding,
  1131  	// with or without a condition, from a policy that includes conditions
  1132  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1133  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1134  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1135  	// the conditions in the version `3` policy are lost. If a policy does not
  1136  	// include any conditions, operations on that policy may specify any valid
  1137  	// version or leave the field unset. To learn which resources support
  1138  	// conditions in their IAM policies, see the IAM documentation
  1139  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1140  	Version int64 `json:"version,omitempty"`
  1141  
  1142  	// ServerResponse contains the HTTP response code and headers from the server.
  1143  	googleapi.ServerResponse `json:"-"`
  1144  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1145  	// unconditionally include in API requests. By default, fields with empty or
  1146  	// default values are omitted from API requests. See
  1147  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1148  	// details.
  1149  	ForceSendFields []string `json:"-"`
  1150  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1151  	// requests with the JSON null value. By default, fields with empty values are
  1152  	// omitted from API requests. See
  1153  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1154  	NullFields []string `json:"-"`
  1155  }
  1156  
  1157  func (s *ApigatewayPolicy) MarshalJSON() ([]byte, error) {
  1158  	type NoMethod ApigatewayPolicy
  1159  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1160  }
  1161  
  1162  // ApigatewaySetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1163  type ApigatewaySetIamPolicyRequest struct {
  1164  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1165  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1166  	// policy but certain Google Cloud services (such as Projects) might reject
  1167  	// them.
  1168  	Policy *ApigatewayPolicy `json:"policy,omitempty"`
  1169  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1170  	// modify. Only the fields in the mask will be modified. If no mask is
  1171  	// provided, the following default mask is used: `paths: "bindings, etag"
  1172  	UpdateMask string `json:"updateMask,omitempty"`
  1173  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1174  	// include in API requests. By default, fields with empty or default values are
  1175  	// omitted from API requests. See
  1176  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1177  	// details.
  1178  	ForceSendFields []string `json:"-"`
  1179  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1180  	// requests with the JSON null value. By default, fields with empty values are
  1181  	// omitted from API requests. See
  1182  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1183  	NullFields []string `json:"-"`
  1184  }
  1185  
  1186  func (s *ApigatewaySetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1187  	type NoMethod ApigatewaySetIamPolicyRequest
  1188  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1189  }
  1190  
  1191  // ApigatewayStatus: The `Status` type defines a logical error model that is
  1192  // suitable for different programming environments, including REST APIs and RPC
  1193  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
  1194  // contains three pieces of data: error code, error message, and error details.
  1195  // You can find out more about this error model and how to work with it in the
  1196  // API Design Guide (https://cloud.google.com/apis/design/errors).
  1197  type ApigatewayStatus struct {
  1198  	// Code: The status code, which should be an enum value of google.rpc.Code.
  1199  	Code int64 `json:"code,omitempty"`
  1200  	// Details: A list of messages that carry the error details. There is a common
  1201  	// set of message types for APIs to use.
  1202  	Details []googleapi.RawMessage `json:"details,omitempty"`
  1203  	// Message: A developer-facing error message, which should be in English. Any
  1204  	// user-facing error message should be localized and sent in the
  1205  	// google.rpc.Status.details field, or localized by the client.
  1206  	Message string `json:"message,omitempty"`
  1207  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  1208  	// include in API requests. By default, fields with empty or default values are
  1209  	// omitted from API requests. See
  1210  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1211  	// details.
  1212  	ForceSendFields []string `json:"-"`
  1213  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  1214  	// with the JSON null value. By default, fields with empty values are omitted
  1215  	// from API requests. See
  1216  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1217  	NullFields []string `json:"-"`
  1218  }
  1219  
  1220  func (s *ApigatewayStatus) MarshalJSON() ([]byte, error) {
  1221  	type NoMethod ApigatewayStatus
  1222  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1223  }
  1224  
  1225  // ApigatewayTestIamPermissionsRequest: Request message for
  1226  // `TestIamPermissions` method.
  1227  type ApigatewayTestIamPermissionsRequest struct {
  1228  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1229  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1230  	// information see IAM Overview
  1231  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1232  	Permissions []string `json:"permissions,omitempty"`
  1233  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1234  	// unconditionally include in API requests. By default, fields with empty or
  1235  	// default values are omitted from API requests. See
  1236  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1237  	// details.
  1238  	ForceSendFields []string `json:"-"`
  1239  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1240  	// requests with the JSON null value. By default, fields with empty values are
  1241  	// omitted from API requests. See
  1242  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1243  	NullFields []string `json:"-"`
  1244  }
  1245  
  1246  func (s *ApigatewayTestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1247  	type NoMethod ApigatewayTestIamPermissionsRequest
  1248  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1249  }
  1250  
  1251  // ApigatewayTestIamPermissionsResponse: Response message for
  1252  // `TestIamPermissions` method.
  1253  type ApigatewayTestIamPermissionsResponse struct {
  1254  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1255  	// caller is allowed.
  1256  	Permissions []string `json:"permissions,omitempty"`
  1257  
  1258  	// ServerResponse contains the HTTP response code and headers from the server.
  1259  	googleapi.ServerResponse `json:"-"`
  1260  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1261  	// unconditionally include in API requests. By default, fields with empty or
  1262  	// default values are omitted from API requests. See
  1263  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1264  	// details.
  1265  	ForceSendFields []string `json:"-"`
  1266  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1267  	// requests with the JSON null value. By default, fields with empty values are
  1268  	// omitted from API requests. See
  1269  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1270  	NullFields []string `json:"-"`
  1271  }
  1272  
  1273  func (s *ApigatewayTestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1274  	type NoMethod ApigatewayTestIamPermissionsResponse
  1275  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1276  }
  1277  
  1278  // Empty: A generic empty message that you can re-use to avoid defining
  1279  // duplicated empty messages in your APIs. A typical example is to use it as
  1280  // the request or the response type of an API method. For instance: service Foo
  1281  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
  1282  type Empty struct {
  1283  	// ServerResponse contains the HTTP response code and headers from the server.
  1284  	googleapi.ServerResponse `json:"-"`
  1285  }
  1286  
  1287  type ProjectsLocationsGetCall struct {
  1288  	s            *Service
  1289  	name         string
  1290  	urlParams_   gensupport.URLParams
  1291  	ifNoneMatch_ string
  1292  	ctx_         context.Context
  1293  	header_      http.Header
  1294  }
  1295  
  1296  // Get: Gets information about a location.
  1297  //
  1298  // - name: Resource name for the location.
  1299  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  1300  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1301  	c.name = name
  1302  	return c
  1303  }
  1304  
  1305  // Fields allows partial responses to be retrieved. See
  1306  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1307  // details.
  1308  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  1309  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1310  	return c
  1311  }
  1312  
  1313  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1314  // object's ETag matches the given value. This is useful for getting updates
  1315  // only after the object has changed since the last request.
  1316  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  1317  	c.ifNoneMatch_ = entityTag
  1318  	return c
  1319  }
  1320  
  1321  // Context sets the context to be used in this call's Do method.
  1322  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  1323  	c.ctx_ = ctx
  1324  	return c
  1325  }
  1326  
  1327  // Header returns a http.Header that can be modified by the caller to add
  1328  // headers to the request.
  1329  func (c *ProjectsLocationsGetCall) Header() http.Header {
  1330  	if c.header_ == nil {
  1331  		c.header_ = make(http.Header)
  1332  	}
  1333  	return c.header_
  1334  }
  1335  
  1336  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  1337  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1338  	if c.ifNoneMatch_ != "" {
  1339  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1340  	}
  1341  	var body io.Reader = nil
  1342  	c.urlParams_.Set("alt", alt)
  1343  	c.urlParams_.Set("prettyPrint", "false")
  1344  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  1345  	urls += "?" + c.urlParams_.Encode()
  1346  	req, err := http.NewRequest("GET", urls, body)
  1347  	if err != nil {
  1348  		return nil, err
  1349  	}
  1350  	req.Header = reqHeaders
  1351  	googleapi.Expand(req.URL, map[string]string{
  1352  		"name": c.name,
  1353  	})
  1354  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1355  }
  1356  
  1357  // Do executes the "apigateway.projects.locations.get" call.
  1358  // Any non-2xx status code is an error. Response headers are in either
  1359  // *ApigatewayLocation.ServerResponse.Header or (if a response was returned at
  1360  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1361  // check whether the returned error was because http.StatusNotModified was
  1362  // returned.
  1363  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*ApigatewayLocation, error) {
  1364  	gensupport.SetOptions(c.urlParams_, opts...)
  1365  	res, err := c.doRequest("json")
  1366  	if res != nil && res.StatusCode == http.StatusNotModified {
  1367  		if res.Body != nil {
  1368  			res.Body.Close()
  1369  		}
  1370  		return nil, gensupport.WrapError(&googleapi.Error{
  1371  			Code:   res.StatusCode,
  1372  			Header: res.Header,
  1373  		})
  1374  	}
  1375  	if err != nil {
  1376  		return nil, err
  1377  	}
  1378  	defer googleapi.CloseBody(res)
  1379  	if err := googleapi.CheckResponse(res); err != nil {
  1380  		return nil, gensupport.WrapError(err)
  1381  	}
  1382  	ret := &ApigatewayLocation{
  1383  		ServerResponse: googleapi.ServerResponse{
  1384  			Header:         res.Header,
  1385  			HTTPStatusCode: res.StatusCode,
  1386  		},
  1387  	}
  1388  	target := &ret
  1389  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1390  		return nil, err
  1391  	}
  1392  	return ret, nil
  1393  }
  1394  
  1395  type ProjectsLocationsListCall struct {
  1396  	s            *Service
  1397  	name         string
  1398  	urlParams_   gensupport.URLParams
  1399  	ifNoneMatch_ string
  1400  	ctx_         context.Context
  1401  	header_      http.Header
  1402  }
  1403  
  1404  // List: Lists information about the supported locations for this service.
  1405  //
  1406  // - name: The resource that owns the locations collection, if applicable.
  1407  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  1408  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1409  	c.name = name
  1410  	return c
  1411  }
  1412  
  1413  // Filter sets the optional parameter "filter": A filter to narrow down results
  1414  // to a preferred subset. The filtering language accepts strings like
  1415  // "displayName=tokyo", and is documented in more detail in AIP-160
  1416  // (https://google.aip.dev/160).
  1417  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  1418  	c.urlParams_.Set("filter", filter)
  1419  	return c
  1420  }
  1421  
  1422  // PageSize sets the optional parameter "pageSize": The maximum number of
  1423  // results to return. If not set, the service selects a default.
  1424  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  1425  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1426  	return c
  1427  }
  1428  
  1429  // PageToken sets the optional parameter "pageToken": A page token received
  1430  // from the `next_page_token` field in the response. Send that page token to
  1431  // receive the subsequent page.
  1432  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  1433  	c.urlParams_.Set("pageToken", pageToken)
  1434  	return c
  1435  }
  1436  
  1437  // Fields allows partial responses to be retrieved. See
  1438  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1439  // details.
  1440  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  1441  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1442  	return c
  1443  }
  1444  
  1445  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1446  // object's ETag matches the given value. This is useful for getting updates
  1447  // only after the object has changed since the last request.
  1448  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  1449  	c.ifNoneMatch_ = entityTag
  1450  	return c
  1451  }
  1452  
  1453  // Context sets the context to be used in this call's Do method.
  1454  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  1455  	c.ctx_ = ctx
  1456  	return c
  1457  }
  1458  
  1459  // Header returns a http.Header that can be modified by the caller to add
  1460  // headers to the request.
  1461  func (c *ProjectsLocationsListCall) Header() http.Header {
  1462  	if c.header_ == nil {
  1463  		c.header_ = make(http.Header)
  1464  	}
  1465  	return c.header_
  1466  }
  1467  
  1468  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  1469  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1470  	if c.ifNoneMatch_ != "" {
  1471  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1472  	}
  1473  	var body io.Reader = nil
  1474  	c.urlParams_.Set("alt", alt)
  1475  	c.urlParams_.Set("prettyPrint", "false")
  1476  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/locations")
  1477  	urls += "?" + c.urlParams_.Encode()
  1478  	req, err := http.NewRequest("GET", urls, body)
  1479  	if err != nil {
  1480  		return nil, err
  1481  	}
  1482  	req.Header = reqHeaders
  1483  	googleapi.Expand(req.URL, map[string]string{
  1484  		"name": c.name,
  1485  	})
  1486  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1487  }
  1488  
  1489  // Do executes the "apigateway.projects.locations.list" call.
  1490  // Any non-2xx status code is an error. Response headers are in either
  1491  // *ApigatewayListLocationsResponse.ServerResponse.Header or (if a response was
  1492  // returned at all) in error.(*googleapi.Error).Header. Use
  1493  // googleapi.IsNotModified to check whether the returned error was because
  1494  // http.StatusNotModified was returned.
  1495  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ApigatewayListLocationsResponse, error) {
  1496  	gensupport.SetOptions(c.urlParams_, opts...)
  1497  	res, err := c.doRequest("json")
  1498  	if res != nil && res.StatusCode == http.StatusNotModified {
  1499  		if res.Body != nil {
  1500  			res.Body.Close()
  1501  		}
  1502  		return nil, gensupport.WrapError(&googleapi.Error{
  1503  			Code:   res.StatusCode,
  1504  			Header: res.Header,
  1505  		})
  1506  	}
  1507  	if err != nil {
  1508  		return nil, err
  1509  	}
  1510  	defer googleapi.CloseBody(res)
  1511  	if err := googleapi.CheckResponse(res); err != nil {
  1512  		return nil, gensupport.WrapError(err)
  1513  	}
  1514  	ret := &ApigatewayListLocationsResponse{
  1515  		ServerResponse: googleapi.ServerResponse{
  1516  			Header:         res.Header,
  1517  			HTTPStatusCode: res.StatusCode,
  1518  		},
  1519  	}
  1520  	target := &ret
  1521  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1522  		return nil, err
  1523  	}
  1524  	return ret, nil
  1525  }
  1526  
  1527  // Pages invokes f for each page of results.
  1528  // A non-nil error returned from f will halt the iteration.
  1529  // The provided context supersedes any context provided to the Context method.
  1530  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ApigatewayListLocationsResponse) error) error {
  1531  	c.ctx_ = ctx
  1532  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1533  	for {
  1534  		x, err := c.Do()
  1535  		if err != nil {
  1536  			return err
  1537  		}
  1538  		if err := f(x); err != nil {
  1539  			return err
  1540  		}
  1541  		if x.NextPageToken == "" {
  1542  			return nil
  1543  		}
  1544  		c.PageToken(x.NextPageToken)
  1545  	}
  1546  }
  1547  
  1548  type ProjectsLocationsApisCreateCall struct {
  1549  	s             *Service
  1550  	parent        string
  1551  	apigatewayapi *ApigatewayApi
  1552  	urlParams_    gensupport.URLParams
  1553  	ctx_          context.Context
  1554  	header_       http.Header
  1555  }
  1556  
  1557  // Create: Creates a new Api in a given project and location.
  1558  //
  1559  //   - parent: Parent resource of the API, of the form:
  1560  //     `projects/*/locations/global`.
  1561  func (r *ProjectsLocationsApisService) Create(parent string, apigatewayapi *ApigatewayApi) *ProjectsLocationsApisCreateCall {
  1562  	c := &ProjectsLocationsApisCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1563  	c.parent = parent
  1564  	c.apigatewayapi = apigatewayapi
  1565  	return c
  1566  }
  1567  
  1568  // ApiId sets the optional parameter "apiId": Required. Identifier to assign to
  1569  // the API. Must be unique within scope of the parent resource.
  1570  func (c *ProjectsLocationsApisCreateCall) ApiId(apiId string) *ProjectsLocationsApisCreateCall {
  1571  	c.urlParams_.Set("apiId", apiId)
  1572  	return c
  1573  }
  1574  
  1575  // Fields allows partial responses to be retrieved. See
  1576  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1577  // details.
  1578  func (c *ProjectsLocationsApisCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisCreateCall {
  1579  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1580  	return c
  1581  }
  1582  
  1583  // Context sets the context to be used in this call's Do method.
  1584  func (c *ProjectsLocationsApisCreateCall) Context(ctx context.Context) *ProjectsLocationsApisCreateCall {
  1585  	c.ctx_ = ctx
  1586  	return c
  1587  }
  1588  
  1589  // Header returns a http.Header that can be modified by the caller to add
  1590  // headers to the request.
  1591  func (c *ProjectsLocationsApisCreateCall) Header() http.Header {
  1592  	if c.header_ == nil {
  1593  		c.header_ = make(http.Header)
  1594  	}
  1595  	return c.header_
  1596  }
  1597  
  1598  func (c *ProjectsLocationsApisCreateCall) doRequest(alt string) (*http.Response, error) {
  1599  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1600  	var body io.Reader = nil
  1601  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewayapi)
  1602  	if err != nil {
  1603  		return nil, err
  1604  	}
  1605  	c.urlParams_.Set("alt", alt)
  1606  	c.urlParams_.Set("prettyPrint", "false")
  1607  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/apis")
  1608  	urls += "?" + c.urlParams_.Encode()
  1609  	req, err := http.NewRequest("POST", urls, body)
  1610  	if err != nil {
  1611  		return nil, err
  1612  	}
  1613  	req.Header = reqHeaders
  1614  	googleapi.Expand(req.URL, map[string]string{
  1615  		"parent": c.parent,
  1616  	})
  1617  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1618  }
  1619  
  1620  // Do executes the "apigateway.projects.locations.apis.create" call.
  1621  // Any non-2xx status code is an error. Response headers are in either
  1622  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  1623  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1624  // check whether the returned error was because http.StatusNotModified was
  1625  // returned.
  1626  func (c *ProjectsLocationsApisCreateCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  1627  	gensupport.SetOptions(c.urlParams_, opts...)
  1628  	res, err := c.doRequest("json")
  1629  	if res != nil && res.StatusCode == http.StatusNotModified {
  1630  		if res.Body != nil {
  1631  			res.Body.Close()
  1632  		}
  1633  		return nil, gensupport.WrapError(&googleapi.Error{
  1634  			Code:   res.StatusCode,
  1635  			Header: res.Header,
  1636  		})
  1637  	}
  1638  	if err != nil {
  1639  		return nil, err
  1640  	}
  1641  	defer googleapi.CloseBody(res)
  1642  	if err := googleapi.CheckResponse(res); err != nil {
  1643  		return nil, gensupport.WrapError(err)
  1644  	}
  1645  	ret := &ApigatewayOperation{
  1646  		ServerResponse: googleapi.ServerResponse{
  1647  			Header:         res.Header,
  1648  			HTTPStatusCode: res.StatusCode,
  1649  		},
  1650  	}
  1651  	target := &ret
  1652  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1653  		return nil, err
  1654  	}
  1655  	return ret, nil
  1656  }
  1657  
  1658  type ProjectsLocationsApisDeleteCall struct {
  1659  	s          *Service
  1660  	name       string
  1661  	urlParams_ gensupport.URLParams
  1662  	ctx_       context.Context
  1663  	header_    http.Header
  1664  }
  1665  
  1666  // Delete: Deletes a single Api.
  1667  //
  1668  // - name: Resource name of the form: `projects/*/locations/global/apis/*`.
  1669  func (r *ProjectsLocationsApisService) Delete(name string) *ProjectsLocationsApisDeleteCall {
  1670  	c := &ProjectsLocationsApisDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1671  	c.name = name
  1672  	return c
  1673  }
  1674  
  1675  // Fields allows partial responses to be retrieved. See
  1676  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1677  // details.
  1678  func (c *ProjectsLocationsApisDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisDeleteCall {
  1679  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1680  	return c
  1681  }
  1682  
  1683  // Context sets the context to be used in this call's Do method.
  1684  func (c *ProjectsLocationsApisDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisDeleteCall {
  1685  	c.ctx_ = ctx
  1686  	return c
  1687  }
  1688  
  1689  // Header returns a http.Header that can be modified by the caller to add
  1690  // headers to the request.
  1691  func (c *ProjectsLocationsApisDeleteCall) Header() http.Header {
  1692  	if c.header_ == nil {
  1693  		c.header_ = make(http.Header)
  1694  	}
  1695  	return c.header_
  1696  }
  1697  
  1698  func (c *ProjectsLocationsApisDeleteCall) doRequest(alt string) (*http.Response, error) {
  1699  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1700  	var body io.Reader = nil
  1701  	c.urlParams_.Set("alt", alt)
  1702  	c.urlParams_.Set("prettyPrint", "false")
  1703  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  1704  	urls += "?" + c.urlParams_.Encode()
  1705  	req, err := http.NewRequest("DELETE", urls, body)
  1706  	if err != nil {
  1707  		return nil, err
  1708  	}
  1709  	req.Header = reqHeaders
  1710  	googleapi.Expand(req.URL, map[string]string{
  1711  		"name": c.name,
  1712  	})
  1713  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1714  }
  1715  
  1716  // Do executes the "apigateway.projects.locations.apis.delete" call.
  1717  // Any non-2xx status code is an error. Response headers are in either
  1718  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  1719  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1720  // check whether the returned error was because http.StatusNotModified was
  1721  // returned.
  1722  func (c *ProjectsLocationsApisDeleteCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  1723  	gensupport.SetOptions(c.urlParams_, opts...)
  1724  	res, err := c.doRequest("json")
  1725  	if res != nil && res.StatusCode == http.StatusNotModified {
  1726  		if res.Body != nil {
  1727  			res.Body.Close()
  1728  		}
  1729  		return nil, gensupport.WrapError(&googleapi.Error{
  1730  			Code:   res.StatusCode,
  1731  			Header: res.Header,
  1732  		})
  1733  	}
  1734  	if err != nil {
  1735  		return nil, err
  1736  	}
  1737  	defer googleapi.CloseBody(res)
  1738  	if err := googleapi.CheckResponse(res); err != nil {
  1739  		return nil, gensupport.WrapError(err)
  1740  	}
  1741  	ret := &ApigatewayOperation{
  1742  		ServerResponse: googleapi.ServerResponse{
  1743  			Header:         res.Header,
  1744  			HTTPStatusCode: res.StatusCode,
  1745  		},
  1746  	}
  1747  	target := &ret
  1748  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1749  		return nil, err
  1750  	}
  1751  	return ret, nil
  1752  }
  1753  
  1754  type ProjectsLocationsApisGetCall struct {
  1755  	s            *Service
  1756  	name         string
  1757  	urlParams_   gensupport.URLParams
  1758  	ifNoneMatch_ string
  1759  	ctx_         context.Context
  1760  	header_      http.Header
  1761  }
  1762  
  1763  // Get: Gets details of a single Api.
  1764  //
  1765  // - name: Resource name of the form: `projects/*/locations/global/apis/*`.
  1766  func (r *ProjectsLocationsApisService) Get(name string) *ProjectsLocationsApisGetCall {
  1767  	c := &ProjectsLocationsApisGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1768  	c.name = name
  1769  	return c
  1770  }
  1771  
  1772  // Fields allows partial responses to be retrieved. See
  1773  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1774  // details.
  1775  func (c *ProjectsLocationsApisGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisGetCall {
  1776  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1777  	return c
  1778  }
  1779  
  1780  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1781  // object's ETag matches the given value. This is useful for getting updates
  1782  // only after the object has changed since the last request.
  1783  func (c *ProjectsLocationsApisGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisGetCall {
  1784  	c.ifNoneMatch_ = entityTag
  1785  	return c
  1786  }
  1787  
  1788  // Context sets the context to be used in this call's Do method.
  1789  func (c *ProjectsLocationsApisGetCall) Context(ctx context.Context) *ProjectsLocationsApisGetCall {
  1790  	c.ctx_ = ctx
  1791  	return c
  1792  }
  1793  
  1794  // Header returns a http.Header that can be modified by the caller to add
  1795  // headers to the request.
  1796  func (c *ProjectsLocationsApisGetCall) Header() http.Header {
  1797  	if c.header_ == nil {
  1798  		c.header_ = make(http.Header)
  1799  	}
  1800  	return c.header_
  1801  }
  1802  
  1803  func (c *ProjectsLocationsApisGetCall) doRequest(alt string) (*http.Response, error) {
  1804  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1805  	if c.ifNoneMatch_ != "" {
  1806  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1807  	}
  1808  	var body io.Reader = nil
  1809  	c.urlParams_.Set("alt", alt)
  1810  	c.urlParams_.Set("prettyPrint", "false")
  1811  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  1812  	urls += "?" + c.urlParams_.Encode()
  1813  	req, err := http.NewRequest("GET", urls, body)
  1814  	if err != nil {
  1815  		return nil, err
  1816  	}
  1817  	req.Header = reqHeaders
  1818  	googleapi.Expand(req.URL, map[string]string{
  1819  		"name": c.name,
  1820  	})
  1821  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1822  }
  1823  
  1824  // Do executes the "apigateway.projects.locations.apis.get" call.
  1825  // Any non-2xx status code is an error. Response headers are in either
  1826  // *ApigatewayApi.ServerResponse.Header or (if a response was returned at all)
  1827  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1828  // whether the returned error was because http.StatusNotModified was returned.
  1829  func (c *ProjectsLocationsApisGetCall) Do(opts ...googleapi.CallOption) (*ApigatewayApi, error) {
  1830  	gensupport.SetOptions(c.urlParams_, opts...)
  1831  	res, err := c.doRequest("json")
  1832  	if res != nil && res.StatusCode == http.StatusNotModified {
  1833  		if res.Body != nil {
  1834  			res.Body.Close()
  1835  		}
  1836  		return nil, gensupport.WrapError(&googleapi.Error{
  1837  			Code:   res.StatusCode,
  1838  			Header: res.Header,
  1839  		})
  1840  	}
  1841  	if err != nil {
  1842  		return nil, err
  1843  	}
  1844  	defer googleapi.CloseBody(res)
  1845  	if err := googleapi.CheckResponse(res); err != nil {
  1846  		return nil, gensupport.WrapError(err)
  1847  	}
  1848  	ret := &ApigatewayApi{
  1849  		ServerResponse: googleapi.ServerResponse{
  1850  			Header:         res.Header,
  1851  			HTTPStatusCode: res.StatusCode,
  1852  		},
  1853  	}
  1854  	target := &ret
  1855  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1856  		return nil, err
  1857  	}
  1858  	return ret, nil
  1859  }
  1860  
  1861  type ProjectsLocationsApisGetIamPolicyCall struct {
  1862  	s            *Service
  1863  	resource     string
  1864  	urlParams_   gensupport.URLParams
  1865  	ifNoneMatch_ string
  1866  	ctx_         context.Context
  1867  	header_      http.Header
  1868  }
  1869  
  1870  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  1871  // empty policy if the resource exists and does not have a policy set.
  1872  //
  1873  //   - resource: REQUIRED: The resource for which the policy is being requested.
  1874  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  1875  //     for the appropriate value for this field.
  1876  func (r *ProjectsLocationsApisService) GetIamPolicy(resource string) *ProjectsLocationsApisGetIamPolicyCall {
  1877  	c := &ProjectsLocationsApisGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1878  	c.resource = resource
  1879  	return c
  1880  }
  1881  
  1882  // OptionsRequestedPolicyVersion sets the optional parameter
  1883  // "options.requestedPolicyVersion": The maximum policy version that will be
  1884  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  1885  // an invalid value will be rejected. Requests for policies with any
  1886  // conditional role bindings must specify version 3. Policies with no
  1887  // conditional role bindings may specify any valid value or leave the field
  1888  // unset. The policy in the response might use the policy version that you
  1889  // specified, or it might use a lower policy version. For example, if you
  1890  // specify version 3, but the policy has no conditional role bindings, the
  1891  // response uses version 1. To learn which resources support conditions in
  1892  // their IAM policies, see the IAM documentation
  1893  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  1894  func (c *ProjectsLocationsApisGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisGetIamPolicyCall {
  1895  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  1896  	return c
  1897  }
  1898  
  1899  // Fields allows partial responses to be retrieved. See
  1900  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1901  // details.
  1902  func (c *ProjectsLocationsApisGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisGetIamPolicyCall {
  1903  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1904  	return c
  1905  }
  1906  
  1907  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1908  // object's ETag matches the given value. This is useful for getting updates
  1909  // only after the object has changed since the last request.
  1910  func (c *ProjectsLocationsApisGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisGetIamPolicyCall {
  1911  	c.ifNoneMatch_ = entityTag
  1912  	return c
  1913  }
  1914  
  1915  // Context sets the context to be used in this call's Do method.
  1916  func (c *ProjectsLocationsApisGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisGetIamPolicyCall {
  1917  	c.ctx_ = ctx
  1918  	return c
  1919  }
  1920  
  1921  // Header returns a http.Header that can be modified by the caller to add
  1922  // headers to the request.
  1923  func (c *ProjectsLocationsApisGetIamPolicyCall) Header() http.Header {
  1924  	if c.header_ == nil {
  1925  		c.header_ = make(http.Header)
  1926  	}
  1927  	return c.header_
  1928  }
  1929  
  1930  func (c *ProjectsLocationsApisGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  1931  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1932  	if c.ifNoneMatch_ != "" {
  1933  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1934  	}
  1935  	var body io.Reader = nil
  1936  	c.urlParams_.Set("alt", alt)
  1937  	c.urlParams_.Set("prettyPrint", "false")
  1938  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
  1939  	urls += "?" + c.urlParams_.Encode()
  1940  	req, err := http.NewRequest("GET", urls, body)
  1941  	if err != nil {
  1942  		return nil, err
  1943  	}
  1944  	req.Header = reqHeaders
  1945  	googleapi.Expand(req.URL, map[string]string{
  1946  		"resource": c.resource,
  1947  	})
  1948  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1949  }
  1950  
  1951  // Do executes the "apigateway.projects.locations.apis.getIamPolicy" call.
  1952  // Any non-2xx status code is an error. Response headers are in either
  1953  // *ApigatewayPolicy.ServerResponse.Header or (if a response was returned at
  1954  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1955  // check whether the returned error was because http.StatusNotModified was
  1956  // returned.
  1957  func (c *ProjectsLocationsApisGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*ApigatewayPolicy, error) {
  1958  	gensupport.SetOptions(c.urlParams_, opts...)
  1959  	res, err := c.doRequest("json")
  1960  	if res != nil && res.StatusCode == http.StatusNotModified {
  1961  		if res.Body != nil {
  1962  			res.Body.Close()
  1963  		}
  1964  		return nil, gensupport.WrapError(&googleapi.Error{
  1965  			Code:   res.StatusCode,
  1966  			Header: res.Header,
  1967  		})
  1968  	}
  1969  	if err != nil {
  1970  		return nil, err
  1971  	}
  1972  	defer googleapi.CloseBody(res)
  1973  	if err := googleapi.CheckResponse(res); err != nil {
  1974  		return nil, gensupport.WrapError(err)
  1975  	}
  1976  	ret := &ApigatewayPolicy{
  1977  		ServerResponse: googleapi.ServerResponse{
  1978  			Header:         res.Header,
  1979  			HTTPStatusCode: res.StatusCode,
  1980  		},
  1981  	}
  1982  	target := &ret
  1983  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1984  		return nil, err
  1985  	}
  1986  	return ret, nil
  1987  }
  1988  
  1989  type ProjectsLocationsApisListCall struct {
  1990  	s            *Service
  1991  	parent       string
  1992  	urlParams_   gensupport.URLParams
  1993  	ifNoneMatch_ string
  1994  	ctx_         context.Context
  1995  	header_      http.Header
  1996  }
  1997  
  1998  // List: Lists Apis in a given project and location.
  1999  //
  2000  //   - parent: Parent resource of the API, of the form:
  2001  //     `projects/*/locations/global`.
  2002  func (r *ProjectsLocationsApisService) List(parent string) *ProjectsLocationsApisListCall {
  2003  	c := &ProjectsLocationsApisListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2004  	c.parent = parent
  2005  	return c
  2006  }
  2007  
  2008  // Filter sets the optional parameter "filter": Filter.
  2009  func (c *ProjectsLocationsApisListCall) Filter(filter string) *ProjectsLocationsApisListCall {
  2010  	c.urlParams_.Set("filter", filter)
  2011  	return c
  2012  }
  2013  
  2014  // OrderBy sets the optional parameter "orderBy": Order by parameters.
  2015  func (c *ProjectsLocationsApisListCall) OrderBy(orderBy string) *ProjectsLocationsApisListCall {
  2016  	c.urlParams_.Set("orderBy", orderBy)
  2017  	return c
  2018  }
  2019  
  2020  // PageSize sets the optional parameter "pageSize": Page size.
  2021  func (c *ProjectsLocationsApisListCall) PageSize(pageSize int64) *ProjectsLocationsApisListCall {
  2022  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2023  	return c
  2024  }
  2025  
  2026  // PageToken sets the optional parameter "pageToken": Page token.
  2027  func (c *ProjectsLocationsApisListCall) PageToken(pageToken string) *ProjectsLocationsApisListCall {
  2028  	c.urlParams_.Set("pageToken", pageToken)
  2029  	return c
  2030  }
  2031  
  2032  // Fields allows partial responses to be retrieved. See
  2033  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2034  // details.
  2035  func (c *ProjectsLocationsApisListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisListCall {
  2036  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2037  	return c
  2038  }
  2039  
  2040  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2041  // object's ETag matches the given value. This is useful for getting updates
  2042  // only after the object has changed since the last request.
  2043  func (c *ProjectsLocationsApisListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisListCall {
  2044  	c.ifNoneMatch_ = entityTag
  2045  	return c
  2046  }
  2047  
  2048  // Context sets the context to be used in this call's Do method.
  2049  func (c *ProjectsLocationsApisListCall) Context(ctx context.Context) *ProjectsLocationsApisListCall {
  2050  	c.ctx_ = ctx
  2051  	return c
  2052  }
  2053  
  2054  // Header returns a http.Header that can be modified by the caller to add
  2055  // headers to the request.
  2056  func (c *ProjectsLocationsApisListCall) Header() http.Header {
  2057  	if c.header_ == nil {
  2058  		c.header_ = make(http.Header)
  2059  	}
  2060  	return c.header_
  2061  }
  2062  
  2063  func (c *ProjectsLocationsApisListCall) doRequest(alt string) (*http.Response, error) {
  2064  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2065  	if c.ifNoneMatch_ != "" {
  2066  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2067  	}
  2068  	var body io.Reader = nil
  2069  	c.urlParams_.Set("alt", alt)
  2070  	c.urlParams_.Set("prettyPrint", "false")
  2071  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/apis")
  2072  	urls += "?" + c.urlParams_.Encode()
  2073  	req, err := http.NewRequest("GET", urls, body)
  2074  	if err != nil {
  2075  		return nil, err
  2076  	}
  2077  	req.Header = reqHeaders
  2078  	googleapi.Expand(req.URL, map[string]string{
  2079  		"parent": c.parent,
  2080  	})
  2081  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2082  }
  2083  
  2084  // Do executes the "apigateway.projects.locations.apis.list" call.
  2085  // Any non-2xx status code is an error. Response headers are in either
  2086  // *ApigatewayListApisResponse.ServerResponse.Header or (if a response was
  2087  // returned at all) in error.(*googleapi.Error).Header. Use
  2088  // googleapi.IsNotModified to check whether the returned error was because
  2089  // http.StatusNotModified was returned.
  2090  func (c *ProjectsLocationsApisListCall) Do(opts ...googleapi.CallOption) (*ApigatewayListApisResponse, error) {
  2091  	gensupport.SetOptions(c.urlParams_, opts...)
  2092  	res, err := c.doRequest("json")
  2093  	if res != nil && res.StatusCode == http.StatusNotModified {
  2094  		if res.Body != nil {
  2095  			res.Body.Close()
  2096  		}
  2097  		return nil, gensupport.WrapError(&googleapi.Error{
  2098  			Code:   res.StatusCode,
  2099  			Header: res.Header,
  2100  		})
  2101  	}
  2102  	if err != nil {
  2103  		return nil, err
  2104  	}
  2105  	defer googleapi.CloseBody(res)
  2106  	if err := googleapi.CheckResponse(res); err != nil {
  2107  		return nil, gensupport.WrapError(err)
  2108  	}
  2109  	ret := &ApigatewayListApisResponse{
  2110  		ServerResponse: googleapi.ServerResponse{
  2111  			Header:         res.Header,
  2112  			HTTPStatusCode: res.StatusCode,
  2113  		},
  2114  	}
  2115  	target := &ret
  2116  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2117  		return nil, err
  2118  	}
  2119  	return ret, nil
  2120  }
  2121  
  2122  // Pages invokes f for each page of results.
  2123  // A non-nil error returned from f will halt the iteration.
  2124  // The provided context supersedes any context provided to the Context method.
  2125  func (c *ProjectsLocationsApisListCall) Pages(ctx context.Context, f func(*ApigatewayListApisResponse) error) error {
  2126  	c.ctx_ = ctx
  2127  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  2128  	for {
  2129  		x, err := c.Do()
  2130  		if err != nil {
  2131  			return err
  2132  		}
  2133  		if err := f(x); err != nil {
  2134  			return err
  2135  		}
  2136  		if x.NextPageToken == "" {
  2137  			return nil
  2138  		}
  2139  		c.PageToken(x.NextPageToken)
  2140  	}
  2141  }
  2142  
  2143  type ProjectsLocationsApisPatchCall struct {
  2144  	s             *Service
  2145  	name          string
  2146  	apigatewayapi *ApigatewayApi
  2147  	urlParams_    gensupport.URLParams
  2148  	ctx_          context.Context
  2149  	header_       http.Header
  2150  }
  2151  
  2152  // Patch: Updates the parameters of a single Api.
  2153  //
  2154  //   - name: Output only. Resource name of the API. Format:
  2155  //     projects/{project}/locations/global/apis/{api}.
  2156  func (r *ProjectsLocationsApisService) Patch(name string, apigatewayapi *ApigatewayApi) *ProjectsLocationsApisPatchCall {
  2157  	c := &ProjectsLocationsApisPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2158  	c.name = name
  2159  	c.apigatewayapi = apigatewayapi
  2160  	return c
  2161  }
  2162  
  2163  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  2164  // specify the fields to be overwritten in the Api resource by the update. The
  2165  // fields specified in the update_mask are relative to the resource, not the
  2166  // full request. A field will be overwritten if it is in the mask. If the user
  2167  // does not provide a mask then all fields will be overwritten.
  2168  func (c *ProjectsLocationsApisPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisPatchCall {
  2169  	c.urlParams_.Set("updateMask", updateMask)
  2170  	return c
  2171  }
  2172  
  2173  // Fields allows partial responses to be retrieved. See
  2174  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2175  // details.
  2176  func (c *ProjectsLocationsApisPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisPatchCall {
  2177  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2178  	return c
  2179  }
  2180  
  2181  // Context sets the context to be used in this call's Do method.
  2182  func (c *ProjectsLocationsApisPatchCall) Context(ctx context.Context) *ProjectsLocationsApisPatchCall {
  2183  	c.ctx_ = ctx
  2184  	return c
  2185  }
  2186  
  2187  // Header returns a http.Header that can be modified by the caller to add
  2188  // headers to the request.
  2189  func (c *ProjectsLocationsApisPatchCall) Header() http.Header {
  2190  	if c.header_ == nil {
  2191  		c.header_ = make(http.Header)
  2192  	}
  2193  	return c.header_
  2194  }
  2195  
  2196  func (c *ProjectsLocationsApisPatchCall) doRequest(alt string) (*http.Response, error) {
  2197  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2198  	var body io.Reader = nil
  2199  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewayapi)
  2200  	if err != nil {
  2201  		return nil, err
  2202  	}
  2203  	c.urlParams_.Set("alt", alt)
  2204  	c.urlParams_.Set("prettyPrint", "false")
  2205  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2206  	urls += "?" + c.urlParams_.Encode()
  2207  	req, err := http.NewRequest("PATCH", urls, body)
  2208  	if err != nil {
  2209  		return nil, err
  2210  	}
  2211  	req.Header = reqHeaders
  2212  	googleapi.Expand(req.URL, map[string]string{
  2213  		"name": c.name,
  2214  	})
  2215  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2216  }
  2217  
  2218  // Do executes the "apigateway.projects.locations.apis.patch" call.
  2219  // Any non-2xx status code is an error. Response headers are in either
  2220  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  2221  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2222  // check whether the returned error was because http.StatusNotModified was
  2223  // returned.
  2224  func (c *ProjectsLocationsApisPatchCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  2225  	gensupport.SetOptions(c.urlParams_, opts...)
  2226  	res, err := c.doRequest("json")
  2227  	if res != nil && res.StatusCode == http.StatusNotModified {
  2228  		if res.Body != nil {
  2229  			res.Body.Close()
  2230  		}
  2231  		return nil, gensupport.WrapError(&googleapi.Error{
  2232  			Code:   res.StatusCode,
  2233  			Header: res.Header,
  2234  		})
  2235  	}
  2236  	if err != nil {
  2237  		return nil, err
  2238  	}
  2239  	defer googleapi.CloseBody(res)
  2240  	if err := googleapi.CheckResponse(res); err != nil {
  2241  		return nil, gensupport.WrapError(err)
  2242  	}
  2243  	ret := &ApigatewayOperation{
  2244  		ServerResponse: googleapi.ServerResponse{
  2245  			Header:         res.Header,
  2246  			HTTPStatusCode: res.StatusCode,
  2247  		},
  2248  	}
  2249  	target := &ret
  2250  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2251  		return nil, err
  2252  	}
  2253  	return ret, nil
  2254  }
  2255  
  2256  type ProjectsLocationsApisSetIamPolicyCall struct {
  2257  	s                             *Service
  2258  	resource                      string
  2259  	apigatewaysetiampolicyrequest *ApigatewaySetIamPolicyRequest
  2260  	urlParams_                    gensupport.URLParams
  2261  	ctx_                          context.Context
  2262  	header_                       http.Header
  2263  }
  2264  
  2265  // SetIamPolicy: Sets the access control policy on the specified resource.
  2266  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  2267  // and `PERMISSION_DENIED` errors.
  2268  //
  2269  //   - resource: REQUIRED: The resource for which the policy is being specified.
  2270  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2271  //     for the appropriate value for this field.
  2272  func (r *ProjectsLocationsApisService) SetIamPolicy(resource string, apigatewaysetiampolicyrequest *ApigatewaySetIamPolicyRequest) *ProjectsLocationsApisSetIamPolicyCall {
  2273  	c := &ProjectsLocationsApisSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2274  	c.resource = resource
  2275  	c.apigatewaysetiampolicyrequest = apigatewaysetiampolicyrequest
  2276  	return c
  2277  }
  2278  
  2279  // Fields allows partial responses to be retrieved. See
  2280  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2281  // details.
  2282  func (c *ProjectsLocationsApisSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisSetIamPolicyCall {
  2283  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2284  	return c
  2285  }
  2286  
  2287  // Context sets the context to be used in this call's Do method.
  2288  func (c *ProjectsLocationsApisSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisSetIamPolicyCall {
  2289  	c.ctx_ = ctx
  2290  	return c
  2291  }
  2292  
  2293  // Header returns a http.Header that can be modified by the caller to add
  2294  // headers to the request.
  2295  func (c *ProjectsLocationsApisSetIamPolicyCall) Header() http.Header {
  2296  	if c.header_ == nil {
  2297  		c.header_ = make(http.Header)
  2298  	}
  2299  	return c.header_
  2300  }
  2301  
  2302  func (c *ProjectsLocationsApisSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2303  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2304  	var body io.Reader = nil
  2305  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaysetiampolicyrequest)
  2306  	if err != nil {
  2307  		return nil, err
  2308  	}
  2309  	c.urlParams_.Set("alt", alt)
  2310  	c.urlParams_.Set("prettyPrint", "false")
  2311  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
  2312  	urls += "?" + c.urlParams_.Encode()
  2313  	req, err := http.NewRequest("POST", urls, body)
  2314  	if err != nil {
  2315  		return nil, err
  2316  	}
  2317  	req.Header = reqHeaders
  2318  	googleapi.Expand(req.URL, map[string]string{
  2319  		"resource": c.resource,
  2320  	})
  2321  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2322  }
  2323  
  2324  // Do executes the "apigateway.projects.locations.apis.setIamPolicy" call.
  2325  // Any non-2xx status code is an error. Response headers are in either
  2326  // *ApigatewayPolicy.ServerResponse.Header or (if a response was returned at
  2327  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2328  // check whether the returned error was because http.StatusNotModified was
  2329  // returned.
  2330  func (c *ProjectsLocationsApisSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*ApigatewayPolicy, error) {
  2331  	gensupport.SetOptions(c.urlParams_, opts...)
  2332  	res, err := c.doRequest("json")
  2333  	if res != nil && res.StatusCode == http.StatusNotModified {
  2334  		if res.Body != nil {
  2335  			res.Body.Close()
  2336  		}
  2337  		return nil, gensupport.WrapError(&googleapi.Error{
  2338  			Code:   res.StatusCode,
  2339  			Header: res.Header,
  2340  		})
  2341  	}
  2342  	if err != nil {
  2343  		return nil, err
  2344  	}
  2345  	defer googleapi.CloseBody(res)
  2346  	if err := googleapi.CheckResponse(res); err != nil {
  2347  		return nil, gensupport.WrapError(err)
  2348  	}
  2349  	ret := &ApigatewayPolicy{
  2350  		ServerResponse: googleapi.ServerResponse{
  2351  			Header:         res.Header,
  2352  			HTTPStatusCode: res.StatusCode,
  2353  		},
  2354  	}
  2355  	target := &ret
  2356  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2357  		return nil, err
  2358  	}
  2359  	return ret, nil
  2360  }
  2361  
  2362  type ProjectsLocationsApisTestIamPermissionsCall struct {
  2363  	s                                   *Service
  2364  	resource                            string
  2365  	apigatewaytestiampermissionsrequest *ApigatewayTestIamPermissionsRequest
  2366  	urlParams_                          gensupport.URLParams
  2367  	ctx_                                context.Context
  2368  	header_                             http.Header
  2369  }
  2370  
  2371  // TestIamPermissions: Returns permissions that a caller has on the specified
  2372  // resource. If the resource does not exist, this will return an empty set of
  2373  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  2374  // used for building permission-aware UIs and command-line tools, not for
  2375  // authorization checking. This operation may "fail open" without warning.
  2376  //
  2377  //   - resource: REQUIRED: The resource for which the policy detail is being
  2378  //     requested. See Resource names
  2379  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  2380  //     value for this field.
  2381  func (r *ProjectsLocationsApisService) TestIamPermissions(resource string, apigatewaytestiampermissionsrequest *ApigatewayTestIamPermissionsRequest) *ProjectsLocationsApisTestIamPermissionsCall {
  2382  	c := &ProjectsLocationsApisTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2383  	c.resource = resource
  2384  	c.apigatewaytestiampermissionsrequest = apigatewaytestiampermissionsrequest
  2385  	return c
  2386  }
  2387  
  2388  // Fields allows partial responses to be retrieved. See
  2389  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2390  // details.
  2391  func (c *ProjectsLocationsApisTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisTestIamPermissionsCall {
  2392  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2393  	return c
  2394  }
  2395  
  2396  // Context sets the context to be used in this call's Do method.
  2397  func (c *ProjectsLocationsApisTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisTestIamPermissionsCall {
  2398  	c.ctx_ = ctx
  2399  	return c
  2400  }
  2401  
  2402  // Header returns a http.Header that can be modified by the caller to add
  2403  // headers to the request.
  2404  func (c *ProjectsLocationsApisTestIamPermissionsCall) Header() http.Header {
  2405  	if c.header_ == nil {
  2406  		c.header_ = make(http.Header)
  2407  	}
  2408  	return c.header_
  2409  }
  2410  
  2411  func (c *ProjectsLocationsApisTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2412  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2413  	var body io.Reader = nil
  2414  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaytestiampermissionsrequest)
  2415  	if err != nil {
  2416  		return nil, err
  2417  	}
  2418  	c.urlParams_.Set("alt", alt)
  2419  	c.urlParams_.Set("prettyPrint", "false")
  2420  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
  2421  	urls += "?" + c.urlParams_.Encode()
  2422  	req, err := http.NewRequest("POST", urls, body)
  2423  	if err != nil {
  2424  		return nil, err
  2425  	}
  2426  	req.Header = reqHeaders
  2427  	googleapi.Expand(req.URL, map[string]string{
  2428  		"resource": c.resource,
  2429  	})
  2430  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2431  }
  2432  
  2433  // Do executes the "apigateway.projects.locations.apis.testIamPermissions" call.
  2434  // Any non-2xx status code is an error. Response headers are in either
  2435  // *ApigatewayTestIamPermissionsResponse.ServerResponse.Header or (if a
  2436  // response was returned at all) in error.(*googleapi.Error).Header. Use
  2437  // googleapi.IsNotModified to check whether the returned error was because
  2438  // http.StatusNotModified was returned.
  2439  func (c *ProjectsLocationsApisTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*ApigatewayTestIamPermissionsResponse, error) {
  2440  	gensupport.SetOptions(c.urlParams_, opts...)
  2441  	res, err := c.doRequest("json")
  2442  	if res != nil && res.StatusCode == http.StatusNotModified {
  2443  		if res.Body != nil {
  2444  			res.Body.Close()
  2445  		}
  2446  		return nil, gensupport.WrapError(&googleapi.Error{
  2447  			Code:   res.StatusCode,
  2448  			Header: res.Header,
  2449  		})
  2450  	}
  2451  	if err != nil {
  2452  		return nil, err
  2453  	}
  2454  	defer googleapi.CloseBody(res)
  2455  	if err := googleapi.CheckResponse(res); err != nil {
  2456  		return nil, gensupport.WrapError(err)
  2457  	}
  2458  	ret := &ApigatewayTestIamPermissionsResponse{
  2459  		ServerResponse: googleapi.ServerResponse{
  2460  			Header:         res.Header,
  2461  			HTTPStatusCode: res.StatusCode,
  2462  		},
  2463  	}
  2464  	target := &ret
  2465  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2466  		return nil, err
  2467  	}
  2468  	return ret, nil
  2469  }
  2470  
  2471  type ProjectsLocationsApisConfigsCreateCall struct {
  2472  	s                   *Service
  2473  	parent              string
  2474  	apigatewayapiconfig *ApigatewayApiConfig
  2475  	urlParams_          gensupport.URLParams
  2476  	ctx_                context.Context
  2477  	header_             http.Header
  2478  }
  2479  
  2480  // Create: Creates a new ApiConfig in a given project and location.
  2481  //
  2482  //   - parent: Parent resource of the API Config, of the form:
  2483  //     `projects/*/locations/global/apis/*`.
  2484  func (r *ProjectsLocationsApisConfigsService) Create(parent string, apigatewayapiconfig *ApigatewayApiConfig) *ProjectsLocationsApisConfigsCreateCall {
  2485  	c := &ProjectsLocationsApisConfigsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2486  	c.parent = parent
  2487  	c.apigatewayapiconfig = apigatewayapiconfig
  2488  	return c
  2489  }
  2490  
  2491  // ApiConfigId sets the optional parameter "apiConfigId": Required. Identifier
  2492  // to assign to the API Config. Must be unique within scope of the parent
  2493  // resource.
  2494  func (c *ProjectsLocationsApisConfigsCreateCall) ApiConfigId(apiConfigId string) *ProjectsLocationsApisConfigsCreateCall {
  2495  	c.urlParams_.Set("apiConfigId", apiConfigId)
  2496  	return c
  2497  }
  2498  
  2499  // Fields allows partial responses to be retrieved. See
  2500  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2501  // details.
  2502  func (c *ProjectsLocationsApisConfigsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsCreateCall {
  2503  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2504  	return c
  2505  }
  2506  
  2507  // Context sets the context to be used in this call's Do method.
  2508  func (c *ProjectsLocationsApisConfigsCreateCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsCreateCall {
  2509  	c.ctx_ = ctx
  2510  	return c
  2511  }
  2512  
  2513  // Header returns a http.Header that can be modified by the caller to add
  2514  // headers to the request.
  2515  func (c *ProjectsLocationsApisConfigsCreateCall) Header() http.Header {
  2516  	if c.header_ == nil {
  2517  		c.header_ = make(http.Header)
  2518  	}
  2519  	return c.header_
  2520  }
  2521  
  2522  func (c *ProjectsLocationsApisConfigsCreateCall) doRequest(alt string) (*http.Response, error) {
  2523  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2524  	var body io.Reader = nil
  2525  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewayapiconfig)
  2526  	if err != nil {
  2527  		return nil, err
  2528  	}
  2529  	c.urlParams_.Set("alt", alt)
  2530  	c.urlParams_.Set("prettyPrint", "false")
  2531  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/configs")
  2532  	urls += "?" + c.urlParams_.Encode()
  2533  	req, err := http.NewRequest("POST", urls, body)
  2534  	if err != nil {
  2535  		return nil, err
  2536  	}
  2537  	req.Header = reqHeaders
  2538  	googleapi.Expand(req.URL, map[string]string{
  2539  		"parent": c.parent,
  2540  	})
  2541  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2542  }
  2543  
  2544  // Do executes the "apigateway.projects.locations.apis.configs.create" call.
  2545  // Any non-2xx status code is an error. Response headers are in either
  2546  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  2547  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2548  // check whether the returned error was because http.StatusNotModified was
  2549  // returned.
  2550  func (c *ProjectsLocationsApisConfigsCreateCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  2551  	gensupport.SetOptions(c.urlParams_, opts...)
  2552  	res, err := c.doRequest("json")
  2553  	if res != nil && res.StatusCode == http.StatusNotModified {
  2554  		if res.Body != nil {
  2555  			res.Body.Close()
  2556  		}
  2557  		return nil, gensupport.WrapError(&googleapi.Error{
  2558  			Code:   res.StatusCode,
  2559  			Header: res.Header,
  2560  		})
  2561  	}
  2562  	if err != nil {
  2563  		return nil, err
  2564  	}
  2565  	defer googleapi.CloseBody(res)
  2566  	if err := googleapi.CheckResponse(res); err != nil {
  2567  		return nil, gensupport.WrapError(err)
  2568  	}
  2569  	ret := &ApigatewayOperation{
  2570  		ServerResponse: googleapi.ServerResponse{
  2571  			Header:         res.Header,
  2572  			HTTPStatusCode: res.StatusCode,
  2573  		},
  2574  	}
  2575  	target := &ret
  2576  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2577  		return nil, err
  2578  	}
  2579  	return ret, nil
  2580  }
  2581  
  2582  type ProjectsLocationsApisConfigsDeleteCall struct {
  2583  	s          *Service
  2584  	name       string
  2585  	urlParams_ gensupport.URLParams
  2586  	ctx_       context.Context
  2587  	header_    http.Header
  2588  }
  2589  
  2590  // Delete: Deletes a single ApiConfig.
  2591  //
  2592  //   - name: Resource name of the form:
  2593  //     `projects/*/locations/global/apis/*/configs/*`.
  2594  func (r *ProjectsLocationsApisConfigsService) Delete(name string) *ProjectsLocationsApisConfigsDeleteCall {
  2595  	c := &ProjectsLocationsApisConfigsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2596  	c.name = name
  2597  	return c
  2598  }
  2599  
  2600  // Fields allows partial responses to be retrieved. See
  2601  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2602  // details.
  2603  func (c *ProjectsLocationsApisConfigsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsDeleteCall {
  2604  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2605  	return c
  2606  }
  2607  
  2608  // Context sets the context to be used in this call's Do method.
  2609  func (c *ProjectsLocationsApisConfigsDeleteCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsDeleteCall {
  2610  	c.ctx_ = ctx
  2611  	return c
  2612  }
  2613  
  2614  // Header returns a http.Header that can be modified by the caller to add
  2615  // headers to the request.
  2616  func (c *ProjectsLocationsApisConfigsDeleteCall) Header() http.Header {
  2617  	if c.header_ == nil {
  2618  		c.header_ = make(http.Header)
  2619  	}
  2620  	return c.header_
  2621  }
  2622  
  2623  func (c *ProjectsLocationsApisConfigsDeleteCall) doRequest(alt string) (*http.Response, error) {
  2624  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2625  	var body io.Reader = nil
  2626  	c.urlParams_.Set("alt", alt)
  2627  	c.urlParams_.Set("prettyPrint", "false")
  2628  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2629  	urls += "?" + c.urlParams_.Encode()
  2630  	req, err := http.NewRequest("DELETE", urls, body)
  2631  	if err != nil {
  2632  		return nil, err
  2633  	}
  2634  	req.Header = reqHeaders
  2635  	googleapi.Expand(req.URL, map[string]string{
  2636  		"name": c.name,
  2637  	})
  2638  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2639  }
  2640  
  2641  // Do executes the "apigateway.projects.locations.apis.configs.delete" call.
  2642  // Any non-2xx status code is an error. Response headers are in either
  2643  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  2644  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2645  // check whether the returned error was because http.StatusNotModified was
  2646  // returned.
  2647  func (c *ProjectsLocationsApisConfigsDeleteCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  2648  	gensupport.SetOptions(c.urlParams_, opts...)
  2649  	res, err := c.doRequest("json")
  2650  	if res != nil && res.StatusCode == http.StatusNotModified {
  2651  		if res.Body != nil {
  2652  			res.Body.Close()
  2653  		}
  2654  		return nil, gensupport.WrapError(&googleapi.Error{
  2655  			Code:   res.StatusCode,
  2656  			Header: res.Header,
  2657  		})
  2658  	}
  2659  	if err != nil {
  2660  		return nil, err
  2661  	}
  2662  	defer googleapi.CloseBody(res)
  2663  	if err := googleapi.CheckResponse(res); err != nil {
  2664  		return nil, gensupport.WrapError(err)
  2665  	}
  2666  	ret := &ApigatewayOperation{
  2667  		ServerResponse: googleapi.ServerResponse{
  2668  			Header:         res.Header,
  2669  			HTTPStatusCode: res.StatusCode,
  2670  		},
  2671  	}
  2672  	target := &ret
  2673  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2674  		return nil, err
  2675  	}
  2676  	return ret, nil
  2677  }
  2678  
  2679  type ProjectsLocationsApisConfigsGetCall struct {
  2680  	s            *Service
  2681  	name         string
  2682  	urlParams_   gensupport.URLParams
  2683  	ifNoneMatch_ string
  2684  	ctx_         context.Context
  2685  	header_      http.Header
  2686  }
  2687  
  2688  // Get: Gets details of a single ApiConfig.
  2689  //
  2690  //   - name: Resource name of the form:
  2691  //     `projects/*/locations/global/apis/*/configs/*`.
  2692  func (r *ProjectsLocationsApisConfigsService) Get(name string) *ProjectsLocationsApisConfigsGetCall {
  2693  	c := &ProjectsLocationsApisConfigsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2694  	c.name = name
  2695  	return c
  2696  }
  2697  
  2698  // View sets the optional parameter "view": Specifies which fields of the API
  2699  // Config are returned in the response. Defaults to `BASIC` view.
  2700  //
  2701  // Possible values:
  2702  //
  2703  //	"CONFIG_VIEW_UNSPECIFIED"
  2704  //	"BASIC" - Do not include configuration source files.
  2705  //	"FULL" - Include configuration source files.
  2706  func (c *ProjectsLocationsApisConfigsGetCall) View(view string) *ProjectsLocationsApisConfigsGetCall {
  2707  	c.urlParams_.Set("view", view)
  2708  	return c
  2709  }
  2710  
  2711  // Fields allows partial responses to be retrieved. See
  2712  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2713  // details.
  2714  func (c *ProjectsLocationsApisConfigsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsGetCall {
  2715  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2716  	return c
  2717  }
  2718  
  2719  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2720  // object's ETag matches the given value. This is useful for getting updates
  2721  // only after the object has changed since the last request.
  2722  func (c *ProjectsLocationsApisConfigsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisConfigsGetCall {
  2723  	c.ifNoneMatch_ = entityTag
  2724  	return c
  2725  }
  2726  
  2727  // Context sets the context to be used in this call's Do method.
  2728  func (c *ProjectsLocationsApisConfigsGetCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsGetCall {
  2729  	c.ctx_ = ctx
  2730  	return c
  2731  }
  2732  
  2733  // Header returns a http.Header that can be modified by the caller to add
  2734  // headers to the request.
  2735  func (c *ProjectsLocationsApisConfigsGetCall) Header() http.Header {
  2736  	if c.header_ == nil {
  2737  		c.header_ = make(http.Header)
  2738  	}
  2739  	return c.header_
  2740  }
  2741  
  2742  func (c *ProjectsLocationsApisConfigsGetCall) doRequest(alt string) (*http.Response, error) {
  2743  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2744  	if c.ifNoneMatch_ != "" {
  2745  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2746  	}
  2747  	var body io.Reader = nil
  2748  	c.urlParams_.Set("alt", alt)
  2749  	c.urlParams_.Set("prettyPrint", "false")
  2750  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  2751  	urls += "?" + c.urlParams_.Encode()
  2752  	req, err := http.NewRequest("GET", urls, body)
  2753  	if err != nil {
  2754  		return nil, err
  2755  	}
  2756  	req.Header = reqHeaders
  2757  	googleapi.Expand(req.URL, map[string]string{
  2758  		"name": c.name,
  2759  	})
  2760  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2761  }
  2762  
  2763  // Do executes the "apigateway.projects.locations.apis.configs.get" call.
  2764  // Any non-2xx status code is an error. Response headers are in either
  2765  // *ApigatewayApiConfig.ServerResponse.Header or (if a response was returned at
  2766  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2767  // check whether the returned error was because http.StatusNotModified was
  2768  // returned.
  2769  func (c *ProjectsLocationsApisConfigsGetCall) Do(opts ...googleapi.CallOption) (*ApigatewayApiConfig, error) {
  2770  	gensupport.SetOptions(c.urlParams_, opts...)
  2771  	res, err := c.doRequest("json")
  2772  	if res != nil && res.StatusCode == http.StatusNotModified {
  2773  		if res.Body != nil {
  2774  			res.Body.Close()
  2775  		}
  2776  		return nil, gensupport.WrapError(&googleapi.Error{
  2777  			Code:   res.StatusCode,
  2778  			Header: res.Header,
  2779  		})
  2780  	}
  2781  	if err != nil {
  2782  		return nil, err
  2783  	}
  2784  	defer googleapi.CloseBody(res)
  2785  	if err := googleapi.CheckResponse(res); err != nil {
  2786  		return nil, gensupport.WrapError(err)
  2787  	}
  2788  	ret := &ApigatewayApiConfig{
  2789  		ServerResponse: googleapi.ServerResponse{
  2790  			Header:         res.Header,
  2791  			HTTPStatusCode: res.StatusCode,
  2792  		},
  2793  	}
  2794  	target := &ret
  2795  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2796  		return nil, err
  2797  	}
  2798  	return ret, nil
  2799  }
  2800  
  2801  type ProjectsLocationsApisConfigsGetIamPolicyCall struct {
  2802  	s            *Service
  2803  	resource     string
  2804  	urlParams_   gensupport.URLParams
  2805  	ifNoneMatch_ string
  2806  	ctx_         context.Context
  2807  	header_      http.Header
  2808  }
  2809  
  2810  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  2811  // empty policy if the resource exists and does not have a policy set.
  2812  //
  2813  //   - resource: REQUIRED: The resource for which the policy is being requested.
  2814  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  2815  //     for the appropriate value for this field.
  2816  func (r *ProjectsLocationsApisConfigsService) GetIamPolicy(resource string) *ProjectsLocationsApisConfigsGetIamPolicyCall {
  2817  	c := &ProjectsLocationsApisConfigsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2818  	c.resource = resource
  2819  	return c
  2820  }
  2821  
  2822  // OptionsRequestedPolicyVersion sets the optional parameter
  2823  // "options.requestedPolicyVersion": The maximum policy version that will be
  2824  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  2825  // an invalid value will be rejected. Requests for policies with any
  2826  // conditional role bindings must specify version 3. Policies with no
  2827  // conditional role bindings may specify any valid value or leave the field
  2828  // unset. The policy in the response might use the policy version that you
  2829  // specified, or it might use a lower policy version. For example, if you
  2830  // specify version 3, but the policy has no conditional role bindings, the
  2831  // response uses version 1. To learn which resources support conditions in
  2832  // their IAM policies, see the IAM documentation
  2833  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  2834  func (c *ProjectsLocationsApisConfigsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsApisConfigsGetIamPolicyCall {
  2835  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  2836  	return c
  2837  }
  2838  
  2839  // Fields allows partial responses to be retrieved. See
  2840  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2841  // details.
  2842  func (c *ProjectsLocationsApisConfigsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsGetIamPolicyCall {
  2843  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2844  	return c
  2845  }
  2846  
  2847  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2848  // object's ETag matches the given value. This is useful for getting updates
  2849  // only after the object has changed since the last request.
  2850  func (c *ProjectsLocationsApisConfigsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisConfigsGetIamPolicyCall {
  2851  	c.ifNoneMatch_ = entityTag
  2852  	return c
  2853  }
  2854  
  2855  // Context sets the context to be used in this call's Do method.
  2856  func (c *ProjectsLocationsApisConfigsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsGetIamPolicyCall {
  2857  	c.ctx_ = ctx
  2858  	return c
  2859  }
  2860  
  2861  // Header returns a http.Header that can be modified by the caller to add
  2862  // headers to the request.
  2863  func (c *ProjectsLocationsApisConfigsGetIamPolicyCall) Header() http.Header {
  2864  	if c.header_ == nil {
  2865  		c.header_ = make(http.Header)
  2866  	}
  2867  	return c.header_
  2868  }
  2869  
  2870  func (c *ProjectsLocationsApisConfigsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2871  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  2872  	if c.ifNoneMatch_ != "" {
  2873  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2874  	}
  2875  	var body io.Reader = nil
  2876  	c.urlParams_.Set("alt", alt)
  2877  	c.urlParams_.Set("prettyPrint", "false")
  2878  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
  2879  	urls += "?" + c.urlParams_.Encode()
  2880  	req, err := http.NewRequest("GET", urls, body)
  2881  	if err != nil {
  2882  		return nil, err
  2883  	}
  2884  	req.Header = reqHeaders
  2885  	googleapi.Expand(req.URL, map[string]string{
  2886  		"resource": c.resource,
  2887  	})
  2888  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2889  }
  2890  
  2891  // Do executes the "apigateway.projects.locations.apis.configs.getIamPolicy" call.
  2892  // Any non-2xx status code is an error. Response headers are in either
  2893  // *ApigatewayPolicy.ServerResponse.Header or (if a response was returned at
  2894  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2895  // check whether the returned error was because http.StatusNotModified was
  2896  // returned.
  2897  func (c *ProjectsLocationsApisConfigsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*ApigatewayPolicy, error) {
  2898  	gensupport.SetOptions(c.urlParams_, opts...)
  2899  	res, err := c.doRequest("json")
  2900  	if res != nil && res.StatusCode == http.StatusNotModified {
  2901  		if res.Body != nil {
  2902  			res.Body.Close()
  2903  		}
  2904  		return nil, gensupport.WrapError(&googleapi.Error{
  2905  			Code:   res.StatusCode,
  2906  			Header: res.Header,
  2907  		})
  2908  	}
  2909  	if err != nil {
  2910  		return nil, err
  2911  	}
  2912  	defer googleapi.CloseBody(res)
  2913  	if err := googleapi.CheckResponse(res); err != nil {
  2914  		return nil, gensupport.WrapError(err)
  2915  	}
  2916  	ret := &ApigatewayPolicy{
  2917  		ServerResponse: googleapi.ServerResponse{
  2918  			Header:         res.Header,
  2919  			HTTPStatusCode: res.StatusCode,
  2920  		},
  2921  	}
  2922  	target := &ret
  2923  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2924  		return nil, err
  2925  	}
  2926  	return ret, nil
  2927  }
  2928  
  2929  type ProjectsLocationsApisConfigsListCall struct {
  2930  	s            *Service
  2931  	parent       string
  2932  	urlParams_   gensupport.URLParams
  2933  	ifNoneMatch_ string
  2934  	ctx_         context.Context
  2935  	header_      http.Header
  2936  }
  2937  
  2938  // List: Lists ApiConfigs in a given project and location.
  2939  //
  2940  //   - parent: Parent resource of the API Config, of the form:
  2941  //     `projects/*/locations/global/apis/*`.
  2942  func (r *ProjectsLocationsApisConfigsService) List(parent string) *ProjectsLocationsApisConfigsListCall {
  2943  	c := &ProjectsLocationsApisConfigsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2944  	c.parent = parent
  2945  	return c
  2946  }
  2947  
  2948  // Filter sets the optional parameter "filter": Filter.
  2949  func (c *ProjectsLocationsApisConfigsListCall) Filter(filter string) *ProjectsLocationsApisConfigsListCall {
  2950  	c.urlParams_.Set("filter", filter)
  2951  	return c
  2952  }
  2953  
  2954  // OrderBy sets the optional parameter "orderBy": Order by parameters.
  2955  func (c *ProjectsLocationsApisConfigsListCall) OrderBy(orderBy string) *ProjectsLocationsApisConfigsListCall {
  2956  	c.urlParams_.Set("orderBy", orderBy)
  2957  	return c
  2958  }
  2959  
  2960  // PageSize sets the optional parameter "pageSize": Page size.
  2961  func (c *ProjectsLocationsApisConfigsListCall) PageSize(pageSize int64) *ProjectsLocationsApisConfigsListCall {
  2962  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2963  	return c
  2964  }
  2965  
  2966  // PageToken sets the optional parameter "pageToken": Page token.
  2967  func (c *ProjectsLocationsApisConfigsListCall) PageToken(pageToken string) *ProjectsLocationsApisConfigsListCall {
  2968  	c.urlParams_.Set("pageToken", pageToken)
  2969  	return c
  2970  }
  2971  
  2972  // Fields allows partial responses to be retrieved. See
  2973  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2974  // details.
  2975  func (c *ProjectsLocationsApisConfigsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsListCall {
  2976  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2977  	return c
  2978  }
  2979  
  2980  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  2981  // object's ETag matches the given value. This is useful for getting updates
  2982  // only after the object has changed since the last request.
  2983  func (c *ProjectsLocationsApisConfigsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsApisConfigsListCall {
  2984  	c.ifNoneMatch_ = entityTag
  2985  	return c
  2986  }
  2987  
  2988  // Context sets the context to be used in this call's Do method.
  2989  func (c *ProjectsLocationsApisConfigsListCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsListCall {
  2990  	c.ctx_ = ctx
  2991  	return c
  2992  }
  2993  
  2994  // Header returns a http.Header that can be modified by the caller to add
  2995  // headers to the request.
  2996  func (c *ProjectsLocationsApisConfigsListCall) Header() http.Header {
  2997  	if c.header_ == nil {
  2998  		c.header_ = make(http.Header)
  2999  	}
  3000  	return c.header_
  3001  }
  3002  
  3003  func (c *ProjectsLocationsApisConfigsListCall) doRequest(alt string) (*http.Response, error) {
  3004  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3005  	if c.ifNoneMatch_ != "" {
  3006  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3007  	}
  3008  	var body io.Reader = nil
  3009  	c.urlParams_.Set("alt", alt)
  3010  	c.urlParams_.Set("prettyPrint", "false")
  3011  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/configs")
  3012  	urls += "?" + c.urlParams_.Encode()
  3013  	req, err := http.NewRequest("GET", urls, body)
  3014  	if err != nil {
  3015  		return nil, err
  3016  	}
  3017  	req.Header = reqHeaders
  3018  	googleapi.Expand(req.URL, map[string]string{
  3019  		"parent": c.parent,
  3020  	})
  3021  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3022  }
  3023  
  3024  // Do executes the "apigateway.projects.locations.apis.configs.list" call.
  3025  // Any non-2xx status code is an error. Response headers are in either
  3026  // *ApigatewayListApiConfigsResponse.ServerResponse.Header or (if a response
  3027  // was returned at all) in error.(*googleapi.Error).Header. Use
  3028  // googleapi.IsNotModified to check whether the returned error was because
  3029  // http.StatusNotModified was returned.
  3030  func (c *ProjectsLocationsApisConfigsListCall) Do(opts ...googleapi.CallOption) (*ApigatewayListApiConfigsResponse, error) {
  3031  	gensupport.SetOptions(c.urlParams_, opts...)
  3032  	res, err := c.doRequest("json")
  3033  	if res != nil && res.StatusCode == http.StatusNotModified {
  3034  		if res.Body != nil {
  3035  			res.Body.Close()
  3036  		}
  3037  		return nil, gensupport.WrapError(&googleapi.Error{
  3038  			Code:   res.StatusCode,
  3039  			Header: res.Header,
  3040  		})
  3041  	}
  3042  	if err != nil {
  3043  		return nil, err
  3044  	}
  3045  	defer googleapi.CloseBody(res)
  3046  	if err := googleapi.CheckResponse(res); err != nil {
  3047  		return nil, gensupport.WrapError(err)
  3048  	}
  3049  	ret := &ApigatewayListApiConfigsResponse{
  3050  		ServerResponse: googleapi.ServerResponse{
  3051  			Header:         res.Header,
  3052  			HTTPStatusCode: res.StatusCode,
  3053  		},
  3054  	}
  3055  	target := &ret
  3056  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3057  		return nil, err
  3058  	}
  3059  	return ret, nil
  3060  }
  3061  
  3062  // Pages invokes f for each page of results.
  3063  // A non-nil error returned from f will halt the iteration.
  3064  // The provided context supersedes any context provided to the Context method.
  3065  func (c *ProjectsLocationsApisConfigsListCall) Pages(ctx context.Context, f func(*ApigatewayListApiConfigsResponse) error) error {
  3066  	c.ctx_ = ctx
  3067  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3068  	for {
  3069  		x, err := c.Do()
  3070  		if err != nil {
  3071  			return err
  3072  		}
  3073  		if err := f(x); err != nil {
  3074  			return err
  3075  		}
  3076  		if x.NextPageToken == "" {
  3077  			return nil
  3078  		}
  3079  		c.PageToken(x.NextPageToken)
  3080  	}
  3081  }
  3082  
  3083  type ProjectsLocationsApisConfigsPatchCall struct {
  3084  	s                   *Service
  3085  	name                string
  3086  	apigatewayapiconfig *ApigatewayApiConfig
  3087  	urlParams_          gensupport.URLParams
  3088  	ctx_                context.Context
  3089  	header_             http.Header
  3090  }
  3091  
  3092  // Patch: Updates the parameters of a single ApiConfig.
  3093  //
  3094  //   - name: Output only. Resource name of the API Config. Format:
  3095  //     projects/{project}/locations/global/apis/{api}/configs/{api_config}.
  3096  func (r *ProjectsLocationsApisConfigsService) Patch(name string, apigatewayapiconfig *ApigatewayApiConfig) *ProjectsLocationsApisConfigsPatchCall {
  3097  	c := &ProjectsLocationsApisConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3098  	c.name = name
  3099  	c.apigatewayapiconfig = apigatewayapiconfig
  3100  	return c
  3101  }
  3102  
  3103  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  3104  // specify the fields to be overwritten in the ApiConfig resource by the
  3105  // update. The fields specified in the update_mask are relative to the
  3106  // resource, not the full request. A field will be overwritten if it is in the
  3107  // mask. If the user does not provide a mask then all fields will be
  3108  // overwritten.
  3109  func (c *ProjectsLocationsApisConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsApisConfigsPatchCall {
  3110  	c.urlParams_.Set("updateMask", updateMask)
  3111  	return c
  3112  }
  3113  
  3114  // Fields allows partial responses to be retrieved. See
  3115  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3116  // details.
  3117  func (c *ProjectsLocationsApisConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsPatchCall {
  3118  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3119  	return c
  3120  }
  3121  
  3122  // Context sets the context to be used in this call's Do method.
  3123  func (c *ProjectsLocationsApisConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsPatchCall {
  3124  	c.ctx_ = ctx
  3125  	return c
  3126  }
  3127  
  3128  // Header returns a http.Header that can be modified by the caller to add
  3129  // headers to the request.
  3130  func (c *ProjectsLocationsApisConfigsPatchCall) Header() http.Header {
  3131  	if c.header_ == nil {
  3132  		c.header_ = make(http.Header)
  3133  	}
  3134  	return c.header_
  3135  }
  3136  
  3137  func (c *ProjectsLocationsApisConfigsPatchCall) doRequest(alt string) (*http.Response, error) {
  3138  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3139  	var body io.Reader = nil
  3140  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewayapiconfig)
  3141  	if err != nil {
  3142  		return nil, err
  3143  	}
  3144  	c.urlParams_.Set("alt", alt)
  3145  	c.urlParams_.Set("prettyPrint", "false")
  3146  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3147  	urls += "?" + c.urlParams_.Encode()
  3148  	req, err := http.NewRequest("PATCH", urls, body)
  3149  	if err != nil {
  3150  		return nil, err
  3151  	}
  3152  	req.Header = reqHeaders
  3153  	googleapi.Expand(req.URL, map[string]string{
  3154  		"name": c.name,
  3155  	})
  3156  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3157  }
  3158  
  3159  // Do executes the "apigateway.projects.locations.apis.configs.patch" call.
  3160  // Any non-2xx status code is an error. Response headers are in either
  3161  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  3162  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3163  // check whether the returned error was because http.StatusNotModified was
  3164  // returned.
  3165  func (c *ProjectsLocationsApisConfigsPatchCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  3166  	gensupport.SetOptions(c.urlParams_, opts...)
  3167  	res, err := c.doRequest("json")
  3168  	if res != nil && res.StatusCode == http.StatusNotModified {
  3169  		if res.Body != nil {
  3170  			res.Body.Close()
  3171  		}
  3172  		return nil, gensupport.WrapError(&googleapi.Error{
  3173  			Code:   res.StatusCode,
  3174  			Header: res.Header,
  3175  		})
  3176  	}
  3177  	if err != nil {
  3178  		return nil, err
  3179  	}
  3180  	defer googleapi.CloseBody(res)
  3181  	if err := googleapi.CheckResponse(res); err != nil {
  3182  		return nil, gensupport.WrapError(err)
  3183  	}
  3184  	ret := &ApigatewayOperation{
  3185  		ServerResponse: googleapi.ServerResponse{
  3186  			Header:         res.Header,
  3187  			HTTPStatusCode: res.StatusCode,
  3188  		},
  3189  	}
  3190  	target := &ret
  3191  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3192  		return nil, err
  3193  	}
  3194  	return ret, nil
  3195  }
  3196  
  3197  type ProjectsLocationsApisConfigsSetIamPolicyCall struct {
  3198  	s                             *Service
  3199  	resource                      string
  3200  	apigatewaysetiampolicyrequest *ApigatewaySetIamPolicyRequest
  3201  	urlParams_                    gensupport.URLParams
  3202  	ctx_                          context.Context
  3203  	header_                       http.Header
  3204  }
  3205  
  3206  // SetIamPolicy: Sets the access control policy on the specified resource.
  3207  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  3208  // and `PERMISSION_DENIED` errors.
  3209  //
  3210  //   - resource: REQUIRED: The resource for which the policy is being specified.
  3211  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3212  //     for the appropriate value for this field.
  3213  func (r *ProjectsLocationsApisConfigsService) SetIamPolicy(resource string, apigatewaysetiampolicyrequest *ApigatewaySetIamPolicyRequest) *ProjectsLocationsApisConfigsSetIamPolicyCall {
  3214  	c := &ProjectsLocationsApisConfigsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3215  	c.resource = resource
  3216  	c.apigatewaysetiampolicyrequest = apigatewaysetiampolicyrequest
  3217  	return c
  3218  }
  3219  
  3220  // Fields allows partial responses to be retrieved. See
  3221  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3222  // details.
  3223  func (c *ProjectsLocationsApisConfigsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsSetIamPolicyCall {
  3224  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3225  	return c
  3226  }
  3227  
  3228  // Context sets the context to be used in this call's Do method.
  3229  func (c *ProjectsLocationsApisConfigsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsSetIamPolicyCall {
  3230  	c.ctx_ = ctx
  3231  	return c
  3232  }
  3233  
  3234  // Header returns a http.Header that can be modified by the caller to add
  3235  // headers to the request.
  3236  func (c *ProjectsLocationsApisConfigsSetIamPolicyCall) Header() http.Header {
  3237  	if c.header_ == nil {
  3238  		c.header_ = make(http.Header)
  3239  	}
  3240  	return c.header_
  3241  }
  3242  
  3243  func (c *ProjectsLocationsApisConfigsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3244  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3245  	var body io.Reader = nil
  3246  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaysetiampolicyrequest)
  3247  	if err != nil {
  3248  		return nil, err
  3249  	}
  3250  	c.urlParams_.Set("alt", alt)
  3251  	c.urlParams_.Set("prettyPrint", "false")
  3252  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
  3253  	urls += "?" + c.urlParams_.Encode()
  3254  	req, err := http.NewRequest("POST", urls, body)
  3255  	if err != nil {
  3256  		return nil, err
  3257  	}
  3258  	req.Header = reqHeaders
  3259  	googleapi.Expand(req.URL, map[string]string{
  3260  		"resource": c.resource,
  3261  	})
  3262  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3263  }
  3264  
  3265  // Do executes the "apigateway.projects.locations.apis.configs.setIamPolicy" call.
  3266  // Any non-2xx status code is an error. Response headers are in either
  3267  // *ApigatewayPolicy.ServerResponse.Header or (if a response was returned at
  3268  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3269  // check whether the returned error was because http.StatusNotModified was
  3270  // returned.
  3271  func (c *ProjectsLocationsApisConfigsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*ApigatewayPolicy, error) {
  3272  	gensupport.SetOptions(c.urlParams_, opts...)
  3273  	res, err := c.doRequest("json")
  3274  	if res != nil && res.StatusCode == http.StatusNotModified {
  3275  		if res.Body != nil {
  3276  			res.Body.Close()
  3277  		}
  3278  		return nil, gensupport.WrapError(&googleapi.Error{
  3279  			Code:   res.StatusCode,
  3280  			Header: res.Header,
  3281  		})
  3282  	}
  3283  	if err != nil {
  3284  		return nil, err
  3285  	}
  3286  	defer googleapi.CloseBody(res)
  3287  	if err := googleapi.CheckResponse(res); err != nil {
  3288  		return nil, gensupport.WrapError(err)
  3289  	}
  3290  	ret := &ApigatewayPolicy{
  3291  		ServerResponse: googleapi.ServerResponse{
  3292  			Header:         res.Header,
  3293  			HTTPStatusCode: res.StatusCode,
  3294  		},
  3295  	}
  3296  	target := &ret
  3297  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3298  		return nil, err
  3299  	}
  3300  	return ret, nil
  3301  }
  3302  
  3303  type ProjectsLocationsApisConfigsTestIamPermissionsCall struct {
  3304  	s                                   *Service
  3305  	resource                            string
  3306  	apigatewaytestiampermissionsrequest *ApigatewayTestIamPermissionsRequest
  3307  	urlParams_                          gensupport.URLParams
  3308  	ctx_                                context.Context
  3309  	header_                             http.Header
  3310  }
  3311  
  3312  // TestIamPermissions: Returns permissions that a caller has on the specified
  3313  // resource. If the resource does not exist, this will return an empty set of
  3314  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  3315  // used for building permission-aware UIs and command-line tools, not for
  3316  // authorization checking. This operation may "fail open" without warning.
  3317  //
  3318  //   - resource: REQUIRED: The resource for which the policy detail is being
  3319  //     requested. See Resource names
  3320  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  3321  //     value for this field.
  3322  func (r *ProjectsLocationsApisConfigsService) TestIamPermissions(resource string, apigatewaytestiampermissionsrequest *ApigatewayTestIamPermissionsRequest) *ProjectsLocationsApisConfigsTestIamPermissionsCall {
  3323  	c := &ProjectsLocationsApisConfigsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3324  	c.resource = resource
  3325  	c.apigatewaytestiampermissionsrequest = apigatewaytestiampermissionsrequest
  3326  	return c
  3327  }
  3328  
  3329  // Fields allows partial responses to be retrieved. See
  3330  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3331  // details.
  3332  func (c *ProjectsLocationsApisConfigsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsApisConfigsTestIamPermissionsCall {
  3333  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3334  	return c
  3335  }
  3336  
  3337  // Context sets the context to be used in this call's Do method.
  3338  func (c *ProjectsLocationsApisConfigsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsApisConfigsTestIamPermissionsCall {
  3339  	c.ctx_ = ctx
  3340  	return c
  3341  }
  3342  
  3343  // Header returns a http.Header that can be modified by the caller to add
  3344  // headers to the request.
  3345  func (c *ProjectsLocationsApisConfigsTestIamPermissionsCall) Header() http.Header {
  3346  	if c.header_ == nil {
  3347  		c.header_ = make(http.Header)
  3348  	}
  3349  	return c.header_
  3350  }
  3351  
  3352  func (c *ProjectsLocationsApisConfigsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  3353  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3354  	var body io.Reader = nil
  3355  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaytestiampermissionsrequest)
  3356  	if err != nil {
  3357  		return nil, err
  3358  	}
  3359  	c.urlParams_.Set("alt", alt)
  3360  	c.urlParams_.Set("prettyPrint", "false")
  3361  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
  3362  	urls += "?" + c.urlParams_.Encode()
  3363  	req, err := http.NewRequest("POST", urls, body)
  3364  	if err != nil {
  3365  		return nil, err
  3366  	}
  3367  	req.Header = reqHeaders
  3368  	googleapi.Expand(req.URL, map[string]string{
  3369  		"resource": c.resource,
  3370  	})
  3371  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3372  }
  3373  
  3374  // Do executes the "apigateway.projects.locations.apis.configs.testIamPermissions" call.
  3375  // Any non-2xx status code is an error. Response headers are in either
  3376  // *ApigatewayTestIamPermissionsResponse.ServerResponse.Header or (if a
  3377  // response was returned at all) in error.(*googleapi.Error).Header. Use
  3378  // googleapi.IsNotModified to check whether the returned error was because
  3379  // http.StatusNotModified was returned.
  3380  func (c *ProjectsLocationsApisConfigsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*ApigatewayTestIamPermissionsResponse, error) {
  3381  	gensupport.SetOptions(c.urlParams_, opts...)
  3382  	res, err := c.doRequest("json")
  3383  	if res != nil && res.StatusCode == http.StatusNotModified {
  3384  		if res.Body != nil {
  3385  			res.Body.Close()
  3386  		}
  3387  		return nil, gensupport.WrapError(&googleapi.Error{
  3388  			Code:   res.StatusCode,
  3389  			Header: res.Header,
  3390  		})
  3391  	}
  3392  	if err != nil {
  3393  		return nil, err
  3394  	}
  3395  	defer googleapi.CloseBody(res)
  3396  	if err := googleapi.CheckResponse(res); err != nil {
  3397  		return nil, gensupport.WrapError(err)
  3398  	}
  3399  	ret := &ApigatewayTestIamPermissionsResponse{
  3400  		ServerResponse: googleapi.ServerResponse{
  3401  			Header:         res.Header,
  3402  			HTTPStatusCode: res.StatusCode,
  3403  		},
  3404  	}
  3405  	target := &ret
  3406  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3407  		return nil, err
  3408  	}
  3409  	return ret, nil
  3410  }
  3411  
  3412  type ProjectsLocationsGatewaysCreateCall struct {
  3413  	s                 *Service
  3414  	parent            string
  3415  	apigatewaygateway *ApigatewayGateway
  3416  	urlParams_        gensupport.URLParams
  3417  	ctx_              context.Context
  3418  	header_           http.Header
  3419  }
  3420  
  3421  // Create: Creates a new Gateway in a given project and location.
  3422  //
  3423  //   - parent: Parent resource of the Gateway, of the form:
  3424  //     `projects/*/locations/*`.
  3425  func (r *ProjectsLocationsGatewaysService) Create(parent string, apigatewaygateway *ApigatewayGateway) *ProjectsLocationsGatewaysCreateCall {
  3426  	c := &ProjectsLocationsGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3427  	c.parent = parent
  3428  	c.apigatewaygateway = apigatewaygateway
  3429  	return c
  3430  }
  3431  
  3432  // GatewayId sets the optional parameter "gatewayId": Required. Identifier to
  3433  // assign to the Gateway. Must be unique within scope of the parent resource.
  3434  func (c *ProjectsLocationsGatewaysCreateCall) GatewayId(gatewayId string) *ProjectsLocationsGatewaysCreateCall {
  3435  	c.urlParams_.Set("gatewayId", gatewayId)
  3436  	return c
  3437  }
  3438  
  3439  // Fields allows partial responses to be retrieved. See
  3440  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3441  // details.
  3442  func (c *ProjectsLocationsGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysCreateCall {
  3443  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3444  	return c
  3445  }
  3446  
  3447  // Context sets the context to be used in this call's Do method.
  3448  func (c *ProjectsLocationsGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaysCreateCall {
  3449  	c.ctx_ = ctx
  3450  	return c
  3451  }
  3452  
  3453  // Header returns a http.Header that can be modified by the caller to add
  3454  // headers to the request.
  3455  func (c *ProjectsLocationsGatewaysCreateCall) Header() http.Header {
  3456  	if c.header_ == nil {
  3457  		c.header_ = make(http.Header)
  3458  	}
  3459  	return c.header_
  3460  }
  3461  
  3462  func (c *ProjectsLocationsGatewaysCreateCall) doRequest(alt string) (*http.Response, error) {
  3463  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3464  	var body io.Reader = nil
  3465  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaygateway)
  3466  	if err != nil {
  3467  		return nil, err
  3468  	}
  3469  	c.urlParams_.Set("alt", alt)
  3470  	c.urlParams_.Set("prettyPrint", "false")
  3471  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/gateways")
  3472  	urls += "?" + c.urlParams_.Encode()
  3473  	req, err := http.NewRequest("POST", urls, body)
  3474  	if err != nil {
  3475  		return nil, err
  3476  	}
  3477  	req.Header = reqHeaders
  3478  	googleapi.Expand(req.URL, map[string]string{
  3479  		"parent": c.parent,
  3480  	})
  3481  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3482  }
  3483  
  3484  // Do executes the "apigateway.projects.locations.gateways.create" call.
  3485  // Any non-2xx status code is an error. Response headers are in either
  3486  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  3487  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3488  // check whether the returned error was because http.StatusNotModified was
  3489  // returned.
  3490  func (c *ProjectsLocationsGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  3491  	gensupport.SetOptions(c.urlParams_, opts...)
  3492  	res, err := c.doRequest("json")
  3493  	if res != nil && res.StatusCode == http.StatusNotModified {
  3494  		if res.Body != nil {
  3495  			res.Body.Close()
  3496  		}
  3497  		return nil, gensupport.WrapError(&googleapi.Error{
  3498  			Code:   res.StatusCode,
  3499  			Header: res.Header,
  3500  		})
  3501  	}
  3502  	if err != nil {
  3503  		return nil, err
  3504  	}
  3505  	defer googleapi.CloseBody(res)
  3506  	if err := googleapi.CheckResponse(res); err != nil {
  3507  		return nil, gensupport.WrapError(err)
  3508  	}
  3509  	ret := &ApigatewayOperation{
  3510  		ServerResponse: googleapi.ServerResponse{
  3511  			Header:         res.Header,
  3512  			HTTPStatusCode: res.StatusCode,
  3513  		},
  3514  	}
  3515  	target := &ret
  3516  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3517  		return nil, err
  3518  	}
  3519  	return ret, nil
  3520  }
  3521  
  3522  type ProjectsLocationsGatewaysDeleteCall struct {
  3523  	s          *Service
  3524  	name       string
  3525  	urlParams_ gensupport.URLParams
  3526  	ctx_       context.Context
  3527  	header_    http.Header
  3528  }
  3529  
  3530  // Delete: Deletes a single Gateway.
  3531  //
  3532  // - name: Resource name of the form: `projects/*/locations/*/gateways/*`.
  3533  func (r *ProjectsLocationsGatewaysService) Delete(name string) *ProjectsLocationsGatewaysDeleteCall {
  3534  	c := &ProjectsLocationsGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3535  	c.name = name
  3536  	return c
  3537  }
  3538  
  3539  // Fields allows partial responses to be retrieved. See
  3540  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3541  // details.
  3542  func (c *ProjectsLocationsGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysDeleteCall {
  3543  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3544  	return c
  3545  }
  3546  
  3547  // Context sets the context to be used in this call's Do method.
  3548  func (c *ProjectsLocationsGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaysDeleteCall {
  3549  	c.ctx_ = ctx
  3550  	return c
  3551  }
  3552  
  3553  // Header returns a http.Header that can be modified by the caller to add
  3554  // headers to the request.
  3555  func (c *ProjectsLocationsGatewaysDeleteCall) Header() http.Header {
  3556  	if c.header_ == nil {
  3557  		c.header_ = make(http.Header)
  3558  	}
  3559  	return c.header_
  3560  }
  3561  
  3562  func (c *ProjectsLocationsGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
  3563  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3564  	var body io.Reader = nil
  3565  	c.urlParams_.Set("alt", alt)
  3566  	c.urlParams_.Set("prettyPrint", "false")
  3567  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3568  	urls += "?" + c.urlParams_.Encode()
  3569  	req, err := http.NewRequest("DELETE", urls, body)
  3570  	if err != nil {
  3571  		return nil, err
  3572  	}
  3573  	req.Header = reqHeaders
  3574  	googleapi.Expand(req.URL, map[string]string{
  3575  		"name": c.name,
  3576  	})
  3577  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3578  }
  3579  
  3580  // Do executes the "apigateway.projects.locations.gateways.delete" call.
  3581  // Any non-2xx status code is an error. Response headers are in either
  3582  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  3583  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3584  // check whether the returned error was because http.StatusNotModified was
  3585  // returned.
  3586  func (c *ProjectsLocationsGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  3587  	gensupport.SetOptions(c.urlParams_, opts...)
  3588  	res, err := c.doRequest("json")
  3589  	if res != nil && res.StatusCode == http.StatusNotModified {
  3590  		if res.Body != nil {
  3591  			res.Body.Close()
  3592  		}
  3593  		return nil, gensupport.WrapError(&googleapi.Error{
  3594  			Code:   res.StatusCode,
  3595  			Header: res.Header,
  3596  		})
  3597  	}
  3598  	if err != nil {
  3599  		return nil, err
  3600  	}
  3601  	defer googleapi.CloseBody(res)
  3602  	if err := googleapi.CheckResponse(res); err != nil {
  3603  		return nil, gensupport.WrapError(err)
  3604  	}
  3605  	ret := &ApigatewayOperation{
  3606  		ServerResponse: googleapi.ServerResponse{
  3607  			Header:         res.Header,
  3608  			HTTPStatusCode: res.StatusCode,
  3609  		},
  3610  	}
  3611  	target := &ret
  3612  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3613  		return nil, err
  3614  	}
  3615  	return ret, nil
  3616  }
  3617  
  3618  type ProjectsLocationsGatewaysGetCall struct {
  3619  	s            *Service
  3620  	name         string
  3621  	urlParams_   gensupport.URLParams
  3622  	ifNoneMatch_ string
  3623  	ctx_         context.Context
  3624  	header_      http.Header
  3625  }
  3626  
  3627  // Get: Gets details of a single Gateway.
  3628  //
  3629  // - name: Resource name of the form: `projects/*/locations/*/gateways/*`.
  3630  func (r *ProjectsLocationsGatewaysService) Get(name string) *ProjectsLocationsGatewaysGetCall {
  3631  	c := &ProjectsLocationsGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3632  	c.name = name
  3633  	return c
  3634  }
  3635  
  3636  // Fields allows partial responses to be retrieved. See
  3637  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3638  // details.
  3639  func (c *ProjectsLocationsGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetCall {
  3640  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3641  	return c
  3642  }
  3643  
  3644  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3645  // object's ETag matches the given value. This is useful for getting updates
  3646  // only after the object has changed since the last request.
  3647  func (c *ProjectsLocationsGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetCall {
  3648  	c.ifNoneMatch_ = entityTag
  3649  	return c
  3650  }
  3651  
  3652  // Context sets the context to be used in this call's Do method.
  3653  func (c *ProjectsLocationsGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetCall {
  3654  	c.ctx_ = ctx
  3655  	return c
  3656  }
  3657  
  3658  // Header returns a http.Header that can be modified by the caller to add
  3659  // headers to the request.
  3660  func (c *ProjectsLocationsGatewaysGetCall) Header() http.Header {
  3661  	if c.header_ == nil {
  3662  		c.header_ = make(http.Header)
  3663  	}
  3664  	return c.header_
  3665  }
  3666  
  3667  func (c *ProjectsLocationsGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
  3668  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3669  	if c.ifNoneMatch_ != "" {
  3670  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3671  	}
  3672  	var body io.Reader = nil
  3673  	c.urlParams_.Set("alt", alt)
  3674  	c.urlParams_.Set("prettyPrint", "false")
  3675  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  3676  	urls += "?" + c.urlParams_.Encode()
  3677  	req, err := http.NewRequest("GET", urls, body)
  3678  	if err != nil {
  3679  		return nil, err
  3680  	}
  3681  	req.Header = reqHeaders
  3682  	googleapi.Expand(req.URL, map[string]string{
  3683  		"name": c.name,
  3684  	})
  3685  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3686  }
  3687  
  3688  // Do executes the "apigateway.projects.locations.gateways.get" call.
  3689  // Any non-2xx status code is an error. Response headers are in either
  3690  // *ApigatewayGateway.ServerResponse.Header or (if a response was returned at
  3691  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3692  // check whether the returned error was because http.StatusNotModified was
  3693  // returned.
  3694  func (c *ProjectsLocationsGatewaysGetCall) Do(opts ...googleapi.CallOption) (*ApigatewayGateway, error) {
  3695  	gensupport.SetOptions(c.urlParams_, opts...)
  3696  	res, err := c.doRequest("json")
  3697  	if res != nil && res.StatusCode == http.StatusNotModified {
  3698  		if res.Body != nil {
  3699  			res.Body.Close()
  3700  		}
  3701  		return nil, gensupport.WrapError(&googleapi.Error{
  3702  			Code:   res.StatusCode,
  3703  			Header: res.Header,
  3704  		})
  3705  	}
  3706  	if err != nil {
  3707  		return nil, err
  3708  	}
  3709  	defer googleapi.CloseBody(res)
  3710  	if err := googleapi.CheckResponse(res); err != nil {
  3711  		return nil, gensupport.WrapError(err)
  3712  	}
  3713  	ret := &ApigatewayGateway{
  3714  		ServerResponse: googleapi.ServerResponse{
  3715  			Header:         res.Header,
  3716  			HTTPStatusCode: res.StatusCode,
  3717  		},
  3718  	}
  3719  	target := &ret
  3720  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3721  		return nil, err
  3722  	}
  3723  	return ret, nil
  3724  }
  3725  
  3726  type ProjectsLocationsGatewaysGetIamPolicyCall struct {
  3727  	s            *Service
  3728  	resource     string
  3729  	urlParams_   gensupport.URLParams
  3730  	ifNoneMatch_ string
  3731  	ctx_         context.Context
  3732  	header_      http.Header
  3733  }
  3734  
  3735  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3736  // empty policy if the resource exists and does not have a policy set.
  3737  //
  3738  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3739  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3740  //     for the appropriate value for this field.
  3741  func (r *ProjectsLocationsGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsGatewaysGetIamPolicyCall {
  3742  	c := &ProjectsLocationsGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3743  	c.resource = resource
  3744  	return c
  3745  }
  3746  
  3747  // OptionsRequestedPolicyVersion sets the optional parameter
  3748  // "options.requestedPolicyVersion": The maximum policy version that will be
  3749  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3750  // an invalid value will be rejected. Requests for policies with any
  3751  // conditional role bindings must specify version 3. Policies with no
  3752  // conditional role bindings may specify any valid value or leave the field
  3753  // unset. The policy in the response might use the policy version that you
  3754  // specified, or it might use a lower policy version. For example, if you
  3755  // specify version 3, but the policy has no conditional role bindings, the
  3756  // response uses version 1. To learn which resources support conditions in
  3757  // their IAM policies, see the IAM documentation
  3758  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3759  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGatewaysGetIamPolicyCall {
  3760  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3761  	return c
  3762  }
  3763  
  3764  // Fields allows partial responses to be retrieved. See
  3765  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3766  // details.
  3767  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetIamPolicyCall {
  3768  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3769  	return c
  3770  }
  3771  
  3772  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3773  // object's ETag matches the given value. This is useful for getting updates
  3774  // only after the object has changed since the last request.
  3775  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetIamPolicyCall {
  3776  	c.ifNoneMatch_ = entityTag
  3777  	return c
  3778  }
  3779  
  3780  // Context sets the context to be used in this call's Do method.
  3781  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetIamPolicyCall {
  3782  	c.ctx_ = ctx
  3783  	return c
  3784  }
  3785  
  3786  // Header returns a http.Header that can be modified by the caller to add
  3787  // headers to the request.
  3788  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Header() http.Header {
  3789  	if c.header_ == nil {
  3790  		c.header_ = make(http.Header)
  3791  	}
  3792  	return c.header_
  3793  }
  3794  
  3795  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3796  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3797  	if c.ifNoneMatch_ != "" {
  3798  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3799  	}
  3800  	var body io.Reader = nil
  3801  	c.urlParams_.Set("alt", alt)
  3802  	c.urlParams_.Set("prettyPrint", "false")
  3803  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:getIamPolicy")
  3804  	urls += "?" + c.urlParams_.Encode()
  3805  	req, err := http.NewRequest("GET", urls, body)
  3806  	if err != nil {
  3807  		return nil, err
  3808  	}
  3809  	req.Header = reqHeaders
  3810  	googleapi.Expand(req.URL, map[string]string{
  3811  		"resource": c.resource,
  3812  	})
  3813  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3814  }
  3815  
  3816  // Do executes the "apigateway.projects.locations.gateways.getIamPolicy" call.
  3817  // Any non-2xx status code is an error. Response headers are in either
  3818  // *ApigatewayPolicy.ServerResponse.Header or (if a response was returned at
  3819  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3820  // check whether the returned error was because http.StatusNotModified was
  3821  // returned.
  3822  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*ApigatewayPolicy, error) {
  3823  	gensupport.SetOptions(c.urlParams_, opts...)
  3824  	res, err := c.doRequest("json")
  3825  	if res != nil && res.StatusCode == http.StatusNotModified {
  3826  		if res.Body != nil {
  3827  			res.Body.Close()
  3828  		}
  3829  		return nil, gensupport.WrapError(&googleapi.Error{
  3830  			Code:   res.StatusCode,
  3831  			Header: res.Header,
  3832  		})
  3833  	}
  3834  	if err != nil {
  3835  		return nil, err
  3836  	}
  3837  	defer googleapi.CloseBody(res)
  3838  	if err := googleapi.CheckResponse(res); err != nil {
  3839  		return nil, gensupport.WrapError(err)
  3840  	}
  3841  	ret := &ApigatewayPolicy{
  3842  		ServerResponse: googleapi.ServerResponse{
  3843  			Header:         res.Header,
  3844  			HTTPStatusCode: res.StatusCode,
  3845  		},
  3846  	}
  3847  	target := &ret
  3848  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3849  		return nil, err
  3850  	}
  3851  	return ret, nil
  3852  }
  3853  
  3854  type ProjectsLocationsGatewaysListCall struct {
  3855  	s            *Service
  3856  	parent       string
  3857  	urlParams_   gensupport.URLParams
  3858  	ifNoneMatch_ string
  3859  	ctx_         context.Context
  3860  	header_      http.Header
  3861  }
  3862  
  3863  // List: Lists Gateways in a given project and location.
  3864  //
  3865  //   - parent: Parent resource of the Gateway, of the form:
  3866  //     `projects/*/locations/*`.
  3867  func (r *ProjectsLocationsGatewaysService) List(parent string) *ProjectsLocationsGatewaysListCall {
  3868  	c := &ProjectsLocationsGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3869  	c.parent = parent
  3870  	return c
  3871  }
  3872  
  3873  // Filter sets the optional parameter "filter": Filter.
  3874  func (c *ProjectsLocationsGatewaysListCall) Filter(filter string) *ProjectsLocationsGatewaysListCall {
  3875  	c.urlParams_.Set("filter", filter)
  3876  	return c
  3877  }
  3878  
  3879  // OrderBy sets the optional parameter "orderBy": Order by parameters.
  3880  func (c *ProjectsLocationsGatewaysListCall) OrderBy(orderBy string) *ProjectsLocationsGatewaysListCall {
  3881  	c.urlParams_.Set("orderBy", orderBy)
  3882  	return c
  3883  }
  3884  
  3885  // PageSize sets the optional parameter "pageSize": Page size.
  3886  func (c *ProjectsLocationsGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysListCall {
  3887  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3888  	return c
  3889  }
  3890  
  3891  // PageToken sets the optional parameter "pageToken": Page token.
  3892  func (c *ProjectsLocationsGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysListCall {
  3893  	c.urlParams_.Set("pageToken", pageToken)
  3894  	return c
  3895  }
  3896  
  3897  // Fields allows partial responses to be retrieved. See
  3898  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3899  // details.
  3900  func (c *ProjectsLocationsGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysListCall {
  3901  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3902  	return c
  3903  }
  3904  
  3905  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3906  // object's ETag matches the given value. This is useful for getting updates
  3907  // only after the object has changed since the last request.
  3908  func (c *ProjectsLocationsGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysListCall {
  3909  	c.ifNoneMatch_ = entityTag
  3910  	return c
  3911  }
  3912  
  3913  // Context sets the context to be used in this call's Do method.
  3914  func (c *ProjectsLocationsGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysListCall {
  3915  	c.ctx_ = ctx
  3916  	return c
  3917  }
  3918  
  3919  // Header returns a http.Header that can be modified by the caller to add
  3920  // headers to the request.
  3921  func (c *ProjectsLocationsGatewaysListCall) Header() http.Header {
  3922  	if c.header_ == nil {
  3923  		c.header_ = make(http.Header)
  3924  	}
  3925  	return c.header_
  3926  }
  3927  
  3928  func (c *ProjectsLocationsGatewaysListCall) doRequest(alt string) (*http.Response, error) {
  3929  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3930  	if c.ifNoneMatch_ != "" {
  3931  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3932  	}
  3933  	var body io.Reader = nil
  3934  	c.urlParams_.Set("alt", alt)
  3935  	c.urlParams_.Set("prettyPrint", "false")
  3936  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+parent}/gateways")
  3937  	urls += "?" + c.urlParams_.Encode()
  3938  	req, err := http.NewRequest("GET", urls, body)
  3939  	if err != nil {
  3940  		return nil, err
  3941  	}
  3942  	req.Header = reqHeaders
  3943  	googleapi.Expand(req.URL, map[string]string{
  3944  		"parent": c.parent,
  3945  	})
  3946  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3947  }
  3948  
  3949  // Do executes the "apigateway.projects.locations.gateways.list" call.
  3950  // Any non-2xx status code is an error. Response headers are in either
  3951  // *ApigatewayListGatewaysResponse.ServerResponse.Header or (if a response was
  3952  // returned at all) in error.(*googleapi.Error).Header. Use
  3953  // googleapi.IsNotModified to check whether the returned error was because
  3954  // http.StatusNotModified was returned.
  3955  func (c *ProjectsLocationsGatewaysListCall) Do(opts ...googleapi.CallOption) (*ApigatewayListGatewaysResponse, error) {
  3956  	gensupport.SetOptions(c.urlParams_, opts...)
  3957  	res, err := c.doRequest("json")
  3958  	if res != nil && res.StatusCode == http.StatusNotModified {
  3959  		if res.Body != nil {
  3960  			res.Body.Close()
  3961  		}
  3962  		return nil, gensupport.WrapError(&googleapi.Error{
  3963  			Code:   res.StatusCode,
  3964  			Header: res.Header,
  3965  		})
  3966  	}
  3967  	if err != nil {
  3968  		return nil, err
  3969  	}
  3970  	defer googleapi.CloseBody(res)
  3971  	if err := googleapi.CheckResponse(res); err != nil {
  3972  		return nil, gensupport.WrapError(err)
  3973  	}
  3974  	ret := &ApigatewayListGatewaysResponse{
  3975  		ServerResponse: googleapi.ServerResponse{
  3976  			Header:         res.Header,
  3977  			HTTPStatusCode: res.StatusCode,
  3978  		},
  3979  	}
  3980  	target := &ret
  3981  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3982  		return nil, err
  3983  	}
  3984  	return ret, nil
  3985  }
  3986  
  3987  // Pages invokes f for each page of results.
  3988  // A non-nil error returned from f will halt the iteration.
  3989  // The provided context supersedes any context provided to the Context method.
  3990  func (c *ProjectsLocationsGatewaysListCall) Pages(ctx context.Context, f func(*ApigatewayListGatewaysResponse) error) error {
  3991  	c.ctx_ = ctx
  3992  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3993  	for {
  3994  		x, err := c.Do()
  3995  		if err != nil {
  3996  			return err
  3997  		}
  3998  		if err := f(x); err != nil {
  3999  			return err
  4000  		}
  4001  		if x.NextPageToken == "" {
  4002  			return nil
  4003  		}
  4004  		c.PageToken(x.NextPageToken)
  4005  	}
  4006  }
  4007  
  4008  type ProjectsLocationsGatewaysPatchCall struct {
  4009  	s                 *Service
  4010  	name              string
  4011  	apigatewaygateway *ApigatewayGateway
  4012  	urlParams_        gensupport.URLParams
  4013  	ctx_              context.Context
  4014  	header_           http.Header
  4015  }
  4016  
  4017  // Patch: Updates the parameters of a single Gateway.
  4018  //
  4019  //   - name: Output only. Resource name of the Gateway. Format:
  4020  //     projects/{project}/locations/{location}/gateways/{gateway}.
  4021  func (r *ProjectsLocationsGatewaysService) Patch(name string, apigatewaygateway *ApigatewayGateway) *ProjectsLocationsGatewaysPatchCall {
  4022  	c := &ProjectsLocationsGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4023  	c.name = name
  4024  	c.apigatewaygateway = apigatewaygateway
  4025  	return c
  4026  }
  4027  
  4028  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  4029  // specify the fields to be overwritten in the Gateway resource by the update.
  4030  // The fields specified in the update_mask are relative to the resource, not
  4031  // the full request. A field will be overwritten if it is in the mask. If the
  4032  // user does not provide a mask then all fields will be overwritten.
  4033  func (c *ProjectsLocationsGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaysPatchCall {
  4034  	c.urlParams_.Set("updateMask", updateMask)
  4035  	return c
  4036  }
  4037  
  4038  // Fields allows partial responses to be retrieved. See
  4039  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4040  // details.
  4041  func (c *ProjectsLocationsGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysPatchCall {
  4042  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4043  	return c
  4044  }
  4045  
  4046  // Context sets the context to be used in this call's Do method.
  4047  func (c *ProjectsLocationsGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaysPatchCall {
  4048  	c.ctx_ = ctx
  4049  	return c
  4050  }
  4051  
  4052  // Header returns a http.Header that can be modified by the caller to add
  4053  // headers to the request.
  4054  func (c *ProjectsLocationsGatewaysPatchCall) Header() http.Header {
  4055  	if c.header_ == nil {
  4056  		c.header_ = make(http.Header)
  4057  	}
  4058  	return c.header_
  4059  }
  4060  
  4061  func (c *ProjectsLocationsGatewaysPatchCall) doRequest(alt string) (*http.Response, error) {
  4062  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4063  	var body io.Reader = nil
  4064  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaygateway)
  4065  	if err != nil {
  4066  		return nil, err
  4067  	}
  4068  	c.urlParams_.Set("alt", alt)
  4069  	c.urlParams_.Set("prettyPrint", "false")
  4070  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4071  	urls += "?" + c.urlParams_.Encode()
  4072  	req, err := http.NewRequest("PATCH", urls, body)
  4073  	if err != nil {
  4074  		return nil, err
  4075  	}
  4076  	req.Header = reqHeaders
  4077  	googleapi.Expand(req.URL, map[string]string{
  4078  		"name": c.name,
  4079  	})
  4080  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4081  }
  4082  
  4083  // Do executes the "apigateway.projects.locations.gateways.patch" call.
  4084  // Any non-2xx status code is an error. Response headers are in either
  4085  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  4086  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4087  // check whether the returned error was because http.StatusNotModified was
  4088  // returned.
  4089  func (c *ProjectsLocationsGatewaysPatchCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  4090  	gensupport.SetOptions(c.urlParams_, opts...)
  4091  	res, err := c.doRequest("json")
  4092  	if res != nil && res.StatusCode == http.StatusNotModified {
  4093  		if res.Body != nil {
  4094  			res.Body.Close()
  4095  		}
  4096  		return nil, gensupport.WrapError(&googleapi.Error{
  4097  			Code:   res.StatusCode,
  4098  			Header: res.Header,
  4099  		})
  4100  	}
  4101  	if err != nil {
  4102  		return nil, err
  4103  	}
  4104  	defer googleapi.CloseBody(res)
  4105  	if err := googleapi.CheckResponse(res); err != nil {
  4106  		return nil, gensupport.WrapError(err)
  4107  	}
  4108  	ret := &ApigatewayOperation{
  4109  		ServerResponse: googleapi.ServerResponse{
  4110  			Header:         res.Header,
  4111  			HTTPStatusCode: res.StatusCode,
  4112  		},
  4113  	}
  4114  	target := &ret
  4115  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4116  		return nil, err
  4117  	}
  4118  	return ret, nil
  4119  }
  4120  
  4121  type ProjectsLocationsGatewaysSetIamPolicyCall struct {
  4122  	s                             *Service
  4123  	resource                      string
  4124  	apigatewaysetiampolicyrequest *ApigatewaySetIamPolicyRequest
  4125  	urlParams_                    gensupport.URLParams
  4126  	ctx_                          context.Context
  4127  	header_                       http.Header
  4128  }
  4129  
  4130  // SetIamPolicy: Sets the access control policy on the specified resource.
  4131  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4132  // and `PERMISSION_DENIED` errors.
  4133  //
  4134  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4135  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4136  //     for the appropriate value for this field.
  4137  func (r *ProjectsLocationsGatewaysService) SetIamPolicy(resource string, apigatewaysetiampolicyrequest *ApigatewaySetIamPolicyRequest) *ProjectsLocationsGatewaysSetIamPolicyCall {
  4138  	c := &ProjectsLocationsGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4139  	c.resource = resource
  4140  	c.apigatewaysetiampolicyrequest = apigatewaysetiampolicyrequest
  4141  	return c
  4142  }
  4143  
  4144  // Fields allows partial responses to be retrieved. See
  4145  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4146  // details.
  4147  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysSetIamPolicyCall {
  4148  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4149  	return c
  4150  }
  4151  
  4152  // Context sets the context to be used in this call's Do method.
  4153  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysSetIamPolicyCall {
  4154  	c.ctx_ = ctx
  4155  	return c
  4156  }
  4157  
  4158  // Header returns a http.Header that can be modified by the caller to add
  4159  // headers to the request.
  4160  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Header() http.Header {
  4161  	if c.header_ == nil {
  4162  		c.header_ = make(http.Header)
  4163  	}
  4164  	return c.header_
  4165  }
  4166  
  4167  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4168  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4169  	var body io.Reader = nil
  4170  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaysetiampolicyrequest)
  4171  	if err != nil {
  4172  		return nil, err
  4173  	}
  4174  	c.urlParams_.Set("alt", alt)
  4175  	c.urlParams_.Set("prettyPrint", "false")
  4176  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:setIamPolicy")
  4177  	urls += "?" + c.urlParams_.Encode()
  4178  	req, err := http.NewRequest("POST", urls, body)
  4179  	if err != nil {
  4180  		return nil, err
  4181  	}
  4182  	req.Header = reqHeaders
  4183  	googleapi.Expand(req.URL, map[string]string{
  4184  		"resource": c.resource,
  4185  	})
  4186  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4187  }
  4188  
  4189  // Do executes the "apigateway.projects.locations.gateways.setIamPolicy" call.
  4190  // Any non-2xx status code is an error. Response headers are in either
  4191  // *ApigatewayPolicy.ServerResponse.Header or (if a response was returned at
  4192  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4193  // check whether the returned error was because http.StatusNotModified was
  4194  // returned.
  4195  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*ApigatewayPolicy, error) {
  4196  	gensupport.SetOptions(c.urlParams_, opts...)
  4197  	res, err := c.doRequest("json")
  4198  	if res != nil && res.StatusCode == http.StatusNotModified {
  4199  		if res.Body != nil {
  4200  			res.Body.Close()
  4201  		}
  4202  		return nil, gensupport.WrapError(&googleapi.Error{
  4203  			Code:   res.StatusCode,
  4204  			Header: res.Header,
  4205  		})
  4206  	}
  4207  	if err != nil {
  4208  		return nil, err
  4209  	}
  4210  	defer googleapi.CloseBody(res)
  4211  	if err := googleapi.CheckResponse(res); err != nil {
  4212  		return nil, gensupport.WrapError(err)
  4213  	}
  4214  	ret := &ApigatewayPolicy{
  4215  		ServerResponse: googleapi.ServerResponse{
  4216  			Header:         res.Header,
  4217  			HTTPStatusCode: res.StatusCode,
  4218  		},
  4219  	}
  4220  	target := &ret
  4221  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4222  		return nil, err
  4223  	}
  4224  	return ret, nil
  4225  }
  4226  
  4227  type ProjectsLocationsGatewaysTestIamPermissionsCall struct {
  4228  	s                                   *Service
  4229  	resource                            string
  4230  	apigatewaytestiampermissionsrequest *ApigatewayTestIamPermissionsRequest
  4231  	urlParams_                          gensupport.URLParams
  4232  	ctx_                                context.Context
  4233  	header_                             http.Header
  4234  }
  4235  
  4236  // TestIamPermissions: Returns permissions that a caller has on the specified
  4237  // resource. If the resource does not exist, this will return an empty set of
  4238  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4239  // used for building permission-aware UIs and command-line tools, not for
  4240  // authorization checking. This operation may "fail open" without warning.
  4241  //
  4242  //   - resource: REQUIRED: The resource for which the policy detail is being
  4243  //     requested. See Resource names
  4244  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4245  //     value for this field.
  4246  func (r *ProjectsLocationsGatewaysService) TestIamPermissions(resource string, apigatewaytestiampermissionsrequest *ApigatewayTestIamPermissionsRequest) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  4247  	c := &ProjectsLocationsGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4248  	c.resource = resource
  4249  	c.apigatewaytestiampermissionsrequest = apigatewaytestiampermissionsrequest
  4250  	return c
  4251  }
  4252  
  4253  // Fields allows partial responses to be retrieved. See
  4254  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4255  // details.
  4256  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  4257  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4258  	return c
  4259  }
  4260  
  4261  // Context sets the context to be used in this call's Do method.
  4262  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  4263  	c.ctx_ = ctx
  4264  	return c
  4265  }
  4266  
  4267  // Header returns a http.Header that can be modified by the caller to add
  4268  // headers to the request.
  4269  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Header() http.Header {
  4270  	if c.header_ == nil {
  4271  		c.header_ = make(http.Header)
  4272  	}
  4273  	return c.header_
  4274  }
  4275  
  4276  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4277  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4278  	var body io.Reader = nil
  4279  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaytestiampermissionsrequest)
  4280  	if err != nil {
  4281  		return nil, err
  4282  	}
  4283  	c.urlParams_.Set("alt", alt)
  4284  	c.urlParams_.Set("prettyPrint", "false")
  4285  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+resource}:testIamPermissions")
  4286  	urls += "?" + c.urlParams_.Encode()
  4287  	req, err := http.NewRequest("POST", urls, body)
  4288  	if err != nil {
  4289  		return nil, err
  4290  	}
  4291  	req.Header = reqHeaders
  4292  	googleapi.Expand(req.URL, map[string]string{
  4293  		"resource": c.resource,
  4294  	})
  4295  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4296  }
  4297  
  4298  // Do executes the "apigateway.projects.locations.gateways.testIamPermissions" call.
  4299  // Any non-2xx status code is an error. Response headers are in either
  4300  // *ApigatewayTestIamPermissionsResponse.ServerResponse.Header or (if a
  4301  // response was returned at all) in error.(*googleapi.Error).Header. Use
  4302  // googleapi.IsNotModified to check whether the returned error was because
  4303  // http.StatusNotModified was returned.
  4304  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*ApigatewayTestIamPermissionsResponse, error) {
  4305  	gensupport.SetOptions(c.urlParams_, opts...)
  4306  	res, err := c.doRequest("json")
  4307  	if res != nil && res.StatusCode == http.StatusNotModified {
  4308  		if res.Body != nil {
  4309  			res.Body.Close()
  4310  		}
  4311  		return nil, gensupport.WrapError(&googleapi.Error{
  4312  			Code:   res.StatusCode,
  4313  			Header: res.Header,
  4314  		})
  4315  	}
  4316  	if err != nil {
  4317  		return nil, err
  4318  	}
  4319  	defer googleapi.CloseBody(res)
  4320  	if err := googleapi.CheckResponse(res); err != nil {
  4321  		return nil, gensupport.WrapError(err)
  4322  	}
  4323  	ret := &ApigatewayTestIamPermissionsResponse{
  4324  		ServerResponse: googleapi.ServerResponse{
  4325  			Header:         res.Header,
  4326  			HTTPStatusCode: res.StatusCode,
  4327  		},
  4328  	}
  4329  	target := &ret
  4330  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4331  		return nil, err
  4332  	}
  4333  	return ret, nil
  4334  }
  4335  
  4336  type ProjectsLocationsOperationsCancelCall struct {
  4337  	s                                *Service
  4338  	name                             string
  4339  	apigatewaycanceloperationrequest *ApigatewayCancelOperationRequest
  4340  	urlParams_                       gensupport.URLParams
  4341  	ctx_                             context.Context
  4342  	header_                          http.Header
  4343  }
  4344  
  4345  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  4346  // server makes a best effort to cancel the operation, but success is not
  4347  // guaranteed. If the server doesn't support this method, it returns
  4348  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  4349  // other methods to check whether the cancellation succeeded or whether the
  4350  // operation completed despite cancellation. On successful cancellation, the
  4351  // operation is not deleted; instead, it becomes an operation with an
  4352  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  4353  // `Code.CANCELLED`.
  4354  //
  4355  // - name: The name of the operation resource to be cancelled.
  4356  func (r *ProjectsLocationsOperationsService) Cancel(name string, apigatewaycanceloperationrequest *ApigatewayCancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  4357  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4358  	c.name = name
  4359  	c.apigatewaycanceloperationrequest = apigatewaycanceloperationrequest
  4360  	return c
  4361  }
  4362  
  4363  // Fields allows partial responses to be retrieved. See
  4364  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4365  // details.
  4366  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  4367  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4368  	return c
  4369  }
  4370  
  4371  // Context sets the context to be used in this call's Do method.
  4372  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  4373  	c.ctx_ = ctx
  4374  	return c
  4375  }
  4376  
  4377  // Header returns a http.Header that can be modified by the caller to add
  4378  // headers to the request.
  4379  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  4380  	if c.header_ == nil {
  4381  		c.header_ = make(http.Header)
  4382  	}
  4383  	return c.header_
  4384  }
  4385  
  4386  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  4387  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4388  	var body io.Reader = nil
  4389  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.apigatewaycanceloperationrequest)
  4390  	if err != nil {
  4391  		return nil, err
  4392  	}
  4393  	c.urlParams_.Set("alt", alt)
  4394  	c.urlParams_.Set("prettyPrint", "false")
  4395  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}:cancel")
  4396  	urls += "?" + c.urlParams_.Encode()
  4397  	req, err := http.NewRequest("POST", urls, body)
  4398  	if err != nil {
  4399  		return nil, err
  4400  	}
  4401  	req.Header = reqHeaders
  4402  	googleapi.Expand(req.URL, map[string]string{
  4403  		"name": c.name,
  4404  	})
  4405  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4406  }
  4407  
  4408  // Do executes the "apigateway.projects.locations.operations.cancel" call.
  4409  // Any non-2xx status code is an error. Response headers are in either
  4410  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4411  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4412  // whether the returned error was because http.StatusNotModified was returned.
  4413  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4414  	gensupport.SetOptions(c.urlParams_, opts...)
  4415  	res, err := c.doRequest("json")
  4416  	if res != nil && res.StatusCode == http.StatusNotModified {
  4417  		if res.Body != nil {
  4418  			res.Body.Close()
  4419  		}
  4420  		return nil, gensupport.WrapError(&googleapi.Error{
  4421  			Code:   res.StatusCode,
  4422  			Header: res.Header,
  4423  		})
  4424  	}
  4425  	if err != nil {
  4426  		return nil, err
  4427  	}
  4428  	defer googleapi.CloseBody(res)
  4429  	if err := googleapi.CheckResponse(res); err != nil {
  4430  		return nil, gensupport.WrapError(err)
  4431  	}
  4432  	ret := &Empty{
  4433  		ServerResponse: googleapi.ServerResponse{
  4434  			Header:         res.Header,
  4435  			HTTPStatusCode: res.StatusCode,
  4436  		},
  4437  	}
  4438  	target := &ret
  4439  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4440  		return nil, err
  4441  	}
  4442  	return ret, nil
  4443  }
  4444  
  4445  type ProjectsLocationsOperationsDeleteCall struct {
  4446  	s          *Service
  4447  	name       string
  4448  	urlParams_ gensupport.URLParams
  4449  	ctx_       context.Context
  4450  	header_    http.Header
  4451  }
  4452  
  4453  // Delete: Deletes a long-running operation. This method indicates that the
  4454  // client is no longer interested in the operation result. It does not cancel
  4455  // the operation. If the server doesn't support this method, it returns
  4456  // `google.rpc.Code.UNIMPLEMENTED`.
  4457  //
  4458  // - name: The name of the operation resource to be deleted.
  4459  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  4460  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4461  	c.name = name
  4462  	return c
  4463  }
  4464  
  4465  // Fields allows partial responses to be retrieved. See
  4466  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4467  // details.
  4468  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  4469  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4470  	return c
  4471  }
  4472  
  4473  // Context sets the context to be used in this call's Do method.
  4474  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  4475  	c.ctx_ = ctx
  4476  	return c
  4477  }
  4478  
  4479  // Header returns a http.Header that can be modified by the caller to add
  4480  // headers to the request.
  4481  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  4482  	if c.header_ == nil {
  4483  		c.header_ = make(http.Header)
  4484  	}
  4485  	return c.header_
  4486  }
  4487  
  4488  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4489  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4490  	var body io.Reader = nil
  4491  	c.urlParams_.Set("alt", alt)
  4492  	c.urlParams_.Set("prettyPrint", "false")
  4493  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4494  	urls += "?" + c.urlParams_.Encode()
  4495  	req, err := http.NewRequest("DELETE", urls, body)
  4496  	if err != nil {
  4497  		return nil, err
  4498  	}
  4499  	req.Header = reqHeaders
  4500  	googleapi.Expand(req.URL, map[string]string{
  4501  		"name": c.name,
  4502  	})
  4503  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4504  }
  4505  
  4506  // Do executes the "apigateway.projects.locations.operations.delete" call.
  4507  // Any non-2xx status code is an error. Response headers are in either
  4508  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  4509  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4510  // whether the returned error was because http.StatusNotModified was returned.
  4511  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4512  	gensupport.SetOptions(c.urlParams_, opts...)
  4513  	res, err := c.doRequest("json")
  4514  	if res != nil && res.StatusCode == http.StatusNotModified {
  4515  		if res.Body != nil {
  4516  			res.Body.Close()
  4517  		}
  4518  		return nil, gensupport.WrapError(&googleapi.Error{
  4519  			Code:   res.StatusCode,
  4520  			Header: res.Header,
  4521  		})
  4522  	}
  4523  	if err != nil {
  4524  		return nil, err
  4525  	}
  4526  	defer googleapi.CloseBody(res)
  4527  	if err := googleapi.CheckResponse(res); err != nil {
  4528  		return nil, gensupport.WrapError(err)
  4529  	}
  4530  	ret := &Empty{
  4531  		ServerResponse: googleapi.ServerResponse{
  4532  			Header:         res.Header,
  4533  			HTTPStatusCode: res.StatusCode,
  4534  		},
  4535  	}
  4536  	target := &ret
  4537  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4538  		return nil, err
  4539  	}
  4540  	return ret, nil
  4541  }
  4542  
  4543  type ProjectsLocationsOperationsGetCall struct {
  4544  	s            *Service
  4545  	name         string
  4546  	urlParams_   gensupport.URLParams
  4547  	ifNoneMatch_ string
  4548  	ctx_         context.Context
  4549  	header_      http.Header
  4550  }
  4551  
  4552  // Get: Gets the latest state of a long-running operation. Clients can use this
  4553  // method to poll the operation result at intervals as recommended by the API
  4554  // service.
  4555  //
  4556  // - name: The name of the operation resource.
  4557  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  4558  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4559  	c.name = name
  4560  	return c
  4561  }
  4562  
  4563  // Fields allows partial responses to be retrieved. See
  4564  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4565  // details.
  4566  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  4567  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4568  	return c
  4569  }
  4570  
  4571  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4572  // object's ETag matches the given value. This is useful for getting updates
  4573  // only after the object has changed since the last request.
  4574  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  4575  	c.ifNoneMatch_ = entityTag
  4576  	return c
  4577  }
  4578  
  4579  // Context sets the context to be used in this call's Do method.
  4580  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  4581  	c.ctx_ = ctx
  4582  	return c
  4583  }
  4584  
  4585  // Header returns a http.Header that can be modified by the caller to add
  4586  // headers to the request.
  4587  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  4588  	if c.header_ == nil {
  4589  		c.header_ = make(http.Header)
  4590  	}
  4591  	return c.header_
  4592  }
  4593  
  4594  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  4595  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4596  	if c.ifNoneMatch_ != "" {
  4597  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4598  	}
  4599  	var body io.Reader = nil
  4600  	c.urlParams_.Set("alt", alt)
  4601  	c.urlParams_.Set("prettyPrint", "false")
  4602  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}")
  4603  	urls += "?" + c.urlParams_.Encode()
  4604  	req, err := http.NewRequest("GET", urls, body)
  4605  	if err != nil {
  4606  		return nil, err
  4607  	}
  4608  	req.Header = reqHeaders
  4609  	googleapi.Expand(req.URL, map[string]string{
  4610  		"name": c.name,
  4611  	})
  4612  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4613  }
  4614  
  4615  // Do executes the "apigateway.projects.locations.operations.get" call.
  4616  // Any non-2xx status code is an error. Response headers are in either
  4617  // *ApigatewayOperation.ServerResponse.Header or (if a response was returned at
  4618  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4619  // check whether the returned error was because http.StatusNotModified was
  4620  // returned.
  4621  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*ApigatewayOperation, error) {
  4622  	gensupport.SetOptions(c.urlParams_, opts...)
  4623  	res, err := c.doRequest("json")
  4624  	if res != nil && res.StatusCode == http.StatusNotModified {
  4625  		if res.Body != nil {
  4626  			res.Body.Close()
  4627  		}
  4628  		return nil, gensupport.WrapError(&googleapi.Error{
  4629  			Code:   res.StatusCode,
  4630  			Header: res.Header,
  4631  		})
  4632  	}
  4633  	if err != nil {
  4634  		return nil, err
  4635  	}
  4636  	defer googleapi.CloseBody(res)
  4637  	if err := googleapi.CheckResponse(res); err != nil {
  4638  		return nil, gensupport.WrapError(err)
  4639  	}
  4640  	ret := &ApigatewayOperation{
  4641  		ServerResponse: googleapi.ServerResponse{
  4642  			Header:         res.Header,
  4643  			HTTPStatusCode: res.StatusCode,
  4644  		},
  4645  	}
  4646  	target := &ret
  4647  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4648  		return nil, err
  4649  	}
  4650  	return ret, nil
  4651  }
  4652  
  4653  type ProjectsLocationsOperationsListCall struct {
  4654  	s            *Service
  4655  	name         string
  4656  	urlParams_   gensupport.URLParams
  4657  	ifNoneMatch_ string
  4658  	ctx_         context.Context
  4659  	header_      http.Header
  4660  }
  4661  
  4662  // List: Lists operations that match the specified filter in the request. If
  4663  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  4664  //
  4665  // - name: The name of the operation's parent resource.
  4666  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  4667  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4668  	c.name = name
  4669  	return c
  4670  }
  4671  
  4672  // Filter sets the optional parameter "filter": The standard list filter.
  4673  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  4674  	c.urlParams_.Set("filter", filter)
  4675  	return c
  4676  }
  4677  
  4678  // PageSize sets the optional parameter "pageSize": The standard list page
  4679  // size.
  4680  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  4681  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4682  	return c
  4683  }
  4684  
  4685  // PageToken sets the optional parameter "pageToken": The standard list page
  4686  // token.
  4687  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  4688  	c.urlParams_.Set("pageToken", pageToken)
  4689  	return c
  4690  }
  4691  
  4692  // Fields allows partial responses to be retrieved. See
  4693  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4694  // details.
  4695  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  4696  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4697  	return c
  4698  }
  4699  
  4700  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4701  // object's ETag matches the given value. This is useful for getting updates
  4702  // only after the object has changed since the last request.
  4703  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  4704  	c.ifNoneMatch_ = entityTag
  4705  	return c
  4706  }
  4707  
  4708  // Context sets the context to be used in this call's Do method.
  4709  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  4710  	c.ctx_ = ctx
  4711  	return c
  4712  }
  4713  
  4714  // Header returns a http.Header that can be modified by the caller to add
  4715  // headers to the request.
  4716  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  4717  	if c.header_ == nil {
  4718  		c.header_ = make(http.Header)
  4719  	}
  4720  	return c.header_
  4721  }
  4722  
  4723  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  4724  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4725  	if c.ifNoneMatch_ != "" {
  4726  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4727  	}
  4728  	var body io.Reader = nil
  4729  	c.urlParams_.Set("alt", alt)
  4730  	c.urlParams_.Set("prettyPrint", "false")
  4731  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+name}/operations")
  4732  	urls += "?" + c.urlParams_.Encode()
  4733  	req, err := http.NewRequest("GET", urls, body)
  4734  	if err != nil {
  4735  		return nil, err
  4736  	}
  4737  	req.Header = reqHeaders
  4738  	googleapi.Expand(req.URL, map[string]string{
  4739  		"name": c.name,
  4740  	})
  4741  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4742  }
  4743  
  4744  // Do executes the "apigateway.projects.locations.operations.list" call.
  4745  // Any non-2xx status code is an error. Response headers are in either
  4746  // *ApigatewayListOperationsResponse.ServerResponse.Header or (if a response
  4747  // was returned at all) in error.(*googleapi.Error).Header. Use
  4748  // googleapi.IsNotModified to check whether the returned error was because
  4749  // http.StatusNotModified was returned.
  4750  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ApigatewayListOperationsResponse, error) {
  4751  	gensupport.SetOptions(c.urlParams_, opts...)
  4752  	res, err := c.doRequest("json")
  4753  	if res != nil && res.StatusCode == http.StatusNotModified {
  4754  		if res.Body != nil {
  4755  			res.Body.Close()
  4756  		}
  4757  		return nil, gensupport.WrapError(&googleapi.Error{
  4758  			Code:   res.StatusCode,
  4759  			Header: res.Header,
  4760  		})
  4761  	}
  4762  	if err != nil {
  4763  		return nil, err
  4764  	}
  4765  	defer googleapi.CloseBody(res)
  4766  	if err := googleapi.CheckResponse(res); err != nil {
  4767  		return nil, gensupport.WrapError(err)
  4768  	}
  4769  	ret := &ApigatewayListOperationsResponse{
  4770  		ServerResponse: googleapi.ServerResponse{
  4771  			Header:         res.Header,
  4772  			HTTPStatusCode: res.StatusCode,
  4773  		},
  4774  	}
  4775  	target := &ret
  4776  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4777  		return nil, err
  4778  	}
  4779  	return ret, nil
  4780  }
  4781  
  4782  // Pages invokes f for each page of results.
  4783  // A non-nil error returned from f will halt the iteration.
  4784  // The provided context supersedes any context provided to the Context method.
  4785  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ApigatewayListOperationsResponse) error) error {
  4786  	c.ctx_ = ctx
  4787  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4788  	for {
  4789  		x, err := c.Do()
  4790  		if err != nil {
  4791  			return err
  4792  		}
  4793  		if err := f(x); err != nil {
  4794  			return err
  4795  		}
  4796  		if x.NextPageToken == "" {
  4797  			return nil
  4798  		}
  4799  		c.PageToken(x.NextPageToken)
  4800  	}
  4801  }
  4802  

View as plain text