...

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

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

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

View as plain text