...

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

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

     1  // Copyright 2024 Google LLC.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated file. DO NOT EDIT.
     6  
     7  // Package 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/v1"
    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/v1"
    52  
    53  import (
    54  	"bytes"
    55  	"context"
    56  	"encoding/json"
    57  	"errors"
    58  	"fmt"
    59  	"io"
    60  	"net/http"
    61  	"net/url"
    62  	"strconv"
    63  	"strings"
    64  
    65  	googleapi "google.golang.org/api/googleapi"
    66  	internal "google.golang.org/api/internal"
    67  	gensupport "google.golang.org/api/internal/gensupport"
    68  	option "google.golang.org/api/option"
    69  	internaloption "google.golang.org/api/option/internaloption"
    70  	htransport "google.golang.org/api/transport/http"
    71  )
    72  
    73  // Always reference these packages, just in case the auto-generated code
    74  // below doesn't.
    75  var _ = bytes.NewBuffer
    76  var _ = strconv.Itoa
    77  var _ = fmt.Sprintf
    78  var _ = json.NewDecoder
    79  var _ = io.Copy
    80  var _ = url.Parse
    81  var _ = gensupport.MarshalJSON
    82  var _ = googleapi.Version
    83  var _ = errors.New
    84  var _ = strings.Replace
    85  var _ = context.Canceled
    86  var _ = internaloption.WithDefaultEndpoint
    87  var _ = internal.Version
    88  
    89  const apiId = "networkservices:v1"
    90  const apiName = "networkservices"
    91  const apiVersion = "v1"
    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.EdgeCacheKeysets = NewProjectsLocationsEdgeCacheKeysetsService(s)
   172  	rs.EdgeCacheOrigins = NewProjectsLocationsEdgeCacheOriginsService(s)
   173  	rs.EdgeCacheServices = NewProjectsLocationsEdgeCacheServicesService(s)
   174  	rs.EndpointPolicies = NewProjectsLocationsEndpointPoliciesService(s)
   175  	rs.Gateways = NewProjectsLocationsGatewaysService(s)
   176  	rs.GrpcRoutes = NewProjectsLocationsGrpcRoutesService(s)
   177  	rs.HttpRoutes = NewProjectsLocationsHttpRoutesService(s)
   178  	rs.LbRouteExtensions = NewProjectsLocationsLbRouteExtensionsService(s)
   179  	rs.LbTrafficExtensions = NewProjectsLocationsLbTrafficExtensionsService(s)
   180  	rs.Meshes = NewProjectsLocationsMeshesService(s)
   181  	rs.Operations = NewProjectsLocationsOperationsService(s)
   182  	rs.ServiceBindings = NewProjectsLocationsServiceBindingsService(s)
   183  	rs.ServiceLbPolicies = NewProjectsLocationsServiceLbPoliciesService(s)
   184  	rs.TcpRoutes = NewProjectsLocationsTcpRoutesService(s)
   185  	rs.TlsRoutes = NewProjectsLocationsTlsRoutesService(s)
   186  	return rs
   187  }
   188  
   189  type ProjectsLocationsService struct {
   190  	s *Service
   191  
   192  	EdgeCacheKeysets *ProjectsLocationsEdgeCacheKeysetsService
   193  
   194  	EdgeCacheOrigins *ProjectsLocationsEdgeCacheOriginsService
   195  
   196  	EdgeCacheServices *ProjectsLocationsEdgeCacheServicesService
   197  
   198  	EndpointPolicies *ProjectsLocationsEndpointPoliciesService
   199  
   200  	Gateways *ProjectsLocationsGatewaysService
   201  
   202  	GrpcRoutes *ProjectsLocationsGrpcRoutesService
   203  
   204  	HttpRoutes *ProjectsLocationsHttpRoutesService
   205  
   206  	LbRouteExtensions *ProjectsLocationsLbRouteExtensionsService
   207  
   208  	LbTrafficExtensions *ProjectsLocationsLbTrafficExtensionsService
   209  
   210  	Meshes *ProjectsLocationsMeshesService
   211  
   212  	Operations *ProjectsLocationsOperationsService
   213  
   214  	ServiceBindings *ProjectsLocationsServiceBindingsService
   215  
   216  	ServiceLbPolicies *ProjectsLocationsServiceLbPoliciesService
   217  
   218  	TcpRoutes *ProjectsLocationsTcpRoutesService
   219  
   220  	TlsRoutes *ProjectsLocationsTlsRoutesService
   221  }
   222  
   223  func NewProjectsLocationsEdgeCacheKeysetsService(s *Service) *ProjectsLocationsEdgeCacheKeysetsService {
   224  	rs := &ProjectsLocationsEdgeCacheKeysetsService{s: s}
   225  	return rs
   226  }
   227  
   228  type ProjectsLocationsEdgeCacheKeysetsService struct {
   229  	s *Service
   230  }
   231  
   232  func NewProjectsLocationsEdgeCacheOriginsService(s *Service) *ProjectsLocationsEdgeCacheOriginsService {
   233  	rs := &ProjectsLocationsEdgeCacheOriginsService{s: s}
   234  	return rs
   235  }
   236  
   237  type ProjectsLocationsEdgeCacheOriginsService struct {
   238  	s *Service
   239  }
   240  
   241  func NewProjectsLocationsEdgeCacheServicesService(s *Service) *ProjectsLocationsEdgeCacheServicesService {
   242  	rs := &ProjectsLocationsEdgeCacheServicesService{s: s}
   243  	return rs
   244  }
   245  
   246  type ProjectsLocationsEdgeCacheServicesService struct {
   247  	s *Service
   248  }
   249  
   250  func NewProjectsLocationsEndpointPoliciesService(s *Service) *ProjectsLocationsEndpointPoliciesService {
   251  	rs := &ProjectsLocationsEndpointPoliciesService{s: s}
   252  	return rs
   253  }
   254  
   255  type ProjectsLocationsEndpointPoliciesService struct {
   256  	s *Service
   257  }
   258  
   259  func NewProjectsLocationsGatewaysService(s *Service) *ProjectsLocationsGatewaysService {
   260  	rs := &ProjectsLocationsGatewaysService{s: s}
   261  	return rs
   262  }
   263  
   264  type ProjectsLocationsGatewaysService struct {
   265  	s *Service
   266  }
   267  
   268  func NewProjectsLocationsGrpcRoutesService(s *Service) *ProjectsLocationsGrpcRoutesService {
   269  	rs := &ProjectsLocationsGrpcRoutesService{s: s}
   270  	return rs
   271  }
   272  
   273  type ProjectsLocationsGrpcRoutesService struct {
   274  	s *Service
   275  }
   276  
   277  func NewProjectsLocationsHttpRoutesService(s *Service) *ProjectsLocationsHttpRoutesService {
   278  	rs := &ProjectsLocationsHttpRoutesService{s: s}
   279  	return rs
   280  }
   281  
   282  type ProjectsLocationsHttpRoutesService struct {
   283  	s *Service
   284  }
   285  
   286  func NewProjectsLocationsLbRouteExtensionsService(s *Service) *ProjectsLocationsLbRouteExtensionsService {
   287  	rs := &ProjectsLocationsLbRouteExtensionsService{s: s}
   288  	return rs
   289  }
   290  
   291  type ProjectsLocationsLbRouteExtensionsService struct {
   292  	s *Service
   293  }
   294  
   295  func NewProjectsLocationsLbTrafficExtensionsService(s *Service) *ProjectsLocationsLbTrafficExtensionsService {
   296  	rs := &ProjectsLocationsLbTrafficExtensionsService{s: s}
   297  	return rs
   298  }
   299  
   300  type ProjectsLocationsLbTrafficExtensionsService struct {
   301  	s *Service
   302  }
   303  
   304  func NewProjectsLocationsMeshesService(s *Service) *ProjectsLocationsMeshesService {
   305  	rs := &ProjectsLocationsMeshesService{s: s}
   306  	return rs
   307  }
   308  
   309  type ProjectsLocationsMeshesService struct {
   310  	s *Service
   311  }
   312  
   313  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   314  	rs := &ProjectsLocationsOperationsService{s: s}
   315  	return rs
   316  }
   317  
   318  type ProjectsLocationsOperationsService struct {
   319  	s *Service
   320  }
   321  
   322  func NewProjectsLocationsServiceBindingsService(s *Service) *ProjectsLocationsServiceBindingsService {
   323  	rs := &ProjectsLocationsServiceBindingsService{s: s}
   324  	return rs
   325  }
   326  
   327  type ProjectsLocationsServiceBindingsService struct {
   328  	s *Service
   329  }
   330  
   331  func NewProjectsLocationsServiceLbPoliciesService(s *Service) *ProjectsLocationsServiceLbPoliciesService {
   332  	rs := &ProjectsLocationsServiceLbPoliciesService{s: s}
   333  	return rs
   334  }
   335  
   336  type ProjectsLocationsServiceLbPoliciesService struct {
   337  	s *Service
   338  }
   339  
   340  func NewProjectsLocationsTcpRoutesService(s *Service) *ProjectsLocationsTcpRoutesService {
   341  	rs := &ProjectsLocationsTcpRoutesService{s: s}
   342  	return rs
   343  }
   344  
   345  type ProjectsLocationsTcpRoutesService struct {
   346  	s *Service
   347  }
   348  
   349  func NewProjectsLocationsTlsRoutesService(s *Service) *ProjectsLocationsTlsRoutesService {
   350  	rs := &ProjectsLocationsTlsRoutesService{s: s}
   351  	return rs
   352  }
   353  
   354  type ProjectsLocationsTlsRoutesService struct {
   355  	s *Service
   356  }
   357  
   358  // AuditConfig: Specifies the audit configuration for a service. The
   359  // configuration determines which permission types are logged, and what
   360  // identities, if any, are exempted from logging. An AuditConfig must have one
   361  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   362  // and a specific service, the union of the two AuditConfigs is used for that
   363  // service: the log_types specified in each AuditConfig are enabled, and the
   364  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   365  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   366  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   367  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   368  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   369  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   370  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   371  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   372  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   373  // `aliya@example.com` from DATA_WRITE logging.
   374  type AuditConfig struct {
   375  	// AuditLogConfigs: The configuration for logging of each type of permission.
   376  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   377  	// Service: Specifies a service that will be enabled for audit logging. For
   378  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   379  	// is a special value that covers all services.
   380  	Service string `json:"service,omitempty"`
   381  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   382  	// unconditionally include in API requests. By default, fields with empty or
   383  	// default values are omitted from API requests. See
   384  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   385  	// details.
   386  	ForceSendFields []string `json:"-"`
   387  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   388  	// API requests with the JSON null value. By default, fields with empty values
   389  	// are omitted from API requests. See
   390  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   391  	NullFields []string `json:"-"`
   392  }
   393  
   394  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   395  	type NoMethod AuditConfig
   396  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   397  }
   398  
   399  // AuditLogConfig: Provides the configuration for logging a type of
   400  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   401  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   402  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   403  // exempting jose@example.com from DATA_READ logging.
   404  type AuditLogConfig struct {
   405  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   406  	// type of permission. Follows the same format of Binding.members.
   407  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   408  	// LogType: The log type that this config enables.
   409  	//
   410  	// Possible values:
   411  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   412  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   413  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   414  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   415  	LogType string `json:"logType,omitempty"`
   416  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   417  	// unconditionally include in API requests. By default, fields with empty or
   418  	// default values are omitted from API requests. See
   419  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   420  	// details.
   421  	ForceSendFields []string `json:"-"`
   422  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   423  	// API requests with the JSON null value. By default, fields with empty values
   424  	// are omitted from API requests. See
   425  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   426  	NullFields []string `json:"-"`
   427  }
   428  
   429  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   430  	type NoMethod AuditLogConfig
   431  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   432  }
   433  
   434  // Binding: Associates `members`, or principals, with a `role`.
   435  type Binding struct {
   436  	// Condition: The condition that is associated with this binding. If the
   437  	// condition evaluates to `true`, then this binding applies to the current
   438  	// request. If the condition evaluates to `false`, then this binding does not
   439  	// apply to the current request. However, a different role binding might grant
   440  	// the same role to one or more of the principals in this binding. To learn
   441  	// which resources support conditions in their IAM policies, see the IAM
   442  	// documentation
   443  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   444  	Condition *Expr `json:"condition,omitempty"`
   445  	// Members: Specifies the principals requesting access for a Google Cloud
   446  	// resource. `members` can have the following values: * `allUsers`: A special
   447  	// identifier that represents anyone who is on the internet; with or without a
   448  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   449  	// represents anyone who is authenticated with a Google account or a service
   450  	// account. Does not include identities that come from external identity
   451  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   452  	// address that represents a specific Google account. For example,
   453  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   454  	// represents a Google service account. For example,
   455  	// `my-other-app@appspot.gserviceaccount.com`. *
   456  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   457  	// identifier for a Kubernetes service account
   458  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   459  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   460  	// `group:{emailid}`: An email address that represents a Google group. For
   461  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   462  	// (primary) that represents all the users of that domain. For example,
   463  	// `google.com` or `example.com`. *
   464  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   465  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   466  	// pool. *
   467  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   468  	// group/{group_id}`: All workforce identities in a group. *
   469  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   470  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   471  	// a specific attribute value. *
   472  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   473  	// *`: All identities in a workforce identity pool. *
   474  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   475  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   476  	// identity in a workload identity pool. *
   477  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   478  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   479  	// group. *
   480  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   481  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   482  	// `: All identities in a workload identity pool with a certain attribute. *
   483  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   484  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   485  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   486  	// unique identifier) representing a user that has been recently deleted. For
   487  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   488  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   489  	// retains the role in the binding. *
   490  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   491  	// unique identifier) representing a service account that has been recently
   492  	// deleted. For example,
   493  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   494  	// service account is undeleted, this value reverts to
   495  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   496  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   497  	// address (plus unique identifier) representing a Google group that has been
   498  	// recently deleted. For example,
   499  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   500  	// this value reverts to `group:{emailid}` and the recovered group retains the
   501  	// role in the binding. *
   502  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   503  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   504  	// workforce identity pool. For example,
   505  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   506  	// ol-id/subject/my-subject-attribute-value`.
   507  	Members []string `json:"members,omitempty"`
   508  	// Role: Role that is assigned to the list of `members`, or principals. For
   509  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   510  	// of the IAM roles and permissions, see the IAM documentation
   511  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   512  	// available pre-defined roles, see here
   513  	// (https://cloud.google.com/iam/docs/understanding-roles).
   514  	Role string `json:"role,omitempty"`
   515  	// ForceSendFields is a list of field names (e.g. "Condition") to
   516  	// unconditionally include in API requests. By default, fields with empty or
   517  	// default values are omitted from API requests. See
   518  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   519  	// details.
   520  	ForceSendFields []string `json:"-"`
   521  	// NullFields is a list of field names (e.g. "Condition") to include in API
   522  	// requests with the JSON null value. By default, fields with empty values are
   523  	// omitted from API requests. See
   524  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   525  	NullFields []string `json:"-"`
   526  }
   527  
   528  func (s *Binding) MarshalJSON() ([]byte, error) {
   529  	type NoMethod Binding
   530  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   531  }
   532  
   533  // CancelOperationRequest: The request message for Operations.CancelOperation.
   534  type CancelOperationRequest struct {
   535  }
   536  
   537  // Empty: A generic empty message that you can re-use to avoid defining
   538  // duplicated empty messages in your APIs. A typical example is to use it as
   539  // the request or the response type of an API method. For instance: service Foo
   540  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   541  type Empty struct {
   542  	// ServerResponse contains the HTTP response code and headers from the server.
   543  	googleapi.ServerResponse `json:"-"`
   544  }
   545  
   546  // EndpointMatcher: A definition of a matcher that selects endpoints to which
   547  // the policies should be applied.
   548  type EndpointMatcher struct {
   549  	// MetadataLabelMatcher: The matcher is based on node metadata presented by xDS
   550  	// clients.
   551  	MetadataLabelMatcher *EndpointMatcherMetadataLabelMatcher `json:"metadataLabelMatcher,omitempty"`
   552  	// ForceSendFields is a list of field names (e.g. "MetadataLabelMatcher") to
   553  	// unconditionally include in API requests. By default, fields with empty or
   554  	// default values are omitted from API requests. See
   555  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   556  	// details.
   557  	ForceSendFields []string `json:"-"`
   558  	// NullFields is a list of field names (e.g. "MetadataLabelMatcher") to include
   559  	// in API requests with the JSON null value. By default, fields with empty
   560  	// values are omitted from API requests. See
   561  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   562  	NullFields []string `json:"-"`
   563  }
   564  
   565  func (s *EndpointMatcher) MarshalJSON() ([]byte, error) {
   566  	type NoMethod EndpointMatcher
   567  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   568  }
   569  
   570  // EndpointMatcherMetadataLabelMatcher: The matcher that is based on node
   571  // metadata presented by xDS clients.
   572  type EndpointMatcherMetadataLabelMatcher struct {
   573  	// MetadataLabelMatchCriteria: Specifies how matching should be done. Supported
   574  	// values are: MATCH_ANY: At least one of the Labels specified in the matcher
   575  	// should match the metadata presented by xDS client. MATCH_ALL: The metadata
   576  	// presented by the xDS client should contain all of the labels specified here.
   577  	// The selection is determined based on the best match. For example, suppose
   578  	// there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the
   579  	// matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client
   580  	// with label connects, the config from P1 will be selected. If a client with
   581  	// label connects, the config from P2 will be selected. If a client with label
   582  	// connects, the config from P3 will be selected. If there is more than one
   583  	// best match, (for example, if a config P4 with selector exists and if a
   584  	// client with label connects), pick up the one with older creation time.
   585  	//
   586  	// Possible values:
   587  	//   "METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED" - Default value. Should not be
   588  	// used.
   589  	//   "MATCH_ANY" - At least one of the Labels specified in the matcher should
   590  	// match the metadata presented by xDS client.
   591  	//   "MATCH_ALL" - The metadata presented by the xDS client should contain all
   592  	// of the labels specified here.
   593  	MetadataLabelMatchCriteria string `json:"metadataLabelMatchCriteria,omitempty"`
   594  	// MetadataLabels: The list of label value pairs that must match labels in the
   595  	// provided metadata based on filterMatchCriteria This list can have at most 64
   596  	// entries. The list can be empty if the match criteria is MATCH_ANY, to
   597  	// specify a wildcard match (i.e this matches any client).
   598  	MetadataLabels []*EndpointMatcherMetadataLabelMatcherMetadataLabels `json:"metadataLabels,omitempty"`
   599  	// ForceSendFields is a list of field names (e.g. "MetadataLabelMatchCriteria")
   600  	// to unconditionally include in API requests. By default, fields with empty or
   601  	// default values are omitted from API requests. See
   602  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   603  	// details.
   604  	ForceSendFields []string `json:"-"`
   605  	// NullFields is a list of field names (e.g. "MetadataLabelMatchCriteria") to
   606  	// include in API requests with the JSON null value. By default, fields with
   607  	// empty values are omitted from API requests. See
   608  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   609  	NullFields []string `json:"-"`
   610  }
   611  
   612  func (s *EndpointMatcherMetadataLabelMatcher) MarshalJSON() ([]byte, error) {
   613  	type NoMethod EndpointMatcherMetadataLabelMatcher
   614  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   615  }
   616  
   617  // EndpointMatcherMetadataLabelMatcherMetadataLabels: Defines a name-pair value
   618  // for a single label.
   619  type EndpointMatcherMetadataLabelMatcherMetadataLabels struct {
   620  	// LabelName: Required. Label name presented as key in xDS Node Metadata.
   621  	LabelName string `json:"labelName,omitempty"`
   622  	// LabelValue: Required. Label value presented as value corresponding to the
   623  	// above key, in xDS Node Metadata.
   624  	LabelValue string `json:"labelValue,omitempty"`
   625  	// ForceSendFields is a list of field names (e.g. "LabelName") to
   626  	// unconditionally include in API requests. By default, fields with empty or
   627  	// default values are omitted from API requests. See
   628  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   629  	// details.
   630  	ForceSendFields []string `json:"-"`
   631  	// NullFields is a list of field names (e.g. "LabelName") to include in API
   632  	// requests with the JSON null value. By default, fields with empty values are
   633  	// omitted from API requests. See
   634  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   635  	NullFields []string `json:"-"`
   636  }
   637  
   638  func (s *EndpointMatcherMetadataLabelMatcherMetadataLabels) MarshalJSON() ([]byte, error) {
   639  	type NoMethod EndpointMatcherMetadataLabelMatcherMetadataLabels
   640  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   641  }
   642  
   643  // EndpointPolicy: EndpointPolicy is a resource that helps apply desired
   644  // configuration on the endpoints that match specific criteria. For example,
   645  // this resource can be used to apply "authentication config" an all endpoints
   646  // that serve on port 8080.
   647  type EndpointPolicy struct {
   648  	// AuthorizationPolicy: Optional. This field specifies the URL of
   649  	// AuthorizationPolicy resource that applies authorization policies to the
   650  	// inbound traffic at the matched endpoints. Refer to Authorization. If this
   651  	// field is not specified, authorization is disabled(no authz checks) for this
   652  	// endpoint.
   653  	AuthorizationPolicy string `json:"authorizationPolicy,omitempty"`
   654  	// ClientTlsPolicy: Optional. A URL referring to a ClientTlsPolicy resource.
   655  	// ClientTlsPolicy can be set to specify the authentication for traffic from
   656  	// the proxy to the actual endpoints. More specifically, it is applied to the
   657  	// outgoing traffic from the proxy to the endpoint. This is typically used for
   658  	// sidecar model where the proxy identifies itself as endpoint to the control
   659  	// plane, with the connection between sidecar and endpoint requiring
   660  	// authentication. If this field is not set, authentication is disabled(open).
   661  	// Applicable only when EndpointPolicyType is SIDECAR_PROXY.
   662  	ClientTlsPolicy string `json:"clientTlsPolicy,omitempty"`
   663  	// CreateTime: Output only. The timestamp when the resource was created.
   664  	CreateTime string `json:"createTime,omitempty"`
   665  	// Description: Optional. A free-text description of the resource. Max length
   666  	// 1024 characters.
   667  	Description string `json:"description,omitempty"`
   668  	// EndpointMatcher: Required. A matcher that selects endpoints to which the
   669  	// policies should be applied.
   670  	EndpointMatcher *EndpointMatcher `json:"endpointMatcher,omitempty"`
   671  	// Labels: Optional. Set of label tags associated with the EndpointPolicy
   672  	// resource.
   673  	Labels map[string]string `json:"labels,omitempty"`
   674  	// Name: Required. Name of the EndpointPolicy resource. It matches pattern
   675  	// `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
   676  	Name string `json:"name,omitempty"`
   677  	// ServerTlsPolicy: Optional. A URL referring to ServerTlsPolicy resource.
   678  	// ServerTlsPolicy is used to determine the authentication policy to be applied
   679  	// to terminate the inbound traffic at the identified backends. If this field
   680  	// is not set, authentication is disabled(open) for this endpoint.
   681  	ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"`
   682  	// TrafficPortSelector: Optional. Port selector for the (matched) endpoints. If
   683  	// no port selector is provided, the matched config is applied to all ports.
   684  	TrafficPortSelector *TrafficPortSelector `json:"trafficPortSelector,omitempty"`
   685  	// Type: Required. The type of endpoint policy. This is primarily used to
   686  	// validate the configuration.
   687  	//
   688  	// Possible values:
   689  	//   "ENDPOINT_POLICY_TYPE_UNSPECIFIED" - Default value. Must not be used.
   690  	//   "SIDECAR_PROXY" - Represents a proxy deployed as a sidecar.
   691  	//   "GRPC_SERVER" - Represents a proxyless gRPC backend.
   692  	Type string `json:"type,omitempty"`
   693  	// UpdateTime: Output only. The timestamp when the resource was updated.
   694  	UpdateTime string `json:"updateTime,omitempty"`
   695  
   696  	// ServerResponse contains the HTTP response code and headers from the server.
   697  	googleapi.ServerResponse `json:"-"`
   698  	// ForceSendFields is a list of field names (e.g. "AuthorizationPolicy") to
   699  	// unconditionally include in API requests. By default, fields with empty or
   700  	// default values are omitted from API requests. See
   701  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   702  	// details.
   703  	ForceSendFields []string `json:"-"`
   704  	// NullFields is a list of field names (e.g. "AuthorizationPolicy") to include
   705  	// in API requests with the JSON null value. By default, fields with empty
   706  	// values are omitted from API requests. See
   707  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   708  	NullFields []string `json:"-"`
   709  }
   710  
   711  func (s *EndpointPolicy) MarshalJSON() ([]byte, error) {
   712  	type NoMethod EndpointPolicy
   713  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   714  }
   715  
   716  // Expr: Represents a textual expression in the Common Expression Language
   717  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   718  // of CEL are documented at https://github.com/google/cel-spec. Example
   719  // (Comparison): title: "Summary size limit" description: "Determines if a
   720  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   721  // Example (Equality): title: "Requestor is owner" description: "Determines if
   722  // requestor is the document owner" expression: "document.owner ==
   723  // request.auth.claims.email" Example (Logic): title: "Public documents"
   724  // description: "Determine whether the document should be publicly visible"
   725  // expression: "document.type != 'private' && document.type != 'internal'"
   726  // Example (Data Manipulation): title: "Notification string" description:
   727  // "Create a notification string with a timestamp." expression: "'New message
   728  // received at ' + string(document.create_time)" The exact variables and
   729  // functions that may be referenced within an expression are determined by the
   730  // service that evaluates it. See the service documentation for additional
   731  // information.
   732  type Expr struct {
   733  	// Description: Optional. Description of the expression. This is a longer text
   734  	// which describes the expression, e.g. when hovered over it in a UI.
   735  	Description string `json:"description,omitempty"`
   736  	// Expression: Textual representation of an expression in Common Expression
   737  	// Language syntax.
   738  	Expression string `json:"expression,omitempty"`
   739  	// Location: Optional. String indicating the location of the expression for
   740  	// error reporting, e.g. a file name and a position in the file.
   741  	Location string `json:"location,omitempty"`
   742  	// Title: Optional. Title for the expression, i.e. a short string describing
   743  	// its purpose. This can be used e.g. in UIs which allow to enter the
   744  	// expression.
   745  	Title string `json:"title,omitempty"`
   746  	// ForceSendFields is a list of field names (e.g. "Description") to
   747  	// unconditionally include in API requests. By default, fields with empty or
   748  	// default values are omitted from API requests. See
   749  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   750  	// details.
   751  	ForceSendFields []string `json:"-"`
   752  	// NullFields is a list of field names (e.g. "Description") to include in API
   753  	// requests with the JSON null value. By default, fields with empty values are
   754  	// omitted from API requests. See
   755  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   756  	NullFields []string `json:"-"`
   757  }
   758  
   759  func (s *Expr) MarshalJSON() ([]byte, error) {
   760  	type NoMethod Expr
   761  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   762  }
   763  
   764  // ExtensionChain: A single extension chain wrapper that contains the match
   765  // conditions and extensions to execute.
   766  type ExtensionChain struct {
   767  	// Extensions: Required. A set of extensions to execute for the matching
   768  	// request. At least one extension is required. Up to 3 extensions can be
   769  	// defined for each extension chain for `LbTrafficExtension` resource.
   770  	// `LbRouteExtension` chains are limited to 1 extension per extension chain.
   771  	Extensions []*ExtensionChainExtension `json:"extensions,omitempty"`
   772  	// MatchCondition: Required. Conditions under which this chain is invoked for a
   773  	// request.
   774  	MatchCondition *ExtensionChainMatchCondition `json:"matchCondition,omitempty"`
   775  	// Name: Required. The name for this extension chain. The name is logged as
   776  	// part of the HTTP request logs. The name must conform with RFC-1034, is
   777  	// restricted to lower-cased letters, numbers and hyphens, and can have a
   778  	// maximum length of 63 characters. Additionally, the first character must be a
   779  	// letter and the last a letter or a number.
   780  	Name string `json:"name,omitempty"`
   781  	// ForceSendFields is a list of field names (e.g. "Extensions") to
   782  	// unconditionally include in API requests. By default, fields with empty or
   783  	// default values are omitted from API requests. See
   784  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   785  	// details.
   786  	ForceSendFields []string `json:"-"`
   787  	// NullFields is a list of field names (e.g. "Extensions") to include in API
   788  	// requests with the JSON null value. By default, fields with empty values are
   789  	// omitted from API requests. See
   790  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   791  	NullFields []string `json:"-"`
   792  }
   793  
   794  func (s *ExtensionChain) MarshalJSON() ([]byte, error) {
   795  	type NoMethod ExtensionChain
   796  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   797  }
   798  
   799  // ExtensionChainExtension: A single extension in the chain to execute for the
   800  // matching request.
   801  type ExtensionChainExtension struct {
   802  	// Authority: Optional. The `:authority` header in the gRPC request sent from
   803  	// Envoy to the extension service. Required for Callout extensions.
   804  	Authority string `json:"authority,omitempty"`
   805  	// FailOpen: Optional. Determines how the proxy behaves if the call to the
   806  	// extension fails or times out. When set to `TRUE`, request or response
   807  	// processing continues without error. Any subsequent extensions in the
   808  	// extension chain are also executed. When set to `FALSE` or the default
   809  	// setting of `FALSE` is used, one of the following happens: * If response
   810  	// headers have not been delivered to the downstream client, a generic 500
   811  	// error is returned to the client. The error response can be tailored by
   812  	// configuring a custom error response in the load balancer. * If response
   813  	// headers have been delivered, then the HTTP stream to the downstream client
   814  	// is reset.
   815  	FailOpen bool `json:"failOpen,omitempty"`
   816  	// ForwardHeaders: Optional. List of the HTTP headers to forward to the
   817  	// extension (from the client or backend). If omitted, all headers are sent.
   818  	// Each element is a string indicating the header name.
   819  	ForwardHeaders []string `json:"forwardHeaders,omitempty"`
   820  	// Name: Required. The name for this extension. The name is logged as part of
   821  	// the HTTP request logs. The name must conform with RFC-1034, is restricted to
   822  	// lower-cased letters, numbers and hyphens, and can have a maximum length of
   823  	// 63 characters. Additionally, the first character must be a letter and the
   824  	// last a letter or a number.
   825  	Name string `json:"name,omitempty"`
   826  	// Service: Required. The reference to the service that runs the extension.
   827  	// Currently only callout extensions are supported here. To configure a callout
   828  	// extension, `service` must be a fully-qualified reference to a backend
   829  	// service
   830  	// (https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in
   831  	// the format:
   832  	// `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/ba
   833  	// ckendServices/{backendService}` or
   834  	// `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServi
   835  	// ces/{backendService}`.
   836  	Service string `json:"service,omitempty"`
   837  	// SupportedEvents: Optional. A set of events during request or response
   838  	// processing for which this extension is called. This field is required for
   839  	// the `LbTrafficExtension` resource. It's not relevant for the
   840  	// `LbRouteExtension` resource.
   841  	//
   842  	// Possible values:
   843  	//   "EVENT_TYPE_UNSPECIFIED" - Unspecified value. Do not use.
   844  	//   "REQUEST_HEADERS" - If included in `supported_events`, the extension is
   845  	// called when the HTTP request headers arrive.
   846  	//   "REQUEST_BODY" - If included in `supported_events`, the extension is
   847  	// called when the HTTP request body arrives.
   848  	//   "RESPONSE_HEADERS" - If included in `supported_events`, the extension is
   849  	// called when the HTTP response headers arrive.
   850  	//   "RESPONSE_BODY" - If included in `supported_events`, the extension is
   851  	// called when the HTTP response body arrives.
   852  	//   "REQUEST_TRAILERS" - If included in `supported_events`, the extension is
   853  	// called when the HTTP request trailers arrives.
   854  	//   "RESPONSE_TRAILERS" - If included in `supported_events`, the extension is
   855  	// called when the HTTP response trailers arrives.
   856  	SupportedEvents []string `json:"supportedEvents,omitempty"`
   857  	// Timeout: Optional. Specifies the timeout for each individual message on the
   858  	// stream. The timeout must be between 10-1000 milliseconds. Required for
   859  	// Callout extensions.
   860  	Timeout string `json:"timeout,omitempty"`
   861  	// ForceSendFields is a list of field names (e.g. "Authority") to
   862  	// unconditionally include in API requests. By default, fields with empty or
   863  	// default values are omitted from API requests. See
   864  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   865  	// details.
   866  	ForceSendFields []string `json:"-"`
   867  	// NullFields is a list of field names (e.g. "Authority") to include in API
   868  	// requests with the JSON null value. By default, fields with empty values are
   869  	// omitted from API requests. See
   870  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   871  	NullFields []string `json:"-"`
   872  }
   873  
   874  func (s *ExtensionChainExtension) MarshalJSON() ([]byte, error) {
   875  	type NoMethod ExtensionChainExtension
   876  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   877  }
   878  
   879  // ExtensionChainMatchCondition: Conditions under which this chain is invoked
   880  // for a request.
   881  type ExtensionChainMatchCondition struct {
   882  	// CelExpression: Required. A Common Expression Language (CEL) expression that
   883  	// is used to match requests for which the extension chain is executed. For
   884  	// more information, see CEL matcher language reference
   885  	// (https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).
   886  	CelExpression string `json:"celExpression,omitempty"`
   887  	// ForceSendFields is a list of field names (e.g. "CelExpression") to
   888  	// unconditionally include in API requests. By default, fields with empty or
   889  	// default values are omitted from API requests. See
   890  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   891  	// details.
   892  	ForceSendFields []string `json:"-"`
   893  	// NullFields is a list of field names (e.g. "CelExpression") to include in API
   894  	// requests with the JSON null value. By default, fields with empty values are
   895  	// omitted from API requests. See
   896  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   897  	NullFields []string `json:"-"`
   898  }
   899  
   900  func (s *ExtensionChainMatchCondition) MarshalJSON() ([]byte, error) {
   901  	type NoMethod ExtensionChainMatchCondition
   902  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   903  }
   904  
   905  // Gateway: Gateway represents the configuration for a proxy, typically a load
   906  // balancer. It captures the ip:port over which the services are exposed by the
   907  // proxy, along with any policy configurations. Routes have reference to to
   908  // Gateways to dictate how requests should be routed by this Gateway. Next id:
   909  // 33
   910  type Gateway struct {
   911  	// Addresses: Optional. Zero or one IPv4 or IPv6 address on which the Gateway
   912  	// will receive the traffic. When no address is provided, an IP from the
   913  	// subnetwork is allocated This field only applies to gateways of type
   914  	// 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for
   915  	// IPv4 and :: for IPv6.
   916  	Addresses []string `json:"addresses,omitempty"`
   917  	// CertificateUrls: Optional. A fully-qualified Certificates URL reference. The
   918  	// proxy presents a Certificate (selected based on SNI) when establishing a TLS
   919  	// connection. This feature only applies to gateways of type
   920  	// 'SECURE_WEB_GATEWAY'.
   921  	CertificateUrls []string `json:"certificateUrls,omitempty"`
   922  	// CreateTime: Output only. The timestamp when the resource was created.
   923  	CreateTime string `json:"createTime,omitempty"`
   924  	// Description: Optional. A free-text description of the resource. Max length
   925  	// 1024 characters.
   926  	Description string `json:"description,omitempty"`
   927  	// EnvoyHeaders: Optional. Determines if envoy will insert internal debug
   928  	// headers into upstream requests. Other Envoy headers may still be injected.
   929  	// By default, envoy will not insert any debug headers.
   930  	//
   931  	// Possible values:
   932  	//   "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE.
   933  	//   "NONE" - Suppress envoy debug headers.
   934  	//   "DEBUG_HEADERS" - Envoy will insert default internal debug headers into
   935  	// upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry
   936  	// x-envoy-expected-rq-timeout-ms x-envoy-original-path
   937  	// x-envoy-upstream-stream-duration-ms
   938  	EnvoyHeaders string `json:"envoyHeaders,omitempty"`
   939  	// GatewaySecurityPolicy: Optional. A fully-qualified GatewaySecurityPolicy URL
   940  	// reference. Defines how a server should apply security policy to inbound (VM
   941  	// to Proxy) initiated connections. For example:
   942  	// `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is
   943  	// specific to gateways of type 'SECURE_WEB_GATEWAY'.
   944  	GatewaySecurityPolicy string `json:"gatewaySecurityPolicy,omitempty"`
   945  	// IpVersion: Optional. The IP Version that will be used by this gateway. Valid
   946  	// options are IPV4 or IPV6. Default is IPV4.
   947  	//
   948  	// Possible values:
   949  	//   "IP_VERSION_UNSPECIFIED" - The type when IP version is not specified.
   950  	// Defaults to IPV4.
   951  	//   "IPV4" - The type for IP version 4.
   952  	//   "IPV6" - The type for IP version 6.
   953  	IpVersion string `json:"ipVersion,omitempty"`
   954  	// Labels: Optional. Set of label tags associated with the Gateway resource.
   955  	Labels map[string]string `json:"labels,omitempty"`
   956  	// Name: Required. Name of the Gateway resource. It matches pattern
   957  	// `projects/*/locations/*/gateways/`.
   958  	Name string `json:"name,omitempty"`
   959  	// Network: Optional. The relative resource name identifying the VPC network
   960  	// that is using this configuration. For example:
   961  	// `projects/*/global/networks/network-1`. Currently, this field is specific to
   962  	// gateways of type 'SECURE_WEB_GATEWAY'.
   963  	Network string `json:"network,omitempty"`
   964  	// Ports: Required. One or more port numbers (1-65535), on which the Gateway
   965  	// will receive traffic. The proxy binds to the specified ports. Gateways of
   966  	// type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type
   967  	// 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple
   968  	// ports.
   969  	Ports []int64 `json:"ports,omitempty"`
   970  	// Scope: Optional. Scope determines how configuration across multiple Gateway
   971  	// instances are merged. The configuration for multiple Gateway instances with
   972  	// the same scope will be merged as presented as a single coniguration to the
   973  	// proxy/load balancer. Max length 64 characters. Scope should start with a
   974  	// letter and can only have letters, numbers, hyphens.
   975  	Scope string `json:"scope,omitempty"`
   976  	// SelfLink: Output only. Server-defined URL of this resource
   977  	SelfLink string `json:"selfLink,omitempty"`
   978  	// ServerTlsPolicy: Optional. A fully-qualified ServerTLSPolicy URL reference.
   979  	// Specifies how TLS traffic is terminated. If empty, TLS termination is
   980  	// disabled.
   981  	ServerTlsPolicy string `json:"serverTlsPolicy,omitempty"`
   982  	// Subnetwork: Optional. The relative resource name identifying the subnetwork
   983  	// in which this SWG is allocated. For example:
   984  	// `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field
   985  	// is specific to gateways of type 'SECURE_WEB_GATEWAY".
   986  	Subnetwork string `json:"subnetwork,omitempty"`
   987  	// Type: Immutable. The type of the customer managed gateway. This field is
   988  	// required. If unspecified, an error is returned.
   989  	//
   990  	// Possible values:
   991  	//   "TYPE_UNSPECIFIED" - The type of the customer managed gateway is
   992  	// unspecified.
   993  	//   "OPEN_MESH" - The type of the customer managed gateway is TrafficDirector
   994  	// Open Mesh.
   995  	//   "SECURE_WEB_GATEWAY" - The type of the customer managed gateway is
   996  	// SecureWebGateway (SWG).
   997  	Type string `json:"type,omitempty"`
   998  	// UpdateTime: Output only. The timestamp when the resource was updated.
   999  	UpdateTime string `json:"updateTime,omitempty"`
  1000  
  1001  	// ServerResponse contains the HTTP response code and headers from the server.
  1002  	googleapi.ServerResponse `json:"-"`
  1003  	// ForceSendFields is a list of field names (e.g. "Addresses") to
  1004  	// unconditionally include in API requests. By default, fields with empty or
  1005  	// default values are omitted from API requests. See
  1006  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1007  	// details.
  1008  	ForceSendFields []string `json:"-"`
  1009  	// NullFields is a list of field names (e.g. "Addresses") to include in API
  1010  	// requests with the JSON null value. By default, fields with empty values are
  1011  	// omitted from API requests. See
  1012  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1013  	NullFields []string `json:"-"`
  1014  }
  1015  
  1016  func (s *Gateway) MarshalJSON() ([]byte, error) {
  1017  	type NoMethod Gateway
  1018  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1019  }
  1020  
  1021  // GrpcRoute: GrpcRoute is the resource defining how gRPC traffic routed by a
  1022  // Mesh or Gateway resource is routed.
  1023  type GrpcRoute struct {
  1024  	// CreateTime: Output only. The timestamp when the resource was created.
  1025  	CreateTime string `json:"createTime,omitempty"`
  1026  	// Description: Optional. A free-text description of the resource. Max length
  1027  	// 1024 characters.
  1028  	Description string `json:"description,omitempty"`
  1029  	// Gateways: Optional. Gateways defines a list of gateways this GrpcRoute is
  1030  	// attached to, as one of the routing rules to route the requests served by the
  1031  	// gateway. Each gateway reference should match the pattern:
  1032  	// `projects/*/locations/global/gateways/`
  1033  	Gateways []string `json:"gateways,omitempty"`
  1034  	// Hostnames: Required. Service hostnames with an optional port for which this
  1035  	// route describes traffic. Format: [:] Hostname is the fully qualified domain
  1036  	// name of a network host. This matches the RFC 1123 definition of a hostname
  1037  	// with 2 notable exceptions: - IPs are not allowed. - A hostname may be
  1038  	// prefixed with a wildcard label (`*.`). The wildcard label must appear by
  1039  	// itself as the first label. Hostname can be "precise" which is a domain name
  1040  	// without the terminating dot of a network host (e.g. `foo.example.com`) or
  1041  	// "wildcard", which is a domain name prefixed with a single wildcard label
  1042  	// (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must
  1043  	// consist of lower case alphanumeric characters or '-', and must start and end
  1044  	// with an alphanumeric character. No other punctuation is allowed. The routes
  1045  	// associated with a Mesh or Gateway must have unique hostnames. If you attempt
  1046  	// to attach multiple routes with conflicting hostnames, the configuration will
  1047  	// be rejected. For example, while it is acceptable for routes for the
  1048  	// hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same
  1049  	// route, it is not possible to associate two routes both with `*.bar.com` or
  1050  	// both with `bar.com`. If a port is specified, then gRPC clients must use the
  1051  	// channel URI with the port to match this rule (i.e. "xds:///service:123"),
  1052  	// otherwise they must supply the URI without a port (i.e. "xds:///service").
  1053  	Hostnames []string `json:"hostnames,omitempty"`
  1054  	// Labels: Optional. Set of label tags associated with the GrpcRoute resource.
  1055  	Labels map[string]string `json:"labels,omitempty"`
  1056  	// Meshes: Optional. Meshes defines a list of meshes this GrpcRoute is attached
  1057  	// to, as one of the routing rules to route the requests served by the mesh.
  1058  	// Each mesh reference should match the pattern:
  1059  	// `projects/*/locations/global/meshes/`
  1060  	Meshes []string `json:"meshes,omitempty"`
  1061  	// Name: Required. Name of the GrpcRoute resource. It matches pattern
  1062  	// `projects/*/locations/global/grpcRoutes/`
  1063  	Name string `json:"name,omitempty"`
  1064  	// Rules: Required. A list of detailed rules defining how to route traffic.
  1065  	// Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the
  1066  	// first matching GrpcRoute.RouteRule will be executed. At least one rule must
  1067  	// be supplied.
  1068  	Rules []*GrpcRouteRouteRule `json:"rules,omitempty"`
  1069  	// SelfLink: Output only. Server-defined URL of this resource
  1070  	SelfLink string `json:"selfLink,omitempty"`
  1071  	// UpdateTime: Output only. The timestamp when the resource was updated.
  1072  	UpdateTime string `json:"updateTime,omitempty"`
  1073  
  1074  	// ServerResponse contains the HTTP response code and headers from the server.
  1075  	googleapi.ServerResponse `json:"-"`
  1076  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1077  	// unconditionally include in API requests. By default, fields with empty or
  1078  	// default values are omitted from API requests. See
  1079  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1080  	// details.
  1081  	ForceSendFields []string `json:"-"`
  1082  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1083  	// requests with the JSON null value. By default, fields with empty values are
  1084  	// omitted from API requests. See
  1085  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1086  	NullFields []string `json:"-"`
  1087  }
  1088  
  1089  func (s *GrpcRoute) MarshalJSON() ([]byte, error) {
  1090  	type NoMethod GrpcRoute
  1091  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1092  }
  1093  
  1094  // GrpcRouteDestination: The destination to which traffic will be routed.
  1095  type GrpcRouteDestination struct {
  1096  	// ServiceName: Required. The URL of a destination service to which to route
  1097  	// traffic. Must refer to either a BackendService or ServiceDirectoryService.
  1098  	ServiceName string `json:"serviceName,omitempty"`
  1099  	// Weight: Optional. Specifies the proportion of requests forwarded to the
  1100  	// backend referenced by the serviceName field. This is computed as: -
  1101  	// weight/Sum(weights in this destination list). For non-zero values, there may
  1102  	// be some epsilon from the exact proportion defined here depending on the
  1103  	// precision an implementation supports. If only one serviceName is specified
  1104  	// and it has a weight greater than 0, 100% of the traffic is forwarded to that
  1105  	// backend. If weights are specified for any one service name, they need to be
  1106  	// specified for all of them. If weights are unspecified for all services,
  1107  	// then, traffic is distributed in equal proportions to all of them.
  1108  	Weight int64 `json:"weight,omitempty"`
  1109  	// ForceSendFields is a list of field names (e.g. "ServiceName") to
  1110  	// unconditionally include in API requests. By default, fields with empty or
  1111  	// default values are omitted from API requests. See
  1112  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1113  	// details.
  1114  	ForceSendFields []string `json:"-"`
  1115  	// NullFields is a list of field names (e.g. "ServiceName") to include in API
  1116  	// requests with the JSON null value. By default, fields with empty values are
  1117  	// omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1119  	NullFields []string `json:"-"`
  1120  }
  1121  
  1122  func (s *GrpcRouteDestination) MarshalJSON() ([]byte, error) {
  1123  	type NoMethod GrpcRouteDestination
  1124  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1125  }
  1126  
  1127  // GrpcRouteFaultInjectionPolicy: The specification for fault injection
  1128  // introduced into traffic to test the resiliency of clients to destination
  1129  // service failure. As part of fault injection, when clients send requests to a
  1130  // destination, delays can be introduced on a percentage of requests before
  1131  // sending those requests to the destination service. Similarly requests from
  1132  // clients can be aborted by for a percentage of requests.
  1133  type GrpcRouteFaultInjectionPolicy struct {
  1134  	// Abort: The specification for aborting to client requests.
  1135  	Abort *GrpcRouteFaultInjectionPolicyAbort `json:"abort,omitempty"`
  1136  	// Delay: The specification for injecting delay to client requests.
  1137  	Delay *GrpcRouteFaultInjectionPolicyDelay `json:"delay,omitempty"`
  1138  	// ForceSendFields is a list of field names (e.g. "Abort") to unconditionally
  1139  	// include in API requests. By default, fields with empty or default values are
  1140  	// omitted from API requests. See
  1141  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1142  	// details.
  1143  	ForceSendFields []string `json:"-"`
  1144  	// NullFields is a list of field names (e.g. "Abort") to include in API
  1145  	// requests with the JSON null value. By default, fields with empty values are
  1146  	// omitted from API requests. See
  1147  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1148  	NullFields []string `json:"-"`
  1149  }
  1150  
  1151  func (s *GrpcRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) {
  1152  	type NoMethod GrpcRouteFaultInjectionPolicy
  1153  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1154  }
  1155  
  1156  // GrpcRouteFaultInjectionPolicyAbort: Specification of how client requests are
  1157  // aborted as part of fault injection before being sent to a destination.
  1158  type GrpcRouteFaultInjectionPolicyAbort struct {
  1159  	// HttpStatus: The HTTP status code used to abort the request. The value must
  1160  	// be between 200 and 599 inclusive.
  1161  	HttpStatus int64 `json:"httpStatus,omitempty"`
  1162  	// Percentage: The percentage of traffic which will be aborted. The value must
  1163  	// be between [0, 100]
  1164  	Percentage int64 `json:"percentage,omitempty"`
  1165  	// ForceSendFields is a list of field names (e.g. "HttpStatus") to
  1166  	// unconditionally include in API requests. By default, fields with empty or
  1167  	// default values are omitted from API requests. See
  1168  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1169  	// details.
  1170  	ForceSendFields []string `json:"-"`
  1171  	// NullFields is a list of field names (e.g. "HttpStatus") to include in API
  1172  	// requests with the JSON null value. By default, fields with empty values are
  1173  	// omitted from API requests. See
  1174  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1175  	NullFields []string `json:"-"`
  1176  }
  1177  
  1178  func (s *GrpcRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) {
  1179  	type NoMethod GrpcRouteFaultInjectionPolicyAbort
  1180  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1181  }
  1182  
  1183  // GrpcRouteFaultInjectionPolicyDelay: Specification of how client requests are
  1184  // delayed as part of fault injection before being sent to a destination.
  1185  type GrpcRouteFaultInjectionPolicyDelay struct {
  1186  	// FixedDelay: Specify a fixed delay before forwarding the request.
  1187  	FixedDelay string `json:"fixedDelay,omitempty"`
  1188  	// Percentage: The percentage of traffic on which delay will be injected. The
  1189  	// value must be between [0, 100]
  1190  	Percentage int64 `json:"percentage,omitempty"`
  1191  	// ForceSendFields is a list of field names (e.g. "FixedDelay") to
  1192  	// unconditionally include in API requests. By default, fields with empty or
  1193  	// default values are omitted from API requests. See
  1194  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1195  	// details.
  1196  	ForceSendFields []string `json:"-"`
  1197  	// NullFields is a list of field names (e.g. "FixedDelay") to include in API
  1198  	// requests with the JSON null value. By default, fields with empty values are
  1199  	// omitted from API requests. See
  1200  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1201  	NullFields []string `json:"-"`
  1202  }
  1203  
  1204  func (s *GrpcRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) {
  1205  	type NoMethod GrpcRouteFaultInjectionPolicyDelay
  1206  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1207  }
  1208  
  1209  // GrpcRouteHeaderMatch: A match against a collection of headers.
  1210  type GrpcRouteHeaderMatch struct {
  1211  	// Key: Required. The key of the header.
  1212  	Key string `json:"key,omitempty"`
  1213  	// Type: Optional. Specifies how to match against the value of the header. If
  1214  	// not specified, a default value of EXACT is used.
  1215  	//
  1216  	// Possible values:
  1217  	//   "TYPE_UNSPECIFIED" - Unspecified.
  1218  	//   "EXACT" - Will only match the exact value provided.
  1219  	//   "REGULAR_EXPRESSION" - Will match paths conforming to the prefix specified
  1220  	// by value. RE2 syntax is supported.
  1221  	Type string `json:"type,omitempty"`
  1222  	// Value: Required. The value of the header.
  1223  	Value string `json:"value,omitempty"`
  1224  	// ForceSendFields is a list of field names (e.g. "Key") to unconditionally
  1225  	// include in API requests. By default, fields with empty or default values are
  1226  	// omitted from API requests. See
  1227  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1228  	// details.
  1229  	ForceSendFields []string `json:"-"`
  1230  	// NullFields is a list of field names (e.g. "Key") to include in API requests
  1231  	// with the JSON null value. By default, fields with empty values are omitted
  1232  	// from API requests. See
  1233  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1234  	NullFields []string `json:"-"`
  1235  }
  1236  
  1237  func (s *GrpcRouteHeaderMatch) MarshalJSON() ([]byte, error) {
  1238  	type NoMethod GrpcRouteHeaderMatch
  1239  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1240  }
  1241  
  1242  // GrpcRouteMethodMatch: Specifies a match against a method.
  1243  type GrpcRouteMethodMatch struct {
  1244  	// CaseSensitive: Optional. Specifies that matches are case sensitive. The
  1245  	// default value is true. case_sensitive must not be used with a type of
  1246  	// REGULAR_EXPRESSION.
  1247  	CaseSensitive bool `json:"caseSensitive,omitempty"`
  1248  	// GrpcMethod: Required. Name of the method to match against. If unspecified,
  1249  	// will match all methods.
  1250  	GrpcMethod string `json:"grpcMethod,omitempty"`
  1251  	// GrpcService: Required. Name of the service to match against. If unspecified,
  1252  	// will match all services.
  1253  	GrpcService string `json:"grpcService,omitempty"`
  1254  	// Type: Optional. Specifies how to match against the name. If not specified, a
  1255  	// default value of "EXACT" is used.
  1256  	//
  1257  	// Possible values:
  1258  	//   "TYPE_UNSPECIFIED" - Unspecified.
  1259  	//   "EXACT" - Will only match the exact name provided.
  1260  	//   "REGULAR_EXPRESSION" - Will interpret grpc_method and grpc_service as
  1261  	// regexes. RE2 syntax is supported.
  1262  	Type string `json:"type,omitempty"`
  1263  	// ForceSendFields is a list of field names (e.g. "CaseSensitive") to
  1264  	// unconditionally include in API requests. By default, fields with empty or
  1265  	// default values are omitted from API requests. See
  1266  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1267  	// details.
  1268  	ForceSendFields []string `json:"-"`
  1269  	// NullFields is a list of field names (e.g. "CaseSensitive") to include in API
  1270  	// requests with the JSON null value. By default, fields with empty values are
  1271  	// omitted from API requests. See
  1272  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1273  	NullFields []string `json:"-"`
  1274  }
  1275  
  1276  func (s *GrpcRouteMethodMatch) MarshalJSON() ([]byte, error) {
  1277  	type NoMethod GrpcRouteMethodMatch
  1278  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1279  }
  1280  
  1281  // GrpcRouteRetryPolicy: The specifications for retries.
  1282  type GrpcRouteRetryPolicy struct {
  1283  	// NumRetries: Specifies the allowed number of retries. This number must be >
  1284  	// 0. If not specified, default to 1.
  1285  	NumRetries int64 `json:"numRetries,omitempty"`
  1286  	// RetryConditions: - connect-failure: Router will retry on failures connecting
  1287  	// to Backend Services, for example due to connection timeouts. -
  1288  	// refused-stream: Router will retry if the backend service resets the stream
  1289  	// with a REFUSED_STREAM error code. This reset type indicates that it is safe
  1290  	// to retry. - cancelled: Router will retry if the gRPC status code in the
  1291  	// response header is set to cancelled - deadline-exceeded: Router will retry
  1292  	// if the gRPC status code in the response header is set to deadline-exceeded -
  1293  	// resource-exhausted: Router will retry if the gRPC status code in the
  1294  	// response header is set to resource-exhausted - unavailable: Router will
  1295  	// retry if the gRPC status code in the response header is set to unavailable
  1296  	RetryConditions []string `json:"retryConditions,omitempty"`
  1297  	// ForceSendFields is a list of field names (e.g. "NumRetries") to
  1298  	// unconditionally include in API requests. By default, fields with empty or
  1299  	// default values are omitted from API requests. See
  1300  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1301  	// details.
  1302  	ForceSendFields []string `json:"-"`
  1303  	// NullFields is a list of field names (e.g. "NumRetries") to include in API
  1304  	// requests with the JSON null value. By default, fields with empty values are
  1305  	// omitted from API requests. See
  1306  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1307  	NullFields []string `json:"-"`
  1308  }
  1309  
  1310  func (s *GrpcRouteRetryPolicy) MarshalJSON() ([]byte, error) {
  1311  	type NoMethod GrpcRouteRetryPolicy
  1312  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1313  }
  1314  
  1315  // GrpcRouteRouteAction: Specifies how to route matched traffic.
  1316  type GrpcRouteRouteAction struct {
  1317  	// Destinations: Optional. The destination services to which traffic should be
  1318  	// forwarded. If multiple destinations are specified, traffic will be split
  1319  	// between Backend Service(s) according to the weight field of these
  1320  	// destinations.
  1321  	Destinations []*GrpcRouteDestination `json:"destinations,omitempty"`
  1322  	// FaultInjectionPolicy: Optional. The specification for fault injection
  1323  	// introduced into traffic to test the resiliency of clients to destination
  1324  	// service failure. As part of fault injection, when clients send requests to a
  1325  	// destination, delays can be introduced on a percentage of requests before
  1326  	// sending those requests to the destination service. Similarly requests from
  1327  	// clients can be aborted by for a percentage of requests. timeout and
  1328  	// retry_policy will be ignored by clients that are configured with a
  1329  	// fault_injection_policy
  1330  	FaultInjectionPolicy *GrpcRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"`
  1331  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  1332  	// The idle timeout is defined as the period in which there are no bytes sent
  1333  	// or received on either the upstream or downstream connection. If not set, the
  1334  	// default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.
  1335  	IdleTimeout string `json:"idleTimeout,omitempty"`
  1336  	// RetryPolicy: Optional. Specifies the retry policy associated with this
  1337  	// route.
  1338  	RetryPolicy *GrpcRouteRetryPolicy `json:"retryPolicy,omitempty"`
  1339  	// StatefulSessionAffinity: Optional. Specifies cookie-based stateful session
  1340  	// affinity.
  1341  	StatefulSessionAffinity *GrpcRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"`
  1342  	// Timeout: Optional. Specifies the timeout for selected route. Timeout is
  1343  	// computed from the time the request has been fully processed (i.e. end of
  1344  	// stream) up until the response has been completely processed. Timeout
  1345  	// includes all retries.
  1346  	Timeout string `json:"timeout,omitempty"`
  1347  	// ForceSendFields is a list of field names (e.g. "Destinations") to
  1348  	// unconditionally include in API requests. By default, fields with empty or
  1349  	// default values are omitted from API requests. See
  1350  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1351  	// details.
  1352  	ForceSendFields []string `json:"-"`
  1353  	// NullFields is a list of field names (e.g. "Destinations") to include in API
  1354  	// requests with the JSON null value. By default, fields with empty values are
  1355  	// omitted from API requests. See
  1356  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1357  	NullFields []string `json:"-"`
  1358  }
  1359  
  1360  func (s *GrpcRouteRouteAction) MarshalJSON() ([]byte, error) {
  1361  	type NoMethod GrpcRouteRouteAction
  1362  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1363  }
  1364  
  1365  // GrpcRouteRouteMatch: Criteria for matching traffic. A RouteMatch will be
  1366  // considered to match when all supplied fields match.
  1367  type GrpcRouteRouteMatch struct {
  1368  	// Headers: Optional. Specifies a collection of headers to match.
  1369  	Headers []*GrpcRouteHeaderMatch `json:"headers,omitempty"`
  1370  	// Method: Optional. A gRPC method to match against. If this field is empty or
  1371  	// omitted, will match all methods.
  1372  	Method *GrpcRouteMethodMatch `json:"method,omitempty"`
  1373  	// ForceSendFields is a list of field names (e.g. "Headers") to unconditionally
  1374  	// include in API requests. By default, fields with empty or default values are
  1375  	// omitted from API requests. See
  1376  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1377  	// details.
  1378  	ForceSendFields []string `json:"-"`
  1379  	// NullFields is a list of field names (e.g. "Headers") to include in API
  1380  	// requests with the JSON null value. By default, fields with empty values are
  1381  	// omitted from API requests. See
  1382  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1383  	NullFields []string `json:"-"`
  1384  }
  1385  
  1386  func (s *GrpcRouteRouteMatch) MarshalJSON() ([]byte, error) {
  1387  	type NoMethod GrpcRouteRouteMatch
  1388  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1389  }
  1390  
  1391  // GrpcRouteRouteRule: Describes how to route traffic.
  1392  type GrpcRouteRouteRule struct {
  1393  	// Action: Required. A detailed rule defining how to route traffic. This field
  1394  	// is required.
  1395  	Action *GrpcRouteRouteAction `json:"action,omitempty"`
  1396  	// Matches: Optional. Matches define conditions used for matching the rule
  1397  	// against incoming gRPC requests. Each match is independent, i.e. this rule
  1398  	// will be matched if ANY one of the matches is satisfied. If no matches field
  1399  	// is specified, this rule will unconditionally match traffic.
  1400  	Matches []*GrpcRouteRouteMatch `json:"matches,omitempty"`
  1401  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  1402  	// include in API requests. By default, fields with empty or default values are
  1403  	// omitted from API requests. See
  1404  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1405  	// details.
  1406  	ForceSendFields []string `json:"-"`
  1407  	// NullFields is a list of field names (e.g. "Action") to include in API
  1408  	// requests with the JSON null value. By default, fields with empty values are
  1409  	// omitted from API requests. See
  1410  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1411  	NullFields []string `json:"-"`
  1412  }
  1413  
  1414  func (s *GrpcRouteRouteRule) MarshalJSON() ([]byte, error) {
  1415  	type NoMethod GrpcRouteRouteRule
  1416  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1417  }
  1418  
  1419  // GrpcRouteStatefulSessionAffinityPolicy: The specification for cookie-based
  1420  // stateful session affinity where the date plane supplies a “session
  1421  // cookie” with the name "GSSA" which encodes a specific destination host and
  1422  // each request containing that cookie will be directed to that host as long as
  1423  // the destination host remains up and healthy. The gRPC proxyless mesh library
  1424  // or sidecar proxy will manage the session cookie but the client application
  1425  // code is responsible for copying the cookie from each RPC in the session to
  1426  // the next.
  1427  type GrpcRouteStatefulSessionAffinityPolicy struct {
  1428  	// CookieTtl: Required. The cookie TTL value for the Set-Cookie header
  1429  	// generated by the data plane. The lifetime of the cookie may be set to a
  1430  	// value from 1 to 86400 seconds (24 hours) inclusive.
  1431  	CookieTtl string `json:"cookieTtl,omitempty"`
  1432  	// ForceSendFields is a list of field names (e.g. "CookieTtl") to
  1433  	// unconditionally include in API requests. By default, fields with empty or
  1434  	// default values are omitted from API requests. See
  1435  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1436  	// details.
  1437  	ForceSendFields []string `json:"-"`
  1438  	// NullFields is a list of field names (e.g. "CookieTtl") to include in API
  1439  	// requests with the JSON null value. By default, fields with empty values are
  1440  	// omitted from API requests. See
  1441  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1442  	NullFields []string `json:"-"`
  1443  }
  1444  
  1445  func (s *GrpcRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) {
  1446  	type NoMethod GrpcRouteStatefulSessionAffinityPolicy
  1447  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1448  }
  1449  
  1450  // HttpRoute: HttpRoute is the resource defining how HTTP traffic should be
  1451  // routed by a Mesh or Gateway resource.
  1452  type HttpRoute struct {
  1453  	// CreateTime: Output only. The timestamp when the resource was created.
  1454  	CreateTime string `json:"createTime,omitempty"`
  1455  	// Description: Optional. A free-text description of the resource. Max length
  1456  	// 1024 characters.
  1457  	Description string `json:"description,omitempty"`
  1458  	// Gateways: Optional. Gateways defines a list of gateways this HttpRoute is
  1459  	// attached to, as one of the routing rules to route the requests served by the
  1460  	// gateway. Each gateway reference should match the pattern:
  1461  	// `projects/*/locations/global/gateways/`
  1462  	Gateways []string `json:"gateways,omitempty"`
  1463  	// Hostnames: Required. Hostnames define a set of hosts that should match
  1464  	// against the HTTP host header to select a HttpRoute to process the request.
  1465  	// Hostname is the fully qualified domain name of a network host, as defined by
  1466  	// RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be
  1467  	// prefixed with a wildcard label (`*.`). The wildcard label must appear by
  1468  	// itself as the first label. Hostname can be "precise" which is a domain name
  1469  	// without the terminating dot of a network host (e.g. `foo.example.com`) or
  1470  	// "wildcard", which is a domain name prefixed with a single wildcard label
  1471  	// (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must
  1472  	// consist of lower case alphanumeric characters or '-', and must start and end
  1473  	// with an alphanumeric character. No other punctuation is allowed. The routes
  1474  	// associated with a Mesh or Gateways must have unique hostnames. If you
  1475  	// attempt to attach multiple routes with conflicting hostnames, the
  1476  	// configuration will be rejected. For example, while it is acceptable for
  1477  	// routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated
  1478  	// with the same Mesh (or Gateways under the same scope), it is not possible to
  1479  	// associate two routes both with `*.bar.com` or both with `bar.com`.
  1480  	Hostnames []string `json:"hostnames,omitempty"`
  1481  	// Labels: Optional. Set of label tags associated with the HttpRoute resource.
  1482  	Labels map[string]string `json:"labels,omitempty"`
  1483  	// Meshes: Optional. Meshes defines a list of meshes this HttpRoute is attached
  1484  	// to, as one of the routing rules to route the requests served by the mesh.
  1485  	// Each mesh reference should match the pattern:
  1486  	// `projects/*/locations/global/meshes/` The attached Mesh should be of a type
  1487  	// SIDECAR
  1488  	Meshes []string `json:"meshes,omitempty"`
  1489  	// Name: Required. Name of the HttpRoute resource. It matches pattern
  1490  	// `projects/*/locations/global/httpRoutes/http_route_name>`.
  1491  	Name string `json:"name,omitempty"`
  1492  	// Rules: Required. Rules that define how traffic is routed and handled. Rules
  1493  	// will be matched sequentially based on the RouteMatch specified for the rule.
  1494  	Rules []*HttpRouteRouteRule `json:"rules,omitempty"`
  1495  	// SelfLink: Output only. Server-defined URL of this resource
  1496  	SelfLink string `json:"selfLink,omitempty"`
  1497  	// UpdateTime: Output only. The timestamp when the resource was updated.
  1498  	UpdateTime string `json:"updateTime,omitempty"`
  1499  
  1500  	// ServerResponse contains the HTTP response code and headers from the server.
  1501  	googleapi.ServerResponse `json:"-"`
  1502  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1503  	// unconditionally include in API requests. By default, fields with empty or
  1504  	// default values are omitted from API requests. See
  1505  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1506  	// details.
  1507  	ForceSendFields []string `json:"-"`
  1508  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1509  	// requests with the JSON null value. By default, fields with empty values are
  1510  	// omitted from API requests. See
  1511  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1512  	NullFields []string `json:"-"`
  1513  }
  1514  
  1515  func (s *HttpRoute) MarshalJSON() ([]byte, error) {
  1516  	type NoMethod HttpRoute
  1517  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1518  }
  1519  
  1520  // HttpRouteCorsPolicy: The Specification for allowing client side cross-origin
  1521  // requests.
  1522  type HttpRouteCorsPolicy struct {
  1523  	// AllowCredentials: In response to a preflight request, setting this to true
  1524  	// indicates that the actual request can include user credentials. This
  1525  	// translates to the Access-Control-Allow-Credentials header. Default value is
  1526  	// false.
  1527  	AllowCredentials bool `json:"allowCredentials,omitempty"`
  1528  	// AllowHeaders: Specifies the content for Access-Control-Allow-Headers header.
  1529  	AllowHeaders []string `json:"allowHeaders,omitempty"`
  1530  	// AllowMethods: Specifies the content for Access-Control-Allow-Methods header.
  1531  	AllowMethods []string `json:"allowMethods,omitempty"`
  1532  	// AllowOriginRegexes: Specifies the regular expression patterns that match
  1533  	// allowed origins. For regular expression grammar, please see
  1534  	// https://github.com/google/re2/wiki/Syntax.
  1535  	AllowOriginRegexes []string `json:"allowOriginRegexes,omitempty"`
  1536  	// AllowOrigins: Specifies the list of origins that will be allowed to do CORS
  1537  	// requests. An origin is allowed if it matches either an item in allow_origins
  1538  	// or an item in allow_origin_regexes.
  1539  	AllowOrigins []string `json:"allowOrigins,omitempty"`
  1540  	// Disabled: If true, the CORS policy is disabled. The default value is false,
  1541  	// which indicates that the CORS policy is in effect.
  1542  	Disabled bool `json:"disabled,omitempty"`
  1543  	// ExposeHeaders: Specifies the content for Access-Control-Expose-Headers
  1544  	// header.
  1545  	ExposeHeaders []string `json:"exposeHeaders,omitempty"`
  1546  	// MaxAge: Specifies how long result of a preflight request can be cached in
  1547  	// seconds. This translates to the Access-Control-Max-Age header.
  1548  	MaxAge string `json:"maxAge,omitempty"`
  1549  	// ForceSendFields is a list of field names (e.g. "AllowCredentials") to
  1550  	// unconditionally include in API requests. By default, fields with empty or
  1551  	// default values are omitted from API requests. See
  1552  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1553  	// details.
  1554  	ForceSendFields []string `json:"-"`
  1555  	// NullFields is a list of field names (e.g. "AllowCredentials") to include in
  1556  	// API requests with the JSON null value. By default, fields with empty values
  1557  	// are omitted from API requests. See
  1558  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1559  	NullFields []string `json:"-"`
  1560  }
  1561  
  1562  func (s *HttpRouteCorsPolicy) MarshalJSON() ([]byte, error) {
  1563  	type NoMethod HttpRouteCorsPolicy
  1564  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1565  }
  1566  
  1567  // HttpRouteDestination: Specifications of a destination to which the request
  1568  // should be routed to.
  1569  type HttpRouteDestination struct {
  1570  	// RequestHeaderModifier: Optional. The specification for modifying the headers
  1571  	// of a matching request prior to delivery of the request to the destination.
  1572  	// If HeaderModifiers are set on both the Destination and the RouteAction, they
  1573  	// will be merged. Conflicts between the two will not be resolved on the
  1574  	// configuration.
  1575  	RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"`
  1576  	// ResponseHeaderModifier: Optional. The specification for modifying the
  1577  	// headers of a response prior to sending the response back to the client. If
  1578  	// HeaderModifiers are set on both the Destination and the RouteAction, they
  1579  	// will be merged. Conflicts between the two will not be resolved on the
  1580  	// configuration.
  1581  	ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"`
  1582  	// ServiceName: The URL of a BackendService to route traffic to.
  1583  	ServiceName string `json:"serviceName,omitempty"`
  1584  	// Weight: Specifies the proportion of requests forwarded to the backend
  1585  	// referenced by the serviceName field. This is computed as: -
  1586  	// weight/Sum(weights in this destination list). For non-zero values, there may
  1587  	// be some epsilon from the exact proportion defined here depending on the
  1588  	// precision an implementation supports. If only one serviceName is specified
  1589  	// and it has a weight greater than 0, 100% of the traffic is forwarded to that
  1590  	// backend. If weights are specified for any one service name, they need to be
  1591  	// specified for all of them. If weights are unspecified for all services,
  1592  	// then, traffic is distributed in equal proportions to all of them.
  1593  	Weight int64 `json:"weight,omitempty"`
  1594  	// ForceSendFields is a list of field names (e.g. "RequestHeaderModifier") to
  1595  	// unconditionally include in API requests. By default, fields with empty or
  1596  	// default values are omitted from API requests. See
  1597  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1598  	// details.
  1599  	ForceSendFields []string `json:"-"`
  1600  	// NullFields is a list of field names (e.g. "RequestHeaderModifier") to
  1601  	// include in API requests with the JSON null value. By default, fields with
  1602  	// empty values are omitted from API requests. See
  1603  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1604  	NullFields []string `json:"-"`
  1605  }
  1606  
  1607  func (s *HttpRouteDestination) MarshalJSON() ([]byte, error) {
  1608  	type NoMethod HttpRouteDestination
  1609  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1610  }
  1611  
  1612  // HttpRouteFaultInjectionPolicy: The specification for fault injection
  1613  // introduced into traffic to test the resiliency of clients to destination
  1614  // service failure. As part of fault injection, when clients send requests to a
  1615  // destination, delays can be introduced by client proxy on a percentage of
  1616  // requests before sending those requests to the destination service. Similarly
  1617  // requests can be aborted by client proxy for a percentage of requests.
  1618  type HttpRouteFaultInjectionPolicy struct {
  1619  	// Abort: The specification for aborting to client requests.
  1620  	Abort *HttpRouteFaultInjectionPolicyAbort `json:"abort,omitempty"`
  1621  	// Delay: The specification for injecting delay to client requests.
  1622  	Delay *HttpRouteFaultInjectionPolicyDelay `json:"delay,omitempty"`
  1623  	// ForceSendFields is a list of field names (e.g. "Abort") to unconditionally
  1624  	// include in API requests. By default, fields with empty or default values are
  1625  	// omitted from API requests. See
  1626  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1627  	// details.
  1628  	ForceSendFields []string `json:"-"`
  1629  	// NullFields is a list of field names (e.g. "Abort") to include in API
  1630  	// requests with the JSON null value. By default, fields with empty values are
  1631  	// omitted from API requests. See
  1632  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1633  	NullFields []string `json:"-"`
  1634  }
  1635  
  1636  func (s *HttpRouteFaultInjectionPolicy) MarshalJSON() ([]byte, error) {
  1637  	type NoMethod HttpRouteFaultInjectionPolicy
  1638  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1639  }
  1640  
  1641  // HttpRouteFaultInjectionPolicyAbort: Specification of how client requests are
  1642  // aborted as part of fault injection before being sent to a destination.
  1643  type HttpRouteFaultInjectionPolicyAbort struct {
  1644  	// HttpStatus: The HTTP status code used to abort the request. The value must
  1645  	// be between 200 and 599 inclusive.
  1646  	HttpStatus int64 `json:"httpStatus,omitempty"`
  1647  	// Percentage: The percentage of traffic which will be aborted. The value must
  1648  	// be between [0, 100]
  1649  	Percentage int64 `json:"percentage,omitempty"`
  1650  	// ForceSendFields is a list of field names (e.g. "HttpStatus") to
  1651  	// unconditionally include in API requests. By default, fields with empty or
  1652  	// default values are omitted from API requests. See
  1653  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1654  	// details.
  1655  	ForceSendFields []string `json:"-"`
  1656  	// NullFields is a list of field names (e.g. "HttpStatus") to include in API
  1657  	// requests with the JSON null value. By default, fields with empty values are
  1658  	// omitted from API requests. See
  1659  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1660  	NullFields []string `json:"-"`
  1661  }
  1662  
  1663  func (s *HttpRouteFaultInjectionPolicyAbort) MarshalJSON() ([]byte, error) {
  1664  	type NoMethod HttpRouteFaultInjectionPolicyAbort
  1665  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1666  }
  1667  
  1668  // HttpRouteFaultInjectionPolicyDelay: Specification of how client requests are
  1669  // delayed as part of fault injection before being sent to a destination.
  1670  type HttpRouteFaultInjectionPolicyDelay struct {
  1671  	// FixedDelay: Specify a fixed delay before forwarding the request.
  1672  	FixedDelay string `json:"fixedDelay,omitempty"`
  1673  	// Percentage: The percentage of traffic on which delay will be injected. The
  1674  	// value must be between [0, 100]
  1675  	Percentage int64 `json:"percentage,omitempty"`
  1676  	// ForceSendFields is a list of field names (e.g. "FixedDelay") to
  1677  	// unconditionally include in API requests. By default, fields with empty or
  1678  	// default values are omitted from API requests. See
  1679  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1680  	// details.
  1681  	ForceSendFields []string `json:"-"`
  1682  	// NullFields is a list of field names (e.g. "FixedDelay") to include in API
  1683  	// requests with the JSON null value. By default, fields with empty values are
  1684  	// omitted from API requests. See
  1685  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1686  	NullFields []string `json:"-"`
  1687  }
  1688  
  1689  func (s *HttpRouteFaultInjectionPolicyDelay) MarshalJSON() ([]byte, error) {
  1690  	type NoMethod HttpRouteFaultInjectionPolicyDelay
  1691  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1692  }
  1693  
  1694  // HttpRouteHeaderMatch: Specifies how to select a route rule based on HTTP
  1695  // request headers.
  1696  type HttpRouteHeaderMatch struct {
  1697  	// ExactMatch: The value of the header should match exactly the content of
  1698  	// exact_match.
  1699  	ExactMatch string `json:"exactMatch,omitempty"`
  1700  	// Header: The name of the HTTP header to match against.
  1701  	Header string `json:"header,omitempty"`
  1702  	// InvertMatch: If specified, the match result will be inverted before
  1703  	// checking. Default value is set to false.
  1704  	InvertMatch bool `json:"invertMatch,omitempty"`
  1705  	// PrefixMatch: The value of the header must start with the contents of
  1706  	// prefix_match.
  1707  	PrefixMatch string `json:"prefixMatch,omitempty"`
  1708  	// PresentMatch: A header with header_name must exist. The match takes place
  1709  	// whether or not the header has a value.
  1710  	PresentMatch bool `json:"presentMatch,omitempty"`
  1711  	// RangeMatch: If specified, the rule will match if the request header value is
  1712  	// within the range.
  1713  	RangeMatch *HttpRouteHeaderMatchIntegerRange `json:"rangeMatch,omitempty"`
  1714  	// RegexMatch: The value of the header must match the regular expression
  1715  	// specified in regex_match. For regular expression grammar, please see:
  1716  	// https://github.com/google/re2/wiki/Syntax
  1717  	RegexMatch string `json:"regexMatch,omitempty"`
  1718  	// SuffixMatch: The value of the header must end with the contents of
  1719  	// suffix_match.
  1720  	SuffixMatch string `json:"suffixMatch,omitempty"`
  1721  	// ForceSendFields is a list of field names (e.g. "ExactMatch") to
  1722  	// unconditionally include in API requests. By default, fields with empty or
  1723  	// default values are omitted from API requests. See
  1724  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1725  	// details.
  1726  	ForceSendFields []string `json:"-"`
  1727  	// NullFields is a list of field names (e.g. "ExactMatch") to include in API
  1728  	// requests with the JSON null value. By default, fields with empty values are
  1729  	// omitted from API requests. See
  1730  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1731  	NullFields []string `json:"-"`
  1732  }
  1733  
  1734  func (s *HttpRouteHeaderMatch) MarshalJSON() ([]byte, error) {
  1735  	type NoMethod HttpRouteHeaderMatch
  1736  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1737  }
  1738  
  1739  // HttpRouteHeaderMatchIntegerRange: Represents an integer value range.
  1740  type HttpRouteHeaderMatchIntegerRange struct {
  1741  	// End: End of the range (exclusive)
  1742  	End int64 `json:"end,omitempty"`
  1743  	// Start: Start of the range (inclusive)
  1744  	Start int64 `json:"start,omitempty"`
  1745  	// ForceSendFields is a list of field names (e.g. "End") to unconditionally
  1746  	// include in API requests. By default, fields with empty or default values are
  1747  	// omitted from API requests. See
  1748  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1749  	// details.
  1750  	ForceSendFields []string `json:"-"`
  1751  	// NullFields is a list of field names (e.g. "End") to include in API requests
  1752  	// with the JSON null value. By default, fields with empty values are omitted
  1753  	// from API requests. See
  1754  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1755  	NullFields []string `json:"-"`
  1756  }
  1757  
  1758  func (s *HttpRouteHeaderMatchIntegerRange) MarshalJSON() ([]byte, error) {
  1759  	type NoMethod HttpRouteHeaderMatchIntegerRange
  1760  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1761  }
  1762  
  1763  // HttpRouteHeaderModifier: The specification for modifying HTTP header in HTTP
  1764  // request and HTTP response.
  1765  type HttpRouteHeaderModifier struct {
  1766  	// Add: Add the headers with given map where key is the name of the header,
  1767  	// value is the value of the header.
  1768  	Add map[string]string `json:"add,omitempty"`
  1769  	// Remove: Remove headers (matching by header names) specified in the list.
  1770  	Remove []string `json:"remove,omitempty"`
  1771  	// Set: Completely overwrite/replace the headers with given map where key is
  1772  	// the name of the header, value is the value of the header.
  1773  	Set map[string]string `json:"set,omitempty"`
  1774  	// ForceSendFields is a list of field names (e.g. "Add") to unconditionally
  1775  	// include in API requests. By default, fields with empty or default values are
  1776  	// omitted from API requests. See
  1777  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1778  	// details.
  1779  	ForceSendFields []string `json:"-"`
  1780  	// NullFields is a list of field names (e.g. "Add") to include in API requests
  1781  	// with the JSON null value. By default, fields with empty values are omitted
  1782  	// from API requests. See
  1783  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1784  	NullFields []string `json:"-"`
  1785  }
  1786  
  1787  func (s *HttpRouteHeaderModifier) MarshalJSON() ([]byte, error) {
  1788  	type NoMethod HttpRouteHeaderModifier
  1789  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1790  }
  1791  
  1792  // HttpRouteHttpDirectResponse: Static HTTP response object to be returned.
  1793  type HttpRouteHttpDirectResponse struct {
  1794  	// BytesBody: Optional. Response body as bytes. Maximum body size is 4096B.
  1795  	BytesBody string `json:"bytesBody,omitempty"`
  1796  	// Status: Required. Status to return as part of HTTP Response. Must be a
  1797  	// positive integer.
  1798  	Status int64 `json:"status,omitempty"`
  1799  	// StringBody: Optional. Response body as a string. Maximum body length is 1024
  1800  	// characters.
  1801  	StringBody string `json:"stringBody,omitempty"`
  1802  	// ForceSendFields is a list of field names (e.g. "BytesBody") to
  1803  	// unconditionally include in API requests. By default, fields with empty or
  1804  	// default values are omitted from API requests. See
  1805  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1806  	// details.
  1807  	ForceSendFields []string `json:"-"`
  1808  	// NullFields is a list of field names (e.g. "BytesBody") to include in API
  1809  	// requests with the JSON null value. By default, fields with empty values are
  1810  	// omitted from API requests. See
  1811  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1812  	NullFields []string `json:"-"`
  1813  }
  1814  
  1815  func (s *HttpRouteHttpDirectResponse) MarshalJSON() ([]byte, error) {
  1816  	type NoMethod HttpRouteHttpDirectResponse
  1817  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1818  }
  1819  
  1820  // HttpRouteQueryParameterMatch: Specifications to match a query parameter in
  1821  // the request.
  1822  type HttpRouteQueryParameterMatch struct {
  1823  	// ExactMatch: The value of the query parameter must exactly match the contents
  1824  	// of exact_match. Only one of exact_match, regex_match, or present_match must
  1825  	// be set.
  1826  	ExactMatch string `json:"exactMatch,omitempty"`
  1827  	// PresentMatch: Specifies that the QueryParameterMatcher matches if request
  1828  	// contains query parameter, irrespective of whether the parameter has a value
  1829  	// or not. Only one of exact_match, regex_match, or present_match must be set.
  1830  	PresentMatch bool `json:"presentMatch,omitempty"`
  1831  	// QueryParameter: The name of the query parameter to match.
  1832  	QueryParameter string `json:"queryParameter,omitempty"`
  1833  	// RegexMatch: The value of the query parameter must match the regular
  1834  	// expression specified by regex_match. For regular expression grammar, please
  1835  	// see https://github.com/google/re2/wiki/Syntax Only one of exact_match,
  1836  	// regex_match, or present_match must be set.
  1837  	RegexMatch string `json:"regexMatch,omitempty"`
  1838  	// ForceSendFields is a list of field names (e.g. "ExactMatch") to
  1839  	// unconditionally include in API requests. By default, fields with empty or
  1840  	// default values are omitted from API requests. See
  1841  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1842  	// details.
  1843  	ForceSendFields []string `json:"-"`
  1844  	// NullFields is a list of field names (e.g. "ExactMatch") to include in API
  1845  	// requests with the JSON null value. By default, fields with empty values are
  1846  	// omitted from API requests. See
  1847  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1848  	NullFields []string `json:"-"`
  1849  }
  1850  
  1851  func (s *HttpRouteQueryParameterMatch) MarshalJSON() ([]byte, error) {
  1852  	type NoMethod HttpRouteQueryParameterMatch
  1853  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1854  }
  1855  
  1856  // HttpRouteRedirect: The specification for redirecting traffic.
  1857  type HttpRouteRedirect struct {
  1858  	// HostRedirect: The host that will be used in the redirect response instead of
  1859  	// the one that was supplied in the request.
  1860  	HostRedirect string `json:"hostRedirect,omitempty"`
  1861  	// HttpsRedirect: If set to true, the URL scheme in the redirected request is
  1862  	// set to https. If set to false, the URL scheme of the redirected request will
  1863  	// remain the same as that of the request. The default is set to false.
  1864  	HttpsRedirect bool `json:"httpsRedirect,omitempty"`
  1865  	// PathRedirect: The path that will be used in the redirect response instead of
  1866  	// the one that was supplied in the request. path_redirect can not be supplied
  1867  	// together with prefix_redirect. Supply one alone or neither. If neither is
  1868  	// supplied, the path of the original request will be used for the redirect.
  1869  	PathRedirect string `json:"pathRedirect,omitempty"`
  1870  	// PortRedirect: The port that will be used in the redirected request instead
  1871  	// of the one that was supplied in the request.
  1872  	PortRedirect int64 `json:"portRedirect,omitempty"`
  1873  	// PrefixRewrite: Indicates that during redirection, the matched prefix (or
  1874  	// path) should be swapped with this value. This option allows URLs be
  1875  	// dynamically created based on the request.
  1876  	PrefixRewrite string `json:"prefixRewrite,omitempty"`
  1877  	// ResponseCode: The HTTP Status code to use for the redirect.
  1878  	//
  1879  	// Possible values:
  1880  	//   "RESPONSE_CODE_UNSPECIFIED" - Default value
  1881  	//   "MOVED_PERMANENTLY_DEFAULT" - Corresponds to 301.
  1882  	//   "FOUND" - Corresponds to 302.
  1883  	//   "SEE_OTHER" - Corresponds to 303.
  1884  	//   "TEMPORARY_REDIRECT" - Corresponds to 307. In this case, the request
  1885  	// method will be retained.
  1886  	//   "PERMANENT_REDIRECT" - Corresponds to 308. In this case, the request
  1887  	// method will be retained.
  1888  	ResponseCode string `json:"responseCode,omitempty"`
  1889  	// StripQuery: if set to true, any accompanying query portion of the original
  1890  	// URL is removed prior to redirecting the request. If set to false, the query
  1891  	// portion of the original URL is retained. The default is set to false.
  1892  	StripQuery bool `json:"stripQuery,omitempty"`
  1893  	// ForceSendFields is a list of field names (e.g. "HostRedirect") to
  1894  	// unconditionally include in API requests. By default, fields with empty or
  1895  	// default values are omitted from API requests. See
  1896  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1897  	// details.
  1898  	ForceSendFields []string `json:"-"`
  1899  	// NullFields is a list of field names (e.g. "HostRedirect") to include in API
  1900  	// requests with the JSON null value. By default, fields with empty values are
  1901  	// omitted from API requests. See
  1902  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1903  	NullFields []string `json:"-"`
  1904  }
  1905  
  1906  func (s *HttpRouteRedirect) MarshalJSON() ([]byte, error) {
  1907  	type NoMethod HttpRouteRedirect
  1908  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1909  }
  1910  
  1911  // HttpRouteRequestMirrorPolicy: Specifies the policy on how requests are
  1912  // shadowed to a separate mirrored destination service. The proxy does not wait
  1913  // for responses from the shadow service. Prior to sending traffic to the
  1914  // shadow service, the host/authority header is suffixed with -shadow.
  1915  type HttpRouteRequestMirrorPolicy struct {
  1916  	// Destination: The destination the requests will be mirrored to. The weight of
  1917  	// the destination will be ignored.
  1918  	Destination *HttpRouteDestination `json:"destination,omitempty"`
  1919  	// MirrorPercent: Optional. The percentage of requests to get mirrored to the
  1920  	// desired destination.
  1921  	MirrorPercent float64 `json:"mirrorPercent,omitempty"`
  1922  	// ForceSendFields is a list of field names (e.g. "Destination") to
  1923  	// unconditionally include in API requests. By default, fields with empty or
  1924  	// default values are omitted from API requests. See
  1925  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1926  	// details.
  1927  	ForceSendFields []string `json:"-"`
  1928  	// NullFields is a list of field names (e.g. "Destination") to include in API
  1929  	// requests with the JSON null value. By default, fields with empty values are
  1930  	// omitted from API requests. See
  1931  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1932  	NullFields []string `json:"-"`
  1933  }
  1934  
  1935  func (s *HttpRouteRequestMirrorPolicy) MarshalJSON() ([]byte, error) {
  1936  	type NoMethod HttpRouteRequestMirrorPolicy
  1937  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1938  }
  1939  
  1940  func (s *HttpRouteRequestMirrorPolicy) UnmarshalJSON(data []byte) error {
  1941  	type NoMethod HttpRouteRequestMirrorPolicy
  1942  	var s1 struct {
  1943  		MirrorPercent gensupport.JSONFloat64 `json:"mirrorPercent"`
  1944  		*NoMethod
  1945  	}
  1946  	s1.NoMethod = (*NoMethod)(s)
  1947  	if err := json.Unmarshal(data, &s1); err != nil {
  1948  		return err
  1949  	}
  1950  	s.MirrorPercent = float64(s1.MirrorPercent)
  1951  	return nil
  1952  }
  1953  
  1954  // HttpRouteRetryPolicy: The specifications for retries.
  1955  type HttpRouteRetryPolicy struct {
  1956  	// NumRetries: Specifies the allowed number of retries. This number must be >
  1957  	// 0. If not specified, default to 1.
  1958  	NumRetries int64 `json:"numRetries,omitempty"`
  1959  	// PerTryTimeout: Specifies a non-zero timeout per retry attempt.
  1960  	PerTryTimeout string `json:"perTryTimeout,omitempty"`
  1961  	// RetryConditions: Specifies one or more conditions when this retry policy
  1962  	// applies. Valid values are: 5xx: Proxy will attempt a retry if the
  1963  	// destination service responds with any 5xx response code, of if the
  1964  	// destination service does not respond at all, example: disconnect, reset,
  1965  	// read timeout, connection failure and refused streams. gateway-error: Similar
  1966  	// to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will
  1967  	// attempt a retry if the destination service does not respond at all
  1968  	// (disconnect/reset/read timeout) connect-failure: Proxy will retry on
  1969  	// failures connecting to destination for example due to connection timeouts.
  1970  	// retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently
  1971  	// the only retriable error supported is 409. refused-stream: Proxy will retry
  1972  	// if the destination resets the stream with a REFUSED_STREAM error code. This
  1973  	// reset type indicates that it is safe to retry.
  1974  	RetryConditions []string `json:"retryConditions,omitempty"`
  1975  	// ForceSendFields is a list of field names (e.g. "NumRetries") to
  1976  	// unconditionally include in API requests. By default, fields with empty or
  1977  	// default values are omitted from API requests. See
  1978  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1979  	// details.
  1980  	ForceSendFields []string `json:"-"`
  1981  	// NullFields is a list of field names (e.g. "NumRetries") to include in API
  1982  	// requests with the JSON null value. By default, fields with empty values are
  1983  	// omitted from API requests. See
  1984  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1985  	NullFields []string `json:"-"`
  1986  }
  1987  
  1988  func (s *HttpRouteRetryPolicy) MarshalJSON() ([]byte, error) {
  1989  	type NoMethod HttpRouteRetryPolicy
  1990  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1991  }
  1992  
  1993  // HttpRouteRouteAction: The specifications for routing traffic and applying
  1994  // associated policies.
  1995  type HttpRouteRouteAction struct {
  1996  	// CorsPolicy: The specification for allowing client side cross-origin
  1997  	// requests.
  1998  	CorsPolicy *HttpRouteCorsPolicy `json:"corsPolicy,omitempty"`
  1999  	// Destinations: The destination to which traffic should be forwarded.
  2000  	Destinations []*HttpRouteDestination `json:"destinations,omitempty"`
  2001  	// DirectResponse: Optional. Static HTTP Response object to be returned
  2002  	// regardless of the request.
  2003  	DirectResponse *HttpRouteHttpDirectResponse `json:"directResponse,omitempty"`
  2004  	// FaultInjectionPolicy: The specification for fault injection introduced into
  2005  	// traffic to test the resiliency of clients to backend service failure. As
  2006  	// part of fault injection, when clients send requests to a backend service,
  2007  	// delays can be introduced on a percentage of requests before sending those
  2008  	// requests to the backend service. Similarly requests from clients can be
  2009  	// aborted for a percentage of requests. timeout and retry_policy will be
  2010  	// ignored by clients that are configured with a fault_injection_policy
  2011  	FaultInjectionPolicy *HttpRouteFaultInjectionPolicy `json:"faultInjectionPolicy,omitempty"`
  2012  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  2013  	// The idle timeout is defined as the period in which there are no bytes sent
  2014  	// or received on either the upstream or downstream connection. If not set, the
  2015  	// default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.
  2016  	IdleTimeout string `json:"idleTimeout,omitempty"`
  2017  	// Redirect: If set, the request is directed as configured by this field.
  2018  	Redirect *HttpRouteRedirect `json:"redirect,omitempty"`
  2019  	// RequestHeaderModifier: The specification for modifying the headers of a
  2020  	// matching request prior to delivery of the request to the destination. If
  2021  	// HeaderModifiers are set on both the Destination and the RouteAction, they
  2022  	// will be merged. Conflicts between the two will not be resolved on the
  2023  	// configuration.
  2024  	RequestHeaderModifier *HttpRouteHeaderModifier `json:"requestHeaderModifier,omitempty"`
  2025  	// RequestMirrorPolicy: Specifies the policy on how requests intended for the
  2026  	// routes destination are shadowed to a separate mirrored destination. Proxy
  2027  	// will not wait for the shadow destination to respond before returning the
  2028  	// response. Prior to sending traffic to the shadow service, the host/authority
  2029  	// header is suffixed with -shadow.
  2030  	RequestMirrorPolicy *HttpRouteRequestMirrorPolicy `json:"requestMirrorPolicy,omitempty"`
  2031  	// ResponseHeaderModifier: The specification for modifying the headers of a
  2032  	// response prior to sending the response back to the client. If
  2033  	// HeaderModifiers are set on both the Destination and the RouteAction, they
  2034  	// will be merged. Conflicts between the two will not be resolved on the
  2035  	// configuration.
  2036  	ResponseHeaderModifier *HttpRouteHeaderModifier `json:"responseHeaderModifier,omitempty"`
  2037  	// RetryPolicy: Specifies the retry policy associated with this route.
  2038  	RetryPolicy *HttpRouteRetryPolicy `json:"retryPolicy,omitempty"`
  2039  	// StatefulSessionAffinity: Optional. Specifies cookie-based stateful session
  2040  	// affinity.
  2041  	StatefulSessionAffinity *HttpRouteStatefulSessionAffinityPolicy `json:"statefulSessionAffinity,omitempty"`
  2042  	// Timeout: Specifies the timeout for selected route. Timeout is computed from
  2043  	// the time the request has been fully processed (i.e. end of stream) up until
  2044  	// the response has been completely processed. Timeout includes all retries.
  2045  	Timeout string `json:"timeout,omitempty"`
  2046  	// UrlRewrite: The specification for rewrite URL before forwarding requests to
  2047  	// the destination.
  2048  	UrlRewrite *HttpRouteURLRewrite `json:"urlRewrite,omitempty"`
  2049  	// ForceSendFields is a list of field names (e.g. "CorsPolicy") to
  2050  	// unconditionally include in API requests. By default, fields with empty or
  2051  	// default values are omitted from API requests. See
  2052  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2053  	// details.
  2054  	ForceSendFields []string `json:"-"`
  2055  	// NullFields is a list of field names (e.g. "CorsPolicy") to include in API
  2056  	// requests with the JSON null value. By default, fields with empty values are
  2057  	// omitted from API requests. See
  2058  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2059  	NullFields []string `json:"-"`
  2060  }
  2061  
  2062  func (s *HttpRouteRouteAction) MarshalJSON() ([]byte, error) {
  2063  	type NoMethod HttpRouteRouteAction
  2064  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2065  }
  2066  
  2067  // HttpRouteRouteMatch: RouteMatch defines specifications used to match
  2068  // requests. If multiple match types are set, this RouteMatch will match if ALL
  2069  // type of matches are matched.
  2070  type HttpRouteRouteMatch struct {
  2071  	// FullPathMatch: The HTTP request path value should exactly match this value.
  2072  	// Only one of full_path_match, prefix_match, or regex_match should be used.
  2073  	FullPathMatch string `json:"fullPathMatch,omitempty"`
  2074  	// Headers: Specifies a list of HTTP request headers to match against. ALL of
  2075  	// the supplied headers must be matched.
  2076  	Headers []*HttpRouteHeaderMatch `json:"headers,omitempty"`
  2077  	// IgnoreCase: Specifies if prefix_match and full_path_match matches are case
  2078  	// sensitive. The default value is false.
  2079  	IgnoreCase bool `json:"ignoreCase,omitempty"`
  2080  	// PrefixMatch: The HTTP request path value must begin with specified
  2081  	// prefix_match. prefix_match must begin with a /. Only one of full_path_match,
  2082  	// prefix_match, or regex_match should be used.
  2083  	PrefixMatch string `json:"prefixMatch,omitempty"`
  2084  	// QueryParameters: Specifies a list of query parameters to match against. ALL
  2085  	// of the query parameters must be matched.
  2086  	QueryParameters []*HttpRouteQueryParameterMatch `json:"queryParameters,omitempty"`
  2087  	// RegexMatch: The HTTP request path value must satisfy the regular expression
  2088  	// specified by regex_match after removing any query parameters and anchor
  2089  	// supplied with the original URL. For regular expression grammar, please see
  2090  	// https://github.com/google/re2/wiki/Syntax Only one of full_path_match,
  2091  	// prefix_match, or regex_match should be used.
  2092  	RegexMatch string `json:"regexMatch,omitempty"`
  2093  	// ForceSendFields is a list of field names (e.g. "FullPathMatch") to
  2094  	// unconditionally include in API requests. By default, fields with empty or
  2095  	// default values are omitted from API requests. See
  2096  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2097  	// details.
  2098  	ForceSendFields []string `json:"-"`
  2099  	// NullFields is a list of field names (e.g. "FullPathMatch") to include in API
  2100  	// requests with the JSON null value. By default, fields with empty values are
  2101  	// omitted from API requests. See
  2102  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2103  	NullFields []string `json:"-"`
  2104  }
  2105  
  2106  func (s *HttpRouteRouteMatch) MarshalJSON() ([]byte, error) {
  2107  	type NoMethod HttpRouteRouteMatch
  2108  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2109  }
  2110  
  2111  // HttpRouteRouteRule: Specifies how to match traffic and how to route traffic
  2112  // when traffic is matched.
  2113  type HttpRouteRouteRule struct {
  2114  	// Action: The detailed rule defining how to route matched traffic.
  2115  	Action *HttpRouteRouteAction `json:"action,omitempty"`
  2116  	// Matches: A list of matches define conditions used for matching the rule
  2117  	// against incoming HTTP requests. Each match is independent, i.e. this rule
  2118  	// will be matched if ANY one of the matches is satisfied. If no matches field
  2119  	// is specified, this rule will unconditionally match traffic. If a default
  2120  	// rule is desired to be configured, add a rule with no matches specified to
  2121  	// the end of the rules list.
  2122  	Matches []*HttpRouteRouteMatch `json:"matches,omitempty"`
  2123  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  2124  	// include in API requests. By default, fields with empty or default values are
  2125  	// omitted from API requests. See
  2126  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2127  	// details.
  2128  	ForceSendFields []string `json:"-"`
  2129  	// NullFields is a list of field names (e.g. "Action") to include in API
  2130  	// requests with the JSON null value. By default, fields with empty values are
  2131  	// omitted from API requests. See
  2132  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2133  	NullFields []string `json:"-"`
  2134  }
  2135  
  2136  func (s *HttpRouteRouteRule) MarshalJSON() ([]byte, error) {
  2137  	type NoMethod HttpRouteRouteRule
  2138  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2139  }
  2140  
  2141  // HttpRouteStatefulSessionAffinityPolicy: The specification for cookie-based
  2142  // stateful session affinity where the date plane supplies a “session
  2143  // cookie” with the name "GSSA" which encodes a specific destination host and
  2144  // each request containing that cookie will be directed to that host as long as
  2145  // the destination host remains up and healthy. The gRPC proxyless mesh library
  2146  // or sidecar proxy will manage the session cookie but the client application
  2147  // code is responsible for copying the cookie from each RPC in the session to
  2148  // the next.
  2149  type HttpRouteStatefulSessionAffinityPolicy struct {
  2150  	// CookieTtl: Required. The cookie TTL value for the Set-Cookie header
  2151  	// generated by the data plane. The lifetime of the cookie may be set to a
  2152  	// value from 1 to 86400 seconds (24 hours) inclusive.
  2153  	CookieTtl string `json:"cookieTtl,omitempty"`
  2154  	// ForceSendFields is a list of field names (e.g. "CookieTtl") to
  2155  	// unconditionally include in API requests. By default, fields with empty or
  2156  	// default values are omitted from API requests. See
  2157  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2158  	// details.
  2159  	ForceSendFields []string `json:"-"`
  2160  	// NullFields is a list of field names (e.g. "CookieTtl") to include in API
  2161  	// requests with the JSON null value. By default, fields with empty values are
  2162  	// omitted from API requests. See
  2163  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2164  	NullFields []string `json:"-"`
  2165  }
  2166  
  2167  func (s *HttpRouteStatefulSessionAffinityPolicy) MarshalJSON() ([]byte, error) {
  2168  	type NoMethod HttpRouteStatefulSessionAffinityPolicy
  2169  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2170  }
  2171  
  2172  // HttpRouteURLRewrite: The specification for modifying the URL of the request,
  2173  // prior to forwarding the request to the destination.
  2174  type HttpRouteURLRewrite struct {
  2175  	// HostRewrite: Prior to forwarding the request to the selected destination,
  2176  	// the requests host header is replaced by this value.
  2177  	HostRewrite string `json:"hostRewrite,omitempty"`
  2178  	// PathPrefixRewrite: Prior to forwarding the request to the selected
  2179  	// destination, the matching portion of the requests path is replaced by this
  2180  	// value.
  2181  	PathPrefixRewrite string `json:"pathPrefixRewrite,omitempty"`
  2182  	// ForceSendFields is a list of field names (e.g. "HostRewrite") to
  2183  	// unconditionally include in API requests. By default, fields with empty or
  2184  	// default values are omitted from API requests. See
  2185  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2186  	// details.
  2187  	ForceSendFields []string `json:"-"`
  2188  	// NullFields is a list of field names (e.g. "HostRewrite") to include in API
  2189  	// requests with the JSON null value. By default, fields with empty values are
  2190  	// omitted from API requests. See
  2191  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2192  	NullFields []string `json:"-"`
  2193  }
  2194  
  2195  func (s *HttpRouteURLRewrite) MarshalJSON() ([]byte, error) {
  2196  	type NoMethod HttpRouteURLRewrite
  2197  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2198  }
  2199  
  2200  // LbRouteExtension: `LbRouteExtension` is a resource that lets you control
  2201  // where traffic is routed to for a given request.
  2202  type LbRouteExtension struct {
  2203  	// CreateTime: Output only. The timestamp when the resource was created.
  2204  	CreateTime string `json:"createTime,omitempty"`
  2205  	// Description: Optional. A human-readable description of the resource.
  2206  	Description string `json:"description,omitempty"`
  2207  	// ExtensionChains: Required. A set of ordered extension chains that contain
  2208  	// the match conditions and extensions to execute. Match conditions for each
  2209  	// extension chain are evaluated in sequence for a given request. The first
  2210  	// extension chain that has a condition that matches the request is executed.
  2211  	// Any subsequent extension chains do not execute. Limited to 5 extension
  2212  	// chains per resource.
  2213  	ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"`
  2214  	// ForwardingRules: Required. A list of references to the forwarding rules to
  2215  	// which this service extension is attached to. At least one forwarding rule is
  2216  	// required. There can be only one `LbRouteExtension` resource per forwarding
  2217  	// rule.
  2218  	ForwardingRules []string `json:"forwardingRules,omitempty"`
  2219  	// Labels: Optional. Set of labels associated with the `LbRouteExtension`
  2220  	// resource. The format must comply with the requirements for labels
  2221  	// (https://cloud.google.com/compute/docs/labeling-resources#requirements) for
  2222  	// Google Cloud resources.
  2223  	Labels map[string]string `json:"labels,omitempty"`
  2224  	// LoadBalancingScheme: Required. All backend services and forwarding rules
  2225  	// referenced by this extension must share the same load balancing scheme.
  2226  	// Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more
  2227  	// information, refer to Choosing a load balancer
  2228  	// (https://cloud.google.com/load-balancing/docs/backend-service).
  2229  	//
  2230  	// Possible values:
  2231  	//   "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use.
  2232  	//   "INTERNAL_MANAGED" - Signifies that this is used for Internal HTTP(S) Load
  2233  	// Balancing.
  2234  	//   "EXTERNAL_MANAGED" - Signifies that this is used for External Managed
  2235  	// HTTP(S) Load Balancing.
  2236  	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
  2237  	// Name: Required. Identifier. Name of the `LbRouteExtension` resource in the
  2238  	// following format:
  2239  	// `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extensio
  2240  	// n}`.
  2241  	Name string `json:"name,omitempty"`
  2242  	// UpdateTime: Output only. The timestamp when the resource was updated.
  2243  	UpdateTime string `json:"updateTime,omitempty"`
  2244  
  2245  	// ServerResponse contains the HTTP response code and headers from the server.
  2246  	googleapi.ServerResponse `json:"-"`
  2247  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2248  	// unconditionally include in API requests. By default, fields with empty or
  2249  	// default values are omitted from API requests. See
  2250  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2251  	// details.
  2252  	ForceSendFields []string `json:"-"`
  2253  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2254  	// requests with the JSON null value. By default, fields with empty values are
  2255  	// omitted from API requests. See
  2256  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2257  	NullFields []string `json:"-"`
  2258  }
  2259  
  2260  func (s *LbRouteExtension) MarshalJSON() ([]byte, error) {
  2261  	type NoMethod LbRouteExtension
  2262  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2263  }
  2264  
  2265  // LbTrafficExtension: `LbTrafficExtension` is a resource that lets the
  2266  // extension service modify the headers and payloads of both requests and
  2267  // responses without impacting the choice of backend services or any other
  2268  // security policies associated with the backend service.
  2269  type LbTrafficExtension struct {
  2270  	// CreateTime: Output only. The timestamp when the resource was created.
  2271  	CreateTime string `json:"createTime,omitempty"`
  2272  	// Description: Optional. A human-readable description of the resource.
  2273  	Description string `json:"description,omitempty"`
  2274  	// ExtensionChains: Required. A set of ordered extension chains that contain
  2275  	// the match conditions and extensions to execute. Match conditions for each
  2276  	// extension chain are evaluated in sequence for a given request. The first
  2277  	// extension chain that has a condition that matches the request is executed.
  2278  	// Any subsequent extension chains do not execute. Limited to 5 extension
  2279  	// chains per resource.
  2280  	ExtensionChains []*ExtensionChain `json:"extensionChains,omitempty"`
  2281  	// ForwardingRules: Required. A list of references to the forwarding rules to
  2282  	// which this service extension is attached to. At least one forwarding rule is
  2283  	// required. There can be only one `LBTrafficExtension` resource per forwarding
  2284  	// rule.
  2285  	ForwardingRules []string `json:"forwardingRules,omitempty"`
  2286  	// Labels: Optional. Set of labels associated with the `LbTrafficExtension`
  2287  	// resource. The format must comply with the requirements for labels
  2288  	// (https://cloud.google.com/compute/docs/labeling-resources#requirements) for
  2289  	// Google Cloud resources.
  2290  	Labels map[string]string `json:"labels,omitempty"`
  2291  	// LoadBalancingScheme: Required. All backend services and forwarding rules
  2292  	// referenced by this extension must share the same load balancing scheme.
  2293  	// Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more
  2294  	// information, refer to Choosing a load balancer
  2295  	// (https://cloud.google.com/load-balancing/docs/backend-service).
  2296  	//
  2297  	// Possible values:
  2298  	//   "LOAD_BALANCING_SCHEME_UNSPECIFIED" - Default value. Do not use.
  2299  	//   "INTERNAL_MANAGED" - Signifies that this is used for Internal HTTP(S) Load
  2300  	// Balancing.
  2301  	//   "EXTERNAL_MANAGED" - Signifies that this is used for External Managed
  2302  	// HTTP(S) Load Balancing.
  2303  	LoadBalancingScheme string `json:"loadBalancingScheme,omitempty"`
  2304  	// Name: Required. Identifier. Name of the `LbTrafficExtension` resource in the
  2305  	// following format:
  2306  	// `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_exte
  2307  	// nsion}`.
  2308  	Name string `json:"name,omitempty"`
  2309  	// UpdateTime: Output only. The timestamp when the resource was updated.
  2310  	UpdateTime string `json:"updateTime,omitempty"`
  2311  
  2312  	// ServerResponse contains the HTTP response code and headers from the server.
  2313  	googleapi.ServerResponse `json:"-"`
  2314  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2315  	// unconditionally include in API requests. By default, fields with empty or
  2316  	// default values are omitted from API requests. See
  2317  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2318  	// details.
  2319  	ForceSendFields []string `json:"-"`
  2320  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2321  	// requests with the JSON null value. By default, fields with empty values are
  2322  	// omitted from API requests. See
  2323  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2324  	NullFields []string `json:"-"`
  2325  }
  2326  
  2327  func (s *LbTrafficExtension) MarshalJSON() ([]byte, error) {
  2328  	type NoMethod LbTrafficExtension
  2329  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2330  }
  2331  
  2332  // ListEndpointPoliciesResponse: Response returned by the ListEndpointPolicies
  2333  // method.
  2334  type ListEndpointPoliciesResponse struct {
  2335  	// EndpointPolicies: List of EndpointPolicy resources.
  2336  	EndpointPolicies []*EndpointPolicy `json:"endpointPolicies,omitempty"`
  2337  	// NextPageToken: If there might be more results than those appearing in this
  2338  	// response, then `next_page_token` is included. To get the next set of
  2339  	// results, call this method again using the value of `next_page_token` as
  2340  	// `page_token`.
  2341  	NextPageToken string `json:"nextPageToken,omitempty"`
  2342  
  2343  	// ServerResponse contains the HTTP response code and headers from the server.
  2344  	googleapi.ServerResponse `json:"-"`
  2345  	// ForceSendFields is a list of field names (e.g. "EndpointPolicies") to
  2346  	// unconditionally include in API requests. By default, fields with empty or
  2347  	// default values are omitted from API requests. See
  2348  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2349  	// details.
  2350  	ForceSendFields []string `json:"-"`
  2351  	// NullFields is a list of field names (e.g. "EndpointPolicies") to include in
  2352  	// API requests with the JSON null value. By default, fields with empty values
  2353  	// are omitted from API requests. See
  2354  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2355  	NullFields []string `json:"-"`
  2356  }
  2357  
  2358  func (s *ListEndpointPoliciesResponse) MarshalJSON() ([]byte, error) {
  2359  	type NoMethod ListEndpointPoliciesResponse
  2360  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2361  }
  2362  
  2363  // ListGatewaysResponse: Response returned by the ListGateways method.
  2364  type ListGatewaysResponse struct {
  2365  	// Gateways: List of Gateway resources.
  2366  	Gateways []*Gateway `json:"gateways,omitempty"`
  2367  	// NextPageToken: If there might be more results than those appearing in this
  2368  	// response, then `next_page_token` is included. To get the next set of
  2369  	// results, call this method again using the value of `next_page_token` as
  2370  	// `page_token`.
  2371  	NextPageToken string `json:"nextPageToken,omitempty"`
  2372  	// Unreachable: Locations that could not be reached.
  2373  	Unreachable []string `json:"unreachable,omitempty"`
  2374  
  2375  	// ServerResponse contains the HTTP response code and headers from the server.
  2376  	googleapi.ServerResponse `json:"-"`
  2377  	// ForceSendFields is a list of field names (e.g. "Gateways") to
  2378  	// unconditionally include in API requests. By default, fields with empty or
  2379  	// default values are omitted from API requests. See
  2380  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2381  	// details.
  2382  	ForceSendFields []string `json:"-"`
  2383  	// NullFields is a list of field names (e.g. "Gateways") to include in API
  2384  	// requests with the JSON null value. By default, fields with empty values are
  2385  	// omitted from API requests. See
  2386  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2387  	NullFields []string `json:"-"`
  2388  }
  2389  
  2390  func (s *ListGatewaysResponse) MarshalJSON() ([]byte, error) {
  2391  	type NoMethod ListGatewaysResponse
  2392  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2393  }
  2394  
  2395  // ListGrpcRoutesResponse: Response returned by the ListGrpcRoutes method.
  2396  type ListGrpcRoutesResponse struct {
  2397  	// GrpcRoutes: List of GrpcRoute resources.
  2398  	GrpcRoutes []*GrpcRoute `json:"grpcRoutes,omitempty"`
  2399  	// NextPageToken: If there might be more results than those appearing in this
  2400  	// response, then `next_page_token` is included. To get the next set of
  2401  	// results, call this method again using the value of `next_page_token` as
  2402  	// `page_token`.
  2403  	NextPageToken string `json:"nextPageToken,omitempty"`
  2404  
  2405  	// ServerResponse contains the HTTP response code and headers from the server.
  2406  	googleapi.ServerResponse `json:"-"`
  2407  	// ForceSendFields is a list of field names (e.g. "GrpcRoutes") to
  2408  	// unconditionally include in API requests. By default, fields with empty or
  2409  	// default values are omitted from API requests. See
  2410  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2411  	// details.
  2412  	ForceSendFields []string `json:"-"`
  2413  	// NullFields is a list of field names (e.g. "GrpcRoutes") to include in API
  2414  	// requests with the JSON null value. By default, fields with empty values are
  2415  	// omitted from API requests. See
  2416  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2417  	NullFields []string `json:"-"`
  2418  }
  2419  
  2420  func (s *ListGrpcRoutesResponse) MarshalJSON() ([]byte, error) {
  2421  	type NoMethod ListGrpcRoutesResponse
  2422  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2423  }
  2424  
  2425  // ListHttpRoutesResponse: Response returned by the ListHttpRoutes method.
  2426  type ListHttpRoutesResponse struct {
  2427  	// HttpRoutes: List of HttpRoute resources.
  2428  	HttpRoutes []*HttpRoute `json:"httpRoutes,omitempty"`
  2429  	// NextPageToken: If there might be more results than those appearing in this
  2430  	// response, then `next_page_token` is included. To get the next set of
  2431  	// results, call this method again using the value of `next_page_token` as
  2432  	// `page_token`.
  2433  	NextPageToken string `json:"nextPageToken,omitempty"`
  2434  
  2435  	// ServerResponse contains the HTTP response code and headers from the server.
  2436  	googleapi.ServerResponse `json:"-"`
  2437  	// ForceSendFields is a list of field names (e.g. "HttpRoutes") to
  2438  	// unconditionally include in API requests. By default, fields with empty or
  2439  	// default values are omitted from API requests. See
  2440  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2441  	// details.
  2442  	ForceSendFields []string `json:"-"`
  2443  	// NullFields is a list of field names (e.g. "HttpRoutes") to include in API
  2444  	// requests with the JSON null value. By default, fields with empty values are
  2445  	// omitted from API requests. See
  2446  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2447  	NullFields []string `json:"-"`
  2448  }
  2449  
  2450  func (s *ListHttpRoutesResponse) MarshalJSON() ([]byte, error) {
  2451  	type NoMethod ListHttpRoutesResponse
  2452  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2453  }
  2454  
  2455  // ListLbRouteExtensionsResponse: Message for response to listing
  2456  // `LbRouteExtension` resources.
  2457  type ListLbRouteExtensionsResponse struct {
  2458  	// LbRouteExtensions: The list of `LbRouteExtension` resources.
  2459  	LbRouteExtensions []*LbRouteExtension `json:"lbRouteExtensions,omitempty"`
  2460  	// NextPageToken: A token identifying a page of results that the server
  2461  	// returns.
  2462  	NextPageToken string `json:"nextPageToken,omitempty"`
  2463  	// Unreachable: Locations that could not be reached.
  2464  	Unreachable []string `json:"unreachable,omitempty"`
  2465  
  2466  	// ServerResponse contains the HTTP response code and headers from the server.
  2467  	googleapi.ServerResponse `json:"-"`
  2468  	// ForceSendFields is a list of field names (e.g. "LbRouteExtensions") to
  2469  	// unconditionally include in API requests. By default, fields with empty or
  2470  	// default values are omitted from API requests. See
  2471  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2472  	// details.
  2473  	ForceSendFields []string `json:"-"`
  2474  	// NullFields is a list of field names (e.g. "LbRouteExtensions") to include in
  2475  	// API requests with the JSON null value. By default, fields with empty values
  2476  	// are omitted from API requests. See
  2477  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2478  	NullFields []string `json:"-"`
  2479  }
  2480  
  2481  func (s *ListLbRouteExtensionsResponse) MarshalJSON() ([]byte, error) {
  2482  	type NoMethod ListLbRouteExtensionsResponse
  2483  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2484  }
  2485  
  2486  // ListLbTrafficExtensionsResponse: Message for response to listing
  2487  // `LbTrafficExtension` resources.
  2488  type ListLbTrafficExtensionsResponse struct {
  2489  	// LbTrafficExtensions: The list of `LbTrafficExtension` resources.
  2490  	LbTrafficExtensions []*LbTrafficExtension `json:"lbTrafficExtensions,omitempty"`
  2491  	// NextPageToken: A token identifying a page of results that the server
  2492  	// returns.
  2493  	NextPageToken string `json:"nextPageToken,omitempty"`
  2494  	// Unreachable: Locations that could not be reached.
  2495  	Unreachable []string `json:"unreachable,omitempty"`
  2496  
  2497  	// ServerResponse contains the HTTP response code and headers from the server.
  2498  	googleapi.ServerResponse `json:"-"`
  2499  	// ForceSendFields is a list of field names (e.g. "LbTrafficExtensions") to
  2500  	// unconditionally include in API requests. By default, fields with empty or
  2501  	// default values are omitted from API requests. See
  2502  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2503  	// details.
  2504  	ForceSendFields []string `json:"-"`
  2505  	// NullFields is a list of field names (e.g. "LbTrafficExtensions") to include
  2506  	// in API requests with the JSON null value. By default, fields with empty
  2507  	// values are omitted from API requests. See
  2508  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2509  	NullFields []string `json:"-"`
  2510  }
  2511  
  2512  func (s *ListLbTrafficExtensionsResponse) MarshalJSON() ([]byte, error) {
  2513  	type NoMethod ListLbTrafficExtensionsResponse
  2514  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2515  }
  2516  
  2517  // ListLocationsResponse: The response message for Locations.ListLocations.
  2518  type ListLocationsResponse struct {
  2519  	// Locations: A list of locations that matches the specified filter in the
  2520  	// request.
  2521  	Locations []*Location `json:"locations,omitempty"`
  2522  	// NextPageToken: The standard List next-page token.
  2523  	NextPageToken string `json:"nextPageToken,omitempty"`
  2524  
  2525  	// ServerResponse contains the HTTP response code and headers from the server.
  2526  	googleapi.ServerResponse `json:"-"`
  2527  	// ForceSendFields is a list of field names (e.g. "Locations") to
  2528  	// unconditionally include in API requests. By default, fields with empty or
  2529  	// default values are omitted from API requests. See
  2530  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2531  	// details.
  2532  	ForceSendFields []string `json:"-"`
  2533  	// NullFields is a list of field names (e.g. "Locations") to include in API
  2534  	// requests with the JSON null value. By default, fields with empty values are
  2535  	// omitted from API requests. See
  2536  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2537  	NullFields []string `json:"-"`
  2538  }
  2539  
  2540  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  2541  	type NoMethod ListLocationsResponse
  2542  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2543  }
  2544  
  2545  // ListMeshesResponse: Response returned by the ListMeshes method.
  2546  type ListMeshesResponse struct {
  2547  	// Meshes: List of Mesh resources.
  2548  	Meshes []*Mesh `json:"meshes,omitempty"`
  2549  	// NextPageToken: If there might be more results than those appearing in this
  2550  	// response, then `next_page_token` is included. To get the next set of
  2551  	// results, call this method again using the value of `next_page_token` as
  2552  	// `page_token`.
  2553  	NextPageToken string `json:"nextPageToken,omitempty"`
  2554  
  2555  	// ServerResponse contains the HTTP response code and headers from the server.
  2556  	googleapi.ServerResponse `json:"-"`
  2557  	// ForceSendFields is a list of field names (e.g. "Meshes") to unconditionally
  2558  	// include in API requests. By default, fields with empty or default values are
  2559  	// omitted from API requests. See
  2560  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2561  	// details.
  2562  	ForceSendFields []string `json:"-"`
  2563  	// NullFields is a list of field names (e.g. "Meshes") to include in API
  2564  	// requests with the JSON null value. By default, fields with empty values are
  2565  	// omitted from API requests. See
  2566  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2567  	NullFields []string `json:"-"`
  2568  }
  2569  
  2570  func (s *ListMeshesResponse) MarshalJSON() ([]byte, error) {
  2571  	type NoMethod ListMeshesResponse
  2572  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2573  }
  2574  
  2575  // ListOperationsResponse: The response message for Operations.ListOperations.
  2576  type ListOperationsResponse struct {
  2577  	// NextPageToken: The standard List next-page token.
  2578  	NextPageToken string `json:"nextPageToken,omitempty"`
  2579  	// Operations: A list of operations that matches the specified filter in the
  2580  	// request.
  2581  	Operations []*Operation `json:"operations,omitempty"`
  2582  
  2583  	// ServerResponse contains the HTTP response code and headers from the server.
  2584  	googleapi.ServerResponse `json:"-"`
  2585  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2586  	// unconditionally include in API requests. By default, fields with empty or
  2587  	// default values are omitted from API requests. See
  2588  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2589  	// details.
  2590  	ForceSendFields []string `json:"-"`
  2591  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2592  	// requests with the JSON null value. By default, fields with empty values are
  2593  	// omitted from API requests. See
  2594  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2595  	NullFields []string `json:"-"`
  2596  }
  2597  
  2598  func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  2599  	type NoMethod ListOperationsResponse
  2600  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2601  }
  2602  
  2603  // ListServiceBindingsResponse: Response returned by the ListServiceBindings
  2604  // method.
  2605  type ListServiceBindingsResponse struct {
  2606  	// NextPageToken: If there might be more results than those appearing in this
  2607  	// response, then `next_page_token` is included. To get the next set of
  2608  	// results, call this method again using the value of `next_page_token` as
  2609  	// `page_token`.
  2610  	NextPageToken string `json:"nextPageToken,omitempty"`
  2611  	// ServiceBindings: List of ServiceBinding resources.
  2612  	ServiceBindings []*ServiceBinding `json:"serviceBindings,omitempty"`
  2613  
  2614  	// ServerResponse contains the HTTP response code and headers from the server.
  2615  	googleapi.ServerResponse `json:"-"`
  2616  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2617  	// unconditionally include in API requests. By default, fields with empty or
  2618  	// default values are omitted from API requests. See
  2619  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2620  	// details.
  2621  	ForceSendFields []string `json:"-"`
  2622  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2623  	// requests with the JSON null value. By default, fields with empty values are
  2624  	// omitted from API requests. See
  2625  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2626  	NullFields []string `json:"-"`
  2627  }
  2628  
  2629  func (s *ListServiceBindingsResponse) MarshalJSON() ([]byte, error) {
  2630  	type NoMethod ListServiceBindingsResponse
  2631  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2632  }
  2633  
  2634  // ListServiceLbPoliciesResponse: Response returned by the
  2635  // ListServiceLbPolicies method.
  2636  type ListServiceLbPoliciesResponse struct {
  2637  	// NextPageToken: If there might be more results than those appearing in this
  2638  	// response, then `next_page_token` is included. To get the next set of
  2639  	// results, call this method again using the value of `next_page_token` as
  2640  	// `page_token`.
  2641  	NextPageToken string `json:"nextPageToken,omitempty"`
  2642  	// ServiceLbPolicies: List of ServiceLbPolicy resources.
  2643  	ServiceLbPolicies []*ServiceLbPolicy `json:"serviceLbPolicies,omitempty"`
  2644  
  2645  	// ServerResponse contains the HTTP response code and headers from the server.
  2646  	googleapi.ServerResponse `json:"-"`
  2647  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2648  	// unconditionally include in API requests. By default, fields with empty or
  2649  	// default values are omitted from API requests. See
  2650  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2651  	// details.
  2652  	ForceSendFields []string `json:"-"`
  2653  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2654  	// requests with the JSON null value. By default, fields with empty values are
  2655  	// omitted from API requests. See
  2656  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2657  	NullFields []string `json:"-"`
  2658  }
  2659  
  2660  func (s *ListServiceLbPoliciesResponse) MarshalJSON() ([]byte, error) {
  2661  	type NoMethod ListServiceLbPoliciesResponse
  2662  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2663  }
  2664  
  2665  // ListTcpRoutesResponse: Response returned by the ListTcpRoutes method.
  2666  type ListTcpRoutesResponse struct {
  2667  	// NextPageToken: If there might be more results than those appearing in this
  2668  	// response, then `next_page_token` is included. To get the next set of
  2669  	// results, call this method again using the value of `next_page_token` as
  2670  	// `page_token`.
  2671  	NextPageToken string `json:"nextPageToken,omitempty"`
  2672  	// TcpRoutes: List of TcpRoute resources.
  2673  	TcpRoutes []*TcpRoute `json:"tcpRoutes,omitempty"`
  2674  
  2675  	// ServerResponse contains the HTTP response code and headers from the server.
  2676  	googleapi.ServerResponse `json:"-"`
  2677  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2678  	// unconditionally include in API requests. By default, fields with empty or
  2679  	// default values are omitted from API requests. See
  2680  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2681  	// details.
  2682  	ForceSendFields []string `json:"-"`
  2683  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2684  	// requests with the JSON null value. By default, fields with empty values are
  2685  	// omitted from API requests. See
  2686  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2687  	NullFields []string `json:"-"`
  2688  }
  2689  
  2690  func (s *ListTcpRoutesResponse) MarshalJSON() ([]byte, error) {
  2691  	type NoMethod ListTcpRoutesResponse
  2692  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2693  }
  2694  
  2695  // ListTlsRoutesResponse: Response returned by the ListTlsRoutes method.
  2696  type ListTlsRoutesResponse struct {
  2697  	// NextPageToken: If there might be more results than those appearing in this
  2698  	// response, then `next_page_token` is included. To get the next set of
  2699  	// results, call this method again using the value of `next_page_token` as
  2700  	// `page_token`.
  2701  	NextPageToken string `json:"nextPageToken,omitempty"`
  2702  	// TlsRoutes: List of TlsRoute resources.
  2703  	TlsRoutes []*TlsRoute `json:"tlsRoutes,omitempty"`
  2704  
  2705  	// ServerResponse contains the HTTP response code and headers from the server.
  2706  	googleapi.ServerResponse `json:"-"`
  2707  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  2708  	// unconditionally include in API requests. By default, fields with empty or
  2709  	// default values are omitted from API requests. See
  2710  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2711  	// details.
  2712  	ForceSendFields []string `json:"-"`
  2713  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  2714  	// requests with the JSON null value. By default, fields with empty values are
  2715  	// omitted from API requests. See
  2716  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2717  	NullFields []string `json:"-"`
  2718  }
  2719  
  2720  func (s *ListTlsRoutesResponse) MarshalJSON() ([]byte, error) {
  2721  	type NoMethod ListTlsRoutesResponse
  2722  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2723  }
  2724  
  2725  // Location: A resource that represents a Google Cloud location.
  2726  type Location struct {
  2727  	// DisplayName: The friendly name for this location, typically a nearby city
  2728  	// name. For example, "Tokyo".
  2729  	DisplayName string `json:"displayName,omitempty"`
  2730  	// Labels: Cross-service attributes for the location. For example
  2731  	// {"cloud.googleapis.com/region": "us-east1"}
  2732  	Labels map[string]string `json:"labels,omitempty"`
  2733  	// LocationId: The canonical id for this location. For example: "us-east1".
  2734  	LocationId string `json:"locationId,omitempty"`
  2735  	// Metadata: Service-specific metadata. For example the available capacity at
  2736  	// the given location.
  2737  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2738  	// Name: Resource name for the location, which may vary between
  2739  	// implementations. For example:
  2740  	// "projects/example-project/locations/us-east1"
  2741  	Name string `json:"name,omitempty"`
  2742  
  2743  	// ServerResponse contains the HTTP response code and headers from the server.
  2744  	googleapi.ServerResponse `json:"-"`
  2745  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  2746  	// unconditionally include in API requests. By default, fields with empty or
  2747  	// default values are omitted from API requests. See
  2748  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2749  	// details.
  2750  	ForceSendFields []string `json:"-"`
  2751  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  2752  	// requests with the JSON null value. By default, fields with empty values are
  2753  	// omitted from API requests. See
  2754  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2755  	NullFields []string `json:"-"`
  2756  }
  2757  
  2758  func (s *Location) MarshalJSON() ([]byte, error) {
  2759  	type NoMethod Location
  2760  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2761  }
  2762  
  2763  // Mesh: Mesh represents a logical configuration grouping for workload to
  2764  // workload communication within a service mesh. Routes that point to mesh
  2765  // dictate how requests are routed within this logical mesh boundary.
  2766  type Mesh struct {
  2767  	// CreateTime: Output only. The timestamp when the resource was created.
  2768  	CreateTime string `json:"createTime,omitempty"`
  2769  	// Description: Optional. A free-text description of the resource. Max length
  2770  	// 1024 characters.
  2771  	Description string `json:"description,omitempty"`
  2772  	// EnvoyHeaders: Optional. Determines if envoy will insert internal debug
  2773  	// headers into upstream requests. Other Envoy headers may still be injected.
  2774  	// By default, envoy will not insert any debug headers.
  2775  	//
  2776  	// Possible values:
  2777  	//   "ENVOY_HEADERS_UNSPECIFIED" - Defaults to NONE.
  2778  	//   "NONE" - Suppress envoy debug headers.
  2779  	//   "DEBUG_HEADERS" - Envoy will insert default internal debug headers into
  2780  	// upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry
  2781  	// x-envoy-expected-rq-timeout-ms x-envoy-original-path
  2782  	// x-envoy-upstream-stream-duration-ms
  2783  	EnvoyHeaders string `json:"envoyHeaders,omitempty"`
  2784  	// InterceptionPort: Optional. If set to a valid TCP port (1-65535), instructs
  2785  	// the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1)
  2786  	// address. The SIDECAR proxy will expect all traffic to be redirected to this
  2787  	// port regardless of its actual ip:port destination. If unset, a port '15001'
  2788  	// is used as the interception port. This is applicable only for sidecar proxy
  2789  	// deployments.
  2790  	InterceptionPort int64 `json:"interceptionPort,omitempty"`
  2791  	// Labels: Optional. Set of label tags associated with the Mesh resource.
  2792  	Labels map[string]string `json:"labels,omitempty"`
  2793  	// Name: Required. Name of the Mesh resource. It matches pattern
  2794  	// `projects/*/locations/global/meshes/`.
  2795  	Name string `json:"name,omitempty"`
  2796  	// SelfLink: Output only. Server-defined URL of this resource
  2797  	SelfLink string `json:"selfLink,omitempty"`
  2798  	// UpdateTime: Output only. The timestamp when the resource was updated.
  2799  	UpdateTime string `json:"updateTime,omitempty"`
  2800  
  2801  	// ServerResponse contains the HTTP response code and headers from the server.
  2802  	googleapi.ServerResponse `json:"-"`
  2803  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2804  	// unconditionally include in API requests. By default, fields with empty or
  2805  	// default values are omitted from API requests. See
  2806  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2807  	// details.
  2808  	ForceSendFields []string `json:"-"`
  2809  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2810  	// requests with the JSON null value. By default, fields with empty values are
  2811  	// omitted from API requests. See
  2812  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2813  	NullFields []string `json:"-"`
  2814  }
  2815  
  2816  func (s *Mesh) MarshalJSON() ([]byte, error) {
  2817  	type NoMethod Mesh
  2818  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2819  }
  2820  
  2821  // Operation: This resource represents a long-running operation that is the
  2822  // result of a network API call.
  2823  type Operation struct {
  2824  	// Done: If the value is `false`, it means the operation is still in progress.
  2825  	// If `true`, the operation is completed, and either `error` or `response` is
  2826  	// available.
  2827  	Done bool `json:"done,omitempty"`
  2828  	// Error: The error result of the operation in case of failure or cancellation.
  2829  	Error *Status `json:"error,omitempty"`
  2830  	// Metadata: Service-specific metadata associated with the operation. It
  2831  	// typically contains progress information and common metadata such as create
  2832  	// time. Some services might not provide such metadata. Any method that returns
  2833  	// a long-running operation should document the metadata type, if any.
  2834  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  2835  	// Name: The server-assigned name, which is only unique within the same service
  2836  	// that originally returns it. If you use the default HTTP mapping, the `name`
  2837  	// should be a resource name ending with `operations/{unique_id}`.
  2838  	Name string `json:"name,omitempty"`
  2839  	// Response: The normal, successful response of the operation. If the original
  2840  	// method returns no data on success, such as `Delete`, the response is
  2841  	// `google.protobuf.Empty`. If the original method is standard
  2842  	// `Get`/`Create`/`Update`, the response should be the resource. For other
  2843  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
  2844  	// original method name. For example, if the original method name is
  2845  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
  2846  	Response googleapi.RawMessage `json:"response,omitempty"`
  2847  
  2848  	// ServerResponse contains the HTTP response code and headers from the server.
  2849  	googleapi.ServerResponse `json:"-"`
  2850  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
  2851  	// include in API requests. By default, fields with empty or default values are
  2852  	// omitted from API requests. See
  2853  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2854  	// details.
  2855  	ForceSendFields []string `json:"-"`
  2856  	// NullFields is a list of field names (e.g. "Done") to include in API requests
  2857  	// with the JSON null value. By default, fields with empty values are omitted
  2858  	// from API requests. See
  2859  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2860  	NullFields []string `json:"-"`
  2861  }
  2862  
  2863  func (s *Operation) MarshalJSON() ([]byte, error) {
  2864  	type NoMethod Operation
  2865  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2866  }
  2867  
  2868  // OperationMetadata: Represents the metadata of the long-running operation.
  2869  type OperationMetadata struct {
  2870  	// ApiVersion: Output only. API version used to start the operation.
  2871  	ApiVersion string `json:"apiVersion,omitempty"`
  2872  	// CreateTime: Output only. The time the operation was created.
  2873  	CreateTime string `json:"createTime,omitempty"`
  2874  	// EndTime: Output only. The time the operation finished running.
  2875  	EndTime string `json:"endTime,omitempty"`
  2876  	// RequestedCancellation: Output only. Identifies whether the user has
  2877  	// requested cancellation of the operation. Operations that have successfully
  2878  	// been cancelled have Operation.error value with a google.rpc.Status.code of
  2879  	// 1, corresponding to `Code.CANCELLED`.
  2880  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  2881  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  2882  	StatusMessage string `json:"statusMessage,omitempty"`
  2883  	// Target: Output only. Server-defined resource path for the target of the
  2884  	// operation.
  2885  	Target string `json:"target,omitempty"`
  2886  	// Verb: Output only. Name of the verb executed by the operation.
  2887  	Verb string `json:"verb,omitempty"`
  2888  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  2889  	// unconditionally include in API requests. By default, fields with empty or
  2890  	// default values are omitted from API requests. See
  2891  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2892  	// details.
  2893  	ForceSendFields []string `json:"-"`
  2894  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  2895  	// requests with the JSON null value. By default, fields with empty values are
  2896  	// omitted from API requests. See
  2897  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2898  	NullFields []string `json:"-"`
  2899  }
  2900  
  2901  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  2902  	type NoMethod OperationMetadata
  2903  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2904  }
  2905  
  2906  // Policy: An Identity and Access Management (IAM) policy, which specifies
  2907  // access controls for Google Cloud resources. A `Policy` is a collection of
  2908  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  2909  // single `role`. Principals can be user accounts, service accounts, Google
  2910  // groups, and domains (such as G Suite). A `role` is a named list of
  2911  // permissions; each `role` can be an IAM predefined role or a user-created
  2912  // custom role. For some types of Google Cloud resources, a `binding` can also
  2913  // specify a `condition`, which is a logical expression that allows access to a
  2914  // resource only if the expression evaluates to `true`. A condition can add
  2915  // constraints based on attributes of the request, the resource, or both. To
  2916  // learn which resources support conditions in their IAM policies, see the IAM
  2917  // documentation
  2918  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  2919  // example:** ``` { "bindings": [ { "role":
  2920  // "roles/resourcemanager.organizationAdmin", "members": [
  2921  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  2922  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  2923  // "roles/resourcemanager.organizationViewer", "members": [
  2924  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  2925  // "description": "Does not grant access after Sep 2020", "expression":
  2926  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  2927  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  2928  // members: - user:mike@example.com - group:admins@example.com -
  2929  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  2930  // role: roles/resourcemanager.organizationAdmin - members: -
  2931  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  2932  // condition: title: expirable access description: Does not grant access after
  2933  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  2934  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  2935  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  2936  type Policy struct {
  2937  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  2938  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  2939  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  2940  	// Optionally, may specify a `condition` that determines how and when the
  2941  	// `bindings` are applied. Each of the `bindings` must contain at least one
  2942  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  2943  	// up to 250 of these principals can be Google groups. Each occurrence of a
  2944  	// principal counts towards these limits. For example, if the `bindings` grant
  2945  	// 50 different roles to `user:alice@example.com`, and not to any other
  2946  	// principal, then you can add another 1,450 principals to the `bindings` in
  2947  	// the `Policy`.
  2948  	Bindings []*Binding `json:"bindings,omitempty"`
  2949  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  2950  	// prevent simultaneous updates of a policy from overwriting each other. It is
  2951  	// strongly suggested that systems make use of the `etag` in the
  2952  	// read-modify-write cycle to perform policy updates in order to avoid race
  2953  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  2954  	// systems are expected to put that etag in the request to `setIamPolicy` to
  2955  	// ensure that their change will be applied to the same version of the policy.
  2956  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2957  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2958  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2959  	// the conditions in the version `3` policy are lost.
  2960  	Etag string `json:"etag,omitempty"`
  2961  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  2962  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  2963  	// affects conditional role bindings must specify version `3`. This requirement
  2964  	// applies to the following operations: * Getting a policy that includes a
  2965  	// conditional role binding * Adding a conditional role binding to a policy *
  2966  	// Changing a conditional role binding in a policy * Removing any role binding,
  2967  	// with or without a condition, from a policy that includes conditions
  2968  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2969  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2970  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2971  	// the conditions in the version `3` policy are lost. If a policy does not
  2972  	// include any conditions, operations on that policy may specify any valid
  2973  	// version or leave the field unset. To learn which resources support
  2974  	// conditions in their IAM policies, see the IAM documentation
  2975  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2976  	Version int64 `json:"version,omitempty"`
  2977  
  2978  	// ServerResponse contains the HTTP response code and headers from the server.
  2979  	googleapi.ServerResponse `json:"-"`
  2980  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2981  	// unconditionally include in API requests. By default, fields with empty or
  2982  	// default values are omitted from API requests. See
  2983  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2984  	// details.
  2985  	ForceSendFields []string `json:"-"`
  2986  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  2987  	// requests with the JSON null value. By default, fields with empty values are
  2988  	// omitted from API requests. See
  2989  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2990  	NullFields []string `json:"-"`
  2991  }
  2992  
  2993  func (s *Policy) MarshalJSON() ([]byte, error) {
  2994  	type NoMethod Policy
  2995  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2996  }
  2997  
  2998  // ServiceBinding: ServiceBinding is the resource that defines a Service
  2999  // Directory Service to be used in a BackendService resource.
  3000  type ServiceBinding struct {
  3001  	// CreateTime: Output only. The timestamp when the resource was created.
  3002  	CreateTime string `json:"createTime,omitempty"`
  3003  	// Description: Optional. A free-text description of the resource. Max length
  3004  	// 1024 characters.
  3005  	Description string `json:"description,omitempty"`
  3006  	// Labels: Optional. Set of label tags associated with the ServiceBinding
  3007  	// resource.
  3008  	Labels map[string]string `json:"labels,omitempty"`
  3009  	// Name: Required. Name of the ServiceBinding resource. It matches pattern
  3010  	// `projects/*/locations/global/serviceBindings/service_binding_name`.
  3011  	Name string `json:"name,omitempty"`
  3012  	// Service: Required. The full Service Directory Service name of the format
  3013  	// projects/*/locations/*/namespaces/*/services/*
  3014  	Service string `json:"service,omitempty"`
  3015  	// ServiceId: Output only. The unique identifier of the Service Directory
  3016  	// Service against which the Service Binding resource is validated. This is
  3017  	// populated when the Service Binding resource is used in another resource
  3018  	// (like Backend Service). This is of the UUID4 format.
  3019  	ServiceId string `json:"serviceId,omitempty"`
  3020  	// UpdateTime: Output only. The timestamp when the resource was updated.
  3021  	UpdateTime string `json:"updateTime,omitempty"`
  3022  
  3023  	// ServerResponse contains the HTTP response code and headers from the server.
  3024  	googleapi.ServerResponse `json:"-"`
  3025  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3026  	// unconditionally include in API requests. By default, fields with empty or
  3027  	// default values are omitted from API requests. See
  3028  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3029  	// details.
  3030  	ForceSendFields []string `json:"-"`
  3031  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3032  	// requests with the JSON null value. By default, fields with empty values are
  3033  	// omitted from API requests. See
  3034  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3035  	NullFields []string `json:"-"`
  3036  }
  3037  
  3038  func (s *ServiceBinding) MarshalJSON() ([]byte, error) {
  3039  	type NoMethod ServiceBinding
  3040  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3041  }
  3042  
  3043  // ServiceLbPolicy: ServiceLbPolicy holds global load balancing and traffic
  3044  // distribution configuration that can be applied to a BackendService.
  3045  type ServiceLbPolicy struct {
  3046  	// AutoCapacityDrain: Optional. Configuration to automatically move traffic
  3047  	// away for unhealthy IG/NEG for the associated Backend Service.
  3048  	AutoCapacityDrain *ServiceLbPolicyAutoCapacityDrain `json:"autoCapacityDrain,omitempty"`
  3049  	// CreateTime: Output only. The timestamp when this resource was created.
  3050  	CreateTime string `json:"createTime,omitempty"`
  3051  	// Description: Optional. A free-text description of the resource. Max length
  3052  	// 1024 characters.
  3053  	Description string `json:"description,omitempty"`
  3054  	// FailoverConfig: Optional. Configuration related to health based failover.
  3055  	FailoverConfig *ServiceLbPolicyFailoverConfig `json:"failoverConfig,omitempty"`
  3056  	// Labels: Optional. Set of label tags associated with the ServiceLbPolicy
  3057  	// resource.
  3058  	Labels map[string]string `json:"labels,omitempty"`
  3059  	// LoadBalancingAlgorithm: Optional. The type of load balancing algorithm to be
  3060  	// used. The default behavior is WATERFALL_BY_REGION.
  3061  	//
  3062  	// Possible values:
  3063  	//   "LOAD_BALANCING_ALGORITHM_UNSPECIFIED" - The type of the loadbalancing
  3064  	// algorithm is unspecified.
  3065  	//   "SPRAY_TO_WORLD" - Balance traffic across all backends across the world
  3066  	// proportionally based on capacity.
  3067  	//   "SPRAY_TO_REGION" - Direct traffic to the nearest region with endpoints
  3068  	// and capacity before spilling over to other regions and spread the traffic
  3069  	// from each client to all the MIGs/NEGs in a region.
  3070  	//   "WATERFALL_BY_REGION" - Direct traffic to the nearest region with
  3071  	// endpoints and capacity before spilling over to other regions. All MIGs/NEGs
  3072  	// within a region are evenly loaded but each client might not spread the
  3073  	// traffic to all the MIGs/NEGs in the region.
  3074  	//   "WATERFALL_BY_ZONE" - Attempt to keep traffic in a single zone closest to
  3075  	// the client, before spilling over to other zones.
  3076  	LoadBalancingAlgorithm string `json:"loadBalancingAlgorithm,omitempty"`
  3077  	// Name: Required. Name of the ServiceLbPolicy resource. It matches pattern
  3078  	// `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy
  3079  	// _name}`.
  3080  	Name string `json:"name,omitempty"`
  3081  	// UpdateTime: Output only. The timestamp when this resource was last updated.
  3082  	UpdateTime string `json:"updateTime,omitempty"`
  3083  
  3084  	// ServerResponse contains the HTTP response code and headers from the server.
  3085  	googleapi.ServerResponse `json:"-"`
  3086  	// ForceSendFields is a list of field names (e.g. "AutoCapacityDrain") to
  3087  	// unconditionally include in API requests. By default, fields with empty or
  3088  	// default values are omitted from API requests. See
  3089  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3090  	// details.
  3091  	ForceSendFields []string `json:"-"`
  3092  	// NullFields is a list of field names (e.g. "AutoCapacityDrain") to include in
  3093  	// API requests with the JSON null value. By default, fields with empty values
  3094  	// are omitted from API requests. See
  3095  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3096  	NullFields []string `json:"-"`
  3097  }
  3098  
  3099  func (s *ServiceLbPolicy) MarshalJSON() ([]byte, error) {
  3100  	type NoMethod ServiceLbPolicy
  3101  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3102  }
  3103  
  3104  // ServiceLbPolicyAutoCapacityDrain: Option to specify if an unhealthy IG/NEG
  3105  // should be considered for global load balancing and traffic routing.
  3106  type ServiceLbPolicyAutoCapacityDrain struct {
  3107  	// Enable: Optional. If set to 'True', an unhealthy IG/NEG will be set as
  3108  	// drained. - An IG/NEG is considered unhealthy if less than 25% of the
  3109  	// instances/endpoints in the IG/NEG are healthy. - This option will never
  3110  	// result in draining more than 50% of the configured IGs/NEGs for the Backend
  3111  	// Service.
  3112  	Enable bool `json:"enable,omitempty"`
  3113  	// ForceSendFields is a list of field names (e.g. "Enable") to unconditionally
  3114  	// include in API requests. By default, fields with empty or default values are
  3115  	// omitted from API requests. See
  3116  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3117  	// details.
  3118  	ForceSendFields []string `json:"-"`
  3119  	// NullFields is a list of field names (e.g. "Enable") to include in API
  3120  	// requests with the JSON null value. By default, fields with empty values are
  3121  	// omitted from API requests. See
  3122  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3123  	NullFields []string `json:"-"`
  3124  }
  3125  
  3126  func (s *ServiceLbPolicyAutoCapacityDrain) MarshalJSON() ([]byte, error) {
  3127  	type NoMethod ServiceLbPolicyAutoCapacityDrain
  3128  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3129  }
  3130  
  3131  // ServiceLbPolicyFailoverConfig: Option to specify health based failover
  3132  // behavior. This is not related to Network load balancer FailoverPolicy.
  3133  type ServiceLbPolicyFailoverConfig struct {
  3134  	// FailoverHealthThreshold: Optional. The percentage threshold that a load
  3135  	// balancer will begin to send traffic to failover backends. If the percentage
  3136  	// of endpoints in a MIG/NEG is smaller than this value, traffic would be sent
  3137  	// to failover backends if possible. This field should be set to a value
  3138  	// between 1 and 99. The default value is 50 for Global external HTTP(S) load
  3139  	// balancer (classic) and Proxyless service mesh, and 70 for others.
  3140  	FailoverHealthThreshold int64 `json:"failoverHealthThreshold,omitempty"`
  3141  	// ForceSendFields is a list of field names (e.g. "FailoverHealthThreshold") to
  3142  	// unconditionally include in API requests. By default, fields with empty or
  3143  	// default values are omitted from API requests. See
  3144  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3145  	// details.
  3146  	ForceSendFields []string `json:"-"`
  3147  	// NullFields is a list of field names (e.g. "FailoverHealthThreshold") to
  3148  	// include in API requests with the JSON null value. By default, fields with
  3149  	// empty values are omitted from API requests. See
  3150  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3151  	NullFields []string `json:"-"`
  3152  }
  3153  
  3154  func (s *ServiceLbPolicyFailoverConfig) MarshalJSON() ([]byte, error) {
  3155  	type NoMethod ServiceLbPolicyFailoverConfig
  3156  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3157  }
  3158  
  3159  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  3160  type SetIamPolicyRequest struct {
  3161  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  3162  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  3163  	// policy but certain Google Cloud services (such as Projects) might reject
  3164  	// them.
  3165  	Policy *Policy `json:"policy,omitempty"`
  3166  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  3167  	// modify. Only the fields in the mask will be modified. If no mask is
  3168  	// provided, the following default mask is used: `paths: "bindings, etag"
  3169  	UpdateMask string `json:"updateMask,omitempty"`
  3170  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  3171  	// include in API requests. By default, fields with empty or default values are
  3172  	// omitted from API requests. See
  3173  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3174  	// details.
  3175  	ForceSendFields []string `json:"-"`
  3176  	// NullFields is a list of field names (e.g. "Policy") to include in API
  3177  	// requests with the JSON null value. By default, fields with empty values are
  3178  	// omitted from API requests. See
  3179  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3180  	NullFields []string `json:"-"`
  3181  }
  3182  
  3183  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  3184  	type NoMethod SetIamPolicyRequest
  3185  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3186  }
  3187  
  3188  // Status: The `Status` type defines a logical error model that is suitable for
  3189  // different programming environments, including REST APIs and RPC APIs. It is
  3190  // used by gRPC (https://github.com/grpc). Each `Status` message contains three
  3191  // pieces of data: error code, error message, and error details. You can find
  3192  // out more about this error model and how to work with it in the API Design
  3193  // Guide (https://cloud.google.com/apis/design/errors).
  3194  type Status struct {
  3195  	// Code: The status code, which should be an enum value of google.rpc.Code.
  3196  	Code int64 `json:"code,omitempty"`
  3197  	// Details: A list of messages that carry the error details. There is a common
  3198  	// set of message types for APIs to use.
  3199  	Details []googleapi.RawMessage `json:"details,omitempty"`
  3200  	// Message: A developer-facing error message, which should be in English. Any
  3201  	// user-facing error message should be localized and sent in the
  3202  	// google.rpc.Status.details field, or localized by the client.
  3203  	Message string `json:"message,omitempty"`
  3204  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3205  	// include in API requests. By default, fields with empty or default values are
  3206  	// omitted from API requests. See
  3207  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3208  	// details.
  3209  	ForceSendFields []string `json:"-"`
  3210  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3211  	// with the JSON null value. By default, fields with empty values are omitted
  3212  	// from API requests. See
  3213  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3214  	NullFields []string `json:"-"`
  3215  }
  3216  
  3217  func (s *Status) MarshalJSON() ([]byte, error) {
  3218  	type NoMethod Status
  3219  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3220  }
  3221  
  3222  // TcpRoute: TcpRoute is the resource defining how TCP traffic should be routed
  3223  // by a Mesh/Gateway resource.
  3224  type TcpRoute struct {
  3225  	// CreateTime: Output only. The timestamp when the resource was created.
  3226  	CreateTime string `json:"createTime,omitempty"`
  3227  	// Description: Optional. A free-text description of the resource. Max length
  3228  	// 1024 characters.
  3229  	Description string `json:"description,omitempty"`
  3230  	// Gateways: Optional. Gateways defines a list of gateways this TcpRoute is
  3231  	// attached to, as one of the routing rules to route the requests served by the
  3232  	// gateway. Each gateway reference should match the pattern:
  3233  	// `projects/*/locations/global/gateways/`
  3234  	Gateways []string `json:"gateways,omitempty"`
  3235  	// Labels: Optional. Set of label tags associated with the TcpRoute resource.
  3236  	Labels map[string]string `json:"labels,omitempty"`
  3237  	// Meshes: Optional. Meshes defines a list of meshes this TcpRoute is attached
  3238  	// to, as one of the routing rules to route the requests served by the mesh.
  3239  	// Each mesh reference should match the pattern:
  3240  	// `projects/*/locations/global/meshes/` The attached Mesh should be of a type
  3241  	// SIDECAR
  3242  	Meshes []string `json:"meshes,omitempty"`
  3243  	// Name: Required. Name of the TcpRoute resource. It matches pattern
  3244  	// `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
  3245  	Name string `json:"name,omitempty"`
  3246  	// Rules: Required. Rules that define how traffic is routed and handled. At
  3247  	// least one RouteRule must be supplied. If there are multiple rules then the
  3248  	// action taken will be the first rule to match.
  3249  	Rules []*TcpRouteRouteRule `json:"rules,omitempty"`
  3250  	// SelfLink: Output only. Server-defined URL of this resource
  3251  	SelfLink string `json:"selfLink,omitempty"`
  3252  	// UpdateTime: Output only. The timestamp when the resource was updated.
  3253  	UpdateTime string `json:"updateTime,omitempty"`
  3254  
  3255  	// ServerResponse contains the HTTP response code and headers from the server.
  3256  	googleapi.ServerResponse `json:"-"`
  3257  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3258  	// unconditionally include in API requests. By default, fields with empty or
  3259  	// default values are omitted from API requests. See
  3260  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3261  	// details.
  3262  	ForceSendFields []string `json:"-"`
  3263  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3264  	// requests with the JSON null value. By default, fields with empty values are
  3265  	// omitted from API requests. See
  3266  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3267  	NullFields []string `json:"-"`
  3268  }
  3269  
  3270  func (s *TcpRoute) MarshalJSON() ([]byte, error) {
  3271  	type NoMethod TcpRoute
  3272  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3273  }
  3274  
  3275  // TcpRouteRouteAction: The specifications for routing traffic and applying
  3276  // associated policies.
  3277  type TcpRouteRouteAction struct {
  3278  	// Destinations: Optional. The destination services to which traffic should be
  3279  	// forwarded. At least one destination service is required. Only one of route
  3280  	// destination or original destination can be set.
  3281  	Destinations []*TcpRouteRouteDestination `json:"destinations,omitempty"`
  3282  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  3283  	// The idle timeout is defined as the period in which there are no bytes sent
  3284  	// or received on either the upstream or downstream connection. If not set, the
  3285  	// default idle timeout is 30 seconds. If set to 0s, the timeout will be
  3286  	// disabled.
  3287  	IdleTimeout string `json:"idleTimeout,omitempty"`
  3288  	// OriginalDestination: Optional. If true, Router will use the destination IP
  3289  	// and port of the original connection as the destination of the request.
  3290  	// Default is false. Only one of route destinations or original destination can
  3291  	// be set.
  3292  	OriginalDestination bool `json:"originalDestination,omitempty"`
  3293  	// ForceSendFields is a list of field names (e.g. "Destinations") to
  3294  	// unconditionally include in API requests. By default, fields with empty or
  3295  	// default values are omitted from API requests. See
  3296  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3297  	// details.
  3298  	ForceSendFields []string `json:"-"`
  3299  	// NullFields is a list of field names (e.g. "Destinations") to include in API
  3300  	// requests with the JSON null value. By default, fields with empty values are
  3301  	// omitted from API requests. See
  3302  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3303  	NullFields []string `json:"-"`
  3304  }
  3305  
  3306  func (s *TcpRouteRouteAction) MarshalJSON() ([]byte, error) {
  3307  	type NoMethod TcpRouteRouteAction
  3308  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3309  }
  3310  
  3311  // TcpRouteRouteDestination: Describe the destination for traffic to be routed
  3312  // to.
  3313  type TcpRouteRouteDestination struct {
  3314  	// ServiceName: Required. The URL of a BackendService to route traffic to.
  3315  	ServiceName string `json:"serviceName,omitempty"`
  3316  	// Weight: Optional. Specifies the proportion of requests forwarded to the
  3317  	// backend referenced by the serviceName field. This is computed as: -
  3318  	// weight/Sum(weights in this destination list). For non-zero values, there may
  3319  	// be some epsilon from the exact proportion defined here depending on the
  3320  	// precision an implementation supports. If only one serviceName is specified
  3321  	// and it has a weight greater than 0, 100% of the traffic is forwarded to that
  3322  	// backend. If weights are specified for any one service name, they need to be
  3323  	// specified for all of them. If weights are unspecified for all services,
  3324  	// then, traffic is distributed in equal proportions to all of them.
  3325  	Weight int64 `json:"weight,omitempty"`
  3326  	// ForceSendFields is a list of field names (e.g. "ServiceName") to
  3327  	// unconditionally include in API requests. By default, fields with empty or
  3328  	// default values are omitted from API requests. See
  3329  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3330  	// details.
  3331  	ForceSendFields []string `json:"-"`
  3332  	// NullFields is a list of field names (e.g. "ServiceName") to include in API
  3333  	// requests with the JSON null value. By default, fields with empty values are
  3334  	// omitted from API requests. See
  3335  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3336  	NullFields []string `json:"-"`
  3337  }
  3338  
  3339  func (s *TcpRouteRouteDestination) MarshalJSON() ([]byte, error) {
  3340  	type NoMethod TcpRouteRouteDestination
  3341  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3342  }
  3343  
  3344  // TcpRouteRouteMatch: 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  type TcpRouteRouteMatch struct {
  3348  	// Address: Required. Must be specified in the CIDR range format. A CIDR range
  3349  	// consists of an IP Address and a prefix length to construct the subnet mask.
  3350  	// By default, the prefix length is 32 (i.e. matches a single IP address). Only
  3351  	// IPV4 addresses are supported. Examples: "10.0.0.1" - matches against this
  3352  	// exact IP address. "10.0.0.0/8" - matches against any IP address within the
  3353  	// 10.0.0.0 subnet and 255.255.255.0 mask. "0.0.0.0/0" - matches against any IP
  3354  	// address'.
  3355  	Address string `json:"address,omitempty"`
  3356  	// Port: Required. Specifies the destination port to match against.
  3357  	Port string `json:"port,omitempty"`
  3358  	// ForceSendFields is a list of field names (e.g. "Address") to unconditionally
  3359  	// include in API requests. By default, fields with empty or default values are
  3360  	// omitted from API requests. See
  3361  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3362  	// details.
  3363  	ForceSendFields []string `json:"-"`
  3364  	// NullFields is a list of field names (e.g. "Address") to include in API
  3365  	// requests with the JSON null value. By default, fields with empty values are
  3366  	// omitted from API requests. See
  3367  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3368  	NullFields []string `json:"-"`
  3369  }
  3370  
  3371  func (s *TcpRouteRouteMatch) MarshalJSON() ([]byte, error) {
  3372  	type NoMethod TcpRouteRouteMatch
  3373  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3374  }
  3375  
  3376  // TcpRouteRouteRule: Specifies how to match traffic and how to route traffic
  3377  // when traffic is matched.
  3378  type TcpRouteRouteRule struct {
  3379  	// Action: Required. The detailed rule defining how to route matched traffic.
  3380  	Action *TcpRouteRouteAction `json:"action,omitempty"`
  3381  	// Matches: Optional. RouteMatch defines the predicate used to match requests
  3382  	// to a given action. Multiple match types are "OR"ed for evaluation. If no
  3383  	// routeMatch field is specified, this rule will unconditionally match traffic.
  3384  	Matches []*TcpRouteRouteMatch `json:"matches,omitempty"`
  3385  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  3386  	// include in API requests. By default, fields with empty or default values are
  3387  	// omitted from API requests. See
  3388  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3389  	// details.
  3390  	ForceSendFields []string `json:"-"`
  3391  	// NullFields is a list of field names (e.g. "Action") to include in API
  3392  	// requests with the JSON null value. By default, fields with empty values are
  3393  	// omitted from API requests. See
  3394  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3395  	NullFields []string `json:"-"`
  3396  }
  3397  
  3398  func (s *TcpRouteRouteRule) MarshalJSON() ([]byte, error) {
  3399  	type NoMethod TcpRouteRouteRule
  3400  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3401  }
  3402  
  3403  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  3404  type TestIamPermissionsRequest struct {
  3405  	// Permissions: The set of permissions to check for the `resource`. Permissions
  3406  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  3407  	// information see IAM Overview
  3408  	// (https://cloud.google.com/iam/docs/overview#permissions).
  3409  	Permissions []string `json:"permissions,omitempty"`
  3410  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3411  	// unconditionally include in API requests. By default, fields with empty or
  3412  	// default values are omitted from API requests. See
  3413  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3414  	// details.
  3415  	ForceSendFields []string `json:"-"`
  3416  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3417  	// requests with the JSON null value. By default, fields with empty values are
  3418  	// omitted from API requests. See
  3419  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3420  	NullFields []string `json:"-"`
  3421  }
  3422  
  3423  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  3424  	type NoMethod TestIamPermissionsRequest
  3425  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3426  }
  3427  
  3428  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  3429  // method.
  3430  type TestIamPermissionsResponse struct {
  3431  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  3432  	// caller is allowed.
  3433  	Permissions []string `json:"permissions,omitempty"`
  3434  
  3435  	// ServerResponse contains the HTTP response code and headers from the server.
  3436  	googleapi.ServerResponse `json:"-"`
  3437  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3438  	// unconditionally include in API requests. By default, fields with empty or
  3439  	// default values are omitted from API requests. See
  3440  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3441  	// details.
  3442  	ForceSendFields []string `json:"-"`
  3443  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3444  	// requests with the JSON null value. By default, fields with empty values are
  3445  	// omitted from API requests. See
  3446  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3447  	NullFields []string `json:"-"`
  3448  }
  3449  
  3450  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  3451  	type NoMethod TestIamPermissionsResponse
  3452  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3453  }
  3454  
  3455  // TlsRoute: TlsRoute defines how traffic should be routed based on SNI and
  3456  // other matching L3 attributes.
  3457  type TlsRoute struct {
  3458  	// CreateTime: Output only. The timestamp when the resource was created.
  3459  	CreateTime string `json:"createTime,omitempty"`
  3460  	// Description: Optional. A free-text description of the resource. Max length
  3461  	// 1024 characters.
  3462  	Description string `json:"description,omitempty"`
  3463  	// Gateways: Optional. Gateways defines a list of gateways this TlsRoute is
  3464  	// attached to, as one of the routing rules to route the requests served by the
  3465  	// gateway. Each gateway reference should match the pattern:
  3466  	// `projects/*/locations/global/gateways/`
  3467  	Gateways []string `json:"gateways,omitempty"`
  3468  	// Labels: Optional. Set of label tags associated with the TlsRoute resource.
  3469  	Labels map[string]string `json:"labels,omitempty"`
  3470  	// Meshes: Optional. Meshes defines a list of meshes this TlsRoute is attached
  3471  	// to, as one of the routing rules to route the requests served by the mesh.
  3472  	// Each mesh reference should match the pattern:
  3473  	// `projects/*/locations/global/meshes/` The attached Mesh should be of a type
  3474  	// SIDECAR
  3475  	Meshes []string `json:"meshes,omitempty"`
  3476  	// Name: Required. Name of the TlsRoute resource. It matches pattern
  3477  	// `projects/*/locations/global/tlsRoutes/tls_route_name>`.
  3478  	Name string `json:"name,omitempty"`
  3479  	// Rules: Required. Rules that define how traffic is routed and handled. At
  3480  	// least one RouteRule must be supplied. If there are multiple rules then the
  3481  	// action taken will be the first rule to match.
  3482  	Rules []*TlsRouteRouteRule `json:"rules,omitempty"`
  3483  	// SelfLink: Output only. Server-defined URL of this resource
  3484  	SelfLink string `json:"selfLink,omitempty"`
  3485  	// UpdateTime: Output only. The timestamp when the resource was updated.
  3486  	UpdateTime string `json:"updateTime,omitempty"`
  3487  
  3488  	// ServerResponse contains the HTTP response code and headers from the server.
  3489  	googleapi.ServerResponse `json:"-"`
  3490  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  3491  	// unconditionally include in API requests. By default, fields with empty or
  3492  	// default values are omitted from API requests. See
  3493  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3494  	// details.
  3495  	ForceSendFields []string `json:"-"`
  3496  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  3497  	// requests with the JSON null value. By default, fields with empty values are
  3498  	// omitted from API requests. See
  3499  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3500  	NullFields []string `json:"-"`
  3501  }
  3502  
  3503  func (s *TlsRoute) MarshalJSON() ([]byte, error) {
  3504  	type NoMethod TlsRoute
  3505  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3506  }
  3507  
  3508  // TlsRouteRouteAction: The specifications for routing traffic and applying
  3509  // associated policies.
  3510  type TlsRouteRouteAction struct {
  3511  	// Destinations: Required. The destination services to which traffic should be
  3512  	// forwarded. At least one destination service is required.
  3513  	Destinations []*TlsRouteRouteDestination `json:"destinations,omitempty"`
  3514  	// IdleTimeout: Optional. Specifies the idle timeout for the selected route.
  3515  	// The idle timeout is defined as the period in which there are no bytes sent
  3516  	// or received on either the upstream or downstream connection. If not set, the
  3517  	// default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.
  3518  	IdleTimeout string `json:"idleTimeout,omitempty"`
  3519  	// ForceSendFields is a list of field names (e.g. "Destinations") to
  3520  	// unconditionally include in API requests. By default, fields with empty or
  3521  	// default values are omitted from API requests. See
  3522  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3523  	// details.
  3524  	ForceSendFields []string `json:"-"`
  3525  	// NullFields is a list of field names (e.g. "Destinations") to include in API
  3526  	// requests with the JSON null value. By default, fields with empty values are
  3527  	// omitted from API requests. See
  3528  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3529  	NullFields []string `json:"-"`
  3530  }
  3531  
  3532  func (s *TlsRouteRouteAction) MarshalJSON() ([]byte, error) {
  3533  	type NoMethod TlsRouteRouteAction
  3534  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3535  }
  3536  
  3537  // TlsRouteRouteDestination: Describe the destination for traffic to be routed
  3538  // to.
  3539  type TlsRouteRouteDestination struct {
  3540  	// ServiceName: Required. The URL of a BackendService to route traffic to.
  3541  	ServiceName string `json:"serviceName,omitempty"`
  3542  	// Weight: Optional. Specifies the proportion of requests forwareded to the
  3543  	// backend referenced by the service_name field. This is computed as: -
  3544  	// weight/Sum(weights in destinations) Weights in all destinations does not
  3545  	// need to sum up to 100.
  3546  	Weight int64 `json:"weight,omitempty"`
  3547  	// ForceSendFields is a list of field names (e.g. "ServiceName") to
  3548  	// unconditionally include in API requests. By default, fields with empty or
  3549  	// default values are omitted from API requests. See
  3550  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3551  	// details.
  3552  	ForceSendFields []string `json:"-"`
  3553  	// NullFields is a list of field names (e.g. "ServiceName") to include in API
  3554  	// requests with the JSON null value. By default, fields with empty values are
  3555  	// omitted from API requests. See
  3556  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3557  	NullFields []string `json:"-"`
  3558  }
  3559  
  3560  func (s *TlsRouteRouteDestination) MarshalJSON() ([]byte, error) {
  3561  	type NoMethod TlsRouteRouteDestination
  3562  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3563  }
  3564  
  3565  // TlsRouteRouteMatch: RouteMatch defines the predicate used to match requests
  3566  // to a given action. Multiple match types are "AND"ed for evaluation. If no
  3567  // routeMatch field is specified, this rule will unconditionally match traffic.
  3568  type TlsRouteRouteMatch struct {
  3569  	// Alpn: Optional. ALPN (Application-Layer Protocol Negotiation) to match
  3570  	// against. Examples: "http/1.1", "h2". At least one of sni_host and alpn is
  3571  	// required. Up to 5 alpns across all matches can be set.
  3572  	Alpn []string `json:"alpn,omitempty"`
  3573  	// SniHost: Optional. SNI (server name indicator) to match against. SNI will be
  3574  	// matched against all wildcard domains, i.e. `www.example.com` will be first
  3575  	// matched against `www.example.com`, then `*.example.com`, then `*.com.`
  3576  	// Partial wildcards are not supported, and values like *w.example.com are
  3577  	// invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts
  3578  	// across all matches can be set.
  3579  	SniHost []string `json:"sniHost,omitempty"`
  3580  	// ForceSendFields is a list of field names (e.g. "Alpn") to unconditionally
  3581  	// include in API requests. By default, fields with empty or default values are
  3582  	// omitted from API requests. See
  3583  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3584  	// details.
  3585  	ForceSendFields []string `json:"-"`
  3586  	// NullFields is a list of field names (e.g. "Alpn") to include in API requests
  3587  	// with the JSON null value. By default, fields with empty values are omitted
  3588  	// from API requests. See
  3589  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3590  	NullFields []string `json:"-"`
  3591  }
  3592  
  3593  func (s *TlsRouteRouteMatch) MarshalJSON() ([]byte, error) {
  3594  	type NoMethod TlsRouteRouteMatch
  3595  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3596  }
  3597  
  3598  // TlsRouteRouteRule: Specifies how to match traffic and how to route traffic
  3599  // when traffic is matched.
  3600  type TlsRouteRouteRule struct {
  3601  	// Action: Required. The detailed rule defining how to route matched traffic.
  3602  	Action *TlsRouteRouteAction `json:"action,omitempty"`
  3603  	// Matches: Required. RouteMatch defines the predicate used to match requests
  3604  	// to a given action. Multiple match types are "OR"ed for evaluation.
  3605  	Matches []*TlsRouteRouteMatch `json:"matches,omitempty"`
  3606  	// ForceSendFields is a list of field names (e.g. "Action") to unconditionally
  3607  	// include in API requests. By default, fields with empty or default values are
  3608  	// omitted from API requests. See
  3609  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3610  	// details.
  3611  	ForceSendFields []string `json:"-"`
  3612  	// NullFields is a list of field names (e.g. "Action") to include in API
  3613  	// requests with the JSON null value. By default, fields with empty values are
  3614  	// omitted from API requests. See
  3615  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3616  	NullFields []string `json:"-"`
  3617  }
  3618  
  3619  func (s *TlsRouteRouteRule) MarshalJSON() ([]byte, error) {
  3620  	type NoMethod TlsRouteRouteRule
  3621  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3622  }
  3623  
  3624  // TrafficPortSelector: Specification of a port-based selector.
  3625  type TrafficPortSelector struct {
  3626  	// Ports: Optional. A list of ports. Can be port numbers or port range
  3627  	// (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or
  3628  	// named ports or * to specify all ports. If the list is empty, all ports are
  3629  	// selected.
  3630  	Ports []string `json:"ports,omitempty"`
  3631  	// ForceSendFields is a list of field names (e.g. "Ports") to unconditionally
  3632  	// include in API requests. By default, fields with empty or default values are
  3633  	// omitted from API requests. See
  3634  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3635  	// details.
  3636  	ForceSendFields []string `json:"-"`
  3637  	// NullFields is a list of field names (e.g. "Ports") to include in API
  3638  	// requests with the JSON null value. By default, fields with empty values are
  3639  	// omitted from API requests. See
  3640  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3641  	NullFields []string `json:"-"`
  3642  }
  3643  
  3644  func (s *TrafficPortSelector) MarshalJSON() ([]byte, error) {
  3645  	type NoMethod TrafficPortSelector
  3646  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3647  }
  3648  
  3649  type ProjectsLocationsGetCall struct {
  3650  	s            *Service
  3651  	name         string
  3652  	urlParams_   gensupport.URLParams
  3653  	ifNoneMatch_ string
  3654  	ctx_         context.Context
  3655  	header_      http.Header
  3656  }
  3657  
  3658  // Get: Gets information about a location.
  3659  //
  3660  // - name: Resource name for the location.
  3661  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  3662  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3663  	c.name = name
  3664  	return c
  3665  }
  3666  
  3667  // Fields allows partial responses to be retrieved. See
  3668  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3669  // details.
  3670  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  3671  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3672  	return c
  3673  }
  3674  
  3675  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3676  // object's ETag matches the given value. This is useful for getting updates
  3677  // only after the object has changed since the last request.
  3678  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  3679  	c.ifNoneMatch_ = entityTag
  3680  	return c
  3681  }
  3682  
  3683  // Context sets the context to be used in this call's Do method.
  3684  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  3685  	c.ctx_ = ctx
  3686  	return c
  3687  }
  3688  
  3689  // Header returns a http.Header that can be modified by the caller to add
  3690  // headers to the request.
  3691  func (c *ProjectsLocationsGetCall) Header() http.Header {
  3692  	if c.header_ == nil {
  3693  		c.header_ = make(http.Header)
  3694  	}
  3695  	return c.header_
  3696  }
  3697  
  3698  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3699  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3700  	if c.ifNoneMatch_ != "" {
  3701  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3702  	}
  3703  	var body io.Reader = nil
  3704  	c.urlParams_.Set("alt", alt)
  3705  	c.urlParams_.Set("prettyPrint", "false")
  3706  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3707  	urls += "?" + c.urlParams_.Encode()
  3708  	req, err := http.NewRequest("GET", urls, body)
  3709  	if err != nil {
  3710  		return nil, err
  3711  	}
  3712  	req.Header = reqHeaders
  3713  	googleapi.Expand(req.URL, map[string]string{
  3714  		"name": c.name,
  3715  	})
  3716  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3717  }
  3718  
  3719  // Do executes the "networkservices.projects.locations.get" call.
  3720  // Any non-2xx status code is an error. Response headers are in either
  3721  // *Location.ServerResponse.Header or (if a response was returned at all) in
  3722  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3723  // whether the returned error was because http.StatusNotModified was returned.
  3724  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3725  	gensupport.SetOptions(c.urlParams_, opts...)
  3726  	res, err := c.doRequest("json")
  3727  	if res != nil && res.StatusCode == http.StatusNotModified {
  3728  		if res.Body != nil {
  3729  			res.Body.Close()
  3730  		}
  3731  		return nil, gensupport.WrapError(&googleapi.Error{
  3732  			Code:   res.StatusCode,
  3733  			Header: res.Header,
  3734  		})
  3735  	}
  3736  	if err != nil {
  3737  		return nil, err
  3738  	}
  3739  	defer googleapi.CloseBody(res)
  3740  	if err := googleapi.CheckResponse(res); err != nil {
  3741  		return nil, gensupport.WrapError(err)
  3742  	}
  3743  	ret := &Location{
  3744  		ServerResponse: googleapi.ServerResponse{
  3745  			Header:         res.Header,
  3746  			HTTPStatusCode: res.StatusCode,
  3747  		},
  3748  	}
  3749  	target := &ret
  3750  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3751  		return nil, err
  3752  	}
  3753  	return ret, nil
  3754  }
  3755  
  3756  type ProjectsLocationsListCall struct {
  3757  	s            *Service
  3758  	name         string
  3759  	urlParams_   gensupport.URLParams
  3760  	ifNoneMatch_ string
  3761  	ctx_         context.Context
  3762  	header_      http.Header
  3763  }
  3764  
  3765  // List: Lists information about the supported locations for this service.
  3766  //
  3767  // - name: The resource that owns the locations collection, if applicable.
  3768  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  3769  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3770  	c.name = name
  3771  	return c
  3772  }
  3773  
  3774  // Filter sets the optional parameter "filter": A filter to narrow down results
  3775  // to a preferred subset. The filtering language accepts strings like
  3776  // "displayName=tokyo", and is documented in more detail in AIP-160
  3777  // (https://google.aip.dev/160).
  3778  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  3779  	c.urlParams_.Set("filter", filter)
  3780  	return c
  3781  }
  3782  
  3783  // PageSize sets the optional parameter "pageSize": The maximum number of
  3784  // results to return. If not set, the service selects a default.
  3785  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  3786  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3787  	return c
  3788  }
  3789  
  3790  // PageToken sets the optional parameter "pageToken": A page token received
  3791  // from the `next_page_token` field in the response. Send that page token to
  3792  // receive the subsequent page.
  3793  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  3794  	c.urlParams_.Set("pageToken", pageToken)
  3795  	return c
  3796  }
  3797  
  3798  // Fields allows partial responses to be retrieved. See
  3799  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3800  // details.
  3801  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  3802  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3803  	return c
  3804  }
  3805  
  3806  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3807  // object's ETag matches the given value. This is useful for getting updates
  3808  // only after the object has changed since the last request.
  3809  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  3810  	c.ifNoneMatch_ = entityTag
  3811  	return c
  3812  }
  3813  
  3814  // Context sets the context to be used in this call's Do method.
  3815  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  3816  	c.ctx_ = ctx
  3817  	return c
  3818  }
  3819  
  3820  // Header returns a http.Header that can be modified by the caller to add
  3821  // headers to the request.
  3822  func (c *ProjectsLocationsListCall) Header() http.Header {
  3823  	if c.header_ == nil {
  3824  		c.header_ = make(http.Header)
  3825  	}
  3826  	return c.header_
  3827  }
  3828  
  3829  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3830  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3831  	if c.ifNoneMatch_ != "" {
  3832  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3833  	}
  3834  	var body io.Reader = nil
  3835  	c.urlParams_.Set("alt", alt)
  3836  	c.urlParams_.Set("prettyPrint", "false")
  3837  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  3838  	urls += "?" + c.urlParams_.Encode()
  3839  	req, err := http.NewRequest("GET", urls, body)
  3840  	if err != nil {
  3841  		return nil, err
  3842  	}
  3843  	req.Header = reqHeaders
  3844  	googleapi.Expand(req.URL, map[string]string{
  3845  		"name": c.name,
  3846  	})
  3847  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3848  }
  3849  
  3850  // Do executes the "networkservices.projects.locations.list" call.
  3851  // Any non-2xx status code is an error. Response headers are in either
  3852  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  3853  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3854  // check whether the returned error was because http.StatusNotModified was
  3855  // returned.
  3856  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3857  	gensupport.SetOptions(c.urlParams_, opts...)
  3858  	res, err := c.doRequest("json")
  3859  	if res != nil && res.StatusCode == http.StatusNotModified {
  3860  		if res.Body != nil {
  3861  			res.Body.Close()
  3862  		}
  3863  		return nil, gensupport.WrapError(&googleapi.Error{
  3864  			Code:   res.StatusCode,
  3865  			Header: res.Header,
  3866  		})
  3867  	}
  3868  	if err != nil {
  3869  		return nil, err
  3870  	}
  3871  	defer googleapi.CloseBody(res)
  3872  	if err := googleapi.CheckResponse(res); err != nil {
  3873  		return nil, gensupport.WrapError(err)
  3874  	}
  3875  	ret := &ListLocationsResponse{
  3876  		ServerResponse: googleapi.ServerResponse{
  3877  			Header:         res.Header,
  3878  			HTTPStatusCode: res.StatusCode,
  3879  		},
  3880  	}
  3881  	target := &ret
  3882  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3883  		return nil, err
  3884  	}
  3885  	return ret, nil
  3886  }
  3887  
  3888  // Pages invokes f for each page of results.
  3889  // A non-nil error returned from f will halt the iteration.
  3890  // The provided context supersedes any context provided to the Context method.
  3891  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3892  	c.ctx_ = ctx
  3893  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3894  	for {
  3895  		x, err := c.Do()
  3896  		if err != nil {
  3897  			return err
  3898  		}
  3899  		if err := f(x); err != nil {
  3900  			return err
  3901  		}
  3902  		if x.NextPageToken == "" {
  3903  			return nil
  3904  		}
  3905  		c.PageToken(x.NextPageToken)
  3906  	}
  3907  }
  3908  
  3909  type ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall struct {
  3910  	s            *Service
  3911  	resource     string
  3912  	urlParams_   gensupport.URLParams
  3913  	ifNoneMatch_ string
  3914  	ctx_         context.Context
  3915  	header_      http.Header
  3916  }
  3917  
  3918  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3919  // empty policy if the resource exists and does not have a policy set.
  3920  //
  3921  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3922  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3923  //     for the appropriate value for this field.
  3924  func (r *ProjectsLocationsEdgeCacheKeysetsService) GetIamPolicy(resource string) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall {
  3925  	c := &ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3926  	c.resource = resource
  3927  	return c
  3928  }
  3929  
  3930  // OptionsRequestedPolicyVersion sets the optional parameter
  3931  // "options.requestedPolicyVersion": The maximum policy version that will be
  3932  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3933  // an invalid value will be rejected. Requests for policies with any
  3934  // conditional role bindings must specify version 3. Policies with no
  3935  // conditional role bindings may specify any valid value or leave the field
  3936  // unset. The policy in the response might use the policy version that you
  3937  // specified, or it might use a lower policy version. For example, if you
  3938  // specify version 3, but the policy has no conditional role bindings, the
  3939  // response uses version 1. To learn which resources support conditions in
  3940  // their IAM policies, see the IAM documentation
  3941  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3942  func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall {
  3943  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3944  	return c
  3945  }
  3946  
  3947  // Fields allows partial responses to be retrieved. See
  3948  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3949  // details.
  3950  func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall {
  3951  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3952  	return c
  3953  }
  3954  
  3955  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3956  // object's ETag matches the given value. This is useful for getting updates
  3957  // only after the object has changed since the last request.
  3958  func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall {
  3959  	c.ifNoneMatch_ = entityTag
  3960  	return c
  3961  }
  3962  
  3963  // Context sets the context to be used in this call's Do method.
  3964  func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall {
  3965  	c.ctx_ = ctx
  3966  	return c
  3967  }
  3968  
  3969  // Header returns a http.Header that can be modified by the caller to add
  3970  // headers to the request.
  3971  func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) Header() http.Header {
  3972  	if c.header_ == nil {
  3973  		c.header_ = make(http.Header)
  3974  	}
  3975  	return c.header_
  3976  }
  3977  
  3978  func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3979  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3980  	if c.ifNoneMatch_ != "" {
  3981  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3982  	}
  3983  	var body io.Reader = nil
  3984  	c.urlParams_.Set("alt", alt)
  3985  	c.urlParams_.Set("prettyPrint", "false")
  3986  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3987  	urls += "?" + c.urlParams_.Encode()
  3988  	req, err := http.NewRequest("GET", urls, body)
  3989  	if err != nil {
  3990  		return nil, err
  3991  	}
  3992  	req.Header = reqHeaders
  3993  	googleapi.Expand(req.URL, map[string]string{
  3994  		"resource": c.resource,
  3995  	})
  3996  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3997  }
  3998  
  3999  // Do executes the "networkservices.projects.locations.edgeCacheKeysets.getIamPolicy" call.
  4000  // Any non-2xx status code is an error. Response headers are in either
  4001  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4002  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4003  // whether the returned error was because http.StatusNotModified was returned.
  4004  func (c *ProjectsLocationsEdgeCacheKeysetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4005  	gensupport.SetOptions(c.urlParams_, opts...)
  4006  	res, err := c.doRequest("json")
  4007  	if res != nil && res.StatusCode == http.StatusNotModified {
  4008  		if res.Body != nil {
  4009  			res.Body.Close()
  4010  		}
  4011  		return nil, gensupport.WrapError(&googleapi.Error{
  4012  			Code:   res.StatusCode,
  4013  			Header: res.Header,
  4014  		})
  4015  	}
  4016  	if err != nil {
  4017  		return nil, err
  4018  	}
  4019  	defer googleapi.CloseBody(res)
  4020  	if err := googleapi.CheckResponse(res); err != nil {
  4021  		return nil, gensupport.WrapError(err)
  4022  	}
  4023  	ret := &Policy{
  4024  		ServerResponse: googleapi.ServerResponse{
  4025  			Header:         res.Header,
  4026  			HTTPStatusCode: res.StatusCode,
  4027  		},
  4028  	}
  4029  	target := &ret
  4030  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4031  		return nil, err
  4032  	}
  4033  	return ret, nil
  4034  }
  4035  
  4036  type ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall struct {
  4037  	s                   *Service
  4038  	resource            string
  4039  	setiampolicyrequest *SetIamPolicyRequest
  4040  	urlParams_          gensupport.URLParams
  4041  	ctx_                context.Context
  4042  	header_             http.Header
  4043  }
  4044  
  4045  // SetIamPolicy: Sets the access control policy on the specified resource.
  4046  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4047  // and `PERMISSION_DENIED` errors.
  4048  //
  4049  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4050  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4051  //     for the appropriate value for this field.
  4052  func (r *ProjectsLocationsEdgeCacheKeysetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall {
  4053  	c := &ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4054  	c.resource = resource
  4055  	c.setiampolicyrequest = setiampolicyrequest
  4056  	return c
  4057  }
  4058  
  4059  // Fields allows partial responses to be retrieved. See
  4060  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4061  // details.
  4062  func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall {
  4063  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4064  	return c
  4065  }
  4066  
  4067  // Context sets the context to be used in this call's Do method.
  4068  func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall {
  4069  	c.ctx_ = ctx
  4070  	return c
  4071  }
  4072  
  4073  // Header returns a http.Header that can be modified by the caller to add
  4074  // headers to the request.
  4075  func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) Header() http.Header {
  4076  	if c.header_ == nil {
  4077  		c.header_ = make(http.Header)
  4078  	}
  4079  	return c.header_
  4080  }
  4081  
  4082  func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4083  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4084  	var body io.Reader = nil
  4085  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4086  	if err != nil {
  4087  		return nil, err
  4088  	}
  4089  	c.urlParams_.Set("alt", alt)
  4090  	c.urlParams_.Set("prettyPrint", "false")
  4091  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4092  	urls += "?" + c.urlParams_.Encode()
  4093  	req, err := http.NewRequest("POST", urls, body)
  4094  	if err != nil {
  4095  		return nil, err
  4096  	}
  4097  	req.Header = reqHeaders
  4098  	googleapi.Expand(req.URL, map[string]string{
  4099  		"resource": c.resource,
  4100  	})
  4101  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4102  }
  4103  
  4104  // Do executes the "networkservices.projects.locations.edgeCacheKeysets.setIamPolicy" call.
  4105  // Any non-2xx status code is an error. Response headers are in either
  4106  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4107  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4108  // whether the returned error was because http.StatusNotModified was returned.
  4109  func (c *ProjectsLocationsEdgeCacheKeysetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4110  	gensupport.SetOptions(c.urlParams_, opts...)
  4111  	res, err := c.doRequest("json")
  4112  	if res != nil && res.StatusCode == http.StatusNotModified {
  4113  		if res.Body != nil {
  4114  			res.Body.Close()
  4115  		}
  4116  		return nil, gensupport.WrapError(&googleapi.Error{
  4117  			Code:   res.StatusCode,
  4118  			Header: res.Header,
  4119  		})
  4120  	}
  4121  	if err != nil {
  4122  		return nil, err
  4123  	}
  4124  	defer googleapi.CloseBody(res)
  4125  	if err := googleapi.CheckResponse(res); err != nil {
  4126  		return nil, gensupport.WrapError(err)
  4127  	}
  4128  	ret := &Policy{
  4129  		ServerResponse: googleapi.ServerResponse{
  4130  			Header:         res.Header,
  4131  			HTTPStatusCode: res.StatusCode,
  4132  		},
  4133  	}
  4134  	target := &ret
  4135  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4136  		return nil, err
  4137  	}
  4138  	return ret, nil
  4139  }
  4140  
  4141  type ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall struct {
  4142  	s                         *Service
  4143  	resource                  string
  4144  	testiampermissionsrequest *TestIamPermissionsRequest
  4145  	urlParams_                gensupport.URLParams
  4146  	ctx_                      context.Context
  4147  	header_                   http.Header
  4148  }
  4149  
  4150  // TestIamPermissions: Returns permissions that a caller has on the specified
  4151  // resource. If the resource does not exist, this will return an empty set of
  4152  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4153  // used for building permission-aware UIs and command-line tools, not for
  4154  // authorization checking. This operation may "fail open" without warning.
  4155  //
  4156  //   - resource: REQUIRED: The resource for which the policy detail is being
  4157  //     requested. See Resource names
  4158  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4159  //     value for this field.
  4160  func (r *ProjectsLocationsEdgeCacheKeysetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall {
  4161  	c := &ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4162  	c.resource = resource
  4163  	c.testiampermissionsrequest = testiampermissionsrequest
  4164  	return c
  4165  }
  4166  
  4167  // Fields allows partial responses to be retrieved. See
  4168  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4169  // details.
  4170  func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall {
  4171  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4172  	return c
  4173  }
  4174  
  4175  // Context sets the context to be used in this call's Do method.
  4176  func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall {
  4177  	c.ctx_ = ctx
  4178  	return c
  4179  }
  4180  
  4181  // Header returns a http.Header that can be modified by the caller to add
  4182  // headers to the request.
  4183  func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) Header() http.Header {
  4184  	if c.header_ == nil {
  4185  		c.header_ = make(http.Header)
  4186  	}
  4187  	return c.header_
  4188  }
  4189  
  4190  func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4191  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4192  	var body io.Reader = nil
  4193  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4194  	if err != nil {
  4195  		return nil, err
  4196  	}
  4197  	c.urlParams_.Set("alt", alt)
  4198  	c.urlParams_.Set("prettyPrint", "false")
  4199  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4200  	urls += "?" + c.urlParams_.Encode()
  4201  	req, err := http.NewRequest("POST", urls, body)
  4202  	if err != nil {
  4203  		return nil, err
  4204  	}
  4205  	req.Header = reqHeaders
  4206  	googleapi.Expand(req.URL, map[string]string{
  4207  		"resource": c.resource,
  4208  	})
  4209  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4210  }
  4211  
  4212  // Do executes the "networkservices.projects.locations.edgeCacheKeysets.testIamPermissions" call.
  4213  // Any non-2xx status code is an error. Response headers are in either
  4214  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4215  // returned at all) in error.(*googleapi.Error).Header. Use
  4216  // googleapi.IsNotModified to check whether the returned error was because
  4217  // http.StatusNotModified was returned.
  4218  func (c *ProjectsLocationsEdgeCacheKeysetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4219  	gensupport.SetOptions(c.urlParams_, opts...)
  4220  	res, err := c.doRequest("json")
  4221  	if res != nil && res.StatusCode == http.StatusNotModified {
  4222  		if res.Body != nil {
  4223  			res.Body.Close()
  4224  		}
  4225  		return nil, gensupport.WrapError(&googleapi.Error{
  4226  			Code:   res.StatusCode,
  4227  			Header: res.Header,
  4228  		})
  4229  	}
  4230  	if err != nil {
  4231  		return nil, err
  4232  	}
  4233  	defer googleapi.CloseBody(res)
  4234  	if err := googleapi.CheckResponse(res); err != nil {
  4235  		return nil, gensupport.WrapError(err)
  4236  	}
  4237  	ret := &TestIamPermissionsResponse{
  4238  		ServerResponse: googleapi.ServerResponse{
  4239  			Header:         res.Header,
  4240  			HTTPStatusCode: res.StatusCode,
  4241  		},
  4242  	}
  4243  	target := &ret
  4244  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4245  		return nil, err
  4246  	}
  4247  	return ret, nil
  4248  }
  4249  
  4250  type ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall struct {
  4251  	s            *Service
  4252  	resource     string
  4253  	urlParams_   gensupport.URLParams
  4254  	ifNoneMatch_ string
  4255  	ctx_         context.Context
  4256  	header_      http.Header
  4257  }
  4258  
  4259  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4260  // empty policy if the resource exists and does not have a policy set.
  4261  //
  4262  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4263  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4264  //     for the appropriate value for this field.
  4265  func (r *ProjectsLocationsEdgeCacheOriginsService) GetIamPolicy(resource string) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall {
  4266  	c := &ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4267  	c.resource = resource
  4268  	return c
  4269  }
  4270  
  4271  // OptionsRequestedPolicyVersion sets the optional parameter
  4272  // "options.requestedPolicyVersion": The maximum policy version that will be
  4273  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4274  // an invalid value will be rejected. Requests for policies with any
  4275  // conditional role bindings must specify version 3. Policies with no
  4276  // conditional role bindings may specify any valid value or leave the field
  4277  // unset. The policy in the response might use the policy version that you
  4278  // specified, or it might use a lower policy version. For example, if you
  4279  // specify version 3, but the policy has no conditional role bindings, the
  4280  // response uses version 1. To learn which resources support conditions in
  4281  // their IAM policies, see the IAM documentation
  4282  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4283  func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall {
  4284  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4285  	return c
  4286  }
  4287  
  4288  // Fields allows partial responses to be retrieved. See
  4289  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4290  // details.
  4291  func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall {
  4292  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4293  	return c
  4294  }
  4295  
  4296  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4297  // object's ETag matches the given value. This is useful for getting updates
  4298  // only after the object has changed since the last request.
  4299  func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall {
  4300  	c.ifNoneMatch_ = entityTag
  4301  	return c
  4302  }
  4303  
  4304  // Context sets the context to be used in this call's Do method.
  4305  func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall {
  4306  	c.ctx_ = ctx
  4307  	return c
  4308  }
  4309  
  4310  // Header returns a http.Header that can be modified by the caller to add
  4311  // headers to the request.
  4312  func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) Header() http.Header {
  4313  	if c.header_ == nil {
  4314  		c.header_ = make(http.Header)
  4315  	}
  4316  	return c.header_
  4317  }
  4318  
  4319  func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4320  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4321  	if c.ifNoneMatch_ != "" {
  4322  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4323  	}
  4324  	var body io.Reader = nil
  4325  	c.urlParams_.Set("alt", alt)
  4326  	c.urlParams_.Set("prettyPrint", "false")
  4327  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4328  	urls += "?" + c.urlParams_.Encode()
  4329  	req, err := http.NewRequest("GET", urls, body)
  4330  	if err != nil {
  4331  		return nil, err
  4332  	}
  4333  	req.Header = reqHeaders
  4334  	googleapi.Expand(req.URL, map[string]string{
  4335  		"resource": c.resource,
  4336  	})
  4337  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4338  }
  4339  
  4340  // Do executes the "networkservices.projects.locations.edgeCacheOrigins.getIamPolicy" call.
  4341  // Any non-2xx status code is an error. Response headers are in either
  4342  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4343  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4344  // whether the returned error was because http.StatusNotModified was returned.
  4345  func (c *ProjectsLocationsEdgeCacheOriginsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4346  	gensupport.SetOptions(c.urlParams_, opts...)
  4347  	res, err := c.doRequest("json")
  4348  	if res != nil && res.StatusCode == http.StatusNotModified {
  4349  		if res.Body != nil {
  4350  			res.Body.Close()
  4351  		}
  4352  		return nil, gensupport.WrapError(&googleapi.Error{
  4353  			Code:   res.StatusCode,
  4354  			Header: res.Header,
  4355  		})
  4356  	}
  4357  	if err != nil {
  4358  		return nil, err
  4359  	}
  4360  	defer googleapi.CloseBody(res)
  4361  	if err := googleapi.CheckResponse(res); err != nil {
  4362  		return nil, gensupport.WrapError(err)
  4363  	}
  4364  	ret := &Policy{
  4365  		ServerResponse: googleapi.ServerResponse{
  4366  			Header:         res.Header,
  4367  			HTTPStatusCode: res.StatusCode,
  4368  		},
  4369  	}
  4370  	target := &ret
  4371  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4372  		return nil, err
  4373  	}
  4374  	return ret, nil
  4375  }
  4376  
  4377  type ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall struct {
  4378  	s                   *Service
  4379  	resource            string
  4380  	setiampolicyrequest *SetIamPolicyRequest
  4381  	urlParams_          gensupport.URLParams
  4382  	ctx_                context.Context
  4383  	header_             http.Header
  4384  }
  4385  
  4386  // SetIamPolicy: Sets the access control policy on the specified resource.
  4387  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4388  // and `PERMISSION_DENIED` errors.
  4389  //
  4390  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4391  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4392  //     for the appropriate value for this field.
  4393  func (r *ProjectsLocationsEdgeCacheOriginsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall {
  4394  	c := &ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4395  	c.resource = resource
  4396  	c.setiampolicyrequest = setiampolicyrequest
  4397  	return c
  4398  }
  4399  
  4400  // Fields allows partial responses to be retrieved. See
  4401  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4402  // details.
  4403  func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall {
  4404  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4405  	return c
  4406  }
  4407  
  4408  // Context sets the context to be used in this call's Do method.
  4409  func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall {
  4410  	c.ctx_ = ctx
  4411  	return c
  4412  }
  4413  
  4414  // Header returns a http.Header that can be modified by the caller to add
  4415  // headers to the request.
  4416  func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) Header() http.Header {
  4417  	if c.header_ == nil {
  4418  		c.header_ = make(http.Header)
  4419  	}
  4420  	return c.header_
  4421  }
  4422  
  4423  func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4424  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4425  	var body io.Reader = nil
  4426  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4427  	if err != nil {
  4428  		return nil, err
  4429  	}
  4430  	c.urlParams_.Set("alt", alt)
  4431  	c.urlParams_.Set("prettyPrint", "false")
  4432  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4433  	urls += "?" + c.urlParams_.Encode()
  4434  	req, err := http.NewRequest("POST", urls, body)
  4435  	if err != nil {
  4436  		return nil, err
  4437  	}
  4438  	req.Header = reqHeaders
  4439  	googleapi.Expand(req.URL, map[string]string{
  4440  		"resource": c.resource,
  4441  	})
  4442  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4443  }
  4444  
  4445  // Do executes the "networkservices.projects.locations.edgeCacheOrigins.setIamPolicy" call.
  4446  // Any non-2xx status code is an error. Response headers are in either
  4447  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4448  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4449  // whether the returned error was because http.StatusNotModified was returned.
  4450  func (c *ProjectsLocationsEdgeCacheOriginsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4451  	gensupport.SetOptions(c.urlParams_, opts...)
  4452  	res, err := c.doRequest("json")
  4453  	if res != nil && res.StatusCode == http.StatusNotModified {
  4454  		if res.Body != nil {
  4455  			res.Body.Close()
  4456  		}
  4457  		return nil, gensupport.WrapError(&googleapi.Error{
  4458  			Code:   res.StatusCode,
  4459  			Header: res.Header,
  4460  		})
  4461  	}
  4462  	if err != nil {
  4463  		return nil, err
  4464  	}
  4465  	defer googleapi.CloseBody(res)
  4466  	if err := googleapi.CheckResponse(res); err != nil {
  4467  		return nil, gensupport.WrapError(err)
  4468  	}
  4469  	ret := &Policy{
  4470  		ServerResponse: googleapi.ServerResponse{
  4471  			Header:         res.Header,
  4472  			HTTPStatusCode: res.StatusCode,
  4473  		},
  4474  	}
  4475  	target := &ret
  4476  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4477  		return nil, err
  4478  	}
  4479  	return ret, nil
  4480  }
  4481  
  4482  type ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall struct {
  4483  	s                         *Service
  4484  	resource                  string
  4485  	testiampermissionsrequest *TestIamPermissionsRequest
  4486  	urlParams_                gensupport.URLParams
  4487  	ctx_                      context.Context
  4488  	header_                   http.Header
  4489  }
  4490  
  4491  // TestIamPermissions: Returns permissions that a caller has on the specified
  4492  // resource. If the resource does not exist, this will return an empty set of
  4493  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4494  // used for building permission-aware UIs and command-line tools, not for
  4495  // authorization checking. This operation may "fail open" without warning.
  4496  //
  4497  //   - resource: REQUIRED: The resource for which the policy detail is being
  4498  //     requested. See Resource names
  4499  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4500  //     value for this field.
  4501  func (r *ProjectsLocationsEdgeCacheOriginsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall {
  4502  	c := &ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4503  	c.resource = resource
  4504  	c.testiampermissionsrequest = testiampermissionsrequest
  4505  	return c
  4506  }
  4507  
  4508  // Fields allows partial responses to be retrieved. See
  4509  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4510  // details.
  4511  func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall {
  4512  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4513  	return c
  4514  }
  4515  
  4516  // Context sets the context to be used in this call's Do method.
  4517  func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall {
  4518  	c.ctx_ = ctx
  4519  	return c
  4520  }
  4521  
  4522  // Header returns a http.Header that can be modified by the caller to add
  4523  // headers to the request.
  4524  func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) Header() http.Header {
  4525  	if c.header_ == nil {
  4526  		c.header_ = make(http.Header)
  4527  	}
  4528  	return c.header_
  4529  }
  4530  
  4531  func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4532  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4533  	var body io.Reader = nil
  4534  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4535  	if err != nil {
  4536  		return nil, err
  4537  	}
  4538  	c.urlParams_.Set("alt", alt)
  4539  	c.urlParams_.Set("prettyPrint", "false")
  4540  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4541  	urls += "?" + c.urlParams_.Encode()
  4542  	req, err := http.NewRequest("POST", urls, body)
  4543  	if err != nil {
  4544  		return nil, err
  4545  	}
  4546  	req.Header = reqHeaders
  4547  	googleapi.Expand(req.URL, map[string]string{
  4548  		"resource": c.resource,
  4549  	})
  4550  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4551  }
  4552  
  4553  // Do executes the "networkservices.projects.locations.edgeCacheOrigins.testIamPermissions" call.
  4554  // Any non-2xx status code is an error. Response headers are in either
  4555  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4556  // returned at all) in error.(*googleapi.Error).Header. Use
  4557  // googleapi.IsNotModified to check whether the returned error was because
  4558  // http.StatusNotModified was returned.
  4559  func (c *ProjectsLocationsEdgeCacheOriginsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4560  	gensupport.SetOptions(c.urlParams_, opts...)
  4561  	res, err := c.doRequest("json")
  4562  	if res != nil && res.StatusCode == http.StatusNotModified {
  4563  		if res.Body != nil {
  4564  			res.Body.Close()
  4565  		}
  4566  		return nil, gensupport.WrapError(&googleapi.Error{
  4567  			Code:   res.StatusCode,
  4568  			Header: res.Header,
  4569  		})
  4570  	}
  4571  	if err != nil {
  4572  		return nil, err
  4573  	}
  4574  	defer googleapi.CloseBody(res)
  4575  	if err := googleapi.CheckResponse(res); err != nil {
  4576  		return nil, gensupport.WrapError(err)
  4577  	}
  4578  	ret := &TestIamPermissionsResponse{
  4579  		ServerResponse: googleapi.ServerResponse{
  4580  			Header:         res.Header,
  4581  			HTTPStatusCode: res.StatusCode,
  4582  		},
  4583  	}
  4584  	target := &ret
  4585  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4586  		return nil, err
  4587  	}
  4588  	return ret, nil
  4589  }
  4590  
  4591  type ProjectsLocationsEdgeCacheServicesGetIamPolicyCall struct {
  4592  	s            *Service
  4593  	resource     string
  4594  	urlParams_   gensupport.URLParams
  4595  	ifNoneMatch_ string
  4596  	ctx_         context.Context
  4597  	header_      http.Header
  4598  }
  4599  
  4600  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4601  // empty policy if the resource exists and does not have a policy set.
  4602  //
  4603  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4604  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4605  //     for the appropriate value for this field.
  4606  func (r *ProjectsLocationsEdgeCacheServicesService) GetIamPolicy(resource string) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall {
  4607  	c := &ProjectsLocationsEdgeCacheServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4608  	c.resource = resource
  4609  	return c
  4610  }
  4611  
  4612  // OptionsRequestedPolicyVersion sets the optional parameter
  4613  // "options.requestedPolicyVersion": The maximum policy version that will be
  4614  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4615  // an invalid value will be rejected. Requests for policies with any
  4616  // conditional role bindings must specify version 3. Policies with no
  4617  // conditional role bindings may specify any valid value or leave the field
  4618  // unset. The policy in the response might use the policy version that you
  4619  // specified, or it might use a lower policy version. For example, if you
  4620  // specify version 3, but the policy has no conditional role bindings, the
  4621  // response uses version 1. To learn which resources support conditions in
  4622  // their IAM policies, see the IAM documentation
  4623  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4624  func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall {
  4625  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4626  	return c
  4627  }
  4628  
  4629  // Fields allows partial responses to be retrieved. See
  4630  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4631  // details.
  4632  func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall {
  4633  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4634  	return c
  4635  }
  4636  
  4637  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4638  // object's ETag matches the given value. This is useful for getting updates
  4639  // only after the object has changed since the last request.
  4640  func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall {
  4641  	c.ifNoneMatch_ = entityTag
  4642  	return c
  4643  }
  4644  
  4645  // Context sets the context to be used in this call's Do method.
  4646  func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall {
  4647  	c.ctx_ = ctx
  4648  	return c
  4649  }
  4650  
  4651  // Header returns a http.Header that can be modified by the caller to add
  4652  // headers to the request.
  4653  func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) Header() http.Header {
  4654  	if c.header_ == nil {
  4655  		c.header_ = make(http.Header)
  4656  	}
  4657  	return c.header_
  4658  }
  4659  
  4660  func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4661  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4662  	if c.ifNoneMatch_ != "" {
  4663  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4664  	}
  4665  	var body io.Reader = nil
  4666  	c.urlParams_.Set("alt", alt)
  4667  	c.urlParams_.Set("prettyPrint", "false")
  4668  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  4669  	urls += "?" + c.urlParams_.Encode()
  4670  	req, err := http.NewRequest("GET", urls, body)
  4671  	if err != nil {
  4672  		return nil, err
  4673  	}
  4674  	req.Header = reqHeaders
  4675  	googleapi.Expand(req.URL, map[string]string{
  4676  		"resource": c.resource,
  4677  	})
  4678  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4679  }
  4680  
  4681  // Do executes the "networkservices.projects.locations.edgeCacheServices.getIamPolicy" call.
  4682  // Any non-2xx status code is an error. Response headers are in either
  4683  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4684  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4685  // whether the returned error was because http.StatusNotModified was returned.
  4686  func (c *ProjectsLocationsEdgeCacheServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4687  	gensupport.SetOptions(c.urlParams_, opts...)
  4688  	res, err := c.doRequest("json")
  4689  	if res != nil && res.StatusCode == http.StatusNotModified {
  4690  		if res.Body != nil {
  4691  			res.Body.Close()
  4692  		}
  4693  		return nil, gensupport.WrapError(&googleapi.Error{
  4694  			Code:   res.StatusCode,
  4695  			Header: res.Header,
  4696  		})
  4697  	}
  4698  	if err != nil {
  4699  		return nil, err
  4700  	}
  4701  	defer googleapi.CloseBody(res)
  4702  	if err := googleapi.CheckResponse(res); err != nil {
  4703  		return nil, gensupport.WrapError(err)
  4704  	}
  4705  	ret := &Policy{
  4706  		ServerResponse: googleapi.ServerResponse{
  4707  			Header:         res.Header,
  4708  			HTTPStatusCode: res.StatusCode,
  4709  		},
  4710  	}
  4711  	target := &ret
  4712  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4713  		return nil, err
  4714  	}
  4715  	return ret, nil
  4716  }
  4717  
  4718  type ProjectsLocationsEdgeCacheServicesSetIamPolicyCall struct {
  4719  	s                   *Service
  4720  	resource            string
  4721  	setiampolicyrequest *SetIamPolicyRequest
  4722  	urlParams_          gensupport.URLParams
  4723  	ctx_                context.Context
  4724  	header_             http.Header
  4725  }
  4726  
  4727  // SetIamPolicy: Sets the access control policy on the specified resource.
  4728  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4729  // and `PERMISSION_DENIED` errors.
  4730  //
  4731  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4732  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4733  //     for the appropriate value for this field.
  4734  func (r *ProjectsLocationsEdgeCacheServicesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall {
  4735  	c := &ProjectsLocationsEdgeCacheServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4736  	c.resource = resource
  4737  	c.setiampolicyrequest = setiampolicyrequest
  4738  	return c
  4739  }
  4740  
  4741  // Fields allows partial responses to be retrieved. See
  4742  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4743  // details.
  4744  func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall {
  4745  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4746  	return c
  4747  }
  4748  
  4749  // Context sets the context to be used in this call's Do method.
  4750  func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall {
  4751  	c.ctx_ = ctx
  4752  	return c
  4753  }
  4754  
  4755  // Header returns a http.Header that can be modified by the caller to add
  4756  // headers to the request.
  4757  func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) Header() http.Header {
  4758  	if c.header_ == nil {
  4759  		c.header_ = make(http.Header)
  4760  	}
  4761  	return c.header_
  4762  }
  4763  
  4764  func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4765  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4766  	var body io.Reader = nil
  4767  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4768  	if err != nil {
  4769  		return nil, err
  4770  	}
  4771  	c.urlParams_.Set("alt", alt)
  4772  	c.urlParams_.Set("prettyPrint", "false")
  4773  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4774  	urls += "?" + c.urlParams_.Encode()
  4775  	req, err := http.NewRequest("POST", urls, body)
  4776  	if err != nil {
  4777  		return nil, err
  4778  	}
  4779  	req.Header = reqHeaders
  4780  	googleapi.Expand(req.URL, map[string]string{
  4781  		"resource": c.resource,
  4782  	})
  4783  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4784  }
  4785  
  4786  // Do executes the "networkservices.projects.locations.edgeCacheServices.setIamPolicy" call.
  4787  // Any non-2xx status code is an error. Response headers are in either
  4788  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4789  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4790  // whether the returned error was because http.StatusNotModified was returned.
  4791  func (c *ProjectsLocationsEdgeCacheServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4792  	gensupport.SetOptions(c.urlParams_, opts...)
  4793  	res, err := c.doRequest("json")
  4794  	if res != nil && res.StatusCode == http.StatusNotModified {
  4795  		if res.Body != nil {
  4796  			res.Body.Close()
  4797  		}
  4798  		return nil, gensupport.WrapError(&googleapi.Error{
  4799  			Code:   res.StatusCode,
  4800  			Header: res.Header,
  4801  		})
  4802  	}
  4803  	if err != nil {
  4804  		return nil, err
  4805  	}
  4806  	defer googleapi.CloseBody(res)
  4807  	if err := googleapi.CheckResponse(res); err != nil {
  4808  		return nil, gensupport.WrapError(err)
  4809  	}
  4810  	ret := &Policy{
  4811  		ServerResponse: googleapi.ServerResponse{
  4812  			Header:         res.Header,
  4813  			HTTPStatusCode: res.StatusCode,
  4814  		},
  4815  	}
  4816  	target := &ret
  4817  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4818  		return nil, err
  4819  	}
  4820  	return ret, nil
  4821  }
  4822  
  4823  type ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall struct {
  4824  	s                         *Service
  4825  	resource                  string
  4826  	testiampermissionsrequest *TestIamPermissionsRequest
  4827  	urlParams_                gensupport.URLParams
  4828  	ctx_                      context.Context
  4829  	header_                   http.Header
  4830  }
  4831  
  4832  // TestIamPermissions: Returns permissions that a caller has on the specified
  4833  // resource. If the resource does not exist, this will return an empty set of
  4834  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4835  // used for building permission-aware UIs and command-line tools, not for
  4836  // authorization checking. This operation may "fail open" without warning.
  4837  //
  4838  //   - resource: REQUIRED: The resource for which the policy detail is being
  4839  //     requested. See Resource names
  4840  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4841  //     value for this field.
  4842  func (r *ProjectsLocationsEdgeCacheServicesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall {
  4843  	c := &ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4844  	c.resource = resource
  4845  	c.testiampermissionsrequest = testiampermissionsrequest
  4846  	return c
  4847  }
  4848  
  4849  // Fields allows partial responses to be retrieved. See
  4850  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4851  // details.
  4852  func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall {
  4853  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4854  	return c
  4855  }
  4856  
  4857  // Context sets the context to be used in this call's Do method.
  4858  func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall {
  4859  	c.ctx_ = ctx
  4860  	return c
  4861  }
  4862  
  4863  // Header returns a http.Header that can be modified by the caller to add
  4864  // headers to the request.
  4865  func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) Header() http.Header {
  4866  	if c.header_ == nil {
  4867  		c.header_ = make(http.Header)
  4868  	}
  4869  	return c.header_
  4870  }
  4871  
  4872  func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4873  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4874  	var body io.Reader = nil
  4875  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4876  	if err != nil {
  4877  		return nil, err
  4878  	}
  4879  	c.urlParams_.Set("alt", alt)
  4880  	c.urlParams_.Set("prettyPrint", "false")
  4881  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4882  	urls += "?" + c.urlParams_.Encode()
  4883  	req, err := http.NewRequest("POST", urls, body)
  4884  	if err != nil {
  4885  		return nil, err
  4886  	}
  4887  	req.Header = reqHeaders
  4888  	googleapi.Expand(req.URL, map[string]string{
  4889  		"resource": c.resource,
  4890  	})
  4891  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4892  }
  4893  
  4894  // Do executes the "networkservices.projects.locations.edgeCacheServices.testIamPermissions" call.
  4895  // Any non-2xx status code is an error. Response headers are in either
  4896  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4897  // returned at all) in error.(*googleapi.Error).Header. Use
  4898  // googleapi.IsNotModified to check whether the returned error was because
  4899  // http.StatusNotModified was returned.
  4900  func (c *ProjectsLocationsEdgeCacheServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4901  	gensupport.SetOptions(c.urlParams_, opts...)
  4902  	res, err := c.doRequest("json")
  4903  	if res != nil && res.StatusCode == http.StatusNotModified {
  4904  		if res.Body != nil {
  4905  			res.Body.Close()
  4906  		}
  4907  		return nil, gensupport.WrapError(&googleapi.Error{
  4908  			Code:   res.StatusCode,
  4909  			Header: res.Header,
  4910  		})
  4911  	}
  4912  	if err != nil {
  4913  		return nil, err
  4914  	}
  4915  	defer googleapi.CloseBody(res)
  4916  	if err := googleapi.CheckResponse(res); err != nil {
  4917  		return nil, gensupport.WrapError(err)
  4918  	}
  4919  	ret := &TestIamPermissionsResponse{
  4920  		ServerResponse: googleapi.ServerResponse{
  4921  			Header:         res.Header,
  4922  			HTTPStatusCode: res.StatusCode,
  4923  		},
  4924  	}
  4925  	target := &ret
  4926  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4927  		return nil, err
  4928  	}
  4929  	return ret, nil
  4930  }
  4931  
  4932  type ProjectsLocationsEndpointPoliciesCreateCall struct {
  4933  	s              *Service
  4934  	parent         string
  4935  	endpointpolicy *EndpointPolicy
  4936  	urlParams_     gensupport.URLParams
  4937  	ctx_           context.Context
  4938  	header_        http.Header
  4939  }
  4940  
  4941  // Create: Creates a new EndpointPolicy in a given project and location.
  4942  //
  4943  //   - parent: The parent resource of the EndpointPolicy. Must be in the format
  4944  //     `projects/*/locations/global`.
  4945  func (r *ProjectsLocationsEndpointPoliciesService) Create(parent string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesCreateCall {
  4946  	c := &ProjectsLocationsEndpointPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4947  	c.parent = parent
  4948  	c.endpointpolicy = endpointpolicy
  4949  	return c
  4950  }
  4951  
  4952  // EndpointPolicyId sets the optional parameter "endpointPolicyId": Required.
  4953  // Short name of the EndpointPolicy resource to be created. E.g. "CustomECS".
  4954  func (c *ProjectsLocationsEndpointPoliciesCreateCall) EndpointPolicyId(endpointPolicyId string) *ProjectsLocationsEndpointPoliciesCreateCall {
  4955  	c.urlParams_.Set("endpointPolicyId", endpointPolicyId)
  4956  	return c
  4957  }
  4958  
  4959  // Fields allows partial responses to be retrieved. See
  4960  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4961  // details.
  4962  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesCreateCall {
  4963  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4964  	return c
  4965  }
  4966  
  4967  // Context sets the context to be used in this call's Do method.
  4968  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesCreateCall {
  4969  	c.ctx_ = ctx
  4970  	return c
  4971  }
  4972  
  4973  // Header returns a http.Header that can be modified by the caller to add
  4974  // headers to the request.
  4975  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Header() http.Header {
  4976  	if c.header_ == nil {
  4977  		c.header_ = make(http.Header)
  4978  	}
  4979  	return c.header_
  4980  }
  4981  
  4982  func (c *ProjectsLocationsEndpointPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
  4983  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4984  	var body io.Reader = nil
  4985  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpointpolicy)
  4986  	if err != nil {
  4987  		return nil, err
  4988  	}
  4989  	c.urlParams_.Set("alt", alt)
  4990  	c.urlParams_.Set("prettyPrint", "false")
  4991  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointPolicies")
  4992  	urls += "?" + c.urlParams_.Encode()
  4993  	req, err := http.NewRequest("POST", urls, body)
  4994  	if err != nil {
  4995  		return nil, err
  4996  	}
  4997  	req.Header = reqHeaders
  4998  	googleapi.Expand(req.URL, map[string]string{
  4999  		"parent": c.parent,
  5000  	})
  5001  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5002  }
  5003  
  5004  // Do executes the "networkservices.projects.locations.endpointPolicies.create" call.
  5005  // Any non-2xx status code is an error. Response headers are in either
  5006  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5007  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5008  // whether the returned error was because http.StatusNotModified was returned.
  5009  func (c *ProjectsLocationsEndpointPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5010  	gensupport.SetOptions(c.urlParams_, opts...)
  5011  	res, err := c.doRequest("json")
  5012  	if res != nil && res.StatusCode == http.StatusNotModified {
  5013  		if res.Body != nil {
  5014  			res.Body.Close()
  5015  		}
  5016  		return nil, gensupport.WrapError(&googleapi.Error{
  5017  			Code:   res.StatusCode,
  5018  			Header: res.Header,
  5019  		})
  5020  	}
  5021  	if err != nil {
  5022  		return nil, err
  5023  	}
  5024  	defer googleapi.CloseBody(res)
  5025  	if err := googleapi.CheckResponse(res); err != nil {
  5026  		return nil, gensupport.WrapError(err)
  5027  	}
  5028  	ret := &Operation{
  5029  		ServerResponse: googleapi.ServerResponse{
  5030  			Header:         res.Header,
  5031  			HTTPStatusCode: res.StatusCode,
  5032  		},
  5033  	}
  5034  	target := &ret
  5035  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5036  		return nil, err
  5037  	}
  5038  	return ret, nil
  5039  }
  5040  
  5041  type ProjectsLocationsEndpointPoliciesDeleteCall struct {
  5042  	s          *Service
  5043  	name       string
  5044  	urlParams_ gensupport.URLParams
  5045  	ctx_       context.Context
  5046  	header_    http.Header
  5047  }
  5048  
  5049  // Delete: Deletes a single EndpointPolicy.
  5050  //
  5051  //   - name: A name of the EndpointPolicy to delete. Must be in the format
  5052  //     `projects/*/locations/global/endpointPolicies/*`.
  5053  func (r *ProjectsLocationsEndpointPoliciesService) Delete(name string) *ProjectsLocationsEndpointPoliciesDeleteCall {
  5054  	c := &ProjectsLocationsEndpointPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5055  	c.name = name
  5056  	return c
  5057  }
  5058  
  5059  // Fields allows partial responses to be retrieved. See
  5060  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5061  // details.
  5062  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesDeleteCall {
  5063  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5064  	return c
  5065  }
  5066  
  5067  // Context sets the context to be used in this call's Do method.
  5068  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesDeleteCall {
  5069  	c.ctx_ = ctx
  5070  	return c
  5071  }
  5072  
  5073  // Header returns a http.Header that can be modified by the caller to add
  5074  // headers to the request.
  5075  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Header() http.Header {
  5076  	if c.header_ == nil {
  5077  		c.header_ = make(http.Header)
  5078  	}
  5079  	return c.header_
  5080  }
  5081  
  5082  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
  5083  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5084  	var body io.Reader = nil
  5085  	c.urlParams_.Set("alt", alt)
  5086  	c.urlParams_.Set("prettyPrint", "false")
  5087  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5088  	urls += "?" + c.urlParams_.Encode()
  5089  	req, err := http.NewRequest("DELETE", urls, body)
  5090  	if err != nil {
  5091  		return nil, err
  5092  	}
  5093  	req.Header = reqHeaders
  5094  	googleapi.Expand(req.URL, map[string]string{
  5095  		"name": c.name,
  5096  	})
  5097  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5098  }
  5099  
  5100  // Do executes the "networkservices.projects.locations.endpointPolicies.delete" call.
  5101  // Any non-2xx status code is an error. Response headers are in either
  5102  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5103  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5104  // whether the returned error was because http.StatusNotModified was returned.
  5105  func (c *ProjectsLocationsEndpointPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5106  	gensupport.SetOptions(c.urlParams_, opts...)
  5107  	res, err := c.doRequest("json")
  5108  	if res != nil && res.StatusCode == http.StatusNotModified {
  5109  		if res.Body != nil {
  5110  			res.Body.Close()
  5111  		}
  5112  		return nil, gensupport.WrapError(&googleapi.Error{
  5113  			Code:   res.StatusCode,
  5114  			Header: res.Header,
  5115  		})
  5116  	}
  5117  	if err != nil {
  5118  		return nil, err
  5119  	}
  5120  	defer googleapi.CloseBody(res)
  5121  	if err := googleapi.CheckResponse(res); err != nil {
  5122  		return nil, gensupport.WrapError(err)
  5123  	}
  5124  	ret := &Operation{
  5125  		ServerResponse: googleapi.ServerResponse{
  5126  			Header:         res.Header,
  5127  			HTTPStatusCode: res.StatusCode,
  5128  		},
  5129  	}
  5130  	target := &ret
  5131  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5132  		return nil, err
  5133  	}
  5134  	return ret, nil
  5135  }
  5136  
  5137  type ProjectsLocationsEndpointPoliciesGetCall struct {
  5138  	s            *Service
  5139  	name         string
  5140  	urlParams_   gensupport.URLParams
  5141  	ifNoneMatch_ string
  5142  	ctx_         context.Context
  5143  	header_      http.Header
  5144  }
  5145  
  5146  // Get: Gets details of a single EndpointPolicy.
  5147  //
  5148  //   - name: A name of the EndpointPolicy to get. Must be in the format
  5149  //     `projects/*/locations/global/endpointPolicies/*`.
  5150  func (r *ProjectsLocationsEndpointPoliciesService) Get(name string) *ProjectsLocationsEndpointPoliciesGetCall {
  5151  	c := &ProjectsLocationsEndpointPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5152  	c.name = name
  5153  	return c
  5154  }
  5155  
  5156  // Fields allows partial responses to be retrieved. See
  5157  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5158  // details.
  5159  func (c *ProjectsLocationsEndpointPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetCall {
  5160  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5161  	return c
  5162  }
  5163  
  5164  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5165  // object's ETag matches the given value. This is useful for getting updates
  5166  // only after the object has changed since the last request.
  5167  func (c *ProjectsLocationsEndpointPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetCall {
  5168  	c.ifNoneMatch_ = entityTag
  5169  	return c
  5170  }
  5171  
  5172  // Context sets the context to be used in this call's Do method.
  5173  func (c *ProjectsLocationsEndpointPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetCall {
  5174  	c.ctx_ = ctx
  5175  	return c
  5176  }
  5177  
  5178  // Header returns a http.Header that can be modified by the caller to add
  5179  // headers to the request.
  5180  func (c *ProjectsLocationsEndpointPoliciesGetCall) Header() http.Header {
  5181  	if c.header_ == nil {
  5182  		c.header_ = make(http.Header)
  5183  	}
  5184  	return c.header_
  5185  }
  5186  
  5187  func (c *ProjectsLocationsEndpointPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
  5188  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5189  	if c.ifNoneMatch_ != "" {
  5190  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5191  	}
  5192  	var body io.Reader = nil
  5193  	c.urlParams_.Set("alt", alt)
  5194  	c.urlParams_.Set("prettyPrint", "false")
  5195  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5196  	urls += "?" + c.urlParams_.Encode()
  5197  	req, err := http.NewRequest("GET", urls, body)
  5198  	if err != nil {
  5199  		return nil, err
  5200  	}
  5201  	req.Header = reqHeaders
  5202  	googleapi.Expand(req.URL, map[string]string{
  5203  		"name": c.name,
  5204  	})
  5205  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5206  }
  5207  
  5208  // Do executes the "networkservices.projects.locations.endpointPolicies.get" call.
  5209  // Any non-2xx status code is an error. Response headers are in either
  5210  // *EndpointPolicy.ServerResponse.Header or (if a response was returned at all)
  5211  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5212  // whether the returned error was because http.StatusNotModified was returned.
  5213  func (c *ProjectsLocationsEndpointPoliciesGetCall) Do(opts ...googleapi.CallOption) (*EndpointPolicy, error) {
  5214  	gensupport.SetOptions(c.urlParams_, opts...)
  5215  	res, err := c.doRequest("json")
  5216  	if res != nil && res.StatusCode == http.StatusNotModified {
  5217  		if res.Body != nil {
  5218  			res.Body.Close()
  5219  		}
  5220  		return nil, gensupport.WrapError(&googleapi.Error{
  5221  			Code:   res.StatusCode,
  5222  			Header: res.Header,
  5223  		})
  5224  	}
  5225  	if err != nil {
  5226  		return nil, err
  5227  	}
  5228  	defer googleapi.CloseBody(res)
  5229  	if err := googleapi.CheckResponse(res); err != nil {
  5230  		return nil, gensupport.WrapError(err)
  5231  	}
  5232  	ret := &EndpointPolicy{
  5233  		ServerResponse: googleapi.ServerResponse{
  5234  			Header:         res.Header,
  5235  			HTTPStatusCode: res.StatusCode,
  5236  		},
  5237  	}
  5238  	target := &ret
  5239  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5240  		return nil, err
  5241  	}
  5242  	return ret, nil
  5243  }
  5244  
  5245  type ProjectsLocationsEndpointPoliciesGetIamPolicyCall struct {
  5246  	s            *Service
  5247  	resource     string
  5248  	urlParams_   gensupport.URLParams
  5249  	ifNoneMatch_ string
  5250  	ctx_         context.Context
  5251  	header_      http.Header
  5252  }
  5253  
  5254  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  5255  // empty policy if the resource exists and does not have a policy set.
  5256  //
  5257  //   - resource: REQUIRED: The resource for which the policy is being requested.
  5258  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5259  //     for the appropriate value for this field.
  5260  func (r *ProjectsLocationsEndpointPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  5261  	c := &ProjectsLocationsEndpointPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5262  	c.resource = resource
  5263  	return c
  5264  }
  5265  
  5266  // OptionsRequestedPolicyVersion sets the optional parameter
  5267  // "options.requestedPolicyVersion": The maximum policy version that will be
  5268  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  5269  // an invalid value will be rejected. Requests for policies with any
  5270  // conditional role bindings must specify version 3. Policies with no
  5271  // conditional role bindings may specify any valid value or leave the field
  5272  // unset. The policy in the response might use the policy version that you
  5273  // specified, or it might use a lower policy version. For example, if you
  5274  // specify version 3, but the policy has no conditional role bindings, the
  5275  // response uses version 1. To learn which resources support conditions in
  5276  // their IAM policies, see the IAM documentation
  5277  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  5278  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  5279  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  5280  	return c
  5281  }
  5282  
  5283  // Fields allows partial responses to be retrieved. See
  5284  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5285  // details.
  5286  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  5287  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5288  	return c
  5289  }
  5290  
  5291  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5292  // object's ETag matches the given value. This is useful for getting updates
  5293  // only after the object has changed since the last request.
  5294  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  5295  	c.ifNoneMatch_ = entityTag
  5296  	return c
  5297  }
  5298  
  5299  // Context sets the context to be used in this call's Do method.
  5300  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesGetIamPolicyCall {
  5301  	c.ctx_ = ctx
  5302  	return c
  5303  }
  5304  
  5305  // Header returns a http.Header that can be modified by the caller to add
  5306  // headers to the request.
  5307  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Header() http.Header {
  5308  	if c.header_ == nil {
  5309  		c.header_ = make(http.Header)
  5310  	}
  5311  	return c.header_
  5312  }
  5313  
  5314  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5315  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5316  	if c.ifNoneMatch_ != "" {
  5317  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5318  	}
  5319  	var body io.Reader = nil
  5320  	c.urlParams_.Set("alt", alt)
  5321  	c.urlParams_.Set("prettyPrint", "false")
  5322  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  5323  	urls += "?" + c.urlParams_.Encode()
  5324  	req, err := http.NewRequest("GET", urls, body)
  5325  	if err != nil {
  5326  		return nil, err
  5327  	}
  5328  	req.Header = reqHeaders
  5329  	googleapi.Expand(req.URL, map[string]string{
  5330  		"resource": c.resource,
  5331  	})
  5332  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5333  }
  5334  
  5335  // Do executes the "networkservices.projects.locations.endpointPolicies.getIamPolicy" call.
  5336  // Any non-2xx status code is an error. Response headers are in either
  5337  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5338  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5339  // whether the returned error was because http.StatusNotModified was returned.
  5340  func (c *ProjectsLocationsEndpointPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5341  	gensupport.SetOptions(c.urlParams_, opts...)
  5342  	res, err := c.doRequest("json")
  5343  	if res != nil && res.StatusCode == http.StatusNotModified {
  5344  		if res.Body != nil {
  5345  			res.Body.Close()
  5346  		}
  5347  		return nil, gensupport.WrapError(&googleapi.Error{
  5348  			Code:   res.StatusCode,
  5349  			Header: res.Header,
  5350  		})
  5351  	}
  5352  	if err != nil {
  5353  		return nil, err
  5354  	}
  5355  	defer googleapi.CloseBody(res)
  5356  	if err := googleapi.CheckResponse(res); err != nil {
  5357  		return nil, gensupport.WrapError(err)
  5358  	}
  5359  	ret := &Policy{
  5360  		ServerResponse: googleapi.ServerResponse{
  5361  			Header:         res.Header,
  5362  			HTTPStatusCode: res.StatusCode,
  5363  		},
  5364  	}
  5365  	target := &ret
  5366  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5367  		return nil, err
  5368  	}
  5369  	return ret, nil
  5370  }
  5371  
  5372  type ProjectsLocationsEndpointPoliciesListCall struct {
  5373  	s            *Service
  5374  	parent       string
  5375  	urlParams_   gensupport.URLParams
  5376  	ifNoneMatch_ string
  5377  	ctx_         context.Context
  5378  	header_      http.Header
  5379  }
  5380  
  5381  // List: Lists EndpointPolicies in a given project and location.
  5382  //
  5383  //   - parent: The project and location from which the EndpointPolicies should be
  5384  //     listed, specified in the format `projects/*/locations/global`.
  5385  func (r *ProjectsLocationsEndpointPoliciesService) List(parent string) *ProjectsLocationsEndpointPoliciesListCall {
  5386  	c := &ProjectsLocationsEndpointPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5387  	c.parent = parent
  5388  	return c
  5389  }
  5390  
  5391  // PageSize sets the optional parameter "pageSize": Maximum number of
  5392  // EndpointPolicies to return per call.
  5393  func (c *ProjectsLocationsEndpointPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointPoliciesListCall {
  5394  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5395  	return c
  5396  }
  5397  
  5398  // PageToken sets the optional parameter "pageToken": The value returned by the
  5399  // last `ListEndpointPoliciesResponse` Indicates that this is a continuation of
  5400  // a prior `ListEndpointPolicies` call, and that the system should return the
  5401  // next page of data.
  5402  func (c *ProjectsLocationsEndpointPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsEndpointPoliciesListCall {
  5403  	c.urlParams_.Set("pageToken", pageToken)
  5404  	return c
  5405  }
  5406  
  5407  // Fields allows partial responses to be retrieved. See
  5408  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5409  // details.
  5410  func (c *ProjectsLocationsEndpointPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesListCall {
  5411  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5412  	return c
  5413  }
  5414  
  5415  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5416  // object's ETag matches the given value. This is useful for getting updates
  5417  // only after the object has changed since the last request.
  5418  func (c *ProjectsLocationsEndpointPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointPoliciesListCall {
  5419  	c.ifNoneMatch_ = entityTag
  5420  	return c
  5421  }
  5422  
  5423  // Context sets the context to be used in this call's Do method.
  5424  func (c *ProjectsLocationsEndpointPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesListCall {
  5425  	c.ctx_ = ctx
  5426  	return c
  5427  }
  5428  
  5429  // Header returns a http.Header that can be modified by the caller to add
  5430  // headers to the request.
  5431  func (c *ProjectsLocationsEndpointPoliciesListCall) Header() http.Header {
  5432  	if c.header_ == nil {
  5433  		c.header_ = make(http.Header)
  5434  	}
  5435  	return c.header_
  5436  }
  5437  
  5438  func (c *ProjectsLocationsEndpointPoliciesListCall) doRequest(alt string) (*http.Response, error) {
  5439  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5440  	if c.ifNoneMatch_ != "" {
  5441  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5442  	}
  5443  	var body io.Reader = nil
  5444  	c.urlParams_.Set("alt", alt)
  5445  	c.urlParams_.Set("prettyPrint", "false")
  5446  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpointPolicies")
  5447  	urls += "?" + c.urlParams_.Encode()
  5448  	req, err := http.NewRequest("GET", urls, body)
  5449  	if err != nil {
  5450  		return nil, err
  5451  	}
  5452  	req.Header = reqHeaders
  5453  	googleapi.Expand(req.URL, map[string]string{
  5454  		"parent": c.parent,
  5455  	})
  5456  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5457  }
  5458  
  5459  // Do executes the "networkservices.projects.locations.endpointPolicies.list" call.
  5460  // Any non-2xx status code is an error. Response headers are in either
  5461  // *ListEndpointPoliciesResponse.ServerResponse.Header or (if a response was
  5462  // returned at all) in error.(*googleapi.Error).Header. Use
  5463  // googleapi.IsNotModified to check whether the returned error was because
  5464  // http.StatusNotModified was returned.
  5465  func (c *ProjectsLocationsEndpointPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListEndpointPoliciesResponse, error) {
  5466  	gensupport.SetOptions(c.urlParams_, opts...)
  5467  	res, err := c.doRequest("json")
  5468  	if res != nil && res.StatusCode == http.StatusNotModified {
  5469  		if res.Body != nil {
  5470  			res.Body.Close()
  5471  		}
  5472  		return nil, gensupport.WrapError(&googleapi.Error{
  5473  			Code:   res.StatusCode,
  5474  			Header: res.Header,
  5475  		})
  5476  	}
  5477  	if err != nil {
  5478  		return nil, err
  5479  	}
  5480  	defer googleapi.CloseBody(res)
  5481  	if err := googleapi.CheckResponse(res); err != nil {
  5482  		return nil, gensupport.WrapError(err)
  5483  	}
  5484  	ret := &ListEndpointPoliciesResponse{
  5485  		ServerResponse: googleapi.ServerResponse{
  5486  			Header:         res.Header,
  5487  			HTTPStatusCode: res.StatusCode,
  5488  		},
  5489  	}
  5490  	target := &ret
  5491  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5492  		return nil, err
  5493  	}
  5494  	return ret, nil
  5495  }
  5496  
  5497  // Pages invokes f for each page of results.
  5498  // A non-nil error returned from f will halt the iteration.
  5499  // The provided context supersedes any context provided to the Context method.
  5500  func (c *ProjectsLocationsEndpointPoliciesListCall) Pages(ctx context.Context, f func(*ListEndpointPoliciesResponse) error) error {
  5501  	c.ctx_ = ctx
  5502  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5503  	for {
  5504  		x, err := c.Do()
  5505  		if err != nil {
  5506  			return err
  5507  		}
  5508  		if err := f(x); err != nil {
  5509  			return err
  5510  		}
  5511  		if x.NextPageToken == "" {
  5512  			return nil
  5513  		}
  5514  		c.PageToken(x.NextPageToken)
  5515  	}
  5516  }
  5517  
  5518  type ProjectsLocationsEndpointPoliciesPatchCall struct {
  5519  	s              *Service
  5520  	name           string
  5521  	endpointpolicy *EndpointPolicy
  5522  	urlParams_     gensupport.URLParams
  5523  	ctx_           context.Context
  5524  	header_        http.Header
  5525  }
  5526  
  5527  // Patch: Updates the parameters of a single EndpointPolicy.
  5528  //
  5529  //   - name: Name of the EndpointPolicy resource. It matches pattern
  5530  //     `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
  5531  func (r *ProjectsLocationsEndpointPoliciesService) Patch(name string, endpointpolicy *EndpointPolicy) *ProjectsLocationsEndpointPoliciesPatchCall {
  5532  	c := &ProjectsLocationsEndpointPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5533  	c.name = name
  5534  	c.endpointpolicy = endpointpolicy
  5535  	return c
  5536  }
  5537  
  5538  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  5539  // specify the fields to be overwritten in the EndpointPolicy resource by the
  5540  // update. The fields specified in the update_mask are relative to the
  5541  // resource, not the full request. A field will be overwritten if it is in the
  5542  // mask. If the user does not provide a mask then all fields will be
  5543  // overwritten.
  5544  func (c *ProjectsLocationsEndpointPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointPoliciesPatchCall {
  5545  	c.urlParams_.Set("updateMask", updateMask)
  5546  	return c
  5547  }
  5548  
  5549  // Fields allows partial responses to be retrieved. See
  5550  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5551  // details.
  5552  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesPatchCall {
  5553  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5554  	return c
  5555  }
  5556  
  5557  // Context sets the context to be used in this call's Do method.
  5558  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesPatchCall {
  5559  	c.ctx_ = ctx
  5560  	return c
  5561  }
  5562  
  5563  // Header returns a http.Header that can be modified by the caller to add
  5564  // headers to the request.
  5565  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Header() http.Header {
  5566  	if c.header_ == nil {
  5567  		c.header_ = make(http.Header)
  5568  	}
  5569  	return c.header_
  5570  }
  5571  
  5572  func (c *ProjectsLocationsEndpointPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
  5573  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5574  	var body io.Reader = nil
  5575  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.endpointpolicy)
  5576  	if err != nil {
  5577  		return nil, err
  5578  	}
  5579  	c.urlParams_.Set("alt", alt)
  5580  	c.urlParams_.Set("prettyPrint", "false")
  5581  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5582  	urls += "?" + c.urlParams_.Encode()
  5583  	req, err := http.NewRequest("PATCH", urls, body)
  5584  	if err != nil {
  5585  		return nil, err
  5586  	}
  5587  	req.Header = reqHeaders
  5588  	googleapi.Expand(req.URL, map[string]string{
  5589  		"name": c.name,
  5590  	})
  5591  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5592  }
  5593  
  5594  // Do executes the "networkservices.projects.locations.endpointPolicies.patch" call.
  5595  // Any non-2xx status code is an error. Response headers are in either
  5596  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5597  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5598  // whether the returned error was because http.StatusNotModified was returned.
  5599  func (c *ProjectsLocationsEndpointPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5600  	gensupport.SetOptions(c.urlParams_, opts...)
  5601  	res, err := c.doRequest("json")
  5602  	if res != nil && res.StatusCode == http.StatusNotModified {
  5603  		if res.Body != nil {
  5604  			res.Body.Close()
  5605  		}
  5606  		return nil, gensupport.WrapError(&googleapi.Error{
  5607  			Code:   res.StatusCode,
  5608  			Header: res.Header,
  5609  		})
  5610  	}
  5611  	if err != nil {
  5612  		return nil, err
  5613  	}
  5614  	defer googleapi.CloseBody(res)
  5615  	if err := googleapi.CheckResponse(res); err != nil {
  5616  		return nil, gensupport.WrapError(err)
  5617  	}
  5618  	ret := &Operation{
  5619  		ServerResponse: googleapi.ServerResponse{
  5620  			Header:         res.Header,
  5621  			HTTPStatusCode: res.StatusCode,
  5622  		},
  5623  	}
  5624  	target := &ret
  5625  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5626  		return nil, err
  5627  	}
  5628  	return ret, nil
  5629  }
  5630  
  5631  type ProjectsLocationsEndpointPoliciesSetIamPolicyCall struct {
  5632  	s                   *Service
  5633  	resource            string
  5634  	setiampolicyrequest *SetIamPolicyRequest
  5635  	urlParams_          gensupport.URLParams
  5636  	ctx_                context.Context
  5637  	header_             http.Header
  5638  }
  5639  
  5640  // SetIamPolicy: Sets the access control policy on the specified resource.
  5641  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  5642  // and `PERMISSION_DENIED` errors.
  5643  //
  5644  //   - resource: REQUIRED: The resource for which the policy is being specified.
  5645  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5646  //     for the appropriate value for this field.
  5647  func (r *ProjectsLocationsEndpointPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
  5648  	c := &ProjectsLocationsEndpointPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5649  	c.resource = resource
  5650  	c.setiampolicyrequest = setiampolicyrequest
  5651  	return c
  5652  }
  5653  
  5654  // Fields allows partial responses to be retrieved. See
  5655  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5656  // details.
  5657  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
  5658  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5659  	return c
  5660  }
  5661  
  5662  // Context sets the context to be used in this call's Do method.
  5663  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesSetIamPolicyCall {
  5664  	c.ctx_ = ctx
  5665  	return c
  5666  }
  5667  
  5668  // Header returns a http.Header that can be modified by the caller to add
  5669  // headers to the request.
  5670  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Header() http.Header {
  5671  	if c.header_ == nil {
  5672  		c.header_ = make(http.Header)
  5673  	}
  5674  	return c.header_
  5675  }
  5676  
  5677  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5678  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5679  	var body io.Reader = nil
  5680  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5681  	if err != nil {
  5682  		return nil, err
  5683  	}
  5684  	c.urlParams_.Set("alt", alt)
  5685  	c.urlParams_.Set("prettyPrint", "false")
  5686  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  5687  	urls += "?" + c.urlParams_.Encode()
  5688  	req, err := http.NewRequest("POST", urls, body)
  5689  	if err != nil {
  5690  		return nil, err
  5691  	}
  5692  	req.Header = reqHeaders
  5693  	googleapi.Expand(req.URL, map[string]string{
  5694  		"resource": c.resource,
  5695  	})
  5696  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5697  }
  5698  
  5699  // Do executes the "networkservices.projects.locations.endpointPolicies.setIamPolicy" call.
  5700  // Any non-2xx status code is an error. Response headers are in either
  5701  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5702  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5703  // whether the returned error was because http.StatusNotModified was returned.
  5704  func (c *ProjectsLocationsEndpointPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5705  	gensupport.SetOptions(c.urlParams_, opts...)
  5706  	res, err := c.doRequest("json")
  5707  	if res != nil && res.StatusCode == http.StatusNotModified {
  5708  		if res.Body != nil {
  5709  			res.Body.Close()
  5710  		}
  5711  		return nil, gensupport.WrapError(&googleapi.Error{
  5712  			Code:   res.StatusCode,
  5713  			Header: res.Header,
  5714  		})
  5715  	}
  5716  	if err != nil {
  5717  		return nil, err
  5718  	}
  5719  	defer googleapi.CloseBody(res)
  5720  	if err := googleapi.CheckResponse(res); err != nil {
  5721  		return nil, gensupport.WrapError(err)
  5722  	}
  5723  	ret := &Policy{
  5724  		ServerResponse: googleapi.ServerResponse{
  5725  			Header:         res.Header,
  5726  			HTTPStatusCode: res.StatusCode,
  5727  		},
  5728  	}
  5729  	target := &ret
  5730  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5731  		return nil, err
  5732  	}
  5733  	return ret, nil
  5734  }
  5735  
  5736  type ProjectsLocationsEndpointPoliciesTestIamPermissionsCall struct {
  5737  	s                         *Service
  5738  	resource                  string
  5739  	testiampermissionsrequest *TestIamPermissionsRequest
  5740  	urlParams_                gensupport.URLParams
  5741  	ctx_                      context.Context
  5742  	header_                   http.Header
  5743  }
  5744  
  5745  // TestIamPermissions: Returns permissions that a caller has on the specified
  5746  // resource. If the resource does not exist, this will return an empty set of
  5747  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  5748  // used for building permission-aware UIs and command-line tools, not for
  5749  // authorization checking. This operation may "fail open" without warning.
  5750  //
  5751  //   - resource: REQUIRED: The resource for which the policy detail is being
  5752  //     requested. See Resource names
  5753  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5754  //     value for this field.
  5755  func (r *ProjectsLocationsEndpointPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
  5756  	c := &ProjectsLocationsEndpointPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5757  	c.resource = resource
  5758  	c.testiampermissionsrequest = testiampermissionsrequest
  5759  	return c
  5760  }
  5761  
  5762  // Fields allows partial responses to be retrieved. See
  5763  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5764  // details.
  5765  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
  5766  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5767  	return c
  5768  }
  5769  
  5770  // Context sets the context to be used in this call's Do method.
  5771  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall {
  5772  	c.ctx_ = ctx
  5773  	return c
  5774  }
  5775  
  5776  // Header returns a http.Header that can be modified by the caller to add
  5777  // headers to the request.
  5778  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Header() http.Header {
  5779  	if c.header_ == nil {
  5780  		c.header_ = make(http.Header)
  5781  	}
  5782  	return c.header_
  5783  }
  5784  
  5785  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5786  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5787  	var body io.Reader = nil
  5788  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5789  	if err != nil {
  5790  		return nil, err
  5791  	}
  5792  	c.urlParams_.Set("alt", alt)
  5793  	c.urlParams_.Set("prettyPrint", "false")
  5794  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  5795  	urls += "?" + c.urlParams_.Encode()
  5796  	req, err := http.NewRequest("POST", urls, body)
  5797  	if err != nil {
  5798  		return nil, err
  5799  	}
  5800  	req.Header = reqHeaders
  5801  	googleapi.Expand(req.URL, map[string]string{
  5802  		"resource": c.resource,
  5803  	})
  5804  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5805  }
  5806  
  5807  // Do executes the "networkservices.projects.locations.endpointPolicies.testIamPermissions" call.
  5808  // Any non-2xx status code is an error. Response headers are in either
  5809  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  5810  // returned at all) in error.(*googleapi.Error).Header. Use
  5811  // googleapi.IsNotModified to check whether the returned error was because
  5812  // http.StatusNotModified was returned.
  5813  func (c *ProjectsLocationsEndpointPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5814  	gensupport.SetOptions(c.urlParams_, opts...)
  5815  	res, err := c.doRequest("json")
  5816  	if res != nil && res.StatusCode == http.StatusNotModified {
  5817  		if res.Body != nil {
  5818  			res.Body.Close()
  5819  		}
  5820  		return nil, gensupport.WrapError(&googleapi.Error{
  5821  			Code:   res.StatusCode,
  5822  			Header: res.Header,
  5823  		})
  5824  	}
  5825  	if err != nil {
  5826  		return nil, err
  5827  	}
  5828  	defer googleapi.CloseBody(res)
  5829  	if err := googleapi.CheckResponse(res); err != nil {
  5830  		return nil, gensupport.WrapError(err)
  5831  	}
  5832  	ret := &TestIamPermissionsResponse{
  5833  		ServerResponse: googleapi.ServerResponse{
  5834  			Header:         res.Header,
  5835  			HTTPStatusCode: res.StatusCode,
  5836  		},
  5837  	}
  5838  	target := &ret
  5839  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5840  		return nil, err
  5841  	}
  5842  	return ret, nil
  5843  }
  5844  
  5845  type ProjectsLocationsGatewaysCreateCall struct {
  5846  	s          *Service
  5847  	parent     string
  5848  	gateway    *Gateway
  5849  	urlParams_ gensupport.URLParams
  5850  	ctx_       context.Context
  5851  	header_    http.Header
  5852  }
  5853  
  5854  // Create: Creates a new Gateway in a given project and location.
  5855  //
  5856  //   - parent: The parent resource of the Gateway. Must be in the format
  5857  //     `projects/*/locations/*`.
  5858  func (r *ProjectsLocationsGatewaysService) Create(parent string, gateway *Gateway) *ProjectsLocationsGatewaysCreateCall {
  5859  	c := &ProjectsLocationsGatewaysCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5860  	c.parent = parent
  5861  	c.gateway = gateway
  5862  	return c
  5863  }
  5864  
  5865  // GatewayId sets the optional parameter "gatewayId": Required. Short name of
  5866  // the Gateway resource to be created.
  5867  func (c *ProjectsLocationsGatewaysCreateCall) GatewayId(gatewayId string) *ProjectsLocationsGatewaysCreateCall {
  5868  	c.urlParams_.Set("gatewayId", gatewayId)
  5869  	return c
  5870  }
  5871  
  5872  // Fields allows partial responses to be retrieved. See
  5873  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5874  // details.
  5875  func (c *ProjectsLocationsGatewaysCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysCreateCall {
  5876  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5877  	return c
  5878  }
  5879  
  5880  // Context sets the context to be used in this call's Do method.
  5881  func (c *ProjectsLocationsGatewaysCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaysCreateCall {
  5882  	c.ctx_ = ctx
  5883  	return c
  5884  }
  5885  
  5886  // Header returns a http.Header that can be modified by the caller to add
  5887  // headers to the request.
  5888  func (c *ProjectsLocationsGatewaysCreateCall) Header() http.Header {
  5889  	if c.header_ == nil {
  5890  		c.header_ = make(http.Header)
  5891  	}
  5892  	return c.header_
  5893  }
  5894  
  5895  func (c *ProjectsLocationsGatewaysCreateCall) doRequest(alt string) (*http.Response, error) {
  5896  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5897  	var body io.Reader = nil
  5898  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.gateway)
  5899  	if err != nil {
  5900  		return nil, err
  5901  	}
  5902  	c.urlParams_.Set("alt", alt)
  5903  	c.urlParams_.Set("prettyPrint", "false")
  5904  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gateways")
  5905  	urls += "?" + c.urlParams_.Encode()
  5906  	req, err := http.NewRequest("POST", urls, body)
  5907  	if err != nil {
  5908  		return nil, err
  5909  	}
  5910  	req.Header = reqHeaders
  5911  	googleapi.Expand(req.URL, map[string]string{
  5912  		"parent": c.parent,
  5913  	})
  5914  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5915  }
  5916  
  5917  // Do executes the "networkservices.projects.locations.gateways.create" call.
  5918  // Any non-2xx status code is an error. Response headers are in either
  5919  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  5920  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5921  // whether the returned error was because http.StatusNotModified was returned.
  5922  func (c *ProjectsLocationsGatewaysCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  5923  	gensupport.SetOptions(c.urlParams_, opts...)
  5924  	res, err := c.doRequest("json")
  5925  	if res != nil && res.StatusCode == http.StatusNotModified {
  5926  		if res.Body != nil {
  5927  			res.Body.Close()
  5928  		}
  5929  		return nil, gensupport.WrapError(&googleapi.Error{
  5930  			Code:   res.StatusCode,
  5931  			Header: res.Header,
  5932  		})
  5933  	}
  5934  	if err != nil {
  5935  		return nil, err
  5936  	}
  5937  	defer googleapi.CloseBody(res)
  5938  	if err := googleapi.CheckResponse(res); err != nil {
  5939  		return nil, gensupport.WrapError(err)
  5940  	}
  5941  	ret := &Operation{
  5942  		ServerResponse: googleapi.ServerResponse{
  5943  			Header:         res.Header,
  5944  			HTTPStatusCode: res.StatusCode,
  5945  		},
  5946  	}
  5947  	target := &ret
  5948  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5949  		return nil, err
  5950  	}
  5951  	return ret, nil
  5952  }
  5953  
  5954  type ProjectsLocationsGatewaysDeleteCall struct {
  5955  	s          *Service
  5956  	name       string
  5957  	urlParams_ gensupport.URLParams
  5958  	ctx_       context.Context
  5959  	header_    http.Header
  5960  }
  5961  
  5962  // Delete: Deletes a single Gateway.
  5963  //
  5964  //   - name: A name of the Gateway to delete. Must be in the format
  5965  //     `projects/*/locations/*/gateways/*`.
  5966  func (r *ProjectsLocationsGatewaysService) Delete(name string) *ProjectsLocationsGatewaysDeleteCall {
  5967  	c := &ProjectsLocationsGatewaysDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5968  	c.name = name
  5969  	return c
  5970  }
  5971  
  5972  // Fields allows partial responses to be retrieved. See
  5973  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5974  // details.
  5975  func (c *ProjectsLocationsGatewaysDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysDeleteCall {
  5976  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5977  	return c
  5978  }
  5979  
  5980  // Context sets the context to be used in this call's Do method.
  5981  func (c *ProjectsLocationsGatewaysDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaysDeleteCall {
  5982  	c.ctx_ = ctx
  5983  	return c
  5984  }
  5985  
  5986  // Header returns a http.Header that can be modified by the caller to add
  5987  // headers to the request.
  5988  func (c *ProjectsLocationsGatewaysDeleteCall) Header() http.Header {
  5989  	if c.header_ == nil {
  5990  		c.header_ = make(http.Header)
  5991  	}
  5992  	return c.header_
  5993  }
  5994  
  5995  func (c *ProjectsLocationsGatewaysDeleteCall) doRequest(alt string) (*http.Response, error) {
  5996  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5997  	var body io.Reader = nil
  5998  	c.urlParams_.Set("alt", alt)
  5999  	c.urlParams_.Set("prettyPrint", "false")
  6000  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6001  	urls += "?" + c.urlParams_.Encode()
  6002  	req, err := http.NewRequest("DELETE", urls, body)
  6003  	if err != nil {
  6004  		return nil, err
  6005  	}
  6006  	req.Header = reqHeaders
  6007  	googleapi.Expand(req.URL, map[string]string{
  6008  		"name": c.name,
  6009  	})
  6010  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6011  }
  6012  
  6013  // Do executes the "networkservices.projects.locations.gateways.delete" call.
  6014  // Any non-2xx status code is an error. Response headers are in either
  6015  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6016  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6017  // whether the returned error was because http.StatusNotModified was returned.
  6018  func (c *ProjectsLocationsGatewaysDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6019  	gensupport.SetOptions(c.urlParams_, opts...)
  6020  	res, err := c.doRequest("json")
  6021  	if res != nil && res.StatusCode == http.StatusNotModified {
  6022  		if res.Body != nil {
  6023  			res.Body.Close()
  6024  		}
  6025  		return nil, gensupport.WrapError(&googleapi.Error{
  6026  			Code:   res.StatusCode,
  6027  			Header: res.Header,
  6028  		})
  6029  	}
  6030  	if err != nil {
  6031  		return nil, err
  6032  	}
  6033  	defer googleapi.CloseBody(res)
  6034  	if err := googleapi.CheckResponse(res); err != nil {
  6035  		return nil, gensupport.WrapError(err)
  6036  	}
  6037  	ret := &Operation{
  6038  		ServerResponse: googleapi.ServerResponse{
  6039  			Header:         res.Header,
  6040  			HTTPStatusCode: res.StatusCode,
  6041  		},
  6042  	}
  6043  	target := &ret
  6044  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6045  		return nil, err
  6046  	}
  6047  	return ret, nil
  6048  }
  6049  
  6050  type ProjectsLocationsGatewaysGetCall struct {
  6051  	s            *Service
  6052  	name         string
  6053  	urlParams_   gensupport.URLParams
  6054  	ifNoneMatch_ string
  6055  	ctx_         context.Context
  6056  	header_      http.Header
  6057  }
  6058  
  6059  // Get: Gets details of a single Gateway.
  6060  //
  6061  //   - name: A name of the Gateway to get. Must be in the format
  6062  //     `projects/*/locations/*/gateways/*`.
  6063  func (r *ProjectsLocationsGatewaysService) Get(name string) *ProjectsLocationsGatewaysGetCall {
  6064  	c := &ProjectsLocationsGatewaysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6065  	c.name = name
  6066  	return c
  6067  }
  6068  
  6069  // Fields allows partial responses to be retrieved. See
  6070  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6071  // details.
  6072  func (c *ProjectsLocationsGatewaysGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetCall {
  6073  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6074  	return c
  6075  }
  6076  
  6077  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6078  // object's ETag matches the given value. This is useful for getting updates
  6079  // only after the object has changed since the last request.
  6080  func (c *ProjectsLocationsGatewaysGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetCall {
  6081  	c.ifNoneMatch_ = entityTag
  6082  	return c
  6083  }
  6084  
  6085  // Context sets the context to be used in this call's Do method.
  6086  func (c *ProjectsLocationsGatewaysGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetCall {
  6087  	c.ctx_ = ctx
  6088  	return c
  6089  }
  6090  
  6091  // Header returns a http.Header that can be modified by the caller to add
  6092  // headers to the request.
  6093  func (c *ProjectsLocationsGatewaysGetCall) Header() http.Header {
  6094  	if c.header_ == nil {
  6095  		c.header_ = make(http.Header)
  6096  	}
  6097  	return c.header_
  6098  }
  6099  
  6100  func (c *ProjectsLocationsGatewaysGetCall) doRequest(alt string) (*http.Response, error) {
  6101  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6102  	if c.ifNoneMatch_ != "" {
  6103  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6104  	}
  6105  	var body io.Reader = nil
  6106  	c.urlParams_.Set("alt", alt)
  6107  	c.urlParams_.Set("prettyPrint", "false")
  6108  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6109  	urls += "?" + c.urlParams_.Encode()
  6110  	req, err := http.NewRequest("GET", urls, body)
  6111  	if err != nil {
  6112  		return nil, err
  6113  	}
  6114  	req.Header = reqHeaders
  6115  	googleapi.Expand(req.URL, map[string]string{
  6116  		"name": c.name,
  6117  	})
  6118  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6119  }
  6120  
  6121  // Do executes the "networkservices.projects.locations.gateways.get" call.
  6122  // Any non-2xx status code is an error. Response headers are in either
  6123  // *Gateway.ServerResponse.Header or (if a response was returned at all) in
  6124  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6125  // whether the returned error was because http.StatusNotModified was returned.
  6126  func (c *ProjectsLocationsGatewaysGetCall) Do(opts ...googleapi.CallOption) (*Gateway, error) {
  6127  	gensupport.SetOptions(c.urlParams_, opts...)
  6128  	res, err := c.doRequest("json")
  6129  	if res != nil && res.StatusCode == http.StatusNotModified {
  6130  		if res.Body != nil {
  6131  			res.Body.Close()
  6132  		}
  6133  		return nil, gensupport.WrapError(&googleapi.Error{
  6134  			Code:   res.StatusCode,
  6135  			Header: res.Header,
  6136  		})
  6137  	}
  6138  	if err != nil {
  6139  		return nil, err
  6140  	}
  6141  	defer googleapi.CloseBody(res)
  6142  	if err := googleapi.CheckResponse(res); err != nil {
  6143  		return nil, gensupport.WrapError(err)
  6144  	}
  6145  	ret := &Gateway{
  6146  		ServerResponse: googleapi.ServerResponse{
  6147  			Header:         res.Header,
  6148  			HTTPStatusCode: res.StatusCode,
  6149  		},
  6150  	}
  6151  	target := &ret
  6152  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6153  		return nil, err
  6154  	}
  6155  	return ret, nil
  6156  }
  6157  
  6158  type ProjectsLocationsGatewaysGetIamPolicyCall struct {
  6159  	s            *Service
  6160  	resource     string
  6161  	urlParams_   gensupport.URLParams
  6162  	ifNoneMatch_ string
  6163  	ctx_         context.Context
  6164  	header_      http.Header
  6165  }
  6166  
  6167  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  6168  // empty policy if the resource exists and does not have a policy set.
  6169  //
  6170  //   - resource: REQUIRED: The resource for which the policy is being requested.
  6171  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6172  //     for the appropriate value for this field.
  6173  func (r *ProjectsLocationsGatewaysService) GetIamPolicy(resource string) *ProjectsLocationsGatewaysGetIamPolicyCall {
  6174  	c := &ProjectsLocationsGatewaysGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6175  	c.resource = resource
  6176  	return c
  6177  }
  6178  
  6179  // OptionsRequestedPolicyVersion sets the optional parameter
  6180  // "options.requestedPolicyVersion": The maximum policy version that will be
  6181  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  6182  // an invalid value will be rejected. Requests for policies with any
  6183  // conditional role bindings must specify version 3. Policies with no
  6184  // conditional role bindings may specify any valid value or leave the field
  6185  // unset. The policy in the response might use the policy version that you
  6186  // specified, or it might use a lower policy version. For example, if you
  6187  // specify version 3, but the policy has no conditional role bindings, the
  6188  // response uses version 1. To learn which resources support conditions in
  6189  // their IAM policies, see the IAM documentation
  6190  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  6191  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGatewaysGetIamPolicyCall {
  6192  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  6193  	return c
  6194  }
  6195  
  6196  // Fields allows partial responses to be retrieved. See
  6197  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6198  // details.
  6199  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysGetIamPolicyCall {
  6200  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6201  	return c
  6202  }
  6203  
  6204  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6205  // object's ETag matches the given value. This is useful for getting updates
  6206  // only after the object has changed since the last request.
  6207  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysGetIamPolicyCall {
  6208  	c.ifNoneMatch_ = entityTag
  6209  	return c
  6210  }
  6211  
  6212  // Context sets the context to be used in this call's Do method.
  6213  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysGetIamPolicyCall {
  6214  	c.ctx_ = ctx
  6215  	return c
  6216  }
  6217  
  6218  // Header returns a http.Header that can be modified by the caller to add
  6219  // headers to the request.
  6220  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Header() http.Header {
  6221  	if c.header_ == nil {
  6222  		c.header_ = make(http.Header)
  6223  	}
  6224  	return c.header_
  6225  }
  6226  
  6227  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6228  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6229  	if c.ifNoneMatch_ != "" {
  6230  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6231  	}
  6232  	var body io.Reader = nil
  6233  	c.urlParams_.Set("alt", alt)
  6234  	c.urlParams_.Set("prettyPrint", "false")
  6235  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  6236  	urls += "?" + c.urlParams_.Encode()
  6237  	req, err := http.NewRequest("GET", urls, body)
  6238  	if err != nil {
  6239  		return nil, err
  6240  	}
  6241  	req.Header = reqHeaders
  6242  	googleapi.Expand(req.URL, map[string]string{
  6243  		"resource": c.resource,
  6244  	})
  6245  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6246  }
  6247  
  6248  // Do executes the "networkservices.projects.locations.gateways.getIamPolicy" call.
  6249  // Any non-2xx status code is an error. Response headers are in either
  6250  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6251  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6252  // whether the returned error was because http.StatusNotModified was returned.
  6253  func (c *ProjectsLocationsGatewaysGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6254  	gensupport.SetOptions(c.urlParams_, opts...)
  6255  	res, err := c.doRequest("json")
  6256  	if res != nil && res.StatusCode == http.StatusNotModified {
  6257  		if res.Body != nil {
  6258  			res.Body.Close()
  6259  		}
  6260  		return nil, gensupport.WrapError(&googleapi.Error{
  6261  			Code:   res.StatusCode,
  6262  			Header: res.Header,
  6263  		})
  6264  	}
  6265  	if err != nil {
  6266  		return nil, err
  6267  	}
  6268  	defer googleapi.CloseBody(res)
  6269  	if err := googleapi.CheckResponse(res); err != nil {
  6270  		return nil, gensupport.WrapError(err)
  6271  	}
  6272  	ret := &Policy{
  6273  		ServerResponse: googleapi.ServerResponse{
  6274  			Header:         res.Header,
  6275  			HTTPStatusCode: res.StatusCode,
  6276  		},
  6277  	}
  6278  	target := &ret
  6279  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6280  		return nil, err
  6281  	}
  6282  	return ret, nil
  6283  }
  6284  
  6285  type ProjectsLocationsGatewaysListCall struct {
  6286  	s            *Service
  6287  	parent       string
  6288  	urlParams_   gensupport.URLParams
  6289  	ifNoneMatch_ string
  6290  	ctx_         context.Context
  6291  	header_      http.Header
  6292  }
  6293  
  6294  // List: Lists Gateways in a given project and location.
  6295  //
  6296  //   - parent: The project and location from which the Gateways should be listed,
  6297  //     specified in the format `projects/*/locations/*`.
  6298  func (r *ProjectsLocationsGatewaysService) List(parent string) *ProjectsLocationsGatewaysListCall {
  6299  	c := &ProjectsLocationsGatewaysListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6300  	c.parent = parent
  6301  	return c
  6302  }
  6303  
  6304  // PageSize sets the optional parameter "pageSize": Maximum number of Gateways
  6305  // to return per call.
  6306  func (c *ProjectsLocationsGatewaysListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaysListCall {
  6307  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6308  	return c
  6309  }
  6310  
  6311  // PageToken sets the optional parameter "pageToken": The value returned by the
  6312  // last `ListGatewaysResponse` Indicates that this is a continuation of a prior
  6313  // `ListGateways` call, and that the system should return the next page of
  6314  // data.
  6315  func (c *ProjectsLocationsGatewaysListCall) PageToken(pageToken string) *ProjectsLocationsGatewaysListCall {
  6316  	c.urlParams_.Set("pageToken", pageToken)
  6317  	return c
  6318  }
  6319  
  6320  // Fields allows partial responses to be retrieved. See
  6321  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6322  // details.
  6323  func (c *ProjectsLocationsGatewaysListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysListCall {
  6324  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6325  	return c
  6326  }
  6327  
  6328  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6329  // object's ETag matches the given value. This is useful for getting updates
  6330  // only after the object has changed since the last request.
  6331  func (c *ProjectsLocationsGatewaysListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaysListCall {
  6332  	c.ifNoneMatch_ = entityTag
  6333  	return c
  6334  }
  6335  
  6336  // Context sets the context to be used in this call's Do method.
  6337  func (c *ProjectsLocationsGatewaysListCall) Context(ctx context.Context) *ProjectsLocationsGatewaysListCall {
  6338  	c.ctx_ = ctx
  6339  	return c
  6340  }
  6341  
  6342  // Header returns a http.Header that can be modified by the caller to add
  6343  // headers to the request.
  6344  func (c *ProjectsLocationsGatewaysListCall) Header() http.Header {
  6345  	if c.header_ == nil {
  6346  		c.header_ = make(http.Header)
  6347  	}
  6348  	return c.header_
  6349  }
  6350  
  6351  func (c *ProjectsLocationsGatewaysListCall) doRequest(alt string) (*http.Response, error) {
  6352  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6353  	if c.ifNoneMatch_ != "" {
  6354  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6355  	}
  6356  	var body io.Reader = nil
  6357  	c.urlParams_.Set("alt", alt)
  6358  	c.urlParams_.Set("prettyPrint", "false")
  6359  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/gateways")
  6360  	urls += "?" + c.urlParams_.Encode()
  6361  	req, err := http.NewRequest("GET", urls, body)
  6362  	if err != nil {
  6363  		return nil, err
  6364  	}
  6365  	req.Header = reqHeaders
  6366  	googleapi.Expand(req.URL, map[string]string{
  6367  		"parent": c.parent,
  6368  	})
  6369  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6370  }
  6371  
  6372  // Do executes the "networkservices.projects.locations.gateways.list" call.
  6373  // Any non-2xx status code is an error. Response headers are in either
  6374  // *ListGatewaysResponse.ServerResponse.Header or (if a response was returned
  6375  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6376  // check whether the returned error was because http.StatusNotModified was
  6377  // returned.
  6378  func (c *ProjectsLocationsGatewaysListCall) Do(opts ...googleapi.CallOption) (*ListGatewaysResponse, error) {
  6379  	gensupport.SetOptions(c.urlParams_, opts...)
  6380  	res, err := c.doRequest("json")
  6381  	if res != nil && res.StatusCode == http.StatusNotModified {
  6382  		if res.Body != nil {
  6383  			res.Body.Close()
  6384  		}
  6385  		return nil, gensupport.WrapError(&googleapi.Error{
  6386  			Code:   res.StatusCode,
  6387  			Header: res.Header,
  6388  		})
  6389  	}
  6390  	if err != nil {
  6391  		return nil, err
  6392  	}
  6393  	defer googleapi.CloseBody(res)
  6394  	if err := googleapi.CheckResponse(res); err != nil {
  6395  		return nil, gensupport.WrapError(err)
  6396  	}
  6397  	ret := &ListGatewaysResponse{
  6398  		ServerResponse: googleapi.ServerResponse{
  6399  			Header:         res.Header,
  6400  			HTTPStatusCode: res.StatusCode,
  6401  		},
  6402  	}
  6403  	target := &ret
  6404  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6405  		return nil, err
  6406  	}
  6407  	return ret, nil
  6408  }
  6409  
  6410  // Pages invokes f for each page of results.
  6411  // A non-nil error returned from f will halt the iteration.
  6412  // The provided context supersedes any context provided to the Context method.
  6413  func (c *ProjectsLocationsGatewaysListCall) Pages(ctx context.Context, f func(*ListGatewaysResponse) error) error {
  6414  	c.ctx_ = ctx
  6415  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6416  	for {
  6417  		x, err := c.Do()
  6418  		if err != nil {
  6419  			return err
  6420  		}
  6421  		if err := f(x); err != nil {
  6422  			return err
  6423  		}
  6424  		if x.NextPageToken == "" {
  6425  			return nil
  6426  		}
  6427  		c.PageToken(x.NextPageToken)
  6428  	}
  6429  }
  6430  
  6431  type ProjectsLocationsGatewaysPatchCall struct {
  6432  	s          *Service
  6433  	name       string
  6434  	gateway    *Gateway
  6435  	urlParams_ gensupport.URLParams
  6436  	ctx_       context.Context
  6437  	header_    http.Header
  6438  }
  6439  
  6440  // Patch: Updates the parameters of a single Gateway.
  6441  //
  6442  //   - name: Name of the Gateway resource. It matches pattern
  6443  //     `projects/*/locations/*/gateways/`.
  6444  func (r *ProjectsLocationsGatewaysService) Patch(name string, gateway *Gateway) *ProjectsLocationsGatewaysPatchCall {
  6445  	c := &ProjectsLocationsGatewaysPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6446  	c.name = name
  6447  	c.gateway = gateway
  6448  	return c
  6449  }
  6450  
  6451  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  6452  // specify the fields to be overwritten in the Gateway resource by the update.
  6453  // The fields specified in the update_mask are relative to the resource, not
  6454  // the full request. A field will be overwritten if it is in the mask. If the
  6455  // user does not provide a mask then all fields will be overwritten.
  6456  func (c *ProjectsLocationsGatewaysPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaysPatchCall {
  6457  	c.urlParams_.Set("updateMask", updateMask)
  6458  	return c
  6459  }
  6460  
  6461  // Fields allows partial responses to be retrieved. See
  6462  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6463  // details.
  6464  func (c *ProjectsLocationsGatewaysPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysPatchCall {
  6465  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6466  	return c
  6467  }
  6468  
  6469  // Context sets the context to be used in this call's Do method.
  6470  func (c *ProjectsLocationsGatewaysPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaysPatchCall {
  6471  	c.ctx_ = ctx
  6472  	return c
  6473  }
  6474  
  6475  // Header returns a http.Header that can be modified by the caller to add
  6476  // headers to the request.
  6477  func (c *ProjectsLocationsGatewaysPatchCall) Header() http.Header {
  6478  	if c.header_ == nil {
  6479  		c.header_ = make(http.Header)
  6480  	}
  6481  	return c.header_
  6482  }
  6483  
  6484  func (c *ProjectsLocationsGatewaysPatchCall) doRequest(alt string) (*http.Response, error) {
  6485  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6486  	var body io.Reader = nil
  6487  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.gateway)
  6488  	if err != nil {
  6489  		return nil, err
  6490  	}
  6491  	c.urlParams_.Set("alt", alt)
  6492  	c.urlParams_.Set("prettyPrint", "false")
  6493  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6494  	urls += "?" + c.urlParams_.Encode()
  6495  	req, err := http.NewRequest("PATCH", urls, body)
  6496  	if err != nil {
  6497  		return nil, err
  6498  	}
  6499  	req.Header = reqHeaders
  6500  	googleapi.Expand(req.URL, map[string]string{
  6501  		"name": c.name,
  6502  	})
  6503  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6504  }
  6505  
  6506  // Do executes the "networkservices.projects.locations.gateways.patch" call.
  6507  // Any non-2xx status code is an error. Response headers are in either
  6508  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6509  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6510  // whether the returned error was because http.StatusNotModified was returned.
  6511  func (c *ProjectsLocationsGatewaysPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6512  	gensupport.SetOptions(c.urlParams_, opts...)
  6513  	res, err := c.doRequest("json")
  6514  	if res != nil && res.StatusCode == http.StatusNotModified {
  6515  		if res.Body != nil {
  6516  			res.Body.Close()
  6517  		}
  6518  		return nil, gensupport.WrapError(&googleapi.Error{
  6519  			Code:   res.StatusCode,
  6520  			Header: res.Header,
  6521  		})
  6522  	}
  6523  	if err != nil {
  6524  		return nil, err
  6525  	}
  6526  	defer googleapi.CloseBody(res)
  6527  	if err := googleapi.CheckResponse(res); err != nil {
  6528  		return nil, gensupport.WrapError(err)
  6529  	}
  6530  	ret := &Operation{
  6531  		ServerResponse: googleapi.ServerResponse{
  6532  			Header:         res.Header,
  6533  			HTTPStatusCode: res.StatusCode,
  6534  		},
  6535  	}
  6536  	target := &ret
  6537  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6538  		return nil, err
  6539  	}
  6540  	return ret, nil
  6541  }
  6542  
  6543  type ProjectsLocationsGatewaysSetIamPolicyCall struct {
  6544  	s                   *Service
  6545  	resource            string
  6546  	setiampolicyrequest *SetIamPolicyRequest
  6547  	urlParams_          gensupport.URLParams
  6548  	ctx_                context.Context
  6549  	header_             http.Header
  6550  }
  6551  
  6552  // SetIamPolicy: Sets the access control policy on the specified resource.
  6553  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  6554  // and `PERMISSION_DENIED` errors.
  6555  //
  6556  //   - resource: REQUIRED: The resource for which the policy is being specified.
  6557  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6558  //     for the appropriate value for this field.
  6559  func (r *ProjectsLocationsGatewaysService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGatewaysSetIamPolicyCall {
  6560  	c := &ProjectsLocationsGatewaysSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6561  	c.resource = resource
  6562  	c.setiampolicyrequest = setiampolicyrequest
  6563  	return c
  6564  }
  6565  
  6566  // Fields allows partial responses to be retrieved. See
  6567  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6568  // details.
  6569  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysSetIamPolicyCall {
  6570  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6571  	return c
  6572  }
  6573  
  6574  // Context sets the context to be used in this call's Do method.
  6575  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGatewaysSetIamPolicyCall {
  6576  	c.ctx_ = ctx
  6577  	return c
  6578  }
  6579  
  6580  // Header returns a http.Header that can be modified by the caller to add
  6581  // headers to the request.
  6582  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Header() http.Header {
  6583  	if c.header_ == nil {
  6584  		c.header_ = make(http.Header)
  6585  	}
  6586  	return c.header_
  6587  }
  6588  
  6589  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6590  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6591  	var body io.Reader = nil
  6592  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  6593  	if err != nil {
  6594  		return nil, err
  6595  	}
  6596  	c.urlParams_.Set("alt", alt)
  6597  	c.urlParams_.Set("prettyPrint", "false")
  6598  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  6599  	urls += "?" + c.urlParams_.Encode()
  6600  	req, err := http.NewRequest("POST", urls, body)
  6601  	if err != nil {
  6602  		return nil, err
  6603  	}
  6604  	req.Header = reqHeaders
  6605  	googleapi.Expand(req.URL, map[string]string{
  6606  		"resource": c.resource,
  6607  	})
  6608  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6609  }
  6610  
  6611  // Do executes the "networkservices.projects.locations.gateways.setIamPolicy" call.
  6612  // Any non-2xx status code is an error. Response headers are in either
  6613  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6614  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6615  // whether the returned error was because http.StatusNotModified was returned.
  6616  func (c *ProjectsLocationsGatewaysSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6617  	gensupport.SetOptions(c.urlParams_, opts...)
  6618  	res, err := c.doRequest("json")
  6619  	if res != nil && res.StatusCode == http.StatusNotModified {
  6620  		if res.Body != nil {
  6621  			res.Body.Close()
  6622  		}
  6623  		return nil, gensupport.WrapError(&googleapi.Error{
  6624  			Code:   res.StatusCode,
  6625  			Header: res.Header,
  6626  		})
  6627  	}
  6628  	if err != nil {
  6629  		return nil, err
  6630  	}
  6631  	defer googleapi.CloseBody(res)
  6632  	if err := googleapi.CheckResponse(res); err != nil {
  6633  		return nil, gensupport.WrapError(err)
  6634  	}
  6635  	ret := &Policy{
  6636  		ServerResponse: googleapi.ServerResponse{
  6637  			Header:         res.Header,
  6638  			HTTPStatusCode: res.StatusCode,
  6639  		},
  6640  	}
  6641  	target := &ret
  6642  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6643  		return nil, err
  6644  	}
  6645  	return ret, nil
  6646  }
  6647  
  6648  type ProjectsLocationsGatewaysTestIamPermissionsCall struct {
  6649  	s                         *Service
  6650  	resource                  string
  6651  	testiampermissionsrequest *TestIamPermissionsRequest
  6652  	urlParams_                gensupport.URLParams
  6653  	ctx_                      context.Context
  6654  	header_                   http.Header
  6655  }
  6656  
  6657  // TestIamPermissions: Returns permissions that a caller has on the specified
  6658  // resource. If the resource does not exist, this will return an empty set of
  6659  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  6660  // used for building permission-aware UIs and command-line tools, not for
  6661  // authorization checking. This operation may "fail open" without warning.
  6662  //
  6663  //   - resource: REQUIRED: The resource for which the policy detail is being
  6664  //     requested. See Resource names
  6665  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  6666  //     value for this field.
  6667  func (r *ProjectsLocationsGatewaysService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  6668  	c := &ProjectsLocationsGatewaysTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6669  	c.resource = resource
  6670  	c.testiampermissionsrequest = testiampermissionsrequest
  6671  	return c
  6672  }
  6673  
  6674  // Fields allows partial responses to be retrieved. See
  6675  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6676  // details.
  6677  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  6678  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6679  	return c
  6680  }
  6681  
  6682  // Context sets the context to be used in this call's Do method.
  6683  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGatewaysTestIamPermissionsCall {
  6684  	c.ctx_ = ctx
  6685  	return c
  6686  }
  6687  
  6688  // Header returns a http.Header that can be modified by the caller to add
  6689  // headers to the request.
  6690  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Header() http.Header {
  6691  	if c.header_ == nil {
  6692  		c.header_ = make(http.Header)
  6693  	}
  6694  	return c.header_
  6695  }
  6696  
  6697  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  6698  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6699  	var body io.Reader = nil
  6700  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  6701  	if err != nil {
  6702  		return nil, err
  6703  	}
  6704  	c.urlParams_.Set("alt", alt)
  6705  	c.urlParams_.Set("prettyPrint", "false")
  6706  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  6707  	urls += "?" + c.urlParams_.Encode()
  6708  	req, err := http.NewRequest("POST", urls, body)
  6709  	if err != nil {
  6710  		return nil, err
  6711  	}
  6712  	req.Header = reqHeaders
  6713  	googleapi.Expand(req.URL, map[string]string{
  6714  		"resource": c.resource,
  6715  	})
  6716  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6717  }
  6718  
  6719  // Do executes the "networkservices.projects.locations.gateways.testIamPermissions" call.
  6720  // Any non-2xx status code is an error. Response headers are in either
  6721  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  6722  // returned at all) in error.(*googleapi.Error).Header. Use
  6723  // googleapi.IsNotModified to check whether the returned error was because
  6724  // http.StatusNotModified was returned.
  6725  func (c *ProjectsLocationsGatewaysTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  6726  	gensupport.SetOptions(c.urlParams_, opts...)
  6727  	res, err := c.doRequest("json")
  6728  	if res != nil && res.StatusCode == http.StatusNotModified {
  6729  		if res.Body != nil {
  6730  			res.Body.Close()
  6731  		}
  6732  		return nil, gensupport.WrapError(&googleapi.Error{
  6733  			Code:   res.StatusCode,
  6734  			Header: res.Header,
  6735  		})
  6736  	}
  6737  	if err != nil {
  6738  		return nil, err
  6739  	}
  6740  	defer googleapi.CloseBody(res)
  6741  	if err := googleapi.CheckResponse(res); err != nil {
  6742  		return nil, gensupport.WrapError(err)
  6743  	}
  6744  	ret := &TestIamPermissionsResponse{
  6745  		ServerResponse: googleapi.ServerResponse{
  6746  			Header:         res.Header,
  6747  			HTTPStatusCode: res.StatusCode,
  6748  		},
  6749  	}
  6750  	target := &ret
  6751  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6752  		return nil, err
  6753  	}
  6754  	return ret, nil
  6755  }
  6756  
  6757  type ProjectsLocationsGrpcRoutesCreateCall struct {
  6758  	s          *Service
  6759  	parent     string
  6760  	grpcroute  *GrpcRoute
  6761  	urlParams_ gensupport.URLParams
  6762  	ctx_       context.Context
  6763  	header_    http.Header
  6764  }
  6765  
  6766  // Create: Creates a new GrpcRoute in a given project and location.
  6767  //
  6768  //   - parent: The parent resource of the GrpcRoute. Must be in the format
  6769  //     `projects/*/locations/global`.
  6770  func (r *ProjectsLocationsGrpcRoutesService) Create(parent string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesCreateCall {
  6771  	c := &ProjectsLocationsGrpcRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6772  	c.parent = parent
  6773  	c.grpcroute = grpcroute
  6774  	return c
  6775  }
  6776  
  6777  // GrpcRouteId sets the optional parameter "grpcRouteId": Required. Short name
  6778  // of the GrpcRoute resource to be created.
  6779  func (c *ProjectsLocationsGrpcRoutesCreateCall) GrpcRouteId(grpcRouteId string) *ProjectsLocationsGrpcRoutesCreateCall {
  6780  	c.urlParams_.Set("grpcRouteId", grpcRouteId)
  6781  	return c
  6782  }
  6783  
  6784  // Fields allows partial responses to be retrieved. See
  6785  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6786  // details.
  6787  func (c *ProjectsLocationsGrpcRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesCreateCall {
  6788  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6789  	return c
  6790  }
  6791  
  6792  // Context sets the context to be used in this call's Do method.
  6793  func (c *ProjectsLocationsGrpcRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesCreateCall {
  6794  	c.ctx_ = ctx
  6795  	return c
  6796  }
  6797  
  6798  // Header returns a http.Header that can be modified by the caller to add
  6799  // headers to the request.
  6800  func (c *ProjectsLocationsGrpcRoutesCreateCall) Header() http.Header {
  6801  	if c.header_ == nil {
  6802  		c.header_ = make(http.Header)
  6803  	}
  6804  	return c.header_
  6805  }
  6806  
  6807  func (c *ProjectsLocationsGrpcRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
  6808  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6809  	var body io.Reader = nil
  6810  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.grpcroute)
  6811  	if err != nil {
  6812  		return nil, err
  6813  	}
  6814  	c.urlParams_.Set("alt", alt)
  6815  	c.urlParams_.Set("prettyPrint", "false")
  6816  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/grpcRoutes")
  6817  	urls += "?" + c.urlParams_.Encode()
  6818  	req, err := http.NewRequest("POST", urls, body)
  6819  	if err != nil {
  6820  		return nil, err
  6821  	}
  6822  	req.Header = reqHeaders
  6823  	googleapi.Expand(req.URL, map[string]string{
  6824  		"parent": c.parent,
  6825  	})
  6826  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6827  }
  6828  
  6829  // Do executes the "networkservices.projects.locations.grpcRoutes.create" call.
  6830  // Any non-2xx status code is an error. Response headers are in either
  6831  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6832  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6833  // whether the returned error was because http.StatusNotModified was returned.
  6834  func (c *ProjectsLocationsGrpcRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6835  	gensupport.SetOptions(c.urlParams_, opts...)
  6836  	res, err := c.doRequest("json")
  6837  	if res != nil && res.StatusCode == http.StatusNotModified {
  6838  		if res.Body != nil {
  6839  			res.Body.Close()
  6840  		}
  6841  		return nil, gensupport.WrapError(&googleapi.Error{
  6842  			Code:   res.StatusCode,
  6843  			Header: res.Header,
  6844  		})
  6845  	}
  6846  	if err != nil {
  6847  		return nil, err
  6848  	}
  6849  	defer googleapi.CloseBody(res)
  6850  	if err := googleapi.CheckResponse(res); err != nil {
  6851  		return nil, gensupport.WrapError(err)
  6852  	}
  6853  	ret := &Operation{
  6854  		ServerResponse: googleapi.ServerResponse{
  6855  			Header:         res.Header,
  6856  			HTTPStatusCode: res.StatusCode,
  6857  		},
  6858  	}
  6859  	target := &ret
  6860  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6861  		return nil, err
  6862  	}
  6863  	return ret, nil
  6864  }
  6865  
  6866  type ProjectsLocationsGrpcRoutesDeleteCall struct {
  6867  	s          *Service
  6868  	name       string
  6869  	urlParams_ gensupport.URLParams
  6870  	ctx_       context.Context
  6871  	header_    http.Header
  6872  }
  6873  
  6874  // Delete: Deletes a single GrpcRoute.
  6875  //
  6876  //   - name: A name of the GrpcRoute to delete. Must be in the format
  6877  //     `projects/*/locations/global/grpcRoutes/*`.
  6878  func (r *ProjectsLocationsGrpcRoutesService) Delete(name string) *ProjectsLocationsGrpcRoutesDeleteCall {
  6879  	c := &ProjectsLocationsGrpcRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6880  	c.name = name
  6881  	return c
  6882  }
  6883  
  6884  // Fields allows partial responses to be retrieved. See
  6885  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6886  // details.
  6887  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesDeleteCall {
  6888  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6889  	return c
  6890  }
  6891  
  6892  // Context sets the context to be used in this call's Do method.
  6893  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesDeleteCall {
  6894  	c.ctx_ = ctx
  6895  	return c
  6896  }
  6897  
  6898  // Header returns a http.Header that can be modified by the caller to add
  6899  // headers to the request.
  6900  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Header() http.Header {
  6901  	if c.header_ == nil {
  6902  		c.header_ = make(http.Header)
  6903  	}
  6904  	return c.header_
  6905  }
  6906  
  6907  func (c *ProjectsLocationsGrpcRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6908  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6909  	var body io.Reader = nil
  6910  	c.urlParams_.Set("alt", alt)
  6911  	c.urlParams_.Set("prettyPrint", "false")
  6912  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6913  	urls += "?" + c.urlParams_.Encode()
  6914  	req, err := http.NewRequest("DELETE", urls, body)
  6915  	if err != nil {
  6916  		return nil, err
  6917  	}
  6918  	req.Header = reqHeaders
  6919  	googleapi.Expand(req.URL, map[string]string{
  6920  		"name": c.name,
  6921  	})
  6922  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6923  }
  6924  
  6925  // Do executes the "networkservices.projects.locations.grpcRoutes.delete" call.
  6926  // Any non-2xx status code is an error. Response headers are in either
  6927  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  6928  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6929  // whether the returned error was because http.StatusNotModified was returned.
  6930  func (c *ProjectsLocationsGrpcRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  6931  	gensupport.SetOptions(c.urlParams_, opts...)
  6932  	res, err := c.doRequest("json")
  6933  	if res != nil && res.StatusCode == http.StatusNotModified {
  6934  		if res.Body != nil {
  6935  			res.Body.Close()
  6936  		}
  6937  		return nil, gensupport.WrapError(&googleapi.Error{
  6938  			Code:   res.StatusCode,
  6939  			Header: res.Header,
  6940  		})
  6941  	}
  6942  	if err != nil {
  6943  		return nil, err
  6944  	}
  6945  	defer googleapi.CloseBody(res)
  6946  	if err := googleapi.CheckResponse(res); err != nil {
  6947  		return nil, gensupport.WrapError(err)
  6948  	}
  6949  	ret := &Operation{
  6950  		ServerResponse: googleapi.ServerResponse{
  6951  			Header:         res.Header,
  6952  			HTTPStatusCode: res.StatusCode,
  6953  		},
  6954  	}
  6955  	target := &ret
  6956  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6957  		return nil, err
  6958  	}
  6959  	return ret, nil
  6960  }
  6961  
  6962  type ProjectsLocationsGrpcRoutesGetCall struct {
  6963  	s            *Service
  6964  	name         string
  6965  	urlParams_   gensupport.URLParams
  6966  	ifNoneMatch_ string
  6967  	ctx_         context.Context
  6968  	header_      http.Header
  6969  }
  6970  
  6971  // Get: Gets details of a single GrpcRoute.
  6972  //
  6973  //   - name: A name of the GrpcRoute to get. Must be in the format
  6974  //     `projects/*/locations/global/grpcRoutes/*`.
  6975  func (r *ProjectsLocationsGrpcRoutesService) Get(name string) *ProjectsLocationsGrpcRoutesGetCall {
  6976  	c := &ProjectsLocationsGrpcRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6977  	c.name = name
  6978  	return c
  6979  }
  6980  
  6981  // Fields allows partial responses to be retrieved. See
  6982  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6983  // details.
  6984  func (c *ProjectsLocationsGrpcRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesGetCall {
  6985  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6986  	return c
  6987  }
  6988  
  6989  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6990  // object's ETag matches the given value. This is useful for getting updates
  6991  // only after the object has changed since the last request.
  6992  func (c *ProjectsLocationsGrpcRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesGetCall {
  6993  	c.ifNoneMatch_ = entityTag
  6994  	return c
  6995  }
  6996  
  6997  // Context sets the context to be used in this call's Do method.
  6998  func (c *ProjectsLocationsGrpcRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesGetCall {
  6999  	c.ctx_ = ctx
  7000  	return c
  7001  }
  7002  
  7003  // Header returns a http.Header that can be modified by the caller to add
  7004  // headers to the request.
  7005  func (c *ProjectsLocationsGrpcRoutesGetCall) Header() http.Header {
  7006  	if c.header_ == nil {
  7007  		c.header_ = make(http.Header)
  7008  	}
  7009  	return c.header_
  7010  }
  7011  
  7012  func (c *ProjectsLocationsGrpcRoutesGetCall) doRequest(alt string) (*http.Response, error) {
  7013  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7014  	if c.ifNoneMatch_ != "" {
  7015  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7016  	}
  7017  	var body io.Reader = nil
  7018  	c.urlParams_.Set("alt", alt)
  7019  	c.urlParams_.Set("prettyPrint", "false")
  7020  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7021  	urls += "?" + c.urlParams_.Encode()
  7022  	req, err := http.NewRequest("GET", urls, body)
  7023  	if err != nil {
  7024  		return nil, err
  7025  	}
  7026  	req.Header = reqHeaders
  7027  	googleapi.Expand(req.URL, map[string]string{
  7028  		"name": c.name,
  7029  	})
  7030  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7031  }
  7032  
  7033  // Do executes the "networkservices.projects.locations.grpcRoutes.get" call.
  7034  // Any non-2xx status code is an error. Response headers are in either
  7035  // *GrpcRoute.ServerResponse.Header or (if a response was returned at all) in
  7036  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7037  // whether the returned error was because http.StatusNotModified was returned.
  7038  func (c *ProjectsLocationsGrpcRoutesGetCall) Do(opts ...googleapi.CallOption) (*GrpcRoute, error) {
  7039  	gensupport.SetOptions(c.urlParams_, opts...)
  7040  	res, err := c.doRequest("json")
  7041  	if res != nil && res.StatusCode == http.StatusNotModified {
  7042  		if res.Body != nil {
  7043  			res.Body.Close()
  7044  		}
  7045  		return nil, gensupport.WrapError(&googleapi.Error{
  7046  			Code:   res.StatusCode,
  7047  			Header: res.Header,
  7048  		})
  7049  	}
  7050  	if err != nil {
  7051  		return nil, err
  7052  	}
  7053  	defer googleapi.CloseBody(res)
  7054  	if err := googleapi.CheckResponse(res); err != nil {
  7055  		return nil, gensupport.WrapError(err)
  7056  	}
  7057  	ret := &GrpcRoute{
  7058  		ServerResponse: googleapi.ServerResponse{
  7059  			Header:         res.Header,
  7060  			HTTPStatusCode: res.StatusCode,
  7061  		},
  7062  	}
  7063  	target := &ret
  7064  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7065  		return nil, err
  7066  	}
  7067  	return ret, nil
  7068  }
  7069  
  7070  type ProjectsLocationsGrpcRoutesListCall struct {
  7071  	s            *Service
  7072  	parent       string
  7073  	urlParams_   gensupport.URLParams
  7074  	ifNoneMatch_ string
  7075  	ctx_         context.Context
  7076  	header_      http.Header
  7077  }
  7078  
  7079  // List: Lists GrpcRoutes in a given project and location.
  7080  //
  7081  //   - parent: The project and location from which the GrpcRoutes should be
  7082  //     listed, specified in the format `projects/*/locations/global`.
  7083  func (r *ProjectsLocationsGrpcRoutesService) List(parent string) *ProjectsLocationsGrpcRoutesListCall {
  7084  	c := &ProjectsLocationsGrpcRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7085  	c.parent = parent
  7086  	return c
  7087  }
  7088  
  7089  // PageSize sets the optional parameter "pageSize": Maximum number of
  7090  // GrpcRoutes to return per call.
  7091  func (c *ProjectsLocationsGrpcRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGrpcRoutesListCall {
  7092  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7093  	return c
  7094  }
  7095  
  7096  // PageToken sets the optional parameter "pageToken": The value returned by the
  7097  // last `ListGrpcRoutesResponse` Indicates that this is a continuation of a
  7098  // prior `ListGrpcRoutes` call, and that the system should return the next page
  7099  // of data.
  7100  func (c *ProjectsLocationsGrpcRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGrpcRoutesListCall {
  7101  	c.urlParams_.Set("pageToken", pageToken)
  7102  	return c
  7103  }
  7104  
  7105  // Fields allows partial responses to be retrieved. See
  7106  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7107  // details.
  7108  func (c *ProjectsLocationsGrpcRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesListCall {
  7109  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7110  	return c
  7111  }
  7112  
  7113  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7114  // object's ETag matches the given value. This is useful for getting updates
  7115  // only after the object has changed since the last request.
  7116  func (c *ProjectsLocationsGrpcRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGrpcRoutesListCall {
  7117  	c.ifNoneMatch_ = entityTag
  7118  	return c
  7119  }
  7120  
  7121  // Context sets the context to be used in this call's Do method.
  7122  func (c *ProjectsLocationsGrpcRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesListCall {
  7123  	c.ctx_ = ctx
  7124  	return c
  7125  }
  7126  
  7127  // Header returns a http.Header that can be modified by the caller to add
  7128  // headers to the request.
  7129  func (c *ProjectsLocationsGrpcRoutesListCall) Header() http.Header {
  7130  	if c.header_ == nil {
  7131  		c.header_ = make(http.Header)
  7132  	}
  7133  	return c.header_
  7134  }
  7135  
  7136  func (c *ProjectsLocationsGrpcRoutesListCall) doRequest(alt string) (*http.Response, error) {
  7137  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7138  	if c.ifNoneMatch_ != "" {
  7139  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7140  	}
  7141  	var body io.Reader = nil
  7142  	c.urlParams_.Set("alt", alt)
  7143  	c.urlParams_.Set("prettyPrint", "false")
  7144  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/grpcRoutes")
  7145  	urls += "?" + c.urlParams_.Encode()
  7146  	req, err := http.NewRequest("GET", urls, body)
  7147  	if err != nil {
  7148  		return nil, err
  7149  	}
  7150  	req.Header = reqHeaders
  7151  	googleapi.Expand(req.URL, map[string]string{
  7152  		"parent": c.parent,
  7153  	})
  7154  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7155  }
  7156  
  7157  // Do executes the "networkservices.projects.locations.grpcRoutes.list" call.
  7158  // Any non-2xx status code is an error. Response headers are in either
  7159  // *ListGrpcRoutesResponse.ServerResponse.Header or (if a response was returned
  7160  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7161  // check whether the returned error was because http.StatusNotModified was
  7162  // returned.
  7163  func (c *ProjectsLocationsGrpcRoutesListCall) Do(opts ...googleapi.CallOption) (*ListGrpcRoutesResponse, error) {
  7164  	gensupport.SetOptions(c.urlParams_, opts...)
  7165  	res, err := c.doRequest("json")
  7166  	if res != nil && res.StatusCode == http.StatusNotModified {
  7167  		if res.Body != nil {
  7168  			res.Body.Close()
  7169  		}
  7170  		return nil, gensupport.WrapError(&googleapi.Error{
  7171  			Code:   res.StatusCode,
  7172  			Header: res.Header,
  7173  		})
  7174  	}
  7175  	if err != nil {
  7176  		return nil, err
  7177  	}
  7178  	defer googleapi.CloseBody(res)
  7179  	if err := googleapi.CheckResponse(res); err != nil {
  7180  		return nil, gensupport.WrapError(err)
  7181  	}
  7182  	ret := &ListGrpcRoutesResponse{
  7183  		ServerResponse: googleapi.ServerResponse{
  7184  			Header:         res.Header,
  7185  			HTTPStatusCode: res.StatusCode,
  7186  		},
  7187  	}
  7188  	target := &ret
  7189  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7190  		return nil, err
  7191  	}
  7192  	return ret, nil
  7193  }
  7194  
  7195  // Pages invokes f for each page of results.
  7196  // A non-nil error returned from f will halt the iteration.
  7197  // The provided context supersedes any context provided to the Context method.
  7198  func (c *ProjectsLocationsGrpcRoutesListCall) Pages(ctx context.Context, f func(*ListGrpcRoutesResponse) error) error {
  7199  	c.ctx_ = ctx
  7200  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7201  	for {
  7202  		x, err := c.Do()
  7203  		if err != nil {
  7204  			return err
  7205  		}
  7206  		if err := f(x); err != nil {
  7207  			return err
  7208  		}
  7209  		if x.NextPageToken == "" {
  7210  			return nil
  7211  		}
  7212  		c.PageToken(x.NextPageToken)
  7213  	}
  7214  }
  7215  
  7216  type ProjectsLocationsGrpcRoutesPatchCall struct {
  7217  	s          *Service
  7218  	name       string
  7219  	grpcroute  *GrpcRoute
  7220  	urlParams_ gensupport.URLParams
  7221  	ctx_       context.Context
  7222  	header_    http.Header
  7223  }
  7224  
  7225  // Patch: Updates the parameters of a single GrpcRoute.
  7226  //
  7227  //   - name: Name of the GrpcRoute resource. It matches pattern
  7228  //     `projects/*/locations/global/grpcRoutes/`.
  7229  func (r *ProjectsLocationsGrpcRoutesService) Patch(name string, grpcroute *GrpcRoute) *ProjectsLocationsGrpcRoutesPatchCall {
  7230  	c := &ProjectsLocationsGrpcRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7231  	c.name = name
  7232  	c.grpcroute = grpcroute
  7233  	return c
  7234  }
  7235  
  7236  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  7237  // specify the fields to be overwritten in the GrpcRoute resource by the
  7238  // update. The fields specified in the update_mask are relative to the
  7239  // resource, not the full request. A field will be overwritten if it is in the
  7240  // mask. If the user does not provide a mask then all fields will be
  7241  // overwritten.
  7242  func (c *ProjectsLocationsGrpcRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGrpcRoutesPatchCall {
  7243  	c.urlParams_.Set("updateMask", updateMask)
  7244  	return c
  7245  }
  7246  
  7247  // Fields allows partial responses to be retrieved. See
  7248  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7249  // details.
  7250  func (c *ProjectsLocationsGrpcRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGrpcRoutesPatchCall {
  7251  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7252  	return c
  7253  }
  7254  
  7255  // Context sets the context to be used in this call's Do method.
  7256  func (c *ProjectsLocationsGrpcRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsGrpcRoutesPatchCall {
  7257  	c.ctx_ = ctx
  7258  	return c
  7259  }
  7260  
  7261  // Header returns a http.Header that can be modified by the caller to add
  7262  // headers to the request.
  7263  func (c *ProjectsLocationsGrpcRoutesPatchCall) Header() http.Header {
  7264  	if c.header_ == nil {
  7265  		c.header_ = make(http.Header)
  7266  	}
  7267  	return c.header_
  7268  }
  7269  
  7270  func (c *ProjectsLocationsGrpcRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
  7271  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7272  	var body io.Reader = nil
  7273  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.grpcroute)
  7274  	if err != nil {
  7275  		return nil, err
  7276  	}
  7277  	c.urlParams_.Set("alt", alt)
  7278  	c.urlParams_.Set("prettyPrint", "false")
  7279  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7280  	urls += "?" + c.urlParams_.Encode()
  7281  	req, err := http.NewRequest("PATCH", urls, body)
  7282  	if err != nil {
  7283  		return nil, err
  7284  	}
  7285  	req.Header = reqHeaders
  7286  	googleapi.Expand(req.URL, map[string]string{
  7287  		"name": c.name,
  7288  	})
  7289  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7290  }
  7291  
  7292  // Do executes the "networkservices.projects.locations.grpcRoutes.patch" call.
  7293  // Any non-2xx status code is an error. Response headers are in either
  7294  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7295  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7296  // whether the returned error was because http.StatusNotModified was returned.
  7297  func (c *ProjectsLocationsGrpcRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7298  	gensupport.SetOptions(c.urlParams_, opts...)
  7299  	res, err := c.doRequest("json")
  7300  	if res != nil && res.StatusCode == http.StatusNotModified {
  7301  		if res.Body != nil {
  7302  			res.Body.Close()
  7303  		}
  7304  		return nil, gensupport.WrapError(&googleapi.Error{
  7305  			Code:   res.StatusCode,
  7306  			Header: res.Header,
  7307  		})
  7308  	}
  7309  	if err != nil {
  7310  		return nil, err
  7311  	}
  7312  	defer googleapi.CloseBody(res)
  7313  	if err := googleapi.CheckResponse(res); err != nil {
  7314  		return nil, gensupport.WrapError(err)
  7315  	}
  7316  	ret := &Operation{
  7317  		ServerResponse: googleapi.ServerResponse{
  7318  			Header:         res.Header,
  7319  			HTTPStatusCode: res.StatusCode,
  7320  		},
  7321  	}
  7322  	target := &ret
  7323  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7324  		return nil, err
  7325  	}
  7326  	return ret, nil
  7327  }
  7328  
  7329  type ProjectsLocationsHttpRoutesCreateCall struct {
  7330  	s          *Service
  7331  	parent     string
  7332  	httproute  *HttpRoute
  7333  	urlParams_ gensupport.URLParams
  7334  	ctx_       context.Context
  7335  	header_    http.Header
  7336  }
  7337  
  7338  // Create: Creates a new HttpRoute in a given project and location.
  7339  //
  7340  //   - parent: The parent resource of the HttpRoute. Must be in the format
  7341  //     `projects/*/locations/global`.
  7342  func (r *ProjectsLocationsHttpRoutesService) Create(parent string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesCreateCall {
  7343  	c := &ProjectsLocationsHttpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7344  	c.parent = parent
  7345  	c.httproute = httproute
  7346  	return c
  7347  }
  7348  
  7349  // HttpRouteId sets the optional parameter "httpRouteId": Required. Short name
  7350  // of the HttpRoute resource to be created.
  7351  func (c *ProjectsLocationsHttpRoutesCreateCall) HttpRouteId(httpRouteId string) *ProjectsLocationsHttpRoutesCreateCall {
  7352  	c.urlParams_.Set("httpRouteId", httpRouteId)
  7353  	return c
  7354  }
  7355  
  7356  // Fields allows partial responses to be retrieved. See
  7357  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7358  // details.
  7359  func (c *ProjectsLocationsHttpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesCreateCall {
  7360  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7361  	return c
  7362  }
  7363  
  7364  // Context sets the context to be used in this call's Do method.
  7365  func (c *ProjectsLocationsHttpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesCreateCall {
  7366  	c.ctx_ = ctx
  7367  	return c
  7368  }
  7369  
  7370  // Header returns a http.Header that can be modified by the caller to add
  7371  // headers to the request.
  7372  func (c *ProjectsLocationsHttpRoutesCreateCall) Header() http.Header {
  7373  	if c.header_ == nil {
  7374  		c.header_ = make(http.Header)
  7375  	}
  7376  	return c.header_
  7377  }
  7378  
  7379  func (c *ProjectsLocationsHttpRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
  7380  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7381  	var body io.Reader = nil
  7382  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httproute)
  7383  	if err != nil {
  7384  		return nil, err
  7385  	}
  7386  	c.urlParams_.Set("alt", alt)
  7387  	c.urlParams_.Set("prettyPrint", "false")
  7388  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/httpRoutes")
  7389  	urls += "?" + c.urlParams_.Encode()
  7390  	req, err := http.NewRequest("POST", urls, body)
  7391  	if err != nil {
  7392  		return nil, err
  7393  	}
  7394  	req.Header = reqHeaders
  7395  	googleapi.Expand(req.URL, map[string]string{
  7396  		"parent": c.parent,
  7397  	})
  7398  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7399  }
  7400  
  7401  // Do executes the "networkservices.projects.locations.httpRoutes.create" call.
  7402  // Any non-2xx status code is an error. Response headers are in either
  7403  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7404  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7405  // whether the returned error was because http.StatusNotModified was returned.
  7406  func (c *ProjectsLocationsHttpRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7407  	gensupport.SetOptions(c.urlParams_, opts...)
  7408  	res, err := c.doRequest("json")
  7409  	if res != nil && res.StatusCode == http.StatusNotModified {
  7410  		if res.Body != nil {
  7411  			res.Body.Close()
  7412  		}
  7413  		return nil, gensupport.WrapError(&googleapi.Error{
  7414  			Code:   res.StatusCode,
  7415  			Header: res.Header,
  7416  		})
  7417  	}
  7418  	if err != nil {
  7419  		return nil, err
  7420  	}
  7421  	defer googleapi.CloseBody(res)
  7422  	if err := googleapi.CheckResponse(res); err != nil {
  7423  		return nil, gensupport.WrapError(err)
  7424  	}
  7425  	ret := &Operation{
  7426  		ServerResponse: googleapi.ServerResponse{
  7427  			Header:         res.Header,
  7428  			HTTPStatusCode: res.StatusCode,
  7429  		},
  7430  	}
  7431  	target := &ret
  7432  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7433  		return nil, err
  7434  	}
  7435  	return ret, nil
  7436  }
  7437  
  7438  type ProjectsLocationsHttpRoutesDeleteCall struct {
  7439  	s          *Service
  7440  	name       string
  7441  	urlParams_ gensupport.URLParams
  7442  	ctx_       context.Context
  7443  	header_    http.Header
  7444  }
  7445  
  7446  // Delete: Deletes a single HttpRoute.
  7447  //
  7448  //   - name: A name of the HttpRoute to delete. Must be in the format
  7449  //     `projects/*/locations/global/httpRoutes/*`.
  7450  func (r *ProjectsLocationsHttpRoutesService) Delete(name string) *ProjectsLocationsHttpRoutesDeleteCall {
  7451  	c := &ProjectsLocationsHttpRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7452  	c.name = name
  7453  	return c
  7454  }
  7455  
  7456  // Fields allows partial responses to be retrieved. See
  7457  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7458  // details.
  7459  func (c *ProjectsLocationsHttpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesDeleteCall {
  7460  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7461  	return c
  7462  }
  7463  
  7464  // Context sets the context to be used in this call's Do method.
  7465  func (c *ProjectsLocationsHttpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesDeleteCall {
  7466  	c.ctx_ = ctx
  7467  	return c
  7468  }
  7469  
  7470  // Header returns a http.Header that can be modified by the caller to add
  7471  // headers to the request.
  7472  func (c *ProjectsLocationsHttpRoutesDeleteCall) Header() http.Header {
  7473  	if c.header_ == nil {
  7474  		c.header_ = make(http.Header)
  7475  	}
  7476  	return c.header_
  7477  }
  7478  
  7479  func (c *ProjectsLocationsHttpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7480  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7481  	var body io.Reader = nil
  7482  	c.urlParams_.Set("alt", alt)
  7483  	c.urlParams_.Set("prettyPrint", "false")
  7484  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7485  	urls += "?" + c.urlParams_.Encode()
  7486  	req, err := http.NewRequest("DELETE", urls, body)
  7487  	if err != nil {
  7488  		return nil, err
  7489  	}
  7490  	req.Header = reqHeaders
  7491  	googleapi.Expand(req.URL, map[string]string{
  7492  		"name": c.name,
  7493  	})
  7494  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7495  }
  7496  
  7497  // Do executes the "networkservices.projects.locations.httpRoutes.delete" call.
  7498  // Any non-2xx status code is an error. Response headers are in either
  7499  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7500  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7501  // whether the returned error was because http.StatusNotModified was returned.
  7502  func (c *ProjectsLocationsHttpRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7503  	gensupport.SetOptions(c.urlParams_, opts...)
  7504  	res, err := c.doRequest("json")
  7505  	if res != nil && res.StatusCode == http.StatusNotModified {
  7506  		if res.Body != nil {
  7507  			res.Body.Close()
  7508  		}
  7509  		return nil, gensupport.WrapError(&googleapi.Error{
  7510  			Code:   res.StatusCode,
  7511  			Header: res.Header,
  7512  		})
  7513  	}
  7514  	if err != nil {
  7515  		return nil, err
  7516  	}
  7517  	defer googleapi.CloseBody(res)
  7518  	if err := googleapi.CheckResponse(res); err != nil {
  7519  		return nil, gensupport.WrapError(err)
  7520  	}
  7521  	ret := &Operation{
  7522  		ServerResponse: googleapi.ServerResponse{
  7523  			Header:         res.Header,
  7524  			HTTPStatusCode: res.StatusCode,
  7525  		},
  7526  	}
  7527  	target := &ret
  7528  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7529  		return nil, err
  7530  	}
  7531  	return ret, nil
  7532  }
  7533  
  7534  type ProjectsLocationsHttpRoutesGetCall struct {
  7535  	s            *Service
  7536  	name         string
  7537  	urlParams_   gensupport.URLParams
  7538  	ifNoneMatch_ string
  7539  	ctx_         context.Context
  7540  	header_      http.Header
  7541  }
  7542  
  7543  // Get: Gets details of a single HttpRoute.
  7544  //
  7545  //   - name: A name of the HttpRoute to get. Must be in the format
  7546  //     `projects/*/locations/global/httpRoutes/*`.
  7547  func (r *ProjectsLocationsHttpRoutesService) Get(name string) *ProjectsLocationsHttpRoutesGetCall {
  7548  	c := &ProjectsLocationsHttpRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7549  	c.name = name
  7550  	return c
  7551  }
  7552  
  7553  // Fields allows partial responses to be retrieved. See
  7554  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7555  // details.
  7556  func (c *ProjectsLocationsHttpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesGetCall {
  7557  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7558  	return c
  7559  }
  7560  
  7561  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7562  // object's ETag matches the given value. This is useful for getting updates
  7563  // only after the object has changed since the last request.
  7564  func (c *ProjectsLocationsHttpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesGetCall {
  7565  	c.ifNoneMatch_ = entityTag
  7566  	return c
  7567  }
  7568  
  7569  // Context sets the context to be used in this call's Do method.
  7570  func (c *ProjectsLocationsHttpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesGetCall {
  7571  	c.ctx_ = ctx
  7572  	return c
  7573  }
  7574  
  7575  // Header returns a http.Header that can be modified by the caller to add
  7576  // headers to the request.
  7577  func (c *ProjectsLocationsHttpRoutesGetCall) Header() http.Header {
  7578  	if c.header_ == nil {
  7579  		c.header_ = make(http.Header)
  7580  	}
  7581  	return c.header_
  7582  }
  7583  
  7584  func (c *ProjectsLocationsHttpRoutesGetCall) doRequest(alt string) (*http.Response, error) {
  7585  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7586  	if c.ifNoneMatch_ != "" {
  7587  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7588  	}
  7589  	var body io.Reader = nil
  7590  	c.urlParams_.Set("alt", alt)
  7591  	c.urlParams_.Set("prettyPrint", "false")
  7592  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7593  	urls += "?" + c.urlParams_.Encode()
  7594  	req, err := http.NewRequest("GET", urls, body)
  7595  	if err != nil {
  7596  		return nil, err
  7597  	}
  7598  	req.Header = reqHeaders
  7599  	googleapi.Expand(req.URL, map[string]string{
  7600  		"name": c.name,
  7601  	})
  7602  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7603  }
  7604  
  7605  // Do executes the "networkservices.projects.locations.httpRoutes.get" call.
  7606  // Any non-2xx status code is an error. Response headers are in either
  7607  // *HttpRoute.ServerResponse.Header or (if a response was returned at all) in
  7608  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7609  // whether the returned error was because http.StatusNotModified was returned.
  7610  func (c *ProjectsLocationsHttpRoutesGetCall) Do(opts ...googleapi.CallOption) (*HttpRoute, error) {
  7611  	gensupport.SetOptions(c.urlParams_, opts...)
  7612  	res, err := c.doRequest("json")
  7613  	if res != nil && res.StatusCode == http.StatusNotModified {
  7614  		if res.Body != nil {
  7615  			res.Body.Close()
  7616  		}
  7617  		return nil, gensupport.WrapError(&googleapi.Error{
  7618  			Code:   res.StatusCode,
  7619  			Header: res.Header,
  7620  		})
  7621  	}
  7622  	if err != nil {
  7623  		return nil, err
  7624  	}
  7625  	defer googleapi.CloseBody(res)
  7626  	if err := googleapi.CheckResponse(res); err != nil {
  7627  		return nil, gensupport.WrapError(err)
  7628  	}
  7629  	ret := &HttpRoute{
  7630  		ServerResponse: googleapi.ServerResponse{
  7631  			Header:         res.Header,
  7632  			HTTPStatusCode: res.StatusCode,
  7633  		},
  7634  	}
  7635  	target := &ret
  7636  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7637  		return nil, err
  7638  	}
  7639  	return ret, nil
  7640  }
  7641  
  7642  type ProjectsLocationsHttpRoutesListCall struct {
  7643  	s            *Service
  7644  	parent       string
  7645  	urlParams_   gensupport.URLParams
  7646  	ifNoneMatch_ string
  7647  	ctx_         context.Context
  7648  	header_      http.Header
  7649  }
  7650  
  7651  // List: Lists HttpRoute in a given project and location.
  7652  //
  7653  //   - parent: The project and location from which the HttpRoutes should be
  7654  //     listed, specified in the format `projects/*/locations/global`.
  7655  func (r *ProjectsLocationsHttpRoutesService) List(parent string) *ProjectsLocationsHttpRoutesListCall {
  7656  	c := &ProjectsLocationsHttpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7657  	c.parent = parent
  7658  	return c
  7659  }
  7660  
  7661  // PageSize sets the optional parameter "pageSize": Maximum number of
  7662  // HttpRoutes to return per call.
  7663  func (c *ProjectsLocationsHttpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsHttpRoutesListCall {
  7664  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7665  	return c
  7666  }
  7667  
  7668  // PageToken sets the optional parameter "pageToken": The value returned by the
  7669  // last `ListHttpRoutesResponse` Indicates that this is a continuation of a
  7670  // prior `ListHttpRoutes` call, and that the system should return the next page
  7671  // of data.
  7672  func (c *ProjectsLocationsHttpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsHttpRoutesListCall {
  7673  	c.urlParams_.Set("pageToken", pageToken)
  7674  	return c
  7675  }
  7676  
  7677  // Fields allows partial responses to be retrieved. See
  7678  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7679  // details.
  7680  func (c *ProjectsLocationsHttpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesListCall {
  7681  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7682  	return c
  7683  }
  7684  
  7685  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7686  // object's ETag matches the given value. This is useful for getting updates
  7687  // only after the object has changed since the last request.
  7688  func (c *ProjectsLocationsHttpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHttpRoutesListCall {
  7689  	c.ifNoneMatch_ = entityTag
  7690  	return c
  7691  }
  7692  
  7693  // Context sets the context to be used in this call's Do method.
  7694  func (c *ProjectsLocationsHttpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesListCall {
  7695  	c.ctx_ = ctx
  7696  	return c
  7697  }
  7698  
  7699  // Header returns a http.Header that can be modified by the caller to add
  7700  // headers to the request.
  7701  func (c *ProjectsLocationsHttpRoutesListCall) Header() http.Header {
  7702  	if c.header_ == nil {
  7703  		c.header_ = make(http.Header)
  7704  	}
  7705  	return c.header_
  7706  }
  7707  
  7708  func (c *ProjectsLocationsHttpRoutesListCall) doRequest(alt string) (*http.Response, error) {
  7709  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7710  	if c.ifNoneMatch_ != "" {
  7711  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7712  	}
  7713  	var body io.Reader = nil
  7714  	c.urlParams_.Set("alt", alt)
  7715  	c.urlParams_.Set("prettyPrint", "false")
  7716  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/httpRoutes")
  7717  	urls += "?" + c.urlParams_.Encode()
  7718  	req, err := http.NewRequest("GET", urls, body)
  7719  	if err != nil {
  7720  		return nil, err
  7721  	}
  7722  	req.Header = reqHeaders
  7723  	googleapi.Expand(req.URL, map[string]string{
  7724  		"parent": c.parent,
  7725  	})
  7726  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7727  }
  7728  
  7729  // Do executes the "networkservices.projects.locations.httpRoutes.list" call.
  7730  // Any non-2xx status code is an error. Response headers are in either
  7731  // *ListHttpRoutesResponse.ServerResponse.Header or (if a response was returned
  7732  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7733  // check whether the returned error was because http.StatusNotModified was
  7734  // returned.
  7735  func (c *ProjectsLocationsHttpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListHttpRoutesResponse, error) {
  7736  	gensupport.SetOptions(c.urlParams_, opts...)
  7737  	res, err := c.doRequest("json")
  7738  	if res != nil && res.StatusCode == http.StatusNotModified {
  7739  		if res.Body != nil {
  7740  			res.Body.Close()
  7741  		}
  7742  		return nil, gensupport.WrapError(&googleapi.Error{
  7743  			Code:   res.StatusCode,
  7744  			Header: res.Header,
  7745  		})
  7746  	}
  7747  	if err != nil {
  7748  		return nil, err
  7749  	}
  7750  	defer googleapi.CloseBody(res)
  7751  	if err := googleapi.CheckResponse(res); err != nil {
  7752  		return nil, gensupport.WrapError(err)
  7753  	}
  7754  	ret := &ListHttpRoutesResponse{
  7755  		ServerResponse: googleapi.ServerResponse{
  7756  			Header:         res.Header,
  7757  			HTTPStatusCode: res.StatusCode,
  7758  		},
  7759  	}
  7760  	target := &ret
  7761  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7762  		return nil, err
  7763  	}
  7764  	return ret, nil
  7765  }
  7766  
  7767  // Pages invokes f for each page of results.
  7768  // A non-nil error returned from f will halt the iteration.
  7769  // The provided context supersedes any context provided to the Context method.
  7770  func (c *ProjectsLocationsHttpRoutesListCall) Pages(ctx context.Context, f func(*ListHttpRoutesResponse) error) error {
  7771  	c.ctx_ = ctx
  7772  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7773  	for {
  7774  		x, err := c.Do()
  7775  		if err != nil {
  7776  			return err
  7777  		}
  7778  		if err := f(x); err != nil {
  7779  			return err
  7780  		}
  7781  		if x.NextPageToken == "" {
  7782  			return nil
  7783  		}
  7784  		c.PageToken(x.NextPageToken)
  7785  	}
  7786  }
  7787  
  7788  type ProjectsLocationsHttpRoutesPatchCall struct {
  7789  	s          *Service
  7790  	name       string
  7791  	httproute  *HttpRoute
  7792  	urlParams_ gensupport.URLParams
  7793  	ctx_       context.Context
  7794  	header_    http.Header
  7795  }
  7796  
  7797  // Patch: Updates the parameters of a single HttpRoute.
  7798  //
  7799  //   - name: Name of the HttpRoute resource. It matches pattern
  7800  //     `projects/*/locations/global/httpRoutes/http_route_name>`.
  7801  func (r *ProjectsLocationsHttpRoutesService) Patch(name string, httproute *HttpRoute) *ProjectsLocationsHttpRoutesPatchCall {
  7802  	c := &ProjectsLocationsHttpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7803  	c.name = name
  7804  	c.httproute = httproute
  7805  	return c
  7806  }
  7807  
  7808  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  7809  // specify the fields to be overwritten in the HttpRoute resource by the
  7810  // update. The fields specified in the update_mask are relative to the
  7811  // resource, not the full request. A field will be overwritten if it is in the
  7812  // mask. If the user does not provide a mask then all fields will be
  7813  // overwritten.
  7814  func (c *ProjectsLocationsHttpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsHttpRoutesPatchCall {
  7815  	c.urlParams_.Set("updateMask", updateMask)
  7816  	return c
  7817  }
  7818  
  7819  // Fields allows partial responses to be retrieved. See
  7820  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7821  // details.
  7822  func (c *ProjectsLocationsHttpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsHttpRoutesPatchCall {
  7823  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7824  	return c
  7825  }
  7826  
  7827  // Context sets the context to be used in this call's Do method.
  7828  func (c *ProjectsLocationsHttpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsHttpRoutesPatchCall {
  7829  	c.ctx_ = ctx
  7830  	return c
  7831  }
  7832  
  7833  // Header returns a http.Header that can be modified by the caller to add
  7834  // headers to the request.
  7835  func (c *ProjectsLocationsHttpRoutesPatchCall) Header() http.Header {
  7836  	if c.header_ == nil {
  7837  		c.header_ = make(http.Header)
  7838  	}
  7839  	return c.header_
  7840  }
  7841  
  7842  func (c *ProjectsLocationsHttpRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
  7843  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7844  	var body io.Reader = nil
  7845  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.httproute)
  7846  	if err != nil {
  7847  		return nil, err
  7848  	}
  7849  	c.urlParams_.Set("alt", alt)
  7850  	c.urlParams_.Set("prettyPrint", "false")
  7851  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7852  	urls += "?" + c.urlParams_.Encode()
  7853  	req, err := http.NewRequest("PATCH", urls, body)
  7854  	if err != nil {
  7855  		return nil, err
  7856  	}
  7857  	req.Header = reqHeaders
  7858  	googleapi.Expand(req.URL, map[string]string{
  7859  		"name": c.name,
  7860  	})
  7861  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7862  }
  7863  
  7864  // Do executes the "networkservices.projects.locations.httpRoutes.patch" call.
  7865  // Any non-2xx status code is an error. Response headers are in either
  7866  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7867  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7868  // whether the returned error was because http.StatusNotModified was returned.
  7869  func (c *ProjectsLocationsHttpRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7870  	gensupport.SetOptions(c.urlParams_, opts...)
  7871  	res, err := c.doRequest("json")
  7872  	if res != nil && res.StatusCode == http.StatusNotModified {
  7873  		if res.Body != nil {
  7874  			res.Body.Close()
  7875  		}
  7876  		return nil, gensupport.WrapError(&googleapi.Error{
  7877  			Code:   res.StatusCode,
  7878  			Header: res.Header,
  7879  		})
  7880  	}
  7881  	if err != nil {
  7882  		return nil, err
  7883  	}
  7884  	defer googleapi.CloseBody(res)
  7885  	if err := googleapi.CheckResponse(res); err != nil {
  7886  		return nil, gensupport.WrapError(err)
  7887  	}
  7888  	ret := &Operation{
  7889  		ServerResponse: googleapi.ServerResponse{
  7890  			Header:         res.Header,
  7891  			HTTPStatusCode: res.StatusCode,
  7892  		},
  7893  	}
  7894  	target := &ret
  7895  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7896  		return nil, err
  7897  	}
  7898  	return ret, nil
  7899  }
  7900  
  7901  type ProjectsLocationsLbRouteExtensionsCreateCall struct {
  7902  	s                *Service
  7903  	parent           string
  7904  	lbrouteextension *LbRouteExtension
  7905  	urlParams_       gensupport.URLParams
  7906  	ctx_             context.Context
  7907  	header_          http.Header
  7908  }
  7909  
  7910  // Create: Creates a new `LbRouteExtension` resource in a given project and
  7911  // location.
  7912  //
  7913  //   - parent: The parent resource of the `LbRouteExtension` resource. Must be in
  7914  //     the format `projects/{project}/locations/{location}`.
  7915  func (r *ProjectsLocationsLbRouteExtensionsService) Create(parent string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsCreateCall {
  7916  	c := &ProjectsLocationsLbRouteExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7917  	c.parent = parent
  7918  	c.lbrouteextension = lbrouteextension
  7919  	return c
  7920  }
  7921  
  7922  // LbRouteExtensionId sets the optional parameter "lbRouteExtensionId":
  7923  // Required. User-provided ID of the `LbRouteExtension` resource to be created.
  7924  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) LbRouteExtensionId(lbRouteExtensionId string) *ProjectsLocationsLbRouteExtensionsCreateCall {
  7925  	c.urlParams_.Set("lbRouteExtensionId", lbRouteExtensionId)
  7926  	return c
  7927  }
  7928  
  7929  // RequestId sets the optional parameter "requestId": An optional request ID to
  7930  // identify requests. Specify a unique request ID so that if you must retry
  7931  // your request, the server can ignore the request if it has already been
  7932  // completed. The server guarantees that for at least 60 minutes since the
  7933  // first request. For example, consider a situation where you make an initial
  7934  // request and the request times out. If you make the request again with the
  7935  // same request ID, the server can check if original operation with the same
  7936  // request ID was received, and if so, ignores the second request. This
  7937  // prevents clients from accidentally creating duplicate commitments. The
  7938  // request ID must be a valid UUID with the exception that zero UUID is not
  7939  // supported (00000000-0000-0000-0000-000000000000).
  7940  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsCreateCall {
  7941  	c.urlParams_.Set("requestId", requestId)
  7942  	return c
  7943  }
  7944  
  7945  // Fields allows partial responses to be retrieved. See
  7946  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7947  // details.
  7948  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsCreateCall {
  7949  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7950  	return c
  7951  }
  7952  
  7953  // Context sets the context to be used in this call's Do method.
  7954  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsCreateCall {
  7955  	c.ctx_ = ctx
  7956  	return c
  7957  }
  7958  
  7959  // Header returns a http.Header that can be modified by the caller to add
  7960  // headers to the request.
  7961  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Header() http.Header {
  7962  	if c.header_ == nil {
  7963  		c.header_ = make(http.Header)
  7964  	}
  7965  	return c.header_
  7966  }
  7967  
  7968  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) doRequest(alt string) (*http.Response, error) {
  7969  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7970  	var body io.Reader = nil
  7971  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension)
  7972  	if err != nil {
  7973  		return nil, err
  7974  	}
  7975  	c.urlParams_.Set("alt", alt)
  7976  	c.urlParams_.Set("prettyPrint", "false")
  7977  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbRouteExtensions")
  7978  	urls += "?" + c.urlParams_.Encode()
  7979  	req, err := http.NewRequest("POST", urls, body)
  7980  	if err != nil {
  7981  		return nil, err
  7982  	}
  7983  	req.Header = reqHeaders
  7984  	googleapi.Expand(req.URL, map[string]string{
  7985  		"parent": c.parent,
  7986  	})
  7987  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7988  }
  7989  
  7990  // Do executes the "networkservices.projects.locations.lbRouteExtensions.create" call.
  7991  // Any non-2xx status code is an error. Response headers are in either
  7992  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  7993  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7994  // whether the returned error was because http.StatusNotModified was returned.
  7995  func (c *ProjectsLocationsLbRouteExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7996  	gensupport.SetOptions(c.urlParams_, opts...)
  7997  	res, err := c.doRequest("json")
  7998  	if res != nil && res.StatusCode == http.StatusNotModified {
  7999  		if res.Body != nil {
  8000  			res.Body.Close()
  8001  		}
  8002  		return nil, gensupport.WrapError(&googleapi.Error{
  8003  			Code:   res.StatusCode,
  8004  			Header: res.Header,
  8005  		})
  8006  	}
  8007  	if err != nil {
  8008  		return nil, err
  8009  	}
  8010  	defer googleapi.CloseBody(res)
  8011  	if err := googleapi.CheckResponse(res); err != nil {
  8012  		return nil, gensupport.WrapError(err)
  8013  	}
  8014  	ret := &Operation{
  8015  		ServerResponse: googleapi.ServerResponse{
  8016  			Header:         res.Header,
  8017  			HTTPStatusCode: res.StatusCode,
  8018  		},
  8019  	}
  8020  	target := &ret
  8021  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8022  		return nil, err
  8023  	}
  8024  	return ret, nil
  8025  }
  8026  
  8027  type ProjectsLocationsLbRouteExtensionsDeleteCall struct {
  8028  	s          *Service
  8029  	name       string
  8030  	urlParams_ gensupport.URLParams
  8031  	ctx_       context.Context
  8032  	header_    http.Header
  8033  }
  8034  
  8035  // Delete: Deletes the specified `LbRouteExtension` resource.
  8036  //
  8037  //   - name: The name of the `LbRouteExtension` resource to delete. Must be in
  8038  //     the format
  8039  //     `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens
  8040  //     ion}`.
  8041  func (r *ProjectsLocationsLbRouteExtensionsService) Delete(name string) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  8042  	c := &ProjectsLocationsLbRouteExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8043  	c.name = name
  8044  	return c
  8045  }
  8046  
  8047  // RequestId sets the optional parameter "requestId": An optional request ID to
  8048  // identify requests. Specify a unique request ID so that if you must retry
  8049  // your request, the server can ignore the request if it has already been
  8050  // completed. The server guarantees that for at least 60 minutes after the
  8051  // first request. For example, consider a situation where you make an initial
  8052  // request and the request times out. If you make the request again with the
  8053  // same request ID, the server can check if original operation with the same
  8054  // request ID was received, and if so, ignores the second request. This
  8055  // prevents clients from accidentally creating duplicate commitments. The
  8056  // request ID must be a valid UUID with the exception that zero UUID is not
  8057  // supported (00000000-0000-0000-0000-000000000000).
  8058  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  8059  	c.urlParams_.Set("requestId", requestId)
  8060  	return c
  8061  }
  8062  
  8063  // Fields allows partial responses to be retrieved. See
  8064  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8065  // details.
  8066  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  8067  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8068  	return c
  8069  }
  8070  
  8071  // Context sets the context to be used in this call's Do method.
  8072  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsDeleteCall {
  8073  	c.ctx_ = ctx
  8074  	return c
  8075  }
  8076  
  8077  // Header returns a http.Header that can be modified by the caller to add
  8078  // headers to the request.
  8079  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Header() http.Header {
  8080  	if c.header_ == nil {
  8081  		c.header_ = make(http.Header)
  8082  	}
  8083  	return c.header_
  8084  }
  8085  
  8086  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8087  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8088  	var body io.Reader = nil
  8089  	c.urlParams_.Set("alt", alt)
  8090  	c.urlParams_.Set("prettyPrint", "false")
  8091  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8092  	urls += "?" + c.urlParams_.Encode()
  8093  	req, err := http.NewRequest("DELETE", urls, body)
  8094  	if err != nil {
  8095  		return nil, err
  8096  	}
  8097  	req.Header = reqHeaders
  8098  	googleapi.Expand(req.URL, map[string]string{
  8099  		"name": c.name,
  8100  	})
  8101  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8102  }
  8103  
  8104  // Do executes the "networkservices.projects.locations.lbRouteExtensions.delete" call.
  8105  // Any non-2xx status code is an error. Response headers are in either
  8106  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8107  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8108  // whether the returned error was because http.StatusNotModified was returned.
  8109  func (c *ProjectsLocationsLbRouteExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8110  	gensupport.SetOptions(c.urlParams_, opts...)
  8111  	res, err := c.doRequest("json")
  8112  	if res != nil && res.StatusCode == http.StatusNotModified {
  8113  		if res.Body != nil {
  8114  			res.Body.Close()
  8115  		}
  8116  		return nil, gensupport.WrapError(&googleapi.Error{
  8117  			Code:   res.StatusCode,
  8118  			Header: res.Header,
  8119  		})
  8120  	}
  8121  	if err != nil {
  8122  		return nil, err
  8123  	}
  8124  	defer googleapi.CloseBody(res)
  8125  	if err := googleapi.CheckResponse(res); err != nil {
  8126  		return nil, gensupport.WrapError(err)
  8127  	}
  8128  	ret := &Operation{
  8129  		ServerResponse: googleapi.ServerResponse{
  8130  			Header:         res.Header,
  8131  			HTTPStatusCode: res.StatusCode,
  8132  		},
  8133  	}
  8134  	target := &ret
  8135  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8136  		return nil, err
  8137  	}
  8138  	return ret, nil
  8139  }
  8140  
  8141  type ProjectsLocationsLbRouteExtensionsGetCall struct {
  8142  	s            *Service
  8143  	name         string
  8144  	urlParams_   gensupport.URLParams
  8145  	ifNoneMatch_ string
  8146  	ctx_         context.Context
  8147  	header_      http.Header
  8148  }
  8149  
  8150  // Get: Gets details of the specified `LbRouteExtension` resource.
  8151  //
  8152  //   - name: A name of the `LbRouteExtension` resource to get. Must be in the
  8153  //     format
  8154  //     `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens
  8155  //     ion}`.
  8156  func (r *ProjectsLocationsLbRouteExtensionsService) Get(name string) *ProjectsLocationsLbRouteExtensionsGetCall {
  8157  	c := &ProjectsLocationsLbRouteExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8158  	c.name = name
  8159  	return c
  8160  }
  8161  
  8162  // Fields allows partial responses to be retrieved. See
  8163  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8164  // details.
  8165  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsGetCall {
  8166  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8167  	return c
  8168  }
  8169  
  8170  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8171  // object's ETag matches the given value. This is useful for getting updates
  8172  // only after the object has changed since the last request.
  8173  func (c *ProjectsLocationsLbRouteExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsGetCall {
  8174  	c.ifNoneMatch_ = entityTag
  8175  	return c
  8176  }
  8177  
  8178  // Context sets the context to be used in this call's Do method.
  8179  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsGetCall {
  8180  	c.ctx_ = ctx
  8181  	return c
  8182  }
  8183  
  8184  // Header returns a http.Header that can be modified by the caller to add
  8185  // headers to the request.
  8186  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Header() http.Header {
  8187  	if c.header_ == nil {
  8188  		c.header_ = make(http.Header)
  8189  	}
  8190  	return c.header_
  8191  }
  8192  
  8193  func (c *ProjectsLocationsLbRouteExtensionsGetCall) doRequest(alt string) (*http.Response, error) {
  8194  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8195  	if c.ifNoneMatch_ != "" {
  8196  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8197  	}
  8198  	var body io.Reader = nil
  8199  	c.urlParams_.Set("alt", alt)
  8200  	c.urlParams_.Set("prettyPrint", "false")
  8201  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8202  	urls += "?" + c.urlParams_.Encode()
  8203  	req, err := http.NewRequest("GET", urls, body)
  8204  	if err != nil {
  8205  		return nil, err
  8206  	}
  8207  	req.Header = reqHeaders
  8208  	googleapi.Expand(req.URL, map[string]string{
  8209  		"name": c.name,
  8210  	})
  8211  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8212  }
  8213  
  8214  // Do executes the "networkservices.projects.locations.lbRouteExtensions.get" call.
  8215  // Any non-2xx status code is an error. Response headers are in either
  8216  // *LbRouteExtension.ServerResponse.Header or (if a response was returned at
  8217  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8218  // check whether the returned error was because http.StatusNotModified was
  8219  // returned.
  8220  func (c *ProjectsLocationsLbRouteExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbRouteExtension, error) {
  8221  	gensupport.SetOptions(c.urlParams_, opts...)
  8222  	res, err := c.doRequest("json")
  8223  	if res != nil && res.StatusCode == http.StatusNotModified {
  8224  		if res.Body != nil {
  8225  			res.Body.Close()
  8226  		}
  8227  		return nil, gensupport.WrapError(&googleapi.Error{
  8228  			Code:   res.StatusCode,
  8229  			Header: res.Header,
  8230  		})
  8231  	}
  8232  	if err != nil {
  8233  		return nil, err
  8234  	}
  8235  	defer googleapi.CloseBody(res)
  8236  	if err := googleapi.CheckResponse(res); err != nil {
  8237  		return nil, gensupport.WrapError(err)
  8238  	}
  8239  	ret := &LbRouteExtension{
  8240  		ServerResponse: googleapi.ServerResponse{
  8241  			Header:         res.Header,
  8242  			HTTPStatusCode: res.StatusCode,
  8243  		},
  8244  	}
  8245  	target := &ret
  8246  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8247  		return nil, err
  8248  	}
  8249  	return ret, nil
  8250  }
  8251  
  8252  type ProjectsLocationsLbRouteExtensionsListCall struct {
  8253  	s            *Service
  8254  	parent       string
  8255  	urlParams_   gensupport.URLParams
  8256  	ifNoneMatch_ string
  8257  	ctx_         context.Context
  8258  	header_      http.Header
  8259  }
  8260  
  8261  // List: Lists `LbRouteExtension` resources in a given project and location.
  8262  //
  8263  //   - parent: The project and location from which the `LbRouteExtension`
  8264  //     resources are listed, specified in the following format:
  8265  //     `projects/{project}/locations/{location}`.
  8266  func (r *ProjectsLocationsLbRouteExtensionsService) List(parent string) *ProjectsLocationsLbRouteExtensionsListCall {
  8267  	c := &ProjectsLocationsLbRouteExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8268  	c.parent = parent
  8269  	return c
  8270  }
  8271  
  8272  // Filter sets the optional parameter "filter": Filtering results.
  8273  func (c *ProjectsLocationsLbRouteExtensionsListCall) Filter(filter string) *ProjectsLocationsLbRouteExtensionsListCall {
  8274  	c.urlParams_.Set("filter", filter)
  8275  	return c
  8276  }
  8277  
  8278  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  8279  // results.
  8280  func (c *ProjectsLocationsLbRouteExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbRouteExtensionsListCall {
  8281  	c.urlParams_.Set("orderBy", orderBy)
  8282  	return c
  8283  }
  8284  
  8285  // PageSize sets the optional parameter "pageSize": Requested page size. The
  8286  // server might return fewer items than requested. If unspecified, the server
  8287  // picks an appropriate default.
  8288  func (c *ProjectsLocationsLbRouteExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbRouteExtensionsListCall {
  8289  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8290  	return c
  8291  }
  8292  
  8293  // PageToken sets the optional parameter "pageToken": A token identifying a
  8294  // page of results that the server returns.
  8295  func (c *ProjectsLocationsLbRouteExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbRouteExtensionsListCall {
  8296  	c.urlParams_.Set("pageToken", pageToken)
  8297  	return c
  8298  }
  8299  
  8300  // Fields allows partial responses to be retrieved. See
  8301  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8302  // details.
  8303  func (c *ProjectsLocationsLbRouteExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsListCall {
  8304  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8305  	return c
  8306  }
  8307  
  8308  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8309  // object's ETag matches the given value. This is useful for getting updates
  8310  // only after the object has changed since the last request.
  8311  func (c *ProjectsLocationsLbRouteExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbRouteExtensionsListCall {
  8312  	c.ifNoneMatch_ = entityTag
  8313  	return c
  8314  }
  8315  
  8316  // Context sets the context to be used in this call's Do method.
  8317  func (c *ProjectsLocationsLbRouteExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsListCall {
  8318  	c.ctx_ = ctx
  8319  	return c
  8320  }
  8321  
  8322  // Header returns a http.Header that can be modified by the caller to add
  8323  // headers to the request.
  8324  func (c *ProjectsLocationsLbRouteExtensionsListCall) Header() http.Header {
  8325  	if c.header_ == nil {
  8326  		c.header_ = make(http.Header)
  8327  	}
  8328  	return c.header_
  8329  }
  8330  
  8331  func (c *ProjectsLocationsLbRouteExtensionsListCall) doRequest(alt string) (*http.Response, error) {
  8332  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8333  	if c.ifNoneMatch_ != "" {
  8334  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8335  	}
  8336  	var body io.Reader = nil
  8337  	c.urlParams_.Set("alt", alt)
  8338  	c.urlParams_.Set("prettyPrint", "false")
  8339  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbRouteExtensions")
  8340  	urls += "?" + c.urlParams_.Encode()
  8341  	req, err := http.NewRequest("GET", urls, body)
  8342  	if err != nil {
  8343  		return nil, err
  8344  	}
  8345  	req.Header = reqHeaders
  8346  	googleapi.Expand(req.URL, map[string]string{
  8347  		"parent": c.parent,
  8348  	})
  8349  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8350  }
  8351  
  8352  // Do executes the "networkservices.projects.locations.lbRouteExtensions.list" call.
  8353  // Any non-2xx status code is an error. Response headers are in either
  8354  // *ListLbRouteExtensionsResponse.ServerResponse.Header or (if a response was
  8355  // returned at all) in error.(*googleapi.Error).Header. Use
  8356  // googleapi.IsNotModified to check whether the returned error was because
  8357  // http.StatusNotModified was returned.
  8358  func (c *ProjectsLocationsLbRouteExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbRouteExtensionsResponse, error) {
  8359  	gensupport.SetOptions(c.urlParams_, opts...)
  8360  	res, err := c.doRequest("json")
  8361  	if res != nil && res.StatusCode == http.StatusNotModified {
  8362  		if res.Body != nil {
  8363  			res.Body.Close()
  8364  		}
  8365  		return nil, gensupport.WrapError(&googleapi.Error{
  8366  			Code:   res.StatusCode,
  8367  			Header: res.Header,
  8368  		})
  8369  	}
  8370  	if err != nil {
  8371  		return nil, err
  8372  	}
  8373  	defer googleapi.CloseBody(res)
  8374  	if err := googleapi.CheckResponse(res); err != nil {
  8375  		return nil, gensupport.WrapError(err)
  8376  	}
  8377  	ret := &ListLbRouteExtensionsResponse{
  8378  		ServerResponse: googleapi.ServerResponse{
  8379  			Header:         res.Header,
  8380  			HTTPStatusCode: res.StatusCode,
  8381  		},
  8382  	}
  8383  	target := &ret
  8384  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8385  		return nil, err
  8386  	}
  8387  	return ret, nil
  8388  }
  8389  
  8390  // Pages invokes f for each page of results.
  8391  // A non-nil error returned from f will halt the iteration.
  8392  // The provided context supersedes any context provided to the Context method.
  8393  func (c *ProjectsLocationsLbRouteExtensionsListCall) Pages(ctx context.Context, f func(*ListLbRouteExtensionsResponse) error) error {
  8394  	c.ctx_ = ctx
  8395  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8396  	for {
  8397  		x, err := c.Do()
  8398  		if err != nil {
  8399  			return err
  8400  		}
  8401  		if err := f(x); err != nil {
  8402  			return err
  8403  		}
  8404  		if x.NextPageToken == "" {
  8405  			return nil
  8406  		}
  8407  		c.PageToken(x.NextPageToken)
  8408  	}
  8409  }
  8410  
  8411  type ProjectsLocationsLbRouteExtensionsPatchCall struct {
  8412  	s                *Service
  8413  	name             string
  8414  	lbrouteextension *LbRouteExtension
  8415  	urlParams_       gensupport.URLParams
  8416  	ctx_             context.Context
  8417  	header_          http.Header
  8418  }
  8419  
  8420  // Patch: Updates the parameters of the specified `LbRouteExtension` resource.
  8421  //
  8422  //   - name: Identifier. Name of the `LbRouteExtension` resource in the following
  8423  //     format:
  8424  //     `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extens
  8425  //     ion}`.
  8426  func (r *ProjectsLocationsLbRouteExtensionsService) Patch(name string, lbrouteextension *LbRouteExtension) *ProjectsLocationsLbRouteExtensionsPatchCall {
  8427  	c := &ProjectsLocationsLbRouteExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8428  	c.name = name
  8429  	c.lbrouteextension = lbrouteextension
  8430  	return c
  8431  }
  8432  
  8433  // RequestId sets the optional parameter "requestId": An optional request ID to
  8434  // identify requests. Specify a unique request ID so that if you must retry
  8435  // your request, the server can ignore the request if it has already been
  8436  // completed. The server guarantees that for at least 60 minutes since the
  8437  // first request. For example, consider a situation where you make an initial
  8438  // request and the request times out. If you make the request again with the
  8439  // same request ID, the server can check if original operation with the same
  8440  // request ID was received, and if so, ignores the second request. This
  8441  // prevents clients from accidentally creating duplicate commitments. The
  8442  // request ID must be a valid UUID with the exception that zero UUID is not
  8443  // supported (00000000-0000-0000-0000-000000000000).
  8444  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbRouteExtensionsPatchCall {
  8445  	c.urlParams_.Set("requestId", requestId)
  8446  	return c
  8447  }
  8448  
  8449  // UpdateMask sets the optional parameter "updateMask": Used to specify the
  8450  // fields to be overwritten in the `LbRouteExtension` resource by the update.
  8451  // The fields specified in the update_mask are relative to the resource, not
  8452  // the full request. A field is overwritten if it is in the mask. If the user
  8453  // does not specify a mask, then all fields are overwritten.
  8454  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbRouteExtensionsPatchCall {
  8455  	c.urlParams_.Set("updateMask", updateMask)
  8456  	return c
  8457  }
  8458  
  8459  // Fields allows partial responses to be retrieved. See
  8460  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8461  // details.
  8462  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbRouteExtensionsPatchCall {
  8463  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8464  	return c
  8465  }
  8466  
  8467  // Context sets the context to be used in this call's Do method.
  8468  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbRouteExtensionsPatchCall {
  8469  	c.ctx_ = ctx
  8470  	return c
  8471  }
  8472  
  8473  // Header returns a http.Header that can be modified by the caller to add
  8474  // headers to the request.
  8475  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Header() http.Header {
  8476  	if c.header_ == nil {
  8477  		c.header_ = make(http.Header)
  8478  	}
  8479  	return c.header_
  8480  }
  8481  
  8482  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) doRequest(alt string) (*http.Response, error) {
  8483  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8484  	var body io.Reader = nil
  8485  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbrouteextension)
  8486  	if err != nil {
  8487  		return nil, err
  8488  	}
  8489  	c.urlParams_.Set("alt", alt)
  8490  	c.urlParams_.Set("prettyPrint", "false")
  8491  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8492  	urls += "?" + c.urlParams_.Encode()
  8493  	req, err := http.NewRequest("PATCH", urls, body)
  8494  	if err != nil {
  8495  		return nil, err
  8496  	}
  8497  	req.Header = reqHeaders
  8498  	googleapi.Expand(req.URL, map[string]string{
  8499  		"name": c.name,
  8500  	})
  8501  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8502  }
  8503  
  8504  // Do executes the "networkservices.projects.locations.lbRouteExtensions.patch" call.
  8505  // Any non-2xx status code is an error. Response headers are in either
  8506  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8507  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8508  // whether the returned error was because http.StatusNotModified was returned.
  8509  func (c *ProjectsLocationsLbRouteExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8510  	gensupport.SetOptions(c.urlParams_, opts...)
  8511  	res, err := c.doRequest("json")
  8512  	if res != nil && res.StatusCode == http.StatusNotModified {
  8513  		if res.Body != nil {
  8514  			res.Body.Close()
  8515  		}
  8516  		return nil, gensupport.WrapError(&googleapi.Error{
  8517  			Code:   res.StatusCode,
  8518  			Header: res.Header,
  8519  		})
  8520  	}
  8521  	if err != nil {
  8522  		return nil, err
  8523  	}
  8524  	defer googleapi.CloseBody(res)
  8525  	if err := googleapi.CheckResponse(res); err != nil {
  8526  		return nil, gensupport.WrapError(err)
  8527  	}
  8528  	ret := &Operation{
  8529  		ServerResponse: googleapi.ServerResponse{
  8530  			Header:         res.Header,
  8531  			HTTPStatusCode: res.StatusCode,
  8532  		},
  8533  	}
  8534  	target := &ret
  8535  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8536  		return nil, err
  8537  	}
  8538  	return ret, nil
  8539  }
  8540  
  8541  type ProjectsLocationsLbTrafficExtensionsCreateCall struct {
  8542  	s                  *Service
  8543  	parent             string
  8544  	lbtrafficextension *LbTrafficExtension
  8545  	urlParams_         gensupport.URLParams
  8546  	ctx_               context.Context
  8547  	header_            http.Header
  8548  }
  8549  
  8550  // Create: Creates a new `LbTrafficExtension` resource in a given project and
  8551  // location.
  8552  //
  8553  //   - parent: The parent resource of the `LbTrafficExtension` resource. Must be
  8554  //     in the format `projects/{project}/locations/{location}`.
  8555  func (r *ProjectsLocationsLbTrafficExtensionsService) Create(parent string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  8556  	c := &ProjectsLocationsLbTrafficExtensionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8557  	c.parent = parent
  8558  	c.lbtrafficextension = lbtrafficextension
  8559  	return c
  8560  }
  8561  
  8562  // LbTrafficExtensionId sets the optional parameter "lbTrafficExtensionId":
  8563  // Required. User-provided ID of the `LbTrafficExtension` resource to be
  8564  // created.
  8565  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) LbTrafficExtensionId(lbTrafficExtensionId string) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  8566  	c.urlParams_.Set("lbTrafficExtensionId", lbTrafficExtensionId)
  8567  	return c
  8568  }
  8569  
  8570  // RequestId sets the optional parameter "requestId": An optional request ID to
  8571  // identify requests. Specify a unique request ID so that if you must retry
  8572  // your request, the server can ignore the request if it has already been
  8573  // completed. The server guarantees that for at least 60 minutes since the
  8574  // first request. For example, consider a situation where you make an initial
  8575  // request and the request times out. If you make the request again with the
  8576  // same request ID, the server can check if original operation with the same
  8577  // request ID was received, and if so, ignores the second request. This
  8578  // prevents clients from accidentally creating duplicate commitments. The
  8579  // request ID must be a valid UUID with the exception that zero UUID is not
  8580  // supported (00000000-0000-0000-0000-000000000000).
  8581  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  8582  	c.urlParams_.Set("requestId", requestId)
  8583  	return c
  8584  }
  8585  
  8586  // Fields allows partial responses to be retrieved. See
  8587  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8588  // details.
  8589  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  8590  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8591  	return c
  8592  }
  8593  
  8594  // Context sets the context to be used in this call's Do method.
  8595  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsCreateCall {
  8596  	c.ctx_ = ctx
  8597  	return c
  8598  }
  8599  
  8600  // Header returns a http.Header that can be modified by the caller to add
  8601  // headers to the request.
  8602  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Header() http.Header {
  8603  	if c.header_ == nil {
  8604  		c.header_ = make(http.Header)
  8605  	}
  8606  	return c.header_
  8607  }
  8608  
  8609  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) doRequest(alt string) (*http.Response, error) {
  8610  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8611  	var body io.Reader = nil
  8612  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension)
  8613  	if err != nil {
  8614  		return nil, err
  8615  	}
  8616  	c.urlParams_.Set("alt", alt)
  8617  	c.urlParams_.Set("prettyPrint", "false")
  8618  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbTrafficExtensions")
  8619  	urls += "?" + c.urlParams_.Encode()
  8620  	req, err := http.NewRequest("POST", urls, body)
  8621  	if err != nil {
  8622  		return nil, err
  8623  	}
  8624  	req.Header = reqHeaders
  8625  	googleapi.Expand(req.URL, map[string]string{
  8626  		"parent": c.parent,
  8627  	})
  8628  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8629  }
  8630  
  8631  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.create" call.
  8632  // Any non-2xx status code is an error. Response headers are in either
  8633  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8634  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8635  // whether the returned error was because http.StatusNotModified was returned.
  8636  func (c *ProjectsLocationsLbTrafficExtensionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8637  	gensupport.SetOptions(c.urlParams_, opts...)
  8638  	res, err := c.doRequest("json")
  8639  	if res != nil && res.StatusCode == http.StatusNotModified {
  8640  		if res.Body != nil {
  8641  			res.Body.Close()
  8642  		}
  8643  		return nil, gensupport.WrapError(&googleapi.Error{
  8644  			Code:   res.StatusCode,
  8645  			Header: res.Header,
  8646  		})
  8647  	}
  8648  	if err != nil {
  8649  		return nil, err
  8650  	}
  8651  	defer googleapi.CloseBody(res)
  8652  	if err := googleapi.CheckResponse(res); err != nil {
  8653  		return nil, gensupport.WrapError(err)
  8654  	}
  8655  	ret := &Operation{
  8656  		ServerResponse: googleapi.ServerResponse{
  8657  			Header:         res.Header,
  8658  			HTTPStatusCode: res.StatusCode,
  8659  		},
  8660  	}
  8661  	target := &ret
  8662  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8663  		return nil, err
  8664  	}
  8665  	return ret, nil
  8666  }
  8667  
  8668  type ProjectsLocationsLbTrafficExtensionsDeleteCall struct {
  8669  	s          *Service
  8670  	name       string
  8671  	urlParams_ gensupport.URLParams
  8672  	ctx_       context.Context
  8673  	header_    http.Header
  8674  }
  8675  
  8676  // Delete: Deletes the specified `LbTrafficExtension` resource.
  8677  //
  8678  //   - name: The name of the `LbTrafficExtension` resource to delete. Must be in
  8679  //     the format
  8680  //     `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex
  8681  //     tension}`.
  8682  func (r *ProjectsLocationsLbTrafficExtensionsService) Delete(name string) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  8683  	c := &ProjectsLocationsLbTrafficExtensionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8684  	c.name = name
  8685  	return c
  8686  }
  8687  
  8688  // RequestId sets the optional parameter "requestId": An optional request ID to
  8689  // identify requests. Specify a unique request ID so that if you must retry
  8690  // your request, the server can ignore the request if it has already been
  8691  // completed. The server guarantees that for at least 60 minutes after the
  8692  // first request. For example, consider a situation where you make an initial
  8693  // request and the request times out. If you make the request again with the
  8694  // same request ID, the server can check if original operation with the same
  8695  // request ID was received, and if so, ignores the second request. This
  8696  // prevents clients from accidentally creating duplicate commitments. The
  8697  // request ID must be a valid UUID with the exception that zero UUID is not
  8698  // supported (00000000-0000-0000-0000-000000000000).
  8699  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  8700  	c.urlParams_.Set("requestId", requestId)
  8701  	return c
  8702  }
  8703  
  8704  // Fields allows partial responses to be retrieved. See
  8705  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8706  // details.
  8707  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  8708  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8709  	return c
  8710  }
  8711  
  8712  // Context sets the context to be used in this call's Do method.
  8713  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsDeleteCall {
  8714  	c.ctx_ = ctx
  8715  	return c
  8716  }
  8717  
  8718  // Header returns a http.Header that can be modified by the caller to add
  8719  // headers to the request.
  8720  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Header() http.Header {
  8721  	if c.header_ == nil {
  8722  		c.header_ = make(http.Header)
  8723  	}
  8724  	return c.header_
  8725  }
  8726  
  8727  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8728  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8729  	var body io.Reader = nil
  8730  	c.urlParams_.Set("alt", alt)
  8731  	c.urlParams_.Set("prettyPrint", "false")
  8732  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8733  	urls += "?" + c.urlParams_.Encode()
  8734  	req, err := http.NewRequest("DELETE", urls, body)
  8735  	if err != nil {
  8736  		return nil, err
  8737  	}
  8738  	req.Header = reqHeaders
  8739  	googleapi.Expand(req.URL, map[string]string{
  8740  		"name": c.name,
  8741  	})
  8742  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8743  }
  8744  
  8745  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.delete" call.
  8746  // Any non-2xx status code is an error. Response headers are in either
  8747  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  8748  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8749  // whether the returned error was because http.StatusNotModified was returned.
  8750  func (c *ProjectsLocationsLbTrafficExtensionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8751  	gensupport.SetOptions(c.urlParams_, opts...)
  8752  	res, err := c.doRequest("json")
  8753  	if res != nil && res.StatusCode == http.StatusNotModified {
  8754  		if res.Body != nil {
  8755  			res.Body.Close()
  8756  		}
  8757  		return nil, gensupport.WrapError(&googleapi.Error{
  8758  			Code:   res.StatusCode,
  8759  			Header: res.Header,
  8760  		})
  8761  	}
  8762  	if err != nil {
  8763  		return nil, err
  8764  	}
  8765  	defer googleapi.CloseBody(res)
  8766  	if err := googleapi.CheckResponse(res); err != nil {
  8767  		return nil, gensupport.WrapError(err)
  8768  	}
  8769  	ret := &Operation{
  8770  		ServerResponse: googleapi.ServerResponse{
  8771  			Header:         res.Header,
  8772  			HTTPStatusCode: res.StatusCode,
  8773  		},
  8774  	}
  8775  	target := &ret
  8776  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8777  		return nil, err
  8778  	}
  8779  	return ret, nil
  8780  }
  8781  
  8782  type ProjectsLocationsLbTrafficExtensionsGetCall struct {
  8783  	s            *Service
  8784  	name         string
  8785  	urlParams_   gensupport.URLParams
  8786  	ifNoneMatch_ string
  8787  	ctx_         context.Context
  8788  	header_      http.Header
  8789  }
  8790  
  8791  // Get: Gets details of the specified `LbTrafficExtension` resource.
  8792  //
  8793  //   - name: A name of the `LbTrafficExtension` resource to get. Must be in the
  8794  //     format
  8795  //     `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex
  8796  //     tension}`.
  8797  func (r *ProjectsLocationsLbTrafficExtensionsService) Get(name string) *ProjectsLocationsLbTrafficExtensionsGetCall {
  8798  	c := &ProjectsLocationsLbTrafficExtensionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8799  	c.name = name
  8800  	return c
  8801  }
  8802  
  8803  // Fields allows partial responses to be retrieved. See
  8804  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8805  // details.
  8806  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsGetCall {
  8807  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8808  	return c
  8809  }
  8810  
  8811  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8812  // object's ETag matches the given value. This is useful for getting updates
  8813  // only after the object has changed since the last request.
  8814  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsGetCall {
  8815  	c.ifNoneMatch_ = entityTag
  8816  	return c
  8817  }
  8818  
  8819  // Context sets the context to be used in this call's Do method.
  8820  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsGetCall {
  8821  	c.ctx_ = ctx
  8822  	return c
  8823  }
  8824  
  8825  // Header returns a http.Header that can be modified by the caller to add
  8826  // headers to the request.
  8827  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Header() http.Header {
  8828  	if c.header_ == nil {
  8829  		c.header_ = make(http.Header)
  8830  	}
  8831  	return c.header_
  8832  }
  8833  
  8834  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) doRequest(alt string) (*http.Response, error) {
  8835  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8836  	if c.ifNoneMatch_ != "" {
  8837  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8838  	}
  8839  	var body io.Reader = nil
  8840  	c.urlParams_.Set("alt", alt)
  8841  	c.urlParams_.Set("prettyPrint", "false")
  8842  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8843  	urls += "?" + c.urlParams_.Encode()
  8844  	req, err := http.NewRequest("GET", urls, body)
  8845  	if err != nil {
  8846  		return nil, err
  8847  	}
  8848  	req.Header = reqHeaders
  8849  	googleapi.Expand(req.URL, map[string]string{
  8850  		"name": c.name,
  8851  	})
  8852  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8853  }
  8854  
  8855  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.get" call.
  8856  // Any non-2xx status code is an error. Response headers are in either
  8857  // *LbTrafficExtension.ServerResponse.Header or (if a response was returned at
  8858  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8859  // check whether the returned error was because http.StatusNotModified was
  8860  // returned.
  8861  func (c *ProjectsLocationsLbTrafficExtensionsGetCall) Do(opts ...googleapi.CallOption) (*LbTrafficExtension, error) {
  8862  	gensupport.SetOptions(c.urlParams_, opts...)
  8863  	res, err := c.doRequest("json")
  8864  	if res != nil && res.StatusCode == http.StatusNotModified {
  8865  		if res.Body != nil {
  8866  			res.Body.Close()
  8867  		}
  8868  		return nil, gensupport.WrapError(&googleapi.Error{
  8869  			Code:   res.StatusCode,
  8870  			Header: res.Header,
  8871  		})
  8872  	}
  8873  	if err != nil {
  8874  		return nil, err
  8875  	}
  8876  	defer googleapi.CloseBody(res)
  8877  	if err := googleapi.CheckResponse(res); err != nil {
  8878  		return nil, gensupport.WrapError(err)
  8879  	}
  8880  	ret := &LbTrafficExtension{
  8881  		ServerResponse: googleapi.ServerResponse{
  8882  			Header:         res.Header,
  8883  			HTTPStatusCode: res.StatusCode,
  8884  		},
  8885  	}
  8886  	target := &ret
  8887  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8888  		return nil, err
  8889  	}
  8890  	return ret, nil
  8891  }
  8892  
  8893  type ProjectsLocationsLbTrafficExtensionsListCall struct {
  8894  	s            *Service
  8895  	parent       string
  8896  	urlParams_   gensupport.URLParams
  8897  	ifNoneMatch_ string
  8898  	ctx_         context.Context
  8899  	header_      http.Header
  8900  }
  8901  
  8902  // List: Lists `LbTrafficExtension` resources in a given project and location.
  8903  //
  8904  //   - parent: The project and location from which the `LbTrafficExtension`
  8905  //     resources are listed, specified in the following format:
  8906  //     `projects/{project}/locations/{location}`.
  8907  func (r *ProjectsLocationsLbTrafficExtensionsService) List(parent string) *ProjectsLocationsLbTrafficExtensionsListCall {
  8908  	c := &ProjectsLocationsLbTrafficExtensionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8909  	c.parent = parent
  8910  	return c
  8911  }
  8912  
  8913  // Filter sets the optional parameter "filter": Filtering results.
  8914  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Filter(filter string) *ProjectsLocationsLbTrafficExtensionsListCall {
  8915  	c.urlParams_.Set("filter", filter)
  8916  	return c
  8917  }
  8918  
  8919  // OrderBy sets the optional parameter "orderBy": Hint for how to order the
  8920  // results.
  8921  func (c *ProjectsLocationsLbTrafficExtensionsListCall) OrderBy(orderBy string) *ProjectsLocationsLbTrafficExtensionsListCall {
  8922  	c.urlParams_.Set("orderBy", orderBy)
  8923  	return c
  8924  }
  8925  
  8926  // PageSize sets the optional parameter "pageSize": Requested page size. The
  8927  // server might return fewer items than requested. If unspecified, the server
  8928  // picks an appropriate default.
  8929  func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageSize(pageSize int64) *ProjectsLocationsLbTrafficExtensionsListCall {
  8930  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8931  	return c
  8932  }
  8933  
  8934  // PageToken sets the optional parameter "pageToken": A token identifying a
  8935  // page of results that the server returns.
  8936  func (c *ProjectsLocationsLbTrafficExtensionsListCall) PageToken(pageToken string) *ProjectsLocationsLbTrafficExtensionsListCall {
  8937  	c.urlParams_.Set("pageToken", pageToken)
  8938  	return c
  8939  }
  8940  
  8941  // Fields allows partial responses to be retrieved. See
  8942  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8943  // details.
  8944  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsListCall {
  8945  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8946  	return c
  8947  }
  8948  
  8949  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8950  // object's ETag matches the given value. This is useful for getting updates
  8951  // only after the object has changed since the last request.
  8952  func (c *ProjectsLocationsLbTrafficExtensionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsLbTrafficExtensionsListCall {
  8953  	c.ifNoneMatch_ = entityTag
  8954  	return c
  8955  }
  8956  
  8957  // Context sets the context to be used in this call's Do method.
  8958  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsListCall {
  8959  	c.ctx_ = ctx
  8960  	return c
  8961  }
  8962  
  8963  // Header returns a http.Header that can be modified by the caller to add
  8964  // headers to the request.
  8965  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Header() http.Header {
  8966  	if c.header_ == nil {
  8967  		c.header_ = make(http.Header)
  8968  	}
  8969  	return c.header_
  8970  }
  8971  
  8972  func (c *ProjectsLocationsLbTrafficExtensionsListCall) doRequest(alt string) (*http.Response, error) {
  8973  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8974  	if c.ifNoneMatch_ != "" {
  8975  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8976  	}
  8977  	var body io.Reader = nil
  8978  	c.urlParams_.Set("alt", alt)
  8979  	c.urlParams_.Set("prettyPrint", "false")
  8980  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/lbTrafficExtensions")
  8981  	urls += "?" + c.urlParams_.Encode()
  8982  	req, err := http.NewRequest("GET", urls, body)
  8983  	if err != nil {
  8984  		return nil, err
  8985  	}
  8986  	req.Header = reqHeaders
  8987  	googleapi.Expand(req.URL, map[string]string{
  8988  		"parent": c.parent,
  8989  	})
  8990  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8991  }
  8992  
  8993  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.list" call.
  8994  // Any non-2xx status code is an error. Response headers are in either
  8995  // *ListLbTrafficExtensionsResponse.ServerResponse.Header or (if a response was
  8996  // returned at all) in error.(*googleapi.Error).Header. Use
  8997  // googleapi.IsNotModified to check whether the returned error was because
  8998  // http.StatusNotModified was returned.
  8999  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Do(opts ...googleapi.CallOption) (*ListLbTrafficExtensionsResponse, error) {
  9000  	gensupport.SetOptions(c.urlParams_, opts...)
  9001  	res, err := c.doRequest("json")
  9002  	if res != nil && res.StatusCode == http.StatusNotModified {
  9003  		if res.Body != nil {
  9004  			res.Body.Close()
  9005  		}
  9006  		return nil, gensupport.WrapError(&googleapi.Error{
  9007  			Code:   res.StatusCode,
  9008  			Header: res.Header,
  9009  		})
  9010  	}
  9011  	if err != nil {
  9012  		return nil, err
  9013  	}
  9014  	defer googleapi.CloseBody(res)
  9015  	if err := googleapi.CheckResponse(res); err != nil {
  9016  		return nil, gensupport.WrapError(err)
  9017  	}
  9018  	ret := &ListLbTrafficExtensionsResponse{
  9019  		ServerResponse: googleapi.ServerResponse{
  9020  			Header:         res.Header,
  9021  			HTTPStatusCode: res.StatusCode,
  9022  		},
  9023  	}
  9024  	target := &ret
  9025  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9026  		return nil, err
  9027  	}
  9028  	return ret, nil
  9029  }
  9030  
  9031  // Pages invokes f for each page of results.
  9032  // A non-nil error returned from f will halt the iteration.
  9033  // The provided context supersedes any context provided to the Context method.
  9034  func (c *ProjectsLocationsLbTrafficExtensionsListCall) Pages(ctx context.Context, f func(*ListLbTrafficExtensionsResponse) error) error {
  9035  	c.ctx_ = ctx
  9036  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9037  	for {
  9038  		x, err := c.Do()
  9039  		if err != nil {
  9040  			return err
  9041  		}
  9042  		if err := f(x); err != nil {
  9043  			return err
  9044  		}
  9045  		if x.NextPageToken == "" {
  9046  			return nil
  9047  		}
  9048  		c.PageToken(x.NextPageToken)
  9049  	}
  9050  }
  9051  
  9052  type ProjectsLocationsLbTrafficExtensionsPatchCall struct {
  9053  	s                  *Service
  9054  	name               string
  9055  	lbtrafficextension *LbTrafficExtension
  9056  	urlParams_         gensupport.URLParams
  9057  	ctx_               context.Context
  9058  	header_            http.Header
  9059  }
  9060  
  9061  // Patch: Updates the parameters of the specified `LbTrafficExtension`
  9062  // resource.
  9063  //
  9064  //   - name: Identifier. Name of the `LbTrafficExtension` resource in the
  9065  //     following format:
  9066  //     `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_ex
  9067  //     tension}`.
  9068  func (r *ProjectsLocationsLbTrafficExtensionsService) Patch(name string, lbtrafficextension *LbTrafficExtension) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  9069  	c := &ProjectsLocationsLbTrafficExtensionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9070  	c.name = name
  9071  	c.lbtrafficextension = lbtrafficextension
  9072  	return c
  9073  }
  9074  
  9075  // RequestId sets the optional parameter "requestId": An optional request ID to
  9076  // identify requests. Specify a unique request ID so that if you must retry
  9077  // your request, the server can ignore the request if it has already been
  9078  // completed. The server guarantees that for at least 60 minutes since the
  9079  // first request. For example, consider a situation where you make an initial
  9080  // request and the request times out. If you make the request again with the
  9081  // same request ID, the server can check if original operation with the same
  9082  // request ID was received, and if so, ignores the second request. This
  9083  // prevents clients from accidentally creating duplicate commitments. The
  9084  // request ID must be a valid UUID with the exception that zero UUID is not
  9085  // supported (00000000-0000-0000-0000-000000000000).
  9086  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) RequestId(requestId string) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  9087  	c.urlParams_.Set("requestId", requestId)
  9088  	return c
  9089  }
  9090  
  9091  // UpdateMask sets the optional parameter "updateMask": Used to specify the
  9092  // fields to be overwritten in the `LbTrafficExtension` resource by the update.
  9093  // The fields specified in the update_mask are relative to the resource, not
  9094  // the full request. A field is overwritten if it is in the mask. If the user
  9095  // does not specify a mask, then all fields are overwritten.
  9096  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  9097  	c.urlParams_.Set("updateMask", updateMask)
  9098  	return c
  9099  }
  9100  
  9101  // Fields allows partial responses to be retrieved. See
  9102  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9103  // details.
  9104  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  9105  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9106  	return c
  9107  }
  9108  
  9109  // Context sets the context to be used in this call's Do method.
  9110  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Context(ctx context.Context) *ProjectsLocationsLbTrafficExtensionsPatchCall {
  9111  	c.ctx_ = ctx
  9112  	return c
  9113  }
  9114  
  9115  // Header returns a http.Header that can be modified by the caller to add
  9116  // headers to the request.
  9117  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Header() http.Header {
  9118  	if c.header_ == nil {
  9119  		c.header_ = make(http.Header)
  9120  	}
  9121  	return c.header_
  9122  }
  9123  
  9124  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) doRequest(alt string) (*http.Response, error) {
  9125  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9126  	var body io.Reader = nil
  9127  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.lbtrafficextension)
  9128  	if err != nil {
  9129  		return nil, err
  9130  	}
  9131  	c.urlParams_.Set("alt", alt)
  9132  	c.urlParams_.Set("prettyPrint", "false")
  9133  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9134  	urls += "?" + c.urlParams_.Encode()
  9135  	req, err := http.NewRequest("PATCH", urls, body)
  9136  	if err != nil {
  9137  		return nil, err
  9138  	}
  9139  	req.Header = reqHeaders
  9140  	googleapi.Expand(req.URL, map[string]string{
  9141  		"name": c.name,
  9142  	})
  9143  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9144  }
  9145  
  9146  // Do executes the "networkservices.projects.locations.lbTrafficExtensions.patch" call.
  9147  // Any non-2xx status code is an error. Response headers are in either
  9148  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9149  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9150  // whether the returned error was because http.StatusNotModified was returned.
  9151  func (c *ProjectsLocationsLbTrafficExtensionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9152  	gensupport.SetOptions(c.urlParams_, opts...)
  9153  	res, err := c.doRequest("json")
  9154  	if res != nil && res.StatusCode == http.StatusNotModified {
  9155  		if res.Body != nil {
  9156  			res.Body.Close()
  9157  		}
  9158  		return nil, gensupport.WrapError(&googleapi.Error{
  9159  			Code:   res.StatusCode,
  9160  			Header: res.Header,
  9161  		})
  9162  	}
  9163  	if err != nil {
  9164  		return nil, err
  9165  	}
  9166  	defer googleapi.CloseBody(res)
  9167  	if err := googleapi.CheckResponse(res); err != nil {
  9168  		return nil, gensupport.WrapError(err)
  9169  	}
  9170  	ret := &Operation{
  9171  		ServerResponse: googleapi.ServerResponse{
  9172  			Header:         res.Header,
  9173  			HTTPStatusCode: res.StatusCode,
  9174  		},
  9175  	}
  9176  	target := &ret
  9177  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9178  		return nil, err
  9179  	}
  9180  	return ret, nil
  9181  }
  9182  
  9183  type ProjectsLocationsMeshesCreateCall struct {
  9184  	s          *Service
  9185  	parent     string
  9186  	mesh       *Mesh
  9187  	urlParams_ gensupport.URLParams
  9188  	ctx_       context.Context
  9189  	header_    http.Header
  9190  }
  9191  
  9192  // Create: Creates a new Mesh in a given project and location.
  9193  //
  9194  //   - parent: The parent resource of the Mesh. Must be in the format
  9195  //     `projects/*/locations/global`.
  9196  func (r *ProjectsLocationsMeshesService) Create(parent string, mesh *Mesh) *ProjectsLocationsMeshesCreateCall {
  9197  	c := &ProjectsLocationsMeshesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9198  	c.parent = parent
  9199  	c.mesh = mesh
  9200  	return c
  9201  }
  9202  
  9203  // MeshId sets the optional parameter "meshId": Required. Short name of the
  9204  // Mesh resource to be created.
  9205  func (c *ProjectsLocationsMeshesCreateCall) MeshId(meshId string) *ProjectsLocationsMeshesCreateCall {
  9206  	c.urlParams_.Set("meshId", meshId)
  9207  	return c
  9208  }
  9209  
  9210  // Fields allows partial responses to be retrieved. See
  9211  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9212  // details.
  9213  func (c *ProjectsLocationsMeshesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesCreateCall {
  9214  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9215  	return c
  9216  }
  9217  
  9218  // Context sets the context to be used in this call's Do method.
  9219  func (c *ProjectsLocationsMeshesCreateCall) Context(ctx context.Context) *ProjectsLocationsMeshesCreateCall {
  9220  	c.ctx_ = ctx
  9221  	return c
  9222  }
  9223  
  9224  // Header returns a http.Header that can be modified by the caller to add
  9225  // headers to the request.
  9226  func (c *ProjectsLocationsMeshesCreateCall) Header() http.Header {
  9227  	if c.header_ == nil {
  9228  		c.header_ = make(http.Header)
  9229  	}
  9230  	return c.header_
  9231  }
  9232  
  9233  func (c *ProjectsLocationsMeshesCreateCall) doRequest(alt string) (*http.Response, error) {
  9234  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9235  	var body io.Reader = nil
  9236  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh)
  9237  	if err != nil {
  9238  		return nil, err
  9239  	}
  9240  	c.urlParams_.Set("alt", alt)
  9241  	c.urlParams_.Set("prettyPrint", "false")
  9242  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes")
  9243  	urls += "?" + c.urlParams_.Encode()
  9244  	req, err := http.NewRequest("POST", urls, body)
  9245  	if err != nil {
  9246  		return nil, err
  9247  	}
  9248  	req.Header = reqHeaders
  9249  	googleapi.Expand(req.URL, map[string]string{
  9250  		"parent": c.parent,
  9251  	})
  9252  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9253  }
  9254  
  9255  // Do executes the "networkservices.projects.locations.meshes.create" call.
  9256  // Any non-2xx status code is an error. Response headers are in either
  9257  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9258  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9259  // whether the returned error was because http.StatusNotModified was returned.
  9260  func (c *ProjectsLocationsMeshesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9261  	gensupport.SetOptions(c.urlParams_, opts...)
  9262  	res, err := c.doRequest("json")
  9263  	if res != nil && res.StatusCode == http.StatusNotModified {
  9264  		if res.Body != nil {
  9265  			res.Body.Close()
  9266  		}
  9267  		return nil, gensupport.WrapError(&googleapi.Error{
  9268  			Code:   res.StatusCode,
  9269  			Header: res.Header,
  9270  		})
  9271  	}
  9272  	if err != nil {
  9273  		return nil, err
  9274  	}
  9275  	defer googleapi.CloseBody(res)
  9276  	if err := googleapi.CheckResponse(res); err != nil {
  9277  		return nil, gensupport.WrapError(err)
  9278  	}
  9279  	ret := &Operation{
  9280  		ServerResponse: googleapi.ServerResponse{
  9281  			Header:         res.Header,
  9282  			HTTPStatusCode: res.StatusCode,
  9283  		},
  9284  	}
  9285  	target := &ret
  9286  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9287  		return nil, err
  9288  	}
  9289  	return ret, nil
  9290  }
  9291  
  9292  type ProjectsLocationsMeshesDeleteCall struct {
  9293  	s          *Service
  9294  	name       string
  9295  	urlParams_ gensupport.URLParams
  9296  	ctx_       context.Context
  9297  	header_    http.Header
  9298  }
  9299  
  9300  // Delete: Deletes a single Mesh.
  9301  //
  9302  //   - name: A name of the Mesh to delete. Must be in the format
  9303  //     `projects/*/locations/global/meshes/*`.
  9304  func (r *ProjectsLocationsMeshesService) Delete(name string) *ProjectsLocationsMeshesDeleteCall {
  9305  	c := &ProjectsLocationsMeshesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9306  	c.name = name
  9307  	return c
  9308  }
  9309  
  9310  // Fields allows partial responses to be retrieved. See
  9311  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9312  // details.
  9313  func (c *ProjectsLocationsMeshesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesDeleteCall {
  9314  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9315  	return c
  9316  }
  9317  
  9318  // Context sets the context to be used in this call's Do method.
  9319  func (c *ProjectsLocationsMeshesDeleteCall) Context(ctx context.Context) *ProjectsLocationsMeshesDeleteCall {
  9320  	c.ctx_ = ctx
  9321  	return c
  9322  }
  9323  
  9324  // Header returns a http.Header that can be modified by the caller to add
  9325  // headers to the request.
  9326  func (c *ProjectsLocationsMeshesDeleteCall) Header() http.Header {
  9327  	if c.header_ == nil {
  9328  		c.header_ = make(http.Header)
  9329  	}
  9330  	return c.header_
  9331  }
  9332  
  9333  func (c *ProjectsLocationsMeshesDeleteCall) doRequest(alt string) (*http.Response, error) {
  9334  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9335  	var body io.Reader = nil
  9336  	c.urlParams_.Set("alt", alt)
  9337  	c.urlParams_.Set("prettyPrint", "false")
  9338  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9339  	urls += "?" + c.urlParams_.Encode()
  9340  	req, err := http.NewRequest("DELETE", urls, body)
  9341  	if err != nil {
  9342  		return nil, err
  9343  	}
  9344  	req.Header = reqHeaders
  9345  	googleapi.Expand(req.URL, map[string]string{
  9346  		"name": c.name,
  9347  	})
  9348  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9349  }
  9350  
  9351  // Do executes the "networkservices.projects.locations.meshes.delete" call.
  9352  // Any non-2xx status code is an error. Response headers are in either
  9353  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9354  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9355  // whether the returned error was because http.StatusNotModified was returned.
  9356  func (c *ProjectsLocationsMeshesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9357  	gensupport.SetOptions(c.urlParams_, opts...)
  9358  	res, err := c.doRequest("json")
  9359  	if res != nil && res.StatusCode == http.StatusNotModified {
  9360  		if res.Body != nil {
  9361  			res.Body.Close()
  9362  		}
  9363  		return nil, gensupport.WrapError(&googleapi.Error{
  9364  			Code:   res.StatusCode,
  9365  			Header: res.Header,
  9366  		})
  9367  	}
  9368  	if err != nil {
  9369  		return nil, err
  9370  	}
  9371  	defer googleapi.CloseBody(res)
  9372  	if err := googleapi.CheckResponse(res); err != nil {
  9373  		return nil, gensupport.WrapError(err)
  9374  	}
  9375  	ret := &Operation{
  9376  		ServerResponse: googleapi.ServerResponse{
  9377  			Header:         res.Header,
  9378  			HTTPStatusCode: res.StatusCode,
  9379  		},
  9380  	}
  9381  	target := &ret
  9382  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9383  		return nil, err
  9384  	}
  9385  	return ret, nil
  9386  }
  9387  
  9388  type ProjectsLocationsMeshesGetCall struct {
  9389  	s            *Service
  9390  	name         string
  9391  	urlParams_   gensupport.URLParams
  9392  	ifNoneMatch_ string
  9393  	ctx_         context.Context
  9394  	header_      http.Header
  9395  }
  9396  
  9397  // Get: Gets details of a single Mesh.
  9398  //
  9399  //   - name: A name of the Mesh to get. Must be in the format
  9400  //     `projects/*/locations/global/meshes/*`.
  9401  func (r *ProjectsLocationsMeshesService) Get(name string) *ProjectsLocationsMeshesGetCall {
  9402  	c := &ProjectsLocationsMeshesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9403  	c.name = name
  9404  	return c
  9405  }
  9406  
  9407  // Fields allows partial responses to be retrieved. See
  9408  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9409  // details.
  9410  func (c *ProjectsLocationsMeshesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetCall {
  9411  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9412  	return c
  9413  }
  9414  
  9415  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9416  // object's ETag matches the given value. This is useful for getting updates
  9417  // only after the object has changed since the last request.
  9418  func (c *ProjectsLocationsMeshesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetCall {
  9419  	c.ifNoneMatch_ = entityTag
  9420  	return c
  9421  }
  9422  
  9423  // Context sets the context to be used in this call's Do method.
  9424  func (c *ProjectsLocationsMeshesGetCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetCall {
  9425  	c.ctx_ = ctx
  9426  	return c
  9427  }
  9428  
  9429  // Header returns a http.Header that can be modified by the caller to add
  9430  // headers to the request.
  9431  func (c *ProjectsLocationsMeshesGetCall) Header() http.Header {
  9432  	if c.header_ == nil {
  9433  		c.header_ = make(http.Header)
  9434  	}
  9435  	return c.header_
  9436  }
  9437  
  9438  func (c *ProjectsLocationsMeshesGetCall) doRequest(alt string) (*http.Response, error) {
  9439  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9440  	if c.ifNoneMatch_ != "" {
  9441  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9442  	}
  9443  	var body io.Reader = nil
  9444  	c.urlParams_.Set("alt", alt)
  9445  	c.urlParams_.Set("prettyPrint", "false")
  9446  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9447  	urls += "?" + c.urlParams_.Encode()
  9448  	req, err := http.NewRequest("GET", urls, body)
  9449  	if err != nil {
  9450  		return nil, err
  9451  	}
  9452  	req.Header = reqHeaders
  9453  	googleapi.Expand(req.URL, map[string]string{
  9454  		"name": c.name,
  9455  	})
  9456  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9457  }
  9458  
  9459  // Do executes the "networkservices.projects.locations.meshes.get" call.
  9460  // Any non-2xx status code is an error. Response headers are in either
  9461  // *Mesh.ServerResponse.Header or (if a response was returned at all) in
  9462  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9463  // whether the returned error was because http.StatusNotModified was returned.
  9464  func (c *ProjectsLocationsMeshesGetCall) Do(opts ...googleapi.CallOption) (*Mesh, error) {
  9465  	gensupport.SetOptions(c.urlParams_, opts...)
  9466  	res, err := c.doRequest("json")
  9467  	if res != nil && res.StatusCode == http.StatusNotModified {
  9468  		if res.Body != nil {
  9469  			res.Body.Close()
  9470  		}
  9471  		return nil, gensupport.WrapError(&googleapi.Error{
  9472  			Code:   res.StatusCode,
  9473  			Header: res.Header,
  9474  		})
  9475  	}
  9476  	if err != nil {
  9477  		return nil, err
  9478  	}
  9479  	defer googleapi.CloseBody(res)
  9480  	if err := googleapi.CheckResponse(res); err != nil {
  9481  		return nil, gensupport.WrapError(err)
  9482  	}
  9483  	ret := &Mesh{
  9484  		ServerResponse: googleapi.ServerResponse{
  9485  			Header:         res.Header,
  9486  			HTTPStatusCode: res.StatusCode,
  9487  		},
  9488  	}
  9489  	target := &ret
  9490  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9491  		return nil, err
  9492  	}
  9493  	return ret, nil
  9494  }
  9495  
  9496  type ProjectsLocationsMeshesGetIamPolicyCall struct {
  9497  	s            *Service
  9498  	resource     string
  9499  	urlParams_   gensupport.URLParams
  9500  	ifNoneMatch_ string
  9501  	ctx_         context.Context
  9502  	header_      http.Header
  9503  }
  9504  
  9505  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  9506  // empty policy if the resource exists and does not have a policy set.
  9507  //
  9508  //   - resource: REQUIRED: The resource for which the policy is being requested.
  9509  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  9510  //     for the appropriate value for this field.
  9511  func (r *ProjectsLocationsMeshesService) GetIamPolicy(resource string) *ProjectsLocationsMeshesGetIamPolicyCall {
  9512  	c := &ProjectsLocationsMeshesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9513  	c.resource = resource
  9514  	return c
  9515  }
  9516  
  9517  // OptionsRequestedPolicyVersion sets the optional parameter
  9518  // "options.requestedPolicyVersion": The maximum policy version that will be
  9519  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  9520  // an invalid value will be rejected. Requests for policies with any
  9521  // conditional role bindings must specify version 3. Policies with no
  9522  // conditional role bindings may specify any valid value or leave the field
  9523  // unset. The policy in the response might use the policy version that you
  9524  // specified, or it might use a lower policy version. For example, if you
  9525  // specify version 3, but the policy has no conditional role bindings, the
  9526  // response uses version 1. To learn which resources support conditions in
  9527  // their IAM policies, see the IAM documentation
  9528  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  9529  func (c *ProjectsLocationsMeshesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsMeshesGetIamPolicyCall {
  9530  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  9531  	return c
  9532  }
  9533  
  9534  // Fields allows partial responses to be retrieved. See
  9535  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9536  // details.
  9537  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesGetIamPolicyCall {
  9538  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9539  	return c
  9540  }
  9541  
  9542  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9543  // object's ETag matches the given value. This is useful for getting updates
  9544  // only after the object has changed since the last request.
  9545  func (c *ProjectsLocationsMeshesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesGetIamPolicyCall {
  9546  	c.ifNoneMatch_ = entityTag
  9547  	return c
  9548  }
  9549  
  9550  // Context sets the context to be used in this call's Do method.
  9551  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesGetIamPolicyCall {
  9552  	c.ctx_ = ctx
  9553  	return c
  9554  }
  9555  
  9556  // Header returns a http.Header that can be modified by the caller to add
  9557  // headers to the request.
  9558  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Header() http.Header {
  9559  	if c.header_ == nil {
  9560  		c.header_ = make(http.Header)
  9561  	}
  9562  	return c.header_
  9563  }
  9564  
  9565  func (c *ProjectsLocationsMeshesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9566  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9567  	if c.ifNoneMatch_ != "" {
  9568  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9569  	}
  9570  	var body io.Reader = nil
  9571  	c.urlParams_.Set("alt", alt)
  9572  	c.urlParams_.Set("prettyPrint", "false")
  9573  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  9574  	urls += "?" + c.urlParams_.Encode()
  9575  	req, err := http.NewRequest("GET", urls, body)
  9576  	if err != nil {
  9577  		return nil, err
  9578  	}
  9579  	req.Header = reqHeaders
  9580  	googleapi.Expand(req.URL, map[string]string{
  9581  		"resource": c.resource,
  9582  	})
  9583  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9584  }
  9585  
  9586  // Do executes the "networkservices.projects.locations.meshes.getIamPolicy" call.
  9587  // Any non-2xx status code is an error. Response headers are in either
  9588  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9589  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9590  // whether the returned error was because http.StatusNotModified was returned.
  9591  func (c *ProjectsLocationsMeshesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9592  	gensupport.SetOptions(c.urlParams_, opts...)
  9593  	res, err := c.doRequest("json")
  9594  	if res != nil && res.StatusCode == http.StatusNotModified {
  9595  		if res.Body != nil {
  9596  			res.Body.Close()
  9597  		}
  9598  		return nil, gensupport.WrapError(&googleapi.Error{
  9599  			Code:   res.StatusCode,
  9600  			Header: res.Header,
  9601  		})
  9602  	}
  9603  	if err != nil {
  9604  		return nil, err
  9605  	}
  9606  	defer googleapi.CloseBody(res)
  9607  	if err := googleapi.CheckResponse(res); err != nil {
  9608  		return nil, gensupport.WrapError(err)
  9609  	}
  9610  	ret := &Policy{
  9611  		ServerResponse: googleapi.ServerResponse{
  9612  			Header:         res.Header,
  9613  			HTTPStatusCode: res.StatusCode,
  9614  		},
  9615  	}
  9616  	target := &ret
  9617  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9618  		return nil, err
  9619  	}
  9620  	return ret, nil
  9621  }
  9622  
  9623  type ProjectsLocationsMeshesListCall struct {
  9624  	s            *Service
  9625  	parent       string
  9626  	urlParams_   gensupport.URLParams
  9627  	ifNoneMatch_ string
  9628  	ctx_         context.Context
  9629  	header_      http.Header
  9630  }
  9631  
  9632  // List: Lists Meshes in a given project and location.
  9633  //
  9634  //   - parent: The project and location from which the Meshes should be listed,
  9635  //     specified in the format `projects/*/locations/global`.
  9636  func (r *ProjectsLocationsMeshesService) List(parent string) *ProjectsLocationsMeshesListCall {
  9637  	c := &ProjectsLocationsMeshesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9638  	c.parent = parent
  9639  	return c
  9640  }
  9641  
  9642  // PageSize sets the optional parameter "pageSize": Maximum number of Meshes to
  9643  // return per call.
  9644  func (c *ProjectsLocationsMeshesListCall) PageSize(pageSize int64) *ProjectsLocationsMeshesListCall {
  9645  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9646  	return c
  9647  }
  9648  
  9649  // PageToken sets the optional parameter "pageToken": The value returned by the
  9650  // last `ListMeshesResponse` Indicates that this is a continuation of a prior
  9651  // `ListMeshes` call, and that the system should return the next page of data.
  9652  func (c *ProjectsLocationsMeshesListCall) PageToken(pageToken string) *ProjectsLocationsMeshesListCall {
  9653  	c.urlParams_.Set("pageToken", pageToken)
  9654  	return c
  9655  }
  9656  
  9657  // Fields allows partial responses to be retrieved. See
  9658  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9659  // details.
  9660  func (c *ProjectsLocationsMeshesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesListCall {
  9661  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9662  	return c
  9663  }
  9664  
  9665  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9666  // object's ETag matches the given value. This is useful for getting updates
  9667  // only after the object has changed since the last request.
  9668  func (c *ProjectsLocationsMeshesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMeshesListCall {
  9669  	c.ifNoneMatch_ = entityTag
  9670  	return c
  9671  }
  9672  
  9673  // Context sets the context to be used in this call's Do method.
  9674  func (c *ProjectsLocationsMeshesListCall) Context(ctx context.Context) *ProjectsLocationsMeshesListCall {
  9675  	c.ctx_ = ctx
  9676  	return c
  9677  }
  9678  
  9679  // Header returns a http.Header that can be modified by the caller to add
  9680  // headers to the request.
  9681  func (c *ProjectsLocationsMeshesListCall) Header() http.Header {
  9682  	if c.header_ == nil {
  9683  		c.header_ = make(http.Header)
  9684  	}
  9685  	return c.header_
  9686  }
  9687  
  9688  func (c *ProjectsLocationsMeshesListCall) doRequest(alt string) (*http.Response, error) {
  9689  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9690  	if c.ifNoneMatch_ != "" {
  9691  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9692  	}
  9693  	var body io.Reader = nil
  9694  	c.urlParams_.Set("alt", alt)
  9695  	c.urlParams_.Set("prettyPrint", "false")
  9696  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/meshes")
  9697  	urls += "?" + c.urlParams_.Encode()
  9698  	req, err := http.NewRequest("GET", urls, body)
  9699  	if err != nil {
  9700  		return nil, err
  9701  	}
  9702  	req.Header = reqHeaders
  9703  	googleapi.Expand(req.URL, map[string]string{
  9704  		"parent": c.parent,
  9705  	})
  9706  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9707  }
  9708  
  9709  // Do executes the "networkservices.projects.locations.meshes.list" call.
  9710  // Any non-2xx status code is an error. Response headers are in either
  9711  // *ListMeshesResponse.ServerResponse.Header or (if a response was returned at
  9712  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9713  // check whether the returned error was because http.StatusNotModified was
  9714  // returned.
  9715  func (c *ProjectsLocationsMeshesListCall) Do(opts ...googleapi.CallOption) (*ListMeshesResponse, error) {
  9716  	gensupport.SetOptions(c.urlParams_, opts...)
  9717  	res, err := c.doRequest("json")
  9718  	if res != nil && res.StatusCode == http.StatusNotModified {
  9719  		if res.Body != nil {
  9720  			res.Body.Close()
  9721  		}
  9722  		return nil, gensupport.WrapError(&googleapi.Error{
  9723  			Code:   res.StatusCode,
  9724  			Header: res.Header,
  9725  		})
  9726  	}
  9727  	if err != nil {
  9728  		return nil, err
  9729  	}
  9730  	defer googleapi.CloseBody(res)
  9731  	if err := googleapi.CheckResponse(res); err != nil {
  9732  		return nil, gensupport.WrapError(err)
  9733  	}
  9734  	ret := &ListMeshesResponse{
  9735  		ServerResponse: googleapi.ServerResponse{
  9736  			Header:         res.Header,
  9737  			HTTPStatusCode: res.StatusCode,
  9738  		},
  9739  	}
  9740  	target := &ret
  9741  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9742  		return nil, err
  9743  	}
  9744  	return ret, nil
  9745  }
  9746  
  9747  // Pages invokes f for each page of results.
  9748  // A non-nil error returned from f will halt the iteration.
  9749  // The provided context supersedes any context provided to the Context method.
  9750  func (c *ProjectsLocationsMeshesListCall) Pages(ctx context.Context, f func(*ListMeshesResponse) error) error {
  9751  	c.ctx_ = ctx
  9752  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9753  	for {
  9754  		x, err := c.Do()
  9755  		if err != nil {
  9756  			return err
  9757  		}
  9758  		if err := f(x); err != nil {
  9759  			return err
  9760  		}
  9761  		if x.NextPageToken == "" {
  9762  			return nil
  9763  		}
  9764  		c.PageToken(x.NextPageToken)
  9765  	}
  9766  }
  9767  
  9768  type ProjectsLocationsMeshesPatchCall struct {
  9769  	s          *Service
  9770  	name       string
  9771  	mesh       *Mesh
  9772  	urlParams_ gensupport.URLParams
  9773  	ctx_       context.Context
  9774  	header_    http.Header
  9775  }
  9776  
  9777  // Patch: Updates the parameters of a single Mesh.
  9778  //
  9779  //   - name: Name of the Mesh resource. It matches pattern
  9780  //     `projects/*/locations/global/meshes/`.
  9781  func (r *ProjectsLocationsMeshesService) Patch(name string, mesh *Mesh) *ProjectsLocationsMeshesPatchCall {
  9782  	c := &ProjectsLocationsMeshesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9783  	c.name = name
  9784  	c.mesh = mesh
  9785  	return c
  9786  }
  9787  
  9788  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  9789  // specify the fields to be overwritten in the Mesh resource by the update. The
  9790  // fields specified in the update_mask are relative to the resource, not the
  9791  // full request. A field will be overwritten if it is in the mask. If the user
  9792  // does not provide a mask then all fields will be overwritten.
  9793  func (c *ProjectsLocationsMeshesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMeshesPatchCall {
  9794  	c.urlParams_.Set("updateMask", updateMask)
  9795  	return c
  9796  }
  9797  
  9798  // Fields allows partial responses to be retrieved. See
  9799  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9800  // details.
  9801  func (c *ProjectsLocationsMeshesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesPatchCall {
  9802  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9803  	return c
  9804  }
  9805  
  9806  // Context sets the context to be used in this call's Do method.
  9807  func (c *ProjectsLocationsMeshesPatchCall) Context(ctx context.Context) *ProjectsLocationsMeshesPatchCall {
  9808  	c.ctx_ = ctx
  9809  	return c
  9810  }
  9811  
  9812  // Header returns a http.Header that can be modified by the caller to add
  9813  // headers to the request.
  9814  func (c *ProjectsLocationsMeshesPatchCall) Header() http.Header {
  9815  	if c.header_ == nil {
  9816  		c.header_ = make(http.Header)
  9817  	}
  9818  	return c.header_
  9819  }
  9820  
  9821  func (c *ProjectsLocationsMeshesPatchCall) doRequest(alt string) (*http.Response, error) {
  9822  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9823  	var body io.Reader = nil
  9824  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.mesh)
  9825  	if err != nil {
  9826  		return nil, err
  9827  	}
  9828  	c.urlParams_.Set("alt", alt)
  9829  	c.urlParams_.Set("prettyPrint", "false")
  9830  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9831  	urls += "?" + c.urlParams_.Encode()
  9832  	req, err := http.NewRequest("PATCH", urls, body)
  9833  	if err != nil {
  9834  		return nil, err
  9835  	}
  9836  	req.Header = reqHeaders
  9837  	googleapi.Expand(req.URL, map[string]string{
  9838  		"name": c.name,
  9839  	})
  9840  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9841  }
  9842  
  9843  // Do executes the "networkservices.projects.locations.meshes.patch" call.
  9844  // Any non-2xx status code is an error. Response headers are in either
  9845  // *Operation.ServerResponse.Header or (if a response was returned at all) in
  9846  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9847  // whether the returned error was because http.StatusNotModified was returned.
  9848  func (c *ProjectsLocationsMeshesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  9849  	gensupport.SetOptions(c.urlParams_, opts...)
  9850  	res, err := c.doRequest("json")
  9851  	if res != nil && res.StatusCode == http.StatusNotModified {
  9852  		if res.Body != nil {
  9853  			res.Body.Close()
  9854  		}
  9855  		return nil, gensupport.WrapError(&googleapi.Error{
  9856  			Code:   res.StatusCode,
  9857  			Header: res.Header,
  9858  		})
  9859  	}
  9860  	if err != nil {
  9861  		return nil, err
  9862  	}
  9863  	defer googleapi.CloseBody(res)
  9864  	if err := googleapi.CheckResponse(res); err != nil {
  9865  		return nil, gensupport.WrapError(err)
  9866  	}
  9867  	ret := &Operation{
  9868  		ServerResponse: googleapi.ServerResponse{
  9869  			Header:         res.Header,
  9870  			HTTPStatusCode: res.StatusCode,
  9871  		},
  9872  	}
  9873  	target := &ret
  9874  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9875  		return nil, err
  9876  	}
  9877  	return ret, nil
  9878  }
  9879  
  9880  type ProjectsLocationsMeshesSetIamPolicyCall struct {
  9881  	s                   *Service
  9882  	resource            string
  9883  	setiampolicyrequest *SetIamPolicyRequest
  9884  	urlParams_          gensupport.URLParams
  9885  	ctx_                context.Context
  9886  	header_             http.Header
  9887  }
  9888  
  9889  // SetIamPolicy: Sets the access control policy on the specified resource.
  9890  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  9891  // and `PERMISSION_DENIED` errors.
  9892  //
  9893  //   - resource: REQUIRED: The resource for which the policy is being specified.
  9894  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  9895  //     for the appropriate value for this field.
  9896  func (r *ProjectsLocationsMeshesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsMeshesSetIamPolicyCall {
  9897  	c := &ProjectsLocationsMeshesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9898  	c.resource = resource
  9899  	c.setiampolicyrequest = setiampolicyrequest
  9900  	return c
  9901  }
  9902  
  9903  // Fields allows partial responses to be retrieved. See
  9904  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9905  // details.
  9906  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesSetIamPolicyCall {
  9907  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9908  	return c
  9909  }
  9910  
  9911  // Context sets the context to be used in this call's Do method.
  9912  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsMeshesSetIamPolicyCall {
  9913  	c.ctx_ = ctx
  9914  	return c
  9915  }
  9916  
  9917  // Header returns a http.Header that can be modified by the caller to add
  9918  // headers to the request.
  9919  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Header() http.Header {
  9920  	if c.header_ == nil {
  9921  		c.header_ = make(http.Header)
  9922  	}
  9923  	return c.header_
  9924  }
  9925  
  9926  func (c *ProjectsLocationsMeshesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9927  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9928  	var body io.Reader = nil
  9929  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  9930  	if err != nil {
  9931  		return nil, err
  9932  	}
  9933  	c.urlParams_.Set("alt", alt)
  9934  	c.urlParams_.Set("prettyPrint", "false")
  9935  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  9936  	urls += "?" + c.urlParams_.Encode()
  9937  	req, err := http.NewRequest("POST", urls, body)
  9938  	if err != nil {
  9939  		return nil, err
  9940  	}
  9941  	req.Header = reqHeaders
  9942  	googleapi.Expand(req.URL, map[string]string{
  9943  		"resource": c.resource,
  9944  	})
  9945  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9946  }
  9947  
  9948  // Do executes the "networkservices.projects.locations.meshes.setIamPolicy" call.
  9949  // Any non-2xx status code is an error. Response headers are in either
  9950  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9951  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9952  // whether the returned error was because http.StatusNotModified was returned.
  9953  func (c *ProjectsLocationsMeshesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9954  	gensupport.SetOptions(c.urlParams_, opts...)
  9955  	res, err := c.doRequest("json")
  9956  	if res != nil && res.StatusCode == http.StatusNotModified {
  9957  		if res.Body != nil {
  9958  			res.Body.Close()
  9959  		}
  9960  		return nil, gensupport.WrapError(&googleapi.Error{
  9961  			Code:   res.StatusCode,
  9962  			Header: res.Header,
  9963  		})
  9964  	}
  9965  	if err != nil {
  9966  		return nil, err
  9967  	}
  9968  	defer googleapi.CloseBody(res)
  9969  	if err := googleapi.CheckResponse(res); err != nil {
  9970  		return nil, gensupport.WrapError(err)
  9971  	}
  9972  	ret := &Policy{
  9973  		ServerResponse: googleapi.ServerResponse{
  9974  			Header:         res.Header,
  9975  			HTTPStatusCode: res.StatusCode,
  9976  		},
  9977  	}
  9978  	target := &ret
  9979  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9980  		return nil, err
  9981  	}
  9982  	return ret, nil
  9983  }
  9984  
  9985  type ProjectsLocationsMeshesTestIamPermissionsCall struct {
  9986  	s                         *Service
  9987  	resource                  string
  9988  	testiampermissionsrequest *TestIamPermissionsRequest
  9989  	urlParams_                gensupport.URLParams
  9990  	ctx_                      context.Context
  9991  	header_                   http.Header
  9992  }
  9993  
  9994  // TestIamPermissions: Returns permissions that a caller has on the specified
  9995  // resource. If the resource does not exist, this will return an empty set of
  9996  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  9997  // used for building permission-aware UIs and command-line tools, not for
  9998  // authorization checking. This operation may "fail open" without warning.
  9999  //
 10000  //   - resource: REQUIRED: The resource for which the policy detail is being
 10001  //     requested. See Resource names
 10002  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 10003  //     value for this field.
 10004  func (r *ProjectsLocationsMeshesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsMeshesTestIamPermissionsCall {
 10005  	c := &ProjectsLocationsMeshesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10006  	c.resource = resource
 10007  	c.testiampermissionsrequest = testiampermissionsrequest
 10008  	return c
 10009  }
 10010  
 10011  // Fields allows partial responses to be retrieved. See
 10012  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10013  // details.
 10014  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMeshesTestIamPermissionsCall {
 10015  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10016  	return c
 10017  }
 10018  
 10019  // Context sets the context to be used in this call's Do method.
 10020  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsMeshesTestIamPermissionsCall {
 10021  	c.ctx_ = ctx
 10022  	return c
 10023  }
 10024  
 10025  // Header returns a http.Header that can be modified by the caller to add
 10026  // headers to the request.
 10027  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Header() http.Header {
 10028  	if c.header_ == nil {
 10029  		c.header_ = make(http.Header)
 10030  	}
 10031  	return c.header_
 10032  }
 10033  
 10034  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 10035  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10036  	var body io.Reader = nil
 10037  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 10038  	if err != nil {
 10039  		return nil, err
 10040  	}
 10041  	c.urlParams_.Set("alt", alt)
 10042  	c.urlParams_.Set("prettyPrint", "false")
 10043  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 10044  	urls += "?" + c.urlParams_.Encode()
 10045  	req, err := http.NewRequest("POST", urls, body)
 10046  	if err != nil {
 10047  		return nil, err
 10048  	}
 10049  	req.Header = reqHeaders
 10050  	googleapi.Expand(req.URL, map[string]string{
 10051  		"resource": c.resource,
 10052  	})
 10053  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10054  }
 10055  
 10056  // Do executes the "networkservices.projects.locations.meshes.testIamPermissions" call.
 10057  // Any non-2xx status code is an error. Response headers are in either
 10058  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 10059  // returned at all) in error.(*googleapi.Error).Header. Use
 10060  // googleapi.IsNotModified to check whether the returned error was because
 10061  // http.StatusNotModified was returned.
 10062  func (c *ProjectsLocationsMeshesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 10063  	gensupport.SetOptions(c.urlParams_, opts...)
 10064  	res, err := c.doRequest("json")
 10065  	if res != nil && res.StatusCode == http.StatusNotModified {
 10066  		if res.Body != nil {
 10067  			res.Body.Close()
 10068  		}
 10069  		return nil, gensupport.WrapError(&googleapi.Error{
 10070  			Code:   res.StatusCode,
 10071  			Header: res.Header,
 10072  		})
 10073  	}
 10074  	if err != nil {
 10075  		return nil, err
 10076  	}
 10077  	defer googleapi.CloseBody(res)
 10078  	if err := googleapi.CheckResponse(res); err != nil {
 10079  		return nil, gensupport.WrapError(err)
 10080  	}
 10081  	ret := &TestIamPermissionsResponse{
 10082  		ServerResponse: googleapi.ServerResponse{
 10083  			Header:         res.Header,
 10084  			HTTPStatusCode: res.StatusCode,
 10085  		},
 10086  	}
 10087  	target := &ret
 10088  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10089  		return nil, err
 10090  	}
 10091  	return ret, nil
 10092  }
 10093  
 10094  type ProjectsLocationsOperationsCancelCall struct {
 10095  	s                      *Service
 10096  	name                   string
 10097  	canceloperationrequest *CancelOperationRequest
 10098  	urlParams_             gensupport.URLParams
 10099  	ctx_                   context.Context
 10100  	header_                http.Header
 10101  }
 10102  
 10103  // Cancel: Starts asynchronous cancellation on a long-running operation. The
 10104  // server makes a best effort to cancel the operation, but success is not
 10105  // guaranteed. If the server doesn't support this method, it returns
 10106  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
 10107  // other methods to check whether the cancellation succeeded or whether the
 10108  // operation completed despite cancellation. On successful cancellation, the
 10109  // operation is not deleted; instead, it becomes an operation with an
 10110  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
 10111  // `Code.CANCELLED`.
 10112  //
 10113  // - name: The name of the operation resource to be cancelled.
 10114  func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
 10115  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10116  	c.name = name
 10117  	c.canceloperationrequest = canceloperationrequest
 10118  	return c
 10119  }
 10120  
 10121  // Fields allows partial responses to be retrieved. See
 10122  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10123  // details.
 10124  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
 10125  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10126  	return c
 10127  }
 10128  
 10129  // Context sets the context to be used in this call's Do method.
 10130  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
 10131  	c.ctx_ = ctx
 10132  	return c
 10133  }
 10134  
 10135  // Header returns a http.Header that can be modified by the caller to add
 10136  // headers to the request.
 10137  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
 10138  	if c.header_ == nil {
 10139  		c.header_ = make(http.Header)
 10140  	}
 10141  	return c.header_
 10142  }
 10143  
 10144  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
 10145  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10146  	var body io.Reader = nil
 10147  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
 10148  	if err != nil {
 10149  		return nil, err
 10150  	}
 10151  	c.urlParams_.Set("alt", alt)
 10152  	c.urlParams_.Set("prettyPrint", "false")
 10153  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
 10154  	urls += "?" + c.urlParams_.Encode()
 10155  	req, err := http.NewRequest("POST", urls, body)
 10156  	if err != nil {
 10157  		return nil, err
 10158  	}
 10159  	req.Header = reqHeaders
 10160  	googleapi.Expand(req.URL, map[string]string{
 10161  		"name": c.name,
 10162  	})
 10163  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10164  }
 10165  
 10166  // Do executes the "networkservices.projects.locations.operations.cancel" call.
 10167  // Any non-2xx status code is an error. Response headers are in either
 10168  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 10169  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10170  // whether the returned error was because http.StatusNotModified was returned.
 10171  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 10172  	gensupport.SetOptions(c.urlParams_, opts...)
 10173  	res, err := c.doRequest("json")
 10174  	if res != nil && res.StatusCode == http.StatusNotModified {
 10175  		if res.Body != nil {
 10176  			res.Body.Close()
 10177  		}
 10178  		return nil, gensupport.WrapError(&googleapi.Error{
 10179  			Code:   res.StatusCode,
 10180  			Header: res.Header,
 10181  		})
 10182  	}
 10183  	if err != nil {
 10184  		return nil, err
 10185  	}
 10186  	defer googleapi.CloseBody(res)
 10187  	if err := googleapi.CheckResponse(res); err != nil {
 10188  		return nil, gensupport.WrapError(err)
 10189  	}
 10190  	ret := &Empty{
 10191  		ServerResponse: googleapi.ServerResponse{
 10192  			Header:         res.Header,
 10193  			HTTPStatusCode: res.StatusCode,
 10194  		},
 10195  	}
 10196  	target := &ret
 10197  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10198  		return nil, err
 10199  	}
 10200  	return ret, nil
 10201  }
 10202  
 10203  type ProjectsLocationsOperationsDeleteCall struct {
 10204  	s          *Service
 10205  	name       string
 10206  	urlParams_ gensupport.URLParams
 10207  	ctx_       context.Context
 10208  	header_    http.Header
 10209  }
 10210  
 10211  // Delete: Deletes a long-running operation. This method indicates that the
 10212  // client is no longer interested in the operation result. It does not cancel
 10213  // the operation. If the server doesn't support this method, it returns
 10214  // `google.rpc.Code.UNIMPLEMENTED`.
 10215  //
 10216  // - name: The name of the operation resource to be deleted.
 10217  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
 10218  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10219  	c.name = name
 10220  	return c
 10221  }
 10222  
 10223  // Fields allows partial responses to be retrieved. See
 10224  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10225  // details.
 10226  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
 10227  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10228  	return c
 10229  }
 10230  
 10231  // Context sets the context to be used in this call's Do method.
 10232  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
 10233  	c.ctx_ = ctx
 10234  	return c
 10235  }
 10236  
 10237  // Header returns a http.Header that can be modified by the caller to add
 10238  // headers to the request.
 10239  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
 10240  	if c.header_ == nil {
 10241  		c.header_ = make(http.Header)
 10242  	}
 10243  	return c.header_
 10244  }
 10245  
 10246  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10247  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10248  	var body io.Reader = nil
 10249  	c.urlParams_.Set("alt", alt)
 10250  	c.urlParams_.Set("prettyPrint", "false")
 10251  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10252  	urls += "?" + c.urlParams_.Encode()
 10253  	req, err := http.NewRequest("DELETE", urls, body)
 10254  	if err != nil {
 10255  		return nil, err
 10256  	}
 10257  	req.Header = reqHeaders
 10258  	googleapi.Expand(req.URL, map[string]string{
 10259  		"name": c.name,
 10260  	})
 10261  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10262  }
 10263  
 10264  // Do executes the "networkservices.projects.locations.operations.delete" call.
 10265  // Any non-2xx status code is an error. Response headers are in either
 10266  // *Empty.ServerResponse.Header or (if a response was returned at all) in
 10267  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10268  // whether the returned error was because http.StatusNotModified was returned.
 10269  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
 10270  	gensupport.SetOptions(c.urlParams_, opts...)
 10271  	res, err := c.doRequest("json")
 10272  	if res != nil && res.StatusCode == http.StatusNotModified {
 10273  		if res.Body != nil {
 10274  			res.Body.Close()
 10275  		}
 10276  		return nil, gensupport.WrapError(&googleapi.Error{
 10277  			Code:   res.StatusCode,
 10278  			Header: res.Header,
 10279  		})
 10280  	}
 10281  	if err != nil {
 10282  		return nil, err
 10283  	}
 10284  	defer googleapi.CloseBody(res)
 10285  	if err := googleapi.CheckResponse(res); err != nil {
 10286  		return nil, gensupport.WrapError(err)
 10287  	}
 10288  	ret := &Empty{
 10289  		ServerResponse: googleapi.ServerResponse{
 10290  			Header:         res.Header,
 10291  			HTTPStatusCode: res.StatusCode,
 10292  		},
 10293  	}
 10294  	target := &ret
 10295  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10296  		return nil, err
 10297  	}
 10298  	return ret, nil
 10299  }
 10300  
 10301  type ProjectsLocationsOperationsGetCall struct {
 10302  	s            *Service
 10303  	name         string
 10304  	urlParams_   gensupport.URLParams
 10305  	ifNoneMatch_ string
 10306  	ctx_         context.Context
 10307  	header_      http.Header
 10308  }
 10309  
 10310  // Get: Gets the latest state of a long-running operation. Clients can use this
 10311  // method to poll the operation result at intervals as recommended by the API
 10312  // service.
 10313  //
 10314  // - name: The name of the operation resource.
 10315  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
 10316  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10317  	c.name = name
 10318  	return c
 10319  }
 10320  
 10321  // Fields allows partial responses to be retrieved. See
 10322  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10323  // details.
 10324  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
 10325  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10326  	return c
 10327  }
 10328  
 10329  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10330  // object's ETag matches the given value. This is useful for getting updates
 10331  // only after the object has changed since the last request.
 10332  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
 10333  	c.ifNoneMatch_ = entityTag
 10334  	return c
 10335  }
 10336  
 10337  // Context sets the context to be used in this call's Do method.
 10338  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
 10339  	c.ctx_ = ctx
 10340  	return c
 10341  }
 10342  
 10343  // Header returns a http.Header that can be modified by the caller to add
 10344  // headers to the request.
 10345  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
 10346  	if c.header_ == nil {
 10347  		c.header_ = make(http.Header)
 10348  	}
 10349  	return c.header_
 10350  }
 10351  
 10352  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
 10353  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10354  	if c.ifNoneMatch_ != "" {
 10355  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10356  	}
 10357  	var body io.Reader = nil
 10358  	c.urlParams_.Set("alt", alt)
 10359  	c.urlParams_.Set("prettyPrint", "false")
 10360  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10361  	urls += "?" + c.urlParams_.Encode()
 10362  	req, err := http.NewRequest("GET", urls, body)
 10363  	if err != nil {
 10364  		return nil, err
 10365  	}
 10366  	req.Header = reqHeaders
 10367  	googleapi.Expand(req.URL, map[string]string{
 10368  		"name": c.name,
 10369  	})
 10370  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10371  }
 10372  
 10373  // Do executes the "networkservices.projects.locations.operations.get" call.
 10374  // Any non-2xx status code is an error. Response headers are in either
 10375  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10376  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10377  // whether the returned error was because http.StatusNotModified was returned.
 10378  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10379  	gensupport.SetOptions(c.urlParams_, opts...)
 10380  	res, err := c.doRequest("json")
 10381  	if res != nil && res.StatusCode == http.StatusNotModified {
 10382  		if res.Body != nil {
 10383  			res.Body.Close()
 10384  		}
 10385  		return nil, gensupport.WrapError(&googleapi.Error{
 10386  			Code:   res.StatusCode,
 10387  			Header: res.Header,
 10388  		})
 10389  	}
 10390  	if err != nil {
 10391  		return nil, err
 10392  	}
 10393  	defer googleapi.CloseBody(res)
 10394  	if err := googleapi.CheckResponse(res); err != nil {
 10395  		return nil, gensupport.WrapError(err)
 10396  	}
 10397  	ret := &Operation{
 10398  		ServerResponse: googleapi.ServerResponse{
 10399  			Header:         res.Header,
 10400  			HTTPStatusCode: res.StatusCode,
 10401  		},
 10402  	}
 10403  	target := &ret
 10404  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10405  		return nil, err
 10406  	}
 10407  	return ret, nil
 10408  }
 10409  
 10410  type ProjectsLocationsOperationsListCall struct {
 10411  	s            *Service
 10412  	name         string
 10413  	urlParams_   gensupport.URLParams
 10414  	ifNoneMatch_ string
 10415  	ctx_         context.Context
 10416  	header_      http.Header
 10417  }
 10418  
 10419  // List: Lists operations that match the specified filter in the request. If
 10420  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
 10421  //
 10422  // - name: The name of the operation's parent resource.
 10423  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
 10424  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10425  	c.name = name
 10426  	return c
 10427  }
 10428  
 10429  // Filter sets the optional parameter "filter": The standard list filter.
 10430  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
 10431  	c.urlParams_.Set("filter", filter)
 10432  	return c
 10433  }
 10434  
 10435  // PageSize sets the optional parameter "pageSize": The standard list page
 10436  // size.
 10437  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
 10438  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10439  	return c
 10440  }
 10441  
 10442  // PageToken sets the optional parameter "pageToken": The standard list page
 10443  // token.
 10444  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
 10445  	c.urlParams_.Set("pageToken", pageToken)
 10446  	return c
 10447  }
 10448  
 10449  // Fields allows partial responses to be retrieved. See
 10450  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10451  // details.
 10452  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
 10453  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10454  	return c
 10455  }
 10456  
 10457  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10458  // object's ETag matches the given value. This is useful for getting updates
 10459  // only after the object has changed since the last request.
 10460  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
 10461  	c.ifNoneMatch_ = entityTag
 10462  	return c
 10463  }
 10464  
 10465  // Context sets the context to be used in this call's Do method.
 10466  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
 10467  	c.ctx_ = ctx
 10468  	return c
 10469  }
 10470  
 10471  // Header returns a http.Header that can be modified by the caller to add
 10472  // headers to the request.
 10473  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
 10474  	if c.header_ == nil {
 10475  		c.header_ = make(http.Header)
 10476  	}
 10477  	return c.header_
 10478  }
 10479  
 10480  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
 10481  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10482  	if c.ifNoneMatch_ != "" {
 10483  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10484  	}
 10485  	var body io.Reader = nil
 10486  	c.urlParams_.Set("alt", alt)
 10487  	c.urlParams_.Set("prettyPrint", "false")
 10488  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
 10489  	urls += "?" + c.urlParams_.Encode()
 10490  	req, err := http.NewRequest("GET", urls, body)
 10491  	if err != nil {
 10492  		return nil, err
 10493  	}
 10494  	req.Header = reqHeaders
 10495  	googleapi.Expand(req.URL, map[string]string{
 10496  		"name": c.name,
 10497  	})
 10498  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10499  }
 10500  
 10501  // Do executes the "networkservices.projects.locations.operations.list" call.
 10502  // Any non-2xx status code is an error. Response headers are in either
 10503  // *ListOperationsResponse.ServerResponse.Header or (if a response was returned
 10504  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 10505  // check whether the returned error was because http.StatusNotModified was
 10506  // returned.
 10507  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
 10508  	gensupport.SetOptions(c.urlParams_, opts...)
 10509  	res, err := c.doRequest("json")
 10510  	if res != nil && res.StatusCode == http.StatusNotModified {
 10511  		if res.Body != nil {
 10512  			res.Body.Close()
 10513  		}
 10514  		return nil, gensupport.WrapError(&googleapi.Error{
 10515  			Code:   res.StatusCode,
 10516  			Header: res.Header,
 10517  		})
 10518  	}
 10519  	if err != nil {
 10520  		return nil, err
 10521  	}
 10522  	defer googleapi.CloseBody(res)
 10523  	if err := googleapi.CheckResponse(res); err != nil {
 10524  		return nil, gensupport.WrapError(err)
 10525  	}
 10526  	ret := &ListOperationsResponse{
 10527  		ServerResponse: googleapi.ServerResponse{
 10528  			Header:         res.Header,
 10529  			HTTPStatusCode: res.StatusCode,
 10530  		},
 10531  	}
 10532  	target := &ret
 10533  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10534  		return nil, err
 10535  	}
 10536  	return ret, nil
 10537  }
 10538  
 10539  // Pages invokes f for each page of results.
 10540  // A non-nil error returned from f will halt the iteration.
 10541  // The provided context supersedes any context provided to the Context method.
 10542  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
 10543  	c.ctx_ = ctx
 10544  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10545  	for {
 10546  		x, err := c.Do()
 10547  		if err != nil {
 10548  			return err
 10549  		}
 10550  		if err := f(x); err != nil {
 10551  			return err
 10552  		}
 10553  		if x.NextPageToken == "" {
 10554  			return nil
 10555  		}
 10556  		c.PageToken(x.NextPageToken)
 10557  	}
 10558  }
 10559  
 10560  type ProjectsLocationsServiceBindingsCreateCall struct {
 10561  	s              *Service
 10562  	parent         string
 10563  	servicebinding *ServiceBinding
 10564  	urlParams_     gensupport.URLParams
 10565  	ctx_           context.Context
 10566  	header_        http.Header
 10567  }
 10568  
 10569  // Create: Creates a new ServiceBinding in a given project and location.
 10570  //
 10571  //   - parent: The parent resource of the ServiceBinding. Must be in the format
 10572  //     `projects/*/locations/global`.
 10573  func (r *ProjectsLocationsServiceBindingsService) Create(parent string, servicebinding *ServiceBinding) *ProjectsLocationsServiceBindingsCreateCall {
 10574  	c := &ProjectsLocationsServiceBindingsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10575  	c.parent = parent
 10576  	c.servicebinding = servicebinding
 10577  	return c
 10578  }
 10579  
 10580  // ServiceBindingId sets the optional parameter "serviceBindingId": Required.
 10581  // Short name of the ServiceBinding resource to be created.
 10582  func (c *ProjectsLocationsServiceBindingsCreateCall) ServiceBindingId(serviceBindingId string) *ProjectsLocationsServiceBindingsCreateCall {
 10583  	c.urlParams_.Set("serviceBindingId", serviceBindingId)
 10584  	return c
 10585  }
 10586  
 10587  // Fields allows partial responses to be retrieved. See
 10588  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10589  // details.
 10590  func (c *ProjectsLocationsServiceBindingsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsCreateCall {
 10591  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10592  	return c
 10593  }
 10594  
 10595  // Context sets the context to be used in this call's Do method.
 10596  func (c *ProjectsLocationsServiceBindingsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsCreateCall {
 10597  	c.ctx_ = ctx
 10598  	return c
 10599  }
 10600  
 10601  // Header returns a http.Header that can be modified by the caller to add
 10602  // headers to the request.
 10603  func (c *ProjectsLocationsServiceBindingsCreateCall) Header() http.Header {
 10604  	if c.header_ == nil {
 10605  		c.header_ = make(http.Header)
 10606  	}
 10607  	return c.header_
 10608  }
 10609  
 10610  func (c *ProjectsLocationsServiceBindingsCreateCall) doRequest(alt string) (*http.Response, error) {
 10611  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10612  	var body io.Reader = nil
 10613  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicebinding)
 10614  	if err != nil {
 10615  		return nil, err
 10616  	}
 10617  	c.urlParams_.Set("alt", alt)
 10618  	c.urlParams_.Set("prettyPrint", "false")
 10619  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings")
 10620  	urls += "?" + c.urlParams_.Encode()
 10621  	req, err := http.NewRequest("POST", urls, body)
 10622  	if err != nil {
 10623  		return nil, err
 10624  	}
 10625  	req.Header = reqHeaders
 10626  	googleapi.Expand(req.URL, map[string]string{
 10627  		"parent": c.parent,
 10628  	})
 10629  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10630  }
 10631  
 10632  // Do executes the "networkservices.projects.locations.serviceBindings.create" call.
 10633  // Any non-2xx status code is an error. Response headers are in either
 10634  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10635  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10636  // whether the returned error was because http.StatusNotModified was returned.
 10637  func (c *ProjectsLocationsServiceBindingsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10638  	gensupport.SetOptions(c.urlParams_, opts...)
 10639  	res, err := c.doRequest("json")
 10640  	if res != nil && res.StatusCode == http.StatusNotModified {
 10641  		if res.Body != nil {
 10642  			res.Body.Close()
 10643  		}
 10644  		return nil, gensupport.WrapError(&googleapi.Error{
 10645  			Code:   res.StatusCode,
 10646  			Header: res.Header,
 10647  		})
 10648  	}
 10649  	if err != nil {
 10650  		return nil, err
 10651  	}
 10652  	defer googleapi.CloseBody(res)
 10653  	if err := googleapi.CheckResponse(res); err != nil {
 10654  		return nil, gensupport.WrapError(err)
 10655  	}
 10656  	ret := &Operation{
 10657  		ServerResponse: googleapi.ServerResponse{
 10658  			Header:         res.Header,
 10659  			HTTPStatusCode: res.StatusCode,
 10660  		},
 10661  	}
 10662  	target := &ret
 10663  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10664  		return nil, err
 10665  	}
 10666  	return ret, nil
 10667  }
 10668  
 10669  type ProjectsLocationsServiceBindingsDeleteCall struct {
 10670  	s          *Service
 10671  	name       string
 10672  	urlParams_ gensupport.URLParams
 10673  	ctx_       context.Context
 10674  	header_    http.Header
 10675  }
 10676  
 10677  // Delete: Deletes a single ServiceBinding.
 10678  //
 10679  //   - name: A name of the ServiceBinding to delete. Must be in the format
 10680  //     `projects/*/locations/global/serviceBindings/*`.
 10681  func (r *ProjectsLocationsServiceBindingsService) Delete(name string) *ProjectsLocationsServiceBindingsDeleteCall {
 10682  	c := &ProjectsLocationsServiceBindingsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10683  	c.name = name
 10684  	return c
 10685  }
 10686  
 10687  // Fields allows partial responses to be retrieved. See
 10688  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10689  // details.
 10690  func (c *ProjectsLocationsServiceBindingsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsDeleteCall {
 10691  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10692  	return c
 10693  }
 10694  
 10695  // Context sets the context to be used in this call's Do method.
 10696  func (c *ProjectsLocationsServiceBindingsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsDeleteCall {
 10697  	c.ctx_ = ctx
 10698  	return c
 10699  }
 10700  
 10701  // Header returns a http.Header that can be modified by the caller to add
 10702  // headers to the request.
 10703  func (c *ProjectsLocationsServiceBindingsDeleteCall) Header() http.Header {
 10704  	if c.header_ == nil {
 10705  		c.header_ = make(http.Header)
 10706  	}
 10707  	return c.header_
 10708  }
 10709  
 10710  func (c *ProjectsLocationsServiceBindingsDeleteCall) doRequest(alt string) (*http.Response, error) {
 10711  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10712  	var body io.Reader = nil
 10713  	c.urlParams_.Set("alt", alt)
 10714  	c.urlParams_.Set("prettyPrint", "false")
 10715  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10716  	urls += "?" + c.urlParams_.Encode()
 10717  	req, err := http.NewRequest("DELETE", urls, body)
 10718  	if err != nil {
 10719  		return nil, err
 10720  	}
 10721  	req.Header = reqHeaders
 10722  	googleapi.Expand(req.URL, map[string]string{
 10723  		"name": c.name,
 10724  	})
 10725  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10726  }
 10727  
 10728  // Do executes the "networkservices.projects.locations.serviceBindings.delete" call.
 10729  // Any non-2xx status code is an error. Response headers are in either
 10730  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 10731  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10732  // whether the returned error was because http.StatusNotModified was returned.
 10733  func (c *ProjectsLocationsServiceBindingsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 10734  	gensupport.SetOptions(c.urlParams_, opts...)
 10735  	res, err := c.doRequest("json")
 10736  	if res != nil && res.StatusCode == http.StatusNotModified {
 10737  		if res.Body != nil {
 10738  			res.Body.Close()
 10739  		}
 10740  		return nil, gensupport.WrapError(&googleapi.Error{
 10741  			Code:   res.StatusCode,
 10742  			Header: res.Header,
 10743  		})
 10744  	}
 10745  	if err != nil {
 10746  		return nil, err
 10747  	}
 10748  	defer googleapi.CloseBody(res)
 10749  	if err := googleapi.CheckResponse(res); err != nil {
 10750  		return nil, gensupport.WrapError(err)
 10751  	}
 10752  	ret := &Operation{
 10753  		ServerResponse: googleapi.ServerResponse{
 10754  			Header:         res.Header,
 10755  			HTTPStatusCode: res.StatusCode,
 10756  		},
 10757  	}
 10758  	target := &ret
 10759  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10760  		return nil, err
 10761  	}
 10762  	return ret, nil
 10763  }
 10764  
 10765  type ProjectsLocationsServiceBindingsGetCall struct {
 10766  	s            *Service
 10767  	name         string
 10768  	urlParams_   gensupport.URLParams
 10769  	ifNoneMatch_ string
 10770  	ctx_         context.Context
 10771  	header_      http.Header
 10772  }
 10773  
 10774  // Get: Gets details of a single ServiceBinding.
 10775  //
 10776  //   - name: A name of the ServiceBinding to get. Must be in the format
 10777  //     `projects/*/locations/global/serviceBindings/*`.
 10778  func (r *ProjectsLocationsServiceBindingsService) Get(name string) *ProjectsLocationsServiceBindingsGetCall {
 10779  	c := &ProjectsLocationsServiceBindingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10780  	c.name = name
 10781  	return c
 10782  }
 10783  
 10784  // Fields allows partial responses to be retrieved. See
 10785  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10786  // details.
 10787  func (c *ProjectsLocationsServiceBindingsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetCall {
 10788  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10789  	return c
 10790  }
 10791  
 10792  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10793  // object's ETag matches the given value. This is useful for getting updates
 10794  // only after the object has changed since the last request.
 10795  func (c *ProjectsLocationsServiceBindingsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetCall {
 10796  	c.ifNoneMatch_ = entityTag
 10797  	return c
 10798  }
 10799  
 10800  // Context sets the context to be used in this call's Do method.
 10801  func (c *ProjectsLocationsServiceBindingsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetCall {
 10802  	c.ctx_ = ctx
 10803  	return c
 10804  }
 10805  
 10806  // Header returns a http.Header that can be modified by the caller to add
 10807  // headers to the request.
 10808  func (c *ProjectsLocationsServiceBindingsGetCall) Header() http.Header {
 10809  	if c.header_ == nil {
 10810  		c.header_ = make(http.Header)
 10811  	}
 10812  	return c.header_
 10813  }
 10814  
 10815  func (c *ProjectsLocationsServiceBindingsGetCall) doRequest(alt string) (*http.Response, error) {
 10816  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10817  	if c.ifNoneMatch_ != "" {
 10818  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10819  	}
 10820  	var body io.Reader = nil
 10821  	c.urlParams_.Set("alt", alt)
 10822  	c.urlParams_.Set("prettyPrint", "false")
 10823  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10824  	urls += "?" + c.urlParams_.Encode()
 10825  	req, err := http.NewRequest("GET", urls, body)
 10826  	if err != nil {
 10827  		return nil, err
 10828  	}
 10829  	req.Header = reqHeaders
 10830  	googleapi.Expand(req.URL, map[string]string{
 10831  		"name": c.name,
 10832  	})
 10833  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10834  }
 10835  
 10836  // Do executes the "networkservices.projects.locations.serviceBindings.get" call.
 10837  // Any non-2xx status code is an error. Response headers are in either
 10838  // *ServiceBinding.ServerResponse.Header or (if a response was returned at all)
 10839  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10840  // whether the returned error was because http.StatusNotModified was returned.
 10841  func (c *ProjectsLocationsServiceBindingsGetCall) Do(opts ...googleapi.CallOption) (*ServiceBinding, error) {
 10842  	gensupport.SetOptions(c.urlParams_, opts...)
 10843  	res, err := c.doRequest("json")
 10844  	if res != nil && res.StatusCode == http.StatusNotModified {
 10845  		if res.Body != nil {
 10846  			res.Body.Close()
 10847  		}
 10848  		return nil, gensupport.WrapError(&googleapi.Error{
 10849  			Code:   res.StatusCode,
 10850  			Header: res.Header,
 10851  		})
 10852  	}
 10853  	if err != nil {
 10854  		return nil, err
 10855  	}
 10856  	defer googleapi.CloseBody(res)
 10857  	if err := googleapi.CheckResponse(res); err != nil {
 10858  		return nil, gensupport.WrapError(err)
 10859  	}
 10860  	ret := &ServiceBinding{
 10861  		ServerResponse: googleapi.ServerResponse{
 10862  			Header:         res.Header,
 10863  			HTTPStatusCode: res.StatusCode,
 10864  		},
 10865  	}
 10866  	target := &ret
 10867  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10868  		return nil, err
 10869  	}
 10870  	return ret, nil
 10871  }
 10872  
 10873  type ProjectsLocationsServiceBindingsGetIamPolicyCall struct {
 10874  	s            *Service
 10875  	resource     string
 10876  	urlParams_   gensupport.URLParams
 10877  	ifNoneMatch_ string
 10878  	ctx_         context.Context
 10879  	header_      http.Header
 10880  }
 10881  
 10882  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 10883  // empty policy if the resource exists and does not have a policy set.
 10884  //
 10885  //   - resource: REQUIRED: The resource for which the policy is being requested.
 10886  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 10887  //     for the appropriate value for this field.
 10888  func (r *ProjectsLocationsServiceBindingsService) GetIamPolicy(resource string) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
 10889  	c := &ProjectsLocationsServiceBindingsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10890  	c.resource = resource
 10891  	return c
 10892  }
 10893  
 10894  // OptionsRequestedPolicyVersion sets the optional parameter
 10895  // "options.requestedPolicyVersion": The maximum policy version that will be
 10896  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 10897  // an invalid value will be rejected. Requests for policies with any
 10898  // conditional role bindings must specify version 3. Policies with no
 10899  // conditional role bindings may specify any valid value or leave the field
 10900  // unset. The policy in the response might use the policy version that you
 10901  // specified, or it might use a lower policy version. For example, if you
 10902  // specify version 3, but the policy has no conditional role bindings, the
 10903  // response uses version 1. To learn which resources support conditions in
 10904  // their IAM policies, see the IAM documentation
 10905  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 10906  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
 10907  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 10908  	return c
 10909  }
 10910  
 10911  // Fields allows partial responses to be retrieved. See
 10912  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10913  // details.
 10914  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
 10915  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10916  	return c
 10917  }
 10918  
 10919  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10920  // object's ETag matches the given value. This is useful for getting updates
 10921  // only after the object has changed since the last request.
 10922  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
 10923  	c.ifNoneMatch_ = entityTag
 10924  	return c
 10925  }
 10926  
 10927  // Context sets the context to be used in this call's Do method.
 10928  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsGetIamPolicyCall {
 10929  	c.ctx_ = ctx
 10930  	return c
 10931  }
 10932  
 10933  // Header returns a http.Header that can be modified by the caller to add
 10934  // headers to the request.
 10935  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Header() http.Header {
 10936  	if c.header_ == nil {
 10937  		c.header_ = make(http.Header)
 10938  	}
 10939  	return c.header_
 10940  }
 10941  
 10942  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 10943  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10944  	if c.ifNoneMatch_ != "" {
 10945  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10946  	}
 10947  	var body io.Reader = nil
 10948  	c.urlParams_.Set("alt", alt)
 10949  	c.urlParams_.Set("prettyPrint", "false")
 10950  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 10951  	urls += "?" + c.urlParams_.Encode()
 10952  	req, err := http.NewRequest("GET", urls, body)
 10953  	if err != nil {
 10954  		return nil, err
 10955  	}
 10956  	req.Header = reqHeaders
 10957  	googleapi.Expand(req.URL, map[string]string{
 10958  		"resource": c.resource,
 10959  	})
 10960  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10961  }
 10962  
 10963  // Do executes the "networkservices.projects.locations.serviceBindings.getIamPolicy" call.
 10964  // Any non-2xx status code is an error. Response headers are in either
 10965  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 10966  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10967  // whether the returned error was because http.StatusNotModified was returned.
 10968  func (c *ProjectsLocationsServiceBindingsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 10969  	gensupport.SetOptions(c.urlParams_, opts...)
 10970  	res, err := c.doRequest("json")
 10971  	if res != nil && res.StatusCode == http.StatusNotModified {
 10972  		if res.Body != nil {
 10973  			res.Body.Close()
 10974  		}
 10975  		return nil, gensupport.WrapError(&googleapi.Error{
 10976  			Code:   res.StatusCode,
 10977  			Header: res.Header,
 10978  		})
 10979  	}
 10980  	if err != nil {
 10981  		return nil, err
 10982  	}
 10983  	defer googleapi.CloseBody(res)
 10984  	if err := googleapi.CheckResponse(res); err != nil {
 10985  		return nil, gensupport.WrapError(err)
 10986  	}
 10987  	ret := &Policy{
 10988  		ServerResponse: googleapi.ServerResponse{
 10989  			Header:         res.Header,
 10990  			HTTPStatusCode: res.StatusCode,
 10991  		},
 10992  	}
 10993  	target := &ret
 10994  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10995  		return nil, err
 10996  	}
 10997  	return ret, nil
 10998  }
 10999  
 11000  type ProjectsLocationsServiceBindingsListCall struct {
 11001  	s            *Service
 11002  	parent       string
 11003  	urlParams_   gensupport.URLParams
 11004  	ifNoneMatch_ string
 11005  	ctx_         context.Context
 11006  	header_      http.Header
 11007  }
 11008  
 11009  // List: Lists ServiceBinding in a given project and location.
 11010  //
 11011  //   - parent: The project and location from which the ServiceBindings should be
 11012  //     listed, specified in the format `projects/*/locations/global`.
 11013  func (r *ProjectsLocationsServiceBindingsService) List(parent string) *ProjectsLocationsServiceBindingsListCall {
 11014  	c := &ProjectsLocationsServiceBindingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11015  	c.parent = parent
 11016  	return c
 11017  }
 11018  
 11019  // PageSize sets the optional parameter "pageSize": Maximum number of
 11020  // ServiceBindings to return per call.
 11021  func (c *ProjectsLocationsServiceBindingsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceBindingsListCall {
 11022  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11023  	return c
 11024  }
 11025  
 11026  // PageToken sets the optional parameter "pageToken": The value returned by the
 11027  // last `ListServiceBindingsResponse` Indicates that this is a continuation of
 11028  // a prior `ListRouters` call, and that the system should return the next page
 11029  // of data.
 11030  func (c *ProjectsLocationsServiceBindingsListCall) PageToken(pageToken string) *ProjectsLocationsServiceBindingsListCall {
 11031  	c.urlParams_.Set("pageToken", pageToken)
 11032  	return c
 11033  }
 11034  
 11035  // Fields allows partial responses to be retrieved. See
 11036  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11037  // details.
 11038  func (c *ProjectsLocationsServiceBindingsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsListCall {
 11039  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11040  	return c
 11041  }
 11042  
 11043  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11044  // object's ETag matches the given value. This is useful for getting updates
 11045  // only after the object has changed since the last request.
 11046  func (c *ProjectsLocationsServiceBindingsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceBindingsListCall {
 11047  	c.ifNoneMatch_ = entityTag
 11048  	return c
 11049  }
 11050  
 11051  // Context sets the context to be used in this call's Do method.
 11052  func (c *ProjectsLocationsServiceBindingsListCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsListCall {
 11053  	c.ctx_ = ctx
 11054  	return c
 11055  }
 11056  
 11057  // Header returns a http.Header that can be modified by the caller to add
 11058  // headers to the request.
 11059  func (c *ProjectsLocationsServiceBindingsListCall) Header() http.Header {
 11060  	if c.header_ == nil {
 11061  		c.header_ = make(http.Header)
 11062  	}
 11063  	return c.header_
 11064  }
 11065  
 11066  func (c *ProjectsLocationsServiceBindingsListCall) doRequest(alt string) (*http.Response, error) {
 11067  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11068  	if c.ifNoneMatch_ != "" {
 11069  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11070  	}
 11071  	var body io.Reader = nil
 11072  	c.urlParams_.Set("alt", alt)
 11073  	c.urlParams_.Set("prettyPrint", "false")
 11074  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceBindings")
 11075  	urls += "?" + c.urlParams_.Encode()
 11076  	req, err := http.NewRequest("GET", urls, body)
 11077  	if err != nil {
 11078  		return nil, err
 11079  	}
 11080  	req.Header = reqHeaders
 11081  	googleapi.Expand(req.URL, map[string]string{
 11082  		"parent": c.parent,
 11083  	})
 11084  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11085  }
 11086  
 11087  // Do executes the "networkservices.projects.locations.serviceBindings.list" call.
 11088  // Any non-2xx status code is an error. Response headers are in either
 11089  // *ListServiceBindingsResponse.ServerResponse.Header or (if a response was
 11090  // returned at all) in error.(*googleapi.Error).Header. Use
 11091  // googleapi.IsNotModified to check whether the returned error was because
 11092  // http.StatusNotModified was returned.
 11093  func (c *ProjectsLocationsServiceBindingsListCall) Do(opts ...googleapi.CallOption) (*ListServiceBindingsResponse, error) {
 11094  	gensupport.SetOptions(c.urlParams_, opts...)
 11095  	res, err := c.doRequest("json")
 11096  	if res != nil && res.StatusCode == http.StatusNotModified {
 11097  		if res.Body != nil {
 11098  			res.Body.Close()
 11099  		}
 11100  		return nil, gensupport.WrapError(&googleapi.Error{
 11101  			Code:   res.StatusCode,
 11102  			Header: res.Header,
 11103  		})
 11104  	}
 11105  	if err != nil {
 11106  		return nil, err
 11107  	}
 11108  	defer googleapi.CloseBody(res)
 11109  	if err := googleapi.CheckResponse(res); err != nil {
 11110  		return nil, gensupport.WrapError(err)
 11111  	}
 11112  	ret := &ListServiceBindingsResponse{
 11113  		ServerResponse: googleapi.ServerResponse{
 11114  			Header:         res.Header,
 11115  			HTTPStatusCode: res.StatusCode,
 11116  		},
 11117  	}
 11118  	target := &ret
 11119  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11120  		return nil, err
 11121  	}
 11122  	return ret, nil
 11123  }
 11124  
 11125  // Pages invokes f for each page of results.
 11126  // A non-nil error returned from f will halt the iteration.
 11127  // The provided context supersedes any context provided to the Context method.
 11128  func (c *ProjectsLocationsServiceBindingsListCall) Pages(ctx context.Context, f func(*ListServiceBindingsResponse) error) error {
 11129  	c.ctx_ = ctx
 11130  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11131  	for {
 11132  		x, err := c.Do()
 11133  		if err != nil {
 11134  			return err
 11135  		}
 11136  		if err := f(x); err != nil {
 11137  			return err
 11138  		}
 11139  		if x.NextPageToken == "" {
 11140  			return nil
 11141  		}
 11142  		c.PageToken(x.NextPageToken)
 11143  	}
 11144  }
 11145  
 11146  type ProjectsLocationsServiceBindingsSetIamPolicyCall struct {
 11147  	s                   *Service
 11148  	resource            string
 11149  	setiampolicyrequest *SetIamPolicyRequest
 11150  	urlParams_          gensupport.URLParams
 11151  	ctx_                context.Context
 11152  	header_             http.Header
 11153  }
 11154  
 11155  // SetIamPolicy: Sets the access control policy on the specified resource.
 11156  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 11157  // and `PERMISSION_DENIED` errors.
 11158  //
 11159  //   - resource: REQUIRED: The resource for which the policy is being specified.
 11160  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 11161  //     for the appropriate value for this field.
 11162  func (r *ProjectsLocationsServiceBindingsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
 11163  	c := &ProjectsLocationsServiceBindingsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11164  	c.resource = resource
 11165  	c.setiampolicyrequest = setiampolicyrequest
 11166  	return c
 11167  }
 11168  
 11169  // Fields allows partial responses to be retrieved. See
 11170  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11171  // details.
 11172  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
 11173  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11174  	return c
 11175  }
 11176  
 11177  // Context sets the context to be used in this call's Do method.
 11178  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsSetIamPolicyCall {
 11179  	c.ctx_ = ctx
 11180  	return c
 11181  }
 11182  
 11183  // Header returns a http.Header that can be modified by the caller to add
 11184  // headers to the request.
 11185  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Header() http.Header {
 11186  	if c.header_ == nil {
 11187  		c.header_ = make(http.Header)
 11188  	}
 11189  	return c.header_
 11190  }
 11191  
 11192  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11193  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11194  	var body io.Reader = nil
 11195  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 11196  	if err != nil {
 11197  		return nil, err
 11198  	}
 11199  	c.urlParams_.Set("alt", alt)
 11200  	c.urlParams_.Set("prettyPrint", "false")
 11201  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 11202  	urls += "?" + c.urlParams_.Encode()
 11203  	req, err := http.NewRequest("POST", urls, body)
 11204  	if err != nil {
 11205  		return nil, err
 11206  	}
 11207  	req.Header = reqHeaders
 11208  	googleapi.Expand(req.URL, map[string]string{
 11209  		"resource": c.resource,
 11210  	})
 11211  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11212  }
 11213  
 11214  // Do executes the "networkservices.projects.locations.serviceBindings.setIamPolicy" call.
 11215  // Any non-2xx status code is an error. Response headers are in either
 11216  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11217  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11218  // whether the returned error was because http.StatusNotModified was returned.
 11219  func (c *ProjectsLocationsServiceBindingsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11220  	gensupport.SetOptions(c.urlParams_, opts...)
 11221  	res, err := c.doRequest("json")
 11222  	if res != nil && res.StatusCode == http.StatusNotModified {
 11223  		if res.Body != nil {
 11224  			res.Body.Close()
 11225  		}
 11226  		return nil, gensupport.WrapError(&googleapi.Error{
 11227  			Code:   res.StatusCode,
 11228  			Header: res.Header,
 11229  		})
 11230  	}
 11231  	if err != nil {
 11232  		return nil, err
 11233  	}
 11234  	defer googleapi.CloseBody(res)
 11235  	if err := googleapi.CheckResponse(res); err != nil {
 11236  		return nil, gensupport.WrapError(err)
 11237  	}
 11238  	ret := &Policy{
 11239  		ServerResponse: googleapi.ServerResponse{
 11240  			Header:         res.Header,
 11241  			HTTPStatusCode: res.StatusCode,
 11242  		},
 11243  	}
 11244  	target := &ret
 11245  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11246  		return nil, err
 11247  	}
 11248  	return ret, nil
 11249  }
 11250  
 11251  type ProjectsLocationsServiceBindingsTestIamPermissionsCall struct {
 11252  	s                         *Service
 11253  	resource                  string
 11254  	testiampermissionsrequest *TestIamPermissionsRequest
 11255  	urlParams_                gensupport.URLParams
 11256  	ctx_                      context.Context
 11257  	header_                   http.Header
 11258  }
 11259  
 11260  // TestIamPermissions: Returns permissions that a caller has on the specified
 11261  // resource. If the resource does not exist, this will return an empty set of
 11262  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 11263  // used for building permission-aware UIs and command-line tools, not for
 11264  // authorization checking. This operation may "fail open" without warning.
 11265  //
 11266  //   - resource: REQUIRED: The resource for which the policy detail is being
 11267  //     requested. See Resource names
 11268  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 11269  //     value for this field.
 11270  func (r *ProjectsLocationsServiceBindingsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
 11271  	c := &ProjectsLocationsServiceBindingsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11272  	c.resource = resource
 11273  	c.testiampermissionsrequest = testiampermissionsrequest
 11274  	return c
 11275  }
 11276  
 11277  // Fields allows partial responses to be retrieved. See
 11278  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11279  // details.
 11280  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
 11281  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11282  	return c
 11283  }
 11284  
 11285  // Context sets the context to be used in this call's Do method.
 11286  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceBindingsTestIamPermissionsCall {
 11287  	c.ctx_ = ctx
 11288  	return c
 11289  }
 11290  
 11291  // Header returns a http.Header that can be modified by the caller to add
 11292  // headers to the request.
 11293  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Header() http.Header {
 11294  	if c.header_ == nil {
 11295  		c.header_ = make(http.Header)
 11296  	}
 11297  	return c.header_
 11298  }
 11299  
 11300  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 11301  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11302  	var body io.Reader = nil
 11303  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 11304  	if err != nil {
 11305  		return nil, err
 11306  	}
 11307  	c.urlParams_.Set("alt", alt)
 11308  	c.urlParams_.Set("prettyPrint", "false")
 11309  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 11310  	urls += "?" + c.urlParams_.Encode()
 11311  	req, err := http.NewRequest("POST", urls, body)
 11312  	if err != nil {
 11313  		return nil, err
 11314  	}
 11315  	req.Header = reqHeaders
 11316  	googleapi.Expand(req.URL, map[string]string{
 11317  		"resource": c.resource,
 11318  	})
 11319  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11320  }
 11321  
 11322  // Do executes the "networkservices.projects.locations.serviceBindings.testIamPermissions" call.
 11323  // Any non-2xx status code is an error. Response headers are in either
 11324  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 11325  // returned at all) in error.(*googleapi.Error).Header. Use
 11326  // googleapi.IsNotModified to check whether the returned error was because
 11327  // http.StatusNotModified was returned.
 11328  func (c *ProjectsLocationsServiceBindingsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 11329  	gensupport.SetOptions(c.urlParams_, opts...)
 11330  	res, err := c.doRequest("json")
 11331  	if res != nil && res.StatusCode == http.StatusNotModified {
 11332  		if res.Body != nil {
 11333  			res.Body.Close()
 11334  		}
 11335  		return nil, gensupport.WrapError(&googleapi.Error{
 11336  			Code:   res.StatusCode,
 11337  			Header: res.Header,
 11338  		})
 11339  	}
 11340  	if err != nil {
 11341  		return nil, err
 11342  	}
 11343  	defer googleapi.CloseBody(res)
 11344  	if err := googleapi.CheckResponse(res); err != nil {
 11345  		return nil, gensupport.WrapError(err)
 11346  	}
 11347  	ret := &TestIamPermissionsResponse{
 11348  		ServerResponse: googleapi.ServerResponse{
 11349  			Header:         res.Header,
 11350  			HTTPStatusCode: res.StatusCode,
 11351  		},
 11352  	}
 11353  	target := &ret
 11354  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11355  		return nil, err
 11356  	}
 11357  	return ret, nil
 11358  }
 11359  
 11360  type ProjectsLocationsServiceLbPoliciesCreateCall struct {
 11361  	s               *Service
 11362  	parent          string
 11363  	servicelbpolicy *ServiceLbPolicy
 11364  	urlParams_      gensupport.URLParams
 11365  	ctx_            context.Context
 11366  	header_         http.Header
 11367  }
 11368  
 11369  // Create: Creates a new ServiceLbPolicy in a given project and location.
 11370  //
 11371  //   - parent: The parent resource of the ServiceLbPolicy. Must be in the format
 11372  //     `projects/{project}/locations/{location}`.
 11373  func (r *ProjectsLocationsServiceLbPoliciesService) Create(parent string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesCreateCall {
 11374  	c := &ProjectsLocationsServiceLbPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11375  	c.parent = parent
 11376  	c.servicelbpolicy = servicelbpolicy
 11377  	return c
 11378  }
 11379  
 11380  // ServiceLbPolicyId sets the optional parameter "serviceLbPolicyId": Required.
 11381  // Short name of the ServiceLbPolicy resource to be created. E.g. for resource
 11382  // name
 11383  // `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy
 11384  // _name}`. the id is value of {service_lb_policy_name}
 11385  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) ServiceLbPolicyId(serviceLbPolicyId string) *ProjectsLocationsServiceLbPoliciesCreateCall {
 11386  	c.urlParams_.Set("serviceLbPolicyId", serviceLbPolicyId)
 11387  	return c
 11388  }
 11389  
 11390  // Fields allows partial responses to be retrieved. See
 11391  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11392  // details.
 11393  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesCreateCall {
 11394  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11395  	return c
 11396  }
 11397  
 11398  // Context sets the context to be used in this call's Do method.
 11399  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesCreateCall {
 11400  	c.ctx_ = ctx
 11401  	return c
 11402  }
 11403  
 11404  // Header returns a http.Header that can be modified by the caller to add
 11405  // headers to the request.
 11406  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Header() http.Header {
 11407  	if c.header_ == nil {
 11408  		c.header_ = make(http.Header)
 11409  	}
 11410  	return c.header_
 11411  }
 11412  
 11413  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
 11414  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11415  	var body io.Reader = nil
 11416  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy)
 11417  	if err != nil {
 11418  		return nil, err
 11419  	}
 11420  	c.urlParams_.Set("alt", alt)
 11421  	c.urlParams_.Set("prettyPrint", "false")
 11422  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies")
 11423  	urls += "?" + c.urlParams_.Encode()
 11424  	req, err := http.NewRequest("POST", urls, body)
 11425  	if err != nil {
 11426  		return nil, err
 11427  	}
 11428  	req.Header = reqHeaders
 11429  	googleapi.Expand(req.URL, map[string]string{
 11430  		"parent": c.parent,
 11431  	})
 11432  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11433  }
 11434  
 11435  // Do executes the "networkservices.projects.locations.serviceLbPolicies.create" call.
 11436  // Any non-2xx status code is an error. Response headers are in either
 11437  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11438  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11439  // whether the returned error was because http.StatusNotModified was returned.
 11440  func (c *ProjectsLocationsServiceLbPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11441  	gensupport.SetOptions(c.urlParams_, opts...)
 11442  	res, err := c.doRequest("json")
 11443  	if res != nil && res.StatusCode == http.StatusNotModified {
 11444  		if res.Body != nil {
 11445  			res.Body.Close()
 11446  		}
 11447  		return nil, gensupport.WrapError(&googleapi.Error{
 11448  			Code:   res.StatusCode,
 11449  			Header: res.Header,
 11450  		})
 11451  	}
 11452  	if err != nil {
 11453  		return nil, err
 11454  	}
 11455  	defer googleapi.CloseBody(res)
 11456  	if err := googleapi.CheckResponse(res); err != nil {
 11457  		return nil, gensupport.WrapError(err)
 11458  	}
 11459  	ret := &Operation{
 11460  		ServerResponse: googleapi.ServerResponse{
 11461  			Header:         res.Header,
 11462  			HTTPStatusCode: res.StatusCode,
 11463  		},
 11464  	}
 11465  	target := &ret
 11466  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11467  		return nil, err
 11468  	}
 11469  	return ret, nil
 11470  }
 11471  
 11472  type ProjectsLocationsServiceLbPoliciesDeleteCall struct {
 11473  	s          *Service
 11474  	name       string
 11475  	urlParams_ gensupport.URLParams
 11476  	ctx_       context.Context
 11477  	header_    http.Header
 11478  }
 11479  
 11480  // Delete: Deletes a single ServiceLbPolicy.
 11481  //
 11482  //   - name: A name of the ServiceLbPolicy to delete. Must be in the format
 11483  //     `projects/{project}/locations/{location}/serviceLbPolicies/*`.
 11484  func (r *ProjectsLocationsServiceLbPoliciesService) Delete(name string) *ProjectsLocationsServiceLbPoliciesDeleteCall {
 11485  	c := &ProjectsLocationsServiceLbPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11486  	c.name = name
 11487  	return c
 11488  }
 11489  
 11490  // Fields allows partial responses to be retrieved. See
 11491  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11492  // details.
 11493  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesDeleteCall {
 11494  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11495  	return c
 11496  }
 11497  
 11498  // Context sets the context to be used in this call's Do method.
 11499  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesDeleteCall {
 11500  	c.ctx_ = ctx
 11501  	return c
 11502  }
 11503  
 11504  // Header returns a http.Header that can be modified by the caller to add
 11505  // headers to the request.
 11506  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Header() http.Header {
 11507  	if c.header_ == nil {
 11508  		c.header_ = make(http.Header)
 11509  	}
 11510  	return c.header_
 11511  }
 11512  
 11513  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
 11514  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11515  	var body io.Reader = nil
 11516  	c.urlParams_.Set("alt", alt)
 11517  	c.urlParams_.Set("prettyPrint", "false")
 11518  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11519  	urls += "?" + c.urlParams_.Encode()
 11520  	req, err := http.NewRequest("DELETE", urls, body)
 11521  	if err != nil {
 11522  		return nil, err
 11523  	}
 11524  	req.Header = reqHeaders
 11525  	googleapi.Expand(req.URL, map[string]string{
 11526  		"name": c.name,
 11527  	})
 11528  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11529  }
 11530  
 11531  // Do executes the "networkservices.projects.locations.serviceLbPolicies.delete" call.
 11532  // Any non-2xx status code is an error. Response headers are in either
 11533  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 11534  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11535  // whether the returned error was because http.StatusNotModified was returned.
 11536  func (c *ProjectsLocationsServiceLbPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 11537  	gensupport.SetOptions(c.urlParams_, opts...)
 11538  	res, err := c.doRequest("json")
 11539  	if res != nil && res.StatusCode == http.StatusNotModified {
 11540  		if res.Body != nil {
 11541  			res.Body.Close()
 11542  		}
 11543  		return nil, gensupport.WrapError(&googleapi.Error{
 11544  			Code:   res.StatusCode,
 11545  			Header: res.Header,
 11546  		})
 11547  	}
 11548  	if err != nil {
 11549  		return nil, err
 11550  	}
 11551  	defer googleapi.CloseBody(res)
 11552  	if err := googleapi.CheckResponse(res); err != nil {
 11553  		return nil, gensupport.WrapError(err)
 11554  	}
 11555  	ret := &Operation{
 11556  		ServerResponse: googleapi.ServerResponse{
 11557  			Header:         res.Header,
 11558  			HTTPStatusCode: res.StatusCode,
 11559  		},
 11560  	}
 11561  	target := &ret
 11562  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11563  		return nil, err
 11564  	}
 11565  	return ret, nil
 11566  }
 11567  
 11568  type ProjectsLocationsServiceLbPoliciesGetCall struct {
 11569  	s            *Service
 11570  	name         string
 11571  	urlParams_   gensupport.URLParams
 11572  	ifNoneMatch_ string
 11573  	ctx_         context.Context
 11574  	header_      http.Header
 11575  }
 11576  
 11577  // Get: Gets details of a single ServiceLbPolicy.
 11578  //
 11579  //   - name: A name of the ServiceLbPolicy to get. Must be in the format
 11580  //     `projects/{project}/locations/{location}/serviceLbPolicies/*`.
 11581  func (r *ProjectsLocationsServiceLbPoliciesService) Get(name string) *ProjectsLocationsServiceLbPoliciesGetCall {
 11582  	c := &ProjectsLocationsServiceLbPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11583  	c.name = name
 11584  	return c
 11585  }
 11586  
 11587  // Fields allows partial responses to be retrieved. See
 11588  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11589  // details.
 11590  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetCall {
 11591  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11592  	return c
 11593  }
 11594  
 11595  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11596  // object's ETag matches the given value. This is useful for getting updates
 11597  // only after the object has changed since the last request.
 11598  func (c *ProjectsLocationsServiceLbPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetCall {
 11599  	c.ifNoneMatch_ = entityTag
 11600  	return c
 11601  }
 11602  
 11603  // Context sets the context to be used in this call's Do method.
 11604  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetCall {
 11605  	c.ctx_ = ctx
 11606  	return c
 11607  }
 11608  
 11609  // Header returns a http.Header that can be modified by the caller to add
 11610  // headers to the request.
 11611  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Header() http.Header {
 11612  	if c.header_ == nil {
 11613  		c.header_ = make(http.Header)
 11614  	}
 11615  	return c.header_
 11616  }
 11617  
 11618  func (c *ProjectsLocationsServiceLbPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
 11619  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11620  	if c.ifNoneMatch_ != "" {
 11621  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11622  	}
 11623  	var body io.Reader = nil
 11624  	c.urlParams_.Set("alt", alt)
 11625  	c.urlParams_.Set("prettyPrint", "false")
 11626  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11627  	urls += "?" + c.urlParams_.Encode()
 11628  	req, err := http.NewRequest("GET", urls, body)
 11629  	if err != nil {
 11630  		return nil, err
 11631  	}
 11632  	req.Header = reqHeaders
 11633  	googleapi.Expand(req.URL, map[string]string{
 11634  		"name": c.name,
 11635  	})
 11636  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11637  }
 11638  
 11639  // Do executes the "networkservices.projects.locations.serviceLbPolicies.get" call.
 11640  // Any non-2xx status code is an error. Response headers are in either
 11641  // *ServiceLbPolicy.ServerResponse.Header or (if a response was returned at
 11642  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11643  // check whether the returned error was because http.StatusNotModified was
 11644  // returned.
 11645  func (c *ProjectsLocationsServiceLbPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceLbPolicy, error) {
 11646  	gensupport.SetOptions(c.urlParams_, opts...)
 11647  	res, err := c.doRequest("json")
 11648  	if res != nil && res.StatusCode == http.StatusNotModified {
 11649  		if res.Body != nil {
 11650  			res.Body.Close()
 11651  		}
 11652  		return nil, gensupport.WrapError(&googleapi.Error{
 11653  			Code:   res.StatusCode,
 11654  			Header: res.Header,
 11655  		})
 11656  	}
 11657  	if err != nil {
 11658  		return nil, err
 11659  	}
 11660  	defer googleapi.CloseBody(res)
 11661  	if err := googleapi.CheckResponse(res); err != nil {
 11662  		return nil, gensupport.WrapError(err)
 11663  	}
 11664  	ret := &ServiceLbPolicy{
 11665  		ServerResponse: googleapi.ServerResponse{
 11666  			Header:         res.Header,
 11667  			HTTPStatusCode: res.StatusCode,
 11668  		},
 11669  	}
 11670  	target := &ret
 11671  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11672  		return nil, err
 11673  	}
 11674  	return ret, nil
 11675  }
 11676  
 11677  type ProjectsLocationsServiceLbPoliciesGetIamPolicyCall struct {
 11678  	s            *Service
 11679  	resource     string
 11680  	urlParams_   gensupport.URLParams
 11681  	ifNoneMatch_ string
 11682  	ctx_         context.Context
 11683  	header_      http.Header
 11684  }
 11685  
 11686  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 11687  // empty policy if the resource exists and does not have a policy set.
 11688  //
 11689  //   - resource: REQUIRED: The resource for which the policy is being requested.
 11690  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 11691  //     for the appropriate value for this field.
 11692  func (r *ProjectsLocationsServiceLbPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 11693  	c := &ProjectsLocationsServiceLbPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11694  	c.resource = resource
 11695  	return c
 11696  }
 11697  
 11698  // OptionsRequestedPolicyVersion sets the optional parameter
 11699  // "options.requestedPolicyVersion": The maximum policy version that will be
 11700  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 11701  // an invalid value will be rejected. Requests for policies with any
 11702  // conditional role bindings must specify version 3. Policies with no
 11703  // conditional role bindings may specify any valid value or leave the field
 11704  // unset. The policy in the response might use the policy version that you
 11705  // specified, or it might use a lower policy version. For example, if you
 11706  // specify version 3, but the policy has no conditional role bindings, the
 11707  // response uses version 1. To learn which resources support conditions in
 11708  // their IAM policies, see the IAM documentation
 11709  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 11710  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 11711  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 11712  	return c
 11713  }
 11714  
 11715  // Fields allows partial responses to be retrieved. See
 11716  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11717  // details.
 11718  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 11719  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11720  	return c
 11721  }
 11722  
 11723  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11724  // object's ETag matches the given value. This is useful for getting updates
 11725  // only after the object has changed since the last request.
 11726  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 11727  	c.ifNoneMatch_ = entityTag
 11728  	return c
 11729  }
 11730  
 11731  // Context sets the context to be used in this call's Do method.
 11732  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall {
 11733  	c.ctx_ = ctx
 11734  	return c
 11735  }
 11736  
 11737  // Header returns a http.Header that can be modified by the caller to add
 11738  // headers to the request.
 11739  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Header() http.Header {
 11740  	if c.header_ == nil {
 11741  		c.header_ = make(http.Header)
 11742  	}
 11743  	return c.header_
 11744  }
 11745  
 11746  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11747  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11748  	if c.ifNoneMatch_ != "" {
 11749  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11750  	}
 11751  	var body io.Reader = nil
 11752  	c.urlParams_.Set("alt", alt)
 11753  	c.urlParams_.Set("prettyPrint", "false")
 11754  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 11755  	urls += "?" + c.urlParams_.Encode()
 11756  	req, err := http.NewRequest("GET", urls, body)
 11757  	if err != nil {
 11758  		return nil, err
 11759  	}
 11760  	req.Header = reqHeaders
 11761  	googleapi.Expand(req.URL, map[string]string{
 11762  		"resource": c.resource,
 11763  	})
 11764  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11765  }
 11766  
 11767  // Do executes the "networkservices.projects.locations.serviceLbPolicies.getIamPolicy" call.
 11768  // Any non-2xx status code is an error. Response headers are in either
 11769  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11770  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11771  // whether the returned error was because http.StatusNotModified was returned.
 11772  func (c *ProjectsLocationsServiceLbPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11773  	gensupport.SetOptions(c.urlParams_, opts...)
 11774  	res, err := c.doRequest("json")
 11775  	if res != nil && res.StatusCode == http.StatusNotModified {
 11776  		if res.Body != nil {
 11777  			res.Body.Close()
 11778  		}
 11779  		return nil, gensupport.WrapError(&googleapi.Error{
 11780  			Code:   res.StatusCode,
 11781  			Header: res.Header,
 11782  		})
 11783  	}
 11784  	if err != nil {
 11785  		return nil, err
 11786  	}
 11787  	defer googleapi.CloseBody(res)
 11788  	if err := googleapi.CheckResponse(res); err != nil {
 11789  		return nil, gensupport.WrapError(err)
 11790  	}
 11791  	ret := &Policy{
 11792  		ServerResponse: googleapi.ServerResponse{
 11793  			Header:         res.Header,
 11794  			HTTPStatusCode: res.StatusCode,
 11795  		},
 11796  	}
 11797  	target := &ret
 11798  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11799  		return nil, err
 11800  	}
 11801  	return ret, nil
 11802  }
 11803  
 11804  type ProjectsLocationsServiceLbPoliciesListCall struct {
 11805  	s            *Service
 11806  	parent       string
 11807  	urlParams_   gensupport.URLParams
 11808  	ifNoneMatch_ string
 11809  	ctx_         context.Context
 11810  	header_      http.Header
 11811  }
 11812  
 11813  // List: Lists ServiceLbPolicies in a given project and location.
 11814  //
 11815  //   - parent: The project and location from which the ServiceLbPolicies should
 11816  //     be listed, specified in the format
 11817  //     `projects/{project}/locations/{location}`.
 11818  func (r *ProjectsLocationsServiceLbPoliciesService) List(parent string) *ProjectsLocationsServiceLbPoliciesListCall {
 11819  	c := &ProjectsLocationsServiceLbPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11820  	c.parent = parent
 11821  	return c
 11822  }
 11823  
 11824  // PageSize sets the optional parameter "pageSize": Maximum number of
 11825  // ServiceLbPolicies to return per call.
 11826  func (c *ProjectsLocationsServiceLbPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceLbPoliciesListCall {
 11827  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11828  	return c
 11829  }
 11830  
 11831  // PageToken sets the optional parameter "pageToken": The value returned by the
 11832  // last `ListServiceLbPoliciesResponse` Indicates that this is a continuation
 11833  // of a prior `ListRouters` call, and that the system should return the next
 11834  // page of data.
 11835  func (c *ProjectsLocationsServiceLbPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceLbPoliciesListCall {
 11836  	c.urlParams_.Set("pageToken", pageToken)
 11837  	return c
 11838  }
 11839  
 11840  // Fields allows partial responses to be retrieved. See
 11841  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11842  // details.
 11843  func (c *ProjectsLocationsServiceLbPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesListCall {
 11844  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11845  	return c
 11846  }
 11847  
 11848  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11849  // object's ETag matches the given value. This is useful for getting updates
 11850  // only after the object has changed since the last request.
 11851  func (c *ProjectsLocationsServiceLbPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceLbPoliciesListCall {
 11852  	c.ifNoneMatch_ = entityTag
 11853  	return c
 11854  }
 11855  
 11856  // Context sets the context to be used in this call's Do method.
 11857  func (c *ProjectsLocationsServiceLbPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesListCall {
 11858  	c.ctx_ = ctx
 11859  	return c
 11860  }
 11861  
 11862  // Header returns a http.Header that can be modified by the caller to add
 11863  // headers to the request.
 11864  func (c *ProjectsLocationsServiceLbPoliciesListCall) Header() http.Header {
 11865  	if c.header_ == nil {
 11866  		c.header_ = make(http.Header)
 11867  	}
 11868  	return c.header_
 11869  }
 11870  
 11871  func (c *ProjectsLocationsServiceLbPoliciesListCall) doRequest(alt string) (*http.Response, error) {
 11872  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11873  	if c.ifNoneMatch_ != "" {
 11874  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11875  	}
 11876  	var body io.Reader = nil
 11877  	c.urlParams_.Set("alt", alt)
 11878  	c.urlParams_.Set("prettyPrint", "false")
 11879  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceLbPolicies")
 11880  	urls += "?" + c.urlParams_.Encode()
 11881  	req, err := http.NewRequest("GET", urls, body)
 11882  	if err != nil {
 11883  		return nil, err
 11884  	}
 11885  	req.Header = reqHeaders
 11886  	googleapi.Expand(req.URL, map[string]string{
 11887  		"parent": c.parent,
 11888  	})
 11889  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11890  }
 11891  
 11892  // Do executes the "networkservices.projects.locations.serviceLbPolicies.list" call.
 11893  // Any non-2xx status code is an error. Response headers are in either
 11894  // *ListServiceLbPoliciesResponse.ServerResponse.Header or (if a response was
 11895  // returned at all) in error.(*googleapi.Error).Header. Use
 11896  // googleapi.IsNotModified to check whether the returned error was because
 11897  // http.StatusNotModified was returned.
 11898  func (c *ProjectsLocationsServiceLbPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceLbPoliciesResponse, error) {
 11899  	gensupport.SetOptions(c.urlParams_, opts...)
 11900  	res, err := c.doRequest("json")
 11901  	if res != nil && res.StatusCode == http.StatusNotModified {
 11902  		if res.Body != nil {
 11903  			res.Body.Close()
 11904  		}
 11905  		return nil, gensupport.WrapError(&googleapi.Error{
 11906  			Code:   res.StatusCode,
 11907  			Header: res.Header,
 11908  		})
 11909  	}
 11910  	if err != nil {
 11911  		return nil, err
 11912  	}
 11913  	defer googleapi.CloseBody(res)
 11914  	if err := googleapi.CheckResponse(res); err != nil {
 11915  		return nil, gensupport.WrapError(err)
 11916  	}
 11917  	ret := &ListServiceLbPoliciesResponse{
 11918  		ServerResponse: googleapi.ServerResponse{
 11919  			Header:         res.Header,
 11920  			HTTPStatusCode: res.StatusCode,
 11921  		},
 11922  	}
 11923  	target := &ret
 11924  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11925  		return nil, err
 11926  	}
 11927  	return ret, nil
 11928  }
 11929  
 11930  // Pages invokes f for each page of results.
 11931  // A non-nil error returned from f will halt the iteration.
 11932  // The provided context supersedes any context provided to the Context method.
 11933  func (c *ProjectsLocationsServiceLbPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceLbPoliciesResponse) error) error {
 11934  	c.ctx_ = ctx
 11935  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11936  	for {
 11937  		x, err := c.Do()
 11938  		if err != nil {
 11939  			return err
 11940  		}
 11941  		if err := f(x); err != nil {
 11942  			return err
 11943  		}
 11944  		if x.NextPageToken == "" {
 11945  			return nil
 11946  		}
 11947  		c.PageToken(x.NextPageToken)
 11948  	}
 11949  }
 11950  
 11951  type ProjectsLocationsServiceLbPoliciesPatchCall struct {
 11952  	s               *Service
 11953  	name            string
 11954  	servicelbpolicy *ServiceLbPolicy
 11955  	urlParams_      gensupport.URLParams
 11956  	ctx_            context.Context
 11957  	header_         http.Header
 11958  }
 11959  
 11960  // Patch: Updates the parameters of a single ServiceLbPolicy.
 11961  //
 11962  //   - name: Name of the ServiceLbPolicy resource. It matches pattern
 11963  //     `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_poli
 11964  //     cy_name}`.
 11965  func (r *ProjectsLocationsServiceLbPoliciesService) Patch(name string, servicelbpolicy *ServiceLbPolicy) *ProjectsLocationsServiceLbPoliciesPatchCall {
 11966  	c := &ProjectsLocationsServiceLbPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11967  	c.name = name
 11968  	c.servicelbpolicy = servicelbpolicy
 11969  	return c
 11970  }
 11971  
 11972  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 11973  // specify the fields to be overwritten in the ServiceLbPolicy resource by the
 11974  // update. The fields specified in the update_mask are relative to the
 11975  // resource, not the full request. A field will be overwritten if it is in the
 11976  // mask. If the user does not provide a mask then all fields will be
 11977  // overwritten.
 11978  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceLbPoliciesPatchCall {
 11979  	c.urlParams_.Set("updateMask", updateMask)
 11980  	return c
 11981  }
 11982  
 11983  // Fields allows partial responses to be retrieved. See
 11984  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11985  // details.
 11986  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesPatchCall {
 11987  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11988  	return c
 11989  }
 11990  
 11991  // Context sets the context to be used in this call's Do method.
 11992  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesPatchCall {
 11993  	c.ctx_ = ctx
 11994  	return c
 11995  }
 11996  
 11997  // Header returns a http.Header that can be modified by the caller to add
 11998  // headers to the request.
 11999  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Header() http.Header {
 12000  	if c.header_ == nil {
 12001  		c.header_ = make(http.Header)
 12002  	}
 12003  	return c.header_
 12004  }
 12005  
 12006  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
 12007  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12008  	var body io.Reader = nil
 12009  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.servicelbpolicy)
 12010  	if err != nil {
 12011  		return nil, err
 12012  	}
 12013  	c.urlParams_.Set("alt", alt)
 12014  	c.urlParams_.Set("prettyPrint", "false")
 12015  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12016  	urls += "?" + c.urlParams_.Encode()
 12017  	req, err := http.NewRequest("PATCH", urls, body)
 12018  	if err != nil {
 12019  		return nil, err
 12020  	}
 12021  	req.Header = reqHeaders
 12022  	googleapi.Expand(req.URL, map[string]string{
 12023  		"name": c.name,
 12024  	})
 12025  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12026  }
 12027  
 12028  // Do executes the "networkservices.projects.locations.serviceLbPolicies.patch" call.
 12029  // Any non-2xx status code is an error. Response headers are in either
 12030  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12031  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12032  // whether the returned error was because http.StatusNotModified was returned.
 12033  func (c *ProjectsLocationsServiceLbPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12034  	gensupport.SetOptions(c.urlParams_, opts...)
 12035  	res, err := c.doRequest("json")
 12036  	if res != nil && res.StatusCode == http.StatusNotModified {
 12037  		if res.Body != nil {
 12038  			res.Body.Close()
 12039  		}
 12040  		return nil, gensupport.WrapError(&googleapi.Error{
 12041  			Code:   res.StatusCode,
 12042  			Header: res.Header,
 12043  		})
 12044  	}
 12045  	if err != nil {
 12046  		return nil, err
 12047  	}
 12048  	defer googleapi.CloseBody(res)
 12049  	if err := googleapi.CheckResponse(res); err != nil {
 12050  		return nil, gensupport.WrapError(err)
 12051  	}
 12052  	ret := &Operation{
 12053  		ServerResponse: googleapi.ServerResponse{
 12054  			Header:         res.Header,
 12055  			HTTPStatusCode: res.StatusCode,
 12056  		},
 12057  	}
 12058  	target := &ret
 12059  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12060  		return nil, err
 12061  	}
 12062  	return ret, nil
 12063  }
 12064  
 12065  type ProjectsLocationsServiceLbPoliciesSetIamPolicyCall struct {
 12066  	s                   *Service
 12067  	resource            string
 12068  	setiampolicyrequest *SetIamPolicyRequest
 12069  	urlParams_          gensupport.URLParams
 12070  	ctx_                context.Context
 12071  	header_             http.Header
 12072  }
 12073  
 12074  // SetIamPolicy: Sets the access control policy on the specified resource.
 12075  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 12076  // and `PERMISSION_DENIED` errors.
 12077  //
 12078  //   - resource: REQUIRED: The resource for which the policy is being specified.
 12079  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 12080  //     for the appropriate value for this field.
 12081  func (r *ProjectsLocationsServiceLbPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
 12082  	c := &ProjectsLocationsServiceLbPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12083  	c.resource = resource
 12084  	c.setiampolicyrequest = setiampolicyrequest
 12085  	return c
 12086  }
 12087  
 12088  // Fields allows partial responses to be retrieved. See
 12089  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12090  // details.
 12091  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
 12092  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12093  	return c
 12094  }
 12095  
 12096  // Context sets the context to be used in this call's Do method.
 12097  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall {
 12098  	c.ctx_ = ctx
 12099  	return c
 12100  }
 12101  
 12102  // Header returns a http.Header that can be modified by the caller to add
 12103  // headers to the request.
 12104  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Header() http.Header {
 12105  	if c.header_ == nil {
 12106  		c.header_ = make(http.Header)
 12107  	}
 12108  	return c.header_
 12109  }
 12110  
 12111  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 12112  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12113  	var body io.Reader = nil
 12114  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 12115  	if err != nil {
 12116  		return nil, err
 12117  	}
 12118  	c.urlParams_.Set("alt", alt)
 12119  	c.urlParams_.Set("prettyPrint", "false")
 12120  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 12121  	urls += "?" + c.urlParams_.Encode()
 12122  	req, err := http.NewRequest("POST", urls, body)
 12123  	if err != nil {
 12124  		return nil, err
 12125  	}
 12126  	req.Header = reqHeaders
 12127  	googleapi.Expand(req.URL, map[string]string{
 12128  		"resource": c.resource,
 12129  	})
 12130  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12131  }
 12132  
 12133  // Do executes the "networkservices.projects.locations.serviceLbPolicies.setIamPolicy" call.
 12134  // Any non-2xx status code is an error. Response headers are in either
 12135  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 12136  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12137  // whether the returned error was because http.StatusNotModified was returned.
 12138  func (c *ProjectsLocationsServiceLbPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 12139  	gensupport.SetOptions(c.urlParams_, opts...)
 12140  	res, err := c.doRequest("json")
 12141  	if res != nil && res.StatusCode == http.StatusNotModified {
 12142  		if res.Body != nil {
 12143  			res.Body.Close()
 12144  		}
 12145  		return nil, gensupport.WrapError(&googleapi.Error{
 12146  			Code:   res.StatusCode,
 12147  			Header: res.Header,
 12148  		})
 12149  	}
 12150  	if err != nil {
 12151  		return nil, err
 12152  	}
 12153  	defer googleapi.CloseBody(res)
 12154  	if err := googleapi.CheckResponse(res); err != nil {
 12155  		return nil, gensupport.WrapError(err)
 12156  	}
 12157  	ret := &Policy{
 12158  		ServerResponse: googleapi.ServerResponse{
 12159  			Header:         res.Header,
 12160  			HTTPStatusCode: res.StatusCode,
 12161  		},
 12162  	}
 12163  	target := &ret
 12164  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12165  		return nil, err
 12166  	}
 12167  	return ret, nil
 12168  }
 12169  
 12170  type ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall struct {
 12171  	s                         *Service
 12172  	resource                  string
 12173  	testiampermissionsrequest *TestIamPermissionsRequest
 12174  	urlParams_                gensupport.URLParams
 12175  	ctx_                      context.Context
 12176  	header_                   http.Header
 12177  }
 12178  
 12179  // TestIamPermissions: Returns permissions that a caller has on the specified
 12180  // resource. If the resource does not exist, this will return an empty set of
 12181  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 12182  // used for building permission-aware UIs and command-line tools, not for
 12183  // authorization checking. This operation may "fail open" without warning.
 12184  //
 12185  //   - resource: REQUIRED: The resource for which the policy detail is being
 12186  //     requested. See Resource names
 12187  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 12188  //     value for this field.
 12189  func (r *ProjectsLocationsServiceLbPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
 12190  	c := &ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12191  	c.resource = resource
 12192  	c.testiampermissionsrequest = testiampermissionsrequest
 12193  	return c
 12194  }
 12195  
 12196  // Fields allows partial responses to be retrieved. See
 12197  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12198  // details.
 12199  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
 12200  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12201  	return c
 12202  }
 12203  
 12204  // Context sets the context to be used in this call's Do method.
 12205  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall {
 12206  	c.ctx_ = ctx
 12207  	return c
 12208  }
 12209  
 12210  // Header returns a http.Header that can be modified by the caller to add
 12211  // headers to the request.
 12212  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Header() http.Header {
 12213  	if c.header_ == nil {
 12214  		c.header_ = make(http.Header)
 12215  	}
 12216  	return c.header_
 12217  }
 12218  
 12219  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 12220  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12221  	var body io.Reader = nil
 12222  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 12223  	if err != nil {
 12224  		return nil, err
 12225  	}
 12226  	c.urlParams_.Set("alt", alt)
 12227  	c.urlParams_.Set("prettyPrint", "false")
 12228  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 12229  	urls += "?" + c.urlParams_.Encode()
 12230  	req, err := http.NewRequest("POST", urls, body)
 12231  	if err != nil {
 12232  		return nil, err
 12233  	}
 12234  	req.Header = reqHeaders
 12235  	googleapi.Expand(req.URL, map[string]string{
 12236  		"resource": c.resource,
 12237  	})
 12238  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12239  }
 12240  
 12241  // Do executes the "networkservices.projects.locations.serviceLbPolicies.testIamPermissions" call.
 12242  // Any non-2xx status code is an error. Response headers are in either
 12243  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 12244  // returned at all) in error.(*googleapi.Error).Header. Use
 12245  // googleapi.IsNotModified to check whether the returned error was because
 12246  // http.StatusNotModified was returned.
 12247  func (c *ProjectsLocationsServiceLbPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 12248  	gensupport.SetOptions(c.urlParams_, opts...)
 12249  	res, err := c.doRequest("json")
 12250  	if res != nil && res.StatusCode == http.StatusNotModified {
 12251  		if res.Body != nil {
 12252  			res.Body.Close()
 12253  		}
 12254  		return nil, gensupport.WrapError(&googleapi.Error{
 12255  			Code:   res.StatusCode,
 12256  			Header: res.Header,
 12257  		})
 12258  	}
 12259  	if err != nil {
 12260  		return nil, err
 12261  	}
 12262  	defer googleapi.CloseBody(res)
 12263  	if err := googleapi.CheckResponse(res); err != nil {
 12264  		return nil, gensupport.WrapError(err)
 12265  	}
 12266  	ret := &TestIamPermissionsResponse{
 12267  		ServerResponse: googleapi.ServerResponse{
 12268  			Header:         res.Header,
 12269  			HTTPStatusCode: res.StatusCode,
 12270  		},
 12271  	}
 12272  	target := &ret
 12273  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12274  		return nil, err
 12275  	}
 12276  	return ret, nil
 12277  }
 12278  
 12279  type ProjectsLocationsTcpRoutesCreateCall struct {
 12280  	s          *Service
 12281  	parent     string
 12282  	tcproute   *TcpRoute
 12283  	urlParams_ gensupport.URLParams
 12284  	ctx_       context.Context
 12285  	header_    http.Header
 12286  }
 12287  
 12288  // Create: Creates a new TcpRoute in a given project and location.
 12289  //
 12290  //   - parent: The parent resource of the TcpRoute. Must be in the format
 12291  //     `projects/*/locations/global`.
 12292  func (r *ProjectsLocationsTcpRoutesService) Create(parent string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesCreateCall {
 12293  	c := &ProjectsLocationsTcpRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12294  	c.parent = parent
 12295  	c.tcproute = tcproute
 12296  	return c
 12297  }
 12298  
 12299  // TcpRouteId sets the optional parameter "tcpRouteId": Required. Short name of
 12300  // the TcpRoute resource to be created.
 12301  func (c *ProjectsLocationsTcpRoutesCreateCall) TcpRouteId(tcpRouteId string) *ProjectsLocationsTcpRoutesCreateCall {
 12302  	c.urlParams_.Set("tcpRouteId", tcpRouteId)
 12303  	return c
 12304  }
 12305  
 12306  // Fields allows partial responses to be retrieved. See
 12307  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12308  // details.
 12309  func (c *ProjectsLocationsTcpRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesCreateCall {
 12310  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12311  	return c
 12312  }
 12313  
 12314  // Context sets the context to be used in this call's Do method.
 12315  func (c *ProjectsLocationsTcpRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesCreateCall {
 12316  	c.ctx_ = ctx
 12317  	return c
 12318  }
 12319  
 12320  // Header returns a http.Header that can be modified by the caller to add
 12321  // headers to the request.
 12322  func (c *ProjectsLocationsTcpRoutesCreateCall) Header() http.Header {
 12323  	if c.header_ == nil {
 12324  		c.header_ = make(http.Header)
 12325  	}
 12326  	return c.header_
 12327  }
 12328  
 12329  func (c *ProjectsLocationsTcpRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
 12330  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12331  	var body io.Reader = nil
 12332  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tcproute)
 12333  	if err != nil {
 12334  		return nil, err
 12335  	}
 12336  	c.urlParams_.Set("alt", alt)
 12337  	c.urlParams_.Set("prettyPrint", "false")
 12338  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tcpRoutes")
 12339  	urls += "?" + c.urlParams_.Encode()
 12340  	req, err := http.NewRequest("POST", urls, body)
 12341  	if err != nil {
 12342  		return nil, err
 12343  	}
 12344  	req.Header = reqHeaders
 12345  	googleapi.Expand(req.URL, map[string]string{
 12346  		"parent": c.parent,
 12347  	})
 12348  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12349  }
 12350  
 12351  // Do executes the "networkservices.projects.locations.tcpRoutes.create" call.
 12352  // Any non-2xx status code is an error. Response headers are in either
 12353  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12354  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12355  // whether the returned error was because http.StatusNotModified was returned.
 12356  func (c *ProjectsLocationsTcpRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12357  	gensupport.SetOptions(c.urlParams_, opts...)
 12358  	res, err := c.doRequest("json")
 12359  	if res != nil && res.StatusCode == http.StatusNotModified {
 12360  		if res.Body != nil {
 12361  			res.Body.Close()
 12362  		}
 12363  		return nil, gensupport.WrapError(&googleapi.Error{
 12364  			Code:   res.StatusCode,
 12365  			Header: res.Header,
 12366  		})
 12367  	}
 12368  	if err != nil {
 12369  		return nil, err
 12370  	}
 12371  	defer googleapi.CloseBody(res)
 12372  	if err := googleapi.CheckResponse(res); err != nil {
 12373  		return nil, gensupport.WrapError(err)
 12374  	}
 12375  	ret := &Operation{
 12376  		ServerResponse: googleapi.ServerResponse{
 12377  			Header:         res.Header,
 12378  			HTTPStatusCode: res.StatusCode,
 12379  		},
 12380  	}
 12381  	target := &ret
 12382  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12383  		return nil, err
 12384  	}
 12385  	return ret, nil
 12386  }
 12387  
 12388  type ProjectsLocationsTcpRoutesDeleteCall struct {
 12389  	s          *Service
 12390  	name       string
 12391  	urlParams_ gensupport.URLParams
 12392  	ctx_       context.Context
 12393  	header_    http.Header
 12394  }
 12395  
 12396  // Delete: Deletes a single TcpRoute.
 12397  //
 12398  //   - name: A name of the TcpRoute to delete. Must be in the format
 12399  //     `projects/*/locations/global/tcpRoutes/*`.
 12400  func (r *ProjectsLocationsTcpRoutesService) Delete(name string) *ProjectsLocationsTcpRoutesDeleteCall {
 12401  	c := &ProjectsLocationsTcpRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12402  	c.name = name
 12403  	return c
 12404  }
 12405  
 12406  // Fields allows partial responses to be retrieved. See
 12407  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12408  // details.
 12409  func (c *ProjectsLocationsTcpRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesDeleteCall {
 12410  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12411  	return c
 12412  }
 12413  
 12414  // Context sets the context to be used in this call's Do method.
 12415  func (c *ProjectsLocationsTcpRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesDeleteCall {
 12416  	c.ctx_ = ctx
 12417  	return c
 12418  }
 12419  
 12420  // Header returns a http.Header that can be modified by the caller to add
 12421  // headers to the request.
 12422  func (c *ProjectsLocationsTcpRoutesDeleteCall) Header() http.Header {
 12423  	if c.header_ == nil {
 12424  		c.header_ = make(http.Header)
 12425  	}
 12426  	return c.header_
 12427  }
 12428  
 12429  func (c *ProjectsLocationsTcpRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
 12430  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12431  	var body io.Reader = nil
 12432  	c.urlParams_.Set("alt", alt)
 12433  	c.urlParams_.Set("prettyPrint", "false")
 12434  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12435  	urls += "?" + c.urlParams_.Encode()
 12436  	req, err := http.NewRequest("DELETE", urls, body)
 12437  	if err != nil {
 12438  		return nil, err
 12439  	}
 12440  	req.Header = reqHeaders
 12441  	googleapi.Expand(req.URL, map[string]string{
 12442  		"name": c.name,
 12443  	})
 12444  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12445  }
 12446  
 12447  // Do executes the "networkservices.projects.locations.tcpRoutes.delete" call.
 12448  // Any non-2xx status code is an error. Response headers are in either
 12449  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12450  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12451  // whether the returned error was because http.StatusNotModified was returned.
 12452  func (c *ProjectsLocationsTcpRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12453  	gensupport.SetOptions(c.urlParams_, opts...)
 12454  	res, err := c.doRequest("json")
 12455  	if res != nil && res.StatusCode == http.StatusNotModified {
 12456  		if res.Body != nil {
 12457  			res.Body.Close()
 12458  		}
 12459  		return nil, gensupport.WrapError(&googleapi.Error{
 12460  			Code:   res.StatusCode,
 12461  			Header: res.Header,
 12462  		})
 12463  	}
 12464  	if err != nil {
 12465  		return nil, err
 12466  	}
 12467  	defer googleapi.CloseBody(res)
 12468  	if err := googleapi.CheckResponse(res); err != nil {
 12469  		return nil, gensupport.WrapError(err)
 12470  	}
 12471  	ret := &Operation{
 12472  		ServerResponse: googleapi.ServerResponse{
 12473  			Header:         res.Header,
 12474  			HTTPStatusCode: res.StatusCode,
 12475  		},
 12476  	}
 12477  	target := &ret
 12478  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12479  		return nil, err
 12480  	}
 12481  	return ret, nil
 12482  }
 12483  
 12484  type ProjectsLocationsTcpRoutesGetCall struct {
 12485  	s            *Service
 12486  	name         string
 12487  	urlParams_   gensupport.URLParams
 12488  	ifNoneMatch_ string
 12489  	ctx_         context.Context
 12490  	header_      http.Header
 12491  }
 12492  
 12493  // Get: Gets details of a single TcpRoute.
 12494  //
 12495  //   - name: A name of the TcpRoute to get. Must be in the format
 12496  //     `projects/*/locations/global/tcpRoutes/*`.
 12497  func (r *ProjectsLocationsTcpRoutesService) Get(name string) *ProjectsLocationsTcpRoutesGetCall {
 12498  	c := &ProjectsLocationsTcpRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12499  	c.name = name
 12500  	return c
 12501  }
 12502  
 12503  // Fields allows partial responses to be retrieved. See
 12504  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12505  // details.
 12506  func (c *ProjectsLocationsTcpRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesGetCall {
 12507  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12508  	return c
 12509  }
 12510  
 12511  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12512  // object's ETag matches the given value. This is useful for getting updates
 12513  // only after the object has changed since the last request.
 12514  func (c *ProjectsLocationsTcpRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesGetCall {
 12515  	c.ifNoneMatch_ = entityTag
 12516  	return c
 12517  }
 12518  
 12519  // Context sets the context to be used in this call's Do method.
 12520  func (c *ProjectsLocationsTcpRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesGetCall {
 12521  	c.ctx_ = ctx
 12522  	return c
 12523  }
 12524  
 12525  // Header returns a http.Header that can be modified by the caller to add
 12526  // headers to the request.
 12527  func (c *ProjectsLocationsTcpRoutesGetCall) Header() http.Header {
 12528  	if c.header_ == nil {
 12529  		c.header_ = make(http.Header)
 12530  	}
 12531  	return c.header_
 12532  }
 12533  
 12534  func (c *ProjectsLocationsTcpRoutesGetCall) doRequest(alt string) (*http.Response, error) {
 12535  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12536  	if c.ifNoneMatch_ != "" {
 12537  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12538  	}
 12539  	var body io.Reader = nil
 12540  	c.urlParams_.Set("alt", alt)
 12541  	c.urlParams_.Set("prettyPrint", "false")
 12542  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12543  	urls += "?" + c.urlParams_.Encode()
 12544  	req, err := http.NewRequest("GET", urls, body)
 12545  	if err != nil {
 12546  		return nil, err
 12547  	}
 12548  	req.Header = reqHeaders
 12549  	googleapi.Expand(req.URL, map[string]string{
 12550  		"name": c.name,
 12551  	})
 12552  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12553  }
 12554  
 12555  // Do executes the "networkservices.projects.locations.tcpRoutes.get" call.
 12556  // Any non-2xx status code is an error. Response headers are in either
 12557  // *TcpRoute.ServerResponse.Header or (if a response was returned at all) in
 12558  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12559  // whether the returned error was because http.StatusNotModified was returned.
 12560  func (c *ProjectsLocationsTcpRoutesGetCall) Do(opts ...googleapi.CallOption) (*TcpRoute, error) {
 12561  	gensupport.SetOptions(c.urlParams_, opts...)
 12562  	res, err := c.doRequest("json")
 12563  	if res != nil && res.StatusCode == http.StatusNotModified {
 12564  		if res.Body != nil {
 12565  			res.Body.Close()
 12566  		}
 12567  		return nil, gensupport.WrapError(&googleapi.Error{
 12568  			Code:   res.StatusCode,
 12569  			Header: res.Header,
 12570  		})
 12571  	}
 12572  	if err != nil {
 12573  		return nil, err
 12574  	}
 12575  	defer googleapi.CloseBody(res)
 12576  	if err := googleapi.CheckResponse(res); err != nil {
 12577  		return nil, gensupport.WrapError(err)
 12578  	}
 12579  	ret := &TcpRoute{
 12580  		ServerResponse: googleapi.ServerResponse{
 12581  			Header:         res.Header,
 12582  			HTTPStatusCode: res.StatusCode,
 12583  		},
 12584  	}
 12585  	target := &ret
 12586  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12587  		return nil, err
 12588  	}
 12589  	return ret, nil
 12590  }
 12591  
 12592  type ProjectsLocationsTcpRoutesListCall struct {
 12593  	s            *Service
 12594  	parent       string
 12595  	urlParams_   gensupport.URLParams
 12596  	ifNoneMatch_ string
 12597  	ctx_         context.Context
 12598  	header_      http.Header
 12599  }
 12600  
 12601  // List: Lists TcpRoute in a given project and location.
 12602  //
 12603  //   - parent: The project and location from which the TcpRoutes should be
 12604  //     listed, specified in the format `projects/*/locations/global`.
 12605  func (r *ProjectsLocationsTcpRoutesService) List(parent string) *ProjectsLocationsTcpRoutesListCall {
 12606  	c := &ProjectsLocationsTcpRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12607  	c.parent = parent
 12608  	return c
 12609  }
 12610  
 12611  // PageSize sets the optional parameter "pageSize": Maximum number of TcpRoutes
 12612  // to return per call.
 12613  func (c *ProjectsLocationsTcpRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTcpRoutesListCall {
 12614  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12615  	return c
 12616  }
 12617  
 12618  // PageToken sets the optional parameter "pageToken": The value returned by the
 12619  // last `ListTcpRoutesResponse` Indicates that this is a continuation of a
 12620  // prior `ListTcpRoutes` call, and that the system should return the next page
 12621  // of data.
 12622  func (c *ProjectsLocationsTcpRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTcpRoutesListCall {
 12623  	c.urlParams_.Set("pageToken", pageToken)
 12624  	return c
 12625  }
 12626  
 12627  // Fields allows partial responses to be retrieved. See
 12628  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12629  // details.
 12630  func (c *ProjectsLocationsTcpRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesListCall {
 12631  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12632  	return c
 12633  }
 12634  
 12635  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12636  // object's ETag matches the given value. This is useful for getting updates
 12637  // only after the object has changed since the last request.
 12638  func (c *ProjectsLocationsTcpRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTcpRoutesListCall {
 12639  	c.ifNoneMatch_ = entityTag
 12640  	return c
 12641  }
 12642  
 12643  // Context sets the context to be used in this call's Do method.
 12644  func (c *ProjectsLocationsTcpRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesListCall {
 12645  	c.ctx_ = ctx
 12646  	return c
 12647  }
 12648  
 12649  // Header returns a http.Header that can be modified by the caller to add
 12650  // headers to the request.
 12651  func (c *ProjectsLocationsTcpRoutesListCall) Header() http.Header {
 12652  	if c.header_ == nil {
 12653  		c.header_ = make(http.Header)
 12654  	}
 12655  	return c.header_
 12656  }
 12657  
 12658  func (c *ProjectsLocationsTcpRoutesListCall) doRequest(alt string) (*http.Response, error) {
 12659  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12660  	if c.ifNoneMatch_ != "" {
 12661  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12662  	}
 12663  	var body io.Reader = nil
 12664  	c.urlParams_.Set("alt", alt)
 12665  	c.urlParams_.Set("prettyPrint", "false")
 12666  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tcpRoutes")
 12667  	urls += "?" + c.urlParams_.Encode()
 12668  	req, err := http.NewRequest("GET", urls, body)
 12669  	if err != nil {
 12670  		return nil, err
 12671  	}
 12672  	req.Header = reqHeaders
 12673  	googleapi.Expand(req.URL, map[string]string{
 12674  		"parent": c.parent,
 12675  	})
 12676  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12677  }
 12678  
 12679  // Do executes the "networkservices.projects.locations.tcpRoutes.list" call.
 12680  // Any non-2xx status code is an error. Response headers are in either
 12681  // *ListTcpRoutesResponse.ServerResponse.Header or (if a response was returned
 12682  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12683  // check whether the returned error was because http.StatusNotModified was
 12684  // returned.
 12685  func (c *ProjectsLocationsTcpRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTcpRoutesResponse, error) {
 12686  	gensupport.SetOptions(c.urlParams_, opts...)
 12687  	res, err := c.doRequest("json")
 12688  	if res != nil && res.StatusCode == http.StatusNotModified {
 12689  		if res.Body != nil {
 12690  			res.Body.Close()
 12691  		}
 12692  		return nil, gensupport.WrapError(&googleapi.Error{
 12693  			Code:   res.StatusCode,
 12694  			Header: res.Header,
 12695  		})
 12696  	}
 12697  	if err != nil {
 12698  		return nil, err
 12699  	}
 12700  	defer googleapi.CloseBody(res)
 12701  	if err := googleapi.CheckResponse(res); err != nil {
 12702  		return nil, gensupport.WrapError(err)
 12703  	}
 12704  	ret := &ListTcpRoutesResponse{
 12705  		ServerResponse: googleapi.ServerResponse{
 12706  			Header:         res.Header,
 12707  			HTTPStatusCode: res.StatusCode,
 12708  		},
 12709  	}
 12710  	target := &ret
 12711  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12712  		return nil, err
 12713  	}
 12714  	return ret, nil
 12715  }
 12716  
 12717  // Pages invokes f for each page of results.
 12718  // A non-nil error returned from f will halt the iteration.
 12719  // The provided context supersedes any context provided to the Context method.
 12720  func (c *ProjectsLocationsTcpRoutesListCall) Pages(ctx context.Context, f func(*ListTcpRoutesResponse) error) error {
 12721  	c.ctx_ = ctx
 12722  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12723  	for {
 12724  		x, err := c.Do()
 12725  		if err != nil {
 12726  			return err
 12727  		}
 12728  		if err := f(x); err != nil {
 12729  			return err
 12730  		}
 12731  		if x.NextPageToken == "" {
 12732  			return nil
 12733  		}
 12734  		c.PageToken(x.NextPageToken)
 12735  	}
 12736  }
 12737  
 12738  type ProjectsLocationsTcpRoutesPatchCall struct {
 12739  	s          *Service
 12740  	name       string
 12741  	tcproute   *TcpRoute
 12742  	urlParams_ gensupport.URLParams
 12743  	ctx_       context.Context
 12744  	header_    http.Header
 12745  }
 12746  
 12747  // Patch: Updates the parameters of a single TcpRoute.
 12748  //
 12749  //   - name: Name of the TcpRoute resource. It matches pattern
 12750  //     `projects/*/locations/global/tcpRoutes/tcp_route_name>`.
 12751  func (r *ProjectsLocationsTcpRoutesService) Patch(name string, tcproute *TcpRoute) *ProjectsLocationsTcpRoutesPatchCall {
 12752  	c := &ProjectsLocationsTcpRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12753  	c.name = name
 12754  	c.tcproute = tcproute
 12755  	return c
 12756  }
 12757  
 12758  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 12759  // specify the fields to be overwritten in the TcpRoute resource by the update.
 12760  // The fields specified in the update_mask are relative to the resource, not
 12761  // the full request. A field will be overwritten if it is in the mask. If the
 12762  // user does not provide a mask then all fields will be overwritten.
 12763  func (c *ProjectsLocationsTcpRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTcpRoutesPatchCall {
 12764  	c.urlParams_.Set("updateMask", updateMask)
 12765  	return c
 12766  }
 12767  
 12768  // Fields allows partial responses to be retrieved. See
 12769  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12770  // details.
 12771  func (c *ProjectsLocationsTcpRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTcpRoutesPatchCall {
 12772  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12773  	return c
 12774  }
 12775  
 12776  // Context sets the context to be used in this call's Do method.
 12777  func (c *ProjectsLocationsTcpRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTcpRoutesPatchCall {
 12778  	c.ctx_ = ctx
 12779  	return c
 12780  }
 12781  
 12782  // Header returns a http.Header that can be modified by the caller to add
 12783  // headers to the request.
 12784  func (c *ProjectsLocationsTcpRoutesPatchCall) Header() http.Header {
 12785  	if c.header_ == nil {
 12786  		c.header_ = make(http.Header)
 12787  	}
 12788  	return c.header_
 12789  }
 12790  
 12791  func (c *ProjectsLocationsTcpRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
 12792  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12793  	var body io.Reader = nil
 12794  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tcproute)
 12795  	if err != nil {
 12796  		return nil, err
 12797  	}
 12798  	c.urlParams_.Set("alt", alt)
 12799  	c.urlParams_.Set("prettyPrint", "false")
 12800  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12801  	urls += "?" + c.urlParams_.Encode()
 12802  	req, err := http.NewRequest("PATCH", urls, body)
 12803  	if err != nil {
 12804  		return nil, err
 12805  	}
 12806  	req.Header = reqHeaders
 12807  	googleapi.Expand(req.URL, map[string]string{
 12808  		"name": c.name,
 12809  	})
 12810  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12811  }
 12812  
 12813  // Do executes the "networkservices.projects.locations.tcpRoutes.patch" call.
 12814  // Any non-2xx status code is an error. Response headers are in either
 12815  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12816  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12817  // whether the returned error was because http.StatusNotModified was returned.
 12818  func (c *ProjectsLocationsTcpRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12819  	gensupport.SetOptions(c.urlParams_, opts...)
 12820  	res, err := c.doRequest("json")
 12821  	if res != nil && res.StatusCode == http.StatusNotModified {
 12822  		if res.Body != nil {
 12823  			res.Body.Close()
 12824  		}
 12825  		return nil, gensupport.WrapError(&googleapi.Error{
 12826  			Code:   res.StatusCode,
 12827  			Header: res.Header,
 12828  		})
 12829  	}
 12830  	if err != nil {
 12831  		return nil, err
 12832  	}
 12833  	defer googleapi.CloseBody(res)
 12834  	if err := googleapi.CheckResponse(res); err != nil {
 12835  		return nil, gensupport.WrapError(err)
 12836  	}
 12837  	ret := &Operation{
 12838  		ServerResponse: googleapi.ServerResponse{
 12839  			Header:         res.Header,
 12840  			HTTPStatusCode: res.StatusCode,
 12841  		},
 12842  	}
 12843  	target := &ret
 12844  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12845  		return nil, err
 12846  	}
 12847  	return ret, nil
 12848  }
 12849  
 12850  type ProjectsLocationsTlsRoutesCreateCall struct {
 12851  	s          *Service
 12852  	parent     string
 12853  	tlsroute   *TlsRoute
 12854  	urlParams_ gensupport.URLParams
 12855  	ctx_       context.Context
 12856  	header_    http.Header
 12857  }
 12858  
 12859  // Create: Creates a new TlsRoute in a given project and location.
 12860  //
 12861  //   - parent: The parent resource of the TlsRoute. Must be in the format
 12862  //     `projects/*/locations/global`.
 12863  func (r *ProjectsLocationsTlsRoutesService) Create(parent string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesCreateCall {
 12864  	c := &ProjectsLocationsTlsRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12865  	c.parent = parent
 12866  	c.tlsroute = tlsroute
 12867  	return c
 12868  }
 12869  
 12870  // TlsRouteId sets the optional parameter "tlsRouteId": Required. Short name of
 12871  // the TlsRoute resource to be created.
 12872  func (c *ProjectsLocationsTlsRoutesCreateCall) TlsRouteId(tlsRouteId string) *ProjectsLocationsTlsRoutesCreateCall {
 12873  	c.urlParams_.Set("tlsRouteId", tlsRouteId)
 12874  	return c
 12875  }
 12876  
 12877  // Fields allows partial responses to be retrieved. See
 12878  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12879  // details.
 12880  func (c *ProjectsLocationsTlsRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesCreateCall {
 12881  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12882  	return c
 12883  }
 12884  
 12885  // Context sets the context to be used in this call's Do method.
 12886  func (c *ProjectsLocationsTlsRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesCreateCall {
 12887  	c.ctx_ = ctx
 12888  	return c
 12889  }
 12890  
 12891  // Header returns a http.Header that can be modified by the caller to add
 12892  // headers to the request.
 12893  func (c *ProjectsLocationsTlsRoutesCreateCall) Header() http.Header {
 12894  	if c.header_ == nil {
 12895  		c.header_ = make(http.Header)
 12896  	}
 12897  	return c.header_
 12898  }
 12899  
 12900  func (c *ProjectsLocationsTlsRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
 12901  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12902  	var body io.Reader = nil
 12903  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsroute)
 12904  	if err != nil {
 12905  		return nil, err
 12906  	}
 12907  	c.urlParams_.Set("alt", alt)
 12908  	c.urlParams_.Set("prettyPrint", "false")
 12909  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tlsRoutes")
 12910  	urls += "?" + c.urlParams_.Encode()
 12911  	req, err := http.NewRequest("POST", urls, body)
 12912  	if err != nil {
 12913  		return nil, err
 12914  	}
 12915  	req.Header = reqHeaders
 12916  	googleapi.Expand(req.URL, map[string]string{
 12917  		"parent": c.parent,
 12918  	})
 12919  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12920  }
 12921  
 12922  // Do executes the "networkservices.projects.locations.tlsRoutes.create" call.
 12923  // Any non-2xx status code is an error. Response headers are in either
 12924  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 12925  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12926  // whether the returned error was because http.StatusNotModified was returned.
 12927  func (c *ProjectsLocationsTlsRoutesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 12928  	gensupport.SetOptions(c.urlParams_, opts...)
 12929  	res, err := c.doRequest("json")
 12930  	if res != nil && res.StatusCode == http.StatusNotModified {
 12931  		if res.Body != nil {
 12932  			res.Body.Close()
 12933  		}
 12934  		return nil, gensupport.WrapError(&googleapi.Error{
 12935  			Code:   res.StatusCode,
 12936  			Header: res.Header,
 12937  		})
 12938  	}
 12939  	if err != nil {
 12940  		return nil, err
 12941  	}
 12942  	defer googleapi.CloseBody(res)
 12943  	if err := googleapi.CheckResponse(res); err != nil {
 12944  		return nil, gensupport.WrapError(err)
 12945  	}
 12946  	ret := &Operation{
 12947  		ServerResponse: googleapi.ServerResponse{
 12948  			Header:         res.Header,
 12949  			HTTPStatusCode: res.StatusCode,
 12950  		},
 12951  	}
 12952  	target := &ret
 12953  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12954  		return nil, err
 12955  	}
 12956  	return ret, nil
 12957  }
 12958  
 12959  type ProjectsLocationsTlsRoutesDeleteCall struct {
 12960  	s          *Service
 12961  	name       string
 12962  	urlParams_ gensupport.URLParams
 12963  	ctx_       context.Context
 12964  	header_    http.Header
 12965  }
 12966  
 12967  // Delete: Deletes a single TlsRoute.
 12968  //
 12969  //   - name: A name of the TlsRoute to delete. Must be in the format
 12970  //     `projects/*/locations/global/tlsRoutes/*`.
 12971  func (r *ProjectsLocationsTlsRoutesService) Delete(name string) *ProjectsLocationsTlsRoutesDeleteCall {
 12972  	c := &ProjectsLocationsTlsRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12973  	c.name = name
 12974  	return c
 12975  }
 12976  
 12977  // Fields allows partial responses to be retrieved. See
 12978  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12979  // details.
 12980  func (c *ProjectsLocationsTlsRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesDeleteCall {
 12981  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12982  	return c
 12983  }
 12984  
 12985  // Context sets the context to be used in this call's Do method.
 12986  func (c *ProjectsLocationsTlsRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesDeleteCall {
 12987  	c.ctx_ = ctx
 12988  	return c
 12989  }
 12990  
 12991  // Header returns a http.Header that can be modified by the caller to add
 12992  // headers to the request.
 12993  func (c *ProjectsLocationsTlsRoutesDeleteCall) Header() http.Header {
 12994  	if c.header_ == nil {
 12995  		c.header_ = make(http.Header)
 12996  	}
 12997  	return c.header_
 12998  }
 12999  
 13000  func (c *ProjectsLocationsTlsRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
 13001  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13002  	var body io.Reader = nil
 13003  	c.urlParams_.Set("alt", alt)
 13004  	c.urlParams_.Set("prettyPrint", "false")
 13005  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 13006  	urls += "?" + c.urlParams_.Encode()
 13007  	req, err := http.NewRequest("DELETE", urls, body)
 13008  	if err != nil {
 13009  		return nil, err
 13010  	}
 13011  	req.Header = reqHeaders
 13012  	googleapi.Expand(req.URL, map[string]string{
 13013  		"name": c.name,
 13014  	})
 13015  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13016  }
 13017  
 13018  // Do executes the "networkservices.projects.locations.tlsRoutes.delete" call.
 13019  // Any non-2xx status code is an error. Response headers are in either
 13020  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 13021  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13022  // whether the returned error was because http.StatusNotModified was returned.
 13023  func (c *ProjectsLocationsTlsRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 13024  	gensupport.SetOptions(c.urlParams_, opts...)
 13025  	res, err := c.doRequest("json")
 13026  	if res != nil && res.StatusCode == http.StatusNotModified {
 13027  		if res.Body != nil {
 13028  			res.Body.Close()
 13029  		}
 13030  		return nil, gensupport.WrapError(&googleapi.Error{
 13031  			Code:   res.StatusCode,
 13032  			Header: res.Header,
 13033  		})
 13034  	}
 13035  	if err != nil {
 13036  		return nil, err
 13037  	}
 13038  	defer googleapi.CloseBody(res)
 13039  	if err := googleapi.CheckResponse(res); err != nil {
 13040  		return nil, gensupport.WrapError(err)
 13041  	}
 13042  	ret := &Operation{
 13043  		ServerResponse: googleapi.ServerResponse{
 13044  			Header:         res.Header,
 13045  			HTTPStatusCode: res.StatusCode,
 13046  		},
 13047  	}
 13048  	target := &ret
 13049  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13050  		return nil, err
 13051  	}
 13052  	return ret, nil
 13053  }
 13054  
 13055  type ProjectsLocationsTlsRoutesGetCall struct {
 13056  	s            *Service
 13057  	name         string
 13058  	urlParams_   gensupport.URLParams
 13059  	ifNoneMatch_ string
 13060  	ctx_         context.Context
 13061  	header_      http.Header
 13062  }
 13063  
 13064  // Get: Gets details of a single TlsRoute.
 13065  //
 13066  //   - name: A name of the TlsRoute to get. Must be in the format
 13067  //     `projects/*/locations/global/tlsRoutes/*`.
 13068  func (r *ProjectsLocationsTlsRoutesService) Get(name string) *ProjectsLocationsTlsRoutesGetCall {
 13069  	c := &ProjectsLocationsTlsRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13070  	c.name = name
 13071  	return c
 13072  }
 13073  
 13074  // Fields allows partial responses to be retrieved. See
 13075  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13076  // details.
 13077  func (c *ProjectsLocationsTlsRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesGetCall {
 13078  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13079  	return c
 13080  }
 13081  
 13082  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13083  // object's ETag matches the given value. This is useful for getting updates
 13084  // only after the object has changed since the last request.
 13085  func (c *ProjectsLocationsTlsRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesGetCall {
 13086  	c.ifNoneMatch_ = entityTag
 13087  	return c
 13088  }
 13089  
 13090  // Context sets the context to be used in this call's Do method.
 13091  func (c *ProjectsLocationsTlsRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesGetCall {
 13092  	c.ctx_ = ctx
 13093  	return c
 13094  }
 13095  
 13096  // Header returns a http.Header that can be modified by the caller to add
 13097  // headers to the request.
 13098  func (c *ProjectsLocationsTlsRoutesGetCall) Header() http.Header {
 13099  	if c.header_ == nil {
 13100  		c.header_ = make(http.Header)
 13101  	}
 13102  	return c.header_
 13103  }
 13104  
 13105  func (c *ProjectsLocationsTlsRoutesGetCall) doRequest(alt string) (*http.Response, error) {
 13106  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13107  	if c.ifNoneMatch_ != "" {
 13108  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13109  	}
 13110  	var body io.Reader = nil
 13111  	c.urlParams_.Set("alt", alt)
 13112  	c.urlParams_.Set("prettyPrint", "false")
 13113  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 13114  	urls += "?" + c.urlParams_.Encode()
 13115  	req, err := http.NewRequest("GET", urls, body)
 13116  	if err != nil {
 13117  		return nil, err
 13118  	}
 13119  	req.Header = reqHeaders
 13120  	googleapi.Expand(req.URL, map[string]string{
 13121  		"name": c.name,
 13122  	})
 13123  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13124  }
 13125  
 13126  // Do executes the "networkservices.projects.locations.tlsRoutes.get" call.
 13127  // Any non-2xx status code is an error. Response headers are in either
 13128  // *TlsRoute.ServerResponse.Header or (if a response was returned at all) in
 13129  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13130  // whether the returned error was because http.StatusNotModified was returned.
 13131  func (c *ProjectsLocationsTlsRoutesGetCall) Do(opts ...googleapi.CallOption) (*TlsRoute, error) {
 13132  	gensupport.SetOptions(c.urlParams_, opts...)
 13133  	res, err := c.doRequest("json")
 13134  	if res != nil && res.StatusCode == http.StatusNotModified {
 13135  		if res.Body != nil {
 13136  			res.Body.Close()
 13137  		}
 13138  		return nil, gensupport.WrapError(&googleapi.Error{
 13139  			Code:   res.StatusCode,
 13140  			Header: res.Header,
 13141  		})
 13142  	}
 13143  	if err != nil {
 13144  		return nil, err
 13145  	}
 13146  	defer googleapi.CloseBody(res)
 13147  	if err := googleapi.CheckResponse(res); err != nil {
 13148  		return nil, gensupport.WrapError(err)
 13149  	}
 13150  	ret := &TlsRoute{
 13151  		ServerResponse: googleapi.ServerResponse{
 13152  			Header:         res.Header,
 13153  			HTTPStatusCode: res.StatusCode,
 13154  		},
 13155  	}
 13156  	target := &ret
 13157  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13158  		return nil, err
 13159  	}
 13160  	return ret, nil
 13161  }
 13162  
 13163  type ProjectsLocationsTlsRoutesListCall struct {
 13164  	s            *Service
 13165  	parent       string
 13166  	urlParams_   gensupport.URLParams
 13167  	ifNoneMatch_ string
 13168  	ctx_         context.Context
 13169  	header_      http.Header
 13170  }
 13171  
 13172  // List: Lists TlsRoute in a given project and location.
 13173  //
 13174  //   - parent: The project and location from which the TlsRoutes should be
 13175  //     listed, specified in the format `projects/*/locations/global`.
 13176  func (r *ProjectsLocationsTlsRoutesService) List(parent string) *ProjectsLocationsTlsRoutesListCall {
 13177  	c := &ProjectsLocationsTlsRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13178  	c.parent = parent
 13179  	return c
 13180  }
 13181  
 13182  // PageSize sets the optional parameter "pageSize": Maximum number of TlsRoutes
 13183  // to return per call.
 13184  func (c *ProjectsLocationsTlsRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsTlsRoutesListCall {
 13185  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 13186  	return c
 13187  }
 13188  
 13189  // PageToken sets the optional parameter "pageToken": The value returned by the
 13190  // last `ListTlsRoutesResponse` Indicates that this is a continuation of a
 13191  // prior `ListTlsRoutes` call, and that the system should return the next page
 13192  // of data.
 13193  func (c *ProjectsLocationsTlsRoutesListCall) PageToken(pageToken string) *ProjectsLocationsTlsRoutesListCall {
 13194  	c.urlParams_.Set("pageToken", pageToken)
 13195  	return c
 13196  }
 13197  
 13198  // Fields allows partial responses to be retrieved. See
 13199  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13200  // details.
 13201  func (c *ProjectsLocationsTlsRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesListCall {
 13202  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13203  	return c
 13204  }
 13205  
 13206  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 13207  // object's ETag matches the given value. This is useful for getting updates
 13208  // only after the object has changed since the last request.
 13209  func (c *ProjectsLocationsTlsRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsTlsRoutesListCall {
 13210  	c.ifNoneMatch_ = entityTag
 13211  	return c
 13212  }
 13213  
 13214  // Context sets the context to be used in this call's Do method.
 13215  func (c *ProjectsLocationsTlsRoutesListCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesListCall {
 13216  	c.ctx_ = ctx
 13217  	return c
 13218  }
 13219  
 13220  // Header returns a http.Header that can be modified by the caller to add
 13221  // headers to the request.
 13222  func (c *ProjectsLocationsTlsRoutesListCall) Header() http.Header {
 13223  	if c.header_ == nil {
 13224  		c.header_ = make(http.Header)
 13225  	}
 13226  	return c.header_
 13227  }
 13228  
 13229  func (c *ProjectsLocationsTlsRoutesListCall) doRequest(alt string) (*http.Response, error) {
 13230  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 13231  	if c.ifNoneMatch_ != "" {
 13232  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 13233  	}
 13234  	var body io.Reader = nil
 13235  	c.urlParams_.Set("alt", alt)
 13236  	c.urlParams_.Set("prettyPrint", "false")
 13237  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/tlsRoutes")
 13238  	urls += "?" + c.urlParams_.Encode()
 13239  	req, err := http.NewRequest("GET", urls, body)
 13240  	if err != nil {
 13241  		return nil, err
 13242  	}
 13243  	req.Header = reqHeaders
 13244  	googleapi.Expand(req.URL, map[string]string{
 13245  		"parent": c.parent,
 13246  	})
 13247  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13248  }
 13249  
 13250  // Do executes the "networkservices.projects.locations.tlsRoutes.list" call.
 13251  // Any non-2xx status code is an error. Response headers are in either
 13252  // *ListTlsRoutesResponse.ServerResponse.Header or (if a response was returned
 13253  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 13254  // check whether the returned error was because http.StatusNotModified was
 13255  // returned.
 13256  func (c *ProjectsLocationsTlsRoutesListCall) Do(opts ...googleapi.CallOption) (*ListTlsRoutesResponse, error) {
 13257  	gensupport.SetOptions(c.urlParams_, opts...)
 13258  	res, err := c.doRequest("json")
 13259  	if res != nil && res.StatusCode == http.StatusNotModified {
 13260  		if res.Body != nil {
 13261  			res.Body.Close()
 13262  		}
 13263  		return nil, gensupport.WrapError(&googleapi.Error{
 13264  			Code:   res.StatusCode,
 13265  			Header: res.Header,
 13266  		})
 13267  	}
 13268  	if err != nil {
 13269  		return nil, err
 13270  	}
 13271  	defer googleapi.CloseBody(res)
 13272  	if err := googleapi.CheckResponse(res); err != nil {
 13273  		return nil, gensupport.WrapError(err)
 13274  	}
 13275  	ret := &ListTlsRoutesResponse{
 13276  		ServerResponse: googleapi.ServerResponse{
 13277  			Header:         res.Header,
 13278  			HTTPStatusCode: res.StatusCode,
 13279  		},
 13280  	}
 13281  	target := &ret
 13282  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13283  		return nil, err
 13284  	}
 13285  	return ret, nil
 13286  }
 13287  
 13288  // Pages invokes f for each page of results.
 13289  // A non-nil error returned from f will halt the iteration.
 13290  // The provided context supersedes any context provided to the Context method.
 13291  func (c *ProjectsLocationsTlsRoutesListCall) Pages(ctx context.Context, f func(*ListTlsRoutesResponse) error) error {
 13292  	c.ctx_ = ctx
 13293  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 13294  	for {
 13295  		x, err := c.Do()
 13296  		if err != nil {
 13297  			return err
 13298  		}
 13299  		if err := f(x); err != nil {
 13300  			return err
 13301  		}
 13302  		if x.NextPageToken == "" {
 13303  			return nil
 13304  		}
 13305  		c.PageToken(x.NextPageToken)
 13306  	}
 13307  }
 13308  
 13309  type ProjectsLocationsTlsRoutesPatchCall struct {
 13310  	s          *Service
 13311  	name       string
 13312  	tlsroute   *TlsRoute
 13313  	urlParams_ gensupport.URLParams
 13314  	ctx_       context.Context
 13315  	header_    http.Header
 13316  }
 13317  
 13318  // Patch: Updates the parameters of a single TlsRoute.
 13319  //
 13320  //   - name: Name of the TlsRoute resource. It matches pattern
 13321  //     `projects/*/locations/global/tlsRoutes/tls_route_name>`.
 13322  func (r *ProjectsLocationsTlsRoutesService) Patch(name string, tlsroute *TlsRoute) *ProjectsLocationsTlsRoutesPatchCall {
 13323  	c := &ProjectsLocationsTlsRoutesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 13324  	c.name = name
 13325  	c.tlsroute = tlsroute
 13326  	return c
 13327  }
 13328  
 13329  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 13330  // specify the fields to be overwritten in the TlsRoute resource by the update.
 13331  // The fields specified in the update_mask are relative to the resource, not
 13332  // the full request. A field will be overwritten if it is in the mask. If the
 13333  // user does not provide a mask then all fields will be overwritten.
 13334  func (c *ProjectsLocationsTlsRoutesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsTlsRoutesPatchCall {
 13335  	c.urlParams_.Set("updateMask", updateMask)
 13336  	return c
 13337  }
 13338  
 13339  // Fields allows partial responses to be retrieved. See
 13340  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 13341  // details.
 13342  func (c *ProjectsLocationsTlsRoutesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsTlsRoutesPatchCall {
 13343  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 13344  	return c
 13345  }
 13346  
 13347  // Context sets the context to be used in this call's Do method.
 13348  func (c *ProjectsLocationsTlsRoutesPatchCall) Context(ctx context.Context) *ProjectsLocationsTlsRoutesPatchCall {
 13349  	c.ctx_ = ctx
 13350  	return c
 13351  }
 13352  
 13353  // Header returns a http.Header that can be modified by the caller to add
 13354  // headers to the request.
 13355  func (c *ProjectsLocationsTlsRoutesPatchCall) Header() http.Header {
 13356  	if c.header_ == nil {
 13357  		c.header_ = make(http.Header)
 13358  	}
 13359  	return c.header_
 13360  }
 13361  
 13362  func (c *ProjectsLocationsTlsRoutesPatchCall) doRequest(alt string) (*http.Response, error) {
 13363  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 13364  	var body io.Reader = nil
 13365  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tlsroute)
 13366  	if err != nil {
 13367  		return nil, err
 13368  	}
 13369  	c.urlParams_.Set("alt", alt)
 13370  	c.urlParams_.Set("prettyPrint", "false")
 13371  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 13372  	urls += "?" + c.urlParams_.Encode()
 13373  	req, err := http.NewRequest("PATCH", urls, body)
 13374  	if err != nil {
 13375  		return nil, err
 13376  	}
 13377  	req.Header = reqHeaders
 13378  	googleapi.Expand(req.URL, map[string]string{
 13379  		"name": c.name,
 13380  	})
 13381  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 13382  }
 13383  
 13384  // Do executes the "networkservices.projects.locations.tlsRoutes.patch" call.
 13385  // Any non-2xx status code is an error. Response headers are in either
 13386  // *Operation.ServerResponse.Header or (if a response was returned at all) in
 13387  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 13388  // whether the returned error was because http.StatusNotModified was returned.
 13389  func (c *ProjectsLocationsTlsRoutesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
 13390  	gensupport.SetOptions(c.urlParams_, opts...)
 13391  	res, err := c.doRequest("json")
 13392  	if res != nil && res.StatusCode == http.StatusNotModified {
 13393  		if res.Body != nil {
 13394  			res.Body.Close()
 13395  		}
 13396  		return nil, gensupport.WrapError(&googleapi.Error{
 13397  			Code:   res.StatusCode,
 13398  			Header: res.Header,
 13399  		})
 13400  	}
 13401  	if err != nil {
 13402  		return nil, err
 13403  	}
 13404  	defer googleapi.CloseBody(res)
 13405  	if err := googleapi.CheckResponse(res); err != nil {
 13406  		return nil, gensupport.WrapError(err)
 13407  	}
 13408  	ret := &Operation{
 13409  		ServerResponse: googleapi.ServerResponse{
 13410  			Header:         res.Header,
 13411  			HTTPStatusCode: res.StatusCode,
 13412  		},
 13413  	}
 13414  	target := &ret
 13415  	if err := gensupport.DecodeResponse(target, res); err != nil {
 13416  		return nil, err
 13417  	}
 13418  	return ret, nil
 13419  }
 13420  

View as plain text