...

Source file src/google.golang.org/api/networkservices/v1beta1/networkservices-gen.go

Documentation: google.golang.org/api/networkservices/v1beta1

     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 networkservices provides access to the Network Services API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/networking
    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/networkservices/v1beta1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	networkservicesService, err := networkservices.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  //	networkservicesService, err := networkservices.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  //	networkservicesService, err := networkservices.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package networkservices // import "google.golang.org/api/networkservices/v1beta1"
    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 = "networkservices:v1beta1"
    90  const apiName = "networkservices"
    91  const apiVersion = "v1beta1"
    92  const basePath = "https://networkservices.googleapis.com/"
    93  const basePathTemplate = "https://networkservices.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://networkservices.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.EndpointPolicies = NewProjectsLocationsEndpointPoliciesService(s)
   172  	rs.Gateways = NewProjectsLocationsGatewaysService(s)
   173  	rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s)
   174  	rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s)
   175  	rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s)
   176  	rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s)
   177  	rs.Meshes = NewProjectsLocationsMeshesService(s)
   178  	rs.Operations = NewProjectsLocationsOperationsService(s)
   179  	rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s)
   180  	rs.ServiceLbPolicies = NewProjectsLocationsServiceLbPoliciesService(s)
   181  	rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s)
   182  	rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s)
   183  	return rs
   184  }
   185  
   186  type ProjectsLocationsService struct {
   187  	s *Service
   188  
   189  	EndpointPolicies *ProjectsLocationsEndpointPoliciesService
   190  
   191  	Gateways *ProjectsLocationsGatewaysService
   192  
   193  	GrpcRoutes *ProjectsLocationsGrpcRoutesService
   194  
   195  	HttpRoutes *ProjectsLocationsHttpRoutesService
   196  
   197  	LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService
   198  
   199  	LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService
   200  
   201  	Meshes *ProjectsLocationsMeshesService
   202  
   203  	Operations *ProjectsLocationsOperationsService
   204  
   205  	ServiceBindings *ProjectsLocationsServiceBindingsService
   206  
   207  	ServiceLbPolicies *ProjectsLocationsServiceLbPoliciesService
   208  
   209  	TcpRoutes *ProjectsLocationsTcpRoutesService
   210  
   211  	TlsRoutes *ProjectsLocationsTlsRoutesService
   212  }
   213  
   214  func NewProjectsLocationsEndpointPoliciesService(s *Service) *ProjectsLocationsEndpointPoliciesService {
   215  	rs := &ProjectsLocationsEndpointPoliciesService{s: s}
   216  	return rs
   217  }
   218  
   219  type ProjectsLocationsEndpointPoliciesService struct {
   220  	s *Service
   221  }
   222  
   223  func NewProjectsLocationsGatewaysService(s *Service) *ProjectsLocationsGatewaysService {
   224  	rs := &ProjectsLocationsGatewaysService{s: s}
   225  	return rs
   226  }
   227  
   228  type ProjectsLocationsGatewaysService struct {
   229  	s *Service
   230  }
   231  
   232  func NewProjectsLocationsGrpcRoutesService(s *Service) *ProjectsLocationsGrpcRoutesService {
   233  	rs := &ProjectsLocationsGrpcRoutesService{s: s}
   234  	return rs
   235  }
   236  
   237  type ProjectsLocationsGrpcRoutesService struct {
   238  	s *Service
   239  }
   240  
   241  func NewProjectsLocationsHttpRoutesService(s *Service) *ProjectsLocationsHttpRoutesService {
   242  	rs := &ProjectsLocationsHttpRoutesService{s: s}
   243  	return rs
   244  }
   245  
   246  type ProjectsLocationsHttpRoutesService struct {
   247  	s *Service
   248  }
   249  
   250  func NewProjectsLocationsLbRouteExtensionsService(s *Service) *ProjectsLocationsLbRouteExtensionsService {
   251  	rs := &ProjectsLocationsLbRouteExtensionsService{s: s}
   252  	return rs
   253  }
   254  
   255  type ProjectsLocationsLbRouteExtensionsService struct {
   256  	s *Service
   257  }
   258  
   259  func NewProjectsLocationsLbTrafficExtensionsService(s *Service) *ProjectsLocationsLbTrafficExtensionsService {
   260  	rs := &ProjectsLocationsLbTrafficExtensionsService{s: s}
   261  	return rs
   262  }
   263  
   264  type ProjectsLocationsLbTrafficExtensionsService struct {
   265  	s *Service
   266  }
   267  
   268  func NewProjectsLocationsMeshesService(s *Service) *ProjectsLocationsMeshesService {
   269  	rs := &ProjectsLocationsMeshesService{s: s}
   270  	return rs
   271  }
   272  
   273  type ProjectsLocationsMeshesService struct {
   274  	s *Service
   275  }
   276  
   277  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   278  	rs := &ProjectsLocationsOperationsService{s: s}
   279  	return rs
   280  }
   281  
   282  type ProjectsLocationsOperationsService struct {
   283  	s *Service
   284  }
   285  
   286  func NewProjectsLocationsServiceBindingsService(s *Service) *ProjectsLocationsServiceBindingsService {
   287  	rs := &ProjectsLocationsServiceBindingsService{s: s}
   288  	return rs
   289  }
   290  
   291  type ProjectsLocationsServiceBindingsService struct {
   292  	s *Service
   293  }
   294  
   295  func NewProjectsLocationsServiceLbPoliciesService(s *Service) *ProjectsLocationsServiceLbPoliciesService {
   296  	rs := &ProjectsLocationsServiceLbPoliciesService{s: s}
   297  	return rs
   298  }
   299  
   300  type ProjectsLocationsServiceLbPoliciesService struct {
   301  	s *Service
   302  }
   303  
   304  func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService {
   305  	rs := &ProjectsLocationsTcpRoutesService{s: s}
   306  	return rs
   307  }
   308  
   309  type ProjectsLocationsTcpRoutesService struct {
   310  	s *Service
   311  }
   312  
   313  func NewProjectsLocationsTlsRoutesService(s *Service) *ProjectsLocationsTlsRoutesService {
   314  	rs := &ProjectsLocationsTlsRoutesService{s: s}
   315  	return rs
   316  }
   317  
   318  type ProjectsLocationsTlsRoutesService struct {
   319  	s *Service
   320  }
   321  
   322  // AuditConfig: Specifies the audit configuration for a service. The
   323  // configuration determines which permission types are logged, and what
   324  // identities, if any, are exempted from logging. An AuditConfig must have one
   325  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   326  // and a specific service, the union of the two AuditConfigs is used for that
   327  // service: the log_types specified in each AuditConfig are enabled, and the
   328  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   329  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   330  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   331  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   332  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   333  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   334  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   335  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   336  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   337  // `aliya@example.com` from DATA_WRITE logging.
   338  type AuditConfig struct {
   339  	// AuditLogConfigs: The configuration for logging of each type of permission.
   340  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   341  	// Service: Specifies a service that will be enabled for audit logging. For
   342  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   343  	// is a special value that covers all services.
   344  	Service string `json:"service,omitempty"`
   345  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   346  	// unconditionally include in API requests. By default, fields with empty or
   347  	// default values are omitted from API requests. See
   348  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   349  	// details.
   350  	ForceSendFields []string `json:"-"`
   351  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   352  	// API requests with the JSON null value. By default, fields with empty values
   353  	// are omitted from API requests. See
   354  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   355  	NullFields []string `json:"-"`
   356  }
   357  
   358  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   359  	type NoMethod AuditConfig
   360  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   361  }
   362  
   363  // AuditLogConfig: Provides the configuration for logging a type of
   364  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   365  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   366  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   367  // exempting jose@example.com from DATA_READ logging.
   368  type AuditLogConfig struct {
   369  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   370  	// type of permission. Follows the same format of Binding.members.
   371  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   372  	// LogType: The log type that this config enables.
   373  	//
   374  	// Possible values:
   375  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   376  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   377  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   378  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   379  	LogType string `json:"logType,omitempty"`
   380  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   381  	// unconditionally include in API requests. By default, fields with empty or
   382  	// default values are omitted from API requests. See
   383  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   384  	// details.
   385  	ForceSendFields []string `json:"-"`
   386  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   387  	// API requests with the JSON null value. By default, fields with empty values
   388  	// are omitted from API requests. See
   389  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   390  	NullFields []string `json:"-"`
   391  }
   392  
   393  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   394  	type NoMethod AuditLogConfig
   395  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   396  }
   397  
   398  // Binding: Associates `members`, or principals, with a `role`.
   399  type Binding struct {
   400  	// Condition: The condition that is associated with this binding. If the
   401  	// condition evaluates to `true`, then this binding applies to the current
   402  	// request. If the condition evaluates to `false`, then this binding does not
   403  	// apply to the current request. However, a different role binding might grant
   404  	// the same role to one or more of the principals in this binding. To learn
   405  	// which resources support conditions in their IAM policies, see the IAM
   406  	// documentation
   407  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   408  	Condition *Expr `json:"condition,omitempty"`
   409  	// Members: Specifies the principals requesting access for a Google Cloud
   410  	// resource. `members` can have the following values: * `allUsers`: A special
   411  	// identifier that represents anyone who is on the internet; with or without a
   412  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   413  	// represents anyone who is authenticated with a Google account or a service
   414  	// account. Does not include identities that come from external identity
   415  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   416  	// address that represents a specific Google account. For example,
   417  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   418  	// represents a Google service account. For example,
   419  	// `my-other-app@appspot.gserviceaccount.com`. *
   420  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   421  	// identifier for a Kubernetes service account
   422  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   423  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   424  	// `group:{emailid}`: An email address that represents a Google group. For
   425  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   426  	// (primary) that represents all the users of that domain. For example,
   427  	// `google.com` or `example.com`. *
   428  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   429  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   430  	// pool. *
   431  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   432  	// group/{group_id}`: All workforce identities in a group. *
   433  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   434  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   435  	// a specific attribute value. *
   436  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   437  	// *`: All identities in a workforce identity pool. *
   438  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   439  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   440  	// identity in a workload identity pool. *
   441  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   442  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   443  	// group. *
   444  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   445  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   446  	// `: All identities in a workload identity pool with a certain attribute. *
   447  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   448  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   449  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   450  	// unique identifier) representing a user that has been recently deleted. For
   451  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   452  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   453  	// retains the role in the binding. *
   454  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   455  	// unique identifier) representing a service account that has been recently
   456  	// deleted. For example,
   457  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   458  	// service account is undeleted, this value reverts to
   459  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   460  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   461  	// address (plus unique identifier) representing a Google group that has been
   462  	// recently deleted. For example,
   463  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   464  	// this value reverts to `group:{emailid}` and the recovered group retains the
   465  	// role in the binding. *
   466  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   467  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   468  	// workforce identity pool. For example,
   469  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   470  	// ol-id/subject/my-subject-attribute-value`.
   471  	Members []string `json:"members,omitempty"`
   472  	// Role: Role that is assigned to the list of `members`, or principals. For
   473  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   474  	// of the IAM roles and permissions, see the IAM documentation
   475  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   476  	// available pre-defined roles, see here
   477  	// (https://cloud.google.com/iam/docs/understanding-roles).
   478  	Role string `json:"role,omitempty"`
   479  	// ForceSendFields is a list of field names (e.g. "Condition") to
   480  	// unconditionally include in API requests. By default, fields with empty or
   481  	// default values are omitted from API requests. See
   482  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   483  	// details.
   484  	ForceSendFields []string `json:"-"`
   485  	// NullFields is a list of field names (e.g. "Condition") to include in API
   486  	// requests with the JSON null value. By default, fields with empty values are
   487  	// omitted from API requests. See
   488  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   489  	NullFields []string `json:"-"`
   490  }
   491  
   492  func (s *Binding) MarshalJSON() ([]byte, error) {
   493  	type NoMethod Binding
   494  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   495  }
   496  
   497  // CancelOperationRequest: The request message for Operations.CancelOperation.
   498  type CancelOperationRequest struct {
   499  }
   500  
   501  // Empty: A generic empty message that you can re-use to avoid defining
   502  // duplicated empty messages in your APIs. A typical example is to use it as
   503  // the request or the response type of an API method. For instance: service Foo
   504  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   505  type Empty struct {
   506  	// ServerResponse contains the HTTP response code and headers from the server.
   507  	googleapi.ServerResponse `json:"-"`
   508  }
   509  
   510  // EndpointMatcher: A definition of a matcher that selects endpoints to which
   511  // the policies should be applied.
   512  type EndpointMatcher struct {
   513  	// MetadataLabelMatcher: The matcher is based on node metadata presented by xDS
   514  	// clients.
   515  	MetadataLabelMatcher *MetadataLabelMatcher `json:"metadataLabelMatcher,omitempty"`
   516  	// ForceSendFields is a list of field names (e.g. "MetadataLabelMatcher") to
   517  	// unconditionally include in API requests. By default, fields with empty or
   518  	// default values are omitted from API requests. See
   519  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   520  	// details.
   521  	ForceSendFields []string `json:"-"`
   522  	// NullFields is a list of field names (e.g. "MetadataLabelMatcher") to include
   523  	// in API requests with the JSON null value. By default, fields with empty
   524  	// values are omitted from API requests. See
   525  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   526  	NullFields []string `json:"-"`
   527  }
   528  
   529  func (s *EndpointMatcher) MarshalJSON() ([]byte, error) {
   530  	type NoMethod EndpointMatcher
   531  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   532  }
   533  
   534  // EndpointPolicy: EndpointPolicy is a resource that helps apply desired
   535  // configuration on the endpoints that match specific criteria. For example,
   536  // this resource can be used to apply "authentication config" an all endpoints
   537  // that serve on port 8080.
   538  type EndpointPolicy struct {
   539  	// AuthorizationPolicy: Optional. This field specifies the URL of
   540  	// AuthorizationPolicy resource that applies authorization policies to the
   541  	// inbound traffic at the matched endpoints. Refer to Authorization. If this
   542  	// field is not specified, authorization is disabled(no authz checks) for this
   543  	// endpoint.
   544  	AuthorizationPolicy string `json:"authorizationPolicy,omitempty"`
   545  	// ClientTlsPolicy: Optional. A URL referring to a ClientTlsPolicy resource.
   546  	// ClientTlsPolicy can be set to specify the authentication for traffic from
   547  	// the proxy to the actual endpoints. More specifically, it is applied to the
   548  	// outgoing traffic from the proxy to the endpoint. This is typically used for
   549  	// sidecar model where the proxy identifies itself as endpoint to the control
   550  	// plane, with the connection between sidecar and endpoint requiring
   551  	// authentication. If this field is not set, authentication is disabled(open).
   552  	// Applicable only when EndpointPolicyType is SIDECAR_PROXY.
   553  	ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"`
   554  	// CreateTime: Output only. The timestamp when the resource was created.
   555  	CreateTime string `json:"createTime,omitempty"`
   556  	// Description: Optional. A free-text description of the resource. Max length
   557  	// 1024 characters.
   558  	Description string `json:"description,omitempty"`
   559  	// EndpointMatcher: Required. A matcher that selects endpoints to which the
   560  	// policies should be applied.
   561  	EndpointMatcher *EndpointMatcher `json:"endpointMatcher,omitempty"`
   562  	// Labels: Optional. Set of label tags associated with the EndpointPolicy
   563  	// resource.
   564  	Labels map[string]string `json:"labels,omitempty"`
   565  	// Name: Required. Name of the EndpointPolicy resource. It matches pattern
   566  	// `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
   567  	Name string `json:"name,omitempty"`
   568  	// ServerTlsPolicy: Optional. A URL referring to ServerTlsPolicy resource.
   569  	// ServerTlsPolicy is used to determine the authentication policy to be applied
   570  	// to terminate the inbound traffic at the identified backends. If this field
   571  	// is not set, authentication is disabled(open) for this endpoint.
   572  	ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"`
   573  	// TrafficPortSelector: Optional. Port selector for the (matched) endpoints. If
   574  	// no port selector is provided, the matched config is applied to all ports.
   575  	TrafficPortSelector *TrafficPortSelector `json:"trafficPortSelector,omitempty"`
   576  	// Type: Required. The type of endpoint policy. This is primarily used to
   577  	// validate the configuration.
   578  	//
   579  	// Possible values:
   580  	//   "ENDPOINT_POLICY_TYPE_UNSPECIFIED" - Default value. Must not be used.
   581  	//   "SIDECAR_PROXY" - Represents a proxy deployed as a sidecar.
   582  	//   "GRPC_SERVER" - Represents a proxyless gRPC backend.
   583  	Type string `json:"type,omitempty"`
   584  	// UpdateTime: Output only. The timestamp when the resource was updated.
   585  	UpdateTime string `json:"updateTime,omitempty"`
   586  
   587  	// ServerResponse contains the HTTP response code and headers from the server.
   588  	googleapi.ServerResponse `json:"-"`
   589  	// ForceSendFields is a list of field names (e.g. "AuthorizationPolicy") 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. "AuthorizationPolicy") to include
   596  	// in API requests with the JSON null value. By default, fields with empty
   597  	// values are 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 *EndpointPolicy) MarshalJSON() ([]byte, error) {
   603  	type NoMethod EndpointPolicy
   604  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   605  }
   606  
   607  // Expr: Represents a textual expression in the Common Expression Language
   608  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   609  // of CEL are documented at https://github.com/google/cel-spec. Example
   610  // (Comparison): title: "Summary size limit" description: "Determines if a
   611  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   612  // Example (Equality): title: "Requestor is owner" description: "Determines if
   613  // requestor is the document owner" expression: "document.owner ==
   614  // request.auth.claims.email" Example (Logic): title: "Public documents"
   615  // description: "Determine whether the document should be publicly visible"
   616  // expression: "document.type != 'private' && document.type != 'internal'"
   617  // Example (Data Manipulation): title: "Notification string" description:
   618  // "Create a notification string with a timestamp." expression: "'New message
   619  // received at ' + string(document.create_time)" The exact variables and
   620  // functions that may be referenced within an expression are determined by the
   621  // service that evaluates it. See the service documentation for additional
   622  // information.
   623  type Expr struct {
   624  	// Description: Optional. Description of the expression. This is a longer text
   625  	// which describes the expression, e.g. when hovered over it in a UI.
   626  	Description string `json:"description,omitempty"`
   627  	// Expression: Textual representation of an expression in Common Expression
   628  	// Language syntax.
   629  	Expression string `json:"expression,omitempty"`
   630  	// Location: Optional. String indicating the location of the expression for
   631  	// error reporting, e.g. a file name and a position in the file.
   632  	Location string `json:"location,omitempty"`
   633  	// Title: Optional. Title for the expression, i.e. a short string describing
   634  	// its purpose. This can be used e.g. in UIs which allow to enter the
   635  	// expression.
   636  	Title string `json:"title,omitempty"`
   637  	// ForceSendFields is a list of field names (e.g. "Description") to
   638  	// unconditionally include in API requests. By default, fields with empty or
   639  	// default values are omitted from API requests. See
   640  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   641  	// details.
   642  	ForceSendFields []string `json:"-"`
   643  	// NullFields is a list of field names (e.g. "Description") to include in API
   644  	// requests with the JSON null value. By default, fields with empty values are
   645  	// omitted from API requests. See
   646  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   647  	NullFields []string `json:"-"`
   648  }
   649  
   650  func (s *Expr) MarshalJSON() ([]byte, error) {
   651  	type NoMethod Expr
   652  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   653  }
   654  
   655  // ExtensionChain: A single extension chain wrapper that contains the match
   656  // conditions and extensions to execute.
   657  type ExtensionChain struct {
   658  	// Extensions: Required. A set of extensions to execute for the matching
   659  	// request. At least one extension is required. Up to 3 extensions can be
   660  	// defined for each extension chain for `LbTrafficExtension` resource.
   661  	// `LbRouteExtension` chains are limited to 1 extension per extension chain.
   662  	Extensions []*ExtensionChainExtension `json:"extensions,omitempty"`
   663  	// MatchCondition: Required. Conditions under which this chain is invoked for a
   664  	// request.
   665  	MatchCondition *ExtensionChainMatchCondition `json:"matchCondition,omitempty"`
   666  	// Name: Required. The name for this extension chain. The name is logged as
   667  	// part of the HTTP request logs. The name must conform with RFC-1034, is
   668  	// restricted to lower-cased letters, numbers and hyphens, and can have a
   669  	// maximum length of 63 characters. Additionally, the first character must be a
   670  	// letter and the last a letter or a number.
   671  	Name string `json:"name,omitempty"`
   672  	// ForceSendFields is a list of field names (e.g. "Extensions") to
   673  	// unconditionally include in API requests. By default, fields with empty or
   674  	// default values are omitted from API requests. See
   675  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   676  	// details.
   677  	ForceSendFields []string `json:"-"`
   678  	// NullFields is a list of field names (e.g. "Extensions") to include in API
   679  	// requests with the JSON null value. By default, fields with empty values are
   680  	// omitted from API requests. See
   681  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   682  	NullFields []string `json:"-"`
   683  }
   684  
   685  func (s *ExtensionChain) MarshalJSON() ([]byte, error) {
   686  	type NoMethod ExtensionChain
   687  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   688  }
   689  
   690  // ExtensionChainExtension: A single extension in the chain to execute for the
   691  // matching request.
   692  type ExtensionChainExtension struct {
   693  	// Authority: Optional. The `:authority` header in the gRPC request sent from
   694  	// Envoy to the extension service. Required for Callout extensions.
   695  	Authority string `json:"authority,omitempty"`
   696  	// FailOpen: Optional. Determines how the proxy behaves if the call to the
   697  	// extension fails or times out. When set to `TRUE`, request or response
   698  	// processing continues without error. Any subsequent extensions in the
   699  	// extension chain are also executed. When set to `FALSE` or the default
   700  	// setting of `FALSE` is used, one of the following happens: * If response
   701  	// headers have not been delivered to the downstream client, a generic 500
   702  	// error is returned to the client. The error response can be tailored by
   703  	// configuring a custom error response in the load balancer. * If response
   704  	// headers have been delivered, then the HTTP stream to the downstream client
   705  	// is reset.
   706  	FailOpen bool `json:"failOpen,omitempty"`
   707  	// ForwardHeaders: Optional. List of the HTTP headers to forward to the
   708  	// extension (from the client or backend). If omitted, all headers are sent.
   709  	// Each element is a string indicating the header name.
   710  	ForwardHeaders []string `json:"forwardHeaders,omitempty"`
   711  	// Name: Required. The name for this extension. The name is logged as part of
   712  	// the HTTP request logs. The name must conform with RFC-1034, is restricted to
   713  	// lower-cased letters, numbers and hyphens, and can have a maximum length of
   714  	// 63 characters. Additionally, the first character must be a letter and the
   715  	// last a letter or a number.
   716  	Name string `json:"name,omitempty"`
   717  	// Service: Required. The reference to the service that runs the extension.
   718  	// Currently only callout extensions are supported here. To configure a callout
   719  	// extension, `service` must be a fully-qualified reference to a backend
   720  	// service
   721  	// (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in
   722  	// the format:
   723  	// `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/ba
   724  	// ckendServices/{backendService}` or
   725  	// `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServi
   726  	// ces/{backendService}`.
   727  	Service string `json:"service,omitempty"`
   728  	// SupportedEvents: Optional. A set of events during request or response
   729  	// processing for which this extension is called. This field is required for
   730  	// the `LbTrafficExtension` resource. It's not relevant for the
   731  	// `LbRouteExtension` resource.
   732  	//
   733  	// Possible values:
   734  	//   "EVENT_TYPE_UNSPECIFIED" - Unspecified value. Do not use.
   735  	//   "REQUEST_HEADERS" - If included in `supported_events`, the extension is
   736  	// called when the HTTP request headers arrive.
   737  	//   "REQUEST_BODY" - If included in `supported_events`, the extension is
   738  	// called when the HTTP request body arrives.
   739  	//   "RESPONSE_HEADERS" - If included in `supported_events`, the extension is
   740  	// called when the HTTP response headers arrive.
   741  	//   "RESPONSE_BODY" - If included in `supported_events`, the extension is
   742  	// called when the HTTP response body arrives.
   743  	//   "REQUEST_TRAILERS" - If included in `supported_events`, the extension is
   744  	// called when the HTTP request trailers arrives.
   745  	//   "RESPONSE_TRAILERS" - If included in `supported_events`, the extension is
   746  	// called when the HTTP response trailers arrives.
   747  	SupportedEvents []string `json:"supportedEvents,omitempty"`
   748  	// Timeout: Optional. Specifies the timeout for each individual message on the
   749  	// stream. The timeout must be between 10-1000 milliseconds. Required for
   750  	// Callout extensions.
   751  	Timeout string `json:"timeout,omitempty"`
   752  	// ForceSendFields is a list of field names (e.g. "Authority") to
   753  	// unconditionally include in API requests. By default, fields with empty or
   754  	// default values are omitted from API requests. See
   755  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   756  	// details.
   757  	ForceSendFields []string `json:"-"`
   758  	// NullFields is a list of field names (e.g. "Authority") to include in API
   759  	// requests with the JSON null value. By default, fields with empty values are
   760  	// omitted from API requests. See
   761  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   762  	NullFields []string `json:"-"`
   763  }
   764  
   765  func (s *ExtensionChainExtension) MarshalJSON() ([]byte, error) {
   766  	type NoMethod ExtensionChainExtension
   767  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   768  }
   769  
   770  // ExtensionChainMatchCondition: Conditions under which this chain is invoked
   771  // for a request.
   772  type ExtensionChainMatchCondition struct {
   773  	// CelExpression: Required. A Common Expression Language (CEL) expression that
   774  	// is used to match requests for which the extension chain is executed. For
   775  	// more information, see CEL matcher language reference
   776  	// (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).
   777  	CelExpression string `json:"celExpression,omitempty"`
   778  	// ForceSendFields is a list of field names (e.g. "CelExpression") to
   779  	// unconditionally include in API requests. By default, fields with empty or
   780  	// default values are omitted from API requests. See
   781  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   782  	// details.
   783  	ForceSendFields []string `json:"-"`
   784  	// NullFields is a list of field names (e.g. "CelExpression") to include in API
   785  	// requests with the JSON null value. By default, fields with empty values are
   786  	// omitted from API requests. See
   787  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   788  	NullFields []string `json:"-"`
   789  }
   790  
   791  func (s *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) {
   792  	type NoMethod ExtensionChainMatchCondition
   793  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   794  }
   795  
   796  // Gateway: Gateway represents the configuration for a proxy, typically a load
   797  // balancer. It captures the ip:port over which the services are exposed by the
   798  // proxy, along with any policy configurations. Routes have reference to to
   799  // Gateways to dictate how requests should be routed by this Gateway. Next id:
   800  // 33
   801  type Gateway struct {
   802  	// Addresses: Optional. Zero or one IPv4 or IPv6 address on which the Gateway
   803  	// will receive the traffic. When no address is provided, an IP from the
   804  	// subnetwork is allocated This field only applies to gateways of type
   805  	// 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for
   806  	// IPv4 and :: for IPv6.
   807  	Addresses []string `json:"addresses,omitempty"`
   808  	// CertificateUrls: Optional. A fully-qualified Certificates URL reference. The
   809  	// proxy presents a Certificate (selected based on SNI) when establishing a TLS
   810  	// connection. This feature only applies to gateways of type
   811  	// 'SECURE_WEB_GATEWAY'.
   812  	CertificateUrls []string `json:"certificateUrls,omitempty"`
   813  	// CreateTime: Output only. The timestamp when the resource was created.
   814  	CreateTime string `json:"createTime,omitempty"`
   815  	// Description: Optional. A free-text description of the resource. Max length
   816  	// 1024 characters.
   817  	Description string `json:"description,omitempty"`
   818  	// EnvoyHeaders: Optional. Determines if envoy will insert internal debug
   819  	// headers into upstream requests. Other Envoy headers may still be injected.
   820  	// By default, envoy will not insert any debug headers.
   821  	//
   822  	// Possible values:
   823  	//   "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE.
   824  	//   "NONE" - Suppress envoy debug headers.
   825  	//   "DEBUG_HEADERS" - Envoy will insert default internal debug headers into
   826  	// upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry
   827  	// x-envoy-expected-rq-timeout-ms x-envoy-original-path
   828  	// x-envoy-upstream-stream-duration-ms
   829  	EnvoyHeaders string `json:"envoyHeaders,omitempty"`
   830  	// GatewaySecurityPolicy: Optional. A fully-qualified GatewaySecurityPolicy URL
   831  	// reference. Defines how a server should apply security policy to inbound (VM
   832  	// to Proxy) initiated connections. For example:
   833  	// `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is
   834  	// specific to gateways of type 'SECURE_WEB_GATEWAY'.
   835  	GatewaySecurityPolicy string `json:"gatewaySecurityPolicy,omitempty"`
   836  	// IpVersion: Optional. The IP Version that will be used by this gateway. Valid
   837  	// options are IPV4 or IPV6. Default is IPV4.
   838  	//
   839  	// Possible values:
   840  	//   "IP_VERSION_UNSPECIFIED" - The type when IP version is not specified.
   841  	// Defaults to IPV4.
   842  	//   "IPV4" - The type for IP version 4.
   843  	//   "IPV6" - The type for IP version 6.
   844  	IpVersion string `json:"ipVersion,omitempty"`
   845  	// Labels: Optional. Set of label tags associated with the Gateway resource.
   846  	Labels map[string]string `json:"labels,omitempty"`
   847  	// Name: Required. Name of the Gateway resource. It matches pattern
   848  	// `projects/*/locations/*/gateways/`.
   849  	Name string `json:"name,omitempty"`
   850  	// Network: Optional. The relative resource name identifying the VPC network
   851  	// that is using this configuration. For example:
   852  	// `projects/*/global/networks/network-1`. Currently, this field is specific to
   853  	// gateways of type 'SECURE_WEB_GATEWAY'.
   854  	Network string `json:"network,omitempty"`
   855  	// Ports: Required. One or more port numbers (1-65535), on which the Gateway
   856  	// will receive traffic. The proxy binds to the specified ports. Gateways of
   857  	// type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type
   858  	// 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple
   859  	// ports.
   860  	Ports []int64 `json:"ports,omitempty"`
   861  	// Scope: Optional. Scope determines how configuration across multiple Gateway
   862  	// instances are merged. The configuration for multiple Gateway instances with
   863  	// the same scope will be merged as presented as a single coniguration to the
   864  	// proxy/load balancer. Max length 64 characters. Scope should start with a
   865  	// letter and can only have letters, numbers, hyphens.
   866  	Scope string `json:"scope,omitempty"`
   867  	// SelfLink: Output only. Server-defined URL of this resource
   868  	SelfLink string `json:"selfLink,omitempty"`
   869  	// ServerTlsPolicy: Optional. A fully-qualified ServerTLSPolicy URL reference.
   870  	// Specifies how TLS traffic is terminated. If empty, TLS termination is
   871  	// disabled.
   872  	ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"`
   873  	// Subnetwork: Optional. The relative resource name identifying the subnetwork
   874  	// in which this SWG is allocated. For example:
   875  	// `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field
   876  	// is specific to gateways of type 'SECURE_WEB_GATEWAY".
   877  	Subnetwork string `json:"subnetwork,omitempty"`
   878  	// Type: Immutable. The type of the customer managed gateway. This field is
   879  	// required. If unspecified, an error is returned.
   880  	//
   881  	// Possible values:
   882  	//   "TYPE_UNSPECIFIED" - The type of the customer managed gateway is
   883  	// unspecified.
   884  	//   "OPEN_MESH" - The type of the customer managed gateway is TrafficDirector
   885  	// Open Mesh.
   886  	//   "SECURE_WEB_GATEWAY" - The type of the customer managed gateway is
   887  	// SecureWebGateway (SWG).
   888  	Type string `json:"type,omitempty"`
   889  	// UpdateTime: Output only. The timestamp when the resource was updated.
   890  	UpdateTime string `json:"updateTime,omitempty"`
   891  
   892  	// ServerResponse contains the HTTP response code and headers from the server.
   893  	googleapi.ServerResponse `json:"-"`
   894  	// ForceSendFields is a list of field names (e.g. "Addresses") to
   895  	// unconditionally include in API requests. By default, fields with empty or
   896  	// default values are omitted from API requests. See
   897  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   898  	// details.
   899  	ForceSendFields []string `json:"-"`
   900  	// NullFields is a list of field names (e.g. "Addresses") to include in API
   901  	// requests with the JSON null value. By default, fields with empty values are
   902  	// omitted from API requests. See
   903  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   904  	NullFields []string `json:"-"`
   905  }
   906  
   907  func (s *Gateway) MarshalJSON() ([]byte, error) {
   908  	type NoMethod Gateway
   909  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   910  }
   911  
   912  // GrpcRoute: GrpcRoute is the resource defining how gRPC traffic routed by a
   913  // Mesh or Gateway resource is routed.
   914  type GrpcRoute struct {
   915  	// CreateTime: Output only. The timestamp when the resource was created.
   916  	CreateTime string `json:"createTime,omitempty"`
   917  	// Description: Optional. A free-text description of the resource. Max length
   918  	// 1024 characters.
   919  	Description string `json:"description,omitempty"`
   920  	// Gateways: Optional. Gateways defines a list of gateways this GrpcRoute is
   921  	// attached to, as one of the routing rules to route the requests served by the
   922  	// gateway. Each gateway reference should match the pattern:
   923  	// `projects/*/locations/global/gateways/`
   924  	Gateways []string `json:"gateways,omitempty"`
   925  	// Hostnames: Required. Service hostnames with an optional port for which this
   926  	// route describes traffic. Format: [:] Hostname is the fully qualified domain
   927  	// name of a network host. This matches the RFC 1123 definition of a hostname
   928  	// with 2 notable exceptions: - IPs are not allowed. - A hostname may be
   929  	// prefixed with a wildcard label (`*.`). The wildcard label must appear by
   930  	// itself as the first label. Hostname can be "precise" which is a domain name
   931  	// without the terminating dot of a network host (e.g. `foo.example.com`) or
   932  	// "wildcard", which is a domain name prefixed with a single wildcard label
   933  	// (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must
   934  	// consist of lower case alphanumeric characters or '-', and must start and end
   935  	// with an alphanumeric character. No other punctuation is allowed. The routes
   936  	// associated with a Mesh or Gateway must have unique hostnames. If you attempt
   937  	// to attach multiple routes with conflicting hostnames, the configuration will
   938  	// be rejected. For example, while it is acceptable for routes for the
   939  	// hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same
   940  	// route, it is not possible to associate two routes both with `*.bar.com` or
   941  	// both with `bar.com`. If a port is specified, then gRPC clients must use the
   942  	// channel URI with the port to match this rule (i.e. "xds:///service:123"),
   943  	// otherwise they must supply the URI without a port (i.e. "xds:///service").
   944  	Hostnames []string `json:"hostnames,omitempty"`
   945  	// Labels: Optional. Set of label tags associated with the GrpcRoute resource.
   946  	Labels map[string]string `json:"labels,omitempty"`
   947  	// Meshes: Optional. Meshes defines a list of meshes this GrpcRoute is attached
   948  	// to, as one of the routing rules to route the requests served by the mesh.
   949  	// Each mesh reference should match the pattern:
   950  	// `projects/*/locations/global/meshes/`
   951  	Meshes []string `json:"meshes,omitempty"`
   952  	// Name: Required. Name of the GrpcRoute resource. It matches pattern
   953  	// `projects/*/locations/global/grpcRoutes/`
   954  	Name string `json:"name,omitempty"`
   955  	// Rules: Required. A list of detailed rules defining how to route traffic.
   956  	// Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the
   957  	// first matching GrpcRoute.RouteRule will be executed. At least one rule must
   958  	// be supplied.
   959  	Rules []*GrpcRouteRouteRule `json:"rules,omitempty"`
   960  	// SelfLink: Output only. Server-defined URL of this resource
   961  	SelfLink string `json:"selfLink,omitempty"`
   962  	// UpdateTime: Output only. The timestamp when the resource was updated.
   963  	UpdateTime string `json:"updateTime,omitempty"`
   964  
   965  	// ServerResponse contains the HTTP response code and headers from the server.
   966  	googleapi.ServerResponse `json:"-"`
   967  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
   968  	// unconditionally include in API requests. By default, fields with empty or
   969  	// default values are omitted from API requests. See
   970  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   971  	// details.
   972  	ForceSendFields []string `json:"-"`
   973  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
   974  	// requests with the JSON null value. By default, fields with empty values are
   975  	// omitted from API requests. See
   976  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   977  	NullFields []string `json:"-"`
   978  }
   979  
   980  func (s *GrpcRoute) MarshalJSON() ([]byte, error) {
   981  	type NoMethod GrpcRoute
   982  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   983  }
   984  
   985  // GrpcRouteDestination: The destination to which traffic will be routed.
   986  type GrpcRouteDestination struct {
   987  	// ServiceName: Required. The URL of a destination service to which to route
   988  	// traffic. Must refer to either a BackendService or ServiceDirectoryService.
   989  	ServiceName string `json:"serviceName,omitempty"`
   990  	// Weight: Optional. Specifies the proportion of requests forwarded to the
   991  	// backend referenced by the serviceName field. This is computed as: -
   992  	// weight/Sum(weights in this destination list). For non-zero values, there may
   993  	// be some epsilon from the exact proportion defined here depending on the
   994  	// precision an implementation supports. If only one serviceName is specified
   995  	// and it has a weight greater than 0, 100% of the traffic is forwarded to that
   996  	// backend. If weights are specified for any one service name, they need to be
   997  	// specified for all of them. If weights are unspecified for all services,
   998  	// then, traffic is distributed in equal proportions to all of them.
   999  	Weight int64 `json:"weight,omitempty"`
  1000  	// ForceSendFields is a list of field names (e.g. "ServiceName") to
  1001  	// unconditionally include in API requests. By default, fields with empty or
  1002  	// default values are omitted from API requests. See
  1003  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1004  	// details.
  1005  	ForceSendFields []string `json:"-"`
  1006  	// NullFields is a list of field names (e.g. "ServiceName") to include in API
  1007  	// requests with the JSON null value. By default, fields with empty values are
  1008  	// omitted from API requests. See
  1009  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1010  	NullFields []string `json:"-"`
  1011  }
  1012  
  1013  func (s *GrpcRouteDestination) MarshalJSON() ([]byte, error) {
  1014  	type NoMethod GrpcRouteDestination
  1015  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1016  }
  1017  
  1018  // GrpcRouteFaultInjectionPolicy: The specification for fault injection
  1019  // introduced into traffic to test the resiliency of clients to destination
  1020  // service failure. As part of fault injection, when clients send requests to a
  1021  // destination, delays can be introduced on a percentage of requests before
  1022  // sending those requests to the destination service. Similarly requests from
  1023  // clients can be aborted by for a percentage of requests.
  1024  type GrpcRouteFaultInjectionPolicy struct {
  1025  	// Abort: The specification for aborting to client requests.
  1026  	Abort *GrpcRouteFaultInjectionPolicyAbort `json:"abort,omitempty"`
  1027  	// Delay: The specification for injecting delay to client requests.
  1028  	Delay *GrpcRouteFaultInjectionPolicyDelay `json:"delay,omitempty"`
  1029  	// ForceSendFields is a list of field names (e.g. "Abort") to unconditionally
  1030  	// include in API requests. By default, fields with empty or default values are
  1031  	// omitted from API requests. See
  1032  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1033  	// details.
  1034  	ForceSendFields []string `json:"-"`
  1035  	// NullFields is a list of field names (e.g. "Abort") to include in API
  1036  	// requests with the JSON null value. By default, fields with empty values are
  1037  	// omitted from API requests. See
  1038  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1039  	NullFields []string `json:"-"`
  1040  }
  1041  
  1042  func (s *GrpcRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) {
  1043  	type NoMethod GrpcRouteFaultInjectionPolicy
  1044  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1045  }
  1046  
  1047  // GrpcRouteFaultInjectionPolicyAbort: Specification of how client requests are
  1048  // aborted as part of fault injection before being sent to a destination.
  1049  type GrpcRouteFaultInjectionPolicyAbort struct {
  1050  	// HttpStatus: The HTTP status code used to abort the request. The value must
  1051  	// be between 200 and 599 inclusive.
  1052  	HttpStatus int64 `json:"httpStatus,omitempty"`
  1053  	// Percentage: The percentage of traffic which will be aborted. The value must
  1054  	// be between [0, 100]
  1055  	Percentage int64 `json:"percentage,omitempty"`
  1056  	// ForceSendFields is a list of field names (e.g. "HttpStatus") to
  1057  	// unconditionally include in API requests. By default, fields with empty or
  1058  	// default values are omitted from API requests. See
  1059  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1060  	// details.
  1061  	ForceSendFields []string `json:"-"`
  1062  	// NullFields is a list of field names (e.g. "HttpStatus") to include in API
  1063  	// requests with the JSON null value. By default, fields with empty values are
  1064  	// omitted from API requests. See
  1065  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1066  	NullFields []string `json:"-"`
  1067  }
  1068  
  1069  func (s *GrpcRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) {
  1070  	type NoMethod GrpcRouteFaultInjectionPolicyAbort
  1071  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1072  }
  1073  
  1074  // GrpcRouteFaultInjectionPolicyDelay: Specification of how client requests are
  1075  // delayed as part of fault injection before being sent to a destination.
  1076  type GrpcRouteFaultInjectionPolicyDelay struct {
  1077  	// FixedDelay: Specify a fixed delay before forwarding the request.
  1078  	FixedDelay string `json:"fixedDelay,omitempty"`
  1079  	// Percentage: The percentage of traffic on which delay will be injected. The
  1080  	// value must be between [0, 100]
  1081  	Percentage int64 `json:"percentage,omitempty"`
  1082  	// ForceSendFields is a list of field names (e.g. "FixedDelay") to
  1083  	// unconditionally include in API requests. By default, fields with empty or
  1084  	// default values are omitted from API requests. See
  1085  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1086  	// details.
  1087  	ForceSendFields []string `json:"-"`
  1088  	// NullFields is a list of field names (e.g. "FixedDelay") to include in API
  1089  	// requests with the JSON null value. By default, fields with empty values are
  1090  	// omitted from API requests. See
  1091  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1092  	NullFields []string `json:"-"`
  1093  }
  1094  
  1095  func (s *GrpcRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) {
  1096  	type NoMethod GrpcRouteFaultInjectionPolicyDelay
  1097  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1098  }
  1099  
  1100  // GrpcRouteHeaderMatch: A match against a collection of headers.
  1101  type GrpcRouteHeaderMatch struct {
  1102  	// Key: Required. The key of the header.
  1103  	Key string `json:"key,omitempty"`
  1104  	// Type: Optional. Specifies how to match against the value of the header. If
  1105  	// not specified, a default value of EXACT is used.
  1106  	//
  1107  	// Possible values:
  1108  	//   "TYPE_UNSPECIFIED" - Unspecified.
  1109  	//   "EXACT" - Will only match the exact value provided.
  1110  	//   "REGULAR_EXPRESSION" - Will match paths conforming to the prefix specified
  1111  	// by value. RE2 syntax is supported.
  1112  	Type string `json:"type,omitempty"`
  1113  	// Value: Required. The value of the header.
  1114  	Value string `json:"value,omitempty"`
  1115  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  1116  	// include in API requests. By default, fields with empty or default values are
  1117  	// omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1119  	// details.
  1120  	ForceSendFields []string `json:"-"`
  1121  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  1122  	// with the JSON null value. By default, fields with empty values are omitted
  1123  	// from API requests. See
  1124  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1125  	NullFields []string `json:"-"`
  1126  }
  1127  
  1128  func (s *GrpcRouteHeaderMatch) MarshalJSON() ([]byte, error) {
  1129  	type NoMethod GrpcRouteHeaderMatch
  1130  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1131  }
  1132  
  1133  // GrpcRouteMethodMatch: Specifies a match against a method.
  1134  type GrpcRouteMethodMatch struct {
  1135  	// CaseSensitive: Optional. Specifies that matches are case sensitive. The
  1136  	// default value is true. case_sensitive must not be used with a type of
  1137  	// REGULAR_EXPRESSION.
  1138  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  1139  	// GrpcMethod: Required. Name of the method to match against. If unspecified,
  1140  	// will match all methods.
  1141  	GrpcMethod string `json:"grpcMethod,omitempty"`
  1142  	// GrpcService: Required. Name of the service to match against. If unspecified,
  1143  	// will match all services.
  1144  	GrpcService string `json:"grpcService,omitempty"`
  1145  	// Type: Optional. Specifies how to match against the name. If not specified, a
  1146  	// default value of "EXACT" is used.
  1147  	//
  1148  	// Possible values:
  1149  	//   "TYPE_UNSPECIFIED" - Unspecified.
  1150  	//   "EXACT" - Will only match the exact name provided.
  1151  	//   "REGULAR_EXPRESSION" - Will interpret grpc_method and grpc_service as
  1152  	// regexes. RE2 syntax is supported.
  1153  	Type string `json:"type,omitempty"`
  1154  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  1155  	// unconditionally include in API requests. By default, fields with empty or
  1156  	// default values are omitted from API requests. See
  1157  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1158  	// details.
  1159  	ForceSendFields []string `json:"-"`
  1160  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  1161  	// requests with the JSON null value. By default, fields with empty values are
  1162  	// omitted from API requests. See
  1163  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1164  	NullFields []string `json:"-"`
  1165  }
  1166  
  1167  func (s *GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) {
  1168  	type NoMethod GrpcRouteMethodMatch
  1169  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1170  }
  1171  
  1172  // GrpcRouteRetryPolicy: The specifications for retries.
  1173  type GrpcRouteRetryPolicy struct {
  1174  	// NumRetries: Specifies the allowed number of retries. This number must be >
  1175  	// 0. If not specified, default to 1.
  1176  	NumRetries int64 `json:"numRetries,omitempty"`
  1177  	// RetryConditions: - connect-failure: Router will retry on failures connecting
  1178  	// to Backend Services, for example due to connection timeouts. -
  1179  	// refused-stream: Router will retry if the backend service resets the stream
  1180  	// with a REFUSED_STREAM error code. This reset type indicates that it is safe
  1181  	// to retry. - cancelled: Router will retry if the gRPC status code in the
  1182  	// response header is set to cancelled - deadline-exceeded: Router will retry
  1183  	// if the gRPC status code in the response header is set to deadline-exceeded -
  1184  	// resource-exhausted: Router will retry if the gRPC status code in the
  1185  	// response header is set to resource-exhausted - unavailable: Router will
  1186  	// retry if the gRPC status code in the response header is set to unavailable
  1187  	RetryConditions []string `json:"retryConditions,omitempty"`
  1188  	// ForceSendFields is a list of field names (e.g. "NumRetries") to
  1189  	// unconditionally include in API requests. By default, fields with empty or
  1190  	// default values are omitted from API requests. See
  1191  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1192  	// details.
  1193  	ForceSendFields []string `json:"-"`
  1194  	// NullFields is a list of field names (e.g. "NumRetries") to include in API
  1195  	// requests with the JSON null value. By default, fields with empty values are
  1196  	// omitted from API requests. See
  1197  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1198  	NullFields []string `json:"-"`
  1199  }
  1200  
  1201  func (s *GrpcRouteRetryPolicy) MarshalJSON() ([]byte, error) {
  1202  	type NoMethod GrpcRouteRetryPolicy
  1203  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1204  }
  1205  
  1206  // GrpcRouteRouteAction: Specifies how to route matched traffic.
  1207  type GrpcRouteRouteAction struct {
  1208  	// Destinations: Optional. The destination services to which traffic should be
  1209  	// forwarded. If multiple destinations are specified, traffic will be split
  1210  	// between Backend Service(s) according to the weight field of these
  1211  	// destinations.
  1212  	Destinations []*GrpcRouteDestination `json:"destinations,omitempty"`
  1213  	// FaultInjectionPolicy: Optional. The specification for fault injection
  1214  	// introduced into traffic to test the resiliency of clients to destination
  1215  	// service failure. As part of fault injection, when clients send requests to a
  1216  	// destination, delays can be introduced on a percentage of requests before
  1217  	// sending those requests to the destination service. Similarly requests from
  1218  	// clients can be aborted by for a percentage of requests. timeout and
  1219  	// retry_policy will be ignored by clients that are configured with a
  1220  	// fault_injection_policy
  1221  	FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"`
  1222  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  1223  	// The idle timeout is defined as the period in which there are no bytes sent
  1224  	// or received on either the upstream or downstream connection. If not set, the
  1225  	// default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.
  1226  	IdleTimeout string `json:"idleTimeout,omitempty"`
  1227  	// RetryPolicy: Optional. Specifies the retry policy associated with this
  1228  	// route.
  1229  	RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"`
  1230  	// StatefulSessionAffinity: Optional. Specifies cookie-based stateful session
  1231  	// affinity.
  1232  	StatefulSessionAffinity *GrpcRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"`
  1233  	// Timeout: Optional. Specifies the timeout for selected route. Timeout is
  1234  	// computed from the time the request has been fully processed (i.e. end of
  1235  	// stream) up until the response has been completely processed. Timeout
  1236  	// includes all retries.
  1237  	Timeout string `json:"timeout,omitempty"`
  1238  	// ForceSendFields is a list of field names (e.g. "Destinations") to
  1239  	// unconditionally include in API requests. By default, fields with empty or
  1240  	// default values are omitted from API requests. See
  1241  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1242  	// details.
  1243  	ForceSendFields []string `json:"-"`
  1244  	// NullFields is a list of field names (e.g. "Destinations") to include in API
  1245  	// requests with the JSON null value. By default, fields with empty values are
  1246  	// omitted from API requests. See
  1247  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1248  	NullFields []string `json:"-"`
  1249  }
  1250  
  1251  func (s *GrpcRouteRouteAction) MarshalJSON() ([]byte, error) {
  1252  	type NoMethod GrpcRouteRouteAction
  1253  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1254  }
  1255  
  1256  // GrpcRouteRouteMatch: Criteria for matching traffic. A RouteMatch will be
  1257  // considered to match when all supplied fields match.
  1258  type GrpcRouteRouteMatch struct {
  1259  	// Headers: Optional. Specifies a collection of headers to match.
  1260  	Headers []*GrpcRouteHeaderMatch `json:"headers,omitempty"`
  1261  	// Method: Optional. A gRPC method to match against. If this field is empty or
  1262  	// omitted, will match all methods.
  1263  	Method *GrpcRouteMethodMatch `json:"method,omitempty"`
  1264  	// ForceSendFields is a list of field names (e.g. "Headers") to unconditionally
  1265  	// include in API requests. By default, fields with empty or default values are
  1266  	// omitted from API requests. See
  1267  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1268  	// details.
  1269  	ForceSendFields []string `json:"-"`
  1270  	// NullFields is a list of field names (e.g. "Headers") to include in API
  1271  	// requests with the JSON null value. By default, fields with empty values are
  1272  	// omitted from API requests. See
  1273  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1274  	NullFields []string `json:"-"`
  1275  }
  1276  
  1277  func (s *GrpcRouteRouteMatch) MarshalJSON() ([]byte, error) {
  1278  	type NoMethod GrpcRouteRouteMatch
  1279  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1280  }
  1281  
  1282  // GrpcRouteRouteRule: Describes how to route traffic.
  1283  type GrpcRouteRouteRule struct {
  1284  	// Action: Required. A detailed rule defining how to route traffic. This field
  1285  	// is required.
  1286  	Action *GrpcRouteRouteAction `json:"action,omitempty"`
  1287  	// Matches: Optional. Matches define conditions used for matching the rule
  1288  	// against incoming gRPC requests. Each match is independent, i.e. this rule
  1289  	// will be matched if ANY one of the matches is satisfied. If no matches field
  1290  	// is specified, this rule will unconditionally match traffic.
  1291  	Matches []*GrpcRouteRouteMatch `json:"matches,omitempty"`
  1292  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1293  	// include in API requests. By default, fields with empty or default values are
  1294  	// omitted from API requests. See
  1295  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1296  	// details.
  1297  	ForceSendFields []string `json:"-"`
  1298  	// NullFields is a list of field names (e.g. "Action") to include in API
  1299  	// requests with the JSON null value. By default, fields with empty values are
  1300  	// omitted from API requests. See
  1301  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1302  	NullFields []string `json:"-"`
  1303  }
  1304  
  1305  func (s *GrpcRouteRouteRule) MarshalJSON() ([]byte, error) {
  1306  	type NoMethod GrpcRouteRouteRule
  1307  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1308  }
  1309  
  1310  // GrpcRouteStatefulSessionAffinityPolicy: The specification for cookie-based
  1311  // stateful session affinity where the date plane supplies a “session
  1312  // cookie” with the name "GSSA" which encodes a specific destination host and
  1313  // each request containing that cookie will be directed to that host as long as
  1314  // the destination host remains up and healthy. The gRPC proxyless mesh library
  1315  // or sidecar proxy will manage the session cookie but the client application
  1316  // code is responsible for copying the cookie from each RPC in the session to
  1317  // the next.
  1318  type GrpcRouteStatefulSessionAffinityPolicy struct {
  1319  	// CookieTtl: Required. The cookie TTL value for the Set-Cookie header
  1320  	// generated by the data plane. The lifetime of the cookie may be set to a
  1321  	// value from 1 to 86400 seconds (24 hours) inclusive.
  1322  	CookieTtl string `json:"cookieTtl,omitempty"`
  1323  	// ForceSendFields is a list of field names (e.g. "CookieTtl") to
  1324  	// unconditionally include in API requests. By default, fields with empty or
  1325  	// default values are omitted from API requests. See
  1326  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1327  	// details.
  1328  	ForceSendFields []string `json:"-"`
  1329  	// NullFields is a list of field names (e.g. "CookieTtl") to include in API
  1330  	// requests with the JSON null value. By default, fields with empty values are
  1331  	// omitted from API requests. See
  1332  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1333  	NullFields []string `json:"-"`
  1334  }
  1335  
  1336  func (s *GrpcRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) {
  1337  	type NoMethod GrpcRouteStatefulSessionAffinityPolicy
  1338  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1339  }
  1340  
  1341  // HttpRoute: HttpRoute is the resource defining how HTTP traffic should be
  1342  // routed by a Mesh or Gateway resource.
  1343  type HttpRoute struct {
  1344  	// CreateTime: Output only. The timestamp when the resource was created.
  1345  	CreateTime string `json:"createTime,omitempty"`
  1346  	// Description: Optional. A free-text description of the resource. Max length
  1347  	// 1024 characters.
  1348  	Description string `json:"description,omitempty"`
  1349  	// Gateways: Optional. Gateways defines a list of gateways this HttpRoute is
  1350  	// attached to, as one of the routing rules to route the requests served by the
  1351  	// gateway. Each gateway reference should match the pattern:
  1352  	// `projects/*/locations/global/gateways/`
  1353  	Gateways []string `json:"gateways,omitempty"`
  1354  	// Hostnames: Required. Hostnames define a set of hosts that should match
  1355  	// against the HTTP host header to select a HttpRoute to process the request.
  1356  	// Hostname is the fully qualified domain name of a network host, as defined by
  1357  	// RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be
  1358  	// prefixed with a wildcard label (`*.`). The wildcard label must appear by
  1359  	// itself as the first label. Hostname can be "precise" which is a domain name
  1360  	// without the terminating dot of a network host (e.g. `foo.example.com`) or
  1361  	// "wildcard", which is a domain name prefixed with a single wildcard label
  1362  	// (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must
  1363  	// consist of lower case alphanumeric characters or '-', and must start and end
  1364  	// with an alphanumeric character. No other punctuation is allowed. The routes
  1365  	// associated with a Mesh or Gateways must have unique hostnames. If you
  1366  	// attempt to attach multiple routes with conflicting hostnames, the
  1367  	// configuration will be rejected. For example, while it is acceptable for
  1368  	// routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated
  1369  	// with the same Mesh (or Gateways under the same scope), it is not possible to
  1370  	// associate two routes both with `*.bar.com` or both with `bar.com`.
  1371  	Hostnames []string `json:"hostnames,omitempty"`
  1372  	// Labels: Optional. Set of label tags associated with the HttpRoute resource.
  1373  	Labels map[string]string `json:"labels,omitempty"`
  1374  	// Meshes: Optional. Meshes defines a list of meshes this HttpRoute is attached
  1375  	// to, as one of the routing rules to route the requests served by the mesh.
  1376  	// Each mesh reference should match the pattern:
  1377  	// `projects/*/locations/global/meshes/` The attached Mesh should be of a type
  1378  	// SIDECAR
  1379  	Meshes []string `json:"meshes,omitempty"`
  1380  	// Name: Required. Name of the HttpRoute resource. It matches pattern
  1381  	// `projects/*/locations/global/httpRoutes/http_route_name>`.
  1382  	Name string `json:"name,omitempty"`
  1383  	// Rules: Required. Rules that define how traffic is routed and handled. Rules
  1384  	// will be matched sequentially based on the RouteMatch specified for the rule.
  1385  	Rules []*HttpRouteRouteRule `json:"rules,omitempty"`
  1386  	// SelfLink: Output only. Server-defined URL of this resource
  1387  	SelfLink string `json:"selfLink,omitempty"`
  1388  	// UpdateTime: Output only. The timestamp when the resource was updated.
  1389  	UpdateTime string `json:"updateTime,omitempty"`
  1390  
  1391  	// ServerResponse contains the HTTP response code and headers from the server.
  1392  	googleapi.ServerResponse `json:"-"`
  1393  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1394  	// unconditionally include in API requests. By default, fields with empty or
  1395  	// default values are omitted from API requests. See
  1396  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1397  	// details.
  1398  	ForceSendFields []string `json:"-"`
  1399  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1400  	// requests with the JSON null value. By default, fields with empty values are
  1401  	// omitted from API requests. See
  1402  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1403  	NullFields []string `json:"-"`
  1404  }
  1405  
  1406  func (s *HttpRoute) MarshalJSON() ([]byte, error) {
  1407  	type NoMethod HttpRoute
  1408  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1409  }
  1410  
  1411  // HttpRouteCorsPolicy: The Specification for allowing client side cross-origin
  1412  // requests.
  1413  type HttpRouteCorsPolicy struct {
  1414  	// AllowCredentials: In response to a preflight request, setting this to true
  1415  	// indicates that the actual request can include user credentials. This
  1416  	// translates to the Access-Control-Allow-Credentials header. Default value is
  1417  	// false.
  1418  	AllowCredentials bool `json:"allowCredentials,omitempty"`
  1419  	// AllowHeaders: Specifies the content for Access-Control-Allow-Headers header.
  1420  	AllowHeaders []string `json:"allowHeaders,omitempty"`
  1421  	// AllowMethods: Specifies the content for Access-Control-Allow-Methods header.
  1422  	AllowMethods []string `json:"allowMethods,omitempty"`
  1423  	// AllowOriginRegexes: Specifies the regular expression patterns that match
  1424  	// allowed origins. For regular expression grammar, please see
  1425  	// https://github.com/google/re2/wiki/Syntax.
  1426  	AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"`
  1427  	// AllowOrigins: Specifies the list of origins that will be allowed to do CORS
  1428  	// requests. An origin is allowed if it matches either an item in allow_origins
  1429  	// or an item in allow_origin_regexes.
  1430  	AllowOrigins []string `json:"allowOrigins,omitempty"`
  1431  	// Disabled: If true, the CORS policy is disabled. The default value is false,
  1432  	// which indicates that the CORS policy is in effect.
  1433  	Disabled bool `json:"disabled,omitempty"`
  1434  	// ExposeHeaders: Specifies the content for Access-Control-Expose-Headers
  1435  	// header.
  1436  	ExposeHeaders []string `json:"exposeHeaders,omitempty"`
  1437  	// MaxAge: Specifies how long result of a preflight request can be cached in
  1438  	// seconds. This translates to the Access-Control-Max-Age header.
  1439  	MaxAge string `json:"maxAge,omitempty"`
  1440  	// ForceSendFields is a list of field names (e.g. "AllowCredentials") to
  1441  	// unconditionally include in API requests. By default, fields with empty or
  1442  	// default values are omitted from API requests. See
  1443  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1444  	// details.
  1445  	ForceSendFields []string `json:"-"`
  1446  	// NullFields is a list of field names (e.g. "AllowCredentials") to include in
  1447  	// API requests with the JSON null value. By default, fields with empty values
  1448  	// are omitted from API requests. See
  1449  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1450  	NullFields []string `json:"-"`
  1451  }
  1452  
  1453  func (s *HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) {
  1454  	type NoMethod HttpRouteCorsPolicy
  1455  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1456  }
  1457  
  1458  // HttpRouteDestination: Specifications of a destination to which the request
  1459  // should be routed to.
  1460  type HttpRouteDestination struct {
  1461  	// RequestHeaderModifier: Optional. The specification for modifying the headers
  1462  	// of a matching request prior to delivery of the request to the destination.
  1463  	// If HeaderModifiers are set on both the Destination and the RouteAction, they
  1464  	// will be merged. Conflicts between the two will not be resolved on the
  1465  	// configuration.
  1466  	RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"`
  1467  	// ResponseHeaderModifier: Optional. The specification for modifying the
  1468  	// headers of a response prior to sending the response back to the client. If
  1469  	// HeaderModifiers are set on both the Destination and the RouteAction, they
  1470  	// will be merged. Conflicts between the two will not be resolved on the
  1471  	// configuration.
  1472  	ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"`
  1473  	// ServiceName: The URL of a BackendService to route traffic to.
  1474  	ServiceName string `json:"serviceName,omitempty"`
  1475  	// Weight: Specifies the proportion of requests forwarded to the backend
  1476  	// referenced by the serviceName field. This is computed as: -
  1477  	// weight/Sum(weights in this destination list). For non-zero values, there may
  1478  	// be some epsilon from the exact proportion defined here depending on the
  1479  	// precision an implementation supports. If only one serviceName is specified
  1480  	// and it has a weight greater than 0, 100% of the traffic is forwarded to that
  1481  	// backend. If weights are specified for any one service name, they need to be
  1482  	// specified for all of them. If weights are unspecified for all services,
  1483  	// then, traffic is distributed in equal proportions to all of them.
  1484  	Weight int64 `json:"weight,omitempty"`
  1485  	// ForceSendFields is a list of field names (e.g. "RequestHeaderModifier") to
  1486  	// unconditionally include in API requests. By default, fields with empty or
  1487  	// default values are omitted from API requests. See
  1488  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1489  	// details.
  1490  	ForceSendFields []string `json:"-"`
  1491  	// NullFields is a list of field names (e.g. "RequestHeaderModifier") to
  1492  	// include in API requests with the JSON null value. By default, fields with
  1493  	// empty values are omitted from API requests. See
  1494  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1495  	NullFields []string `json:"-"`
  1496  }
  1497  
  1498  func (s *HttpRouteDestination) MarshalJSON() ([]byte, error) {
  1499  	type NoMethod HttpRouteDestination
  1500  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1501  }
  1502  
  1503  // HttpRouteFaultInjectionPolicy: The specification for fault injection
  1504  // introduced into traffic to test the resiliency of clients to destination
  1505  // service failure. As part of fault injection, when clients send requests to a
  1506  // destination, delays can be introduced by client proxy on a percentage of
  1507  // requests before sending those requests to the destination service. Similarly
  1508  // requests can be aborted by client proxy for a percentage of requests.
  1509  type HttpRouteFaultInjectionPolicy struct {
  1510  	// Abort: The specification for aborting to client requests.
  1511  	Abort *HttpRouteFaultInjectionPolicyAbort `json:"abort,omitempty"`
  1512  	// Delay: The specification for injecting delay to client requests.
  1513  	Delay *HttpRouteFaultInjectionPolicyDelay `json:"delay,omitempty"`
  1514  	// ForceSendFields is a list of field names (e.g. "Abort") to unconditionally
  1515  	// include in API requests. By default, fields with empty or default values are
  1516  	// omitted from API requests. See
  1517  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1518  	// details.
  1519  	ForceSendFields []string `json:"-"`
  1520  	// NullFields is a list of field names (e.g. "Abort") to include in API
  1521  	// requests with the JSON null value. By default, fields with empty values are
  1522  	// omitted from API requests. See
  1523  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1524  	NullFields []string `json:"-"`
  1525  }
  1526  
  1527  func (s *HttpRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) {
  1528  	type NoMethod HttpRouteFaultInjectionPolicy
  1529  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1530  }
  1531  
  1532  // HttpRouteFaultInjectionPolicyAbort: Specification of how client requests are
  1533  // aborted as part of fault injection before being sent to a destination.
  1534  type HttpRouteFaultInjectionPolicyAbort struct {
  1535  	// HttpStatus: The HTTP status code used to abort the request. The value must
  1536  	// be between 200 and 599 inclusive.
  1537  	HttpStatus int64 `json:"httpStatus,omitempty"`
  1538  	// Percentage: The percentage of traffic which will be aborted. The value must
  1539  	// be between [0, 100]
  1540  	Percentage int64 `json:"percentage,omitempty"`
  1541  	// ForceSendFields is a list of field names (e.g. "HttpStatus") to
  1542  	// unconditionally include in API requests. By default, fields with empty or
  1543  	// default values are omitted from API requests. See
  1544  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1545  	// details.
  1546  	ForceSendFields []string `json:"-"`
  1547  	// NullFields is a list of field names (e.g. "HttpStatus") to include in API
  1548  	// requests with the JSON null value. By default, fields with empty values are
  1549  	// omitted from API requests. See
  1550  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1551  	NullFields []string `json:"-"`
  1552  }
  1553  
  1554  func (s *HttpRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) {
  1555  	type NoMethod HttpRouteFaultInjectionPolicyAbort
  1556  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1557  }
  1558  
  1559  // HttpRouteFaultInjectionPolicyDelay: Specification of how client requests are
  1560  // delayed as part of fault injection before being sent to a destination.
  1561  type HttpRouteFaultInjectionPolicyDelay struct {
  1562  	// FixedDelay: Specify a fixed delay before forwarding the request.
  1563  	FixedDelay string `json:"fixedDelay,omitempty"`
  1564  	// Percentage: The percentage of traffic on which delay will be injected. The
  1565  	// value must be between [0, 100]
  1566  	Percentage int64 `json:"percentage,omitempty"`
  1567  	// ForceSendFields is a list of field names (e.g. "FixedDelay") to
  1568  	// unconditionally include in API requests. By default, fields with empty or
  1569  	// default values are omitted from API requests. See
  1570  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1571  	// details.
  1572  	ForceSendFields []string `json:"-"`
  1573  	// NullFields is a list of field names (e.g. "FixedDelay") to include in API
  1574  	// requests with the JSON null value. By default, fields with empty values are
  1575  	// omitted from API requests. See
  1576  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1577  	NullFields []string `json:"-"`
  1578  }
  1579  
  1580  func (s *HttpRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) {
  1581  	type NoMethod HttpRouteFaultInjectionPolicyDelay
  1582  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1583  }
  1584  
  1585  // HttpRouteHeaderMatch: Specifies how to select a route rule based on HTTP
  1586  // request headers.
  1587  type HttpRouteHeaderMatch struct {
  1588  	// ExactMatch: The value of the header should match exactly the content of
  1589  	// exact_match.
  1590  	ExactMatch string `json:"exactMatch,omitempty"`
  1591  	// Header: The name of the HTTP header to match against.
  1592  	Header string `json:"header,omitempty"`
  1593  	// InvertMatch: If specified, the match result will be inverted before
  1594  	// checking. Default value is set to false.
  1595  	InvertMatch bool `json:"invertMatch,omitempty"`
  1596  	// PrefixMatch: The value of the header must start with the contents of
  1597  	// prefix_match.
  1598  	PrefixMatch string `json:"prefixMatch,omitempty"`
  1599  	// PresentMatch: A header with header_name must exist. The match takes place
  1600  	// whether or not the header has a value.
  1601  	PresentMatch bool `json:"presentMatch,omitempty"`
  1602  	// RangeMatch: If specified, the rule will match if the request header value is
  1603  	// within the range.
  1604  	RangeMatch *HttpRouteHeaderMatchIntegerRange `json:"rangeMatch,omitempty"`
  1605  	// RegexMatch: The value of the header must match the regular expression
  1606  	// specified in regex_match. For regular expression grammar, please see:
  1607  	// https://github.com/google/re2/wiki/Syntax
  1608  	RegexMatch string `json:"regexMatch,omitempty"`
  1609  	// SuffixMatch: The value of the header must end with the contents of
  1610  	// suffix_match.
  1611  	SuffixMatch string `json:"suffixMatch,omitempty"`
  1612  	// ForceSendFields is a list of field names (e.g. "ExactMatch") to
  1613  	// unconditionally include in API requests. By default, fields with empty or
  1614  	// default values are omitted from API requests. See
  1615  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1616  	// details.
  1617  	ForceSendFields []string `json:"-"`
  1618  	// NullFields is a list of field names (e.g. "ExactMatch") to include in API
  1619  	// requests with the JSON null value. By default, fields with empty values are
  1620  	// omitted from API requests. See
  1621  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1622  	NullFields []string `json:"-"`
  1623  }
  1624  
  1625  func (s *HttpRouteHeaderMatch) MarshalJSON() ([]byte, error) {
  1626  	type NoMethod HttpRouteHeaderMatch
  1627  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1628  }
  1629  
  1630  // HttpRouteHeaderMatchIntegerRange: Represents an integer value range.
  1631  type HttpRouteHeaderMatchIntegerRange struct {
  1632  	// End: End of the range (exclusive)
  1633  	End int64 `json:"end,omitempty"`
  1634  	// Start: Start of the range (inclusive)
  1635  	Start int64 `json:"start,omitempty"`
  1636  	// ForceSendFields is a list of field names (e.g. "End") to unconditionally
  1637  	// include in API requests. By default, fields with empty or default values are
  1638  	// omitted from API requests. See
  1639  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1640  	// details.
  1641  	ForceSendFields []string `json:"-"`
  1642  	// NullFields is a list of field names (e.g. "End") to include in API requests
  1643  	// with the JSON null value. By default, fields with empty values are omitted
  1644  	// from API requests. See
  1645  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1646  	NullFields []string `json:"-"`
  1647  }
  1648  
  1649  func (s *HttpRouteHeaderMatchIntegerRange) MarshalJSON() ([]byte, error) {
  1650  	type NoMethod HttpRouteHeaderMatchIntegerRange
  1651  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1652  }
  1653  
  1654  // HttpRouteHeaderModifier: The specification for modifying HTTP header in HTTP
  1655  // request and HTTP response.
  1656  type HttpRouteHeaderModifier struct {
  1657  	// Add: Add the headers with given map where key is the name of the header,
  1658  	// value is the value of the header.
  1659  	Add map[string]string `json:"add,omitempty"`
  1660  	// Remove: Remove headers (matching by header names) specified in the list.
  1661  	Remove []string `json:"remove,omitempty"`
  1662  	// Set: Completely overwrite/replace the headers with given map where key is
  1663  	// the name of the header, value is the value of the header.
  1664  	Set map[string]string `json:"set,omitempty"`
  1665  	// ForceSendFields is a list of field names (e.g. "Add") to unconditionally
  1666  	// include in API requests. By default, fields with empty or default values are
  1667  	// omitted from API requests. See
  1668  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1669  	// details.
  1670  	ForceSendFields []string `json:"-"`
  1671  	// NullFields is a list of field names (e.g. "Add") to include in API requests
  1672  	// with the JSON null value. By default, fields with empty values are omitted
  1673  	// from API requests. See
  1674  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1675  	NullFields []string `json:"-"`
  1676  }
  1677  
  1678  func (s *HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) {
  1679  	type NoMethod HttpRouteHeaderModifier
  1680  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1681  }
  1682  
  1683  // HttpRouteHttpDirectResponse: Static HTTP response object to be returned.
  1684  type HttpRouteHttpDirectResponse struct {
  1685  	// BytesBody: Optional. Response body as bytes. Maximum body size is 4096B.
  1686  	BytesBody string `json:"bytesBody,omitempty"`
  1687  	// Status: Required. Status to return as part of HTTP Response. Must be a
  1688  	// positive integer.
  1689  	Status int64 `json:"status,omitempty"`
  1690  	// StringBody: Optional. Response body as a string. Maximum body length is 1024
  1691  	// characters.
  1692  	StringBody string `json:"stringBody,omitempty"`
  1693  	// ForceSendFields is a list of field names (e.g. "BytesBody") to
  1694  	// unconditionally include in API requests. By default, fields with empty or
  1695  	// default values are omitted from API requests. See
  1696  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1697  	// details.
  1698  	ForceSendFields []string `json:"-"`
  1699  	// NullFields is a list of field names (e.g. "BytesBody") to include in API
  1700  	// requests with the JSON null value. By default, fields with empty values are
  1701  	// omitted from API requests. See
  1702  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1703  	NullFields []string `json:"-"`
  1704  }
  1705  
  1706  func (s *HttpRouteHttpDirectResponse) MarshalJSON() ([]byte, error) {
  1707  	type NoMethod HttpRouteHttpDirectResponse
  1708  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1709  }
  1710  
  1711  // HttpRouteQueryParameterMatch: Specifications to match a query parameter in
  1712  // the request.
  1713  type HttpRouteQueryParameterMatch struct {
  1714  	// ExactMatch: The value of the query parameter must exactly match the contents
  1715  	// of exact_match. Only one of exact_match, regex_match, or present_match must
  1716  	// be set.
  1717  	ExactMatch string `json:"exactMatch,omitempty"`
  1718  	// PresentMatch: Specifies that the QueryParameterMatcher matches if request
  1719  	// contains query parameter, irrespective of whether the parameter has a value
  1720  	// or not. Only one of exact_match, regex_match, or present_match must be set.
  1721  	PresentMatch bool `json:"presentMatch,omitempty"`
  1722  	// QueryParameter: The name of the query parameter to match.
  1723  	QueryParameter string `json:"queryParameter,omitempty"`
  1724  	// RegexMatch: The value of the query parameter must match the regular
  1725  	// expression specified by regex_match. For regular expression grammar, please
  1726  	// see https://github.com/google/re2/wiki/Syntax Only one of exact_match,
  1727  	// regex_match, or present_match must be set.
  1728  	RegexMatch string `json:"regexMatch,omitempty"`
  1729  	// ForceSendFields is a list of field names (e.g. "ExactMatch") to
  1730  	// unconditionally include in API requests. By default, fields with empty or
  1731  	// default values are omitted from API requests. See
  1732  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1733  	// details.
  1734  	ForceSendFields []string `json:"-"`
  1735  	// NullFields is a list of field names (e.g. "ExactMatch") to include in API
  1736  	// requests with the JSON null value. By default, fields with empty values are
  1737  	// omitted from API requests. See
  1738  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1739  	NullFields []string `json:"-"`
  1740  }
  1741  
  1742  func (s *HttpRouteQueryParameterMatch) MarshalJSON() ([]byte, error) {
  1743  	type NoMethod HttpRouteQueryParameterMatch
  1744  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1745  }
  1746  
  1747  // HttpRouteRedirect: The specification for redirecting traffic.
  1748  type HttpRouteRedirect struct {
  1749  	// HostRedirect: The host that will be used in the redirect response instead of
  1750  	// the one that was supplied in the request.
  1751  	HostRedirect string `json:"hostRedirect,omitempty"`
  1752  	// HttpsRedirect: If set to true, the URL scheme in the redirected request is
  1753  	// set to https. If set to false, the URL scheme of the redirected request will
  1754  	// remain the same as that of the request. The default is set to false.
  1755  	HttpsRedirect bool `json:"httpsRedirect,omitempty"`
  1756  	// PathRedirect: The path that will be used in the redirect response instead of
  1757  	// the one that was supplied in the request. path_redirect can not be supplied
  1758  	// together with prefix_redirect. Supply one alone or neither. If neither is
  1759  	// supplied, the path of the original request will be used for the redirect.
  1760  	PathRedirect string `json:"pathRedirect,omitempty"`
  1761  	// PortRedirect: The port that will be used in the redirected request instead
  1762  	// of the one that was supplied in the request.
  1763  	PortRedirect int64 `json:"portRedirect,omitempty"`
  1764  	// PrefixRewrite: Indicates that during redirection, the matched prefix (or
  1765  	// path) should be swapped with this value. This option allows URLs be
  1766  	// dynamically created based on the request.
  1767  	PrefixRewrite string `json:"prefixRewrite,omitempty"`
  1768  	// ResponseCode: The HTTP Status code to use for the redirect.
  1769  	//
  1770  	// Possible values:
  1771  	//   "RESPONSE_CODE_UNSPECIFIED" - Default value
  1772  	//   "MOVED_PERMANENTLY_DEFAULT" - Corresponds to 301.
  1773  	//   "FOUND" - Corresponds to 302.
  1774  	//   "SEE_OTHER" - Corresponds to 303.
  1775  	//   "TEMPORARY_REDIRECT" - Corresponds to 307. In this case, the request
  1776  	// method will be retained.
  1777  	//   "PERMANENT_REDIRECT" - Corresponds to 308. In this case, the request
  1778  	// method will be retained.
  1779  	ResponseCode string `json:"responseCode,omitempty"`
  1780  	// StripQuery: if set to true, any accompanying query portion of the original
  1781  	// URL is removed prior to redirecting the request. If set to false, the query
  1782  	// portion of the original URL is retained. The default is set to false.
  1783  	StripQuery bool `json:"stripQuery,omitempty"`
  1784  	// ForceSendFields is a list of field names (e.g. "HostRedirect") to
  1785  	// unconditionally include in API requests. By default, fields with empty or
  1786  	// default values are omitted from API requests. See
  1787  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1788  	// details.
  1789  	ForceSendFields []string `json:"-"`
  1790  	// NullFields is a list of field names (e.g. "HostRedirect") to include in API
  1791  	// requests with the JSON null value. By default, fields with empty values are
  1792  	// omitted from API requests. See
  1793  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1794  	NullFields []string `json:"-"`
  1795  }
  1796  
  1797  func (s *HttpRouteRedirect) MarshalJSON() ([]byte, error) {
  1798  	type NoMethod HttpRouteRedirect
  1799  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1800  }
  1801  
  1802  // HttpRouteRequestMirrorPolicy: Specifies the policy on how requests are
  1803  // shadowed to a separate mirrored destination service. The proxy does not wait
  1804  // for responses from the shadow service. Prior to sending traffic to the
  1805  // shadow service, the host/authority header is suffixed with -shadow.
  1806  type HttpRouteRequestMirrorPolicy struct {
  1807  	// Destination: The destination the requests will be mirrored to. The weight of
  1808  	// the destination will be ignored.
  1809  	Destination *HttpRouteDestination `json:"destination,omitempty"`
  1810  	// MirrorPercent: Optional. The percentage of requests to get mirrored to the
  1811  	// desired destination.
  1812  	MirrorPercent float64 `json:"mirrorPercent,omitempty"`
  1813  	// ForceSendFields is a list of field names (e.g. "Destination") to
  1814  	// unconditionally include in API requests. By default, fields with empty or
  1815  	// default values are omitted from API requests. See
  1816  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1817  	// details.
  1818  	ForceSendFields []string `json:"-"`
  1819  	// NullFields is a list of field names (e.g. "Destination") to include in API
  1820  	// requests with the JSON null value. By default, fields with empty values are
  1821  	// omitted from API requests. See
  1822  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1823  	NullFields []string `json:"-"`
  1824  }
  1825  
  1826  func (s *HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) {
  1827  	type NoMethod HttpRouteRequestMirrorPolicy
  1828  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1829  }
  1830  
  1831  func (s *HttpRouteRequestMirrorPolicy) UnmarshalJSON(data []byte) error {
  1832  	type NoMethod HttpRouteRequestMirrorPolicy
  1833  	var s1 struct {
  1834  		MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"`
  1835  		*NoMethod
  1836  	}
  1837  	s1.NoMethod = (*NoMethod)(s)
  1838  	if err := json.Unmarshal(data, &s1); err != nil {
  1839  		return err
  1840  	}
  1841  	s.MirrorPercent = float64(s1.MirrorPercent)
  1842  	return nil
  1843  }
  1844  
  1845  // HttpRouteRetryPolicy: The specifications for retries.
  1846  type HttpRouteRetryPolicy struct {
  1847  	// NumRetries: Specifies the allowed number of retries. This number must be >
  1848  	// 0. If not specified, default to 1.
  1849  	NumRetries int64 `json:"numRetries,omitempty"`
  1850  	// PerTryTimeout: Specifies a non-zero timeout per retry attempt.
  1851  	PerTryTimeout string `json:"perTryTimeout,omitempty"`
  1852  	// RetryConditions: Specifies one or more conditions when this retry policy
  1853  	// applies. Valid values are: 5xx: Proxy will attempt a retry if the
  1854  	// destination service responds with any 5xx response code, of if the
  1855  	// destination service does not respond at all, example: disconnect, reset,
  1856  	// read timeout, connection failure and refused streams. gateway-error: Similar
  1857  	// to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will
  1858  	// attempt a retry if the destination service does not respond at all
  1859  	// (disconnect/reset/read timeout) connect-failure: Proxy will retry on
  1860  	// failures connecting to destination for example due to connection timeouts.
  1861  	// retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently
  1862  	// the only retriable error supported is 409. refused-stream: Proxy will retry
  1863  	// if the destination resets the stream with a REFUSED_STREAM error code. This
  1864  	// reset type indicates that it is safe to retry.
  1865  	RetryConditions []string `json:"retryConditions,omitempty"`
  1866  	// ForceSendFields is a list of field names (e.g. "NumRetries") to
  1867  	// unconditionally include in API requests. By default, fields with empty or
  1868  	// default values are omitted from API requests. See
  1869  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1870  	// details.
  1871  	ForceSendFields []string `json:"-"`
  1872  	// NullFields is a list of field names (e.g. "NumRetries") to include in API
  1873  	// requests with the JSON null value. By default, fields with empty values are
  1874  	// omitted from API requests. See
  1875  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1876  	NullFields []string `json:"-"`
  1877  }
  1878  
  1879  func (s *HttpRouteRetryPolicy) MarshalJSON() ([]byte, error) {
  1880  	type NoMethod HttpRouteRetryPolicy
  1881  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1882  }
  1883  
  1884  // HttpRouteRouteAction: The specifications for routing traffic and applying
  1885  // associated policies.
  1886  type HttpRouteRouteAction struct {
  1887  	// CorsPolicy: The specification for allowing client side cross-origin
  1888  	// requests.
  1889  	CorsPolicy *HttpRouteCorsPolicy `json:"corsPolicy,omitempty"`
  1890  	// Destinations: The destination to which traffic should be forwarded.
  1891  	Destinations []*HttpRouteDestination `json:"destinations,omitempty"`
  1892  	// DirectResponse: Optional. Static HTTP Response object to be returned
  1893  	// regardless of the request.
  1894  	DirectResponse *HttpRouteHttpDirectResponse `json:"directResponse,omitempty"`
  1895  	// FaultInjectionPolicy: The specification for fault injection introduced into
  1896  	// traffic to test the resiliency of clients to backend service failure. As
  1897  	// part of fault injection, when clients send requests to a backend service,
  1898  	// delays can be introduced on a percentage of requests before sending those
  1899  	// requests to the backend service. Similarly requests from clients can be
  1900  	// aborted for a percentage of requests. timeout and retry_policy will be
  1901  	// ignored by clients that are configured with a fault_injection_policy
  1902  	FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"`
  1903  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  1904  	// The idle timeout is defined as the period in which there are no bytes sent
  1905  	// or received on either the upstream or downstream connection. If not set, the
  1906  	// default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.
  1907  	IdleTimeout string `json:"idleTimeout,omitempty"`
  1908  	// Redirect: If set, the request is directed as configured by this field.
  1909  	Redirect *HttpRouteRedirect `json:"redirect,omitempty"`
  1910  	// RequestHeaderModifier: The specification for modifying the headers of a
  1911  	// matching request prior to delivery of the request to the destination. If
  1912  	// HeaderModifiers are set on both the Destination and the RouteAction, they
  1913  	// will be merged. Conflicts between the two will not be resolved on the
  1914  	// configuration.
  1915  	RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"`
  1916  	// RequestMirrorPolicy: Specifies the policy on how requests intended for the
  1917  	// routes destination are shadowed to a separate mirrored destination. Proxy
  1918  	// will not wait for the shadow destination to respond before returning the
  1919  	// response. Prior to sending traffic to the shadow service, the host/authority
  1920  	// header is suffixed with -shadow.
  1921  	RequestMirrorPolicy *HttpRouteRequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"`
  1922  	// ResponseHeaderModifier: The specification for modifying the headers of a
  1923  	// response prior to sending the response back to the client. If
  1924  	// HeaderModifiers are set on both the Destination and the RouteAction, they
  1925  	// will be merged. Conflicts between the two will not be resolved on the
  1926  	// configuration.
  1927  	ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"`
  1928  	// RetryPolicy: Specifies the retry policy associated with this route.
  1929  	RetryPolicy *HttpRouteRetryPolicy `json:"retryPolicy,omitempty"`
  1930  	// StatefulSessionAffinity: Optional. Specifies cookie-based stateful session
  1931  	// affinity.
  1932  	StatefulSessionAffinity *HttpRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"`
  1933  	// Timeout: Specifies the timeout for selected route. Timeout is computed from
  1934  	// the time the request has been fully processed (i.e. end of stream) up until
  1935  	// the response has been completely processed. Timeout includes all retries.
  1936  	Timeout string `json:"timeout,omitempty"`
  1937  	// UrlRewrite: The specification for rewrite URL before forwarding requests to
  1938  	// the destination.
  1939  	UrlRewrite *HttpRouteURLRewrite `json:"urlRewrite,omitempty"`
  1940  	// ForceSendFields is a list of field names (e.g. "CorsPolicy") to
  1941  	// unconditionally include in API requests. By default, fields with empty or
  1942  	// default values are omitted from API requests. See
  1943  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1944  	// details.
  1945  	ForceSendFields []string `json:"-"`
  1946  	// NullFields is a list of field names (e.g. "CorsPolicy") to include in API
  1947  	// requests with the JSON null value. By default, fields with empty values are
  1948  	// omitted from API requests. See
  1949  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1950  	NullFields []string `json:"-"`
  1951  }
  1952  
  1953  func (s *HttpRouteRouteAction) MarshalJSON() ([]byte, error) {
  1954  	type NoMethod HttpRouteRouteAction
  1955  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1956  }
  1957  
  1958  // HttpRouteRouteMatch: RouteMatch defines specifications used to match
  1959  // requests. If multiple match types are set, this RouteMatch will match if ALL
  1960  // type of matches are matched.
  1961  type HttpRouteRouteMatch struct {
  1962  	// FullPathMatch: The HTTP request path value should exactly match this value.
  1963  	// Only one of full_path_match, prefix_match, or regex_match should be used.
  1964  	FullPathMatch string `json:"fullPathMatch,omitempty"`
  1965  	// Headers: Specifies a list of HTTP request headers to match against. ALL of
  1966  	// the supplied headers must be matched.
  1967  	Headers []*HttpRouteHeaderMatch `json:"headers,omitempty"`
  1968  	// IgnoreCase: Specifies if prefix_match and full_path_match matches are case
  1969  	// sensitive. The default value is false.
  1970  	IgnoreCase bool `json:"ignoreCase,omitempty"`
  1971  	// PrefixMatch: The HTTP request path value must begin with specified
  1972  	// prefix_match. prefix_match must begin with a /. Only one of full_path_match,
  1973  	// prefix_match, or regex_match should be used.
  1974  	PrefixMatch string `json:"prefixMatch,omitempty"`
  1975  	// QueryParameters: Specifies a list of query parameters to match against. ALL
  1976  	// of the query parameters must be matched.
  1977  	QueryParameters []*HttpRouteQueryParameterMatch `json:"queryParameters,omitempty"`
  1978  	// RegexMatch: The HTTP request path value must satisfy the regular expression
  1979  	// specified by regex_match after removing any query parameters and anchor
  1980  	// supplied with the original URL. For regular expression grammar, please see
  1981  	// https://github.com/google/re2/wiki/Syntax Only one of full_path_match,
  1982  	// prefix_match, or regex_match should be used.
  1983  	RegexMatch string `json:"regexMatch,omitempty"`
  1984  	// ForceSendFields is a list of field names (e.g. "FullPathMatch") to
  1985  	// unconditionally include in API requests. By default, fields with empty or
  1986  	// default values are omitted from API requests. See
  1987  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1988  	// details.
  1989  	ForceSendFields []string `json:"-"`
  1990  	// NullFields is a list of field names (e.g. "FullPathMatch") to include in API
  1991  	// requests with the JSON null value. By default, fields with empty values are
  1992  	// omitted from API requests. See
  1993  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1994  	NullFields []string `json:"-"`
  1995  }
  1996  
  1997  func (s *HttpRouteRouteMatch) MarshalJSON() ([]byte, error) {
  1998  	type NoMethod HttpRouteRouteMatch
  1999  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2000  }
  2001  
  2002  // HttpRouteRouteRule: Specifies how to match traffic and how to route traffic
  2003  // when traffic is matched.
  2004  type HttpRouteRouteRule struct {
  2005  	// Action: The detailed rule defining how to route matched traffic.
  2006  	Action *HttpRouteRouteAction `json:"action,omitempty"`
  2007  	// Matches: A list of matches define conditions used for matching the rule
  2008  	// against incoming HTTP requests. Each match is independent, i.e. this rule
  2009  	// will be matched if ANY one of the matches is satisfied. If no matches field
  2010  	// is specified, this rule will unconditionally match traffic. If a default
  2011  	// rule is desired to be configured, add a rule with no matches specified to
  2012  	// the end of the rules list.
  2013  	Matches []*HttpRouteRouteMatch `json:"matches,omitempty"`
  2014  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  2015  	// include in API requests. By default, fields with empty or default values are
  2016  	// omitted from API requests. See
  2017  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2018  	// details.
  2019  	ForceSendFields []string `json:"-"`
  2020  	// NullFields is a list of field names (e.g. "Action") to include in API
  2021  	// requests with the JSON null value. By default, fields with empty values are
  2022  	// omitted from API requests. See
  2023  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2024  	NullFields []string `json:"-"`
  2025  }
  2026  
  2027  func (s *HttpRouteRouteRule) MarshalJSON() ([]byte, error) {
  2028  	type NoMethod HttpRouteRouteRule
  2029  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2030  }
  2031  
  2032  // HttpRouteStatefulSessionAffinityPolicy: The specification for cookie-based
  2033  // stateful session affinity where the date plane supplies a “session
  2034  // cookie” with the name "GSSA" which encodes a specific destination host and
  2035  // each request containing that cookie will be directed to that host as long as
  2036  // the destination host remains up and healthy. The gRPC proxyless mesh library
  2037  // or sidecar proxy will manage the session cookie but the client application
  2038  // code is responsible for copying the cookie from each RPC in the session to
  2039  // the next.
  2040  type HttpRouteStatefulSessionAffinityPolicy struct {
  2041  	// CookieTtl: Required. The cookie TTL value for the Set-Cookie header
  2042  	// generated by the data plane. The lifetime of the cookie may be set to a
  2043  	// value from 1 to 86400 seconds (24 hours) inclusive.
  2044  	CookieTtl string `json:"cookieTtl,omitempty"`
  2045  	// ForceSendFields is a list of field names (e.g. "CookieTtl") to
  2046  	// unconditionally include in API requests. By default, fields with empty or
  2047  	// default values are omitted from API requests. See
  2048  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2049  	// details.
  2050  	ForceSendFields []string `json:"-"`
  2051  	// NullFields is a list of field names (e.g. "CookieTtl") to include in API
  2052  	// requests with the JSON null value. By default, fields with empty values are
  2053  	// omitted from API requests. See
  2054  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2055  	NullFields []string `json:"-"`
  2056  }
  2057  
  2058  func (s *HttpRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) {
  2059  	type NoMethod HttpRouteStatefulSessionAffinityPolicy
  2060  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2061  }
  2062  
  2063  // HttpRouteURLRewrite: The specification for modifying the URL of the request,
  2064  // prior to forwarding the request to the destination.
  2065  type HttpRouteURLRewrite struct {
  2066  	// HostRewrite: Prior to forwarding the request to the selected destination,
  2067  	// the requests host header is replaced by this value.
  2068  	HostRewrite string `json:"hostRewrite,omitempty"`
  2069  	// PathPrefixRewrite: Prior to forwarding the request to the selected
  2070  	// destination, the matching portion of the requests path is replaced by this
  2071  	// value.
  2072  	PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"`
  2073  	// ForceSendFields is a list of field names (e.g. "HostRewrite") to
  2074  	// unconditionally include in API requests. By default, fields with empty or
  2075  	// default values are omitted from API requests. See
  2076  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2077  	// details.
  2078  	ForceSendFields []string `json:"-"`
  2079  	// NullFields is a list of field names (e.g. "HostRewrite") to include in API
  2080  	// requests with the JSON null value. By default, fields with empty values are
  2081  	// omitted from API requests. See
  2082  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2083  	NullFields []string `json:"-"`
  2084  }
  2085  
  2086  func (s *HttpRouteURLRewrite) MarshalJSON() ([]byte, error) {
  2087  	type NoMethod HttpRouteURLRewrite
  2088  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2089  }
  2090  
  2091  // LbRouteExtension: `LbRouteExtension` is a resource that lets you control
  2092  // where traffic is routed to for a given request.
  2093  type LbRouteExtension struct {
  2094  	// CreateTime: Output only. The timestamp when the resource was created.
  2095  	CreateTime string `json:"createTime,omitempty"`
  2096  	// Description: Optional. A human-readable description of the resource.
  2097  	Description string `json:"description,omitempty"`
  2098  	// ExtensionChains: Required. A set of ordered extension chains that contain
  2099  	// the match conditions and extensions to execute. Match conditions for each
  2100  	// extension chain are evaluated in sequence for a given request. The first
  2101  	// extension chain that has a condition that matches the request is executed.
  2102  	// Any subsequent extension chains do not execute. Limited to 5 extension
  2103  	// chains per resource.
  2104  	ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"`
  2105  	// ForwardingRules: Required. A list of references to the forwarding rules to
  2106  	// which this service extension is attached to. At least one forwarding rule is
  2107  	// required. There can be only one `LbRouteExtension` resource per forwarding
  2108  	// rule.
  2109  	ForwardingRules []string `json:"forwardingRules,omitempty"`
  2110  	// Labels: Optional. Set of labels associated with the `LbRouteExtension`
  2111  	// resource. The format must comply with the requirements for labels
  2112  	// (https://cloud.google.com/compute/docs/labeling-resources#requirements) for
  2113  	// Google Cloud resources.
  2114  	Labels map[string]string `json:"labels,omitempty"`
  2115  	// LoadBalancingScheme: Required. All backend services and forwarding rules
  2116  	// referenced by this extension must share the same load balancing scheme.
  2117  	// Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more
  2118  	// information, refer to Choosing a load balancer
  2119  	// (https://cloud.google.com/load-balancing/docs/backend-service).
  2120  	//
  2121  	// Possible values:
  2122  	//   "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use.
  2123  	//   "INTERNAL_MANAGED" - Signifies that this is used for Internal HTTP(S) Load
  2124  	// Balancing.
  2125  	//   "EXTERNAL_MANAGED" - Signifies that this is used for External Managed
  2126  	// HTTP(S) Load Balancing.
  2127  	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
  2128  	// Name: Required. Identifier. Name of the `LbRouteExtension` resource in the
  2129  	// following format:
  2130  	// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extensio
  2131  	// n}`.
  2132  	Name string `json:"name,omitempty"`
  2133  	// UpdateTime: Output only. The timestamp when the resource was updated.
  2134  	UpdateTime string `json:"updateTime,omitempty"`
  2135  
  2136  	// ServerResponse contains the HTTP response code and headers from the server.
  2137  	googleapi.ServerResponse `json:"-"`
  2138  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2139  	// unconditionally include in API requests. By default, fields with empty or
  2140  	// default values are omitted from API requests. See
  2141  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2142  	// details.
  2143  	ForceSendFields []string `json:"-"`
  2144  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2145  	// requests with the JSON null value. By default, fields with empty values are
  2146  	// omitted from API requests. See
  2147  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2148  	NullFields []string `json:"-"`
  2149  }
  2150  
  2151  func (s *LbRouteExtension) MarshalJSON() ([]byte, error) {
  2152  	type NoMethod LbRouteExtension
  2153  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2154  }
  2155  
  2156  // LbTrafficExtension: `LbTrafficExtension` is a resource that lets the
  2157  // extension service modify the headers and payloads of both requests and
  2158  // responses without impacting the choice of backend services or any other
  2159  // security policies associated with the backend service.
  2160  type LbTrafficExtension struct {
  2161  	// CreateTime: Output only. The timestamp when the resource was created.
  2162  	CreateTime string `json:"createTime,omitempty"`
  2163  	// Description: Optional. A human-readable description of the resource.
  2164  	Description string `json:"description,omitempty"`
  2165  	// ExtensionChains: Required. A set of ordered extension chains that contain
  2166  	// the match conditions and extensions to execute. Match conditions for each
  2167  	// extension chain are evaluated in sequence for a given request. The first
  2168  	// extension chain that has a condition that matches the request is executed.
  2169  	// Any subsequent extension chains do not execute. Limited to 5 extension
  2170  	// chains per resource.
  2171  	ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"`
  2172  	// ForwardingRules: Required. A list of references to the forwarding rules to
  2173  	// which this service extension is attached to. At least one forwarding rule is
  2174  	// required. There can be only one `LBTrafficExtension` resource per forwarding
  2175  	// rule.
  2176  	ForwardingRules []string `json:"forwardingRules,omitempty"`
  2177  	// Labels: Optional. Set of labels associated with the `LbTrafficExtension`
  2178  	// resource. The format must comply with the requirements for labels
  2179  	// (https://cloud.google.com/compute/docs/labeling-resources#requirements) for
  2180  	// Google Cloud resources.
  2181  	Labels map[string]string `json:"labels,omitempty"`
  2182  	// LoadBalancingScheme: Required. All backend services and forwarding rules
  2183  	// referenced by this extension must share the same load balancing scheme.
  2184  	// Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more
  2185  	// information, refer to Choosing a load balancer
  2186  	// (https://cloud.google.com/load-balancing/docs/backend-service).
  2187  	//
  2188  	// Possible values:
  2189  	//   "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use.
  2190  	//   "INTERNAL_MANAGED" - Signifies that this is used for Internal HTTP(S) Load
  2191  	// Balancing.
  2192  	//   "EXTERNAL_MANAGED" - Signifies that this is used for External Managed
  2193  	// HTTP(S) Load Balancing.
  2194  	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
  2195  	// Name: Required. Identifier. Name of the `LbTrafficExtension` resource in the
  2196  	// following format:
  2197  	// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_exte
  2198  	// nsion}`.
  2199  	Name string `json:"name,omitempty"`
  2200  	// UpdateTime: Output only. The timestamp when the resource was updated.
  2201  	UpdateTime string `json:"updateTime,omitempty"`
  2202  
  2203  	// ServerResponse contains the HTTP response code and headers from the server.
  2204  	googleapi.ServerResponse `json:"-"`
  2205  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2206  	// unconditionally include in API requests. By default, fields with empty or
  2207  	// default values are omitted from API requests. See
  2208  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2209  	// details.
  2210  	ForceSendFields []string `json:"-"`
  2211  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2212  	// requests with the JSON null value. By default, fields with empty values are
  2213  	// omitted from API requests. See
  2214  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2215  	NullFields []string `json:"-"`
  2216  }
  2217  
  2218  func (s *LbTrafficExtension) MarshalJSON() ([]byte, error) {
  2219  	type NoMethod LbTrafficExtension
  2220  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2221  }
  2222  
  2223  // ListEndpointPoliciesResponse: Response returned by the ListEndpointPolicies
  2224  // method.
  2225  type ListEndpointPoliciesResponse struct {
  2226  	// EndpointPolicies: List of EndpointPolicy resources.
  2227  	EndpointPolicies []*EndpointPolicy `json:"endpointPolicies,omitempty"`
  2228  	// NextPageToken: If there might be more results than those appearing in this
  2229  	// response, then `next_page_token` is included. To get the next set of
  2230  	// results, call this method again using the value of `next_page_token` as
  2231  	// `page_token`.
  2232  	NextPageToken string `json:"nextPageToken,omitempty"`
  2233  
  2234  	// ServerResponse contains the HTTP response code and headers from the server.
  2235  	googleapi.ServerResponse `json:"-"`
  2236  	// ForceSendFields is a list of field names (e.g. "EndpointPolicies") to
  2237  	// unconditionally include in API requests. By default, fields with empty or
  2238  	// default values are omitted from API requests. See
  2239  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2240  	// details.
  2241  	ForceSendFields []string `json:"-"`
  2242  	// NullFields is a list of field names (e.g. "EndpointPolicies") to include in
  2243  	// API requests with the JSON null value. By default, fields with empty values
  2244  	// are omitted from API requests. See
  2245  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2246  	NullFields []string `json:"-"`
  2247  }
  2248  
  2249  func (s *ListEndpointPoliciesResponse) MarshalJSON() ([]byte, error) {
  2250  	type NoMethod ListEndpointPoliciesResponse
  2251  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2252  }
  2253  
  2254  // ListGatewaysResponse: Response returned by the ListGateways method.
  2255  type ListGatewaysResponse struct {
  2256  	// Gateways: List of Gateway resources.
  2257  	Gateways []*Gateway `json:"gateways,omitempty"`
  2258  	// NextPageToken: If there might be more results than those appearing in this
  2259  	// response, then `next_page_token` is included. To get the next set of
  2260  	// results, call this method again using the value of `next_page_token` as
  2261  	// `page_token`.
  2262  	NextPageToken string `json:"nextPageToken,omitempty"`
  2263  	// Unreachable: Locations that could not be reached.
  2264  	Unreachable []string `json:"unreachable,omitempty"`
  2265  
  2266  	// ServerResponse contains the HTTP response code and headers from the server.
  2267  	googleapi.ServerResponse `json:"-"`
  2268  	// ForceSendFields is a list of field names (e.g. "Gateways") to
  2269  	// unconditionally include in API requests. By default, fields with empty or
  2270  	// default values are omitted from API requests. See
  2271  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2272  	// details.
  2273  	ForceSendFields []string `json:"-"`
  2274  	// NullFields is a list of field names (e.g. "Gateways") to include in API
  2275  	// requests with the JSON null value. By default, fields with empty values are
  2276  	// omitted from API requests. See
  2277  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2278  	NullFields []string `json:"-"`
  2279  }
  2280  
  2281  func (s *ListGatewaysResponse) MarshalJSON() ([]byte, error) {
  2282  	type NoMethod ListGatewaysResponse
  2283  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2284  }
  2285  
  2286  // ListGrpcRoutesResponse: Response returned by the ListGrpcRoutes method.
  2287  type ListGrpcRoutesResponse struct {
  2288  	// GrpcRoutes: List of GrpcRoute resources.
  2289  	GrpcRoutes []*GrpcRoute `json:"grpcRoutes,omitempty"`
  2290  	// NextPageToken: If there might be more results than those appearing in this
  2291  	// response, then `next_page_token` is included. To get the next set of
  2292  	// results, call this method again using the value of `next_page_token` as
  2293  	// `page_token`.
  2294  	NextPageToken string `json:"nextPageToken,omitempty"`
  2295  
  2296  	// ServerResponse contains the HTTP response code and headers from the server.
  2297  	googleapi.ServerResponse `json:"-"`
  2298  	// ForceSendFields is a list of field names (e.g. "GrpcRoutes") to
  2299  	// unconditionally include in API requests. By default, fields with empty or
  2300  	// default values are omitted from API requests. See
  2301  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2302  	// details.
  2303  	ForceSendFields []string `json:"-"`
  2304  	// NullFields is a list of field names (e.g. "GrpcRoutes") to include in API
  2305  	// requests with the JSON null value. By default, fields with empty values are
  2306  	// omitted from API requests. See
  2307  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2308  	NullFields []string `json:"-"`
  2309  }
  2310  
  2311  func (s *ListGrpcRoutesResponse) MarshalJSON() ([]byte, error) {
  2312  	type NoMethod ListGrpcRoutesResponse
  2313  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2314  }
  2315  
  2316  // ListHttpRoutesResponse: Response returned by the ListHttpRoutes method.
  2317  type ListHttpRoutesResponse struct {
  2318  	// HttpRoutes: List of HttpRoute resources.
  2319  	HttpRoutes []*HttpRoute `json:"httpRoutes,omitempty"`
  2320  	// NextPageToken: If there might be more results than those appearing in this
  2321  	// response, then `next_page_token` is included. To get the next set of
  2322  	// results, call this method again using the value of `next_page_token` as
  2323  	// `page_token`.
  2324  	NextPageToken string `json:"nextPageToken,omitempty"`
  2325  
  2326  	// ServerResponse contains the HTTP response code and headers from the server.
  2327  	googleapi.ServerResponse `json:"-"`
  2328  	// ForceSendFields is a list of field names (e.g. "HttpRoutes") to
  2329  	// unconditionally include in API requests. By default, fields with empty or
  2330  	// default values are omitted from API requests. See
  2331  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2332  	// details.
  2333  	ForceSendFields []string `json:"-"`
  2334  	// NullFields is a list of field names (e.g. "HttpRoutes") to include in API
  2335  	// requests with the JSON null value. By default, fields with empty values are
  2336  	// omitted from API requests. See
  2337  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2338  	NullFields []string `json:"-"`
  2339  }
  2340  
  2341  func (s *ListHttpRoutesResponse) MarshalJSON() ([]byte, error) {
  2342  	type NoMethod ListHttpRoutesResponse
  2343  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2344  }
  2345  
  2346  // ListLbRouteExtensionsResponse: Message for response to listing
  2347  // `LbRouteExtension` resources.
  2348  type ListLbRouteExtensionsResponse struct {
  2349  	// LbRouteExtensions: The list of `LbRouteExtension` resources.
  2350  	LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"`
  2351  	// NextPageToken: A token identifying a page of results that the server
  2352  	// returns.
  2353  	NextPageToken string `json:"nextPageToken,omitempty"`
  2354  	// Unreachable: Locations that could not be reached.
  2355  	Unreachable []string `json:"unreachable,omitempty"`
  2356  
  2357  	// ServerResponse contains the HTTP response code and headers from the server.
  2358  	googleapi.ServerResponse `json:"-"`
  2359  	// ForceSendFields is a list of field names (e.g. "LbRouteExtensions") to
  2360  	// unconditionally include in API requests. By default, fields with empty or
  2361  	// default values are omitted from API requests. See
  2362  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2363  	// details.
  2364  	ForceSendFields []string `json:"-"`
  2365  	// NullFields is a list of field names (e.g. "LbRouteExtensions") to include in
  2366  	// API requests with the JSON null value. By default, fields with empty values
  2367  	// are omitted from API requests. See
  2368  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2369  	NullFields []string `json:"-"`
  2370  }
  2371  
  2372  func (s *ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) {
  2373  	type NoMethod ListLbRouteExtensionsResponse
  2374  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2375  }
  2376  
  2377  // ListLbTrafficExtensionsResponse: Message for response to listing
  2378  // `LbTrafficExtension` resources.
  2379  type ListLbTrafficExtensionsResponse struct {
  2380  	// LbTrafficExtensions: The list of `LbTrafficExtension` resources.
  2381  	LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"`
  2382  	// NextPageToken: A token identifying a page of results that the server
  2383  	// returns.
  2384  	NextPageToken string `json:"nextPageToken,omitempty"`
  2385  	// Unreachable: Locations that could not be reached.
  2386  	Unreachable []string `json:"unreachable,omitempty"`
  2387  
  2388  	// ServerResponse contains the HTTP response code and headers from the server.
  2389  	googleapi.ServerResponse `json:"-"`
  2390  	// ForceSendFields is a list of field names (e.g. "LbTrafficExtensions") to
  2391  	// unconditionally include in API requests. By default, fields with empty or
  2392  	// default values are omitted from API requests. See
  2393  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2394  	// details.
  2395  	ForceSendFields []string `json:"-"`
  2396  	// NullFields is a list of field names (e.g. "LbTrafficExtensions") to include
  2397  	// in API requests with the JSON null value. By default, fields with empty
  2398  	// values are omitted from API requests. See
  2399  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2400  	NullFields []string `json:"-"`
  2401  }
  2402  
  2403  func (s *ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) {
  2404  	type NoMethod ListLbTrafficExtensionsResponse
  2405  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2406  }
  2407  
  2408  // ListLocationsResponse: The response message for Locations.ListLocations.
  2409  type ListLocationsResponse struct {
  2410  	// Locations: A list of locations that matches the specified filter in the
  2411  	// request.
  2412  	Locations []*Location `json:"locations,omitempty"`
  2413  	// NextPageToken: The standard List next-page token.
  2414  	NextPageToken string `json:"nextPageToken,omitempty"`
  2415  
  2416  	// ServerResponse contains the HTTP response code and headers from the server.
  2417  	googleapi.ServerResponse `json:"-"`
  2418  	// ForceSendFields is a list of field names (e.g. "Locations") to
  2419  	// unconditionally include in API requests. By default, fields with empty or
  2420  	// default values are omitted from API requests. See
  2421  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2422  	// details.
  2423  	ForceSendFields []string `json:"-"`
  2424  	// NullFields is a list of field names (e.g. "Locations") to include in API
  2425  	// requests with the JSON null value. By default, fields with empty values are
  2426  	// omitted from API requests. See
  2427  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2428  	NullFields []string `json:"-"`
  2429  }
  2430  
  2431  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  2432  	type NoMethod ListLocationsResponse
  2433  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2434  }
  2435  
  2436  // ListMeshesResponse: Response returned by the ListMeshes method.
  2437  type ListMeshesResponse struct {
  2438  	// Meshes: List of Mesh resources.
  2439  	Meshes []*Mesh `json:"meshes,omitempty"`
  2440  	// NextPageToken: If there might be more results than those appearing in this
  2441  	// response, then `next_page_token` is included. To get the next set of
  2442  	// results, call this method again using the value of `next_page_token` as
  2443  	// `page_token`.
  2444  	NextPageToken string `json:"nextPageToken,omitempty"`
  2445  
  2446  	// ServerResponse contains the HTTP response code and headers from the server.
  2447  	googleapi.ServerResponse `json:"-"`
  2448  	// ForceSendFields is a list of field names (e.g. "Meshes") to unconditionally
  2449  	// include in API requests. By default, fields with empty or default values are
  2450  	// omitted from API requests. See
  2451  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2452  	// details.
  2453  	ForceSendFields []string `json:"-"`
  2454  	// NullFields is a list of field names (e.g. "Meshes") to include in API
  2455  	// requests with the JSON null value. By default, fields with empty values are
  2456  	// omitted from API requests. See
  2457  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2458  	NullFields []string `json:"-"`
  2459  }
  2460  
  2461  func (s *ListMeshesResponse) MarshalJSON() ([]byte, error) {
  2462  	type NoMethod ListMeshesResponse
  2463  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2464  }
  2465  
  2466  // ListOperationsResponse: The response message for Operations.ListOperations.
  2467  type ListOperationsResponse struct {
  2468  	// NextPageToken: The standard List next-page token.
  2469  	NextPageToken string `json:"nextPageToken,omitempty"`
  2470  	// Operations: A list of operations that matches the specified filter in the
  2471  	// request.
  2472  	Operations []*Operation `json:"operations,omitempty"`
  2473  
  2474  	// ServerResponse contains the HTTP response code and headers from the server.
  2475  	googleapi.ServerResponse `json:"-"`
  2476  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2477  	// unconditionally include in API requests. By default, fields with empty or
  2478  	// default values are omitted from API requests. See
  2479  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2480  	// details.
  2481  	ForceSendFields []string `json:"-"`
  2482  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2483  	// requests with the JSON null value. By default, fields with empty values are
  2484  	// omitted from API requests. See
  2485  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2486  	NullFields []string `json:"-"`
  2487  }
  2488  
  2489  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  2490  	type NoMethod ListOperationsResponse
  2491  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2492  }
  2493  
  2494  // ListServiceBindingsResponse: Response returned by the ListServiceBindings
  2495  // method.
  2496  type ListServiceBindingsResponse struct {
  2497  	// NextPageToken: If there might be more results than those appearing in this
  2498  	// response, then `next_page_token` is included. To get the next set of
  2499  	// results, call this method again using the value of `next_page_token` as
  2500  	// `page_token`.
  2501  	NextPageToken string `json:"nextPageToken,omitempty"`
  2502  	// ServiceBindings: List of ServiceBinding resources.
  2503  	ServiceBindings []*ServiceBinding `json:"serviceBindings,omitempty"`
  2504  
  2505  	// ServerResponse contains the HTTP response code and headers from the server.
  2506  	googleapi.ServerResponse `json:"-"`
  2507  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2508  	// unconditionally include in API requests. By default, fields with empty or
  2509  	// default values are omitted from API requests. See
  2510  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2511  	// details.
  2512  	ForceSendFields []string `json:"-"`
  2513  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2514  	// requests with the JSON null value. By default, fields with empty values are
  2515  	// omitted from API requests. See
  2516  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2517  	NullFields []string `json:"-"`
  2518  }
  2519  
  2520  func (s *ListServiceBindingsResponse) MarshalJSON() ([]byte, error) {
  2521  	type NoMethod ListServiceBindingsResponse
  2522  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2523  }
  2524  
  2525  // ListServiceLbPoliciesResponse: Response returned by the
  2526  // ListServiceLbPolicies method.
  2527  type ListServiceLbPoliciesResponse struct {
  2528  	// NextPageToken: If there might be more results than those appearing in this
  2529  	// response, then `next_page_token` is included. To get the next set of
  2530  	// results, call this method again using the value of `next_page_token` as
  2531  	// `page_token`.
  2532  	NextPageToken string `json:"nextPageToken,omitempty"`
  2533  	// ServiceLbPolicies: List of ServiceLbPolicy resources.
  2534  	ServiceLbPolicies []*ServiceLbPolicy `json:"serviceLbPolicies,omitempty"`
  2535  
  2536  	// ServerResponse contains the HTTP response code and headers from the server.
  2537  	googleapi.ServerResponse `json:"-"`
  2538  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2539  	// unconditionally include in API requests. By default, fields with empty or
  2540  	// default values are omitted from API requests. See
  2541  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2542  	// details.
  2543  	ForceSendFields []string `json:"-"`
  2544  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2545  	// requests with the JSON null value. By default, fields with empty values are
  2546  	// omitted from API requests. See
  2547  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2548  	NullFields []string `json:"-"`
  2549  }
  2550  
  2551  func (s *ListServiceLbPoliciesResponse) MarshalJSON() ([]byte, error) {
  2552  	type NoMethod ListServiceLbPoliciesResponse
  2553  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2554  }
  2555  
  2556  // ListTcpRoutesResponse: Response returned by the ListTcpRoutes method.
  2557  type ListTcpRoutesResponse struct {
  2558  	// NextPageToken: If there might be more results than those appearing in this
  2559  	// response, then `next_page_token` is included. To get the next set of
  2560  	// results, call this method again using the value of `next_page_token` as
  2561  	// `page_token`.
  2562  	NextPageToken string `json:"nextPageToken,omitempty"`
  2563  	// TcpRoutes: List of TcpRoute resources.
  2564  	TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"`
  2565  
  2566  	// ServerResponse contains the HTTP response code and headers from the server.
  2567  	googleapi.ServerResponse `json:"-"`
  2568  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2569  	// unconditionally include in API requests. By default, fields with empty or
  2570  	// default values are omitted from API requests. See
  2571  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2572  	// details.
  2573  	ForceSendFields []string `json:"-"`
  2574  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2575  	// requests with the JSON null value. By default, fields with empty values are
  2576  	// omitted from API requests. See
  2577  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2578  	NullFields []string `json:"-"`
  2579  }
  2580  
  2581  func (s *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) {
  2582  	type NoMethod ListTcpRoutesResponse
  2583  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2584  }
  2585  
  2586  // ListTlsRoutesResponse: Response returned by the ListTlsRoutes method.
  2587  type ListTlsRoutesResponse struct {
  2588  	// NextPageToken: If there might be more results than those appearing in this
  2589  	// response, then `next_page_token` is included. To get the next set of
  2590  	// results, call this method again using the value of `next_page_token` as
  2591  	// `page_token`.
  2592  	NextPageToken string `json:"nextPageToken,omitempty"`
  2593  	// TlsRoutes: List of TlsRoute resources.
  2594  	TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"`
  2595  
  2596  	// ServerResponse contains the HTTP response code and headers from the server.
  2597  	googleapi.ServerResponse `json:"-"`
  2598  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2599  	// unconditionally include in API requests. By default, fields with empty or
  2600  	// default values are omitted from API requests. See
  2601  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2602  	// details.
  2603  	ForceSendFields []string `json:"-"`
  2604  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2605  	// requests with the JSON null value. By default, fields with empty values are
  2606  	// omitted from API requests. See
  2607  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2608  	NullFields []string `json:"-"`
  2609  }
  2610  
  2611  func (s *ListTlsRoutesResponse) MarshalJSON() ([]byte, error) {
  2612  	type NoMethod ListTlsRoutesResponse
  2613  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2614  }
  2615  
  2616  // Location: A resource that represents a Google Cloud location.
  2617  type Location struct {
  2618  	// DisplayName: The friendly name for this location, typically a nearby city
  2619  	// name. For example, "Tokyo".
  2620  	DisplayName string `json:"displayName,omitempty"`
  2621  	// Labels: Cross-service attributes for the location. For example
  2622  	// {"cloud.googleapis.com/region": "us-east1"}
  2623  	Labels map[string]string `json:"labels,omitempty"`
  2624  	// LocationId: The canonical id for this location. For example: "us-east1".
  2625  	LocationId string `json:"locationId,omitempty"`
  2626  	// Metadata: Service-specific metadata. For example the available capacity at
  2627  	// the given location.
  2628  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2629  	// Name: Resource name for the location, which may vary between
  2630  	// implementations. For example:
  2631  	// "projects/example-project/locations/us-east1"
  2632  	Name string `json:"name,omitempty"`
  2633  
  2634  	// ServerResponse contains the HTTP response code and headers from the server.
  2635  	googleapi.ServerResponse `json:"-"`
  2636  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  2637  	// unconditionally include in API requests. By default, fields with empty or
  2638  	// default values are omitted from API requests. See
  2639  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2640  	// details.
  2641  	ForceSendFields []string `json:"-"`
  2642  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  2643  	// requests with the JSON null value. By default, fields with empty values are
  2644  	// omitted from API requests. See
  2645  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2646  	NullFields []string `json:"-"`
  2647  }
  2648  
  2649  func (s *Location) MarshalJSON() ([]byte, error) {
  2650  	type NoMethod Location
  2651  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2652  }
  2653  
  2654  // Mesh: Mesh represents a logical configuration grouping for workload to
  2655  // workload communication within a service mesh. Routes that point to mesh
  2656  // dictate how requests are routed within this logical mesh boundary.
  2657  type Mesh struct {
  2658  	// CreateTime: Output only. The timestamp when the resource was created.
  2659  	CreateTime string `json:"createTime,omitempty"`
  2660  	// Description: Optional. A free-text description of the resource. Max length
  2661  	// 1024 characters.
  2662  	Description string `json:"description,omitempty"`
  2663  	// EnvoyHeaders: Optional. Determines if envoy will insert internal debug
  2664  	// headers into upstream requests. Other Envoy headers may still be injected.
  2665  	// By default, envoy will not insert any debug headers.
  2666  	//
  2667  	// Possible values:
  2668  	//   "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE.
  2669  	//   "NONE" - Suppress envoy debug headers.
  2670  	//   "DEBUG_HEADERS" - Envoy will insert default internal debug headers into
  2671  	// upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry
  2672  	// x-envoy-expected-rq-timeout-ms x-envoy-original-path
  2673  	// x-envoy-upstream-stream-duration-ms
  2674  	EnvoyHeaders string `json:"envoyHeaders,omitempty"`
  2675  	// InterceptionPort: Optional. If set to a valid TCP port (1-65535), instructs
  2676  	// the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1)
  2677  	// address. The SIDECAR proxy will expect all traffic to be redirected to this
  2678  	// port regardless of its actual ip:port destination. If unset, a port '15001'
  2679  	// is used as the interception port. This is applicable only for sidecar proxy
  2680  	// deployments.
  2681  	InterceptionPort int64 `json:"interceptionPort,omitempty"`
  2682  	// Labels: Optional. Set of label tags associated with the Mesh resource.
  2683  	Labels map[string]string `json:"labels,omitempty"`
  2684  	// Name: Required. Name of the Mesh resource. It matches pattern
  2685  	// `projects/*/locations/global/meshes/`.
  2686  	Name string `json:"name,omitempty"`
  2687  	// SelfLink: Output only. Server-defined URL of this resource
  2688  	SelfLink string `json:"selfLink,omitempty"`
  2689  	// UpdateTime: Output only. The timestamp when the resource was updated.
  2690  	UpdateTime string `json:"updateTime,omitempty"`
  2691  
  2692  	// ServerResponse contains the HTTP response code and headers from the server.
  2693  	googleapi.ServerResponse `json:"-"`
  2694  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2695  	// unconditionally include in API requests. By default, fields with empty or
  2696  	// default values are omitted from API requests. See
  2697  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2698  	// details.
  2699  	ForceSendFields []string `json:"-"`
  2700  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2701  	// requests with the JSON null value. By default, fields with empty values are
  2702  	// omitted from API requests. See
  2703  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2704  	NullFields []string `json:"-"`
  2705  }
  2706  
  2707  func (s *Mesh) MarshalJSON() ([]byte, error) {
  2708  	type NoMethod Mesh
  2709  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2710  }
  2711  
  2712  // MetadataLabelMatcher: The matcher that is based on node metadata presented
  2713  // by xDS clients.
  2714  type MetadataLabelMatcher struct {
  2715  	// MetadataLabelMatchCriteria: Specifies how matching should be done. Supported
  2716  	// values are: MATCH_ANY: At least one of the Labels specified in the matcher
  2717  	// should match the metadata presented by xDS client. MATCH_ALL: The metadata
  2718  	// presented by the xDS client should contain all of the labels specified here.
  2719  	// The selection is determined based on the best match. For example, suppose
  2720  	// there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the
  2721  	// matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client
  2722  	// with label connects, the config from P1 will be selected. If a client with
  2723  	// label connects, the config from P2 will be selected. If a client with label
  2724  	// connects, the config from P3 will be selected. If there is more than one
  2725  	// best match, (for example, if a config P4 with selector exists and if a
  2726  	// client with label connects), pick up the one with older creation time.
  2727  	//
  2728  	// Possible values:
  2729  	//   "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED" - Default value. Should not be
  2730  	// used.
  2731  	//   "MATCH_ANY" - At least one of the Labels specified in the matcher should
  2732  	// match the metadata presented by xDS client.
  2733  	//   "MATCH_ALL" - The metadata presented by the xDS client should contain all
  2734  	// of the labels specified here.
  2735  	MetadataLabelMatchCriteria string `json:"metadataLabelMatchCriteria,omitempty"`
  2736  	// MetadataLabels: The list of label value pairs that must match labels in the
  2737  	// provided metadata based on filterMatchCriteria This list can have at most 64
  2738  	// entries. The list can be empty if the match criteria is MATCH_ANY, to
  2739  	// specify a wildcard match (i.e this matches any client).
  2740  	MetadataLabels []*MetadataLabels `json:"metadataLabels,omitempty"`
  2741  	// ForceSendFields is a list of field names (e.g. "MetadataLabelMatchCriteria")
  2742  	// to unconditionally include in API requests. By default, fields with empty or
  2743  	// default values are omitted from API requests. See
  2744  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2745  	// details.
  2746  	ForceSendFields []string `json:"-"`
  2747  	// NullFields is a list of field names (e.g. "MetadataLabelMatchCriteria") to
  2748  	// include in API requests with the JSON null value. By default, fields with
  2749  	// empty values are omitted from API requests. See
  2750  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2751  	NullFields []string `json:"-"`
  2752  }
  2753  
  2754  func (s *MetadataLabelMatcher) MarshalJSON() ([]byte, error) {
  2755  	type NoMethod MetadataLabelMatcher
  2756  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2757  }
  2758  
  2759  // MetadataLabels: Defines a name-pair value for a single label.
  2760  type MetadataLabels struct {
  2761  	// LabelName: Required. Label name presented as key in xDS Node Metadata.
  2762  	LabelName string `json:"labelName,omitempty"`
  2763  	// LabelValue: Required. Label value presented as value corresponding to the
  2764  	// above key, in xDS Node Metadata.
  2765  	LabelValue string `json:"labelValue,omitempty"`
  2766  	// ForceSendFields is a list of field names (e.g. "LabelName") to
  2767  	// unconditionally include in API requests. By default, fields with empty or
  2768  	// default values are omitted from API requests. See
  2769  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2770  	// details.
  2771  	ForceSendFields []string `json:"-"`
  2772  	// NullFields is a list of field names (e.g. "LabelName") to include in API
  2773  	// requests with the JSON null value. By default, fields with empty values are
  2774  	// omitted from API requests. See
  2775  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2776  	NullFields []string `json:"-"`
  2777  }
  2778  
  2779  func (s *MetadataLabels) MarshalJSON() ([]byte, error) {
  2780  	type NoMethod MetadataLabels
  2781  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2782  }
  2783  
  2784  // Operation: This resource represents a long-running operation that is the
  2785  // result of a network API call.
  2786  type Operation struct {
  2787  	// Done: If the value is `false`, it means the operation is still in progress.
  2788  	// If `true`, the operation is completed, and either `error` or `response` is
  2789  	// available.
  2790  	Done bool `json:"done,omitempty"`
  2791  	// Error: The error result of the operation in case of failure or cancellation.
  2792  	Error *Status `json:"error,omitempty"`
  2793  	// Metadata: Service-specific metadata associated with the operation. It
  2794  	// typically contains progress information and common metadata such as create
  2795  	// time. Some services might not provide such metadata. Any method that returns
  2796  	// a long-running operation should document the metadata type, if any.
  2797  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2798  	// Name: The server-assigned name, which is only unique within the same service
  2799  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2800  	// should be a resource name ending with `operations/{unique_id}`.
  2801  	Name string `json:"name,omitempty"`
  2802  	// Response: The normal, successful response of the operation. If the original
  2803  	// method returns no data on success, such as `Delete`, the response is
  2804  	// `google.protobuf.Empty`. If the original method is standard
  2805  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2806  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2807  	// original method name. For example, if the original method name is
  2808  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2809  	Response googleapi.RawMessage `json:"response,omitempty"`
  2810  
  2811  	// ServerResponse contains the HTTP response code and headers from the server.
  2812  	googleapi.ServerResponse `json:"-"`
  2813  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2814  	// include in API requests. By default, fields with empty or default values are
  2815  	// omitted from API requests. See
  2816  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2817  	// details.
  2818  	ForceSendFields []string `json:"-"`
  2819  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2820  	// with the JSON null value. By default, fields with empty values are omitted
  2821  	// from API requests. See
  2822  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2823  	NullFields []string `json:"-"`
  2824  }
  2825  
  2826  func (s *Operation) MarshalJSON() ([]byte, error) {
  2827  	type NoMethod Operation
  2828  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2829  }
  2830  
  2831  // OperationMetadata: Represents the metadata of the long-running operation.
  2832  type OperationMetadata struct {
  2833  	// ApiVersion: Output only. API version used to start the operation.
  2834  	ApiVersion string `json:"apiVersion,omitempty"`
  2835  	// CreateTime: Output only. The time the operation was created.
  2836  	CreateTime string `json:"createTime,omitempty"`
  2837  	// EndTime: Output only. The time the operation finished running.
  2838  	EndTime string `json:"endTime,omitempty"`
  2839  	// RequestedCancellation: Output only. Identifies whether the user has
  2840  	// requested cancellation of the operation. Operations that have successfully
  2841  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  2842  	// 1, corresponding to `Code.CANCELLED`.
  2843  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  2844  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  2845  	StatusMessage string `json:"statusMessage,omitempty"`
  2846  	// Target: Output only. Server-defined resource path for the target of the
  2847  	// operation.
  2848  	Target string `json:"target,omitempty"`
  2849  	// Verb: Output only. Name of the verb executed by the operation.
  2850  	Verb string `json:"verb,omitempty"`
  2851  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  2852  	// unconditionally include in API requests. By default, fields with empty or
  2853  	// default values are omitted from API requests. See
  2854  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2855  	// details.
  2856  	ForceSendFields []string `json:"-"`
  2857  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  2858  	// requests with the JSON null value. By default, fields with empty values are
  2859  	// omitted from API requests. See
  2860  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2861  	NullFields []string `json:"-"`
  2862  }
  2863  
  2864  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2865  	type NoMethod OperationMetadata
  2866  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2867  }
  2868  
  2869  // Policy: An Identity and Access Management (IAM) policy, which specifies
  2870  // access controls for Google Cloud resources. A `Policy` is a collection of
  2871  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  2872  // single `role`. Principals can be user accounts, service accounts, Google
  2873  // groups, and domains (such as G Suite). A `role` is a named list of
  2874  // permissions; each `role` can be an IAM predefined role or a user-created
  2875  // custom role. For some types of Google Cloud resources, a `binding` can also
  2876  // specify a `condition`, which is a logical expression that allows access to a
  2877  // resource only if the expression evaluates to `true`. A condition can add
  2878  // constraints based on attributes of the request, the resource, or both. To
  2879  // learn which resources support conditions in their IAM policies, see the IAM
  2880  // documentation
  2881  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  2882  // example:** ``` { "bindings": [ { "role":
  2883  // "roles/resourcemanager.organizationAdmin", "members": [
  2884  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  2885  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  2886  // "roles/resourcemanager.organizationViewer", "members": [
  2887  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  2888  // "description": "Does not grant access after Sep 2020", "expression":
  2889  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  2890  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  2891  // members: - user:mike@example.com - group:admins@example.com -
  2892  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  2893  // role: roles/resourcemanager.organizationAdmin - members: -
  2894  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  2895  // condition: title: expirable access description: Does not grant access after
  2896  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  2897  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  2898  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  2899  type Policy struct {
  2900  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  2901  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  2902  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  2903  	// Optionally, may specify a `condition` that determines how and when the
  2904  	// `bindings` are applied. Each of the `bindings` must contain at least one
  2905  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  2906  	// up to 250 of these principals can be Google groups. Each occurrence of a
  2907  	// principal counts towards these limits. For example, if the `bindings` grant
  2908  	// 50 different roles to `user:alice@example.com`, and not to any other
  2909  	// principal, then you can add another 1,450 principals to the `bindings` in
  2910  	// the `Policy`.
  2911  	Bindings []*Binding `json:"bindings,omitempty"`
  2912  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  2913  	// prevent simultaneous updates of a policy from overwriting each other. It is
  2914  	// strongly suggested that systems make use of the `etag` in the
  2915  	// read-modify-write cycle to perform policy updates in order to avoid race
  2916  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  2917  	// systems are expected to put that etag in the request to `setIamPolicy` to
  2918  	// ensure that their change will be applied to the same version of the policy.
  2919  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2920  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2921  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2922  	// the conditions in the version `3` policy are lost.
  2923  	Etag string `json:"etag,omitempty"`
  2924  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  2925  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  2926  	// affects conditional role bindings must specify version `3`. This requirement
  2927  	// applies to the following operations: * Getting a policy that includes a
  2928  	// conditional role binding * Adding a conditional role binding to a policy *
  2929  	// Changing a conditional role binding in a policy * Removing any role binding,
  2930  	// with or without a condition, from a policy that includes conditions
  2931  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2932  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2933  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2934  	// the conditions in the version `3` policy are lost. If a policy does not
  2935  	// include any conditions, operations on that policy may specify any valid
  2936  	// version or leave the field unset. To learn which resources support
  2937  	// conditions in their IAM policies, see the IAM documentation
  2938  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2939  	Version int64 `json:"version,omitempty"`
  2940  
  2941  	// ServerResponse contains the HTTP response code and headers from the server.
  2942  	googleapi.ServerResponse `json:"-"`
  2943  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2944  	// unconditionally include in API requests. By default, fields with empty or
  2945  	// default values are omitted from API requests. See
  2946  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2947  	// details.
  2948  	ForceSendFields []string `json:"-"`
  2949  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  2950  	// requests with the JSON null value. By default, fields with empty values are
  2951  	// omitted from API requests. See
  2952  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2953  	NullFields []string `json:"-"`
  2954  }
  2955  
  2956  func (s *Policy) MarshalJSON() ([]byte, error) {
  2957  	type NoMethod Policy
  2958  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2959  }
  2960  
  2961  // ServiceBinding: ServiceBinding is the resource that defines a Service
  2962  // Directory Service to be used in a BackendService resource.
  2963  type ServiceBinding struct {
  2964  	// CreateTime: Output only. The timestamp when the resource was created.
  2965  	CreateTime string `json:"createTime,omitempty"`
  2966  	// Description: Optional. A free-text description of the resource. Max length
  2967  	// 1024 characters.
  2968  	Description string `json:"description,omitempty"`
  2969  	// Labels: Optional. Set of label tags associated with the ServiceBinding
  2970  	// resource.
  2971  	Labels map[string]string `json:"labels,omitempty"`
  2972  	// Name: Required. Name of the ServiceBinding resource. It matches pattern
  2973  	// `projects/*/locations/global/serviceBindings/service_binding_name`.
  2974  	Name string `json:"name,omitempty"`
  2975  	// Service: Required. The full Service Directory Service name of the format
  2976  	// projects/*/locations/*/namespaces/*/services/*
  2977  	Service string `json:"service,omitempty"`
  2978  	// ServiceId: Output only. The unique identifier of the Service Directory
  2979  	// Service against which the Service Binding resource is validated. This is
  2980  	// populated when the Service Binding resource is used in another resource
  2981  	// (like Backend Service). This is of the UUID4 format.
  2982  	ServiceId string `json:"serviceId,omitempty"`
  2983  	// UpdateTime: Output only. The timestamp when the resource was updated.
  2984  	UpdateTime string `json:"updateTime,omitempty"`
  2985  
  2986  	// ServerResponse contains the HTTP response code and headers from the server.
  2987  	googleapi.ServerResponse `json:"-"`
  2988  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2989  	// unconditionally include in API requests. By default, fields with empty or
  2990  	// default values are omitted from API requests. See
  2991  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2992  	// details.
  2993  	ForceSendFields []string `json:"-"`
  2994  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2995  	// requests with the JSON null value. By default, fields with empty values are
  2996  	// omitted from API requests. See
  2997  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2998  	NullFields []string `json:"-"`
  2999  }
  3000  
  3001  func (s *ServiceBinding) MarshalJSON() ([]byte, error) {
  3002  	type NoMethod ServiceBinding
  3003  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3004  }
  3005  
  3006  // ServiceLbPolicy: ServiceLbPolicy holds global load balancing and traffic
  3007  // distribution configuration that can be applied to a BackendService.
  3008  type ServiceLbPolicy struct {
  3009  	// AutoCapacityDrain: Optional. Configuration to automatically move traffic
  3010  	// away for unhealthy IG/NEG for the associated Backend Service.
  3011  	AutoCapacityDrain *ServiceLbPolicyAutoCapacityDrain `json:"autoCapacityDrain,omitempty"`
  3012  	// CreateTime: Output only. The timestamp when this resource was created.
  3013  	CreateTime string `json:"createTime,omitempty"`
  3014  	// Description: Optional. A free-text description of the resource. Max length
  3015  	// 1024 characters.
  3016  	Description string `json:"description,omitempty"`
  3017  	// FailoverConfig: Optional. Configuration related to health based failover.
  3018  	FailoverConfig *ServiceLbPolicyFailoverConfig `json:"failoverConfig,omitempty"`
  3019  	// Labels: Optional. Set of label tags associated with the ServiceLbPolicy
  3020  	// resource.
  3021  	Labels map[string]string `json:"labels,omitempty"`
  3022  	// LoadBalancingAlgorithm: Optional. The type of load balancing algorithm to be
  3023  	// used. The default behavior is WATERFALL_BY_REGION.
  3024  	//
  3025  	// Possible values:
  3026  	//   "LOAD_BALANCING_ALGORITHM_UNSPECIFIED" - The type of the loadbalancing
  3027  	// algorithm is unspecified.
  3028  	//   "SPRAY_TO_WORLD" - Balance traffic across all backends across the world
  3029  	// proportionally based on capacity.
  3030  	//   "SPRAY_TO_REGION" - Direct traffic to the nearest region with endpoints
  3031  	// and capacity before spilling over to other regions and spread the traffic
  3032  	// from each client to all the MIGs/NEGs in a region.
  3033  	//   "WATERFALL_BY_REGION" - Direct traffic to the nearest region with
  3034  	// endpoints and capacity before spilling over to other regions. All MIGs/NEGs
  3035  	// within a region are evenly loaded but each client might not spread the
  3036  	// traffic to all the MIGs/NEGs in the region.
  3037  	//   "WATERFALL_BY_ZONE" - Attempt to keep traffic in a single zone closest to
  3038  	// the client, before spilling over to other zones.
  3039  	LoadBalancingAlgorithm string `json:"loadBalancingAlgorithm,omitempty"`
  3040  	// Name: Required. Name of the ServiceLbPolicy resource. It matches pattern
  3041  	// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy
  3042  	// _name}`.
  3043  	Name string `json:"name,omitempty"`
  3044  	// UpdateTime: Output only. The timestamp when this resource was last updated.
  3045  	UpdateTime string `json:"updateTime,omitempty"`
  3046  
  3047  	// ServerResponse contains the HTTP response code and headers from the server.
  3048  	googleapi.ServerResponse `json:"-"`
  3049  	// ForceSendFields is a list of field names (e.g. "AutoCapacityDrain") to
  3050  	// unconditionally include in API requests. By default, fields with empty or
  3051  	// default values are omitted from API requests. See
  3052  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3053  	// details.
  3054  	ForceSendFields []string `json:"-"`
  3055  	// NullFields is a list of field names (e.g. "AutoCapacityDrain") to include in
  3056  	// API requests with the JSON null value. By default, fields with empty values
  3057  	// are omitted from API requests. See
  3058  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3059  	NullFields []string `json:"-"`
  3060  }
  3061  
  3062  func (s *ServiceLbPolicy) MarshalJSON() ([]byte, error) {
  3063  	type NoMethod ServiceLbPolicy
  3064  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3065  }
  3066  
  3067  // ServiceLbPolicyAutoCapacityDrain: Option to specify if an unhealthy IG/NEG
  3068  // should be considered for global load balancing and traffic routing.
  3069  type ServiceLbPolicyAutoCapacityDrain struct {
  3070  	// Enable: Optional. If set to 'True', an unhealthy IG/NEG will be set as
  3071  	// drained. - An IG/NEG is considered unhealthy if less than 25% of the
  3072  	// instances/endpoints in the IG/NEG are healthy. - This option will never
  3073  	// result in draining more than 50% of the configured IGs/NEGs for the Backend
  3074  	// Service.
  3075  	Enable bool `json:"enable,omitempty"`
  3076  	// ForceSendFields is a list of field names (e.g. "Enable") to unconditionally
  3077  	// include in API requests. By default, fields with empty or default values are
  3078  	// omitted from API requests. See
  3079  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3080  	// details.
  3081  	ForceSendFields []string `json:"-"`
  3082  	// NullFields is a list of field names (e.g. "Enable") to include in API
  3083  	// requests with the JSON null value. By default, fields with empty values are
  3084  	// omitted from API requests. See
  3085  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3086  	NullFields []string `json:"-"`
  3087  }
  3088  
  3089  func (s *ServiceLbPolicyAutoCapacityDrain) MarshalJSON() ([]byte, error) {
  3090  	type NoMethod ServiceLbPolicyAutoCapacityDrain
  3091  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3092  }
  3093  
  3094  // ServiceLbPolicyFailoverConfig: Option to specify health based failover
  3095  // behavior. This is not related to Network load balancer FailoverPolicy.
  3096  type ServiceLbPolicyFailoverConfig struct {
  3097  	// FailoverHealthThreshold: Optional. The percentage threshold that a load
  3098  	// balancer will begin to send traffic to failover backends. If the percentage
  3099  	// of endpoints in a MIG/NEG is smaller than this value, traffic would be sent
  3100  	// to failover backends if possible. This field should be set to a value
  3101  	// between 1 and 99. The default value is 50 for Global external HTTP(S) load
  3102  	// balancer (classic) and Proxyless service mesh, and 70 for others.
  3103  	FailoverHealthThreshold int64 `json:"failoverHealthThreshold,omitempty"`
  3104  	// ForceSendFields is a list of field names (e.g. "FailoverHealthThreshold") to
  3105  	// unconditionally include in API requests. By default, fields with empty or
  3106  	// default values are omitted from API requests. See
  3107  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3108  	// details.
  3109  	ForceSendFields []string `json:"-"`
  3110  	// NullFields is a list of field names (e.g. "FailoverHealthThreshold") to
  3111  	// include in API requests with the JSON null value. By default, fields with
  3112  	// empty values are omitted from API requests. See
  3113  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3114  	NullFields []string `json:"-"`
  3115  }
  3116  
  3117  func (s *ServiceLbPolicyFailoverConfig) MarshalJSON() ([]byte, error) {
  3118  	type NoMethod ServiceLbPolicyFailoverConfig
  3119  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3120  }
  3121  
  3122  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  3123  type SetIamPolicyRequest struct {
  3124  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  3125  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  3126  	// policy but certain Google Cloud services (such as Projects) might reject
  3127  	// them.
  3128  	Policy *Policy `json:"policy,omitempty"`
  3129  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  3130  	// modify. Only the fields in the mask will be modified. If no mask is
  3131  	// provided, the following default mask is used: `paths: "bindings, etag"
  3132  	UpdateMask string `json:"updateMask,omitempty"`
  3133  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  3134  	// include in API requests. By default, fields with empty or default values are
  3135  	// omitted from API requests. See
  3136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3137  	// details.
  3138  	ForceSendFields []string `json:"-"`
  3139  	// NullFields is a list of field names (e.g. "Policy") to include in API
  3140  	// requests with the JSON null value. By default, fields with empty values are
  3141  	// omitted from API requests. See
  3142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3143  	NullFields []string `json:"-"`
  3144  }
  3145  
  3146  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  3147  	type NoMethod SetIamPolicyRequest
  3148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3149  }
  3150  
  3151  // Status: The `Status` type defines a logical error model that is suitable for
  3152  // different programming environments, including REST APIs and RPC APIs. It is
  3153  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  3154  // pieces of data: error code, error message, and error details. You can find
  3155  // out more about this error model and how to work with it in the API Design
  3156  // Guide (https://cloud.google.com/apis/design/errors).
  3157  type Status struct {
  3158  	// Code: The status code, which should be an enum value of google.rpc.Code.
  3159  	Code int64 `json:"code,omitempty"`
  3160  	// Details: A list of messages that carry the error details. There is a common
  3161  	// set of message types for APIs to use.
  3162  	Details []googleapi.RawMessage `json:"details,omitempty"`
  3163  	// Message: A developer-facing error message, which should be in English. Any
  3164  	// user-facing error message should be localized and sent in the
  3165  	// google.rpc.Status.details field, or localized by the client.
  3166  	Message string `json:"message,omitempty"`
  3167  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3168  	// include in API requests. By default, fields with empty or default values are
  3169  	// omitted from API requests. See
  3170  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3171  	// details.
  3172  	ForceSendFields []string `json:"-"`
  3173  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3174  	// with the JSON null value. By default, fields with empty values are omitted
  3175  	// from API requests. See
  3176  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3177  	NullFields []string `json:"-"`
  3178  }
  3179  
  3180  func (s *Status) MarshalJSON() ([]byte, error) {
  3181  	type NoMethod Status
  3182  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3183  }
  3184  
  3185  // TcpRoute: TcpRoute is the resource defining how TCP traffic should be routed
  3186  // by a Mesh/Gateway resource.
  3187  type TcpRoute struct {
  3188  	// CreateTime: Output only. The timestamp when the resource was created.
  3189  	CreateTime string `json:"createTime,omitempty"`
  3190  	// Description: Optional. A free-text description of the resource. Max length
  3191  	// 1024 characters.
  3192  	Description string `json:"description,omitempty"`
  3193  	// Gateways: Optional. Gateways defines a list of gateways this TcpRoute is
  3194  	// attached to, as one of the routing rules to route the requests served by the
  3195  	// gateway. Each gateway reference should match the pattern:
  3196  	// `projects/*/locations/global/gateways/`
  3197  	Gateways []string `json:"gateways,omitempty"`
  3198  	// Labels: Optional. Set of label tags associated with the TcpRoute resource.
  3199  	Labels map[string]string `json:"labels,omitempty"`
  3200  	// Meshes: Optional. Meshes defines a list of meshes this TcpRoute is attached
  3201  	// to, as one of the routing rules to route the requests served by the mesh.
  3202  	// Each mesh reference should match the pattern:
  3203  	// `projects/*/locations/global/meshes/` The attached Mesh should be of a type
  3204  	// SIDECAR
  3205  	Meshes []string `json:"meshes,omitempty"`
  3206  	// Name: Required. Name of the TcpRoute resource. It matches pattern
  3207  	// `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
  3208  	Name string `json:"name,omitempty"`
  3209  	// Rules: Required. Rules that define how traffic is routed and handled. At
  3210  	// least one RouteRule must be supplied. If there are multiple rules then the
  3211  	// action taken will be the first rule to match.
  3212  	Rules []*TcpRouteRouteRule `json:"rules,omitempty"`
  3213  	// SelfLink: Output only. Server-defined URL of this resource
  3214  	SelfLink string `json:"selfLink,omitempty"`
  3215  	// UpdateTime: Output only. The timestamp when the resource was updated.
  3216  	UpdateTime string `json:"updateTime,omitempty"`
  3217  
  3218  	// ServerResponse contains the HTTP response code and headers from the server.
  3219  	googleapi.ServerResponse `json:"-"`
  3220  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3221  	// unconditionally include in API requests. By default, fields with empty or
  3222  	// default values are omitted from API requests. See
  3223  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3224  	// details.
  3225  	ForceSendFields []string `json:"-"`
  3226  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3227  	// requests with the JSON null value. By default, fields with empty values are
  3228  	// omitted from API requests. See
  3229  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3230  	NullFields []string `json:"-"`
  3231  }
  3232  
  3233  func (s *TcpRoute) MarshalJSON() ([]byte, error) {
  3234  	type NoMethod TcpRoute
  3235  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3236  }
  3237  
  3238  // TcpRouteRouteAction: The specifications for routing traffic and applying
  3239  // associated policies.
  3240  type TcpRouteRouteAction struct {
  3241  	// Destinations: Optional. The destination services to which traffic should be
  3242  	// forwarded. At least one destination service is required. Only one of route
  3243  	// destination or original destination can be set.
  3244  	Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"`
  3245  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  3246  	// The idle timeout is defined as the period in which there are no bytes sent
  3247  	// or received on either the upstream or downstream connection. If not set, the
  3248  	// default idle timeout is 30 seconds. If set to 0s, the timeout will be
  3249  	// disabled.
  3250  	IdleTimeout string `json:"idleTimeout,omitempty"`
  3251  	// OriginalDestination: Optional. If true, Router will use the destination IP
  3252  	// and port of the original connection as the destination of the request.
  3253  	// Default is false. Only one of route destinations or original destination can
  3254  	// be set.
  3255  	OriginalDestination bool `json:"originalDestination,omitempty"`
  3256  	// ForceSendFields is a list of field names (e.g. "Destinations") to
  3257  	// unconditionally include in API requests. By default, fields with empty or
  3258  	// default values are omitted from API requests. See
  3259  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3260  	// details.
  3261  	ForceSendFields []string `json:"-"`
  3262  	// NullFields is a list of field names (e.g. "Destinations") to include in API
  3263  	// requests with the JSON null value. By default, fields with empty values are
  3264  	// omitted from API requests. See
  3265  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3266  	NullFields []string `json:"-"`
  3267  }
  3268  
  3269  func (s *TcpRouteRouteAction) MarshalJSON() ([]byte, error) {
  3270  	type NoMethod TcpRouteRouteAction
  3271  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3272  }
  3273  
  3274  // TcpRouteRouteDestination: Describe the destination for traffic to be routed
  3275  // to.
  3276  type TcpRouteRouteDestination struct {
  3277  	// ServiceName: Required. The URL of a BackendService to route traffic to.
  3278  	ServiceName string `json:"serviceName,omitempty"`
  3279  	// Weight: Optional. Specifies the proportion of requests forwarded to the
  3280  	// backend referenced by the serviceName field. This is computed as: -
  3281  	// weight/Sum(weights in this destination list). For non-zero values, there may
  3282  	// be some epsilon from the exact proportion defined here depending on the
  3283  	// precision an implementation supports. If only one serviceName is specified
  3284  	// and it has a weight greater than 0, 100% of the traffic is forwarded to that
  3285  	// backend. If weights are specified for any one service name, they need to be
  3286  	// specified for all of them. If weights are unspecified for all services,
  3287  	// then, traffic is distributed in equal proportions to all of them.
  3288  	Weight int64 `json:"weight,omitempty"`
  3289  	// ForceSendFields is a list of field names (e.g. "ServiceName") to
  3290  	// unconditionally include in API requests. By default, fields with empty or
  3291  	// default values are omitted from API requests. See
  3292  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3293  	// details.
  3294  	ForceSendFields []string `json:"-"`
  3295  	// NullFields is a list of field names (e.g. "ServiceName") to include in API
  3296  	// requests with the JSON null value. By default, fields with empty values are
  3297  	// omitted from API requests. See
  3298  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3299  	NullFields []string `json:"-"`
  3300  }
  3301  
  3302  func (s *TcpRouteRouteDestination) MarshalJSON() ([]byte, error) {
  3303  	type NoMethod TcpRouteRouteDestination
  3304  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3305  }
  3306  
  3307  // TcpRouteRouteMatch: RouteMatch defines the predicate used to match requests
  3308  // to a given action. Multiple match types are "OR"ed for evaluation. If no
  3309  // routeMatch field is specified, this rule will unconditionally match traffic.
  3310  type TcpRouteRouteMatch struct {
  3311  	// Address: Required. Must be specified in the CIDR range format. A CIDR range
  3312  	// consists of an IP Address and a prefix length to construct the subnet mask.
  3313  	// By default, the prefix length is 32 (i.e. matches a single IP address). Only
  3314  	// IPV4 addresses are supported. Examples: "10.0.0.1" - matches against this
  3315  	// exact IP address. "10.0.0.0/8" - matches against any IP address within the
  3316  	// 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP
  3317  	// address'.
  3318  	Address string `json:"address,omitempty"`
  3319  	// Port: Required. Specifies the destination port to match against.
  3320  	Port string `json:"port,omitempty"`
  3321  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
  3322  	// include in API requests. By default, fields with empty or default values are
  3323  	// omitted from API requests. See
  3324  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3325  	// details.
  3326  	ForceSendFields []string `json:"-"`
  3327  	// NullFields is a list of field names (e.g. "Address") to include in API
  3328  	// requests with the JSON null value. By default, fields with empty values are
  3329  	// omitted from API requests. See
  3330  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3331  	NullFields []string `json:"-"`
  3332  }
  3333  
  3334  func (s *TcpRouteRouteMatch) MarshalJSON() ([]byte, error) {
  3335  	type NoMethod TcpRouteRouteMatch
  3336  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3337  }
  3338  
  3339  // TcpRouteRouteRule: Specifies how to match traffic and how to route traffic
  3340  // when traffic is matched.
  3341  type TcpRouteRouteRule struct {
  3342  	// Action: Required. The detailed rule defining how to route matched traffic.
  3343  	Action *TcpRouteRouteAction `json:"action,omitempty"`
  3344  	// Matches: Optional. RouteMatch defines the predicate used to match requests
  3345  	// to a given action. Multiple match types are "OR"ed for evaluation. If no
  3346  	// routeMatch field is specified, this rule will unconditionally match traffic.
  3347  	Matches []*TcpRouteRouteMatch `json:"matches,omitempty"`
  3348  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  3349  	// include in API requests. By default, fields with empty or default values are
  3350  	// omitted from API requests. See
  3351  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3352  	// details.
  3353  	ForceSendFields []string `json:"-"`
  3354  	// NullFields is a list of field names (e.g. "Action") to include in API
  3355  	// requests with the JSON null value. By default, fields with empty values are
  3356  	// omitted from API requests. See
  3357  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3358  	NullFields []string `json:"-"`
  3359  }
  3360  
  3361  func (s *TcpRouteRouteRule) MarshalJSON() ([]byte, error) {
  3362  	type NoMethod TcpRouteRouteRule
  3363  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3364  }
  3365  
  3366  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  3367  type TestIamPermissionsRequest struct {
  3368  	// Permissions: The set of permissions to check for the `resource`. Permissions
  3369  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  3370  	// information see IAM Overview
  3371  	// (https://cloud.google.com/iam/docs/overview#permissions).
  3372  	Permissions []string `json:"permissions,omitempty"`
  3373  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3374  	// unconditionally include in API requests. By default, fields with empty or
  3375  	// default values are omitted from API requests. See
  3376  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3377  	// details.
  3378  	ForceSendFields []string `json:"-"`
  3379  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3380  	// requests with the JSON null value. By default, fields with empty values are
  3381  	// omitted from API requests. See
  3382  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3383  	NullFields []string `json:"-"`
  3384  }
  3385  
  3386  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  3387  	type NoMethod TestIamPermissionsRequest
  3388  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3389  }
  3390  
  3391  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  3392  // method.
  3393  type TestIamPermissionsResponse struct {
  3394  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  3395  	// caller is allowed.
  3396  	Permissions []string `json:"permissions,omitempty"`
  3397  
  3398  	// ServerResponse contains the HTTP response code and headers from the server.
  3399  	googleapi.ServerResponse `json:"-"`
  3400  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3401  	// unconditionally include in API requests. By default, fields with empty or
  3402  	// default values are omitted from API requests. See
  3403  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3404  	// details.
  3405  	ForceSendFields []string `json:"-"`
  3406  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3407  	// requests with the JSON null value. By default, fields with empty values are
  3408  	// omitted from API requests. See
  3409  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3410  	NullFields []string `json:"-"`
  3411  }
  3412  
  3413  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  3414  	type NoMethod TestIamPermissionsResponse
  3415  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3416  }
  3417  
  3418  // TlsRoute: TlsRoute defines how traffic should be routed based on SNI and
  3419  // other matching L3 attributes.
  3420  type TlsRoute struct {
  3421  	// CreateTime: Output only. The timestamp when the resource was created.
  3422  	CreateTime string `json:"createTime,omitempty"`
  3423  	// Description: Optional. A free-text description of the resource. Max length
  3424  	// 1024 characters.
  3425  	Description string `json:"description,omitempty"`
  3426  	// Gateways: Optional. Gateways defines a list of gateways this TlsRoute is
  3427  	// attached to, as one of the routing rules to route the requests served by the
  3428  	// gateway. Each gateway reference should match the pattern:
  3429  	// `projects/*/locations/global/gateways/`
  3430  	Gateways []string `json:"gateways,omitempty"`
  3431  	// Labels: Optional. Set of label tags associated with the TlsRoute resource.
  3432  	Labels map[string]string `json:"labels,omitempty"`
  3433  	// Meshes: Optional. Meshes defines a list of meshes this TlsRoute is attached
  3434  	// to, as one of the routing rules to route the requests served by the mesh.
  3435  	// Each mesh reference should match the pattern:
  3436  	// `projects/*/locations/global/meshes/` The attached Mesh should be of a type
  3437  	// SIDECAR
  3438  	Meshes []string `json:"meshes,omitempty"`
  3439  	// Name: Required. Name of the TlsRoute resource. It matches pattern
  3440  	// `projects/*/locations/global/tlsRoutes/tls_route_name>`.
  3441  	Name string `json:"name,omitempty"`
  3442  	// Rules: Required. Rules that define how traffic is routed and handled. At
  3443  	// least one RouteRule must be supplied. If there are multiple rules then the
  3444  	// action taken will be the first rule to match.
  3445  	Rules []*TlsRouteRouteRule `json:"rules,omitempty"`
  3446  	// SelfLink: Output only. Server-defined URL of this resource
  3447  	SelfLink string `json:"selfLink,omitempty"`
  3448  	// UpdateTime: Output only. The timestamp when the resource was updated.
  3449  	UpdateTime string `json:"updateTime,omitempty"`
  3450  
  3451  	// ServerResponse contains the HTTP response code and headers from the server.
  3452  	googleapi.ServerResponse `json:"-"`
  3453  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3454  	// unconditionally include in API requests. By default, fields with empty or
  3455  	// default values are omitted from API requests. See
  3456  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3457  	// details.
  3458  	ForceSendFields []string `json:"-"`
  3459  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3460  	// requests with the JSON null value. By default, fields with empty values are
  3461  	// omitted from API requests. See
  3462  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3463  	NullFields []string `json:"-"`
  3464  }
  3465  
  3466  func (s *TlsRoute) MarshalJSON() ([]byte, error) {
  3467  	type NoMethod TlsRoute
  3468  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3469  }
  3470  
  3471  // TlsRouteRouteAction: The specifications for routing traffic and applying
  3472  // associated policies.
  3473  type TlsRouteRouteAction struct {
  3474  	// Destinations: Required. The destination services to which traffic should be
  3475  	// forwarded. At least one destination service is required.
  3476  	Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"`
  3477  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  3478  	// The idle timeout is defined as the period in which there are no bytes sent
  3479  	// or received on either the upstream or downstream connection. If not set, the
  3480  	// default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.
  3481  	IdleTimeout string `json:"idleTimeout,omitempty"`
  3482  	// ForceSendFields is a list of field names (e.g. "Destinations") to
  3483  	// unconditionally include in API requests. By default, fields with empty or
  3484  	// default values are omitted from API requests. See
  3485  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3486  	// details.
  3487  	ForceSendFields []string `json:"-"`
  3488  	// NullFields is a list of field names (e.g. "Destinations") to include in API
  3489  	// requests with the JSON null value. By default, fields with empty values are
  3490  	// omitted from API requests. See
  3491  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3492  	NullFields []string `json:"-"`
  3493  }
  3494  
  3495  func (s *TlsRouteRouteAction) MarshalJSON() ([]byte, error) {
  3496  	type NoMethod TlsRouteRouteAction
  3497  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3498  }
  3499  
  3500  // TlsRouteRouteDestination: Describe the destination for traffic to be routed
  3501  // to.
  3502  type TlsRouteRouteDestination struct {
  3503  	// ServiceName: Required. The URL of a BackendService to route traffic to.
  3504  	ServiceName string `json:"serviceName,omitempty"`
  3505  	// Weight: Optional. Specifies the proportion of requests forwareded to the
  3506  	// backend referenced by the service_name field. This is computed as: -
  3507  	// weight/Sum(weights in destinations) Weights in all destinations does not
  3508  	// need to sum up to 100.
  3509  	Weight int64 `json:"weight,omitempty"`
  3510  	// ForceSendFields is a list of field names (e.g. "ServiceName") to
  3511  	// unconditionally include in API requests. By default, fields with empty or
  3512  	// default values are omitted from API requests. See
  3513  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3514  	// details.
  3515  	ForceSendFields []string `json:"-"`
  3516  	// NullFields is a list of field names (e.g. "ServiceName") to include in API
  3517  	// requests with the JSON null value. By default, fields with empty values are
  3518  	// omitted from API requests. See
  3519  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3520  	NullFields []string `json:"-"`
  3521  }
  3522  
  3523  func (s *TlsRouteRouteDestination) MarshalJSON() ([]byte, error) {
  3524  	type NoMethod TlsRouteRouteDestination
  3525  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3526  }
  3527  
  3528  // TlsRouteRouteMatch: RouteMatch defines the predicate used to match requests
  3529  // to a given action. Multiple match types are "AND"ed for evaluation. If no
  3530  // routeMatch field is specified, this rule will unconditionally match traffic.
  3531  type TlsRouteRouteMatch struct {
  3532  	// Alpn: Optional. ALPN (Application-Layer Protocol Negotiation) to match
  3533  	// against. Examples: "http/1.1", "h2". At least one of sni_host and alpn is
  3534  	// required. Up to 5 alpns across all matches can be set.
  3535  	Alpn []string `json:"alpn,omitempty"`
  3536  	// SniHost: Optional. SNI (server name indicator) to match against. SNI will be
  3537  	// matched against all wildcard domains, i.e. `www.example.com` will be first
  3538  	// matched against `www.example.com`, then `*.example.com`, then `*.com.`
  3539  	// Partial wildcards are not supported, and values like *w.example.com are
  3540  	// invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts
  3541  	// across all matches can be set.
  3542  	SniHost []string `json:"sniHost,omitempty"`
  3543  	// ForceSendFields is a list of field names (e.g. "Alpn") to unconditionally
  3544  	// include in API requests. By default, fields with empty or default values are
  3545  	// omitted from API requests. See
  3546  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3547  	// details.
  3548  	ForceSendFields []string `json:"-"`
  3549  	// NullFields is a list of field names (e.g. "Alpn") to include in API requests
  3550  	// with the JSON null value. By default, fields with empty values are omitted
  3551  	// from API requests. See
  3552  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3553  	NullFields []string `json:"-"`
  3554  }
  3555  
  3556  func (s *TlsRouteRouteMatch) MarshalJSON() ([]byte, error) {
  3557  	type NoMethod TlsRouteRouteMatch
  3558  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3559  }
  3560  
  3561  // TlsRouteRouteRule: Specifies how to match traffic and how to route traffic
  3562  // when traffic is matched.
  3563  type TlsRouteRouteRule struct {
  3564  	// Action: Required. The detailed rule defining how to route matched traffic.
  3565  	Action *TlsRouteRouteAction `json:"action,omitempty"`
  3566  	// Matches: Required. RouteMatch defines the predicate used to match requests
  3567  	// to a given action. Multiple match types are "OR"ed for evaluation.
  3568  	Matches []*TlsRouteRouteMatch `json:"matches,omitempty"`
  3569  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  3570  	// include in API requests. By default, fields with empty or default values are
  3571  	// omitted from API requests. See
  3572  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3573  	// details.
  3574  	ForceSendFields []string `json:"-"`
  3575  	// NullFields is a list of field names (e.g. "Action") to include in API
  3576  	// requests with the JSON null value. By default, fields with empty values are
  3577  	// omitted from API requests. See
  3578  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3579  	NullFields []string `json:"-"`
  3580  }
  3581  
  3582  func (s *TlsRouteRouteRule) MarshalJSON() ([]byte, error) {
  3583  	type NoMethod TlsRouteRouteRule
  3584  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3585  }
  3586  
  3587  // TrafficPortSelector: Specification of a port-based selector.
  3588  type TrafficPortSelector struct {
  3589  	// Ports: Optional. A list of ports. Can be port numbers or port range
  3590  	// (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or
  3591  	// named ports or * to specify all ports. If the list is empty, all ports are
  3592  	// selected.
  3593  	Ports []string `json:"ports,omitempty"`
  3594  	// ForceSendFields is a list of field names (e.g. "Ports") to unconditionally
  3595  	// include in API requests. By default, fields with empty or default values are
  3596  	// omitted from API requests. See
  3597  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3598  	// details.
  3599  	ForceSendFields []string `json:"-"`
  3600  	// NullFields is a list of field names (e.g. "Ports") to include in API
  3601  	// requests with the JSON null value. By default, fields with empty values are
  3602  	// omitted from API requests. See
  3603  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3604  	NullFields []string `json:"-"`
  3605  }
  3606  
  3607  func (s *TrafficPortSelector) MarshalJSON() ([]byte, error) {
  3608  	type NoMethod TrafficPortSelector
  3609  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3610  }
  3611  
  3612  type ProjectsLocationsGetCall struct {
  3613  	s            *Service
  3614  	name         string
  3615  	urlParams_   gensupport.URLParams
  3616  	ifNoneMatch_ string
  3617  	ctx_         context.Context
  3618  	header_      http.Header
  3619  }
  3620  
  3621  // Get: Gets information about a location.
  3622  //
  3623  // - name: Resource name for the location.
  3624  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  3625  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3626  	c.name = name
  3627  	return c
  3628  }
  3629  
  3630  // Fields allows partial responses to be retrieved. See
  3631  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3632  // details.
  3633  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  3634  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3635  	return c
  3636  }
  3637  
  3638  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3639  // object's ETag matches the given value. This is useful for getting updates
  3640  // only after the object has changed since the last request.
  3641  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  3642  	c.ifNoneMatch_ = entityTag
  3643  	return c
  3644  }
  3645  
  3646  // Context sets the context to be used in this call's Do method.
  3647  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  3648  	c.ctx_ = ctx
  3649  	return c
  3650  }
  3651  
  3652  // Header returns a http.Header that can be modified by the caller to add
  3653  // headers to the request.
  3654  func (c *ProjectsLocationsGetCall) Header() http.Header {
  3655  	if c.header_ == nil {
  3656  		c.header_ = make(http.Header)
  3657  	}
  3658  	return c.header_
  3659  }
  3660  
  3661  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3662  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3663  	if c.ifNoneMatch_ != "" {
  3664  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3665  	}
  3666  	var body io.Reader = nil
  3667  	c.urlParams_.Set("alt", alt)
  3668  	c.urlParams_.Set("prettyPrint", "false")
  3669  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  3670  	urls += "?" + c.urlParams_.Encode()
  3671  	req, err := http.NewRequest("GET", urls, body)
  3672  	if err != nil {
  3673  		return nil, err
  3674  	}
  3675  	req.Header = reqHeaders
  3676  	googleapi.Expand(req.URL, map[string]string{
  3677  		"name": c.name,
  3678  	})
  3679  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3680  }
  3681  
  3682  // Do executes the "networkservices.projects.locations.get" call.
  3683  // Any non-2xx status code is an error. Response headers are in either
  3684  // *Location.ServerResponse.Header or (if a response was returned at all) in
  3685  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3686  // whether the returned error was because http.StatusNotModified was returned.
  3687  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3688  	gensupport.SetOptions(c.urlParams_, opts...)
  3689  	res, err := c.doRequest("json")
  3690  	if res != nil && res.StatusCode == http.StatusNotModified {
  3691  		if res.Body != nil {
  3692  			res.Body.Close()
  3693  		}
  3694  		return nil, gensupport.WrapError(&googleapi.Error{
  3695  			Code:   res.StatusCode,
  3696  			Header: res.Header,
  3697  		})
  3698  	}
  3699  	if err != nil {
  3700  		return nil, err
  3701  	}
  3702  	defer googleapi.CloseBody(res)
  3703  	if err := googleapi.CheckResponse(res); err != nil {
  3704  		return nil, gensupport.WrapError(err)
  3705  	}
  3706  	ret := &Location{
  3707  		ServerResponse: googleapi.ServerResponse{
  3708  			Header:         res.Header,
  3709  			HTTPStatusCode: res.StatusCode,
  3710  		},
  3711  	}
  3712  	target := &ret
  3713  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3714  		return nil, err
  3715  	}
  3716  	return ret, nil
  3717  }
  3718  
  3719  type ProjectsLocationsListCall struct {
  3720  	s            *Service
  3721  	name         string
  3722  	urlParams_   gensupport.URLParams
  3723  	ifNoneMatch_ string
  3724  	ctx_         context.Context
  3725  	header_      http.Header
  3726  }
  3727  
  3728  // List: Lists information about the supported locations for this service.
  3729  //
  3730  // - name: The resource that owns the locations collection, if applicable.
  3731  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  3732  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3733  	c.name = name
  3734  	return c
  3735  }
  3736  
  3737  // Filter sets the optional parameter "filter": A filter to narrow down results
  3738  // to a preferred subset. The filtering language accepts strings like
  3739  // "displayName=tokyo", and is documented in more detail in AIP-160
  3740  // (https://google.aip.dev/160).
  3741  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  3742  	c.urlParams_.Set("filter", filter)
  3743  	return c
  3744  }
  3745  
  3746  // PageSize sets the optional parameter "pageSize": The maximum number of
  3747  // results to return. If not set, the service selects a default.
  3748  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  3749  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3750  	return c
  3751  }
  3752  
  3753  // PageToken sets the optional parameter "pageToken": A page token received
  3754  // from the `next_page_token` field in the response. Send that page token to
  3755  // receive the subsequent page.
  3756  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  3757  	c.urlParams_.Set("pageToken", pageToken)
  3758  	return c
  3759  }
  3760  
  3761  // Fields allows partial responses to be retrieved. See
  3762  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3763  // details.
  3764  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  3765  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3766  	return c
  3767  }
  3768  
  3769  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3770  // object's ETag matches the given value. This is useful for getting updates
  3771  // only after the object has changed since the last request.
  3772  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  3773  	c.ifNoneMatch_ = entityTag
  3774  	return c
  3775  }
  3776  
  3777  // Context sets the context to be used in this call's Do method.
  3778  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  3779  	c.ctx_ = ctx
  3780  	return c
  3781  }
  3782  
  3783  // Header returns a http.Header that can be modified by the caller to add
  3784  // headers to the request.
  3785  func (c *ProjectsLocationsListCall) Header() http.Header {
  3786  	if c.header_ == nil {
  3787  		c.header_ = make(http.Header)
  3788  	}
  3789  	return c.header_
  3790  }
  3791  
  3792  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3793  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3794  	if c.ifNoneMatch_ != "" {
  3795  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3796  	}
  3797  	var body io.Reader = nil
  3798  	c.urlParams_.Set("alt", alt)
  3799  	c.urlParams_.Set("prettyPrint", "false")
  3800  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/locations")
  3801  	urls += "?" + c.urlParams_.Encode()
  3802  	req, err := http.NewRequest("GET", urls, body)
  3803  	if err != nil {
  3804  		return nil, err
  3805  	}
  3806  	req.Header = reqHeaders
  3807  	googleapi.Expand(req.URL, map[string]string{
  3808  		"name": c.name,
  3809  	})
  3810  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3811  }
  3812  
  3813  // Do executes the "networkservices.projects.locations.list" call.
  3814  // Any non-2xx status code is an error. Response headers are in either
  3815  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  3816  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3817  // check whether the returned error was because http.StatusNotModified was
  3818  // returned.
  3819  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3820  	gensupport.SetOptions(c.urlParams_, opts...)
  3821  	res, err := c.doRequest("json")
  3822  	if res != nil && res.StatusCode == http.StatusNotModified {
  3823  		if res.Body != nil {
  3824  			res.Body.Close()
  3825  		}
  3826  		return nil, gensupport.WrapError(&googleapi.Error{
  3827  			Code:   res.StatusCode,
  3828  			Header: res.Header,
  3829  		})
  3830  	}
  3831  	if err != nil {
  3832  		return nil, err
  3833  	}
  3834  	defer googleapi.CloseBody(res)
  3835  	if err := googleapi.CheckResponse(res); err != nil {
  3836  		return nil, gensupport.WrapError(err)
  3837  	}
  3838  	ret := &ListLocationsResponse{
  3839  		ServerResponse: googleapi.ServerResponse{
  3840  			Header:         res.Header,
  3841  			HTTPStatusCode: res.StatusCode,
  3842  		},
  3843  	}
  3844  	target := &ret
  3845  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3846  		return nil, err
  3847  	}
  3848  	return ret, nil
  3849  }
  3850  
  3851  // Pages invokes f for each page of results.
  3852  // A non-nil error returned from f will halt the iteration.
  3853  // The provided context supersedes any context provided to the Context method.
  3854  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3855  	c.ctx_ = ctx
  3856  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3857  	for {
  3858  		x, err := c.Do()
  3859  		if err != nil {
  3860  			return err
  3861  		}
  3862  		if err := f(x); err != nil {
  3863  			return err
  3864  		}
  3865  		if x.NextPageToken == "" {
  3866  			return nil
  3867  		}
  3868  		c.PageToken(x.NextPageToken)
  3869  	}
  3870  }
  3871  
  3872  type ProjectsLocationsEndpointPoliciesCreateCall struct {
  3873  	s              *Service
  3874  	parent         string
  3875  	endpointpolicy *EndpointPolicy
  3876  	urlParams_     gensupport.URLParams
  3877  	ctx_           context.Context
  3878  	header_        http.Header
  3879  }
  3880  
  3881  // Create: Creates a new EndpointPolicy in a given project and location.
  3882  //
  3883  //   - parent: The parent resource of the EndpointPolicy. Must be in the format
  3884  //     `projects/*/locations/global`.
  3885  func (r *ProjectsLocationsEndpointPoliciesService) Create(parent string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesCreateCall {
  3886  	c := &ProjectsLocationsEndpointPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3887  	c.parent = parent
  3888  	c.endpointpolicy = endpointpolicy
  3889  	return c
  3890  }
  3891  
  3892  // EndpointPolicyId sets the optional parameter "endpointPolicyId": Required.
  3893  // Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".
  3894  func (c *ProjectsLocationsEndpointPoliciesCreateCall) EndpointPolicyId(endpointPolicyId string) *ProjectsLocationsEndpointPoliciesCreateCall {
  3895  	c.urlParams_.Set("endpointPolicyId", endpointPolicyId)
  3896  	return c
  3897  }
  3898  
  3899  // Fields allows partial responses to be retrieved. See
  3900  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3901  // details.
  3902  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesCreateCall {
  3903  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3904  	return c
  3905  }
  3906  
  3907  // Context sets the context to be used in this call's Do method.
  3908  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesCreateCall {
  3909  	c.ctx_ = ctx
  3910  	return c
  3911  }
  3912  
  3913  // Header returns a http.Header that can be modified by the caller to add
  3914  // headers to the request.
  3915  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Header() http.Header {
  3916  	if c.header_ == nil {
  3917  		c.header_ = make(http.Header)
  3918  	}
  3919  	return c.header_
  3920  }
  3921  
  3922  func (c *ProjectsLocationsEndpointPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  3923  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3924  	var body io.Reader = nil
  3925  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpointpolicy)
  3926  	if err != nil {
  3927  		return nil, err
  3928  	}
  3929  	c.urlParams_.Set("alt", alt)
  3930  	c.urlParams_.Set("prettyPrint", "false")
  3931  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/endpointPolicies")
  3932  	urls += "?" + c.urlParams_.Encode()
  3933  	req, err := http.NewRequest("POST", urls, body)
  3934  	if err != nil {
  3935  		return nil, err
  3936  	}
  3937  	req.Header = reqHeaders
  3938  	googleapi.Expand(req.URL, map[string]string{
  3939  		"parent": c.parent,
  3940  	})
  3941  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3942  }
  3943  
  3944  // Do executes the "networkservices.projects.locations.endpointPolicies.create" call.
  3945  // Any non-2xx status code is an error. Response headers are in either
  3946  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  3947  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3948  // whether the returned error was because http.StatusNotModified was returned.
  3949  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3950  	gensupport.SetOptions(c.urlParams_, opts...)
  3951  	res, err := c.doRequest("json")
  3952  	if res != nil && res.StatusCode == http.StatusNotModified {
  3953  		if res.Body != nil {
  3954  			res.Body.Close()
  3955  		}
  3956  		return nil, gensupport.WrapError(&googleapi.Error{
  3957  			Code:   res.StatusCode,
  3958  			Header: res.Header,
  3959  		})
  3960  	}
  3961  	if err != nil {
  3962  		return nil, err
  3963  	}
  3964  	defer googleapi.CloseBody(res)
  3965  	if err := googleapi.CheckResponse(res); err != nil {
  3966  		return nil, gensupport.WrapError(err)
  3967  	}
  3968  	ret := &Operation{
  3969  		ServerResponse: googleapi.ServerResponse{
  3970  			Header:         res.Header,
  3971  			HTTPStatusCode: res.StatusCode,
  3972  		},
  3973  	}
  3974  	target := &ret
  3975  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3976  		return nil, err
  3977  	}
  3978  	return ret, nil
  3979  }
  3980  
  3981  type ProjectsLocationsEndpointPoliciesDeleteCall struct {
  3982  	s          *Service
  3983  	name       string
  3984  	urlParams_ gensupport.URLParams
  3985  	ctx_       context.Context
  3986  	header_    http.Header
  3987  }
  3988  
  3989  // Delete: Deletes a single EndpointPolicy.
  3990  //
  3991  //   - name: A name of the EndpointPolicy to delete. Must be in the format
  3992  //     `projects/*/locations/global/endpointPolicies/*`.
  3993  func (r *ProjectsLocationsEndpointPoliciesService) Delete(name string) *ProjectsLocationsEndpointPoliciesDeleteCall {
  3994  	c := &ProjectsLocationsEndpointPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3995  	c.name = name
  3996  	return c
  3997  }
  3998  
  3999  // Fields allows partial responses to be retrieved. See
  4000  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4001  // details.
  4002  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesDeleteCall {
  4003  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4004  	return c
  4005  }
  4006  
  4007  // Context sets the context to be used in this call's Do method.
  4008  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesDeleteCall {
  4009  	c.ctx_ = ctx
  4010  	return c
  4011  }
  4012  
  4013  // Header returns a http.Header that can be modified by the caller to add
  4014  // headers to the request.
  4015  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Header() http.Header {
  4016  	if c.header_ == nil {
  4017  		c.header_ = make(http.Header)
  4018  	}
  4019  	return c.header_
  4020  }
  4021  
  4022  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  4023  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4024  	var body io.Reader = nil
  4025  	c.urlParams_.Set("alt", alt)
  4026  	c.urlParams_.Set("prettyPrint", "false")
  4027  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4028  	urls += "?" + c.urlParams_.Encode()
  4029  	req, err := http.NewRequest("DELETE", urls, body)
  4030  	if err != nil {
  4031  		return nil, err
  4032  	}
  4033  	req.Header = reqHeaders
  4034  	googleapi.Expand(req.URL, map[string]string{
  4035  		"name": c.name,
  4036  	})
  4037  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4038  }
  4039  
  4040  // Do executes the "networkservices.projects.locations.endpointPolicies.delete" call.
  4041  // Any non-2xx status code is an error. Response headers are in either
  4042  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4043  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4044  // whether the returned error was because http.StatusNotModified was returned.
  4045  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4046  	gensupport.SetOptions(c.urlParams_, opts...)
  4047  	res, err := c.doRequest("json")
  4048  	if res != nil && res.StatusCode == http.StatusNotModified {
  4049  		if res.Body != nil {
  4050  			res.Body.Close()
  4051  		}
  4052  		return nil, gensupport.WrapError(&googleapi.Error{
  4053  			Code:   res.StatusCode,
  4054  			Header: res.Header,
  4055  		})
  4056  	}
  4057  	if err != nil {
  4058  		return nil, err
  4059  	}
  4060  	defer googleapi.CloseBody(res)
  4061  	if err := googleapi.CheckResponse(res); err != nil {
  4062  		return nil, gensupport.WrapError(err)
  4063  	}
  4064  	ret := &Operation{
  4065  		ServerResponse: googleapi.ServerResponse{
  4066  			Header:         res.Header,
  4067  			HTTPStatusCode: res.StatusCode,
  4068  		},
  4069  	}
  4070  	target := &ret
  4071  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4072  		return nil, err
  4073  	}
  4074  	return ret, nil
  4075  }
  4076  
  4077  type ProjectsLocationsEndpointPoliciesGetCall struct {
  4078  	s            *Service
  4079  	name         string
  4080  	urlParams_   gensupport.URLParams
  4081  	ifNoneMatch_ string
  4082  	ctx_         context.Context
  4083  	header_      http.Header
  4084  }
  4085  
  4086  // Get: Gets details of a single EndpointPolicy.
  4087  //
  4088  //   - name: A name of the EndpointPolicy to get. Must be in the format
  4089  //     `projects/*/locations/global/endpointPolicies/*`.
  4090  func (r *ProjectsLocationsEndpointPoliciesService) Get(name string) *ProjectsLocationsEndpointPoliciesGetCall {
  4091  	c := &ProjectsLocationsEndpointPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4092  	c.name = name
  4093  	return c
  4094  }
  4095  
  4096  // Fields allows partial responses to be retrieved. See
  4097  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4098  // details.
  4099  func (c *ProjectsLocationsEndpointPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetCall {
  4100  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4101  	return c
  4102  }
  4103  
  4104  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4105  // object's ETag matches the given value. This is useful for getting updates
  4106  // only after the object has changed since the last request.
  4107  func (c *ProjectsLocationsEndpointPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetCall {
  4108  	c.ifNoneMatch_ = entityTag
  4109  	return c
  4110  }
  4111  
  4112  // Context sets the context to be used in this call's Do method.
  4113  func (c *ProjectsLocationsEndpointPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetCall {
  4114  	c.ctx_ = ctx
  4115  	return c
  4116  }
  4117  
  4118  // Header returns a http.Header that can be modified by the caller to add
  4119  // headers to the request.
  4120  func (c *ProjectsLocationsEndpointPoliciesGetCall) Header() http.Header {
  4121  	if c.header_ == nil {
  4122  		c.header_ = make(http.Header)
  4123  	}
  4124  	return c.header_
  4125  }
  4126  
  4127  func (c *ProjectsLocationsEndpointPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  4128  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4129  	if c.ifNoneMatch_ != "" {
  4130  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4131  	}
  4132  	var body io.Reader = nil
  4133  	c.urlParams_.Set("alt", alt)
  4134  	c.urlParams_.Set("prettyPrint", "false")
  4135  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4136  	urls += "?" + c.urlParams_.Encode()
  4137  	req, err := http.NewRequest("GET", urls, body)
  4138  	if err != nil {
  4139  		return nil, err
  4140  	}
  4141  	req.Header = reqHeaders
  4142  	googleapi.Expand(req.URL, map[string]string{
  4143  		"name": c.name,
  4144  	})
  4145  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4146  }
  4147  
  4148  // Do executes the "networkservices.projects.locations.endpointPolicies.get" call.
  4149  // Any non-2xx status code is an error. Response headers are in either
  4150  // *EndpointPolicy.ServerResponse.Header or (if a response was returned at all)
  4151  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4152  // whether the returned error was because http.StatusNotModified was returned.
  4153  func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOption) (*EndpointPolicy, error) {
  4154  	gensupport.SetOptions(c.urlParams_, opts...)
  4155  	res, err := c.doRequest("json")
  4156  	if res != nil && res.StatusCode == http.StatusNotModified {
  4157  		if res.Body != nil {
  4158  			res.Body.Close()
  4159  		}
  4160  		return nil, gensupport.WrapError(&googleapi.Error{
  4161  			Code:   res.StatusCode,
  4162  			Header: res.Header,
  4163  		})
  4164  	}
  4165  	if err != nil {
  4166  		return nil, err
  4167  	}
  4168  	defer googleapi.CloseBody(res)
  4169  	if err := googleapi.CheckResponse(res); err != nil {
  4170  		return nil, gensupport.WrapError(err)
  4171  	}
  4172  	ret := &EndpointPolicy{
  4173  		ServerResponse: googleapi.ServerResponse{
  4174  			Header:         res.Header,
  4175  			HTTPStatusCode: res.StatusCode,
  4176  		},
  4177  	}
  4178  	target := &ret
  4179  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4180  		return nil, err
  4181  	}
  4182  	return ret, nil
  4183  }
  4184  
  4185  type ProjectsLocationsEndpointPoliciesGetIamPolicyCall struct {
  4186  	s            *Service
  4187  	resource     string
  4188  	urlParams_   gensupport.URLParams
  4189  	ifNoneMatch_ string
  4190  	ctx_         context.Context
  4191  	header_      http.Header
  4192  }
  4193  
  4194  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4195  // empty policy if the resource exists and does not have a policy set.
  4196  //
  4197  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4198  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4199  //     for the appropriate value for this field.
  4200  func (r *ProjectsLocationsEndpointPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  4201  	c := &ProjectsLocationsEndpointPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4202  	c.resource = resource
  4203  	return c
  4204  }
  4205  
  4206  // OptionsRequestedPolicyVersion sets the optional parameter
  4207  // "options.requestedPolicyVersion": The maximum policy version that will be
  4208  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4209  // an invalid value will be rejected. Requests for policies with any
  4210  // conditional role bindings must specify version 3. Policies with no
  4211  // conditional role bindings may specify any valid value or leave the field
  4212  // unset. The policy in the response might use the policy version that you
  4213  // specified, or it might use a lower policy version. For example, if you
  4214  // specify version 3, but the policy has no conditional role bindings, the
  4215  // response uses version 1. To learn which resources support conditions in
  4216  // their IAM policies, see the IAM documentation
  4217  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4218  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  4219  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4220  	return c
  4221  }
  4222  
  4223  // Fields allows partial responses to be retrieved. See
  4224  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4225  // details.
  4226  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  4227  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4228  	return c
  4229  }
  4230  
  4231  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4232  // object's ETag matches the given value. This is useful for getting updates
  4233  // only after the object has changed since the last request.
  4234  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  4235  	c.ifNoneMatch_ = entityTag
  4236  	return c
  4237  }
  4238  
  4239  // Context sets the context to be used in this call's Do method.
  4240  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  4241  	c.ctx_ = ctx
  4242  	return c
  4243  }
  4244  
  4245  // Header returns a http.Header that can be modified by the caller to add
  4246  // headers to the request.
  4247  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Header() http.Header {
  4248  	if c.header_ == nil {
  4249  		c.header_ = make(http.Header)
  4250  	}
  4251  	return c.header_
  4252  }
  4253  
  4254  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4255  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4256  	if c.ifNoneMatch_ != "" {
  4257  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4258  	}
  4259  	var body io.Reader = nil
  4260  	c.urlParams_.Set("alt", alt)
  4261  	c.urlParams_.Set("prettyPrint", "false")
  4262  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  4263  	urls += "?" + c.urlParams_.Encode()
  4264  	req, err := http.NewRequest("GET", urls, body)
  4265  	if err != nil {
  4266  		return nil, err
  4267  	}
  4268  	req.Header = reqHeaders
  4269  	googleapi.Expand(req.URL, map[string]string{
  4270  		"resource": c.resource,
  4271  	})
  4272  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4273  }
  4274  
  4275  // Do executes the "networkservices.projects.locations.endpointPolicies.getIamPolicy" call.
  4276  // Any non-2xx status code is an error. Response headers are in either
  4277  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4278  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4279  // whether the returned error was because http.StatusNotModified was returned.
  4280  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4281  	gensupport.SetOptions(c.urlParams_, opts...)
  4282  	res, err := c.doRequest("json")
  4283  	if res != nil && res.StatusCode == http.StatusNotModified {
  4284  		if res.Body != nil {
  4285  			res.Body.Close()
  4286  		}
  4287  		return nil, gensupport.WrapError(&googleapi.Error{
  4288  			Code:   res.StatusCode,
  4289  			Header: res.Header,
  4290  		})
  4291  	}
  4292  	if err != nil {
  4293  		return nil, err
  4294  	}
  4295  	defer googleapi.CloseBody(res)
  4296  	if err := googleapi.CheckResponse(res); err != nil {
  4297  		return nil, gensupport.WrapError(err)
  4298  	}
  4299  	ret := &Policy{
  4300  		ServerResponse: googleapi.ServerResponse{
  4301  			Header:         res.Header,
  4302  			HTTPStatusCode: res.StatusCode,
  4303  		},
  4304  	}
  4305  	target := &ret
  4306  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4307  		return nil, err
  4308  	}
  4309  	return ret, nil
  4310  }
  4311  
  4312  type ProjectsLocationsEndpointPoliciesListCall struct {
  4313  	s            *Service
  4314  	parent       string
  4315  	urlParams_   gensupport.URLParams
  4316  	ifNoneMatch_ string
  4317  	ctx_         context.Context
  4318  	header_      http.Header
  4319  }
  4320  
  4321  // List: Lists EndpointPolicies in a given project and location.
  4322  //
  4323  //   - parent: The project and location from which the EndpointPolicies should be
  4324  //     listed, specified in the format `projects/*/locations/global`.
  4325  func (r *ProjectsLocationsEndpointPoliciesService) List(parent string) *ProjectsLocationsEndpointPoliciesListCall {
  4326  	c := &ProjectsLocationsEndpointPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4327  	c.parent = parent
  4328  	return c
  4329  }
  4330  
  4331  // PageSize sets the optional parameter "pageSize": Maximum number of
  4332  // EndpointPolicies to return per call.
  4333  func (c *ProjectsLocationsEndpointPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointPoliciesListCall {
  4334  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4335  	return c
  4336  }
  4337  
  4338  // PageToken sets the optional parameter "pageToken": The value returned by the
  4339  // last `ListEndpointPoliciesResponse` Indicates that this is a continuation of
  4340  // a prior `ListEndpointPolicies` call, and that the system should return the
  4341  // next page of data.
  4342  func (c *ProjectsLocationsEndpointPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsEndpointPoliciesListCall {
  4343  	c.urlParams_.Set("pageToken", pageToken)
  4344  	return c
  4345  }
  4346  
  4347  // Fields allows partial responses to be retrieved. See
  4348  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4349  // details.
  4350  func (c *ProjectsLocationsEndpointPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesListCall {
  4351  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4352  	return c
  4353  }
  4354  
  4355  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4356  // object's ETag matches the given value. This is useful for getting updates
  4357  // only after the object has changed since the last request.
  4358  func (c *ProjectsLocationsEndpointPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesListCall {
  4359  	c.ifNoneMatch_ = entityTag
  4360  	return c
  4361  }
  4362  
  4363  // Context sets the context to be used in this call's Do method.
  4364  func (c *ProjectsLocationsEndpointPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesListCall {
  4365  	c.ctx_ = ctx
  4366  	return c
  4367  }
  4368  
  4369  // Header returns a http.Header that can be modified by the caller to add
  4370  // headers to the request.
  4371  func (c *ProjectsLocationsEndpointPoliciesListCall) Header() http.Header {
  4372  	if c.header_ == nil {
  4373  		c.header_ = make(http.Header)
  4374  	}
  4375  	return c.header_
  4376  }
  4377  
  4378  func (c *ProjectsLocationsEndpointPoliciesListCall) doRequest(alt string) (*http.Response, error) {
  4379  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4380  	if c.ifNoneMatch_ != "" {
  4381  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4382  	}
  4383  	var body io.Reader = nil
  4384  	c.urlParams_.Set("alt", alt)
  4385  	c.urlParams_.Set("prettyPrint", "false")
  4386  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/endpointPolicies")
  4387  	urls += "?" + c.urlParams_.Encode()
  4388  	req, err := http.NewRequest("GET", urls, body)
  4389  	if err != nil {
  4390  		return nil, err
  4391  	}
  4392  	req.Header = reqHeaders
  4393  	googleapi.Expand(req.URL, map[string]string{
  4394  		"parent": c.parent,
  4395  	})
  4396  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4397  }
  4398  
  4399  // Do executes the "networkservices.projects.locations.endpointPolicies.list" call.
  4400  // Any non-2xx status code is an error. Response headers are in either
  4401  // *ListEndpointPoliciesResponse.ServerResponse.Header or (if a response was
  4402  // returned at all) in error.(*googleapi.Error).Header. Use
  4403  // googleapi.IsNotModified to check whether the returned error was because
  4404  // http.StatusNotModified was returned.
  4405  func (c *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListEndpointPoliciesResponse, error) {
  4406  	gensupport.SetOptions(c.urlParams_, opts...)
  4407  	res, err := c.doRequest("json")
  4408  	if res != nil && res.StatusCode == http.StatusNotModified {
  4409  		if res.Body != nil {
  4410  			res.Body.Close()
  4411  		}
  4412  		return nil, gensupport.WrapError(&googleapi.Error{
  4413  			Code:   res.StatusCode,
  4414  			Header: res.Header,
  4415  		})
  4416  	}
  4417  	if err != nil {
  4418  		return nil, err
  4419  	}
  4420  	defer googleapi.CloseBody(res)
  4421  	if err := googleapi.CheckResponse(res); err != nil {
  4422  		return nil, gensupport.WrapError(err)
  4423  	}
  4424  	ret := &ListEndpointPoliciesResponse{
  4425  		ServerResponse: googleapi.ServerResponse{
  4426  			Header:         res.Header,
  4427  			HTTPStatusCode: res.StatusCode,
  4428  		},
  4429  	}
  4430  	target := &ret
  4431  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4432  		return nil, err
  4433  	}
  4434  	return ret, nil
  4435  }
  4436  
  4437  // Pages invokes f for each page of results.
  4438  // A non-nil error returned from f will halt the iteration.
  4439  // The provided context supersedes any context provided to the Context method.
  4440  func (c *ProjectsLocationsEndpointPoliciesListCall) Pages(ctx context.Context, f func(*ListEndpointPoliciesResponse) error) error {
  4441  	c.ctx_ = ctx
  4442  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4443  	for {
  4444  		x, err := c.Do()
  4445  		if err != nil {
  4446  			return err
  4447  		}
  4448  		if err := f(x); err != nil {
  4449  			return err
  4450  		}
  4451  		if x.NextPageToken == "" {
  4452  			return nil
  4453  		}
  4454  		c.PageToken(x.NextPageToken)
  4455  	}
  4456  }
  4457  
  4458  type ProjectsLocationsEndpointPoliciesPatchCall struct {
  4459  	s              *Service
  4460  	name           string
  4461  	endpointpolicy *EndpointPolicy
  4462  	urlParams_     gensupport.URLParams
  4463  	ctx_           context.Context
  4464  	header_        http.Header
  4465  }
  4466  
  4467  // Patch: Updates the parameters of a single EndpointPolicy.
  4468  //
  4469  //   - name: Name of the EndpointPolicy resource. It matches pattern
  4470  //     `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
  4471  func (r *ProjectsLocationsEndpointPoliciesService) Patch(name string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesPatchCall {
  4472  	c := &ProjectsLocationsEndpointPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4473  	c.name = name
  4474  	c.endpointpolicy = endpointpolicy
  4475  	return c
  4476  }
  4477  
  4478  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  4479  // specify the fields to be overwritten in the EndpointPolicy resource by the
  4480  // update. The fields specified in the update_mask are relative to the
  4481  // resource, not the full request. A field will be overwritten if it is in the
  4482  // mask. If the user does not provide a mask then all fields will be
  4483  // overwritten.
  4484  func (c *ProjectsLocationsEndpointPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointPoliciesPatchCall {
  4485  	c.urlParams_.Set("updateMask", updateMask)
  4486  	return c
  4487  }
  4488  
  4489  // Fields allows partial responses to be retrieved. See
  4490  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4491  // details.
  4492  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesPatchCall {
  4493  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4494  	return c
  4495  }
  4496  
  4497  // Context sets the context to be used in this call's Do method.
  4498  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesPatchCall {
  4499  	c.ctx_ = ctx
  4500  	return c
  4501  }
  4502  
  4503  // Header returns a http.Header that can be modified by the caller to add
  4504  // headers to the request.
  4505  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Header() http.Header {
  4506  	if c.header_ == nil {
  4507  		c.header_ = make(http.Header)
  4508  	}
  4509  	return c.header_
  4510  }
  4511  
  4512  func (c *ProjectsLocationsEndpointPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  4513  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4514  	var body io.Reader = nil
  4515  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpointpolicy)
  4516  	if err != nil {
  4517  		return nil, err
  4518  	}
  4519  	c.urlParams_.Set("alt", alt)
  4520  	c.urlParams_.Set("prettyPrint", "false")
  4521  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4522  	urls += "?" + c.urlParams_.Encode()
  4523  	req, err := http.NewRequest("PATCH", urls, body)
  4524  	if err != nil {
  4525  		return nil, err
  4526  	}
  4527  	req.Header = reqHeaders
  4528  	googleapi.Expand(req.URL, map[string]string{
  4529  		"name": c.name,
  4530  	})
  4531  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4532  }
  4533  
  4534  // Do executes the "networkservices.projects.locations.endpointPolicies.patch" call.
  4535  // Any non-2xx status code is an error. Response headers are in either
  4536  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4537  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4538  // whether the returned error was because http.StatusNotModified was returned.
  4539  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4540  	gensupport.SetOptions(c.urlParams_, opts...)
  4541  	res, err := c.doRequest("json")
  4542  	if res != nil && res.StatusCode == http.StatusNotModified {
  4543  		if res.Body != nil {
  4544  			res.Body.Close()
  4545  		}
  4546  		return nil, gensupport.WrapError(&googleapi.Error{
  4547  			Code:   res.StatusCode,
  4548  			Header: res.Header,
  4549  		})
  4550  	}
  4551  	if err != nil {
  4552  		return nil, err
  4553  	}
  4554  	defer googleapi.CloseBody(res)
  4555  	if err := googleapi.CheckResponse(res); err != nil {
  4556  		return nil, gensupport.WrapError(err)
  4557  	}
  4558  	ret := &Operation{
  4559  		ServerResponse: googleapi.ServerResponse{
  4560  			Header:         res.Header,
  4561  			HTTPStatusCode: res.StatusCode,
  4562  		},
  4563  	}
  4564  	target := &ret
  4565  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4566  		return nil, err
  4567  	}
  4568  	return ret, nil
  4569  }
  4570  
  4571  type ProjectsLocationsEndpointPoliciesSetIamPolicyCall struct {
  4572  	s                   *Service
  4573  	resource            string
  4574  	setiampolicyrequest *SetIamPolicyRequest
  4575  	urlParams_          gensupport.URLParams
  4576  	ctx_                context.Context
  4577  	header_             http.Header
  4578  }
  4579  
  4580  // SetIamPolicy: Sets the access control policy on the specified resource.
  4581  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4582  // and `PERMISSION_DENIED` errors.
  4583  //
  4584  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4585  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4586  //     for the appropriate value for this field.
  4587  func (r *ProjectsLocationsEndpointPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
  4588  	c := &ProjectsLocationsEndpointPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4589  	c.resource = resource
  4590  	c.setiampolicyrequest = setiampolicyrequest
  4591  	return c
  4592  }
  4593  
  4594  // Fields allows partial responses to be retrieved. See
  4595  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4596  // details.
  4597  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
  4598  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4599  	return c
  4600  }
  4601  
  4602  // Context sets the context to be used in this call's Do method.
  4603  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
  4604  	c.ctx_ = ctx
  4605  	return c
  4606  }
  4607  
  4608  // Header returns a http.Header that can be modified by the caller to add
  4609  // headers to the request.
  4610  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Header() http.Header {
  4611  	if c.header_ == nil {
  4612  		c.header_ = make(http.Header)
  4613  	}
  4614  	return c.header_
  4615  }
  4616  
  4617  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4618  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4619  	var body io.Reader = nil
  4620  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4621  	if err != nil {
  4622  		return nil, err
  4623  	}
  4624  	c.urlParams_.Set("alt", alt)
  4625  	c.urlParams_.Set("prettyPrint", "false")
  4626  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  4627  	urls += "?" + c.urlParams_.Encode()
  4628  	req, err := http.NewRequest("POST", urls, body)
  4629  	if err != nil {
  4630  		return nil, err
  4631  	}
  4632  	req.Header = reqHeaders
  4633  	googleapi.Expand(req.URL, map[string]string{
  4634  		"resource": c.resource,
  4635  	})
  4636  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4637  }
  4638  
  4639  // Do executes the "networkservices.projects.locations.endpointPolicies.setIamPolicy" call.
  4640  // Any non-2xx status code is an error. Response headers are in either
  4641  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4642  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4643  // whether the returned error was because http.StatusNotModified was returned.
  4644  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4645  	gensupport.SetOptions(c.urlParams_, opts...)
  4646  	res, err := c.doRequest("json")
  4647  	if res != nil && res.StatusCode == http.StatusNotModified {
  4648  		if res.Body != nil {
  4649  			res.Body.Close()
  4650  		}
  4651  		return nil, gensupport.WrapError(&googleapi.Error{
  4652  			Code:   res.StatusCode,
  4653  			Header: res.Header,
  4654  		})
  4655  	}
  4656  	if err != nil {
  4657  		return nil, err
  4658  	}
  4659  	defer googleapi.CloseBody(res)
  4660  	if err := googleapi.CheckResponse(res); err != nil {
  4661  		return nil, gensupport.WrapError(err)
  4662  	}
  4663  	ret := &Policy{
  4664  		ServerResponse: googleapi.ServerResponse{
  4665  			Header:         res.Header,
  4666  			HTTPStatusCode: res.StatusCode,
  4667  		},
  4668  	}
  4669  	target := &ret
  4670  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4671  		return nil, err
  4672  	}
  4673  	return ret, nil
  4674  }
  4675  
  4676  type ProjectsLocationsEndpointPoliciesTestIamPermissionsCall struct {
  4677  	s                         *Service
  4678  	resource                  string
  4679  	testiampermissionsrequest *TestIamPermissionsRequest
  4680  	urlParams_                gensupport.URLParams
  4681  	ctx_                      context.Context
  4682  	header_                   http.Header
  4683  }
  4684  
  4685  // TestIamPermissions: Returns permissions that a caller has on the specified
  4686  // resource. If the resource does not exist, this will return an empty set of
  4687  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4688  // used for building permission-aware UIs and command-line tools, not for
  4689  // authorization checking. This operation may "fail open" without warning.
  4690  //
  4691  //   - resource: REQUIRED: The resource for which the policy detail is being
  4692  //     requested. See Resource names
  4693  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4694  //     value for this field.
  4695  func (r *ProjectsLocationsEndpointPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
  4696  	c := &ProjectsLocationsEndpointPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4697  	c.resource = resource
  4698  	c.testiampermissionsrequest = testiampermissionsrequest
  4699  	return c
  4700  }
  4701  
  4702  // Fields allows partial responses to be retrieved. See
  4703  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4704  // details.
  4705  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
  4706  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4707  	return c
  4708  }
  4709  
  4710  // Context sets the context to be used in this call's Do method.
  4711  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
  4712  	c.ctx_ = ctx
  4713  	return c
  4714  }
  4715  
  4716  // Header returns a http.Header that can be modified by the caller to add
  4717  // headers to the request.
  4718  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Header() http.Header {
  4719  	if c.header_ == nil {
  4720  		c.header_ = make(http.Header)
  4721  	}
  4722  	return c.header_
  4723  }
  4724  
  4725  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4726  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4727  	var body io.Reader = nil
  4728  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4729  	if err != nil {
  4730  		return nil, err
  4731  	}
  4732  	c.urlParams_.Set("alt", alt)
  4733  	c.urlParams_.Set("prettyPrint", "false")
  4734  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  4735  	urls += "?" + c.urlParams_.Encode()
  4736  	req, err := http.NewRequest("POST", urls, body)
  4737  	if err != nil {
  4738  		return nil, err
  4739  	}
  4740  	req.Header = reqHeaders
  4741  	googleapi.Expand(req.URL, map[string]string{
  4742  		"resource": c.resource,
  4743  	})
  4744  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4745  }
  4746  
  4747  // Do executes the "networkservices.projects.locations.endpointPolicies.testIamPermissions" call.
  4748  // Any non-2xx status code is an error. Response headers are in either
  4749  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4750  // returned at all) in error.(*googleapi.Error).Header. Use
  4751  // googleapi.IsNotModified to check whether the returned error was because
  4752  // http.StatusNotModified was returned.
  4753  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4754  	gensupport.SetOptions(c.urlParams_, opts...)
  4755  	res, err := c.doRequest("json")
  4756  	if res != nil && res.StatusCode == http.StatusNotModified {
  4757  		if res.Body != nil {
  4758  			res.Body.Close()
  4759  		}
  4760  		return nil, gensupport.WrapError(&googleapi.Error{
  4761  			Code:   res.StatusCode,
  4762  			Header: res.Header,
  4763  		})
  4764  	}
  4765  	if err != nil {
  4766  		return nil, err
  4767  	}
  4768  	defer googleapi.CloseBody(res)
  4769  	if err := googleapi.CheckResponse(res); err != nil {
  4770  		return nil, gensupport.WrapError(err)
  4771  	}
  4772  	ret := &TestIamPermissionsResponse{
  4773  		ServerResponse: googleapi.ServerResponse{
  4774  			Header:         res.Header,
  4775  			HTTPStatusCode: res.StatusCode,
  4776  		},
  4777  	}
  4778  	target := &ret
  4779  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4780  		return nil, err
  4781  	}
  4782  	return ret, nil
  4783  }
  4784  
  4785  type ProjectsLocationsGatewaysCreateCall struct {
  4786  	s          *Service
  4787  	parent     string
  4788  	gateway    *Gateway
  4789  	urlParams_ gensupport.URLParams
  4790  	ctx_       context.Context
  4791  	header_    http.Header
  4792  }
  4793  
  4794  // Create: Creates a new Gateway in a given project and location.
  4795  //
  4796  //   - parent: The parent resource of the Gateway. Must be in the format
  4797  //     `projects/*/locations/*`.
  4798  func (r *ProjectsLocationsGatewaysService) Create(parent string, gateway *Gateway) *ProjectsLocationsGatewaysCreateCall {
  4799  	c := &ProjectsLocationsGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4800  	c.parent = parent
  4801  	c.gateway = gateway
  4802  	return c
  4803  }
  4804  
  4805  // GatewayId sets the optional parameter "gatewayId": Required. Short name of
  4806  // the Gateway resource to be created.
  4807  func (c *ProjectsLocationsGatewaysCreateCall) GatewayId(gatewayId string) *ProjectsLocationsGatewaysCreateCall {
  4808  	c.urlParams_.Set("gatewayId", gatewayId)
  4809  	return c
  4810  }
  4811  
  4812  // Fields allows partial responses to be retrieved. See
  4813  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4814  // details.
  4815  func (c *ProjectsLocationsGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysCreateCall {
  4816  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4817  	return c
  4818  }
  4819  
  4820  // Context sets the context to be used in this call's Do method.
  4821  func (c *ProjectsLocationsGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaysCreateCall {
  4822  	c.ctx_ = ctx
  4823  	return c
  4824  }
  4825  
  4826  // Header returns a http.Header that can be modified by the caller to add
  4827  // headers to the request.
  4828  func (c *ProjectsLocationsGatewaysCreateCall) Header() http.Header {
  4829  	if c.header_ == nil {
  4830  		c.header_ = make(http.Header)
  4831  	}
  4832  	return c.header_
  4833  }
  4834  
  4835  func (c *ProjectsLocationsGatewaysCreateCall) doRequest(alt string) (*http.Response, error) {
  4836  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4837  	var body io.Reader = nil
  4838  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.gateway)
  4839  	if err != nil {
  4840  		return nil, err
  4841  	}
  4842  	c.urlParams_.Set("alt", alt)
  4843  	c.urlParams_.Set("prettyPrint", "false")
  4844  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gateways")
  4845  	urls += "?" + c.urlParams_.Encode()
  4846  	req, err := http.NewRequest("POST", urls, body)
  4847  	if err != nil {
  4848  		return nil, err
  4849  	}
  4850  	req.Header = reqHeaders
  4851  	googleapi.Expand(req.URL, map[string]string{
  4852  		"parent": c.parent,
  4853  	})
  4854  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4855  }
  4856  
  4857  // Do executes the "networkservices.projects.locations.gateways.create" call.
  4858  // Any non-2xx status code is an error. Response headers are in either
  4859  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4860  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4861  // whether the returned error was because http.StatusNotModified was returned.
  4862  func (c *ProjectsLocationsGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4863  	gensupport.SetOptions(c.urlParams_, opts...)
  4864  	res, err := c.doRequest("json")
  4865  	if res != nil && res.StatusCode == http.StatusNotModified {
  4866  		if res.Body != nil {
  4867  			res.Body.Close()
  4868  		}
  4869  		return nil, gensupport.WrapError(&googleapi.Error{
  4870  			Code:   res.StatusCode,
  4871  			Header: res.Header,
  4872  		})
  4873  	}
  4874  	if err != nil {
  4875  		return nil, err
  4876  	}
  4877  	defer googleapi.CloseBody(res)
  4878  	if err := googleapi.CheckResponse(res); err != nil {
  4879  		return nil, gensupport.WrapError(err)
  4880  	}
  4881  	ret := &Operation{
  4882  		ServerResponse: googleapi.ServerResponse{
  4883  			Header:         res.Header,
  4884  			HTTPStatusCode: res.StatusCode,
  4885  		},
  4886  	}
  4887  	target := &ret
  4888  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4889  		return nil, err
  4890  	}
  4891  	return ret, nil
  4892  }
  4893  
  4894  type ProjectsLocationsGatewaysDeleteCall struct {
  4895  	s          *Service
  4896  	name       string
  4897  	urlParams_ gensupport.URLParams
  4898  	ctx_       context.Context
  4899  	header_    http.Header
  4900  }
  4901  
  4902  // Delete: Deletes a single Gateway.
  4903  //
  4904  //   - name: A name of the Gateway to delete. Must be in the format
  4905  //     `projects/*/locations/*/gateways/*`.
  4906  func (r *ProjectsLocationsGatewaysService) Delete(name string) *ProjectsLocationsGatewaysDeleteCall {
  4907  	c := &ProjectsLocationsGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4908  	c.name = name
  4909  	return c
  4910  }
  4911  
  4912  // Fields allows partial responses to be retrieved. See
  4913  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4914  // details.
  4915  func (c *ProjectsLocationsGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysDeleteCall {
  4916  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4917  	return c
  4918  }
  4919  
  4920  // Context sets the context to be used in this call's Do method.
  4921  func (c *ProjectsLocationsGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaysDeleteCall {
  4922  	c.ctx_ = ctx
  4923  	return c
  4924  }
  4925  
  4926  // Header returns a http.Header that can be modified by the caller to add
  4927  // headers to the request.
  4928  func (c *ProjectsLocationsGatewaysDeleteCall) Header() http.Header {
  4929  	if c.header_ == nil {
  4930  		c.header_ = make(http.Header)
  4931  	}
  4932  	return c.header_
  4933  }
  4934  
  4935  func (c *ProjectsLocationsGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
  4936  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4937  	var body io.Reader = nil
  4938  	c.urlParams_.Set("alt", alt)
  4939  	c.urlParams_.Set("prettyPrint", "false")
  4940  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  4941  	urls += "?" + c.urlParams_.Encode()
  4942  	req, err := http.NewRequest("DELETE", urls, body)
  4943  	if err != nil {
  4944  		return nil, err
  4945  	}
  4946  	req.Header = reqHeaders
  4947  	googleapi.Expand(req.URL, map[string]string{
  4948  		"name": c.name,
  4949  	})
  4950  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4951  }
  4952  
  4953  // Do executes the "networkservices.projects.locations.gateways.delete" call.
  4954  // Any non-2xx status code is an error. Response headers are in either
  4955  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  4956  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4957  // whether the returned error was because http.StatusNotModified was returned.
  4958  func (c *ProjectsLocationsGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  4959  	gensupport.SetOptions(c.urlParams_, opts...)
  4960  	res, err := c.doRequest("json")
  4961  	if res != nil && res.StatusCode == http.StatusNotModified {
  4962  		if res.Body != nil {
  4963  			res.Body.Close()
  4964  		}
  4965  		return nil, gensupport.WrapError(&googleapi.Error{
  4966  			Code:   res.StatusCode,
  4967  			Header: res.Header,
  4968  		})
  4969  	}
  4970  	if err != nil {
  4971  		return nil, err
  4972  	}
  4973  	defer googleapi.CloseBody(res)
  4974  	if err := googleapi.CheckResponse(res); err != nil {
  4975  		return nil, gensupport.WrapError(err)
  4976  	}
  4977  	ret := &Operation{
  4978  		ServerResponse: googleapi.ServerResponse{
  4979  			Header:         res.Header,
  4980  			HTTPStatusCode: res.StatusCode,
  4981  		},
  4982  	}
  4983  	target := &ret
  4984  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4985  		return nil, err
  4986  	}
  4987  	return ret, nil
  4988  }
  4989  
  4990  type ProjectsLocationsGatewaysGetCall struct {
  4991  	s            *Service
  4992  	name         string
  4993  	urlParams_   gensupport.URLParams
  4994  	ifNoneMatch_ string
  4995  	ctx_         context.Context
  4996  	header_      http.Header
  4997  }
  4998  
  4999  // Get: Gets details of a single Gateway.
  5000  //
  5001  //   - name: A name of the Gateway to get. Must be in the format
  5002  //     `projects/*/locations/*/gateways/*`.
  5003  func (r *ProjectsLocationsGatewaysService) Get(name string) *ProjectsLocationsGatewaysGetCall {
  5004  	c := &ProjectsLocationsGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5005  	c.name = name
  5006  	return c
  5007  }
  5008  
  5009  // Fields allows partial responses to be retrieved. See
  5010  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5011  // details.
  5012  func (c *ProjectsLocationsGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetCall {
  5013  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5014  	return c
  5015  }
  5016  
  5017  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5018  // object's ETag matches the given value. This is useful for getting updates
  5019  // only after the object has changed since the last request.
  5020  func (c *ProjectsLocationsGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetCall {
  5021  	c.ifNoneMatch_ = entityTag
  5022  	return c
  5023  }
  5024  
  5025  // Context sets the context to be used in this call's Do method.
  5026  func (c *ProjectsLocationsGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetCall {
  5027  	c.ctx_ = ctx
  5028  	return c
  5029  }
  5030  
  5031  // Header returns a http.Header that can be modified by the caller to add
  5032  // headers to the request.
  5033  func (c *ProjectsLocationsGatewaysGetCall) Header() http.Header {
  5034  	if c.header_ == nil {
  5035  		c.header_ = make(http.Header)
  5036  	}
  5037  	return c.header_
  5038  }
  5039  
  5040  func (c *ProjectsLocationsGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
  5041  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5042  	if c.ifNoneMatch_ != "" {
  5043  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5044  	}
  5045  	var body io.Reader = nil
  5046  	c.urlParams_.Set("alt", alt)
  5047  	c.urlParams_.Set("prettyPrint", "false")
  5048  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5049  	urls += "?" + c.urlParams_.Encode()
  5050  	req, err := http.NewRequest("GET", urls, body)
  5051  	if err != nil {
  5052  		return nil, err
  5053  	}
  5054  	req.Header = reqHeaders
  5055  	googleapi.Expand(req.URL, map[string]string{
  5056  		"name": c.name,
  5057  	})
  5058  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5059  }
  5060  
  5061  // Do executes the "networkservices.projects.locations.gateways.get" call.
  5062  // Any non-2xx status code is an error. Response headers are in either
  5063  // *Gateway.ServerResponse.Header or (if a response was returned at all) in
  5064  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5065  // whether the returned error was because http.StatusNotModified was returned.
  5066  func (c *ProjectsLocationsGatewaysGetCall) Do(opts ...googleapi.CallOption) (*Gateway, error) {
  5067  	gensupport.SetOptions(c.urlParams_, opts...)
  5068  	res, err := c.doRequest("json")
  5069  	if res != nil && res.StatusCode == http.StatusNotModified {
  5070  		if res.Body != nil {
  5071  			res.Body.Close()
  5072  		}
  5073  		return nil, gensupport.WrapError(&googleapi.Error{
  5074  			Code:   res.StatusCode,
  5075  			Header: res.Header,
  5076  		})
  5077  	}
  5078  	if err != nil {
  5079  		return nil, err
  5080  	}
  5081  	defer googleapi.CloseBody(res)
  5082  	if err := googleapi.CheckResponse(res); err != nil {
  5083  		return nil, gensupport.WrapError(err)
  5084  	}
  5085  	ret := &Gateway{
  5086  		ServerResponse: googleapi.ServerResponse{
  5087  			Header:         res.Header,
  5088  			HTTPStatusCode: res.StatusCode,
  5089  		},
  5090  	}
  5091  	target := &ret
  5092  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5093  		return nil, err
  5094  	}
  5095  	return ret, nil
  5096  }
  5097  
  5098  type ProjectsLocationsGatewaysGetIamPolicyCall struct {
  5099  	s            *Service
  5100  	resource     string
  5101  	urlParams_   gensupport.URLParams
  5102  	ifNoneMatch_ string
  5103  	ctx_         context.Context
  5104  	header_      http.Header
  5105  }
  5106  
  5107  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  5108  // empty policy if the resource exists and does not have a policy set.
  5109  //
  5110  //   - resource: REQUIRED: The resource for which the policy is being requested.
  5111  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5112  //     for the appropriate value for this field.
  5113  func (r *ProjectsLocationsGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsGatewaysGetIamPolicyCall {
  5114  	c := &ProjectsLocationsGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5115  	c.resource = resource
  5116  	return c
  5117  }
  5118  
  5119  // OptionsRequestedPolicyVersion sets the optional parameter
  5120  // "options.requestedPolicyVersion": The maximum policy version that will be
  5121  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  5122  // an invalid value will be rejected. Requests for policies with any
  5123  // conditional role bindings must specify version 3. Policies with no
  5124  // conditional role bindings may specify any valid value or leave the field
  5125  // unset. The policy in the response might use the policy version that you
  5126  // specified, or it might use a lower policy version. For example, if you
  5127  // specify version 3, but the policy has no conditional role bindings, the
  5128  // response uses version 1. To learn which resources support conditions in
  5129  // their IAM policies, see the IAM documentation
  5130  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  5131  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGatewaysGetIamPolicyCall {
  5132  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  5133  	return c
  5134  }
  5135  
  5136  // Fields allows partial responses to be retrieved. See
  5137  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5138  // details.
  5139  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetIamPolicyCall {
  5140  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5141  	return c
  5142  }
  5143  
  5144  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5145  // object's ETag matches the given value. This is useful for getting updates
  5146  // only after the object has changed since the last request.
  5147  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetIamPolicyCall {
  5148  	c.ifNoneMatch_ = entityTag
  5149  	return c
  5150  }
  5151  
  5152  // Context sets the context to be used in this call's Do method.
  5153  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetIamPolicyCall {
  5154  	c.ctx_ = ctx
  5155  	return c
  5156  }
  5157  
  5158  // Header returns a http.Header that can be modified by the caller to add
  5159  // headers to the request.
  5160  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Header() http.Header {
  5161  	if c.header_ == nil {
  5162  		c.header_ = make(http.Header)
  5163  	}
  5164  	return c.header_
  5165  }
  5166  
  5167  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5168  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5169  	if c.ifNoneMatch_ != "" {
  5170  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5171  	}
  5172  	var body io.Reader = nil
  5173  	c.urlParams_.Set("alt", alt)
  5174  	c.urlParams_.Set("prettyPrint", "false")
  5175  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  5176  	urls += "?" + c.urlParams_.Encode()
  5177  	req, err := http.NewRequest("GET", urls, body)
  5178  	if err != nil {
  5179  		return nil, err
  5180  	}
  5181  	req.Header = reqHeaders
  5182  	googleapi.Expand(req.URL, map[string]string{
  5183  		"resource": c.resource,
  5184  	})
  5185  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5186  }
  5187  
  5188  // Do executes the "networkservices.projects.locations.gateways.getIamPolicy" call.
  5189  // Any non-2xx status code is an error. Response headers are in either
  5190  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5191  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5192  // whether the returned error was because http.StatusNotModified was returned.
  5193  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5194  	gensupport.SetOptions(c.urlParams_, opts...)
  5195  	res, err := c.doRequest("json")
  5196  	if res != nil && res.StatusCode == http.StatusNotModified {
  5197  		if res.Body != nil {
  5198  			res.Body.Close()
  5199  		}
  5200  		return nil, gensupport.WrapError(&googleapi.Error{
  5201  			Code:   res.StatusCode,
  5202  			Header: res.Header,
  5203  		})
  5204  	}
  5205  	if err != nil {
  5206  		return nil, err
  5207  	}
  5208  	defer googleapi.CloseBody(res)
  5209  	if err := googleapi.CheckResponse(res); err != nil {
  5210  		return nil, gensupport.WrapError(err)
  5211  	}
  5212  	ret := &Policy{
  5213  		ServerResponse: googleapi.ServerResponse{
  5214  			Header:         res.Header,
  5215  			HTTPStatusCode: res.StatusCode,
  5216  		},
  5217  	}
  5218  	target := &ret
  5219  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5220  		return nil, err
  5221  	}
  5222  	return ret, nil
  5223  }
  5224  
  5225  type ProjectsLocationsGatewaysListCall struct {
  5226  	s            *Service
  5227  	parent       string
  5228  	urlParams_   gensupport.URLParams
  5229  	ifNoneMatch_ string
  5230  	ctx_         context.Context
  5231  	header_      http.Header
  5232  }
  5233  
  5234  // List: Lists Gateways in a given project and location.
  5235  //
  5236  //   - parent: The project and location from which the Gateways should be listed,
  5237  //     specified in the format `projects/*/locations/*`.
  5238  func (r *ProjectsLocationsGatewaysService) List(parent string) *ProjectsLocationsGatewaysListCall {
  5239  	c := &ProjectsLocationsGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5240  	c.parent = parent
  5241  	return c
  5242  }
  5243  
  5244  // PageSize sets the optional parameter "pageSize": Maximum number of Gateways
  5245  // to return per call.
  5246  func (c *ProjectsLocationsGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysListCall {
  5247  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5248  	return c
  5249  }
  5250  
  5251  // PageToken sets the optional parameter "pageToken": The value returned by the
  5252  // last `ListGatewaysResponse` Indicates that this is a continuation of a prior
  5253  // `ListGateways` call, and that the system should return the next page of
  5254  // data.
  5255  func (c *ProjectsLocationsGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysListCall {
  5256  	c.urlParams_.Set("pageToken", pageToken)
  5257  	return c
  5258  }
  5259  
  5260  // Fields allows partial responses to be retrieved. See
  5261  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5262  // details.
  5263  func (c *ProjectsLocationsGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysListCall {
  5264  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5265  	return c
  5266  }
  5267  
  5268  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5269  // object's ETag matches the given value. This is useful for getting updates
  5270  // only after the object has changed since the last request.
  5271  func (c *ProjectsLocationsGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysListCall {
  5272  	c.ifNoneMatch_ = entityTag
  5273  	return c
  5274  }
  5275  
  5276  // Context sets the context to be used in this call's Do method.
  5277  func (c *ProjectsLocationsGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysListCall {
  5278  	c.ctx_ = ctx
  5279  	return c
  5280  }
  5281  
  5282  // Header returns a http.Header that can be modified by the caller to add
  5283  // headers to the request.
  5284  func (c *ProjectsLocationsGatewaysListCall) Header() http.Header {
  5285  	if c.header_ == nil {
  5286  		c.header_ = make(http.Header)
  5287  	}
  5288  	return c.header_
  5289  }
  5290  
  5291  func (c *ProjectsLocationsGatewaysListCall) doRequest(alt string) (*http.Response, error) {
  5292  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5293  	if c.ifNoneMatch_ != "" {
  5294  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5295  	}
  5296  	var body io.Reader = nil
  5297  	c.urlParams_.Set("alt", alt)
  5298  	c.urlParams_.Set("prettyPrint", "false")
  5299  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gateways")
  5300  	urls += "?" + c.urlParams_.Encode()
  5301  	req, err := http.NewRequest("GET", urls, body)
  5302  	if err != nil {
  5303  		return nil, err
  5304  	}
  5305  	req.Header = reqHeaders
  5306  	googleapi.Expand(req.URL, map[string]string{
  5307  		"parent": c.parent,
  5308  	})
  5309  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5310  }
  5311  
  5312  // Do executes the "networkservices.projects.locations.gateways.list" call.
  5313  // Any non-2xx status code is an error. Response headers are in either
  5314  // *ListGatewaysResponse.ServerResponse.Header or (if a response was returned
  5315  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5316  // check whether the returned error was because http.StatusNotModified was
  5317  // returned.
  5318  func (c *ProjectsLocationsGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListGatewaysResponse, error) {
  5319  	gensupport.SetOptions(c.urlParams_, opts...)
  5320  	res, err := c.doRequest("json")
  5321  	if res != nil && res.StatusCode == http.StatusNotModified {
  5322  		if res.Body != nil {
  5323  			res.Body.Close()
  5324  		}
  5325  		return nil, gensupport.WrapError(&googleapi.Error{
  5326  			Code:   res.StatusCode,
  5327  			Header: res.Header,
  5328  		})
  5329  	}
  5330  	if err != nil {
  5331  		return nil, err
  5332  	}
  5333  	defer googleapi.CloseBody(res)
  5334  	if err := googleapi.CheckResponse(res); err != nil {
  5335  		return nil, gensupport.WrapError(err)
  5336  	}
  5337  	ret := &ListGatewaysResponse{
  5338  		ServerResponse: googleapi.ServerResponse{
  5339  			Header:         res.Header,
  5340  			HTTPStatusCode: res.StatusCode,
  5341  		},
  5342  	}
  5343  	target := &ret
  5344  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5345  		return nil, err
  5346  	}
  5347  	return ret, nil
  5348  }
  5349  
  5350  // Pages invokes f for each page of results.
  5351  // A non-nil error returned from f will halt the iteration.
  5352  // The provided context supersedes any context provided to the Context method.
  5353  func (c *ProjectsLocationsGatewaysListCall) Pages(ctx context.Context, f func(*ListGatewaysResponse) error) error {
  5354  	c.ctx_ = ctx
  5355  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5356  	for {
  5357  		x, err := c.Do()
  5358  		if err != nil {
  5359  			return err
  5360  		}
  5361  		if err := f(x); err != nil {
  5362  			return err
  5363  		}
  5364  		if x.NextPageToken == "" {
  5365  			return nil
  5366  		}
  5367  		c.PageToken(x.NextPageToken)
  5368  	}
  5369  }
  5370  
  5371  type ProjectsLocationsGatewaysPatchCall struct {
  5372  	s          *Service
  5373  	name       string
  5374  	gateway    *Gateway
  5375  	urlParams_ gensupport.URLParams
  5376  	ctx_       context.Context
  5377  	header_    http.Header
  5378  }
  5379  
  5380  // Patch: Updates the parameters of a single Gateway.
  5381  //
  5382  //   - name: Name of the Gateway resource. It matches pattern
  5383  //     `projects/*/locations/*/gateways/`.
  5384  func (r *ProjectsLocationsGatewaysService) Patch(name string, gateway *Gateway) *ProjectsLocationsGatewaysPatchCall {
  5385  	c := &ProjectsLocationsGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5386  	c.name = name
  5387  	c.gateway = gateway
  5388  	return c
  5389  }
  5390  
  5391  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  5392  // specify the fields to be overwritten in the Gateway resource by the update.
  5393  // The fields specified in the update_mask are relative to the resource, not
  5394  // the full request. A field will be overwritten if it is in the mask. If the
  5395  // user does not provide a mask then all fields will be overwritten.
  5396  func (c *ProjectsLocationsGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaysPatchCall {
  5397  	c.urlParams_.Set("updateMask", updateMask)
  5398  	return c
  5399  }
  5400  
  5401  // Fields allows partial responses to be retrieved. See
  5402  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5403  // details.
  5404  func (c *ProjectsLocationsGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysPatchCall {
  5405  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5406  	return c
  5407  }
  5408  
  5409  // Context sets the context to be used in this call's Do method.
  5410  func (c *ProjectsLocationsGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaysPatchCall {
  5411  	c.ctx_ = ctx
  5412  	return c
  5413  }
  5414  
  5415  // Header returns a http.Header that can be modified by the caller to add
  5416  // headers to the request.
  5417  func (c *ProjectsLocationsGatewaysPatchCall) Header() http.Header {
  5418  	if c.header_ == nil {
  5419  		c.header_ = make(http.Header)
  5420  	}
  5421  	return c.header_
  5422  }
  5423  
  5424  func (c *ProjectsLocationsGatewaysPatchCall) doRequest(alt string) (*http.Response, error) {
  5425  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5426  	var body io.Reader = nil
  5427  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.gateway)
  5428  	if err != nil {
  5429  		return nil, err
  5430  	}
  5431  	c.urlParams_.Set("alt", alt)
  5432  	c.urlParams_.Set("prettyPrint", "false")
  5433  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5434  	urls += "?" + c.urlParams_.Encode()
  5435  	req, err := http.NewRequest("PATCH", urls, body)
  5436  	if err != nil {
  5437  		return nil, err
  5438  	}
  5439  	req.Header = reqHeaders
  5440  	googleapi.Expand(req.URL, map[string]string{
  5441  		"name": c.name,
  5442  	})
  5443  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5444  }
  5445  
  5446  // Do executes the "networkservices.projects.locations.gateways.patch" call.
  5447  // Any non-2xx status code is an error. Response headers are in either
  5448  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5449  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5450  // whether the returned error was because http.StatusNotModified was returned.
  5451  func (c *ProjectsLocationsGatewaysPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5452  	gensupport.SetOptions(c.urlParams_, opts...)
  5453  	res, err := c.doRequest("json")
  5454  	if res != nil && res.StatusCode == http.StatusNotModified {
  5455  		if res.Body != nil {
  5456  			res.Body.Close()
  5457  		}
  5458  		return nil, gensupport.WrapError(&googleapi.Error{
  5459  			Code:   res.StatusCode,
  5460  			Header: res.Header,
  5461  		})
  5462  	}
  5463  	if err != nil {
  5464  		return nil, err
  5465  	}
  5466  	defer googleapi.CloseBody(res)
  5467  	if err := googleapi.CheckResponse(res); err != nil {
  5468  		return nil, gensupport.WrapError(err)
  5469  	}
  5470  	ret := &Operation{
  5471  		ServerResponse: googleapi.ServerResponse{
  5472  			Header:         res.Header,
  5473  			HTTPStatusCode: res.StatusCode,
  5474  		},
  5475  	}
  5476  	target := &ret
  5477  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5478  		return nil, err
  5479  	}
  5480  	return ret, nil
  5481  }
  5482  
  5483  type ProjectsLocationsGatewaysSetIamPolicyCall struct {
  5484  	s                   *Service
  5485  	resource            string
  5486  	setiampolicyrequest *SetIamPolicyRequest
  5487  	urlParams_          gensupport.URLParams
  5488  	ctx_                context.Context
  5489  	header_             http.Header
  5490  }
  5491  
  5492  // SetIamPolicy: Sets the access control policy on the specified resource.
  5493  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  5494  // and `PERMISSION_DENIED` errors.
  5495  //
  5496  //   - resource: REQUIRED: The resource for which the policy is being specified.
  5497  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5498  //     for the appropriate value for this field.
  5499  func (r *ProjectsLocationsGatewaysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGatewaysSetIamPolicyCall {
  5500  	c := &ProjectsLocationsGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5501  	c.resource = resource
  5502  	c.setiampolicyrequest = setiampolicyrequest
  5503  	return c
  5504  }
  5505  
  5506  // Fields allows partial responses to be retrieved. See
  5507  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5508  // details.
  5509  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysSetIamPolicyCall {
  5510  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5511  	return c
  5512  }
  5513  
  5514  // Context sets the context to be used in this call's Do method.
  5515  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysSetIamPolicyCall {
  5516  	c.ctx_ = ctx
  5517  	return c
  5518  }
  5519  
  5520  // Header returns a http.Header that can be modified by the caller to add
  5521  // headers to the request.
  5522  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Header() http.Header {
  5523  	if c.header_ == nil {
  5524  		c.header_ = make(http.Header)
  5525  	}
  5526  	return c.header_
  5527  }
  5528  
  5529  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5530  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5531  	var body io.Reader = nil
  5532  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5533  	if err != nil {
  5534  		return nil, err
  5535  	}
  5536  	c.urlParams_.Set("alt", alt)
  5537  	c.urlParams_.Set("prettyPrint", "false")
  5538  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  5539  	urls += "?" + c.urlParams_.Encode()
  5540  	req, err := http.NewRequest("POST", urls, body)
  5541  	if err != nil {
  5542  		return nil, err
  5543  	}
  5544  	req.Header = reqHeaders
  5545  	googleapi.Expand(req.URL, map[string]string{
  5546  		"resource": c.resource,
  5547  	})
  5548  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5549  }
  5550  
  5551  // Do executes the "networkservices.projects.locations.gateways.setIamPolicy" call.
  5552  // Any non-2xx status code is an error. Response headers are in either
  5553  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5554  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5555  // whether the returned error was because http.StatusNotModified was returned.
  5556  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5557  	gensupport.SetOptions(c.urlParams_, opts...)
  5558  	res, err := c.doRequest("json")
  5559  	if res != nil && res.StatusCode == http.StatusNotModified {
  5560  		if res.Body != nil {
  5561  			res.Body.Close()
  5562  		}
  5563  		return nil, gensupport.WrapError(&googleapi.Error{
  5564  			Code:   res.StatusCode,
  5565  			Header: res.Header,
  5566  		})
  5567  	}
  5568  	if err != nil {
  5569  		return nil, err
  5570  	}
  5571  	defer googleapi.CloseBody(res)
  5572  	if err := googleapi.CheckResponse(res); err != nil {
  5573  		return nil, gensupport.WrapError(err)
  5574  	}
  5575  	ret := &Policy{
  5576  		ServerResponse: googleapi.ServerResponse{
  5577  			Header:         res.Header,
  5578  			HTTPStatusCode: res.StatusCode,
  5579  		},
  5580  	}
  5581  	target := &ret
  5582  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5583  		return nil, err
  5584  	}
  5585  	return ret, nil
  5586  }
  5587  
  5588  type ProjectsLocationsGatewaysTestIamPermissionsCall struct {
  5589  	s                         *Service
  5590  	resource                  string
  5591  	testiampermissionsrequest *TestIamPermissionsRequest
  5592  	urlParams_                gensupport.URLParams
  5593  	ctx_                      context.Context
  5594  	header_                   http.Header
  5595  }
  5596  
  5597  // TestIamPermissions: Returns permissions that a caller has on the specified
  5598  // resource. If the resource does not exist, this will return an empty set of
  5599  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  5600  // used for building permission-aware UIs and command-line tools, not for
  5601  // authorization checking. This operation may "fail open" without warning.
  5602  //
  5603  //   - resource: REQUIRED: The resource for which the policy detail is being
  5604  //     requested. See Resource names
  5605  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5606  //     value for this field.
  5607  func (r *ProjectsLocationsGatewaysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  5608  	c := &ProjectsLocationsGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5609  	c.resource = resource
  5610  	c.testiampermissionsrequest = testiampermissionsrequest
  5611  	return c
  5612  }
  5613  
  5614  // Fields allows partial responses to be retrieved. See
  5615  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5616  // details.
  5617  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  5618  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5619  	return c
  5620  }
  5621  
  5622  // Context sets the context to be used in this call's Do method.
  5623  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  5624  	c.ctx_ = ctx
  5625  	return c
  5626  }
  5627  
  5628  // Header returns a http.Header that can be modified by the caller to add
  5629  // headers to the request.
  5630  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Header() http.Header {
  5631  	if c.header_ == nil {
  5632  		c.header_ = make(http.Header)
  5633  	}
  5634  	return c.header_
  5635  }
  5636  
  5637  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5638  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5639  	var body io.Reader = nil
  5640  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5641  	if err != nil {
  5642  		return nil, err
  5643  	}
  5644  	c.urlParams_.Set("alt", alt)
  5645  	c.urlParams_.Set("prettyPrint", "false")
  5646  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  5647  	urls += "?" + c.urlParams_.Encode()
  5648  	req, err := http.NewRequest("POST", urls, body)
  5649  	if err != nil {
  5650  		return nil, err
  5651  	}
  5652  	req.Header = reqHeaders
  5653  	googleapi.Expand(req.URL, map[string]string{
  5654  		"resource": c.resource,
  5655  	})
  5656  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5657  }
  5658  
  5659  // Do executes the "networkservices.projects.locations.gateways.testIamPermissions" call.
  5660  // Any non-2xx status code is an error. Response headers are in either
  5661  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  5662  // returned at all) in error.(*googleapi.Error).Header. Use
  5663  // googleapi.IsNotModified to check whether the returned error was because
  5664  // http.StatusNotModified was returned.
  5665  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5666  	gensupport.SetOptions(c.urlParams_, opts...)
  5667  	res, err := c.doRequest("json")
  5668  	if res != nil && res.StatusCode == http.StatusNotModified {
  5669  		if res.Body != nil {
  5670  			res.Body.Close()
  5671  		}
  5672  		return nil, gensupport.WrapError(&googleapi.Error{
  5673  			Code:   res.StatusCode,
  5674  			Header: res.Header,
  5675  		})
  5676  	}
  5677  	if err != nil {
  5678  		return nil, err
  5679  	}
  5680  	defer googleapi.CloseBody(res)
  5681  	if err := googleapi.CheckResponse(res); err != nil {
  5682  		return nil, gensupport.WrapError(err)
  5683  	}
  5684  	ret := &TestIamPermissionsResponse{
  5685  		ServerResponse: googleapi.ServerResponse{
  5686  			Header:         res.Header,
  5687  			HTTPStatusCode: res.StatusCode,
  5688  		},
  5689  	}
  5690  	target := &ret
  5691  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5692  		return nil, err
  5693  	}
  5694  	return ret, nil
  5695  }
  5696  
  5697  type ProjectsLocationsGrpcRoutesCreateCall struct {
  5698  	s          *Service
  5699  	parent     string
  5700  	grpcroute  *GrpcRoute
  5701  	urlParams_ gensupport.URLParams
  5702  	ctx_       context.Context
  5703  	header_    http.Header
  5704  }
  5705  
  5706  // Create: Creates a new GrpcRoute in a given project and location.
  5707  //
  5708  //   - parent: The parent resource of the GrpcRoute. Must be in the format
  5709  //     `projects/*/locations/global`.
  5710  func (r *ProjectsLocationsGrpcRoutesService) Create(parent string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesCreateCall {
  5711  	c := &ProjectsLocationsGrpcRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5712  	c.parent = parent
  5713  	c.grpcroute = grpcroute
  5714  	return c
  5715  }
  5716  
  5717  // GrpcRouteId sets the optional parameter "grpcRouteId": Required. Short name
  5718  // of the GrpcRoute resource to be created.
  5719  func (c *ProjectsLocationsGrpcRoutesCreateCall) GrpcRouteId(grpcRouteId string) *ProjectsLocationsGrpcRoutesCreateCall {
  5720  	c.urlParams_.Set("grpcRouteId", grpcRouteId)
  5721  	return c
  5722  }
  5723  
  5724  // Fields allows partial responses to be retrieved. See
  5725  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5726  // details.
  5727  func (c *ProjectsLocationsGrpcRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesCreateCall {
  5728  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5729  	return c
  5730  }
  5731  
  5732  // Context sets the context to be used in this call's Do method.
  5733  func (c *ProjectsLocationsGrpcRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesCreateCall {
  5734  	c.ctx_ = ctx
  5735  	return c
  5736  }
  5737  
  5738  // Header returns a http.Header that can be modified by the caller to add
  5739  // headers to the request.
  5740  func (c *ProjectsLocationsGrpcRoutesCreateCall) Header() http.Header {
  5741  	if c.header_ == nil {
  5742  		c.header_ = make(http.Header)
  5743  	}
  5744  	return c.header_
  5745  }
  5746  
  5747  func (c *ProjectsLocationsGrpcRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
  5748  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5749  	var body io.Reader = nil
  5750  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.grpcroute)
  5751  	if err != nil {
  5752  		return nil, err
  5753  	}
  5754  	c.urlParams_.Set("alt", alt)
  5755  	c.urlParams_.Set("prettyPrint", "false")
  5756  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/grpcRoutes")
  5757  	urls += "?" + c.urlParams_.Encode()
  5758  	req, err := http.NewRequest("POST", urls, body)
  5759  	if err != nil {
  5760  		return nil, err
  5761  	}
  5762  	req.Header = reqHeaders
  5763  	googleapi.Expand(req.URL, map[string]string{
  5764  		"parent": c.parent,
  5765  	})
  5766  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5767  }
  5768  
  5769  // Do executes the "networkservices.projects.locations.grpcRoutes.create" call.
  5770  // Any non-2xx status code is an error. Response headers are in either
  5771  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5772  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5773  // whether the returned error was because http.StatusNotModified was returned.
  5774  func (c *ProjectsLocationsGrpcRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5775  	gensupport.SetOptions(c.urlParams_, opts...)
  5776  	res, err := c.doRequest("json")
  5777  	if res != nil && res.StatusCode == http.StatusNotModified {
  5778  		if res.Body != nil {
  5779  			res.Body.Close()
  5780  		}
  5781  		return nil, gensupport.WrapError(&googleapi.Error{
  5782  			Code:   res.StatusCode,
  5783  			Header: res.Header,
  5784  		})
  5785  	}
  5786  	if err != nil {
  5787  		return nil, err
  5788  	}
  5789  	defer googleapi.CloseBody(res)
  5790  	if err := googleapi.CheckResponse(res); err != nil {
  5791  		return nil, gensupport.WrapError(err)
  5792  	}
  5793  	ret := &Operation{
  5794  		ServerResponse: googleapi.ServerResponse{
  5795  			Header:         res.Header,
  5796  			HTTPStatusCode: res.StatusCode,
  5797  		},
  5798  	}
  5799  	target := &ret
  5800  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5801  		return nil, err
  5802  	}
  5803  	return ret, nil
  5804  }
  5805  
  5806  type ProjectsLocationsGrpcRoutesDeleteCall struct {
  5807  	s          *Service
  5808  	name       string
  5809  	urlParams_ gensupport.URLParams
  5810  	ctx_       context.Context
  5811  	header_    http.Header
  5812  }
  5813  
  5814  // Delete: Deletes a single GrpcRoute.
  5815  //
  5816  //   - name: A name of the GrpcRoute to delete. Must be in the format
  5817  //     `projects/*/locations/global/grpcRoutes/*`.
  5818  func (r *ProjectsLocationsGrpcRoutesService) Delete(name string) *ProjectsLocationsGrpcRoutesDeleteCall {
  5819  	c := &ProjectsLocationsGrpcRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5820  	c.name = name
  5821  	return c
  5822  }
  5823  
  5824  // Fields allows partial responses to be retrieved. See
  5825  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5826  // details.
  5827  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesDeleteCall {
  5828  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5829  	return c
  5830  }
  5831  
  5832  // Context sets the context to be used in this call's Do method.
  5833  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesDeleteCall {
  5834  	c.ctx_ = ctx
  5835  	return c
  5836  }
  5837  
  5838  // Header returns a http.Header that can be modified by the caller to add
  5839  // headers to the request.
  5840  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Header() http.Header {
  5841  	if c.header_ == nil {
  5842  		c.header_ = make(http.Header)
  5843  	}
  5844  	return c.header_
  5845  }
  5846  
  5847  func (c *ProjectsLocationsGrpcRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5848  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5849  	var body io.Reader = nil
  5850  	c.urlParams_.Set("alt", alt)
  5851  	c.urlParams_.Set("prettyPrint", "false")
  5852  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5853  	urls += "?" + c.urlParams_.Encode()
  5854  	req, err := http.NewRequest("DELETE", urls, body)
  5855  	if err != nil {
  5856  		return nil, err
  5857  	}
  5858  	req.Header = reqHeaders
  5859  	googleapi.Expand(req.URL, map[string]string{
  5860  		"name": c.name,
  5861  	})
  5862  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5863  }
  5864  
  5865  // Do executes the "networkservices.projects.locations.grpcRoutes.delete" call.
  5866  // Any non-2xx status code is an error. Response headers are in either
  5867  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5868  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5869  // whether the returned error was because http.StatusNotModified was returned.
  5870  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5871  	gensupport.SetOptions(c.urlParams_, opts...)
  5872  	res, err := c.doRequest("json")
  5873  	if res != nil && res.StatusCode == http.StatusNotModified {
  5874  		if res.Body != nil {
  5875  			res.Body.Close()
  5876  		}
  5877  		return nil, gensupport.WrapError(&googleapi.Error{
  5878  			Code:   res.StatusCode,
  5879  			Header: res.Header,
  5880  		})
  5881  	}
  5882  	if err != nil {
  5883  		return nil, err
  5884  	}
  5885  	defer googleapi.CloseBody(res)
  5886  	if err := googleapi.CheckResponse(res); err != nil {
  5887  		return nil, gensupport.WrapError(err)
  5888  	}
  5889  	ret := &Operation{
  5890  		ServerResponse: googleapi.ServerResponse{
  5891  			Header:         res.Header,
  5892  			HTTPStatusCode: res.StatusCode,
  5893  		},
  5894  	}
  5895  	target := &ret
  5896  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5897  		return nil, err
  5898  	}
  5899  	return ret, nil
  5900  }
  5901  
  5902  type ProjectsLocationsGrpcRoutesGetCall struct {
  5903  	s            *Service
  5904  	name         string
  5905  	urlParams_   gensupport.URLParams
  5906  	ifNoneMatch_ string
  5907  	ctx_         context.Context
  5908  	header_      http.Header
  5909  }
  5910  
  5911  // Get: Gets details of a single GrpcRoute.
  5912  //
  5913  //   - name: A name of the GrpcRoute to get. Must be in the format
  5914  //     `projects/*/locations/global/grpcRoutes/*`.
  5915  func (r *ProjectsLocationsGrpcRoutesService) Get(name string) *ProjectsLocationsGrpcRoutesGetCall {
  5916  	c := &ProjectsLocationsGrpcRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5917  	c.name = name
  5918  	return c
  5919  }
  5920  
  5921  // Fields allows partial responses to be retrieved. See
  5922  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5923  // details.
  5924  func (c *ProjectsLocationsGrpcRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesGetCall {
  5925  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5926  	return c
  5927  }
  5928  
  5929  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5930  // object's ETag matches the given value. This is useful for getting updates
  5931  // only after the object has changed since the last request.
  5932  func (c *ProjectsLocationsGrpcRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesGetCall {
  5933  	c.ifNoneMatch_ = entityTag
  5934  	return c
  5935  }
  5936  
  5937  // Context sets the context to be used in this call's Do method.
  5938  func (c *ProjectsLocationsGrpcRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesGetCall {
  5939  	c.ctx_ = ctx
  5940  	return c
  5941  }
  5942  
  5943  // Header returns a http.Header that can be modified by the caller to add
  5944  // headers to the request.
  5945  func (c *ProjectsLocationsGrpcRoutesGetCall) Header() http.Header {
  5946  	if c.header_ == nil {
  5947  		c.header_ = make(http.Header)
  5948  	}
  5949  	return c.header_
  5950  }
  5951  
  5952  func (c *ProjectsLocationsGrpcRoutesGetCall) doRequest(alt string) (*http.Response, error) {
  5953  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5954  	if c.ifNoneMatch_ != "" {
  5955  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5956  	}
  5957  	var body io.Reader = nil
  5958  	c.urlParams_.Set("alt", alt)
  5959  	c.urlParams_.Set("prettyPrint", "false")
  5960  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  5961  	urls += "?" + c.urlParams_.Encode()
  5962  	req, err := http.NewRequest("GET", urls, body)
  5963  	if err != nil {
  5964  		return nil, err
  5965  	}
  5966  	req.Header = reqHeaders
  5967  	googleapi.Expand(req.URL, map[string]string{
  5968  		"name": c.name,
  5969  	})
  5970  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5971  }
  5972  
  5973  // Do executes the "networkservices.projects.locations.grpcRoutes.get" call.
  5974  // Any non-2xx status code is an error. Response headers are in either
  5975  // *GrpcRoute.ServerResponse.Header or (if a response was returned at all) in
  5976  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5977  // whether the returned error was because http.StatusNotModified was returned.
  5978  func (c *ProjectsLocationsGrpcRoutesGetCall) Do(opts ...googleapi.CallOption) (*GrpcRoute, error) {
  5979  	gensupport.SetOptions(c.urlParams_, opts...)
  5980  	res, err := c.doRequest("json")
  5981  	if res != nil && res.StatusCode == http.StatusNotModified {
  5982  		if res.Body != nil {
  5983  			res.Body.Close()
  5984  		}
  5985  		return nil, gensupport.WrapError(&googleapi.Error{
  5986  			Code:   res.StatusCode,
  5987  			Header: res.Header,
  5988  		})
  5989  	}
  5990  	if err != nil {
  5991  		return nil, err
  5992  	}
  5993  	defer googleapi.CloseBody(res)
  5994  	if err := googleapi.CheckResponse(res); err != nil {
  5995  		return nil, gensupport.WrapError(err)
  5996  	}
  5997  	ret := &GrpcRoute{
  5998  		ServerResponse: googleapi.ServerResponse{
  5999  			Header:         res.Header,
  6000  			HTTPStatusCode: res.StatusCode,
  6001  		},
  6002  	}
  6003  	target := &ret
  6004  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6005  		return nil, err
  6006  	}
  6007  	return ret, nil
  6008  }
  6009  
  6010  type ProjectsLocationsGrpcRoutesListCall struct {
  6011  	s            *Service
  6012  	parent       string
  6013  	urlParams_   gensupport.URLParams
  6014  	ifNoneMatch_ string
  6015  	ctx_         context.Context
  6016  	header_      http.Header
  6017  }
  6018  
  6019  // List: Lists GrpcRoutes in a given project and location.
  6020  //
  6021  //   - parent: The project and location from which the GrpcRoutes should be
  6022  //     listed, specified in the format `projects/*/locations/global`.
  6023  func (r *ProjectsLocationsGrpcRoutesService) List(parent string) *ProjectsLocationsGrpcRoutesListCall {
  6024  	c := &ProjectsLocationsGrpcRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6025  	c.parent = parent
  6026  	return c
  6027  }
  6028  
  6029  // PageSize sets the optional parameter "pageSize": Maximum number of
  6030  // GrpcRoutes to return per call.
  6031  func (c *ProjectsLocationsGrpcRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGrpcRoutesListCall {
  6032  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6033  	return c
  6034  }
  6035  
  6036  // PageToken sets the optional parameter "pageToken": The value returned by the
  6037  // last `ListGrpcRoutesResponse` Indicates that this is a continuation of a
  6038  // prior `ListGrpcRoutes` call, and that the system should return the next page
  6039  // of data.
  6040  func (c *ProjectsLocationsGrpcRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGrpcRoutesListCall {
  6041  	c.urlParams_.Set("pageToken", pageToken)
  6042  	return c
  6043  }
  6044  
  6045  // Fields allows partial responses to be retrieved. See
  6046  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6047  // details.
  6048  func (c *ProjectsLocationsGrpcRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesListCall {
  6049  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6050  	return c
  6051  }
  6052  
  6053  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6054  // object's ETag matches the given value. This is useful for getting updates
  6055  // only after the object has changed since the last request.
  6056  func (c *ProjectsLocationsGrpcRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesListCall {
  6057  	c.ifNoneMatch_ = entityTag
  6058  	return c
  6059  }
  6060  
  6061  // Context sets the context to be used in this call's Do method.
  6062  func (c *ProjectsLocationsGrpcRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesListCall {
  6063  	c.ctx_ = ctx
  6064  	return c
  6065  }
  6066  
  6067  // Header returns a http.Header that can be modified by the caller to add
  6068  // headers to the request.
  6069  func (c *ProjectsLocationsGrpcRoutesListCall) Header() http.Header {
  6070  	if c.header_ == nil {
  6071  		c.header_ = make(http.Header)
  6072  	}
  6073  	return c.header_
  6074  }
  6075  
  6076  func (c *ProjectsLocationsGrpcRoutesListCall) doRequest(alt string) (*http.Response, error) {
  6077  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6078  	if c.ifNoneMatch_ != "" {
  6079  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6080  	}
  6081  	var body io.Reader = nil
  6082  	c.urlParams_.Set("alt", alt)
  6083  	c.urlParams_.Set("prettyPrint", "false")
  6084  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/grpcRoutes")
  6085  	urls += "?" + c.urlParams_.Encode()
  6086  	req, err := http.NewRequest("GET", urls, body)
  6087  	if err != nil {
  6088  		return nil, err
  6089  	}
  6090  	req.Header = reqHeaders
  6091  	googleapi.Expand(req.URL, map[string]string{
  6092  		"parent": c.parent,
  6093  	})
  6094  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6095  }
  6096  
  6097  // Do executes the "networkservices.projects.locations.grpcRoutes.list" call.
  6098  // Any non-2xx status code is an error. Response headers are in either
  6099  // *ListGrpcRoutesResponse.ServerResponse.Header or (if a response was returned
  6100  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6101  // check whether the returned error was because http.StatusNotModified was
  6102  // returned.
  6103  func (c *ProjectsLocationsGrpcRoutesListCall) Do(opts ...googleapi.CallOption) (*ListGrpcRoutesResponse, error) {
  6104  	gensupport.SetOptions(c.urlParams_, opts...)
  6105  	res, err := c.doRequest("json")
  6106  	if res != nil && res.StatusCode == http.StatusNotModified {
  6107  		if res.Body != nil {
  6108  			res.Body.Close()
  6109  		}
  6110  		return nil, gensupport.WrapError(&googleapi.Error{
  6111  			Code:   res.StatusCode,
  6112  			Header: res.Header,
  6113  		})
  6114  	}
  6115  	if err != nil {
  6116  		return nil, err
  6117  	}
  6118  	defer googleapi.CloseBody(res)
  6119  	if err := googleapi.CheckResponse(res); err != nil {
  6120  		return nil, gensupport.WrapError(err)
  6121  	}
  6122  	ret := &ListGrpcRoutesResponse{
  6123  		ServerResponse: googleapi.ServerResponse{
  6124  			Header:         res.Header,
  6125  			HTTPStatusCode: res.StatusCode,
  6126  		},
  6127  	}
  6128  	target := &ret
  6129  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6130  		return nil, err
  6131  	}
  6132  	return ret, nil
  6133  }
  6134  
  6135  // Pages invokes f for each page of results.
  6136  // A non-nil error returned from f will halt the iteration.
  6137  // The provided context supersedes any context provided to the Context method.
  6138  func (c *ProjectsLocationsGrpcRoutesListCall) Pages(ctx context.Context, f func(*ListGrpcRoutesResponse) error) error {
  6139  	c.ctx_ = ctx
  6140  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6141  	for {
  6142  		x, err := c.Do()
  6143  		if err != nil {
  6144  			return err
  6145  		}
  6146  		if err := f(x); err != nil {
  6147  			return err
  6148  		}
  6149  		if x.NextPageToken == "" {
  6150  			return nil
  6151  		}
  6152  		c.PageToken(x.NextPageToken)
  6153  	}
  6154  }
  6155  
  6156  type ProjectsLocationsGrpcRoutesPatchCall struct {
  6157  	s          *Service
  6158  	name       string
  6159  	grpcroute  *GrpcRoute
  6160  	urlParams_ gensupport.URLParams
  6161  	ctx_       context.Context
  6162  	header_    http.Header
  6163  }
  6164  
  6165  // Patch: Updates the parameters of a single GrpcRoute.
  6166  //
  6167  //   - name: Name of the GrpcRoute resource. It matches pattern
  6168  //     `projects/*/locations/global/grpcRoutes/`.
  6169  func (r *ProjectsLocationsGrpcRoutesService) Patch(name string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesPatchCall {
  6170  	c := &ProjectsLocationsGrpcRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6171  	c.name = name
  6172  	c.grpcroute = grpcroute
  6173  	return c
  6174  }
  6175  
  6176  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  6177  // specify the fields to be overwritten in the GrpcRoute resource by the
  6178  // update. The fields specified in the update_mask are relative to the
  6179  // resource, not the full request. A field will be overwritten if it is in the
  6180  // mask. If the user does not provide a mask then all fields will be
  6181  // overwritten.
  6182  func (c *ProjectsLocationsGrpcRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGrpcRoutesPatchCall {
  6183  	c.urlParams_.Set("updateMask", updateMask)
  6184  	return c
  6185  }
  6186  
  6187  // Fields allows partial responses to be retrieved. See
  6188  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6189  // details.
  6190  func (c *ProjectsLocationsGrpcRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesPatchCall {
  6191  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6192  	return c
  6193  }
  6194  
  6195  // Context sets the context to be used in this call's Do method.
  6196  func (c *ProjectsLocationsGrpcRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesPatchCall {
  6197  	c.ctx_ = ctx
  6198  	return c
  6199  }
  6200  
  6201  // Header returns a http.Header that can be modified by the caller to add
  6202  // headers to the request.
  6203  func (c *ProjectsLocationsGrpcRoutesPatchCall) Header() http.Header {
  6204  	if c.header_ == nil {
  6205  		c.header_ = make(http.Header)
  6206  	}
  6207  	return c.header_
  6208  }
  6209  
  6210  func (c *ProjectsLocationsGrpcRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
  6211  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6212  	var body io.Reader = nil
  6213  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.grpcroute)
  6214  	if err != nil {
  6215  		return nil, err
  6216  	}
  6217  	c.urlParams_.Set("alt", alt)
  6218  	c.urlParams_.Set("prettyPrint", "false")
  6219  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6220  	urls += "?" + c.urlParams_.Encode()
  6221  	req, err := http.NewRequest("PATCH", urls, body)
  6222  	if err != nil {
  6223  		return nil, err
  6224  	}
  6225  	req.Header = reqHeaders
  6226  	googleapi.Expand(req.URL, map[string]string{
  6227  		"name": c.name,
  6228  	})
  6229  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6230  }
  6231  
  6232  // Do executes the "networkservices.projects.locations.grpcRoutes.patch" call.
  6233  // Any non-2xx status code is an error. Response headers are in either
  6234  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6235  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6236  // whether the returned error was because http.StatusNotModified was returned.
  6237  func (c *ProjectsLocationsGrpcRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6238  	gensupport.SetOptions(c.urlParams_, opts...)
  6239  	res, err := c.doRequest("json")
  6240  	if res != nil && res.StatusCode == http.StatusNotModified {
  6241  		if res.Body != nil {
  6242  			res.Body.Close()
  6243  		}
  6244  		return nil, gensupport.WrapError(&googleapi.Error{
  6245  			Code:   res.StatusCode,
  6246  			Header: res.Header,
  6247  		})
  6248  	}
  6249  	if err != nil {
  6250  		return nil, err
  6251  	}
  6252  	defer googleapi.CloseBody(res)
  6253  	if err := googleapi.CheckResponse(res); err != nil {
  6254  		return nil, gensupport.WrapError(err)
  6255  	}
  6256  	ret := &Operation{
  6257  		ServerResponse: googleapi.ServerResponse{
  6258  			Header:         res.Header,
  6259  			HTTPStatusCode: res.StatusCode,
  6260  		},
  6261  	}
  6262  	target := &ret
  6263  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6264  		return nil, err
  6265  	}
  6266  	return ret, nil
  6267  }
  6268  
  6269  type ProjectsLocationsHttpRoutesCreateCall struct {
  6270  	s          *Service
  6271  	parent     string
  6272  	httproute  *HttpRoute
  6273  	urlParams_ gensupport.URLParams
  6274  	ctx_       context.Context
  6275  	header_    http.Header
  6276  }
  6277  
  6278  // Create: Creates a new HttpRoute in a given project and location.
  6279  //
  6280  //   - parent: The parent resource of the HttpRoute. Must be in the format
  6281  //     `projects/*/locations/global`.
  6282  func (r *ProjectsLocationsHttpRoutesService) Create(parent string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesCreateCall {
  6283  	c := &ProjectsLocationsHttpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6284  	c.parent = parent
  6285  	c.httproute = httproute
  6286  	return c
  6287  }
  6288  
  6289  // HttpRouteId sets the optional parameter "httpRouteId": Required. Short name
  6290  // of the HttpRoute resource to be created.
  6291  func (c *ProjectsLocationsHttpRoutesCreateCall) HttpRouteId(httpRouteId string) *ProjectsLocationsHttpRoutesCreateCall {
  6292  	c.urlParams_.Set("httpRouteId", httpRouteId)
  6293  	return c
  6294  }
  6295  
  6296  // Fields allows partial responses to be retrieved. See
  6297  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6298  // details.
  6299  func (c *ProjectsLocationsHttpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesCreateCall {
  6300  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6301  	return c
  6302  }
  6303  
  6304  // Context sets the context to be used in this call's Do method.
  6305  func (c *ProjectsLocationsHttpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesCreateCall {
  6306  	c.ctx_ = ctx
  6307  	return c
  6308  }
  6309  
  6310  // Header returns a http.Header that can be modified by the caller to add
  6311  // headers to the request.
  6312  func (c *ProjectsLocationsHttpRoutesCreateCall) Header() http.Header {
  6313  	if c.header_ == nil {
  6314  		c.header_ = make(http.Header)
  6315  	}
  6316  	return c.header_
  6317  }
  6318  
  6319  func (c *ProjectsLocationsHttpRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
  6320  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6321  	var body io.Reader = nil
  6322  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httproute)
  6323  	if err != nil {
  6324  		return nil, err
  6325  	}
  6326  	c.urlParams_.Set("alt", alt)
  6327  	c.urlParams_.Set("prettyPrint", "false")
  6328  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/httpRoutes")
  6329  	urls += "?" + c.urlParams_.Encode()
  6330  	req, err := http.NewRequest("POST", urls, body)
  6331  	if err != nil {
  6332  		return nil, err
  6333  	}
  6334  	req.Header = reqHeaders
  6335  	googleapi.Expand(req.URL, map[string]string{
  6336  		"parent": c.parent,
  6337  	})
  6338  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6339  }
  6340  
  6341  // Do executes the "networkservices.projects.locations.httpRoutes.create" call.
  6342  // Any non-2xx status code is an error. Response headers are in either
  6343  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6344  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6345  // whether the returned error was because http.StatusNotModified was returned.
  6346  func (c *ProjectsLocationsHttpRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6347  	gensupport.SetOptions(c.urlParams_, opts...)
  6348  	res, err := c.doRequest("json")
  6349  	if res != nil && res.StatusCode == http.StatusNotModified {
  6350  		if res.Body != nil {
  6351  			res.Body.Close()
  6352  		}
  6353  		return nil, gensupport.WrapError(&googleapi.Error{
  6354  			Code:   res.StatusCode,
  6355  			Header: res.Header,
  6356  		})
  6357  	}
  6358  	if err != nil {
  6359  		return nil, err
  6360  	}
  6361  	defer googleapi.CloseBody(res)
  6362  	if err := googleapi.CheckResponse(res); err != nil {
  6363  		return nil, gensupport.WrapError(err)
  6364  	}
  6365  	ret := &Operation{
  6366  		ServerResponse: googleapi.ServerResponse{
  6367  			Header:         res.Header,
  6368  			HTTPStatusCode: res.StatusCode,
  6369  		},
  6370  	}
  6371  	target := &ret
  6372  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6373  		return nil, err
  6374  	}
  6375  	return ret, nil
  6376  }
  6377  
  6378  type ProjectsLocationsHttpRoutesDeleteCall struct {
  6379  	s          *Service
  6380  	name       string
  6381  	urlParams_ gensupport.URLParams
  6382  	ctx_       context.Context
  6383  	header_    http.Header
  6384  }
  6385  
  6386  // Delete: Deletes a single HttpRoute.
  6387  //
  6388  //   - name: A name of the HttpRoute to delete. Must be in the format
  6389  //     `projects/*/locations/global/httpRoutes/*`.
  6390  func (r *ProjectsLocationsHttpRoutesService) Delete(name string) *ProjectsLocationsHttpRoutesDeleteCall {
  6391  	c := &ProjectsLocationsHttpRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6392  	c.name = name
  6393  	return c
  6394  }
  6395  
  6396  // Fields allows partial responses to be retrieved. See
  6397  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6398  // details.
  6399  func (c *ProjectsLocationsHttpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesDeleteCall {
  6400  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6401  	return c
  6402  }
  6403  
  6404  // Context sets the context to be used in this call's Do method.
  6405  func (c *ProjectsLocationsHttpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesDeleteCall {
  6406  	c.ctx_ = ctx
  6407  	return c
  6408  }
  6409  
  6410  // Header returns a http.Header that can be modified by the caller to add
  6411  // headers to the request.
  6412  func (c *ProjectsLocationsHttpRoutesDeleteCall) Header() http.Header {
  6413  	if c.header_ == nil {
  6414  		c.header_ = make(http.Header)
  6415  	}
  6416  	return c.header_
  6417  }
  6418  
  6419  func (c *ProjectsLocationsHttpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6420  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6421  	var body io.Reader = nil
  6422  	c.urlParams_.Set("alt", alt)
  6423  	c.urlParams_.Set("prettyPrint", "false")
  6424  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6425  	urls += "?" + c.urlParams_.Encode()
  6426  	req, err := http.NewRequest("DELETE", urls, body)
  6427  	if err != nil {
  6428  		return nil, err
  6429  	}
  6430  	req.Header = reqHeaders
  6431  	googleapi.Expand(req.URL, map[string]string{
  6432  		"name": c.name,
  6433  	})
  6434  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6435  }
  6436  
  6437  // Do executes the "networkservices.projects.locations.httpRoutes.delete" call.
  6438  // Any non-2xx status code is an error. Response headers are in either
  6439  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6440  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6441  // whether the returned error was because http.StatusNotModified was returned.
  6442  func (c *ProjectsLocationsHttpRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6443  	gensupport.SetOptions(c.urlParams_, opts...)
  6444  	res, err := c.doRequest("json")
  6445  	if res != nil && res.StatusCode == http.StatusNotModified {
  6446  		if res.Body != nil {
  6447  			res.Body.Close()
  6448  		}
  6449  		return nil, gensupport.WrapError(&googleapi.Error{
  6450  			Code:   res.StatusCode,
  6451  			Header: res.Header,
  6452  		})
  6453  	}
  6454  	if err != nil {
  6455  		return nil, err
  6456  	}
  6457  	defer googleapi.CloseBody(res)
  6458  	if err := googleapi.CheckResponse(res); err != nil {
  6459  		return nil, gensupport.WrapError(err)
  6460  	}
  6461  	ret := &Operation{
  6462  		ServerResponse: googleapi.ServerResponse{
  6463  			Header:         res.Header,
  6464  			HTTPStatusCode: res.StatusCode,
  6465  		},
  6466  	}
  6467  	target := &ret
  6468  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6469  		return nil, err
  6470  	}
  6471  	return ret, nil
  6472  }
  6473  
  6474  type ProjectsLocationsHttpRoutesGetCall struct {
  6475  	s            *Service
  6476  	name         string
  6477  	urlParams_   gensupport.URLParams
  6478  	ifNoneMatch_ string
  6479  	ctx_         context.Context
  6480  	header_      http.Header
  6481  }
  6482  
  6483  // Get: Gets details of a single HttpRoute.
  6484  //
  6485  //   - name: A name of the HttpRoute to get. Must be in the format
  6486  //     `projects/*/locations/global/httpRoutes/*`.
  6487  func (r *ProjectsLocationsHttpRoutesService) Get(name string) *ProjectsLocationsHttpRoutesGetCall {
  6488  	c := &ProjectsLocationsHttpRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6489  	c.name = name
  6490  	return c
  6491  }
  6492  
  6493  // Fields allows partial responses to be retrieved. See
  6494  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6495  // details.
  6496  func (c *ProjectsLocationsHttpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesGetCall {
  6497  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6498  	return c
  6499  }
  6500  
  6501  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6502  // object's ETag matches the given value. This is useful for getting updates
  6503  // only after the object has changed since the last request.
  6504  func (c *ProjectsLocationsHttpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesGetCall {
  6505  	c.ifNoneMatch_ = entityTag
  6506  	return c
  6507  }
  6508  
  6509  // Context sets the context to be used in this call's Do method.
  6510  func (c *ProjectsLocationsHttpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesGetCall {
  6511  	c.ctx_ = ctx
  6512  	return c
  6513  }
  6514  
  6515  // Header returns a http.Header that can be modified by the caller to add
  6516  // headers to the request.
  6517  func (c *ProjectsLocationsHttpRoutesGetCall) Header() http.Header {
  6518  	if c.header_ == nil {
  6519  		c.header_ = make(http.Header)
  6520  	}
  6521  	return c.header_
  6522  }
  6523  
  6524  func (c *ProjectsLocationsHttpRoutesGetCall) doRequest(alt string) (*http.Response, error) {
  6525  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6526  	if c.ifNoneMatch_ != "" {
  6527  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6528  	}
  6529  	var body io.Reader = nil
  6530  	c.urlParams_.Set("alt", alt)
  6531  	c.urlParams_.Set("prettyPrint", "false")
  6532  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6533  	urls += "?" + c.urlParams_.Encode()
  6534  	req, err := http.NewRequest("GET", urls, body)
  6535  	if err != nil {
  6536  		return nil, err
  6537  	}
  6538  	req.Header = reqHeaders
  6539  	googleapi.Expand(req.URL, map[string]string{
  6540  		"name": c.name,
  6541  	})
  6542  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6543  }
  6544  
  6545  // Do executes the "networkservices.projects.locations.httpRoutes.get" call.
  6546  // Any non-2xx status code is an error. Response headers are in either
  6547  // *HttpRoute.ServerResponse.Header or (if a response was returned at all) in
  6548  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6549  // whether the returned error was because http.StatusNotModified was returned.
  6550  func (c *ProjectsLocationsHttpRoutesGetCall) Do(opts ...googleapi.CallOption) (*HttpRoute, error) {
  6551  	gensupport.SetOptions(c.urlParams_, opts...)
  6552  	res, err := c.doRequest("json")
  6553  	if res != nil && res.StatusCode == http.StatusNotModified {
  6554  		if res.Body != nil {
  6555  			res.Body.Close()
  6556  		}
  6557  		return nil, gensupport.WrapError(&googleapi.Error{
  6558  			Code:   res.StatusCode,
  6559  			Header: res.Header,
  6560  		})
  6561  	}
  6562  	if err != nil {
  6563  		return nil, err
  6564  	}
  6565  	defer googleapi.CloseBody(res)
  6566  	if err := googleapi.CheckResponse(res); err != nil {
  6567  		return nil, gensupport.WrapError(err)
  6568  	}
  6569  	ret := &HttpRoute{
  6570  		ServerResponse: googleapi.ServerResponse{
  6571  			Header:         res.Header,
  6572  			HTTPStatusCode: res.StatusCode,
  6573  		},
  6574  	}
  6575  	target := &ret
  6576  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6577  		return nil, err
  6578  	}
  6579  	return ret, nil
  6580  }
  6581  
  6582  type ProjectsLocationsHttpRoutesListCall struct {
  6583  	s            *Service
  6584  	parent       string
  6585  	urlParams_   gensupport.URLParams
  6586  	ifNoneMatch_ string
  6587  	ctx_         context.Context
  6588  	header_      http.Header
  6589  }
  6590  
  6591  // List: Lists HttpRoute in a given project and location.
  6592  //
  6593  //   - parent: The project and location from which the HttpRoutes should be
  6594  //     listed, specified in the format `projects/*/locations/global`.
  6595  func (r *ProjectsLocationsHttpRoutesService) List(parent string) *ProjectsLocationsHttpRoutesListCall {
  6596  	c := &ProjectsLocationsHttpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6597  	c.parent = parent
  6598  	return c
  6599  }
  6600  
  6601  // PageSize sets the optional parameter "pageSize": Maximum number of
  6602  // HttpRoutes to return per call.
  6603  func (c *ProjectsLocationsHttpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsHttpRoutesListCall {
  6604  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6605  	return c
  6606  }
  6607  
  6608  // PageToken sets the optional parameter "pageToken": The value returned by the
  6609  // last `ListHttpRoutesResponse` Indicates that this is a continuation of a
  6610  // prior `ListHttpRoutes` call, and that the system should return the next page
  6611  // of data.
  6612  func (c *ProjectsLocationsHttpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsHttpRoutesListCall {
  6613  	c.urlParams_.Set("pageToken", pageToken)
  6614  	return c
  6615  }
  6616  
  6617  // Fields allows partial responses to be retrieved. See
  6618  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6619  // details.
  6620  func (c *ProjectsLocationsHttpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesListCall {
  6621  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6622  	return c
  6623  }
  6624  
  6625  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6626  // object's ETag matches the given value. This is useful for getting updates
  6627  // only after the object has changed since the last request.
  6628  func (c *ProjectsLocationsHttpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesListCall {
  6629  	c.ifNoneMatch_ = entityTag
  6630  	return c
  6631  }
  6632  
  6633  // Context sets the context to be used in this call's Do method.
  6634  func (c *ProjectsLocationsHttpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesListCall {
  6635  	c.ctx_ = ctx
  6636  	return c
  6637  }
  6638  
  6639  // Header returns a http.Header that can be modified by the caller to add
  6640  // headers to the request.
  6641  func (c *ProjectsLocationsHttpRoutesListCall) Header() http.Header {
  6642  	if c.header_ == nil {
  6643  		c.header_ = make(http.Header)
  6644  	}
  6645  	return c.header_
  6646  }
  6647  
  6648  func (c *ProjectsLocationsHttpRoutesListCall) doRequest(alt string) (*http.Response, error) {
  6649  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6650  	if c.ifNoneMatch_ != "" {
  6651  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6652  	}
  6653  	var body io.Reader = nil
  6654  	c.urlParams_.Set("alt", alt)
  6655  	c.urlParams_.Set("prettyPrint", "false")
  6656  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/httpRoutes")
  6657  	urls += "?" + c.urlParams_.Encode()
  6658  	req, err := http.NewRequest("GET", urls, body)
  6659  	if err != nil {
  6660  		return nil, err
  6661  	}
  6662  	req.Header = reqHeaders
  6663  	googleapi.Expand(req.URL, map[string]string{
  6664  		"parent": c.parent,
  6665  	})
  6666  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6667  }
  6668  
  6669  // Do executes the "networkservices.projects.locations.httpRoutes.list" call.
  6670  // Any non-2xx status code is an error. Response headers are in either
  6671  // *ListHttpRoutesResponse.ServerResponse.Header or (if a response was returned
  6672  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6673  // check whether the returned error was because http.StatusNotModified was
  6674  // returned.
  6675  func (c *ProjectsLocationsHttpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListHttpRoutesResponse, error) {
  6676  	gensupport.SetOptions(c.urlParams_, opts...)
  6677  	res, err := c.doRequest("json")
  6678  	if res != nil && res.StatusCode == http.StatusNotModified {
  6679  		if res.Body != nil {
  6680  			res.Body.Close()
  6681  		}
  6682  		return nil, gensupport.WrapError(&googleapi.Error{
  6683  			Code:   res.StatusCode,
  6684  			Header: res.Header,
  6685  		})
  6686  	}
  6687  	if err != nil {
  6688  		return nil, err
  6689  	}
  6690  	defer googleapi.CloseBody(res)
  6691  	if err := googleapi.CheckResponse(res); err != nil {
  6692  		return nil, gensupport.WrapError(err)
  6693  	}
  6694  	ret := &ListHttpRoutesResponse{
  6695  		ServerResponse: googleapi.ServerResponse{
  6696  			Header:         res.Header,
  6697  			HTTPStatusCode: res.StatusCode,
  6698  		},
  6699  	}
  6700  	target := &ret
  6701  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6702  		return nil, err
  6703  	}
  6704  	return ret, nil
  6705  }
  6706  
  6707  // Pages invokes f for each page of results.
  6708  // A non-nil error returned from f will halt the iteration.
  6709  // The provided context supersedes any context provided to the Context method.
  6710  func (c *ProjectsLocationsHttpRoutesListCall) Pages(ctx context.Context, f func(*ListHttpRoutesResponse) error) error {
  6711  	c.ctx_ = ctx
  6712  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6713  	for {
  6714  		x, err := c.Do()
  6715  		if err != nil {
  6716  			return err
  6717  		}
  6718  		if err := f(x); err != nil {
  6719  			return err
  6720  		}
  6721  		if x.NextPageToken == "" {
  6722  			return nil
  6723  		}
  6724  		c.PageToken(x.NextPageToken)
  6725  	}
  6726  }
  6727  
  6728  type ProjectsLocationsHttpRoutesPatchCall struct {
  6729  	s          *Service
  6730  	name       string
  6731  	httproute  *HttpRoute
  6732  	urlParams_ gensupport.URLParams
  6733  	ctx_       context.Context
  6734  	header_    http.Header
  6735  }
  6736  
  6737  // Patch: Updates the parameters of a single HttpRoute.
  6738  //
  6739  //   - name: Name of the HttpRoute resource. It matches pattern
  6740  //     `projects/*/locations/global/httpRoutes/http_route_name>`.
  6741  func (r *ProjectsLocationsHttpRoutesService) Patch(name string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesPatchCall {
  6742  	c := &ProjectsLocationsHttpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6743  	c.name = name
  6744  	c.httproute = httproute
  6745  	return c
  6746  }
  6747  
  6748  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  6749  // specify the fields to be overwritten in the HttpRoute resource by the
  6750  // update. The fields specified in the update_mask are relative to the
  6751  // resource, not the full request. A field will be overwritten if it is in the
  6752  // mask. If the user does not provide a mask then all fields will be
  6753  // overwritten.
  6754  func (c *ProjectsLocationsHttpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsHttpRoutesPatchCall {
  6755  	c.urlParams_.Set("updateMask", updateMask)
  6756  	return c
  6757  }
  6758  
  6759  // Fields allows partial responses to be retrieved. See
  6760  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6761  // details.
  6762  func (c *ProjectsLocationsHttpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesPatchCall {
  6763  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6764  	return c
  6765  }
  6766  
  6767  // Context sets the context to be used in this call's Do method.
  6768  func (c *ProjectsLocationsHttpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesPatchCall {
  6769  	c.ctx_ = ctx
  6770  	return c
  6771  }
  6772  
  6773  // Header returns a http.Header that can be modified by the caller to add
  6774  // headers to the request.
  6775  func (c *ProjectsLocationsHttpRoutesPatchCall) Header() http.Header {
  6776  	if c.header_ == nil {
  6777  		c.header_ = make(http.Header)
  6778  	}
  6779  	return c.header_
  6780  }
  6781  
  6782  func (c *ProjectsLocationsHttpRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
  6783  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6784  	var body io.Reader = nil
  6785  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httproute)
  6786  	if err != nil {
  6787  		return nil, err
  6788  	}
  6789  	c.urlParams_.Set("alt", alt)
  6790  	c.urlParams_.Set("prettyPrint", "false")
  6791  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  6792  	urls += "?" + c.urlParams_.Encode()
  6793  	req, err := http.NewRequest("PATCH", urls, body)
  6794  	if err != nil {
  6795  		return nil, err
  6796  	}
  6797  	req.Header = reqHeaders
  6798  	googleapi.Expand(req.URL, map[string]string{
  6799  		"name": c.name,
  6800  	})
  6801  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6802  }
  6803  
  6804  // Do executes the "networkservices.projects.locations.httpRoutes.patch" call.
  6805  // Any non-2xx status code is an error. Response headers are in either
  6806  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6807  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6808  // whether the returned error was because http.StatusNotModified was returned.
  6809  func (c *ProjectsLocationsHttpRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6810  	gensupport.SetOptions(c.urlParams_, opts...)
  6811  	res, err := c.doRequest("json")
  6812  	if res != nil && res.StatusCode == http.StatusNotModified {
  6813  		if res.Body != nil {
  6814  			res.Body.Close()
  6815  		}
  6816  		return nil, gensupport.WrapError(&googleapi.Error{
  6817  			Code:   res.StatusCode,
  6818  			Header: res.Header,
  6819  		})
  6820  	}
  6821  	if err != nil {
  6822  		return nil, err
  6823  	}
  6824  	defer googleapi.CloseBody(res)
  6825  	if err := googleapi.CheckResponse(res); err != nil {
  6826  		return nil, gensupport.WrapError(err)
  6827  	}
  6828  	ret := &Operation{
  6829  		ServerResponse: googleapi.ServerResponse{
  6830  			Header:         res.Header,
  6831  			HTTPStatusCode: res.StatusCode,
  6832  		},
  6833  	}
  6834  	target := &ret
  6835  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6836  		return nil, err
  6837  	}
  6838  	return ret, nil
  6839  }
  6840  
  6841  type ProjectsLocationsLbRouteExtensionsCreateCall struct {
  6842  	s                *Service
  6843  	parent           string
  6844  	lbrouteextension *LbRouteExtension
  6845  	urlParams_       gensupport.URLParams
  6846  	ctx_             context.Context
  6847  	header_          http.Header
  6848  }
  6849  
  6850  // Create: Creates a new `LbRouteExtension` resource in a given project and
  6851  // location.
  6852  //
  6853  //   - parent: The parent resource of the `LbRouteExtension` resource. Must be in
  6854  //     the format `projects/{project}/locations/{location}`.
  6855  func (r *ProjectsLocationsLbRouteExtensionsService) Create(parent string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsCreateCall {
  6856  	c := &ProjectsLocationsLbRouteExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6857  	c.parent = parent
  6858  	c.lbrouteextension = lbrouteextension
  6859  	return c
  6860  }
  6861  
  6862  // LbRouteExtensionId sets the optional parameter "lbRouteExtensionId":
  6863  // Required. User-provided ID of the `LbRouteExtension` resource to be created.
  6864  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) LbRouteExtensionId(lbRouteExtensionId string) *ProjectsLocationsLbRouteExtensionsCreateCall {
  6865  	c.urlParams_.Set("lbRouteExtensionId", lbRouteExtensionId)
  6866  	return c
  6867  }
  6868  
  6869  // RequestId sets the optional parameter "requestId": An optional request ID to
  6870  // identify requests. Specify a unique request ID so that if you must retry
  6871  // your request, the server can ignore the request if it has already been
  6872  // completed. The server guarantees that for at least 60 minutes since the
  6873  // first request. For example, consider a situation where you make an initial
  6874  // request and the request times out. If you make the request again with the
  6875  // same request ID, the server can check if original operation with the same
  6876  // request ID was received, and if so, ignores the second request. This
  6877  // prevents clients from accidentally creating duplicate commitments. The
  6878  // request ID must be a valid UUID with the exception that zero UUID is not
  6879  // supported (00000000-0000-0000-0000-000000000000).
  6880  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsCreateCall {
  6881  	c.urlParams_.Set("requestId", requestId)
  6882  	return c
  6883  }
  6884  
  6885  // Fields allows partial responses to be retrieved. See
  6886  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6887  // details.
  6888  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsCreateCall {
  6889  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6890  	return c
  6891  }
  6892  
  6893  // Context sets the context to be used in this call's Do method.
  6894  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall {
  6895  	c.ctx_ = ctx
  6896  	return c
  6897  }
  6898  
  6899  // Header returns a http.Header that can be modified by the caller to add
  6900  // headers to the request.
  6901  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Header() http.Header {
  6902  	if c.header_ == nil {
  6903  		c.header_ = make(http.Header)
  6904  	}
  6905  	return c.header_
  6906  }
  6907  
  6908  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) doRequest(alt string) (*http.Response, error) {
  6909  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6910  	var body io.Reader = nil
  6911  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension)
  6912  	if err != nil {
  6913  		return nil, err
  6914  	}
  6915  	c.urlParams_.Set("alt", alt)
  6916  	c.urlParams_.Set("prettyPrint", "false")
  6917  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbRouteExtensions")
  6918  	urls += "?" + c.urlParams_.Encode()
  6919  	req, err := http.NewRequest("POST", urls, body)
  6920  	if err != nil {
  6921  		return nil, err
  6922  	}
  6923  	req.Header = reqHeaders
  6924  	googleapi.Expand(req.URL, map[string]string{
  6925  		"parent": c.parent,
  6926  	})
  6927  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6928  }
  6929  
  6930  // Do executes the "networkservices.projects.locations.lbRouteExtensions.create" call.
  6931  // Any non-2xx status code is an error. Response headers are in either
  6932  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6933  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6934  // whether the returned error was because http.StatusNotModified was returned.
  6935  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6936  	gensupport.SetOptions(c.urlParams_, opts...)
  6937  	res, err := c.doRequest("json")
  6938  	if res != nil && res.StatusCode == http.StatusNotModified {
  6939  		if res.Body != nil {
  6940  			res.Body.Close()
  6941  		}
  6942  		return nil, gensupport.WrapError(&googleapi.Error{
  6943  			Code:   res.StatusCode,
  6944  			Header: res.Header,
  6945  		})
  6946  	}
  6947  	if err != nil {
  6948  		return nil, err
  6949  	}
  6950  	defer googleapi.CloseBody(res)
  6951  	if err := googleapi.CheckResponse(res); err != nil {
  6952  		return nil, gensupport.WrapError(err)
  6953  	}
  6954  	ret := &Operation{
  6955  		ServerResponse: googleapi.ServerResponse{
  6956  			Header:         res.Header,
  6957  			HTTPStatusCode: res.StatusCode,
  6958  		},
  6959  	}
  6960  	target := &ret
  6961  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6962  		return nil, err
  6963  	}
  6964  	return ret, nil
  6965  }
  6966  
  6967  type ProjectsLocationsLbRouteExtensionsDeleteCall struct {
  6968  	s          *Service
  6969  	name       string
  6970  	urlParams_ gensupport.URLParams
  6971  	ctx_       context.Context
  6972  	header_    http.Header
  6973  }
  6974  
  6975  // Delete: Deletes the specified `LbRouteExtension` resource.
  6976  //
  6977  //   - name: The name of the `LbRouteExtension` resource to delete. Must be in
  6978  //     the format
  6979  //     `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens
  6980  //     ion}`.
  6981  func (r *ProjectsLocationsLbRouteExtensionsService) Delete(name string) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  6982  	c := &ProjectsLocationsLbRouteExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6983  	c.name = name
  6984  	return c
  6985  }
  6986  
  6987  // RequestId sets the optional parameter "requestId": An optional request ID to
  6988  // identify requests. Specify a unique request ID so that if you must retry
  6989  // your request, the server can ignore the request if it has already been
  6990  // completed. The server guarantees that for at least 60 minutes after the
  6991  // first request. For example, consider a situation where you make an initial
  6992  // request and the request times out. If you make the request again with the
  6993  // same request ID, the server can check if original operation with the same
  6994  // request ID was received, and if so, ignores the second request. This
  6995  // prevents clients from accidentally creating duplicate commitments. The
  6996  // request ID must be a valid UUID with the exception that zero UUID is not
  6997  // supported (00000000-0000-0000-0000-000000000000).
  6998  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  6999  	c.urlParams_.Set("requestId", requestId)
  7000  	return c
  7001  }
  7002  
  7003  // Fields allows partial responses to be retrieved. See
  7004  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7005  // details.
  7006  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  7007  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7008  	return c
  7009  }
  7010  
  7011  // Context sets the context to be used in this call's Do method.
  7012  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  7013  	c.ctx_ = ctx
  7014  	return c
  7015  }
  7016  
  7017  // Header returns a http.Header that can be modified by the caller to add
  7018  // headers to the request.
  7019  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Header() http.Header {
  7020  	if c.header_ == nil {
  7021  		c.header_ = make(http.Header)
  7022  	}
  7023  	return c.header_
  7024  }
  7025  
  7026  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7027  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7028  	var body io.Reader = nil
  7029  	c.urlParams_.Set("alt", alt)
  7030  	c.urlParams_.Set("prettyPrint", "false")
  7031  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7032  	urls += "?" + c.urlParams_.Encode()
  7033  	req, err := http.NewRequest("DELETE", urls, body)
  7034  	if err != nil {
  7035  		return nil, err
  7036  	}
  7037  	req.Header = reqHeaders
  7038  	googleapi.Expand(req.URL, map[string]string{
  7039  		"name": c.name,
  7040  	})
  7041  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7042  }
  7043  
  7044  // Do executes the "networkservices.projects.locations.lbRouteExtensions.delete" call.
  7045  // Any non-2xx status code is an error. Response headers are in either
  7046  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7047  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7048  // whether the returned error was because http.StatusNotModified was returned.
  7049  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7050  	gensupport.SetOptions(c.urlParams_, opts...)
  7051  	res, err := c.doRequest("json")
  7052  	if res != nil && res.StatusCode == http.StatusNotModified {
  7053  		if res.Body != nil {
  7054  			res.Body.Close()
  7055  		}
  7056  		return nil, gensupport.WrapError(&googleapi.Error{
  7057  			Code:   res.StatusCode,
  7058  			Header: res.Header,
  7059  		})
  7060  	}
  7061  	if err != nil {
  7062  		return nil, err
  7063  	}
  7064  	defer googleapi.CloseBody(res)
  7065  	if err := googleapi.CheckResponse(res); err != nil {
  7066  		return nil, gensupport.WrapError(err)
  7067  	}
  7068  	ret := &Operation{
  7069  		ServerResponse: googleapi.ServerResponse{
  7070  			Header:         res.Header,
  7071  			HTTPStatusCode: res.StatusCode,
  7072  		},
  7073  	}
  7074  	target := &ret
  7075  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7076  		return nil, err
  7077  	}
  7078  	return ret, nil
  7079  }
  7080  
  7081  type ProjectsLocationsLbRouteExtensionsGetCall struct {
  7082  	s            *Service
  7083  	name         string
  7084  	urlParams_   gensupport.URLParams
  7085  	ifNoneMatch_ string
  7086  	ctx_         context.Context
  7087  	header_      http.Header
  7088  }
  7089  
  7090  // Get: Gets details of the specified `LbRouteExtension` resource.
  7091  //
  7092  //   - name: A name of the `LbRouteExtension` resource to get. Must be in the
  7093  //     format
  7094  //     `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens
  7095  //     ion}`.
  7096  func (r *ProjectsLocationsLbRouteExtensionsService) Get(name string) *ProjectsLocationsLbRouteExtensionsGetCall {
  7097  	c := &ProjectsLocationsLbRouteExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7098  	c.name = name
  7099  	return c
  7100  }
  7101  
  7102  // Fields allows partial responses to be retrieved. See
  7103  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7104  // details.
  7105  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall {
  7106  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7107  	return c
  7108  }
  7109  
  7110  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7111  // object's ETag matches the given value. This is useful for getting updates
  7112  // only after the object has changed since the last request.
  7113  func (c *ProjectsLocationsLbRouteExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsGetCall {
  7114  	c.ifNoneMatch_ = entityTag
  7115  	return c
  7116  }
  7117  
  7118  // Context sets the context to be used in this call's Do method.
  7119  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall {
  7120  	c.ctx_ = ctx
  7121  	return c
  7122  }
  7123  
  7124  // Header returns a http.Header that can be modified by the caller to add
  7125  // headers to the request.
  7126  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Header() http.Header {
  7127  	if c.header_ == nil {
  7128  		c.header_ = make(http.Header)
  7129  	}
  7130  	return c.header_
  7131  }
  7132  
  7133  func (c *ProjectsLocationsLbRouteExtensionsGetCall) doRequest(alt string) (*http.Response, error) {
  7134  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7135  	if c.ifNoneMatch_ != "" {
  7136  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7137  	}
  7138  	var body io.Reader = nil
  7139  	c.urlParams_.Set("alt", alt)
  7140  	c.urlParams_.Set("prettyPrint", "false")
  7141  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7142  	urls += "?" + c.urlParams_.Encode()
  7143  	req, err := http.NewRequest("GET", urls, body)
  7144  	if err != nil {
  7145  		return nil, err
  7146  	}
  7147  	req.Header = reqHeaders
  7148  	googleapi.Expand(req.URL, map[string]string{
  7149  		"name": c.name,
  7150  	})
  7151  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7152  }
  7153  
  7154  // Do executes the "networkservices.projects.locations.lbRouteExtensions.get" call.
  7155  // Any non-2xx status code is an error. Response headers are in either
  7156  // *LbRouteExtension.ServerResponse.Header or (if a response was returned at
  7157  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7158  // check whether the returned error was because http.StatusNotModified was
  7159  // returned.
  7160  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbRouteExtension, error) {
  7161  	gensupport.SetOptions(c.urlParams_, opts...)
  7162  	res, err := c.doRequest("json")
  7163  	if res != nil && res.StatusCode == http.StatusNotModified {
  7164  		if res.Body != nil {
  7165  			res.Body.Close()
  7166  		}
  7167  		return nil, gensupport.WrapError(&googleapi.Error{
  7168  			Code:   res.StatusCode,
  7169  			Header: res.Header,
  7170  		})
  7171  	}
  7172  	if err != nil {
  7173  		return nil, err
  7174  	}
  7175  	defer googleapi.CloseBody(res)
  7176  	if err := googleapi.CheckResponse(res); err != nil {
  7177  		return nil, gensupport.WrapError(err)
  7178  	}
  7179  	ret := &LbRouteExtension{
  7180  		ServerResponse: googleapi.ServerResponse{
  7181  			Header:         res.Header,
  7182  			HTTPStatusCode: res.StatusCode,
  7183  		},
  7184  	}
  7185  	target := &ret
  7186  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7187  		return nil, err
  7188  	}
  7189  	return ret, nil
  7190  }
  7191  
  7192  type ProjectsLocationsLbRouteExtensionsListCall struct {
  7193  	s            *Service
  7194  	parent       string
  7195  	urlParams_   gensupport.URLParams
  7196  	ifNoneMatch_ string
  7197  	ctx_         context.Context
  7198  	header_      http.Header
  7199  }
  7200  
  7201  // List: Lists `LbRouteExtension` resources in a given project and location.
  7202  //
  7203  //   - parent: The project and location from which the `LbRouteExtension`
  7204  //     resources are listed, specified in the following format:
  7205  //     `projects/{project}/locations/{location}`.
  7206  func (r *ProjectsLocationsLbRouteExtensionsService) List(parent string) *ProjectsLocationsLbRouteExtensionsListCall {
  7207  	c := &ProjectsLocationsLbRouteExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7208  	c.parent = parent
  7209  	return c
  7210  }
  7211  
  7212  // Filter sets the optional parameter "filter": Filtering results.
  7213  func (c *ProjectsLocationsLbRouteExtensionsListCall) Filter(filter string) *ProjectsLocationsLbRouteExtensionsListCall {
  7214  	c.urlParams_.Set("filter", filter)
  7215  	return c
  7216  }
  7217  
  7218  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  7219  // results.
  7220  func (c *ProjectsLocationsLbRouteExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbRouteExtensionsListCall {
  7221  	c.urlParams_.Set("orderBy", orderBy)
  7222  	return c
  7223  }
  7224  
  7225  // PageSize sets the optional parameter "pageSize": Requested page size. The
  7226  // server might return fewer items than requested. If unspecified, the server
  7227  // picks an appropriate default.
  7228  func (c *ProjectsLocationsLbRouteExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbRouteExtensionsListCall {
  7229  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7230  	return c
  7231  }
  7232  
  7233  // PageToken sets the optional parameter "pageToken": A token identifying a
  7234  // page of results that the server returns.
  7235  func (c *ProjectsLocationsLbRouteExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbRouteExtensionsListCall {
  7236  	c.urlParams_.Set("pageToken", pageToken)
  7237  	return c
  7238  }
  7239  
  7240  // Fields allows partial responses to be retrieved. See
  7241  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7242  // details.
  7243  func (c *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall {
  7244  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7245  	return c
  7246  }
  7247  
  7248  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7249  // object's ETag matches the given value. This is useful for getting updates
  7250  // only after the object has changed since the last request.
  7251  func (c *ProjectsLocationsLbRouteExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsListCall {
  7252  	c.ifNoneMatch_ = entityTag
  7253  	return c
  7254  }
  7255  
  7256  // Context sets the context to be used in this call's Do method.
  7257  func (c *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall {
  7258  	c.ctx_ = ctx
  7259  	return c
  7260  }
  7261  
  7262  // Header returns a http.Header that can be modified by the caller to add
  7263  // headers to the request.
  7264  func (c *ProjectsLocationsLbRouteExtensionsListCall) Header() http.Header {
  7265  	if c.header_ == nil {
  7266  		c.header_ = make(http.Header)
  7267  	}
  7268  	return c.header_
  7269  }
  7270  
  7271  func (c *ProjectsLocationsLbRouteExtensionsListCall) doRequest(alt string) (*http.Response, error) {
  7272  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7273  	if c.ifNoneMatch_ != "" {
  7274  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7275  	}
  7276  	var body io.Reader = nil
  7277  	c.urlParams_.Set("alt", alt)
  7278  	c.urlParams_.Set("prettyPrint", "false")
  7279  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbRouteExtensions")
  7280  	urls += "?" + c.urlParams_.Encode()
  7281  	req, err := http.NewRequest("GET", urls, body)
  7282  	if err != nil {
  7283  		return nil, err
  7284  	}
  7285  	req.Header = reqHeaders
  7286  	googleapi.Expand(req.URL, map[string]string{
  7287  		"parent": c.parent,
  7288  	})
  7289  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7290  }
  7291  
  7292  // Do executes the "networkservices.projects.locations.lbRouteExtensions.list" call.
  7293  // Any non-2xx status code is an error. Response headers are in either
  7294  // *ListLbRouteExtensionsResponse.ServerResponse.Header or (if a response was
  7295  // returned at all) in error.(*googleapi.Error).Header. Use
  7296  // googleapi.IsNotModified to check whether the returned error was because
  7297  // http.StatusNotModified was returned.
  7298  func (c *ProjectsLocationsLbRouteExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbRouteExtensionsResponse, error) {
  7299  	gensupport.SetOptions(c.urlParams_, opts...)
  7300  	res, err := c.doRequest("json")
  7301  	if res != nil && res.StatusCode == http.StatusNotModified {
  7302  		if res.Body != nil {
  7303  			res.Body.Close()
  7304  		}
  7305  		return nil, gensupport.WrapError(&googleapi.Error{
  7306  			Code:   res.StatusCode,
  7307  			Header: res.Header,
  7308  		})
  7309  	}
  7310  	if err != nil {
  7311  		return nil, err
  7312  	}
  7313  	defer googleapi.CloseBody(res)
  7314  	if err := googleapi.CheckResponse(res); err != nil {
  7315  		return nil, gensupport.WrapError(err)
  7316  	}
  7317  	ret := &ListLbRouteExtensionsResponse{
  7318  		ServerResponse: googleapi.ServerResponse{
  7319  			Header:         res.Header,
  7320  			HTTPStatusCode: res.StatusCode,
  7321  		},
  7322  	}
  7323  	target := &ret
  7324  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7325  		return nil, err
  7326  	}
  7327  	return ret, nil
  7328  }
  7329  
  7330  // Pages invokes f for each page of results.
  7331  // A non-nil error returned from f will halt the iteration.
  7332  // The provided context supersedes any context provided to the Context method.
  7333  func (c *ProjectsLocationsLbRouteExtensionsListCall) Pages(ctx context.Context, f func(*ListLbRouteExtensionsResponse) error) error {
  7334  	c.ctx_ = ctx
  7335  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7336  	for {
  7337  		x, err := c.Do()
  7338  		if err != nil {
  7339  			return err
  7340  		}
  7341  		if err := f(x); err != nil {
  7342  			return err
  7343  		}
  7344  		if x.NextPageToken == "" {
  7345  			return nil
  7346  		}
  7347  		c.PageToken(x.NextPageToken)
  7348  	}
  7349  }
  7350  
  7351  type ProjectsLocationsLbRouteExtensionsPatchCall struct {
  7352  	s                *Service
  7353  	name             string
  7354  	lbrouteextension *LbRouteExtension
  7355  	urlParams_       gensupport.URLParams
  7356  	ctx_             context.Context
  7357  	header_          http.Header
  7358  }
  7359  
  7360  // Patch: Updates the parameters of the specified `LbRouteExtension` resource.
  7361  //
  7362  //   - name: Identifier. Name of the `LbRouteExtension` resource in the following
  7363  //     format:
  7364  //     `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens
  7365  //     ion}`.
  7366  func (r *ProjectsLocationsLbRouteExtensionsService) Patch(name string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsPatchCall {
  7367  	c := &ProjectsLocationsLbRouteExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7368  	c.name = name
  7369  	c.lbrouteextension = lbrouteextension
  7370  	return c
  7371  }
  7372  
  7373  // RequestId sets the optional parameter "requestId": An optional request ID to
  7374  // identify requests. Specify a unique request ID so that if you must retry
  7375  // your request, the server can ignore the request if it has already been
  7376  // completed. The server guarantees that for at least 60 minutes since the
  7377  // first request. For example, consider a situation where you make an initial
  7378  // request and the request times out. If you make the request again with the
  7379  // same request ID, the server can check if original operation with the same
  7380  // request ID was received, and if so, ignores the second request. This
  7381  // prevents clients from accidentally creating duplicate commitments. The
  7382  // request ID must be a valid UUID with the exception that zero UUID is not
  7383  // supported (00000000-0000-0000-0000-000000000000).
  7384  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsPatchCall {
  7385  	c.urlParams_.Set("requestId", requestId)
  7386  	return c
  7387  }
  7388  
  7389  // UpdateMask sets the optional parameter "updateMask": Used to specify the
  7390  // fields to be overwritten in the `LbRouteExtension` resource by the update.
  7391  // The fields specified in the update_mask are relative to the resource, not
  7392  // the full request. A field is overwritten if it is in the mask. If the user
  7393  // does not specify a mask, then all fields are overwritten.
  7394  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall {
  7395  	c.urlParams_.Set("updateMask", updateMask)
  7396  	return c
  7397  }
  7398  
  7399  // Fields allows partial responses to be retrieved. See
  7400  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7401  // details.
  7402  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsPatchCall {
  7403  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7404  	return c
  7405  }
  7406  
  7407  // Context sets the context to be used in this call's Do method.
  7408  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall {
  7409  	c.ctx_ = ctx
  7410  	return c
  7411  }
  7412  
  7413  // Header returns a http.Header that can be modified by the caller to add
  7414  // headers to the request.
  7415  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Header() http.Header {
  7416  	if c.header_ == nil {
  7417  		c.header_ = make(http.Header)
  7418  	}
  7419  	return c.header_
  7420  }
  7421  
  7422  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) doRequest(alt string) (*http.Response, error) {
  7423  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7424  	var body io.Reader = nil
  7425  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension)
  7426  	if err != nil {
  7427  		return nil, err
  7428  	}
  7429  	c.urlParams_.Set("alt", alt)
  7430  	c.urlParams_.Set("prettyPrint", "false")
  7431  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7432  	urls += "?" + c.urlParams_.Encode()
  7433  	req, err := http.NewRequest("PATCH", urls, body)
  7434  	if err != nil {
  7435  		return nil, err
  7436  	}
  7437  	req.Header = reqHeaders
  7438  	googleapi.Expand(req.URL, map[string]string{
  7439  		"name": c.name,
  7440  	})
  7441  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7442  }
  7443  
  7444  // Do executes the "networkservices.projects.locations.lbRouteExtensions.patch" call.
  7445  // Any non-2xx status code is an error. Response headers are in either
  7446  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7447  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7448  // whether the returned error was because http.StatusNotModified was returned.
  7449  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7450  	gensupport.SetOptions(c.urlParams_, opts...)
  7451  	res, err := c.doRequest("json")
  7452  	if res != nil && res.StatusCode == http.StatusNotModified {
  7453  		if res.Body != nil {
  7454  			res.Body.Close()
  7455  		}
  7456  		return nil, gensupport.WrapError(&googleapi.Error{
  7457  			Code:   res.StatusCode,
  7458  			Header: res.Header,
  7459  		})
  7460  	}
  7461  	if err != nil {
  7462  		return nil, err
  7463  	}
  7464  	defer googleapi.CloseBody(res)
  7465  	if err := googleapi.CheckResponse(res); err != nil {
  7466  		return nil, gensupport.WrapError(err)
  7467  	}
  7468  	ret := &Operation{
  7469  		ServerResponse: googleapi.ServerResponse{
  7470  			Header:         res.Header,
  7471  			HTTPStatusCode: res.StatusCode,
  7472  		},
  7473  	}
  7474  	target := &ret
  7475  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7476  		return nil, err
  7477  	}
  7478  	return ret, nil
  7479  }
  7480  
  7481  type ProjectsLocationsLbTrafficExtensionsCreateCall struct {
  7482  	s                  *Service
  7483  	parent             string
  7484  	lbtrafficextension *LbTrafficExtension
  7485  	urlParams_         gensupport.URLParams
  7486  	ctx_               context.Context
  7487  	header_            http.Header
  7488  }
  7489  
  7490  // Create: Creates a new `LbTrafficExtension` resource in a given project and
  7491  // location.
  7492  //
  7493  //   - parent: The parent resource of the `LbTrafficExtension` resource. Must be
  7494  //     in the format `projects/{project}/locations/{location}`.
  7495  func (r *ProjectsLocationsLbTrafficExtensionsService) Create(parent string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  7496  	c := &ProjectsLocationsLbTrafficExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7497  	c.parent = parent
  7498  	c.lbtrafficextension = lbtrafficextension
  7499  	return c
  7500  }
  7501  
  7502  // LbTrafficExtensionId sets the optional parameter "lbTrafficExtensionId":
  7503  // Required. User-provided ID of the `LbTrafficExtension` resource to be
  7504  // created.
  7505  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) LbTrafficExtensionId(lbTrafficExtensionId string) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  7506  	c.urlParams_.Set("lbTrafficExtensionId", lbTrafficExtensionId)
  7507  	return c
  7508  }
  7509  
  7510  // RequestId sets the optional parameter "requestId": An optional request ID to
  7511  // identify requests. Specify a unique request ID so that if you must retry
  7512  // your request, the server can ignore the request if it has already been
  7513  // completed. The server guarantees that for at least 60 minutes since the
  7514  // first request. For example, consider a situation where you make an initial
  7515  // request and the request times out. If you make the request again with the
  7516  // same request ID, the server can check if original operation with the same
  7517  // request ID was received, and if so, ignores the second request. This
  7518  // prevents clients from accidentally creating duplicate commitments. The
  7519  // request ID must be a valid UUID with the exception that zero UUID is not
  7520  // supported (00000000-0000-0000-0000-000000000000).
  7521  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  7522  	c.urlParams_.Set("requestId", requestId)
  7523  	return c
  7524  }
  7525  
  7526  // Fields allows partial responses to be retrieved. See
  7527  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7528  // details.
  7529  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  7530  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7531  	return c
  7532  }
  7533  
  7534  // Context sets the context to be used in this call's Do method.
  7535  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  7536  	c.ctx_ = ctx
  7537  	return c
  7538  }
  7539  
  7540  // Header returns a http.Header that can be modified by the caller to add
  7541  // headers to the request.
  7542  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Header() http.Header {
  7543  	if c.header_ == nil {
  7544  		c.header_ = make(http.Header)
  7545  	}
  7546  	return c.header_
  7547  }
  7548  
  7549  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) doRequest(alt string) (*http.Response, error) {
  7550  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7551  	var body io.Reader = nil
  7552  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension)
  7553  	if err != nil {
  7554  		return nil, err
  7555  	}
  7556  	c.urlParams_.Set("alt", alt)
  7557  	c.urlParams_.Set("prettyPrint", "false")
  7558  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbTrafficExtensions")
  7559  	urls += "?" + c.urlParams_.Encode()
  7560  	req, err := http.NewRequest("POST", urls, body)
  7561  	if err != nil {
  7562  		return nil, err
  7563  	}
  7564  	req.Header = reqHeaders
  7565  	googleapi.Expand(req.URL, map[string]string{
  7566  		"parent": c.parent,
  7567  	})
  7568  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7569  }
  7570  
  7571  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.create" call.
  7572  // Any non-2xx status code is an error. Response headers are in either
  7573  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7574  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7575  // whether the returned error was because http.StatusNotModified was returned.
  7576  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7577  	gensupport.SetOptions(c.urlParams_, opts...)
  7578  	res, err := c.doRequest("json")
  7579  	if res != nil && res.StatusCode == http.StatusNotModified {
  7580  		if res.Body != nil {
  7581  			res.Body.Close()
  7582  		}
  7583  		return nil, gensupport.WrapError(&googleapi.Error{
  7584  			Code:   res.StatusCode,
  7585  			Header: res.Header,
  7586  		})
  7587  	}
  7588  	if err != nil {
  7589  		return nil, err
  7590  	}
  7591  	defer googleapi.CloseBody(res)
  7592  	if err := googleapi.CheckResponse(res); err != nil {
  7593  		return nil, gensupport.WrapError(err)
  7594  	}
  7595  	ret := &Operation{
  7596  		ServerResponse: googleapi.ServerResponse{
  7597  			Header:         res.Header,
  7598  			HTTPStatusCode: res.StatusCode,
  7599  		},
  7600  	}
  7601  	target := &ret
  7602  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7603  		return nil, err
  7604  	}
  7605  	return ret, nil
  7606  }
  7607  
  7608  type ProjectsLocationsLbTrafficExtensionsDeleteCall struct {
  7609  	s          *Service
  7610  	name       string
  7611  	urlParams_ gensupport.URLParams
  7612  	ctx_       context.Context
  7613  	header_    http.Header
  7614  }
  7615  
  7616  // Delete: Deletes the specified `LbTrafficExtension` resource.
  7617  //
  7618  //   - name: The name of the `LbTrafficExtension` resource to delete. Must be in
  7619  //     the format
  7620  //     `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex
  7621  //     tension}`.
  7622  func (r *ProjectsLocationsLbTrafficExtensionsService) Delete(name string) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  7623  	c := &ProjectsLocationsLbTrafficExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7624  	c.name = name
  7625  	return c
  7626  }
  7627  
  7628  // RequestId sets the optional parameter "requestId": An optional request ID to
  7629  // identify requests. Specify a unique request ID so that if you must retry
  7630  // your request, the server can ignore the request if it has already been
  7631  // completed. The server guarantees that for at least 60 minutes after the
  7632  // first request. For example, consider a situation where you make an initial
  7633  // request and the request times out. If you make the request again with the
  7634  // same request ID, the server can check if original operation with the same
  7635  // request ID was received, and if so, ignores the second request. This
  7636  // prevents clients from accidentally creating duplicate commitments. The
  7637  // request ID must be a valid UUID with the exception that zero UUID is not
  7638  // supported (00000000-0000-0000-0000-000000000000).
  7639  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  7640  	c.urlParams_.Set("requestId", requestId)
  7641  	return c
  7642  }
  7643  
  7644  // Fields allows partial responses to be retrieved. See
  7645  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7646  // details.
  7647  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  7648  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7649  	return c
  7650  }
  7651  
  7652  // Context sets the context to be used in this call's Do method.
  7653  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  7654  	c.ctx_ = ctx
  7655  	return c
  7656  }
  7657  
  7658  // Header returns a http.Header that can be modified by the caller to add
  7659  // headers to the request.
  7660  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Header() http.Header {
  7661  	if c.header_ == nil {
  7662  		c.header_ = make(http.Header)
  7663  	}
  7664  	return c.header_
  7665  }
  7666  
  7667  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7668  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7669  	var body io.Reader = nil
  7670  	c.urlParams_.Set("alt", alt)
  7671  	c.urlParams_.Set("prettyPrint", "false")
  7672  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7673  	urls += "?" + c.urlParams_.Encode()
  7674  	req, err := http.NewRequest("DELETE", urls, body)
  7675  	if err != nil {
  7676  		return nil, err
  7677  	}
  7678  	req.Header = reqHeaders
  7679  	googleapi.Expand(req.URL, map[string]string{
  7680  		"name": c.name,
  7681  	})
  7682  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7683  }
  7684  
  7685  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.delete" call.
  7686  // Any non-2xx status code is an error. Response headers are in either
  7687  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7688  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7689  // whether the returned error was because http.StatusNotModified was returned.
  7690  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7691  	gensupport.SetOptions(c.urlParams_, opts...)
  7692  	res, err := c.doRequest("json")
  7693  	if res != nil && res.StatusCode == http.StatusNotModified {
  7694  		if res.Body != nil {
  7695  			res.Body.Close()
  7696  		}
  7697  		return nil, gensupport.WrapError(&googleapi.Error{
  7698  			Code:   res.StatusCode,
  7699  			Header: res.Header,
  7700  		})
  7701  	}
  7702  	if err != nil {
  7703  		return nil, err
  7704  	}
  7705  	defer googleapi.CloseBody(res)
  7706  	if err := googleapi.CheckResponse(res); err != nil {
  7707  		return nil, gensupport.WrapError(err)
  7708  	}
  7709  	ret := &Operation{
  7710  		ServerResponse: googleapi.ServerResponse{
  7711  			Header:         res.Header,
  7712  			HTTPStatusCode: res.StatusCode,
  7713  		},
  7714  	}
  7715  	target := &ret
  7716  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7717  		return nil, err
  7718  	}
  7719  	return ret, nil
  7720  }
  7721  
  7722  type ProjectsLocationsLbTrafficExtensionsGetCall struct {
  7723  	s            *Service
  7724  	name         string
  7725  	urlParams_   gensupport.URLParams
  7726  	ifNoneMatch_ string
  7727  	ctx_         context.Context
  7728  	header_      http.Header
  7729  }
  7730  
  7731  // Get: Gets details of the specified `LbTrafficExtension` resource.
  7732  //
  7733  //   - name: A name of the `LbTrafficExtension` resource to get. Must be in the
  7734  //     format
  7735  //     `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex
  7736  //     tension}`.
  7737  func (r *ProjectsLocationsLbTrafficExtensionsService) Get(name string) *ProjectsLocationsLbTrafficExtensionsGetCall {
  7738  	c := &ProjectsLocationsLbTrafficExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7739  	c.name = name
  7740  	return c
  7741  }
  7742  
  7743  // Fields allows partial responses to be retrieved. See
  7744  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7745  // details.
  7746  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall {
  7747  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7748  	return c
  7749  }
  7750  
  7751  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7752  // object's ETag matches the given value. This is useful for getting updates
  7753  // only after the object has changed since the last request.
  7754  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsGetCall {
  7755  	c.ifNoneMatch_ = entityTag
  7756  	return c
  7757  }
  7758  
  7759  // Context sets the context to be used in this call's Do method.
  7760  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall {
  7761  	c.ctx_ = ctx
  7762  	return c
  7763  }
  7764  
  7765  // Header returns a http.Header that can be modified by the caller to add
  7766  // headers to the request.
  7767  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Header() http.Header {
  7768  	if c.header_ == nil {
  7769  		c.header_ = make(http.Header)
  7770  	}
  7771  	return c.header_
  7772  }
  7773  
  7774  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) doRequest(alt string) (*http.Response, error) {
  7775  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7776  	if c.ifNoneMatch_ != "" {
  7777  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7778  	}
  7779  	var body io.Reader = nil
  7780  	c.urlParams_.Set("alt", alt)
  7781  	c.urlParams_.Set("prettyPrint", "false")
  7782  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  7783  	urls += "?" + c.urlParams_.Encode()
  7784  	req, err := http.NewRequest("GET", urls, body)
  7785  	if err != nil {
  7786  		return nil, err
  7787  	}
  7788  	req.Header = reqHeaders
  7789  	googleapi.Expand(req.URL, map[string]string{
  7790  		"name": c.name,
  7791  	})
  7792  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7793  }
  7794  
  7795  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.get" call.
  7796  // Any non-2xx status code is an error. Response headers are in either
  7797  // *LbTrafficExtension.ServerResponse.Header or (if a response was returned at
  7798  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7799  // check whether the returned error was because http.StatusNotModified was
  7800  // returned.
  7801  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbTrafficExtension, error) {
  7802  	gensupport.SetOptions(c.urlParams_, opts...)
  7803  	res, err := c.doRequest("json")
  7804  	if res != nil && res.StatusCode == http.StatusNotModified {
  7805  		if res.Body != nil {
  7806  			res.Body.Close()
  7807  		}
  7808  		return nil, gensupport.WrapError(&googleapi.Error{
  7809  			Code:   res.StatusCode,
  7810  			Header: res.Header,
  7811  		})
  7812  	}
  7813  	if err != nil {
  7814  		return nil, err
  7815  	}
  7816  	defer googleapi.CloseBody(res)
  7817  	if err := googleapi.CheckResponse(res); err != nil {
  7818  		return nil, gensupport.WrapError(err)
  7819  	}
  7820  	ret := &LbTrafficExtension{
  7821  		ServerResponse: googleapi.ServerResponse{
  7822  			Header:         res.Header,
  7823  			HTTPStatusCode: res.StatusCode,
  7824  		},
  7825  	}
  7826  	target := &ret
  7827  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7828  		return nil, err
  7829  	}
  7830  	return ret, nil
  7831  }
  7832  
  7833  type ProjectsLocationsLbTrafficExtensionsListCall struct {
  7834  	s            *Service
  7835  	parent       string
  7836  	urlParams_   gensupport.URLParams
  7837  	ifNoneMatch_ string
  7838  	ctx_         context.Context
  7839  	header_      http.Header
  7840  }
  7841  
  7842  // List: Lists `LbTrafficExtension` resources in a given project and location.
  7843  //
  7844  //   - parent: The project and location from which the `LbTrafficExtension`
  7845  //     resources are listed, specified in the following format:
  7846  //     `projects/{project}/locations/{location}`.
  7847  func (r *ProjectsLocationsLbTrafficExtensionsService) List(parent string) *ProjectsLocationsLbTrafficExtensionsListCall {
  7848  	c := &ProjectsLocationsLbTrafficExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7849  	c.parent = parent
  7850  	return c
  7851  }
  7852  
  7853  // Filter sets the optional parameter "filter": Filtering results.
  7854  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Filter(filter string) *ProjectsLocationsLbTrafficExtensionsListCall {
  7855  	c.urlParams_.Set("filter", filter)
  7856  	return c
  7857  }
  7858  
  7859  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  7860  // results.
  7861  func (c *ProjectsLocationsLbTrafficExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbTrafficExtensionsListCall {
  7862  	c.urlParams_.Set("orderBy", orderBy)
  7863  	return c
  7864  }
  7865  
  7866  // PageSize sets the optional parameter "pageSize": Requested page size. The
  7867  // server might return fewer items than requested. If unspecified, the server
  7868  // picks an appropriate default.
  7869  func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbTrafficExtensionsListCall {
  7870  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7871  	return c
  7872  }
  7873  
  7874  // PageToken sets the optional parameter "pageToken": A token identifying a
  7875  // page of results that the server returns.
  7876  func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbTrafficExtensionsListCall {
  7877  	c.urlParams_.Set("pageToken", pageToken)
  7878  	return c
  7879  }
  7880  
  7881  // Fields allows partial responses to be retrieved. See
  7882  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7883  // details.
  7884  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall {
  7885  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7886  	return c
  7887  }
  7888  
  7889  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7890  // object's ETag matches the given value. This is useful for getting updates
  7891  // only after the object has changed since the last request.
  7892  func (c *ProjectsLocationsLbTrafficExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsListCall {
  7893  	c.ifNoneMatch_ = entityTag
  7894  	return c
  7895  }
  7896  
  7897  // Context sets the context to be used in this call's Do method.
  7898  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall {
  7899  	c.ctx_ = ctx
  7900  	return c
  7901  }
  7902  
  7903  // Header returns a http.Header that can be modified by the caller to add
  7904  // headers to the request.
  7905  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Header() http.Header {
  7906  	if c.header_ == nil {
  7907  		c.header_ = make(http.Header)
  7908  	}
  7909  	return c.header_
  7910  }
  7911  
  7912  func (c *ProjectsLocationsLbTrafficExtensionsListCall) doRequest(alt string) (*http.Response, error) {
  7913  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7914  	if c.ifNoneMatch_ != "" {
  7915  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7916  	}
  7917  	var body io.Reader = nil
  7918  	c.urlParams_.Set("alt", alt)
  7919  	c.urlParams_.Set("prettyPrint", "false")
  7920  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/lbTrafficExtensions")
  7921  	urls += "?" + c.urlParams_.Encode()
  7922  	req, err := http.NewRequest("GET", urls, body)
  7923  	if err != nil {
  7924  		return nil, err
  7925  	}
  7926  	req.Header = reqHeaders
  7927  	googleapi.Expand(req.URL, map[string]string{
  7928  		"parent": c.parent,
  7929  	})
  7930  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7931  }
  7932  
  7933  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.list" call.
  7934  // Any non-2xx status code is an error. Response headers are in either
  7935  // *ListLbTrafficExtensionsResponse.ServerResponse.Header or (if a response was
  7936  // returned at all) in error.(*googleapi.Error).Header. Use
  7937  // googleapi.IsNotModified to check whether the returned error was because
  7938  // http.StatusNotModified was returned.
  7939  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbTrafficExtensionsResponse, error) {
  7940  	gensupport.SetOptions(c.urlParams_, opts...)
  7941  	res, err := c.doRequest("json")
  7942  	if res != nil && res.StatusCode == http.StatusNotModified {
  7943  		if res.Body != nil {
  7944  			res.Body.Close()
  7945  		}
  7946  		return nil, gensupport.WrapError(&googleapi.Error{
  7947  			Code:   res.StatusCode,
  7948  			Header: res.Header,
  7949  		})
  7950  	}
  7951  	if err != nil {
  7952  		return nil, err
  7953  	}
  7954  	defer googleapi.CloseBody(res)
  7955  	if err := googleapi.CheckResponse(res); err != nil {
  7956  		return nil, gensupport.WrapError(err)
  7957  	}
  7958  	ret := &ListLbTrafficExtensionsResponse{
  7959  		ServerResponse: googleapi.ServerResponse{
  7960  			Header:         res.Header,
  7961  			HTTPStatusCode: res.StatusCode,
  7962  		},
  7963  	}
  7964  	target := &ret
  7965  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7966  		return nil, err
  7967  	}
  7968  	return ret, nil
  7969  }
  7970  
  7971  // Pages invokes f for each page of results.
  7972  // A non-nil error returned from f will halt the iteration.
  7973  // The provided context supersedes any context provided to the Context method.
  7974  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Pages(ctx context.Context, f func(*ListLbTrafficExtensionsResponse) error) error {
  7975  	c.ctx_ = ctx
  7976  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7977  	for {
  7978  		x, err := c.Do()
  7979  		if err != nil {
  7980  			return err
  7981  		}
  7982  		if err := f(x); err != nil {
  7983  			return err
  7984  		}
  7985  		if x.NextPageToken == "" {
  7986  			return nil
  7987  		}
  7988  		c.PageToken(x.NextPageToken)
  7989  	}
  7990  }
  7991  
  7992  type ProjectsLocationsLbTrafficExtensionsPatchCall struct {
  7993  	s                  *Service
  7994  	name               string
  7995  	lbtrafficextension *LbTrafficExtension
  7996  	urlParams_         gensupport.URLParams
  7997  	ctx_               context.Context
  7998  	header_            http.Header
  7999  }
  8000  
  8001  // Patch: Updates the parameters of the specified `LbTrafficExtension`
  8002  // resource.
  8003  //
  8004  //   - name: Identifier. Name of the `LbTrafficExtension` resource in the
  8005  //     following format:
  8006  //     `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex
  8007  //     tension}`.
  8008  func (r *ProjectsLocationsLbTrafficExtensionsService) Patch(name string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  8009  	c := &ProjectsLocationsLbTrafficExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8010  	c.name = name
  8011  	c.lbtrafficextension = lbtrafficextension
  8012  	return c
  8013  }
  8014  
  8015  // RequestId sets the optional parameter "requestId": An optional request ID to
  8016  // identify requests. Specify a unique request ID so that if you must retry
  8017  // your request, the server can ignore the request if it has already been
  8018  // completed. The server guarantees that for at least 60 minutes since the
  8019  // first request. For example, consider a situation where you make an initial
  8020  // request and the request times out. If you make the request again with the
  8021  // same request ID, the server can check if original operation with the same
  8022  // request ID was received, and if so, ignores the second request. This
  8023  // prevents clients from accidentally creating duplicate commitments. The
  8024  // request ID must be a valid UUID with the exception that zero UUID is not
  8025  // supported (00000000-0000-0000-0000-000000000000).
  8026  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  8027  	c.urlParams_.Set("requestId", requestId)
  8028  	return c
  8029  }
  8030  
  8031  // UpdateMask sets the optional parameter "updateMask": Used to specify the
  8032  // fields to be overwritten in the `LbTrafficExtension` resource by the update.
  8033  // The fields specified in the update_mask are relative to the resource, not
  8034  // the full request. A field is overwritten if it is in the mask. If the user
  8035  // does not specify a mask, then all fields are overwritten.
  8036  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  8037  	c.urlParams_.Set("updateMask", updateMask)
  8038  	return c
  8039  }
  8040  
  8041  // Fields allows partial responses to be retrieved. See
  8042  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8043  // details.
  8044  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  8045  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8046  	return c
  8047  }
  8048  
  8049  // Context sets the context to be used in this call's Do method.
  8050  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  8051  	c.ctx_ = ctx
  8052  	return c
  8053  }
  8054  
  8055  // Header returns a http.Header that can be modified by the caller to add
  8056  // headers to the request.
  8057  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Header() http.Header {
  8058  	if c.header_ == nil {
  8059  		c.header_ = make(http.Header)
  8060  	}
  8061  	return c.header_
  8062  }
  8063  
  8064  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) doRequest(alt string) (*http.Response, error) {
  8065  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8066  	var body io.Reader = nil
  8067  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension)
  8068  	if err != nil {
  8069  		return nil, err
  8070  	}
  8071  	c.urlParams_.Set("alt", alt)
  8072  	c.urlParams_.Set("prettyPrint", "false")
  8073  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8074  	urls += "?" + c.urlParams_.Encode()
  8075  	req, err := http.NewRequest("PATCH", urls, body)
  8076  	if err != nil {
  8077  		return nil, err
  8078  	}
  8079  	req.Header = reqHeaders
  8080  	googleapi.Expand(req.URL, map[string]string{
  8081  		"name": c.name,
  8082  	})
  8083  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8084  }
  8085  
  8086  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.patch" call.
  8087  // Any non-2xx status code is an error. Response headers are in either
  8088  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8089  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8090  // whether the returned error was because http.StatusNotModified was returned.
  8091  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8092  	gensupport.SetOptions(c.urlParams_, opts...)
  8093  	res, err := c.doRequest("json")
  8094  	if res != nil && res.StatusCode == http.StatusNotModified {
  8095  		if res.Body != nil {
  8096  			res.Body.Close()
  8097  		}
  8098  		return nil, gensupport.WrapError(&googleapi.Error{
  8099  			Code:   res.StatusCode,
  8100  			Header: res.Header,
  8101  		})
  8102  	}
  8103  	if err != nil {
  8104  		return nil, err
  8105  	}
  8106  	defer googleapi.CloseBody(res)
  8107  	if err := googleapi.CheckResponse(res); err != nil {
  8108  		return nil, gensupport.WrapError(err)
  8109  	}
  8110  	ret := &Operation{
  8111  		ServerResponse: googleapi.ServerResponse{
  8112  			Header:         res.Header,
  8113  			HTTPStatusCode: res.StatusCode,
  8114  		},
  8115  	}
  8116  	target := &ret
  8117  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8118  		return nil, err
  8119  	}
  8120  	return ret, nil
  8121  }
  8122  
  8123  type ProjectsLocationsMeshesCreateCall struct {
  8124  	s          *Service
  8125  	parent     string
  8126  	mesh       *Mesh
  8127  	urlParams_ gensupport.URLParams
  8128  	ctx_       context.Context
  8129  	header_    http.Header
  8130  }
  8131  
  8132  // Create: Creates a new Mesh in a given project and location.
  8133  //
  8134  //   - parent: The parent resource of the Mesh. Must be in the format
  8135  //     `projects/*/locations/global`.
  8136  func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall {
  8137  	c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8138  	c.parent = parent
  8139  	c.mesh = mesh
  8140  	return c
  8141  }
  8142  
  8143  // MeshId sets the optional parameter "meshId": Required. Short name of the
  8144  // Mesh resource to be created.
  8145  func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall {
  8146  	c.urlParams_.Set("meshId", meshId)
  8147  	return c
  8148  }
  8149  
  8150  // Fields allows partial responses to be retrieved. See
  8151  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8152  // details.
  8153  func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall {
  8154  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8155  	return c
  8156  }
  8157  
  8158  // Context sets the context to be used in this call's Do method.
  8159  func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall {
  8160  	c.ctx_ = ctx
  8161  	return c
  8162  }
  8163  
  8164  // Header returns a http.Header that can be modified by the caller to add
  8165  // headers to the request.
  8166  func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header {
  8167  	if c.header_ == nil {
  8168  		c.header_ = make(http.Header)
  8169  	}
  8170  	return c.header_
  8171  }
  8172  
  8173  func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) {
  8174  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8175  	var body io.Reader = nil
  8176  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh)
  8177  	if err != nil {
  8178  		return nil, err
  8179  	}
  8180  	c.urlParams_.Set("alt", alt)
  8181  	c.urlParams_.Set("prettyPrint", "false")
  8182  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/meshes")
  8183  	urls += "?" + c.urlParams_.Encode()
  8184  	req, err := http.NewRequest("POST", urls, body)
  8185  	if err != nil {
  8186  		return nil, err
  8187  	}
  8188  	req.Header = reqHeaders
  8189  	googleapi.Expand(req.URL, map[string]string{
  8190  		"parent": c.parent,
  8191  	})
  8192  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8193  }
  8194  
  8195  // Do executes the "networkservices.projects.locations.meshes.create" call.
  8196  // Any non-2xx status code is an error. Response headers are in either
  8197  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8198  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8199  // whether the returned error was because http.StatusNotModified was returned.
  8200  func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8201  	gensupport.SetOptions(c.urlParams_, opts...)
  8202  	res, err := c.doRequest("json")
  8203  	if res != nil && res.StatusCode == http.StatusNotModified {
  8204  		if res.Body != nil {
  8205  			res.Body.Close()
  8206  		}
  8207  		return nil, gensupport.WrapError(&googleapi.Error{
  8208  			Code:   res.StatusCode,
  8209  			Header: res.Header,
  8210  		})
  8211  	}
  8212  	if err != nil {
  8213  		return nil, err
  8214  	}
  8215  	defer googleapi.CloseBody(res)
  8216  	if err := googleapi.CheckResponse(res); err != nil {
  8217  		return nil, gensupport.WrapError(err)
  8218  	}
  8219  	ret := &Operation{
  8220  		ServerResponse: googleapi.ServerResponse{
  8221  			Header:         res.Header,
  8222  			HTTPStatusCode: res.StatusCode,
  8223  		},
  8224  	}
  8225  	target := &ret
  8226  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8227  		return nil, err
  8228  	}
  8229  	return ret, nil
  8230  }
  8231  
  8232  type ProjectsLocationsMeshesDeleteCall struct {
  8233  	s          *Service
  8234  	name       string
  8235  	urlParams_ gensupport.URLParams
  8236  	ctx_       context.Context
  8237  	header_    http.Header
  8238  }
  8239  
  8240  // Delete: Deletes a single Mesh.
  8241  //
  8242  //   - name: A name of the Mesh to delete. Must be in the format
  8243  //     `projects/*/locations/global/meshes/*`.
  8244  func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall {
  8245  	c := &ProjectsLocationsMeshesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8246  	c.name = name
  8247  	return c
  8248  }
  8249  
  8250  // Fields allows partial responses to be retrieved. See
  8251  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8252  // details.
  8253  func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall {
  8254  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8255  	return c
  8256  }
  8257  
  8258  // Context sets the context to be used in this call's Do method.
  8259  func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall {
  8260  	c.ctx_ = ctx
  8261  	return c
  8262  }
  8263  
  8264  // Header returns a http.Header that can be modified by the caller to add
  8265  // headers to the request.
  8266  func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header {
  8267  	if c.header_ == nil {
  8268  		c.header_ = make(http.Header)
  8269  	}
  8270  	return c.header_
  8271  }
  8272  
  8273  func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8274  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8275  	var body io.Reader = nil
  8276  	c.urlParams_.Set("alt", alt)
  8277  	c.urlParams_.Set("prettyPrint", "false")
  8278  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8279  	urls += "?" + c.urlParams_.Encode()
  8280  	req, err := http.NewRequest("DELETE", urls, body)
  8281  	if err != nil {
  8282  		return nil, err
  8283  	}
  8284  	req.Header = reqHeaders
  8285  	googleapi.Expand(req.URL, map[string]string{
  8286  		"name": c.name,
  8287  	})
  8288  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8289  }
  8290  
  8291  // Do executes the "networkservices.projects.locations.meshes.delete" call.
  8292  // Any non-2xx status code is an error. Response headers are in either
  8293  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8294  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8295  // whether the returned error was because http.StatusNotModified was returned.
  8296  func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8297  	gensupport.SetOptions(c.urlParams_, opts...)
  8298  	res, err := c.doRequest("json")
  8299  	if res != nil && res.StatusCode == http.StatusNotModified {
  8300  		if res.Body != nil {
  8301  			res.Body.Close()
  8302  		}
  8303  		return nil, gensupport.WrapError(&googleapi.Error{
  8304  			Code:   res.StatusCode,
  8305  			Header: res.Header,
  8306  		})
  8307  	}
  8308  	if err != nil {
  8309  		return nil, err
  8310  	}
  8311  	defer googleapi.CloseBody(res)
  8312  	if err := googleapi.CheckResponse(res); err != nil {
  8313  		return nil, gensupport.WrapError(err)
  8314  	}
  8315  	ret := &Operation{
  8316  		ServerResponse: googleapi.ServerResponse{
  8317  			Header:         res.Header,
  8318  			HTTPStatusCode: res.StatusCode,
  8319  		},
  8320  	}
  8321  	target := &ret
  8322  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8323  		return nil, err
  8324  	}
  8325  	return ret, nil
  8326  }
  8327  
  8328  type ProjectsLocationsMeshesGetCall struct {
  8329  	s            *Service
  8330  	name         string
  8331  	urlParams_   gensupport.URLParams
  8332  	ifNoneMatch_ string
  8333  	ctx_         context.Context
  8334  	header_      http.Header
  8335  }
  8336  
  8337  // Get: Gets details of a single Mesh.
  8338  //
  8339  //   - name: A name of the Mesh to get. Must be in the format
  8340  //     `projects/*/locations/global/meshes/*`.
  8341  func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall {
  8342  	c := &ProjectsLocationsMeshesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8343  	c.name = name
  8344  	return c
  8345  }
  8346  
  8347  // Fields allows partial responses to be retrieved. See
  8348  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8349  // details.
  8350  func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall {
  8351  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8352  	return c
  8353  }
  8354  
  8355  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8356  // object's ETag matches the given value. This is useful for getting updates
  8357  // only after the object has changed since the last request.
  8358  func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall {
  8359  	c.ifNoneMatch_ = entityTag
  8360  	return c
  8361  }
  8362  
  8363  // Context sets the context to be used in this call's Do method.
  8364  func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall {
  8365  	c.ctx_ = ctx
  8366  	return c
  8367  }
  8368  
  8369  // Header returns a http.Header that can be modified by the caller to add
  8370  // headers to the request.
  8371  func (c *ProjectsLocationsMeshesGetCall) Header() http.Header {
  8372  	if c.header_ == nil {
  8373  		c.header_ = make(http.Header)
  8374  	}
  8375  	return c.header_
  8376  }
  8377  
  8378  func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) {
  8379  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8380  	if c.ifNoneMatch_ != "" {
  8381  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8382  	}
  8383  	var body io.Reader = nil
  8384  	c.urlParams_.Set("alt", alt)
  8385  	c.urlParams_.Set("prettyPrint", "false")
  8386  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8387  	urls += "?" + c.urlParams_.Encode()
  8388  	req, err := http.NewRequest("GET", urls, body)
  8389  	if err != nil {
  8390  		return nil, err
  8391  	}
  8392  	req.Header = reqHeaders
  8393  	googleapi.Expand(req.URL, map[string]string{
  8394  		"name": c.name,
  8395  	})
  8396  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8397  }
  8398  
  8399  // Do executes the "networkservices.projects.locations.meshes.get" call.
  8400  // Any non-2xx status code is an error. Response headers are in either
  8401  // *Mesh.ServerResponse.Header or (if a response was returned at all) in
  8402  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8403  // whether the returned error was because http.StatusNotModified was returned.
  8404  func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, error) {
  8405  	gensupport.SetOptions(c.urlParams_, opts...)
  8406  	res, err := c.doRequest("json")
  8407  	if res != nil && res.StatusCode == http.StatusNotModified {
  8408  		if res.Body != nil {
  8409  			res.Body.Close()
  8410  		}
  8411  		return nil, gensupport.WrapError(&googleapi.Error{
  8412  			Code:   res.StatusCode,
  8413  			Header: res.Header,
  8414  		})
  8415  	}
  8416  	if err != nil {
  8417  		return nil, err
  8418  	}
  8419  	defer googleapi.CloseBody(res)
  8420  	if err := googleapi.CheckResponse(res); err != nil {
  8421  		return nil, gensupport.WrapError(err)
  8422  	}
  8423  	ret := &Mesh{
  8424  		ServerResponse: googleapi.ServerResponse{
  8425  			Header:         res.Header,
  8426  			HTTPStatusCode: res.StatusCode,
  8427  		},
  8428  	}
  8429  	target := &ret
  8430  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8431  		return nil, err
  8432  	}
  8433  	return ret, nil
  8434  }
  8435  
  8436  type ProjectsLocationsMeshesGetIamPolicyCall struct {
  8437  	s            *Service
  8438  	resource     string
  8439  	urlParams_   gensupport.URLParams
  8440  	ifNoneMatch_ string
  8441  	ctx_         context.Context
  8442  	header_      http.Header
  8443  }
  8444  
  8445  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  8446  // empty policy if the resource exists and does not have a policy set.
  8447  //
  8448  //   - resource: REQUIRED: The resource for which the policy is being requested.
  8449  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  8450  //     for the appropriate value for this field.
  8451  func (r *ProjectsLocationsMeshesService) GetIamPolicy(resource string) *ProjectsLocationsMeshesGetIamPolicyCall {
  8452  	c := &ProjectsLocationsMeshesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8453  	c.resource = resource
  8454  	return c
  8455  }
  8456  
  8457  // OptionsRequestedPolicyVersion sets the optional parameter
  8458  // "options.requestedPolicyVersion": The maximum policy version that will be
  8459  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  8460  // an invalid value will be rejected. Requests for policies with any
  8461  // conditional role bindings must specify version 3. Policies with no
  8462  // conditional role bindings may specify any valid value or leave the field
  8463  // unset. The policy in the response might use the policy version that you
  8464  // specified, or it might use a lower policy version. For example, if you
  8465  // specify version 3, but the policy has no conditional role bindings, the
  8466  // response uses version 1. To learn which resources support conditions in
  8467  // their IAM policies, see the IAM documentation
  8468  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  8469  func (c *ProjectsLocationsMeshesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMeshesGetIamPolicyCall {
  8470  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  8471  	return c
  8472  }
  8473  
  8474  // Fields allows partial responses to be retrieved. See
  8475  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8476  // details.
  8477  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetIamPolicyCall {
  8478  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8479  	return c
  8480  }
  8481  
  8482  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8483  // object's ETag matches the given value. This is useful for getting updates
  8484  // only after the object has changed since the last request.
  8485  func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetIamPolicyCall {
  8486  	c.ifNoneMatch_ = entityTag
  8487  	return c
  8488  }
  8489  
  8490  // Context sets the context to be used in this call's Do method.
  8491  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetIamPolicyCall {
  8492  	c.ctx_ = ctx
  8493  	return c
  8494  }
  8495  
  8496  // Header returns a http.Header that can be modified by the caller to add
  8497  // headers to the request.
  8498  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Header() http.Header {
  8499  	if c.header_ == nil {
  8500  		c.header_ = make(http.Header)
  8501  	}
  8502  	return c.header_
  8503  }
  8504  
  8505  func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8506  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8507  	if c.ifNoneMatch_ != "" {
  8508  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8509  	}
  8510  	var body io.Reader = nil
  8511  	c.urlParams_.Set("alt", alt)
  8512  	c.urlParams_.Set("prettyPrint", "false")
  8513  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  8514  	urls += "?" + c.urlParams_.Encode()
  8515  	req, err := http.NewRequest("GET", urls, body)
  8516  	if err != nil {
  8517  		return nil, err
  8518  	}
  8519  	req.Header = reqHeaders
  8520  	googleapi.Expand(req.URL, map[string]string{
  8521  		"resource": c.resource,
  8522  	})
  8523  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8524  }
  8525  
  8526  // Do executes the "networkservices.projects.locations.meshes.getIamPolicy" call.
  8527  // Any non-2xx status code is an error. Response headers are in either
  8528  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  8529  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8530  // whether the returned error was because http.StatusNotModified was returned.
  8531  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8532  	gensupport.SetOptions(c.urlParams_, opts...)
  8533  	res, err := c.doRequest("json")
  8534  	if res != nil && res.StatusCode == http.StatusNotModified {
  8535  		if res.Body != nil {
  8536  			res.Body.Close()
  8537  		}
  8538  		return nil, gensupport.WrapError(&googleapi.Error{
  8539  			Code:   res.StatusCode,
  8540  			Header: res.Header,
  8541  		})
  8542  	}
  8543  	if err != nil {
  8544  		return nil, err
  8545  	}
  8546  	defer googleapi.CloseBody(res)
  8547  	if err := googleapi.CheckResponse(res); err != nil {
  8548  		return nil, gensupport.WrapError(err)
  8549  	}
  8550  	ret := &Policy{
  8551  		ServerResponse: googleapi.ServerResponse{
  8552  			Header:         res.Header,
  8553  			HTTPStatusCode: res.StatusCode,
  8554  		},
  8555  	}
  8556  	target := &ret
  8557  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8558  		return nil, err
  8559  	}
  8560  	return ret, nil
  8561  }
  8562  
  8563  type ProjectsLocationsMeshesListCall struct {
  8564  	s            *Service
  8565  	parent       string
  8566  	urlParams_   gensupport.URLParams
  8567  	ifNoneMatch_ string
  8568  	ctx_         context.Context
  8569  	header_      http.Header
  8570  }
  8571  
  8572  // List: Lists Meshes in a given project and location.
  8573  //
  8574  //   - parent: The project and location from which the Meshes should be listed,
  8575  //     specified in the format `projects/*/locations/global`.
  8576  func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall {
  8577  	c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8578  	c.parent = parent
  8579  	return c
  8580  }
  8581  
  8582  // PageSize sets the optional parameter "pageSize": Maximum number of Meshes to
  8583  // return per call.
  8584  func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall {
  8585  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8586  	return c
  8587  }
  8588  
  8589  // PageToken sets the optional parameter "pageToken": The value returned by the
  8590  // last `ListMeshesResponse` Indicates that this is a continuation of a prior
  8591  // `ListMeshes` call, and that the system should return the next page of data.
  8592  func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall {
  8593  	c.urlParams_.Set("pageToken", pageToken)
  8594  	return c
  8595  }
  8596  
  8597  // Fields allows partial responses to be retrieved. See
  8598  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8599  // details.
  8600  func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall {
  8601  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8602  	return c
  8603  }
  8604  
  8605  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8606  // object's ETag matches the given value. This is useful for getting updates
  8607  // only after the object has changed since the last request.
  8608  func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall {
  8609  	c.ifNoneMatch_ = entityTag
  8610  	return c
  8611  }
  8612  
  8613  // Context sets the context to be used in this call's Do method.
  8614  func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall {
  8615  	c.ctx_ = ctx
  8616  	return c
  8617  }
  8618  
  8619  // Header returns a http.Header that can be modified by the caller to add
  8620  // headers to the request.
  8621  func (c *ProjectsLocationsMeshesListCall) Header() http.Header {
  8622  	if c.header_ == nil {
  8623  		c.header_ = make(http.Header)
  8624  	}
  8625  	return c.header_
  8626  }
  8627  
  8628  func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) {
  8629  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8630  	if c.ifNoneMatch_ != "" {
  8631  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8632  	}
  8633  	var body io.Reader = nil
  8634  	c.urlParams_.Set("alt", alt)
  8635  	c.urlParams_.Set("prettyPrint", "false")
  8636  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/meshes")
  8637  	urls += "?" + c.urlParams_.Encode()
  8638  	req, err := http.NewRequest("GET", urls, body)
  8639  	if err != nil {
  8640  		return nil, err
  8641  	}
  8642  	req.Header = reqHeaders
  8643  	googleapi.Expand(req.URL, map[string]string{
  8644  		"parent": c.parent,
  8645  	})
  8646  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8647  }
  8648  
  8649  // Do executes the "networkservices.projects.locations.meshes.list" call.
  8650  // Any non-2xx status code is an error. Response headers are in either
  8651  // *ListMeshesResponse.ServerResponse.Header or (if a response was returned at
  8652  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8653  // check whether the returned error was because http.StatusNotModified was
  8654  // returned.
  8655  func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, error) {
  8656  	gensupport.SetOptions(c.urlParams_, opts...)
  8657  	res, err := c.doRequest("json")
  8658  	if res != nil && res.StatusCode == http.StatusNotModified {
  8659  		if res.Body != nil {
  8660  			res.Body.Close()
  8661  		}
  8662  		return nil, gensupport.WrapError(&googleapi.Error{
  8663  			Code:   res.StatusCode,
  8664  			Header: res.Header,
  8665  		})
  8666  	}
  8667  	if err != nil {
  8668  		return nil, err
  8669  	}
  8670  	defer googleapi.CloseBody(res)
  8671  	if err := googleapi.CheckResponse(res); err != nil {
  8672  		return nil, gensupport.WrapError(err)
  8673  	}
  8674  	ret := &ListMeshesResponse{
  8675  		ServerResponse: googleapi.ServerResponse{
  8676  			Header:         res.Header,
  8677  			HTTPStatusCode: res.StatusCode,
  8678  		},
  8679  	}
  8680  	target := &ret
  8681  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8682  		return nil, err
  8683  	}
  8684  	return ret, nil
  8685  }
  8686  
  8687  // Pages invokes f for each page of results.
  8688  // A non-nil error returned from f will halt the iteration.
  8689  // The provided context supersedes any context provided to the Context method.
  8690  func (c *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error {
  8691  	c.ctx_ = ctx
  8692  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8693  	for {
  8694  		x, err := c.Do()
  8695  		if err != nil {
  8696  			return err
  8697  		}
  8698  		if err := f(x); err != nil {
  8699  			return err
  8700  		}
  8701  		if x.NextPageToken == "" {
  8702  			return nil
  8703  		}
  8704  		c.PageToken(x.NextPageToken)
  8705  	}
  8706  }
  8707  
  8708  type ProjectsLocationsMeshesPatchCall struct {
  8709  	s          *Service
  8710  	name       string
  8711  	mesh       *Mesh
  8712  	urlParams_ gensupport.URLParams
  8713  	ctx_       context.Context
  8714  	header_    http.Header
  8715  }
  8716  
  8717  // Patch: Updates the parameters of a single Mesh.
  8718  //
  8719  //   - name: Name of the Mesh resource. It matches pattern
  8720  //     `projects/*/locations/global/meshes/`.
  8721  func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall {
  8722  	c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8723  	c.name = name
  8724  	c.mesh = mesh
  8725  	return c
  8726  }
  8727  
  8728  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  8729  // specify the fields to be overwritten in the Mesh resource by the update. The
  8730  // fields specified in the update_mask are relative to the resource, not the
  8731  // full request. A field will be overwritten if it is in the mask. If the user
  8732  // does not provide a mask then all fields will be overwritten.
  8733  func (c *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall {
  8734  	c.urlParams_.Set("updateMask", updateMask)
  8735  	return c
  8736  }
  8737  
  8738  // Fields allows partial responses to be retrieved. See
  8739  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8740  // details.
  8741  func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall {
  8742  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8743  	return c
  8744  }
  8745  
  8746  // Context sets the context to be used in this call's Do method.
  8747  func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall {
  8748  	c.ctx_ = ctx
  8749  	return c
  8750  }
  8751  
  8752  // Header returns a http.Header that can be modified by the caller to add
  8753  // headers to the request.
  8754  func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header {
  8755  	if c.header_ == nil {
  8756  		c.header_ = make(http.Header)
  8757  	}
  8758  	return c.header_
  8759  }
  8760  
  8761  func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) {
  8762  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8763  	var body io.Reader = nil
  8764  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh)
  8765  	if err != nil {
  8766  		return nil, err
  8767  	}
  8768  	c.urlParams_.Set("alt", alt)
  8769  	c.urlParams_.Set("prettyPrint", "false")
  8770  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  8771  	urls += "?" + c.urlParams_.Encode()
  8772  	req, err := http.NewRequest("PATCH", urls, body)
  8773  	if err != nil {
  8774  		return nil, err
  8775  	}
  8776  	req.Header = reqHeaders
  8777  	googleapi.Expand(req.URL, map[string]string{
  8778  		"name": c.name,
  8779  	})
  8780  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8781  }
  8782  
  8783  // Do executes the "networkservices.projects.locations.meshes.patch" call.
  8784  // Any non-2xx status code is an error. Response headers are in either
  8785  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8786  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8787  // whether the returned error was because http.StatusNotModified was returned.
  8788  func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8789  	gensupport.SetOptions(c.urlParams_, opts...)
  8790  	res, err := c.doRequest("json")
  8791  	if res != nil && res.StatusCode == http.StatusNotModified {
  8792  		if res.Body != nil {
  8793  			res.Body.Close()
  8794  		}
  8795  		return nil, gensupport.WrapError(&googleapi.Error{
  8796  			Code:   res.StatusCode,
  8797  			Header: res.Header,
  8798  		})
  8799  	}
  8800  	if err != nil {
  8801  		return nil, err
  8802  	}
  8803  	defer googleapi.CloseBody(res)
  8804  	if err := googleapi.CheckResponse(res); err != nil {
  8805  		return nil, gensupport.WrapError(err)
  8806  	}
  8807  	ret := &Operation{
  8808  		ServerResponse: googleapi.ServerResponse{
  8809  			Header:         res.Header,
  8810  			HTTPStatusCode: res.StatusCode,
  8811  		},
  8812  	}
  8813  	target := &ret
  8814  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8815  		return nil, err
  8816  	}
  8817  	return ret, nil
  8818  }
  8819  
  8820  type ProjectsLocationsMeshesSetIamPolicyCall struct {
  8821  	s                   *Service
  8822  	resource            string
  8823  	setiampolicyrequest *SetIamPolicyRequest
  8824  	urlParams_          gensupport.URLParams
  8825  	ctx_                context.Context
  8826  	header_             http.Header
  8827  }
  8828  
  8829  // SetIamPolicy: Sets the access control policy on the specified resource.
  8830  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  8831  // and `PERMISSION_DENIED` errors.
  8832  //
  8833  //   - resource: REQUIRED: The resource for which the policy is being specified.
  8834  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  8835  //     for the appropriate value for this field.
  8836  func (r *ProjectsLocationsMeshesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMeshesSetIamPolicyCall {
  8837  	c := &ProjectsLocationsMeshesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8838  	c.resource = resource
  8839  	c.setiampolicyrequest = setiampolicyrequest
  8840  	return c
  8841  }
  8842  
  8843  // Fields allows partial responses to be retrieved. See
  8844  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8845  // details.
  8846  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesSetIamPolicyCall {
  8847  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8848  	return c
  8849  }
  8850  
  8851  // Context sets the context to be used in this call's Do method.
  8852  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesSetIamPolicyCall {
  8853  	c.ctx_ = ctx
  8854  	return c
  8855  }
  8856  
  8857  // Header returns a http.Header that can be modified by the caller to add
  8858  // headers to the request.
  8859  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Header() http.Header {
  8860  	if c.header_ == nil {
  8861  		c.header_ = make(http.Header)
  8862  	}
  8863  	return c.header_
  8864  }
  8865  
  8866  func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8867  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8868  	var body io.Reader = nil
  8869  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  8870  	if err != nil {
  8871  		return nil, err
  8872  	}
  8873  	c.urlParams_.Set("alt", alt)
  8874  	c.urlParams_.Set("prettyPrint", "false")
  8875  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
  8876  	urls += "?" + c.urlParams_.Encode()
  8877  	req, err := http.NewRequest("POST", urls, body)
  8878  	if err != nil {
  8879  		return nil, err
  8880  	}
  8881  	req.Header = reqHeaders
  8882  	googleapi.Expand(req.URL, map[string]string{
  8883  		"resource": c.resource,
  8884  	})
  8885  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8886  }
  8887  
  8888  // Do executes the "networkservices.projects.locations.meshes.setIamPolicy" call.
  8889  // Any non-2xx status code is an error. Response headers are in either
  8890  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  8891  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8892  // whether the returned error was because http.StatusNotModified was returned.
  8893  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8894  	gensupport.SetOptions(c.urlParams_, opts...)
  8895  	res, err := c.doRequest("json")
  8896  	if res != nil && res.StatusCode == http.StatusNotModified {
  8897  		if res.Body != nil {
  8898  			res.Body.Close()
  8899  		}
  8900  		return nil, gensupport.WrapError(&googleapi.Error{
  8901  			Code:   res.StatusCode,
  8902  			Header: res.Header,
  8903  		})
  8904  	}
  8905  	if err != nil {
  8906  		return nil, err
  8907  	}
  8908  	defer googleapi.CloseBody(res)
  8909  	if err := googleapi.CheckResponse(res); err != nil {
  8910  		return nil, gensupport.WrapError(err)
  8911  	}
  8912  	ret := &Policy{
  8913  		ServerResponse: googleapi.ServerResponse{
  8914  			Header:         res.Header,
  8915  			HTTPStatusCode: res.StatusCode,
  8916  		},
  8917  	}
  8918  	target := &ret
  8919  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8920  		return nil, err
  8921  	}
  8922  	return ret, nil
  8923  }
  8924  
  8925  type ProjectsLocationsMeshesTestIamPermissionsCall struct {
  8926  	s                         *Service
  8927  	resource                  string
  8928  	testiampermissionsrequest *TestIamPermissionsRequest
  8929  	urlParams_                gensupport.URLParams
  8930  	ctx_                      context.Context
  8931  	header_                   http.Header
  8932  }
  8933  
  8934  // TestIamPermissions: Returns permissions that a caller has on the specified
  8935  // resource. If the resource does not exist, this will return an empty set of
  8936  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  8937  // used for building permission-aware UIs and command-line tools, not for
  8938  // authorization checking. This operation may "fail open" without warning.
  8939  //
  8940  //   - resource: REQUIRED: The resource for which the policy detail is being
  8941  //     requested. See Resource names
  8942  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  8943  //     value for this field.
  8944  func (r *ProjectsLocationsMeshesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMeshesTestIamPermissionsCall {
  8945  	c := &ProjectsLocationsMeshesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8946  	c.resource = resource
  8947  	c.testiampermissionsrequest = testiampermissionsrequest
  8948  	return c
  8949  }
  8950  
  8951  // Fields allows partial responses to be retrieved. See
  8952  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8953  // details.
  8954  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall {
  8955  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8956  	return c
  8957  }
  8958  
  8959  // Context sets the context to be used in this call's Do method.
  8960  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMeshesTestIamPermissionsCall {
  8961  	c.ctx_ = ctx
  8962  	return c
  8963  }
  8964  
  8965  // Header returns a http.Header that can be modified by the caller to add
  8966  // headers to the request.
  8967  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Header() http.Header {
  8968  	if c.header_ == nil {
  8969  		c.header_ = make(http.Header)
  8970  	}
  8971  	return c.header_
  8972  }
  8973  
  8974  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  8975  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8976  	var body io.Reader = nil
  8977  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  8978  	if err != nil {
  8979  		return nil, err
  8980  	}
  8981  	c.urlParams_.Set("alt", alt)
  8982  	c.urlParams_.Set("prettyPrint", "false")
  8983  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
  8984  	urls += "?" + c.urlParams_.Encode()
  8985  	req, err := http.NewRequest("POST", urls, body)
  8986  	if err != nil {
  8987  		return nil, err
  8988  	}
  8989  	req.Header = reqHeaders
  8990  	googleapi.Expand(req.URL, map[string]string{
  8991  		"resource": c.resource,
  8992  	})
  8993  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8994  }
  8995  
  8996  // Do executes the "networkservices.projects.locations.meshes.testIamPermissions" call.
  8997  // Any non-2xx status code is an error. Response headers are in either
  8998  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  8999  // returned at all) in error.(*googleapi.Error).Header. Use
  9000  // googleapi.IsNotModified to check whether the returned error was because
  9001  // http.StatusNotModified was returned.
  9002  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  9003  	gensupport.SetOptions(c.urlParams_, opts...)
  9004  	res, err := c.doRequest("json")
  9005  	if res != nil && res.StatusCode == http.StatusNotModified {
  9006  		if res.Body != nil {
  9007  			res.Body.Close()
  9008  		}
  9009  		return nil, gensupport.WrapError(&googleapi.Error{
  9010  			Code:   res.StatusCode,
  9011  			Header: res.Header,
  9012  		})
  9013  	}
  9014  	if err != nil {
  9015  		return nil, err
  9016  	}
  9017  	defer googleapi.CloseBody(res)
  9018  	if err := googleapi.CheckResponse(res); err != nil {
  9019  		return nil, gensupport.WrapError(err)
  9020  	}
  9021  	ret := &TestIamPermissionsResponse{
  9022  		ServerResponse: googleapi.ServerResponse{
  9023  			Header:         res.Header,
  9024  			HTTPStatusCode: res.StatusCode,
  9025  		},
  9026  	}
  9027  	target := &ret
  9028  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9029  		return nil, err
  9030  	}
  9031  	return ret, nil
  9032  }
  9033  
  9034  type ProjectsLocationsOperationsCancelCall struct {
  9035  	s                      *Service
  9036  	name                   string
  9037  	canceloperationrequest *CancelOperationRequest
  9038  	urlParams_             gensupport.URLParams
  9039  	ctx_                   context.Context
  9040  	header_                http.Header
  9041  }
  9042  
  9043  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  9044  // server makes a best effort to cancel the operation, but success is not
  9045  // guaranteed. If the server doesn't support this method, it returns
  9046  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  9047  // other methods to check whether the cancellation succeeded or whether the
  9048  // operation completed despite cancellation. On successful cancellation, the
  9049  // operation is not deleted; instead, it becomes an operation with an
  9050  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  9051  // `Code.CANCELLED`.
  9052  //
  9053  // - name: The name of the operation resource to be cancelled.
  9054  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  9055  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9056  	c.name = name
  9057  	c.canceloperationrequest = canceloperationrequest
  9058  	return c
  9059  }
  9060  
  9061  // Fields allows partial responses to be retrieved. See
  9062  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9063  // details.
  9064  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  9065  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9066  	return c
  9067  }
  9068  
  9069  // Context sets the context to be used in this call's Do method.
  9070  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  9071  	c.ctx_ = ctx
  9072  	return c
  9073  }
  9074  
  9075  // Header returns a http.Header that can be modified by the caller to add
  9076  // headers to the request.
  9077  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  9078  	if c.header_ == nil {
  9079  		c.header_ = make(http.Header)
  9080  	}
  9081  	return c.header_
  9082  }
  9083  
  9084  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  9085  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9086  	var body io.Reader = nil
  9087  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  9088  	if err != nil {
  9089  		return nil, err
  9090  	}
  9091  	c.urlParams_.Set("alt", alt)
  9092  	c.urlParams_.Set("prettyPrint", "false")
  9093  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:cancel")
  9094  	urls += "?" + c.urlParams_.Encode()
  9095  	req, err := http.NewRequest("POST", urls, body)
  9096  	if err != nil {
  9097  		return nil, err
  9098  	}
  9099  	req.Header = reqHeaders
  9100  	googleapi.Expand(req.URL, map[string]string{
  9101  		"name": c.name,
  9102  	})
  9103  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9104  }
  9105  
  9106  // Do executes the "networkservices.projects.locations.operations.cancel" call.
  9107  // Any non-2xx status code is an error. Response headers are in either
  9108  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  9109  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9110  // whether the returned error was because http.StatusNotModified was returned.
  9111  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9112  	gensupport.SetOptions(c.urlParams_, opts...)
  9113  	res, err := c.doRequest("json")
  9114  	if res != nil && res.StatusCode == http.StatusNotModified {
  9115  		if res.Body != nil {
  9116  			res.Body.Close()
  9117  		}
  9118  		return nil, gensupport.WrapError(&googleapi.Error{
  9119  			Code:   res.StatusCode,
  9120  			Header: res.Header,
  9121  		})
  9122  	}
  9123  	if err != nil {
  9124  		return nil, err
  9125  	}
  9126  	defer googleapi.CloseBody(res)
  9127  	if err := googleapi.CheckResponse(res); err != nil {
  9128  		return nil, gensupport.WrapError(err)
  9129  	}
  9130  	ret := &Empty{
  9131  		ServerResponse: googleapi.ServerResponse{
  9132  			Header:         res.Header,
  9133  			HTTPStatusCode: res.StatusCode,
  9134  		},
  9135  	}
  9136  	target := &ret
  9137  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9138  		return nil, err
  9139  	}
  9140  	return ret, nil
  9141  }
  9142  
  9143  type ProjectsLocationsOperationsDeleteCall struct {
  9144  	s          *Service
  9145  	name       string
  9146  	urlParams_ gensupport.URLParams
  9147  	ctx_       context.Context
  9148  	header_    http.Header
  9149  }
  9150  
  9151  // Delete: Deletes a long-running operation. This method indicates that the
  9152  // client is no longer interested in the operation result. It does not cancel
  9153  // the operation. If the server doesn't support this method, it returns
  9154  // `google.rpc.Code.UNIMPLEMENTED`.
  9155  //
  9156  // - name: The name of the operation resource to be deleted.
  9157  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  9158  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9159  	c.name = name
  9160  	return c
  9161  }
  9162  
  9163  // Fields allows partial responses to be retrieved. See
  9164  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9165  // details.
  9166  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  9167  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9168  	return c
  9169  }
  9170  
  9171  // Context sets the context to be used in this call's Do method.
  9172  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  9173  	c.ctx_ = ctx
  9174  	return c
  9175  }
  9176  
  9177  // Header returns a http.Header that can be modified by the caller to add
  9178  // headers to the request.
  9179  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  9180  	if c.header_ == nil {
  9181  		c.header_ = make(http.Header)
  9182  	}
  9183  	return c.header_
  9184  }
  9185  
  9186  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9187  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9188  	var body io.Reader = nil
  9189  	c.urlParams_.Set("alt", alt)
  9190  	c.urlParams_.Set("prettyPrint", "false")
  9191  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  9192  	urls += "?" + c.urlParams_.Encode()
  9193  	req, err := http.NewRequest("DELETE", urls, body)
  9194  	if err != nil {
  9195  		return nil, err
  9196  	}
  9197  	req.Header = reqHeaders
  9198  	googleapi.Expand(req.URL, map[string]string{
  9199  		"name": c.name,
  9200  	})
  9201  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9202  }
  9203  
  9204  // Do executes the "networkservices.projects.locations.operations.delete" call.
  9205  // Any non-2xx status code is an error. Response headers are in either
  9206  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  9207  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9208  // whether the returned error was because http.StatusNotModified was returned.
  9209  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  9210  	gensupport.SetOptions(c.urlParams_, opts...)
  9211  	res, err := c.doRequest("json")
  9212  	if res != nil && res.StatusCode == http.StatusNotModified {
  9213  		if res.Body != nil {
  9214  			res.Body.Close()
  9215  		}
  9216  		return nil, gensupport.WrapError(&googleapi.Error{
  9217  			Code:   res.StatusCode,
  9218  			Header: res.Header,
  9219  		})
  9220  	}
  9221  	if err != nil {
  9222  		return nil, err
  9223  	}
  9224  	defer googleapi.CloseBody(res)
  9225  	if err := googleapi.CheckResponse(res); err != nil {
  9226  		return nil, gensupport.WrapError(err)
  9227  	}
  9228  	ret := &Empty{
  9229  		ServerResponse: googleapi.ServerResponse{
  9230  			Header:         res.Header,
  9231  			HTTPStatusCode: res.StatusCode,
  9232  		},
  9233  	}
  9234  	target := &ret
  9235  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9236  		return nil, err
  9237  	}
  9238  	return ret, nil
  9239  }
  9240  
  9241  type ProjectsLocationsOperationsGetCall struct {
  9242  	s            *Service
  9243  	name         string
  9244  	urlParams_   gensupport.URLParams
  9245  	ifNoneMatch_ string
  9246  	ctx_         context.Context
  9247  	header_      http.Header
  9248  }
  9249  
  9250  // Get: Gets the latest state of a long-running operation. Clients can use this
  9251  // method to poll the operation result at intervals as recommended by the API
  9252  // service.
  9253  //
  9254  // - name: The name of the operation resource.
  9255  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  9256  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9257  	c.name = name
  9258  	return c
  9259  }
  9260  
  9261  // Fields allows partial responses to be retrieved. See
  9262  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9263  // details.
  9264  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  9265  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9266  	return c
  9267  }
  9268  
  9269  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9270  // object's ETag matches the given value. This is useful for getting updates
  9271  // only after the object has changed since the last request.
  9272  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  9273  	c.ifNoneMatch_ = entityTag
  9274  	return c
  9275  }
  9276  
  9277  // Context sets the context to be used in this call's Do method.
  9278  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  9279  	c.ctx_ = ctx
  9280  	return c
  9281  }
  9282  
  9283  // Header returns a http.Header that can be modified by the caller to add
  9284  // headers to the request.
  9285  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  9286  	if c.header_ == nil {
  9287  		c.header_ = make(http.Header)
  9288  	}
  9289  	return c.header_
  9290  }
  9291  
  9292  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  9293  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9294  	if c.ifNoneMatch_ != "" {
  9295  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9296  	}
  9297  	var body io.Reader = nil
  9298  	c.urlParams_.Set("alt", alt)
  9299  	c.urlParams_.Set("prettyPrint", "false")
  9300  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  9301  	urls += "?" + c.urlParams_.Encode()
  9302  	req, err := http.NewRequest("GET", urls, body)
  9303  	if err != nil {
  9304  		return nil, err
  9305  	}
  9306  	req.Header = reqHeaders
  9307  	googleapi.Expand(req.URL, map[string]string{
  9308  		"name": c.name,
  9309  	})
  9310  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9311  }
  9312  
  9313  // Do executes the "networkservices.projects.locations.operations.get" call.
  9314  // Any non-2xx status code is an error. Response headers are in either
  9315  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9316  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9317  // whether the returned error was because http.StatusNotModified was returned.
  9318  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9319  	gensupport.SetOptions(c.urlParams_, opts...)
  9320  	res, err := c.doRequest("json")
  9321  	if res != nil && res.StatusCode == http.StatusNotModified {
  9322  		if res.Body != nil {
  9323  			res.Body.Close()
  9324  		}
  9325  		return nil, gensupport.WrapError(&googleapi.Error{
  9326  			Code:   res.StatusCode,
  9327  			Header: res.Header,
  9328  		})
  9329  	}
  9330  	if err != nil {
  9331  		return nil, err
  9332  	}
  9333  	defer googleapi.CloseBody(res)
  9334  	if err := googleapi.CheckResponse(res); err != nil {
  9335  		return nil, gensupport.WrapError(err)
  9336  	}
  9337  	ret := &Operation{
  9338  		ServerResponse: googleapi.ServerResponse{
  9339  			Header:         res.Header,
  9340  			HTTPStatusCode: res.StatusCode,
  9341  		},
  9342  	}
  9343  	target := &ret
  9344  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9345  		return nil, err
  9346  	}
  9347  	return ret, nil
  9348  }
  9349  
  9350  type ProjectsLocationsOperationsListCall struct {
  9351  	s            *Service
  9352  	name         string
  9353  	urlParams_   gensupport.URLParams
  9354  	ifNoneMatch_ string
  9355  	ctx_         context.Context
  9356  	header_      http.Header
  9357  }
  9358  
  9359  // List: Lists operations that match the specified filter in the request. If
  9360  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  9361  //
  9362  // - name: The name of the operation's parent resource.
  9363  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  9364  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9365  	c.name = name
  9366  	return c
  9367  }
  9368  
  9369  // Filter sets the optional parameter "filter": The standard list filter.
  9370  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  9371  	c.urlParams_.Set("filter", filter)
  9372  	return c
  9373  }
  9374  
  9375  // PageSize sets the optional parameter "pageSize": The standard list page
  9376  // size.
  9377  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  9378  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9379  	return c
  9380  }
  9381  
  9382  // PageToken sets the optional parameter "pageToken": The standard list page
  9383  // token.
  9384  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  9385  	c.urlParams_.Set("pageToken", pageToken)
  9386  	return c
  9387  }
  9388  
  9389  // Fields allows partial responses to be retrieved. See
  9390  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9391  // details.
  9392  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  9393  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9394  	return c
  9395  }
  9396  
  9397  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9398  // object's ETag matches the given value. This is useful for getting updates
  9399  // only after the object has changed since the last request.
  9400  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  9401  	c.ifNoneMatch_ = entityTag
  9402  	return c
  9403  }
  9404  
  9405  // Context sets the context to be used in this call's Do method.
  9406  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  9407  	c.ctx_ = ctx
  9408  	return c
  9409  }
  9410  
  9411  // Header returns a http.Header that can be modified by the caller to add
  9412  // headers to the request.
  9413  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  9414  	if c.header_ == nil {
  9415  		c.header_ = make(http.Header)
  9416  	}
  9417  	return c.header_
  9418  }
  9419  
  9420  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  9421  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9422  	if c.ifNoneMatch_ != "" {
  9423  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9424  	}
  9425  	var body io.Reader = nil
  9426  	c.urlParams_.Set("alt", alt)
  9427  	c.urlParams_.Set("prettyPrint", "false")
  9428  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}/operations")
  9429  	urls += "?" + c.urlParams_.Encode()
  9430  	req, err := http.NewRequest("GET", urls, body)
  9431  	if err != nil {
  9432  		return nil, err
  9433  	}
  9434  	req.Header = reqHeaders
  9435  	googleapi.Expand(req.URL, map[string]string{
  9436  		"name": c.name,
  9437  	})
  9438  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9439  }
  9440  
  9441  // Do executes the "networkservices.projects.locations.operations.list" call.
  9442  // Any non-2xx status code is an error. Response headers are in either
  9443  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
  9444  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9445  // check whether the returned error was because http.StatusNotModified was
  9446  // returned.
  9447  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  9448  	gensupport.SetOptions(c.urlParams_, opts...)
  9449  	res, err := c.doRequest("json")
  9450  	if res != nil && res.StatusCode == http.StatusNotModified {
  9451  		if res.Body != nil {
  9452  			res.Body.Close()
  9453  		}
  9454  		return nil, gensupport.WrapError(&googleapi.Error{
  9455  			Code:   res.StatusCode,
  9456  			Header: res.Header,
  9457  		})
  9458  	}
  9459  	if err != nil {
  9460  		return nil, err
  9461  	}
  9462  	defer googleapi.CloseBody(res)
  9463  	if err := googleapi.CheckResponse(res); err != nil {
  9464  		return nil, gensupport.WrapError(err)
  9465  	}
  9466  	ret := &ListOperationsResponse{
  9467  		ServerResponse: googleapi.ServerResponse{
  9468  			Header:         res.Header,
  9469  			HTTPStatusCode: res.StatusCode,
  9470  		},
  9471  	}
  9472  	target := &ret
  9473  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9474  		return nil, err
  9475  	}
  9476  	return ret, nil
  9477  }
  9478  
  9479  // Pages invokes f for each page of results.
  9480  // A non-nil error returned from f will halt the iteration.
  9481  // The provided context supersedes any context provided to the Context method.
  9482  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  9483  	c.ctx_ = ctx
  9484  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9485  	for {
  9486  		x, err := c.Do()
  9487  		if err != nil {
  9488  			return err
  9489  		}
  9490  		if err := f(x); err != nil {
  9491  			return err
  9492  		}
  9493  		if x.NextPageToken == "" {
  9494  			return nil
  9495  		}
  9496  		c.PageToken(x.NextPageToken)
  9497  	}
  9498  }
  9499  
  9500  type ProjectsLocationsServiceBindingsCreateCall struct {
  9501  	s              *Service
  9502  	parent         string
  9503  	servicebinding *ServiceBinding
  9504  	urlParams_     gensupport.URLParams
  9505  	ctx_           context.Context
  9506  	header_        http.Header
  9507  }
  9508  
  9509  // Create: Creates a new ServiceBinding in a given project and location.
  9510  //
  9511  //   - parent: The parent resource of the ServiceBinding. Must be in the format
  9512  //     `projects/*/locations/global`.
  9513  func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall {
  9514  	c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9515  	c.parent = parent
  9516  	c.servicebinding = servicebinding
  9517  	return c
  9518  }
  9519  
  9520  // ServiceBindingId sets the optional parameter "serviceBindingId": Required.
  9521  // Short name of the ServiceBinding resource to be created.
  9522  func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall {
  9523  	c.urlParams_.Set("serviceBindingId", serviceBindingId)
  9524  	return c
  9525  }
  9526  
  9527  // Fields allows partial responses to be retrieved. See
  9528  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9529  // details.
  9530  func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall {
  9531  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9532  	return c
  9533  }
  9534  
  9535  // Context sets the context to be used in this call's Do method.
  9536  func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall {
  9537  	c.ctx_ = ctx
  9538  	return c
  9539  }
  9540  
  9541  // Header returns a http.Header that can be modified by the caller to add
  9542  // headers to the request.
  9543  func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header {
  9544  	if c.header_ == nil {
  9545  		c.header_ = make(http.Header)
  9546  	}
  9547  	return c.header_
  9548  }
  9549  
  9550  func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
  9551  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9552  	var body io.Reader = nil
  9553  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicebinding)
  9554  	if err != nil {
  9555  		return nil, err
  9556  	}
  9557  	c.urlParams_.Set("alt", alt)
  9558  	c.urlParams_.Set("prettyPrint", "false")
  9559  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings")
  9560  	urls += "?" + c.urlParams_.Encode()
  9561  	req, err := http.NewRequest("POST", urls, body)
  9562  	if err != nil {
  9563  		return nil, err
  9564  	}
  9565  	req.Header = reqHeaders
  9566  	googleapi.Expand(req.URL, map[string]string{
  9567  		"parent": c.parent,
  9568  	})
  9569  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9570  }
  9571  
  9572  // Do executes the "networkservices.projects.locations.serviceBindings.create" call.
  9573  // Any non-2xx status code is an error. Response headers are in either
  9574  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9575  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9576  // whether the returned error was because http.StatusNotModified was returned.
  9577  func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9578  	gensupport.SetOptions(c.urlParams_, opts...)
  9579  	res, err := c.doRequest("json")
  9580  	if res != nil && res.StatusCode == http.StatusNotModified {
  9581  		if res.Body != nil {
  9582  			res.Body.Close()
  9583  		}
  9584  		return nil, gensupport.WrapError(&googleapi.Error{
  9585  			Code:   res.StatusCode,
  9586  			Header: res.Header,
  9587  		})
  9588  	}
  9589  	if err != nil {
  9590  		return nil, err
  9591  	}
  9592  	defer googleapi.CloseBody(res)
  9593  	if err := googleapi.CheckResponse(res); err != nil {
  9594  		return nil, gensupport.WrapError(err)
  9595  	}
  9596  	ret := &Operation{
  9597  		ServerResponse: googleapi.ServerResponse{
  9598  			Header:         res.Header,
  9599  			HTTPStatusCode: res.StatusCode,
  9600  		},
  9601  	}
  9602  	target := &ret
  9603  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9604  		return nil, err
  9605  	}
  9606  	return ret, nil
  9607  }
  9608  
  9609  type ProjectsLocationsServiceBindingsDeleteCall struct {
  9610  	s          *Service
  9611  	name       string
  9612  	urlParams_ gensupport.URLParams
  9613  	ctx_       context.Context
  9614  	header_    http.Header
  9615  }
  9616  
  9617  // Delete: Deletes a single ServiceBinding.
  9618  //
  9619  //   - name: A name of the ServiceBinding to delete. Must be in the format
  9620  //     `projects/*/locations/global/serviceBindings/*`.
  9621  func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall {
  9622  	c := &ProjectsLocationsServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9623  	c.name = name
  9624  	return c
  9625  }
  9626  
  9627  // Fields allows partial responses to be retrieved. See
  9628  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9629  // details.
  9630  func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall {
  9631  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9632  	return c
  9633  }
  9634  
  9635  // Context sets the context to be used in this call's Do method.
  9636  func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall {
  9637  	c.ctx_ = ctx
  9638  	return c
  9639  }
  9640  
  9641  // Header returns a http.Header that can be modified by the caller to add
  9642  // headers to the request.
  9643  func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header {
  9644  	if c.header_ == nil {
  9645  		c.header_ = make(http.Header)
  9646  	}
  9647  	return c.header_
  9648  }
  9649  
  9650  func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9651  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9652  	var body io.Reader = nil
  9653  	c.urlParams_.Set("alt", alt)
  9654  	c.urlParams_.Set("prettyPrint", "false")
  9655  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  9656  	urls += "?" + c.urlParams_.Encode()
  9657  	req, err := http.NewRequest("DELETE", urls, body)
  9658  	if err != nil {
  9659  		return nil, err
  9660  	}
  9661  	req.Header = reqHeaders
  9662  	googleapi.Expand(req.URL, map[string]string{
  9663  		"name": c.name,
  9664  	})
  9665  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9666  }
  9667  
  9668  // Do executes the "networkservices.projects.locations.serviceBindings.delete" call.
  9669  // Any non-2xx status code is an error. Response headers are in either
  9670  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9671  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9672  // whether the returned error was because http.StatusNotModified was returned.
  9673  func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9674  	gensupport.SetOptions(c.urlParams_, opts...)
  9675  	res, err := c.doRequest("json")
  9676  	if res != nil && res.StatusCode == http.StatusNotModified {
  9677  		if res.Body != nil {
  9678  			res.Body.Close()
  9679  		}
  9680  		return nil, gensupport.WrapError(&googleapi.Error{
  9681  			Code:   res.StatusCode,
  9682  			Header: res.Header,
  9683  		})
  9684  	}
  9685  	if err != nil {
  9686  		return nil, err
  9687  	}
  9688  	defer googleapi.CloseBody(res)
  9689  	if err := googleapi.CheckResponse(res); err != nil {
  9690  		return nil, gensupport.WrapError(err)
  9691  	}
  9692  	ret := &Operation{
  9693  		ServerResponse: googleapi.ServerResponse{
  9694  			Header:         res.Header,
  9695  			HTTPStatusCode: res.StatusCode,
  9696  		},
  9697  	}
  9698  	target := &ret
  9699  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9700  		return nil, err
  9701  	}
  9702  	return ret, nil
  9703  }
  9704  
  9705  type ProjectsLocationsServiceBindingsGetCall struct {
  9706  	s            *Service
  9707  	name         string
  9708  	urlParams_   gensupport.URLParams
  9709  	ifNoneMatch_ string
  9710  	ctx_         context.Context
  9711  	header_      http.Header
  9712  }
  9713  
  9714  // Get: Gets details of a single ServiceBinding.
  9715  //
  9716  //   - name: A name of the ServiceBinding to get. Must be in the format
  9717  //     `projects/*/locations/global/serviceBindings/*`.
  9718  func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall {
  9719  	c := &ProjectsLocationsServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9720  	c.name = name
  9721  	return c
  9722  }
  9723  
  9724  // Fields allows partial responses to be retrieved. See
  9725  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9726  // details.
  9727  func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall {
  9728  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9729  	return c
  9730  }
  9731  
  9732  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9733  // object's ETag matches the given value. This is useful for getting updates
  9734  // only after the object has changed since the last request.
  9735  func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall {
  9736  	c.ifNoneMatch_ = entityTag
  9737  	return c
  9738  }
  9739  
  9740  // Context sets the context to be used in this call's Do method.
  9741  func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall {
  9742  	c.ctx_ = ctx
  9743  	return c
  9744  }
  9745  
  9746  // Header returns a http.Header that can be modified by the caller to add
  9747  // headers to the request.
  9748  func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header {
  9749  	if c.header_ == nil {
  9750  		c.header_ = make(http.Header)
  9751  	}
  9752  	return c.header_
  9753  }
  9754  
  9755  func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) {
  9756  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9757  	if c.ifNoneMatch_ != "" {
  9758  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9759  	}
  9760  	var body io.Reader = nil
  9761  	c.urlParams_.Set("alt", alt)
  9762  	c.urlParams_.Set("prettyPrint", "false")
  9763  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
  9764  	urls += "?" + c.urlParams_.Encode()
  9765  	req, err := http.NewRequest("GET", urls, body)
  9766  	if err != nil {
  9767  		return nil, err
  9768  	}
  9769  	req.Header = reqHeaders
  9770  	googleapi.Expand(req.URL, map[string]string{
  9771  		"name": c.name,
  9772  	})
  9773  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9774  }
  9775  
  9776  // Do executes the "networkservices.projects.locations.serviceBindings.get" call.
  9777  // Any non-2xx status code is an error. Response headers are in either
  9778  // *ServiceBinding.ServerResponse.Header or (if a response was returned at all)
  9779  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9780  // whether the returned error was because http.StatusNotModified was returned.
  9781  func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, error) {
  9782  	gensupport.SetOptions(c.urlParams_, opts...)
  9783  	res, err := c.doRequest("json")
  9784  	if res != nil && res.StatusCode == http.StatusNotModified {
  9785  		if res.Body != nil {
  9786  			res.Body.Close()
  9787  		}
  9788  		return nil, gensupport.WrapError(&googleapi.Error{
  9789  			Code:   res.StatusCode,
  9790  			Header: res.Header,
  9791  		})
  9792  	}
  9793  	if err != nil {
  9794  		return nil, err
  9795  	}
  9796  	defer googleapi.CloseBody(res)
  9797  	if err := googleapi.CheckResponse(res); err != nil {
  9798  		return nil, gensupport.WrapError(err)
  9799  	}
  9800  	ret := &ServiceBinding{
  9801  		ServerResponse: googleapi.ServerResponse{
  9802  			Header:         res.Header,
  9803  			HTTPStatusCode: res.StatusCode,
  9804  		},
  9805  	}
  9806  	target := &ret
  9807  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9808  		return nil, err
  9809  	}
  9810  	return ret, nil
  9811  }
  9812  
  9813  type ProjectsLocationsServiceBindingsGetIamPolicyCall struct {
  9814  	s            *Service
  9815  	resource     string
  9816  	urlParams_   gensupport.URLParams
  9817  	ifNoneMatch_ string
  9818  	ctx_         context.Context
  9819  	header_      http.Header
  9820  }
  9821  
  9822  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  9823  // empty policy if the resource exists and does not have a policy set.
  9824  //
  9825  //   - resource: REQUIRED: The resource for which the policy is being requested.
  9826  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  9827  //     for the appropriate value for this field.
  9828  func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
  9829  	c := &ProjectsLocationsServiceBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9830  	c.resource = resource
  9831  	return c
  9832  }
  9833  
  9834  // OptionsRequestedPolicyVersion sets the optional parameter
  9835  // "options.requestedPolicyVersion": The maximum policy version that will be
  9836  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  9837  // an invalid value will be rejected. Requests for policies with any
  9838  // conditional role bindings must specify version 3. Policies with no
  9839  // conditional role bindings may specify any valid value or leave the field
  9840  // unset. The policy in the response might use the policy version that you
  9841  // specified, or it might use a lower policy version. For example, if you
  9842  // specify version 3, but the policy has no conditional role bindings, the
  9843  // response uses version 1. To learn which resources support conditions in
  9844  // their IAM policies, see the IAM documentation
  9845  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  9846  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
  9847  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  9848  	return c
  9849  }
  9850  
  9851  // Fields allows partial responses to be retrieved. See
  9852  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9853  // details.
  9854  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
  9855  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9856  	return c
  9857  }
  9858  
  9859  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9860  // object's ETag matches the given value. This is useful for getting updates
  9861  // only after the object has changed since the last request.
  9862  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
  9863  	c.ifNoneMatch_ = entityTag
  9864  	return c
  9865  }
  9866  
  9867  // Context sets the context to be used in this call's Do method.
  9868  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
  9869  	c.ctx_ = ctx
  9870  	return c
  9871  }
  9872  
  9873  // Header returns a http.Header that can be modified by the caller to add
  9874  // headers to the request.
  9875  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header {
  9876  	if c.header_ == nil {
  9877  		c.header_ = make(http.Header)
  9878  	}
  9879  	return c.header_
  9880  }
  9881  
  9882  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9883  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9884  	if c.ifNoneMatch_ != "" {
  9885  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9886  	}
  9887  	var body io.Reader = nil
  9888  	c.urlParams_.Set("alt", alt)
  9889  	c.urlParams_.Set("prettyPrint", "false")
  9890  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
  9891  	urls += "?" + c.urlParams_.Encode()
  9892  	req, err := http.NewRequest("GET", urls, body)
  9893  	if err != nil {
  9894  		return nil, err
  9895  	}
  9896  	req.Header = reqHeaders
  9897  	googleapi.Expand(req.URL, map[string]string{
  9898  		"resource": c.resource,
  9899  	})
  9900  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9901  }
  9902  
  9903  // Do executes the "networkservices.projects.locations.serviceBindings.getIamPolicy" call.
  9904  // Any non-2xx status code is an error. Response headers are in either
  9905  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9906  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9907  // whether the returned error was because http.StatusNotModified was returned.
  9908  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9909  	gensupport.SetOptions(c.urlParams_, opts...)
  9910  	res, err := c.doRequest("json")
  9911  	if res != nil && res.StatusCode == http.StatusNotModified {
  9912  		if res.Body != nil {
  9913  			res.Body.Close()
  9914  		}
  9915  		return nil, gensupport.WrapError(&googleapi.Error{
  9916  			Code:   res.StatusCode,
  9917  			Header: res.Header,
  9918  		})
  9919  	}
  9920  	if err != nil {
  9921  		return nil, err
  9922  	}
  9923  	defer googleapi.CloseBody(res)
  9924  	if err := googleapi.CheckResponse(res); err != nil {
  9925  		return nil, gensupport.WrapError(err)
  9926  	}
  9927  	ret := &Policy{
  9928  		ServerResponse: googleapi.ServerResponse{
  9929  			Header:         res.Header,
  9930  			HTTPStatusCode: res.StatusCode,
  9931  		},
  9932  	}
  9933  	target := &ret
  9934  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9935  		return nil, err
  9936  	}
  9937  	return ret, nil
  9938  }
  9939  
  9940  type ProjectsLocationsServiceBindingsListCall struct {
  9941  	s            *Service
  9942  	parent       string
  9943  	urlParams_   gensupport.URLParams
  9944  	ifNoneMatch_ string
  9945  	ctx_         context.Context
  9946  	header_      http.Header
  9947  }
  9948  
  9949  // List: Lists ServiceBinding in a given project and location.
  9950  //
  9951  //   - parent: The project and location from which the ServiceBindings should be
  9952  //     listed, specified in the format `projects/*/locations/global`.
  9953  func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall {
  9954  	c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9955  	c.parent = parent
  9956  	return c
  9957  }
  9958  
  9959  // PageSize sets the optional parameter "pageSize": Maximum number of
  9960  // ServiceBindings to return per call.
  9961  func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall {
  9962  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9963  	return c
  9964  }
  9965  
  9966  // PageToken sets the optional parameter "pageToken": The value returned by the
  9967  // last `ListServiceBindingsResponse` Indicates that this is a continuation of
  9968  // a prior `ListRouters` call, and that the system should return the next page
  9969  // of data.
  9970  func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall {
  9971  	c.urlParams_.Set("pageToken", pageToken)
  9972  	return c
  9973  }
  9974  
  9975  // Fields allows partial responses to be retrieved. See
  9976  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9977  // details.
  9978  func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall {
  9979  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9980  	return c
  9981  }
  9982  
  9983  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9984  // object's ETag matches the given value. This is useful for getting updates
  9985  // only after the object has changed since the last request.
  9986  func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall {
  9987  	c.ifNoneMatch_ = entityTag
  9988  	return c
  9989  }
  9990  
  9991  // Context sets the context to be used in this call's Do method.
  9992  func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall {
  9993  	c.ctx_ = ctx
  9994  	return c
  9995  }
  9996  
  9997  // Header returns a http.Header that can be modified by the caller to add
  9998  // headers to the request.
  9999  func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header {
 10000  	if c.header_ == nil {
 10001  		c.header_ = make(http.Header)
 10002  	}
 10003  	return c.header_
 10004  }
 10005  
 10006  func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) {
 10007  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10008  	if c.ifNoneMatch_ != "" {
 10009  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10010  	}
 10011  	var body io.Reader = nil
 10012  	c.urlParams_.Set("alt", alt)
 10013  	c.urlParams_.Set("prettyPrint", "false")
 10014  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceBindings")
 10015  	urls += "?" + c.urlParams_.Encode()
 10016  	req, err := http.NewRequest("GET", urls, body)
 10017  	if err != nil {
 10018  		return nil, err
 10019  	}
 10020  	req.Header = reqHeaders
 10021  	googleapi.Expand(req.URL, map[string]string{
 10022  		"parent": c.parent,
 10023  	})
 10024  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10025  }
 10026  
 10027  // Do executes the "networkservices.projects.locations.serviceBindings.list" call.
 10028  // Any non-2xx status code is an error. Response headers are in either
 10029  // *ListServiceBindingsResponse.ServerResponse.Header or (if a response was
 10030  // returned at all) in error.(*googleapi.Error).Header. Use
 10031  // googleapi.IsNotModified to check whether the returned error was because
 10032  // http.StatusNotModified was returned.
 10033  func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, error) {
 10034  	gensupport.SetOptions(c.urlParams_, opts...)
 10035  	res, err := c.doRequest("json")
 10036  	if res != nil && res.StatusCode == http.StatusNotModified {
 10037  		if res.Body != nil {
 10038  			res.Body.Close()
 10039  		}
 10040  		return nil, gensupport.WrapError(&googleapi.Error{
 10041  			Code:   res.StatusCode,
 10042  			Header: res.Header,
 10043  		})
 10044  	}
 10045  	if err != nil {
 10046  		return nil, err
 10047  	}
 10048  	defer googleapi.CloseBody(res)
 10049  	if err := googleapi.CheckResponse(res); err != nil {
 10050  		return nil, gensupport.WrapError(err)
 10051  	}
 10052  	ret := &ListServiceBindingsResponse{
 10053  		ServerResponse: googleapi.ServerResponse{
 10054  			Header:         res.Header,
 10055  			HTTPStatusCode: res.StatusCode,
 10056  		},
 10057  	}
 10058  	target := &ret
 10059  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10060  		return nil, err
 10061  	}
 10062  	return ret, nil
 10063  }
 10064  
 10065  // Pages invokes f for each page of results.
 10066  // A non-nil error returned from f will halt the iteration.
 10067  // The provided context supersedes any context provided to the Context method.
 10068  func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error {
 10069  	c.ctx_ = ctx
 10070  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10071  	for {
 10072  		x, err := c.Do()
 10073  		if err != nil {
 10074  			return err
 10075  		}
 10076  		if err := f(x); err != nil {
 10077  			return err
 10078  		}
 10079  		if x.NextPageToken == "" {
 10080  			return nil
 10081  		}
 10082  		c.PageToken(x.NextPageToken)
 10083  	}
 10084  }
 10085  
 10086  type ProjectsLocationsServiceBindingsSetIamPolicyCall struct {
 10087  	s                   *Service
 10088  	resource            string
 10089  	setiampolicyrequest *SetIamPolicyRequest
 10090  	urlParams_          gensupport.URLParams
 10091  	ctx_                context.Context
 10092  	header_             http.Header
 10093  }
 10094  
 10095  // SetIamPolicy: Sets the access control policy on the specified resource.
 10096  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 10097  // and `PERMISSION_DENIED` errors.
 10098  //
 10099  //   - resource: REQUIRED: The resource for which the policy is being specified.
 10100  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 10101  //     for the appropriate value for this field.
 10102  func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
 10103  	c := &ProjectsLocationsServiceBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10104  	c.resource = resource
 10105  	c.setiampolicyrequest = setiampolicyrequest
 10106  	return c
 10107  }
 10108  
 10109  // Fields allows partial responses to be retrieved. See
 10110  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10111  // details.
 10112  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
 10113  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10114  	return c
 10115  }
 10116  
 10117  // Context sets the context to be used in this call's Do method.
 10118  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
 10119  	c.ctx_ = ctx
 10120  	return c
 10121  }
 10122  
 10123  // Header returns a http.Header that can be modified by the caller to add
 10124  // headers to the request.
 10125  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Header() http.Header {
 10126  	if c.header_ == nil {
 10127  		c.header_ = make(http.Header)
 10128  	}
 10129  	return c.header_
 10130  }
 10131  
 10132  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 10133  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10134  	var body io.Reader = nil
 10135  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 10136  	if err != nil {
 10137  		return nil, err
 10138  	}
 10139  	c.urlParams_.Set("alt", alt)
 10140  	c.urlParams_.Set("prettyPrint", "false")
 10141  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
 10142  	urls += "?" + c.urlParams_.Encode()
 10143  	req, err := http.NewRequest("POST", urls, body)
 10144  	if err != nil {
 10145  		return nil, err
 10146  	}
 10147  	req.Header = reqHeaders
 10148  	googleapi.Expand(req.URL, map[string]string{
 10149  		"resource": c.resource,
 10150  	})
 10151  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10152  }
 10153  
 10154  // Do executes the "networkservices.projects.locations.serviceBindings.setIamPolicy" call.
 10155  // Any non-2xx status code is an error. Response headers are in either
 10156  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 10157  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10158  // whether the returned error was because http.StatusNotModified was returned.
 10159  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 10160  	gensupport.SetOptions(c.urlParams_, opts...)
 10161  	res, err := c.doRequest("json")
 10162  	if res != nil && res.StatusCode == http.StatusNotModified {
 10163  		if res.Body != nil {
 10164  			res.Body.Close()
 10165  		}
 10166  		return nil, gensupport.WrapError(&googleapi.Error{
 10167  			Code:   res.StatusCode,
 10168  			Header: res.Header,
 10169  		})
 10170  	}
 10171  	if err != nil {
 10172  		return nil, err
 10173  	}
 10174  	defer googleapi.CloseBody(res)
 10175  	if err := googleapi.CheckResponse(res); err != nil {
 10176  		return nil, gensupport.WrapError(err)
 10177  	}
 10178  	ret := &Policy{
 10179  		ServerResponse: googleapi.ServerResponse{
 10180  			Header:         res.Header,
 10181  			HTTPStatusCode: res.StatusCode,
 10182  		},
 10183  	}
 10184  	target := &ret
 10185  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10186  		return nil, err
 10187  	}
 10188  	return ret, nil
 10189  }
 10190  
 10191  type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct {
 10192  	s                         *Service
 10193  	resource                  string
 10194  	testiampermissionsrequest *TestIamPermissionsRequest
 10195  	urlParams_                gensupport.URLParams
 10196  	ctx_                      context.Context
 10197  	header_                   http.Header
 10198  }
 10199  
 10200  // TestIamPermissions: Returns permissions that a caller has on the specified
 10201  // resource. If the resource does not exist, this will return an empty set of
 10202  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 10203  // used for building permission-aware UIs and command-line tools, not for
 10204  // authorization checking. This operation may "fail open" without warning.
 10205  //
 10206  //   - resource: REQUIRED: The resource for which the policy detail is being
 10207  //     requested. See Resource names
 10208  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 10209  //     value for this field.
 10210  func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
 10211  	c := &ProjectsLocationsServiceBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10212  	c.resource = resource
 10213  	c.testiampermissionsrequest = testiampermissionsrequest
 10214  	return c
 10215  }
 10216  
 10217  // Fields allows partial responses to be retrieved. See
 10218  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10219  // details.
 10220  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
 10221  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10222  	return c
 10223  }
 10224  
 10225  // Context sets the context to be used in this call's Do method.
 10226  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
 10227  	c.ctx_ = ctx
 10228  	return c
 10229  }
 10230  
 10231  // Header returns a http.Header that can be modified by the caller to add
 10232  // headers to the request.
 10233  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Header() http.Header {
 10234  	if c.header_ == nil {
 10235  		c.header_ = make(http.Header)
 10236  	}
 10237  	return c.header_
 10238  }
 10239  
 10240  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 10241  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10242  	var body io.Reader = nil
 10243  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 10244  	if err != nil {
 10245  		return nil, err
 10246  	}
 10247  	c.urlParams_.Set("alt", alt)
 10248  	c.urlParams_.Set("prettyPrint", "false")
 10249  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
 10250  	urls += "?" + c.urlParams_.Encode()
 10251  	req, err := http.NewRequest("POST", urls, body)
 10252  	if err != nil {
 10253  		return nil, err
 10254  	}
 10255  	req.Header = reqHeaders
 10256  	googleapi.Expand(req.URL, map[string]string{
 10257  		"resource": c.resource,
 10258  	})
 10259  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10260  }
 10261  
 10262  // Do executes the "networkservices.projects.locations.serviceBindings.testIamPermissions" call.
 10263  // Any non-2xx status code is an error. Response headers are in either
 10264  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 10265  // returned at all) in error.(*googleapi.Error).Header. Use
 10266  // googleapi.IsNotModified to check whether the returned error was because
 10267  // http.StatusNotModified was returned.
 10268  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 10269  	gensupport.SetOptions(c.urlParams_, opts...)
 10270  	res, err := c.doRequest("json")
 10271  	if res != nil && res.StatusCode == http.StatusNotModified {
 10272  		if res.Body != nil {
 10273  			res.Body.Close()
 10274  		}
 10275  		return nil, gensupport.WrapError(&googleapi.Error{
 10276  			Code:   res.StatusCode,
 10277  			Header: res.Header,
 10278  		})
 10279  	}
 10280  	if err != nil {
 10281  		return nil, err
 10282  	}
 10283  	defer googleapi.CloseBody(res)
 10284  	if err := googleapi.CheckResponse(res); err != nil {
 10285  		return nil, gensupport.WrapError(err)
 10286  	}
 10287  	ret := &TestIamPermissionsResponse{
 10288  		ServerResponse: googleapi.ServerResponse{
 10289  			Header:         res.Header,
 10290  			HTTPStatusCode: res.StatusCode,
 10291  		},
 10292  	}
 10293  	target := &ret
 10294  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10295  		return nil, err
 10296  	}
 10297  	return ret, nil
 10298  }
 10299  
 10300  type ProjectsLocationsServiceLbPoliciesCreateCall struct {
 10301  	s               *Service
 10302  	parent          string
 10303  	servicelbpolicy *ServiceLbPolicy
 10304  	urlParams_      gensupport.URLParams
 10305  	ctx_            context.Context
 10306  	header_         http.Header
 10307  }
 10308  
 10309  // Create: Creates a new ServiceLbPolicy in a given project and location.
 10310  //
 10311  //   - parent: The parent resource of the ServiceLbPolicy. Must be in the format
 10312  //     `projects/{project}/locations/{location}`.
 10313  func (r *ProjectsLocationsServiceLbPoliciesService) Create(parent string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesCreateCall {
 10314  	c := &ProjectsLocationsServiceLbPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10315  	c.parent = parent
 10316  	c.servicelbpolicy = servicelbpolicy
 10317  	return c
 10318  }
 10319  
 10320  // ServiceLbPolicyId sets the optional parameter "serviceLbPolicyId": Required.
 10321  // Short name of the ServiceLbPolicy resource to be created. E.g. for resource
 10322  // name
 10323  // `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy
 10324  // _name}`. the id is value of {service_lb_policy_name}
 10325  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) ServiceLbPolicyId(serviceLbPolicyId string) *ProjectsLocationsServiceLbPoliciesCreateCall {
 10326  	c.urlParams_.Set("serviceLbPolicyId", serviceLbPolicyId)
 10327  	return c
 10328  }
 10329  
 10330  // Fields allows partial responses to be retrieved. See
 10331  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10332  // details.
 10333  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesCreateCall {
 10334  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10335  	return c
 10336  }
 10337  
 10338  // Context sets the context to be used in this call's Do method.
 10339  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesCreateCall {
 10340  	c.ctx_ = ctx
 10341  	return c
 10342  }
 10343  
 10344  // Header returns a http.Header that can be modified by the caller to add
 10345  // headers to the request.
 10346  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Header() http.Header {
 10347  	if c.header_ == nil {
 10348  		c.header_ = make(http.Header)
 10349  	}
 10350  	return c.header_
 10351  }
 10352  
 10353  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
 10354  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10355  	var body io.Reader = nil
 10356  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy)
 10357  	if err != nil {
 10358  		return nil, err
 10359  	}
 10360  	c.urlParams_.Set("alt", alt)
 10361  	c.urlParams_.Set("prettyPrint", "false")
 10362  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceLbPolicies")
 10363  	urls += "?" + c.urlParams_.Encode()
 10364  	req, err := http.NewRequest("POST", urls, body)
 10365  	if err != nil {
 10366  		return nil, err
 10367  	}
 10368  	req.Header = reqHeaders
 10369  	googleapi.Expand(req.URL, map[string]string{
 10370  		"parent": c.parent,
 10371  	})
 10372  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10373  }
 10374  
 10375  // Do executes the "networkservices.projects.locations.serviceLbPolicies.create" call.
 10376  // Any non-2xx status code is an error. Response headers are in either
 10377  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10378  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10379  // whether the returned error was because http.StatusNotModified was returned.
 10380  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10381  	gensupport.SetOptions(c.urlParams_, opts...)
 10382  	res, err := c.doRequest("json")
 10383  	if res != nil && res.StatusCode == http.StatusNotModified {
 10384  		if res.Body != nil {
 10385  			res.Body.Close()
 10386  		}
 10387  		return nil, gensupport.WrapError(&googleapi.Error{
 10388  			Code:   res.StatusCode,
 10389  			Header: res.Header,
 10390  		})
 10391  	}
 10392  	if err != nil {
 10393  		return nil, err
 10394  	}
 10395  	defer googleapi.CloseBody(res)
 10396  	if err := googleapi.CheckResponse(res); err != nil {
 10397  		return nil, gensupport.WrapError(err)
 10398  	}
 10399  	ret := &Operation{
 10400  		ServerResponse: googleapi.ServerResponse{
 10401  			Header:         res.Header,
 10402  			HTTPStatusCode: res.StatusCode,
 10403  		},
 10404  	}
 10405  	target := &ret
 10406  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10407  		return nil, err
 10408  	}
 10409  	return ret, nil
 10410  }
 10411  
 10412  type ProjectsLocationsServiceLbPoliciesDeleteCall struct {
 10413  	s          *Service
 10414  	name       string
 10415  	urlParams_ gensupport.URLParams
 10416  	ctx_       context.Context
 10417  	header_    http.Header
 10418  }
 10419  
 10420  // Delete: Deletes a single ServiceLbPolicy.
 10421  //
 10422  //   - name: A name of the ServiceLbPolicy to delete. Must be in the format
 10423  //     `projects/{project}/locations/{location}/serviceLbPolicies/*`.
 10424  func (r *ProjectsLocationsServiceLbPoliciesService) Delete(name string) *ProjectsLocationsServiceLbPoliciesDeleteCall {
 10425  	c := &ProjectsLocationsServiceLbPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10426  	c.name = name
 10427  	return c
 10428  }
 10429  
 10430  // Fields allows partial responses to be retrieved. See
 10431  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10432  // details.
 10433  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesDeleteCall {
 10434  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10435  	return c
 10436  }
 10437  
 10438  // Context sets the context to be used in this call's Do method.
 10439  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesDeleteCall {
 10440  	c.ctx_ = ctx
 10441  	return c
 10442  }
 10443  
 10444  // Header returns a http.Header that can be modified by the caller to add
 10445  // headers to the request.
 10446  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Header() http.Header {
 10447  	if c.header_ == nil {
 10448  		c.header_ = make(http.Header)
 10449  	}
 10450  	return c.header_
 10451  }
 10452  
 10453  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
 10454  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10455  	var body io.Reader = nil
 10456  	c.urlParams_.Set("alt", alt)
 10457  	c.urlParams_.Set("prettyPrint", "false")
 10458  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 10459  	urls += "?" + c.urlParams_.Encode()
 10460  	req, err := http.NewRequest("DELETE", urls, body)
 10461  	if err != nil {
 10462  		return nil, err
 10463  	}
 10464  	req.Header = reqHeaders
 10465  	googleapi.Expand(req.URL, map[string]string{
 10466  		"name": c.name,
 10467  	})
 10468  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10469  }
 10470  
 10471  // Do executes the "networkservices.projects.locations.serviceLbPolicies.delete" call.
 10472  // Any non-2xx status code is an error. Response headers are in either
 10473  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10474  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10475  // whether the returned error was because http.StatusNotModified was returned.
 10476  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10477  	gensupport.SetOptions(c.urlParams_, opts...)
 10478  	res, err := c.doRequest("json")
 10479  	if res != nil && res.StatusCode == http.StatusNotModified {
 10480  		if res.Body != nil {
 10481  			res.Body.Close()
 10482  		}
 10483  		return nil, gensupport.WrapError(&googleapi.Error{
 10484  			Code:   res.StatusCode,
 10485  			Header: res.Header,
 10486  		})
 10487  	}
 10488  	if err != nil {
 10489  		return nil, err
 10490  	}
 10491  	defer googleapi.CloseBody(res)
 10492  	if err := googleapi.CheckResponse(res); err != nil {
 10493  		return nil, gensupport.WrapError(err)
 10494  	}
 10495  	ret := &Operation{
 10496  		ServerResponse: googleapi.ServerResponse{
 10497  			Header:         res.Header,
 10498  			HTTPStatusCode: res.StatusCode,
 10499  		},
 10500  	}
 10501  	target := &ret
 10502  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10503  		return nil, err
 10504  	}
 10505  	return ret, nil
 10506  }
 10507  
 10508  type ProjectsLocationsServiceLbPoliciesGetCall struct {
 10509  	s            *Service
 10510  	name         string
 10511  	urlParams_   gensupport.URLParams
 10512  	ifNoneMatch_ string
 10513  	ctx_         context.Context
 10514  	header_      http.Header
 10515  }
 10516  
 10517  // Get: Gets details of a single ServiceLbPolicy.
 10518  //
 10519  //   - name: A name of the ServiceLbPolicy to get. Must be in the format
 10520  //     `projects/{project}/locations/{location}/serviceLbPolicies/*`.
 10521  func (r *ProjectsLocationsServiceLbPoliciesService) Get(name string) *ProjectsLocationsServiceLbPoliciesGetCall {
 10522  	c := &ProjectsLocationsServiceLbPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10523  	c.name = name
 10524  	return c
 10525  }
 10526  
 10527  // Fields allows partial responses to be retrieved. See
 10528  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10529  // details.
 10530  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetCall {
 10531  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10532  	return c
 10533  }
 10534  
 10535  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10536  // object's ETag matches the given value. This is useful for getting updates
 10537  // only after the object has changed since the last request.
 10538  func (c *ProjectsLocationsServiceLbPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetCall {
 10539  	c.ifNoneMatch_ = entityTag
 10540  	return c
 10541  }
 10542  
 10543  // Context sets the context to be used in this call's Do method.
 10544  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetCall {
 10545  	c.ctx_ = ctx
 10546  	return c
 10547  }
 10548  
 10549  // Header returns a http.Header that can be modified by the caller to add
 10550  // headers to the request.
 10551  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Header() http.Header {
 10552  	if c.header_ == nil {
 10553  		c.header_ = make(http.Header)
 10554  	}
 10555  	return c.header_
 10556  }
 10557  
 10558  func (c *ProjectsLocationsServiceLbPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
 10559  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10560  	if c.ifNoneMatch_ != "" {
 10561  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10562  	}
 10563  	var body io.Reader = nil
 10564  	c.urlParams_.Set("alt", alt)
 10565  	c.urlParams_.Set("prettyPrint", "false")
 10566  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 10567  	urls += "?" + c.urlParams_.Encode()
 10568  	req, err := http.NewRequest("GET", urls, body)
 10569  	if err != nil {
 10570  		return nil, err
 10571  	}
 10572  	req.Header = reqHeaders
 10573  	googleapi.Expand(req.URL, map[string]string{
 10574  		"name": c.name,
 10575  	})
 10576  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10577  }
 10578  
 10579  // Do executes the "networkservices.projects.locations.serviceLbPolicies.get" call.
 10580  // Any non-2xx status code is an error. Response headers are in either
 10581  // *ServiceLbPolicy.ServerResponse.Header or (if a response was returned at
 10582  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10583  // check whether the returned error was because http.StatusNotModified was
 10584  // returned.
 10585  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceLbPolicy, error) {
 10586  	gensupport.SetOptions(c.urlParams_, opts...)
 10587  	res, err := c.doRequest("json")
 10588  	if res != nil && res.StatusCode == http.StatusNotModified {
 10589  		if res.Body != nil {
 10590  			res.Body.Close()
 10591  		}
 10592  		return nil, gensupport.WrapError(&googleapi.Error{
 10593  			Code:   res.StatusCode,
 10594  			Header: res.Header,
 10595  		})
 10596  	}
 10597  	if err != nil {
 10598  		return nil, err
 10599  	}
 10600  	defer googleapi.CloseBody(res)
 10601  	if err := googleapi.CheckResponse(res); err != nil {
 10602  		return nil, gensupport.WrapError(err)
 10603  	}
 10604  	ret := &ServiceLbPolicy{
 10605  		ServerResponse: googleapi.ServerResponse{
 10606  			Header:         res.Header,
 10607  			HTTPStatusCode: res.StatusCode,
 10608  		},
 10609  	}
 10610  	target := &ret
 10611  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10612  		return nil, err
 10613  	}
 10614  	return ret, nil
 10615  }
 10616  
 10617  type ProjectsLocationsServiceLbPoliciesGetIamPolicyCall struct {
 10618  	s            *Service
 10619  	resource     string
 10620  	urlParams_   gensupport.URLParams
 10621  	ifNoneMatch_ string
 10622  	ctx_         context.Context
 10623  	header_      http.Header
 10624  }
 10625  
 10626  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 10627  // empty policy if the resource exists and does not have a policy set.
 10628  //
 10629  //   - resource: REQUIRED: The resource for which the policy is being requested.
 10630  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 10631  //     for the appropriate value for this field.
 10632  func (r *ProjectsLocationsServiceLbPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 10633  	c := &ProjectsLocationsServiceLbPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10634  	c.resource = resource
 10635  	return c
 10636  }
 10637  
 10638  // OptionsRequestedPolicyVersion sets the optional parameter
 10639  // "options.requestedPolicyVersion": The maximum policy version that will be
 10640  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 10641  // an invalid value will be rejected. Requests for policies with any
 10642  // conditional role bindings must specify version 3. Policies with no
 10643  // conditional role bindings may specify any valid value or leave the field
 10644  // unset. The policy in the response might use the policy version that you
 10645  // specified, or it might use a lower policy version. For example, if you
 10646  // specify version 3, but the policy has no conditional role bindings, the
 10647  // response uses version 1. To learn which resources support conditions in
 10648  // their IAM policies, see the IAM documentation
 10649  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 10650  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 10651  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 10652  	return c
 10653  }
 10654  
 10655  // Fields allows partial responses to be retrieved. See
 10656  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10657  // details.
 10658  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 10659  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10660  	return c
 10661  }
 10662  
 10663  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10664  // object's ETag matches the given value. This is useful for getting updates
 10665  // only after the object has changed since the last request.
 10666  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 10667  	c.ifNoneMatch_ = entityTag
 10668  	return c
 10669  }
 10670  
 10671  // Context sets the context to be used in this call's Do method.
 10672  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 10673  	c.ctx_ = ctx
 10674  	return c
 10675  }
 10676  
 10677  // Header returns a http.Header that can be modified by the caller to add
 10678  // headers to the request.
 10679  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Header() http.Header {
 10680  	if c.header_ == nil {
 10681  		c.header_ = make(http.Header)
 10682  	}
 10683  	return c.header_
 10684  }
 10685  
 10686  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 10687  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10688  	if c.ifNoneMatch_ != "" {
 10689  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10690  	}
 10691  	var body io.Reader = nil
 10692  	c.urlParams_.Set("alt", alt)
 10693  	c.urlParams_.Set("prettyPrint", "false")
 10694  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy")
 10695  	urls += "?" + c.urlParams_.Encode()
 10696  	req, err := http.NewRequest("GET", urls, body)
 10697  	if err != nil {
 10698  		return nil, err
 10699  	}
 10700  	req.Header = reqHeaders
 10701  	googleapi.Expand(req.URL, map[string]string{
 10702  		"resource": c.resource,
 10703  	})
 10704  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10705  }
 10706  
 10707  // Do executes the "networkservices.projects.locations.serviceLbPolicies.getIamPolicy" call.
 10708  // Any non-2xx status code is an error. Response headers are in either
 10709  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 10710  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10711  // whether the returned error was because http.StatusNotModified was returned.
 10712  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 10713  	gensupport.SetOptions(c.urlParams_, opts...)
 10714  	res, err := c.doRequest("json")
 10715  	if res != nil && res.StatusCode == http.StatusNotModified {
 10716  		if res.Body != nil {
 10717  			res.Body.Close()
 10718  		}
 10719  		return nil, gensupport.WrapError(&googleapi.Error{
 10720  			Code:   res.StatusCode,
 10721  			Header: res.Header,
 10722  		})
 10723  	}
 10724  	if err != nil {
 10725  		return nil, err
 10726  	}
 10727  	defer googleapi.CloseBody(res)
 10728  	if err := googleapi.CheckResponse(res); err != nil {
 10729  		return nil, gensupport.WrapError(err)
 10730  	}
 10731  	ret := &Policy{
 10732  		ServerResponse: googleapi.ServerResponse{
 10733  			Header:         res.Header,
 10734  			HTTPStatusCode: res.StatusCode,
 10735  		},
 10736  	}
 10737  	target := &ret
 10738  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10739  		return nil, err
 10740  	}
 10741  	return ret, nil
 10742  }
 10743  
 10744  type ProjectsLocationsServiceLbPoliciesListCall struct {
 10745  	s            *Service
 10746  	parent       string
 10747  	urlParams_   gensupport.URLParams
 10748  	ifNoneMatch_ string
 10749  	ctx_         context.Context
 10750  	header_      http.Header
 10751  }
 10752  
 10753  // List: Lists ServiceLbPolicies in a given project and location.
 10754  //
 10755  //   - parent: The project and location from which the ServiceLbPolicies should
 10756  //     be listed, specified in the format
 10757  //     `projects/{project}/locations/{location}`.
 10758  func (r *ProjectsLocationsServiceLbPoliciesService) List(parent string) *ProjectsLocationsServiceLbPoliciesListCall {
 10759  	c := &ProjectsLocationsServiceLbPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10760  	c.parent = parent
 10761  	return c
 10762  }
 10763  
 10764  // PageSize sets the optional parameter "pageSize": Maximum number of
 10765  // ServiceLbPolicies to return per call.
 10766  func (c *ProjectsLocationsServiceLbPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceLbPoliciesListCall {
 10767  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10768  	return c
 10769  }
 10770  
 10771  // PageToken sets the optional parameter "pageToken": The value returned by the
 10772  // last `ListServiceLbPoliciesResponse` Indicates that this is a continuation
 10773  // of a prior `ListRouters` call, and that the system should return the next
 10774  // page of data.
 10775  func (c *ProjectsLocationsServiceLbPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceLbPoliciesListCall {
 10776  	c.urlParams_.Set("pageToken", pageToken)
 10777  	return c
 10778  }
 10779  
 10780  // Fields allows partial responses to be retrieved. See
 10781  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10782  // details.
 10783  func (c *ProjectsLocationsServiceLbPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesListCall {
 10784  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10785  	return c
 10786  }
 10787  
 10788  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10789  // object's ETag matches the given value. This is useful for getting updates
 10790  // only after the object has changed since the last request.
 10791  func (c *ProjectsLocationsServiceLbPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesListCall {
 10792  	c.ifNoneMatch_ = entityTag
 10793  	return c
 10794  }
 10795  
 10796  // Context sets the context to be used in this call's Do method.
 10797  func (c *ProjectsLocationsServiceLbPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesListCall {
 10798  	c.ctx_ = ctx
 10799  	return c
 10800  }
 10801  
 10802  // Header returns a http.Header that can be modified by the caller to add
 10803  // headers to the request.
 10804  func (c *ProjectsLocationsServiceLbPoliciesListCall) Header() http.Header {
 10805  	if c.header_ == nil {
 10806  		c.header_ = make(http.Header)
 10807  	}
 10808  	return c.header_
 10809  }
 10810  
 10811  func (c *ProjectsLocationsServiceLbPoliciesListCall) doRequest(alt string) (*http.Response, error) {
 10812  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10813  	if c.ifNoneMatch_ != "" {
 10814  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10815  	}
 10816  	var body io.Reader = nil
 10817  	c.urlParams_.Set("alt", alt)
 10818  	c.urlParams_.Set("prettyPrint", "false")
 10819  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/serviceLbPolicies")
 10820  	urls += "?" + c.urlParams_.Encode()
 10821  	req, err := http.NewRequest("GET", urls, body)
 10822  	if err != nil {
 10823  		return nil, err
 10824  	}
 10825  	req.Header = reqHeaders
 10826  	googleapi.Expand(req.URL, map[string]string{
 10827  		"parent": c.parent,
 10828  	})
 10829  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10830  }
 10831  
 10832  // Do executes the "networkservices.projects.locations.serviceLbPolicies.list" call.
 10833  // Any non-2xx status code is an error. Response headers are in either
 10834  // *ListServiceLbPoliciesResponse.ServerResponse.Header or (if a response was
 10835  // returned at all) in error.(*googleapi.Error).Header. Use
 10836  // googleapi.IsNotModified to check whether the returned error was because
 10837  // http.StatusNotModified was returned.
 10838  func (c *ProjectsLocationsServiceLbPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceLbPoliciesResponse, error) {
 10839  	gensupport.SetOptions(c.urlParams_, opts...)
 10840  	res, err := c.doRequest("json")
 10841  	if res != nil && res.StatusCode == http.StatusNotModified {
 10842  		if res.Body != nil {
 10843  			res.Body.Close()
 10844  		}
 10845  		return nil, gensupport.WrapError(&googleapi.Error{
 10846  			Code:   res.StatusCode,
 10847  			Header: res.Header,
 10848  		})
 10849  	}
 10850  	if err != nil {
 10851  		return nil, err
 10852  	}
 10853  	defer googleapi.CloseBody(res)
 10854  	if err := googleapi.CheckResponse(res); err != nil {
 10855  		return nil, gensupport.WrapError(err)
 10856  	}
 10857  	ret := &ListServiceLbPoliciesResponse{
 10858  		ServerResponse: googleapi.ServerResponse{
 10859  			Header:         res.Header,
 10860  			HTTPStatusCode: res.StatusCode,
 10861  		},
 10862  	}
 10863  	target := &ret
 10864  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10865  		return nil, err
 10866  	}
 10867  	return ret, nil
 10868  }
 10869  
 10870  // Pages invokes f for each page of results.
 10871  // A non-nil error returned from f will halt the iteration.
 10872  // The provided context supersedes any context provided to the Context method.
 10873  func (c *ProjectsLocationsServiceLbPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceLbPoliciesResponse) error) error {
 10874  	c.ctx_ = ctx
 10875  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10876  	for {
 10877  		x, err := c.Do()
 10878  		if err != nil {
 10879  			return err
 10880  		}
 10881  		if err := f(x); err != nil {
 10882  			return err
 10883  		}
 10884  		if x.NextPageToken == "" {
 10885  			return nil
 10886  		}
 10887  		c.PageToken(x.NextPageToken)
 10888  	}
 10889  }
 10890  
 10891  type ProjectsLocationsServiceLbPoliciesPatchCall struct {
 10892  	s               *Service
 10893  	name            string
 10894  	servicelbpolicy *ServiceLbPolicy
 10895  	urlParams_      gensupport.URLParams
 10896  	ctx_            context.Context
 10897  	header_         http.Header
 10898  }
 10899  
 10900  // Patch: Updates the parameters of a single ServiceLbPolicy.
 10901  //
 10902  //   - name: Name of the ServiceLbPolicy resource. It matches pattern
 10903  //     `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_poli
 10904  //     cy_name}`.
 10905  func (r *ProjectsLocationsServiceLbPoliciesService) Patch(name string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesPatchCall {
 10906  	c := &ProjectsLocationsServiceLbPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10907  	c.name = name
 10908  	c.servicelbpolicy = servicelbpolicy
 10909  	return c
 10910  }
 10911  
 10912  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 10913  // specify the fields to be overwritten in the ServiceLbPolicy resource by the
 10914  // update. The fields specified in the update_mask are relative to the
 10915  // resource, not the full request. A field will be overwritten if it is in the
 10916  // mask. If the user does not provide a mask then all fields will be
 10917  // overwritten.
 10918  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceLbPoliciesPatchCall {
 10919  	c.urlParams_.Set("updateMask", updateMask)
 10920  	return c
 10921  }
 10922  
 10923  // Fields allows partial responses to be retrieved. See
 10924  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10925  // details.
 10926  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesPatchCall {
 10927  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10928  	return c
 10929  }
 10930  
 10931  // Context sets the context to be used in this call's Do method.
 10932  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesPatchCall {
 10933  	c.ctx_ = ctx
 10934  	return c
 10935  }
 10936  
 10937  // Header returns a http.Header that can be modified by the caller to add
 10938  // headers to the request.
 10939  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Header() http.Header {
 10940  	if c.header_ == nil {
 10941  		c.header_ = make(http.Header)
 10942  	}
 10943  	return c.header_
 10944  }
 10945  
 10946  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
 10947  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10948  	var body io.Reader = nil
 10949  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy)
 10950  	if err != nil {
 10951  		return nil, err
 10952  	}
 10953  	c.urlParams_.Set("alt", alt)
 10954  	c.urlParams_.Set("prettyPrint", "false")
 10955  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 10956  	urls += "?" + c.urlParams_.Encode()
 10957  	req, err := http.NewRequest("PATCH", urls, body)
 10958  	if err != nil {
 10959  		return nil, err
 10960  	}
 10961  	req.Header = reqHeaders
 10962  	googleapi.Expand(req.URL, map[string]string{
 10963  		"name": c.name,
 10964  	})
 10965  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10966  }
 10967  
 10968  // Do executes the "networkservices.projects.locations.serviceLbPolicies.patch" call.
 10969  // Any non-2xx status code is an error. Response headers are in either
 10970  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10971  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10972  // whether the returned error was because http.StatusNotModified was returned.
 10973  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10974  	gensupport.SetOptions(c.urlParams_, opts...)
 10975  	res, err := c.doRequest("json")
 10976  	if res != nil && res.StatusCode == http.StatusNotModified {
 10977  		if res.Body != nil {
 10978  			res.Body.Close()
 10979  		}
 10980  		return nil, gensupport.WrapError(&googleapi.Error{
 10981  			Code:   res.StatusCode,
 10982  			Header: res.Header,
 10983  		})
 10984  	}
 10985  	if err != nil {
 10986  		return nil, err
 10987  	}
 10988  	defer googleapi.CloseBody(res)
 10989  	if err := googleapi.CheckResponse(res); err != nil {
 10990  		return nil, gensupport.WrapError(err)
 10991  	}
 10992  	ret := &Operation{
 10993  		ServerResponse: googleapi.ServerResponse{
 10994  			Header:         res.Header,
 10995  			HTTPStatusCode: res.StatusCode,
 10996  		},
 10997  	}
 10998  	target := &ret
 10999  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11000  		return nil, err
 11001  	}
 11002  	return ret, nil
 11003  }
 11004  
 11005  type ProjectsLocationsServiceLbPoliciesSetIamPolicyCall struct {
 11006  	s                   *Service
 11007  	resource            string
 11008  	setiampolicyrequest *SetIamPolicyRequest
 11009  	urlParams_          gensupport.URLParams
 11010  	ctx_                context.Context
 11011  	header_             http.Header
 11012  }
 11013  
 11014  // SetIamPolicy: Sets the access control policy on the specified resource.
 11015  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 11016  // and `PERMISSION_DENIED` errors.
 11017  //
 11018  //   - resource: REQUIRED: The resource for which the policy is being specified.
 11019  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 11020  //     for the appropriate value for this field.
 11021  func (r *ProjectsLocationsServiceLbPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
 11022  	c := &ProjectsLocationsServiceLbPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11023  	c.resource = resource
 11024  	c.setiampolicyrequest = setiampolicyrequest
 11025  	return c
 11026  }
 11027  
 11028  // Fields allows partial responses to be retrieved. See
 11029  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11030  // details.
 11031  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
 11032  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11033  	return c
 11034  }
 11035  
 11036  // Context sets the context to be used in this call's Do method.
 11037  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
 11038  	c.ctx_ = ctx
 11039  	return c
 11040  }
 11041  
 11042  // Header returns a http.Header that can be modified by the caller to add
 11043  // headers to the request.
 11044  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Header() http.Header {
 11045  	if c.header_ == nil {
 11046  		c.header_ = make(http.Header)
 11047  	}
 11048  	return c.header_
 11049  }
 11050  
 11051  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11052  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11053  	var body io.Reader = nil
 11054  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 11055  	if err != nil {
 11056  		return nil, err
 11057  	}
 11058  	c.urlParams_.Set("alt", alt)
 11059  	c.urlParams_.Set("prettyPrint", "false")
 11060  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy")
 11061  	urls += "?" + c.urlParams_.Encode()
 11062  	req, err := http.NewRequest("POST", urls, body)
 11063  	if err != nil {
 11064  		return nil, err
 11065  	}
 11066  	req.Header = reqHeaders
 11067  	googleapi.Expand(req.URL, map[string]string{
 11068  		"resource": c.resource,
 11069  	})
 11070  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11071  }
 11072  
 11073  // Do executes the "networkservices.projects.locations.serviceLbPolicies.setIamPolicy" call.
 11074  // Any non-2xx status code is an error. Response headers are in either
 11075  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11076  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11077  // whether the returned error was because http.StatusNotModified was returned.
 11078  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11079  	gensupport.SetOptions(c.urlParams_, opts...)
 11080  	res, err := c.doRequest("json")
 11081  	if res != nil && res.StatusCode == http.StatusNotModified {
 11082  		if res.Body != nil {
 11083  			res.Body.Close()
 11084  		}
 11085  		return nil, gensupport.WrapError(&googleapi.Error{
 11086  			Code:   res.StatusCode,
 11087  			Header: res.Header,
 11088  		})
 11089  	}
 11090  	if err != nil {
 11091  		return nil, err
 11092  	}
 11093  	defer googleapi.CloseBody(res)
 11094  	if err := googleapi.CheckResponse(res); err != nil {
 11095  		return nil, gensupport.WrapError(err)
 11096  	}
 11097  	ret := &Policy{
 11098  		ServerResponse: googleapi.ServerResponse{
 11099  			Header:         res.Header,
 11100  			HTTPStatusCode: res.StatusCode,
 11101  		},
 11102  	}
 11103  	target := &ret
 11104  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11105  		return nil, err
 11106  	}
 11107  	return ret, nil
 11108  }
 11109  
 11110  type ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall struct {
 11111  	s                         *Service
 11112  	resource                  string
 11113  	testiampermissionsrequest *TestIamPermissionsRequest
 11114  	urlParams_                gensupport.URLParams
 11115  	ctx_                      context.Context
 11116  	header_                   http.Header
 11117  }
 11118  
 11119  // TestIamPermissions: Returns permissions that a caller has on the specified
 11120  // resource. If the resource does not exist, this will return an empty set of
 11121  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 11122  // used for building permission-aware UIs and command-line tools, not for
 11123  // authorization checking. This operation may "fail open" without warning.
 11124  //
 11125  //   - resource: REQUIRED: The resource for which the policy detail is being
 11126  //     requested. See Resource names
 11127  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 11128  //     value for this field.
 11129  func (r *ProjectsLocationsServiceLbPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
 11130  	c := &ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11131  	c.resource = resource
 11132  	c.testiampermissionsrequest = testiampermissionsrequest
 11133  	return c
 11134  }
 11135  
 11136  // Fields allows partial responses to be retrieved. See
 11137  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11138  // details.
 11139  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
 11140  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11141  	return c
 11142  }
 11143  
 11144  // Context sets the context to be used in this call's Do method.
 11145  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
 11146  	c.ctx_ = ctx
 11147  	return c
 11148  }
 11149  
 11150  // Header returns a http.Header that can be modified by the caller to add
 11151  // headers to the request.
 11152  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Header() http.Header {
 11153  	if c.header_ == nil {
 11154  		c.header_ = make(http.Header)
 11155  	}
 11156  	return c.header_
 11157  }
 11158  
 11159  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 11160  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11161  	var body io.Reader = nil
 11162  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 11163  	if err != nil {
 11164  		return nil, err
 11165  	}
 11166  	c.urlParams_.Set("alt", alt)
 11167  	c.urlParams_.Set("prettyPrint", "false")
 11168  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions")
 11169  	urls += "?" + c.urlParams_.Encode()
 11170  	req, err := http.NewRequest("POST", urls, body)
 11171  	if err != nil {
 11172  		return nil, err
 11173  	}
 11174  	req.Header = reqHeaders
 11175  	googleapi.Expand(req.URL, map[string]string{
 11176  		"resource": c.resource,
 11177  	})
 11178  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11179  }
 11180  
 11181  // Do executes the "networkservices.projects.locations.serviceLbPolicies.testIamPermissions" call.
 11182  // Any non-2xx status code is an error. Response headers are in either
 11183  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 11184  // returned at all) in error.(*googleapi.Error).Header. Use
 11185  // googleapi.IsNotModified to check whether the returned error was because
 11186  // http.StatusNotModified was returned.
 11187  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 11188  	gensupport.SetOptions(c.urlParams_, opts...)
 11189  	res, err := c.doRequest("json")
 11190  	if res != nil && res.StatusCode == http.StatusNotModified {
 11191  		if res.Body != nil {
 11192  			res.Body.Close()
 11193  		}
 11194  		return nil, gensupport.WrapError(&googleapi.Error{
 11195  			Code:   res.StatusCode,
 11196  			Header: res.Header,
 11197  		})
 11198  	}
 11199  	if err != nil {
 11200  		return nil, err
 11201  	}
 11202  	defer googleapi.CloseBody(res)
 11203  	if err := googleapi.CheckResponse(res); err != nil {
 11204  		return nil, gensupport.WrapError(err)
 11205  	}
 11206  	ret := &TestIamPermissionsResponse{
 11207  		ServerResponse: googleapi.ServerResponse{
 11208  			Header:         res.Header,
 11209  			HTTPStatusCode: res.StatusCode,
 11210  		},
 11211  	}
 11212  	target := &ret
 11213  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11214  		return nil, err
 11215  	}
 11216  	return ret, nil
 11217  }
 11218  
 11219  type ProjectsLocationsTcpRoutesCreateCall struct {
 11220  	s          *Service
 11221  	parent     string
 11222  	tcproute   *TcpRoute
 11223  	urlParams_ gensupport.URLParams
 11224  	ctx_       context.Context
 11225  	header_    http.Header
 11226  }
 11227  
 11228  // Create: Creates a new TcpRoute in a given project and location.
 11229  //
 11230  //   - parent: The parent resource of the TcpRoute. Must be in the format
 11231  //     `projects/*/locations/global`.
 11232  func (r *ProjectsLocationsTcpRoutesService) Create(parent string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesCreateCall {
 11233  	c := &ProjectsLocationsTcpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11234  	c.parent = parent
 11235  	c.tcproute = tcproute
 11236  	return c
 11237  }
 11238  
 11239  // TcpRouteId sets the optional parameter "tcpRouteId": Required. Short name of
 11240  // the TcpRoute resource to be created.
 11241  func (c *ProjectsLocationsTcpRoutesCreateCall) TcpRouteId(tcpRouteId string) *ProjectsLocationsTcpRoutesCreateCall {
 11242  	c.urlParams_.Set("tcpRouteId", tcpRouteId)
 11243  	return c
 11244  }
 11245  
 11246  // Fields allows partial responses to be retrieved. See
 11247  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11248  // details.
 11249  func (c *ProjectsLocationsTcpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesCreateCall {
 11250  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11251  	return c
 11252  }
 11253  
 11254  // Context sets the context to be used in this call's Do method.
 11255  func (c *ProjectsLocationsTcpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesCreateCall {
 11256  	c.ctx_ = ctx
 11257  	return c
 11258  }
 11259  
 11260  // Header returns a http.Header that can be modified by the caller to add
 11261  // headers to the request.
 11262  func (c *ProjectsLocationsTcpRoutesCreateCall) Header() http.Header {
 11263  	if c.header_ == nil {
 11264  		c.header_ = make(http.Header)
 11265  	}
 11266  	return c.header_
 11267  }
 11268  
 11269  func (c *ProjectsLocationsTcpRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
 11270  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11271  	var body io.Reader = nil
 11272  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tcproute)
 11273  	if err != nil {
 11274  		return nil, err
 11275  	}
 11276  	c.urlParams_.Set("alt", alt)
 11277  	c.urlParams_.Set("prettyPrint", "false")
 11278  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes")
 11279  	urls += "?" + c.urlParams_.Encode()
 11280  	req, err := http.NewRequest("POST", urls, body)
 11281  	if err != nil {
 11282  		return nil, err
 11283  	}
 11284  	req.Header = reqHeaders
 11285  	googleapi.Expand(req.URL, map[string]string{
 11286  		"parent": c.parent,
 11287  	})
 11288  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11289  }
 11290  
 11291  // Do executes the "networkservices.projects.locations.tcpRoutes.create" call.
 11292  // Any non-2xx status code is an error. Response headers are in either
 11293  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11294  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11295  // whether the returned error was because http.StatusNotModified was returned.
 11296  func (c *ProjectsLocationsTcpRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11297  	gensupport.SetOptions(c.urlParams_, opts...)
 11298  	res, err := c.doRequest("json")
 11299  	if res != nil && res.StatusCode == http.StatusNotModified {
 11300  		if res.Body != nil {
 11301  			res.Body.Close()
 11302  		}
 11303  		return nil, gensupport.WrapError(&googleapi.Error{
 11304  			Code:   res.StatusCode,
 11305  			Header: res.Header,
 11306  		})
 11307  	}
 11308  	if err != nil {
 11309  		return nil, err
 11310  	}
 11311  	defer googleapi.CloseBody(res)
 11312  	if err := googleapi.CheckResponse(res); err != nil {
 11313  		return nil, gensupport.WrapError(err)
 11314  	}
 11315  	ret := &Operation{
 11316  		ServerResponse: googleapi.ServerResponse{
 11317  			Header:         res.Header,
 11318  			HTTPStatusCode: res.StatusCode,
 11319  		},
 11320  	}
 11321  	target := &ret
 11322  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11323  		return nil, err
 11324  	}
 11325  	return ret, nil
 11326  }
 11327  
 11328  type ProjectsLocationsTcpRoutesDeleteCall struct {
 11329  	s          *Service
 11330  	name       string
 11331  	urlParams_ gensupport.URLParams
 11332  	ctx_       context.Context
 11333  	header_    http.Header
 11334  }
 11335  
 11336  // Delete: Deletes a single TcpRoute.
 11337  //
 11338  //   - name: A name of the TcpRoute to delete. Must be in the format
 11339  //     `projects/*/locations/global/tcpRoutes/*`.
 11340  func (r *ProjectsLocationsTcpRoutesService) Delete(name string) *ProjectsLocationsTcpRoutesDeleteCall {
 11341  	c := &ProjectsLocationsTcpRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11342  	c.name = name
 11343  	return c
 11344  }
 11345  
 11346  // Fields allows partial responses to be retrieved. See
 11347  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11348  // details.
 11349  func (c *ProjectsLocationsTcpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesDeleteCall {
 11350  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11351  	return c
 11352  }
 11353  
 11354  // Context sets the context to be used in this call's Do method.
 11355  func (c *ProjectsLocationsTcpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesDeleteCall {
 11356  	c.ctx_ = ctx
 11357  	return c
 11358  }
 11359  
 11360  // Header returns a http.Header that can be modified by the caller to add
 11361  // headers to the request.
 11362  func (c *ProjectsLocationsTcpRoutesDeleteCall) Header() http.Header {
 11363  	if c.header_ == nil {
 11364  		c.header_ = make(http.Header)
 11365  	}
 11366  	return c.header_
 11367  }
 11368  
 11369  func (c *ProjectsLocationsTcpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
 11370  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11371  	var body io.Reader = nil
 11372  	c.urlParams_.Set("alt", alt)
 11373  	c.urlParams_.Set("prettyPrint", "false")
 11374  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 11375  	urls += "?" + c.urlParams_.Encode()
 11376  	req, err := http.NewRequest("DELETE", urls, body)
 11377  	if err != nil {
 11378  		return nil, err
 11379  	}
 11380  	req.Header = reqHeaders
 11381  	googleapi.Expand(req.URL, map[string]string{
 11382  		"name": c.name,
 11383  	})
 11384  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11385  }
 11386  
 11387  // Do executes the "networkservices.projects.locations.tcpRoutes.delete" call.
 11388  // Any non-2xx status code is an error. Response headers are in either
 11389  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11390  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11391  // whether the returned error was because http.StatusNotModified was returned.
 11392  func (c *ProjectsLocationsTcpRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11393  	gensupport.SetOptions(c.urlParams_, opts...)
 11394  	res, err := c.doRequest("json")
 11395  	if res != nil && res.StatusCode == http.StatusNotModified {
 11396  		if res.Body != nil {
 11397  			res.Body.Close()
 11398  		}
 11399  		return nil, gensupport.WrapError(&googleapi.Error{
 11400  			Code:   res.StatusCode,
 11401  			Header: res.Header,
 11402  		})
 11403  	}
 11404  	if err != nil {
 11405  		return nil, err
 11406  	}
 11407  	defer googleapi.CloseBody(res)
 11408  	if err := googleapi.CheckResponse(res); err != nil {
 11409  		return nil, gensupport.WrapError(err)
 11410  	}
 11411  	ret := &Operation{
 11412  		ServerResponse: googleapi.ServerResponse{
 11413  			Header:         res.Header,
 11414  			HTTPStatusCode: res.StatusCode,
 11415  		},
 11416  	}
 11417  	target := &ret
 11418  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11419  		return nil, err
 11420  	}
 11421  	return ret, nil
 11422  }
 11423  
 11424  type ProjectsLocationsTcpRoutesGetCall struct {
 11425  	s            *Service
 11426  	name         string
 11427  	urlParams_   gensupport.URLParams
 11428  	ifNoneMatch_ string
 11429  	ctx_         context.Context
 11430  	header_      http.Header
 11431  }
 11432  
 11433  // Get: Gets details of a single TcpRoute.
 11434  //
 11435  //   - name: A name of the TcpRoute to get. Must be in the format
 11436  //     `projects/*/locations/global/tcpRoutes/*`.
 11437  func (r *ProjectsLocationsTcpRoutesService) Get(name string) *ProjectsLocationsTcpRoutesGetCall {
 11438  	c := &ProjectsLocationsTcpRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11439  	c.name = name
 11440  	return c
 11441  }
 11442  
 11443  // Fields allows partial responses to be retrieved. See
 11444  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11445  // details.
 11446  func (c *ProjectsLocationsTcpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesGetCall {
 11447  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11448  	return c
 11449  }
 11450  
 11451  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11452  // object's ETag matches the given value. This is useful for getting updates
 11453  // only after the object has changed since the last request.
 11454  func (c *ProjectsLocationsTcpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesGetCall {
 11455  	c.ifNoneMatch_ = entityTag
 11456  	return c
 11457  }
 11458  
 11459  // Context sets the context to be used in this call's Do method.
 11460  func (c *ProjectsLocationsTcpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesGetCall {
 11461  	c.ctx_ = ctx
 11462  	return c
 11463  }
 11464  
 11465  // Header returns a http.Header that can be modified by the caller to add
 11466  // headers to the request.
 11467  func (c *ProjectsLocationsTcpRoutesGetCall) Header() http.Header {
 11468  	if c.header_ == nil {
 11469  		c.header_ = make(http.Header)
 11470  	}
 11471  	return c.header_
 11472  }
 11473  
 11474  func (c *ProjectsLocationsTcpRoutesGetCall) doRequest(alt string) (*http.Response, error) {
 11475  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11476  	if c.ifNoneMatch_ != "" {
 11477  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11478  	}
 11479  	var body io.Reader = nil
 11480  	c.urlParams_.Set("alt", alt)
 11481  	c.urlParams_.Set("prettyPrint", "false")
 11482  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 11483  	urls += "?" + c.urlParams_.Encode()
 11484  	req, err := http.NewRequest("GET", urls, body)
 11485  	if err != nil {
 11486  		return nil, err
 11487  	}
 11488  	req.Header = reqHeaders
 11489  	googleapi.Expand(req.URL, map[string]string{
 11490  		"name": c.name,
 11491  	})
 11492  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11493  }
 11494  
 11495  // Do executes the "networkservices.projects.locations.tcpRoutes.get" call.
 11496  // Any non-2xx status code is an error. Response headers are in either
 11497  // *TcpRoute.ServerResponse.Header or (if a response was returned at all) in
 11498  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11499  // whether the returned error was because http.StatusNotModified was returned.
 11500  func (c *ProjectsLocationsTcpRoutesGetCall) Do(opts ...googleapi.CallOption) (*TcpRoute, error) {
 11501  	gensupport.SetOptions(c.urlParams_, opts...)
 11502  	res, err := c.doRequest("json")
 11503  	if res != nil && res.StatusCode == http.StatusNotModified {
 11504  		if res.Body != nil {
 11505  			res.Body.Close()
 11506  		}
 11507  		return nil, gensupport.WrapError(&googleapi.Error{
 11508  			Code:   res.StatusCode,
 11509  			Header: res.Header,
 11510  		})
 11511  	}
 11512  	if err != nil {
 11513  		return nil, err
 11514  	}
 11515  	defer googleapi.CloseBody(res)
 11516  	if err := googleapi.CheckResponse(res); err != nil {
 11517  		return nil, gensupport.WrapError(err)
 11518  	}
 11519  	ret := &TcpRoute{
 11520  		ServerResponse: googleapi.ServerResponse{
 11521  			Header:         res.Header,
 11522  			HTTPStatusCode: res.StatusCode,
 11523  		},
 11524  	}
 11525  	target := &ret
 11526  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11527  		return nil, err
 11528  	}
 11529  	return ret, nil
 11530  }
 11531  
 11532  type ProjectsLocationsTcpRoutesListCall struct {
 11533  	s            *Service
 11534  	parent       string
 11535  	urlParams_   gensupport.URLParams
 11536  	ifNoneMatch_ string
 11537  	ctx_         context.Context
 11538  	header_      http.Header
 11539  }
 11540  
 11541  // List: Lists TcpRoute in a given project and location.
 11542  //
 11543  //   - parent: The project and location from which the TcpRoutes should be
 11544  //     listed, specified in the format `projects/*/locations/global`.
 11545  func (r *ProjectsLocationsTcpRoutesService) List(parent string) *ProjectsLocationsTcpRoutesListCall {
 11546  	c := &ProjectsLocationsTcpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11547  	c.parent = parent
 11548  	return c
 11549  }
 11550  
 11551  // PageSize sets the optional parameter "pageSize": Maximum number of TcpRoutes
 11552  // to return per call.
 11553  func (c *ProjectsLocationsTcpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTcpRoutesListCall {
 11554  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11555  	return c
 11556  }
 11557  
 11558  // PageToken sets the optional parameter "pageToken": The value returned by the
 11559  // last `ListTcpRoutesResponse` Indicates that this is a continuation of a
 11560  // prior `ListTcpRoutes` call, and that the system should return the next page
 11561  // of data.
 11562  func (c *ProjectsLocationsTcpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTcpRoutesListCall {
 11563  	c.urlParams_.Set("pageToken", pageToken)
 11564  	return c
 11565  }
 11566  
 11567  // Fields allows partial responses to be retrieved. See
 11568  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11569  // details.
 11570  func (c *ProjectsLocationsTcpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesListCall {
 11571  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11572  	return c
 11573  }
 11574  
 11575  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11576  // object's ETag matches the given value. This is useful for getting updates
 11577  // only after the object has changed since the last request.
 11578  func (c *ProjectsLocationsTcpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesListCall {
 11579  	c.ifNoneMatch_ = entityTag
 11580  	return c
 11581  }
 11582  
 11583  // Context sets the context to be used in this call's Do method.
 11584  func (c *ProjectsLocationsTcpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesListCall {
 11585  	c.ctx_ = ctx
 11586  	return c
 11587  }
 11588  
 11589  // Header returns a http.Header that can be modified by the caller to add
 11590  // headers to the request.
 11591  func (c *ProjectsLocationsTcpRoutesListCall) Header() http.Header {
 11592  	if c.header_ == nil {
 11593  		c.header_ = make(http.Header)
 11594  	}
 11595  	return c.header_
 11596  }
 11597  
 11598  func (c *ProjectsLocationsTcpRoutesListCall) doRequest(alt string) (*http.Response, error) {
 11599  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11600  	if c.ifNoneMatch_ != "" {
 11601  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11602  	}
 11603  	var body io.Reader = nil
 11604  	c.urlParams_.Set("alt", alt)
 11605  	c.urlParams_.Set("prettyPrint", "false")
 11606  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tcpRoutes")
 11607  	urls += "?" + c.urlParams_.Encode()
 11608  	req, err := http.NewRequest("GET", urls, body)
 11609  	if err != nil {
 11610  		return nil, err
 11611  	}
 11612  	req.Header = reqHeaders
 11613  	googleapi.Expand(req.URL, map[string]string{
 11614  		"parent": c.parent,
 11615  	})
 11616  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11617  }
 11618  
 11619  // Do executes the "networkservices.projects.locations.tcpRoutes.list" call.
 11620  // Any non-2xx status code is an error. Response headers are in either
 11621  // *ListTcpRoutesResponse.ServerResponse.Header or (if a response was returned
 11622  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11623  // check whether the returned error was because http.StatusNotModified was
 11624  // returned.
 11625  func (c *ProjectsLocationsTcpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTcpRoutesResponse, error) {
 11626  	gensupport.SetOptions(c.urlParams_, opts...)
 11627  	res, err := c.doRequest("json")
 11628  	if res != nil && res.StatusCode == http.StatusNotModified {
 11629  		if res.Body != nil {
 11630  			res.Body.Close()
 11631  		}
 11632  		return nil, gensupport.WrapError(&googleapi.Error{
 11633  			Code:   res.StatusCode,
 11634  			Header: res.Header,
 11635  		})
 11636  	}
 11637  	if err != nil {
 11638  		return nil, err
 11639  	}
 11640  	defer googleapi.CloseBody(res)
 11641  	if err := googleapi.CheckResponse(res); err != nil {
 11642  		return nil, gensupport.WrapError(err)
 11643  	}
 11644  	ret := &ListTcpRoutesResponse{
 11645  		ServerResponse: googleapi.ServerResponse{
 11646  			Header:         res.Header,
 11647  			HTTPStatusCode: res.StatusCode,
 11648  		},
 11649  	}
 11650  	target := &ret
 11651  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11652  		return nil, err
 11653  	}
 11654  	return ret, nil
 11655  }
 11656  
 11657  // Pages invokes f for each page of results.
 11658  // A non-nil error returned from f will halt the iteration.
 11659  // The provided context supersedes any context provided to the Context method.
 11660  func (c *ProjectsLocationsTcpRoutesListCall) Pages(ctx context.Context, f func(*ListTcpRoutesResponse) error) error {
 11661  	c.ctx_ = ctx
 11662  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11663  	for {
 11664  		x, err := c.Do()
 11665  		if err != nil {
 11666  			return err
 11667  		}
 11668  		if err := f(x); err != nil {
 11669  			return err
 11670  		}
 11671  		if x.NextPageToken == "" {
 11672  			return nil
 11673  		}
 11674  		c.PageToken(x.NextPageToken)
 11675  	}
 11676  }
 11677  
 11678  type ProjectsLocationsTcpRoutesPatchCall struct {
 11679  	s          *Service
 11680  	name       string
 11681  	tcproute   *TcpRoute
 11682  	urlParams_ gensupport.URLParams
 11683  	ctx_       context.Context
 11684  	header_    http.Header
 11685  }
 11686  
 11687  // Patch: Updates the parameters of a single TcpRoute.
 11688  //
 11689  //   - name: Name of the TcpRoute resource. It matches pattern
 11690  //     `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
 11691  func (r *ProjectsLocationsTcpRoutesService) Patch(name string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesPatchCall {
 11692  	c := &ProjectsLocationsTcpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11693  	c.name = name
 11694  	c.tcproute = tcproute
 11695  	return c
 11696  }
 11697  
 11698  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 11699  // specify the fields to be overwritten in the TcpRoute resource by the update.
 11700  // The fields specified in the update_mask are relative to the resource, not
 11701  // the full request. A field will be overwritten if it is in the mask. If the
 11702  // user does not provide a mask then all fields will be overwritten.
 11703  func (c *ProjectsLocationsTcpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTcpRoutesPatchCall {
 11704  	c.urlParams_.Set("updateMask", updateMask)
 11705  	return c
 11706  }
 11707  
 11708  // Fields allows partial responses to be retrieved. See
 11709  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11710  // details.
 11711  func (c *ProjectsLocationsTcpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesPatchCall {
 11712  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11713  	return c
 11714  }
 11715  
 11716  // Context sets the context to be used in this call's Do method.
 11717  func (c *ProjectsLocationsTcpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesPatchCall {
 11718  	c.ctx_ = ctx
 11719  	return c
 11720  }
 11721  
 11722  // Header returns a http.Header that can be modified by the caller to add
 11723  // headers to the request.
 11724  func (c *ProjectsLocationsTcpRoutesPatchCall) Header() http.Header {
 11725  	if c.header_ == nil {
 11726  		c.header_ = make(http.Header)
 11727  	}
 11728  	return c.header_
 11729  }
 11730  
 11731  func (c *ProjectsLocationsTcpRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
 11732  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11733  	var body io.Reader = nil
 11734  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tcproute)
 11735  	if err != nil {
 11736  		return nil, err
 11737  	}
 11738  	c.urlParams_.Set("alt", alt)
 11739  	c.urlParams_.Set("prettyPrint", "false")
 11740  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 11741  	urls += "?" + c.urlParams_.Encode()
 11742  	req, err := http.NewRequest("PATCH", urls, body)
 11743  	if err != nil {
 11744  		return nil, err
 11745  	}
 11746  	req.Header = reqHeaders
 11747  	googleapi.Expand(req.URL, map[string]string{
 11748  		"name": c.name,
 11749  	})
 11750  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11751  }
 11752  
 11753  // Do executes the "networkservices.projects.locations.tcpRoutes.patch" call.
 11754  // Any non-2xx status code is an error. Response headers are in either
 11755  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11756  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11757  // whether the returned error was because http.StatusNotModified was returned.
 11758  func (c *ProjectsLocationsTcpRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11759  	gensupport.SetOptions(c.urlParams_, opts...)
 11760  	res, err := c.doRequest("json")
 11761  	if res != nil && res.StatusCode == http.StatusNotModified {
 11762  		if res.Body != nil {
 11763  			res.Body.Close()
 11764  		}
 11765  		return nil, gensupport.WrapError(&googleapi.Error{
 11766  			Code:   res.StatusCode,
 11767  			Header: res.Header,
 11768  		})
 11769  	}
 11770  	if err != nil {
 11771  		return nil, err
 11772  	}
 11773  	defer googleapi.CloseBody(res)
 11774  	if err := googleapi.CheckResponse(res); err != nil {
 11775  		return nil, gensupport.WrapError(err)
 11776  	}
 11777  	ret := &Operation{
 11778  		ServerResponse: googleapi.ServerResponse{
 11779  			Header:         res.Header,
 11780  			HTTPStatusCode: res.StatusCode,
 11781  		},
 11782  	}
 11783  	target := &ret
 11784  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11785  		return nil, err
 11786  	}
 11787  	return ret, nil
 11788  }
 11789  
 11790  type ProjectsLocationsTlsRoutesCreateCall struct {
 11791  	s          *Service
 11792  	parent     string
 11793  	tlsroute   *TlsRoute
 11794  	urlParams_ gensupport.URLParams
 11795  	ctx_       context.Context
 11796  	header_    http.Header
 11797  }
 11798  
 11799  // Create: Creates a new TlsRoute in a given project and location.
 11800  //
 11801  //   - parent: The parent resource of the TlsRoute. Must be in the format
 11802  //     `projects/*/locations/global`.
 11803  func (r *ProjectsLocationsTlsRoutesService) Create(parent string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesCreateCall {
 11804  	c := &ProjectsLocationsTlsRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11805  	c.parent = parent
 11806  	c.tlsroute = tlsroute
 11807  	return c
 11808  }
 11809  
 11810  // TlsRouteId sets the optional parameter "tlsRouteId": Required. Short name of
 11811  // the TlsRoute resource to be created.
 11812  func (c *ProjectsLocationsTlsRoutesCreateCall) TlsRouteId(tlsRouteId string) *ProjectsLocationsTlsRoutesCreateCall {
 11813  	c.urlParams_.Set("tlsRouteId", tlsRouteId)
 11814  	return c
 11815  }
 11816  
 11817  // Fields allows partial responses to be retrieved. See
 11818  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11819  // details.
 11820  func (c *ProjectsLocationsTlsRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesCreateCall {
 11821  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11822  	return c
 11823  }
 11824  
 11825  // Context sets the context to be used in this call's Do method.
 11826  func (c *ProjectsLocationsTlsRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesCreateCall {
 11827  	c.ctx_ = ctx
 11828  	return c
 11829  }
 11830  
 11831  // Header returns a http.Header that can be modified by the caller to add
 11832  // headers to the request.
 11833  func (c *ProjectsLocationsTlsRoutesCreateCall) Header() http.Header {
 11834  	if c.header_ == nil {
 11835  		c.header_ = make(http.Header)
 11836  	}
 11837  	return c.header_
 11838  }
 11839  
 11840  func (c *ProjectsLocationsTlsRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
 11841  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11842  	var body io.Reader = nil
 11843  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsroute)
 11844  	if err != nil {
 11845  		return nil, err
 11846  	}
 11847  	c.urlParams_.Set("alt", alt)
 11848  	c.urlParams_.Set("prettyPrint", "false")
 11849  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes")
 11850  	urls += "?" + c.urlParams_.Encode()
 11851  	req, err := http.NewRequest("POST", urls, body)
 11852  	if err != nil {
 11853  		return nil, err
 11854  	}
 11855  	req.Header = reqHeaders
 11856  	googleapi.Expand(req.URL, map[string]string{
 11857  		"parent": c.parent,
 11858  	})
 11859  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11860  }
 11861  
 11862  // Do executes the "networkservices.projects.locations.tlsRoutes.create" call.
 11863  // Any non-2xx status code is an error. Response headers are in either
 11864  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11865  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11866  // whether the returned error was because http.StatusNotModified was returned.
 11867  func (c *ProjectsLocationsTlsRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11868  	gensupport.SetOptions(c.urlParams_, opts...)
 11869  	res, err := c.doRequest("json")
 11870  	if res != nil && res.StatusCode == http.StatusNotModified {
 11871  		if res.Body != nil {
 11872  			res.Body.Close()
 11873  		}
 11874  		return nil, gensupport.WrapError(&googleapi.Error{
 11875  			Code:   res.StatusCode,
 11876  			Header: res.Header,
 11877  		})
 11878  	}
 11879  	if err != nil {
 11880  		return nil, err
 11881  	}
 11882  	defer googleapi.CloseBody(res)
 11883  	if err := googleapi.CheckResponse(res); err != nil {
 11884  		return nil, gensupport.WrapError(err)
 11885  	}
 11886  	ret := &Operation{
 11887  		ServerResponse: googleapi.ServerResponse{
 11888  			Header:         res.Header,
 11889  			HTTPStatusCode: res.StatusCode,
 11890  		},
 11891  	}
 11892  	target := &ret
 11893  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11894  		return nil, err
 11895  	}
 11896  	return ret, nil
 11897  }
 11898  
 11899  type ProjectsLocationsTlsRoutesDeleteCall struct {
 11900  	s          *Service
 11901  	name       string
 11902  	urlParams_ gensupport.URLParams
 11903  	ctx_       context.Context
 11904  	header_    http.Header
 11905  }
 11906  
 11907  // Delete: Deletes a single TlsRoute.
 11908  //
 11909  //   - name: A name of the TlsRoute to delete. Must be in the format
 11910  //     `projects/*/locations/global/tlsRoutes/*`.
 11911  func (r *ProjectsLocationsTlsRoutesService) Delete(name string) *ProjectsLocationsTlsRoutesDeleteCall {
 11912  	c := &ProjectsLocationsTlsRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11913  	c.name = name
 11914  	return c
 11915  }
 11916  
 11917  // Fields allows partial responses to be retrieved. See
 11918  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11919  // details.
 11920  func (c *ProjectsLocationsTlsRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesDeleteCall {
 11921  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11922  	return c
 11923  }
 11924  
 11925  // Context sets the context to be used in this call's Do method.
 11926  func (c *ProjectsLocationsTlsRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesDeleteCall {
 11927  	c.ctx_ = ctx
 11928  	return c
 11929  }
 11930  
 11931  // Header returns a http.Header that can be modified by the caller to add
 11932  // headers to the request.
 11933  func (c *ProjectsLocationsTlsRoutesDeleteCall) Header() http.Header {
 11934  	if c.header_ == nil {
 11935  		c.header_ = make(http.Header)
 11936  	}
 11937  	return c.header_
 11938  }
 11939  
 11940  func (c *ProjectsLocationsTlsRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
 11941  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11942  	var body io.Reader = nil
 11943  	c.urlParams_.Set("alt", alt)
 11944  	c.urlParams_.Set("prettyPrint", "false")
 11945  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 11946  	urls += "?" + c.urlParams_.Encode()
 11947  	req, err := http.NewRequest("DELETE", urls, body)
 11948  	if err != nil {
 11949  		return nil, err
 11950  	}
 11951  	req.Header = reqHeaders
 11952  	googleapi.Expand(req.URL, map[string]string{
 11953  		"name": c.name,
 11954  	})
 11955  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11956  }
 11957  
 11958  // Do executes the "networkservices.projects.locations.tlsRoutes.delete" call.
 11959  // Any non-2xx status code is an error. Response headers are in either
 11960  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11961  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11962  // whether the returned error was because http.StatusNotModified was returned.
 11963  func (c *ProjectsLocationsTlsRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11964  	gensupport.SetOptions(c.urlParams_, opts...)
 11965  	res, err := c.doRequest("json")
 11966  	if res != nil && res.StatusCode == http.StatusNotModified {
 11967  		if res.Body != nil {
 11968  			res.Body.Close()
 11969  		}
 11970  		return nil, gensupport.WrapError(&googleapi.Error{
 11971  			Code:   res.StatusCode,
 11972  			Header: res.Header,
 11973  		})
 11974  	}
 11975  	if err != nil {
 11976  		return nil, err
 11977  	}
 11978  	defer googleapi.CloseBody(res)
 11979  	if err := googleapi.CheckResponse(res); err != nil {
 11980  		return nil, gensupport.WrapError(err)
 11981  	}
 11982  	ret := &Operation{
 11983  		ServerResponse: googleapi.ServerResponse{
 11984  			Header:         res.Header,
 11985  			HTTPStatusCode: res.StatusCode,
 11986  		},
 11987  	}
 11988  	target := &ret
 11989  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11990  		return nil, err
 11991  	}
 11992  	return ret, nil
 11993  }
 11994  
 11995  type ProjectsLocationsTlsRoutesGetCall struct {
 11996  	s            *Service
 11997  	name         string
 11998  	urlParams_   gensupport.URLParams
 11999  	ifNoneMatch_ string
 12000  	ctx_         context.Context
 12001  	header_      http.Header
 12002  }
 12003  
 12004  // Get: Gets details of a single TlsRoute.
 12005  //
 12006  //   - name: A name of the TlsRoute to get. Must be in the format
 12007  //     `projects/*/locations/global/tlsRoutes/*`.
 12008  func (r *ProjectsLocationsTlsRoutesService) Get(name string) *ProjectsLocationsTlsRoutesGetCall {
 12009  	c := &ProjectsLocationsTlsRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12010  	c.name = name
 12011  	return c
 12012  }
 12013  
 12014  // Fields allows partial responses to be retrieved. See
 12015  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12016  // details.
 12017  func (c *ProjectsLocationsTlsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesGetCall {
 12018  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12019  	return c
 12020  }
 12021  
 12022  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12023  // object's ETag matches the given value. This is useful for getting updates
 12024  // only after the object has changed since the last request.
 12025  func (c *ProjectsLocationsTlsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesGetCall {
 12026  	c.ifNoneMatch_ = entityTag
 12027  	return c
 12028  }
 12029  
 12030  // Context sets the context to be used in this call's Do method.
 12031  func (c *ProjectsLocationsTlsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesGetCall {
 12032  	c.ctx_ = ctx
 12033  	return c
 12034  }
 12035  
 12036  // Header returns a http.Header that can be modified by the caller to add
 12037  // headers to the request.
 12038  func (c *ProjectsLocationsTlsRoutesGetCall) Header() http.Header {
 12039  	if c.header_ == nil {
 12040  		c.header_ = make(http.Header)
 12041  	}
 12042  	return c.header_
 12043  }
 12044  
 12045  func (c *ProjectsLocationsTlsRoutesGetCall) doRequest(alt string) (*http.Response, error) {
 12046  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12047  	if c.ifNoneMatch_ != "" {
 12048  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12049  	}
 12050  	var body io.Reader = nil
 12051  	c.urlParams_.Set("alt", alt)
 12052  	c.urlParams_.Set("prettyPrint", "false")
 12053  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 12054  	urls += "?" + c.urlParams_.Encode()
 12055  	req, err := http.NewRequest("GET", urls, body)
 12056  	if err != nil {
 12057  		return nil, err
 12058  	}
 12059  	req.Header = reqHeaders
 12060  	googleapi.Expand(req.URL, map[string]string{
 12061  		"name": c.name,
 12062  	})
 12063  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12064  }
 12065  
 12066  // Do executes the "networkservices.projects.locations.tlsRoutes.get" call.
 12067  // Any non-2xx status code is an error. Response headers are in either
 12068  // *TlsRoute.ServerResponse.Header or (if a response was returned at all) in
 12069  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12070  // whether the returned error was because http.StatusNotModified was returned.
 12071  func (c *ProjectsLocationsTlsRoutesGetCall) Do(opts ...googleapi.CallOption) (*TlsRoute, error) {
 12072  	gensupport.SetOptions(c.urlParams_, opts...)
 12073  	res, err := c.doRequest("json")
 12074  	if res != nil && res.StatusCode == http.StatusNotModified {
 12075  		if res.Body != nil {
 12076  			res.Body.Close()
 12077  		}
 12078  		return nil, gensupport.WrapError(&googleapi.Error{
 12079  			Code:   res.StatusCode,
 12080  			Header: res.Header,
 12081  		})
 12082  	}
 12083  	if err != nil {
 12084  		return nil, err
 12085  	}
 12086  	defer googleapi.CloseBody(res)
 12087  	if err := googleapi.CheckResponse(res); err != nil {
 12088  		return nil, gensupport.WrapError(err)
 12089  	}
 12090  	ret := &TlsRoute{
 12091  		ServerResponse: googleapi.ServerResponse{
 12092  			Header:         res.Header,
 12093  			HTTPStatusCode: res.StatusCode,
 12094  		},
 12095  	}
 12096  	target := &ret
 12097  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12098  		return nil, err
 12099  	}
 12100  	return ret, nil
 12101  }
 12102  
 12103  type ProjectsLocationsTlsRoutesListCall struct {
 12104  	s            *Service
 12105  	parent       string
 12106  	urlParams_   gensupport.URLParams
 12107  	ifNoneMatch_ string
 12108  	ctx_         context.Context
 12109  	header_      http.Header
 12110  }
 12111  
 12112  // List: Lists TlsRoute in a given project and location.
 12113  //
 12114  //   - parent: The project and location from which the TlsRoutes should be
 12115  //     listed, specified in the format `projects/*/locations/global`.
 12116  func (r *ProjectsLocationsTlsRoutesService) List(parent string) *ProjectsLocationsTlsRoutesListCall {
 12117  	c := &ProjectsLocationsTlsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12118  	c.parent = parent
 12119  	return c
 12120  }
 12121  
 12122  // PageSize sets the optional parameter "pageSize": Maximum number of TlsRoutes
 12123  // to return per call.
 12124  func (c *ProjectsLocationsTlsRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTlsRoutesListCall {
 12125  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12126  	return c
 12127  }
 12128  
 12129  // PageToken sets the optional parameter "pageToken": The value returned by the
 12130  // last `ListTlsRoutesResponse` Indicates that this is a continuation of a
 12131  // prior `ListTlsRoutes` call, and that the system should return the next page
 12132  // of data.
 12133  func (c *ProjectsLocationsTlsRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTlsRoutesListCall {
 12134  	c.urlParams_.Set("pageToken", pageToken)
 12135  	return c
 12136  }
 12137  
 12138  // Fields allows partial responses to be retrieved. See
 12139  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12140  // details.
 12141  func (c *ProjectsLocationsTlsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesListCall {
 12142  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12143  	return c
 12144  }
 12145  
 12146  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12147  // object's ETag matches the given value. This is useful for getting updates
 12148  // only after the object has changed since the last request.
 12149  func (c *ProjectsLocationsTlsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesListCall {
 12150  	c.ifNoneMatch_ = entityTag
 12151  	return c
 12152  }
 12153  
 12154  // Context sets the context to be used in this call's Do method.
 12155  func (c *ProjectsLocationsTlsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesListCall {
 12156  	c.ctx_ = ctx
 12157  	return c
 12158  }
 12159  
 12160  // Header returns a http.Header that can be modified by the caller to add
 12161  // headers to the request.
 12162  func (c *ProjectsLocationsTlsRoutesListCall) Header() http.Header {
 12163  	if c.header_ == nil {
 12164  		c.header_ = make(http.Header)
 12165  	}
 12166  	return c.header_
 12167  }
 12168  
 12169  func (c *ProjectsLocationsTlsRoutesListCall) doRequest(alt string) (*http.Response, error) {
 12170  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12171  	if c.ifNoneMatch_ != "" {
 12172  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12173  	}
 12174  	var body io.Reader = nil
 12175  	c.urlParams_.Set("alt", alt)
 12176  	c.urlParams_.Set("prettyPrint", "false")
 12177  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/tlsRoutes")
 12178  	urls += "?" + c.urlParams_.Encode()
 12179  	req, err := http.NewRequest("GET", urls, body)
 12180  	if err != nil {
 12181  		return nil, err
 12182  	}
 12183  	req.Header = reqHeaders
 12184  	googleapi.Expand(req.URL, map[string]string{
 12185  		"parent": c.parent,
 12186  	})
 12187  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12188  }
 12189  
 12190  // Do executes the "networkservices.projects.locations.tlsRoutes.list" call.
 12191  // Any non-2xx status code is an error. Response headers are in either
 12192  // *ListTlsRoutesResponse.ServerResponse.Header or (if a response was returned
 12193  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12194  // check whether the returned error was because http.StatusNotModified was
 12195  // returned.
 12196  func (c *ProjectsLocationsTlsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTlsRoutesResponse, error) {
 12197  	gensupport.SetOptions(c.urlParams_, opts...)
 12198  	res, err := c.doRequest("json")
 12199  	if res != nil && res.StatusCode == http.StatusNotModified {
 12200  		if res.Body != nil {
 12201  			res.Body.Close()
 12202  		}
 12203  		return nil, gensupport.WrapError(&googleapi.Error{
 12204  			Code:   res.StatusCode,
 12205  			Header: res.Header,
 12206  		})
 12207  	}
 12208  	if err != nil {
 12209  		return nil, err
 12210  	}
 12211  	defer googleapi.CloseBody(res)
 12212  	if err := googleapi.CheckResponse(res); err != nil {
 12213  		return nil, gensupport.WrapError(err)
 12214  	}
 12215  	ret := &ListTlsRoutesResponse{
 12216  		ServerResponse: googleapi.ServerResponse{
 12217  			Header:         res.Header,
 12218  			HTTPStatusCode: res.StatusCode,
 12219  		},
 12220  	}
 12221  	target := &ret
 12222  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12223  		return nil, err
 12224  	}
 12225  	return ret, nil
 12226  }
 12227  
 12228  // Pages invokes f for each page of results.
 12229  // A non-nil error returned from f will halt the iteration.
 12230  // The provided context supersedes any context provided to the Context method.
 12231  func (c *ProjectsLocationsTlsRoutesListCall) Pages(ctx context.Context, f func(*ListTlsRoutesResponse) error) error {
 12232  	c.ctx_ = ctx
 12233  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12234  	for {
 12235  		x, err := c.Do()
 12236  		if err != nil {
 12237  			return err
 12238  		}
 12239  		if err := f(x); err != nil {
 12240  			return err
 12241  		}
 12242  		if x.NextPageToken == "" {
 12243  			return nil
 12244  		}
 12245  		c.PageToken(x.NextPageToken)
 12246  	}
 12247  }
 12248  
 12249  type ProjectsLocationsTlsRoutesPatchCall struct {
 12250  	s          *Service
 12251  	name       string
 12252  	tlsroute   *TlsRoute
 12253  	urlParams_ gensupport.URLParams
 12254  	ctx_       context.Context
 12255  	header_    http.Header
 12256  }
 12257  
 12258  // Patch: Updates the parameters of a single TlsRoute.
 12259  //
 12260  //   - name: Name of the TlsRoute resource. It matches pattern
 12261  //     `projects/*/locations/global/tlsRoutes/tls_route_name>`.
 12262  func (r *ProjectsLocationsTlsRoutesService) Patch(name string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesPatchCall {
 12263  	c := &ProjectsLocationsTlsRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12264  	c.name = name
 12265  	c.tlsroute = tlsroute
 12266  	return c
 12267  }
 12268  
 12269  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 12270  // specify the fields to be overwritten in the TlsRoute resource by the update.
 12271  // The fields specified in the update_mask are relative to the resource, not
 12272  // the full request. A field will be overwritten if it is in the mask. If the
 12273  // user does not provide a mask then all fields will be overwritten.
 12274  func (c *ProjectsLocationsTlsRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTlsRoutesPatchCall {
 12275  	c.urlParams_.Set("updateMask", updateMask)
 12276  	return c
 12277  }
 12278  
 12279  // Fields allows partial responses to be retrieved. See
 12280  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12281  // details.
 12282  func (c *ProjectsLocationsTlsRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesPatchCall {
 12283  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12284  	return c
 12285  }
 12286  
 12287  // Context sets the context to be used in this call's Do method.
 12288  func (c *ProjectsLocationsTlsRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesPatchCall {
 12289  	c.ctx_ = ctx
 12290  	return c
 12291  }
 12292  
 12293  // Header returns a http.Header that can be modified by the caller to add
 12294  // headers to the request.
 12295  func (c *ProjectsLocationsTlsRoutesPatchCall) Header() http.Header {
 12296  	if c.header_ == nil {
 12297  		c.header_ = make(http.Header)
 12298  	}
 12299  	return c.header_
 12300  }
 12301  
 12302  func (c *ProjectsLocationsTlsRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
 12303  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12304  	var body io.Reader = nil
 12305  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsroute)
 12306  	if err != nil {
 12307  		return nil, err
 12308  	}
 12309  	c.urlParams_.Set("alt", alt)
 12310  	c.urlParams_.Set("prettyPrint", "false")
 12311  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}")
 12312  	urls += "?" + c.urlParams_.Encode()
 12313  	req, err := http.NewRequest("PATCH", urls, body)
 12314  	if err != nil {
 12315  		return nil, err
 12316  	}
 12317  	req.Header = reqHeaders
 12318  	googleapi.Expand(req.URL, map[string]string{
 12319  		"name": c.name,
 12320  	})
 12321  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12322  }
 12323  
 12324  // Do executes the "networkservices.projects.locations.tlsRoutes.patch" call.
 12325  // Any non-2xx status code is an error. Response headers are in either
 12326  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12327  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12328  // whether the returned error was because http.StatusNotModified was returned.
 12329  func (c *ProjectsLocationsTlsRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12330  	gensupport.SetOptions(c.urlParams_, opts...)
 12331  	res, err := c.doRequest("json")
 12332  	if res != nil && res.StatusCode == http.StatusNotModified {
 12333  		if res.Body != nil {
 12334  			res.Body.Close()
 12335  		}
 12336  		return nil, gensupport.WrapError(&googleapi.Error{
 12337  			Code:   res.StatusCode,
 12338  			Header: res.Header,
 12339  		})
 12340  	}
 12341  	if err != nil {
 12342  		return nil, err
 12343  	}
 12344  	defer googleapi.CloseBody(res)
 12345  	if err := googleapi.CheckResponse(res); err != nil {
 12346  		return nil, gensupport.WrapError(err)
 12347  	}
 12348  	ret := &Operation{
 12349  		ServerResponse: googleapi.ServerResponse{
 12350  			Header:         res.Header,
 12351  			HTTPStatusCode: res.StatusCode,
 12352  		},
 12353  	}
 12354  	target := &ret
 12355  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12356  		return nil, err
 12357  	}
 12358  	return ret, nil
 12359  }
 12360  

View as plain text