...

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

Documentation: google.golang.org/api/bigqueryconnection/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 bigqueryconnection provides access to the BigQuery Connection API.
     8  //
     9  // For product documentation, see: https://cloud.google.com/bigquery/docs/connections-api-intro
    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/bigqueryconnection/v1"
    27  //	...
    28  //	ctx := context.Background()
    29  //	bigqueryconnectionService, err := bigqueryconnection.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  // By default, all available scopes (see "Constants") are used to authenticate.
    38  // To restrict scopes, use [google.golang.org/api/option.WithScopes]:
    39  //
    40  //	bigqueryconnectionService, err := bigqueryconnection.NewService(ctx, option.WithScopes(bigqueryconnection.CloudPlatformScope))
    41  //
    42  // To use an API key for authentication (note: some APIs do not support API
    43  // keys), use [google.golang.org/api/option.WithAPIKey]:
    44  //
    45  //	bigqueryconnectionService, err := bigqueryconnection.NewService(ctx, option.WithAPIKey("AIza..."))
    46  //
    47  // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth
    48  // flow, use [google.golang.org/api/option.WithTokenSource]:
    49  //
    50  //	config := &oauth2.Config{...}
    51  //	// ...
    52  //	token, err := config.Exchange(ctx, ...)
    53  //	bigqueryconnectionService, err := bigqueryconnection.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
    54  //
    55  // See [google.golang.org/api/option.ClientOption] for details on options.
    56  package bigqueryconnection // import "google.golang.org/api/bigqueryconnection/v1"
    57  
    58  import (
    59  	"bytes"
    60  	"context"
    61  	"encoding/json"
    62  	"errors"
    63  	"fmt"
    64  	"io"
    65  	"net/http"
    66  	"net/url"
    67  	"strconv"
    68  	"strings"
    69  
    70  	googleapi "google.golang.org/api/googleapi"
    71  	internal "google.golang.org/api/internal"
    72  	gensupport "google.golang.org/api/internal/gensupport"
    73  	option "google.golang.org/api/option"
    74  	internaloption "google.golang.org/api/option/internaloption"
    75  	htransport "google.golang.org/api/transport/http"
    76  )
    77  
    78  // Always reference these packages, just in case the auto-generated code
    79  // below doesn't.
    80  var _ = bytes.NewBuffer
    81  var _ = strconv.Itoa
    82  var _ = fmt.Sprintf
    83  var _ = json.NewDecoder
    84  var _ = io.Copy
    85  var _ = url.Parse
    86  var _ = gensupport.MarshalJSON
    87  var _ = googleapi.Version
    88  var _ = errors.New
    89  var _ = strings.Replace
    90  var _ = context.Canceled
    91  var _ = internaloption.WithDefaultEndpoint
    92  var _ = internal.Version
    93  
    94  const apiId = "bigqueryconnection:v1"
    95  const apiName = "bigqueryconnection"
    96  const apiVersion = "v1"
    97  const basePath = "https://bigqueryconnection.googleapis.com/"
    98  const basePathTemplate = "https://bigqueryconnection.UNIVERSE_DOMAIN/"
    99  const mtlsBasePath = "https://bigqueryconnection.mtls.googleapis.com/"
   100  
   101  // OAuth2 scopes used by this API.
   102  const (
   103  	// View and manage your data in Google BigQuery and see the email address for
   104  	// your Google Account
   105  	BigqueryScope = "https://www.googleapis.com/auth/bigquery"
   106  
   107  	// See, edit, configure, and delete your Google Cloud data and see the email
   108  	// address for your Google Account.
   109  	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
   110  )
   111  
   112  // NewService creates a new Service.
   113  func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
   114  	scopesOption := internaloption.WithDefaultScopes(
   115  		"https://www.googleapis.com/auth/bigquery",
   116  		"https://www.googleapis.com/auth/cloud-platform",
   117  	)
   118  	// NOTE: prepend, so we don't override user-specified scopes.
   119  	opts = append([]option.ClientOption{scopesOption}, opts...)
   120  	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
   121  	opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate))
   122  	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
   123  	opts = append(opts, internaloption.EnableNewAuthLibrary())
   124  	client, endpoint, err := htransport.NewClient(ctx, opts...)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	s, err := New(client)
   129  	if err != nil {
   130  		return nil, err
   131  	}
   132  	if endpoint != "" {
   133  		s.BasePath = endpoint
   134  	}
   135  	return s, nil
   136  }
   137  
   138  // New creates a new Service. It uses the provided http.Client for requests.
   139  //
   140  // Deprecated: please use NewService instead.
   141  // To provide a custom HTTP client, use option.WithHTTPClient.
   142  // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
   143  func New(client *http.Client) (*Service, error) {
   144  	if client == nil {
   145  		return nil, errors.New("client is nil")
   146  	}
   147  	s := &Service{client: client, BasePath: basePath}
   148  	s.Projects = NewProjectsService(s)
   149  	return s, nil
   150  }
   151  
   152  type Service struct {
   153  	client    *http.Client
   154  	BasePath  string // API endpoint base URL
   155  	UserAgent string // optional additional User-Agent fragment
   156  
   157  	Projects *ProjectsService
   158  }
   159  
   160  func (s *Service) userAgent() string {
   161  	if s.UserAgent == "" {
   162  		return googleapi.UserAgent
   163  	}
   164  	return googleapi.UserAgent + " " + s.UserAgent
   165  }
   166  
   167  func NewProjectsService(s *Service) *ProjectsService {
   168  	rs := &ProjectsService{s: s}
   169  	rs.Locations = NewProjectsLocationsService(s)
   170  	return rs
   171  }
   172  
   173  type ProjectsService struct {
   174  	s *Service
   175  
   176  	Locations *ProjectsLocationsService
   177  }
   178  
   179  func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
   180  	rs := &ProjectsLocationsService{s: s}
   181  	rs.Connections = NewProjectsLocationsConnectionsService(s)
   182  	return rs
   183  }
   184  
   185  type ProjectsLocationsService struct {
   186  	s *Service
   187  
   188  	Connections *ProjectsLocationsConnectionsService
   189  }
   190  
   191  func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnectionsService {
   192  	rs := &ProjectsLocationsConnectionsService{s: s}
   193  	return rs
   194  }
   195  
   196  type ProjectsLocationsConnectionsService struct {
   197  	s *Service
   198  }
   199  
   200  // AuditConfig: Specifies the audit configuration for a service. The
   201  // configuration determines which permission types are logged, and what
   202  // identities, if any, are exempted from logging. An AuditConfig must have one
   203  // or more AuditLogConfigs. If there are AuditConfigs for both `allServices`
   204  // and a specific service, the union of the two AuditConfigs is used for that
   205  // service: the log_types specified in each AuditConfig are enabled, and the
   206  // exempted_members in each AuditLogConfig are exempted. Example Policy with
   207  // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices",
   208  // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [
   209  // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type":
   210  // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com",
   211  // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type":
   212  // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For
   213  // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
   214  // logging. It also exempts `jose@example.com` from DATA_READ logging, and
   215  // `aliya@example.com` from DATA_WRITE logging.
   216  type AuditConfig struct {
   217  	// AuditLogConfigs: The configuration for logging of each type of permission.
   218  	AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"`
   219  	// Service: Specifies a service that will be enabled for audit logging. For
   220  	// example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices`
   221  	// is a special value that covers all services.
   222  	Service string `json:"service,omitempty"`
   223  	// ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to
   224  	// unconditionally include in API requests. By default, fields with empty or
   225  	// default values are omitted from API requests. See
   226  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   227  	// details.
   228  	ForceSendFields []string `json:"-"`
   229  	// NullFields is a list of field names (e.g. "AuditLogConfigs") to include in
   230  	// API requests with the JSON null value. By default, fields with empty values
   231  	// are omitted from API requests. See
   232  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   233  	NullFields []string `json:"-"`
   234  }
   235  
   236  func (s *AuditConfig) MarshalJSON() ([]byte, error) {
   237  	type NoMethod AuditConfig
   238  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   239  }
   240  
   241  // AuditLogConfig: Provides the configuration for logging a type of
   242  // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ",
   243  // "exempted_members": [ "user:jose@example.com" ] }, { "log_type":
   244  // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while
   245  // exempting jose@example.com from DATA_READ logging.
   246  type AuditLogConfig struct {
   247  	// ExemptedMembers: Specifies the identities that do not cause logging for this
   248  	// type of permission. Follows the same format of Binding.members.
   249  	ExemptedMembers []string `json:"exemptedMembers,omitempty"`
   250  	// LogType: The log type that this config enables.
   251  	//
   252  	// Possible values:
   253  	//   "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this.
   254  	//   "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy
   255  	//   "DATA_WRITE" - Data writes. Example: CloudSQL Users create
   256  	//   "DATA_READ" - Data reads. Example: CloudSQL Users list
   257  	LogType string `json:"logType,omitempty"`
   258  	// ForceSendFields is a list of field names (e.g. "ExemptedMembers") to
   259  	// unconditionally include in API requests. By default, fields with empty or
   260  	// default values are omitted from API requests. See
   261  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   262  	// details.
   263  	ForceSendFields []string `json:"-"`
   264  	// NullFields is a list of field names (e.g. "ExemptedMembers") to include in
   265  	// API requests with the JSON null value. By default, fields with empty values
   266  	// are omitted from API requests. See
   267  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   268  	NullFields []string `json:"-"`
   269  }
   270  
   271  func (s *AuditLogConfig) MarshalJSON() ([]byte, error) {
   272  	type NoMethod AuditLogConfig
   273  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   274  }
   275  
   276  // AwsAccessRole: Authentication method for Amazon Web Services (AWS) that uses
   277  // Google owned Google service account to assume into customer's AWS IAM Role.
   278  type AwsAccessRole struct {
   279  	// IamRoleId: The user’s AWS IAM Role that trusts the Google-owned AWS IAM
   280  	// user Connection.
   281  	IamRoleId string `json:"iamRoleId,omitempty"`
   282  	// Identity: A unique Google-owned and Google-generated identity for the
   283  	// Connection. This identity will be used to access the user's AWS IAM Role.
   284  	Identity string `json:"identity,omitempty"`
   285  	// ForceSendFields is a list of field names (e.g. "IamRoleId") to
   286  	// unconditionally include in API requests. By default, fields with empty or
   287  	// default values are omitted from API requests. See
   288  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   289  	// details.
   290  	ForceSendFields []string `json:"-"`
   291  	// NullFields is a list of field names (e.g. "IamRoleId") to include in API
   292  	// requests with the JSON null value. By default, fields with empty values are
   293  	// omitted from API requests. See
   294  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   295  	NullFields []string `json:"-"`
   296  }
   297  
   298  func (s *AwsAccessRole) MarshalJSON() ([]byte, error) {
   299  	type NoMethod AwsAccessRole
   300  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   301  }
   302  
   303  // AwsProperties: Connection properties specific to Amazon Web Services (AWS).
   304  type AwsProperties struct {
   305  	// AccessRole: Authentication using Google owned service account to assume into
   306  	// customer's AWS IAM Role.
   307  	AccessRole *AwsAccessRole `json:"accessRole,omitempty"`
   308  	// ForceSendFields is a list of field names (e.g. "AccessRole") to
   309  	// unconditionally include in API requests. By default, fields with empty or
   310  	// default values are omitted from API requests. See
   311  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   312  	// details.
   313  	ForceSendFields []string `json:"-"`
   314  	// NullFields is a list of field names (e.g. "AccessRole") to include in API
   315  	// requests with the JSON null value. By default, fields with empty values are
   316  	// omitted from API requests. See
   317  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   318  	NullFields []string `json:"-"`
   319  }
   320  
   321  func (s *AwsProperties) MarshalJSON() ([]byte, error) {
   322  	type NoMethod AwsProperties
   323  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   324  }
   325  
   326  // AzureProperties: Container for connection properties specific to Azure.
   327  type AzureProperties struct {
   328  	// Application: Output only. The name of the Azure Active Directory
   329  	// Application.
   330  	Application string `json:"application,omitempty"`
   331  	// ClientId: Output only. The client id of the Azure Active Directory
   332  	// Application.
   333  	ClientId string `json:"clientId,omitempty"`
   334  	// CustomerTenantId: The id of customer's directory that host the data.
   335  	CustomerTenantId string `json:"customerTenantId,omitempty"`
   336  	// FederatedApplicationClientId: The client ID of the user's Azure Active
   337  	// Directory Application used for a federated connection.
   338  	FederatedApplicationClientId string `json:"federatedApplicationClientId,omitempty"`
   339  	// Identity: Output only. A unique Google-owned and Google-generated identity
   340  	// for the Connection. This identity will be used to access the user's Azure
   341  	// Active Directory Application.
   342  	Identity string `json:"identity,omitempty"`
   343  	// ObjectId: Output only. The object id of the Azure Active Directory
   344  	// Application.
   345  	ObjectId string `json:"objectId,omitempty"`
   346  	// RedirectUri: The URL user will be redirected to after granting consent
   347  	// during connection setup.
   348  	RedirectUri string `json:"redirectUri,omitempty"`
   349  	// ForceSendFields is a list of field names (e.g. "Application") to
   350  	// unconditionally include in API requests. By default, fields with empty or
   351  	// default values are omitted from API requests. See
   352  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   353  	// details.
   354  	ForceSendFields []string `json:"-"`
   355  	// NullFields is a list of field names (e.g. "Application") to include in API
   356  	// requests with the JSON null value. By default, fields with empty values are
   357  	// omitted from API requests. See
   358  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   359  	NullFields []string `json:"-"`
   360  }
   361  
   362  func (s *AzureProperties) MarshalJSON() ([]byte, error) {
   363  	type NoMethod AzureProperties
   364  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   365  }
   366  
   367  // Binding: Associates `members`, or principals, with a `role`.
   368  type Binding struct {
   369  	// Condition: The condition that is associated with this binding. If the
   370  	// condition evaluates to `true`, then this binding applies to the current
   371  	// request. If the condition evaluates to `false`, then this binding does not
   372  	// apply to the current request. However, a different role binding might grant
   373  	// the same role to one or more of the principals in this binding. To learn
   374  	// which resources support conditions in their IAM policies, see the IAM
   375  	// documentation
   376  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   377  	Condition *Expr `json:"condition,omitempty"`
   378  	// Members: Specifies the principals requesting access for a Google Cloud
   379  	// resource. `members` can have the following values: * `allUsers`: A special
   380  	// identifier that represents anyone who is on the internet; with or without a
   381  	// Google account. * `allAuthenticatedUsers`: A special identifier that
   382  	// represents anyone who is authenticated with a Google account or a service
   383  	// account. Does not include identities that come from external identity
   384  	// providers (IdPs) through identity federation. * `user:{emailid}`: An email
   385  	// address that represents a specific Google account. For example,
   386  	// `alice@example.com` . * `serviceAccount:{emailid}`: An email address that
   387  	// represents a Google service account. For example,
   388  	// `my-other-app@appspot.gserviceaccount.com`. *
   389  	// `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An
   390  	// identifier for a Kubernetes service account
   391  	// (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts).
   392  	// For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. *
   393  	// `group:{emailid}`: An email address that represents a Google group. For
   394  	// example, `admins@example.com`. * `domain:{domain}`: The G Suite domain
   395  	// (primary) that represents all the users of that domain. For example,
   396  	// `google.com` or `example.com`. *
   397  	// `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub
   398  	// ject/{subject_attribute_value}`: A single identity in a workforce identity
   399  	// pool. *
   400  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   401  	// group/{group_id}`: All workforce identities in a group. *
   402  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   403  	// attribute.{attribute_name}/{attribute_value}`: All workforce identities with
   404  	// a specific attribute value. *
   405  	// `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/
   406  	// *`: All identities in a workforce identity pool. *
   407  	// `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo
   408  	// rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single
   409  	// identity in a workload identity pool. *
   410  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   411  	// /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool
   412  	// group. *
   413  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   414  	// /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}
   415  	// `: All identities in a workload identity pool with a certain attribute. *
   416  	// `principalSet://iam.googleapis.com/projects/{project_number}/locations/global
   417  	// /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity
   418  	// pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus
   419  	// unique identifier) representing a user that has been recently deleted. For
   420  	// example, `alice@example.com?uid=123456789012345678901`. If the user is
   421  	// recovered, this value reverts to `user:{emailid}` and the recovered user
   422  	// retains the role in the binding. *
   423  	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
   424  	// unique identifier) representing a service account that has been recently
   425  	// deleted. For example,
   426  	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the
   427  	// service account is undeleted, this value reverts to
   428  	// `serviceAccount:{emailid}` and the undeleted service account retains the
   429  	// role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email
   430  	// address (plus unique identifier) representing a Google group that has been
   431  	// recently deleted. For example,
   432  	// `admins@example.com?uid=123456789012345678901`. If the group is recovered,
   433  	// this value reverts to `group:{emailid}` and the recovered group retains the
   434  	// role in the binding. *
   435  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool
   436  	// _id}/subject/{subject_attribute_value}`: Deleted single identity in a
   437  	// workforce identity pool. For example,
   438  	// `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po
   439  	// ol-id/subject/my-subject-attribute-value`.
   440  	Members []string `json:"members,omitempty"`
   441  	// Role: Role that is assigned to the list of `members`, or principals. For
   442  	// example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview
   443  	// of the IAM roles and permissions, see the IAM documentation
   444  	// (https://cloud.google.com/iam/docs/roles-overview). For a list of the
   445  	// available pre-defined roles, see here
   446  	// (https://cloud.google.com/iam/docs/understanding-roles).
   447  	Role string `json:"role,omitempty"`
   448  	// ForceSendFields is a list of field names (e.g. "Condition") to
   449  	// unconditionally include in API requests. By default, fields with empty or
   450  	// default values are omitted from API requests. See
   451  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   452  	// details.
   453  	ForceSendFields []string `json:"-"`
   454  	// NullFields is a list of field names (e.g. "Condition") to include in API
   455  	// requests with the JSON null value. By default, fields with empty values are
   456  	// omitted from API requests. See
   457  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   458  	NullFields []string `json:"-"`
   459  }
   460  
   461  func (s *Binding) MarshalJSON() ([]byte, error) {
   462  	type NoMethod Binding
   463  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   464  }
   465  
   466  // CloudResourceProperties: Container for connection properties for delegation
   467  // of access to GCP resources.
   468  type CloudResourceProperties struct {
   469  	// ServiceAccountId: Output only. The account ID of the service created for the
   470  	// purpose of this connection. The service account does not have any
   471  	// permissions associated with it when it is created. After creation, customers
   472  	// delegate permissions to the service account. When the connection is used in
   473  	// the context of an operation in BigQuery, the service account will be used to
   474  	// connect to the desired resources in GCP. The account ID is in the form of:
   475  	// @gcp-sa-bigquery-cloudresource.iam.gserviceaccount.com
   476  	ServiceAccountId string `json:"serviceAccountId,omitempty"`
   477  	// ForceSendFields is a list of field names (e.g. "ServiceAccountId") to
   478  	// unconditionally include in API requests. By default, fields with empty or
   479  	// default values are omitted from API requests. See
   480  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   481  	// details.
   482  	ForceSendFields []string `json:"-"`
   483  	// NullFields is a list of field names (e.g. "ServiceAccountId") to include in
   484  	// API requests with the JSON null value. By default, fields with empty values
   485  	// are omitted from API requests. See
   486  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   487  	NullFields []string `json:"-"`
   488  }
   489  
   490  func (s *CloudResourceProperties) MarshalJSON() ([]byte, error) {
   491  	type NoMethod CloudResourceProperties
   492  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   493  }
   494  
   495  // CloudSpannerProperties: Connection properties specific to Cloud Spanner.
   496  type CloudSpannerProperties struct {
   497  	// Database: Cloud Spanner database in the form `project/instance/database'
   498  	Database string `json:"database,omitempty"`
   499  	// DatabaseRole: Optional. Cloud Spanner database role for fine-grained access
   500  	// control. The Cloud Spanner admin should have provisioned the database role
   501  	// with appropriate permissions, such as `SELECT` and `INSERT`. Other users
   502  	// should only use roles provided by their Cloud Spanner admins. For more
   503  	// details, see [About fine-grained access control]
   504  	// (https://cloud.google.com/spanner/docs/fgac-about). REQUIRES: The database
   505  	// role name must start with a letter, and can only contain letters, numbers,
   506  	// and underscores.
   507  	DatabaseRole string `json:"databaseRole,omitempty"`
   508  	// MaxParallelism: Allows setting max parallelism per query when executing on
   509  	// Spanner independent compute resources. If unspecified, default values of
   510  	// parallelism are chosen that are dependent on the Cloud Spanner instance
   511  	// configuration. REQUIRES: `use_parallelism` must be set. REQUIRES:
   512  	// `use_data_boost` must be set.
   513  	MaxParallelism int64 `json:"maxParallelism,omitempty"`
   514  	// UseDataBoost: If set, the request will be executed via Spanner independent
   515  	// compute resources. REQUIRES: `use_parallelism` must be set.
   516  	UseDataBoost bool `json:"useDataBoost,omitempty"`
   517  	// UseParallelism: If parallelism should be used when reading from Cloud
   518  	// Spanner
   519  	UseParallelism bool `json:"useParallelism,omitempty"`
   520  	// UseServerlessAnalytics: Deprecated: prefer use_data_boost instead. If the
   521  	// serverless analytics service should be used to read data from Cloud Spanner.
   522  	// Note: `use_parallelism` must be set when using serverless analytics.
   523  	UseServerlessAnalytics bool `json:"useServerlessAnalytics,omitempty"`
   524  	// ForceSendFields is a list of field names (e.g. "Database") to
   525  	// unconditionally include in API requests. By default, fields with empty or
   526  	// default values are omitted from API requests. See
   527  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   528  	// details.
   529  	ForceSendFields []string `json:"-"`
   530  	// NullFields is a list of field names (e.g. "Database") to include in API
   531  	// requests with the JSON null value. By default, fields with empty values are
   532  	// omitted from API requests. See
   533  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   534  	NullFields []string `json:"-"`
   535  }
   536  
   537  func (s *CloudSpannerProperties) MarshalJSON() ([]byte, error) {
   538  	type NoMethod CloudSpannerProperties
   539  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   540  }
   541  
   542  // CloudSqlCredential: Credential info for the Cloud SQL.
   543  type CloudSqlCredential struct {
   544  	// Password: The password for the credential.
   545  	Password string `json:"password,omitempty"`
   546  	// Username: The username for the credential.
   547  	Username string `json:"username,omitempty"`
   548  	// ForceSendFields is a list of field names (e.g. "Password") to
   549  	// unconditionally include in API requests. By default, fields with empty or
   550  	// default values are omitted from API requests. See
   551  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   552  	// details.
   553  	ForceSendFields []string `json:"-"`
   554  	// NullFields is a list of field names (e.g. "Password") to include in API
   555  	// requests with the JSON null value. By default, fields with empty values are
   556  	// omitted from API requests. See
   557  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   558  	NullFields []string `json:"-"`
   559  }
   560  
   561  func (s *CloudSqlCredential) MarshalJSON() ([]byte, error) {
   562  	type NoMethod CloudSqlCredential
   563  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   564  }
   565  
   566  // CloudSqlProperties: Connection properties specific to the Cloud SQL.
   567  type CloudSqlProperties struct {
   568  	// Credential: Input only. Cloud SQL credential.
   569  	Credential *CloudSqlCredential `json:"credential,omitempty"`
   570  	// Database: Database name.
   571  	Database string `json:"database,omitempty"`
   572  	// InstanceId: Cloud SQL instance ID in the form `project:location:instance`.
   573  	InstanceId string `json:"instanceId,omitempty"`
   574  	// ServiceAccountId: Output only. The account ID of the service used for the
   575  	// purpose of this connection. When the connection is used in the context of an
   576  	// operation in BigQuery, this service account will serve as the identity being
   577  	// used for connecting to the CloudSQL instance specified in this connection.
   578  	ServiceAccountId string `json:"serviceAccountId,omitempty"`
   579  	// Type: Type of the Cloud SQL database.
   580  	//
   581  	// Possible values:
   582  	//   "DATABASE_TYPE_UNSPECIFIED" - Unspecified database type.
   583  	//   "POSTGRES" - Cloud SQL for PostgreSQL.
   584  	//   "MYSQL" - Cloud SQL for MySQL.
   585  	Type string `json:"type,omitempty"`
   586  	// ForceSendFields is a list of field names (e.g. "Credential") to
   587  	// unconditionally include in API requests. By default, fields with empty or
   588  	// default values are omitted from API requests. See
   589  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   590  	// details.
   591  	ForceSendFields []string `json:"-"`
   592  	// NullFields is a list of field names (e.g. "Credential") to include in API
   593  	// requests with the JSON null value. By default, fields with empty values are
   594  	// omitted from API requests. See
   595  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   596  	NullFields []string `json:"-"`
   597  }
   598  
   599  func (s *CloudSqlProperties) MarshalJSON() ([]byte, error) {
   600  	type NoMethod CloudSqlProperties
   601  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   602  }
   603  
   604  // Connection: Configuration parameters to establish connection with an
   605  // external data source, except the credential attributes.
   606  type Connection struct {
   607  	// Aws: Amazon Web Services (AWS) properties.
   608  	Aws *AwsProperties `json:"aws,omitempty"`
   609  	// Azure: Azure properties.
   610  	Azure *AzureProperties `json:"azure,omitempty"`
   611  	// CloudResource: Cloud Resource properties.
   612  	CloudResource *CloudResourceProperties `json:"cloudResource,omitempty"`
   613  	// CloudSpanner: Cloud Spanner properties.
   614  	CloudSpanner *CloudSpannerProperties `json:"cloudSpanner,omitempty"`
   615  	// CloudSql: Cloud SQL properties.
   616  	CloudSql *CloudSqlProperties `json:"cloudSql,omitempty"`
   617  	// Configuration: Optional. Connector configuration.
   618  	Configuration *ConnectorConfiguration `json:"configuration,omitempty"`
   619  	// CreationTime: Output only. The creation timestamp of the connection.
   620  	CreationTime int64 `json:"creationTime,omitempty,string"`
   621  	// Description: User provided description.
   622  	Description string `json:"description,omitempty"`
   623  	// FriendlyName: User provided display name for the connection.
   624  	FriendlyName string `json:"friendlyName,omitempty"`
   625  	// HasCredential: Output only. True, if credential is configured for this
   626  	// connection.
   627  	HasCredential bool `json:"hasCredential,omitempty"`
   628  	// KmsKeyName: Optional. The Cloud KMS key that is used for encryption.
   629  	// Example:
   630  	// `projects/[kms_project_id]/locations/[region]/keyRings/[key_region]/cryptoKey
   631  	// s/[key]`
   632  	KmsKeyName string `json:"kmsKeyName,omitempty"`
   633  	// LastModifiedTime: Output only. The last update timestamp of the connection.
   634  	LastModifiedTime int64 `json:"lastModifiedTime,omitempty,string"`
   635  	// Name: Output only. The resource name of the connection in the form of:
   636  	// `projects/{project_id}/locations/{location_id}/connections/{connection_id}`
   637  	Name string `json:"name,omitempty"`
   638  	// SalesforceDataCloud: Optional. Salesforce DataCloud properties. This field
   639  	// is intended for use only by Salesforce partner projects. This field contains
   640  	// properties for your Salesforce DataCloud connection.
   641  	SalesforceDataCloud *SalesforceDataCloudProperties `json:"salesforceDataCloud,omitempty"`
   642  	// Spark: Spark properties.
   643  	Spark *SparkProperties `json:"spark,omitempty"`
   644  
   645  	// ServerResponse contains the HTTP response code and headers from the server.
   646  	googleapi.ServerResponse `json:"-"`
   647  	// ForceSendFields is a list of field names (e.g. "Aws") to unconditionally
   648  	// include in API requests. By default, fields with empty or default values are
   649  	// omitted from API requests. See
   650  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   651  	// details.
   652  	ForceSendFields []string `json:"-"`
   653  	// NullFields is a list of field names (e.g. "Aws") to include in API requests
   654  	// with the JSON null value. By default, fields with empty values are omitted
   655  	// from API requests. See
   656  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   657  	NullFields []string `json:"-"`
   658  }
   659  
   660  func (s *Connection) MarshalJSON() ([]byte, error) {
   661  	type NoMethod Connection
   662  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   663  }
   664  
   665  // ConnectorConfiguration: Represents concrete parameter values for Connector
   666  // Configuration.
   667  type ConnectorConfiguration struct {
   668  	// Asset: Optional. Data asset.
   669  	Asset *ConnectorConfigurationAsset `json:"asset,omitempty"`
   670  	// Authentication: Client authentication.
   671  	Authentication *ConnectorConfigurationAuthentication `json:"authentication,omitempty"`
   672  	// ConnectorId: Required. Immutable. The ID of the Connector these parameters
   673  	// are configured for.
   674  	ConnectorId string `json:"connectorId,omitempty"`
   675  	// Endpoint: Specifies how to reach the remote system this connection is
   676  	// pointing to.
   677  	Endpoint *ConnectorConfigurationEndpoint `json:"endpoint,omitempty"`
   678  	// Network: Networking configuration.
   679  	Network *ConnectorConfigurationNetwork `json:"network,omitempty"`
   680  	// ForceSendFields is a list of field names (e.g. "Asset") to unconditionally
   681  	// include in API requests. By default, fields with empty or default values are
   682  	// omitted from API requests. See
   683  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   684  	// details.
   685  	ForceSendFields []string `json:"-"`
   686  	// NullFields is a list of field names (e.g. "Asset") to include in API
   687  	// requests with the JSON null value. By default, fields with empty values are
   688  	// omitted from API requests. See
   689  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   690  	NullFields []string `json:"-"`
   691  }
   692  
   693  func (s *ConnectorConfiguration) MarshalJSON() ([]byte, error) {
   694  	type NoMethod ConnectorConfiguration
   695  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   696  }
   697  
   698  // ConnectorConfigurationAsset: Data Asset - a resource within instance of the
   699  // system, reachable under specified endpoint. For example a database name in a
   700  // SQL DB.
   701  type ConnectorConfigurationAsset struct {
   702  	// Database: Optional. Name of the database.
   703  	Database string `json:"database,omitempty"`
   704  	// GoogleCloudResource: Full Google Cloud resource name -
   705  	// https://cloud.google.com/apis/design/resource_names#full_resource_name.
   706  	// Example: `//library.googleapis.com/shelves/shelf1/books/book2`
   707  	GoogleCloudResource string `json:"googleCloudResource,omitempty"`
   708  	// ForceSendFields is a list of field names (e.g. "Database") to
   709  	// unconditionally include in API requests. By default, fields with empty or
   710  	// default values are omitted from API requests. See
   711  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   712  	// details.
   713  	ForceSendFields []string `json:"-"`
   714  	// NullFields is a list of field names (e.g. "Database") to include in API
   715  	// requests with the JSON null value. By default, fields with empty values are
   716  	// omitted from API requests. See
   717  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   718  	NullFields []string `json:"-"`
   719  }
   720  
   721  func (s *ConnectorConfigurationAsset) MarshalJSON() ([]byte, error) {
   722  	type NoMethod ConnectorConfigurationAsset
   723  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   724  }
   725  
   726  // ConnectorConfigurationAuthentication: Client authentication.
   727  type ConnectorConfigurationAuthentication struct {
   728  	// UsernamePassword: Username/password authentication.
   729  	UsernamePassword *ConnectorConfigurationUsernamePassword `json:"usernamePassword,omitempty"`
   730  	// ForceSendFields is a list of field names (e.g. "UsernamePassword") to
   731  	// unconditionally include in API requests. By default, fields with empty or
   732  	// default values are omitted from API requests. See
   733  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   734  	// details.
   735  	ForceSendFields []string `json:"-"`
   736  	// NullFields is a list of field names (e.g. "UsernamePassword") to include in
   737  	// API requests with the JSON null value. By default, fields with empty values
   738  	// are omitted from API requests. See
   739  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   740  	NullFields []string `json:"-"`
   741  }
   742  
   743  func (s *ConnectorConfigurationAuthentication) MarshalJSON() ([]byte, error) {
   744  	type NoMethod ConnectorConfigurationAuthentication
   745  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   746  }
   747  
   748  // ConnectorConfigurationEndpoint: Remote endpoint specification.
   749  type ConnectorConfigurationEndpoint struct {
   750  	// HostPort: Host and port in a format of `hostname:port` as defined in
   751  	// https://www.ietf.org/rfc/rfc3986.html#section-3.2.2 and
   752  	// https://www.ietf.org/rfc/rfc3986.html#section-3.2.3.
   753  	HostPort string `json:"hostPort,omitempty"`
   754  	// ForceSendFields is a list of field names (e.g. "HostPort") to
   755  	// unconditionally include in API requests. By default, fields with empty or
   756  	// default values are omitted from API requests. See
   757  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   758  	// details.
   759  	ForceSendFields []string `json:"-"`
   760  	// NullFields is a list of field names (e.g. "HostPort") to include in API
   761  	// requests with the JSON null value. By default, fields with empty values are
   762  	// omitted from API requests. See
   763  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   764  	NullFields []string `json:"-"`
   765  }
   766  
   767  func (s *ConnectorConfigurationEndpoint) MarshalJSON() ([]byte, error) {
   768  	type NoMethod ConnectorConfigurationEndpoint
   769  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   770  }
   771  
   772  // ConnectorConfigurationNetwork: Network related configuration.
   773  type ConnectorConfigurationNetwork struct {
   774  	// PrivateServiceConnect: Private Service Connect networking configuration.
   775  	PrivateServiceConnect *ConnectorConfigurationPrivateServiceConnect `json:"privateServiceConnect,omitempty"`
   776  	// ForceSendFields is a list of field names (e.g. "PrivateServiceConnect") to
   777  	// unconditionally include in API requests. By default, fields with empty or
   778  	// default values are omitted from API requests. See
   779  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   780  	// details.
   781  	ForceSendFields []string `json:"-"`
   782  	// NullFields is a list of field names (e.g. "PrivateServiceConnect") to
   783  	// include in API requests with the JSON null value. By default, fields with
   784  	// empty values are omitted from API requests. See
   785  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   786  	NullFields []string `json:"-"`
   787  }
   788  
   789  func (s *ConnectorConfigurationNetwork) MarshalJSON() ([]byte, error) {
   790  	type NoMethod ConnectorConfigurationNetwork
   791  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   792  }
   793  
   794  // ConnectorConfigurationPrivateServiceConnect: Private Service Connect
   795  // configuration.
   796  type ConnectorConfigurationPrivateServiceConnect struct {
   797  	// NetworkAttachment: Required. Network Attachment name in the format of
   798  	// `projects/{project}/regions/{region}/networkAttachments/{networkattachment}`.
   799  	NetworkAttachment string `json:"networkAttachment,omitempty"`
   800  	// ForceSendFields is a list of field names (e.g. "NetworkAttachment") to
   801  	// unconditionally include in API requests. By default, fields with empty or
   802  	// default values are omitted from API requests. See
   803  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   804  	// details.
   805  	ForceSendFields []string `json:"-"`
   806  	// NullFields is a list of field names (e.g. "NetworkAttachment") to include in
   807  	// API requests with the JSON null value. By default, fields with empty values
   808  	// are omitted from API requests. See
   809  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   810  	NullFields []string `json:"-"`
   811  }
   812  
   813  func (s *ConnectorConfigurationPrivateServiceConnect) MarshalJSON() ([]byte, error) {
   814  	type NoMethod ConnectorConfigurationPrivateServiceConnect
   815  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   816  }
   817  
   818  // ConnectorConfigurationSecret: Secret value parameter.
   819  type ConnectorConfigurationSecret struct {
   820  	// Plaintext: Input only. Secret as plaintext.
   821  	Plaintext string `json:"plaintext,omitempty"`
   822  	// SecretType: Output only. Indicates type of secret. Can be used to check type
   823  	// of stored secret value even if it's `INPUT_ONLY`.
   824  	//
   825  	// Possible values:
   826  	//   "SECRET_TYPE_UNSPECIFIED"
   827  	//   "PLAINTEXT"
   828  	SecretType string `json:"secretType,omitempty"`
   829  	// ForceSendFields is a list of field names (e.g. "Plaintext") to
   830  	// unconditionally include in API requests. By default, fields with empty or
   831  	// default values are omitted from API requests. See
   832  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   833  	// details.
   834  	ForceSendFields []string `json:"-"`
   835  	// NullFields is a list of field names (e.g. "Plaintext") to include in API
   836  	// requests with the JSON null value. By default, fields with empty values are
   837  	// omitted from API requests. See
   838  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   839  	NullFields []string `json:"-"`
   840  }
   841  
   842  func (s *ConnectorConfigurationSecret) MarshalJSON() ([]byte, error) {
   843  	type NoMethod ConnectorConfigurationSecret
   844  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   845  }
   846  
   847  // ConnectorConfigurationUsernamePassword: Username and Password
   848  // authentication.
   849  type ConnectorConfigurationUsernamePassword struct {
   850  	// Password: Required. Password.
   851  	Password *ConnectorConfigurationSecret `json:"password,omitempty"`
   852  	// Username: Required. Username.
   853  	Username string `json:"username,omitempty"`
   854  	// ForceSendFields is a list of field names (e.g. "Password") to
   855  	// unconditionally include in API requests. By default, fields with empty or
   856  	// default values are omitted from API requests. See
   857  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   858  	// details.
   859  	ForceSendFields []string `json:"-"`
   860  	// NullFields is a list of field names (e.g. "Password") to include in API
   861  	// requests with the JSON null value. By default, fields with empty values are
   862  	// omitted from API requests. See
   863  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   864  	NullFields []string `json:"-"`
   865  }
   866  
   867  func (s *ConnectorConfigurationUsernamePassword) MarshalJSON() ([]byte, error) {
   868  	type NoMethod ConnectorConfigurationUsernamePassword
   869  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   870  }
   871  
   872  // Empty: A generic empty message that you can re-use to avoid defining
   873  // duplicated empty messages in your APIs. A typical example is to use it as
   874  // the request or the response type of an API method. For instance: service Foo
   875  // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
   876  type Empty struct {
   877  	// ServerResponse contains the HTTP response code and headers from the server.
   878  	googleapi.ServerResponse `json:"-"`
   879  }
   880  
   881  // Expr: Represents a textual expression in the Common Expression Language
   882  // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics
   883  // of CEL are documented at https://github.com/google/cel-spec. Example
   884  // (Comparison): title: "Summary size limit" description: "Determines if a
   885  // summary is less than 100 chars" expression: "document.summary.size() < 100"
   886  // Example (Equality): title: "Requestor is owner" description: "Determines if
   887  // requestor is the document owner" expression: "document.owner ==
   888  // request.auth.claims.email" Example (Logic): title: "Public documents"
   889  // description: "Determine whether the document should be publicly visible"
   890  // expression: "document.type != 'private' && document.type != 'internal'"
   891  // Example (Data Manipulation): title: "Notification string" description:
   892  // "Create a notification string with a timestamp." expression: "'New message
   893  // received at ' + string(document.create_time)" The exact variables and
   894  // functions that may be referenced within an expression are determined by the
   895  // service that evaluates it. See the service documentation for additional
   896  // information.
   897  type Expr struct {
   898  	// Description: Optional. Description of the expression. This is a longer text
   899  	// which describes the expression, e.g. when hovered over it in a UI.
   900  	Description string `json:"description,omitempty"`
   901  	// Expression: Textual representation of an expression in Common Expression
   902  	// Language syntax.
   903  	Expression string `json:"expression,omitempty"`
   904  	// Location: Optional. String indicating the location of the expression for
   905  	// error reporting, e.g. a file name and a position in the file.
   906  	Location string `json:"location,omitempty"`
   907  	// Title: Optional. Title for the expression, i.e. a short string describing
   908  	// its purpose. This can be used e.g. in UIs which allow to enter the
   909  	// expression.
   910  	Title string `json:"title,omitempty"`
   911  	// ForceSendFields is a list of field names (e.g. "Description") to
   912  	// unconditionally include in API requests. By default, fields with empty or
   913  	// default values are omitted from API requests. See
   914  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   915  	// details.
   916  	ForceSendFields []string `json:"-"`
   917  	// NullFields is a list of field names (e.g. "Description") to include in API
   918  	// requests with the JSON null value. By default, fields with empty values are
   919  	// omitted from API requests. See
   920  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   921  	NullFields []string `json:"-"`
   922  }
   923  
   924  func (s *Expr) MarshalJSON() ([]byte, error) {
   925  	type NoMethod Expr
   926  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   927  }
   928  
   929  // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
   930  type GetIamPolicyRequest struct {
   931  	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to
   932  	// `GetIamPolicy`.
   933  	Options *GetPolicyOptions `json:"options,omitempty"`
   934  	// ForceSendFields is a list of field names (e.g. "Options") 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. "Options") 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 *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
   948  	type NoMethod GetIamPolicyRequest
   949  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   950  }
   951  
   952  // GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
   953  type GetPolicyOptions struct {
   954  	// RequestedPolicyVersion: Optional. The maximum policy version that will be
   955  	// used to format the policy. Valid values are 0, 1, and 3. Requests specifying
   956  	// an invalid value will be rejected. Requests for policies with any
   957  	// conditional role bindings must specify version 3. Policies with no
   958  	// conditional role bindings may specify any valid value or leave the field
   959  	// unset. The policy in the response might use the policy version that you
   960  	// specified, or it might use a lower policy version. For example, if you
   961  	// specify version 3, but the policy has no conditional role bindings, the
   962  	// response uses version 1. To learn which resources support conditions in
   963  	// their IAM policies, see the IAM documentation
   964  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
   965  	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
   966  	// ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to
   967  	// unconditionally include in API requests. By default, fields with empty or
   968  	// default values are omitted from API requests. See
   969  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   970  	// details.
   971  	ForceSendFields []string `json:"-"`
   972  	// NullFields is a list of field names (e.g. "RequestedPolicyVersion") to
   973  	// include in API requests with the JSON null value. By default, fields with
   974  	// empty values are omitted from API requests. See
   975  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
   976  	NullFields []string `json:"-"`
   977  }
   978  
   979  func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
   980  	type NoMethod GetPolicyOptions
   981  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
   982  }
   983  
   984  // ListConnectionsResponse: The response for ConnectionService.ListConnections.
   985  type ListConnectionsResponse struct {
   986  	// Connections: List of connections.
   987  	Connections []*Connection `json:"connections,omitempty"`
   988  	// NextPageToken: Next page token.
   989  	NextPageToken string `json:"nextPageToken,omitempty"`
   990  
   991  	// ServerResponse contains the HTTP response code and headers from the server.
   992  	googleapi.ServerResponse `json:"-"`
   993  	// ForceSendFields is a list of field names (e.g. "Connections") to
   994  	// unconditionally include in API requests. By default, fields with empty or
   995  	// default values are omitted from API requests. See
   996  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
   997  	// details.
   998  	ForceSendFields []string `json:"-"`
   999  	// NullFields is a list of field names (e.g. "Connections") to include in API
  1000  	// requests with the JSON null value. By default, fields with empty values are
  1001  	// omitted from API requests. See
  1002  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1003  	NullFields []string `json:"-"`
  1004  }
  1005  
  1006  func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) {
  1007  	type NoMethod ListConnectionsResponse
  1008  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1009  }
  1010  
  1011  // MetastoreServiceConfig: Configuration of the Dataproc Metastore Service.
  1012  type MetastoreServiceConfig struct {
  1013  	// MetastoreService: Optional. Resource name of an existing Dataproc Metastore
  1014  	// service. Example: *
  1015  	// `projects/[project_id]/locations/[region]/services/[service_id]`
  1016  	MetastoreService string `json:"metastoreService,omitempty"`
  1017  	// ForceSendFields is a list of field names (e.g. "MetastoreService") to
  1018  	// unconditionally include in API requests. By default, fields with empty or
  1019  	// default values are omitted from API requests. See
  1020  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1021  	// details.
  1022  	ForceSendFields []string `json:"-"`
  1023  	// NullFields is a list of field names (e.g. "MetastoreService") to include in
  1024  	// API requests with the JSON null value. By default, fields with empty values
  1025  	// are omitted from API requests. See
  1026  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1027  	NullFields []string `json:"-"`
  1028  }
  1029  
  1030  func (s *MetastoreServiceConfig) MarshalJSON() ([]byte, error) {
  1031  	type NoMethod MetastoreServiceConfig
  1032  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1033  }
  1034  
  1035  // Policy: An Identity and Access Management (IAM) policy, which specifies
  1036  // access controls for Google Cloud resources. A `Policy` is a collection of
  1037  // `bindings`. A `binding` binds one or more `members`, or principals, to a
  1038  // single `role`. Principals can be user accounts, service accounts, Google
  1039  // groups, and domains (such as G Suite). A `role` is a named list of
  1040  // permissions; each `role` can be an IAM predefined role or a user-created
  1041  // custom role. For some types of Google Cloud resources, a `binding` can also
  1042  // specify a `condition`, which is a logical expression that allows access to a
  1043  // resource only if the expression evaluates to `true`. A condition can add
  1044  // constraints based on attributes of the request, the resource, or both. To
  1045  // learn which resources support conditions in their IAM policies, see the IAM
  1046  // documentation
  1047  // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON
  1048  // example:** ``` { "bindings": [ { "role":
  1049  // "roles/resourcemanager.organizationAdmin", "members": [
  1050  // "user:mike@example.com", "group:admins@example.com", "domain:google.com",
  1051  // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role":
  1052  // "roles/resourcemanager.organizationViewer", "members": [
  1053  // "user:eve@example.com" ], "condition": { "title": "expirable access",
  1054  // "description": "Does not grant access after Sep 2020", "expression":
  1055  // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag":
  1056  // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: -
  1057  // members: - user:mike@example.com - group:admins@example.com -
  1058  // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
  1059  // role: roles/resourcemanager.organizationAdmin - members: -
  1060  // user:eve@example.com role: roles/resourcemanager.organizationViewer
  1061  // condition: title: expirable access description: Does not grant access after
  1062  // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z')
  1063  // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features,
  1064  // see the IAM documentation (https://cloud.google.com/iam/docs/).
  1065  type Policy struct {
  1066  	// AuditConfigs: Specifies cloud audit logging configuration for this policy.
  1067  	AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"`
  1068  	// Bindings: Associates a list of `members`, or principals, with a `role`.
  1069  	// Optionally, may specify a `condition` that determines how and when the
  1070  	// `bindings` are applied. Each of the `bindings` must contain at least one
  1071  	// principal. The `bindings` in a `Policy` can refer to up to 1,500 principals;
  1072  	// up to 250 of these principals can be Google groups. Each occurrence of a
  1073  	// principal counts towards these limits. For example, if the `bindings` grant
  1074  	// 50 different roles to `user:alice@example.com`, and not to any other
  1075  	// principal, then you can add another 1,450 principals to the `bindings` in
  1076  	// the `Policy`.
  1077  	Bindings []*Binding `json:"bindings,omitempty"`
  1078  	// Etag: `etag` is used for optimistic concurrency control as a way to help
  1079  	// prevent simultaneous updates of a policy from overwriting each other. It is
  1080  	// strongly suggested that systems make use of the `etag` in the
  1081  	// read-modify-write cycle to perform policy updates in order to avoid race
  1082  	// conditions: An `etag` is returned in the response to `getIamPolicy`, and
  1083  	// systems are expected to put that etag in the request to `setIamPolicy` to
  1084  	// ensure that their change will be applied to the same version of the policy.
  1085  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1086  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1087  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1088  	// the conditions in the version `3` policy are lost.
  1089  	Etag string `json:"etag,omitempty"`
  1090  	// Version: Specifies the format of the policy. Valid values are `0`, `1`, and
  1091  	// `3`. Requests that specify an invalid value are rejected. Any operation that
  1092  	// affects conditional role bindings must specify version `3`. This requirement
  1093  	// applies to the following operations: * Getting a policy that includes a
  1094  	// conditional role binding * Adding a conditional role binding to a policy *
  1095  	// Changing a conditional role binding in a policy * Removing any role binding,
  1096  	// with or without a condition, from a policy that includes conditions
  1097  	// **Important:** If you use IAM Conditions, you must include the `etag` field
  1098  	// whenever you call `setIamPolicy`. If you omit this field, then IAM allows
  1099  	// you to overwrite a version `3` policy with a version `1` policy, and all of
  1100  	// the conditions in the version `3` policy are lost. If a policy does not
  1101  	// include any conditions, operations on that policy may specify any valid
  1102  	// version or leave the field unset. To learn which resources support
  1103  	// conditions in their IAM policies, see the IAM documentation
  1104  	// (https://cloud.google.com/iam/help/conditions/resource-policies).
  1105  	Version int64 `json:"version,omitempty"`
  1106  
  1107  	// ServerResponse contains the HTTP response code and headers from the server.
  1108  	googleapi.ServerResponse `json:"-"`
  1109  	// ForceSendFields is a list of field names (e.g. "AuditConfigs") to
  1110  	// unconditionally include in API requests. By default, fields with empty or
  1111  	// default values are omitted from API requests. See
  1112  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1113  	// details.
  1114  	ForceSendFields []string `json:"-"`
  1115  	// NullFields is a list of field names (e.g. "AuditConfigs") to include in API
  1116  	// requests with the JSON null value. By default, fields with empty values are
  1117  	// omitted from API requests. See
  1118  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1119  	NullFields []string `json:"-"`
  1120  }
  1121  
  1122  func (s *Policy) MarshalJSON() ([]byte, error) {
  1123  	type NoMethod Policy
  1124  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1125  }
  1126  
  1127  // SalesforceDataCloudProperties: Connection properties specific to Salesforce
  1128  // DataCloud. This is intended for use only by Salesforce partner projects.
  1129  type SalesforceDataCloudProperties struct {
  1130  	// Identity: Output only. A unique Google-owned and Google-generated service
  1131  	// account identity for the connection.
  1132  	Identity string `json:"identity,omitempty"`
  1133  	// InstanceUri: The URL to the user's Salesforce DataCloud instance.
  1134  	InstanceUri string `json:"instanceUri,omitempty"`
  1135  	// TenantId: The ID of the user's Salesforce tenant.
  1136  	TenantId string `json:"tenantId,omitempty"`
  1137  	// ForceSendFields is a list of field names (e.g. "Identity") to
  1138  	// unconditionally include in API requests. By default, fields with empty or
  1139  	// default values are omitted from API requests. See
  1140  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1141  	// details.
  1142  	ForceSendFields []string `json:"-"`
  1143  	// NullFields is a list of field names (e.g. "Identity") to include in API
  1144  	// requests with the JSON null value. By default, fields with empty values are
  1145  	// omitted from API requests. See
  1146  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1147  	NullFields []string `json:"-"`
  1148  }
  1149  
  1150  func (s *SalesforceDataCloudProperties) MarshalJSON() ([]byte, error) {
  1151  	type NoMethod SalesforceDataCloudProperties
  1152  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1153  }
  1154  
  1155  // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  1156  type SetIamPolicyRequest struct {
  1157  	// Policy: REQUIRED: The complete policy to be applied to the `resource`. The
  1158  	// size of the policy is limited to a few 10s of KB. An empty policy is a valid
  1159  	// policy but certain Google Cloud services (such as Projects) might reject
  1160  	// them.
  1161  	Policy *Policy `json:"policy,omitempty"`
  1162  	// UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to
  1163  	// modify. Only the fields in the mask will be modified. If no mask is
  1164  	// provided, the following default mask is used: `paths: "bindings, etag"
  1165  	UpdateMask string `json:"updateMask,omitempty"`
  1166  	// ForceSendFields is a list of field names (e.g. "Policy") to unconditionally
  1167  	// include in API requests. By default, fields with empty or default values are
  1168  	// omitted from API requests. See
  1169  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1170  	// details.
  1171  	ForceSendFields []string `json:"-"`
  1172  	// NullFields is a list of field names (e.g. "Policy") to include in API
  1173  	// requests with the JSON null value. By default, fields with empty values are
  1174  	// omitted from API requests. See
  1175  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1176  	NullFields []string `json:"-"`
  1177  }
  1178  
  1179  func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  1180  	type NoMethod SetIamPolicyRequest
  1181  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1182  }
  1183  
  1184  // SparkHistoryServerConfig: Configuration of the Spark History Server.
  1185  type SparkHistoryServerConfig struct {
  1186  	// DataprocCluster: Optional. Resource name of an existing Dataproc Cluster to
  1187  	// act as a Spark History Server for the connection. Example: *
  1188  	// `projects/[project_id]/regions/[region]/clusters/[cluster_name]`
  1189  	DataprocCluster string `json:"dataprocCluster,omitempty"`
  1190  	// ForceSendFields is a list of field names (e.g. "DataprocCluster") to
  1191  	// unconditionally include in API requests. By default, fields with empty or
  1192  	// default values are omitted from API requests. See
  1193  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1194  	// details.
  1195  	ForceSendFields []string `json:"-"`
  1196  	// NullFields is a list of field names (e.g. "DataprocCluster") to include in
  1197  	// API requests with the JSON null value. By default, fields with empty values
  1198  	// are omitted from API requests. See
  1199  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1200  	NullFields []string `json:"-"`
  1201  }
  1202  
  1203  func (s *SparkHistoryServerConfig) MarshalJSON() ([]byte, error) {
  1204  	type NoMethod SparkHistoryServerConfig
  1205  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1206  }
  1207  
  1208  // SparkProperties: Container for connection properties to execute stored
  1209  // procedures for Apache Spark.
  1210  type SparkProperties struct {
  1211  	// MetastoreServiceConfig: Optional. Dataproc Metastore Service configuration
  1212  	// for the connection.
  1213  	MetastoreServiceConfig *MetastoreServiceConfig `json:"metastoreServiceConfig,omitempty"`
  1214  	// ServiceAccountId: Output only. The account ID of the service created for the
  1215  	// purpose of this connection. The service account does not have any
  1216  	// permissions associated with it when it is created. After creation, customers
  1217  	// delegate permissions to the service account. When the connection is used in
  1218  	// the context of a stored procedure for Apache Spark in BigQuery, the service
  1219  	// account is used to connect to the desired resources in Google Cloud. The
  1220  	// account ID is in the form of:
  1221  	// bqcx--@gcp-sa-bigquery-consp.iam.gserviceaccount.com
  1222  	ServiceAccountId string `json:"serviceAccountId,omitempty"`
  1223  	// SparkHistoryServerConfig: Optional. Spark History Server configuration for
  1224  	// the connection.
  1225  	SparkHistoryServerConfig *SparkHistoryServerConfig `json:"sparkHistoryServerConfig,omitempty"`
  1226  	// ForceSendFields is a list of field names (e.g. "MetastoreServiceConfig") to
  1227  	// unconditionally include in API requests. By default, fields with empty or
  1228  	// default values are omitted from API requests. See
  1229  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1230  	// details.
  1231  	ForceSendFields []string `json:"-"`
  1232  	// NullFields is a list of field names (e.g. "MetastoreServiceConfig") to
  1233  	// include in API requests with the JSON null value. By default, fields with
  1234  	// empty values are omitted from API requests. See
  1235  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1236  	NullFields []string `json:"-"`
  1237  }
  1238  
  1239  func (s *SparkProperties) MarshalJSON() ([]byte, error) {
  1240  	type NoMethod SparkProperties
  1241  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1242  }
  1243  
  1244  // TestIamPermissionsRequest: Request message for `TestIamPermissions` method.
  1245  type TestIamPermissionsRequest struct {
  1246  	// Permissions: The set of permissions to check for the `resource`. Permissions
  1247  	// with wildcards (such as `*` or `storage.*`) are not allowed. For more
  1248  	// information see IAM Overview
  1249  	// (https://cloud.google.com/iam/docs/overview#permissions).
  1250  	Permissions []string `json:"permissions,omitempty"`
  1251  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1252  	// unconditionally include in API requests. By default, fields with empty or
  1253  	// default values are omitted from API requests. See
  1254  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1255  	// details.
  1256  	ForceSendFields []string `json:"-"`
  1257  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1258  	// requests with the JSON null value. By default, fields with empty values are
  1259  	// omitted from API requests. See
  1260  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1261  	NullFields []string `json:"-"`
  1262  }
  1263  
  1264  func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  1265  	type NoMethod TestIamPermissionsRequest
  1266  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1267  }
  1268  
  1269  // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  1270  // method.
  1271  type TestIamPermissionsResponse struct {
  1272  	// Permissions: A subset of `TestPermissionsRequest.permissions` that the
  1273  	// caller is allowed.
  1274  	Permissions []string `json:"permissions,omitempty"`
  1275  
  1276  	// ServerResponse contains the HTTP response code and headers from the server.
  1277  	googleapi.ServerResponse `json:"-"`
  1278  	// ForceSendFields is a list of field names (e.g. "Permissions") to
  1279  	// unconditionally include in API requests. By default, fields with empty or
  1280  	// default values are omitted from API requests. See
  1281  	// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
  1282  	// details.
  1283  	ForceSendFields []string `json:"-"`
  1284  	// NullFields is a list of field names (e.g. "Permissions") to include in API
  1285  	// requests with the JSON null value. By default, fields with empty values are
  1286  	// omitted from API requests. See
  1287  	// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
  1288  	NullFields []string `json:"-"`
  1289  }
  1290  
  1291  func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  1292  	type NoMethod TestIamPermissionsResponse
  1293  	return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields)
  1294  }
  1295  
  1296  type ProjectsLocationsConnectionsCreateCall struct {
  1297  	s          *Service
  1298  	parent     string
  1299  	connection *Connection
  1300  	urlParams_ gensupport.URLParams
  1301  	ctx_       context.Context
  1302  	header_    http.Header
  1303  }
  1304  
  1305  // Create: Creates a new connection.
  1306  //
  1307  //   - parent: Parent resource name. Must be in the format
  1308  //     `projects/{project_id}/locations/{location_id}`.
  1309  func (r *ProjectsLocationsConnectionsService) Create(parent string, connection *Connection) *ProjectsLocationsConnectionsCreateCall {
  1310  	c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1311  	c.parent = parent
  1312  	c.connection = connection
  1313  	return c
  1314  }
  1315  
  1316  // ConnectionId sets the optional parameter "connectionId": Connection id that
  1317  // should be assigned to the created connection.
  1318  func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall {
  1319  	c.urlParams_.Set("connectionId", connectionId)
  1320  	return c
  1321  }
  1322  
  1323  // Fields allows partial responses to be retrieved. See
  1324  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1325  // details.
  1326  func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall {
  1327  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1328  	return c
  1329  }
  1330  
  1331  // Context sets the context to be used in this call's Do method.
  1332  func (c *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall {
  1333  	c.ctx_ = ctx
  1334  	return c
  1335  }
  1336  
  1337  // Header returns a http.Header that can be modified by the caller to add
  1338  // headers to the request.
  1339  func (c *ProjectsLocationsConnectionsCreateCall) Header() http.Header {
  1340  	if c.header_ == nil {
  1341  		c.header_ = make(http.Header)
  1342  	}
  1343  	return c.header_
  1344  }
  1345  
  1346  func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Response, error) {
  1347  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1348  	var body io.Reader = nil
  1349  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection)
  1350  	if err != nil {
  1351  		return nil, err
  1352  	}
  1353  	c.urlParams_.Set("alt", alt)
  1354  	c.urlParams_.Set("prettyPrint", "false")
  1355  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections")
  1356  	urls += "?" + c.urlParams_.Encode()
  1357  	req, err := http.NewRequest("POST", urls, body)
  1358  	if err != nil {
  1359  		return nil, err
  1360  	}
  1361  	req.Header = reqHeaders
  1362  	googleapi.Expand(req.URL, map[string]string{
  1363  		"parent": c.parent,
  1364  	})
  1365  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1366  }
  1367  
  1368  // Do executes the "bigqueryconnection.projects.locations.connections.create" call.
  1369  // Any non-2xx status code is an error. Response headers are in either
  1370  // *Connection.ServerResponse.Header or (if a response was returned at all) in
  1371  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1372  // whether the returned error was because http.StatusNotModified was returned.
  1373  func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Connection, error) {
  1374  	gensupport.SetOptions(c.urlParams_, opts...)
  1375  	res, err := c.doRequest("json")
  1376  	if res != nil && res.StatusCode == http.StatusNotModified {
  1377  		if res.Body != nil {
  1378  			res.Body.Close()
  1379  		}
  1380  		return nil, gensupport.WrapError(&googleapi.Error{
  1381  			Code:   res.StatusCode,
  1382  			Header: res.Header,
  1383  		})
  1384  	}
  1385  	if err != nil {
  1386  		return nil, err
  1387  	}
  1388  	defer googleapi.CloseBody(res)
  1389  	if err := googleapi.CheckResponse(res); err != nil {
  1390  		return nil, gensupport.WrapError(err)
  1391  	}
  1392  	ret := &Connection{
  1393  		ServerResponse: googleapi.ServerResponse{
  1394  			Header:         res.Header,
  1395  			HTTPStatusCode: res.StatusCode,
  1396  		},
  1397  	}
  1398  	target := &ret
  1399  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1400  		return nil, err
  1401  	}
  1402  	return ret, nil
  1403  }
  1404  
  1405  type ProjectsLocationsConnectionsDeleteCall struct {
  1406  	s          *Service
  1407  	name       string
  1408  	urlParams_ gensupport.URLParams
  1409  	ctx_       context.Context
  1410  	header_    http.Header
  1411  }
  1412  
  1413  // Delete: Deletes connection and associated credential.
  1414  //
  1415  //   - name: Name of the deleted connection, for example:
  1416  //     `projects/{project_id}/locations/{location_id}/connections/{connection_id}`.
  1417  func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall {
  1418  	c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1419  	c.name = name
  1420  	return c
  1421  }
  1422  
  1423  // Fields allows partial responses to be retrieved. See
  1424  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1425  // details.
  1426  func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall {
  1427  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1428  	return c
  1429  }
  1430  
  1431  // Context sets the context to be used in this call's Do method.
  1432  func (c *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall {
  1433  	c.ctx_ = ctx
  1434  	return c
  1435  }
  1436  
  1437  // Header returns a http.Header that can be modified by the caller to add
  1438  // headers to the request.
  1439  func (c *ProjectsLocationsConnectionsDeleteCall) Header() http.Header {
  1440  	if c.header_ == nil {
  1441  		c.header_ = make(http.Header)
  1442  	}
  1443  	return c.header_
  1444  }
  1445  
  1446  func (c *ProjectsLocationsConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) {
  1447  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1448  	var body io.Reader = nil
  1449  	c.urlParams_.Set("alt", alt)
  1450  	c.urlParams_.Set("prettyPrint", "false")
  1451  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1452  	urls += "?" + c.urlParams_.Encode()
  1453  	req, err := http.NewRequest("DELETE", urls, body)
  1454  	if err != nil {
  1455  		return nil, err
  1456  	}
  1457  	req.Header = reqHeaders
  1458  	googleapi.Expand(req.URL, map[string]string{
  1459  		"name": c.name,
  1460  	})
  1461  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1462  }
  1463  
  1464  // Do executes the "bigqueryconnection.projects.locations.connections.delete" call.
  1465  // Any non-2xx status code is an error. Response headers are in either
  1466  // *Empty.ServerResponse.Header or (if a response was returned at all) in
  1467  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1468  // whether the returned error was because http.StatusNotModified was returned.
  1469  func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1470  	gensupport.SetOptions(c.urlParams_, opts...)
  1471  	res, err := c.doRequest("json")
  1472  	if res != nil && res.StatusCode == http.StatusNotModified {
  1473  		if res.Body != nil {
  1474  			res.Body.Close()
  1475  		}
  1476  		return nil, gensupport.WrapError(&googleapi.Error{
  1477  			Code:   res.StatusCode,
  1478  			Header: res.Header,
  1479  		})
  1480  	}
  1481  	if err != nil {
  1482  		return nil, err
  1483  	}
  1484  	defer googleapi.CloseBody(res)
  1485  	if err := googleapi.CheckResponse(res); err != nil {
  1486  		return nil, gensupport.WrapError(err)
  1487  	}
  1488  	ret := &Empty{
  1489  		ServerResponse: googleapi.ServerResponse{
  1490  			Header:         res.Header,
  1491  			HTTPStatusCode: res.StatusCode,
  1492  		},
  1493  	}
  1494  	target := &ret
  1495  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1496  		return nil, err
  1497  	}
  1498  	return ret, nil
  1499  }
  1500  
  1501  type ProjectsLocationsConnectionsGetCall struct {
  1502  	s            *Service
  1503  	name         string
  1504  	urlParams_   gensupport.URLParams
  1505  	ifNoneMatch_ string
  1506  	ctx_         context.Context
  1507  	header_      http.Header
  1508  }
  1509  
  1510  // Get: Returns specified connection.
  1511  //
  1512  //   - name: Name of the requested connection, for example:
  1513  //     `projects/{project_id}/locations/{location_id}/connections/{connection_id}`.
  1514  func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall {
  1515  	c := &ProjectsLocationsConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1516  	c.name = name
  1517  	return c
  1518  }
  1519  
  1520  // Fields allows partial responses to be retrieved. See
  1521  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1522  // details.
  1523  func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall {
  1524  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1525  	return c
  1526  }
  1527  
  1528  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1529  // object's ETag matches the given value. This is useful for getting updates
  1530  // only after the object has changed since the last request.
  1531  func (c *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall {
  1532  	c.ifNoneMatch_ = entityTag
  1533  	return c
  1534  }
  1535  
  1536  // Context sets the context to be used in this call's Do method.
  1537  func (c *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall {
  1538  	c.ctx_ = ctx
  1539  	return c
  1540  }
  1541  
  1542  // Header returns a http.Header that can be modified by the caller to add
  1543  // headers to the request.
  1544  func (c *ProjectsLocationsConnectionsGetCall) Header() http.Header {
  1545  	if c.header_ == nil {
  1546  		c.header_ = make(http.Header)
  1547  	}
  1548  	return c.header_
  1549  }
  1550  
  1551  func (c *ProjectsLocationsConnectionsGetCall) doRequest(alt string) (*http.Response, error) {
  1552  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1553  	if c.ifNoneMatch_ != "" {
  1554  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1555  	}
  1556  	var body io.Reader = nil
  1557  	c.urlParams_.Set("alt", alt)
  1558  	c.urlParams_.Set("prettyPrint", "false")
  1559  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1560  	urls += "?" + c.urlParams_.Encode()
  1561  	req, err := http.NewRequest("GET", urls, body)
  1562  	if err != nil {
  1563  		return nil, err
  1564  	}
  1565  	req.Header = reqHeaders
  1566  	googleapi.Expand(req.URL, map[string]string{
  1567  		"name": c.name,
  1568  	})
  1569  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1570  }
  1571  
  1572  // Do executes the "bigqueryconnection.projects.locations.connections.get" call.
  1573  // Any non-2xx status code is an error. Response headers are in either
  1574  // *Connection.ServerResponse.Header or (if a response was returned at all) in
  1575  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1576  // whether the returned error was because http.StatusNotModified was returned.
  1577  func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*Connection, error) {
  1578  	gensupport.SetOptions(c.urlParams_, opts...)
  1579  	res, err := c.doRequest("json")
  1580  	if res != nil && res.StatusCode == http.StatusNotModified {
  1581  		if res.Body != nil {
  1582  			res.Body.Close()
  1583  		}
  1584  		return nil, gensupport.WrapError(&googleapi.Error{
  1585  			Code:   res.StatusCode,
  1586  			Header: res.Header,
  1587  		})
  1588  	}
  1589  	if err != nil {
  1590  		return nil, err
  1591  	}
  1592  	defer googleapi.CloseBody(res)
  1593  	if err := googleapi.CheckResponse(res); err != nil {
  1594  		return nil, gensupport.WrapError(err)
  1595  	}
  1596  	ret := &Connection{
  1597  		ServerResponse: googleapi.ServerResponse{
  1598  			Header:         res.Header,
  1599  			HTTPStatusCode: res.StatusCode,
  1600  		},
  1601  	}
  1602  	target := &ret
  1603  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1604  		return nil, err
  1605  	}
  1606  	return ret, nil
  1607  }
  1608  
  1609  type ProjectsLocationsConnectionsGetIamPolicyCall struct {
  1610  	s                   *Service
  1611  	resource            string
  1612  	getiampolicyrequest *GetIamPolicyRequest
  1613  	urlParams_          gensupport.URLParams
  1614  	ctx_                context.Context
  1615  	header_             http.Header
  1616  }
  1617  
  1618  // GetIamPolicy: Gets the access control policy for a resource. Returns an
  1619  // empty policy if the resource exists and does not have a policy set.
  1620  //
  1621  //   - resource: REQUIRED: The resource for which the policy is being requested.
  1622  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  1623  //     for the appropriate value for this field.
  1624  func (r *ProjectsLocationsConnectionsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsConnectionsGetIamPolicyCall {
  1625  	c := &ProjectsLocationsConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1626  	c.resource = resource
  1627  	c.getiampolicyrequest = getiampolicyrequest
  1628  	return c
  1629  }
  1630  
  1631  // Fields allows partial responses to be retrieved. See
  1632  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1633  // details.
  1634  func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetIamPolicyCall {
  1635  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1636  	return c
  1637  }
  1638  
  1639  // Context sets the context to be used in this call's Do method.
  1640  func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetIamPolicyCall {
  1641  	c.ctx_ = ctx
  1642  	return c
  1643  }
  1644  
  1645  // Header returns a http.Header that can be modified by the caller to add
  1646  // headers to the request.
  1647  func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Header() http.Header {
  1648  	if c.header_ == nil {
  1649  		c.header_ = make(http.Header)
  1650  	}
  1651  	return c.header_
  1652  }
  1653  
  1654  func (c *ProjectsLocationsConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  1655  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1656  	var body io.Reader = nil
  1657  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  1658  	if err != nil {
  1659  		return nil, err
  1660  	}
  1661  	c.urlParams_.Set("alt", alt)
  1662  	c.urlParams_.Set("prettyPrint", "false")
  1663  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  1664  	urls += "?" + c.urlParams_.Encode()
  1665  	req, err := http.NewRequest("POST", urls, body)
  1666  	if err != nil {
  1667  		return nil, err
  1668  	}
  1669  	req.Header = reqHeaders
  1670  	googleapi.Expand(req.URL, map[string]string{
  1671  		"resource": c.resource,
  1672  	})
  1673  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1674  }
  1675  
  1676  // Do executes the "bigqueryconnection.projects.locations.connections.getIamPolicy" call.
  1677  // Any non-2xx status code is an error. Response headers are in either
  1678  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  1679  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1680  // whether the returned error was because http.StatusNotModified was returned.
  1681  func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  1682  	gensupport.SetOptions(c.urlParams_, opts...)
  1683  	res, err := c.doRequest("json")
  1684  	if res != nil && res.StatusCode == http.StatusNotModified {
  1685  		if res.Body != nil {
  1686  			res.Body.Close()
  1687  		}
  1688  		return nil, gensupport.WrapError(&googleapi.Error{
  1689  			Code:   res.StatusCode,
  1690  			Header: res.Header,
  1691  		})
  1692  	}
  1693  	if err != nil {
  1694  		return nil, err
  1695  	}
  1696  	defer googleapi.CloseBody(res)
  1697  	if err := googleapi.CheckResponse(res); err != nil {
  1698  		return nil, gensupport.WrapError(err)
  1699  	}
  1700  	ret := &Policy{
  1701  		ServerResponse: googleapi.ServerResponse{
  1702  			Header:         res.Header,
  1703  			HTTPStatusCode: res.StatusCode,
  1704  		},
  1705  	}
  1706  	target := &ret
  1707  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1708  		return nil, err
  1709  	}
  1710  	return ret, nil
  1711  }
  1712  
  1713  type ProjectsLocationsConnectionsListCall struct {
  1714  	s            *Service
  1715  	parent       string
  1716  	urlParams_   gensupport.URLParams
  1717  	ifNoneMatch_ string
  1718  	ctx_         context.Context
  1719  	header_      http.Header
  1720  }
  1721  
  1722  // List: Returns a list of connections in the given project.
  1723  //
  1724  //   - parent: Parent resource name. Must be in the form:
  1725  //     `projects/{project_id}/locations/{location_id}`.
  1726  func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall {
  1727  	c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1728  	c.parent = parent
  1729  	return c
  1730  }
  1731  
  1732  // PageSize sets the optional parameter "pageSize": Required. Page size.
  1733  func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall {
  1734  	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1735  	return c
  1736  }
  1737  
  1738  // PageToken sets the optional parameter "pageToken": Page token.
  1739  func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall {
  1740  	c.urlParams_.Set("pageToken", pageToken)
  1741  	return c
  1742  }
  1743  
  1744  // Fields allows partial responses to be retrieved. See
  1745  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1746  // details.
  1747  func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall {
  1748  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1749  	return c
  1750  }
  1751  
  1752  // IfNoneMatch sets an optional parameter which makes the operation fail if the
  1753  // object's ETag matches the given value. This is useful for getting updates
  1754  // only after the object has changed since the last request.
  1755  func (c *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall {
  1756  	c.ifNoneMatch_ = entityTag
  1757  	return c
  1758  }
  1759  
  1760  // Context sets the context to be used in this call's Do method.
  1761  func (c *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall {
  1762  	c.ctx_ = ctx
  1763  	return c
  1764  }
  1765  
  1766  // Header returns a http.Header that can be modified by the caller to add
  1767  // headers to the request.
  1768  func (c *ProjectsLocationsConnectionsListCall) Header() http.Header {
  1769  	if c.header_ == nil {
  1770  		c.header_ = make(http.Header)
  1771  	}
  1772  	return c.header_
  1773  }
  1774  
  1775  func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) {
  1776  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_)
  1777  	if c.ifNoneMatch_ != "" {
  1778  		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1779  	}
  1780  	var body io.Reader = nil
  1781  	c.urlParams_.Set("alt", alt)
  1782  	c.urlParams_.Set("prettyPrint", "false")
  1783  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections")
  1784  	urls += "?" + c.urlParams_.Encode()
  1785  	req, err := http.NewRequest("GET", urls, body)
  1786  	if err != nil {
  1787  		return nil, err
  1788  	}
  1789  	req.Header = reqHeaders
  1790  	googleapi.Expand(req.URL, map[string]string{
  1791  		"parent": c.parent,
  1792  	})
  1793  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1794  }
  1795  
  1796  // Do executes the "bigqueryconnection.projects.locations.connections.list" call.
  1797  // Any non-2xx status code is an error. Response headers are in either
  1798  // *ListConnectionsResponse.ServerResponse.Header or (if a response was
  1799  // returned at all) in error.(*googleapi.Error).Header. Use
  1800  // googleapi.IsNotModified to check whether the returned error was because
  1801  // http.StatusNotModified was returned.
  1802  func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) {
  1803  	gensupport.SetOptions(c.urlParams_, opts...)
  1804  	res, err := c.doRequest("json")
  1805  	if res != nil && res.StatusCode == http.StatusNotModified {
  1806  		if res.Body != nil {
  1807  			res.Body.Close()
  1808  		}
  1809  		return nil, gensupport.WrapError(&googleapi.Error{
  1810  			Code:   res.StatusCode,
  1811  			Header: res.Header,
  1812  		})
  1813  	}
  1814  	if err != nil {
  1815  		return nil, err
  1816  	}
  1817  	defer googleapi.CloseBody(res)
  1818  	if err := googleapi.CheckResponse(res); err != nil {
  1819  		return nil, gensupport.WrapError(err)
  1820  	}
  1821  	ret := &ListConnectionsResponse{
  1822  		ServerResponse: googleapi.ServerResponse{
  1823  			Header:         res.Header,
  1824  			HTTPStatusCode: res.StatusCode,
  1825  		},
  1826  	}
  1827  	target := &ret
  1828  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1829  		return nil, err
  1830  	}
  1831  	return ret, nil
  1832  }
  1833  
  1834  // Pages invokes f for each page of results.
  1835  // A non-nil error returned from f will halt the iteration.
  1836  // The provided context supersedes any context provided to the Context method.
  1837  func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error {
  1838  	c.ctx_ = ctx
  1839  	defer c.PageToken(c.urlParams_.Get("pageToken"))
  1840  	for {
  1841  		x, err := c.Do()
  1842  		if err != nil {
  1843  			return err
  1844  		}
  1845  		if err := f(x); err != nil {
  1846  			return err
  1847  		}
  1848  		if x.NextPageToken == "" {
  1849  			return nil
  1850  		}
  1851  		c.PageToken(x.NextPageToken)
  1852  	}
  1853  }
  1854  
  1855  type ProjectsLocationsConnectionsPatchCall struct {
  1856  	s          *Service
  1857  	name       string
  1858  	connection *Connection
  1859  	urlParams_ gensupport.URLParams
  1860  	ctx_       context.Context
  1861  	header_    http.Header
  1862  }
  1863  
  1864  // Patch: Updates the specified connection. For security reasons, also resets
  1865  // credential if connection properties are in the update field mask.
  1866  //
  1867  //   - name: Name of the connection to update, for example:
  1868  //     `projects/{project_id}/locations/{location_id}/connections/{connection_id}`.
  1869  func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Connection) *ProjectsLocationsConnectionsPatchCall {
  1870  	c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1871  	c.name = name
  1872  	c.connection = connection
  1873  	return c
  1874  }
  1875  
  1876  // UpdateMask sets the optional parameter "updateMask": Required. Update mask
  1877  // for the connection fields to be updated.
  1878  func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall {
  1879  	c.urlParams_.Set("updateMask", updateMask)
  1880  	return c
  1881  }
  1882  
  1883  // Fields allows partial responses to be retrieved. See
  1884  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1885  // details.
  1886  func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall {
  1887  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1888  	return c
  1889  }
  1890  
  1891  // Context sets the context to be used in this call's Do method.
  1892  func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall {
  1893  	c.ctx_ = ctx
  1894  	return c
  1895  }
  1896  
  1897  // Header returns a http.Header that can be modified by the caller to add
  1898  // headers to the request.
  1899  func (c *ProjectsLocationsConnectionsPatchCall) Header() http.Header {
  1900  	if c.header_ == nil {
  1901  		c.header_ = make(http.Header)
  1902  	}
  1903  	return c.header_
  1904  }
  1905  
  1906  func (c *ProjectsLocationsConnectionsPatchCall) doRequest(alt string) (*http.Response, error) {
  1907  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  1908  	var body io.Reader = nil
  1909  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection)
  1910  	if err != nil {
  1911  		return nil, err
  1912  	}
  1913  	c.urlParams_.Set("alt", alt)
  1914  	c.urlParams_.Set("prettyPrint", "false")
  1915  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1916  	urls += "?" + c.urlParams_.Encode()
  1917  	req, err := http.NewRequest("PATCH", urls, body)
  1918  	if err != nil {
  1919  		return nil, err
  1920  	}
  1921  	req.Header = reqHeaders
  1922  	googleapi.Expand(req.URL, map[string]string{
  1923  		"name": c.name,
  1924  	})
  1925  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1926  }
  1927  
  1928  // Do executes the "bigqueryconnection.projects.locations.connections.patch" call.
  1929  // Any non-2xx status code is an error. Response headers are in either
  1930  // *Connection.ServerResponse.Header or (if a response was returned at all) in
  1931  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  1932  // whether the returned error was because http.StatusNotModified was returned.
  1933  func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Connection, error) {
  1934  	gensupport.SetOptions(c.urlParams_, opts...)
  1935  	res, err := c.doRequest("json")
  1936  	if res != nil && res.StatusCode == http.StatusNotModified {
  1937  		if res.Body != nil {
  1938  			res.Body.Close()
  1939  		}
  1940  		return nil, gensupport.WrapError(&googleapi.Error{
  1941  			Code:   res.StatusCode,
  1942  			Header: res.Header,
  1943  		})
  1944  	}
  1945  	if err != nil {
  1946  		return nil, err
  1947  	}
  1948  	defer googleapi.CloseBody(res)
  1949  	if err := googleapi.CheckResponse(res); err != nil {
  1950  		return nil, gensupport.WrapError(err)
  1951  	}
  1952  	ret := &Connection{
  1953  		ServerResponse: googleapi.ServerResponse{
  1954  			Header:         res.Header,
  1955  			HTTPStatusCode: res.StatusCode,
  1956  		},
  1957  	}
  1958  	target := &ret
  1959  	if err := gensupport.DecodeResponse(target, res); err != nil {
  1960  		return nil, err
  1961  	}
  1962  	return ret, nil
  1963  }
  1964  
  1965  type ProjectsLocationsConnectionsSetIamPolicyCall struct {
  1966  	s                   *Service
  1967  	resource            string
  1968  	setiampolicyrequest *SetIamPolicyRequest
  1969  	urlParams_          gensupport.URLParams
  1970  	ctx_                context.Context
  1971  	header_             http.Header
  1972  }
  1973  
  1974  // SetIamPolicy: Sets the access control policy on the specified resource.
  1975  // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`,
  1976  // and `PERMISSION_DENIED` errors.
  1977  //
  1978  //   - resource: REQUIRED: The resource for which the policy is being specified.
  1979  //     See Resource names (https://cloud.google.com/apis/design/resource_names)
  1980  //     for the appropriate value for this field.
  1981  func (r *ProjectsLocationsConnectionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionsSetIamPolicyCall {
  1982  	c := &ProjectsLocationsConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1983  	c.resource = resource
  1984  	c.setiampolicyrequest = setiampolicyrequest
  1985  	return c
  1986  }
  1987  
  1988  // Fields allows partial responses to be retrieved. See
  1989  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  1990  // details.
  1991  func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSetIamPolicyCall {
  1992  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1993  	return c
  1994  }
  1995  
  1996  // Context sets the context to be used in this call's Do method.
  1997  func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSetIamPolicyCall {
  1998  	c.ctx_ = ctx
  1999  	return c
  2000  }
  2001  
  2002  // Header returns a http.Header that can be modified by the caller to add
  2003  // headers to the request.
  2004  func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Header() http.Header {
  2005  	if c.header_ == nil {
  2006  		c.header_ = make(http.Header)
  2007  	}
  2008  	return c.header_
  2009  }
  2010  
  2011  func (c *ProjectsLocationsConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  2012  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2013  	var body io.Reader = nil
  2014  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  2015  	if err != nil {
  2016  		return nil, err
  2017  	}
  2018  	c.urlParams_.Set("alt", alt)
  2019  	c.urlParams_.Set("prettyPrint", "false")
  2020  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  2021  	urls += "?" + c.urlParams_.Encode()
  2022  	req, err := http.NewRequest("POST", urls, body)
  2023  	if err != nil {
  2024  		return nil, err
  2025  	}
  2026  	req.Header = reqHeaders
  2027  	googleapi.Expand(req.URL, map[string]string{
  2028  		"resource": c.resource,
  2029  	})
  2030  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2031  }
  2032  
  2033  // Do executes the "bigqueryconnection.projects.locations.connections.setIamPolicy" call.
  2034  // Any non-2xx status code is an error. Response headers are in either
  2035  // *Policy.ServerResponse.Header or (if a response was returned at all) in
  2036  // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  2037  // whether the returned error was because http.StatusNotModified was returned.
  2038  func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  2039  	gensupport.SetOptions(c.urlParams_, opts...)
  2040  	res, err := c.doRequest("json")
  2041  	if res != nil && res.StatusCode == http.StatusNotModified {
  2042  		if res.Body != nil {
  2043  			res.Body.Close()
  2044  		}
  2045  		return nil, gensupport.WrapError(&googleapi.Error{
  2046  			Code:   res.StatusCode,
  2047  			Header: res.Header,
  2048  		})
  2049  	}
  2050  	if err != nil {
  2051  		return nil, err
  2052  	}
  2053  	defer googleapi.CloseBody(res)
  2054  	if err := googleapi.CheckResponse(res); err != nil {
  2055  		return nil, gensupport.WrapError(err)
  2056  	}
  2057  	ret := &Policy{
  2058  		ServerResponse: googleapi.ServerResponse{
  2059  			Header:         res.Header,
  2060  			HTTPStatusCode: res.StatusCode,
  2061  		},
  2062  	}
  2063  	target := &ret
  2064  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2065  		return nil, err
  2066  	}
  2067  	return ret, nil
  2068  }
  2069  
  2070  type ProjectsLocationsConnectionsTestIamPermissionsCall struct {
  2071  	s                         *Service
  2072  	resource                  string
  2073  	testiampermissionsrequest *TestIamPermissionsRequest
  2074  	urlParams_                gensupport.URLParams
  2075  	ctx_                      context.Context
  2076  	header_                   http.Header
  2077  }
  2078  
  2079  // TestIamPermissions: Returns permissions that a caller has on the specified
  2080  // resource. If the resource does not exist, this will return an empty set of
  2081  // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be
  2082  // used for building permission-aware UIs and command-line tools, not for
  2083  // authorization checking. This operation may "fail open" without warning.
  2084  //
  2085  //   - resource: REQUIRED: The resource for which the policy detail is being
  2086  //     requested. See Resource names
  2087  //     (https://cloud.google.com/apis/design/resource_names) for the appropriate
  2088  //     value for this field.
  2089  func (r *ProjectsLocationsConnectionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionsTestIamPermissionsCall {
  2090  	c := &ProjectsLocationsConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2091  	c.resource = resource
  2092  	c.testiampermissionsrequest = testiampermissionsrequest
  2093  	return c
  2094  }
  2095  
  2096  // Fields allows partial responses to be retrieved. See
  2097  // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more
  2098  // details.
  2099  func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsTestIamPermissionsCall {
  2100  	c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2101  	return c
  2102  }
  2103  
  2104  // Context sets the context to be used in this call's Do method.
  2105  func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsTestIamPermissionsCall {
  2106  	c.ctx_ = ctx
  2107  	return c
  2108  }
  2109  
  2110  // Header returns a http.Header that can be modified by the caller to add
  2111  // headers to the request.
  2112  func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Header() http.Header {
  2113  	if c.header_ == nil {
  2114  		c.header_ = make(http.Header)
  2115  	}
  2116  	return c.header_
  2117  }
  2118  
  2119  func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  2120  	reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_)
  2121  	var body io.Reader = nil
  2122  	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  2123  	if err != nil {
  2124  		return nil, err
  2125  	}
  2126  	c.urlParams_.Set("alt", alt)
  2127  	c.urlParams_.Set("prettyPrint", "false")
  2128  	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  2129  	urls += "?" + c.urlParams_.Encode()
  2130  	req, err := http.NewRequest("POST", urls, body)
  2131  	if err != nil {
  2132  		return nil, err
  2133  	}
  2134  	req.Header = reqHeaders
  2135  	googleapi.Expand(req.URL, map[string]string{
  2136  		"resource": c.resource,
  2137  	})
  2138  	return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2139  }
  2140  
  2141  // Do executes the "bigqueryconnection.projects.locations.connections.testIamPermissions" call.
  2142  // Any non-2xx status code is an error. Response headers are in either
  2143  // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was
  2144  // returned at all) in error.(*googleapi.Error).Header. Use
  2145  // googleapi.IsNotModified to check whether the returned error was because
  2146  // http.StatusNotModified was returned.
  2147  func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  2148  	gensupport.SetOptions(c.urlParams_, opts...)
  2149  	res, err := c.doRequest("json")
  2150  	if res != nil && res.StatusCode == http.StatusNotModified {
  2151  		if res.Body != nil {
  2152  			res.Body.Close()
  2153  		}
  2154  		return nil, gensupport.WrapError(&googleapi.Error{
  2155  			Code:   res.StatusCode,
  2156  			Header: res.Header,
  2157  		})
  2158  	}
  2159  	if err != nil {
  2160  		return nil, err
  2161  	}
  2162  	defer googleapi.CloseBody(res)
  2163  	if err := googleapi.CheckResponse(res); err != nil {
  2164  		return nil, gensupport.WrapError(err)
  2165  	}
  2166  	ret := &TestIamPermissionsResponse{
  2167  		ServerResponse: googleapi.ServerResponse{
  2168  			Header:         res.Header,
  2169  			HTTPStatusCode: res.StatusCode,
  2170  		},
  2171  	}
  2172  	target := &ret
  2173  	if err := gensupport.DecodeResponse(target, res); err != nil {
  2174  		return nil, err
  2175  	}
  2176  	return ret, nil
  2177  }
  2178  

View as plain text