...

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

Documentation: google.golang.org/api/networkconnectivity/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 networkconnectivity provides access to the Network Connectivity API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest
    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/networkconnectivity/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	networkconnectivityService, err := networkconnectivity.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  //	networkconnectivityService, err := networkconnectivity.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  //	networkconnectivityService, err := networkconnectivity.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    49  //
    50  // See [google.golang.org/api/option.ClientOption] for details on options.
    51  package networkconnectivity // import "google.golang.org/api/networkconnectivity/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 = "networkconnectivity:v1"
    90  const apiName = "networkconnectivity"
    91  const apiVersion = "v1"
    92  const basePath = "https://networkconnectivity.googleapis.com/"
    93  const basePathTemplate = "https://networkconnectivity.UNIVERSE_DOMAIN/"
    94  const mtlsBasePath = "https://networkconnectivity.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.Global = NewProjectsLocationsGlobalService(s)
   172  	rs.InternalRanges = NewProjectsLocationsInternalRangesService(s)
   173  	rs.Operations = NewProjectsLocationsOperationsService(s)
   174  	rs.RegionalEndpoints = NewProjectsLocationsRegionalEndpointsService(s)
   175  	rs.ServiceClasses = NewProjectsLocationsServiceClassesService(s)
   176  	rs.ServiceConnectionMaps = NewProjectsLocationsServiceConnectionMapsService(s)
   177  	rs.ServiceConnectionPolicies = NewProjectsLocationsServiceConnectionPoliciesService(s)
   178  	rs.ServiceConnectionTokens = NewProjectsLocationsServiceConnectionTokensService(s)
   179  	rs.Spokes = NewProjectsLocationsSpokesService(s)
   180  	return rs
   181  }
   182  
   183  type ProjectsLocationsService struct {
   184  	s *Service
   185  
   186  	Global *ProjectsLocationsGlobalService
   187  
   188  	InternalRanges *ProjectsLocationsInternalRangesService
   189  
   190  	Operations *ProjectsLocationsOperationsService
   191  
   192  	RegionalEndpoints *ProjectsLocationsRegionalEndpointsService
   193  
   194  	ServiceClasses *ProjectsLocationsServiceClassesService
   195  
   196  	ServiceConnectionMaps *ProjectsLocationsServiceConnectionMapsService
   197  
   198  	ServiceConnectionPolicies *ProjectsLocationsServiceConnectionPoliciesService
   199  
   200  	ServiceConnectionTokens *ProjectsLocationsServiceConnectionTokensService
   201  
   202  	Spokes *ProjectsLocationsSpokesService
   203  }
   204  
   205  func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService {
   206  	rs := &ProjectsLocationsGlobalService{s: s}
   207  	rs.Hubs = NewProjectsLocationsGlobalHubsService(s)
   208  	rs.PolicyBasedRoutes = NewProjectsLocationsGlobalPolicyBasedRoutesService(s)
   209  	return rs
   210  }
   211  
   212  type ProjectsLocationsGlobalService struct {
   213  	s *Service
   214  
   215  	Hubs *ProjectsLocationsGlobalHubsService
   216  
   217  	PolicyBasedRoutes *ProjectsLocationsGlobalPolicyBasedRoutesService
   218  }
   219  
   220  func NewProjectsLocationsGlobalHubsService(s *Service) *ProjectsLocationsGlobalHubsService {
   221  	rs := &ProjectsLocationsGlobalHubsService{s: s}
   222  	rs.Groups = NewProjectsLocationsGlobalHubsGroupsService(s)
   223  	rs.RouteTables = NewProjectsLocationsGlobalHubsRouteTablesService(s)
   224  	return rs
   225  }
   226  
   227  type ProjectsLocationsGlobalHubsService struct {
   228  	s *Service
   229  
   230  	Groups *ProjectsLocationsGlobalHubsGroupsService
   231  
   232  	RouteTables *ProjectsLocationsGlobalHubsRouteTablesService
   233  }
   234  
   235  func NewProjectsLocationsGlobalHubsGroupsService(s *Service) *ProjectsLocationsGlobalHubsGroupsService {
   236  	rs := &ProjectsLocationsGlobalHubsGroupsService{s: s}
   237  	return rs
   238  }
   239  
   240  type ProjectsLocationsGlobalHubsGroupsService struct {
   241  	s *Service
   242  }
   243  
   244  func NewProjectsLocationsGlobalHubsRouteTablesService(s *Service) *ProjectsLocationsGlobalHubsRouteTablesService {
   245  	rs := &ProjectsLocationsGlobalHubsRouteTablesService{s: s}
   246  	rs.Routes = NewProjectsLocationsGlobalHubsRouteTablesRoutesService(s)
   247  	return rs
   248  }
   249  
   250  type ProjectsLocationsGlobalHubsRouteTablesService struct {
   251  	s *Service
   252  
   253  	Routes *ProjectsLocationsGlobalHubsRouteTablesRoutesService
   254  }
   255  
   256  func NewProjectsLocationsGlobalHubsRouteTablesRoutesService(s *Service) *ProjectsLocationsGlobalHubsRouteTablesRoutesService {
   257  	rs := &ProjectsLocationsGlobalHubsRouteTablesRoutesService{s: s}
   258  	return rs
   259  }
   260  
   261  type ProjectsLocationsGlobalHubsRouteTablesRoutesService struct {
   262  	s *Service
   263  }
   264  
   265  func NewProjectsLocationsGlobalPolicyBasedRoutesService(s *Service) *ProjectsLocationsGlobalPolicyBasedRoutesService {
   266  	rs := &ProjectsLocationsGlobalPolicyBasedRoutesService{s: s}
   267  	return rs
   268  }
   269  
   270  type ProjectsLocationsGlobalPolicyBasedRoutesService struct {
   271  	s *Service
   272  }
   273  
   274  func NewProjectsLocationsInternalRangesService(s *Service) *ProjectsLocationsInternalRangesService {
   275  	rs := &ProjectsLocationsInternalRangesService{s: s}
   276  	return rs
   277  }
   278  
   279  type ProjectsLocationsInternalRangesService struct {
   280  	s *Service
   281  }
   282  
   283  func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService {
   284  	rs := &ProjectsLocationsOperationsService{s: s}
   285  	return rs
   286  }
   287  
   288  type ProjectsLocationsOperationsService struct {
   289  	s *Service
   290  }
   291  
   292  func NewProjectsLocationsRegionalEndpointsService(s *Service) *ProjectsLocationsRegionalEndpointsService {
   293  	rs := &ProjectsLocationsRegionalEndpointsService{s: s}
   294  	return rs
   295  }
   296  
   297  type ProjectsLocationsRegionalEndpointsService struct {
   298  	s *Service
   299  }
   300  
   301  func NewProjectsLocationsServiceClassesService(s *Service) *ProjectsLocationsServiceClassesService {
   302  	rs := &ProjectsLocationsServiceClassesService{s: s}
   303  	return rs
   304  }
   305  
   306  type ProjectsLocationsServiceClassesService struct {
   307  	s *Service
   308  }
   309  
   310  func NewProjectsLocationsServiceConnectionMapsService(s *Service) *ProjectsLocationsServiceConnectionMapsService {
   311  	rs := &ProjectsLocationsServiceConnectionMapsService{s: s}
   312  	return rs
   313  }
   314  
   315  type ProjectsLocationsServiceConnectionMapsService struct {
   316  	s *Service
   317  }
   318  
   319  func NewProjectsLocationsServiceConnectionPoliciesService(s *Service) *ProjectsLocationsServiceConnectionPoliciesService {
   320  	rs := &ProjectsLocationsServiceConnectionPoliciesService{s: s}
   321  	return rs
   322  }
   323  
   324  type ProjectsLocationsServiceConnectionPoliciesService struct {
   325  	s *Service
   326  }
   327  
   328  func NewProjectsLocationsServiceConnectionTokensService(s *Service) *ProjectsLocationsServiceConnectionTokensService {
   329  	rs := &ProjectsLocationsServiceConnectionTokensService{s: s}
   330  	return rs
   331  }
   332  
   333  type ProjectsLocationsServiceConnectionTokensService struct {
   334  	s *Service
   335  }
   336  
   337  func NewProjectsLocationsSpokesService(s *Service) *ProjectsLocationsSpokesService {
   338  	rs := &ProjectsLocationsSpokesService{s: s}
   339  	return rs
   340  }
   341  
   342  type ProjectsLocationsSpokesService struct {
   343  	s *Service
   344  }
   345  
   346  // AcceptHubSpokeRequest: The request for HubService.AcceptHubSpoke.
   347  type AcceptHubSpokeRequest struct {
   348  	// RequestId: Optional. A request ID to identify requests. Specify a unique
   349  	// request ID so that if you must retry your request, the server knows to
   350  	// ignore the request if it has already been completed. The server guarantees
   351  	// that a request doesn't result in creation of duplicate commitments for at
   352  	// least 60 minutes. For example, consider a situation where you make an
   353  	// initial request and the request times out. If you make the request again
   354  	// with the same request ID, the server can check to see whether the original
   355  	// operation was received. If it was, the server ignores the second request.
   356  	// This behavior prevents clients from mistakenly creating duplicate
   357  	// commitments. The request ID must be a valid UUID, with the exception that
   358  	// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
   359  	RequestId string `json:"requestId,omitempty"`
   360  	// SpokeUri: Required. The URI of the spoke to accept into the hub.
   361  	SpokeUri string `json:"spokeUri,omitempty"`
   362  	// ForceSendFields is a list of field names (e.g. "RequestId") to
   363  	// unconditionally include in API requests. By default, fields with empty or
   364  	// default values are omitted from API requests. See
   365  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   366  	// details.
   367  	ForceSendFields []string `json:"-"`
   368  	// NullFields is a list of field names (e.g. "RequestId") to include in API
   369  	// requests with the JSON null value. By default, fields with empty values are
   370  	// omitted from API requests. See
   371  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   372  	NullFields []string `json:"-"`
   373  }
   374  
   375  func (s *AcceptHubSpokeRequest) MarshalJSON() ([]byte, error) {
   376  	type NoMethod AcceptHubSpokeRequest
   377  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   378  }
   379  
   380  // AcceptHubSpokeResponse: The response for HubService.AcceptHubSpoke.
   381  type AcceptHubSpokeResponse struct {
   382  	// Spoke: The spoke that was operated on.
   383  	Spoke *Spoke `json:"spoke,omitempty"`
   384  	// ForceSendFields is a list of field names (e.g. "Spoke") to unconditionally
   385  	// include in API requests. By default, fields with empty or default values are
   386  	// omitted from API requests. See
   387  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   388  	// details.
   389  	ForceSendFields []string `json:"-"`
   390  	// NullFields is a list of field names (e.g. "Spoke") to include in API
   391  	// requests with the JSON null value. By default, fields with empty values are
   392  	// omitted from API requests. See
   393  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   394  	NullFields []string `json:"-"`
   395  }
   396  
   397  func (s *AcceptHubSpokeResponse) MarshalJSON() ([]byte, error) {
   398  	type NoMethod AcceptHubSpokeResponse
   399  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   400  }
   401  
   402  // AuditConfig: Specifies the audit configuration for a service. The
   403  // configuration determines which permission types are logged, and what
   404  // identities, if any, are exempted from logging. An AuditConfig must have one
   405  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   406  // and a specific service, the union of the two AuditConfigs is used for that
   407  // service: the log_types specified in each AuditConfig are enabled, and the
   408  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   409  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   410  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   411  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   412  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   413  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   414  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   415  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   416  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   417  // `aliya@example.com` from DATA_WRITE logging.
   418  type AuditConfig struct {
   419  	// AuditLogConfigs: The configuration for logging of each type of permission.
   420  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   421  	// Service: Specifies a service that will be enabled for audit logging. For
   422  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   423  	// is a special value that covers all services.
   424  	Service string `json:"service,omitempty"`
   425  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   426  	// unconditionally include in API requests. By default, fields with empty or
   427  	// default values are omitted from API requests. See
   428  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   429  	// details.
   430  	ForceSendFields []string `json:"-"`
   431  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   432  	// API requests with the JSON null value. By default, fields with empty values
   433  	// are omitted from API requests. See
   434  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   435  	NullFields []string `json:"-"`
   436  }
   437  
   438  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   439  	type NoMethod AuditConfig
   440  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   441  }
   442  
   443  // AuditLogConfig: Provides the configuration for logging a type of
   444  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   445  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   446  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   447  // exempting jose@example.com from DATA_READ logging.
   448  type AuditLogConfig struct {
   449  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   450  	// type of permission. Follows the same format of Binding.members.
   451  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   452  	// LogType: The log type that this config enables.
   453  	//
   454  	// Possible values:
   455  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   456  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   457  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   458  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   459  	LogType string `json:"logType,omitempty"`
   460  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   461  	// unconditionally include in API requests. By default, fields with empty or
   462  	// default values are omitted from API requests. See
   463  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   464  	// details.
   465  	ForceSendFields []string `json:"-"`
   466  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   467  	// API requests with the JSON null value. By default, fields with empty values
   468  	// are omitted from API requests. See
   469  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   470  	NullFields []string `json:"-"`
   471  }
   472  
   473  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   474  	type NoMethod AuditLogConfig
   475  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   476  }
   477  
   478  // AutoAccept: The auto-accept setting for a group controls whether proposed
   479  // spokes are automatically attached to the hub. If auto-accept is enabled, the
   480  // spoke immediately is attached to the hub and becomes part of the group. In
   481  // this case, the new spoke is in the ACTIVE state. If auto-accept is disabled,
   482  // the spoke goes to the INACTIVE state, and it must be reviewed and accepted
   483  // by a hub administrator.
   484  type AutoAccept struct {
   485  	// AutoAcceptProjects: A list of project ids or project numbers for which you
   486  	// want to enable auto-accept. The auto-accept setting is applied to spokes
   487  	// being created or updated in these projects.
   488  	AutoAcceptProjects []string `json:"autoAcceptProjects,omitempty"`
   489  	// ForceSendFields is a list of field names (e.g. "AutoAcceptProjects") to
   490  	// unconditionally include in API requests. By default, fields with empty or
   491  	// default values are omitted from API requests. See
   492  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   493  	// details.
   494  	ForceSendFields []string `json:"-"`
   495  	// NullFields is a list of field names (e.g. "AutoAcceptProjects") to include
   496  	// in API requests with the JSON null value. By default, fields with empty
   497  	// values are omitted from API requests. See
   498  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   499  	NullFields []string `json:"-"`
   500  }
   501  
   502  func (s *AutoAccept) MarshalJSON() ([]byte, error) {
   503  	type NoMethod AutoAccept
   504  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   505  }
   506  
   507  // Binding: Associates `members`, or principals, with a `role`.
   508  type Binding struct {
   509  	// Condition: The condition that is associated with this binding. If the
   510  	// condition evaluates to `true`, then this binding applies to the current
   511  	// request. If the condition evaluates to `false`, then this binding does not
   512  	// apply to the current request. However, a different role binding might grant
   513  	// the same role to one or more of the principals in this binding. To learn
   514  	// which resources support conditions in their IAM policies, see the IAM
   515  	// documentation
   516  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   517  	Condition *Expr `json:"condition,omitempty"`
   518  	// Members: Specifies the principals requesting access for a Google Cloud
   519  	// resource. `members` can have the following values: * `allUsers`: A special
   520  	// identifier that represents anyone who is on the internet; with or without a
   521  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   522  	// represents anyone who is authenticated with a Google account or a service
   523  	// account. Does not include identities that come from external identity
   524  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   525  	// address that represents a specific Google account. For example,
   526  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   527  	// represents a Google service account. For example,
   528  	// `my-other-app@appspot.gserviceaccount.com`. *
   529  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   530  	// identifier for a Kubernetes service account
   531  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   532  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   533  	// `group:{emailid}`: An email address that represents a Google group. For
   534  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   535  	// (primary) that represents all the users of that domain. For example,
   536  	// `google.com` or `example.com`. *
   537  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   538  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   539  	// pool. *
   540  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   541  	// group/{group_id}`: All workforce identities in a group. *
   542  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   543  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   544  	// a specific attribute value. *
   545  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   546  	// *`: All identities in a workforce identity pool. *
   547  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   548  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   549  	// identity in a workload identity pool. *
   550  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   551  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   552  	// group. *
   553  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   554  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   555  	// `: All identities in a workload identity pool with a certain attribute. *
   556  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   557  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   558  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   559  	// unique identifier) representing a user that has been recently deleted. For
   560  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   561  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   562  	// retains the role in the binding. *
   563  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   564  	// unique identifier) representing a service account that has been recently
   565  	// deleted. For example,
   566  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   567  	// service account is undeleted, this value reverts to
   568  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   569  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   570  	// address (plus unique identifier) representing a Google group that has been
   571  	// recently deleted. For example,
   572  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   573  	// this value reverts to `group:{emailid}` and the recovered group retains the
   574  	// role in the binding. *
   575  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   576  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   577  	// workforce identity pool. For example,
   578  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   579  	// ol-id/subject/my-subject-attribute-value`.
   580  	Members []string `json:"members,omitempty"`
   581  	// Role: Role that is assigned to the list of `members`, or principals. For
   582  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   583  	// of the IAM roles and permissions, see the IAM documentation
   584  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   585  	// available pre-defined roles, see here
   586  	// (https://cloud.google.com/iam/docs/understanding-roles).
   587  	Role string `json:"role,omitempty"`
   588  	// ForceSendFields is a list of field names (e.g. "Condition") to
   589  	// unconditionally include in API requests. By default, fields with empty or
   590  	// default values are omitted from API requests. See
   591  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   592  	// details.
   593  	ForceSendFields []string `json:"-"`
   594  	// NullFields is a list of field names (e.g. "Condition") to include in API
   595  	// requests with the JSON null value. By default, fields with empty values are
   596  	// omitted from API requests. See
   597  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   598  	NullFields []string `json:"-"`
   599  }
   600  
   601  func (s *Binding) MarshalJSON() ([]byte, error) {
   602  	type NoMethod Binding
   603  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   604  }
   605  
   606  // ConsumerPscConfig: Allow the producer to specify which consumers can connect
   607  // to it.
   608  type ConsumerPscConfig struct {
   609  	// DisableGlobalAccess: This is used in PSC consumer ForwardingRule to control
   610  	// whether the PSC endpoint can be accessed from another region.
   611  	DisableGlobalAccess bool `json:"disableGlobalAccess,omitempty"`
   612  	// Network: The resource path of the consumer network where PSC connections are
   613  	// allowed to be created in. Note, this network does not need be in the
   614  	// ConsumerPscConfig.project in the case of SharedVPC. Example:
   615  	// projects/{projectNumOrId}/global/networks/{networkId}.
   616  	Network string `json:"network,omitempty"`
   617  	// ProducerInstanceId: Immutable. An immutable identifier for the producer
   618  	// instance.
   619  	ProducerInstanceId string `json:"producerInstanceId,omitempty"`
   620  	// Project: The consumer project where PSC connections are allowed to be
   621  	// created in.
   622  	Project string `json:"project,omitempty"`
   623  	// State: Output only. Overall state of PSC Connections management for this
   624  	// consumer psc config.
   625  	//
   626  	// Possible values:
   627  	//   "STATE_UNSPECIFIED" - Default state, when Connection Map is created
   628  	// initially.
   629  	//   "VALID" - Set when policy and map configuration is valid, and their
   630  	// matching can lead to allowing creation of PSC Connections subject to other
   631  	// constraints like connections limit.
   632  	//   "CONNECTION_POLICY_MISSING" - No Service Connection Policy found for this
   633  	// network and Service Class
   634  	//   "POLICY_LIMIT_REACHED" - Service Connection Policy limit reached for this
   635  	// network and Service Class
   636  	State string `json:"state,omitempty"`
   637  	// ForceSendFields is a list of field names (e.g. "DisableGlobalAccess") to
   638  	// unconditionally include in API requests. By default, fields with empty or
   639  	// default values are omitted from API requests. See
   640  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   641  	// details.
   642  	ForceSendFields []string `json:"-"`
   643  	// NullFields is a list of field names (e.g. "DisableGlobalAccess") to include
   644  	// in API requests with the JSON null value. By default, fields with empty
   645  	// values are omitted from API requests. See
   646  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   647  	NullFields []string `json:"-"`
   648  }
   649  
   650  func (s *ConsumerPscConfig) MarshalJSON() ([]byte, error) {
   651  	type NoMethod ConsumerPscConfig
   652  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   653  }
   654  
   655  // ConsumerPscConnection: PSC connection details on consumer side.
   656  type ConsumerPscConnection struct {
   657  	// Error: The most recent error during operating this connection.
   658  	Error *GoogleRpcStatus `json:"error,omitempty"`
   659  	// ErrorInfo: Output only. The error info for the latest error during operating
   660  	// this connection.
   661  	ErrorInfo *GoogleRpcErrorInfo `json:"errorInfo,omitempty"`
   662  	// ErrorType: The error type indicates whether the error is consumer facing,
   663  	// producer facing or system internal.
   664  	//
   665  	// Possible values:
   666  	//   "CONNECTION_ERROR_TYPE_UNSPECIFIED" - An invalid error type as the default
   667  	// case.
   668  	//   "ERROR_INTERNAL" - The error is due to Service Automation system internal.
   669  	//   "ERROR_CONSUMER_SIDE" - The error is due to the setup on consumer side.
   670  	//   "ERROR_PRODUCER_SIDE" - The error is due to the setup on producer side.
   671  	ErrorType string `json:"errorType,omitempty"`
   672  	// ForwardingRule: The URI of the consumer forwarding rule created. Example:
   673  	// projects/{projectNumOrId}/regions/us-east1/networks/{resourceId}.
   674  	ForwardingRule string `json:"forwardingRule,omitempty"`
   675  	// GceOperation: The last Compute Engine operation to setup PSC connection.
   676  	GceOperation string `json:"gceOperation,omitempty"`
   677  	// Ip: The IP literal allocated on the consumer network for the PSC forwarding
   678  	// rule that is created to connect to the producer service attachment in this
   679  	// service connection map.
   680  	Ip string `json:"ip,omitempty"`
   681  	// Network: The consumer network whose PSC forwarding rule is connected to the
   682  	// service attachments in this service connection map. Note that the network
   683  	// could be on a different project (shared VPC).
   684  	Network string `json:"network,omitempty"`
   685  	// ProducerInstanceId: Immutable. An immutable identifier for the producer
   686  	// instance.
   687  	ProducerInstanceId string `json:"producerInstanceId,omitempty"`
   688  	// Project: The consumer project whose PSC forwarding rule is connected to the
   689  	// service attachments in this service connection map.
   690  	Project string `json:"project,omitempty"`
   691  	// PscConnectionId: The PSC connection id of the PSC forwarding rule connected
   692  	// to the service attachments in this service connection map.
   693  	PscConnectionId string `json:"pscConnectionId,omitempty"`
   694  	// SelectedSubnetwork: Output only. The URI of the selected subnetwork selected
   695  	// to allocate IP address for this connection.
   696  	SelectedSubnetwork string `json:"selectedSubnetwork,omitempty"`
   697  	// ServiceAttachmentUri: The URI of a service attachment which is the target of
   698  	// the PSC connection.
   699  	ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"`
   700  	// State: The state of the PSC connection.
   701  	//
   702  	// Possible values:
   703  	//   "STATE_UNSPECIFIED" - An invalid state as the default case.
   704  	//   "ACTIVE" - The connection is fully established and ready to use.
   705  	//   "FAILED" - The connection is not functional since some resources on the
   706  	// connection fail to be created.
   707  	//   "CREATING" - The connection is being created.
   708  	//   "DELETING" - The connection is being deleted.
   709  	State string `json:"state,omitempty"`
   710  	// ForceSendFields is a list of field names (e.g. "Error") to unconditionally
   711  	// include in API requests. By default, fields with empty or default values are
   712  	// omitted from API requests. See
   713  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   714  	// details.
   715  	ForceSendFields []string `json:"-"`
   716  	// NullFields is a list of field names (e.g. "Error") to include in API
   717  	// requests with the JSON null value. By default, fields with empty values are
   718  	// omitted from API requests. See
   719  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   720  	NullFields []string `json:"-"`
   721  }
   722  
   723  func (s *ConsumerPscConnection) MarshalJSON() ([]byte, error) {
   724  	type NoMethod ConsumerPscConnection
   725  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   726  }
   727  
   728  // Empty: A generic empty message that you can re-use to avoid defining
   729  // duplicated empty messages in your APIs. A typical example is to use it as
   730  // the request or the response type of an API method. For instance: service Foo
   731  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   732  type Empty struct {
   733  	// ServerResponse contains the HTTP response code and headers from the server.
   734  	googleapi.ServerResponse `json:"-"`
   735  }
   736  
   737  // Expr: Represents a textual expression in the Common Expression Language
   738  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   739  // of CEL are documented at https://github.com/google/cel-spec. Example
   740  // (Comparison): title: "Summary size limit" description: "Determines if a
   741  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   742  // Example (Equality): title: "Requestor is owner" description: "Determines if
   743  // requestor is the document owner" expression: "document.owner ==
   744  // request.auth.claims.email" Example (Logic): title: "Public documents"
   745  // description: "Determine whether the document should be publicly visible"
   746  // expression: "document.type != 'private' && document.type != 'internal'"
   747  // Example (Data Manipulation): title: "Notification string" description:
   748  // "Create a notification string with a timestamp." expression: "'New message
   749  // received at ' + string(document.create_time)" The exact variables and
   750  // functions that may be referenced within an expression are determined by the
   751  // service that evaluates it. See the service documentation for additional
   752  // information.
   753  type Expr struct {
   754  	// Description: Optional. Description of the expression. This is a longer text
   755  	// which describes the expression, e.g. when hovered over it in a UI.
   756  	Description string `json:"description,omitempty"`
   757  	// Expression: Textual representation of an expression in Common Expression
   758  	// Language syntax.
   759  	Expression string `json:"expression,omitempty"`
   760  	// Location: Optional. String indicating the location of the expression for
   761  	// error reporting, e.g. a file name and a position in the file.
   762  	Location string `json:"location,omitempty"`
   763  	// Title: Optional. Title for the expression, i.e. a short string describing
   764  	// its purpose. This can be used e.g. in UIs which allow to enter the
   765  	// expression.
   766  	Title string `json:"title,omitempty"`
   767  	// ForceSendFields is a list of field names (e.g. "Description") to
   768  	// unconditionally include in API requests. By default, fields with empty or
   769  	// default values are omitted from API requests. See
   770  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   771  	// details.
   772  	ForceSendFields []string `json:"-"`
   773  	// NullFields is a list of field names (e.g. "Description") to include in API
   774  	// requests with the JSON null value. By default, fields with empty values are
   775  	// omitted from API requests. See
   776  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   777  	NullFields []string `json:"-"`
   778  }
   779  
   780  func (s *Expr) MarshalJSON() ([]byte, error) {
   781  	type NoMethod Expr
   782  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   783  }
   784  
   785  // Filter: Filter matches L4 traffic.
   786  type Filter struct {
   787  	// DestRange: Optional. The destination IP range of outgoing packets that this
   788  	// policy-based route applies to. Default is "0.0.0.0/0" if protocol version is
   789  	// IPv4.
   790  	DestRange string `json:"destRange,omitempty"`
   791  	// IpProtocol: Optional. The IP protocol that this policy-based route applies
   792  	// to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.
   793  	IpProtocol string `json:"ipProtocol,omitempty"`
   794  	// ProtocolVersion: Required. Internet protocol versions this policy-based
   795  	// route applies to. For this version, only IPV4 is supported.
   796  	//
   797  	// Possible values:
   798  	//   "PROTOCOL_VERSION_UNSPECIFIED" - Default value.
   799  	//   "IPV4" - The PBR is for IPv4 internet protocol traffic.
   800  	ProtocolVersion string `json:"protocolVersion,omitempty"`
   801  	// SrcRange: Optional. The source IP range of outgoing packets that this
   802  	// policy-based route applies to. Default is "0.0.0.0/0" if protocol version is
   803  	// IPv4.
   804  	SrcRange string `json:"srcRange,omitempty"`
   805  	// ForceSendFields is a list of field names (e.g. "DestRange") to
   806  	// unconditionally include in API requests. By default, fields with empty or
   807  	// default values are omitted from API requests. See
   808  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   809  	// details.
   810  	ForceSendFields []string `json:"-"`
   811  	// NullFields is a list of field names (e.g. "DestRange") to include in API
   812  	// requests with the JSON null value. By default, fields with empty values are
   813  	// omitted from API requests. See
   814  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   815  	NullFields []string `json:"-"`
   816  }
   817  
   818  func (s *Filter) MarshalJSON() ([]byte, error) {
   819  	type NoMethod Filter
   820  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   821  }
   822  
   823  // GoogleLongrunningCancelOperationRequest: The request message for
   824  // Operations.CancelOperation.
   825  type GoogleLongrunningCancelOperationRequest struct {
   826  }
   827  
   828  // GoogleLongrunningListOperationsResponse: The response message for
   829  // Operations.ListOperations.
   830  type GoogleLongrunningListOperationsResponse struct {
   831  	// NextPageToken: The standard List next-page token.
   832  	NextPageToken string `json:"nextPageToken,omitempty"`
   833  	// Operations: A list of operations that matches the specified filter in the
   834  	// request.
   835  	Operations []*GoogleLongrunningOperation `json:"operations,omitempty"`
   836  
   837  	// ServerResponse contains the HTTP response code and headers from the server.
   838  	googleapi.ServerResponse `json:"-"`
   839  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
   840  	// unconditionally include in API requests. By default, fields with empty or
   841  	// default values are omitted from API requests. See
   842  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   843  	// details.
   844  	ForceSendFields []string `json:"-"`
   845  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
   846  	// requests with the JSON null value. By default, fields with empty values are
   847  	// omitted from API requests. See
   848  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   849  	NullFields []string `json:"-"`
   850  }
   851  
   852  func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) {
   853  	type NoMethod GoogleLongrunningListOperationsResponse
   854  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   855  }
   856  
   857  // GoogleLongrunningOperation: This resource represents a long-running
   858  // operation that is the result of a network API call.
   859  type GoogleLongrunningOperation struct {
   860  	// Done: If the value is `false`, it means the operation is still in progress.
   861  	// If `true`, the operation is completed, and either `error` or `response` is
   862  	// available.
   863  	Done bool `json:"done,omitempty"`
   864  	// Error: The error result of the operation in case of failure or cancellation.
   865  	Error *GoogleRpcStatus `json:"error,omitempty"`
   866  	// Metadata: Service-specific metadata associated with the operation. It
   867  	// typically contains progress information and common metadata such as create
   868  	// time. Some services might not provide such metadata. Any method that returns
   869  	// a long-running operation should document the metadata type, if any.
   870  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
   871  	// Name: The server-assigned name, which is only unique within the same service
   872  	// that originally returns it. If you use the default HTTP mapping, the `name`
   873  	// should be a resource name ending with `operations/{unique_id}`.
   874  	Name string `json:"name,omitempty"`
   875  	// Response: The normal, successful response of the operation. If the original
   876  	// method returns no data on success, such as `Delete`, the response is
   877  	// `google.protobuf.Empty`. If the original method is standard
   878  	// `Get`/`Create`/`Update`, the response should be the resource. For other
   879  	// methods, the response should have the type `XxxResponse`, where `Xxx` is the
   880  	// original method name. For example, if the original method name is
   881  	// `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
   882  	Response googleapi.RawMessage `json:"response,omitempty"`
   883  
   884  	// ServerResponse contains the HTTP response code and headers from the server.
   885  	googleapi.ServerResponse `json:"-"`
   886  	// ForceSendFields is a list of field names (e.g. "Done") to unconditionally
   887  	// include in API requests. By default, fields with empty or default values are
   888  	// omitted from API requests. See
   889  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   890  	// details.
   891  	ForceSendFields []string `json:"-"`
   892  	// NullFields is a list of field names (e.g. "Done") to include in API requests
   893  	// with the JSON null value. By default, fields with empty values are omitted
   894  	// from API requests. See
   895  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   896  	NullFields []string `json:"-"`
   897  }
   898  
   899  func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) {
   900  	type NoMethod GoogleLongrunningOperation
   901  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   902  }
   903  
   904  // GoogleRpcErrorInfo: Describes the cause of the error with structured
   905  // details. Example of an error when contacting the "pubsub.googleapis.com" API
   906  // when it is not enabled: { "reason": "API_DISABLED" "domain":
   907  // "googleapis.com" "metadata": { "resource": "projects/123", "service":
   908  // "pubsub.googleapis.com" } } This response indicates that the
   909  // pubsub.googleapis.com API is not enabled. Example of an error that is
   910  // returned when attempting to create a Spanner instance in a region that is
   911  // out of stock: { "reason": "STOCKOUT" "domain": "spanner.googleapis.com",
   912  // "metadata": { "availableRegions": "us-central1,us-east2" } }
   913  type GoogleRpcErrorInfo struct {
   914  	// Domain: The logical grouping to which the "reason" belongs. The error domain
   915  	// is typically the registered service name of the tool or product that
   916  	// generates the error. Example: "pubsub.googleapis.com". If the error is
   917  	// generated by some common infrastructure, the error domain must be a globally
   918  	// unique value that identifies the infrastructure. For Google API
   919  	// infrastructure, the error domain is "googleapis.com".
   920  	Domain string `json:"domain,omitempty"`
   921  	// Metadata: Additional structured details about this error. Keys must match
   922  	// /a-z+/ but should ideally be lowerCamelCase. Also they must be limited to 64
   923  	// characters in length. When identifying the current value of an exceeded
   924  	// limit, the units should be contained in the key, not the value. For example,
   925  	// rather than {"instanceLimit": "100/request"}, should be returned as,
   926  	// {"instanceLimitPerRequest": "100"}, if the client exceeds the number of
   927  	// instances that can be created in a single (batch) request.
   928  	Metadata map[string]string `json:"metadata,omitempty"`
   929  	// Reason: The reason of the error. This is a constant value that identifies
   930  	// the proximate cause of the error. Error reasons are unique within a
   931  	// particular domain of errors. This should be at most 63 characters and match
   932  	// a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.
   933  	Reason string `json:"reason,omitempty"`
   934  	// ForceSendFields is a list of field names (e.g. "Domain") to unconditionally
   935  	// include in API requests. By default, fields with empty or default values are
   936  	// omitted from API requests. See
   937  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   938  	// details.
   939  	ForceSendFields []string `json:"-"`
   940  	// NullFields is a list of field names (e.g. "Domain") to include in API
   941  	// requests with the JSON null value. By default, fields with empty values are
   942  	// omitted from API requests. See
   943  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   944  	NullFields []string `json:"-"`
   945  }
   946  
   947  func (s *GoogleRpcErrorInfo) MarshalJSON() ([]byte, error) {
   948  	type NoMethod GoogleRpcErrorInfo
   949  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   950  }
   951  
   952  // GoogleRpcStatus: The `Status` type defines a logical error model that is
   953  // suitable for different programming environments, including REST APIs and RPC
   954  // APIs. It is used by gRPC (https://github.com/grpc). Each `Status` message
   955  // contains three pieces of data: error code, error message, and error details.
   956  // You can find out more about this error model and how to work with it in the
   957  // API Design Guide (https://cloud.google.com/apis/design/errors).
   958  type GoogleRpcStatus struct {
   959  	// Code: The status code, which should be an enum value of google.rpc.Code.
   960  	Code int64 `json:"code,omitempty"`
   961  	// Details: A list of messages that carry the error details. There is a common
   962  	// set of message types for APIs to use.
   963  	Details []googleapi.RawMessage `json:"details,omitempty"`
   964  	// Message: A developer-facing error message, which should be in English. Any
   965  	// user-facing error message should be localized and sent in the
   966  	// google.rpc.Status.details field, or localized by the client.
   967  	Message string `json:"message,omitempty"`
   968  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
   969  	// include in API requests. By default, fields with empty or default values are
   970  	// omitted from API requests. See
   971  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   972  	// details.
   973  	ForceSendFields []string `json:"-"`
   974  	// NullFields is a list of field names (e.g. "Code") to include in API requests
   975  	// with the JSON null value. By default, fields with empty values are omitted
   976  	// from API requests. See
   977  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   978  	NullFields []string `json:"-"`
   979  }
   980  
   981  func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) {
   982  	type NoMethod GoogleRpcStatus
   983  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   984  }
   985  
   986  // Group: A group represents a subset of spokes attached to a hub.
   987  type Group struct {
   988  	// AutoAccept: Optional. The auto-accept setting for this group.
   989  	AutoAccept *AutoAccept `json:"autoAccept,omitempty"`
   990  	// CreateTime: Output only. The time the group was created.
   991  	CreateTime string `json:"createTime,omitempty"`
   992  	// Description: Optional. The description of the group.
   993  	Description string `json:"description,omitempty"`
   994  	// Labels: Optional. Labels in key-value pair format. For more information
   995  	// about labels, see Requirements for labels
   996  	// (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
   997  	Labels map[string]string `json:"labels,omitempty"`
   998  	// Name: Immutable. The name of the group. Group names must be unique. They use
   999  	// the following form:
  1000  	// `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`
  1001  	Name string `json:"name,omitempty"`
  1002  	// RouteTable: Output only. The name of the route table that corresponds to
  1003  	// this group. They use the following form:
  1004  	// `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_
  1005  	// table_id}`
  1006  	RouteTable string `json:"routeTable,omitempty"`
  1007  	// State: Output only. The current lifecycle state of this group.
  1008  	//
  1009  	// Possible values:
  1010  	//   "STATE_UNSPECIFIED" - No state information available
  1011  	//   "CREATING" - The resource's create operation is in progress.
  1012  	//   "ACTIVE" - The resource is active
  1013  	//   "DELETING" - The resource's delete operation is in progress.
  1014  	//   "ACCEPTING" - The resource's accept operation is in progress.
  1015  	//   "REJECTING" - The resource's reject operation is in progress.
  1016  	//   "UPDATING" - The resource's update operation is in progress.
  1017  	//   "INACTIVE" - The resource is inactive.
  1018  	//   "OBSOLETE" - The hub associated with this spoke resource has been deleted.
  1019  	// This state applies to spoke resources only.
  1020  	State string `json:"state,omitempty"`
  1021  	// Uid: Output only. The Google-generated UUID for the group. This value is
  1022  	// unique across all group resources. If a group is deleted and another with
  1023  	// the same name is created, the new route table is assigned a different
  1024  	// unique_id.
  1025  	Uid string `json:"uid,omitempty"`
  1026  	// UpdateTime: Output only. The time the group was last updated.
  1027  	UpdateTime string `json:"updateTime,omitempty"`
  1028  
  1029  	// ServerResponse contains the HTTP response code and headers from the server.
  1030  	googleapi.ServerResponse `json:"-"`
  1031  	// ForceSendFields is a list of field names (e.g. "AutoAccept") to
  1032  	// unconditionally include in API requests. By default, fields with empty or
  1033  	// default values are omitted from API requests. See
  1034  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1035  	// details.
  1036  	ForceSendFields []string `json:"-"`
  1037  	// NullFields is a list of field names (e.g. "AutoAccept") to include in API
  1038  	// requests with the JSON null value. By default, fields with empty values are
  1039  	// omitted from API requests. See
  1040  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1041  	NullFields []string `json:"-"`
  1042  }
  1043  
  1044  func (s *Group) MarshalJSON() ([]byte, error) {
  1045  	type NoMethod Group
  1046  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1047  }
  1048  
  1049  // Hub: A Network Connectivity Center hub is a global management resource to
  1050  // which you attach spokes. A single hub can contain spokes from multiple
  1051  // regions. However, if any of a hub's spokes use the site-to-site data
  1052  // transfer feature, the resources associated with those spokes must all be in
  1053  // the same VPC network. Spokes that do not use site-to-site data transfer can
  1054  // be associated with any VPC network in your project.
  1055  type Hub struct {
  1056  	// CreateTime: Output only. The time the hub was created.
  1057  	CreateTime string `json:"createTime,omitempty"`
  1058  	// Description: An optional description of the hub.
  1059  	Description string `json:"description,omitempty"`
  1060  	// ExportPsc: Optional. Whether Private Service Connect transitivity is enabled
  1061  	// for the hub. If true, Private Service Connect endpoints in VPC spokes
  1062  	// attached to the hub are made accessible to other VPC spokes attached to the
  1063  	// hub. The default value is false.
  1064  	ExportPsc bool `json:"exportPsc,omitempty"`
  1065  	// Labels: Optional labels in key-value pair format. For more information about
  1066  	// labels, see Requirements for labels
  1067  	// (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
  1068  	Labels map[string]string `json:"labels,omitempty"`
  1069  	// Name: Immutable. The name of the hub. Hub names must be unique. They use the
  1070  	// following form: `projects/{project_number}/locations/global/hubs/{hub_id}`
  1071  	Name string `json:"name,omitempty"`
  1072  	// PolicyMode: Optional. The policy mode of this hub. This field can be either
  1073  	// PRESET or CUSTOM. If unspecified, the policy_mode defaults to PRESET.
  1074  	//
  1075  	// Possible values:
  1076  	//   "POLICY_MODE_UNSPECIFIED" - Policy mode is unspecified. It defaults to
  1077  	// PRESET with preset_topology = MESH.
  1078  	//   "PRESET" - Hub uses one of the preset topologies.
  1079  	PolicyMode string `json:"policyMode,omitempty"`
  1080  	// PresetTopology: Optional. The topology implemented in this hub. Currently,
  1081  	// this field is only used when policy_mode = PRESET. The available preset
  1082  	// topologies are MESH and STAR. If preset_topology is unspecified and
  1083  	// policy_mode = PRESET, the preset_topology defaults to MESH. When policy_mode
  1084  	// = CUSTOM, the preset_topology is set to PRESET_TOPOLOGY_UNSPECIFIED.
  1085  	//
  1086  	// Possible values:
  1087  	//   "PRESET_TOPOLOGY_UNSPECIFIED" - Preset topology is unspecified. When
  1088  	// policy_mode = PRESET, it defaults to MESH.
  1089  	//   "MESH" - Mesh topology is implemented. Group `default` is automatically
  1090  	// created. All spokes in the hub are added to group `default`.
  1091  	//   "STAR" - Star topology is implemented. Two groups, `center` and `edge`,
  1092  	// are automatically created along with hub creation. Spokes have to join one
  1093  	// of the groups during creation.
  1094  	PresetTopology string `json:"presetTopology,omitempty"`
  1095  	// RouteTables: Output only. The route tables that belong to this hub. They use
  1096  	// the following form:
  1097  	// `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_
  1098  	// table_id}` This field is read-only. Network Connectivity Center
  1099  	// automatically populates it based on the route tables nested under the hub.
  1100  	RouteTables []string `json:"routeTables,omitempty"`
  1101  	// RoutingVpcs: The VPC networks associated with this hub's spokes. This field
  1102  	// is read-only. Network Connectivity Center automatically populates it based
  1103  	// on the set of spokes attached to the hub.
  1104  	RoutingVpcs []*RoutingVPC `json:"routingVpcs,omitempty"`
  1105  	// SpokeSummary: Output only. A summary of the spokes associated with a hub.
  1106  	// The summary includes a count of spokes according to type and according to
  1107  	// state. If any spokes are inactive, the summary also lists the reasons they
  1108  	// are inactive, including a count for each reason.
  1109  	SpokeSummary *SpokeSummary `json:"spokeSummary,omitempty"`
  1110  	// State: Output only. The current lifecycle state of this hub.
  1111  	//
  1112  	// Possible values:
  1113  	//   "STATE_UNSPECIFIED" - No state information available
  1114  	//   "CREATING" - The resource's create operation is in progress.
  1115  	//   "ACTIVE" - The resource is active
  1116  	//   "DELETING" - The resource's delete operation is in progress.
  1117  	//   "ACCEPTING" - The resource's accept operation is in progress.
  1118  	//   "REJECTING" - The resource's reject operation is in progress.
  1119  	//   "UPDATING" - The resource's update operation is in progress.
  1120  	//   "INACTIVE" - The resource is inactive.
  1121  	//   "OBSOLETE" - The hub associated with this spoke resource has been deleted.
  1122  	// This state applies to spoke resources only.
  1123  	State string `json:"state,omitempty"`
  1124  	// UniqueId: Output only. The Google-generated UUID for the hub. This value is
  1125  	// unique across all hub resources. If a hub is deleted and another with the
  1126  	// same name is created, the new hub is assigned a different unique_id.
  1127  	UniqueId string `json:"uniqueId,omitempty"`
  1128  	// UpdateTime: Output only. The time the hub was last updated.
  1129  	UpdateTime string `json:"updateTime,omitempty"`
  1130  
  1131  	// ServerResponse contains the HTTP response code and headers from the server.
  1132  	googleapi.ServerResponse `json:"-"`
  1133  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1134  	// unconditionally include in API requests. By default, fields with empty or
  1135  	// default values are omitted from API requests. See
  1136  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1137  	// details.
  1138  	ForceSendFields []string `json:"-"`
  1139  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1140  	// requests with the JSON null value. By default, fields with empty values are
  1141  	// omitted from API requests. See
  1142  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1143  	NullFields []string `json:"-"`
  1144  }
  1145  
  1146  func (s *Hub) MarshalJSON() ([]byte, error) {
  1147  	type NoMethod Hub
  1148  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1149  }
  1150  
  1151  // InterconnectAttachment: InterconnectAttachment that this route applies to.
  1152  type InterconnectAttachment struct {
  1153  	// Region: Optional. Cloud region to install this policy-based route on
  1154  	// interconnect attachment. Use `all` to install it on all interconnect
  1155  	// attachments.
  1156  	Region string `json:"region,omitempty"`
  1157  	// ForceSendFields is a list of field names (e.g. "Region") to unconditionally
  1158  	// include in API requests. By default, fields with empty or default values are
  1159  	// omitted from API requests. See
  1160  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1161  	// details.
  1162  	ForceSendFields []string `json:"-"`
  1163  	// NullFields is a list of field names (e.g. "Region") to include in API
  1164  	// requests with the JSON null value. By default, fields with empty values are
  1165  	// omitted from API requests. See
  1166  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1167  	NullFields []string `json:"-"`
  1168  }
  1169  
  1170  func (s *InterconnectAttachment) MarshalJSON() ([]byte, error) {
  1171  	type NoMethod InterconnectAttachment
  1172  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1173  }
  1174  
  1175  // InternalRange: The internal range resource for IPAM operations within a VPC
  1176  // network. Used to represent a private address range along with behavioral
  1177  // characterstics of that range (its usage and peering behavior). Networking
  1178  // resources can link to this range if they are created as belonging to it.
  1179  type InternalRange struct {
  1180  	// CreateTime: Time when the internal range was created.
  1181  	CreateTime string `json:"createTime,omitempty"`
  1182  	// Description: A description of this resource.
  1183  	Description string `json:"description,omitempty"`
  1184  	// IpCidrRange: The IP range that this internal range defines.
  1185  	IpCidrRange string `json:"ipCidrRange,omitempty"`
  1186  	// Labels: User-defined labels.
  1187  	Labels map[string]string `json:"labels,omitempty"`
  1188  	// Name: Immutable. The name of an internal range. Format:
  1189  	// projects/{project}/locations/{location}/internalRanges/{internal_range} See:
  1190  	// https://google.aip.dev/122#fields-representing-resource-names
  1191  	Name string `json:"name,omitempty"`
  1192  	// Network: The URL or resource ID of the network in which to reserve the
  1193  	// internal range. The network cannot be deleted if there are any reserved
  1194  	// internal ranges referring to it. Legacy networks are not supported. For
  1195  	// example:
  1196  	// https://www.googleapis.com/compute/v1/projects/{project}/locations/global/networks/{network}
  1197  	// projects/{project}/locations/global/networks/{network} {network}
  1198  	Network string `json:"network,omitempty"`
  1199  	// Overlaps: Optional. Types of resources that are allowed to overlap with the
  1200  	// current internal range.
  1201  	//
  1202  	// Possible values:
  1203  	//   "OVERLAP_UNSPECIFIED" - No overlap overrides.
  1204  	//   "OVERLAP_ROUTE_RANGE" - Allow creation of static routes more specific that
  1205  	// the current internal range.
  1206  	//   "OVERLAP_EXISTING_SUBNET_RANGE" - Allow creation of internal ranges that
  1207  	// overlap with existing subnets.
  1208  	Overlaps []string `json:"overlaps,omitempty"`
  1209  	// Peering: The type of peering set for this internal range.
  1210  	//
  1211  	// Possible values:
  1212  	//   "PEERING_UNSPECIFIED" - If Peering is left unspecified in
  1213  	// CreateInternalRange or UpdateInternalRange, it will be defaulted to
  1214  	// FOR_SELF.
  1215  	//   "FOR_SELF" - This is the default behavior and represents the case that
  1216  	// this internal range is intended to be used in the VPC in which it is created
  1217  	// and is accessible from its peers. This implies that peers or peers-of-peers
  1218  	// cannot use this range.
  1219  	//   "FOR_PEER" - This behavior can be set when the internal range is being
  1220  	// reserved for usage by peers. This means that no resource within the VPC in
  1221  	// which it is being created can use this to associate with a VPC resource, but
  1222  	// one of the peers can. This represents donating a range for peers to use.
  1223  	//   "NOT_SHARED" - This behavior can be set when the internal range is being
  1224  	// reserved for usage by the VPC in which it is created, but not shared with
  1225  	// peers. In a sense, it is local to the VPC. This can be used to create
  1226  	// internal ranges for various purposes like HTTP_INTERNAL_LOAD_BALANCER or for
  1227  	// Interconnect routes that are not shared with peers. This also implies that
  1228  	// peers cannot use this range in a way that is visible to this VPC, but can
  1229  	// re-use this range as long as it is NOT_SHARED from the peer VPC, too.
  1230  	Peering string `json:"peering,omitempty"`
  1231  	// PrefixLength: An alternate to ip_cidr_range. Can be set when trying to
  1232  	// create a reservation that automatically finds a free range of the given
  1233  	// size. If both ip_cidr_range and prefix_length are set, there is an error if
  1234  	// the range sizes do not match. Can also be used during updates to change the
  1235  	// range size.
  1236  	PrefixLength int64 `json:"prefixLength,omitempty"`
  1237  	// TargetCidrRange: Optional. Can be set to narrow down or pick a different
  1238  	// address space while searching for a free range. If not set, defaults to the
  1239  	// "10.0.0.0/8" address space. This can be used to search in other rfc-1918
  1240  	// address spaces like "172.16.0.0/12" and "192.168.0.0/16" or non-rfc-1918
  1241  	// address spaces used in the VPC.
  1242  	TargetCidrRange []string `json:"targetCidrRange,omitempty"`
  1243  	// UpdateTime: Time when the internal range was updated.
  1244  	UpdateTime string `json:"updateTime,omitempty"`
  1245  	// Usage: The type of usage set for this InternalRange.
  1246  	//
  1247  	// Possible values:
  1248  	//   "USAGE_UNSPECIFIED" - Unspecified usage is allowed in calls which identify
  1249  	// the resource by other fields and do not need Usage set to complete. These
  1250  	// are, i.e.: GetInternalRange and DeleteInternalRange. Usage needs to be
  1251  	// specified explicitly in CreateInternalRange or UpdateInternalRange calls.
  1252  	//   "FOR_VPC" - A VPC resource can use the reserved CIDR block by associating
  1253  	// it with the internal range resource if usage is set to FOR_VPC.
  1254  	//   "EXTERNAL_TO_VPC" - Ranges created with EXTERNAL_TO_VPC cannot be
  1255  	// associated with VPC resources and are meant to block out address ranges for
  1256  	// various use cases, like for example, usage on-prem, with dynamic route
  1257  	// announcements via interconnect.
  1258  	Usage string `json:"usage,omitempty"`
  1259  	// Users: Output only. The list of resources that refer to this internal range.
  1260  	// Resources that use the internal range for their range allocation are
  1261  	// referred to as users of the range. Other resources mark themselves as users
  1262  	// while doing so by creating a reference to this internal range. Having a
  1263  	// user, based on this reference, prevents deletion of the internal range
  1264  	// referred to. Can be empty.
  1265  	Users []string `json:"users,omitempty"`
  1266  
  1267  	// ServerResponse contains the HTTP response code and headers from the server.
  1268  	googleapi.ServerResponse `json:"-"`
  1269  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  1270  	// unconditionally include in API requests. By default, fields with empty or
  1271  	// default values are omitted from API requests. See
  1272  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1273  	// details.
  1274  	ForceSendFields []string `json:"-"`
  1275  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  1276  	// requests with the JSON null value. By default, fields with empty values are
  1277  	// omitted from API requests. See
  1278  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1279  	NullFields []string `json:"-"`
  1280  }
  1281  
  1282  func (s *InternalRange) MarshalJSON() ([]byte, error) {
  1283  	type NoMethod InternalRange
  1284  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1285  }
  1286  
  1287  // LinkedInterconnectAttachments: A collection of VLAN attachment resources.
  1288  // These resources should be redundant attachments that all advertise the same
  1289  // prefixes to Google Cloud. Alternatively, in active/passive configurations,
  1290  // all attachments should be capable of advertising the same prefixes.
  1291  type LinkedInterconnectAttachments struct {
  1292  	// SiteToSiteDataTransfer: A value that controls whether site-to-site data
  1293  	// transfer is enabled for these resources. Data transfer is available only in
  1294  	// supported locations
  1295  	// (https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
  1296  	SiteToSiteDataTransfer bool `json:"siteToSiteDataTransfer,omitempty"`
  1297  	// Uris: The URIs of linked interconnect attachment resources
  1298  	Uris []string `json:"uris,omitempty"`
  1299  	// VpcNetwork: Output only. The VPC network where these VLAN attachments are
  1300  	// located.
  1301  	VpcNetwork string `json:"vpcNetwork,omitempty"`
  1302  	// ForceSendFields is a list of field names (e.g. "SiteToSiteDataTransfer") to
  1303  	// unconditionally include in API requests. By default, fields with empty or
  1304  	// default values are omitted from API requests. See
  1305  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1306  	// details.
  1307  	ForceSendFields []string `json:"-"`
  1308  	// NullFields is a list of field names (e.g. "SiteToSiteDataTransfer") to
  1309  	// include in API requests with the JSON null value. By default, fields with
  1310  	// empty values are omitted from API requests. See
  1311  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1312  	NullFields []string `json:"-"`
  1313  }
  1314  
  1315  func (s *LinkedInterconnectAttachments) MarshalJSON() ([]byte, error) {
  1316  	type NoMethod LinkedInterconnectAttachments
  1317  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1318  }
  1319  
  1320  // LinkedRouterApplianceInstances: A collection of router appliance instances.
  1321  // If you configure multiple router appliance instances to receive data from
  1322  // the same set of sites outside of Google Cloud, we recommend that you
  1323  // associate those instances with the same spoke.
  1324  type LinkedRouterApplianceInstances struct {
  1325  	// Instances: The list of router appliance instances.
  1326  	Instances []*RouterApplianceInstance `json:"instances,omitempty"`
  1327  	// SiteToSiteDataTransfer: A value that controls whether site-to-site data
  1328  	// transfer is enabled for these resources. Data transfer is available only in
  1329  	// supported locations
  1330  	// (https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
  1331  	SiteToSiteDataTransfer bool `json:"siteToSiteDataTransfer,omitempty"`
  1332  	// VpcNetwork: Output only. The VPC network where these router appliance
  1333  	// instances are located.
  1334  	VpcNetwork string `json:"vpcNetwork,omitempty"`
  1335  	// ForceSendFields is a list of field names (e.g. "Instances") to
  1336  	// unconditionally include in API requests. By default, fields with empty or
  1337  	// default values are omitted from API requests. See
  1338  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1339  	// details.
  1340  	ForceSendFields []string `json:"-"`
  1341  	// NullFields is a list of field names (e.g. "Instances") to include in API
  1342  	// requests with the JSON null value. By default, fields with empty values are
  1343  	// omitted from API requests. See
  1344  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1345  	NullFields []string `json:"-"`
  1346  }
  1347  
  1348  func (s *LinkedRouterApplianceInstances) MarshalJSON() ([]byte, error) {
  1349  	type NoMethod LinkedRouterApplianceInstances
  1350  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1351  }
  1352  
  1353  // LinkedVpcNetwork: An existing VPC network.
  1354  type LinkedVpcNetwork struct {
  1355  	// ExcludeExportRanges: Optional. IP ranges encompassing the subnets to be
  1356  	// excluded from peering.
  1357  	ExcludeExportRanges []string `json:"excludeExportRanges,omitempty"`
  1358  	// Uri: Required. The URI of the VPC network resource.
  1359  	Uri string `json:"uri,omitempty"`
  1360  	// ForceSendFields is a list of field names (e.g. "ExcludeExportRanges") to
  1361  	// unconditionally include in API requests. By default, fields with empty or
  1362  	// default values are omitted from API requests. See
  1363  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1364  	// details.
  1365  	ForceSendFields []string `json:"-"`
  1366  	// NullFields is a list of field names (e.g. "ExcludeExportRanges") to include
  1367  	// in API requests with the JSON null value. By default, fields with empty
  1368  	// values are omitted from API requests. See
  1369  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1370  	NullFields []string `json:"-"`
  1371  }
  1372  
  1373  func (s *LinkedVpcNetwork) MarshalJSON() ([]byte, error) {
  1374  	type NoMethod LinkedVpcNetwork
  1375  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1376  }
  1377  
  1378  // LinkedVpnTunnels: A collection of Cloud VPN tunnel resources. These
  1379  // resources should be redundant HA VPN tunnels that all advertise the same
  1380  // prefixes to Google Cloud. Alternatively, in a passive/active configuration,
  1381  // all tunnels should be capable of advertising the same prefixes.
  1382  type LinkedVpnTunnels struct {
  1383  	// SiteToSiteDataTransfer: A value that controls whether site-to-site data
  1384  	// transfer is enabled for these resources. Data transfer is available only in
  1385  	// supported locations
  1386  	// (https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).
  1387  	SiteToSiteDataTransfer bool `json:"siteToSiteDataTransfer,omitempty"`
  1388  	// Uris: The URIs of linked VPN tunnel resources.
  1389  	Uris []string `json:"uris,omitempty"`
  1390  	// VpcNetwork: Output only. The VPC network where these VPN tunnels are
  1391  	// located.
  1392  	VpcNetwork string `json:"vpcNetwork,omitempty"`
  1393  	// ForceSendFields is a list of field names (e.g. "SiteToSiteDataTransfer") to
  1394  	// unconditionally include in API requests. By default, fields with empty or
  1395  	// default values are omitted from API requests. See
  1396  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1397  	// details.
  1398  	ForceSendFields []string `json:"-"`
  1399  	// NullFields is a list of field names (e.g. "SiteToSiteDataTransfer") to
  1400  	// include in API requests with the JSON null value. By default, fields with
  1401  	// empty values are omitted from API requests. See
  1402  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1403  	NullFields []string `json:"-"`
  1404  }
  1405  
  1406  func (s *LinkedVpnTunnels) MarshalJSON() ([]byte, error) {
  1407  	type NoMethod LinkedVpnTunnels
  1408  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1409  }
  1410  
  1411  // ListGroupsResponse: Response for HubService.ListGroups method.
  1412  type ListGroupsResponse struct {
  1413  	// Groups: The requested groups.
  1414  	Groups []*Group `json:"groups,omitempty"`
  1415  	// NextPageToken: The token for the next page of the response. To see more
  1416  	// results, use this value as the page_token for your next request. If this
  1417  	// value is empty, there are no more results.
  1418  	NextPageToken string `json:"nextPageToken,omitempty"`
  1419  	// Unreachable: Hubs that could not be reached.
  1420  	Unreachable []string `json:"unreachable,omitempty"`
  1421  
  1422  	// ServerResponse contains the HTTP response code and headers from the server.
  1423  	googleapi.ServerResponse `json:"-"`
  1424  	// ForceSendFields is a list of field names (e.g. "Groups") to unconditionally
  1425  	// include in API requests. By default, fields with empty or default values are
  1426  	// omitted from API requests. See
  1427  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1428  	// details.
  1429  	ForceSendFields []string `json:"-"`
  1430  	// NullFields is a list of field names (e.g. "Groups") to include in API
  1431  	// requests with the JSON null value. By default, fields with empty values are
  1432  	// omitted from API requests. See
  1433  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1434  	NullFields []string `json:"-"`
  1435  }
  1436  
  1437  func (s *ListGroupsResponse) MarshalJSON() ([]byte, error) {
  1438  	type NoMethod ListGroupsResponse
  1439  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1440  }
  1441  
  1442  // ListHubSpokesResponse: The response for HubService.ListHubSpokes.
  1443  type ListHubSpokesResponse struct {
  1444  	// NextPageToken: The token for the next page of the response. To see more
  1445  	// results, use this value as the page_token for your next request. If this
  1446  	// value is empty, there are no more results.
  1447  	NextPageToken string `json:"nextPageToken,omitempty"`
  1448  	// Spokes: The requested spokes. The spoke fields can be partially populated
  1449  	// based on the `view` field in the request message.
  1450  	Spokes []*Spoke `json:"spokes,omitempty"`
  1451  	// Unreachable: Locations that could not be reached.
  1452  	Unreachable []string `json:"unreachable,omitempty"`
  1453  
  1454  	// ServerResponse contains the HTTP response code and headers from the server.
  1455  	googleapi.ServerResponse `json:"-"`
  1456  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1457  	// unconditionally include in API requests. By default, fields with empty or
  1458  	// default values are omitted from API requests. See
  1459  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1460  	// details.
  1461  	ForceSendFields []string `json:"-"`
  1462  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1463  	// requests with the JSON null value. By default, fields with empty values are
  1464  	// omitted from API requests. See
  1465  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1466  	NullFields []string `json:"-"`
  1467  }
  1468  
  1469  func (s *ListHubSpokesResponse) MarshalJSON() ([]byte, error) {
  1470  	type NoMethod ListHubSpokesResponse
  1471  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1472  }
  1473  
  1474  // ListHubsResponse: Response for HubService.ListHubs method.
  1475  type ListHubsResponse struct {
  1476  	// Hubs: The requested hubs.
  1477  	Hubs []*Hub `json:"hubs,omitempty"`
  1478  	// NextPageToken: The token for the next page of the response. To see more
  1479  	// results, use this value as the page_token for your next request. If this
  1480  	// value is empty, there are no more results.
  1481  	NextPageToken string `json:"nextPageToken,omitempty"`
  1482  	// Unreachable: Locations that could not be reached.
  1483  	Unreachable []string `json:"unreachable,omitempty"`
  1484  
  1485  	// ServerResponse contains the HTTP response code and headers from the server.
  1486  	googleapi.ServerResponse `json:"-"`
  1487  	// ForceSendFields is a list of field names (e.g. "Hubs") to unconditionally
  1488  	// include in API requests. By default, fields with empty or default values are
  1489  	// omitted from API requests. See
  1490  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1491  	// details.
  1492  	ForceSendFields []string `json:"-"`
  1493  	// NullFields is a list of field names (e.g. "Hubs") to include in API requests
  1494  	// with the JSON null value. By default, fields with empty values are omitted
  1495  	// from API requests. See
  1496  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1497  	NullFields []string `json:"-"`
  1498  }
  1499  
  1500  func (s *ListHubsResponse) MarshalJSON() ([]byte, error) {
  1501  	type NoMethod ListHubsResponse
  1502  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1503  }
  1504  
  1505  // ListInternalRangesResponse: Response for InternalRange.ListInternalRanges
  1506  type ListInternalRangesResponse struct {
  1507  	// InternalRanges: Internal ranges to be returned.
  1508  	InternalRanges []*InternalRange `json:"internalRanges,omitempty"`
  1509  	// NextPageToken: The next pagination token in the List response. It should be
  1510  	// used as page_token for the following request. An empty value means no more
  1511  	// result.
  1512  	NextPageToken string `json:"nextPageToken,omitempty"`
  1513  	// Unreachable: Locations that could not be reached.
  1514  	Unreachable []string `json:"unreachable,omitempty"`
  1515  
  1516  	// ServerResponse contains the HTTP response code and headers from the server.
  1517  	googleapi.ServerResponse `json:"-"`
  1518  	// ForceSendFields is a list of field names (e.g. "InternalRanges") to
  1519  	// unconditionally include in API requests. By default, fields with empty or
  1520  	// default values are omitted from API requests. See
  1521  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1522  	// details.
  1523  	ForceSendFields []string `json:"-"`
  1524  	// NullFields is a list of field names (e.g. "InternalRanges") to include in
  1525  	// API requests with the JSON null value. By default, fields with empty values
  1526  	// are omitted from API requests. See
  1527  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1528  	NullFields []string `json:"-"`
  1529  }
  1530  
  1531  func (s *ListInternalRangesResponse) MarshalJSON() ([]byte, error) {
  1532  	type NoMethod ListInternalRangesResponse
  1533  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1534  }
  1535  
  1536  // ListLocationsResponse: The response message for Locations.ListLocations.
  1537  type ListLocationsResponse struct {
  1538  	// Locations: A list of locations that matches the specified filter in the
  1539  	// request.
  1540  	Locations []*Location `json:"locations,omitempty"`
  1541  	// NextPageToken: The standard List next-page token.
  1542  	NextPageToken string `json:"nextPageToken,omitempty"`
  1543  
  1544  	// ServerResponse contains the HTTP response code and headers from the server.
  1545  	googleapi.ServerResponse `json:"-"`
  1546  	// ForceSendFields is a list of field names (e.g. "Locations") to
  1547  	// unconditionally include in API requests. By default, fields with empty or
  1548  	// default values are omitted from API requests. See
  1549  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1550  	// details.
  1551  	ForceSendFields []string `json:"-"`
  1552  	// NullFields is a list of field names (e.g. "Locations") to include in API
  1553  	// requests with the JSON null value. By default, fields with empty values are
  1554  	// omitted from API requests. See
  1555  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1556  	NullFields []string `json:"-"`
  1557  }
  1558  
  1559  func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
  1560  	type NoMethod ListLocationsResponse
  1561  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1562  }
  1563  
  1564  // ListPolicyBasedRoutesResponse: Response for
  1565  // PolicyBasedRouting.ListPolicyBasedRoutes method.
  1566  type ListPolicyBasedRoutesResponse struct {
  1567  	// NextPageToken: The next pagination token in the List response. It should be
  1568  	// used as page_token for the following request. An empty value means no more
  1569  	// result.
  1570  	NextPageToken string `json:"nextPageToken,omitempty"`
  1571  	// PolicyBasedRoutes: Policy-based routes to be returned.
  1572  	PolicyBasedRoutes []*PolicyBasedRoute `json:"policyBasedRoutes,omitempty"`
  1573  	// Unreachable: Locations that could not be reached.
  1574  	Unreachable []string `json:"unreachable,omitempty"`
  1575  
  1576  	// ServerResponse contains the HTTP response code and headers from the server.
  1577  	googleapi.ServerResponse `json:"-"`
  1578  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1579  	// unconditionally include in API requests. By default, fields with empty or
  1580  	// default values are omitted from API requests. See
  1581  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1582  	// details.
  1583  	ForceSendFields []string `json:"-"`
  1584  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1585  	// requests with the JSON null value. By default, fields with empty values are
  1586  	// omitted from API requests. See
  1587  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1588  	NullFields []string `json:"-"`
  1589  }
  1590  
  1591  func (s *ListPolicyBasedRoutesResponse) MarshalJSON() ([]byte, error) {
  1592  	type NoMethod ListPolicyBasedRoutesResponse
  1593  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1594  }
  1595  
  1596  // ListRegionalEndpointsResponse: Response for ListRegionalEndpoints.
  1597  type ListRegionalEndpointsResponse struct {
  1598  	// NextPageToken: The next pagination token in the List response. It should be
  1599  	// used as page_token for the following request. An empty value means no more
  1600  	// result.
  1601  	NextPageToken string `json:"nextPageToken,omitempty"`
  1602  	// RegionalEndpoints: Regional endpoints to be returned.
  1603  	RegionalEndpoints []*RegionalEndpoint `json:"regionalEndpoints,omitempty"`
  1604  	// Unreachable: Locations that could not be reached.
  1605  	Unreachable []string `json:"unreachable,omitempty"`
  1606  
  1607  	// ServerResponse contains the HTTP response code and headers from the server.
  1608  	googleapi.ServerResponse `json:"-"`
  1609  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1610  	// unconditionally include in API requests. By default, fields with empty or
  1611  	// default values are omitted from API requests. See
  1612  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1613  	// details.
  1614  	ForceSendFields []string `json:"-"`
  1615  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1616  	// requests with the JSON null value. By default, fields with empty values are
  1617  	// omitted from API requests. See
  1618  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1619  	NullFields []string `json:"-"`
  1620  }
  1621  
  1622  func (s *ListRegionalEndpointsResponse) MarshalJSON() ([]byte, error) {
  1623  	type NoMethod ListRegionalEndpointsResponse
  1624  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1625  }
  1626  
  1627  // ListRouteTablesResponse: Response for HubService.ListRouteTables method.
  1628  type ListRouteTablesResponse struct {
  1629  	// NextPageToken: The token for the next page of the response. To see more
  1630  	// results, use this value as the page_token for your next request. If this
  1631  	// value is empty, there are no more results.
  1632  	NextPageToken string `json:"nextPageToken,omitempty"`
  1633  	// RouteTables: The requested route tables.
  1634  	RouteTables []*RouteTable `json:"routeTables,omitempty"`
  1635  	// Unreachable: Hubs that could not be reached.
  1636  	Unreachable []string `json:"unreachable,omitempty"`
  1637  
  1638  	// ServerResponse contains the HTTP response code and headers from the server.
  1639  	googleapi.ServerResponse `json:"-"`
  1640  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1641  	// unconditionally include in API requests. By default, fields with empty or
  1642  	// default values are omitted from API requests. See
  1643  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1644  	// details.
  1645  	ForceSendFields []string `json:"-"`
  1646  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1647  	// requests with the JSON null value. By default, fields with empty values are
  1648  	// omitted from API requests. See
  1649  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1650  	NullFields []string `json:"-"`
  1651  }
  1652  
  1653  func (s *ListRouteTablesResponse) MarshalJSON() ([]byte, error) {
  1654  	type NoMethod ListRouteTablesResponse
  1655  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1656  }
  1657  
  1658  // ListRoutesResponse: Response for HubService.ListRoutes method.
  1659  type ListRoutesResponse struct {
  1660  	// NextPageToken: The token for the next page of the response. To see more
  1661  	// results, use this value as the page_token for your next request. If this
  1662  	// value is empty, there are no more results.
  1663  	NextPageToken string `json:"nextPageToken,omitempty"`
  1664  	// Routes: The requested routes.
  1665  	Routes []*Route `json:"routes,omitempty"`
  1666  	// Unreachable: RouteTables that could not be reached.
  1667  	Unreachable []string `json:"unreachable,omitempty"`
  1668  
  1669  	// ServerResponse contains the HTTP response code and headers from the server.
  1670  	googleapi.ServerResponse `json:"-"`
  1671  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1672  	// unconditionally include in API requests. By default, fields with empty or
  1673  	// default values are omitted from API requests. See
  1674  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1675  	// details.
  1676  	ForceSendFields []string `json:"-"`
  1677  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1678  	// requests with the JSON null value. By default, fields with empty values are
  1679  	// omitted from API requests. See
  1680  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1681  	NullFields []string `json:"-"`
  1682  }
  1683  
  1684  func (s *ListRoutesResponse) MarshalJSON() ([]byte, error) {
  1685  	type NoMethod ListRoutesResponse
  1686  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1687  }
  1688  
  1689  // ListServiceClassesResponse: Response for ListServiceClasses.
  1690  type ListServiceClassesResponse struct {
  1691  	// NextPageToken: The next pagination token in the List response. It should be
  1692  	// used as page_token for the following request. An empty value means no more
  1693  	// result.
  1694  	NextPageToken string `json:"nextPageToken,omitempty"`
  1695  	// ServiceClasses: ServiceClasses to be returned.
  1696  	ServiceClasses []*ServiceClass `json:"serviceClasses,omitempty"`
  1697  	// Unreachable: Locations that could not be reached.
  1698  	Unreachable []string `json:"unreachable,omitempty"`
  1699  
  1700  	// ServerResponse contains the HTTP response code and headers from the server.
  1701  	googleapi.ServerResponse `json:"-"`
  1702  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1703  	// unconditionally include in API requests. By default, fields with empty or
  1704  	// default values are omitted from API requests. See
  1705  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1706  	// details.
  1707  	ForceSendFields []string `json:"-"`
  1708  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1709  	// requests with the JSON null value. By default, fields with empty values are
  1710  	// omitted from API requests. See
  1711  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1712  	NullFields []string `json:"-"`
  1713  }
  1714  
  1715  func (s *ListServiceClassesResponse) MarshalJSON() ([]byte, error) {
  1716  	type NoMethod ListServiceClassesResponse
  1717  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1718  }
  1719  
  1720  // ListServiceConnectionMapsResponse: Response for ListServiceConnectionMaps.
  1721  type ListServiceConnectionMapsResponse struct {
  1722  	// NextPageToken: The next pagination token in the List response. It should be
  1723  	// used as page_token for the following request. An empty value means no more
  1724  	// result.
  1725  	NextPageToken string `json:"nextPageToken,omitempty"`
  1726  	// ServiceConnectionMaps: ServiceConnectionMaps to be returned.
  1727  	ServiceConnectionMaps []*ServiceConnectionMap `json:"serviceConnectionMaps,omitempty"`
  1728  	// Unreachable: Locations that could not be reached.
  1729  	Unreachable []string `json:"unreachable,omitempty"`
  1730  
  1731  	// ServerResponse contains the HTTP response code and headers from the server.
  1732  	googleapi.ServerResponse `json:"-"`
  1733  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1734  	// unconditionally include in API requests. By default, fields with empty or
  1735  	// default values are omitted from API requests. See
  1736  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1737  	// details.
  1738  	ForceSendFields []string `json:"-"`
  1739  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1740  	// requests with the JSON null value. By default, fields with empty values are
  1741  	// omitted from API requests. See
  1742  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1743  	NullFields []string `json:"-"`
  1744  }
  1745  
  1746  func (s *ListServiceConnectionMapsResponse) MarshalJSON() ([]byte, error) {
  1747  	type NoMethod ListServiceConnectionMapsResponse
  1748  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1749  }
  1750  
  1751  // ListServiceConnectionPoliciesResponse: Response for
  1752  // ListServiceConnectionPolicies.
  1753  type ListServiceConnectionPoliciesResponse struct {
  1754  	// NextPageToken: The next pagination token in the List response. It should be
  1755  	// used as page_token for the following request. An empty value means no more
  1756  	// result.
  1757  	NextPageToken string `json:"nextPageToken,omitempty"`
  1758  	// ServiceConnectionPolicies: ServiceConnectionPolicies to be returned.
  1759  	ServiceConnectionPolicies []*ServiceConnectionPolicy `json:"serviceConnectionPolicies,omitempty"`
  1760  	// Unreachable: Locations that could not be reached.
  1761  	Unreachable []string `json:"unreachable,omitempty"`
  1762  
  1763  	// ServerResponse contains the HTTP response code and headers from the server.
  1764  	googleapi.ServerResponse `json:"-"`
  1765  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1766  	// unconditionally include in API requests. By default, fields with empty or
  1767  	// default values are omitted from API requests. See
  1768  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1769  	// details.
  1770  	ForceSendFields []string `json:"-"`
  1771  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1772  	// requests with the JSON null value. By default, fields with empty values are
  1773  	// omitted from API requests. See
  1774  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1775  	NullFields []string `json:"-"`
  1776  }
  1777  
  1778  func (s *ListServiceConnectionPoliciesResponse) MarshalJSON() ([]byte, error) {
  1779  	type NoMethod ListServiceConnectionPoliciesResponse
  1780  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1781  }
  1782  
  1783  // ListServiceConnectionTokensResponse: Response for
  1784  // ListServiceConnectionTokens.
  1785  type ListServiceConnectionTokensResponse struct {
  1786  	// NextPageToken: The next pagination token in the List response. It should be
  1787  	// used as page_token for the following request. An empty value means no more
  1788  	// result.
  1789  	NextPageToken string `json:"nextPageToken,omitempty"`
  1790  	// ServiceConnectionTokens: ServiceConnectionTokens to be returned.
  1791  	ServiceConnectionTokens []*ServiceConnectionToken `json:"serviceConnectionTokens,omitempty"`
  1792  	// Unreachable: Locations that could not be reached.
  1793  	Unreachable []string `json:"unreachable,omitempty"`
  1794  
  1795  	// ServerResponse contains the HTTP response code and headers from the server.
  1796  	googleapi.ServerResponse `json:"-"`
  1797  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1798  	// unconditionally include in API requests. By default, fields with empty or
  1799  	// default values are omitted from API requests. See
  1800  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1801  	// details.
  1802  	ForceSendFields []string `json:"-"`
  1803  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1804  	// requests with the JSON null value. By default, fields with empty values are
  1805  	// omitted from API requests. See
  1806  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1807  	NullFields []string `json:"-"`
  1808  }
  1809  
  1810  func (s *ListServiceConnectionTokensResponse) MarshalJSON() ([]byte, error) {
  1811  	type NoMethod ListServiceConnectionTokensResponse
  1812  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1813  }
  1814  
  1815  // ListSpokesResponse: The response for HubService.ListSpokes.
  1816  type ListSpokesResponse struct {
  1817  	// NextPageToken: The token for the next page of the response. To see more
  1818  	// results, use this value as the page_token for your next request. If this
  1819  	// value is empty, there are no more results.
  1820  	NextPageToken string `json:"nextPageToken,omitempty"`
  1821  	// Spokes: The requested spokes.
  1822  	Spokes []*Spoke `json:"spokes,omitempty"`
  1823  	// Unreachable: Locations that could not be reached.
  1824  	Unreachable []string `json:"unreachable,omitempty"`
  1825  
  1826  	// ServerResponse contains the HTTP response code and headers from the server.
  1827  	googleapi.ServerResponse `json:"-"`
  1828  	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1829  	// unconditionally include in API requests. By default, fields with empty or
  1830  	// default values are omitted from API requests. See
  1831  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1832  	// details.
  1833  	ForceSendFields []string `json:"-"`
  1834  	// NullFields is a list of field names (e.g. "NextPageToken") to include in API
  1835  	// requests with the JSON null value. By default, fields with empty values are
  1836  	// omitted from API requests. See
  1837  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1838  	NullFields []string `json:"-"`
  1839  }
  1840  
  1841  func (s *ListSpokesResponse) MarshalJSON() ([]byte, error) {
  1842  	type NoMethod ListSpokesResponse
  1843  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1844  }
  1845  
  1846  // Location: A resource that represents a Google Cloud location.
  1847  type Location struct {
  1848  	// DisplayName: The friendly name for this location, typically a nearby city
  1849  	// name. For example, "Tokyo".
  1850  	DisplayName string `json:"displayName,omitempty"`
  1851  	// Labels: Cross-service attributes for the location. For example
  1852  	// {"cloud.googleapis.com/region": "us-east1"}
  1853  	Labels map[string]string `json:"labels,omitempty"`
  1854  	// LocationId: The canonical id for this location. For example: "us-east1".
  1855  	LocationId string `json:"locationId,omitempty"`
  1856  	// Metadata: Service-specific metadata. For example the available capacity at
  1857  	// the given location.
  1858  	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1859  	// Name: Resource name for the location, which may vary between
  1860  	// implementations. For example:
  1861  	// "projects/example-project/locations/us-east1"
  1862  	Name string `json:"name,omitempty"`
  1863  
  1864  	// ServerResponse contains the HTTP response code and headers from the server.
  1865  	googleapi.ServerResponse `json:"-"`
  1866  	// ForceSendFields is a list of field names (e.g. "DisplayName") to
  1867  	// unconditionally include in API requests. By default, fields with empty or
  1868  	// default values are omitted from API requests. See
  1869  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1870  	// details.
  1871  	ForceSendFields []string `json:"-"`
  1872  	// NullFields is a list of field names (e.g. "DisplayName") to include in API
  1873  	// requests with the JSON null value. By default, fields with empty values are
  1874  	// omitted from API requests. See
  1875  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1876  	NullFields []string `json:"-"`
  1877  }
  1878  
  1879  func (s *Location) MarshalJSON() ([]byte, error) {
  1880  	type NoMethod Location
  1881  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1882  }
  1883  
  1884  // LocationMetadata: Metadata about locations
  1885  type LocationMetadata struct {
  1886  	// LocationFeatures: List of supported features
  1887  	//
  1888  	// Possible values:
  1889  	//   "LOCATION_FEATURE_UNSPECIFIED" - No publicly supported feature in this
  1890  	// location
  1891  	//   "SITE_TO_CLOUD_SPOKES" - Site-to-cloud spokes are supported in this
  1892  	// location
  1893  	//   "SITE_TO_SITE_SPOKES" - Site-to-site spokes are supported in this location
  1894  	LocationFeatures []string `json:"locationFeatures,omitempty"`
  1895  	// ForceSendFields is a list of field names (e.g. "LocationFeatures") to
  1896  	// unconditionally include in API requests. By default, fields with empty or
  1897  	// default values are omitted from API requests. See
  1898  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1899  	// details.
  1900  	ForceSendFields []string `json:"-"`
  1901  	// NullFields is a list of field names (e.g. "LocationFeatures") to include in
  1902  	// API requests with the JSON null value. By default, fields with empty values
  1903  	// are omitted from API requests. See
  1904  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1905  	NullFields []string `json:"-"`
  1906  }
  1907  
  1908  func (s *LocationMetadata) MarshalJSON() ([]byte, error) {
  1909  	type NoMethod LocationMetadata
  1910  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1911  }
  1912  
  1913  type NextHopVpcNetwork struct {
  1914  	// Uri: The URI of the VPC network resource
  1915  	Uri string `json:"uri,omitempty"`
  1916  	// ForceSendFields is a list of field names (e.g. "Uri") to unconditionally
  1917  	// include in API requests. By default, fields with empty or default values are
  1918  	// omitted from API requests. See
  1919  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1920  	// details.
  1921  	ForceSendFields []string `json:"-"`
  1922  	// NullFields is a list of field names (e.g. "Uri") to include in API requests
  1923  	// with the JSON null value. By default, fields with empty values are omitted
  1924  	// from API requests. See
  1925  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1926  	NullFields []string `json:"-"`
  1927  }
  1928  
  1929  func (s *NextHopVpcNetwork) MarshalJSON() ([]byte, error) {
  1930  	type NoMethod NextHopVpcNetwork
  1931  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1932  }
  1933  
  1934  // OperationMetadata: Represents the metadata of the long-running operation.
  1935  type OperationMetadata struct {
  1936  	// ApiVersion: Output only. API version used to start the operation.
  1937  	ApiVersion string `json:"apiVersion,omitempty"`
  1938  	// CreateTime: Output only. The time the operation was created.
  1939  	CreateTime string `json:"createTime,omitempty"`
  1940  	// EndTime: Output only. The time the operation finished running.
  1941  	EndTime string `json:"endTime,omitempty"`
  1942  	// RequestedCancellation: Output only. Identifies whether the user has
  1943  	// requested cancellation of the operation. Operations that have been cancelled
  1944  	// successfully have Operation.error value with a google.rpc.Status.code of 1,
  1945  	// corresponding to `Code.CANCELLED`.
  1946  	RequestedCancellation bool `json:"requestedCancellation,omitempty"`
  1947  	// StatusMessage: Output only. Human-readable status of the operation, if any.
  1948  	StatusMessage string `json:"statusMessage,omitempty"`
  1949  	// Target: Output only. Server-defined resource path for the target of the
  1950  	// operation.
  1951  	Target string `json:"target,omitempty"`
  1952  	// Verb: Output only. Name of the verb executed by the operation.
  1953  	Verb string `json:"verb,omitempty"`
  1954  	// ForceSendFields is a list of field names (e.g. "ApiVersion") to
  1955  	// unconditionally include in API requests. By default, fields with empty or
  1956  	// default values are omitted from API requests. See
  1957  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1958  	// details.
  1959  	ForceSendFields []string `json:"-"`
  1960  	// NullFields is a list of field names (e.g. "ApiVersion") to include in API
  1961  	// requests with the JSON null value. By default, fields with empty values are
  1962  	// omitted from API requests. See
  1963  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1964  	NullFields []string `json:"-"`
  1965  }
  1966  
  1967  func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1968  	type NoMethod OperationMetadata
  1969  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1970  }
  1971  
  1972  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1973  // access controls for Google Cloud resources. A `Policy` is a collection of
  1974  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1975  // single `role`. Principals can be user accounts, service accounts, Google
  1976  // groups, and domains (such as G Suite). A `role` is a named list of
  1977  // permissions; each `role` can be an IAM predefined role or a user-created
  1978  // custom role. For some types of Google Cloud resources, a `binding` can also
  1979  // specify a `condition`, which is a logical expression that allows access to a
  1980  // resource only if the expression evaluates to `true`. A condition can add
  1981  // constraints based on attributes of the request, the resource, or both. To
  1982  // learn which resources support conditions in their IAM policies, see the IAM
  1983  // documentation
  1984  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1985  // example:** ``` { "bindings": [ { "role":
  1986  // "roles/resourcemanager.organizationAdmin", "members": [
  1987  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1988  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1989  // "roles/resourcemanager.organizationViewer", "members": [
  1990  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1991  // "description": "Does not grant access after Sep 2020", "expression":
  1992  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1993  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1994  // members: - user:mike@example.com - group:admins@example.com -
  1995  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1996  // role: roles/resourcemanager.organizationAdmin - members: -
  1997  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1998  // condition: title: expirable access description: Does not grant access after
  1999  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  2000  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  2001  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  2002  type Policy struct {
  2003  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  2004  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  2005  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  2006  	// Optionally, may specify a `condition` that determines how and when the
  2007  	// `bindings` are applied. Each of the `bindings` must contain at least one
  2008  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  2009  	// up to 250 of these principals can be Google groups. Each occurrence of a
  2010  	// principal counts towards these limits. For example, if the `bindings` grant
  2011  	// 50 different roles to `user:alice@example.com`, and not to any other
  2012  	// principal, then you can add another 1,450 principals to the `bindings` in
  2013  	// the `Policy`.
  2014  	Bindings []*Binding `json:"bindings,omitempty"`
  2015  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  2016  	// prevent simultaneous updates of a policy from overwriting each other. It is
  2017  	// strongly suggested that systems make use of the `etag` in the
  2018  	// read-modify-write cycle to perform policy updates in order to avoid race
  2019  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  2020  	// systems are expected to put that etag in the request to `setIamPolicy` to
  2021  	// ensure that their change will be applied to the same version of the policy.
  2022  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2023  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2024  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2025  	// the conditions in the version `3` policy are lost.
  2026  	Etag string `json:"etag,omitempty"`
  2027  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  2028  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  2029  	// affects conditional role bindings must specify version `3`. This requirement
  2030  	// applies to the following operations: * Getting a policy that includes a
  2031  	// conditional role binding * Adding a conditional role binding to a policy *
  2032  	// Changing a conditional role binding in a policy * Removing any role binding,
  2033  	// with or without a condition, from a policy that includes conditions
  2034  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  2035  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  2036  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  2037  	// the conditions in the version `3` policy are lost. If a policy does not
  2038  	// include any conditions, operations on that policy may specify any valid
  2039  	// version or leave the field unset. To learn which resources support
  2040  	// conditions in their IAM policies, see the IAM documentation
  2041  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  2042  	Version int64 `json:"version,omitempty"`
  2043  
  2044  	// ServerResponse contains the HTTP response code and headers from the server.
  2045  	googleapi.ServerResponse `json:"-"`
  2046  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  2047  	// unconditionally include in API requests. By default, fields with empty or
  2048  	// default values are omitted from API requests. See
  2049  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2050  	// details.
  2051  	ForceSendFields []string `json:"-"`
  2052  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  2053  	// requests with the JSON null value. By default, fields with empty values are
  2054  	// omitted from API requests. See
  2055  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2056  	NullFields []string `json:"-"`
  2057  }
  2058  
  2059  func (s *Policy) MarshalJSON() ([]byte, error) {
  2060  	type NoMethod Policy
  2061  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2062  }
  2063  
  2064  // PolicyBasedRoute: Policy-based routes route L4 network traffic based on not
  2065  // just destination IP address, but also source IP address, protocol, and more.
  2066  // If a policy-based route conflicts with other types of routes, the
  2067  // policy-based route always take precedence.
  2068  type PolicyBasedRoute struct {
  2069  	// CreateTime: Output only. Time when the policy-based route was created.
  2070  	CreateTime string `json:"createTime,omitempty"`
  2071  	// Description: Optional. An optional description of this resource. Provide
  2072  	// this field when you create the resource.
  2073  	Description string `json:"description,omitempty"`
  2074  	// Filter: Required. The filter to match L4 traffic.
  2075  	Filter *Filter `json:"filter,omitempty"`
  2076  	// InterconnectAttachment: Optional. The interconnect attachments that this
  2077  	// policy-based route applies to.
  2078  	InterconnectAttachment *InterconnectAttachment `json:"interconnectAttachment,omitempty"`
  2079  	// Kind: Output only. Type of this resource. Always
  2080  	// networkconnectivity#policyBasedRoute for policy-based Route resources.
  2081  	Kind string `json:"kind,omitempty"`
  2082  	// Labels: User-defined labels.
  2083  	Labels map[string]string `json:"labels,omitempty"`
  2084  	// Name: Immutable. A unique name of the resource in the form of
  2085  	// `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_r
  2086  	// oute_id}`
  2087  	Name string `json:"name,omitempty"`
  2088  	// Network: Required. Fully-qualified URL of the network that this route
  2089  	// applies to, for example: projects/my-project/global/networks/my-network.
  2090  	Network string `json:"network,omitempty"`
  2091  	// NextHopIlbIp: Optional. The IP address of a global-access-enabled L4 ILB
  2092  	// that is the next hop for matching packets. For this version, only
  2093  	// nextHopIlbIp is supported.
  2094  	NextHopIlbIp string `json:"nextHopIlbIp,omitempty"`
  2095  	// NextHopOtherRoutes: Optional. Other routes that will be referenced to
  2096  	// determine the next hop of the packet.
  2097  	//
  2098  	// Possible values:
  2099  	//   "OTHER_ROUTES_UNSPECIFIED" - Default value.
  2100  	//   "DEFAULT_ROUTING" - Use the routes from the default routing tables
  2101  	// (system-generated routes, custom routes, peering route) to determine the
  2102  	// next hop. This will effectively exclude matching packets being applied on
  2103  	// other PBRs with a lower priority.
  2104  	NextHopOtherRoutes string `json:"nextHopOtherRoutes,omitempty"`
  2105  	// Priority: Optional. The priority of this policy-based route. Priority is
  2106  	// used to break ties in cases where there are more than one matching
  2107  	// policy-based routes found. In cases where multiple policy-based routes are
  2108  	// matched, the one with the lowest-numbered priority value wins. The default
  2109  	// value is 1000. The priority value must be from 1 to 65535, inclusive.
  2110  	Priority int64 `json:"priority,omitempty"`
  2111  	// SelfLink: Output only. Server-defined fully-qualified URL for this resource.
  2112  	SelfLink string `json:"selfLink,omitempty"`
  2113  	// UpdateTime: Output only. Time when the policy-based route was updated.
  2114  	UpdateTime string `json:"updateTime,omitempty"`
  2115  	// VirtualMachine: Optional. VM instances to which this policy-based route
  2116  	// applies to.
  2117  	VirtualMachine *VirtualMachine `json:"virtualMachine,omitempty"`
  2118  	// Warnings: Output only. If potential misconfigurations are detected for this
  2119  	// route, this field will be populated with warning messages.
  2120  	Warnings []*Warnings `json:"warnings,omitempty"`
  2121  
  2122  	// ServerResponse contains the HTTP response code and headers from the server.
  2123  	googleapi.ServerResponse `json:"-"`
  2124  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2125  	// unconditionally include in API requests. By default, fields with empty or
  2126  	// default values are omitted from API requests. See
  2127  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2128  	// details.
  2129  	ForceSendFields []string `json:"-"`
  2130  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2131  	// requests with the JSON null value. By default, fields with empty values are
  2132  	// omitted from API requests. See
  2133  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2134  	NullFields []string `json:"-"`
  2135  }
  2136  
  2137  func (s *PolicyBasedRoute) MarshalJSON() ([]byte, error) {
  2138  	type NoMethod PolicyBasedRoute
  2139  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2140  }
  2141  
  2142  // ProducerPscConfig: The PSC configurations on producer side.
  2143  type ProducerPscConfig struct {
  2144  	// ServiceAttachmentUri: The resource path of a service attachment. Example:
  2145  	// projects/{projectNumOrId}/regions/{region}/serviceAttachments/{resourceId}.
  2146  	ServiceAttachmentUri string `json:"serviceAttachmentUri,omitempty"`
  2147  	// ForceSendFields is a list of field names (e.g. "ServiceAttachmentUri") to
  2148  	// unconditionally include in API requests. By default, fields with empty or
  2149  	// default values are omitted from API requests. See
  2150  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2151  	// details.
  2152  	ForceSendFields []string `json:"-"`
  2153  	// NullFields is a list of field names (e.g. "ServiceAttachmentUri") to include
  2154  	// in API requests with the JSON null value. By default, fields with empty
  2155  	// values are omitted from API requests. See
  2156  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2157  	NullFields []string `json:"-"`
  2158  }
  2159  
  2160  func (s *ProducerPscConfig) MarshalJSON() ([]byte, error) {
  2161  	type NoMethod ProducerPscConfig
  2162  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2163  }
  2164  
  2165  // PscConfig: Configuration used for Private Service Connect connections. Used
  2166  // when Infrastructure is PSC.
  2167  type PscConfig struct {
  2168  	// Limit: Optional. Max number of PSC connections for this policy.
  2169  	Limit int64 `json:"limit,omitempty,string"`
  2170  	// Subnetworks: The resource paths of subnetworks to use for IP address
  2171  	// management. Example:
  2172  	// projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.
  2173  	Subnetworks []string `json:"subnetworks,omitempty"`
  2174  	// ForceSendFields is a list of field names (e.g. "Limit") to unconditionally
  2175  	// include in API requests. By default, fields with empty or default values are
  2176  	// omitted from API requests. See
  2177  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2178  	// details.
  2179  	ForceSendFields []string `json:"-"`
  2180  	// NullFields is a list of field names (e.g. "Limit") to include in API
  2181  	// requests with the JSON null value. By default, fields with empty values are
  2182  	// omitted from API requests. See
  2183  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2184  	NullFields []string `json:"-"`
  2185  }
  2186  
  2187  func (s *PscConfig) MarshalJSON() ([]byte, error) {
  2188  	type NoMethod PscConfig
  2189  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2190  }
  2191  
  2192  // PscConnection: Information about a specific Private Service Connect
  2193  // connection.
  2194  type PscConnection struct {
  2195  	// ConsumerAddress: The resource reference of the consumer address.
  2196  	ConsumerAddress string `json:"consumerAddress,omitempty"`
  2197  	// ConsumerForwardingRule: The resource reference of the PSC Forwarding Rule
  2198  	// within the consumer VPC.
  2199  	ConsumerForwardingRule string `json:"consumerForwardingRule,omitempty"`
  2200  	// ConsumerTargetProject: The project where the PSC connection is created.
  2201  	ConsumerTargetProject string `json:"consumerTargetProject,omitempty"`
  2202  	// Error: The most recent error during operating this connection.
  2203  	Error *GoogleRpcStatus `json:"error,omitempty"`
  2204  	// ErrorInfo: Output only. The error info for the latest error during operating
  2205  	// this connection.
  2206  	ErrorInfo *GoogleRpcErrorInfo `json:"errorInfo,omitempty"`
  2207  	// ErrorType: The error type indicates whether the error is consumer facing,
  2208  	// producer facing or system internal.
  2209  	//
  2210  	// Possible values:
  2211  	//   "CONNECTION_ERROR_TYPE_UNSPECIFIED" - An invalid error type as the default
  2212  	// case.
  2213  	//   "ERROR_INTERNAL" - The error is due to Service Automation system internal.
  2214  	//   "ERROR_CONSUMER_SIDE" - The error is due to the setup on consumer side.
  2215  	//   "ERROR_PRODUCER_SIDE" - The error is due to the setup on producer side.
  2216  	ErrorType string `json:"errorType,omitempty"`
  2217  	// GceOperation: The last Compute Engine operation to setup PSC connection.
  2218  	GceOperation string `json:"gceOperation,omitempty"`
  2219  	// ProducerInstanceId: Immutable. An immutable identifier for the producer
  2220  	// instance.
  2221  	ProducerInstanceId string `json:"producerInstanceId,omitempty"`
  2222  	// PscConnectionId: The PSC connection id of the PSC forwarding rule.
  2223  	PscConnectionId string `json:"pscConnectionId,omitempty"`
  2224  	// SelectedSubnetwork: Output only. The URI of the subnetwork selected to
  2225  	// allocate IP address for this connection.
  2226  	SelectedSubnetwork string `json:"selectedSubnetwork,omitempty"`
  2227  	// State: State of the PSC Connection
  2228  	//
  2229  	// Possible values:
  2230  	//   "STATE_UNSPECIFIED" - An invalid state as the default case.
  2231  	//   "ACTIVE" - The connection is fully established and ready to use.
  2232  	//   "FAILED" - The connection is not functional since some resources on the
  2233  	// connection fail to be created.
  2234  	//   "CREATING" - The connection is being created.
  2235  	//   "DELETING" - The connection is being deleted.
  2236  	State string `json:"state,omitempty"`
  2237  	// ForceSendFields is a list of field names (e.g. "ConsumerAddress") to
  2238  	// unconditionally include in API requests. By default, fields with empty or
  2239  	// default values are omitted from API requests. See
  2240  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2241  	// details.
  2242  	ForceSendFields []string `json:"-"`
  2243  	// NullFields is a list of field names (e.g. "ConsumerAddress") to include in
  2244  	// API requests with the JSON null value. By default, fields with empty values
  2245  	// are omitted from API requests. See
  2246  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2247  	NullFields []string `json:"-"`
  2248  }
  2249  
  2250  func (s *PscConnection) MarshalJSON() ([]byte, error) {
  2251  	type NoMethod PscConnection
  2252  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2253  }
  2254  
  2255  // RegionalEndpoint: The RegionalEndpoint resource.
  2256  type RegionalEndpoint struct {
  2257  	// AccessType: Required. The access type of this regional endpoint. This field
  2258  	// is reflected in the PSC Forwarding Rule configuration to enable global
  2259  	// access.
  2260  	//
  2261  	// Possible values:
  2262  	//   "ACCESS_TYPE_UNSPECIFIED" - An invalid type as the default case.
  2263  	//   "GLOBAL" - This regional endpoint is accessible from all regions.
  2264  	//   "REGIONAL" - This regional endpoint is only accessible from the same
  2265  	// region where it resides.
  2266  	AccessType string `json:"accessType,omitempty"`
  2267  	// Address: Optional. The IP Address of the Regional Endpoint. When no address
  2268  	// is provided, an IP from the subnetwork is allocated. Use one of the
  2269  	// following formats: * IPv4 address as in `10.0.0.1` * Address resource URI as
  2270  	// in `projects/{project}/regions/{region}/addresses/{address_name}`
  2271  	Address string `json:"address,omitempty"`
  2272  	// CreateTime: Output only. Time when the RegionalEndpoint was created.
  2273  	CreateTime string `json:"createTime,omitempty"`
  2274  	// Description: Optional. A description of this resource.
  2275  	Description string `json:"description,omitempty"`
  2276  	// IpAddress: Output only. The literal IP address of the PSC Forwarding Rule
  2277  	// created on behalf of the customer. This field is deprecated. Use address
  2278  	// instead.
  2279  	IpAddress string `json:"ipAddress,omitempty"`
  2280  	// Labels: User-defined labels.
  2281  	Labels map[string]string `json:"labels,omitempty"`
  2282  	// Name: Output only. The name of a RegionalEndpoint. Format:
  2283  	// `projects/{project}/locations/{location}/regionalEndpoints/{regional_endpoint
  2284  	// }`.
  2285  	Name string `json:"name,omitempty"`
  2286  	// Network: The name of the VPC network for this private regional endpoint.
  2287  	// Format: `projects/{project}/global/networks/{network}`
  2288  	Network string `json:"network,omitempty"`
  2289  	// PscForwardingRule: Output only. The resource reference of the PSC Forwarding
  2290  	// Rule created on behalf of the customer. Format:
  2291  	// `//compute.googleapis.com/projects/{project}/regions/{region}/forwardingRules
  2292  	// /{forwarding_rule_name}`
  2293  	PscForwardingRule string `json:"pscForwardingRule,omitempty"`
  2294  	// Subnetwork: The name of the subnetwork from which the IP address will be
  2295  	// allocated. Format:
  2296  	// `projects/{project}/regions/{region}/subnetworks/{subnetwork}`
  2297  	Subnetwork string `json:"subnetwork,omitempty"`
  2298  	// TargetGoogleApi: Required. The service endpoint this private regional
  2299  	// endpoint connects to. Format: `{apiname}.{region}.p.rep.googleapis.com`
  2300  	// Example: "cloudkms.us-central1.p.rep.googleapis.com".
  2301  	TargetGoogleApi string `json:"targetGoogleApi,omitempty"`
  2302  	// UpdateTime: Output only. Time when the RegionalEndpoint was updated.
  2303  	UpdateTime string `json:"updateTime,omitempty"`
  2304  
  2305  	// ServerResponse contains the HTTP response code and headers from the server.
  2306  	googleapi.ServerResponse `json:"-"`
  2307  	// ForceSendFields is a list of field names (e.g. "AccessType") to
  2308  	// unconditionally include in API requests. By default, fields with empty or
  2309  	// default values are omitted from API requests. See
  2310  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2311  	// details.
  2312  	ForceSendFields []string `json:"-"`
  2313  	// NullFields is a list of field names (e.g. "AccessType") to include in API
  2314  	// requests with the JSON null value. By default, fields with empty values are
  2315  	// omitted from API requests. See
  2316  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2317  	NullFields []string `json:"-"`
  2318  }
  2319  
  2320  func (s *RegionalEndpoint) MarshalJSON() ([]byte, error) {
  2321  	type NoMethod RegionalEndpoint
  2322  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2323  }
  2324  
  2325  // RejectHubSpokeRequest: The request for HubService.RejectHubSpoke.
  2326  type RejectHubSpokeRequest struct {
  2327  	// Details: Optional. Additional information provided by the hub administrator.
  2328  	Details string `json:"details,omitempty"`
  2329  	// RequestId: Optional. A request ID to identify requests. Specify a unique
  2330  	// request ID so that if you must retry your request, the server knows to
  2331  	// ignore the request if it has already been completed. The server guarantees
  2332  	// that a request doesn't result in creation of duplicate commitments for at
  2333  	// least 60 minutes. For example, consider a situation where you make an
  2334  	// initial request and the request times out. If you make the request again
  2335  	// with the same request ID, the server can check to see whether the original
  2336  	// operation was received. If it was, the server ignores the second request.
  2337  	// This behavior prevents clients from mistakenly creating duplicate
  2338  	// commitments. The request ID must be a valid UUID, with the exception that
  2339  	// zero UUID is not supported (00000000-0000-0000-0000-000000000000).
  2340  	RequestId string `json:"requestId,omitempty"`
  2341  	// SpokeUri: Required. The URI of the spoke to reject from the hub.
  2342  	SpokeUri string `json:"spokeUri,omitempty"`
  2343  	// ForceSendFields is a list of field names (e.g. "Details") to unconditionally
  2344  	// include in API requests. By default, fields with empty or default values are
  2345  	// omitted from API requests. See
  2346  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2347  	// details.
  2348  	ForceSendFields []string `json:"-"`
  2349  	// NullFields is a list of field names (e.g. "Details") to include in API
  2350  	// requests with the JSON null value. By default, fields with empty values are
  2351  	// omitted from API requests. See
  2352  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2353  	NullFields []string `json:"-"`
  2354  }
  2355  
  2356  func (s *RejectHubSpokeRequest) MarshalJSON() ([]byte, error) {
  2357  	type NoMethod RejectHubSpokeRequest
  2358  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2359  }
  2360  
  2361  // RejectHubSpokeResponse: The response for HubService.RejectHubSpoke.
  2362  type RejectHubSpokeResponse struct {
  2363  	// Spoke: The spoke that was operated on.
  2364  	Spoke *Spoke `json:"spoke,omitempty"`
  2365  	// ForceSendFields is a list of field names (e.g. "Spoke") to unconditionally
  2366  	// include in API requests. By default, fields with empty or default values are
  2367  	// omitted from API requests. See
  2368  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2369  	// details.
  2370  	ForceSendFields []string `json:"-"`
  2371  	// NullFields is a list of field names (e.g. "Spoke") to include in API
  2372  	// requests with the JSON null value. By default, fields with empty values are
  2373  	// omitted from API requests. See
  2374  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2375  	NullFields []string `json:"-"`
  2376  }
  2377  
  2378  func (s *RejectHubSpokeResponse) MarshalJSON() ([]byte, error) {
  2379  	type NoMethod RejectHubSpokeResponse
  2380  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2381  }
  2382  
  2383  // Route: A route defines a path from VM instances within a spoke to a specific
  2384  // destination resource. Only VPC spokes have routes.
  2385  type Route struct {
  2386  	// CreateTime: Output only. The time the route was created.
  2387  	CreateTime string `json:"createTime,omitempty"`
  2388  	// Description: An optional description of the route.
  2389  	Description string `json:"description,omitempty"`
  2390  	// IpCidrRange: The destination IP address range.
  2391  	IpCidrRange string `json:"ipCidrRange,omitempty"`
  2392  	// Labels: Optional labels in key-value pair format. For more information about
  2393  	// labels, see Requirements for labels
  2394  	// (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
  2395  	Labels map[string]string `json:"labels,omitempty"`
  2396  	// Location: Output only. The origin location of the route. Uses the following
  2397  	// form: "projects/{project}/locations/{location}" Example:
  2398  	// projects/1234/locations/us-central1
  2399  	Location string `json:"location,omitempty"`
  2400  	// Name: Immutable. The name of the route. Route names must be unique. Route
  2401  	// names use the following form:
  2402  	// `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_tab
  2403  	// le_id}/routes/{route_id}`
  2404  	Name string `json:"name,omitempty"`
  2405  	// NextHopVpcNetwork: Immutable. The destination VPC network for packets on
  2406  	// this route.
  2407  	NextHopVpcNetwork *NextHopVpcNetwork `json:"nextHopVpcNetwork,omitempty"`
  2408  	// Spoke: Immutable. The spoke that this route leads to. Example:
  2409  	// projects/12345/locations/global/spokes/SPOKE
  2410  	Spoke string `json:"spoke,omitempty"`
  2411  	// State: Output only. The current lifecycle state of the route.
  2412  	//
  2413  	// Possible values:
  2414  	//   "STATE_UNSPECIFIED" - No state information available
  2415  	//   "CREATING" - The resource's create operation is in progress.
  2416  	//   "ACTIVE" - The resource is active
  2417  	//   "DELETING" - The resource's delete operation is in progress.
  2418  	//   "ACCEPTING" - The resource's accept operation is in progress.
  2419  	//   "REJECTING" - The resource's reject operation is in progress.
  2420  	//   "UPDATING" - The resource's update operation is in progress.
  2421  	//   "INACTIVE" - The resource is inactive.
  2422  	//   "OBSOLETE" - The hub associated with this spoke resource has been deleted.
  2423  	// This state applies to spoke resources only.
  2424  	State string `json:"state,omitempty"`
  2425  	// Type: Output only. The route's type. Its type is determined by the
  2426  	// properties of its IP address range.
  2427  	//
  2428  	// Possible values:
  2429  	//   "ROUTE_TYPE_UNSPECIFIED" - No route type information specified
  2430  	//   "VPC_PRIMARY_SUBNET" - The route leads to a destination within the primary
  2431  	// address range of the VPC network's subnet.
  2432  	//   "VPC_SECONDARY_SUBNET" - The route leads to a destination within the
  2433  	// secondary address range of the VPC network's subnet.
  2434  	Type string `json:"type,omitempty"`
  2435  	// Uid: Output only. The Google-generated UUID for the route. This value is
  2436  	// unique across all Network Connectivity Center route resources. If a route is
  2437  	// deleted and another with the same name is created, the new route is assigned
  2438  	// a different `uid`.
  2439  	Uid string `json:"uid,omitempty"`
  2440  	// UpdateTime: Output only. The time the route was last updated.
  2441  	UpdateTime string `json:"updateTime,omitempty"`
  2442  
  2443  	// ServerResponse contains the HTTP response code and headers from the server.
  2444  	googleapi.ServerResponse `json:"-"`
  2445  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2446  	// unconditionally include in API requests. By default, fields with empty or
  2447  	// default values are omitted from API requests. See
  2448  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2449  	// details.
  2450  	ForceSendFields []string `json:"-"`
  2451  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2452  	// requests with the JSON null value. By default, fields with empty values are
  2453  	// omitted from API requests. See
  2454  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2455  	NullFields []string `json:"-"`
  2456  }
  2457  
  2458  func (s *Route) MarshalJSON() ([]byte, error) {
  2459  	type NoMethod Route
  2460  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2461  }
  2462  
  2463  type RouteTable struct {
  2464  	// CreateTime: Output only. The time the route table was created.
  2465  	CreateTime string `json:"createTime,omitempty"`
  2466  	// Description: An optional description of the route table.
  2467  	Description string `json:"description,omitempty"`
  2468  	// Labels: Optional labels in key-value pair format. For more information about
  2469  	// labels, see Requirements for labels
  2470  	// (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
  2471  	Labels map[string]string `json:"labels,omitempty"`
  2472  	// Name: Immutable. The name of the route table. Route table names must be
  2473  	// unique. They use the following form:
  2474  	// `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_tab
  2475  	// le_id}`
  2476  	Name string `json:"name,omitempty"`
  2477  	// State: Output only. The current lifecycle state of this route table.
  2478  	//
  2479  	// Possible values:
  2480  	//   "STATE_UNSPECIFIED" - No state information available
  2481  	//   "CREATING" - The resource's create operation is in progress.
  2482  	//   "ACTIVE" - The resource is active
  2483  	//   "DELETING" - The resource's delete operation is in progress.
  2484  	//   "ACCEPTING" - The resource's accept operation is in progress.
  2485  	//   "REJECTING" - The resource's reject operation is in progress.
  2486  	//   "UPDATING" - The resource's update operation is in progress.
  2487  	//   "INACTIVE" - The resource is inactive.
  2488  	//   "OBSOLETE" - The hub associated with this spoke resource has been deleted.
  2489  	// This state applies to spoke resources only.
  2490  	State string `json:"state,omitempty"`
  2491  	// Uid: Output only. The Google-generated UUID for the route table. This value
  2492  	// is unique across all route table resources. If a route table is deleted and
  2493  	// another with the same name is created, the new route table is assigned a
  2494  	// different `uid`.
  2495  	Uid string `json:"uid,omitempty"`
  2496  	// UpdateTime: Output only. The time the route table was last updated.
  2497  	UpdateTime string `json:"updateTime,omitempty"`
  2498  
  2499  	// ServerResponse contains the HTTP response code and headers from the server.
  2500  	googleapi.ServerResponse `json:"-"`
  2501  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2502  	// unconditionally include in API requests. By default, fields with empty or
  2503  	// default values are omitted from API requests. See
  2504  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2505  	// details.
  2506  	ForceSendFields []string `json:"-"`
  2507  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2508  	// requests with the JSON null value. By default, fields with empty values are
  2509  	// omitted from API requests. See
  2510  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2511  	NullFields []string `json:"-"`
  2512  }
  2513  
  2514  func (s *RouteTable) MarshalJSON() ([]byte, error) {
  2515  	type NoMethod RouteTable
  2516  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2517  }
  2518  
  2519  // RouterApplianceInstance: A router appliance instance is a Compute Engine
  2520  // virtual machine (VM) instance that acts as a BGP speaker. A router appliance
  2521  // instance is specified by the URI of the VM and the internal IP address of
  2522  // one of the VM's network interfaces.
  2523  type RouterApplianceInstance struct {
  2524  	// IpAddress: The IP address on the VM to use for peering.
  2525  	IpAddress string `json:"ipAddress,omitempty"`
  2526  	// VirtualMachine: The URI of the VM.
  2527  	VirtualMachine string `json:"virtualMachine,omitempty"`
  2528  	// ForceSendFields is a list of field names (e.g. "IpAddress") to
  2529  	// unconditionally include in API requests. By default, fields with empty or
  2530  	// default values are omitted from API requests. See
  2531  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2532  	// details.
  2533  	ForceSendFields []string `json:"-"`
  2534  	// NullFields is a list of field names (e.g. "IpAddress") to include in API
  2535  	// requests with the JSON null value. By default, fields with empty values are
  2536  	// omitted from API requests. See
  2537  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2538  	NullFields []string `json:"-"`
  2539  }
  2540  
  2541  func (s *RouterApplianceInstance) MarshalJSON() ([]byte, error) {
  2542  	type NoMethod RouterApplianceInstance
  2543  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2544  }
  2545  
  2546  // RoutingVPC: RoutingVPC contains information about the VPC networks
  2547  // associated with the spokes of a Network Connectivity Center hub.
  2548  type RoutingVPC struct {
  2549  	// RequiredForNewSiteToSiteDataTransferSpokes: Output only. If true, indicates
  2550  	// that this VPC network is currently associated with spokes that use the data
  2551  	// transfer feature (spokes where the site_to_site_data_transfer field is set
  2552  	// to true). If you create new spokes that use data transfer, they must be
  2553  	// associated with this VPC network. At most, one VPC network will have this
  2554  	// field set to true.
  2555  	RequiredForNewSiteToSiteDataTransferSpokes bool `json:"requiredForNewSiteToSiteDataTransferSpokes,omitempty"`
  2556  	// Uri: The URI of the VPC network.
  2557  	Uri string `json:"uri,omitempty"`
  2558  	// ForceSendFields is a list of field names (e.g.
  2559  	// "RequiredForNewSiteToSiteDataTransferSpokes") to unconditionally include in
  2560  	// API requests. By default, fields with empty or default values are omitted
  2561  	// from API requests. See
  2562  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2563  	// details.
  2564  	ForceSendFields []string `json:"-"`
  2565  	// NullFields is a list of field names (e.g.
  2566  	// "RequiredForNewSiteToSiteDataTransferSpokes") to include in API requests
  2567  	// with the JSON null value. By default, fields with empty values are omitted
  2568  	// from API requests. See
  2569  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2570  	NullFields []string `json:"-"`
  2571  }
  2572  
  2573  func (s *RoutingVPC) MarshalJSON() ([]byte, error) {
  2574  	type NoMethod RoutingVPC
  2575  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2576  }
  2577  
  2578  // ServiceClass: The ServiceClass resource. Next id: 9
  2579  type ServiceClass struct {
  2580  	// CreateTime: Output only. Time when the ServiceClass was created.
  2581  	CreateTime string `json:"createTime,omitempty"`
  2582  	// Description: A description of this resource.
  2583  	Description string `json:"description,omitempty"`
  2584  	// Etag: Optional. The etag is computed by the server, and may be sent on
  2585  	// update and delete requests to ensure the client has an up-to-date value
  2586  	// before proceeding.
  2587  	Etag string `json:"etag,omitempty"`
  2588  	// Labels: User-defined labels.
  2589  	Labels map[string]string `json:"labels,omitempty"`
  2590  	// Name: Immutable. The name of a ServiceClass resource. Format:
  2591  	// projects/{project}/locations/{location}/serviceClasses/{service_class} See:
  2592  	// https://google.aip.dev/122#fields-representing-resource-names
  2593  	Name string `json:"name,omitempty"`
  2594  	// ServiceClass: Output only. The generated service class name. Use this name
  2595  	// to refer to the Service class in Service Connection Maps and Service
  2596  	// Connection Policies.
  2597  	ServiceClass string `json:"serviceClass,omitempty"`
  2598  	// UpdateTime: Output only. Time when the ServiceClass was updated.
  2599  	UpdateTime string `json:"updateTime,omitempty"`
  2600  
  2601  	// ServerResponse contains the HTTP response code and headers from the server.
  2602  	googleapi.ServerResponse `json:"-"`
  2603  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2604  	// unconditionally include in API requests. By default, fields with empty or
  2605  	// default values are omitted from API requests. See
  2606  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2607  	// details.
  2608  	ForceSendFields []string `json:"-"`
  2609  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2610  	// requests with the JSON null value. By default, fields with empty values are
  2611  	// omitted from API requests. See
  2612  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2613  	NullFields []string `json:"-"`
  2614  }
  2615  
  2616  func (s *ServiceClass) MarshalJSON() ([]byte, error) {
  2617  	type NoMethod ServiceClass
  2618  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2619  }
  2620  
  2621  // ServiceConnectionMap: The ServiceConnectionMap resource. Next id: 15
  2622  type ServiceConnectionMap struct {
  2623  	// ConsumerPscConfigs: The PSC configurations on consumer side.
  2624  	ConsumerPscConfigs []*ConsumerPscConfig `json:"consumerPscConfigs,omitempty"`
  2625  	// ConsumerPscConnections: Output only. PSC connection details on consumer
  2626  	// side.
  2627  	ConsumerPscConnections []*ConsumerPscConnection `json:"consumerPscConnections,omitempty"`
  2628  	// CreateTime: Output only. Time when the ServiceConnectionMap was created.
  2629  	CreateTime string `json:"createTime,omitempty"`
  2630  	// Description: A description of this resource.
  2631  	Description string `json:"description,omitempty"`
  2632  	// Etag: Optional. The etag is computed by the server, and may be sent on
  2633  	// update and delete requests to ensure the client has an up-to-date value
  2634  	// before proceeding.
  2635  	Etag string `json:"etag,omitempty"`
  2636  	// Infrastructure: Output only. The infrastructure used for connections between
  2637  	// consumers/producers.
  2638  	//
  2639  	// Possible values:
  2640  	//   "INFRASTRUCTURE_UNSPECIFIED" - An invalid infrastructure as the default
  2641  	// case.
  2642  	//   "PSC" - Private Service Connect is used for connections.
  2643  	Infrastructure string `json:"infrastructure,omitempty"`
  2644  	// Labels: User-defined labels.
  2645  	Labels map[string]string `json:"labels,omitempty"`
  2646  	// Name: Immutable. The name of a ServiceConnectionMap. Format:
  2647  	// projects/{project}/locations/{location}/serviceConnectionMaps/{service_connec
  2648  	// tion_map} See: https://google.aip.dev/122#fields-representing-resource-names
  2649  	Name string `json:"name,omitempty"`
  2650  	// ProducerPscConfigs: The PSC configurations on producer side.
  2651  	ProducerPscConfigs []*ProducerPscConfig `json:"producerPscConfigs,omitempty"`
  2652  	// ServiceClass: The service class identifier this ServiceConnectionMap is for.
  2653  	// The user of ServiceConnectionMap create API needs to have
  2654  	// networkconnecitivty.serviceclasses.use iam permission for the service class.
  2655  	ServiceClass string `json:"serviceClass,omitempty"`
  2656  	// ServiceClassUri: Output only. The service class uri this
  2657  	// ServiceConnectionMap is for.
  2658  	ServiceClassUri string `json:"serviceClassUri,omitempty"`
  2659  	// Token: The token provided by the consumer. This token authenticates that the
  2660  	// consumer can create a connecton within the specified project and network.
  2661  	Token string `json:"token,omitempty"`
  2662  	// UpdateTime: Output only. Time when the ServiceConnectionMap was updated.
  2663  	UpdateTime string `json:"updateTime,omitempty"`
  2664  
  2665  	// ServerResponse contains the HTTP response code and headers from the server.
  2666  	googleapi.ServerResponse `json:"-"`
  2667  	// ForceSendFields is a list of field names (e.g. "ConsumerPscConfigs") to
  2668  	// unconditionally include in API requests. By default, fields with empty or
  2669  	// default values are omitted from API requests. See
  2670  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2671  	// details.
  2672  	ForceSendFields []string `json:"-"`
  2673  	// NullFields is a list of field names (e.g. "ConsumerPscConfigs") to include
  2674  	// in API requests with the JSON null value. By default, fields with empty
  2675  	// values are omitted from API requests. See
  2676  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2677  	NullFields []string `json:"-"`
  2678  }
  2679  
  2680  func (s *ServiceConnectionMap) MarshalJSON() ([]byte, error) {
  2681  	type NoMethod ServiceConnectionMap
  2682  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2683  }
  2684  
  2685  // ServiceConnectionPolicy: The ServiceConnectionPolicy resource. Next id: 12
  2686  type ServiceConnectionPolicy struct {
  2687  	// CreateTime: Output only. Time when the ServiceConnectionMap was created.
  2688  	CreateTime string `json:"createTime,omitempty"`
  2689  	// Description: A description of this resource.
  2690  	Description string `json:"description,omitempty"`
  2691  	// Etag: Optional. The etag is computed by the server, and may be sent on
  2692  	// update and delete requests to ensure the client has an up-to-date value
  2693  	// before proceeding.
  2694  	Etag string `json:"etag,omitempty"`
  2695  	// Infrastructure: Output only. The type of underlying resources used to create
  2696  	// the connection.
  2697  	//
  2698  	// Possible values:
  2699  	//   "INFRASTRUCTURE_UNSPECIFIED" - An invalid infrastructure as the default
  2700  	// case.
  2701  	//   "PSC" - Private Service Connect is used for connections.
  2702  	Infrastructure string `json:"infrastructure,omitempty"`
  2703  	// Labels: User-defined labels.
  2704  	Labels map[string]string `json:"labels,omitempty"`
  2705  	// Name: Immutable. The name of a ServiceConnectionPolicy. Format:
  2706  	// projects/{project}/locations/{location}/serviceConnectionPolicies/{service_co
  2707  	// nnection_policy} See:
  2708  	// https://google.aip.dev/122#fields-representing-resource-names
  2709  	Name string `json:"name,omitempty"`
  2710  	// Network: The resource path of the consumer network. Example: -
  2711  	// projects/{projectNumOrId}/global/networks/{resourceId}.
  2712  	Network string `json:"network,omitempty"`
  2713  	// PscConfig: Configuration used for Private Service Connect connections. Used
  2714  	// when Infrastructure is PSC.
  2715  	PscConfig *PscConfig `json:"pscConfig,omitempty"`
  2716  	// PscConnections: Output only. [Output only] Information about each Private
  2717  	// Service Connect connection.
  2718  	PscConnections []*PscConnection `json:"pscConnections,omitempty"`
  2719  	// ServiceClass: The service class identifier for which this
  2720  	// ServiceConnectionPolicy is for. The service class identifier is a unique,
  2721  	// symbolic representation of a ServiceClass. It is provided by the Service
  2722  	// Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql.
  2723  	// 3rd party services do not. For example, test-service-a3dfcx.
  2724  	ServiceClass string `json:"serviceClass,omitempty"`
  2725  	// UpdateTime: Output only. Time when the ServiceConnectionMap was updated.
  2726  	UpdateTime string `json:"updateTime,omitempty"`
  2727  
  2728  	// ServerResponse contains the HTTP response code and headers from the server.
  2729  	googleapi.ServerResponse `json:"-"`
  2730  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2731  	// unconditionally include in API requests. By default, fields with empty or
  2732  	// default values are omitted from API requests. See
  2733  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2734  	// details.
  2735  	ForceSendFields []string `json:"-"`
  2736  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2737  	// requests with the JSON null value. By default, fields with empty values are
  2738  	// omitted from API requests. See
  2739  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2740  	NullFields []string `json:"-"`
  2741  }
  2742  
  2743  func (s *ServiceConnectionPolicy) MarshalJSON() ([]byte, error) {
  2744  	type NoMethod ServiceConnectionPolicy
  2745  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2746  }
  2747  
  2748  // ServiceConnectionToken: The ServiceConnectionToken resource. Next id: 10
  2749  type ServiceConnectionToken struct {
  2750  	// CreateTime: Output only. Time when the ServiceConnectionToken was created.
  2751  	CreateTime string `json:"createTime,omitempty"`
  2752  	// Description: A description of this resource.
  2753  	Description string `json:"description,omitempty"`
  2754  	// Etag: Optional. The etag is computed by the server, and may be sent on
  2755  	// update and delete requests to ensure the client has an up-to-date value
  2756  	// before proceeding.
  2757  	Etag string `json:"etag,omitempty"`
  2758  	// ExpireTime: Output only. The time to which this token is valid.
  2759  	ExpireTime string `json:"expireTime,omitempty"`
  2760  	// Labels: User-defined labels.
  2761  	Labels map[string]string `json:"labels,omitempty"`
  2762  	// Name: Immutable. The name of a ServiceConnectionToken. Format:
  2763  	// projects/{project}/locations/{location}/ServiceConnectionTokens/{service_conn
  2764  	// ection_token} See:
  2765  	// https://google.aip.dev/122#fields-representing-resource-names
  2766  	Name string `json:"name,omitempty"`
  2767  	// Network: The resource path of the network associated with this token.
  2768  	// Example: projects/{projectNumOrId}/global/networks/{resourceId}.
  2769  	Network string `json:"network,omitempty"`
  2770  	// Token: Output only. The token generated by Automation.
  2771  	Token string `json:"token,omitempty"`
  2772  	// UpdateTime: Output only. Time when the ServiceConnectionToken was updated.
  2773  	UpdateTime string `json:"updateTime,omitempty"`
  2774  
  2775  	// ServerResponse contains the HTTP response code and headers from the server.
  2776  	googleapi.ServerResponse `json:"-"`
  2777  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2778  	// unconditionally include in API requests. By default, fields with empty or
  2779  	// default values are omitted from API requests. See
  2780  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2781  	// details.
  2782  	ForceSendFields []string `json:"-"`
  2783  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2784  	// requests with the JSON null value. By default, fields with empty values are
  2785  	// omitted from API requests. See
  2786  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2787  	NullFields []string `json:"-"`
  2788  }
  2789  
  2790  func (s *ServiceConnectionToken) MarshalJSON() ([]byte, error) {
  2791  	type NoMethod ServiceConnectionToken
  2792  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2793  }
  2794  
  2795  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  2796  type SetIamPolicyRequest struct {
  2797  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  2798  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  2799  	// policy but certain Google Cloud services (such as Projects) might reject
  2800  	// them.
  2801  	Policy *Policy `json:"policy,omitempty"`
  2802  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  2803  	// modify. Only the fields in the mask will be modified. If no mask is
  2804  	// provided, the following default mask is used: `paths: "bindings, etag"
  2805  	UpdateMask string `json:"updateMask,omitempty"`
  2806  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  2807  	// include in API requests. By default, fields with empty or default values are
  2808  	// omitted from API requests. See
  2809  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2810  	// details.
  2811  	ForceSendFields []string `json:"-"`
  2812  	// NullFields is a list of field names (e.g. "Policy") to include in API
  2813  	// requests with the JSON null value. By default, fields with empty values are
  2814  	// omitted from API requests. See
  2815  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2816  	NullFields []string `json:"-"`
  2817  }
  2818  
  2819  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  2820  	type NoMethod SetIamPolicyRequest
  2821  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2822  }
  2823  
  2824  // Spoke: A Network Connectivity Center spoke represents one or more network
  2825  // connectivity resources. When you create a spoke, you associate it with a
  2826  // hub. You must also identify a value for exactly one of the following fields:
  2827  // * linked_vpn_tunnels * linked_interconnect_attachments *
  2828  // linked_router_appliance_instances * linked_vpc_network
  2829  type Spoke struct {
  2830  	// CreateTime: Output only. The time the spoke was created.
  2831  	CreateTime string `json:"createTime,omitempty"`
  2832  	// Description: An optional description of the spoke.
  2833  	Description string `json:"description,omitempty"`
  2834  	// Group: Optional. The name of the group that this spoke is associated with.
  2835  	Group string `json:"group,omitempty"`
  2836  	// Hub: Immutable. The name of the hub that this spoke is attached to.
  2837  	Hub string `json:"hub,omitempty"`
  2838  	// Labels: Optional labels in key-value pair format. For more information about
  2839  	// labels, see Requirements for labels
  2840  	// (https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
  2841  	Labels map[string]string `json:"labels,omitempty"`
  2842  	// LinkedInterconnectAttachments: VLAN attachments that are associated with the
  2843  	// spoke.
  2844  	LinkedInterconnectAttachments *LinkedInterconnectAttachments `json:"linkedInterconnectAttachments,omitempty"`
  2845  	// LinkedRouterApplianceInstances: Router appliance instances that are
  2846  	// associated with the spoke.
  2847  	LinkedRouterApplianceInstances *LinkedRouterApplianceInstances `json:"linkedRouterApplianceInstances,omitempty"`
  2848  	// LinkedVpcNetwork: Optional. VPC network that is associated with the spoke.
  2849  	LinkedVpcNetwork *LinkedVpcNetwork `json:"linkedVpcNetwork,omitempty"`
  2850  	// LinkedVpnTunnels: VPN tunnels that are associated with the spoke.
  2851  	LinkedVpnTunnels *LinkedVpnTunnels `json:"linkedVpnTunnels,omitempty"`
  2852  	// Name: Immutable. The name of the spoke. Spoke names must be unique. They use
  2853  	// the following form:
  2854  	// `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
  2855  	Name string `json:"name,omitempty"`
  2856  	// Reasons: Output only. The reasons for current state of the spoke. Only
  2857  	// present when the spoke is in the `INACTIVE` state.
  2858  	Reasons []*StateReason `json:"reasons,omitempty"`
  2859  	// SpokeType: Output only. The type of resource associated with the spoke.
  2860  	//
  2861  	// Possible values:
  2862  	//   "SPOKE_TYPE_UNSPECIFIED" - Unspecified spoke type.
  2863  	//   "VPN_TUNNEL" - Spokes associated with VPN tunnels.
  2864  	//   "INTERCONNECT_ATTACHMENT" - Spokes associated with VLAN attachments.
  2865  	//   "ROUTER_APPLIANCE" - Spokes associated with router appliance instances.
  2866  	//   "VPC_NETWORK" - Spokes associated with VPC networks.
  2867  	SpokeType string `json:"spokeType,omitempty"`
  2868  	// State: Output only. The current lifecycle state of this spoke.
  2869  	//
  2870  	// Possible values:
  2871  	//   "STATE_UNSPECIFIED" - No state information available
  2872  	//   "CREATING" - The resource's create operation is in progress.
  2873  	//   "ACTIVE" - The resource is active
  2874  	//   "DELETING" - The resource's delete operation is in progress.
  2875  	//   "ACCEPTING" - The resource's accept operation is in progress.
  2876  	//   "REJECTING" - The resource's reject operation is in progress.
  2877  	//   "UPDATING" - The resource's update operation is in progress.
  2878  	//   "INACTIVE" - The resource is inactive.
  2879  	//   "OBSOLETE" - The hub associated with this spoke resource has been deleted.
  2880  	// This state applies to spoke resources only.
  2881  	State string `json:"state,omitempty"`
  2882  	// UniqueId: Output only. The Google-generated UUID for the spoke. This value
  2883  	// is unique across all spoke resources. If a spoke is deleted and another with
  2884  	// the same name is created, the new spoke is assigned a different `unique_id`.
  2885  	UniqueId string `json:"uniqueId,omitempty"`
  2886  	// UpdateTime: Output only. The time the spoke was last updated.
  2887  	UpdateTime string `json:"updateTime,omitempty"`
  2888  
  2889  	// ServerResponse contains the HTTP response code and headers from the server.
  2890  	googleapi.ServerResponse `json:"-"`
  2891  	// ForceSendFields is a list of field names (e.g. "CreateTime") to
  2892  	// unconditionally include in API requests. By default, fields with empty or
  2893  	// default values are omitted from API requests. See
  2894  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2895  	// details.
  2896  	ForceSendFields []string `json:"-"`
  2897  	// NullFields is a list of field names (e.g. "CreateTime") to include in API
  2898  	// requests with the JSON null value. By default, fields with empty values are
  2899  	// omitted from API requests. See
  2900  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2901  	NullFields []string `json:"-"`
  2902  }
  2903  
  2904  func (s *Spoke) MarshalJSON() ([]byte, error) {
  2905  	type NoMethod Spoke
  2906  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2907  }
  2908  
  2909  // SpokeStateCount: The number of spokes that are in a particular state and
  2910  // associated with a given hub.
  2911  type SpokeStateCount struct {
  2912  	// Count: Output only. The total number of spokes that are in this state and
  2913  	// associated with a given hub.
  2914  	Count int64 `json:"count,omitempty,string"`
  2915  	// State: Output only. The state of the spokes.
  2916  	//
  2917  	// Possible values:
  2918  	//   "STATE_UNSPECIFIED" - No state information available
  2919  	//   "CREATING" - The resource's create operation is in progress.
  2920  	//   "ACTIVE" - The resource is active
  2921  	//   "DELETING" - The resource's delete operation is in progress.
  2922  	//   "ACCEPTING" - The resource's accept operation is in progress.
  2923  	//   "REJECTING" - The resource's reject operation is in progress.
  2924  	//   "UPDATING" - The resource's update operation is in progress.
  2925  	//   "INACTIVE" - The resource is inactive.
  2926  	//   "OBSOLETE" - The hub associated with this spoke resource has been deleted.
  2927  	// This state applies to spoke resources only.
  2928  	State string `json:"state,omitempty"`
  2929  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  2930  	// include in API requests. By default, fields with empty or default values are
  2931  	// omitted from API requests. See
  2932  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2933  	// details.
  2934  	ForceSendFields []string `json:"-"`
  2935  	// NullFields is a list of field names (e.g. "Count") to include in API
  2936  	// requests with the JSON null value. By default, fields with empty values are
  2937  	// omitted from API requests. See
  2938  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2939  	NullFields []string `json:"-"`
  2940  }
  2941  
  2942  func (s *SpokeStateCount) MarshalJSON() ([]byte, error) {
  2943  	type NoMethod SpokeStateCount
  2944  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2945  }
  2946  
  2947  // SpokeStateReasonCount: The number of spokes in the hub that are inactive for
  2948  // this reason.
  2949  type SpokeStateReasonCount struct {
  2950  	// Count: Output only. The total number of spokes that are inactive for a
  2951  	// particular reason and associated with a given hub.
  2952  	Count int64 `json:"count,omitempty,string"`
  2953  	// StateReasonCode: Output only. The reason that a spoke is inactive.
  2954  	//
  2955  	// Possible values:
  2956  	//   "CODE_UNSPECIFIED" - No information available.
  2957  	//   "PENDING_REVIEW" - The proposed spoke is pending review.
  2958  	//   "REJECTED" - The proposed spoke has been rejected by the hub
  2959  	// administrator.
  2960  	//   "PAUSED" - The spoke has been deactivated internally.
  2961  	//   "FAILED" - Network Connectivity Center encountered errors while accepting
  2962  	// the spoke.
  2963  	StateReasonCode string `json:"stateReasonCode,omitempty"`
  2964  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  2965  	// include in API requests. By default, fields with empty or default values are
  2966  	// omitted from API requests. See
  2967  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  2968  	// details.
  2969  	ForceSendFields []string `json:"-"`
  2970  	// NullFields is a list of field names (e.g. "Count") to include in API
  2971  	// requests with the JSON null value. By default, fields with empty values are
  2972  	// omitted from API requests. See
  2973  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  2974  	NullFields []string `json:"-"`
  2975  }
  2976  
  2977  func (s *SpokeStateReasonCount) MarshalJSON() ([]byte, error) {
  2978  	type NoMethod SpokeStateReasonCount
  2979  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  2980  }
  2981  
  2982  // SpokeSummary: Summarizes information about the spokes associated with a hub.
  2983  // The summary includes a count of spokes according to type and according to
  2984  // state. If any spokes are inactive, the summary also lists the reasons they
  2985  // are inactive, including a count for each reason.
  2986  type SpokeSummary struct {
  2987  	// SpokeStateCounts: Output only. Counts the number of spokes that are in each
  2988  	// state and associated with a given hub.
  2989  	SpokeStateCounts []*SpokeStateCount `json:"spokeStateCounts,omitempty"`
  2990  	// SpokeStateReasonCounts: Output only. Counts the number of spokes that are
  2991  	// inactive for each possible reason and associated with a given hub.
  2992  	SpokeStateReasonCounts []*SpokeStateReasonCount `json:"spokeStateReasonCounts,omitempty"`
  2993  	// SpokeTypeCounts: Output only. Counts the number of spokes of each type that
  2994  	// are associated with a specific hub.
  2995  	SpokeTypeCounts []*SpokeTypeCount `json:"spokeTypeCounts,omitempty"`
  2996  	// ForceSendFields is a list of field names (e.g. "SpokeStateCounts") to
  2997  	// unconditionally include in API requests. By default, fields with empty or
  2998  	// default values are omitted from API requests. See
  2999  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3000  	// details.
  3001  	ForceSendFields []string `json:"-"`
  3002  	// NullFields is a list of field names (e.g. "SpokeStateCounts") to include in
  3003  	// API requests with the JSON null value. By default, fields with empty values
  3004  	// are omitted from API requests. See
  3005  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3006  	NullFields []string `json:"-"`
  3007  }
  3008  
  3009  func (s *SpokeSummary) MarshalJSON() ([]byte, error) {
  3010  	type NoMethod SpokeSummary
  3011  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3012  }
  3013  
  3014  // SpokeTypeCount: The number of spokes of a given type that are associated
  3015  // with a specific hub. The type indicates what kind of resource is associated
  3016  // with the spoke.
  3017  type SpokeTypeCount struct {
  3018  	// Count: Output only. The total number of spokes of this type that are
  3019  	// associated with the hub.
  3020  	Count int64 `json:"count,omitempty,string"`
  3021  	// SpokeType: Output only. The type of the spokes.
  3022  	//
  3023  	// Possible values:
  3024  	//   "SPOKE_TYPE_UNSPECIFIED" - Unspecified spoke type.
  3025  	//   "VPN_TUNNEL" - Spokes associated with VPN tunnels.
  3026  	//   "INTERCONNECT_ATTACHMENT" - Spokes associated with VLAN attachments.
  3027  	//   "ROUTER_APPLIANCE" - Spokes associated with router appliance instances.
  3028  	//   "VPC_NETWORK" - Spokes associated with VPC networks.
  3029  	SpokeType string `json:"spokeType,omitempty"`
  3030  	// ForceSendFields is a list of field names (e.g. "Count") to unconditionally
  3031  	// include in API requests. By default, fields with empty or default values are
  3032  	// omitted from API requests. See
  3033  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3034  	// details.
  3035  	ForceSendFields []string `json:"-"`
  3036  	// NullFields is a list of field names (e.g. "Count") to include in API
  3037  	// requests with the JSON null value. By default, fields with empty values are
  3038  	// omitted from API requests. See
  3039  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3040  	NullFields []string `json:"-"`
  3041  }
  3042  
  3043  func (s *SpokeTypeCount) MarshalJSON() ([]byte, error) {
  3044  	type NoMethod SpokeTypeCount
  3045  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3046  }
  3047  
  3048  // StateReason: The reason a spoke is inactive.
  3049  type StateReason struct {
  3050  	// Code: The code associated with this reason.
  3051  	//
  3052  	// Possible values:
  3053  	//   "CODE_UNSPECIFIED" - No information available.
  3054  	//   "PENDING_REVIEW" - The proposed spoke is pending review.
  3055  	//   "REJECTED" - The proposed spoke has been rejected by the hub
  3056  	// administrator.
  3057  	//   "PAUSED" - The spoke has been deactivated internally.
  3058  	//   "FAILED" - Network Connectivity Center encountered errors while accepting
  3059  	// the spoke.
  3060  	Code string `json:"code,omitempty"`
  3061  	// Message: Human-readable details about this reason.
  3062  	Message string `json:"message,omitempty"`
  3063  	// UserDetails: Additional information provided by the user in the RejectSpoke
  3064  	// call.
  3065  	UserDetails string `json:"userDetails,omitempty"`
  3066  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3067  	// include in API requests. By default, fields with empty or default values are
  3068  	// omitted from API requests. See
  3069  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3070  	// details.
  3071  	ForceSendFields []string `json:"-"`
  3072  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3073  	// with the JSON null value. By default, fields with empty values are omitted
  3074  	// from API requests. See
  3075  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3076  	NullFields []string `json:"-"`
  3077  }
  3078  
  3079  func (s *StateReason) MarshalJSON() ([]byte, error) {
  3080  	type NoMethod StateReason
  3081  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3082  }
  3083  
  3084  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  3085  type TestIamPermissionsRequest struct {
  3086  	// Permissions: The set of permissions to check for the `resource`. Permissions
  3087  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  3088  	// information see IAM Overview
  3089  	// (https://cloud.google.com/iam/docs/overview#permissions).
  3090  	Permissions []string `json:"permissions,omitempty"`
  3091  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3092  	// unconditionally include in API requests. By default, fields with empty or
  3093  	// default values are omitted from API requests. See
  3094  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3095  	// details.
  3096  	ForceSendFields []string `json:"-"`
  3097  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3098  	// requests with the JSON null value. By default, fields with empty values are
  3099  	// omitted from API requests. See
  3100  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3101  	NullFields []string `json:"-"`
  3102  }
  3103  
  3104  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  3105  	type NoMethod TestIamPermissionsRequest
  3106  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3107  }
  3108  
  3109  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  3110  // method.
  3111  type TestIamPermissionsResponse struct {
  3112  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  3113  	// caller is allowed.
  3114  	Permissions []string `json:"permissions,omitempty"`
  3115  
  3116  	// ServerResponse contains the HTTP response code and headers from the server.
  3117  	googleapi.ServerResponse `json:"-"`
  3118  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  3119  	// unconditionally include in API requests. By default, fields with empty or
  3120  	// default values are omitted from API requests. See
  3121  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3122  	// details.
  3123  	ForceSendFields []string `json:"-"`
  3124  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  3125  	// requests with the JSON null value. By default, fields with empty values are
  3126  	// omitted from API requests. See
  3127  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3128  	NullFields []string `json:"-"`
  3129  }
  3130  
  3131  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  3132  	type NoMethod TestIamPermissionsResponse
  3133  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3134  }
  3135  
  3136  // VirtualMachine: VM instances to which this policy-based route applies to.
  3137  type VirtualMachine struct {
  3138  	// Tags: Optional. A list of VM instance tags the this policy-based route
  3139  	// applies to. VM instances that have ANY of tags specified here will install
  3140  	// this PBR.
  3141  	Tags []string `json:"tags,omitempty"`
  3142  	// ForceSendFields is a list of field names (e.g. "Tags") to unconditionally
  3143  	// include in API requests. By default, fields with empty or default values are
  3144  	// omitted from API requests. See
  3145  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3146  	// details.
  3147  	ForceSendFields []string `json:"-"`
  3148  	// NullFields is a list of field names (e.g. "Tags") to include in API requests
  3149  	// with the JSON null value. By default, fields with empty values are omitted
  3150  	// from API requests. See
  3151  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3152  	NullFields []string `json:"-"`
  3153  }
  3154  
  3155  func (s *VirtualMachine) MarshalJSON() ([]byte, error) {
  3156  	type NoMethod VirtualMachine
  3157  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3158  }
  3159  
  3160  // Warnings: Informational warning message.
  3161  type Warnings struct {
  3162  	// Code: Output only. A warning code, if applicable.
  3163  	//
  3164  	// Possible values:
  3165  	//   "WARNING_UNSPECIFIED" - Default value.
  3166  	//   "RESOURCE_NOT_ACTIVE" - The policy-based route is not active and
  3167  	// functioning. Common causes are the dependent network was deleted or the
  3168  	// resource project was turned off.
  3169  	//   "RESOURCE_BEING_MODIFIED" - The policy-based route is being modified (e.g.
  3170  	// created/deleted) at this time.
  3171  	Code string `json:"code,omitempty"`
  3172  	// Data: Output only. Metadata about this warning in key: value format. The key
  3173  	// should provides more detail on the warning being returned. For example, for
  3174  	// warnings where there are no results in a list request for a particular zone,
  3175  	// this key might be scope and the key value might be the zone name. Other
  3176  	// examples might be a key indicating a deprecated resource and a suggested
  3177  	// replacement.
  3178  	Data map[string]string `json:"data,omitempty"`
  3179  	// WarningMessage: Output only. A human-readable description of the warning
  3180  	// code.
  3181  	WarningMessage string `json:"warningMessage,omitempty"`
  3182  	// ForceSendFields is a list of field names (e.g. "Code") to unconditionally
  3183  	// include in API requests. By default, fields with empty or default values are
  3184  	// omitted from API requests. See
  3185  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  3186  	// details.
  3187  	ForceSendFields []string `json:"-"`
  3188  	// NullFields is a list of field names (e.g. "Code") to include in API requests
  3189  	// with the JSON null value. By default, fields with empty values are omitted
  3190  	// from API requests. See
  3191  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  3192  	NullFields []string `json:"-"`
  3193  }
  3194  
  3195  func (s *Warnings) MarshalJSON() ([]byte, error) {
  3196  	type NoMethod Warnings
  3197  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  3198  }
  3199  
  3200  type ProjectsLocationsGetCall struct {
  3201  	s            *Service
  3202  	name         string
  3203  	urlParams_   gensupport.URLParams
  3204  	ifNoneMatch_ string
  3205  	ctx_         context.Context
  3206  	header_      http.Header
  3207  }
  3208  
  3209  // Get: Gets information about a location.
  3210  //
  3211  // - name: Resource name for the location.
  3212  func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
  3213  	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3214  	c.name = name
  3215  	return c
  3216  }
  3217  
  3218  // Fields allows partial responses to be retrieved. See
  3219  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3220  // details.
  3221  func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
  3222  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3223  	return c
  3224  }
  3225  
  3226  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3227  // object's ETag matches the given value. This is useful for getting updates
  3228  // only after the object has changed since the last request.
  3229  func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
  3230  	c.ifNoneMatch_ = entityTag
  3231  	return c
  3232  }
  3233  
  3234  // Context sets the context to be used in this call's Do method.
  3235  func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
  3236  	c.ctx_ = ctx
  3237  	return c
  3238  }
  3239  
  3240  // Header returns a http.Header that can be modified by the caller to add
  3241  // headers to the request.
  3242  func (c *ProjectsLocationsGetCall) Header() http.Header {
  3243  	if c.header_ == nil {
  3244  		c.header_ = make(http.Header)
  3245  	}
  3246  	return c.header_
  3247  }
  3248  
  3249  func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
  3250  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3251  	if c.ifNoneMatch_ != "" {
  3252  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3253  	}
  3254  	var body io.Reader = nil
  3255  	c.urlParams_.Set("alt", alt)
  3256  	c.urlParams_.Set("prettyPrint", "false")
  3257  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3258  	urls += "?" + c.urlParams_.Encode()
  3259  	req, err := http.NewRequest("GET", urls, body)
  3260  	if err != nil {
  3261  		return nil, err
  3262  	}
  3263  	req.Header = reqHeaders
  3264  	googleapi.Expand(req.URL, map[string]string{
  3265  		"name": c.name,
  3266  	})
  3267  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3268  }
  3269  
  3270  // Do executes the "networkconnectivity.projects.locations.get" call.
  3271  // Any non-2xx status code is an error. Response headers are in either
  3272  // *Location.ServerResponse.Header or (if a response was returned at all) in
  3273  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3274  // whether the returned error was because http.StatusNotModified was returned.
  3275  func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
  3276  	gensupport.SetOptions(c.urlParams_, opts...)
  3277  	res, err := c.doRequest("json")
  3278  	if res != nil && res.StatusCode == http.StatusNotModified {
  3279  		if res.Body != nil {
  3280  			res.Body.Close()
  3281  		}
  3282  		return nil, gensupport.WrapError(&googleapi.Error{
  3283  			Code:   res.StatusCode,
  3284  			Header: res.Header,
  3285  		})
  3286  	}
  3287  	if err != nil {
  3288  		return nil, err
  3289  	}
  3290  	defer googleapi.CloseBody(res)
  3291  	if err := googleapi.CheckResponse(res); err != nil {
  3292  		return nil, gensupport.WrapError(err)
  3293  	}
  3294  	ret := &Location{
  3295  		ServerResponse: googleapi.ServerResponse{
  3296  			Header:         res.Header,
  3297  			HTTPStatusCode: res.StatusCode,
  3298  		},
  3299  	}
  3300  	target := &ret
  3301  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3302  		return nil, err
  3303  	}
  3304  	return ret, nil
  3305  }
  3306  
  3307  type ProjectsLocationsListCall struct {
  3308  	s            *Service
  3309  	name         string
  3310  	urlParams_   gensupport.URLParams
  3311  	ifNoneMatch_ string
  3312  	ctx_         context.Context
  3313  	header_      http.Header
  3314  }
  3315  
  3316  // List: Lists information about the supported locations for this service.
  3317  //
  3318  // - name: The resource that owns the locations collection, if applicable.
  3319  func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
  3320  	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3321  	c.name = name
  3322  	return c
  3323  }
  3324  
  3325  // Filter sets the optional parameter "filter": A filter to narrow down results
  3326  // to a preferred subset. The filtering language accepts strings like
  3327  // "displayName=tokyo", and is documented in more detail in AIP-160
  3328  // (https://google.aip.dev/160).
  3329  func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
  3330  	c.urlParams_.Set("filter", filter)
  3331  	return c
  3332  }
  3333  
  3334  // PageSize sets the optional parameter "pageSize": The maximum number of
  3335  // results to return. If not set, the service selects a default.
  3336  func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
  3337  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  3338  	return c
  3339  }
  3340  
  3341  // PageToken sets the optional parameter "pageToken": A page token received
  3342  // from the `next_page_token` field in the response. Send that page token to
  3343  // receive the subsequent page.
  3344  func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
  3345  	c.urlParams_.Set("pageToken", pageToken)
  3346  	return c
  3347  }
  3348  
  3349  // Fields allows partial responses to be retrieved. See
  3350  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3351  // details.
  3352  func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
  3353  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3354  	return c
  3355  }
  3356  
  3357  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3358  // object's ETag matches the given value. This is useful for getting updates
  3359  // only after the object has changed since the last request.
  3360  func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
  3361  	c.ifNoneMatch_ = entityTag
  3362  	return c
  3363  }
  3364  
  3365  // Context sets the context to be used in this call's Do method.
  3366  func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
  3367  	c.ctx_ = ctx
  3368  	return c
  3369  }
  3370  
  3371  // Header returns a http.Header that can be modified by the caller to add
  3372  // headers to the request.
  3373  func (c *ProjectsLocationsListCall) Header() http.Header {
  3374  	if c.header_ == nil {
  3375  		c.header_ = make(http.Header)
  3376  	}
  3377  	return c.header_
  3378  }
  3379  
  3380  func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
  3381  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3382  	if c.ifNoneMatch_ != "" {
  3383  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3384  	}
  3385  	var body io.Reader = nil
  3386  	c.urlParams_.Set("alt", alt)
  3387  	c.urlParams_.Set("prettyPrint", "false")
  3388  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations")
  3389  	urls += "?" + c.urlParams_.Encode()
  3390  	req, err := http.NewRequest("GET", urls, body)
  3391  	if err != nil {
  3392  		return nil, err
  3393  	}
  3394  	req.Header = reqHeaders
  3395  	googleapi.Expand(req.URL, map[string]string{
  3396  		"name": c.name,
  3397  	})
  3398  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3399  }
  3400  
  3401  // Do executes the "networkconnectivity.projects.locations.list" call.
  3402  // Any non-2xx status code is an error. Response headers are in either
  3403  // *ListLocationsResponse.ServerResponse.Header or (if a response was returned
  3404  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3405  // check whether the returned error was because http.StatusNotModified was
  3406  // returned.
  3407  func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
  3408  	gensupport.SetOptions(c.urlParams_, opts...)
  3409  	res, err := c.doRequest("json")
  3410  	if res != nil && res.StatusCode == http.StatusNotModified {
  3411  		if res.Body != nil {
  3412  			res.Body.Close()
  3413  		}
  3414  		return nil, gensupport.WrapError(&googleapi.Error{
  3415  			Code:   res.StatusCode,
  3416  			Header: res.Header,
  3417  		})
  3418  	}
  3419  	if err != nil {
  3420  		return nil, err
  3421  	}
  3422  	defer googleapi.CloseBody(res)
  3423  	if err := googleapi.CheckResponse(res); err != nil {
  3424  		return nil, gensupport.WrapError(err)
  3425  	}
  3426  	ret := &ListLocationsResponse{
  3427  		ServerResponse: googleapi.ServerResponse{
  3428  			Header:         res.Header,
  3429  			HTTPStatusCode: res.StatusCode,
  3430  		},
  3431  	}
  3432  	target := &ret
  3433  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3434  		return nil, err
  3435  	}
  3436  	return ret, nil
  3437  }
  3438  
  3439  // Pages invokes f for each page of results.
  3440  // A non-nil error returned from f will halt the iteration.
  3441  // The provided context supersedes any context provided to the Context method.
  3442  func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
  3443  	c.ctx_ = ctx
  3444  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  3445  	for {
  3446  		x, err := c.Do()
  3447  		if err != nil {
  3448  			return err
  3449  		}
  3450  		if err := f(x); err != nil {
  3451  			return err
  3452  		}
  3453  		if x.NextPageToken == "" {
  3454  			return nil
  3455  		}
  3456  		c.PageToken(x.NextPageToken)
  3457  	}
  3458  }
  3459  
  3460  type ProjectsLocationsGlobalHubsAcceptSpokeCall struct {
  3461  	s                     *Service
  3462  	name                  string
  3463  	accepthubspokerequest *AcceptHubSpokeRequest
  3464  	urlParams_            gensupport.URLParams
  3465  	ctx_                  context.Context
  3466  	header_               http.Header
  3467  }
  3468  
  3469  // AcceptSpoke: Accepts a proposal to attach a Network Connectivity Center
  3470  // spoke to a hub.
  3471  //
  3472  // - name: The name of the hub into which to accept the spoke.
  3473  func (r *ProjectsLocationsGlobalHubsService) AcceptSpoke(name string, accepthubspokerequest *AcceptHubSpokeRequest) *ProjectsLocationsGlobalHubsAcceptSpokeCall {
  3474  	c := &ProjectsLocationsGlobalHubsAcceptSpokeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3475  	c.name = name
  3476  	c.accepthubspokerequest = accepthubspokerequest
  3477  	return c
  3478  }
  3479  
  3480  // Fields allows partial responses to be retrieved. See
  3481  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3482  // details.
  3483  func (c *ProjectsLocationsGlobalHubsAcceptSpokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsAcceptSpokeCall {
  3484  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3485  	return c
  3486  }
  3487  
  3488  // Context sets the context to be used in this call's Do method.
  3489  func (c *ProjectsLocationsGlobalHubsAcceptSpokeCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsAcceptSpokeCall {
  3490  	c.ctx_ = ctx
  3491  	return c
  3492  }
  3493  
  3494  // Header returns a http.Header that can be modified by the caller to add
  3495  // headers to the request.
  3496  func (c *ProjectsLocationsGlobalHubsAcceptSpokeCall) Header() http.Header {
  3497  	if c.header_ == nil {
  3498  		c.header_ = make(http.Header)
  3499  	}
  3500  	return c.header_
  3501  }
  3502  
  3503  func (c *ProjectsLocationsGlobalHubsAcceptSpokeCall) doRequest(alt string) (*http.Response, error) {
  3504  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3505  	var body io.Reader = nil
  3506  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.accepthubspokerequest)
  3507  	if err != nil {
  3508  		return nil, err
  3509  	}
  3510  	c.urlParams_.Set("alt", alt)
  3511  	c.urlParams_.Set("prettyPrint", "false")
  3512  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:acceptSpoke")
  3513  	urls += "?" + c.urlParams_.Encode()
  3514  	req, err := http.NewRequest("POST", urls, body)
  3515  	if err != nil {
  3516  		return nil, err
  3517  	}
  3518  	req.Header = reqHeaders
  3519  	googleapi.Expand(req.URL, map[string]string{
  3520  		"name": c.name,
  3521  	})
  3522  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3523  }
  3524  
  3525  // Do executes the "networkconnectivity.projects.locations.global.hubs.acceptSpoke" call.
  3526  // Any non-2xx status code is an error. Response headers are in either
  3527  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3528  // returned at all) in error.(*googleapi.Error).Header. Use
  3529  // googleapi.IsNotModified to check whether the returned error was because
  3530  // http.StatusNotModified was returned.
  3531  func (c *ProjectsLocationsGlobalHubsAcceptSpokeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3532  	gensupport.SetOptions(c.urlParams_, opts...)
  3533  	res, err := c.doRequest("json")
  3534  	if res != nil && res.StatusCode == http.StatusNotModified {
  3535  		if res.Body != nil {
  3536  			res.Body.Close()
  3537  		}
  3538  		return nil, gensupport.WrapError(&googleapi.Error{
  3539  			Code:   res.StatusCode,
  3540  			Header: res.Header,
  3541  		})
  3542  	}
  3543  	if err != nil {
  3544  		return nil, err
  3545  	}
  3546  	defer googleapi.CloseBody(res)
  3547  	if err := googleapi.CheckResponse(res); err != nil {
  3548  		return nil, gensupport.WrapError(err)
  3549  	}
  3550  	ret := &GoogleLongrunningOperation{
  3551  		ServerResponse: googleapi.ServerResponse{
  3552  			Header:         res.Header,
  3553  			HTTPStatusCode: res.StatusCode,
  3554  		},
  3555  	}
  3556  	target := &ret
  3557  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3558  		return nil, err
  3559  	}
  3560  	return ret, nil
  3561  }
  3562  
  3563  type ProjectsLocationsGlobalHubsCreateCall struct {
  3564  	s          *Service
  3565  	parent     string
  3566  	hub        *Hub
  3567  	urlParams_ gensupport.URLParams
  3568  	ctx_       context.Context
  3569  	header_    http.Header
  3570  }
  3571  
  3572  // Create: Creates a new Network Connectivity Center hub in the specified
  3573  // project.
  3574  //
  3575  // - parent: The parent resource.
  3576  func (r *ProjectsLocationsGlobalHubsService) Create(parent string, hub *Hub) *ProjectsLocationsGlobalHubsCreateCall {
  3577  	c := &ProjectsLocationsGlobalHubsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3578  	c.parent = parent
  3579  	c.hub = hub
  3580  	return c
  3581  }
  3582  
  3583  // HubId sets the optional parameter "hubId": Required. A unique identifier for
  3584  // the hub.
  3585  func (c *ProjectsLocationsGlobalHubsCreateCall) HubId(hubId string) *ProjectsLocationsGlobalHubsCreateCall {
  3586  	c.urlParams_.Set("hubId", hubId)
  3587  	return c
  3588  }
  3589  
  3590  // RequestId sets the optional parameter "requestId": A request ID to identify
  3591  // requests. Specify a unique request ID so that if you must retry your
  3592  // request, the server knows to ignore the request if it has already been
  3593  // completed. The server guarantees that a request doesn't result in creation
  3594  // of duplicate commitments for at least 60 minutes. For example, consider a
  3595  // situation where you make an initial request and the request times out. If
  3596  // you make the request again with the same request ID, the server can check to
  3597  // see whether the original operation was received. If it was, the server
  3598  // ignores the second request. This behavior prevents clients from mistakenly
  3599  // creating duplicate commitments. The request ID must be a valid UUID, with
  3600  // the exception that zero UUID is not supported
  3601  // (00000000-0000-0000-0000-000000000000).
  3602  func (c *ProjectsLocationsGlobalHubsCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsCreateCall {
  3603  	c.urlParams_.Set("requestId", requestId)
  3604  	return c
  3605  }
  3606  
  3607  // Fields allows partial responses to be retrieved. See
  3608  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3609  // details.
  3610  func (c *ProjectsLocationsGlobalHubsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsCreateCall {
  3611  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3612  	return c
  3613  }
  3614  
  3615  // Context sets the context to be used in this call's Do method.
  3616  func (c *ProjectsLocationsGlobalHubsCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsCreateCall {
  3617  	c.ctx_ = ctx
  3618  	return c
  3619  }
  3620  
  3621  // Header returns a http.Header that can be modified by the caller to add
  3622  // headers to the request.
  3623  func (c *ProjectsLocationsGlobalHubsCreateCall) Header() http.Header {
  3624  	if c.header_ == nil {
  3625  		c.header_ = make(http.Header)
  3626  	}
  3627  	return c.header_
  3628  }
  3629  
  3630  func (c *ProjectsLocationsGlobalHubsCreateCall) doRequest(alt string) (*http.Response, error) {
  3631  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  3632  	var body io.Reader = nil
  3633  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hub)
  3634  	if err != nil {
  3635  		return nil, err
  3636  	}
  3637  	c.urlParams_.Set("alt", alt)
  3638  	c.urlParams_.Set("prettyPrint", "false")
  3639  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hubs")
  3640  	urls += "?" + c.urlParams_.Encode()
  3641  	req, err := http.NewRequest("POST", urls, body)
  3642  	if err != nil {
  3643  		return nil, err
  3644  	}
  3645  	req.Header = reqHeaders
  3646  	googleapi.Expand(req.URL, map[string]string{
  3647  		"parent": c.parent,
  3648  	})
  3649  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3650  }
  3651  
  3652  // Do executes the "networkconnectivity.projects.locations.global.hubs.create" call.
  3653  // Any non-2xx status code is an error. Response headers are in either
  3654  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3655  // returned at all) in error.(*googleapi.Error).Header. Use
  3656  // googleapi.IsNotModified to check whether the returned error was because
  3657  // http.StatusNotModified was returned.
  3658  func (c *ProjectsLocationsGlobalHubsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3659  	gensupport.SetOptions(c.urlParams_, opts...)
  3660  	res, err := c.doRequest("json")
  3661  	if res != nil && res.StatusCode == http.StatusNotModified {
  3662  		if res.Body != nil {
  3663  			res.Body.Close()
  3664  		}
  3665  		return nil, gensupport.WrapError(&googleapi.Error{
  3666  			Code:   res.StatusCode,
  3667  			Header: res.Header,
  3668  		})
  3669  	}
  3670  	if err != nil {
  3671  		return nil, err
  3672  	}
  3673  	defer googleapi.CloseBody(res)
  3674  	if err := googleapi.CheckResponse(res); err != nil {
  3675  		return nil, gensupport.WrapError(err)
  3676  	}
  3677  	ret := &GoogleLongrunningOperation{
  3678  		ServerResponse: googleapi.ServerResponse{
  3679  			Header:         res.Header,
  3680  			HTTPStatusCode: res.StatusCode,
  3681  		},
  3682  	}
  3683  	target := &ret
  3684  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3685  		return nil, err
  3686  	}
  3687  	return ret, nil
  3688  }
  3689  
  3690  type ProjectsLocationsGlobalHubsDeleteCall struct {
  3691  	s          *Service
  3692  	name       string
  3693  	urlParams_ gensupport.URLParams
  3694  	ctx_       context.Context
  3695  	header_    http.Header
  3696  }
  3697  
  3698  // Delete: Deletes a Network Connectivity Center hub.
  3699  //
  3700  // - name: The name of the hub to delete.
  3701  func (r *ProjectsLocationsGlobalHubsService) Delete(name string) *ProjectsLocationsGlobalHubsDeleteCall {
  3702  	c := &ProjectsLocationsGlobalHubsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3703  	c.name = name
  3704  	return c
  3705  }
  3706  
  3707  // RequestId sets the optional parameter "requestId": A request ID to identify
  3708  // requests. Specify a unique request ID so that if you must retry your
  3709  // request, the server knows to ignore the request if it has already been
  3710  // completed. The server guarantees that a request doesn't result in creation
  3711  // of duplicate commitments for at least 60 minutes. For example, consider a
  3712  // situation where you make an initial request and the request times out. If
  3713  // you make the request again with the same request ID, the server can check to
  3714  // see whether the original operation was received. If it was, the server
  3715  // ignores the second request. This behavior prevents clients from mistakenly
  3716  // creating duplicate commitments. The request ID must be a valid UUID, with
  3717  // the exception that zero UUID is not supported
  3718  // (00000000-0000-0000-0000-000000000000).
  3719  func (c *ProjectsLocationsGlobalHubsDeleteCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsDeleteCall {
  3720  	c.urlParams_.Set("requestId", requestId)
  3721  	return c
  3722  }
  3723  
  3724  // Fields allows partial responses to be retrieved. See
  3725  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3726  // details.
  3727  func (c *ProjectsLocationsGlobalHubsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsDeleteCall {
  3728  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3729  	return c
  3730  }
  3731  
  3732  // Context sets the context to be used in this call's Do method.
  3733  func (c *ProjectsLocationsGlobalHubsDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsDeleteCall {
  3734  	c.ctx_ = ctx
  3735  	return c
  3736  }
  3737  
  3738  // Header returns a http.Header that can be modified by the caller to add
  3739  // headers to the request.
  3740  func (c *ProjectsLocationsGlobalHubsDeleteCall) Header() http.Header {
  3741  	if c.header_ == nil {
  3742  		c.header_ = make(http.Header)
  3743  	}
  3744  	return c.header_
  3745  }
  3746  
  3747  func (c *ProjectsLocationsGlobalHubsDeleteCall) doRequest(alt string) (*http.Response, error) {
  3748  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3749  	var body io.Reader = nil
  3750  	c.urlParams_.Set("alt", alt)
  3751  	c.urlParams_.Set("prettyPrint", "false")
  3752  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3753  	urls += "?" + c.urlParams_.Encode()
  3754  	req, err := http.NewRequest("DELETE", urls, body)
  3755  	if err != nil {
  3756  		return nil, err
  3757  	}
  3758  	req.Header = reqHeaders
  3759  	googleapi.Expand(req.URL, map[string]string{
  3760  		"name": c.name,
  3761  	})
  3762  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3763  }
  3764  
  3765  // Do executes the "networkconnectivity.projects.locations.global.hubs.delete" call.
  3766  // Any non-2xx status code is an error. Response headers are in either
  3767  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  3768  // returned at all) in error.(*googleapi.Error).Header. Use
  3769  // googleapi.IsNotModified to check whether the returned error was because
  3770  // http.StatusNotModified was returned.
  3771  func (c *ProjectsLocationsGlobalHubsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  3772  	gensupport.SetOptions(c.urlParams_, opts...)
  3773  	res, err := c.doRequest("json")
  3774  	if res != nil && res.StatusCode == http.StatusNotModified {
  3775  		if res.Body != nil {
  3776  			res.Body.Close()
  3777  		}
  3778  		return nil, gensupport.WrapError(&googleapi.Error{
  3779  			Code:   res.StatusCode,
  3780  			Header: res.Header,
  3781  		})
  3782  	}
  3783  	if err != nil {
  3784  		return nil, err
  3785  	}
  3786  	defer googleapi.CloseBody(res)
  3787  	if err := googleapi.CheckResponse(res); err != nil {
  3788  		return nil, gensupport.WrapError(err)
  3789  	}
  3790  	ret := &GoogleLongrunningOperation{
  3791  		ServerResponse: googleapi.ServerResponse{
  3792  			Header:         res.Header,
  3793  			HTTPStatusCode: res.StatusCode,
  3794  		},
  3795  	}
  3796  	target := &ret
  3797  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3798  		return nil, err
  3799  	}
  3800  	return ret, nil
  3801  }
  3802  
  3803  type ProjectsLocationsGlobalHubsGetCall struct {
  3804  	s            *Service
  3805  	name         string
  3806  	urlParams_   gensupport.URLParams
  3807  	ifNoneMatch_ string
  3808  	ctx_         context.Context
  3809  	header_      http.Header
  3810  }
  3811  
  3812  // Get: Gets details about a Network Connectivity Center hub.
  3813  //
  3814  // - name: The name of the hub resource to get.
  3815  func (r *ProjectsLocationsGlobalHubsService) Get(name string) *ProjectsLocationsGlobalHubsGetCall {
  3816  	c := &ProjectsLocationsGlobalHubsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3817  	c.name = name
  3818  	return c
  3819  }
  3820  
  3821  // Fields allows partial responses to be retrieved. See
  3822  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3823  // details.
  3824  func (c *ProjectsLocationsGlobalHubsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGetCall {
  3825  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3826  	return c
  3827  }
  3828  
  3829  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3830  // object's ETag matches the given value. This is useful for getting updates
  3831  // only after the object has changed since the last request.
  3832  func (c *ProjectsLocationsGlobalHubsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGetCall {
  3833  	c.ifNoneMatch_ = entityTag
  3834  	return c
  3835  }
  3836  
  3837  // Context sets the context to be used in this call's Do method.
  3838  func (c *ProjectsLocationsGlobalHubsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGetCall {
  3839  	c.ctx_ = ctx
  3840  	return c
  3841  }
  3842  
  3843  // Header returns a http.Header that can be modified by the caller to add
  3844  // headers to the request.
  3845  func (c *ProjectsLocationsGlobalHubsGetCall) Header() http.Header {
  3846  	if c.header_ == nil {
  3847  		c.header_ = make(http.Header)
  3848  	}
  3849  	return c.header_
  3850  }
  3851  
  3852  func (c *ProjectsLocationsGlobalHubsGetCall) doRequest(alt string) (*http.Response, error) {
  3853  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3854  	if c.ifNoneMatch_ != "" {
  3855  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3856  	}
  3857  	var body io.Reader = nil
  3858  	c.urlParams_.Set("alt", alt)
  3859  	c.urlParams_.Set("prettyPrint", "false")
  3860  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  3861  	urls += "?" + c.urlParams_.Encode()
  3862  	req, err := http.NewRequest("GET", urls, body)
  3863  	if err != nil {
  3864  		return nil, err
  3865  	}
  3866  	req.Header = reqHeaders
  3867  	googleapi.Expand(req.URL, map[string]string{
  3868  		"name": c.name,
  3869  	})
  3870  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3871  }
  3872  
  3873  // Do executes the "networkconnectivity.projects.locations.global.hubs.get" call.
  3874  // Any non-2xx status code is an error. Response headers are in either
  3875  // *Hub.ServerResponse.Header or (if a response was returned at all) in
  3876  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  3877  // whether the returned error was because http.StatusNotModified was returned.
  3878  func (c *ProjectsLocationsGlobalHubsGetCall) Do(opts ...googleapi.CallOption) (*Hub, error) {
  3879  	gensupport.SetOptions(c.urlParams_, opts...)
  3880  	res, err := c.doRequest("json")
  3881  	if res != nil && res.StatusCode == http.StatusNotModified {
  3882  		if res.Body != nil {
  3883  			res.Body.Close()
  3884  		}
  3885  		return nil, gensupport.WrapError(&googleapi.Error{
  3886  			Code:   res.StatusCode,
  3887  			Header: res.Header,
  3888  		})
  3889  	}
  3890  	if err != nil {
  3891  		return nil, err
  3892  	}
  3893  	defer googleapi.CloseBody(res)
  3894  	if err := googleapi.CheckResponse(res); err != nil {
  3895  		return nil, gensupport.WrapError(err)
  3896  	}
  3897  	ret := &Hub{
  3898  		ServerResponse: googleapi.ServerResponse{
  3899  			Header:         res.Header,
  3900  			HTTPStatusCode: res.StatusCode,
  3901  		},
  3902  	}
  3903  	target := &ret
  3904  	if err := gensupport.DecodeResponse(target, res); err != nil {
  3905  		return nil, err
  3906  	}
  3907  	return ret, nil
  3908  }
  3909  
  3910  type ProjectsLocationsGlobalHubsGetIamPolicyCall struct {
  3911  	s            *Service
  3912  	resource     string
  3913  	urlParams_   gensupport.URLParams
  3914  	ifNoneMatch_ string
  3915  	ctx_         context.Context
  3916  	header_      http.Header
  3917  }
  3918  
  3919  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  3920  // empty policy if the resource exists and does not have a policy set.
  3921  //
  3922  //   - resource: REQUIRED: The resource for which the policy is being requested.
  3923  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  3924  //     for the appropriate value for this field.
  3925  func (r *ProjectsLocationsGlobalHubsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalHubsGetIamPolicyCall {
  3926  	c := &ProjectsLocationsGlobalHubsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3927  	c.resource = resource
  3928  	return c
  3929  }
  3930  
  3931  // OptionsRequestedPolicyVersion sets the optional parameter
  3932  // "options.requestedPolicyVersion": The maximum policy version that will be
  3933  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  3934  // an invalid value will be rejected. Requests for policies with any
  3935  // conditional role bindings must specify version 3. Policies with no
  3936  // conditional role bindings may specify any valid value or leave the field
  3937  // unset. The policy in the response might use the policy version that you
  3938  // specified, or it might use a lower policy version. For example, if you
  3939  // specify version 3, but the policy has no conditional role bindings, the
  3940  // response uses version 1. To learn which resources support conditions in
  3941  // their IAM policies, see the IAM documentation
  3942  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  3943  func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalHubsGetIamPolicyCall {
  3944  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  3945  	return c
  3946  }
  3947  
  3948  // Fields allows partial responses to be retrieved. See
  3949  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  3950  // details.
  3951  func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGetIamPolicyCall {
  3952  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3953  	return c
  3954  }
  3955  
  3956  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  3957  // object's ETag matches the given value. This is useful for getting updates
  3958  // only after the object has changed since the last request.
  3959  func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGetIamPolicyCall {
  3960  	c.ifNoneMatch_ = entityTag
  3961  	return c
  3962  }
  3963  
  3964  // Context sets the context to be used in this call's Do method.
  3965  func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGetIamPolicyCall {
  3966  	c.ctx_ = ctx
  3967  	return c
  3968  }
  3969  
  3970  // Header returns a http.Header that can be modified by the caller to add
  3971  // headers to the request.
  3972  func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Header() http.Header {
  3973  	if c.header_ == nil {
  3974  		c.header_ = make(http.Header)
  3975  	}
  3976  	return c.header_
  3977  }
  3978  
  3979  func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  3980  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  3981  	if c.ifNoneMatch_ != "" {
  3982  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3983  	}
  3984  	var body io.Reader = nil
  3985  	c.urlParams_.Set("alt", alt)
  3986  	c.urlParams_.Set("prettyPrint", "false")
  3987  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  3988  	urls += "?" + c.urlParams_.Encode()
  3989  	req, err := http.NewRequest("GET", urls, body)
  3990  	if err != nil {
  3991  		return nil, err
  3992  	}
  3993  	req.Header = reqHeaders
  3994  	googleapi.Expand(req.URL, map[string]string{
  3995  		"resource": c.resource,
  3996  	})
  3997  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3998  }
  3999  
  4000  // Do executes the "networkconnectivity.projects.locations.global.hubs.getIamPolicy" call.
  4001  // Any non-2xx status code is an error. Response headers are in either
  4002  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4003  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4004  // whether the returned error was because http.StatusNotModified was returned.
  4005  func (c *ProjectsLocationsGlobalHubsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4006  	gensupport.SetOptions(c.urlParams_, opts...)
  4007  	res, err := c.doRequest("json")
  4008  	if res != nil && res.StatusCode == http.StatusNotModified {
  4009  		if res.Body != nil {
  4010  			res.Body.Close()
  4011  		}
  4012  		return nil, gensupport.WrapError(&googleapi.Error{
  4013  			Code:   res.StatusCode,
  4014  			Header: res.Header,
  4015  		})
  4016  	}
  4017  	if err != nil {
  4018  		return nil, err
  4019  	}
  4020  	defer googleapi.CloseBody(res)
  4021  	if err := googleapi.CheckResponse(res); err != nil {
  4022  		return nil, gensupport.WrapError(err)
  4023  	}
  4024  	ret := &Policy{
  4025  		ServerResponse: googleapi.ServerResponse{
  4026  			Header:         res.Header,
  4027  			HTTPStatusCode: res.StatusCode,
  4028  		},
  4029  	}
  4030  	target := &ret
  4031  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4032  		return nil, err
  4033  	}
  4034  	return ret, nil
  4035  }
  4036  
  4037  type ProjectsLocationsGlobalHubsListCall struct {
  4038  	s            *Service
  4039  	parent       string
  4040  	urlParams_   gensupport.URLParams
  4041  	ifNoneMatch_ string
  4042  	ctx_         context.Context
  4043  	header_      http.Header
  4044  }
  4045  
  4046  // List: Lists the Network Connectivity Center hubs associated with a given
  4047  // project.
  4048  //
  4049  // - parent: The parent resource's name.
  4050  func (r *ProjectsLocationsGlobalHubsService) List(parent string) *ProjectsLocationsGlobalHubsListCall {
  4051  	c := &ProjectsLocationsGlobalHubsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4052  	c.parent = parent
  4053  	return c
  4054  }
  4055  
  4056  // Filter sets the optional parameter "filter": An expression that filters the
  4057  // list of results.
  4058  func (c *ProjectsLocationsGlobalHubsListCall) Filter(filter string) *ProjectsLocationsGlobalHubsListCall {
  4059  	c.urlParams_.Set("filter", filter)
  4060  	return c
  4061  }
  4062  
  4063  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  4064  // order.
  4065  func (c *ProjectsLocationsGlobalHubsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsListCall {
  4066  	c.urlParams_.Set("orderBy", orderBy)
  4067  	return c
  4068  }
  4069  
  4070  // PageSize sets the optional parameter "pageSize": The maximum number of
  4071  // results per page to return.
  4072  func (c *ProjectsLocationsGlobalHubsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsListCall {
  4073  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4074  	return c
  4075  }
  4076  
  4077  // PageToken sets the optional parameter "pageToken": The page token.
  4078  func (c *ProjectsLocationsGlobalHubsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsListCall {
  4079  	c.urlParams_.Set("pageToken", pageToken)
  4080  	return c
  4081  }
  4082  
  4083  // Fields allows partial responses to be retrieved. See
  4084  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4085  // details.
  4086  func (c *ProjectsLocationsGlobalHubsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsListCall {
  4087  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4088  	return c
  4089  }
  4090  
  4091  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4092  // object's ETag matches the given value. This is useful for getting updates
  4093  // only after the object has changed since the last request.
  4094  func (c *ProjectsLocationsGlobalHubsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsListCall {
  4095  	c.ifNoneMatch_ = entityTag
  4096  	return c
  4097  }
  4098  
  4099  // Context sets the context to be used in this call's Do method.
  4100  func (c *ProjectsLocationsGlobalHubsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsListCall {
  4101  	c.ctx_ = ctx
  4102  	return c
  4103  }
  4104  
  4105  // Header returns a http.Header that can be modified by the caller to add
  4106  // headers to the request.
  4107  func (c *ProjectsLocationsGlobalHubsListCall) Header() http.Header {
  4108  	if c.header_ == nil {
  4109  		c.header_ = make(http.Header)
  4110  	}
  4111  	return c.header_
  4112  }
  4113  
  4114  func (c *ProjectsLocationsGlobalHubsListCall) doRequest(alt string) (*http.Response, error) {
  4115  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4116  	if c.ifNoneMatch_ != "" {
  4117  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4118  	}
  4119  	var body io.Reader = nil
  4120  	c.urlParams_.Set("alt", alt)
  4121  	c.urlParams_.Set("prettyPrint", "false")
  4122  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hubs")
  4123  	urls += "?" + c.urlParams_.Encode()
  4124  	req, err := http.NewRequest("GET", urls, body)
  4125  	if err != nil {
  4126  		return nil, err
  4127  	}
  4128  	req.Header = reqHeaders
  4129  	googleapi.Expand(req.URL, map[string]string{
  4130  		"parent": c.parent,
  4131  	})
  4132  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4133  }
  4134  
  4135  // Do executes the "networkconnectivity.projects.locations.global.hubs.list" call.
  4136  // Any non-2xx status code is an error. Response headers are in either
  4137  // *ListHubsResponse.ServerResponse.Header or (if a response was returned at
  4138  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4139  // check whether the returned error was because http.StatusNotModified was
  4140  // returned.
  4141  func (c *ProjectsLocationsGlobalHubsListCall) Do(opts ...googleapi.CallOption) (*ListHubsResponse, error) {
  4142  	gensupport.SetOptions(c.urlParams_, opts...)
  4143  	res, err := c.doRequest("json")
  4144  	if res != nil && res.StatusCode == http.StatusNotModified {
  4145  		if res.Body != nil {
  4146  			res.Body.Close()
  4147  		}
  4148  		return nil, gensupport.WrapError(&googleapi.Error{
  4149  			Code:   res.StatusCode,
  4150  			Header: res.Header,
  4151  		})
  4152  	}
  4153  	if err != nil {
  4154  		return nil, err
  4155  	}
  4156  	defer googleapi.CloseBody(res)
  4157  	if err := googleapi.CheckResponse(res); err != nil {
  4158  		return nil, gensupport.WrapError(err)
  4159  	}
  4160  	ret := &ListHubsResponse{
  4161  		ServerResponse: googleapi.ServerResponse{
  4162  			Header:         res.Header,
  4163  			HTTPStatusCode: res.StatusCode,
  4164  		},
  4165  	}
  4166  	target := &ret
  4167  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4168  		return nil, err
  4169  	}
  4170  	return ret, nil
  4171  }
  4172  
  4173  // Pages invokes f for each page of results.
  4174  // A non-nil error returned from f will halt the iteration.
  4175  // The provided context supersedes any context provided to the Context method.
  4176  func (c *ProjectsLocationsGlobalHubsListCall) Pages(ctx context.Context, f func(*ListHubsResponse) error) error {
  4177  	c.ctx_ = ctx
  4178  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4179  	for {
  4180  		x, err := c.Do()
  4181  		if err != nil {
  4182  			return err
  4183  		}
  4184  		if err := f(x); err != nil {
  4185  			return err
  4186  		}
  4187  		if x.NextPageToken == "" {
  4188  			return nil
  4189  		}
  4190  		c.PageToken(x.NextPageToken)
  4191  	}
  4192  }
  4193  
  4194  type ProjectsLocationsGlobalHubsListSpokesCall struct {
  4195  	s            *Service
  4196  	name         string
  4197  	urlParams_   gensupport.URLParams
  4198  	ifNoneMatch_ string
  4199  	ctx_         context.Context
  4200  	header_      http.Header
  4201  }
  4202  
  4203  // ListSpokes: Lists the Network Connectivity Center spokes associated with a
  4204  // specified hub and location. The list includes both spokes that are attached
  4205  // to the hub and spokes that have been proposed but not yet accepted.
  4206  //
  4207  // - name: The name of the hub.
  4208  func (r *ProjectsLocationsGlobalHubsService) ListSpokes(name string) *ProjectsLocationsGlobalHubsListSpokesCall {
  4209  	c := &ProjectsLocationsGlobalHubsListSpokesCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4210  	c.name = name
  4211  	return c
  4212  }
  4213  
  4214  // Filter sets the optional parameter "filter": An expression that filters the
  4215  // list of results.
  4216  func (c *ProjectsLocationsGlobalHubsListSpokesCall) Filter(filter string) *ProjectsLocationsGlobalHubsListSpokesCall {
  4217  	c.urlParams_.Set("filter", filter)
  4218  	return c
  4219  }
  4220  
  4221  // OrderBy sets the optional parameter "orderBy": Sort the results by name or
  4222  // create_time.
  4223  func (c *ProjectsLocationsGlobalHubsListSpokesCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsListSpokesCall {
  4224  	c.urlParams_.Set("orderBy", orderBy)
  4225  	return c
  4226  }
  4227  
  4228  // PageSize sets the optional parameter "pageSize": The maximum number of
  4229  // results to return per page.
  4230  func (c *ProjectsLocationsGlobalHubsListSpokesCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsListSpokesCall {
  4231  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  4232  	return c
  4233  }
  4234  
  4235  // PageToken sets the optional parameter "pageToken": The page token.
  4236  func (c *ProjectsLocationsGlobalHubsListSpokesCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsListSpokesCall {
  4237  	c.urlParams_.Set("pageToken", pageToken)
  4238  	return c
  4239  }
  4240  
  4241  // SpokeLocations sets the optional parameter "spokeLocations": A list of
  4242  // locations. Specify one of the following: `[global]`, a single region (for
  4243  // example, `[us-central1]`), or a combination of values (for example,
  4244  // `[global, us-central1, us-west1]`). If the spoke_locations field is
  4245  // populated, the list of results includes only spokes in the specified
  4246  // location. If the spoke_locations field is not populated, the list of results
  4247  // includes spokes in all locations.
  4248  func (c *ProjectsLocationsGlobalHubsListSpokesCall) SpokeLocations(spokeLocations ...string) *ProjectsLocationsGlobalHubsListSpokesCall {
  4249  	c.urlParams_.SetMulti("spokeLocations", append([]string{}, spokeLocations...))
  4250  	return c
  4251  }
  4252  
  4253  // View sets the optional parameter "view": The view of the spoke to return.
  4254  // The view that you use determines which spoke fields are included in the
  4255  // response.
  4256  //
  4257  // Possible values:
  4258  //
  4259  //	"SPOKE_VIEW_UNSPECIFIED" - The spoke view is unspecified. When the spoke
  4260  //
  4261  // view is unspecified, the API returns the same fields as the `BASIC` view.
  4262  //
  4263  //	"BASIC" - Includes `name`, `create_time`, `hub`, `unique_id`, `state`,
  4264  //
  4265  // `reasons`, and `spoke_type`. This is the default value.
  4266  //
  4267  //	"DETAILED" - Includes all spoke fields except `labels`. You can use the
  4268  //
  4269  // `DETAILED` view only when you set the `spoke_locations` field to `[global]`.
  4270  func (c *ProjectsLocationsGlobalHubsListSpokesCall) View(view string) *ProjectsLocationsGlobalHubsListSpokesCall {
  4271  	c.urlParams_.Set("view", view)
  4272  	return c
  4273  }
  4274  
  4275  // Fields allows partial responses to be retrieved. See
  4276  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4277  // details.
  4278  func (c *ProjectsLocationsGlobalHubsListSpokesCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsListSpokesCall {
  4279  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4280  	return c
  4281  }
  4282  
  4283  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4284  // object's ETag matches the given value. This is useful for getting updates
  4285  // only after the object has changed since the last request.
  4286  func (c *ProjectsLocationsGlobalHubsListSpokesCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsListSpokesCall {
  4287  	c.ifNoneMatch_ = entityTag
  4288  	return c
  4289  }
  4290  
  4291  // Context sets the context to be used in this call's Do method.
  4292  func (c *ProjectsLocationsGlobalHubsListSpokesCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsListSpokesCall {
  4293  	c.ctx_ = ctx
  4294  	return c
  4295  }
  4296  
  4297  // Header returns a http.Header that can be modified by the caller to add
  4298  // headers to the request.
  4299  func (c *ProjectsLocationsGlobalHubsListSpokesCall) Header() http.Header {
  4300  	if c.header_ == nil {
  4301  		c.header_ = make(http.Header)
  4302  	}
  4303  	return c.header_
  4304  }
  4305  
  4306  func (c *ProjectsLocationsGlobalHubsListSpokesCall) doRequest(alt string) (*http.Response, error) {
  4307  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4308  	if c.ifNoneMatch_ != "" {
  4309  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4310  	}
  4311  	var body io.Reader = nil
  4312  	c.urlParams_.Set("alt", alt)
  4313  	c.urlParams_.Set("prettyPrint", "false")
  4314  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listSpokes")
  4315  	urls += "?" + c.urlParams_.Encode()
  4316  	req, err := http.NewRequest("GET", urls, body)
  4317  	if err != nil {
  4318  		return nil, err
  4319  	}
  4320  	req.Header = reqHeaders
  4321  	googleapi.Expand(req.URL, map[string]string{
  4322  		"name": c.name,
  4323  	})
  4324  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4325  }
  4326  
  4327  // Do executes the "networkconnectivity.projects.locations.global.hubs.listSpokes" call.
  4328  // Any non-2xx status code is an error. Response headers are in either
  4329  // *ListHubSpokesResponse.ServerResponse.Header or (if a response was returned
  4330  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4331  // check whether the returned error was because http.StatusNotModified was
  4332  // returned.
  4333  func (c *ProjectsLocationsGlobalHubsListSpokesCall) Do(opts ...googleapi.CallOption) (*ListHubSpokesResponse, error) {
  4334  	gensupport.SetOptions(c.urlParams_, opts...)
  4335  	res, err := c.doRequest("json")
  4336  	if res != nil && res.StatusCode == http.StatusNotModified {
  4337  		if res.Body != nil {
  4338  			res.Body.Close()
  4339  		}
  4340  		return nil, gensupport.WrapError(&googleapi.Error{
  4341  			Code:   res.StatusCode,
  4342  			Header: res.Header,
  4343  		})
  4344  	}
  4345  	if err != nil {
  4346  		return nil, err
  4347  	}
  4348  	defer googleapi.CloseBody(res)
  4349  	if err := googleapi.CheckResponse(res); err != nil {
  4350  		return nil, gensupport.WrapError(err)
  4351  	}
  4352  	ret := &ListHubSpokesResponse{
  4353  		ServerResponse: googleapi.ServerResponse{
  4354  			Header:         res.Header,
  4355  			HTTPStatusCode: res.StatusCode,
  4356  		},
  4357  	}
  4358  	target := &ret
  4359  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4360  		return nil, err
  4361  	}
  4362  	return ret, nil
  4363  }
  4364  
  4365  // Pages invokes f for each page of results.
  4366  // A non-nil error returned from f will halt the iteration.
  4367  // The provided context supersedes any context provided to the Context method.
  4368  func (c *ProjectsLocationsGlobalHubsListSpokesCall) Pages(ctx context.Context, f func(*ListHubSpokesResponse) error) error {
  4369  	c.ctx_ = ctx
  4370  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  4371  	for {
  4372  		x, err := c.Do()
  4373  		if err != nil {
  4374  			return err
  4375  		}
  4376  		if err := f(x); err != nil {
  4377  			return err
  4378  		}
  4379  		if x.NextPageToken == "" {
  4380  			return nil
  4381  		}
  4382  		c.PageToken(x.NextPageToken)
  4383  	}
  4384  }
  4385  
  4386  type ProjectsLocationsGlobalHubsPatchCall struct {
  4387  	s          *Service
  4388  	name       string
  4389  	hub        *Hub
  4390  	urlParams_ gensupport.URLParams
  4391  	ctx_       context.Context
  4392  	header_    http.Header
  4393  }
  4394  
  4395  // Patch: Updates the description and/or labels of a Network Connectivity
  4396  // Center hub.
  4397  //
  4398  //   - name: Immutable. The name of the hub. Hub names must be unique. They use
  4399  //     the following form:
  4400  //     `projects/{project_number}/locations/global/hubs/{hub_id}`.
  4401  func (r *ProjectsLocationsGlobalHubsService) Patch(name string, hub *Hub) *ProjectsLocationsGlobalHubsPatchCall {
  4402  	c := &ProjectsLocationsGlobalHubsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4403  	c.name = name
  4404  	c.hub = hub
  4405  	return c
  4406  }
  4407  
  4408  // RequestId sets the optional parameter "requestId": A request ID to identify
  4409  // requests. Specify a unique request ID so that if you must retry your
  4410  // request, the server knows to ignore the request if it has already been
  4411  // completed. The server guarantees that a request doesn't result in creation
  4412  // of duplicate commitments for at least 60 minutes. For example, consider a
  4413  // situation where you make an initial request and the request times out. If
  4414  // you make the request again with the same request ID, the server can check to
  4415  // see whether the original operation was received. If it was, the server
  4416  // ignores the second request. This behavior prevents clients from mistakenly
  4417  // creating duplicate commitments. The request ID must be a valid UUID, with
  4418  // the exception that zero UUID is not supported
  4419  // (00000000-0000-0000-0000-000000000000).
  4420  func (c *ProjectsLocationsGlobalHubsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsPatchCall {
  4421  	c.urlParams_.Set("requestId", requestId)
  4422  	return c
  4423  }
  4424  
  4425  // UpdateMask sets the optional parameter "updateMask": In the case of an
  4426  // update to an existing hub, field mask is used to specify the fields to be
  4427  // overwritten. The fields specified in the update_mask are relative to the
  4428  // resource, not the full request. A field is overwritten if it is in the mask.
  4429  // If the user does not provide a mask, then all fields are overwritten.
  4430  func (c *ProjectsLocationsGlobalHubsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalHubsPatchCall {
  4431  	c.urlParams_.Set("updateMask", updateMask)
  4432  	return c
  4433  }
  4434  
  4435  // Fields allows partial responses to be retrieved. See
  4436  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4437  // details.
  4438  func (c *ProjectsLocationsGlobalHubsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsPatchCall {
  4439  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4440  	return c
  4441  }
  4442  
  4443  // Context sets the context to be used in this call's Do method.
  4444  func (c *ProjectsLocationsGlobalHubsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsPatchCall {
  4445  	c.ctx_ = ctx
  4446  	return c
  4447  }
  4448  
  4449  // Header returns a http.Header that can be modified by the caller to add
  4450  // headers to the request.
  4451  func (c *ProjectsLocationsGlobalHubsPatchCall) Header() http.Header {
  4452  	if c.header_ == nil {
  4453  		c.header_ = make(http.Header)
  4454  	}
  4455  	return c.header_
  4456  }
  4457  
  4458  func (c *ProjectsLocationsGlobalHubsPatchCall) doRequest(alt string) (*http.Response, error) {
  4459  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4460  	var body io.Reader = nil
  4461  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.hub)
  4462  	if err != nil {
  4463  		return nil, err
  4464  	}
  4465  	c.urlParams_.Set("alt", alt)
  4466  	c.urlParams_.Set("prettyPrint", "false")
  4467  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4468  	urls += "?" + c.urlParams_.Encode()
  4469  	req, err := http.NewRequest("PATCH", urls, body)
  4470  	if err != nil {
  4471  		return nil, err
  4472  	}
  4473  	req.Header = reqHeaders
  4474  	googleapi.Expand(req.URL, map[string]string{
  4475  		"name": c.name,
  4476  	})
  4477  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4478  }
  4479  
  4480  // Do executes the "networkconnectivity.projects.locations.global.hubs.patch" call.
  4481  // Any non-2xx status code is an error. Response headers are in either
  4482  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4483  // returned at all) in error.(*googleapi.Error).Header. Use
  4484  // googleapi.IsNotModified to check whether the returned error was because
  4485  // http.StatusNotModified was returned.
  4486  func (c *ProjectsLocationsGlobalHubsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4487  	gensupport.SetOptions(c.urlParams_, opts...)
  4488  	res, err := c.doRequest("json")
  4489  	if res != nil && res.StatusCode == http.StatusNotModified {
  4490  		if res.Body != nil {
  4491  			res.Body.Close()
  4492  		}
  4493  		return nil, gensupport.WrapError(&googleapi.Error{
  4494  			Code:   res.StatusCode,
  4495  			Header: res.Header,
  4496  		})
  4497  	}
  4498  	if err != nil {
  4499  		return nil, err
  4500  	}
  4501  	defer googleapi.CloseBody(res)
  4502  	if err := googleapi.CheckResponse(res); err != nil {
  4503  		return nil, gensupport.WrapError(err)
  4504  	}
  4505  	ret := &GoogleLongrunningOperation{
  4506  		ServerResponse: googleapi.ServerResponse{
  4507  			Header:         res.Header,
  4508  			HTTPStatusCode: res.StatusCode,
  4509  		},
  4510  	}
  4511  	target := &ret
  4512  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4513  		return nil, err
  4514  	}
  4515  	return ret, nil
  4516  }
  4517  
  4518  type ProjectsLocationsGlobalHubsRejectSpokeCall struct {
  4519  	s                     *Service
  4520  	name                  string
  4521  	rejecthubspokerequest *RejectHubSpokeRequest
  4522  	urlParams_            gensupport.URLParams
  4523  	ctx_                  context.Context
  4524  	header_               http.Header
  4525  }
  4526  
  4527  // RejectSpoke: Rejects a Network Connectivity Center spoke from being attached
  4528  // to a hub. If the spoke was previously in the `ACTIVE` state, it transitions
  4529  // to the `INACTIVE` state and is no longer able to connect to other spokes
  4530  // that are attached to the hub.
  4531  //
  4532  // - name: The name of the hub from which to reject the spoke.
  4533  func (r *ProjectsLocationsGlobalHubsService) RejectSpoke(name string, rejecthubspokerequest *RejectHubSpokeRequest) *ProjectsLocationsGlobalHubsRejectSpokeCall {
  4534  	c := &ProjectsLocationsGlobalHubsRejectSpokeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4535  	c.name = name
  4536  	c.rejecthubspokerequest = rejecthubspokerequest
  4537  	return c
  4538  }
  4539  
  4540  // Fields allows partial responses to be retrieved. See
  4541  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4542  // details.
  4543  func (c *ProjectsLocationsGlobalHubsRejectSpokeCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsRejectSpokeCall {
  4544  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4545  	return c
  4546  }
  4547  
  4548  // Context sets the context to be used in this call's Do method.
  4549  func (c *ProjectsLocationsGlobalHubsRejectSpokeCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsRejectSpokeCall {
  4550  	c.ctx_ = ctx
  4551  	return c
  4552  }
  4553  
  4554  // Header returns a http.Header that can be modified by the caller to add
  4555  // headers to the request.
  4556  func (c *ProjectsLocationsGlobalHubsRejectSpokeCall) Header() http.Header {
  4557  	if c.header_ == nil {
  4558  		c.header_ = make(http.Header)
  4559  	}
  4560  	return c.header_
  4561  }
  4562  
  4563  func (c *ProjectsLocationsGlobalHubsRejectSpokeCall) doRequest(alt string) (*http.Response, error) {
  4564  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4565  	var body io.Reader = nil
  4566  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.rejecthubspokerequest)
  4567  	if err != nil {
  4568  		return nil, err
  4569  	}
  4570  	c.urlParams_.Set("alt", alt)
  4571  	c.urlParams_.Set("prettyPrint", "false")
  4572  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:rejectSpoke")
  4573  	urls += "?" + c.urlParams_.Encode()
  4574  	req, err := http.NewRequest("POST", urls, body)
  4575  	if err != nil {
  4576  		return nil, err
  4577  	}
  4578  	req.Header = reqHeaders
  4579  	googleapi.Expand(req.URL, map[string]string{
  4580  		"name": c.name,
  4581  	})
  4582  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4583  }
  4584  
  4585  // Do executes the "networkconnectivity.projects.locations.global.hubs.rejectSpoke" call.
  4586  // Any non-2xx status code is an error. Response headers are in either
  4587  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  4588  // returned at all) in error.(*googleapi.Error).Header. Use
  4589  // googleapi.IsNotModified to check whether the returned error was because
  4590  // http.StatusNotModified was returned.
  4591  func (c *ProjectsLocationsGlobalHubsRejectSpokeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  4592  	gensupport.SetOptions(c.urlParams_, opts...)
  4593  	res, err := c.doRequest("json")
  4594  	if res != nil && res.StatusCode == http.StatusNotModified {
  4595  		if res.Body != nil {
  4596  			res.Body.Close()
  4597  		}
  4598  		return nil, gensupport.WrapError(&googleapi.Error{
  4599  			Code:   res.StatusCode,
  4600  			Header: res.Header,
  4601  		})
  4602  	}
  4603  	if err != nil {
  4604  		return nil, err
  4605  	}
  4606  	defer googleapi.CloseBody(res)
  4607  	if err := googleapi.CheckResponse(res); err != nil {
  4608  		return nil, gensupport.WrapError(err)
  4609  	}
  4610  	ret := &GoogleLongrunningOperation{
  4611  		ServerResponse: googleapi.ServerResponse{
  4612  			Header:         res.Header,
  4613  			HTTPStatusCode: res.StatusCode,
  4614  		},
  4615  	}
  4616  	target := &ret
  4617  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4618  		return nil, err
  4619  	}
  4620  	return ret, nil
  4621  }
  4622  
  4623  type ProjectsLocationsGlobalHubsSetIamPolicyCall struct {
  4624  	s                   *Service
  4625  	resource            string
  4626  	setiampolicyrequest *SetIamPolicyRequest
  4627  	urlParams_          gensupport.URLParams
  4628  	ctx_                context.Context
  4629  	header_             http.Header
  4630  }
  4631  
  4632  // SetIamPolicy: Sets the access control policy on the specified resource.
  4633  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  4634  // and `PERMISSION_DENIED` errors.
  4635  //
  4636  //   - resource: REQUIRED: The resource for which the policy is being specified.
  4637  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4638  //     for the appropriate value for this field.
  4639  func (r *ProjectsLocationsGlobalHubsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalHubsSetIamPolicyCall {
  4640  	c := &ProjectsLocationsGlobalHubsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4641  	c.resource = resource
  4642  	c.setiampolicyrequest = setiampolicyrequest
  4643  	return c
  4644  }
  4645  
  4646  // Fields allows partial responses to be retrieved. See
  4647  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4648  // details.
  4649  func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsSetIamPolicyCall {
  4650  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4651  	return c
  4652  }
  4653  
  4654  // Context sets the context to be used in this call's Do method.
  4655  func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsSetIamPolicyCall {
  4656  	c.ctx_ = ctx
  4657  	return c
  4658  }
  4659  
  4660  // Header returns a http.Header that can be modified by the caller to add
  4661  // headers to the request.
  4662  func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Header() http.Header {
  4663  	if c.header_ == nil {
  4664  		c.header_ = make(http.Header)
  4665  	}
  4666  	return c.header_
  4667  }
  4668  
  4669  func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  4670  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4671  	var body io.Reader = nil
  4672  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  4673  	if err != nil {
  4674  		return nil, err
  4675  	}
  4676  	c.urlParams_.Set("alt", alt)
  4677  	c.urlParams_.Set("prettyPrint", "false")
  4678  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  4679  	urls += "?" + c.urlParams_.Encode()
  4680  	req, err := http.NewRequest("POST", urls, body)
  4681  	if err != nil {
  4682  		return nil, err
  4683  	}
  4684  	req.Header = reqHeaders
  4685  	googleapi.Expand(req.URL, map[string]string{
  4686  		"resource": c.resource,
  4687  	})
  4688  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4689  }
  4690  
  4691  // Do executes the "networkconnectivity.projects.locations.global.hubs.setIamPolicy" call.
  4692  // Any non-2xx status code is an error. Response headers are in either
  4693  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  4694  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4695  // whether the returned error was because http.StatusNotModified was returned.
  4696  func (c *ProjectsLocationsGlobalHubsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  4697  	gensupport.SetOptions(c.urlParams_, opts...)
  4698  	res, err := c.doRequest("json")
  4699  	if res != nil && res.StatusCode == http.StatusNotModified {
  4700  		if res.Body != nil {
  4701  			res.Body.Close()
  4702  		}
  4703  		return nil, gensupport.WrapError(&googleapi.Error{
  4704  			Code:   res.StatusCode,
  4705  			Header: res.Header,
  4706  		})
  4707  	}
  4708  	if err != nil {
  4709  		return nil, err
  4710  	}
  4711  	defer googleapi.CloseBody(res)
  4712  	if err := googleapi.CheckResponse(res); err != nil {
  4713  		return nil, gensupport.WrapError(err)
  4714  	}
  4715  	ret := &Policy{
  4716  		ServerResponse: googleapi.ServerResponse{
  4717  			Header:         res.Header,
  4718  			HTTPStatusCode: res.StatusCode,
  4719  		},
  4720  	}
  4721  	target := &ret
  4722  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4723  		return nil, err
  4724  	}
  4725  	return ret, nil
  4726  }
  4727  
  4728  type ProjectsLocationsGlobalHubsTestIamPermissionsCall struct {
  4729  	s                         *Service
  4730  	resource                  string
  4731  	testiampermissionsrequest *TestIamPermissionsRequest
  4732  	urlParams_                gensupport.URLParams
  4733  	ctx_                      context.Context
  4734  	header_                   http.Header
  4735  }
  4736  
  4737  // TestIamPermissions: Returns permissions that a caller has on the specified
  4738  // resource. If the resource does not exist, this will return an empty set of
  4739  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  4740  // used for building permission-aware UIs and command-line tools, not for
  4741  // authorization checking. This operation may "fail open" without warning.
  4742  //
  4743  //   - resource: REQUIRED: The resource for which the policy detail is being
  4744  //     requested. See Resource names
  4745  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  4746  //     value for this field.
  4747  func (r *ProjectsLocationsGlobalHubsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalHubsTestIamPermissionsCall {
  4748  	c := &ProjectsLocationsGlobalHubsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4749  	c.resource = resource
  4750  	c.testiampermissionsrequest = testiampermissionsrequest
  4751  	return c
  4752  }
  4753  
  4754  // Fields allows partial responses to be retrieved. See
  4755  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4756  // details.
  4757  func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsTestIamPermissionsCall {
  4758  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4759  	return c
  4760  }
  4761  
  4762  // Context sets the context to be used in this call's Do method.
  4763  func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsTestIamPermissionsCall {
  4764  	c.ctx_ = ctx
  4765  	return c
  4766  }
  4767  
  4768  // Header returns a http.Header that can be modified by the caller to add
  4769  // headers to the request.
  4770  func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Header() http.Header {
  4771  	if c.header_ == nil {
  4772  		c.header_ = make(http.Header)
  4773  	}
  4774  	return c.header_
  4775  }
  4776  
  4777  func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  4778  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  4779  	var body io.Reader = nil
  4780  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  4781  	if err != nil {
  4782  		return nil, err
  4783  	}
  4784  	c.urlParams_.Set("alt", alt)
  4785  	c.urlParams_.Set("prettyPrint", "false")
  4786  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  4787  	urls += "?" + c.urlParams_.Encode()
  4788  	req, err := http.NewRequest("POST", urls, body)
  4789  	if err != nil {
  4790  		return nil, err
  4791  	}
  4792  	req.Header = reqHeaders
  4793  	googleapi.Expand(req.URL, map[string]string{
  4794  		"resource": c.resource,
  4795  	})
  4796  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4797  }
  4798  
  4799  // Do executes the "networkconnectivity.projects.locations.global.hubs.testIamPermissions" call.
  4800  // Any non-2xx status code is an error. Response headers are in either
  4801  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  4802  // returned at all) in error.(*googleapi.Error).Header. Use
  4803  // googleapi.IsNotModified to check whether the returned error was because
  4804  // http.StatusNotModified was returned.
  4805  func (c *ProjectsLocationsGlobalHubsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  4806  	gensupport.SetOptions(c.urlParams_, opts...)
  4807  	res, err := c.doRequest("json")
  4808  	if res != nil && res.StatusCode == http.StatusNotModified {
  4809  		if res.Body != nil {
  4810  			res.Body.Close()
  4811  		}
  4812  		return nil, gensupport.WrapError(&googleapi.Error{
  4813  			Code:   res.StatusCode,
  4814  			Header: res.Header,
  4815  		})
  4816  	}
  4817  	if err != nil {
  4818  		return nil, err
  4819  	}
  4820  	defer googleapi.CloseBody(res)
  4821  	if err := googleapi.CheckResponse(res); err != nil {
  4822  		return nil, gensupport.WrapError(err)
  4823  	}
  4824  	ret := &TestIamPermissionsResponse{
  4825  		ServerResponse: googleapi.ServerResponse{
  4826  			Header:         res.Header,
  4827  			HTTPStatusCode: res.StatusCode,
  4828  		},
  4829  	}
  4830  	target := &ret
  4831  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4832  		return nil, err
  4833  	}
  4834  	return ret, nil
  4835  }
  4836  
  4837  type ProjectsLocationsGlobalHubsGroupsGetCall struct {
  4838  	s            *Service
  4839  	name         string
  4840  	urlParams_   gensupport.URLParams
  4841  	ifNoneMatch_ string
  4842  	ctx_         context.Context
  4843  	header_      http.Header
  4844  }
  4845  
  4846  // Get: Gets details about a Network Connectivity Center group.
  4847  //
  4848  // - name: The name of the route table resource.
  4849  func (r *ProjectsLocationsGlobalHubsGroupsService) Get(name string) *ProjectsLocationsGlobalHubsGroupsGetCall {
  4850  	c := &ProjectsLocationsGlobalHubsGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4851  	c.name = name
  4852  	return c
  4853  }
  4854  
  4855  // Fields allows partial responses to be retrieved. See
  4856  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4857  // details.
  4858  func (c *ProjectsLocationsGlobalHubsGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsGetCall {
  4859  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4860  	return c
  4861  }
  4862  
  4863  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4864  // object's ETag matches the given value. This is useful for getting updates
  4865  // only after the object has changed since the last request.
  4866  func (c *ProjectsLocationsGlobalHubsGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGroupsGetCall {
  4867  	c.ifNoneMatch_ = entityTag
  4868  	return c
  4869  }
  4870  
  4871  // Context sets the context to be used in this call's Do method.
  4872  func (c *ProjectsLocationsGlobalHubsGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsGetCall {
  4873  	c.ctx_ = ctx
  4874  	return c
  4875  }
  4876  
  4877  // Header returns a http.Header that can be modified by the caller to add
  4878  // headers to the request.
  4879  func (c *ProjectsLocationsGlobalHubsGroupsGetCall) Header() http.Header {
  4880  	if c.header_ == nil {
  4881  		c.header_ = make(http.Header)
  4882  	}
  4883  	return c.header_
  4884  }
  4885  
  4886  func (c *ProjectsLocationsGlobalHubsGroupsGetCall) doRequest(alt string) (*http.Response, error) {
  4887  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  4888  	if c.ifNoneMatch_ != "" {
  4889  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4890  	}
  4891  	var body io.Reader = nil
  4892  	c.urlParams_.Set("alt", alt)
  4893  	c.urlParams_.Set("prettyPrint", "false")
  4894  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  4895  	urls += "?" + c.urlParams_.Encode()
  4896  	req, err := http.NewRequest("GET", urls, body)
  4897  	if err != nil {
  4898  		return nil, err
  4899  	}
  4900  	req.Header = reqHeaders
  4901  	googleapi.Expand(req.URL, map[string]string{
  4902  		"name": c.name,
  4903  	})
  4904  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4905  }
  4906  
  4907  // Do executes the "networkconnectivity.projects.locations.global.hubs.groups.get" call.
  4908  // Any non-2xx status code is an error. Response headers are in either
  4909  // *Group.ServerResponse.Header or (if a response was returned at all) in
  4910  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  4911  // whether the returned error was because http.StatusNotModified was returned.
  4912  func (c *ProjectsLocationsGlobalHubsGroupsGetCall) Do(opts ...googleapi.CallOption) (*Group, error) {
  4913  	gensupport.SetOptions(c.urlParams_, opts...)
  4914  	res, err := c.doRequest("json")
  4915  	if res != nil && res.StatusCode == http.StatusNotModified {
  4916  		if res.Body != nil {
  4917  			res.Body.Close()
  4918  		}
  4919  		return nil, gensupport.WrapError(&googleapi.Error{
  4920  			Code:   res.StatusCode,
  4921  			Header: res.Header,
  4922  		})
  4923  	}
  4924  	if err != nil {
  4925  		return nil, err
  4926  	}
  4927  	defer googleapi.CloseBody(res)
  4928  	if err := googleapi.CheckResponse(res); err != nil {
  4929  		return nil, gensupport.WrapError(err)
  4930  	}
  4931  	ret := &Group{
  4932  		ServerResponse: googleapi.ServerResponse{
  4933  			Header:         res.Header,
  4934  			HTTPStatusCode: res.StatusCode,
  4935  		},
  4936  	}
  4937  	target := &ret
  4938  	if err := gensupport.DecodeResponse(target, res); err != nil {
  4939  		return nil, err
  4940  	}
  4941  	return ret, nil
  4942  }
  4943  
  4944  type ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall struct {
  4945  	s            *Service
  4946  	resource     string
  4947  	urlParams_   gensupport.URLParams
  4948  	ifNoneMatch_ string
  4949  	ctx_         context.Context
  4950  	header_      http.Header
  4951  }
  4952  
  4953  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  4954  // empty policy if the resource exists and does not have a policy set.
  4955  //
  4956  //   - resource: REQUIRED: The resource for which the policy is being requested.
  4957  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  4958  //     for the appropriate value for this field.
  4959  func (r *ProjectsLocationsGlobalHubsGroupsService) GetIamPolicy(resource string) *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall {
  4960  	c := &ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4961  	c.resource = resource
  4962  	return c
  4963  }
  4964  
  4965  // OptionsRequestedPolicyVersion sets the optional parameter
  4966  // "options.requestedPolicyVersion": The maximum policy version that will be
  4967  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  4968  // an invalid value will be rejected. Requests for policies with any
  4969  // conditional role bindings must specify version 3. Policies with no
  4970  // conditional role bindings may specify any valid value or leave the field
  4971  // unset. The policy in the response might use the policy version that you
  4972  // specified, or it might use a lower policy version. For example, if you
  4973  // specify version 3, but the policy has no conditional role bindings, the
  4974  // response uses version 1. To learn which resources support conditions in
  4975  // their IAM policies, see the IAM documentation
  4976  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  4977  func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall {
  4978  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  4979  	return c
  4980  }
  4981  
  4982  // Fields allows partial responses to be retrieved. See
  4983  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  4984  // details.
  4985  func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall {
  4986  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4987  	return c
  4988  }
  4989  
  4990  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  4991  // object's ETag matches the given value. This is useful for getting updates
  4992  // only after the object has changed since the last request.
  4993  func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall {
  4994  	c.ifNoneMatch_ = entityTag
  4995  	return c
  4996  }
  4997  
  4998  // Context sets the context to be used in this call's Do method.
  4999  func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall {
  5000  	c.ctx_ = ctx
  5001  	return c
  5002  }
  5003  
  5004  // Header returns a http.Header that can be modified by the caller to add
  5005  // headers to the request.
  5006  func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) Header() http.Header {
  5007  	if c.header_ == nil {
  5008  		c.header_ = make(http.Header)
  5009  	}
  5010  	return c.header_
  5011  }
  5012  
  5013  func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5014  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5015  	if c.ifNoneMatch_ != "" {
  5016  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5017  	}
  5018  	var body io.Reader = nil
  5019  	c.urlParams_.Set("alt", alt)
  5020  	c.urlParams_.Set("prettyPrint", "false")
  5021  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  5022  	urls += "?" + c.urlParams_.Encode()
  5023  	req, err := http.NewRequest("GET", urls, body)
  5024  	if err != nil {
  5025  		return nil, err
  5026  	}
  5027  	req.Header = reqHeaders
  5028  	googleapi.Expand(req.URL, map[string]string{
  5029  		"resource": c.resource,
  5030  	})
  5031  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5032  }
  5033  
  5034  // Do executes the "networkconnectivity.projects.locations.global.hubs.groups.getIamPolicy" call.
  5035  // Any non-2xx status code is an error. Response headers are in either
  5036  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5037  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5038  // whether the returned error was because http.StatusNotModified was returned.
  5039  func (c *ProjectsLocationsGlobalHubsGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5040  	gensupport.SetOptions(c.urlParams_, opts...)
  5041  	res, err := c.doRequest("json")
  5042  	if res != nil && res.StatusCode == http.StatusNotModified {
  5043  		if res.Body != nil {
  5044  			res.Body.Close()
  5045  		}
  5046  		return nil, gensupport.WrapError(&googleapi.Error{
  5047  			Code:   res.StatusCode,
  5048  			Header: res.Header,
  5049  		})
  5050  	}
  5051  	if err != nil {
  5052  		return nil, err
  5053  	}
  5054  	defer googleapi.CloseBody(res)
  5055  	if err := googleapi.CheckResponse(res); err != nil {
  5056  		return nil, gensupport.WrapError(err)
  5057  	}
  5058  	ret := &Policy{
  5059  		ServerResponse: googleapi.ServerResponse{
  5060  			Header:         res.Header,
  5061  			HTTPStatusCode: res.StatusCode,
  5062  		},
  5063  	}
  5064  	target := &ret
  5065  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5066  		return nil, err
  5067  	}
  5068  	return ret, nil
  5069  }
  5070  
  5071  type ProjectsLocationsGlobalHubsGroupsListCall struct {
  5072  	s            *Service
  5073  	parent       string
  5074  	urlParams_   gensupport.URLParams
  5075  	ifNoneMatch_ string
  5076  	ctx_         context.Context
  5077  	header_      http.Header
  5078  }
  5079  
  5080  // List: Lists groups in a given hub.
  5081  //
  5082  // - parent: The parent resource's name.
  5083  func (r *ProjectsLocationsGlobalHubsGroupsService) List(parent string) *ProjectsLocationsGlobalHubsGroupsListCall {
  5084  	c := &ProjectsLocationsGlobalHubsGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5085  	c.parent = parent
  5086  	return c
  5087  }
  5088  
  5089  // Filter sets the optional parameter "filter": An expression that filters the
  5090  // list of results.
  5091  func (c *ProjectsLocationsGlobalHubsGroupsListCall) Filter(filter string) *ProjectsLocationsGlobalHubsGroupsListCall {
  5092  	c.urlParams_.Set("filter", filter)
  5093  	return c
  5094  }
  5095  
  5096  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  5097  // order.
  5098  func (c *ProjectsLocationsGlobalHubsGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsGroupsListCall {
  5099  	c.urlParams_.Set("orderBy", orderBy)
  5100  	return c
  5101  }
  5102  
  5103  // PageSize sets the optional parameter "pageSize": The maximum number of
  5104  // results to return per page.
  5105  func (c *ProjectsLocationsGlobalHubsGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsGroupsListCall {
  5106  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5107  	return c
  5108  }
  5109  
  5110  // PageToken sets the optional parameter "pageToken": The page token.
  5111  func (c *ProjectsLocationsGlobalHubsGroupsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsGroupsListCall {
  5112  	c.urlParams_.Set("pageToken", pageToken)
  5113  	return c
  5114  }
  5115  
  5116  // Fields allows partial responses to be retrieved. See
  5117  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5118  // details.
  5119  func (c *ProjectsLocationsGlobalHubsGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsListCall {
  5120  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5121  	return c
  5122  }
  5123  
  5124  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5125  // object's ETag matches the given value. This is useful for getting updates
  5126  // only after the object has changed since the last request.
  5127  func (c *ProjectsLocationsGlobalHubsGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsGroupsListCall {
  5128  	c.ifNoneMatch_ = entityTag
  5129  	return c
  5130  }
  5131  
  5132  // Context sets the context to be used in this call's Do method.
  5133  func (c *ProjectsLocationsGlobalHubsGroupsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsListCall {
  5134  	c.ctx_ = ctx
  5135  	return c
  5136  }
  5137  
  5138  // Header returns a http.Header that can be modified by the caller to add
  5139  // headers to the request.
  5140  func (c *ProjectsLocationsGlobalHubsGroupsListCall) Header() http.Header {
  5141  	if c.header_ == nil {
  5142  		c.header_ = make(http.Header)
  5143  	}
  5144  	return c.header_
  5145  }
  5146  
  5147  func (c *ProjectsLocationsGlobalHubsGroupsListCall) doRequest(alt string) (*http.Response, error) {
  5148  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5149  	if c.ifNoneMatch_ != "" {
  5150  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5151  	}
  5152  	var body io.Reader = nil
  5153  	c.urlParams_.Set("alt", alt)
  5154  	c.urlParams_.Set("prettyPrint", "false")
  5155  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/groups")
  5156  	urls += "?" + c.urlParams_.Encode()
  5157  	req, err := http.NewRequest("GET", urls, body)
  5158  	if err != nil {
  5159  		return nil, err
  5160  	}
  5161  	req.Header = reqHeaders
  5162  	googleapi.Expand(req.URL, map[string]string{
  5163  		"parent": c.parent,
  5164  	})
  5165  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5166  }
  5167  
  5168  // Do executes the "networkconnectivity.projects.locations.global.hubs.groups.list" call.
  5169  // Any non-2xx status code is an error. Response headers are in either
  5170  // *ListGroupsResponse.ServerResponse.Header or (if a response was returned at
  5171  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5172  // check whether the returned error was because http.StatusNotModified was
  5173  // returned.
  5174  func (c *ProjectsLocationsGlobalHubsGroupsListCall) Do(opts ...googleapi.CallOption) (*ListGroupsResponse, error) {
  5175  	gensupport.SetOptions(c.urlParams_, opts...)
  5176  	res, err := c.doRequest("json")
  5177  	if res != nil && res.StatusCode == http.StatusNotModified {
  5178  		if res.Body != nil {
  5179  			res.Body.Close()
  5180  		}
  5181  		return nil, gensupport.WrapError(&googleapi.Error{
  5182  			Code:   res.StatusCode,
  5183  			Header: res.Header,
  5184  		})
  5185  	}
  5186  	if err != nil {
  5187  		return nil, err
  5188  	}
  5189  	defer googleapi.CloseBody(res)
  5190  	if err := googleapi.CheckResponse(res); err != nil {
  5191  		return nil, gensupport.WrapError(err)
  5192  	}
  5193  	ret := &ListGroupsResponse{
  5194  		ServerResponse: googleapi.ServerResponse{
  5195  			Header:         res.Header,
  5196  			HTTPStatusCode: res.StatusCode,
  5197  		},
  5198  	}
  5199  	target := &ret
  5200  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5201  		return nil, err
  5202  	}
  5203  	return ret, nil
  5204  }
  5205  
  5206  // Pages invokes f for each page of results.
  5207  // A non-nil error returned from f will halt the iteration.
  5208  // The provided context supersedes any context provided to the Context method.
  5209  func (c *ProjectsLocationsGlobalHubsGroupsListCall) Pages(ctx context.Context, f func(*ListGroupsResponse) error) error {
  5210  	c.ctx_ = ctx
  5211  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5212  	for {
  5213  		x, err := c.Do()
  5214  		if err != nil {
  5215  			return err
  5216  		}
  5217  		if err := f(x); err != nil {
  5218  			return err
  5219  		}
  5220  		if x.NextPageToken == "" {
  5221  			return nil
  5222  		}
  5223  		c.PageToken(x.NextPageToken)
  5224  	}
  5225  }
  5226  
  5227  type ProjectsLocationsGlobalHubsGroupsPatchCall struct {
  5228  	s          *Service
  5229  	name       string
  5230  	group      *Group
  5231  	urlParams_ gensupport.URLParams
  5232  	ctx_       context.Context
  5233  	header_    http.Header
  5234  }
  5235  
  5236  // Patch: Updates the parameters of a Network Connectivity Center group.
  5237  //
  5238  //   - name: Immutable. The name of the group. Group names must be unique. They
  5239  //     use the following form:
  5240  //     `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`.
  5241  func (r *ProjectsLocationsGlobalHubsGroupsService) Patch(name string, group *Group) *ProjectsLocationsGlobalHubsGroupsPatchCall {
  5242  	c := &ProjectsLocationsGlobalHubsGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5243  	c.name = name
  5244  	c.group = group
  5245  	return c
  5246  }
  5247  
  5248  // RequestId sets the optional parameter "requestId": A request ID to identify
  5249  // requests. Specify a unique request ID so that if you must retry your
  5250  // request, the server knows to ignore the request if it has already been
  5251  // completed. The server guarantees that a request doesn't result in creation
  5252  // of duplicate commitments for at least 60 minutes. For example, consider a
  5253  // situation where you make an initial request and the request times out. If
  5254  // you make the request again with the same request ID, the server can check to
  5255  // see whether the original operation was received. If it was, the server
  5256  // ignores the second request. This behavior prevents clients from mistakenly
  5257  // creating duplicate commitments. The request ID must be a valid UUID, with
  5258  // the exception that zero UUID is not supported
  5259  // (00000000-0000-0000-0000-000000000000).
  5260  func (c *ProjectsLocationsGlobalHubsGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsGlobalHubsGroupsPatchCall {
  5261  	c.urlParams_.Set("requestId", requestId)
  5262  	return c
  5263  }
  5264  
  5265  // UpdateMask sets the optional parameter "updateMask": In the case of an
  5266  // update to an existing group, field mask is used to specify the fields to be
  5267  // overwritten. The fields specified in the update_mask are relative to the
  5268  // resource, not the full request. A field is overwritten if it is in the mask.
  5269  // If the user does not provide a mask, then all fields are overwritten.
  5270  func (c *ProjectsLocationsGlobalHubsGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGlobalHubsGroupsPatchCall {
  5271  	c.urlParams_.Set("updateMask", updateMask)
  5272  	return c
  5273  }
  5274  
  5275  // Fields allows partial responses to be retrieved. See
  5276  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5277  // details.
  5278  func (c *ProjectsLocationsGlobalHubsGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsPatchCall {
  5279  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5280  	return c
  5281  }
  5282  
  5283  // Context sets the context to be used in this call's Do method.
  5284  func (c *ProjectsLocationsGlobalHubsGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsPatchCall {
  5285  	c.ctx_ = ctx
  5286  	return c
  5287  }
  5288  
  5289  // Header returns a http.Header that can be modified by the caller to add
  5290  // headers to the request.
  5291  func (c *ProjectsLocationsGlobalHubsGroupsPatchCall) Header() http.Header {
  5292  	if c.header_ == nil {
  5293  		c.header_ = make(http.Header)
  5294  	}
  5295  	return c.header_
  5296  }
  5297  
  5298  func (c *ProjectsLocationsGlobalHubsGroupsPatchCall) doRequest(alt string) (*http.Response, error) {
  5299  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5300  	var body io.Reader = nil
  5301  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.group)
  5302  	if err != nil {
  5303  		return nil, err
  5304  	}
  5305  	c.urlParams_.Set("alt", alt)
  5306  	c.urlParams_.Set("prettyPrint", "false")
  5307  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5308  	urls += "?" + c.urlParams_.Encode()
  5309  	req, err := http.NewRequest("PATCH", urls, body)
  5310  	if err != nil {
  5311  		return nil, err
  5312  	}
  5313  	req.Header = reqHeaders
  5314  	googleapi.Expand(req.URL, map[string]string{
  5315  		"name": c.name,
  5316  	})
  5317  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5318  }
  5319  
  5320  // Do executes the "networkconnectivity.projects.locations.global.hubs.groups.patch" call.
  5321  // Any non-2xx status code is an error. Response headers are in either
  5322  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  5323  // returned at all) in error.(*googleapi.Error).Header. Use
  5324  // googleapi.IsNotModified to check whether the returned error was because
  5325  // http.StatusNotModified was returned.
  5326  func (c *ProjectsLocationsGlobalHubsGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  5327  	gensupport.SetOptions(c.urlParams_, opts...)
  5328  	res, err := c.doRequest("json")
  5329  	if res != nil && res.StatusCode == http.StatusNotModified {
  5330  		if res.Body != nil {
  5331  			res.Body.Close()
  5332  		}
  5333  		return nil, gensupport.WrapError(&googleapi.Error{
  5334  			Code:   res.StatusCode,
  5335  			Header: res.Header,
  5336  		})
  5337  	}
  5338  	if err != nil {
  5339  		return nil, err
  5340  	}
  5341  	defer googleapi.CloseBody(res)
  5342  	if err := googleapi.CheckResponse(res); err != nil {
  5343  		return nil, gensupport.WrapError(err)
  5344  	}
  5345  	ret := &GoogleLongrunningOperation{
  5346  		ServerResponse: googleapi.ServerResponse{
  5347  			Header:         res.Header,
  5348  			HTTPStatusCode: res.StatusCode,
  5349  		},
  5350  	}
  5351  	target := &ret
  5352  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5353  		return nil, err
  5354  	}
  5355  	return ret, nil
  5356  }
  5357  
  5358  type ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall struct {
  5359  	s                   *Service
  5360  	resource            string
  5361  	setiampolicyrequest *SetIamPolicyRequest
  5362  	urlParams_          gensupport.URLParams
  5363  	ctx_                context.Context
  5364  	header_             http.Header
  5365  }
  5366  
  5367  // SetIamPolicy: Sets the access control policy on the specified resource.
  5368  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  5369  // and `PERMISSION_DENIED` errors.
  5370  //
  5371  //   - resource: REQUIRED: The resource for which the policy is being specified.
  5372  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  5373  //     for the appropriate value for this field.
  5374  func (r *ProjectsLocationsGlobalHubsGroupsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall {
  5375  	c := &ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5376  	c.resource = resource
  5377  	c.setiampolicyrequest = setiampolicyrequest
  5378  	return c
  5379  }
  5380  
  5381  // Fields allows partial responses to be retrieved. See
  5382  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5383  // details.
  5384  func (c *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall {
  5385  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5386  	return c
  5387  }
  5388  
  5389  // Context sets the context to be used in this call's Do method.
  5390  func (c *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall {
  5391  	c.ctx_ = ctx
  5392  	return c
  5393  }
  5394  
  5395  // Header returns a http.Header that can be modified by the caller to add
  5396  // headers to the request.
  5397  func (c *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall) Header() http.Header {
  5398  	if c.header_ == nil {
  5399  		c.header_ = make(http.Header)
  5400  	}
  5401  	return c.header_
  5402  }
  5403  
  5404  func (c *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  5405  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5406  	var body io.Reader = nil
  5407  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  5408  	if err != nil {
  5409  		return nil, err
  5410  	}
  5411  	c.urlParams_.Set("alt", alt)
  5412  	c.urlParams_.Set("prettyPrint", "false")
  5413  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  5414  	urls += "?" + c.urlParams_.Encode()
  5415  	req, err := http.NewRequest("POST", urls, body)
  5416  	if err != nil {
  5417  		return nil, err
  5418  	}
  5419  	req.Header = reqHeaders
  5420  	googleapi.Expand(req.URL, map[string]string{
  5421  		"resource": c.resource,
  5422  	})
  5423  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5424  }
  5425  
  5426  // Do executes the "networkconnectivity.projects.locations.global.hubs.groups.setIamPolicy" call.
  5427  // Any non-2xx status code is an error. Response headers are in either
  5428  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  5429  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5430  // whether the returned error was because http.StatusNotModified was returned.
  5431  func (c *ProjectsLocationsGlobalHubsGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  5432  	gensupport.SetOptions(c.urlParams_, opts...)
  5433  	res, err := c.doRequest("json")
  5434  	if res != nil && res.StatusCode == http.StatusNotModified {
  5435  		if res.Body != nil {
  5436  			res.Body.Close()
  5437  		}
  5438  		return nil, gensupport.WrapError(&googleapi.Error{
  5439  			Code:   res.StatusCode,
  5440  			Header: res.Header,
  5441  		})
  5442  	}
  5443  	if err != nil {
  5444  		return nil, err
  5445  	}
  5446  	defer googleapi.CloseBody(res)
  5447  	if err := googleapi.CheckResponse(res); err != nil {
  5448  		return nil, gensupport.WrapError(err)
  5449  	}
  5450  	ret := &Policy{
  5451  		ServerResponse: googleapi.ServerResponse{
  5452  			Header:         res.Header,
  5453  			HTTPStatusCode: res.StatusCode,
  5454  		},
  5455  	}
  5456  	target := &ret
  5457  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5458  		return nil, err
  5459  	}
  5460  	return ret, nil
  5461  }
  5462  
  5463  type ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall struct {
  5464  	s                         *Service
  5465  	resource                  string
  5466  	testiampermissionsrequest *TestIamPermissionsRequest
  5467  	urlParams_                gensupport.URLParams
  5468  	ctx_                      context.Context
  5469  	header_                   http.Header
  5470  }
  5471  
  5472  // TestIamPermissions: Returns permissions that a caller has on the specified
  5473  // resource. If the resource does not exist, this will return an empty set of
  5474  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  5475  // used for building permission-aware UIs and command-line tools, not for
  5476  // authorization checking. This operation may "fail open" without warning.
  5477  //
  5478  //   - resource: REQUIRED: The resource for which the policy detail is being
  5479  //     requested. See Resource names
  5480  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  5481  //     value for this field.
  5482  func (r *ProjectsLocationsGlobalHubsGroupsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall {
  5483  	c := &ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5484  	c.resource = resource
  5485  	c.testiampermissionsrequest = testiampermissionsrequest
  5486  	return c
  5487  }
  5488  
  5489  // Fields allows partial responses to be retrieved. See
  5490  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5491  // details.
  5492  func (c *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall {
  5493  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5494  	return c
  5495  }
  5496  
  5497  // Context sets the context to be used in this call's Do method.
  5498  func (c *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall {
  5499  	c.ctx_ = ctx
  5500  	return c
  5501  }
  5502  
  5503  // Header returns a http.Header that can be modified by the caller to add
  5504  // headers to the request.
  5505  func (c *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall) Header() http.Header {
  5506  	if c.header_ == nil {
  5507  		c.header_ = make(http.Header)
  5508  	}
  5509  	return c.header_
  5510  }
  5511  
  5512  func (c *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  5513  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  5514  	var body io.Reader = nil
  5515  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  5516  	if err != nil {
  5517  		return nil, err
  5518  	}
  5519  	c.urlParams_.Set("alt", alt)
  5520  	c.urlParams_.Set("prettyPrint", "false")
  5521  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  5522  	urls += "?" + c.urlParams_.Encode()
  5523  	req, err := http.NewRequest("POST", urls, body)
  5524  	if err != nil {
  5525  		return nil, err
  5526  	}
  5527  	req.Header = reqHeaders
  5528  	googleapi.Expand(req.URL, map[string]string{
  5529  		"resource": c.resource,
  5530  	})
  5531  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5532  }
  5533  
  5534  // Do executes the "networkconnectivity.projects.locations.global.hubs.groups.testIamPermissions" call.
  5535  // Any non-2xx status code is an error. Response headers are in either
  5536  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  5537  // returned at all) in error.(*googleapi.Error).Header. Use
  5538  // googleapi.IsNotModified to check whether the returned error was because
  5539  // http.StatusNotModified was returned.
  5540  func (c *ProjectsLocationsGlobalHubsGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  5541  	gensupport.SetOptions(c.urlParams_, opts...)
  5542  	res, err := c.doRequest("json")
  5543  	if res != nil && res.StatusCode == http.StatusNotModified {
  5544  		if res.Body != nil {
  5545  			res.Body.Close()
  5546  		}
  5547  		return nil, gensupport.WrapError(&googleapi.Error{
  5548  			Code:   res.StatusCode,
  5549  			Header: res.Header,
  5550  		})
  5551  	}
  5552  	if err != nil {
  5553  		return nil, err
  5554  	}
  5555  	defer googleapi.CloseBody(res)
  5556  	if err := googleapi.CheckResponse(res); err != nil {
  5557  		return nil, gensupport.WrapError(err)
  5558  	}
  5559  	ret := &TestIamPermissionsResponse{
  5560  		ServerResponse: googleapi.ServerResponse{
  5561  			Header:         res.Header,
  5562  			HTTPStatusCode: res.StatusCode,
  5563  		},
  5564  	}
  5565  	target := &ret
  5566  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5567  		return nil, err
  5568  	}
  5569  	return ret, nil
  5570  }
  5571  
  5572  type ProjectsLocationsGlobalHubsRouteTablesGetCall struct {
  5573  	s            *Service
  5574  	name         string
  5575  	urlParams_   gensupport.URLParams
  5576  	ifNoneMatch_ string
  5577  	ctx_         context.Context
  5578  	header_      http.Header
  5579  }
  5580  
  5581  // Get: Gets details about a Network Connectivity Center route table.
  5582  //
  5583  // - name: The name of the route table resource.
  5584  func (r *ProjectsLocationsGlobalHubsRouteTablesService) Get(name string) *ProjectsLocationsGlobalHubsRouteTablesGetCall {
  5585  	c := &ProjectsLocationsGlobalHubsRouteTablesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5586  	c.name = name
  5587  	return c
  5588  }
  5589  
  5590  // Fields allows partial responses to be retrieved. See
  5591  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5592  // details.
  5593  func (c *ProjectsLocationsGlobalHubsRouteTablesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsRouteTablesGetCall {
  5594  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5595  	return c
  5596  }
  5597  
  5598  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5599  // object's ETag matches the given value. This is useful for getting updates
  5600  // only after the object has changed since the last request.
  5601  func (c *ProjectsLocationsGlobalHubsRouteTablesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsRouteTablesGetCall {
  5602  	c.ifNoneMatch_ = entityTag
  5603  	return c
  5604  }
  5605  
  5606  // Context sets the context to be used in this call's Do method.
  5607  func (c *ProjectsLocationsGlobalHubsRouteTablesGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsRouteTablesGetCall {
  5608  	c.ctx_ = ctx
  5609  	return c
  5610  }
  5611  
  5612  // Header returns a http.Header that can be modified by the caller to add
  5613  // headers to the request.
  5614  func (c *ProjectsLocationsGlobalHubsRouteTablesGetCall) Header() http.Header {
  5615  	if c.header_ == nil {
  5616  		c.header_ = make(http.Header)
  5617  	}
  5618  	return c.header_
  5619  }
  5620  
  5621  func (c *ProjectsLocationsGlobalHubsRouteTablesGetCall) doRequest(alt string) (*http.Response, error) {
  5622  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5623  	if c.ifNoneMatch_ != "" {
  5624  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5625  	}
  5626  	var body io.Reader = nil
  5627  	c.urlParams_.Set("alt", alt)
  5628  	c.urlParams_.Set("prettyPrint", "false")
  5629  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5630  	urls += "?" + c.urlParams_.Encode()
  5631  	req, err := http.NewRequest("GET", urls, body)
  5632  	if err != nil {
  5633  		return nil, err
  5634  	}
  5635  	req.Header = reqHeaders
  5636  	googleapi.Expand(req.URL, map[string]string{
  5637  		"name": c.name,
  5638  	})
  5639  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5640  }
  5641  
  5642  // Do executes the "networkconnectivity.projects.locations.global.hubs.routeTables.get" call.
  5643  // Any non-2xx status code is an error. Response headers are in either
  5644  // *RouteTable.ServerResponse.Header or (if a response was returned at all) in
  5645  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5646  // whether the returned error was because http.StatusNotModified was returned.
  5647  func (c *ProjectsLocationsGlobalHubsRouteTablesGetCall) Do(opts ...googleapi.CallOption) (*RouteTable, error) {
  5648  	gensupport.SetOptions(c.urlParams_, opts...)
  5649  	res, err := c.doRequest("json")
  5650  	if res != nil && res.StatusCode == http.StatusNotModified {
  5651  		if res.Body != nil {
  5652  			res.Body.Close()
  5653  		}
  5654  		return nil, gensupport.WrapError(&googleapi.Error{
  5655  			Code:   res.StatusCode,
  5656  			Header: res.Header,
  5657  		})
  5658  	}
  5659  	if err != nil {
  5660  		return nil, err
  5661  	}
  5662  	defer googleapi.CloseBody(res)
  5663  	if err := googleapi.CheckResponse(res); err != nil {
  5664  		return nil, gensupport.WrapError(err)
  5665  	}
  5666  	ret := &RouteTable{
  5667  		ServerResponse: googleapi.ServerResponse{
  5668  			Header:         res.Header,
  5669  			HTTPStatusCode: res.StatusCode,
  5670  		},
  5671  	}
  5672  	target := &ret
  5673  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5674  		return nil, err
  5675  	}
  5676  	return ret, nil
  5677  }
  5678  
  5679  type ProjectsLocationsGlobalHubsRouteTablesListCall struct {
  5680  	s            *Service
  5681  	parent       string
  5682  	urlParams_   gensupport.URLParams
  5683  	ifNoneMatch_ string
  5684  	ctx_         context.Context
  5685  	header_      http.Header
  5686  }
  5687  
  5688  // List: Lists route tables in a given hub.
  5689  //
  5690  // - parent: The parent resource's name.
  5691  func (r *ProjectsLocationsGlobalHubsRouteTablesService) List(parent string) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5692  	c := &ProjectsLocationsGlobalHubsRouteTablesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5693  	c.parent = parent
  5694  	return c
  5695  }
  5696  
  5697  // Filter sets the optional parameter "filter": An expression that filters the
  5698  // list of results.
  5699  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) Filter(filter string) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5700  	c.urlParams_.Set("filter", filter)
  5701  	return c
  5702  }
  5703  
  5704  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  5705  // order.
  5706  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5707  	c.urlParams_.Set("orderBy", orderBy)
  5708  	return c
  5709  }
  5710  
  5711  // PageSize sets the optional parameter "pageSize": The maximum number of
  5712  // results to return per page.
  5713  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5714  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5715  	return c
  5716  }
  5717  
  5718  // PageToken sets the optional parameter "pageToken": The page token.
  5719  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5720  	c.urlParams_.Set("pageToken", pageToken)
  5721  	return c
  5722  }
  5723  
  5724  // Fields allows partial responses to be retrieved. See
  5725  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5726  // details.
  5727  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5728  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5729  	return c
  5730  }
  5731  
  5732  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5733  // object's ETag matches the given value. This is useful for getting updates
  5734  // only after the object has changed since the last request.
  5735  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5736  	c.ifNoneMatch_ = entityTag
  5737  	return c
  5738  }
  5739  
  5740  // Context sets the context to be used in this call's Do method.
  5741  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsRouteTablesListCall {
  5742  	c.ctx_ = ctx
  5743  	return c
  5744  }
  5745  
  5746  // Header returns a http.Header that can be modified by the caller to add
  5747  // headers to the request.
  5748  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) Header() http.Header {
  5749  	if c.header_ == nil {
  5750  		c.header_ = make(http.Header)
  5751  	}
  5752  	return c.header_
  5753  }
  5754  
  5755  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) doRequest(alt string) (*http.Response, error) {
  5756  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5757  	if c.ifNoneMatch_ != "" {
  5758  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5759  	}
  5760  	var body io.Reader = nil
  5761  	c.urlParams_.Set("alt", alt)
  5762  	c.urlParams_.Set("prettyPrint", "false")
  5763  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/routeTables")
  5764  	urls += "?" + c.urlParams_.Encode()
  5765  	req, err := http.NewRequest("GET", urls, body)
  5766  	if err != nil {
  5767  		return nil, err
  5768  	}
  5769  	req.Header = reqHeaders
  5770  	googleapi.Expand(req.URL, map[string]string{
  5771  		"parent": c.parent,
  5772  	})
  5773  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5774  }
  5775  
  5776  // Do executes the "networkconnectivity.projects.locations.global.hubs.routeTables.list" call.
  5777  // Any non-2xx status code is an error. Response headers are in either
  5778  // *ListRouteTablesResponse.ServerResponse.Header or (if a response was
  5779  // returned at all) in error.(*googleapi.Error).Header. Use
  5780  // googleapi.IsNotModified to check whether the returned error was because
  5781  // http.StatusNotModified was returned.
  5782  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) Do(opts ...googleapi.CallOption) (*ListRouteTablesResponse, error) {
  5783  	gensupport.SetOptions(c.urlParams_, opts...)
  5784  	res, err := c.doRequest("json")
  5785  	if res != nil && res.StatusCode == http.StatusNotModified {
  5786  		if res.Body != nil {
  5787  			res.Body.Close()
  5788  		}
  5789  		return nil, gensupport.WrapError(&googleapi.Error{
  5790  			Code:   res.StatusCode,
  5791  			Header: res.Header,
  5792  		})
  5793  	}
  5794  	if err != nil {
  5795  		return nil, err
  5796  	}
  5797  	defer googleapi.CloseBody(res)
  5798  	if err := googleapi.CheckResponse(res); err != nil {
  5799  		return nil, gensupport.WrapError(err)
  5800  	}
  5801  	ret := &ListRouteTablesResponse{
  5802  		ServerResponse: googleapi.ServerResponse{
  5803  			Header:         res.Header,
  5804  			HTTPStatusCode: res.StatusCode,
  5805  		},
  5806  	}
  5807  	target := &ret
  5808  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5809  		return nil, err
  5810  	}
  5811  	return ret, nil
  5812  }
  5813  
  5814  // Pages invokes f for each page of results.
  5815  // A non-nil error returned from f will halt the iteration.
  5816  // The provided context supersedes any context provided to the Context method.
  5817  func (c *ProjectsLocationsGlobalHubsRouteTablesListCall) Pages(ctx context.Context, f func(*ListRouteTablesResponse) error) error {
  5818  	c.ctx_ = ctx
  5819  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  5820  	for {
  5821  		x, err := c.Do()
  5822  		if err != nil {
  5823  			return err
  5824  		}
  5825  		if err := f(x); err != nil {
  5826  			return err
  5827  		}
  5828  		if x.NextPageToken == "" {
  5829  			return nil
  5830  		}
  5831  		c.PageToken(x.NextPageToken)
  5832  	}
  5833  }
  5834  
  5835  type ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall struct {
  5836  	s            *Service
  5837  	name         string
  5838  	urlParams_   gensupport.URLParams
  5839  	ifNoneMatch_ string
  5840  	ctx_         context.Context
  5841  	header_      http.Header
  5842  }
  5843  
  5844  // Get: Gets details about the specified route.
  5845  //
  5846  // - name: The name of the route resource.
  5847  func (r *ProjectsLocationsGlobalHubsRouteTablesRoutesService) Get(name string) *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall {
  5848  	c := &ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5849  	c.name = name
  5850  	return c
  5851  }
  5852  
  5853  // Fields allows partial responses to be retrieved. See
  5854  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5855  // details.
  5856  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall {
  5857  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5858  	return c
  5859  }
  5860  
  5861  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5862  // object's ETag matches the given value. This is useful for getting updates
  5863  // only after the object has changed since the last request.
  5864  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall {
  5865  	c.ifNoneMatch_ = entityTag
  5866  	return c
  5867  }
  5868  
  5869  // Context sets the context to be used in this call's Do method.
  5870  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall {
  5871  	c.ctx_ = ctx
  5872  	return c
  5873  }
  5874  
  5875  // Header returns a http.Header that can be modified by the caller to add
  5876  // headers to the request.
  5877  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall) Header() http.Header {
  5878  	if c.header_ == nil {
  5879  		c.header_ = make(http.Header)
  5880  	}
  5881  	return c.header_
  5882  }
  5883  
  5884  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall) doRequest(alt string) (*http.Response, error) {
  5885  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  5886  	if c.ifNoneMatch_ != "" {
  5887  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5888  	}
  5889  	var body io.Reader = nil
  5890  	c.urlParams_.Set("alt", alt)
  5891  	c.urlParams_.Set("prettyPrint", "false")
  5892  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  5893  	urls += "?" + c.urlParams_.Encode()
  5894  	req, err := http.NewRequest("GET", urls, body)
  5895  	if err != nil {
  5896  		return nil, err
  5897  	}
  5898  	req.Header = reqHeaders
  5899  	googleapi.Expand(req.URL, map[string]string{
  5900  		"name": c.name,
  5901  	})
  5902  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5903  }
  5904  
  5905  // Do executes the "networkconnectivity.projects.locations.global.hubs.routeTables.routes.get" call.
  5906  // Any non-2xx status code is an error. Response headers are in either
  5907  // *Route.ServerResponse.Header or (if a response was returned at all) in
  5908  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  5909  // whether the returned error was because http.StatusNotModified was returned.
  5910  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesGetCall) Do(opts ...googleapi.CallOption) (*Route, error) {
  5911  	gensupport.SetOptions(c.urlParams_, opts...)
  5912  	res, err := c.doRequest("json")
  5913  	if res != nil && res.StatusCode == http.StatusNotModified {
  5914  		if res.Body != nil {
  5915  			res.Body.Close()
  5916  		}
  5917  		return nil, gensupport.WrapError(&googleapi.Error{
  5918  			Code:   res.StatusCode,
  5919  			Header: res.Header,
  5920  		})
  5921  	}
  5922  	if err != nil {
  5923  		return nil, err
  5924  	}
  5925  	defer googleapi.CloseBody(res)
  5926  	if err := googleapi.CheckResponse(res); err != nil {
  5927  		return nil, gensupport.WrapError(err)
  5928  	}
  5929  	ret := &Route{
  5930  		ServerResponse: googleapi.ServerResponse{
  5931  			Header:         res.Header,
  5932  			HTTPStatusCode: res.StatusCode,
  5933  		},
  5934  	}
  5935  	target := &ret
  5936  	if err := gensupport.DecodeResponse(target, res); err != nil {
  5937  		return nil, err
  5938  	}
  5939  	return ret, nil
  5940  }
  5941  
  5942  type ProjectsLocationsGlobalHubsRouteTablesRoutesListCall struct {
  5943  	s            *Service
  5944  	parent       string
  5945  	urlParams_   gensupport.URLParams
  5946  	ifNoneMatch_ string
  5947  	ctx_         context.Context
  5948  	header_      http.Header
  5949  }
  5950  
  5951  // List: Lists routes in a given route table.
  5952  //
  5953  // - parent: The parent resource's name.
  5954  func (r *ProjectsLocationsGlobalHubsRouteTablesRoutesService) List(parent string) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  5955  	c := &ProjectsLocationsGlobalHubsRouteTablesRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5956  	c.parent = parent
  5957  	return c
  5958  }
  5959  
  5960  // Filter sets the optional parameter "filter": An expression that filters the
  5961  // list of results.
  5962  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) Filter(filter string) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  5963  	c.urlParams_.Set("filter", filter)
  5964  	return c
  5965  }
  5966  
  5967  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  5968  // order.
  5969  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  5970  	c.urlParams_.Set("orderBy", orderBy)
  5971  	return c
  5972  }
  5973  
  5974  // PageSize sets the optional parameter "pageSize": The maximum number of
  5975  // results to return per page.
  5976  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  5977  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  5978  	return c
  5979  }
  5980  
  5981  // PageToken sets the optional parameter "pageToken": The page token.
  5982  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  5983  	c.urlParams_.Set("pageToken", pageToken)
  5984  	return c
  5985  }
  5986  
  5987  // Fields allows partial responses to be retrieved. See
  5988  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  5989  // details.
  5990  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  5991  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5992  	return c
  5993  }
  5994  
  5995  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  5996  // object's ETag matches the given value. This is useful for getting updates
  5997  // only after the object has changed since the last request.
  5998  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  5999  	c.ifNoneMatch_ = entityTag
  6000  	return c
  6001  }
  6002  
  6003  // Context sets the context to be used in this call's Do method.
  6004  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall {
  6005  	c.ctx_ = ctx
  6006  	return c
  6007  }
  6008  
  6009  // Header returns a http.Header that can be modified by the caller to add
  6010  // headers to the request.
  6011  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) Header() http.Header {
  6012  	if c.header_ == nil {
  6013  		c.header_ = make(http.Header)
  6014  	}
  6015  	return c.header_
  6016  }
  6017  
  6018  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) doRequest(alt string) (*http.Response, error) {
  6019  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6020  	if c.ifNoneMatch_ != "" {
  6021  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6022  	}
  6023  	var body io.Reader = nil
  6024  	c.urlParams_.Set("alt", alt)
  6025  	c.urlParams_.Set("prettyPrint", "false")
  6026  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/routes")
  6027  	urls += "?" + c.urlParams_.Encode()
  6028  	req, err := http.NewRequest("GET", urls, body)
  6029  	if err != nil {
  6030  		return nil, err
  6031  	}
  6032  	req.Header = reqHeaders
  6033  	googleapi.Expand(req.URL, map[string]string{
  6034  		"parent": c.parent,
  6035  	})
  6036  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6037  }
  6038  
  6039  // Do executes the "networkconnectivity.projects.locations.global.hubs.routeTables.routes.list" call.
  6040  // Any non-2xx status code is an error. Response headers are in either
  6041  // *ListRoutesResponse.ServerResponse.Header or (if a response was returned at
  6042  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6043  // check whether the returned error was because http.StatusNotModified was
  6044  // returned.
  6045  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) Do(opts ...googleapi.CallOption) (*ListRoutesResponse, error) {
  6046  	gensupport.SetOptions(c.urlParams_, opts...)
  6047  	res, err := c.doRequest("json")
  6048  	if res != nil && res.StatusCode == http.StatusNotModified {
  6049  		if res.Body != nil {
  6050  			res.Body.Close()
  6051  		}
  6052  		return nil, gensupport.WrapError(&googleapi.Error{
  6053  			Code:   res.StatusCode,
  6054  			Header: res.Header,
  6055  		})
  6056  	}
  6057  	if err != nil {
  6058  		return nil, err
  6059  	}
  6060  	defer googleapi.CloseBody(res)
  6061  	if err := googleapi.CheckResponse(res); err != nil {
  6062  		return nil, gensupport.WrapError(err)
  6063  	}
  6064  	ret := &ListRoutesResponse{
  6065  		ServerResponse: googleapi.ServerResponse{
  6066  			Header:         res.Header,
  6067  			HTTPStatusCode: res.StatusCode,
  6068  		},
  6069  	}
  6070  	target := &ret
  6071  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6072  		return nil, err
  6073  	}
  6074  	return ret, nil
  6075  }
  6076  
  6077  // Pages invokes f for each page of results.
  6078  // A non-nil error returned from f will halt the iteration.
  6079  // The provided context supersedes any context provided to the Context method.
  6080  func (c *ProjectsLocationsGlobalHubsRouteTablesRoutesListCall) Pages(ctx context.Context, f func(*ListRoutesResponse) error) error {
  6081  	c.ctx_ = ctx
  6082  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6083  	for {
  6084  		x, err := c.Do()
  6085  		if err != nil {
  6086  			return err
  6087  		}
  6088  		if err := f(x); err != nil {
  6089  			return err
  6090  		}
  6091  		if x.NextPageToken == "" {
  6092  			return nil
  6093  		}
  6094  		c.PageToken(x.NextPageToken)
  6095  	}
  6096  }
  6097  
  6098  type ProjectsLocationsGlobalPolicyBasedRoutesCreateCall struct {
  6099  	s                *Service
  6100  	parent           string
  6101  	policybasedroute *PolicyBasedRoute
  6102  	urlParams_       gensupport.URLParams
  6103  	ctx_             context.Context
  6104  	header_          http.Header
  6105  }
  6106  
  6107  // Create: Creates a new policy-based route in a given project and location.
  6108  //
  6109  // - parent: The parent resource's name of the PolicyBasedRoute.
  6110  func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) Create(parent string, policybasedroute *PolicyBasedRoute) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall {
  6111  	c := &ProjectsLocationsGlobalPolicyBasedRoutesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6112  	c.parent = parent
  6113  	c.policybasedroute = policybasedroute
  6114  	return c
  6115  }
  6116  
  6117  // PolicyBasedRouteId sets the optional parameter "policyBasedRouteId":
  6118  // Required. Unique id for the policy-based route to create.
  6119  func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) PolicyBasedRouteId(policyBasedRouteId string) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall {
  6120  	c.urlParams_.Set("policyBasedRouteId", policyBasedRouteId)
  6121  	return c
  6122  }
  6123  
  6124  // RequestId sets the optional parameter "requestId": An optional request ID to
  6125  // identify requests. Specify a unique request ID so that if you must retry
  6126  // your request, the server will know to ignore the request if it has already
  6127  // been completed. The server will guarantee that for at least 60 minutes since
  6128  // the first request. For example, consider a situation where you make an
  6129  // initial request and the request times out. If you make the request again
  6130  // with the same request ID, the server can check if original operation with
  6131  // the same request ID was received, and if so, will ignore the second request.
  6132  // This prevents clients from accidentally creating duplicate commitments. The
  6133  // request ID must be a valid UUID with the exception that zero UUID is not
  6134  // supported (00000000-0000-0000-0000-000000000000).
  6135  func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) RequestId(requestId string) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall {
  6136  	c.urlParams_.Set("requestId", requestId)
  6137  	return c
  6138  }
  6139  
  6140  // Fields allows partial responses to be retrieved. See
  6141  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6142  // details.
  6143  func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall {
  6144  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6145  	return c
  6146  }
  6147  
  6148  // Context sets the context to be used in this call's Do method.
  6149  func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall {
  6150  	c.ctx_ = ctx
  6151  	return c
  6152  }
  6153  
  6154  // Header returns a http.Header that can be modified by the caller to add
  6155  // headers to the request.
  6156  func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Header() http.Header {
  6157  	if c.header_ == nil {
  6158  		c.header_ = make(http.Header)
  6159  	}
  6160  	return c.header_
  6161  }
  6162  
  6163  func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) doRequest(alt string) (*http.Response, error) {
  6164  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6165  	var body io.Reader = nil
  6166  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.policybasedroute)
  6167  	if err != nil {
  6168  		return nil, err
  6169  	}
  6170  	c.urlParams_.Set("alt", alt)
  6171  	c.urlParams_.Set("prettyPrint", "false")
  6172  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policyBasedRoutes")
  6173  	urls += "?" + c.urlParams_.Encode()
  6174  	req, err := http.NewRequest("POST", urls, body)
  6175  	if err != nil {
  6176  		return nil, err
  6177  	}
  6178  	req.Header = reqHeaders
  6179  	googleapi.Expand(req.URL, map[string]string{
  6180  		"parent": c.parent,
  6181  	})
  6182  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6183  }
  6184  
  6185  // Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.create" call.
  6186  // Any non-2xx status code is an error. Response headers are in either
  6187  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  6188  // returned at all) in error.(*googleapi.Error).Header. Use
  6189  // googleapi.IsNotModified to check whether the returned error was because
  6190  // http.StatusNotModified was returned.
  6191  func (c *ProjectsLocationsGlobalPolicyBasedRoutesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  6192  	gensupport.SetOptions(c.urlParams_, opts...)
  6193  	res, err := c.doRequest("json")
  6194  	if res != nil && res.StatusCode == http.StatusNotModified {
  6195  		if res.Body != nil {
  6196  			res.Body.Close()
  6197  		}
  6198  		return nil, gensupport.WrapError(&googleapi.Error{
  6199  			Code:   res.StatusCode,
  6200  			Header: res.Header,
  6201  		})
  6202  	}
  6203  	if err != nil {
  6204  		return nil, err
  6205  	}
  6206  	defer googleapi.CloseBody(res)
  6207  	if err := googleapi.CheckResponse(res); err != nil {
  6208  		return nil, gensupport.WrapError(err)
  6209  	}
  6210  	ret := &GoogleLongrunningOperation{
  6211  		ServerResponse: googleapi.ServerResponse{
  6212  			Header:         res.Header,
  6213  			HTTPStatusCode: res.StatusCode,
  6214  		},
  6215  	}
  6216  	target := &ret
  6217  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6218  		return nil, err
  6219  	}
  6220  	return ret, nil
  6221  }
  6222  
  6223  type ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall struct {
  6224  	s          *Service
  6225  	name       string
  6226  	urlParams_ gensupport.URLParams
  6227  	ctx_       context.Context
  6228  	header_    http.Header
  6229  }
  6230  
  6231  // Delete: Deletes a single policy-based route.
  6232  //
  6233  // - name: Name of the policy-based route resource to delete.
  6234  func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) Delete(name string) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall {
  6235  	c := &ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6236  	c.name = name
  6237  	return c
  6238  }
  6239  
  6240  // RequestId sets the optional parameter "requestId": An optional request ID to
  6241  // identify requests. Specify a unique request ID so that if you must retry
  6242  // your request, the server will know to ignore the request if it has already
  6243  // been completed. The server will guarantee that for at least 60 minutes after
  6244  // the first request. For example, consider a situation where you make an
  6245  // initial request and the request times out. If you make the request again
  6246  // with the same request ID, the server can check if original operation with
  6247  // the same request ID was received, and if so, will ignore the second request.
  6248  // This prevents clients from accidentally creating duplicate commitments. The
  6249  // request ID must be a valid UUID with the exception that zero UUID is not
  6250  // supported (00000000-0000-0000-0000-000000000000).
  6251  func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) RequestId(requestId string) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall {
  6252  	c.urlParams_.Set("requestId", requestId)
  6253  	return c
  6254  }
  6255  
  6256  // Fields allows partial responses to be retrieved. See
  6257  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6258  // details.
  6259  func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall {
  6260  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6261  	return c
  6262  }
  6263  
  6264  // Context sets the context to be used in this call's Do method.
  6265  func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall {
  6266  	c.ctx_ = ctx
  6267  	return c
  6268  }
  6269  
  6270  // Header returns a http.Header that can be modified by the caller to add
  6271  // headers to the request.
  6272  func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Header() http.Header {
  6273  	if c.header_ == nil {
  6274  		c.header_ = make(http.Header)
  6275  	}
  6276  	return c.header_
  6277  }
  6278  
  6279  func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) doRequest(alt string) (*http.Response, error) {
  6280  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6281  	var body io.Reader = nil
  6282  	c.urlParams_.Set("alt", alt)
  6283  	c.urlParams_.Set("prettyPrint", "false")
  6284  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6285  	urls += "?" + c.urlParams_.Encode()
  6286  	req, err := http.NewRequest("DELETE", urls, body)
  6287  	if err != nil {
  6288  		return nil, err
  6289  	}
  6290  	req.Header = reqHeaders
  6291  	googleapi.Expand(req.URL, map[string]string{
  6292  		"name": c.name,
  6293  	})
  6294  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6295  }
  6296  
  6297  // Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.delete" call.
  6298  // Any non-2xx status code is an error. Response headers are in either
  6299  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  6300  // returned at all) in error.(*googleapi.Error).Header. Use
  6301  // googleapi.IsNotModified to check whether the returned error was because
  6302  // http.StatusNotModified was returned.
  6303  func (c *ProjectsLocationsGlobalPolicyBasedRoutesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  6304  	gensupport.SetOptions(c.urlParams_, opts...)
  6305  	res, err := c.doRequest("json")
  6306  	if res != nil && res.StatusCode == http.StatusNotModified {
  6307  		if res.Body != nil {
  6308  			res.Body.Close()
  6309  		}
  6310  		return nil, gensupport.WrapError(&googleapi.Error{
  6311  			Code:   res.StatusCode,
  6312  			Header: res.Header,
  6313  		})
  6314  	}
  6315  	if err != nil {
  6316  		return nil, err
  6317  	}
  6318  	defer googleapi.CloseBody(res)
  6319  	if err := googleapi.CheckResponse(res); err != nil {
  6320  		return nil, gensupport.WrapError(err)
  6321  	}
  6322  	ret := &GoogleLongrunningOperation{
  6323  		ServerResponse: googleapi.ServerResponse{
  6324  			Header:         res.Header,
  6325  			HTTPStatusCode: res.StatusCode,
  6326  		},
  6327  	}
  6328  	target := &ret
  6329  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6330  		return nil, err
  6331  	}
  6332  	return ret, nil
  6333  }
  6334  
  6335  type ProjectsLocationsGlobalPolicyBasedRoutesGetCall struct {
  6336  	s            *Service
  6337  	name         string
  6338  	urlParams_   gensupport.URLParams
  6339  	ifNoneMatch_ string
  6340  	ctx_         context.Context
  6341  	header_      http.Header
  6342  }
  6343  
  6344  // Get: Gets details of a single policy-based route.
  6345  //
  6346  // - name: Name of the PolicyBasedRoute resource to get.
  6347  func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) Get(name string) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall {
  6348  	c := &ProjectsLocationsGlobalPolicyBasedRoutesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6349  	c.name = name
  6350  	return c
  6351  }
  6352  
  6353  // Fields allows partial responses to be retrieved. See
  6354  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6355  // details.
  6356  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall {
  6357  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6358  	return c
  6359  }
  6360  
  6361  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6362  // object's ETag matches the given value. This is useful for getting updates
  6363  // only after the object has changed since the last request.
  6364  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall {
  6365  	c.ifNoneMatch_ = entityTag
  6366  	return c
  6367  }
  6368  
  6369  // Context sets the context to be used in this call's Do method.
  6370  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesGetCall {
  6371  	c.ctx_ = ctx
  6372  	return c
  6373  }
  6374  
  6375  // Header returns a http.Header that can be modified by the caller to add
  6376  // headers to the request.
  6377  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Header() http.Header {
  6378  	if c.header_ == nil {
  6379  		c.header_ = make(http.Header)
  6380  	}
  6381  	return c.header_
  6382  }
  6383  
  6384  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) doRequest(alt string) (*http.Response, error) {
  6385  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6386  	if c.ifNoneMatch_ != "" {
  6387  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6388  	}
  6389  	var body io.Reader = nil
  6390  	c.urlParams_.Set("alt", alt)
  6391  	c.urlParams_.Set("prettyPrint", "false")
  6392  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  6393  	urls += "?" + c.urlParams_.Encode()
  6394  	req, err := http.NewRequest("GET", urls, body)
  6395  	if err != nil {
  6396  		return nil, err
  6397  	}
  6398  	req.Header = reqHeaders
  6399  	googleapi.Expand(req.URL, map[string]string{
  6400  		"name": c.name,
  6401  	})
  6402  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6403  }
  6404  
  6405  // Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.get" call.
  6406  // Any non-2xx status code is an error. Response headers are in either
  6407  // *PolicyBasedRoute.ServerResponse.Header or (if a response was returned at
  6408  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6409  // check whether the returned error was because http.StatusNotModified was
  6410  // returned.
  6411  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetCall) Do(opts ...googleapi.CallOption) (*PolicyBasedRoute, error) {
  6412  	gensupport.SetOptions(c.urlParams_, opts...)
  6413  	res, err := c.doRequest("json")
  6414  	if res != nil && res.StatusCode == http.StatusNotModified {
  6415  		if res.Body != nil {
  6416  			res.Body.Close()
  6417  		}
  6418  		return nil, gensupport.WrapError(&googleapi.Error{
  6419  			Code:   res.StatusCode,
  6420  			Header: res.Header,
  6421  		})
  6422  	}
  6423  	if err != nil {
  6424  		return nil, err
  6425  	}
  6426  	defer googleapi.CloseBody(res)
  6427  	if err := googleapi.CheckResponse(res); err != nil {
  6428  		return nil, gensupport.WrapError(err)
  6429  	}
  6430  	ret := &PolicyBasedRoute{
  6431  		ServerResponse: googleapi.ServerResponse{
  6432  			Header:         res.Header,
  6433  			HTTPStatusCode: res.StatusCode,
  6434  		},
  6435  	}
  6436  	target := &ret
  6437  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6438  		return nil, err
  6439  	}
  6440  	return ret, nil
  6441  }
  6442  
  6443  type ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall struct {
  6444  	s            *Service
  6445  	resource     string
  6446  	urlParams_   gensupport.URLParams
  6447  	ifNoneMatch_ string
  6448  	ctx_         context.Context
  6449  	header_      http.Header
  6450  }
  6451  
  6452  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  6453  // empty policy if the resource exists and does not have a policy set.
  6454  //
  6455  //   - resource: REQUIRED: The resource for which the policy is being requested.
  6456  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6457  //     for the appropriate value for this field.
  6458  func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) GetIamPolicy(resource string) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall {
  6459  	c := &ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6460  	c.resource = resource
  6461  	return c
  6462  }
  6463  
  6464  // OptionsRequestedPolicyVersion sets the optional parameter
  6465  // "options.requestedPolicyVersion": The maximum policy version that will be
  6466  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  6467  // an invalid value will be rejected. Requests for policies with any
  6468  // conditional role bindings must specify version 3. Policies with no
  6469  // conditional role bindings may specify any valid value or leave the field
  6470  // unset. The policy in the response might use the policy version that you
  6471  // specified, or it might use a lower policy version. For example, if you
  6472  // specify version 3, but the policy has no conditional role bindings, the
  6473  // response uses version 1. To learn which resources support conditions in
  6474  // their IAM policies, see the IAM documentation
  6475  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  6476  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall {
  6477  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  6478  	return c
  6479  }
  6480  
  6481  // Fields allows partial responses to be retrieved. See
  6482  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6483  // details.
  6484  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall {
  6485  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6486  	return c
  6487  }
  6488  
  6489  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6490  // object's ETag matches the given value. This is useful for getting updates
  6491  // only after the object has changed since the last request.
  6492  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall {
  6493  	c.ifNoneMatch_ = entityTag
  6494  	return c
  6495  }
  6496  
  6497  // Context sets the context to be used in this call's Do method.
  6498  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall {
  6499  	c.ctx_ = ctx
  6500  	return c
  6501  }
  6502  
  6503  // Header returns a http.Header that can be modified by the caller to add
  6504  // headers to the request.
  6505  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Header() http.Header {
  6506  	if c.header_ == nil {
  6507  		c.header_ = make(http.Header)
  6508  	}
  6509  	return c.header_
  6510  }
  6511  
  6512  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6513  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6514  	if c.ifNoneMatch_ != "" {
  6515  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6516  	}
  6517  	var body io.Reader = nil
  6518  	c.urlParams_.Set("alt", alt)
  6519  	c.urlParams_.Set("prettyPrint", "false")
  6520  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  6521  	urls += "?" + c.urlParams_.Encode()
  6522  	req, err := http.NewRequest("GET", urls, body)
  6523  	if err != nil {
  6524  		return nil, err
  6525  	}
  6526  	req.Header = reqHeaders
  6527  	googleapi.Expand(req.URL, map[string]string{
  6528  		"resource": c.resource,
  6529  	})
  6530  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6531  }
  6532  
  6533  // Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.getIamPolicy" call.
  6534  // Any non-2xx status code is an error. Response headers are in either
  6535  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6536  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6537  // whether the returned error was because http.StatusNotModified was returned.
  6538  func (c *ProjectsLocationsGlobalPolicyBasedRoutesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6539  	gensupport.SetOptions(c.urlParams_, opts...)
  6540  	res, err := c.doRequest("json")
  6541  	if res != nil && res.StatusCode == http.StatusNotModified {
  6542  		if res.Body != nil {
  6543  			res.Body.Close()
  6544  		}
  6545  		return nil, gensupport.WrapError(&googleapi.Error{
  6546  			Code:   res.StatusCode,
  6547  			Header: res.Header,
  6548  		})
  6549  	}
  6550  	if err != nil {
  6551  		return nil, err
  6552  	}
  6553  	defer googleapi.CloseBody(res)
  6554  	if err := googleapi.CheckResponse(res); err != nil {
  6555  		return nil, gensupport.WrapError(err)
  6556  	}
  6557  	ret := &Policy{
  6558  		ServerResponse: googleapi.ServerResponse{
  6559  			Header:         res.Header,
  6560  			HTTPStatusCode: res.StatusCode,
  6561  		},
  6562  	}
  6563  	target := &ret
  6564  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6565  		return nil, err
  6566  	}
  6567  	return ret, nil
  6568  }
  6569  
  6570  type ProjectsLocationsGlobalPolicyBasedRoutesListCall struct {
  6571  	s            *Service
  6572  	parent       string
  6573  	urlParams_   gensupport.URLParams
  6574  	ifNoneMatch_ string
  6575  	ctx_         context.Context
  6576  	header_      http.Header
  6577  }
  6578  
  6579  // List: Lists policy-based routes in a given project and location.
  6580  //
  6581  // - parent: The parent resource's name.
  6582  func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) List(parent string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6583  	c := &ProjectsLocationsGlobalPolicyBasedRoutesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6584  	c.parent = parent
  6585  	return c
  6586  }
  6587  
  6588  // Filter sets the optional parameter "filter": A filter expression that
  6589  // filters the results listed in the response.
  6590  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Filter(filter string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6591  	c.urlParams_.Set("filter", filter)
  6592  	return c
  6593  }
  6594  
  6595  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  6596  // order.
  6597  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) OrderBy(orderBy string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6598  	c.urlParams_.Set("orderBy", orderBy)
  6599  	return c
  6600  }
  6601  
  6602  // PageSize sets the optional parameter "pageSize": The maximum number of
  6603  // results per page that should be returned.
  6604  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6605  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6606  	return c
  6607  }
  6608  
  6609  // PageToken sets the optional parameter "pageToken": The page token.
  6610  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) PageToken(pageToken string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6611  	c.urlParams_.Set("pageToken", pageToken)
  6612  	return c
  6613  }
  6614  
  6615  // Fields allows partial responses to be retrieved. See
  6616  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6617  // details.
  6618  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6619  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6620  	return c
  6621  }
  6622  
  6623  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  6624  // object's ETag matches the given value. This is useful for getting updates
  6625  // only after the object has changed since the last request.
  6626  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6627  	c.ifNoneMatch_ = entityTag
  6628  	return c
  6629  }
  6630  
  6631  // Context sets the context to be used in this call's Do method.
  6632  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesListCall {
  6633  	c.ctx_ = ctx
  6634  	return c
  6635  }
  6636  
  6637  // Header returns a http.Header that can be modified by the caller to add
  6638  // headers to the request.
  6639  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Header() http.Header {
  6640  	if c.header_ == nil {
  6641  		c.header_ = make(http.Header)
  6642  	}
  6643  	return c.header_
  6644  }
  6645  
  6646  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) doRequest(alt string) (*http.Response, error) {
  6647  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  6648  	if c.ifNoneMatch_ != "" {
  6649  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6650  	}
  6651  	var body io.Reader = nil
  6652  	c.urlParams_.Set("alt", alt)
  6653  	c.urlParams_.Set("prettyPrint", "false")
  6654  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/policyBasedRoutes")
  6655  	urls += "?" + c.urlParams_.Encode()
  6656  	req, err := http.NewRequest("GET", urls, body)
  6657  	if err != nil {
  6658  		return nil, err
  6659  	}
  6660  	req.Header = reqHeaders
  6661  	googleapi.Expand(req.URL, map[string]string{
  6662  		"parent": c.parent,
  6663  	})
  6664  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6665  }
  6666  
  6667  // Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.list" call.
  6668  // Any non-2xx status code is an error. Response headers are in either
  6669  // *ListPolicyBasedRoutesResponse.ServerResponse.Header or (if a response was
  6670  // returned at all) in error.(*googleapi.Error).Header. Use
  6671  // googleapi.IsNotModified to check whether the returned error was because
  6672  // http.StatusNotModified was returned.
  6673  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Do(opts ...googleapi.CallOption) (*ListPolicyBasedRoutesResponse, error) {
  6674  	gensupport.SetOptions(c.urlParams_, opts...)
  6675  	res, err := c.doRequest("json")
  6676  	if res != nil && res.StatusCode == http.StatusNotModified {
  6677  		if res.Body != nil {
  6678  			res.Body.Close()
  6679  		}
  6680  		return nil, gensupport.WrapError(&googleapi.Error{
  6681  			Code:   res.StatusCode,
  6682  			Header: res.Header,
  6683  		})
  6684  	}
  6685  	if err != nil {
  6686  		return nil, err
  6687  	}
  6688  	defer googleapi.CloseBody(res)
  6689  	if err := googleapi.CheckResponse(res); err != nil {
  6690  		return nil, gensupport.WrapError(err)
  6691  	}
  6692  	ret := &ListPolicyBasedRoutesResponse{
  6693  		ServerResponse: googleapi.ServerResponse{
  6694  			Header:         res.Header,
  6695  			HTTPStatusCode: res.StatusCode,
  6696  		},
  6697  	}
  6698  	target := &ret
  6699  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6700  		return nil, err
  6701  	}
  6702  	return ret, nil
  6703  }
  6704  
  6705  // Pages invokes f for each page of results.
  6706  // A non-nil error returned from f will halt the iteration.
  6707  // The provided context supersedes any context provided to the Context method.
  6708  func (c *ProjectsLocationsGlobalPolicyBasedRoutesListCall) Pages(ctx context.Context, f func(*ListPolicyBasedRoutesResponse) error) error {
  6709  	c.ctx_ = ctx
  6710  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  6711  	for {
  6712  		x, err := c.Do()
  6713  		if err != nil {
  6714  			return err
  6715  		}
  6716  		if err := f(x); err != nil {
  6717  			return err
  6718  		}
  6719  		if x.NextPageToken == "" {
  6720  			return nil
  6721  		}
  6722  		c.PageToken(x.NextPageToken)
  6723  	}
  6724  }
  6725  
  6726  type ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall struct {
  6727  	s                   *Service
  6728  	resource            string
  6729  	setiampolicyrequest *SetIamPolicyRequest
  6730  	urlParams_          gensupport.URLParams
  6731  	ctx_                context.Context
  6732  	header_             http.Header
  6733  }
  6734  
  6735  // SetIamPolicy: Sets the access control policy on the specified resource.
  6736  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  6737  // and `PERMISSION_DENIED` errors.
  6738  //
  6739  //   - resource: REQUIRED: The resource for which the policy is being specified.
  6740  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  6741  //     for the appropriate value for this field.
  6742  func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall {
  6743  	c := &ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6744  	c.resource = resource
  6745  	c.setiampolicyrequest = setiampolicyrequest
  6746  	return c
  6747  }
  6748  
  6749  // Fields allows partial responses to be retrieved. See
  6750  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6751  // details.
  6752  func (c *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall {
  6753  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6754  	return c
  6755  }
  6756  
  6757  // Context sets the context to be used in this call's Do method.
  6758  func (c *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall {
  6759  	c.ctx_ = ctx
  6760  	return c
  6761  }
  6762  
  6763  // Header returns a http.Header that can be modified by the caller to add
  6764  // headers to the request.
  6765  func (c *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall) Header() http.Header {
  6766  	if c.header_ == nil {
  6767  		c.header_ = make(http.Header)
  6768  	}
  6769  	return c.header_
  6770  }
  6771  
  6772  func (c *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6773  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6774  	var body io.Reader = nil
  6775  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  6776  	if err != nil {
  6777  		return nil, err
  6778  	}
  6779  	c.urlParams_.Set("alt", alt)
  6780  	c.urlParams_.Set("prettyPrint", "false")
  6781  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  6782  	urls += "?" + c.urlParams_.Encode()
  6783  	req, err := http.NewRequest("POST", urls, body)
  6784  	if err != nil {
  6785  		return nil, err
  6786  	}
  6787  	req.Header = reqHeaders
  6788  	googleapi.Expand(req.URL, map[string]string{
  6789  		"resource": c.resource,
  6790  	})
  6791  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6792  }
  6793  
  6794  // Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.setIamPolicy" call.
  6795  // Any non-2xx status code is an error. Response headers are in either
  6796  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  6797  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  6798  // whether the returned error was because http.StatusNotModified was returned.
  6799  func (c *ProjectsLocationsGlobalPolicyBasedRoutesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6800  	gensupport.SetOptions(c.urlParams_, opts...)
  6801  	res, err := c.doRequest("json")
  6802  	if res != nil && res.StatusCode == http.StatusNotModified {
  6803  		if res.Body != nil {
  6804  			res.Body.Close()
  6805  		}
  6806  		return nil, gensupport.WrapError(&googleapi.Error{
  6807  			Code:   res.StatusCode,
  6808  			Header: res.Header,
  6809  		})
  6810  	}
  6811  	if err != nil {
  6812  		return nil, err
  6813  	}
  6814  	defer googleapi.CloseBody(res)
  6815  	if err := googleapi.CheckResponse(res); err != nil {
  6816  		return nil, gensupport.WrapError(err)
  6817  	}
  6818  	ret := &Policy{
  6819  		ServerResponse: googleapi.ServerResponse{
  6820  			Header:         res.Header,
  6821  			HTTPStatusCode: res.StatusCode,
  6822  		},
  6823  	}
  6824  	target := &ret
  6825  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6826  		return nil, err
  6827  	}
  6828  	return ret, nil
  6829  }
  6830  
  6831  type ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall struct {
  6832  	s                         *Service
  6833  	resource                  string
  6834  	testiampermissionsrequest *TestIamPermissionsRequest
  6835  	urlParams_                gensupport.URLParams
  6836  	ctx_                      context.Context
  6837  	header_                   http.Header
  6838  }
  6839  
  6840  // TestIamPermissions: Returns permissions that a caller has on the specified
  6841  // resource. If the resource does not exist, this will return an empty set of
  6842  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  6843  // used for building permission-aware UIs and command-line tools, not for
  6844  // authorization checking. This operation may "fail open" without warning.
  6845  //
  6846  //   - resource: REQUIRED: The resource for which the policy detail is being
  6847  //     requested. See Resource names
  6848  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  6849  //     value for this field.
  6850  func (r *ProjectsLocationsGlobalPolicyBasedRoutesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall {
  6851  	c := &ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6852  	c.resource = resource
  6853  	c.testiampermissionsrequest = testiampermissionsrequest
  6854  	return c
  6855  }
  6856  
  6857  // Fields allows partial responses to be retrieved. See
  6858  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6859  // details.
  6860  func (c *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall {
  6861  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6862  	return c
  6863  }
  6864  
  6865  // Context sets the context to be used in this call's Do method.
  6866  func (c *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall {
  6867  	c.ctx_ = ctx
  6868  	return c
  6869  }
  6870  
  6871  // Header returns a http.Header that can be modified by the caller to add
  6872  // headers to the request.
  6873  func (c *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall) Header() http.Header {
  6874  	if c.header_ == nil {
  6875  		c.header_ = make(http.Header)
  6876  	}
  6877  	return c.header_
  6878  }
  6879  
  6880  func (c *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  6881  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  6882  	var body io.Reader = nil
  6883  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  6884  	if err != nil {
  6885  		return nil, err
  6886  	}
  6887  	c.urlParams_.Set("alt", alt)
  6888  	c.urlParams_.Set("prettyPrint", "false")
  6889  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  6890  	urls += "?" + c.urlParams_.Encode()
  6891  	req, err := http.NewRequest("POST", urls, body)
  6892  	if err != nil {
  6893  		return nil, err
  6894  	}
  6895  	req.Header = reqHeaders
  6896  	googleapi.Expand(req.URL, map[string]string{
  6897  		"resource": c.resource,
  6898  	})
  6899  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6900  }
  6901  
  6902  // Do executes the "networkconnectivity.projects.locations.global.policyBasedRoutes.testIamPermissions" call.
  6903  // Any non-2xx status code is an error. Response headers are in either
  6904  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  6905  // returned at all) in error.(*googleapi.Error).Header. Use
  6906  // googleapi.IsNotModified to check whether the returned error was because
  6907  // http.StatusNotModified was returned.
  6908  func (c *ProjectsLocationsGlobalPolicyBasedRoutesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  6909  	gensupport.SetOptions(c.urlParams_, opts...)
  6910  	res, err := c.doRequest("json")
  6911  	if res != nil && res.StatusCode == http.StatusNotModified {
  6912  		if res.Body != nil {
  6913  			res.Body.Close()
  6914  		}
  6915  		return nil, gensupport.WrapError(&googleapi.Error{
  6916  			Code:   res.StatusCode,
  6917  			Header: res.Header,
  6918  		})
  6919  	}
  6920  	if err != nil {
  6921  		return nil, err
  6922  	}
  6923  	defer googleapi.CloseBody(res)
  6924  	if err := googleapi.CheckResponse(res); err != nil {
  6925  		return nil, gensupport.WrapError(err)
  6926  	}
  6927  	ret := &TestIamPermissionsResponse{
  6928  		ServerResponse: googleapi.ServerResponse{
  6929  			Header:         res.Header,
  6930  			HTTPStatusCode: res.StatusCode,
  6931  		},
  6932  	}
  6933  	target := &ret
  6934  	if err := gensupport.DecodeResponse(target, res); err != nil {
  6935  		return nil, err
  6936  	}
  6937  	return ret, nil
  6938  }
  6939  
  6940  type ProjectsLocationsInternalRangesCreateCall struct {
  6941  	s             *Service
  6942  	parent        string
  6943  	internalrange *InternalRange
  6944  	urlParams_    gensupport.URLParams
  6945  	ctx_          context.Context
  6946  	header_       http.Header
  6947  }
  6948  
  6949  // Create: Creates a new internal range in a given project and location.
  6950  //
  6951  // - parent: The parent resource's name of the internal range.
  6952  func (r *ProjectsLocationsInternalRangesService) Create(parent string, internalrange *InternalRange) *ProjectsLocationsInternalRangesCreateCall {
  6953  	c := &ProjectsLocationsInternalRangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6954  	c.parent = parent
  6955  	c.internalrange = internalrange
  6956  	return c
  6957  }
  6958  
  6959  // InternalRangeId sets the optional parameter "internalRangeId": Resource ID
  6960  // (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See
  6961  // https://google.aip.dev/122#resource-id-segments Unique per location.
  6962  func (c *ProjectsLocationsInternalRangesCreateCall) InternalRangeId(internalRangeId string) *ProjectsLocationsInternalRangesCreateCall {
  6963  	c.urlParams_.Set("internalRangeId", internalRangeId)
  6964  	return c
  6965  }
  6966  
  6967  // RequestId sets the optional parameter "requestId": An optional request ID to
  6968  // identify requests. Specify a unique request ID so that if you must retry
  6969  // your request, the server will know to ignore the request if it has already
  6970  // been completed. The server will guarantee that for at least 60 minutes since
  6971  // the first request. For example, consider a situation where you make an
  6972  // initial request and the request times out. If you make the request again
  6973  // with the same request ID, the server can check if original operation with
  6974  // the same request ID was received, and if so, will ignore the second request.
  6975  // This prevents clients from accidentally creating duplicate commitments. The
  6976  // request ID must be a valid UUID with the exception that zero UUID is not
  6977  // supported (00000000-0000-0000-0000-000000000000).
  6978  func (c *ProjectsLocationsInternalRangesCreateCall) RequestId(requestId string) *ProjectsLocationsInternalRangesCreateCall {
  6979  	c.urlParams_.Set("requestId", requestId)
  6980  	return c
  6981  }
  6982  
  6983  // Fields allows partial responses to be retrieved. See
  6984  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  6985  // details.
  6986  func (c *ProjectsLocationsInternalRangesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesCreateCall {
  6987  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6988  	return c
  6989  }
  6990  
  6991  // Context sets the context to be used in this call's Do method.
  6992  func (c *ProjectsLocationsInternalRangesCreateCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesCreateCall {
  6993  	c.ctx_ = ctx
  6994  	return c
  6995  }
  6996  
  6997  // Header returns a http.Header that can be modified by the caller to add
  6998  // headers to the request.
  6999  func (c *ProjectsLocationsInternalRangesCreateCall) Header() http.Header {
  7000  	if c.header_ == nil {
  7001  		c.header_ = make(http.Header)
  7002  	}
  7003  	return c.header_
  7004  }
  7005  
  7006  func (c *ProjectsLocationsInternalRangesCreateCall) doRequest(alt string) (*http.Response, error) {
  7007  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7008  	var body io.Reader = nil
  7009  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.internalrange)
  7010  	if err != nil {
  7011  		return nil, err
  7012  	}
  7013  	c.urlParams_.Set("alt", alt)
  7014  	c.urlParams_.Set("prettyPrint", "false")
  7015  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/internalRanges")
  7016  	urls += "?" + c.urlParams_.Encode()
  7017  	req, err := http.NewRequest("POST", urls, body)
  7018  	if err != nil {
  7019  		return nil, err
  7020  	}
  7021  	req.Header = reqHeaders
  7022  	googleapi.Expand(req.URL, map[string]string{
  7023  		"parent": c.parent,
  7024  	})
  7025  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7026  }
  7027  
  7028  // Do executes the "networkconnectivity.projects.locations.internalRanges.create" call.
  7029  // Any non-2xx status code is an error. Response headers are in either
  7030  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  7031  // returned at all) in error.(*googleapi.Error).Header. Use
  7032  // googleapi.IsNotModified to check whether the returned error was because
  7033  // http.StatusNotModified was returned.
  7034  func (c *ProjectsLocationsInternalRangesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  7035  	gensupport.SetOptions(c.urlParams_, opts...)
  7036  	res, err := c.doRequest("json")
  7037  	if res != nil && res.StatusCode == http.StatusNotModified {
  7038  		if res.Body != nil {
  7039  			res.Body.Close()
  7040  		}
  7041  		return nil, gensupport.WrapError(&googleapi.Error{
  7042  			Code:   res.StatusCode,
  7043  			Header: res.Header,
  7044  		})
  7045  	}
  7046  	if err != nil {
  7047  		return nil, err
  7048  	}
  7049  	defer googleapi.CloseBody(res)
  7050  	if err := googleapi.CheckResponse(res); err != nil {
  7051  		return nil, gensupport.WrapError(err)
  7052  	}
  7053  	ret := &GoogleLongrunningOperation{
  7054  		ServerResponse: googleapi.ServerResponse{
  7055  			Header:         res.Header,
  7056  			HTTPStatusCode: res.StatusCode,
  7057  		},
  7058  	}
  7059  	target := &ret
  7060  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7061  		return nil, err
  7062  	}
  7063  	return ret, nil
  7064  }
  7065  
  7066  type ProjectsLocationsInternalRangesDeleteCall struct {
  7067  	s          *Service
  7068  	name       string
  7069  	urlParams_ gensupport.URLParams
  7070  	ctx_       context.Context
  7071  	header_    http.Header
  7072  }
  7073  
  7074  // Delete: Deletes a single internal range.
  7075  //
  7076  // - name: The name of the internal range to delete.
  7077  func (r *ProjectsLocationsInternalRangesService) Delete(name string) *ProjectsLocationsInternalRangesDeleteCall {
  7078  	c := &ProjectsLocationsInternalRangesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7079  	c.name = name
  7080  	return c
  7081  }
  7082  
  7083  // RequestId sets the optional parameter "requestId": An optional request ID to
  7084  // identify requests. Specify a unique request ID so that if you must retry
  7085  // your request, the server will know to ignore the request if it has already
  7086  // been completed. The server will guarantee that for at least 60 minutes after
  7087  // the first request. For example, consider a situation where you make an
  7088  // initial request and the request times out. If you make the request again
  7089  // with the same request ID, the server can check if original operation with
  7090  // the same request ID was received, and if so, will ignore the second request.
  7091  // This prevents clients from accidentally creating duplicate commitments. The
  7092  // request ID must be a valid UUID with the exception that zero UUID is not
  7093  // supported (00000000-0000-0000-0000-000000000000).
  7094  func (c *ProjectsLocationsInternalRangesDeleteCall) RequestId(requestId string) *ProjectsLocationsInternalRangesDeleteCall {
  7095  	c.urlParams_.Set("requestId", requestId)
  7096  	return c
  7097  }
  7098  
  7099  // Fields allows partial responses to be retrieved. See
  7100  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7101  // details.
  7102  func (c *ProjectsLocationsInternalRangesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesDeleteCall {
  7103  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7104  	return c
  7105  }
  7106  
  7107  // Context sets the context to be used in this call's Do method.
  7108  func (c *ProjectsLocationsInternalRangesDeleteCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesDeleteCall {
  7109  	c.ctx_ = ctx
  7110  	return c
  7111  }
  7112  
  7113  // Header returns a http.Header that can be modified by the caller to add
  7114  // headers to the request.
  7115  func (c *ProjectsLocationsInternalRangesDeleteCall) Header() http.Header {
  7116  	if c.header_ == nil {
  7117  		c.header_ = make(http.Header)
  7118  	}
  7119  	return c.header_
  7120  }
  7121  
  7122  func (c *ProjectsLocationsInternalRangesDeleteCall) doRequest(alt string) (*http.Response, error) {
  7123  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7124  	var body io.Reader = nil
  7125  	c.urlParams_.Set("alt", alt)
  7126  	c.urlParams_.Set("prettyPrint", "false")
  7127  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7128  	urls += "?" + c.urlParams_.Encode()
  7129  	req, err := http.NewRequest("DELETE", urls, body)
  7130  	if err != nil {
  7131  		return nil, err
  7132  	}
  7133  	req.Header = reqHeaders
  7134  	googleapi.Expand(req.URL, map[string]string{
  7135  		"name": c.name,
  7136  	})
  7137  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7138  }
  7139  
  7140  // Do executes the "networkconnectivity.projects.locations.internalRanges.delete" call.
  7141  // Any non-2xx status code is an error. Response headers are in either
  7142  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  7143  // returned at all) in error.(*googleapi.Error).Header. Use
  7144  // googleapi.IsNotModified to check whether the returned error was because
  7145  // http.StatusNotModified was returned.
  7146  func (c *ProjectsLocationsInternalRangesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  7147  	gensupport.SetOptions(c.urlParams_, opts...)
  7148  	res, err := c.doRequest("json")
  7149  	if res != nil && res.StatusCode == http.StatusNotModified {
  7150  		if res.Body != nil {
  7151  			res.Body.Close()
  7152  		}
  7153  		return nil, gensupport.WrapError(&googleapi.Error{
  7154  			Code:   res.StatusCode,
  7155  			Header: res.Header,
  7156  		})
  7157  	}
  7158  	if err != nil {
  7159  		return nil, err
  7160  	}
  7161  	defer googleapi.CloseBody(res)
  7162  	if err := googleapi.CheckResponse(res); err != nil {
  7163  		return nil, gensupport.WrapError(err)
  7164  	}
  7165  	ret := &GoogleLongrunningOperation{
  7166  		ServerResponse: googleapi.ServerResponse{
  7167  			Header:         res.Header,
  7168  			HTTPStatusCode: res.StatusCode,
  7169  		},
  7170  	}
  7171  	target := &ret
  7172  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7173  		return nil, err
  7174  	}
  7175  	return ret, nil
  7176  }
  7177  
  7178  type ProjectsLocationsInternalRangesGetCall struct {
  7179  	s            *Service
  7180  	name         string
  7181  	urlParams_   gensupport.URLParams
  7182  	ifNoneMatch_ string
  7183  	ctx_         context.Context
  7184  	header_      http.Header
  7185  }
  7186  
  7187  // Get: Gets details of a single internal range.
  7188  //
  7189  // - name: Name of the InternalRange to get.
  7190  func (r *ProjectsLocationsInternalRangesService) Get(name string) *ProjectsLocationsInternalRangesGetCall {
  7191  	c := &ProjectsLocationsInternalRangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7192  	c.name = name
  7193  	return c
  7194  }
  7195  
  7196  // Fields allows partial responses to be retrieved. See
  7197  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7198  // details.
  7199  func (c *ProjectsLocationsInternalRangesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesGetCall {
  7200  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7201  	return c
  7202  }
  7203  
  7204  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7205  // object's ETag matches the given value. This is useful for getting updates
  7206  // only after the object has changed since the last request.
  7207  func (c *ProjectsLocationsInternalRangesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInternalRangesGetCall {
  7208  	c.ifNoneMatch_ = entityTag
  7209  	return c
  7210  }
  7211  
  7212  // Context sets the context to be used in this call's Do method.
  7213  func (c *ProjectsLocationsInternalRangesGetCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesGetCall {
  7214  	c.ctx_ = ctx
  7215  	return c
  7216  }
  7217  
  7218  // Header returns a http.Header that can be modified by the caller to add
  7219  // headers to the request.
  7220  func (c *ProjectsLocationsInternalRangesGetCall) Header() http.Header {
  7221  	if c.header_ == nil {
  7222  		c.header_ = make(http.Header)
  7223  	}
  7224  	return c.header_
  7225  }
  7226  
  7227  func (c *ProjectsLocationsInternalRangesGetCall) doRequest(alt string) (*http.Response, error) {
  7228  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7229  	if c.ifNoneMatch_ != "" {
  7230  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7231  	}
  7232  	var body io.Reader = nil
  7233  	c.urlParams_.Set("alt", alt)
  7234  	c.urlParams_.Set("prettyPrint", "false")
  7235  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7236  	urls += "?" + c.urlParams_.Encode()
  7237  	req, err := http.NewRequest("GET", urls, body)
  7238  	if err != nil {
  7239  		return nil, err
  7240  	}
  7241  	req.Header = reqHeaders
  7242  	googleapi.Expand(req.URL, map[string]string{
  7243  		"name": c.name,
  7244  	})
  7245  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7246  }
  7247  
  7248  // Do executes the "networkconnectivity.projects.locations.internalRanges.get" call.
  7249  // Any non-2xx status code is an error. Response headers are in either
  7250  // *InternalRange.ServerResponse.Header or (if a response was returned at all)
  7251  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7252  // whether the returned error was because http.StatusNotModified was returned.
  7253  func (c *ProjectsLocationsInternalRangesGetCall) Do(opts ...googleapi.CallOption) (*InternalRange, error) {
  7254  	gensupport.SetOptions(c.urlParams_, opts...)
  7255  	res, err := c.doRequest("json")
  7256  	if res != nil && res.StatusCode == http.StatusNotModified {
  7257  		if res.Body != nil {
  7258  			res.Body.Close()
  7259  		}
  7260  		return nil, gensupport.WrapError(&googleapi.Error{
  7261  			Code:   res.StatusCode,
  7262  			Header: res.Header,
  7263  		})
  7264  	}
  7265  	if err != nil {
  7266  		return nil, err
  7267  	}
  7268  	defer googleapi.CloseBody(res)
  7269  	if err := googleapi.CheckResponse(res); err != nil {
  7270  		return nil, gensupport.WrapError(err)
  7271  	}
  7272  	ret := &InternalRange{
  7273  		ServerResponse: googleapi.ServerResponse{
  7274  			Header:         res.Header,
  7275  			HTTPStatusCode: res.StatusCode,
  7276  		},
  7277  	}
  7278  	target := &ret
  7279  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7280  		return nil, err
  7281  	}
  7282  	return ret, nil
  7283  }
  7284  
  7285  type ProjectsLocationsInternalRangesListCall struct {
  7286  	s            *Service
  7287  	parent       string
  7288  	urlParams_   gensupport.URLParams
  7289  	ifNoneMatch_ string
  7290  	ctx_         context.Context
  7291  	header_      http.Header
  7292  }
  7293  
  7294  // List: Lists internal ranges in a given project and location.
  7295  //
  7296  // - parent: The parent resource's name.
  7297  func (r *ProjectsLocationsInternalRangesService) List(parent string) *ProjectsLocationsInternalRangesListCall {
  7298  	c := &ProjectsLocationsInternalRangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7299  	c.parent = parent
  7300  	return c
  7301  }
  7302  
  7303  // Filter sets the optional parameter "filter": A filter expression that
  7304  // filters the results listed in the response.
  7305  func (c *ProjectsLocationsInternalRangesListCall) Filter(filter string) *ProjectsLocationsInternalRangesListCall {
  7306  	c.urlParams_.Set("filter", filter)
  7307  	return c
  7308  }
  7309  
  7310  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  7311  // order.
  7312  func (c *ProjectsLocationsInternalRangesListCall) OrderBy(orderBy string) *ProjectsLocationsInternalRangesListCall {
  7313  	c.urlParams_.Set("orderBy", orderBy)
  7314  	return c
  7315  }
  7316  
  7317  // PageSize sets the optional parameter "pageSize": The maximum number of
  7318  // results per page that should be returned.
  7319  func (c *ProjectsLocationsInternalRangesListCall) PageSize(pageSize int64) *ProjectsLocationsInternalRangesListCall {
  7320  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7321  	return c
  7322  }
  7323  
  7324  // PageToken sets the optional parameter "pageToken": The page token.
  7325  func (c *ProjectsLocationsInternalRangesListCall) PageToken(pageToken string) *ProjectsLocationsInternalRangesListCall {
  7326  	c.urlParams_.Set("pageToken", pageToken)
  7327  	return c
  7328  }
  7329  
  7330  // Fields allows partial responses to be retrieved. See
  7331  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7332  // details.
  7333  func (c *ProjectsLocationsInternalRangesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesListCall {
  7334  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7335  	return c
  7336  }
  7337  
  7338  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7339  // object's ETag matches the given value. This is useful for getting updates
  7340  // only after the object has changed since the last request.
  7341  func (c *ProjectsLocationsInternalRangesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInternalRangesListCall {
  7342  	c.ifNoneMatch_ = entityTag
  7343  	return c
  7344  }
  7345  
  7346  // Context sets the context to be used in this call's Do method.
  7347  func (c *ProjectsLocationsInternalRangesListCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesListCall {
  7348  	c.ctx_ = ctx
  7349  	return c
  7350  }
  7351  
  7352  // Header returns a http.Header that can be modified by the caller to add
  7353  // headers to the request.
  7354  func (c *ProjectsLocationsInternalRangesListCall) Header() http.Header {
  7355  	if c.header_ == nil {
  7356  		c.header_ = make(http.Header)
  7357  	}
  7358  	return c.header_
  7359  }
  7360  
  7361  func (c *ProjectsLocationsInternalRangesListCall) doRequest(alt string) (*http.Response, error) {
  7362  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7363  	if c.ifNoneMatch_ != "" {
  7364  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7365  	}
  7366  	var body io.Reader = nil
  7367  	c.urlParams_.Set("alt", alt)
  7368  	c.urlParams_.Set("prettyPrint", "false")
  7369  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/internalRanges")
  7370  	urls += "?" + c.urlParams_.Encode()
  7371  	req, err := http.NewRequest("GET", urls, body)
  7372  	if err != nil {
  7373  		return nil, err
  7374  	}
  7375  	req.Header = reqHeaders
  7376  	googleapi.Expand(req.URL, map[string]string{
  7377  		"parent": c.parent,
  7378  	})
  7379  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7380  }
  7381  
  7382  // Do executes the "networkconnectivity.projects.locations.internalRanges.list" call.
  7383  // Any non-2xx status code is an error. Response headers are in either
  7384  // *ListInternalRangesResponse.ServerResponse.Header or (if a response was
  7385  // returned at all) in error.(*googleapi.Error).Header. Use
  7386  // googleapi.IsNotModified to check whether the returned error was because
  7387  // http.StatusNotModified was returned.
  7388  func (c *ProjectsLocationsInternalRangesListCall) Do(opts ...googleapi.CallOption) (*ListInternalRangesResponse, error) {
  7389  	gensupport.SetOptions(c.urlParams_, opts...)
  7390  	res, err := c.doRequest("json")
  7391  	if res != nil && res.StatusCode == http.StatusNotModified {
  7392  		if res.Body != nil {
  7393  			res.Body.Close()
  7394  		}
  7395  		return nil, gensupport.WrapError(&googleapi.Error{
  7396  			Code:   res.StatusCode,
  7397  			Header: res.Header,
  7398  		})
  7399  	}
  7400  	if err != nil {
  7401  		return nil, err
  7402  	}
  7403  	defer googleapi.CloseBody(res)
  7404  	if err := googleapi.CheckResponse(res); err != nil {
  7405  		return nil, gensupport.WrapError(err)
  7406  	}
  7407  	ret := &ListInternalRangesResponse{
  7408  		ServerResponse: googleapi.ServerResponse{
  7409  			Header:         res.Header,
  7410  			HTTPStatusCode: res.StatusCode,
  7411  		},
  7412  	}
  7413  	target := &ret
  7414  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7415  		return nil, err
  7416  	}
  7417  	return ret, nil
  7418  }
  7419  
  7420  // Pages invokes f for each page of results.
  7421  // A non-nil error returned from f will halt the iteration.
  7422  // The provided context supersedes any context provided to the Context method.
  7423  func (c *ProjectsLocationsInternalRangesListCall) Pages(ctx context.Context, f func(*ListInternalRangesResponse) error) error {
  7424  	c.ctx_ = ctx
  7425  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  7426  	for {
  7427  		x, err := c.Do()
  7428  		if err != nil {
  7429  			return err
  7430  		}
  7431  		if err := f(x); err != nil {
  7432  			return err
  7433  		}
  7434  		if x.NextPageToken == "" {
  7435  			return nil
  7436  		}
  7437  		c.PageToken(x.NextPageToken)
  7438  	}
  7439  }
  7440  
  7441  type ProjectsLocationsInternalRangesPatchCall struct {
  7442  	s             *Service
  7443  	name          string
  7444  	internalrange *InternalRange
  7445  	urlParams_    gensupport.URLParams
  7446  	ctx_          context.Context
  7447  	header_       http.Header
  7448  }
  7449  
  7450  // Patch: Updates the parameters of a single internal range.
  7451  //
  7452  //   - name: Immutable. The name of an internal range. Format:
  7453  //     projects/{project}/locations/{location}/internalRanges/{internal_range}
  7454  //     See: https://google.aip.dev/122#fields-representing-resource-names.
  7455  func (r *ProjectsLocationsInternalRangesService) Patch(name string, internalrange *InternalRange) *ProjectsLocationsInternalRangesPatchCall {
  7456  	c := &ProjectsLocationsInternalRangesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7457  	c.name = name
  7458  	c.internalrange = internalrange
  7459  	return c
  7460  }
  7461  
  7462  // RequestId sets the optional parameter "requestId": An optional request ID to
  7463  // identify requests. Specify a unique request ID so that if you must retry
  7464  // your request, the server will know to ignore the request if it has already
  7465  // been completed. The server will guarantee that for at least 60 minutes since
  7466  // the first request. For example, consider a situation where you make an
  7467  // initial request and the request times out. If you make the request again
  7468  // with the same request ID, the server can check if original operation with
  7469  // the same request ID was received, and if so, will ignore the second request.
  7470  // This prevents clients from accidentally creating duplicate commitments. The
  7471  // request ID must be a valid UUID with the exception that zero UUID is not
  7472  // supported (00000000-0000-0000-0000-000000000000).
  7473  func (c *ProjectsLocationsInternalRangesPatchCall) RequestId(requestId string) *ProjectsLocationsInternalRangesPatchCall {
  7474  	c.urlParams_.Set("requestId", requestId)
  7475  	return c
  7476  }
  7477  
  7478  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  7479  // specify the fields to be overwritten in the InternalRange resource by the
  7480  // update. The fields specified in the update_mask are relative to the
  7481  // resource, not the full request. A field will be overwritten if it is in the
  7482  // mask. If the user does not provide a mask then all fields will be
  7483  // overwritten.
  7484  func (c *ProjectsLocationsInternalRangesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInternalRangesPatchCall {
  7485  	c.urlParams_.Set("updateMask", updateMask)
  7486  	return c
  7487  }
  7488  
  7489  // Fields allows partial responses to be retrieved. See
  7490  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7491  // details.
  7492  func (c *ProjectsLocationsInternalRangesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInternalRangesPatchCall {
  7493  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7494  	return c
  7495  }
  7496  
  7497  // Context sets the context to be used in this call's Do method.
  7498  func (c *ProjectsLocationsInternalRangesPatchCall) Context(ctx context.Context) *ProjectsLocationsInternalRangesPatchCall {
  7499  	c.ctx_ = ctx
  7500  	return c
  7501  }
  7502  
  7503  // Header returns a http.Header that can be modified by the caller to add
  7504  // headers to the request.
  7505  func (c *ProjectsLocationsInternalRangesPatchCall) Header() http.Header {
  7506  	if c.header_ == nil {
  7507  		c.header_ = make(http.Header)
  7508  	}
  7509  	return c.header_
  7510  }
  7511  
  7512  func (c *ProjectsLocationsInternalRangesPatchCall) doRequest(alt string) (*http.Response, error) {
  7513  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7514  	var body io.Reader = nil
  7515  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.internalrange)
  7516  	if err != nil {
  7517  		return nil, err
  7518  	}
  7519  	c.urlParams_.Set("alt", alt)
  7520  	c.urlParams_.Set("prettyPrint", "false")
  7521  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7522  	urls += "?" + c.urlParams_.Encode()
  7523  	req, err := http.NewRequest("PATCH", urls, body)
  7524  	if err != nil {
  7525  		return nil, err
  7526  	}
  7527  	req.Header = reqHeaders
  7528  	googleapi.Expand(req.URL, map[string]string{
  7529  		"name": c.name,
  7530  	})
  7531  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7532  }
  7533  
  7534  // Do executes the "networkconnectivity.projects.locations.internalRanges.patch" call.
  7535  // Any non-2xx status code is an error. Response headers are in either
  7536  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  7537  // returned at all) in error.(*googleapi.Error).Header. Use
  7538  // googleapi.IsNotModified to check whether the returned error was because
  7539  // http.StatusNotModified was returned.
  7540  func (c *ProjectsLocationsInternalRangesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  7541  	gensupport.SetOptions(c.urlParams_, opts...)
  7542  	res, err := c.doRequest("json")
  7543  	if res != nil && res.StatusCode == http.StatusNotModified {
  7544  		if res.Body != nil {
  7545  			res.Body.Close()
  7546  		}
  7547  		return nil, gensupport.WrapError(&googleapi.Error{
  7548  			Code:   res.StatusCode,
  7549  			Header: res.Header,
  7550  		})
  7551  	}
  7552  	if err != nil {
  7553  		return nil, err
  7554  	}
  7555  	defer googleapi.CloseBody(res)
  7556  	if err := googleapi.CheckResponse(res); err != nil {
  7557  		return nil, gensupport.WrapError(err)
  7558  	}
  7559  	ret := &GoogleLongrunningOperation{
  7560  		ServerResponse: googleapi.ServerResponse{
  7561  			Header:         res.Header,
  7562  			HTTPStatusCode: res.StatusCode,
  7563  		},
  7564  	}
  7565  	target := &ret
  7566  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7567  		return nil, err
  7568  	}
  7569  	return ret, nil
  7570  }
  7571  
  7572  type ProjectsLocationsOperationsCancelCall struct {
  7573  	s                                       *Service
  7574  	name                                    string
  7575  	googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest
  7576  	urlParams_                              gensupport.URLParams
  7577  	ctx_                                    context.Context
  7578  	header_                                 http.Header
  7579  }
  7580  
  7581  // Cancel: Starts asynchronous cancellation on a long-running operation. The
  7582  // server makes a best effort to cancel the operation, but success is not
  7583  // guaranteed. If the server doesn't support this method, it returns
  7584  // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
  7585  // other methods to check whether the cancellation succeeded or whether the
  7586  // operation completed despite cancellation. On successful cancellation, the
  7587  // operation is not deleted; instead, it becomes an operation with an
  7588  // Operation.error value with a google.rpc.Status.code of 1, corresponding to
  7589  // `Code.CANCELLED`.
  7590  //
  7591  // - name: The name of the operation resource to be cancelled.
  7592  func (r *ProjectsLocationsOperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *ProjectsLocationsOperationsCancelCall {
  7593  	c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7594  	c.name = name
  7595  	c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest
  7596  	return c
  7597  }
  7598  
  7599  // Fields allows partial responses to be retrieved. See
  7600  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7601  // details.
  7602  func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall {
  7603  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7604  	return c
  7605  }
  7606  
  7607  // Context sets the context to be used in this call's Do method.
  7608  func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall {
  7609  	c.ctx_ = ctx
  7610  	return c
  7611  }
  7612  
  7613  // Header returns a http.Header that can be modified by the caller to add
  7614  // headers to the request.
  7615  func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header {
  7616  	if c.header_ == nil {
  7617  		c.header_ = make(http.Header)
  7618  	}
  7619  	return c.header_
  7620  }
  7621  
  7622  func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  7623  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  7624  	var body io.Reader = nil
  7625  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest)
  7626  	if err != nil {
  7627  		return nil, err
  7628  	}
  7629  	c.urlParams_.Set("alt", alt)
  7630  	c.urlParams_.Set("prettyPrint", "false")
  7631  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  7632  	urls += "?" + c.urlParams_.Encode()
  7633  	req, err := http.NewRequest("POST", urls, body)
  7634  	if err != nil {
  7635  		return nil, err
  7636  	}
  7637  	req.Header = reqHeaders
  7638  	googleapi.Expand(req.URL, map[string]string{
  7639  		"name": c.name,
  7640  	})
  7641  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7642  }
  7643  
  7644  // Do executes the "networkconnectivity.projects.locations.operations.cancel" call.
  7645  // Any non-2xx status code is an error. Response headers are in either
  7646  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7647  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7648  // whether the returned error was because http.StatusNotModified was returned.
  7649  func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7650  	gensupport.SetOptions(c.urlParams_, opts...)
  7651  	res, err := c.doRequest("json")
  7652  	if res != nil && res.StatusCode == http.StatusNotModified {
  7653  		if res.Body != nil {
  7654  			res.Body.Close()
  7655  		}
  7656  		return nil, gensupport.WrapError(&googleapi.Error{
  7657  			Code:   res.StatusCode,
  7658  			Header: res.Header,
  7659  		})
  7660  	}
  7661  	if err != nil {
  7662  		return nil, err
  7663  	}
  7664  	defer googleapi.CloseBody(res)
  7665  	if err := googleapi.CheckResponse(res); err != nil {
  7666  		return nil, gensupport.WrapError(err)
  7667  	}
  7668  	ret := &Empty{
  7669  		ServerResponse: googleapi.ServerResponse{
  7670  			Header:         res.Header,
  7671  			HTTPStatusCode: res.StatusCode,
  7672  		},
  7673  	}
  7674  	target := &ret
  7675  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7676  		return nil, err
  7677  	}
  7678  	return ret, nil
  7679  }
  7680  
  7681  type ProjectsLocationsOperationsDeleteCall struct {
  7682  	s          *Service
  7683  	name       string
  7684  	urlParams_ gensupport.URLParams
  7685  	ctx_       context.Context
  7686  	header_    http.Header
  7687  }
  7688  
  7689  // Delete: Deletes a long-running operation. This method indicates that the
  7690  // client is no longer interested in the operation result. It does not cancel
  7691  // the operation. If the server doesn't support this method, it returns
  7692  // `google.rpc.Code.UNIMPLEMENTED`.
  7693  //
  7694  // - name: The name of the operation resource to be deleted.
  7695  func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall {
  7696  	c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7697  	c.name = name
  7698  	return c
  7699  }
  7700  
  7701  // Fields allows partial responses to be retrieved. See
  7702  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7703  // details.
  7704  func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall {
  7705  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7706  	return c
  7707  }
  7708  
  7709  // Context sets the context to be used in this call's Do method.
  7710  func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall {
  7711  	c.ctx_ = ctx
  7712  	return c
  7713  }
  7714  
  7715  // Header returns a http.Header that can be modified by the caller to add
  7716  // headers to the request.
  7717  func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header {
  7718  	if c.header_ == nil {
  7719  		c.header_ = make(http.Header)
  7720  	}
  7721  	return c.header_
  7722  }
  7723  
  7724  func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  7725  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7726  	var body io.Reader = nil
  7727  	c.urlParams_.Set("alt", alt)
  7728  	c.urlParams_.Set("prettyPrint", "false")
  7729  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7730  	urls += "?" + c.urlParams_.Encode()
  7731  	req, err := http.NewRequest("DELETE", urls, body)
  7732  	if err != nil {
  7733  		return nil, err
  7734  	}
  7735  	req.Header = reqHeaders
  7736  	googleapi.Expand(req.URL, map[string]string{
  7737  		"name": c.name,
  7738  	})
  7739  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7740  }
  7741  
  7742  // Do executes the "networkconnectivity.projects.locations.operations.delete" call.
  7743  // Any non-2xx status code is an error. Response headers are in either
  7744  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  7745  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  7746  // whether the returned error was because http.StatusNotModified was returned.
  7747  func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7748  	gensupport.SetOptions(c.urlParams_, opts...)
  7749  	res, err := c.doRequest("json")
  7750  	if res != nil && res.StatusCode == http.StatusNotModified {
  7751  		if res.Body != nil {
  7752  			res.Body.Close()
  7753  		}
  7754  		return nil, gensupport.WrapError(&googleapi.Error{
  7755  			Code:   res.StatusCode,
  7756  			Header: res.Header,
  7757  		})
  7758  	}
  7759  	if err != nil {
  7760  		return nil, err
  7761  	}
  7762  	defer googleapi.CloseBody(res)
  7763  	if err := googleapi.CheckResponse(res); err != nil {
  7764  		return nil, gensupport.WrapError(err)
  7765  	}
  7766  	ret := &Empty{
  7767  		ServerResponse: googleapi.ServerResponse{
  7768  			Header:         res.Header,
  7769  			HTTPStatusCode: res.StatusCode,
  7770  		},
  7771  	}
  7772  	target := &ret
  7773  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7774  		return nil, err
  7775  	}
  7776  	return ret, nil
  7777  }
  7778  
  7779  type ProjectsLocationsOperationsGetCall struct {
  7780  	s            *Service
  7781  	name         string
  7782  	urlParams_   gensupport.URLParams
  7783  	ifNoneMatch_ string
  7784  	ctx_         context.Context
  7785  	header_      http.Header
  7786  }
  7787  
  7788  // Get: Gets the latest state of a long-running operation. Clients can use this
  7789  // method to poll the operation result at intervals as recommended by the API
  7790  // service.
  7791  //
  7792  // - name: The name of the operation resource.
  7793  func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall {
  7794  	c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7795  	c.name = name
  7796  	return c
  7797  }
  7798  
  7799  // Fields allows partial responses to be retrieved. See
  7800  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7801  // details.
  7802  func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall {
  7803  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7804  	return c
  7805  }
  7806  
  7807  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7808  // object's ETag matches the given value. This is useful for getting updates
  7809  // only after the object has changed since the last request.
  7810  func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall {
  7811  	c.ifNoneMatch_ = entityTag
  7812  	return c
  7813  }
  7814  
  7815  // Context sets the context to be used in this call's Do method.
  7816  func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall {
  7817  	c.ctx_ = ctx
  7818  	return c
  7819  }
  7820  
  7821  // Header returns a http.Header that can be modified by the caller to add
  7822  // headers to the request.
  7823  func (c *ProjectsLocationsOperationsGetCall) Header() http.Header {
  7824  	if c.header_ == nil {
  7825  		c.header_ = make(http.Header)
  7826  	}
  7827  	return c.header_
  7828  }
  7829  
  7830  func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  7831  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7832  	if c.ifNoneMatch_ != "" {
  7833  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7834  	}
  7835  	var body io.Reader = nil
  7836  	c.urlParams_.Set("alt", alt)
  7837  	c.urlParams_.Set("prettyPrint", "false")
  7838  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7839  	urls += "?" + c.urlParams_.Encode()
  7840  	req, err := http.NewRequest("GET", urls, body)
  7841  	if err != nil {
  7842  		return nil, err
  7843  	}
  7844  	req.Header = reqHeaders
  7845  	googleapi.Expand(req.URL, map[string]string{
  7846  		"name": c.name,
  7847  	})
  7848  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7849  }
  7850  
  7851  // Do executes the "networkconnectivity.projects.locations.operations.get" call.
  7852  // Any non-2xx status code is an error. Response headers are in either
  7853  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  7854  // returned at all) in error.(*googleapi.Error).Header. Use
  7855  // googleapi.IsNotModified to check whether the returned error was because
  7856  // http.StatusNotModified was returned.
  7857  func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  7858  	gensupport.SetOptions(c.urlParams_, opts...)
  7859  	res, err := c.doRequest("json")
  7860  	if res != nil && res.StatusCode == http.StatusNotModified {
  7861  		if res.Body != nil {
  7862  			res.Body.Close()
  7863  		}
  7864  		return nil, gensupport.WrapError(&googleapi.Error{
  7865  			Code:   res.StatusCode,
  7866  			Header: res.Header,
  7867  		})
  7868  	}
  7869  	if err != nil {
  7870  		return nil, err
  7871  	}
  7872  	defer googleapi.CloseBody(res)
  7873  	if err := googleapi.CheckResponse(res); err != nil {
  7874  		return nil, gensupport.WrapError(err)
  7875  	}
  7876  	ret := &GoogleLongrunningOperation{
  7877  		ServerResponse: googleapi.ServerResponse{
  7878  			Header:         res.Header,
  7879  			HTTPStatusCode: res.StatusCode,
  7880  		},
  7881  	}
  7882  	target := &ret
  7883  	if err := gensupport.DecodeResponse(target, res); err != nil {
  7884  		return nil, err
  7885  	}
  7886  	return ret, nil
  7887  }
  7888  
  7889  type ProjectsLocationsOperationsListCall struct {
  7890  	s            *Service
  7891  	name         string
  7892  	urlParams_   gensupport.URLParams
  7893  	ifNoneMatch_ string
  7894  	ctx_         context.Context
  7895  	header_      http.Header
  7896  }
  7897  
  7898  // List: Lists operations that match the specified filter in the request. If
  7899  // the server doesn't support this method, it returns `UNIMPLEMENTED`.
  7900  //
  7901  // - name: The name of the operation's parent resource.
  7902  func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall {
  7903  	c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7904  	c.name = name
  7905  	return c
  7906  }
  7907  
  7908  // Filter sets the optional parameter "filter": The standard list filter.
  7909  func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall {
  7910  	c.urlParams_.Set("filter", filter)
  7911  	return c
  7912  }
  7913  
  7914  // PageSize sets the optional parameter "pageSize": The standard list page
  7915  // size.
  7916  func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall {
  7917  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7918  	return c
  7919  }
  7920  
  7921  // PageToken sets the optional parameter "pageToken": The standard list page
  7922  // token.
  7923  func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall {
  7924  	c.urlParams_.Set("pageToken", pageToken)
  7925  	return c
  7926  }
  7927  
  7928  // Fields allows partial responses to be retrieved. See
  7929  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  7930  // details.
  7931  func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall {
  7932  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7933  	return c
  7934  }
  7935  
  7936  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  7937  // object's ETag matches the given value. This is useful for getting updates
  7938  // only after the object has changed since the last request.
  7939  func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall {
  7940  	c.ifNoneMatch_ = entityTag
  7941  	return c
  7942  }
  7943  
  7944  // Context sets the context to be used in this call's Do method.
  7945  func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall {
  7946  	c.ctx_ = ctx
  7947  	return c
  7948  }
  7949  
  7950  // Header returns a http.Header that can be modified by the caller to add
  7951  // headers to the request.
  7952  func (c *ProjectsLocationsOperationsListCall) Header() http.Header {
  7953  	if c.header_ == nil {
  7954  		c.header_ = make(http.Header)
  7955  	}
  7956  	return c.header_
  7957  }
  7958  
  7959  func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  7960  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  7961  	if c.ifNoneMatch_ != "" {
  7962  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7963  	}
  7964  	var body io.Reader = nil
  7965  	c.urlParams_.Set("alt", alt)
  7966  	c.urlParams_.Set("prettyPrint", "false")
  7967  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations")
  7968  	urls += "?" + c.urlParams_.Encode()
  7969  	req, err := http.NewRequest("GET", urls, body)
  7970  	if err != nil {
  7971  		return nil, err
  7972  	}
  7973  	req.Header = reqHeaders
  7974  	googleapi.Expand(req.URL, map[string]string{
  7975  		"name": c.name,
  7976  	})
  7977  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7978  }
  7979  
  7980  // Do executes the "networkconnectivity.projects.locations.operations.list" call.
  7981  // Any non-2xx status code is an error. Response headers are in either
  7982  // *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a
  7983  // response was returned at all) in error.(*googleapi.Error).Header. Use
  7984  // googleapi.IsNotModified to check whether the returned error was because
  7985  // http.StatusNotModified was returned.
  7986  func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) {
  7987  	gensupport.SetOptions(c.urlParams_, opts...)
  7988  	res, err := c.doRequest("json")
  7989  	if res != nil && res.StatusCode == http.StatusNotModified {
  7990  		if res.Body != nil {
  7991  			res.Body.Close()
  7992  		}
  7993  		return nil, gensupport.WrapError(&googleapi.Error{
  7994  			Code:   res.StatusCode,
  7995  			Header: res.Header,
  7996  		})
  7997  	}
  7998  	if err != nil {
  7999  		return nil, err
  8000  	}
  8001  	defer googleapi.CloseBody(res)
  8002  	if err := googleapi.CheckResponse(res); err != nil {
  8003  		return nil, gensupport.WrapError(err)
  8004  	}
  8005  	ret := &GoogleLongrunningListOperationsResponse{
  8006  		ServerResponse: googleapi.ServerResponse{
  8007  			Header:         res.Header,
  8008  			HTTPStatusCode: res.StatusCode,
  8009  		},
  8010  	}
  8011  	target := &ret
  8012  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8013  		return nil, err
  8014  	}
  8015  	return ret, nil
  8016  }
  8017  
  8018  // Pages invokes f for each page of results.
  8019  // A non-nil error returned from f will halt the iteration.
  8020  // The provided context supersedes any context provided to the Context method.
  8021  func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error {
  8022  	c.ctx_ = ctx
  8023  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8024  	for {
  8025  		x, err := c.Do()
  8026  		if err != nil {
  8027  			return err
  8028  		}
  8029  		if err := f(x); err != nil {
  8030  			return err
  8031  		}
  8032  		if x.NextPageToken == "" {
  8033  			return nil
  8034  		}
  8035  		c.PageToken(x.NextPageToken)
  8036  	}
  8037  }
  8038  
  8039  type ProjectsLocationsRegionalEndpointsCreateCall struct {
  8040  	s                *Service
  8041  	parent           string
  8042  	regionalendpoint *RegionalEndpoint
  8043  	urlParams_       gensupport.URLParams
  8044  	ctx_             context.Context
  8045  	header_          http.Header
  8046  }
  8047  
  8048  // Create: Creates a new RegionalEndpoint in a given project and location.
  8049  //
  8050  // - parent: The parent resource's name of the RegionalEndpoint.
  8051  func (r *ProjectsLocationsRegionalEndpointsService) Create(parent string, regionalendpoint *RegionalEndpoint) *ProjectsLocationsRegionalEndpointsCreateCall {
  8052  	c := &ProjectsLocationsRegionalEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8053  	c.parent = parent
  8054  	c.regionalendpoint = regionalendpoint
  8055  	return c
  8056  }
  8057  
  8058  // RegionalEndpointId sets the optional parameter "regionalEndpointId":
  8059  // Required. Unique id of the Regional Endpoint to be created.
  8060  func (c *ProjectsLocationsRegionalEndpointsCreateCall) RegionalEndpointId(regionalEndpointId string) *ProjectsLocationsRegionalEndpointsCreateCall {
  8061  	c.urlParams_.Set("regionalEndpointId", regionalEndpointId)
  8062  	return c
  8063  }
  8064  
  8065  // RequestId sets the optional parameter "requestId": An optional request ID to
  8066  // identify requests. Specify a unique request ID so that if you must retry
  8067  // your request, the server knows to ignore the request if it has already been
  8068  // completed. The server guarantees that for at least 60 minutes since the
  8069  // first request. For example, consider a situation where you make an initial
  8070  // request and the request times out. If you make the request again with the
  8071  // same request ID, the server can check if the original operation with the
  8072  // same request ID was received, and if so, ignores the second request. This
  8073  // prevents clients from accidentally creating duplicate commitments. The
  8074  // request ID must be a valid UUID with the exception that zero UUID is not
  8075  // supported (00000000-0000-0000-0000-000000000000).
  8076  func (c *ProjectsLocationsRegionalEndpointsCreateCall) RequestId(requestId string) *ProjectsLocationsRegionalEndpointsCreateCall {
  8077  	c.urlParams_.Set("requestId", requestId)
  8078  	return c
  8079  }
  8080  
  8081  // Fields allows partial responses to be retrieved. See
  8082  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8083  // details.
  8084  func (c *ProjectsLocationsRegionalEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegionalEndpointsCreateCall {
  8085  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8086  	return c
  8087  }
  8088  
  8089  // Context sets the context to be used in this call's Do method.
  8090  func (c *ProjectsLocationsRegionalEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsRegionalEndpointsCreateCall {
  8091  	c.ctx_ = ctx
  8092  	return c
  8093  }
  8094  
  8095  // Header returns a http.Header that can be modified by the caller to add
  8096  // headers to the request.
  8097  func (c *ProjectsLocationsRegionalEndpointsCreateCall) Header() http.Header {
  8098  	if c.header_ == nil {
  8099  		c.header_ = make(http.Header)
  8100  	}
  8101  	return c.header_
  8102  }
  8103  
  8104  func (c *ProjectsLocationsRegionalEndpointsCreateCall) doRequest(alt string) (*http.Response, error) {
  8105  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  8106  	var body io.Reader = nil
  8107  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionalendpoint)
  8108  	if err != nil {
  8109  		return nil, err
  8110  	}
  8111  	c.urlParams_.Set("alt", alt)
  8112  	c.urlParams_.Set("prettyPrint", "false")
  8113  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/regionalEndpoints")
  8114  	urls += "?" + c.urlParams_.Encode()
  8115  	req, err := http.NewRequest("POST", urls, body)
  8116  	if err != nil {
  8117  		return nil, err
  8118  	}
  8119  	req.Header = reqHeaders
  8120  	googleapi.Expand(req.URL, map[string]string{
  8121  		"parent": c.parent,
  8122  	})
  8123  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8124  }
  8125  
  8126  // Do executes the "networkconnectivity.projects.locations.regionalEndpoints.create" call.
  8127  // Any non-2xx status code is an error. Response headers are in either
  8128  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  8129  // returned at all) in error.(*googleapi.Error).Header. Use
  8130  // googleapi.IsNotModified to check whether the returned error was because
  8131  // http.StatusNotModified was returned.
  8132  func (c *ProjectsLocationsRegionalEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  8133  	gensupport.SetOptions(c.urlParams_, opts...)
  8134  	res, err := c.doRequest("json")
  8135  	if res != nil && res.StatusCode == http.StatusNotModified {
  8136  		if res.Body != nil {
  8137  			res.Body.Close()
  8138  		}
  8139  		return nil, gensupport.WrapError(&googleapi.Error{
  8140  			Code:   res.StatusCode,
  8141  			Header: res.Header,
  8142  		})
  8143  	}
  8144  	if err != nil {
  8145  		return nil, err
  8146  	}
  8147  	defer googleapi.CloseBody(res)
  8148  	if err := googleapi.CheckResponse(res); err != nil {
  8149  		return nil, gensupport.WrapError(err)
  8150  	}
  8151  	ret := &GoogleLongrunningOperation{
  8152  		ServerResponse: googleapi.ServerResponse{
  8153  			Header:         res.Header,
  8154  			HTTPStatusCode: res.StatusCode,
  8155  		},
  8156  	}
  8157  	target := &ret
  8158  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8159  		return nil, err
  8160  	}
  8161  	return ret, nil
  8162  }
  8163  
  8164  type ProjectsLocationsRegionalEndpointsDeleteCall struct {
  8165  	s          *Service
  8166  	name       string
  8167  	urlParams_ gensupport.URLParams
  8168  	ctx_       context.Context
  8169  	header_    http.Header
  8170  }
  8171  
  8172  // Delete: Deletes a single RegionalEndpoint.
  8173  //
  8174  // - name: The name of the RegionalEndpoint to delete.
  8175  func (r *ProjectsLocationsRegionalEndpointsService) Delete(name string) *ProjectsLocationsRegionalEndpointsDeleteCall {
  8176  	c := &ProjectsLocationsRegionalEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8177  	c.name = name
  8178  	return c
  8179  }
  8180  
  8181  // RequestId sets the optional parameter "requestId": An optional request ID to
  8182  // identify requests. Specify a unique request ID so that if you must retry
  8183  // your request, the server knows to ignore the request if it has already been
  8184  // completed. The server guarantees that for at least 60 minutes since the
  8185  // first request. For example, consider a situation where you make an initial
  8186  // request and the request times out. If you make the request again with the
  8187  // same request ID, the server can check if the original operation with the
  8188  // same request ID was received, and if so, ignores the second request. This
  8189  // prevents clients from accidentally creating duplicate commitments. The
  8190  // request ID must be a valid UUID with the exception that zero UUID is not
  8191  // supported (00000000-0000-0000-0000-000000000000).
  8192  func (c *ProjectsLocationsRegionalEndpointsDeleteCall) RequestId(requestId string) *ProjectsLocationsRegionalEndpointsDeleteCall {
  8193  	c.urlParams_.Set("requestId", requestId)
  8194  	return c
  8195  }
  8196  
  8197  // Fields allows partial responses to be retrieved. See
  8198  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8199  // details.
  8200  func (c *ProjectsLocationsRegionalEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegionalEndpointsDeleteCall {
  8201  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8202  	return c
  8203  }
  8204  
  8205  // Context sets the context to be used in this call's Do method.
  8206  func (c *ProjectsLocationsRegionalEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRegionalEndpointsDeleteCall {
  8207  	c.ctx_ = ctx
  8208  	return c
  8209  }
  8210  
  8211  // Header returns a http.Header that can be modified by the caller to add
  8212  // headers to the request.
  8213  func (c *ProjectsLocationsRegionalEndpointsDeleteCall) Header() http.Header {
  8214  	if c.header_ == nil {
  8215  		c.header_ = make(http.Header)
  8216  	}
  8217  	return c.header_
  8218  }
  8219  
  8220  func (c *ProjectsLocationsRegionalEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8221  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8222  	var body io.Reader = nil
  8223  	c.urlParams_.Set("alt", alt)
  8224  	c.urlParams_.Set("prettyPrint", "false")
  8225  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8226  	urls += "?" + c.urlParams_.Encode()
  8227  	req, err := http.NewRequest("DELETE", urls, body)
  8228  	if err != nil {
  8229  		return nil, err
  8230  	}
  8231  	req.Header = reqHeaders
  8232  	googleapi.Expand(req.URL, map[string]string{
  8233  		"name": c.name,
  8234  	})
  8235  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8236  }
  8237  
  8238  // Do executes the "networkconnectivity.projects.locations.regionalEndpoints.delete" call.
  8239  // Any non-2xx status code is an error. Response headers are in either
  8240  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  8241  // returned at all) in error.(*googleapi.Error).Header. Use
  8242  // googleapi.IsNotModified to check whether the returned error was because
  8243  // http.StatusNotModified was returned.
  8244  func (c *ProjectsLocationsRegionalEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  8245  	gensupport.SetOptions(c.urlParams_, opts...)
  8246  	res, err := c.doRequest("json")
  8247  	if res != nil && res.StatusCode == http.StatusNotModified {
  8248  		if res.Body != nil {
  8249  			res.Body.Close()
  8250  		}
  8251  		return nil, gensupport.WrapError(&googleapi.Error{
  8252  			Code:   res.StatusCode,
  8253  			Header: res.Header,
  8254  		})
  8255  	}
  8256  	if err != nil {
  8257  		return nil, err
  8258  	}
  8259  	defer googleapi.CloseBody(res)
  8260  	if err := googleapi.CheckResponse(res); err != nil {
  8261  		return nil, gensupport.WrapError(err)
  8262  	}
  8263  	ret := &GoogleLongrunningOperation{
  8264  		ServerResponse: googleapi.ServerResponse{
  8265  			Header:         res.Header,
  8266  			HTTPStatusCode: res.StatusCode,
  8267  		},
  8268  	}
  8269  	target := &ret
  8270  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8271  		return nil, err
  8272  	}
  8273  	return ret, nil
  8274  }
  8275  
  8276  type ProjectsLocationsRegionalEndpointsGetCall struct {
  8277  	s            *Service
  8278  	name         string
  8279  	urlParams_   gensupport.URLParams
  8280  	ifNoneMatch_ string
  8281  	ctx_         context.Context
  8282  	header_      http.Header
  8283  }
  8284  
  8285  // Get: Gets details of a single RegionalEndpoint.
  8286  //
  8287  //   - name: Name of the RegionalEndpoint resource to get. Format:
  8288  //     `projects/{project}/locations/{location}/regionalEndpoints/{regional_endpoi
  8289  //     nt}`.
  8290  func (r *ProjectsLocationsRegionalEndpointsService) Get(name string) *ProjectsLocationsRegionalEndpointsGetCall {
  8291  	c := &ProjectsLocationsRegionalEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8292  	c.name = name
  8293  	return c
  8294  }
  8295  
  8296  // Fields allows partial responses to be retrieved. See
  8297  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8298  // details.
  8299  func (c *ProjectsLocationsRegionalEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegionalEndpointsGetCall {
  8300  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8301  	return c
  8302  }
  8303  
  8304  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8305  // object's ETag matches the given value. This is useful for getting updates
  8306  // only after the object has changed since the last request.
  8307  func (c *ProjectsLocationsRegionalEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegionalEndpointsGetCall {
  8308  	c.ifNoneMatch_ = entityTag
  8309  	return c
  8310  }
  8311  
  8312  // Context sets the context to be used in this call's Do method.
  8313  func (c *ProjectsLocationsRegionalEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsRegionalEndpointsGetCall {
  8314  	c.ctx_ = ctx
  8315  	return c
  8316  }
  8317  
  8318  // Header returns a http.Header that can be modified by the caller to add
  8319  // headers to the request.
  8320  func (c *ProjectsLocationsRegionalEndpointsGetCall) Header() http.Header {
  8321  	if c.header_ == nil {
  8322  		c.header_ = make(http.Header)
  8323  	}
  8324  	return c.header_
  8325  }
  8326  
  8327  func (c *ProjectsLocationsRegionalEndpointsGetCall) doRequest(alt string) (*http.Response, error) {
  8328  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8329  	if c.ifNoneMatch_ != "" {
  8330  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8331  	}
  8332  	var body io.Reader = nil
  8333  	c.urlParams_.Set("alt", alt)
  8334  	c.urlParams_.Set("prettyPrint", "false")
  8335  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8336  	urls += "?" + c.urlParams_.Encode()
  8337  	req, err := http.NewRequest("GET", urls, body)
  8338  	if err != nil {
  8339  		return nil, err
  8340  	}
  8341  	req.Header = reqHeaders
  8342  	googleapi.Expand(req.URL, map[string]string{
  8343  		"name": c.name,
  8344  	})
  8345  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8346  }
  8347  
  8348  // Do executes the "networkconnectivity.projects.locations.regionalEndpoints.get" call.
  8349  // Any non-2xx status code is an error. Response headers are in either
  8350  // *RegionalEndpoint.ServerResponse.Header or (if a response was returned at
  8351  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8352  // check whether the returned error was because http.StatusNotModified was
  8353  // returned.
  8354  func (c *ProjectsLocationsRegionalEndpointsGetCall) Do(opts ...googleapi.CallOption) (*RegionalEndpoint, error) {
  8355  	gensupport.SetOptions(c.urlParams_, opts...)
  8356  	res, err := c.doRequest("json")
  8357  	if res != nil && res.StatusCode == http.StatusNotModified {
  8358  		if res.Body != nil {
  8359  			res.Body.Close()
  8360  		}
  8361  		return nil, gensupport.WrapError(&googleapi.Error{
  8362  			Code:   res.StatusCode,
  8363  			Header: res.Header,
  8364  		})
  8365  	}
  8366  	if err != nil {
  8367  		return nil, err
  8368  	}
  8369  	defer googleapi.CloseBody(res)
  8370  	if err := googleapi.CheckResponse(res); err != nil {
  8371  		return nil, gensupport.WrapError(err)
  8372  	}
  8373  	ret := &RegionalEndpoint{
  8374  		ServerResponse: googleapi.ServerResponse{
  8375  			Header:         res.Header,
  8376  			HTTPStatusCode: res.StatusCode,
  8377  		},
  8378  	}
  8379  	target := &ret
  8380  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8381  		return nil, err
  8382  	}
  8383  	return ret, nil
  8384  }
  8385  
  8386  type ProjectsLocationsRegionalEndpointsListCall struct {
  8387  	s            *Service
  8388  	parent       string
  8389  	urlParams_   gensupport.URLParams
  8390  	ifNoneMatch_ string
  8391  	ctx_         context.Context
  8392  	header_      http.Header
  8393  }
  8394  
  8395  // List: Lists RegionalEndpoints in a given project and location.
  8396  //
  8397  // - parent: The parent resource's name of the RegionalEndpoint.
  8398  func (r *ProjectsLocationsRegionalEndpointsService) List(parent string) *ProjectsLocationsRegionalEndpointsListCall {
  8399  	c := &ProjectsLocationsRegionalEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8400  	c.parent = parent
  8401  	return c
  8402  }
  8403  
  8404  // Filter sets the optional parameter "filter": A filter expression that
  8405  // filters the results listed in the response.
  8406  func (c *ProjectsLocationsRegionalEndpointsListCall) Filter(filter string) *ProjectsLocationsRegionalEndpointsListCall {
  8407  	c.urlParams_.Set("filter", filter)
  8408  	return c
  8409  }
  8410  
  8411  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  8412  // order.
  8413  func (c *ProjectsLocationsRegionalEndpointsListCall) OrderBy(orderBy string) *ProjectsLocationsRegionalEndpointsListCall {
  8414  	c.urlParams_.Set("orderBy", orderBy)
  8415  	return c
  8416  }
  8417  
  8418  // PageSize sets the optional parameter "pageSize": Requested page size. Server
  8419  // may return fewer items than requested. If unspecified, server will pick an
  8420  // appropriate default.
  8421  func (c *ProjectsLocationsRegionalEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsRegionalEndpointsListCall {
  8422  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8423  	return c
  8424  }
  8425  
  8426  // PageToken sets the optional parameter "pageToken": A page token.
  8427  func (c *ProjectsLocationsRegionalEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsRegionalEndpointsListCall {
  8428  	c.urlParams_.Set("pageToken", pageToken)
  8429  	return c
  8430  }
  8431  
  8432  // Fields allows partial responses to be retrieved. See
  8433  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8434  // details.
  8435  func (c *ProjectsLocationsRegionalEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRegionalEndpointsListCall {
  8436  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8437  	return c
  8438  }
  8439  
  8440  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8441  // object's ETag matches the given value. This is useful for getting updates
  8442  // only after the object has changed since the last request.
  8443  func (c *ProjectsLocationsRegionalEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRegionalEndpointsListCall {
  8444  	c.ifNoneMatch_ = entityTag
  8445  	return c
  8446  }
  8447  
  8448  // Context sets the context to be used in this call's Do method.
  8449  func (c *ProjectsLocationsRegionalEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsRegionalEndpointsListCall {
  8450  	c.ctx_ = ctx
  8451  	return c
  8452  }
  8453  
  8454  // Header returns a http.Header that can be modified by the caller to add
  8455  // headers to the request.
  8456  func (c *ProjectsLocationsRegionalEndpointsListCall) Header() http.Header {
  8457  	if c.header_ == nil {
  8458  		c.header_ = make(http.Header)
  8459  	}
  8460  	return c.header_
  8461  }
  8462  
  8463  func (c *ProjectsLocationsRegionalEndpointsListCall) doRequest(alt string) (*http.Response, error) {
  8464  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8465  	if c.ifNoneMatch_ != "" {
  8466  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8467  	}
  8468  	var body io.Reader = nil
  8469  	c.urlParams_.Set("alt", alt)
  8470  	c.urlParams_.Set("prettyPrint", "false")
  8471  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/regionalEndpoints")
  8472  	urls += "?" + c.urlParams_.Encode()
  8473  	req, err := http.NewRequest("GET", urls, body)
  8474  	if err != nil {
  8475  		return nil, err
  8476  	}
  8477  	req.Header = reqHeaders
  8478  	googleapi.Expand(req.URL, map[string]string{
  8479  		"parent": c.parent,
  8480  	})
  8481  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8482  }
  8483  
  8484  // Do executes the "networkconnectivity.projects.locations.regionalEndpoints.list" call.
  8485  // Any non-2xx status code is an error. Response headers are in either
  8486  // *ListRegionalEndpointsResponse.ServerResponse.Header or (if a response was
  8487  // returned at all) in error.(*googleapi.Error).Header. Use
  8488  // googleapi.IsNotModified to check whether the returned error was because
  8489  // http.StatusNotModified was returned.
  8490  func (c *ProjectsLocationsRegionalEndpointsListCall) Do(opts ...googleapi.CallOption) (*ListRegionalEndpointsResponse, error) {
  8491  	gensupport.SetOptions(c.urlParams_, opts...)
  8492  	res, err := c.doRequest("json")
  8493  	if res != nil && res.StatusCode == http.StatusNotModified {
  8494  		if res.Body != nil {
  8495  			res.Body.Close()
  8496  		}
  8497  		return nil, gensupport.WrapError(&googleapi.Error{
  8498  			Code:   res.StatusCode,
  8499  			Header: res.Header,
  8500  		})
  8501  	}
  8502  	if err != nil {
  8503  		return nil, err
  8504  	}
  8505  	defer googleapi.CloseBody(res)
  8506  	if err := googleapi.CheckResponse(res); err != nil {
  8507  		return nil, gensupport.WrapError(err)
  8508  	}
  8509  	ret := &ListRegionalEndpointsResponse{
  8510  		ServerResponse: googleapi.ServerResponse{
  8511  			Header:         res.Header,
  8512  			HTTPStatusCode: res.StatusCode,
  8513  		},
  8514  	}
  8515  	target := &ret
  8516  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8517  		return nil, err
  8518  	}
  8519  	return ret, nil
  8520  }
  8521  
  8522  // Pages invokes f for each page of results.
  8523  // A non-nil error returned from f will halt the iteration.
  8524  // The provided context supersedes any context provided to the Context method.
  8525  func (c *ProjectsLocationsRegionalEndpointsListCall) Pages(ctx context.Context, f func(*ListRegionalEndpointsResponse) error) error {
  8526  	c.ctx_ = ctx
  8527  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  8528  	for {
  8529  		x, err := c.Do()
  8530  		if err != nil {
  8531  			return err
  8532  		}
  8533  		if err := f(x); err != nil {
  8534  			return err
  8535  		}
  8536  		if x.NextPageToken == "" {
  8537  			return nil
  8538  		}
  8539  		c.PageToken(x.NextPageToken)
  8540  	}
  8541  }
  8542  
  8543  type ProjectsLocationsServiceClassesDeleteCall struct {
  8544  	s          *Service
  8545  	name       string
  8546  	urlParams_ gensupport.URLParams
  8547  	ctx_       context.Context
  8548  	header_    http.Header
  8549  }
  8550  
  8551  // Delete: Deletes a single ServiceClass.
  8552  //
  8553  // - name: The name of the ServiceClass to delete.
  8554  func (r *ProjectsLocationsServiceClassesService) Delete(name string) *ProjectsLocationsServiceClassesDeleteCall {
  8555  	c := &ProjectsLocationsServiceClassesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8556  	c.name = name
  8557  	return c
  8558  }
  8559  
  8560  // Etag sets the optional parameter "etag": The etag is computed by the server,
  8561  // and may be sent on update and delete requests to ensure the client has an
  8562  // up-to-date value before proceeding.
  8563  func (c *ProjectsLocationsServiceClassesDeleteCall) Etag(etag string) *ProjectsLocationsServiceClassesDeleteCall {
  8564  	c.urlParams_.Set("etag", etag)
  8565  	return c
  8566  }
  8567  
  8568  // RequestId sets the optional parameter "requestId": An optional request ID to
  8569  // identify requests. Specify a unique request ID so that if you must retry
  8570  // your request, the server will know to ignore the request if it has already
  8571  // been completed. The server will guarantee that for at least 60 minutes after
  8572  // the first request. For example, consider a situation where you make an
  8573  // initial request and the request times out. If you make the request again
  8574  // with the same request ID, the server can check if original operation with
  8575  // the same request ID was received, and if so, will ignore the second request.
  8576  // This prevents clients from accidentally creating duplicate commitments. The
  8577  // request ID must be a valid UUID with the exception that zero UUID is not
  8578  // supported (00000000-0000-0000-0000-000000000000).
  8579  func (c *ProjectsLocationsServiceClassesDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceClassesDeleteCall {
  8580  	c.urlParams_.Set("requestId", requestId)
  8581  	return c
  8582  }
  8583  
  8584  // Fields allows partial responses to be retrieved. See
  8585  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8586  // details.
  8587  func (c *ProjectsLocationsServiceClassesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesDeleteCall {
  8588  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8589  	return c
  8590  }
  8591  
  8592  // Context sets the context to be used in this call's Do method.
  8593  func (c *ProjectsLocationsServiceClassesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesDeleteCall {
  8594  	c.ctx_ = ctx
  8595  	return c
  8596  }
  8597  
  8598  // Header returns a http.Header that can be modified by the caller to add
  8599  // headers to the request.
  8600  func (c *ProjectsLocationsServiceClassesDeleteCall) Header() http.Header {
  8601  	if c.header_ == nil {
  8602  		c.header_ = make(http.Header)
  8603  	}
  8604  	return c.header_
  8605  }
  8606  
  8607  func (c *ProjectsLocationsServiceClassesDeleteCall) doRequest(alt string) (*http.Response, error) {
  8608  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8609  	var body io.Reader = nil
  8610  	c.urlParams_.Set("alt", alt)
  8611  	c.urlParams_.Set("prettyPrint", "false")
  8612  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8613  	urls += "?" + c.urlParams_.Encode()
  8614  	req, err := http.NewRequest("DELETE", urls, body)
  8615  	if err != nil {
  8616  		return nil, err
  8617  	}
  8618  	req.Header = reqHeaders
  8619  	googleapi.Expand(req.URL, map[string]string{
  8620  		"name": c.name,
  8621  	})
  8622  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8623  }
  8624  
  8625  // Do executes the "networkconnectivity.projects.locations.serviceClasses.delete" call.
  8626  // Any non-2xx status code is an error. Response headers are in either
  8627  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  8628  // returned at all) in error.(*googleapi.Error).Header. Use
  8629  // googleapi.IsNotModified to check whether the returned error was because
  8630  // http.StatusNotModified was returned.
  8631  func (c *ProjectsLocationsServiceClassesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  8632  	gensupport.SetOptions(c.urlParams_, opts...)
  8633  	res, err := c.doRequest("json")
  8634  	if res != nil && res.StatusCode == http.StatusNotModified {
  8635  		if res.Body != nil {
  8636  			res.Body.Close()
  8637  		}
  8638  		return nil, gensupport.WrapError(&googleapi.Error{
  8639  			Code:   res.StatusCode,
  8640  			Header: res.Header,
  8641  		})
  8642  	}
  8643  	if err != nil {
  8644  		return nil, err
  8645  	}
  8646  	defer googleapi.CloseBody(res)
  8647  	if err := googleapi.CheckResponse(res); err != nil {
  8648  		return nil, gensupport.WrapError(err)
  8649  	}
  8650  	ret := &GoogleLongrunningOperation{
  8651  		ServerResponse: googleapi.ServerResponse{
  8652  			Header:         res.Header,
  8653  			HTTPStatusCode: res.StatusCode,
  8654  		},
  8655  	}
  8656  	target := &ret
  8657  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8658  		return nil, err
  8659  	}
  8660  	return ret, nil
  8661  }
  8662  
  8663  type ProjectsLocationsServiceClassesGetCall struct {
  8664  	s            *Service
  8665  	name         string
  8666  	urlParams_   gensupport.URLParams
  8667  	ifNoneMatch_ string
  8668  	ctx_         context.Context
  8669  	header_      http.Header
  8670  }
  8671  
  8672  // Get: Gets details of a single ServiceClass.
  8673  //
  8674  // - name: Name of the ServiceClass to get.
  8675  func (r *ProjectsLocationsServiceClassesService) Get(name string) *ProjectsLocationsServiceClassesGetCall {
  8676  	c := &ProjectsLocationsServiceClassesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8677  	c.name = name
  8678  	return c
  8679  }
  8680  
  8681  // Fields allows partial responses to be retrieved. See
  8682  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8683  // details.
  8684  func (c *ProjectsLocationsServiceClassesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesGetCall {
  8685  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8686  	return c
  8687  }
  8688  
  8689  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8690  // object's ETag matches the given value. This is useful for getting updates
  8691  // only after the object has changed since the last request.
  8692  func (c *ProjectsLocationsServiceClassesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesGetCall {
  8693  	c.ifNoneMatch_ = entityTag
  8694  	return c
  8695  }
  8696  
  8697  // Context sets the context to be used in this call's Do method.
  8698  func (c *ProjectsLocationsServiceClassesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesGetCall {
  8699  	c.ctx_ = ctx
  8700  	return c
  8701  }
  8702  
  8703  // Header returns a http.Header that can be modified by the caller to add
  8704  // headers to the request.
  8705  func (c *ProjectsLocationsServiceClassesGetCall) Header() http.Header {
  8706  	if c.header_ == nil {
  8707  		c.header_ = make(http.Header)
  8708  	}
  8709  	return c.header_
  8710  }
  8711  
  8712  func (c *ProjectsLocationsServiceClassesGetCall) doRequest(alt string) (*http.Response, error) {
  8713  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8714  	if c.ifNoneMatch_ != "" {
  8715  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8716  	}
  8717  	var body io.Reader = nil
  8718  	c.urlParams_.Set("alt", alt)
  8719  	c.urlParams_.Set("prettyPrint", "false")
  8720  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  8721  	urls += "?" + c.urlParams_.Encode()
  8722  	req, err := http.NewRequest("GET", urls, body)
  8723  	if err != nil {
  8724  		return nil, err
  8725  	}
  8726  	req.Header = reqHeaders
  8727  	googleapi.Expand(req.URL, map[string]string{
  8728  		"name": c.name,
  8729  	})
  8730  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8731  }
  8732  
  8733  // Do executes the "networkconnectivity.projects.locations.serviceClasses.get" call.
  8734  // Any non-2xx status code is an error. Response headers are in either
  8735  // *ServiceClass.ServerResponse.Header or (if a response was returned at all)
  8736  // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8737  // whether the returned error was because http.StatusNotModified was returned.
  8738  func (c *ProjectsLocationsServiceClassesGetCall) Do(opts ...googleapi.CallOption) (*ServiceClass, error) {
  8739  	gensupport.SetOptions(c.urlParams_, opts...)
  8740  	res, err := c.doRequest("json")
  8741  	if res != nil && res.StatusCode == http.StatusNotModified {
  8742  		if res.Body != nil {
  8743  			res.Body.Close()
  8744  		}
  8745  		return nil, gensupport.WrapError(&googleapi.Error{
  8746  			Code:   res.StatusCode,
  8747  			Header: res.Header,
  8748  		})
  8749  	}
  8750  	if err != nil {
  8751  		return nil, err
  8752  	}
  8753  	defer googleapi.CloseBody(res)
  8754  	if err := googleapi.CheckResponse(res); err != nil {
  8755  		return nil, gensupport.WrapError(err)
  8756  	}
  8757  	ret := &ServiceClass{
  8758  		ServerResponse: googleapi.ServerResponse{
  8759  			Header:         res.Header,
  8760  			HTTPStatusCode: res.StatusCode,
  8761  		},
  8762  	}
  8763  	target := &ret
  8764  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8765  		return nil, err
  8766  	}
  8767  	return ret, nil
  8768  }
  8769  
  8770  type ProjectsLocationsServiceClassesGetIamPolicyCall struct {
  8771  	s            *Service
  8772  	resource     string
  8773  	urlParams_   gensupport.URLParams
  8774  	ifNoneMatch_ string
  8775  	ctx_         context.Context
  8776  	header_      http.Header
  8777  }
  8778  
  8779  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  8780  // empty policy if the resource exists and does not have a policy set.
  8781  //
  8782  //   - resource: REQUIRED: The resource for which the policy is being requested.
  8783  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  8784  //     for the appropriate value for this field.
  8785  func (r *ProjectsLocationsServiceClassesService) GetIamPolicy(resource string) *ProjectsLocationsServiceClassesGetIamPolicyCall {
  8786  	c := &ProjectsLocationsServiceClassesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8787  	c.resource = resource
  8788  	return c
  8789  }
  8790  
  8791  // OptionsRequestedPolicyVersion sets the optional parameter
  8792  // "options.requestedPolicyVersion": The maximum policy version that will be
  8793  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  8794  // an invalid value will be rejected. Requests for policies with any
  8795  // conditional role bindings must specify version 3. Policies with no
  8796  // conditional role bindings may specify any valid value or leave the field
  8797  // unset. The policy in the response might use the policy version that you
  8798  // specified, or it might use a lower policy version. For example, if you
  8799  // specify version 3, but the policy has no conditional role bindings, the
  8800  // response uses version 1. To learn which resources support conditions in
  8801  // their IAM policies, see the IAM documentation
  8802  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  8803  func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceClassesGetIamPolicyCall {
  8804  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  8805  	return c
  8806  }
  8807  
  8808  // Fields allows partial responses to be retrieved. See
  8809  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8810  // details.
  8811  func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesGetIamPolicyCall {
  8812  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8813  	return c
  8814  }
  8815  
  8816  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8817  // object's ETag matches the given value. This is useful for getting updates
  8818  // only after the object has changed since the last request.
  8819  func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesGetIamPolicyCall {
  8820  	c.ifNoneMatch_ = entityTag
  8821  	return c
  8822  }
  8823  
  8824  // Context sets the context to be used in this call's Do method.
  8825  func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesGetIamPolicyCall {
  8826  	c.ctx_ = ctx
  8827  	return c
  8828  }
  8829  
  8830  // Header returns a http.Header that can be modified by the caller to add
  8831  // headers to the request.
  8832  func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Header() http.Header {
  8833  	if c.header_ == nil {
  8834  		c.header_ = make(http.Header)
  8835  	}
  8836  	return c.header_
  8837  }
  8838  
  8839  func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  8840  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8841  	if c.ifNoneMatch_ != "" {
  8842  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8843  	}
  8844  	var body io.Reader = nil
  8845  	c.urlParams_.Set("alt", alt)
  8846  	c.urlParams_.Set("prettyPrint", "false")
  8847  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  8848  	urls += "?" + c.urlParams_.Encode()
  8849  	req, err := http.NewRequest("GET", urls, body)
  8850  	if err != nil {
  8851  		return nil, err
  8852  	}
  8853  	req.Header = reqHeaders
  8854  	googleapi.Expand(req.URL, map[string]string{
  8855  		"resource": c.resource,
  8856  	})
  8857  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8858  }
  8859  
  8860  // Do executes the "networkconnectivity.projects.locations.serviceClasses.getIamPolicy" call.
  8861  // Any non-2xx status code is an error. Response headers are in either
  8862  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  8863  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  8864  // whether the returned error was because http.StatusNotModified was returned.
  8865  func (c *ProjectsLocationsServiceClassesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  8866  	gensupport.SetOptions(c.urlParams_, opts...)
  8867  	res, err := c.doRequest("json")
  8868  	if res != nil && res.StatusCode == http.StatusNotModified {
  8869  		if res.Body != nil {
  8870  			res.Body.Close()
  8871  		}
  8872  		return nil, gensupport.WrapError(&googleapi.Error{
  8873  			Code:   res.StatusCode,
  8874  			Header: res.Header,
  8875  		})
  8876  	}
  8877  	if err != nil {
  8878  		return nil, err
  8879  	}
  8880  	defer googleapi.CloseBody(res)
  8881  	if err := googleapi.CheckResponse(res); err != nil {
  8882  		return nil, gensupport.WrapError(err)
  8883  	}
  8884  	ret := &Policy{
  8885  		ServerResponse: googleapi.ServerResponse{
  8886  			Header:         res.Header,
  8887  			HTTPStatusCode: res.StatusCode,
  8888  		},
  8889  	}
  8890  	target := &ret
  8891  	if err := gensupport.DecodeResponse(target, res); err != nil {
  8892  		return nil, err
  8893  	}
  8894  	return ret, nil
  8895  }
  8896  
  8897  type ProjectsLocationsServiceClassesListCall struct {
  8898  	s            *Service
  8899  	parent       string
  8900  	urlParams_   gensupport.URLParams
  8901  	ifNoneMatch_ string
  8902  	ctx_         context.Context
  8903  	header_      http.Header
  8904  }
  8905  
  8906  // List: Lists ServiceClasses in a given project and location.
  8907  //
  8908  // - parent: The parent resource's name. ex. projects/123/locations/us-east1.
  8909  func (r *ProjectsLocationsServiceClassesService) List(parent string) *ProjectsLocationsServiceClassesListCall {
  8910  	c := &ProjectsLocationsServiceClassesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8911  	c.parent = parent
  8912  	return c
  8913  }
  8914  
  8915  // Filter sets the optional parameter "filter": A filter expression that
  8916  // filters the results listed in the response.
  8917  func (c *ProjectsLocationsServiceClassesListCall) Filter(filter string) *ProjectsLocationsServiceClassesListCall {
  8918  	c.urlParams_.Set("filter", filter)
  8919  	return c
  8920  }
  8921  
  8922  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  8923  // order.
  8924  func (c *ProjectsLocationsServiceClassesListCall) OrderBy(orderBy string) *ProjectsLocationsServiceClassesListCall {
  8925  	c.urlParams_.Set("orderBy", orderBy)
  8926  	return c
  8927  }
  8928  
  8929  // PageSize sets the optional parameter "pageSize": The maximum number of
  8930  // results per page that should be returned.
  8931  func (c *ProjectsLocationsServiceClassesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceClassesListCall {
  8932  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8933  	return c
  8934  }
  8935  
  8936  // PageToken sets the optional parameter "pageToken": The page token.
  8937  func (c *ProjectsLocationsServiceClassesListCall) PageToken(pageToken string) *ProjectsLocationsServiceClassesListCall {
  8938  	c.urlParams_.Set("pageToken", pageToken)
  8939  	return c
  8940  }
  8941  
  8942  // Fields allows partial responses to be retrieved. See
  8943  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  8944  // details.
  8945  func (c *ProjectsLocationsServiceClassesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesListCall {
  8946  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8947  	return c
  8948  }
  8949  
  8950  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  8951  // object's ETag matches the given value. This is useful for getting updates
  8952  // only after the object has changed since the last request.
  8953  func (c *ProjectsLocationsServiceClassesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceClassesListCall {
  8954  	c.ifNoneMatch_ = entityTag
  8955  	return c
  8956  }
  8957  
  8958  // Context sets the context to be used in this call's Do method.
  8959  func (c *ProjectsLocationsServiceClassesListCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesListCall {
  8960  	c.ctx_ = ctx
  8961  	return c
  8962  }
  8963  
  8964  // Header returns a http.Header that can be modified by the caller to add
  8965  // headers to the request.
  8966  func (c *ProjectsLocationsServiceClassesListCall) Header() http.Header {
  8967  	if c.header_ == nil {
  8968  		c.header_ = make(http.Header)
  8969  	}
  8970  	return c.header_
  8971  }
  8972  
  8973  func (c *ProjectsLocationsServiceClassesListCall) doRequest(alt string) (*http.Response, error) {
  8974  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  8975  	if c.ifNoneMatch_ != "" {
  8976  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8977  	}
  8978  	var body io.Reader = nil
  8979  	c.urlParams_.Set("alt", alt)
  8980  	c.urlParams_.Set("prettyPrint", "false")
  8981  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceClasses")
  8982  	urls += "?" + c.urlParams_.Encode()
  8983  	req, err := http.NewRequest("GET", urls, body)
  8984  	if err != nil {
  8985  		return nil, err
  8986  	}
  8987  	req.Header = reqHeaders
  8988  	googleapi.Expand(req.URL, map[string]string{
  8989  		"parent": c.parent,
  8990  	})
  8991  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8992  }
  8993  
  8994  // Do executes the "networkconnectivity.projects.locations.serviceClasses.list" call.
  8995  // Any non-2xx status code is an error. Response headers are in either
  8996  // *ListServiceClassesResponse.ServerResponse.Header or (if a response was
  8997  // returned at all) in error.(*googleapi.Error).Header. Use
  8998  // googleapi.IsNotModified to check whether the returned error was because
  8999  // http.StatusNotModified was returned.
  9000  func (c *ProjectsLocationsServiceClassesListCall) Do(opts ...googleapi.CallOption) (*ListServiceClassesResponse, error) {
  9001  	gensupport.SetOptions(c.urlParams_, opts...)
  9002  	res, err := c.doRequest("json")
  9003  	if res != nil && res.StatusCode == http.StatusNotModified {
  9004  		if res.Body != nil {
  9005  			res.Body.Close()
  9006  		}
  9007  		return nil, gensupport.WrapError(&googleapi.Error{
  9008  			Code:   res.StatusCode,
  9009  			Header: res.Header,
  9010  		})
  9011  	}
  9012  	if err != nil {
  9013  		return nil, err
  9014  	}
  9015  	defer googleapi.CloseBody(res)
  9016  	if err := googleapi.CheckResponse(res); err != nil {
  9017  		return nil, gensupport.WrapError(err)
  9018  	}
  9019  	ret := &ListServiceClassesResponse{
  9020  		ServerResponse: googleapi.ServerResponse{
  9021  			Header:         res.Header,
  9022  			HTTPStatusCode: res.StatusCode,
  9023  		},
  9024  	}
  9025  	target := &ret
  9026  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9027  		return nil, err
  9028  	}
  9029  	return ret, nil
  9030  }
  9031  
  9032  // Pages invokes f for each page of results.
  9033  // A non-nil error returned from f will halt the iteration.
  9034  // The provided context supersedes any context provided to the Context method.
  9035  func (c *ProjectsLocationsServiceClassesListCall) Pages(ctx context.Context, f func(*ListServiceClassesResponse) error) error {
  9036  	c.ctx_ = ctx
  9037  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  9038  	for {
  9039  		x, err := c.Do()
  9040  		if err != nil {
  9041  			return err
  9042  		}
  9043  		if err := f(x); err != nil {
  9044  			return err
  9045  		}
  9046  		if x.NextPageToken == "" {
  9047  			return nil
  9048  		}
  9049  		c.PageToken(x.NextPageToken)
  9050  	}
  9051  }
  9052  
  9053  type ProjectsLocationsServiceClassesPatchCall struct {
  9054  	s            *Service
  9055  	name         string
  9056  	serviceclass *ServiceClass
  9057  	urlParams_   gensupport.URLParams
  9058  	ctx_         context.Context
  9059  	header_      http.Header
  9060  }
  9061  
  9062  // Patch: Updates the parameters of a single ServiceClass.
  9063  //
  9064  //   - name: Immutable. The name of a ServiceClass resource. Format:
  9065  //     projects/{project}/locations/{location}/serviceClasses/{service_class}
  9066  //     See: https://google.aip.dev/122#fields-representing-resource-names.
  9067  func (r *ProjectsLocationsServiceClassesService) Patch(name string, serviceclass *ServiceClass) *ProjectsLocationsServiceClassesPatchCall {
  9068  	c := &ProjectsLocationsServiceClassesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9069  	c.name = name
  9070  	c.serviceclass = serviceclass
  9071  	return c
  9072  }
  9073  
  9074  // RequestId sets the optional parameter "requestId": An optional request ID to
  9075  // identify requests. Specify a unique request ID so that if you must retry
  9076  // your request, the server will know to ignore the request if it has already
  9077  // been completed. The server will guarantee that for at least 60 minutes since
  9078  // the first request. For example, consider a situation where you make an
  9079  // initial request and the request times out. If you make the request again
  9080  // with the same request ID, the server can check if original operation with
  9081  // the same request ID was received, and if so, will ignore the second request.
  9082  // This prevents clients from accidentally creating duplicate commitments. The
  9083  // request ID must be a valid UUID with the exception that zero UUID is not
  9084  // supported (00000000-0000-0000-0000-000000000000).
  9085  func (c *ProjectsLocationsServiceClassesPatchCall) RequestId(requestId string) *ProjectsLocationsServiceClassesPatchCall {
  9086  	c.urlParams_.Set("requestId", requestId)
  9087  	return c
  9088  }
  9089  
  9090  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
  9091  // specify the fields to be overwritten in the ServiceClass resource by the
  9092  // update. The fields specified in the update_mask are relative to the
  9093  // resource, not the full request. A field will be overwritten if it is in the
  9094  // mask. If the user does not provide a mask then all fields will be
  9095  // overwritten.
  9096  func (c *ProjectsLocationsServiceClassesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceClassesPatchCall {
  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 *ProjectsLocationsServiceClassesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesPatchCall {
  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 *ProjectsLocationsServiceClassesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesPatchCall {
  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 *ProjectsLocationsServiceClassesPatchCall) Header() http.Header {
  9118  	if c.header_ == nil {
  9119  		c.header_ = make(http.Header)
  9120  	}
  9121  	return c.header_
  9122  }
  9123  
  9124  func (c *ProjectsLocationsServiceClassesPatchCall) 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.serviceclass)
  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 "networkconnectivity.projects.locations.serviceClasses.patch" call.
  9147  // Any non-2xx status code is an error. Response headers are in either
  9148  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  9149  // returned at all) in error.(*googleapi.Error).Header. Use
  9150  // googleapi.IsNotModified to check whether the returned error was because
  9151  // http.StatusNotModified was returned.
  9152  func (c *ProjectsLocationsServiceClassesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  9153  	gensupport.SetOptions(c.urlParams_, opts...)
  9154  	res, err := c.doRequest("json")
  9155  	if res != nil && res.StatusCode == http.StatusNotModified {
  9156  		if res.Body != nil {
  9157  			res.Body.Close()
  9158  		}
  9159  		return nil, gensupport.WrapError(&googleapi.Error{
  9160  			Code:   res.StatusCode,
  9161  			Header: res.Header,
  9162  		})
  9163  	}
  9164  	if err != nil {
  9165  		return nil, err
  9166  	}
  9167  	defer googleapi.CloseBody(res)
  9168  	if err := googleapi.CheckResponse(res); err != nil {
  9169  		return nil, gensupport.WrapError(err)
  9170  	}
  9171  	ret := &GoogleLongrunningOperation{
  9172  		ServerResponse: googleapi.ServerResponse{
  9173  			Header:         res.Header,
  9174  			HTTPStatusCode: res.StatusCode,
  9175  		},
  9176  	}
  9177  	target := &ret
  9178  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9179  		return nil, err
  9180  	}
  9181  	return ret, nil
  9182  }
  9183  
  9184  type ProjectsLocationsServiceClassesSetIamPolicyCall struct {
  9185  	s                   *Service
  9186  	resource            string
  9187  	setiampolicyrequest *SetIamPolicyRequest
  9188  	urlParams_          gensupport.URLParams
  9189  	ctx_                context.Context
  9190  	header_             http.Header
  9191  }
  9192  
  9193  // SetIamPolicy: Sets the access control policy on the specified resource.
  9194  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  9195  // and `PERMISSION_DENIED` errors.
  9196  //
  9197  //   - resource: REQUIRED: The resource for which the policy is being specified.
  9198  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  9199  //     for the appropriate value for this field.
  9200  func (r *ProjectsLocationsServiceClassesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceClassesSetIamPolicyCall {
  9201  	c := &ProjectsLocationsServiceClassesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9202  	c.resource = resource
  9203  	c.setiampolicyrequest = setiampolicyrequest
  9204  	return c
  9205  }
  9206  
  9207  // Fields allows partial responses to be retrieved. See
  9208  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9209  // details.
  9210  func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesSetIamPolicyCall {
  9211  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9212  	return c
  9213  }
  9214  
  9215  // Context sets the context to be used in this call's Do method.
  9216  func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesSetIamPolicyCall {
  9217  	c.ctx_ = ctx
  9218  	return c
  9219  }
  9220  
  9221  // Header returns a http.Header that can be modified by the caller to add
  9222  // headers to the request.
  9223  func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Header() http.Header {
  9224  	if c.header_ == nil {
  9225  		c.header_ = make(http.Header)
  9226  	}
  9227  	return c.header_
  9228  }
  9229  
  9230  func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9231  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9232  	var body io.Reader = nil
  9233  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  9234  	if err != nil {
  9235  		return nil, err
  9236  	}
  9237  	c.urlParams_.Set("alt", alt)
  9238  	c.urlParams_.Set("prettyPrint", "false")
  9239  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  9240  	urls += "?" + c.urlParams_.Encode()
  9241  	req, err := http.NewRequest("POST", urls, body)
  9242  	if err != nil {
  9243  		return nil, err
  9244  	}
  9245  	req.Header = reqHeaders
  9246  	googleapi.Expand(req.URL, map[string]string{
  9247  		"resource": c.resource,
  9248  	})
  9249  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9250  }
  9251  
  9252  // Do executes the "networkconnectivity.projects.locations.serviceClasses.setIamPolicy" call.
  9253  // Any non-2xx status code is an error. Response headers are in either
  9254  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9255  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9256  // whether the returned error was because http.StatusNotModified was returned.
  9257  func (c *ProjectsLocationsServiceClassesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9258  	gensupport.SetOptions(c.urlParams_, opts...)
  9259  	res, err := c.doRequest("json")
  9260  	if res != nil && res.StatusCode == http.StatusNotModified {
  9261  		if res.Body != nil {
  9262  			res.Body.Close()
  9263  		}
  9264  		return nil, gensupport.WrapError(&googleapi.Error{
  9265  			Code:   res.StatusCode,
  9266  			Header: res.Header,
  9267  		})
  9268  	}
  9269  	if err != nil {
  9270  		return nil, err
  9271  	}
  9272  	defer googleapi.CloseBody(res)
  9273  	if err := googleapi.CheckResponse(res); err != nil {
  9274  		return nil, gensupport.WrapError(err)
  9275  	}
  9276  	ret := &Policy{
  9277  		ServerResponse: googleapi.ServerResponse{
  9278  			Header:         res.Header,
  9279  			HTTPStatusCode: res.StatusCode,
  9280  		},
  9281  	}
  9282  	target := &ret
  9283  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9284  		return nil, err
  9285  	}
  9286  	return ret, nil
  9287  }
  9288  
  9289  type ProjectsLocationsServiceClassesTestIamPermissionsCall struct {
  9290  	s                         *Service
  9291  	resource                  string
  9292  	testiampermissionsrequest *TestIamPermissionsRequest
  9293  	urlParams_                gensupport.URLParams
  9294  	ctx_                      context.Context
  9295  	header_                   http.Header
  9296  }
  9297  
  9298  // TestIamPermissions: Returns permissions that a caller has on the specified
  9299  // resource. If the resource does not exist, this will return an empty set of
  9300  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  9301  // used for building permission-aware UIs and command-line tools, not for
  9302  // authorization checking. This operation may "fail open" without warning.
  9303  //
  9304  //   - resource: REQUIRED: The resource for which the policy detail is being
  9305  //     requested. See Resource names
  9306  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  9307  //     value for this field.
  9308  func (r *ProjectsLocationsServiceClassesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceClassesTestIamPermissionsCall {
  9309  	c := &ProjectsLocationsServiceClassesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9310  	c.resource = resource
  9311  	c.testiampermissionsrequest = testiampermissionsrequest
  9312  	return c
  9313  }
  9314  
  9315  // Fields allows partial responses to be retrieved. See
  9316  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9317  // details.
  9318  func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceClassesTestIamPermissionsCall {
  9319  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9320  	return c
  9321  }
  9322  
  9323  // Context sets the context to be used in this call's Do method.
  9324  func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceClassesTestIamPermissionsCall {
  9325  	c.ctx_ = ctx
  9326  	return c
  9327  }
  9328  
  9329  // Header returns a http.Header that can be modified by the caller to add
  9330  // headers to the request.
  9331  func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Header() http.Header {
  9332  	if c.header_ == nil {
  9333  		c.header_ = make(http.Header)
  9334  	}
  9335  	return c.header_
  9336  }
  9337  
  9338  func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  9339  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9340  	var body io.Reader = nil
  9341  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  9342  	if err != nil {
  9343  		return nil, err
  9344  	}
  9345  	c.urlParams_.Set("alt", alt)
  9346  	c.urlParams_.Set("prettyPrint", "false")
  9347  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  9348  	urls += "?" + c.urlParams_.Encode()
  9349  	req, err := http.NewRequest("POST", urls, body)
  9350  	if err != nil {
  9351  		return nil, err
  9352  	}
  9353  	req.Header = reqHeaders
  9354  	googleapi.Expand(req.URL, map[string]string{
  9355  		"resource": c.resource,
  9356  	})
  9357  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9358  }
  9359  
  9360  // Do executes the "networkconnectivity.projects.locations.serviceClasses.testIamPermissions" call.
  9361  // Any non-2xx status code is an error. Response headers are in either
  9362  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  9363  // returned at all) in error.(*googleapi.Error).Header. Use
  9364  // googleapi.IsNotModified to check whether the returned error was because
  9365  // http.StatusNotModified was returned.
  9366  func (c *ProjectsLocationsServiceClassesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  9367  	gensupport.SetOptions(c.urlParams_, opts...)
  9368  	res, err := c.doRequest("json")
  9369  	if res != nil && res.StatusCode == http.StatusNotModified {
  9370  		if res.Body != nil {
  9371  			res.Body.Close()
  9372  		}
  9373  		return nil, gensupport.WrapError(&googleapi.Error{
  9374  			Code:   res.StatusCode,
  9375  			Header: res.Header,
  9376  		})
  9377  	}
  9378  	if err != nil {
  9379  		return nil, err
  9380  	}
  9381  	defer googleapi.CloseBody(res)
  9382  	if err := googleapi.CheckResponse(res); err != nil {
  9383  		return nil, gensupport.WrapError(err)
  9384  	}
  9385  	ret := &TestIamPermissionsResponse{
  9386  		ServerResponse: googleapi.ServerResponse{
  9387  			Header:         res.Header,
  9388  			HTTPStatusCode: res.StatusCode,
  9389  		},
  9390  	}
  9391  	target := &ret
  9392  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9393  		return nil, err
  9394  	}
  9395  	return ret, nil
  9396  }
  9397  
  9398  type ProjectsLocationsServiceConnectionMapsCreateCall struct {
  9399  	s                    *Service
  9400  	parent               string
  9401  	serviceconnectionmap *ServiceConnectionMap
  9402  	urlParams_           gensupport.URLParams
  9403  	ctx_                 context.Context
  9404  	header_              http.Header
  9405  }
  9406  
  9407  // Create: Creates a new ServiceConnectionMap in a given project and location.
  9408  //
  9409  //   - parent: The parent resource's name of the ServiceConnectionMap. ex.
  9410  //     projects/123/locations/us-east1.
  9411  func (r *ProjectsLocationsServiceConnectionMapsService) Create(parent string, serviceconnectionmap *ServiceConnectionMap) *ProjectsLocationsServiceConnectionMapsCreateCall {
  9412  	c := &ProjectsLocationsServiceConnectionMapsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9413  	c.parent = parent
  9414  	c.serviceconnectionmap = serviceconnectionmap
  9415  	return c
  9416  }
  9417  
  9418  // RequestId sets the optional parameter "requestId": An optional request ID to
  9419  // identify requests. Specify a unique request ID so that if you must retry
  9420  // your request, the server will know to ignore the request if it has already
  9421  // been completed. The server will guarantee that for at least 60 minutes since
  9422  // the first request. For example, consider a situation where you make an
  9423  // initial request and the request times out. If you make the request again
  9424  // with the same request ID, the server can check if original operation with
  9425  // the same request ID was received, and if so, will ignore the second request.
  9426  // This prevents clients from accidentally creating duplicate commitments. The
  9427  // request ID must be a valid UUID with the exception that zero UUID is not
  9428  // supported (00000000-0000-0000-0000-000000000000).
  9429  func (c *ProjectsLocationsServiceConnectionMapsCreateCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionMapsCreateCall {
  9430  	c.urlParams_.Set("requestId", requestId)
  9431  	return c
  9432  }
  9433  
  9434  // ServiceConnectionMapId sets the optional parameter "serviceConnectionMapId":
  9435  // Resource ID (i.e. 'foo' in
  9436  // '[...]/projects/p/locations/l/serviceConnectionMaps/foo') See
  9437  // https://google.aip.dev/122#resource-id-segments Unique per location. If one
  9438  // is not provided, one will be generated.
  9439  func (c *ProjectsLocationsServiceConnectionMapsCreateCall) ServiceConnectionMapId(serviceConnectionMapId string) *ProjectsLocationsServiceConnectionMapsCreateCall {
  9440  	c.urlParams_.Set("serviceConnectionMapId", serviceConnectionMapId)
  9441  	return c
  9442  }
  9443  
  9444  // Fields allows partial responses to be retrieved. See
  9445  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9446  // details.
  9447  func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsCreateCall {
  9448  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9449  	return c
  9450  }
  9451  
  9452  // Context sets the context to be used in this call's Do method.
  9453  func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsCreateCall {
  9454  	c.ctx_ = ctx
  9455  	return c
  9456  }
  9457  
  9458  // Header returns a http.Header that can be modified by the caller to add
  9459  // headers to the request.
  9460  func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Header() http.Header {
  9461  	if c.header_ == nil {
  9462  		c.header_ = make(http.Header)
  9463  	}
  9464  	return c.header_
  9465  }
  9466  
  9467  func (c *ProjectsLocationsServiceConnectionMapsCreateCall) doRequest(alt string) (*http.Response, error) {
  9468  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  9469  	var body io.Reader = nil
  9470  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceconnectionmap)
  9471  	if err != nil {
  9472  		return nil, err
  9473  	}
  9474  	c.urlParams_.Set("alt", alt)
  9475  	c.urlParams_.Set("prettyPrint", "false")
  9476  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceConnectionMaps")
  9477  	urls += "?" + c.urlParams_.Encode()
  9478  	req, err := http.NewRequest("POST", urls, body)
  9479  	if err != nil {
  9480  		return nil, err
  9481  	}
  9482  	req.Header = reqHeaders
  9483  	googleapi.Expand(req.URL, map[string]string{
  9484  		"parent": c.parent,
  9485  	})
  9486  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9487  }
  9488  
  9489  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.create" call.
  9490  // Any non-2xx status code is an error. Response headers are in either
  9491  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  9492  // returned at all) in error.(*googleapi.Error).Header. Use
  9493  // googleapi.IsNotModified to check whether the returned error was because
  9494  // http.StatusNotModified was returned.
  9495  func (c *ProjectsLocationsServiceConnectionMapsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  9496  	gensupport.SetOptions(c.urlParams_, opts...)
  9497  	res, err := c.doRequest("json")
  9498  	if res != nil && res.StatusCode == http.StatusNotModified {
  9499  		if res.Body != nil {
  9500  			res.Body.Close()
  9501  		}
  9502  		return nil, gensupport.WrapError(&googleapi.Error{
  9503  			Code:   res.StatusCode,
  9504  			Header: res.Header,
  9505  		})
  9506  	}
  9507  	if err != nil {
  9508  		return nil, err
  9509  	}
  9510  	defer googleapi.CloseBody(res)
  9511  	if err := googleapi.CheckResponse(res); err != nil {
  9512  		return nil, gensupport.WrapError(err)
  9513  	}
  9514  	ret := &GoogleLongrunningOperation{
  9515  		ServerResponse: googleapi.ServerResponse{
  9516  			Header:         res.Header,
  9517  			HTTPStatusCode: res.StatusCode,
  9518  		},
  9519  	}
  9520  	target := &ret
  9521  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9522  		return nil, err
  9523  	}
  9524  	return ret, nil
  9525  }
  9526  
  9527  type ProjectsLocationsServiceConnectionMapsDeleteCall struct {
  9528  	s          *Service
  9529  	name       string
  9530  	urlParams_ gensupport.URLParams
  9531  	ctx_       context.Context
  9532  	header_    http.Header
  9533  }
  9534  
  9535  // Delete: Deletes a single ServiceConnectionMap.
  9536  //
  9537  // - name: The name of the ServiceConnectionMap to delete.
  9538  func (r *ProjectsLocationsServiceConnectionMapsService) Delete(name string) *ProjectsLocationsServiceConnectionMapsDeleteCall {
  9539  	c := &ProjectsLocationsServiceConnectionMapsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9540  	c.name = name
  9541  	return c
  9542  }
  9543  
  9544  // Etag sets the optional parameter "etag": The etag is computed by the server,
  9545  // and may be sent on update and delete requests to ensure the client has an
  9546  // up-to-date value before proceeding.
  9547  func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) Etag(etag string) *ProjectsLocationsServiceConnectionMapsDeleteCall {
  9548  	c.urlParams_.Set("etag", etag)
  9549  	return c
  9550  }
  9551  
  9552  // RequestId sets the optional parameter "requestId": An optional request ID to
  9553  // identify requests. Specify a unique request ID so that if you must retry
  9554  // your request, the server will know to ignore the request if it has already
  9555  // been completed. The server will guarantee that for at least 60 minutes after
  9556  // the first request. For example, consider a situation where you make an
  9557  // initial request and the request times out. If you make the request again
  9558  // with the same request ID, the server can check if original operation with
  9559  // the same request ID was received, and if so, will ignore the second request.
  9560  // This prevents clients from accidentally creating duplicate commitments. The
  9561  // request ID must be a valid UUID with the exception that zero UUID is not
  9562  // supported (00000000-0000-0000-0000-000000000000).
  9563  func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionMapsDeleteCall {
  9564  	c.urlParams_.Set("requestId", requestId)
  9565  	return c
  9566  }
  9567  
  9568  // Fields allows partial responses to be retrieved. See
  9569  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9570  // details.
  9571  func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsDeleteCall {
  9572  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9573  	return c
  9574  }
  9575  
  9576  // Context sets the context to be used in this call's Do method.
  9577  func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsDeleteCall {
  9578  	c.ctx_ = ctx
  9579  	return c
  9580  }
  9581  
  9582  // Header returns a http.Header that can be modified by the caller to add
  9583  // headers to the request.
  9584  func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) Header() http.Header {
  9585  	if c.header_ == nil {
  9586  		c.header_ = make(http.Header)
  9587  	}
  9588  	return c.header_
  9589  }
  9590  
  9591  func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) doRequest(alt string) (*http.Response, error) {
  9592  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9593  	var body io.Reader = nil
  9594  	c.urlParams_.Set("alt", alt)
  9595  	c.urlParams_.Set("prettyPrint", "false")
  9596  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9597  	urls += "?" + c.urlParams_.Encode()
  9598  	req, err := http.NewRequest("DELETE", urls, body)
  9599  	if err != nil {
  9600  		return nil, err
  9601  	}
  9602  	req.Header = reqHeaders
  9603  	googleapi.Expand(req.URL, map[string]string{
  9604  		"name": c.name,
  9605  	})
  9606  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9607  }
  9608  
  9609  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.delete" call.
  9610  // Any non-2xx status code is an error. Response headers are in either
  9611  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
  9612  // returned at all) in error.(*googleapi.Error).Header. Use
  9613  // googleapi.IsNotModified to check whether the returned error was because
  9614  // http.StatusNotModified was returned.
  9615  func (c *ProjectsLocationsServiceConnectionMapsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
  9616  	gensupport.SetOptions(c.urlParams_, opts...)
  9617  	res, err := c.doRequest("json")
  9618  	if res != nil && res.StatusCode == http.StatusNotModified {
  9619  		if res.Body != nil {
  9620  			res.Body.Close()
  9621  		}
  9622  		return nil, gensupport.WrapError(&googleapi.Error{
  9623  			Code:   res.StatusCode,
  9624  			Header: res.Header,
  9625  		})
  9626  	}
  9627  	if err != nil {
  9628  		return nil, err
  9629  	}
  9630  	defer googleapi.CloseBody(res)
  9631  	if err := googleapi.CheckResponse(res); err != nil {
  9632  		return nil, gensupport.WrapError(err)
  9633  	}
  9634  	ret := &GoogleLongrunningOperation{
  9635  		ServerResponse: googleapi.ServerResponse{
  9636  			Header:         res.Header,
  9637  			HTTPStatusCode: res.StatusCode,
  9638  		},
  9639  	}
  9640  	target := &ret
  9641  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9642  		return nil, err
  9643  	}
  9644  	return ret, nil
  9645  }
  9646  
  9647  type ProjectsLocationsServiceConnectionMapsGetCall struct {
  9648  	s            *Service
  9649  	name         string
  9650  	urlParams_   gensupport.URLParams
  9651  	ifNoneMatch_ string
  9652  	ctx_         context.Context
  9653  	header_      http.Header
  9654  }
  9655  
  9656  // Get: Gets details of a single ServiceConnectionMap.
  9657  //
  9658  // - name: Name of the ServiceConnectionMap to get.
  9659  func (r *ProjectsLocationsServiceConnectionMapsService) Get(name string) *ProjectsLocationsServiceConnectionMapsGetCall {
  9660  	c := &ProjectsLocationsServiceConnectionMapsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9661  	c.name = name
  9662  	return c
  9663  }
  9664  
  9665  // Fields allows partial responses to be retrieved. See
  9666  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9667  // details.
  9668  func (c *ProjectsLocationsServiceConnectionMapsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsGetCall {
  9669  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9670  	return c
  9671  }
  9672  
  9673  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9674  // object's ETag matches the given value. This is useful for getting updates
  9675  // only after the object has changed since the last request.
  9676  func (c *ProjectsLocationsServiceConnectionMapsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsGetCall {
  9677  	c.ifNoneMatch_ = entityTag
  9678  	return c
  9679  }
  9680  
  9681  // Context sets the context to be used in this call's Do method.
  9682  func (c *ProjectsLocationsServiceConnectionMapsGetCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsGetCall {
  9683  	c.ctx_ = ctx
  9684  	return c
  9685  }
  9686  
  9687  // Header returns a http.Header that can be modified by the caller to add
  9688  // headers to the request.
  9689  func (c *ProjectsLocationsServiceConnectionMapsGetCall) Header() http.Header {
  9690  	if c.header_ == nil {
  9691  		c.header_ = make(http.Header)
  9692  	}
  9693  	return c.header_
  9694  }
  9695  
  9696  func (c *ProjectsLocationsServiceConnectionMapsGetCall) doRequest(alt string) (*http.Response, error) {
  9697  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9698  	if c.ifNoneMatch_ != "" {
  9699  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9700  	}
  9701  	var body io.Reader = nil
  9702  	c.urlParams_.Set("alt", alt)
  9703  	c.urlParams_.Set("prettyPrint", "false")
  9704  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  9705  	urls += "?" + c.urlParams_.Encode()
  9706  	req, err := http.NewRequest("GET", urls, body)
  9707  	if err != nil {
  9708  		return nil, err
  9709  	}
  9710  	req.Header = reqHeaders
  9711  	googleapi.Expand(req.URL, map[string]string{
  9712  		"name": c.name,
  9713  	})
  9714  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9715  }
  9716  
  9717  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.get" call.
  9718  // Any non-2xx status code is an error. Response headers are in either
  9719  // *ServiceConnectionMap.ServerResponse.Header or (if a response was returned
  9720  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9721  // check whether the returned error was because http.StatusNotModified was
  9722  // returned.
  9723  func (c *ProjectsLocationsServiceConnectionMapsGetCall) Do(opts ...googleapi.CallOption) (*ServiceConnectionMap, error) {
  9724  	gensupport.SetOptions(c.urlParams_, opts...)
  9725  	res, err := c.doRequest("json")
  9726  	if res != nil && res.StatusCode == http.StatusNotModified {
  9727  		if res.Body != nil {
  9728  			res.Body.Close()
  9729  		}
  9730  		return nil, gensupport.WrapError(&googleapi.Error{
  9731  			Code:   res.StatusCode,
  9732  			Header: res.Header,
  9733  		})
  9734  	}
  9735  	if err != nil {
  9736  		return nil, err
  9737  	}
  9738  	defer googleapi.CloseBody(res)
  9739  	if err := googleapi.CheckResponse(res); err != nil {
  9740  		return nil, gensupport.WrapError(err)
  9741  	}
  9742  	ret := &ServiceConnectionMap{
  9743  		ServerResponse: googleapi.ServerResponse{
  9744  			Header:         res.Header,
  9745  			HTTPStatusCode: res.StatusCode,
  9746  		},
  9747  	}
  9748  	target := &ret
  9749  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9750  		return nil, err
  9751  	}
  9752  	return ret, nil
  9753  }
  9754  
  9755  type ProjectsLocationsServiceConnectionMapsGetIamPolicyCall struct {
  9756  	s            *Service
  9757  	resource     string
  9758  	urlParams_   gensupport.URLParams
  9759  	ifNoneMatch_ string
  9760  	ctx_         context.Context
  9761  	header_      http.Header
  9762  }
  9763  
  9764  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  9765  // empty policy if the resource exists and does not have a policy set.
  9766  //
  9767  //   - resource: REQUIRED: The resource for which the policy is being requested.
  9768  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  9769  //     for the appropriate value for this field.
  9770  func (r *ProjectsLocationsServiceConnectionMapsService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall {
  9771  	c := &ProjectsLocationsServiceConnectionMapsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9772  	c.resource = resource
  9773  	return c
  9774  }
  9775  
  9776  // OptionsRequestedPolicyVersion sets the optional parameter
  9777  // "options.requestedPolicyVersion": The maximum policy version that will be
  9778  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
  9779  // an invalid value will be rejected. Requests for policies with any
  9780  // conditional role bindings must specify version 3. Policies with no
  9781  // conditional role bindings may specify any valid value or leave the field
  9782  // unset. The policy in the response might use the policy version that you
  9783  // specified, or it might use a lower policy version. For example, if you
  9784  // specify version 3, but the policy has no conditional role bindings, the
  9785  // response uses version 1. To learn which resources support conditions in
  9786  // their IAM policies, see the IAM documentation
  9787  // (https://cloud.google.com/iam/help/conditions/resource-policies).
  9788  func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall {
  9789  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
  9790  	return c
  9791  }
  9792  
  9793  // Fields allows partial responses to be retrieved. See
  9794  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9795  // details.
  9796  func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall {
  9797  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9798  	return c
  9799  }
  9800  
  9801  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9802  // object's ETag matches the given value. This is useful for getting updates
  9803  // only after the object has changed since the last request.
  9804  func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall {
  9805  	c.ifNoneMatch_ = entityTag
  9806  	return c
  9807  }
  9808  
  9809  // Context sets the context to be used in this call's Do method.
  9810  func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall {
  9811  	c.ctx_ = ctx
  9812  	return c
  9813  }
  9814  
  9815  // Header returns a http.Header that can be modified by the caller to add
  9816  // headers to the request.
  9817  func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Header() http.Header {
  9818  	if c.header_ == nil {
  9819  		c.header_ = make(http.Header)
  9820  	}
  9821  	return c.header_
  9822  }
  9823  
  9824  func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  9825  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9826  	if c.ifNoneMatch_ != "" {
  9827  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9828  	}
  9829  	var body io.Reader = nil
  9830  	c.urlParams_.Set("alt", alt)
  9831  	c.urlParams_.Set("prettyPrint", "false")
  9832  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  9833  	urls += "?" + c.urlParams_.Encode()
  9834  	req, err := http.NewRequest("GET", urls, body)
  9835  	if err != nil {
  9836  		return nil, err
  9837  	}
  9838  	req.Header = reqHeaders
  9839  	googleapi.Expand(req.URL, map[string]string{
  9840  		"resource": c.resource,
  9841  	})
  9842  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9843  }
  9844  
  9845  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy" call.
  9846  // Any non-2xx status code is an error. Response headers are in either
  9847  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  9848  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9849  // whether the returned error was because http.StatusNotModified was returned.
  9850  func (c *ProjectsLocationsServiceConnectionMapsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  9851  	gensupport.SetOptions(c.urlParams_, opts...)
  9852  	res, err := c.doRequest("json")
  9853  	if res != nil && res.StatusCode == http.StatusNotModified {
  9854  		if res.Body != nil {
  9855  			res.Body.Close()
  9856  		}
  9857  		return nil, gensupport.WrapError(&googleapi.Error{
  9858  			Code:   res.StatusCode,
  9859  			Header: res.Header,
  9860  		})
  9861  	}
  9862  	if err != nil {
  9863  		return nil, err
  9864  	}
  9865  	defer googleapi.CloseBody(res)
  9866  	if err := googleapi.CheckResponse(res); err != nil {
  9867  		return nil, gensupport.WrapError(err)
  9868  	}
  9869  	ret := &Policy{
  9870  		ServerResponse: googleapi.ServerResponse{
  9871  			Header:         res.Header,
  9872  			HTTPStatusCode: res.StatusCode,
  9873  		},
  9874  	}
  9875  	target := &ret
  9876  	if err := gensupport.DecodeResponse(target, res); err != nil {
  9877  		return nil, err
  9878  	}
  9879  	return ret, nil
  9880  }
  9881  
  9882  type ProjectsLocationsServiceConnectionMapsListCall struct {
  9883  	s            *Service
  9884  	parent       string
  9885  	urlParams_   gensupport.URLParams
  9886  	ifNoneMatch_ string
  9887  	ctx_         context.Context
  9888  	header_      http.Header
  9889  }
  9890  
  9891  // List: Lists ServiceConnectionMaps in a given project and location.
  9892  //
  9893  // - parent: The parent resource's name. ex. projects/123/locations/us-east1.
  9894  func (r *ProjectsLocationsServiceConnectionMapsService) List(parent string) *ProjectsLocationsServiceConnectionMapsListCall {
  9895  	c := &ProjectsLocationsServiceConnectionMapsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9896  	c.parent = parent
  9897  	return c
  9898  }
  9899  
  9900  // Filter sets the optional parameter "filter": A filter expression that
  9901  // filters the results listed in the response.
  9902  func (c *ProjectsLocationsServiceConnectionMapsListCall) Filter(filter string) *ProjectsLocationsServiceConnectionMapsListCall {
  9903  	c.urlParams_.Set("filter", filter)
  9904  	return c
  9905  }
  9906  
  9907  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
  9908  // order.
  9909  func (c *ProjectsLocationsServiceConnectionMapsListCall) OrderBy(orderBy string) *ProjectsLocationsServiceConnectionMapsListCall {
  9910  	c.urlParams_.Set("orderBy", orderBy)
  9911  	return c
  9912  }
  9913  
  9914  // PageSize sets the optional parameter "pageSize": The maximum number of
  9915  // results per page that should be returned.
  9916  func (c *ProjectsLocationsServiceConnectionMapsListCall) PageSize(pageSize int64) *ProjectsLocationsServiceConnectionMapsListCall {
  9917  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9918  	return c
  9919  }
  9920  
  9921  // PageToken sets the optional parameter "pageToken": The page token.
  9922  func (c *ProjectsLocationsServiceConnectionMapsListCall) PageToken(pageToken string) *ProjectsLocationsServiceConnectionMapsListCall {
  9923  	c.urlParams_.Set("pageToken", pageToken)
  9924  	return c
  9925  }
  9926  
  9927  // Fields allows partial responses to be retrieved. See
  9928  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  9929  // details.
  9930  func (c *ProjectsLocationsServiceConnectionMapsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsListCall {
  9931  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9932  	return c
  9933  }
  9934  
  9935  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  9936  // object's ETag matches the given value. This is useful for getting updates
  9937  // only after the object has changed since the last request.
  9938  func (c *ProjectsLocationsServiceConnectionMapsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionMapsListCall {
  9939  	c.ifNoneMatch_ = entityTag
  9940  	return c
  9941  }
  9942  
  9943  // Context sets the context to be used in this call's Do method.
  9944  func (c *ProjectsLocationsServiceConnectionMapsListCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsListCall {
  9945  	c.ctx_ = ctx
  9946  	return c
  9947  }
  9948  
  9949  // Header returns a http.Header that can be modified by the caller to add
  9950  // headers to the request.
  9951  func (c *ProjectsLocationsServiceConnectionMapsListCall) Header() http.Header {
  9952  	if c.header_ == nil {
  9953  		c.header_ = make(http.Header)
  9954  	}
  9955  	return c.header_
  9956  }
  9957  
  9958  func (c *ProjectsLocationsServiceConnectionMapsListCall) doRequest(alt string) (*http.Response, error) {
  9959  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  9960  	if c.ifNoneMatch_ != "" {
  9961  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9962  	}
  9963  	var body io.Reader = nil
  9964  	c.urlParams_.Set("alt", alt)
  9965  	c.urlParams_.Set("prettyPrint", "false")
  9966  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceConnectionMaps")
  9967  	urls += "?" + c.urlParams_.Encode()
  9968  	req, err := http.NewRequest("GET", urls, body)
  9969  	if err != nil {
  9970  		return nil, err
  9971  	}
  9972  	req.Header = reqHeaders
  9973  	googleapi.Expand(req.URL, map[string]string{
  9974  		"parent": c.parent,
  9975  	})
  9976  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9977  }
  9978  
  9979  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.list" call.
  9980  // Any non-2xx status code is an error. Response headers are in either
  9981  // *ListServiceConnectionMapsResponse.ServerResponse.Header or (if a response
  9982  // was returned at all) in error.(*googleapi.Error).Header. Use
  9983  // googleapi.IsNotModified to check whether the returned error was because
  9984  // http.StatusNotModified was returned.
  9985  func (c *ProjectsLocationsServiceConnectionMapsListCall) Do(opts ...googleapi.CallOption) (*ListServiceConnectionMapsResponse, error) {
  9986  	gensupport.SetOptions(c.urlParams_, opts...)
  9987  	res, err := c.doRequest("json")
  9988  	if res != nil && res.StatusCode == http.StatusNotModified {
  9989  		if res.Body != nil {
  9990  			res.Body.Close()
  9991  		}
  9992  		return nil, gensupport.WrapError(&googleapi.Error{
  9993  			Code:   res.StatusCode,
  9994  			Header: res.Header,
  9995  		})
  9996  	}
  9997  	if err != nil {
  9998  		return nil, err
  9999  	}
 10000  	defer googleapi.CloseBody(res)
 10001  	if err := googleapi.CheckResponse(res); err != nil {
 10002  		return nil, gensupport.WrapError(err)
 10003  	}
 10004  	ret := &ListServiceConnectionMapsResponse{
 10005  		ServerResponse: googleapi.ServerResponse{
 10006  			Header:         res.Header,
 10007  			HTTPStatusCode: res.StatusCode,
 10008  		},
 10009  	}
 10010  	target := &ret
 10011  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10012  		return nil, err
 10013  	}
 10014  	return ret, nil
 10015  }
 10016  
 10017  // Pages invokes f for each page of results.
 10018  // A non-nil error returned from f will halt the iteration.
 10019  // The provided context supersedes any context provided to the Context method.
 10020  func (c *ProjectsLocationsServiceConnectionMapsListCall) Pages(ctx context.Context, f func(*ListServiceConnectionMapsResponse) error) error {
 10021  	c.ctx_ = ctx
 10022  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 10023  	for {
 10024  		x, err := c.Do()
 10025  		if err != nil {
 10026  			return err
 10027  		}
 10028  		if err := f(x); err != nil {
 10029  			return err
 10030  		}
 10031  		if x.NextPageToken == "" {
 10032  			return nil
 10033  		}
 10034  		c.PageToken(x.NextPageToken)
 10035  	}
 10036  }
 10037  
 10038  type ProjectsLocationsServiceConnectionMapsPatchCall struct {
 10039  	s                    *Service
 10040  	name                 string
 10041  	serviceconnectionmap *ServiceConnectionMap
 10042  	urlParams_           gensupport.URLParams
 10043  	ctx_                 context.Context
 10044  	header_              http.Header
 10045  }
 10046  
 10047  // Patch: Updates the parameters of a single ServiceConnectionMap.
 10048  //
 10049  //   - name: Immutable. The name of a ServiceConnectionMap. Format:
 10050  //     projects/{project}/locations/{location}/serviceConnectionMaps/{service_conn
 10051  //     ection_map} See:
 10052  //     https://google.aip.dev/122#fields-representing-resource-names.
 10053  func (r *ProjectsLocationsServiceConnectionMapsService) Patch(name string, serviceconnectionmap *ServiceConnectionMap) *ProjectsLocationsServiceConnectionMapsPatchCall {
 10054  	c := &ProjectsLocationsServiceConnectionMapsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10055  	c.name = name
 10056  	c.serviceconnectionmap = serviceconnectionmap
 10057  	return c
 10058  }
 10059  
 10060  // RequestId sets the optional parameter "requestId": An optional request ID to
 10061  // identify requests. Specify a unique request ID so that if you must retry
 10062  // your request, the server will know to ignore the request if it has already
 10063  // been completed. The server will guarantee that for at least 60 minutes since
 10064  // the first request. For example, consider a situation where you make an
 10065  // initial request and the request times out. If you make the request again
 10066  // with the same request ID, the server can check if original operation with
 10067  // the same request ID was received, and if so, will ignore the second request.
 10068  // This prevents clients from accidentally creating duplicate commitments. The
 10069  // request ID must be a valid UUID with the exception that zero UUID is not
 10070  // supported (00000000-0000-0000-0000-000000000000).
 10071  func (c *ProjectsLocationsServiceConnectionMapsPatchCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionMapsPatchCall {
 10072  	c.urlParams_.Set("requestId", requestId)
 10073  	return c
 10074  }
 10075  
 10076  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 10077  // specify the fields to be overwritten in the ServiceConnectionMap resource by
 10078  // the update. The fields specified in the update_mask are relative to the
 10079  // resource, not the full request. A field will be overwritten if it is in the
 10080  // mask. If the user does not provide a mask then all fields will be
 10081  // overwritten.
 10082  func (c *ProjectsLocationsServiceConnectionMapsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceConnectionMapsPatchCall {
 10083  	c.urlParams_.Set("updateMask", updateMask)
 10084  	return c
 10085  }
 10086  
 10087  // Fields allows partial responses to be retrieved. See
 10088  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10089  // details.
 10090  func (c *ProjectsLocationsServiceConnectionMapsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsPatchCall {
 10091  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10092  	return c
 10093  }
 10094  
 10095  // Context sets the context to be used in this call's Do method.
 10096  func (c *ProjectsLocationsServiceConnectionMapsPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsPatchCall {
 10097  	c.ctx_ = ctx
 10098  	return c
 10099  }
 10100  
 10101  // Header returns a http.Header that can be modified by the caller to add
 10102  // headers to the request.
 10103  func (c *ProjectsLocationsServiceConnectionMapsPatchCall) Header() http.Header {
 10104  	if c.header_ == nil {
 10105  		c.header_ = make(http.Header)
 10106  	}
 10107  	return c.header_
 10108  }
 10109  
 10110  func (c *ProjectsLocationsServiceConnectionMapsPatchCall) doRequest(alt string) (*http.Response, error) {
 10111  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10112  	var body io.Reader = nil
 10113  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceconnectionmap)
 10114  	if err != nil {
 10115  		return nil, err
 10116  	}
 10117  	c.urlParams_.Set("alt", alt)
 10118  	c.urlParams_.Set("prettyPrint", "false")
 10119  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10120  	urls += "?" + c.urlParams_.Encode()
 10121  	req, err := http.NewRequest("PATCH", urls, body)
 10122  	if err != nil {
 10123  		return nil, err
 10124  	}
 10125  	req.Header = reqHeaders
 10126  	googleapi.Expand(req.URL, map[string]string{
 10127  		"name": c.name,
 10128  	})
 10129  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10130  }
 10131  
 10132  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.patch" call.
 10133  // Any non-2xx status code is an error. Response headers are in either
 10134  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 10135  // returned at all) in error.(*googleapi.Error).Header. Use
 10136  // googleapi.IsNotModified to check whether the returned error was because
 10137  // http.StatusNotModified was returned.
 10138  func (c *ProjectsLocationsServiceConnectionMapsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 10139  	gensupport.SetOptions(c.urlParams_, opts...)
 10140  	res, err := c.doRequest("json")
 10141  	if res != nil && res.StatusCode == http.StatusNotModified {
 10142  		if res.Body != nil {
 10143  			res.Body.Close()
 10144  		}
 10145  		return nil, gensupport.WrapError(&googleapi.Error{
 10146  			Code:   res.StatusCode,
 10147  			Header: res.Header,
 10148  		})
 10149  	}
 10150  	if err != nil {
 10151  		return nil, err
 10152  	}
 10153  	defer googleapi.CloseBody(res)
 10154  	if err := googleapi.CheckResponse(res); err != nil {
 10155  		return nil, gensupport.WrapError(err)
 10156  	}
 10157  	ret := &GoogleLongrunningOperation{
 10158  		ServerResponse: googleapi.ServerResponse{
 10159  			Header:         res.Header,
 10160  			HTTPStatusCode: res.StatusCode,
 10161  		},
 10162  	}
 10163  	target := &ret
 10164  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10165  		return nil, err
 10166  	}
 10167  	return ret, nil
 10168  }
 10169  
 10170  type ProjectsLocationsServiceConnectionMapsSetIamPolicyCall struct {
 10171  	s                   *Service
 10172  	resource            string
 10173  	setiampolicyrequest *SetIamPolicyRequest
 10174  	urlParams_          gensupport.URLParams
 10175  	ctx_                context.Context
 10176  	header_             http.Header
 10177  }
 10178  
 10179  // SetIamPolicy: Sets the access control policy on the specified resource.
 10180  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 10181  // and `PERMISSION_DENIED` errors.
 10182  //
 10183  //   - resource: REQUIRED: The resource for which the policy is being specified.
 10184  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 10185  //     for the appropriate value for this field.
 10186  func (r *ProjectsLocationsServiceConnectionMapsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall {
 10187  	c := &ProjectsLocationsServiceConnectionMapsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10188  	c.resource = resource
 10189  	c.setiampolicyrequest = setiampolicyrequest
 10190  	return c
 10191  }
 10192  
 10193  // Fields allows partial responses to be retrieved. See
 10194  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10195  // details.
 10196  func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall {
 10197  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10198  	return c
 10199  }
 10200  
 10201  // Context sets the context to be used in this call's Do method.
 10202  func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall {
 10203  	c.ctx_ = ctx
 10204  	return c
 10205  }
 10206  
 10207  // Header returns a http.Header that can be modified by the caller to add
 10208  // headers to the request.
 10209  func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Header() http.Header {
 10210  	if c.header_ == nil {
 10211  		c.header_ = make(http.Header)
 10212  	}
 10213  	return c.header_
 10214  }
 10215  
 10216  func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 10217  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10218  	var body io.Reader = nil
 10219  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 10220  	if err != nil {
 10221  		return nil, err
 10222  	}
 10223  	c.urlParams_.Set("alt", alt)
 10224  	c.urlParams_.Set("prettyPrint", "false")
 10225  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 10226  	urls += "?" + c.urlParams_.Encode()
 10227  	req, err := http.NewRequest("POST", urls, body)
 10228  	if err != nil {
 10229  		return nil, err
 10230  	}
 10231  	req.Header = reqHeaders
 10232  	googleapi.Expand(req.URL, map[string]string{
 10233  		"resource": c.resource,
 10234  	})
 10235  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10236  }
 10237  
 10238  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy" call.
 10239  // Any non-2xx status code is an error. Response headers are in either
 10240  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 10241  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10242  // whether the returned error was because http.StatusNotModified was returned.
 10243  func (c *ProjectsLocationsServiceConnectionMapsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 10244  	gensupport.SetOptions(c.urlParams_, opts...)
 10245  	res, err := c.doRequest("json")
 10246  	if res != nil && res.StatusCode == http.StatusNotModified {
 10247  		if res.Body != nil {
 10248  			res.Body.Close()
 10249  		}
 10250  		return nil, gensupport.WrapError(&googleapi.Error{
 10251  			Code:   res.StatusCode,
 10252  			Header: res.Header,
 10253  		})
 10254  	}
 10255  	if err != nil {
 10256  		return nil, err
 10257  	}
 10258  	defer googleapi.CloseBody(res)
 10259  	if err := googleapi.CheckResponse(res); err != nil {
 10260  		return nil, gensupport.WrapError(err)
 10261  	}
 10262  	ret := &Policy{
 10263  		ServerResponse: googleapi.ServerResponse{
 10264  			Header:         res.Header,
 10265  			HTTPStatusCode: res.StatusCode,
 10266  		},
 10267  	}
 10268  	target := &ret
 10269  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10270  		return nil, err
 10271  	}
 10272  	return ret, nil
 10273  }
 10274  
 10275  type ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall struct {
 10276  	s                         *Service
 10277  	resource                  string
 10278  	testiampermissionsrequest *TestIamPermissionsRequest
 10279  	urlParams_                gensupport.URLParams
 10280  	ctx_                      context.Context
 10281  	header_                   http.Header
 10282  }
 10283  
 10284  // TestIamPermissions: Returns permissions that a caller has on the specified
 10285  // resource. If the resource does not exist, this will return an empty set of
 10286  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 10287  // used for building permission-aware UIs and command-line tools, not for
 10288  // authorization checking. This operation may "fail open" without warning.
 10289  //
 10290  //   - resource: REQUIRED: The resource for which the policy detail is being
 10291  //     requested. See Resource names
 10292  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 10293  //     value for this field.
 10294  func (r *ProjectsLocationsServiceConnectionMapsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall {
 10295  	c := &ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10296  	c.resource = resource
 10297  	c.testiampermissionsrequest = testiampermissionsrequest
 10298  	return c
 10299  }
 10300  
 10301  // Fields allows partial responses to be retrieved. See
 10302  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10303  // details.
 10304  func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall {
 10305  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10306  	return c
 10307  }
 10308  
 10309  // Context sets the context to be used in this call's Do method.
 10310  func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall {
 10311  	c.ctx_ = ctx
 10312  	return c
 10313  }
 10314  
 10315  // Header returns a http.Header that can be modified by the caller to add
 10316  // headers to the request.
 10317  func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Header() http.Header {
 10318  	if c.header_ == nil {
 10319  		c.header_ = make(http.Header)
 10320  	}
 10321  	return c.header_
 10322  }
 10323  
 10324  func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 10325  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10326  	var body io.Reader = nil
 10327  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 10328  	if err != nil {
 10329  		return nil, err
 10330  	}
 10331  	c.urlParams_.Set("alt", alt)
 10332  	c.urlParams_.Set("prettyPrint", "false")
 10333  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 10334  	urls += "?" + c.urlParams_.Encode()
 10335  	req, err := http.NewRequest("POST", urls, body)
 10336  	if err != nil {
 10337  		return nil, err
 10338  	}
 10339  	req.Header = reqHeaders
 10340  	googleapi.Expand(req.URL, map[string]string{
 10341  		"resource": c.resource,
 10342  	})
 10343  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10344  }
 10345  
 10346  // Do executes the "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions" call.
 10347  // Any non-2xx status code is an error. Response headers are in either
 10348  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 10349  // returned at all) in error.(*googleapi.Error).Header. Use
 10350  // googleapi.IsNotModified to check whether the returned error was because
 10351  // http.StatusNotModified was returned.
 10352  func (c *ProjectsLocationsServiceConnectionMapsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 10353  	gensupport.SetOptions(c.urlParams_, opts...)
 10354  	res, err := c.doRequest("json")
 10355  	if res != nil && res.StatusCode == http.StatusNotModified {
 10356  		if res.Body != nil {
 10357  			res.Body.Close()
 10358  		}
 10359  		return nil, gensupport.WrapError(&googleapi.Error{
 10360  			Code:   res.StatusCode,
 10361  			Header: res.Header,
 10362  		})
 10363  	}
 10364  	if err != nil {
 10365  		return nil, err
 10366  	}
 10367  	defer googleapi.CloseBody(res)
 10368  	if err := googleapi.CheckResponse(res); err != nil {
 10369  		return nil, gensupport.WrapError(err)
 10370  	}
 10371  	ret := &TestIamPermissionsResponse{
 10372  		ServerResponse: googleapi.ServerResponse{
 10373  			Header:         res.Header,
 10374  			HTTPStatusCode: res.StatusCode,
 10375  		},
 10376  	}
 10377  	target := &ret
 10378  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10379  		return nil, err
 10380  	}
 10381  	return ret, nil
 10382  }
 10383  
 10384  type ProjectsLocationsServiceConnectionPoliciesCreateCall struct {
 10385  	s                       *Service
 10386  	parent                  string
 10387  	serviceconnectionpolicy *ServiceConnectionPolicy
 10388  	urlParams_              gensupport.URLParams
 10389  	ctx_                    context.Context
 10390  	header_                 http.Header
 10391  }
 10392  
 10393  // Create: Creates a new ServiceConnectionPolicy in a given project and
 10394  // location.
 10395  //
 10396  //   - parent: The parent resource's name of the ServiceConnectionPolicy. ex.
 10397  //     projects/123/locations/us-east1.
 10398  func (r *ProjectsLocationsServiceConnectionPoliciesService) Create(parent string, serviceconnectionpolicy *ServiceConnectionPolicy) *ProjectsLocationsServiceConnectionPoliciesCreateCall {
 10399  	c := &ProjectsLocationsServiceConnectionPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10400  	c.parent = parent
 10401  	c.serviceconnectionpolicy = serviceconnectionpolicy
 10402  	return c
 10403  }
 10404  
 10405  // RequestId sets the optional parameter "requestId": An optional request ID to
 10406  // identify requests. Specify a unique request ID so that if you must retry
 10407  // your request, the server will know to ignore the request if it has already
 10408  // been completed. The server will guarantee that for at least 60 minutes since
 10409  // the first request. For example, consider a situation where you make an
 10410  // initial request and the request times out. If you make the request again
 10411  // with the same request ID, the server can check if original operation with
 10412  // the same request ID was received, and if so, will ignore the second request.
 10413  // This prevents clients from accidentally creating duplicate commitments. The
 10414  // request ID must be a valid UUID with the exception that zero UUID is not
 10415  // supported (00000000-0000-0000-0000-000000000000).
 10416  func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionPoliciesCreateCall {
 10417  	c.urlParams_.Set("requestId", requestId)
 10418  	return c
 10419  }
 10420  
 10421  // ServiceConnectionPolicyId sets the optional parameter
 10422  // "serviceConnectionPolicyId": Resource ID (i.e. 'foo' in
 10423  // '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See
 10424  // https://google.aip.dev/122#resource-id-segments Unique per location.
 10425  func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) ServiceConnectionPolicyId(serviceConnectionPolicyId string) *ProjectsLocationsServiceConnectionPoliciesCreateCall {
 10426  	c.urlParams_.Set("serviceConnectionPolicyId", serviceConnectionPolicyId)
 10427  	return c
 10428  }
 10429  
 10430  // Fields allows partial responses to be retrieved. See
 10431  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10432  // details.
 10433  func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesCreateCall {
 10434  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10435  	return c
 10436  }
 10437  
 10438  // Context sets the context to be used in this call's Do method.
 10439  func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesCreateCall {
 10440  	c.ctx_ = ctx
 10441  	return c
 10442  }
 10443  
 10444  // Header returns a http.Header that can be modified by the caller to add
 10445  // headers to the request.
 10446  func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) Header() http.Header {
 10447  	if c.header_ == nil {
 10448  		c.header_ = make(http.Header)
 10449  	}
 10450  	return c.header_
 10451  }
 10452  
 10453  func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
 10454  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 10455  	var body io.Reader = nil
 10456  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceconnectionpolicy)
 10457  	if err != nil {
 10458  		return nil, err
 10459  	}
 10460  	c.urlParams_.Set("alt", alt)
 10461  	c.urlParams_.Set("prettyPrint", "false")
 10462  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceConnectionPolicies")
 10463  	urls += "?" + c.urlParams_.Encode()
 10464  	req, err := http.NewRequest("POST", urls, body)
 10465  	if err != nil {
 10466  		return nil, err
 10467  	}
 10468  	req.Header = reqHeaders
 10469  	googleapi.Expand(req.URL, map[string]string{
 10470  		"parent": c.parent,
 10471  	})
 10472  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10473  }
 10474  
 10475  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.create" call.
 10476  // Any non-2xx status code is an error. Response headers are in either
 10477  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 10478  // returned at all) in error.(*googleapi.Error).Header. Use
 10479  // googleapi.IsNotModified to check whether the returned error was because
 10480  // http.StatusNotModified was returned.
 10481  func (c *ProjectsLocationsServiceConnectionPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 10482  	gensupport.SetOptions(c.urlParams_, opts...)
 10483  	res, err := c.doRequest("json")
 10484  	if res != nil && res.StatusCode == http.StatusNotModified {
 10485  		if res.Body != nil {
 10486  			res.Body.Close()
 10487  		}
 10488  		return nil, gensupport.WrapError(&googleapi.Error{
 10489  			Code:   res.StatusCode,
 10490  			Header: res.Header,
 10491  		})
 10492  	}
 10493  	if err != nil {
 10494  		return nil, err
 10495  	}
 10496  	defer googleapi.CloseBody(res)
 10497  	if err := googleapi.CheckResponse(res); err != nil {
 10498  		return nil, gensupport.WrapError(err)
 10499  	}
 10500  	ret := &GoogleLongrunningOperation{
 10501  		ServerResponse: googleapi.ServerResponse{
 10502  			Header:         res.Header,
 10503  			HTTPStatusCode: res.StatusCode,
 10504  		},
 10505  	}
 10506  	target := &ret
 10507  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10508  		return nil, err
 10509  	}
 10510  	return ret, nil
 10511  }
 10512  
 10513  type ProjectsLocationsServiceConnectionPoliciesDeleteCall struct {
 10514  	s          *Service
 10515  	name       string
 10516  	urlParams_ gensupport.URLParams
 10517  	ctx_       context.Context
 10518  	header_    http.Header
 10519  }
 10520  
 10521  // Delete: Deletes a single ServiceConnectionPolicy.
 10522  //
 10523  // - name: The name of the ServiceConnectionPolicy to delete.
 10524  func (r *ProjectsLocationsServiceConnectionPoliciesService) Delete(name string) *ProjectsLocationsServiceConnectionPoliciesDeleteCall {
 10525  	c := &ProjectsLocationsServiceConnectionPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10526  	c.name = name
 10527  	return c
 10528  }
 10529  
 10530  // Etag sets the optional parameter "etag": The etag is computed by the server,
 10531  // and may be sent on update and delete requests to ensure the client has an
 10532  // up-to-date value before proceeding.
 10533  func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Etag(etag string) *ProjectsLocationsServiceConnectionPoliciesDeleteCall {
 10534  	c.urlParams_.Set("etag", etag)
 10535  	return c
 10536  }
 10537  
 10538  // RequestId sets the optional parameter "requestId": An optional request ID to
 10539  // identify requests. Specify a unique request ID so that if you must retry
 10540  // your request, the server will know to ignore the request if it has already
 10541  // been completed. The server will guarantee that for at least 60 minutes after
 10542  // the first request. For example, consider a situation where you make an
 10543  // initial request and the request times out. If you make the request again
 10544  // with the same request ID, the server can check if original operation with
 10545  // the same request ID was received, and if so, will ignore the second request.
 10546  // This prevents clients from accidentally creating duplicate commitments. The
 10547  // request ID must be a valid UUID with the exception that zero UUID is not
 10548  // supported (00000000-0000-0000-0000-000000000000).
 10549  func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionPoliciesDeleteCall {
 10550  	c.urlParams_.Set("requestId", requestId)
 10551  	return c
 10552  }
 10553  
 10554  // Fields allows partial responses to be retrieved. See
 10555  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10556  // details.
 10557  func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesDeleteCall {
 10558  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10559  	return c
 10560  }
 10561  
 10562  // Context sets the context to be used in this call's Do method.
 10563  func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesDeleteCall {
 10564  	c.ctx_ = ctx
 10565  	return c
 10566  }
 10567  
 10568  // Header returns a http.Header that can be modified by the caller to add
 10569  // headers to the request.
 10570  func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Header() http.Header {
 10571  	if c.header_ == nil {
 10572  		c.header_ = make(http.Header)
 10573  	}
 10574  	return c.header_
 10575  }
 10576  
 10577  func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
 10578  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10579  	var body io.Reader = nil
 10580  	c.urlParams_.Set("alt", alt)
 10581  	c.urlParams_.Set("prettyPrint", "false")
 10582  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10583  	urls += "?" + c.urlParams_.Encode()
 10584  	req, err := http.NewRequest("DELETE", urls, body)
 10585  	if err != nil {
 10586  		return nil, err
 10587  	}
 10588  	req.Header = reqHeaders
 10589  	googleapi.Expand(req.URL, map[string]string{
 10590  		"name": c.name,
 10591  	})
 10592  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10593  }
 10594  
 10595  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.delete" call.
 10596  // Any non-2xx status code is an error. Response headers are in either
 10597  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 10598  // returned at all) in error.(*googleapi.Error).Header. Use
 10599  // googleapi.IsNotModified to check whether the returned error was because
 10600  // http.StatusNotModified was returned.
 10601  func (c *ProjectsLocationsServiceConnectionPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 10602  	gensupport.SetOptions(c.urlParams_, opts...)
 10603  	res, err := c.doRequest("json")
 10604  	if res != nil && res.StatusCode == http.StatusNotModified {
 10605  		if res.Body != nil {
 10606  			res.Body.Close()
 10607  		}
 10608  		return nil, gensupport.WrapError(&googleapi.Error{
 10609  			Code:   res.StatusCode,
 10610  			Header: res.Header,
 10611  		})
 10612  	}
 10613  	if err != nil {
 10614  		return nil, err
 10615  	}
 10616  	defer googleapi.CloseBody(res)
 10617  	if err := googleapi.CheckResponse(res); err != nil {
 10618  		return nil, gensupport.WrapError(err)
 10619  	}
 10620  	ret := &GoogleLongrunningOperation{
 10621  		ServerResponse: googleapi.ServerResponse{
 10622  			Header:         res.Header,
 10623  			HTTPStatusCode: res.StatusCode,
 10624  		},
 10625  	}
 10626  	target := &ret
 10627  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10628  		return nil, err
 10629  	}
 10630  	return ret, nil
 10631  }
 10632  
 10633  type ProjectsLocationsServiceConnectionPoliciesGetCall struct {
 10634  	s            *Service
 10635  	name         string
 10636  	urlParams_   gensupport.URLParams
 10637  	ifNoneMatch_ string
 10638  	ctx_         context.Context
 10639  	header_      http.Header
 10640  }
 10641  
 10642  // Get: Gets details of a single ServiceConnectionPolicy.
 10643  //
 10644  // - name: Name of the ServiceConnectionPolicy to get.
 10645  func (r *ProjectsLocationsServiceConnectionPoliciesService) Get(name string) *ProjectsLocationsServiceConnectionPoliciesGetCall {
 10646  	c := &ProjectsLocationsServiceConnectionPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10647  	c.name = name
 10648  	return c
 10649  }
 10650  
 10651  // Fields allows partial responses to be retrieved. See
 10652  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10653  // details.
 10654  func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesGetCall {
 10655  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10656  	return c
 10657  }
 10658  
 10659  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10660  // object's ETag matches the given value. This is useful for getting updates
 10661  // only after the object has changed since the last request.
 10662  func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesGetCall {
 10663  	c.ifNoneMatch_ = entityTag
 10664  	return c
 10665  }
 10666  
 10667  // Context sets the context to be used in this call's Do method.
 10668  func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesGetCall {
 10669  	c.ctx_ = ctx
 10670  	return c
 10671  }
 10672  
 10673  // Header returns a http.Header that can be modified by the caller to add
 10674  // headers to the request.
 10675  func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) Header() http.Header {
 10676  	if c.header_ == nil {
 10677  		c.header_ = make(http.Header)
 10678  	}
 10679  	return c.header_
 10680  }
 10681  
 10682  func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
 10683  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10684  	if c.ifNoneMatch_ != "" {
 10685  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10686  	}
 10687  	var body io.Reader = nil
 10688  	c.urlParams_.Set("alt", alt)
 10689  	c.urlParams_.Set("prettyPrint", "false")
 10690  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 10691  	urls += "?" + c.urlParams_.Encode()
 10692  	req, err := http.NewRequest("GET", urls, body)
 10693  	if err != nil {
 10694  		return nil, err
 10695  	}
 10696  	req.Header = reqHeaders
 10697  	googleapi.Expand(req.URL, map[string]string{
 10698  		"name": c.name,
 10699  	})
 10700  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10701  }
 10702  
 10703  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.get" call.
 10704  // Any non-2xx status code is an error. Response headers are in either
 10705  // *ServiceConnectionPolicy.ServerResponse.Header or (if a response was
 10706  // returned at all) in error.(*googleapi.Error).Header. Use
 10707  // googleapi.IsNotModified to check whether the returned error was because
 10708  // http.StatusNotModified was returned.
 10709  func (c *ProjectsLocationsServiceConnectionPoliciesGetCall) Do(opts ...googleapi.CallOption) (*ServiceConnectionPolicy, error) {
 10710  	gensupport.SetOptions(c.urlParams_, opts...)
 10711  	res, err := c.doRequest("json")
 10712  	if res != nil && res.StatusCode == http.StatusNotModified {
 10713  		if res.Body != nil {
 10714  			res.Body.Close()
 10715  		}
 10716  		return nil, gensupport.WrapError(&googleapi.Error{
 10717  			Code:   res.StatusCode,
 10718  			Header: res.Header,
 10719  		})
 10720  	}
 10721  	if err != nil {
 10722  		return nil, err
 10723  	}
 10724  	defer googleapi.CloseBody(res)
 10725  	if err := googleapi.CheckResponse(res); err != nil {
 10726  		return nil, gensupport.WrapError(err)
 10727  	}
 10728  	ret := &ServiceConnectionPolicy{
 10729  		ServerResponse: googleapi.ServerResponse{
 10730  			Header:         res.Header,
 10731  			HTTPStatusCode: res.StatusCode,
 10732  		},
 10733  	}
 10734  	target := &ret
 10735  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10736  		return nil, err
 10737  	}
 10738  	return ret, nil
 10739  }
 10740  
 10741  type ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall struct {
 10742  	s            *Service
 10743  	resource     string
 10744  	urlParams_   gensupport.URLParams
 10745  	ifNoneMatch_ string
 10746  	ctx_         context.Context
 10747  	header_      http.Header
 10748  }
 10749  
 10750  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 10751  // empty policy if the resource exists and does not have a policy set.
 10752  //
 10753  //   - resource: REQUIRED: The resource for which the policy is being requested.
 10754  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 10755  //     for the appropriate value for this field.
 10756  func (r *ProjectsLocationsServiceConnectionPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall {
 10757  	c := &ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10758  	c.resource = resource
 10759  	return c
 10760  }
 10761  
 10762  // OptionsRequestedPolicyVersion sets the optional parameter
 10763  // "options.requestedPolicyVersion": The maximum policy version that will be
 10764  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 10765  // an invalid value will be rejected. Requests for policies with any
 10766  // conditional role bindings must specify version 3. Policies with no
 10767  // conditional role bindings may specify any valid value or leave the field
 10768  // unset. The policy in the response might use the policy version that you
 10769  // specified, or it might use a lower policy version. For example, if you
 10770  // specify version 3, but the policy has no conditional role bindings, the
 10771  // response uses version 1. To learn which resources support conditions in
 10772  // their IAM policies, see the IAM documentation
 10773  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 10774  func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall {
 10775  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 10776  	return c
 10777  }
 10778  
 10779  // Fields allows partial responses to be retrieved. See
 10780  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10781  // details.
 10782  func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall {
 10783  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10784  	return c
 10785  }
 10786  
 10787  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10788  // object's ETag matches the given value. This is useful for getting updates
 10789  // only after the object has changed since the last request.
 10790  func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall {
 10791  	c.ifNoneMatch_ = entityTag
 10792  	return c
 10793  }
 10794  
 10795  // Context sets the context to be used in this call's Do method.
 10796  func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall {
 10797  	c.ctx_ = ctx
 10798  	return c
 10799  }
 10800  
 10801  // Header returns a http.Header that can be modified by the caller to add
 10802  // headers to the request.
 10803  func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Header() http.Header {
 10804  	if c.header_ == nil {
 10805  		c.header_ = make(http.Header)
 10806  	}
 10807  	return c.header_
 10808  }
 10809  
 10810  func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 10811  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10812  	if c.ifNoneMatch_ != "" {
 10813  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10814  	}
 10815  	var body io.Reader = nil
 10816  	c.urlParams_.Set("alt", alt)
 10817  	c.urlParams_.Set("prettyPrint", "false")
 10818  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 10819  	urls += "?" + c.urlParams_.Encode()
 10820  	req, err := http.NewRequest("GET", urls, body)
 10821  	if err != nil {
 10822  		return nil, err
 10823  	}
 10824  	req.Header = reqHeaders
 10825  	googleapi.Expand(req.URL, map[string]string{
 10826  		"resource": c.resource,
 10827  	})
 10828  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10829  }
 10830  
 10831  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy" call.
 10832  // Any non-2xx status code is an error. Response headers are in either
 10833  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 10834  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 10835  // whether the returned error was because http.StatusNotModified was returned.
 10836  func (c *ProjectsLocationsServiceConnectionPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 10837  	gensupport.SetOptions(c.urlParams_, opts...)
 10838  	res, err := c.doRequest("json")
 10839  	if res != nil && res.StatusCode == http.StatusNotModified {
 10840  		if res.Body != nil {
 10841  			res.Body.Close()
 10842  		}
 10843  		return nil, gensupport.WrapError(&googleapi.Error{
 10844  			Code:   res.StatusCode,
 10845  			Header: res.Header,
 10846  		})
 10847  	}
 10848  	if err != nil {
 10849  		return nil, err
 10850  	}
 10851  	defer googleapi.CloseBody(res)
 10852  	if err := googleapi.CheckResponse(res); err != nil {
 10853  		return nil, gensupport.WrapError(err)
 10854  	}
 10855  	ret := &Policy{
 10856  		ServerResponse: googleapi.ServerResponse{
 10857  			Header:         res.Header,
 10858  			HTTPStatusCode: res.StatusCode,
 10859  		},
 10860  	}
 10861  	target := &ret
 10862  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10863  		return nil, err
 10864  	}
 10865  	return ret, nil
 10866  }
 10867  
 10868  type ProjectsLocationsServiceConnectionPoliciesListCall struct {
 10869  	s            *Service
 10870  	parent       string
 10871  	urlParams_   gensupport.URLParams
 10872  	ifNoneMatch_ string
 10873  	ctx_         context.Context
 10874  	header_      http.Header
 10875  }
 10876  
 10877  // List: Lists ServiceConnectionPolicies in a given project and location.
 10878  //
 10879  // - parent: The parent resource's name. ex. projects/123/locations/us-east1.
 10880  func (r *ProjectsLocationsServiceConnectionPoliciesService) List(parent string) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10881  	c := &ProjectsLocationsServiceConnectionPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 10882  	c.parent = parent
 10883  	return c
 10884  }
 10885  
 10886  // Filter sets the optional parameter "filter": A filter expression that
 10887  // filters the results listed in the response.
 10888  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Filter(filter string) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10889  	c.urlParams_.Set("filter", filter)
 10890  	return c
 10891  }
 10892  
 10893  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
 10894  // order.
 10895  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) OrderBy(orderBy string) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10896  	c.urlParams_.Set("orderBy", orderBy)
 10897  	return c
 10898  }
 10899  
 10900  // PageSize sets the optional parameter "pageSize": The maximum number of
 10901  // results per page that should be returned.
 10902  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10903  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 10904  	return c
 10905  }
 10906  
 10907  // PageToken sets the optional parameter "pageToken": The page token.
 10908  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10909  	c.urlParams_.Set("pageToken", pageToken)
 10910  	return c
 10911  }
 10912  
 10913  // Fields allows partial responses to be retrieved. See
 10914  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 10915  // details.
 10916  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10917  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 10918  	return c
 10919  }
 10920  
 10921  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 10922  // object's ETag matches the given value. This is useful for getting updates
 10923  // only after the object has changed since the last request.
 10924  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10925  	c.ifNoneMatch_ = entityTag
 10926  	return c
 10927  }
 10928  
 10929  // Context sets the context to be used in this call's Do method.
 10930  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesListCall {
 10931  	c.ctx_ = ctx
 10932  	return c
 10933  }
 10934  
 10935  // Header returns a http.Header that can be modified by the caller to add
 10936  // headers to the request.
 10937  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Header() http.Header {
 10938  	if c.header_ == nil {
 10939  		c.header_ = make(http.Header)
 10940  	}
 10941  	return c.header_
 10942  }
 10943  
 10944  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) doRequest(alt string) (*http.Response, error) {
 10945  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 10946  	if c.ifNoneMatch_ != "" {
 10947  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 10948  	}
 10949  	var body io.Reader = nil
 10950  	c.urlParams_.Set("alt", alt)
 10951  	c.urlParams_.Set("prettyPrint", "false")
 10952  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceConnectionPolicies")
 10953  	urls += "?" + c.urlParams_.Encode()
 10954  	req, err := http.NewRequest("GET", urls, body)
 10955  	if err != nil {
 10956  		return nil, err
 10957  	}
 10958  	req.Header = reqHeaders
 10959  	googleapi.Expand(req.URL, map[string]string{
 10960  		"parent": c.parent,
 10961  	})
 10962  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 10963  }
 10964  
 10965  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.list" call.
 10966  // Any non-2xx status code is an error. Response headers are in either
 10967  // *ListServiceConnectionPoliciesResponse.ServerResponse.Header or (if a
 10968  // response was returned at all) in error.(*googleapi.Error).Header. Use
 10969  // googleapi.IsNotModified to check whether the returned error was because
 10970  // http.StatusNotModified was returned.
 10971  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListServiceConnectionPoliciesResponse, error) {
 10972  	gensupport.SetOptions(c.urlParams_, opts...)
 10973  	res, err := c.doRequest("json")
 10974  	if res != nil && res.StatusCode == http.StatusNotModified {
 10975  		if res.Body != nil {
 10976  			res.Body.Close()
 10977  		}
 10978  		return nil, gensupport.WrapError(&googleapi.Error{
 10979  			Code:   res.StatusCode,
 10980  			Header: res.Header,
 10981  		})
 10982  	}
 10983  	if err != nil {
 10984  		return nil, err
 10985  	}
 10986  	defer googleapi.CloseBody(res)
 10987  	if err := googleapi.CheckResponse(res); err != nil {
 10988  		return nil, gensupport.WrapError(err)
 10989  	}
 10990  	ret := &ListServiceConnectionPoliciesResponse{
 10991  		ServerResponse: googleapi.ServerResponse{
 10992  			Header:         res.Header,
 10993  			HTTPStatusCode: res.StatusCode,
 10994  		},
 10995  	}
 10996  	target := &ret
 10997  	if err := gensupport.DecodeResponse(target, res); err != nil {
 10998  		return nil, err
 10999  	}
 11000  	return ret, nil
 11001  }
 11002  
 11003  // Pages invokes f for each page of results.
 11004  // A non-nil error returned from f will halt the iteration.
 11005  // The provided context supersedes any context provided to the Context method.
 11006  func (c *ProjectsLocationsServiceConnectionPoliciesListCall) Pages(ctx context.Context, f func(*ListServiceConnectionPoliciesResponse) error) error {
 11007  	c.ctx_ = ctx
 11008  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11009  	for {
 11010  		x, err := c.Do()
 11011  		if err != nil {
 11012  			return err
 11013  		}
 11014  		if err := f(x); err != nil {
 11015  			return err
 11016  		}
 11017  		if x.NextPageToken == "" {
 11018  			return nil
 11019  		}
 11020  		c.PageToken(x.NextPageToken)
 11021  	}
 11022  }
 11023  
 11024  type ProjectsLocationsServiceConnectionPoliciesPatchCall struct {
 11025  	s                       *Service
 11026  	name                    string
 11027  	serviceconnectionpolicy *ServiceConnectionPolicy
 11028  	urlParams_              gensupport.URLParams
 11029  	ctx_                    context.Context
 11030  	header_                 http.Header
 11031  }
 11032  
 11033  // Patch: Updates the parameters of a single ServiceConnectionPolicy.
 11034  //
 11035  //   - name: Immutable. The name of a ServiceConnectionPolicy. Format:
 11036  //     projects/{project}/locations/{location}/serviceConnectionPolicies/{service_
 11037  //     connection_policy} See:
 11038  //     https://google.aip.dev/122#fields-representing-resource-names.
 11039  func (r *ProjectsLocationsServiceConnectionPoliciesService) Patch(name string, serviceconnectionpolicy *ServiceConnectionPolicy) *ProjectsLocationsServiceConnectionPoliciesPatchCall {
 11040  	c := &ProjectsLocationsServiceConnectionPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11041  	c.name = name
 11042  	c.serviceconnectionpolicy = serviceconnectionpolicy
 11043  	return c
 11044  }
 11045  
 11046  // RequestId sets the optional parameter "requestId": An optional request ID to
 11047  // identify requests. Specify a unique request ID so that if you must retry
 11048  // your request, the server will know to ignore the request if it has already
 11049  // been completed. The server will guarantee that for at least 60 minutes since
 11050  // the first request. For example, consider a situation where you make an
 11051  // initial request and the request times out. If you make the request again
 11052  // with the same request ID, the server can check if original operation with
 11053  // the same request ID was received, and if so, will ignore the second request.
 11054  // This prevents clients from accidentally creating duplicate commitments. The
 11055  // request ID must be a valid UUID with the exception that zero UUID is not
 11056  // supported (00000000-0000-0000-0000-000000000000).
 11057  func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionPoliciesPatchCall {
 11058  	c.urlParams_.Set("requestId", requestId)
 11059  	return c
 11060  }
 11061  
 11062  // UpdateMask sets the optional parameter "updateMask": Field mask is used to
 11063  // specify the fields to be overwritten in the ServiceConnectionPolicy resource
 11064  // by the update. The fields specified in the update_mask are relative to the
 11065  // resource, not the full request. A field will be overwritten if it is in the
 11066  // mask. If the user does not provide a mask then all fields will be
 11067  // overwritten.
 11068  func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServiceConnectionPoliciesPatchCall {
 11069  	c.urlParams_.Set("updateMask", updateMask)
 11070  	return c
 11071  }
 11072  
 11073  // Fields allows partial responses to be retrieved. See
 11074  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11075  // details.
 11076  func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesPatchCall {
 11077  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11078  	return c
 11079  }
 11080  
 11081  // Context sets the context to be used in this call's Do method.
 11082  func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesPatchCall {
 11083  	c.ctx_ = ctx
 11084  	return c
 11085  }
 11086  
 11087  // Header returns a http.Header that can be modified by the caller to add
 11088  // headers to the request.
 11089  func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) Header() http.Header {
 11090  	if c.header_ == nil {
 11091  		c.header_ = make(http.Header)
 11092  	}
 11093  	return c.header_
 11094  }
 11095  
 11096  func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) doRequest(alt string) (*http.Response, error) {
 11097  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11098  	var body io.Reader = nil
 11099  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceconnectionpolicy)
 11100  	if err != nil {
 11101  		return nil, err
 11102  	}
 11103  	c.urlParams_.Set("alt", alt)
 11104  	c.urlParams_.Set("prettyPrint", "false")
 11105  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11106  	urls += "?" + c.urlParams_.Encode()
 11107  	req, err := http.NewRequest("PATCH", urls, body)
 11108  	if err != nil {
 11109  		return nil, err
 11110  	}
 11111  	req.Header = reqHeaders
 11112  	googleapi.Expand(req.URL, map[string]string{
 11113  		"name": c.name,
 11114  	})
 11115  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11116  }
 11117  
 11118  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.patch" call.
 11119  // Any non-2xx status code is an error. Response headers are in either
 11120  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11121  // returned at all) in error.(*googleapi.Error).Header. Use
 11122  // googleapi.IsNotModified to check whether the returned error was because
 11123  // http.StatusNotModified was returned.
 11124  func (c *ProjectsLocationsServiceConnectionPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11125  	gensupport.SetOptions(c.urlParams_, opts...)
 11126  	res, err := c.doRequest("json")
 11127  	if res != nil && res.StatusCode == http.StatusNotModified {
 11128  		if res.Body != nil {
 11129  			res.Body.Close()
 11130  		}
 11131  		return nil, gensupport.WrapError(&googleapi.Error{
 11132  			Code:   res.StatusCode,
 11133  			Header: res.Header,
 11134  		})
 11135  	}
 11136  	if err != nil {
 11137  		return nil, err
 11138  	}
 11139  	defer googleapi.CloseBody(res)
 11140  	if err := googleapi.CheckResponse(res); err != nil {
 11141  		return nil, gensupport.WrapError(err)
 11142  	}
 11143  	ret := &GoogleLongrunningOperation{
 11144  		ServerResponse: googleapi.ServerResponse{
 11145  			Header:         res.Header,
 11146  			HTTPStatusCode: res.StatusCode,
 11147  		},
 11148  	}
 11149  	target := &ret
 11150  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11151  		return nil, err
 11152  	}
 11153  	return ret, nil
 11154  }
 11155  
 11156  type ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall struct {
 11157  	s                   *Service
 11158  	resource            string
 11159  	setiampolicyrequest *SetIamPolicyRequest
 11160  	urlParams_          gensupport.URLParams
 11161  	ctx_                context.Context
 11162  	header_             http.Header
 11163  }
 11164  
 11165  // SetIamPolicy: Sets the access control policy on the specified resource.
 11166  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 11167  // and `PERMISSION_DENIED` errors.
 11168  //
 11169  //   - resource: REQUIRED: The resource for which the policy is being specified.
 11170  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 11171  //     for the appropriate value for this field.
 11172  func (r *ProjectsLocationsServiceConnectionPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall {
 11173  	c := &ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11174  	c.resource = resource
 11175  	c.setiampolicyrequest = setiampolicyrequest
 11176  	return c
 11177  }
 11178  
 11179  // Fields allows partial responses to be retrieved. See
 11180  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11181  // details.
 11182  func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall {
 11183  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11184  	return c
 11185  }
 11186  
 11187  // Context sets the context to be used in this call's Do method.
 11188  func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall {
 11189  	c.ctx_ = ctx
 11190  	return c
 11191  }
 11192  
 11193  // Header returns a http.Header that can be modified by the caller to add
 11194  // headers to the request.
 11195  func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Header() http.Header {
 11196  	if c.header_ == nil {
 11197  		c.header_ = make(http.Header)
 11198  	}
 11199  	return c.header_
 11200  }
 11201  
 11202  func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 11203  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11204  	var body io.Reader = nil
 11205  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 11206  	if err != nil {
 11207  		return nil, err
 11208  	}
 11209  	c.urlParams_.Set("alt", alt)
 11210  	c.urlParams_.Set("prettyPrint", "false")
 11211  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 11212  	urls += "?" + c.urlParams_.Encode()
 11213  	req, err := http.NewRequest("POST", urls, body)
 11214  	if err != nil {
 11215  		return nil, err
 11216  	}
 11217  	req.Header = reqHeaders
 11218  	googleapi.Expand(req.URL, map[string]string{
 11219  		"resource": c.resource,
 11220  	})
 11221  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11222  }
 11223  
 11224  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy" call.
 11225  // Any non-2xx status code is an error. Response headers are in either
 11226  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 11227  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 11228  // whether the returned error was because http.StatusNotModified was returned.
 11229  func (c *ProjectsLocationsServiceConnectionPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 11230  	gensupport.SetOptions(c.urlParams_, opts...)
 11231  	res, err := c.doRequest("json")
 11232  	if res != nil && res.StatusCode == http.StatusNotModified {
 11233  		if res.Body != nil {
 11234  			res.Body.Close()
 11235  		}
 11236  		return nil, gensupport.WrapError(&googleapi.Error{
 11237  			Code:   res.StatusCode,
 11238  			Header: res.Header,
 11239  		})
 11240  	}
 11241  	if err != nil {
 11242  		return nil, err
 11243  	}
 11244  	defer googleapi.CloseBody(res)
 11245  	if err := googleapi.CheckResponse(res); err != nil {
 11246  		return nil, gensupport.WrapError(err)
 11247  	}
 11248  	ret := &Policy{
 11249  		ServerResponse: googleapi.ServerResponse{
 11250  			Header:         res.Header,
 11251  			HTTPStatusCode: res.StatusCode,
 11252  		},
 11253  	}
 11254  	target := &ret
 11255  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11256  		return nil, err
 11257  	}
 11258  	return ret, nil
 11259  }
 11260  
 11261  type ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall struct {
 11262  	s                         *Service
 11263  	resource                  string
 11264  	testiampermissionsrequest *TestIamPermissionsRequest
 11265  	urlParams_                gensupport.URLParams
 11266  	ctx_                      context.Context
 11267  	header_                   http.Header
 11268  }
 11269  
 11270  // TestIamPermissions: Returns permissions that a caller has on the specified
 11271  // resource. If the resource does not exist, this will return an empty set of
 11272  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 11273  // used for building permission-aware UIs and command-line tools, not for
 11274  // authorization checking. This operation may "fail open" without warning.
 11275  //
 11276  //   - resource: REQUIRED: The resource for which the policy detail is being
 11277  //     requested. See Resource names
 11278  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 11279  //     value for this field.
 11280  func (r *ProjectsLocationsServiceConnectionPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall {
 11281  	c := &ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11282  	c.resource = resource
 11283  	c.testiampermissionsrequest = testiampermissionsrequest
 11284  	return c
 11285  }
 11286  
 11287  // Fields allows partial responses to be retrieved. See
 11288  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11289  // details.
 11290  func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall {
 11291  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11292  	return c
 11293  }
 11294  
 11295  // Context sets the context to be used in this call's Do method.
 11296  func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall {
 11297  	c.ctx_ = ctx
 11298  	return c
 11299  }
 11300  
 11301  // Header returns a http.Header that can be modified by the caller to add
 11302  // headers to the request.
 11303  func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Header() http.Header {
 11304  	if c.header_ == nil {
 11305  		c.header_ = make(http.Header)
 11306  	}
 11307  	return c.header_
 11308  }
 11309  
 11310  func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 11311  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11312  	var body io.Reader = nil
 11313  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 11314  	if err != nil {
 11315  		return nil, err
 11316  	}
 11317  	c.urlParams_.Set("alt", alt)
 11318  	c.urlParams_.Set("prettyPrint", "false")
 11319  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 11320  	urls += "?" + c.urlParams_.Encode()
 11321  	req, err := http.NewRequest("POST", urls, body)
 11322  	if err != nil {
 11323  		return nil, err
 11324  	}
 11325  	req.Header = reqHeaders
 11326  	googleapi.Expand(req.URL, map[string]string{
 11327  		"resource": c.resource,
 11328  	})
 11329  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11330  }
 11331  
 11332  // Do executes the "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions" call.
 11333  // Any non-2xx status code is an error. Response headers are in either
 11334  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 11335  // returned at all) in error.(*googleapi.Error).Header. Use
 11336  // googleapi.IsNotModified to check whether the returned error was because
 11337  // http.StatusNotModified was returned.
 11338  func (c *ProjectsLocationsServiceConnectionPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 11339  	gensupport.SetOptions(c.urlParams_, opts...)
 11340  	res, err := c.doRequest("json")
 11341  	if res != nil && res.StatusCode == http.StatusNotModified {
 11342  		if res.Body != nil {
 11343  			res.Body.Close()
 11344  		}
 11345  		return nil, gensupport.WrapError(&googleapi.Error{
 11346  			Code:   res.StatusCode,
 11347  			Header: res.Header,
 11348  		})
 11349  	}
 11350  	if err != nil {
 11351  		return nil, err
 11352  	}
 11353  	defer googleapi.CloseBody(res)
 11354  	if err := googleapi.CheckResponse(res); err != nil {
 11355  		return nil, gensupport.WrapError(err)
 11356  	}
 11357  	ret := &TestIamPermissionsResponse{
 11358  		ServerResponse: googleapi.ServerResponse{
 11359  			Header:         res.Header,
 11360  			HTTPStatusCode: res.StatusCode,
 11361  		},
 11362  	}
 11363  	target := &ret
 11364  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11365  		return nil, err
 11366  	}
 11367  	return ret, nil
 11368  }
 11369  
 11370  type ProjectsLocationsServiceConnectionTokensCreateCall struct {
 11371  	s                      *Service
 11372  	parent                 string
 11373  	serviceconnectiontoken *ServiceConnectionToken
 11374  	urlParams_             gensupport.URLParams
 11375  	ctx_                   context.Context
 11376  	header_                http.Header
 11377  }
 11378  
 11379  // Create: Creates a new ServiceConnectionToken in a given project and
 11380  // location.
 11381  //
 11382  //   - parent: The parent resource's name of the ServiceConnectionToken. ex.
 11383  //     projects/123/locations/us-east1.
 11384  func (r *ProjectsLocationsServiceConnectionTokensService) Create(parent string, serviceconnectiontoken *ServiceConnectionToken) *ProjectsLocationsServiceConnectionTokensCreateCall {
 11385  	c := &ProjectsLocationsServiceConnectionTokensCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11386  	c.parent = parent
 11387  	c.serviceconnectiontoken = serviceconnectiontoken
 11388  	return c
 11389  }
 11390  
 11391  // RequestId sets the optional parameter "requestId": An optional request ID to
 11392  // identify requests. Specify a unique request ID so that if you must retry
 11393  // your request, the server will know to ignore the request if it has already
 11394  // been completed. The server will guarantee that for at least 60 minutes since
 11395  // the first request. For example, consider a situation where you make an
 11396  // initial request and the request times out. If you make the request again
 11397  // with the same request ID, the server can check if original operation with
 11398  // the same request ID was received, and if so, will ignore the second request.
 11399  // This prevents clients from accidentally creating duplicate commitments. The
 11400  // request ID must be a valid UUID with the exception that zero UUID is not
 11401  // supported (00000000-0000-0000-0000-000000000000).
 11402  func (c *ProjectsLocationsServiceConnectionTokensCreateCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionTokensCreateCall {
 11403  	c.urlParams_.Set("requestId", requestId)
 11404  	return c
 11405  }
 11406  
 11407  // ServiceConnectionTokenId sets the optional parameter
 11408  // "serviceConnectionTokenId": Resource ID (i.e. 'foo' in
 11409  // '[...]/projects/p/locations/l/ServiceConnectionTokens/foo') See
 11410  // https://google.aip.dev/122#resource-id-segments Unique per location. If one
 11411  // is not provided, one will be generated.
 11412  func (c *ProjectsLocationsServiceConnectionTokensCreateCall) ServiceConnectionTokenId(serviceConnectionTokenId string) *ProjectsLocationsServiceConnectionTokensCreateCall {
 11413  	c.urlParams_.Set("serviceConnectionTokenId", serviceConnectionTokenId)
 11414  	return c
 11415  }
 11416  
 11417  // Fields allows partial responses to be retrieved. See
 11418  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11419  // details.
 11420  func (c *ProjectsLocationsServiceConnectionTokensCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensCreateCall {
 11421  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11422  	return c
 11423  }
 11424  
 11425  // Context sets the context to be used in this call's Do method.
 11426  func (c *ProjectsLocationsServiceConnectionTokensCreateCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensCreateCall {
 11427  	c.ctx_ = ctx
 11428  	return c
 11429  }
 11430  
 11431  // Header returns a http.Header that can be modified by the caller to add
 11432  // headers to the request.
 11433  func (c *ProjectsLocationsServiceConnectionTokensCreateCall) Header() http.Header {
 11434  	if c.header_ == nil {
 11435  		c.header_ = make(http.Header)
 11436  	}
 11437  	return c.header_
 11438  }
 11439  
 11440  func (c *ProjectsLocationsServiceConnectionTokensCreateCall) doRequest(alt string) (*http.Response, error) {
 11441  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11442  	var body io.Reader = nil
 11443  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.serviceconnectiontoken)
 11444  	if err != nil {
 11445  		return nil, err
 11446  	}
 11447  	c.urlParams_.Set("alt", alt)
 11448  	c.urlParams_.Set("prettyPrint", "false")
 11449  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceConnectionTokens")
 11450  	urls += "?" + c.urlParams_.Encode()
 11451  	req, err := http.NewRequest("POST", urls, body)
 11452  	if err != nil {
 11453  		return nil, err
 11454  	}
 11455  	req.Header = reqHeaders
 11456  	googleapi.Expand(req.URL, map[string]string{
 11457  		"parent": c.parent,
 11458  	})
 11459  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11460  }
 11461  
 11462  // Do executes the "networkconnectivity.projects.locations.serviceConnectionTokens.create" call.
 11463  // Any non-2xx status code is an error. Response headers are in either
 11464  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11465  // returned at all) in error.(*googleapi.Error).Header. Use
 11466  // googleapi.IsNotModified to check whether the returned error was because
 11467  // http.StatusNotModified was returned.
 11468  func (c *ProjectsLocationsServiceConnectionTokensCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11469  	gensupport.SetOptions(c.urlParams_, opts...)
 11470  	res, err := c.doRequest("json")
 11471  	if res != nil && res.StatusCode == http.StatusNotModified {
 11472  		if res.Body != nil {
 11473  			res.Body.Close()
 11474  		}
 11475  		return nil, gensupport.WrapError(&googleapi.Error{
 11476  			Code:   res.StatusCode,
 11477  			Header: res.Header,
 11478  		})
 11479  	}
 11480  	if err != nil {
 11481  		return nil, err
 11482  	}
 11483  	defer googleapi.CloseBody(res)
 11484  	if err := googleapi.CheckResponse(res); err != nil {
 11485  		return nil, gensupport.WrapError(err)
 11486  	}
 11487  	ret := &GoogleLongrunningOperation{
 11488  		ServerResponse: googleapi.ServerResponse{
 11489  			Header:         res.Header,
 11490  			HTTPStatusCode: res.StatusCode,
 11491  		},
 11492  	}
 11493  	target := &ret
 11494  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11495  		return nil, err
 11496  	}
 11497  	return ret, nil
 11498  }
 11499  
 11500  type ProjectsLocationsServiceConnectionTokensDeleteCall struct {
 11501  	s          *Service
 11502  	name       string
 11503  	urlParams_ gensupport.URLParams
 11504  	ctx_       context.Context
 11505  	header_    http.Header
 11506  }
 11507  
 11508  // Delete: Deletes a single ServiceConnectionToken.
 11509  //
 11510  // - name: The name of the ServiceConnectionToken to delete.
 11511  func (r *ProjectsLocationsServiceConnectionTokensService) Delete(name string) *ProjectsLocationsServiceConnectionTokensDeleteCall {
 11512  	c := &ProjectsLocationsServiceConnectionTokensDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11513  	c.name = name
 11514  	return c
 11515  }
 11516  
 11517  // Etag sets the optional parameter "etag": The etag is computed by the server,
 11518  // and may be sent on update and delete requests to ensure the client has an
 11519  // up-to-date value before proceeding.
 11520  func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) Etag(etag string) *ProjectsLocationsServiceConnectionTokensDeleteCall {
 11521  	c.urlParams_.Set("etag", etag)
 11522  	return c
 11523  }
 11524  
 11525  // RequestId sets the optional parameter "requestId": An optional request ID to
 11526  // identify requests. Specify a unique request ID so that if you must retry
 11527  // your request, the server will know to ignore the request if it has already
 11528  // been completed. The server will guarantee that for at least 60 minutes after
 11529  // the first request. For example, consider a situation where you make an
 11530  // initial request and the request times out. If you make the request again
 11531  // with the same request ID, the server can check if original operation with
 11532  // the same request ID was received, and if so, will ignore the second request.
 11533  // This prevents clients from accidentally creating duplicate commitments. The
 11534  // request ID must be a valid UUID with the exception that zero UUID is not
 11535  // supported (00000000-0000-0000-0000-000000000000).
 11536  func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) RequestId(requestId string) *ProjectsLocationsServiceConnectionTokensDeleteCall {
 11537  	c.urlParams_.Set("requestId", requestId)
 11538  	return c
 11539  }
 11540  
 11541  // Fields allows partial responses to be retrieved. See
 11542  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11543  // details.
 11544  func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensDeleteCall {
 11545  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11546  	return c
 11547  }
 11548  
 11549  // Context sets the context to be used in this call's Do method.
 11550  func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensDeleteCall {
 11551  	c.ctx_ = ctx
 11552  	return c
 11553  }
 11554  
 11555  // Header returns a http.Header that can be modified by the caller to add
 11556  // headers to the request.
 11557  func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) Header() http.Header {
 11558  	if c.header_ == nil {
 11559  		c.header_ = make(http.Header)
 11560  	}
 11561  	return c.header_
 11562  }
 11563  
 11564  func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) doRequest(alt string) (*http.Response, error) {
 11565  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11566  	var body io.Reader = nil
 11567  	c.urlParams_.Set("alt", alt)
 11568  	c.urlParams_.Set("prettyPrint", "false")
 11569  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11570  	urls += "?" + c.urlParams_.Encode()
 11571  	req, err := http.NewRequest("DELETE", urls, body)
 11572  	if err != nil {
 11573  		return nil, err
 11574  	}
 11575  	req.Header = reqHeaders
 11576  	googleapi.Expand(req.URL, map[string]string{
 11577  		"name": c.name,
 11578  	})
 11579  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11580  }
 11581  
 11582  // Do executes the "networkconnectivity.projects.locations.serviceConnectionTokens.delete" call.
 11583  // Any non-2xx status code is an error. Response headers are in either
 11584  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11585  // returned at all) in error.(*googleapi.Error).Header. Use
 11586  // googleapi.IsNotModified to check whether the returned error was because
 11587  // http.StatusNotModified was returned.
 11588  func (c *ProjectsLocationsServiceConnectionTokensDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11589  	gensupport.SetOptions(c.urlParams_, opts...)
 11590  	res, err := c.doRequest("json")
 11591  	if res != nil && res.StatusCode == http.StatusNotModified {
 11592  		if res.Body != nil {
 11593  			res.Body.Close()
 11594  		}
 11595  		return nil, gensupport.WrapError(&googleapi.Error{
 11596  			Code:   res.StatusCode,
 11597  			Header: res.Header,
 11598  		})
 11599  	}
 11600  	if err != nil {
 11601  		return nil, err
 11602  	}
 11603  	defer googleapi.CloseBody(res)
 11604  	if err := googleapi.CheckResponse(res); err != nil {
 11605  		return nil, gensupport.WrapError(err)
 11606  	}
 11607  	ret := &GoogleLongrunningOperation{
 11608  		ServerResponse: googleapi.ServerResponse{
 11609  			Header:         res.Header,
 11610  			HTTPStatusCode: res.StatusCode,
 11611  		},
 11612  	}
 11613  	target := &ret
 11614  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11615  		return nil, err
 11616  	}
 11617  	return ret, nil
 11618  }
 11619  
 11620  type ProjectsLocationsServiceConnectionTokensGetCall struct {
 11621  	s            *Service
 11622  	name         string
 11623  	urlParams_   gensupport.URLParams
 11624  	ifNoneMatch_ string
 11625  	ctx_         context.Context
 11626  	header_      http.Header
 11627  }
 11628  
 11629  // Get: Gets details of a single ServiceConnectionToken.
 11630  //
 11631  // - name: Name of the ServiceConnectionToken to get.
 11632  func (r *ProjectsLocationsServiceConnectionTokensService) Get(name string) *ProjectsLocationsServiceConnectionTokensGetCall {
 11633  	c := &ProjectsLocationsServiceConnectionTokensGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11634  	c.name = name
 11635  	return c
 11636  }
 11637  
 11638  // Fields allows partial responses to be retrieved. See
 11639  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11640  // details.
 11641  func (c *ProjectsLocationsServiceConnectionTokensGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensGetCall {
 11642  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11643  	return c
 11644  }
 11645  
 11646  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11647  // object's ETag matches the given value. This is useful for getting updates
 11648  // only after the object has changed since the last request.
 11649  func (c *ProjectsLocationsServiceConnectionTokensGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionTokensGetCall {
 11650  	c.ifNoneMatch_ = entityTag
 11651  	return c
 11652  }
 11653  
 11654  // Context sets the context to be used in this call's Do method.
 11655  func (c *ProjectsLocationsServiceConnectionTokensGetCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensGetCall {
 11656  	c.ctx_ = ctx
 11657  	return c
 11658  }
 11659  
 11660  // Header returns a http.Header that can be modified by the caller to add
 11661  // headers to the request.
 11662  func (c *ProjectsLocationsServiceConnectionTokensGetCall) Header() http.Header {
 11663  	if c.header_ == nil {
 11664  		c.header_ = make(http.Header)
 11665  	}
 11666  	return c.header_
 11667  }
 11668  
 11669  func (c *ProjectsLocationsServiceConnectionTokensGetCall) doRequest(alt string) (*http.Response, error) {
 11670  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11671  	if c.ifNoneMatch_ != "" {
 11672  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11673  	}
 11674  	var body io.Reader = nil
 11675  	c.urlParams_.Set("alt", alt)
 11676  	c.urlParams_.Set("prettyPrint", "false")
 11677  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 11678  	urls += "?" + c.urlParams_.Encode()
 11679  	req, err := http.NewRequest("GET", urls, body)
 11680  	if err != nil {
 11681  		return nil, err
 11682  	}
 11683  	req.Header = reqHeaders
 11684  	googleapi.Expand(req.URL, map[string]string{
 11685  		"name": c.name,
 11686  	})
 11687  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11688  }
 11689  
 11690  // Do executes the "networkconnectivity.projects.locations.serviceConnectionTokens.get" call.
 11691  // Any non-2xx status code is an error. Response headers are in either
 11692  // *ServiceConnectionToken.ServerResponse.Header or (if a response was returned
 11693  // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 11694  // check whether the returned error was because http.StatusNotModified was
 11695  // returned.
 11696  func (c *ProjectsLocationsServiceConnectionTokensGetCall) Do(opts ...googleapi.CallOption) (*ServiceConnectionToken, error) {
 11697  	gensupport.SetOptions(c.urlParams_, opts...)
 11698  	res, err := c.doRequest("json")
 11699  	if res != nil && res.StatusCode == http.StatusNotModified {
 11700  		if res.Body != nil {
 11701  			res.Body.Close()
 11702  		}
 11703  		return nil, gensupport.WrapError(&googleapi.Error{
 11704  			Code:   res.StatusCode,
 11705  			Header: res.Header,
 11706  		})
 11707  	}
 11708  	if err != nil {
 11709  		return nil, err
 11710  	}
 11711  	defer googleapi.CloseBody(res)
 11712  	if err := googleapi.CheckResponse(res); err != nil {
 11713  		return nil, gensupport.WrapError(err)
 11714  	}
 11715  	ret := &ServiceConnectionToken{
 11716  		ServerResponse: googleapi.ServerResponse{
 11717  			Header:         res.Header,
 11718  			HTTPStatusCode: res.StatusCode,
 11719  		},
 11720  	}
 11721  	target := &ret
 11722  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11723  		return nil, err
 11724  	}
 11725  	return ret, nil
 11726  }
 11727  
 11728  type ProjectsLocationsServiceConnectionTokensListCall struct {
 11729  	s            *Service
 11730  	parent       string
 11731  	urlParams_   gensupport.URLParams
 11732  	ifNoneMatch_ string
 11733  	ctx_         context.Context
 11734  	header_      http.Header
 11735  }
 11736  
 11737  // List: Lists ServiceConnectionTokens in a given project and location.
 11738  //
 11739  // - parent: The parent resource's name. ex. projects/123/locations/us-east1.
 11740  func (r *ProjectsLocationsServiceConnectionTokensService) List(parent string) *ProjectsLocationsServiceConnectionTokensListCall {
 11741  	c := &ProjectsLocationsServiceConnectionTokensListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11742  	c.parent = parent
 11743  	return c
 11744  }
 11745  
 11746  // Filter sets the optional parameter "filter": A filter expression that
 11747  // filters the results listed in the response.
 11748  func (c *ProjectsLocationsServiceConnectionTokensListCall) Filter(filter string) *ProjectsLocationsServiceConnectionTokensListCall {
 11749  	c.urlParams_.Set("filter", filter)
 11750  	return c
 11751  }
 11752  
 11753  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
 11754  // order.
 11755  func (c *ProjectsLocationsServiceConnectionTokensListCall) OrderBy(orderBy string) *ProjectsLocationsServiceConnectionTokensListCall {
 11756  	c.urlParams_.Set("orderBy", orderBy)
 11757  	return c
 11758  }
 11759  
 11760  // PageSize sets the optional parameter "pageSize": The maximum number of
 11761  // results per page that should be returned.
 11762  func (c *ProjectsLocationsServiceConnectionTokensListCall) PageSize(pageSize int64) *ProjectsLocationsServiceConnectionTokensListCall {
 11763  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 11764  	return c
 11765  }
 11766  
 11767  // PageToken sets the optional parameter "pageToken": The page token.
 11768  func (c *ProjectsLocationsServiceConnectionTokensListCall) PageToken(pageToken string) *ProjectsLocationsServiceConnectionTokensListCall {
 11769  	c.urlParams_.Set("pageToken", pageToken)
 11770  	return c
 11771  }
 11772  
 11773  // Fields allows partial responses to be retrieved. See
 11774  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11775  // details.
 11776  func (c *ProjectsLocationsServiceConnectionTokensListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServiceConnectionTokensListCall {
 11777  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11778  	return c
 11779  }
 11780  
 11781  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 11782  // object's ETag matches the given value. This is useful for getting updates
 11783  // only after the object has changed since the last request.
 11784  func (c *ProjectsLocationsServiceConnectionTokensListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServiceConnectionTokensListCall {
 11785  	c.ifNoneMatch_ = entityTag
 11786  	return c
 11787  }
 11788  
 11789  // Context sets the context to be used in this call's Do method.
 11790  func (c *ProjectsLocationsServiceConnectionTokensListCall) Context(ctx context.Context) *ProjectsLocationsServiceConnectionTokensListCall {
 11791  	c.ctx_ = ctx
 11792  	return c
 11793  }
 11794  
 11795  // Header returns a http.Header that can be modified by the caller to add
 11796  // headers to the request.
 11797  func (c *ProjectsLocationsServiceConnectionTokensListCall) Header() http.Header {
 11798  	if c.header_ == nil {
 11799  		c.header_ = make(http.Header)
 11800  	}
 11801  	return c.header_
 11802  }
 11803  
 11804  func (c *ProjectsLocationsServiceConnectionTokensListCall) doRequest(alt string) (*http.Response, error) {
 11805  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 11806  	if c.ifNoneMatch_ != "" {
 11807  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 11808  	}
 11809  	var body io.Reader = nil
 11810  	c.urlParams_.Set("alt", alt)
 11811  	c.urlParams_.Set("prettyPrint", "false")
 11812  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/serviceConnectionTokens")
 11813  	urls += "?" + c.urlParams_.Encode()
 11814  	req, err := http.NewRequest("GET", urls, body)
 11815  	if err != nil {
 11816  		return nil, err
 11817  	}
 11818  	req.Header = reqHeaders
 11819  	googleapi.Expand(req.URL, map[string]string{
 11820  		"parent": c.parent,
 11821  	})
 11822  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11823  }
 11824  
 11825  // Do executes the "networkconnectivity.projects.locations.serviceConnectionTokens.list" call.
 11826  // Any non-2xx status code is an error. Response headers are in either
 11827  // *ListServiceConnectionTokensResponse.ServerResponse.Header or (if a response
 11828  // was returned at all) in error.(*googleapi.Error).Header. Use
 11829  // googleapi.IsNotModified to check whether the returned error was because
 11830  // http.StatusNotModified was returned.
 11831  func (c *ProjectsLocationsServiceConnectionTokensListCall) Do(opts ...googleapi.CallOption) (*ListServiceConnectionTokensResponse, error) {
 11832  	gensupport.SetOptions(c.urlParams_, opts...)
 11833  	res, err := c.doRequest("json")
 11834  	if res != nil && res.StatusCode == http.StatusNotModified {
 11835  		if res.Body != nil {
 11836  			res.Body.Close()
 11837  		}
 11838  		return nil, gensupport.WrapError(&googleapi.Error{
 11839  			Code:   res.StatusCode,
 11840  			Header: res.Header,
 11841  		})
 11842  	}
 11843  	if err != nil {
 11844  		return nil, err
 11845  	}
 11846  	defer googleapi.CloseBody(res)
 11847  	if err := googleapi.CheckResponse(res); err != nil {
 11848  		return nil, gensupport.WrapError(err)
 11849  	}
 11850  	ret := &ListServiceConnectionTokensResponse{
 11851  		ServerResponse: googleapi.ServerResponse{
 11852  			Header:         res.Header,
 11853  			HTTPStatusCode: res.StatusCode,
 11854  		},
 11855  	}
 11856  	target := &ret
 11857  	if err := gensupport.DecodeResponse(target, res); err != nil {
 11858  		return nil, err
 11859  	}
 11860  	return ret, nil
 11861  }
 11862  
 11863  // Pages invokes f for each page of results.
 11864  // A non-nil error returned from f will halt the iteration.
 11865  // The provided context supersedes any context provided to the Context method.
 11866  func (c *ProjectsLocationsServiceConnectionTokensListCall) Pages(ctx context.Context, f func(*ListServiceConnectionTokensResponse) error) error {
 11867  	c.ctx_ = ctx
 11868  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 11869  	for {
 11870  		x, err := c.Do()
 11871  		if err != nil {
 11872  			return err
 11873  		}
 11874  		if err := f(x); err != nil {
 11875  			return err
 11876  		}
 11877  		if x.NextPageToken == "" {
 11878  			return nil
 11879  		}
 11880  		c.PageToken(x.NextPageToken)
 11881  	}
 11882  }
 11883  
 11884  type ProjectsLocationsSpokesCreateCall struct {
 11885  	s          *Service
 11886  	parent     string
 11887  	spoke      *Spoke
 11888  	urlParams_ gensupport.URLParams
 11889  	ctx_       context.Context
 11890  	header_    http.Header
 11891  }
 11892  
 11893  // Create: Creates a Network Connectivity Center spoke.
 11894  //
 11895  // - parent: The parent resource.
 11896  func (r *ProjectsLocationsSpokesService) Create(parent string, spoke *Spoke) *ProjectsLocationsSpokesCreateCall {
 11897  	c := &ProjectsLocationsSpokesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 11898  	c.parent = parent
 11899  	c.spoke = spoke
 11900  	return c
 11901  }
 11902  
 11903  // RequestId sets the optional parameter "requestId": A request ID to identify
 11904  // requests. Specify a unique request ID so that if you must retry your
 11905  // request, the server knows to ignore the request if it has already been
 11906  // completed. The server guarantees that a request doesn't result in creation
 11907  // of duplicate commitments for at least 60 minutes. For example, consider a
 11908  // situation where you make an initial request and the request times out. If
 11909  // you make the request again with the same request ID, the server can check to
 11910  // see whether the original operation was received. If it was, the server
 11911  // ignores the second request. This behavior prevents clients from mistakenly
 11912  // creating duplicate commitments. The request ID must be a valid UUID, with
 11913  // the exception that zero UUID is not supported
 11914  // (00000000-0000-0000-0000-000000000000).
 11915  func (c *ProjectsLocationsSpokesCreateCall) RequestId(requestId string) *ProjectsLocationsSpokesCreateCall {
 11916  	c.urlParams_.Set("requestId", requestId)
 11917  	return c
 11918  }
 11919  
 11920  // SpokeId sets the optional parameter "spokeId": Required. Unique id for the
 11921  // spoke to create.
 11922  func (c *ProjectsLocationsSpokesCreateCall) SpokeId(spokeId string) *ProjectsLocationsSpokesCreateCall {
 11923  	c.urlParams_.Set("spokeId", spokeId)
 11924  	return c
 11925  }
 11926  
 11927  // Fields allows partial responses to be retrieved. See
 11928  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 11929  // details.
 11930  func (c *ProjectsLocationsSpokesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesCreateCall {
 11931  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 11932  	return c
 11933  }
 11934  
 11935  // Context sets the context to be used in this call's Do method.
 11936  func (c *ProjectsLocationsSpokesCreateCall) Context(ctx context.Context) *ProjectsLocationsSpokesCreateCall {
 11937  	c.ctx_ = ctx
 11938  	return c
 11939  }
 11940  
 11941  // Header returns a http.Header that can be modified by the caller to add
 11942  // headers to the request.
 11943  func (c *ProjectsLocationsSpokesCreateCall) Header() http.Header {
 11944  	if c.header_ == nil {
 11945  		c.header_ = make(http.Header)
 11946  	}
 11947  	return c.header_
 11948  }
 11949  
 11950  func (c *ProjectsLocationsSpokesCreateCall) doRequest(alt string) (*http.Response, error) {
 11951  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 11952  	var body io.Reader = nil
 11953  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.spoke)
 11954  	if err != nil {
 11955  		return nil, err
 11956  	}
 11957  	c.urlParams_.Set("alt", alt)
 11958  	c.urlParams_.Set("prettyPrint", "false")
 11959  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/spokes")
 11960  	urls += "?" + c.urlParams_.Encode()
 11961  	req, err := http.NewRequest("POST", urls, body)
 11962  	if err != nil {
 11963  		return nil, err
 11964  	}
 11965  	req.Header = reqHeaders
 11966  	googleapi.Expand(req.URL, map[string]string{
 11967  		"parent": c.parent,
 11968  	})
 11969  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 11970  }
 11971  
 11972  // Do executes the "networkconnectivity.projects.locations.spokes.create" call.
 11973  // Any non-2xx status code is an error. Response headers are in either
 11974  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 11975  // returned at all) in error.(*googleapi.Error).Header. Use
 11976  // googleapi.IsNotModified to check whether the returned error was because
 11977  // http.StatusNotModified was returned.
 11978  func (c *ProjectsLocationsSpokesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 11979  	gensupport.SetOptions(c.urlParams_, opts...)
 11980  	res, err := c.doRequest("json")
 11981  	if res != nil && res.StatusCode == http.StatusNotModified {
 11982  		if res.Body != nil {
 11983  			res.Body.Close()
 11984  		}
 11985  		return nil, gensupport.WrapError(&googleapi.Error{
 11986  			Code:   res.StatusCode,
 11987  			Header: res.Header,
 11988  		})
 11989  	}
 11990  	if err != nil {
 11991  		return nil, err
 11992  	}
 11993  	defer googleapi.CloseBody(res)
 11994  	if err := googleapi.CheckResponse(res); err != nil {
 11995  		return nil, gensupport.WrapError(err)
 11996  	}
 11997  	ret := &GoogleLongrunningOperation{
 11998  		ServerResponse: googleapi.ServerResponse{
 11999  			Header:         res.Header,
 12000  			HTTPStatusCode: res.StatusCode,
 12001  		},
 12002  	}
 12003  	target := &ret
 12004  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12005  		return nil, err
 12006  	}
 12007  	return ret, nil
 12008  }
 12009  
 12010  type ProjectsLocationsSpokesDeleteCall struct {
 12011  	s          *Service
 12012  	name       string
 12013  	urlParams_ gensupport.URLParams
 12014  	ctx_       context.Context
 12015  	header_    http.Header
 12016  }
 12017  
 12018  // Delete: Deletes a Network Connectivity Center spoke.
 12019  //
 12020  // - name: The name of the spoke to delete.
 12021  func (r *ProjectsLocationsSpokesService) Delete(name string) *ProjectsLocationsSpokesDeleteCall {
 12022  	c := &ProjectsLocationsSpokesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12023  	c.name = name
 12024  	return c
 12025  }
 12026  
 12027  // RequestId sets the optional parameter "requestId": A request ID to identify
 12028  // requests. Specify a unique request ID so that if you must retry your
 12029  // request, the server knows to ignore the request if it has already been
 12030  // completed. The server guarantees that a request doesn't result in creation
 12031  // of duplicate commitments for at least 60 minutes. For example, consider a
 12032  // situation where you make an initial request and the request times out. If
 12033  // you make the request again with the same request ID, the server can check to
 12034  // see whether the original operation was received. If it was, the server
 12035  // ignores the second request. This behavior prevents clients from mistakenly
 12036  // creating duplicate commitments. The request ID must be a valid UUID, with
 12037  // the exception that zero UUID is not supported
 12038  // (00000000-0000-0000-0000-000000000000).
 12039  func (c *ProjectsLocationsSpokesDeleteCall) RequestId(requestId string) *ProjectsLocationsSpokesDeleteCall {
 12040  	c.urlParams_.Set("requestId", requestId)
 12041  	return c
 12042  }
 12043  
 12044  // Fields allows partial responses to be retrieved. See
 12045  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12046  // details.
 12047  func (c *ProjectsLocationsSpokesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesDeleteCall {
 12048  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12049  	return c
 12050  }
 12051  
 12052  // Context sets the context to be used in this call's Do method.
 12053  func (c *ProjectsLocationsSpokesDeleteCall) Context(ctx context.Context) *ProjectsLocationsSpokesDeleteCall {
 12054  	c.ctx_ = ctx
 12055  	return c
 12056  }
 12057  
 12058  // Header returns a http.Header that can be modified by the caller to add
 12059  // headers to the request.
 12060  func (c *ProjectsLocationsSpokesDeleteCall) Header() http.Header {
 12061  	if c.header_ == nil {
 12062  		c.header_ = make(http.Header)
 12063  	}
 12064  	return c.header_
 12065  }
 12066  
 12067  func (c *ProjectsLocationsSpokesDeleteCall) doRequest(alt string) (*http.Response, error) {
 12068  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12069  	var body io.Reader = nil
 12070  	c.urlParams_.Set("alt", alt)
 12071  	c.urlParams_.Set("prettyPrint", "false")
 12072  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12073  	urls += "?" + c.urlParams_.Encode()
 12074  	req, err := http.NewRequest("DELETE", urls, body)
 12075  	if err != nil {
 12076  		return nil, err
 12077  	}
 12078  	req.Header = reqHeaders
 12079  	googleapi.Expand(req.URL, map[string]string{
 12080  		"name": c.name,
 12081  	})
 12082  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12083  }
 12084  
 12085  // Do executes the "networkconnectivity.projects.locations.spokes.delete" call.
 12086  // Any non-2xx status code is an error. Response headers are in either
 12087  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 12088  // returned at all) in error.(*googleapi.Error).Header. Use
 12089  // googleapi.IsNotModified to check whether the returned error was because
 12090  // http.StatusNotModified was returned.
 12091  func (c *ProjectsLocationsSpokesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 12092  	gensupport.SetOptions(c.urlParams_, opts...)
 12093  	res, err := c.doRequest("json")
 12094  	if res != nil && res.StatusCode == http.StatusNotModified {
 12095  		if res.Body != nil {
 12096  			res.Body.Close()
 12097  		}
 12098  		return nil, gensupport.WrapError(&googleapi.Error{
 12099  			Code:   res.StatusCode,
 12100  			Header: res.Header,
 12101  		})
 12102  	}
 12103  	if err != nil {
 12104  		return nil, err
 12105  	}
 12106  	defer googleapi.CloseBody(res)
 12107  	if err := googleapi.CheckResponse(res); err != nil {
 12108  		return nil, gensupport.WrapError(err)
 12109  	}
 12110  	ret := &GoogleLongrunningOperation{
 12111  		ServerResponse: googleapi.ServerResponse{
 12112  			Header:         res.Header,
 12113  			HTTPStatusCode: res.StatusCode,
 12114  		},
 12115  	}
 12116  	target := &ret
 12117  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12118  		return nil, err
 12119  	}
 12120  	return ret, nil
 12121  }
 12122  
 12123  type ProjectsLocationsSpokesGetCall struct {
 12124  	s            *Service
 12125  	name         string
 12126  	urlParams_   gensupport.URLParams
 12127  	ifNoneMatch_ string
 12128  	ctx_         context.Context
 12129  	header_      http.Header
 12130  }
 12131  
 12132  // Get: Gets details about a Network Connectivity Center spoke.
 12133  //
 12134  // - name: The name of the spoke resource.
 12135  func (r *ProjectsLocationsSpokesService) Get(name string) *ProjectsLocationsSpokesGetCall {
 12136  	c := &ProjectsLocationsSpokesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12137  	c.name = name
 12138  	return c
 12139  }
 12140  
 12141  // Fields allows partial responses to be retrieved. See
 12142  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12143  // details.
 12144  func (c *ProjectsLocationsSpokesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesGetCall {
 12145  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12146  	return c
 12147  }
 12148  
 12149  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12150  // object's ETag matches the given value. This is useful for getting updates
 12151  // only after the object has changed since the last request.
 12152  func (c *ProjectsLocationsSpokesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsSpokesGetCall {
 12153  	c.ifNoneMatch_ = entityTag
 12154  	return c
 12155  }
 12156  
 12157  // Context sets the context to be used in this call's Do method.
 12158  func (c *ProjectsLocationsSpokesGetCall) Context(ctx context.Context) *ProjectsLocationsSpokesGetCall {
 12159  	c.ctx_ = ctx
 12160  	return c
 12161  }
 12162  
 12163  // Header returns a http.Header that can be modified by the caller to add
 12164  // headers to the request.
 12165  func (c *ProjectsLocationsSpokesGetCall) Header() http.Header {
 12166  	if c.header_ == nil {
 12167  		c.header_ = make(http.Header)
 12168  	}
 12169  	return c.header_
 12170  }
 12171  
 12172  func (c *ProjectsLocationsSpokesGetCall) doRequest(alt string) (*http.Response, error) {
 12173  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12174  	if c.ifNoneMatch_ != "" {
 12175  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12176  	}
 12177  	var body io.Reader = nil
 12178  	c.urlParams_.Set("alt", alt)
 12179  	c.urlParams_.Set("prettyPrint", "false")
 12180  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12181  	urls += "?" + c.urlParams_.Encode()
 12182  	req, err := http.NewRequest("GET", urls, body)
 12183  	if err != nil {
 12184  		return nil, err
 12185  	}
 12186  	req.Header = reqHeaders
 12187  	googleapi.Expand(req.URL, map[string]string{
 12188  		"name": c.name,
 12189  	})
 12190  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12191  }
 12192  
 12193  // Do executes the "networkconnectivity.projects.locations.spokes.get" call.
 12194  // Any non-2xx status code is an error. Response headers are in either
 12195  // *Spoke.ServerResponse.Header or (if a response was returned at all) in
 12196  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12197  // whether the returned error was because http.StatusNotModified was returned.
 12198  func (c *ProjectsLocationsSpokesGetCall) Do(opts ...googleapi.CallOption) (*Spoke, error) {
 12199  	gensupport.SetOptions(c.urlParams_, opts...)
 12200  	res, err := c.doRequest("json")
 12201  	if res != nil && res.StatusCode == http.StatusNotModified {
 12202  		if res.Body != nil {
 12203  			res.Body.Close()
 12204  		}
 12205  		return nil, gensupport.WrapError(&googleapi.Error{
 12206  			Code:   res.StatusCode,
 12207  			Header: res.Header,
 12208  		})
 12209  	}
 12210  	if err != nil {
 12211  		return nil, err
 12212  	}
 12213  	defer googleapi.CloseBody(res)
 12214  	if err := googleapi.CheckResponse(res); err != nil {
 12215  		return nil, gensupport.WrapError(err)
 12216  	}
 12217  	ret := &Spoke{
 12218  		ServerResponse: googleapi.ServerResponse{
 12219  			Header:         res.Header,
 12220  			HTTPStatusCode: res.StatusCode,
 12221  		},
 12222  	}
 12223  	target := &ret
 12224  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12225  		return nil, err
 12226  	}
 12227  	return ret, nil
 12228  }
 12229  
 12230  type ProjectsLocationsSpokesGetIamPolicyCall struct {
 12231  	s            *Service
 12232  	resource     string
 12233  	urlParams_   gensupport.URLParams
 12234  	ifNoneMatch_ string
 12235  	ctx_         context.Context
 12236  	header_      http.Header
 12237  }
 12238  
 12239  // GetIamPolicy: Gets the access control policy for a resource. Returns an
 12240  // empty policy if the resource exists and does not have a policy set.
 12241  //
 12242  //   - resource: REQUIRED: The resource for which the policy is being requested.
 12243  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 12244  //     for the appropriate value for this field.
 12245  func (r *ProjectsLocationsSpokesService) GetIamPolicy(resource string) *ProjectsLocationsSpokesGetIamPolicyCall {
 12246  	c := &ProjectsLocationsSpokesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12247  	c.resource = resource
 12248  	return c
 12249  }
 12250  
 12251  // OptionsRequestedPolicyVersion sets the optional parameter
 12252  // "options.requestedPolicyVersion": The maximum policy version that will be
 12253  // used to format the policy. Valid values are 0, 1, and 3. Requests specifying
 12254  // an invalid value will be rejected. Requests for policies with any
 12255  // conditional role bindings must specify version 3. Policies with no
 12256  // conditional role bindings may specify any valid value or leave the field
 12257  // unset. The policy in the response might use the policy version that you
 12258  // specified, or it might use a lower policy version. For example, if you
 12259  // specify version 3, but the policy has no conditional role bindings, the
 12260  // response uses version 1. To learn which resources support conditions in
 12261  // their IAM policies, see the IAM documentation
 12262  // (https://cloud.google.com/iam/help/conditions/resource-policies).
 12263  func (c *ProjectsLocationsSpokesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsSpokesGetIamPolicyCall {
 12264  	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
 12265  	return c
 12266  }
 12267  
 12268  // Fields allows partial responses to be retrieved. See
 12269  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12270  // details.
 12271  func (c *ProjectsLocationsSpokesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesGetIamPolicyCall {
 12272  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12273  	return c
 12274  }
 12275  
 12276  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12277  // object's ETag matches the given value. This is useful for getting updates
 12278  // only after the object has changed since the last request.
 12279  func (c *ProjectsLocationsSpokesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsSpokesGetIamPolicyCall {
 12280  	c.ifNoneMatch_ = entityTag
 12281  	return c
 12282  }
 12283  
 12284  // Context sets the context to be used in this call's Do method.
 12285  func (c *ProjectsLocationsSpokesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSpokesGetIamPolicyCall {
 12286  	c.ctx_ = ctx
 12287  	return c
 12288  }
 12289  
 12290  // Header returns a http.Header that can be modified by the caller to add
 12291  // headers to the request.
 12292  func (c *ProjectsLocationsSpokesGetIamPolicyCall) Header() http.Header {
 12293  	if c.header_ == nil {
 12294  		c.header_ = make(http.Header)
 12295  	}
 12296  	return c.header_
 12297  }
 12298  
 12299  func (c *ProjectsLocationsSpokesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 12300  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12301  	if c.ifNoneMatch_ != "" {
 12302  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12303  	}
 12304  	var body io.Reader = nil
 12305  	c.urlParams_.Set("alt", alt)
 12306  	c.urlParams_.Set("prettyPrint", "false")
 12307  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
 12308  	urls += "?" + c.urlParams_.Encode()
 12309  	req, err := http.NewRequest("GET", urls, body)
 12310  	if err != nil {
 12311  		return nil, err
 12312  	}
 12313  	req.Header = reqHeaders
 12314  	googleapi.Expand(req.URL, map[string]string{
 12315  		"resource": c.resource,
 12316  	})
 12317  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12318  }
 12319  
 12320  // Do executes the "networkconnectivity.projects.locations.spokes.getIamPolicy" call.
 12321  // Any non-2xx status code is an error. Response headers are in either
 12322  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 12323  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12324  // whether the returned error was because http.StatusNotModified was returned.
 12325  func (c *ProjectsLocationsSpokesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 12326  	gensupport.SetOptions(c.urlParams_, opts...)
 12327  	res, err := c.doRequest("json")
 12328  	if res != nil && res.StatusCode == http.StatusNotModified {
 12329  		if res.Body != nil {
 12330  			res.Body.Close()
 12331  		}
 12332  		return nil, gensupport.WrapError(&googleapi.Error{
 12333  			Code:   res.StatusCode,
 12334  			Header: res.Header,
 12335  		})
 12336  	}
 12337  	if err != nil {
 12338  		return nil, err
 12339  	}
 12340  	defer googleapi.CloseBody(res)
 12341  	if err := googleapi.CheckResponse(res); err != nil {
 12342  		return nil, gensupport.WrapError(err)
 12343  	}
 12344  	ret := &Policy{
 12345  		ServerResponse: googleapi.ServerResponse{
 12346  			Header:         res.Header,
 12347  			HTTPStatusCode: res.StatusCode,
 12348  		},
 12349  	}
 12350  	target := &ret
 12351  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12352  		return nil, err
 12353  	}
 12354  	return ret, nil
 12355  }
 12356  
 12357  type ProjectsLocationsSpokesListCall struct {
 12358  	s            *Service
 12359  	parent       string
 12360  	urlParams_   gensupport.URLParams
 12361  	ifNoneMatch_ string
 12362  	ctx_         context.Context
 12363  	header_      http.Header
 12364  }
 12365  
 12366  // List: Lists the Network Connectivity Center spokes in a specified project
 12367  // and location.
 12368  //
 12369  // - parent: The parent resource.
 12370  func (r *ProjectsLocationsSpokesService) List(parent string) *ProjectsLocationsSpokesListCall {
 12371  	c := &ProjectsLocationsSpokesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12372  	c.parent = parent
 12373  	return c
 12374  }
 12375  
 12376  // Filter sets the optional parameter "filter": An expression that filters the
 12377  // list of results.
 12378  func (c *ProjectsLocationsSpokesListCall) Filter(filter string) *ProjectsLocationsSpokesListCall {
 12379  	c.urlParams_.Set("filter", filter)
 12380  	return c
 12381  }
 12382  
 12383  // OrderBy sets the optional parameter "orderBy": Sort the results by a certain
 12384  // order.
 12385  func (c *ProjectsLocationsSpokesListCall) OrderBy(orderBy string) *ProjectsLocationsSpokesListCall {
 12386  	c.urlParams_.Set("orderBy", orderBy)
 12387  	return c
 12388  }
 12389  
 12390  // PageSize sets the optional parameter "pageSize": The maximum number of
 12391  // results to return per page.
 12392  func (c *ProjectsLocationsSpokesListCall) PageSize(pageSize int64) *ProjectsLocationsSpokesListCall {
 12393  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
 12394  	return c
 12395  }
 12396  
 12397  // PageToken sets the optional parameter "pageToken": The page token.
 12398  func (c *ProjectsLocationsSpokesListCall) PageToken(pageToken string) *ProjectsLocationsSpokesListCall {
 12399  	c.urlParams_.Set("pageToken", pageToken)
 12400  	return c
 12401  }
 12402  
 12403  // Fields allows partial responses to be retrieved. See
 12404  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12405  // details.
 12406  func (c *ProjectsLocationsSpokesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesListCall {
 12407  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12408  	return c
 12409  }
 12410  
 12411  // IfNoneMatch sets an optional parameter which makes the operation fail if the
 12412  // object's ETag matches the given value. This is useful for getting updates
 12413  // only after the object has changed since the last request.
 12414  func (c *ProjectsLocationsSpokesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsSpokesListCall {
 12415  	c.ifNoneMatch_ = entityTag
 12416  	return c
 12417  }
 12418  
 12419  // Context sets the context to be used in this call's Do method.
 12420  func (c *ProjectsLocationsSpokesListCall) Context(ctx context.Context) *ProjectsLocationsSpokesListCall {
 12421  	c.ctx_ = ctx
 12422  	return c
 12423  }
 12424  
 12425  // Header returns a http.Header that can be modified by the caller to add
 12426  // headers to the request.
 12427  func (c *ProjectsLocationsSpokesListCall) Header() http.Header {
 12428  	if c.header_ == nil {
 12429  		c.header_ = make(http.Header)
 12430  	}
 12431  	return c.header_
 12432  }
 12433  
 12434  func (c *ProjectsLocationsSpokesListCall) doRequest(alt string) (*http.Response, error) {
 12435  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
 12436  	if c.ifNoneMatch_ != "" {
 12437  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
 12438  	}
 12439  	var body io.Reader = nil
 12440  	c.urlParams_.Set("alt", alt)
 12441  	c.urlParams_.Set("prettyPrint", "false")
 12442  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/spokes")
 12443  	urls += "?" + c.urlParams_.Encode()
 12444  	req, err := http.NewRequest("GET", urls, body)
 12445  	if err != nil {
 12446  		return nil, err
 12447  	}
 12448  	req.Header = reqHeaders
 12449  	googleapi.Expand(req.URL, map[string]string{
 12450  		"parent": c.parent,
 12451  	})
 12452  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12453  }
 12454  
 12455  // Do executes the "networkconnectivity.projects.locations.spokes.list" call.
 12456  // Any non-2xx status code is an error. Response headers are in either
 12457  // *ListSpokesResponse.ServerResponse.Header or (if a response was returned at
 12458  // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
 12459  // check whether the returned error was because http.StatusNotModified was
 12460  // returned.
 12461  func (c *ProjectsLocationsSpokesListCall) Do(opts ...googleapi.CallOption) (*ListSpokesResponse, error) {
 12462  	gensupport.SetOptions(c.urlParams_, opts...)
 12463  	res, err := c.doRequest("json")
 12464  	if res != nil && res.StatusCode == http.StatusNotModified {
 12465  		if res.Body != nil {
 12466  			res.Body.Close()
 12467  		}
 12468  		return nil, gensupport.WrapError(&googleapi.Error{
 12469  			Code:   res.StatusCode,
 12470  			Header: res.Header,
 12471  		})
 12472  	}
 12473  	if err != nil {
 12474  		return nil, err
 12475  	}
 12476  	defer googleapi.CloseBody(res)
 12477  	if err := googleapi.CheckResponse(res); err != nil {
 12478  		return nil, gensupport.WrapError(err)
 12479  	}
 12480  	ret := &ListSpokesResponse{
 12481  		ServerResponse: googleapi.ServerResponse{
 12482  			Header:         res.Header,
 12483  			HTTPStatusCode: res.StatusCode,
 12484  		},
 12485  	}
 12486  	target := &ret
 12487  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12488  		return nil, err
 12489  	}
 12490  	return ret, nil
 12491  }
 12492  
 12493  // Pages invokes f for each page of results.
 12494  // A non-nil error returned from f will halt the iteration.
 12495  // The provided context supersedes any context provided to the Context method.
 12496  func (c *ProjectsLocationsSpokesListCall) Pages(ctx context.Context, f func(*ListSpokesResponse) error) error {
 12497  	c.ctx_ = ctx
 12498  	defer c.PageToken(c.urlParams_.Get("pageToken"))
 12499  	for {
 12500  		x, err := c.Do()
 12501  		if err != nil {
 12502  			return err
 12503  		}
 12504  		if err := f(x); err != nil {
 12505  			return err
 12506  		}
 12507  		if x.NextPageToken == "" {
 12508  			return nil
 12509  		}
 12510  		c.PageToken(x.NextPageToken)
 12511  	}
 12512  }
 12513  
 12514  type ProjectsLocationsSpokesPatchCall struct {
 12515  	s          *Service
 12516  	name       string
 12517  	spoke      *Spoke
 12518  	urlParams_ gensupport.URLParams
 12519  	ctx_       context.Context
 12520  	header_    http.Header
 12521  }
 12522  
 12523  // Patch: Updates the parameters of a Network Connectivity Center spoke.
 12524  //
 12525  //   - name: Immutable. The name of the spoke. Spoke names must be unique. They
 12526  //     use the following form:
 12527  //     `projects/{project_number}/locations/{region}/spokes/{spoke_id}`.
 12528  func (r *ProjectsLocationsSpokesService) Patch(name string, spoke *Spoke) *ProjectsLocationsSpokesPatchCall {
 12529  	c := &ProjectsLocationsSpokesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12530  	c.name = name
 12531  	c.spoke = spoke
 12532  	return c
 12533  }
 12534  
 12535  // RequestId sets the optional parameter "requestId": A request ID to identify
 12536  // requests. Specify a unique request ID so that if you must retry your
 12537  // request, the server knows to ignore the request if it has already been
 12538  // completed. The server guarantees that a request doesn't result in creation
 12539  // of duplicate commitments for at least 60 minutes. For example, consider a
 12540  // situation where you make an initial request and the request times out. If
 12541  // you make the request again with the same request ID, the server can check to
 12542  // see whether the original operation was received. If it was, the server
 12543  // ignores the second request. This behavior prevents clients from mistakenly
 12544  // creating duplicate commitments. The request ID must be a valid UUID, with
 12545  // the exception that zero UUID is not supported
 12546  // (00000000-0000-0000-0000-000000000000).
 12547  func (c *ProjectsLocationsSpokesPatchCall) RequestId(requestId string) *ProjectsLocationsSpokesPatchCall {
 12548  	c.urlParams_.Set("requestId", requestId)
 12549  	return c
 12550  }
 12551  
 12552  // UpdateMask sets the optional parameter "updateMask": In the case of an
 12553  // update to an existing spoke, field mask is used to specify the fields to be
 12554  // overwritten. The fields specified in the update_mask are relative to the
 12555  // resource, not the full request. A field is overwritten if it is in the mask.
 12556  // If the user does not provide a mask, then all fields are overwritten.
 12557  func (c *ProjectsLocationsSpokesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsSpokesPatchCall {
 12558  	c.urlParams_.Set("updateMask", updateMask)
 12559  	return c
 12560  }
 12561  
 12562  // Fields allows partial responses to be retrieved. See
 12563  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12564  // details.
 12565  func (c *ProjectsLocationsSpokesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesPatchCall {
 12566  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12567  	return c
 12568  }
 12569  
 12570  // Context sets the context to be used in this call's Do method.
 12571  func (c *ProjectsLocationsSpokesPatchCall) Context(ctx context.Context) *ProjectsLocationsSpokesPatchCall {
 12572  	c.ctx_ = ctx
 12573  	return c
 12574  }
 12575  
 12576  // Header returns a http.Header that can be modified by the caller to add
 12577  // headers to the request.
 12578  func (c *ProjectsLocationsSpokesPatchCall) Header() http.Header {
 12579  	if c.header_ == nil {
 12580  		c.header_ = make(http.Header)
 12581  	}
 12582  	return c.header_
 12583  }
 12584  
 12585  func (c *ProjectsLocationsSpokesPatchCall) doRequest(alt string) (*http.Response, error) {
 12586  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12587  	var body io.Reader = nil
 12588  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.spoke)
 12589  	if err != nil {
 12590  		return nil, err
 12591  	}
 12592  	c.urlParams_.Set("alt", alt)
 12593  	c.urlParams_.Set("prettyPrint", "false")
 12594  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
 12595  	urls += "?" + c.urlParams_.Encode()
 12596  	req, err := http.NewRequest("PATCH", urls, body)
 12597  	if err != nil {
 12598  		return nil, err
 12599  	}
 12600  	req.Header = reqHeaders
 12601  	googleapi.Expand(req.URL, map[string]string{
 12602  		"name": c.name,
 12603  	})
 12604  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12605  }
 12606  
 12607  // Do executes the "networkconnectivity.projects.locations.spokes.patch" call.
 12608  // Any non-2xx status code is an error. Response headers are in either
 12609  // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was
 12610  // returned at all) in error.(*googleapi.Error).Header. Use
 12611  // googleapi.IsNotModified to check whether the returned error was because
 12612  // http.StatusNotModified was returned.
 12613  func (c *ProjectsLocationsSpokesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) {
 12614  	gensupport.SetOptions(c.urlParams_, opts...)
 12615  	res, err := c.doRequest("json")
 12616  	if res != nil && res.StatusCode == http.StatusNotModified {
 12617  		if res.Body != nil {
 12618  			res.Body.Close()
 12619  		}
 12620  		return nil, gensupport.WrapError(&googleapi.Error{
 12621  			Code:   res.StatusCode,
 12622  			Header: res.Header,
 12623  		})
 12624  	}
 12625  	if err != nil {
 12626  		return nil, err
 12627  	}
 12628  	defer googleapi.CloseBody(res)
 12629  	if err := googleapi.CheckResponse(res); err != nil {
 12630  		return nil, gensupport.WrapError(err)
 12631  	}
 12632  	ret := &GoogleLongrunningOperation{
 12633  		ServerResponse: googleapi.ServerResponse{
 12634  			Header:         res.Header,
 12635  			HTTPStatusCode: res.StatusCode,
 12636  		},
 12637  	}
 12638  	target := &ret
 12639  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12640  		return nil, err
 12641  	}
 12642  	return ret, nil
 12643  }
 12644  
 12645  type ProjectsLocationsSpokesSetIamPolicyCall struct {
 12646  	s                   *Service
 12647  	resource            string
 12648  	setiampolicyrequest *SetIamPolicyRequest
 12649  	urlParams_          gensupport.URLParams
 12650  	ctx_                context.Context
 12651  	header_             http.Header
 12652  }
 12653  
 12654  // SetIamPolicy: Sets the access control policy on the specified resource.
 12655  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
 12656  // and `PERMISSION_DENIED` errors.
 12657  //
 12658  //   - resource: REQUIRED: The resource for which the policy is being specified.
 12659  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
 12660  //     for the appropriate value for this field.
 12661  func (r *ProjectsLocationsSpokesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsSpokesSetIamPolicyCall {
 12662  	c := &ProjectsLocationsSpokesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12663  	c.resource = resource
 12664  	c.setiampolicyrequest = setiampolicyrequest
 12665  	return c
 12666  }
 12667  
 12668  // Fields allows partial responses to be retrieved. See
 12669  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12670  // details.
 12671  func (c *ProjectsLocationsSpokesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesSetIamPolicyCall {
 12672  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12673  	return c
 12674  }
 12675  
 12676  // Context sets the context to be used in this call's Do method.
 12677  func (c *ProjectsLocationsSpokesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsSpokesSetIamPolicyCall {
 12678  	c.ctx_ = ctx
 12679  	return c
 12680  }
 12681  
 12682  // Header returns a http.Header that can be modified by the caller to add
 12683  // headers to the request.
 12684  func (c *ProjectsLocationsSpokesSetIamPolicyCall) Header() http.Header {
 12685  	if c.header_ == nil {
 12686  		c.header_ = make(http.Header)
 12687  	}
 12688  	return c.header_
 12689  }
 12690  
 12691  func (c *ProjectsLocationsSpokesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
 12692  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12693  	var body io.Reader = nil
 12694  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
 12695  	if err != nil {
 12696  		return nil, err
 12697  	}
 12698  	c.urlParams_.Set("alt", alt)
 12699  	c.urlParams_.Set("prettyPrint", "false")
 12700  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
 12701  	urls += "?" + c.urlParams_.Encode()
 12702  	req, err := http.NewRequest("POST", urls, body)
 12703  	if err != nil {
 12704  		return nil, err
 12705  	}
 12706  	req.Header = reqHeaders
 12707  	googleapi.Expand(req.URL, map[string]string{
 12708  		"resource": c.resource,
 12709  	})
 12710  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12711  }
 12712  
 12713  // Do executes the "networkconnectivity.projects.locations.spokes.setIamPolicy" call.
 12714  // Any non-2xx status code is an error. Response headers are in either
 12715  // *Policy.ServerResponse.Header or (if a response was returned at all) in
 12716  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
 12717  // whether the returned error was because http.StatusNotModified was returned.
 12718  func (c *ProjectsLocationsSpokesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
 12719  	gensupport.SetOptions(c.urlParams_, opts...)
 12720  	res, err := c.doRequest("json")
 12721  	if res != nil && res.StatusCode == http.StatusNotModified {
 12722  		if res.Body != nil {
 12723  			res.Body.Close()
 12724  		}
 12725  		return nil, gensupport.WrapError(&googleapi.Error{
 12726  			Code:   res.StatusCode,
 12727  			Header: res.Header,
 12728  		})
 12729  	}
 12730  	if err != nil {
 12731  		return nil, err
 12732  	}
 12733  	defer googleapi.CloseBody(res)
 12734  	if err := googleapi.CheckResponse(res); err != nil {
 12735  		return nil, gensupport.WrapError(err)
 12736  	}
 12737  	ret := &Policy{
 12738  		ServerResponse: googleapi.ServerResponse{
 12739  			Header:         res.Header,
 12740  			HTTPStatusCode: res.StatusCode,
 12741  		},
 12742  	}
 12743  	target := &ret
 12744  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12745  		return nil, err
 12746  	}
 12747  	return ret, nil
 12748  }
 12749  
 12750  type ProjectsLocationsSpokesTestIamPermissionsCall struct {
 12751  	s                         *Service
 12752  	resource                  string
 12753  	testiampermissionsrequest *TestIamPermissionsRequest
 12754  	urlParams_                gensupport.URLParams
 12755  	ctx_                      context.Context
 12756  	header_                   http.Header
 12757  }
 12758  
 12759  // TestIamPermissions: Returns permissions that a caller has on the specified
 12760  // resource. If the resource does not exist, this will return an empty set of
 12761  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
 12762  // used for building permission-aware UIs and command-line tools, not for
 12763  // authorization checking. This operation may "fail open" without warning.
 12764  //
 12765  //   - resource: REQUIRED: The resource for which the policy detail is being
 12766  //     requested. See Resource names
 12767  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
 12768  //     value for this field.
 12769  func (r *ProjectsLocationsSpokesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsSpokesTestIamPermissionsCall {
 12770  	c := &ProjectsLocationsSpokesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
 12771  	c.resource = resource
 12772  	c.testiampermissionsrequest = testiampermissionsrequest
 12773  	return c
 12774  }
 12775  
 12776  // Fields allows partial responses to be retrieved. See
 12777  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
 12778  // details.
 12779  func (c *ProjectsLocationsSpokesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsSpokesTestIamPermissionsCall {
 12780  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
 12781  	return c
 12782  }
 12783  
 12784  // Context sets the context to be used in this call's Do method.
 12785  func (c *ProjectsLocationsSpokesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsSpokesTestIamPermissionsCall {
 12786  	c.ctx_ = ctx
 12787  	return c
 12788  }
 12789  
 12790  // Header returns a http.Header that can be modified by the caller to add
 12791  // headers to the request.
 12792  func (c *ProjectsLocationsSpokesTestIamPermissionsCall) Header() http.Header {
 12793  	if c.header_ == nil {
 12794  		c.header_ = make(http.Header)
 12795  	}
 12796  	return c.header_
 12797  }
 12798  
 12799  func (c *ProjectsLocationsSpokesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
 12800  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
 12801  	var body io.Reader = nil
 12802  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
 12803  	if err != nil {
 12804  		return nil, err
 12805  	}
 12806  	c.urlParams_.Set("alt", alt)
 12807  	c.urlParams_.Set("prettyPrint", "false")
 12808  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
 12809  	urls += "?" + c.urlParams_.Encode()
 12810  	req, err := http.NewRequest("POST", urls, body)
 12811  	if err != nil {
 12812  		return nil, err
 12813  	}
 12814  	req.Header = reqHeaders
 12815  	googleapi.Expand(req.URL, map[string]string{
 12816  		"resource": c.resource,
 12817  	})
 12818  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
 12819  }
 12820  
 12821  // Do executes the "networkconnectivity.projects.locations.spokes.testIamPermissions" call.
 12822  // Any non-2xx status code is an error. Response headers are in either
 12823  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
 12824  // returned at all) in error.(*googleapi.Error).Header. Use
 12825  // googleapi.IsNotModified to check whether the returned error was because
 12826  // http.StatusNotModified was returned.
 12827  func (c *ProjectsLocationsSpokesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
 12828  	gensupport.SetOptions(c.urlParams_, opts...)
 12829  	res, err := c.doRequest("json")
 12830  	if res != nil && res.StatusCode == http.StatusNotModified {
 12831  		if res.Body != nil {
 12832  			res.Body.Close()
 12833  		}
 12834  		return nil, gensupport.WrapError(&googleapi.Error{
 12835  			Code:   res.StatusCode,
 12836  			Header: res.Header,
 12837  		})
 12838  	}
 12839  	if err != nil {
 12840  		return nil, err
 12841  	}
 12842  	defer googleapi.CloseBody(res)
 12843  	if err := googleapi.CheckResponse(res); err != nil {
 12844  		return nil, gensupport.WrapError(err)
 12845  	}
 12846  	ret := &TestIamPermissionsResponse{
 12847  		ServerResponse: googleapi.ServerResponse{
 12848  			Header:         res.Header,
 12849  			HTTPStatusCode: res.StatusCode,
 12850  		},
 12851  	}
 12852  	target := &ret
 12853  	if err := gensupport.DecodeResponse(target, res); err != nil {
 12854  		return nil, err
 12855  	}
 12856  	return ret, nil
 12857  }
 12858  

View as plain text