1// Copyright 2021 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 connectors provides access to the Connectors API. 8// 9// For product documentation, see: https://cloud.google.com/apigee/docs/api-platform/connectors/about-connectors 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/connectors/v1" 16// ... 17// ctx := context.Background() 18// connectorsService, err := connectors.NewService(ctx) 19// 20// In this example, Google Application Default Credentials are used for authentication. 21// 22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23// 24// Other authentication options 25// 26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27// 28// connectorsService, err := connectors.NewService(ctx, option.WithAPIKey("AIza...")) 29// 30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31// 32// config := &oauth2.Config{...} 33// // ... 34// token, err := config.Exchange(ctx, ...) 35// connectorsService, err := connectors.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package connectors // import "google.golang.org/api/connectors/v1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 internaloption "google.golang.org/api/option/internaloption" 56 htransport "google.golang.org/api/transport/http" 57) 58 59// Always reference these packages, just in case the auto-generated code 60// below doesn't. 61var _ = bytes.NewBuffer 62var _ = strconv.Itoa 63var _ = fmt.Sprintf 64var _ = json.NewDecoder 65var _ = io.Copy 66var _ = url.Parse 67var _ = gensupport.MarshalJSON 68var _ = googleapi.Version 69var _ = errors.New 70var _ = strings.Replace 71var _ = context.Canceled 72var _ = internaloption.WithDefaultEndpoint 73 74const apiId = "connectors:v1" 75const apiName = "connectors" 76const apiVersion = "v1" 77const basePath = "https://connectors.googleapis.com/" 78const mtlsBasePath = "https://connectors.mtls.googleapis.com/" 79 80// OAuth2 scopes used by this API. 81const ( 82 // See, edit, configure, and delete your Google Cloud data and see the 83 // email address for your Google Account. 84 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 85) 86 87// NewService creates a new Service. 88func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 89 scopesOption := option.WithScopes( 90 "https://www.googleapis.com/auth/cloud-platform", 91 ) 92 // NOTE: prepend, so we don't override user-specified scopes. 93 opts = append([]option.ClientOption{scopesOption}, opts...) 94 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 95 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 96 client, endpoint, err := htransport.NewClient(ctx, opts...) 97 if err != nil { 98 return nil, err 99 } 100 s, err := New(client) 101 if err != nil { 102 return nil, err 103 } 104 if endpoint != "" { 105 s.BasePath = endpoint 106 } 107 return s, nil 108} 109 110// New creates a new Service. It uses the provided http.Client for requests. 111// 112// Deprecated: please use NewService instead. 113// To provide a custom HTTP client, use option.WithHTTPClient. 114// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 115func New(client *http.Client) (*Service, error) { 116 if client == nil { 117 return nil, errors.New("client is nil") 118 } 119 s := &Service{client: client, BasePath: basePath} 120 s.Projects = NewProjectsService(s) 121 return s, nil 122} 123 124type Service struct { 125 client *http.Client 126 BasePath string // API endpoint base URL 127 UserAgent string // optional additional User-Agent fragment 128 129 Projects *ProjectsService 130} 131 132func (s *Service) userAgent() string { 133 if s.UserAgent == "" { 134 return googleapi.UserAgent 135 } 136 return googleapi.UserAgent + " " + s.UserAgent 137} 138 139func NewProjectsService(s *Service) *ProjectsService { 140 rs := &ProjectsService{s: s} 141 rs.Locations = NewProjectsLocationsService(s) 142 return rs 143} 144 145type ProjectsService struct { 146 s *Service 147 148 Locations *ProjectsLocationsService 149} 150 151func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 152 rs := &ProjectsLocationsService{s: s} 153 rs.Connections = NewProjectsLocationsConnectionsService(s) 154 rs.Global = NewProjectsLocationsGlobalService(s) 155 rs.Operations = NewProjectsLocationsOperationsService(s) 156 rs.Providers = NewProjectsLocationsProvidersService(s) 157 return rs 158} 159 160type ProjectsLocationsService struct { 161 s *Service 162 163 Connections *ProjectsLocationsConnectionsService 164 165 Global *ProjectsLocationsGlobalService 166 167 Operations *ProjectsLocationsOperationsService 168 169 Providers *ProjectsLocationsProvidersService 170} 171 172func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnectionsService { 173 rs := &ProjectsLocationsConnectionsService{s: s} 174 rs.RuntimeActionSchemas = NewProjectsLocationsConnectionsRuntimeActionSchemasService(s) 175 rs.RuntimeEntitySchemas = NewProjectsLocationsConnectionsRuntimeEntitySchemasService(s) 176 return rs 177} 178 179type ProjectsLocationsConnectionsService struct { 180 s *Service 181 182 RuntimeActionSchemas *ProjectsLocationsConnectionsRuntimeActionSchemasService 183 184 RuntimeEntitySchemas *ProjectsLocationsConnectionsRuntimeEntitySchemasService 185} 186 187func NewProjectsLocationsConnectionsRuntimeActionSchemasService(s *Service) *ProjectsLocationsConnectionsRuntimeActionSchemasService { 188 rs := &ProjectsLocationsConnectionsRuntimeActionSchemasService{s: s} 189 return rs 190} 191 192type ProjectsLocationsConnectionsRuntimeActionSchemasService struct { 193 s *Service 194} 195 196func NewProjectsLocationsConnectionsRuntimeEntitySchemasService(s *Service) *ProjectsLocationsConnectionsRuntimeEntitySchemasService { 197 rs := &ProjectsLocationsConnectionsRuntimeEntitySchemasService{s: s} 198 return rs 199} 200 201type ProjectsLocationsConnectionsRuntimeEntitySchemasService struct { 202 s *Service 203} 204 205func NewProjectsLocationsGlobalService(s *Service) *ProjectsLocationsGlobalService { 206 rs := &ProjectsLocationsGlobalService{s: s} 207 rs.Providers = NewProjectsLocationsGlobalProvidersService(s) 208 return rs 209} 210 211type ProjectsLocationsGlobalService struct { 212 s *Service 213 214 Providers *ProjectsLocationsGlobalProvidersService 215} 216 217func NewProjectsLocationsGlobalProvidersService(s *Service) *ProjectsLocationsGlobalProvidersService { 218 rs := &ProjectsLocationsGlobalProvidersService{s: s} 219 rs.Connectors = NewProjectsLocationsGlobalProvidersConnectorsService(s) 220 return rs 221} 222 223type ProjectsLocationsGlobalProvidersService struct { 224 s *Service 225 226 Connectors *ProjectsLocationsGlobalProvidersConnectorsService 227} 228 229func NewProjectsLocationsGlobalProvidersConnectorsService(s *Service) *ProjectsLocationsGlobalProvidersConnectorsService { 230 rs := &ProjectsLocationsGlobalProvidersConnectorsService{s: s} 231 rs.Versions = NewProjectsLocationsGlobalProvidersConnectorsVersionsService(s) 232 return rs 233} 234 235type ProjectsLocationsGlobalProvidersConnectorsService struct { 236 s *Service 237 238 Versions *ProjectsLocationsGlobalProvidersConnectorsVersionsService 239} 240 241func NewProjectsLocationsGlobalProvidersConnectorsVersionsService(s *Service) *ProjectsLocationsGlobalProvidersConnectorsVersionsService { 242 rs := &ProjectsLocationsGlobalProvidersConnectorsVersionsService{s: s} 243 return rs 244} 245 246type ProjectsLocationsGlobalProvidersConnectorsVersionsService struct { 247 s *Service 248} 249 250func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 251 rs := &ProjectsLocationsOperationsService{s: s} 252 return rs 253} 254 255type ProjectsLocationsOperationsService struct { 256 s *Service 257} 258 259func NewProjectsLocationsProvidersService(s *Service) *ProjectsLocationsProvidersService { 260 rs := &ProjectsLocationsProvidersService{s: s} 261 return rs 262} 263 264type ProjectsLocationsProvidersService struct { 265 s *Service 266} 267 268// AuditConfig: Specifies the audit configuration for a service. The 269// configuration determines which permission types are logged, and what 270// identities, if any, are exempted from logging. An AuditConfig must 271// have one or more AuditLogConfigs. If there are AuditConfigs for both 272// `allServices` and a specific service, the union of the two 273// AuditConfigs is used for that service: the log_types specified in 274// each AuditConfig are enabled, and the exempted_members in each 275// AuditLogConfig are exempted. Example Policy with multiple 276// AuditConfigs: { "audit_configs": [ { "service": "allServices", 277// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": 278// [ "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { 279// "log_type": "ADMIN_READ" } ] }, { "service": 280// "sampleservice.googleapis.com", "audit_log_configs": [ { "log_type": 281// "DATA_READ" }, { "log_type": "DATA_WRITE", "exempted_members": [ 282// "user:aliya@example.com" ] } ] } ] } For sampleservice, this policy 283// enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts 284// jose@example.com from DATA_READ logging, and aliya@example.com from 285// DATA_WRITE logging. 286type AuditConfig struct { 287 // AuditLogConfigs: The configuration for logging of each type of 288 // permission. 289 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 290 291 // Service: Specifies a service that will be enabled for audit logging. 292 // For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. 293 // `allServices` is a special value that covers all services. 294 Service string `json:"service,omitempty"` 295 296 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 297 // unconditionally include in API requests. By default, fields with 298 // empty or default values are omitted from API requests. However, any 299 // non-pointer, non-interface field appearing in ForceSendFields will be 300 // sent to the server regardless of whether the field is empty or not. 301 // This may be used to include empty fields in Patch requests. 302 ForceSendFields []string `json:"-"` 303 304 // NullFields is a list of field names (e.g. "AuditLogConfigs") to 305 // include in API requests with the JSON null value. By default, fields 306 // with empty values are omitted from API requests. However, any field 307 // with an empty value appearing in NullFields will be sent to the 308 // server as null. It is an error if a field in this list has a 309 // non-empty value. This may be used to include null fields in Patch 310 // requests. 311 NullFields []string `json:"-"` 312} 313 314func (s *AuditConfig) MarshalJSON() ([]byte, error) { 315 type NoMethod AuditConfig 316 raw := NoMethod(*s) 317 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 318} 319 320// AuditLogConfig: Provides the configuration for logging a type of 321// permissions. Example: { "audit_log_configs": [ { "log_type": 322// "DATA_READ", "exempted_members": [ "user:jose@example.com" ] }, { 323// "log_type": "DATA_WRITE" } ] } This enables 'DATA_READ' and 324// 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ 325// logging. 326type AuditLogConfig struct { 327 // ExemptedMembers: Specifies the identities that do not cause logging 328 // for this type of permission. Follows the same format of 329 // Binding.members. 330 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 331 332 // LogType: The log type that this config enables. 333 // 334 // Possible values: 335 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 336 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 337 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 338 // "DATA_READ" - Data reads. Example: CloudSQL Users list 339 LogType string `json:"logType,omitempty"` 340 341 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 342 // unconditionally include in API requests. By default, fields with 343 // empty or default values are omitted from API requests. However, any 344 // non-pointer, non-interface field appearing in ForceSendFields will be 345 // sent to the server regardless of whether the field is empty or not. 346 // This may be used to include empty fields in Patch requests. 347 ForceSendFields []string `json:"-"` 348 349 // NullFields is a list of field names (e.g. "ExemptedMembers") to 350 // include in API requests with the JSON null value. By default, fields 351 // with empty values are omitted from API requests. However, any field 352 // with an empty value appearing in NullFields will be sent to the 353 // server as null. It is an error if a field in this list has a 354 // non-empty value. This may be used to include null fields in Patch 355 // requests. 356 NullFields []string `json:"-"` 357} 358 359func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 360 type NoMethod AuditLogConfig 361 raw := NoMethod(*s) 362 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 363} 364 365// AuthConfig: AuthConfig defines details of a authentication type. 366type AuthConfig struct { 367 // AdditionalVariables: List containing additional auth configs. 368 AdditionalVariables []*ConfigVariable `json:"additionalVariables,omitempty"` 369 370 // AuthType: The type of authentication configured. 371 // 372 // Possible values: 373 // "AUTH_TYPE_UNSPECIFIED" - Authentication type not specified. 374 // "USER_PASSWORD" - Username and Password Authentication. 375 // "OAUTH2_JWT_BEARER" - JSON Web Token (JWT) Profile for Oauth 2.0 376 // Authorization Grant based authentication 377 // "OAUTH2_CLIENT_CREDENTIALS" - Oauth 2.0 Client Credentials Grant 378 // Authentication 379 AuthType string `json:"authType,omitempty"` 380 381 // Oauth2ClientCredentials: Oauth2ClientCredentials. 382 Oauth2ClientCredentials *Oauth2ClientCredentials `json:"oauth2ClientCredentials,omitempty"` 383 384 // Oauth2JwtBearer: Oauth2JwtBearer. 385 Oauth2JwtBearer *Oauth2JwtBearer `json:"oauth2JwtBearer,omitempty"` 386 387 // UserPassword: UserPassword. 388 UserPassword *UserPassword `json:"userPassword,omitempty"` 389 390 // ForceSendFields is a list of field names (e.g. "AdditionalVariables") 391 // to unconditionally include in API requests. By default, fields with 392 // empty or default values are omitted from API requests. However, any 393 // non-pointer, non-interface field appearing in ForceSendFields will be 394 // sent to the server regardless of whether the field is empty or not. 395 // This may be used to include empty fields in Patch requests. 396 ForceSendFields []string `json:"-"` 397 398 // NullFields is a list of field names (e.g. "AdditionalVariables") to 399 // include in API requests with the JSON null value. By default, fields 400 // with empty values are omitted from API requests. However, any field 401 // with an empty value appearing in NullFields will be sent to the 402 // server as null. It is an error if a field in this list has a 403 // non-empty value. This may be used to include null fields in Patch 404 // requests. 405 NullFields []string `json:"-"` 406} 407 408func (s *AuthConfig) MarshalJSON() ([]byte, error) { 409 type NoMethod AuthConfig 410 raw := NoMethod(*s) 411 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 412} 413 414// AuthConfigTemplate: AuthConfigTemplate defines required field over an 415// authentication type. 416type AuthConfigTemplate struct { 417 // AuthType: The type of authentication configured. 418 // 419 // Possible values: 420 // "AUTH_TYPE_UNSPECIFIED" - Authentication type not specified. 421 // "USER_PASSWORD" - Username and Password Authentication. 422 // "OAUTH2_JWT_BEARER" - JSON Web Token (JWT) Profile for Oauth 2.0 423 // Authorization Grant based authentication 424 // "OAUTH2_CLIENT_CREDENTIALS" - Oauth 2.0 Client Credentials Grant 425 // Authentication 426 AuthType string `json:"authType,omitempty"` 427 428 // ConfigVariableTemplates: Config variables to describe an `AuthConfig` 429 // for a `Connection`. 430 ConfigVariableTemplates []*ConfigVariableTemplate `json:"configVariableTemplates,omitempty"` 431 432 // ForceSendFields is a list of field names (e.g. "AuthType") to 433 // unconditionally include in API requests. By default, fields with 434 // empty or default values are omitted from API requests. However, any 435 // non-pointer, non-interface field appearing in ForceSendFields will be 436 // sent to the server regardless of whether the field is empty or not. 437 // This may be used to include empty fields in Patch requests. 438 ForceSendFields []string `json:"-"` 439 440 // NullFields is a list of field names (e.g. "AuthType") to include in 441 // API requests with the JSON null value. By default, fields with empty 442 // values are omitted from API requests. However, any field with an 443 // empty value appearing in NullFields will be sent to the server as 444 // null. It is an error if a field in this list has a non-empty value. 445 // This may be used to include null fields in Patch requests. 446 NullFields []string `json:"-"` 447} 448 449func (s *AuthConfigTemplate) MarshalJSON() ([]byte, error) { 450 type NoMethod AuthConfigTemplate 451 raw := NoMethod(*s) 452 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 453} 454 455// Binding: Associates `members` with a `role`. 456type Binding struct { 457 // Condition: The condition that is associated with this binding. If the 458 // condition evaluates to `true`, then this binding applies to the 459 // current request. If the condition evaluates to `false`, then this 460 // binding does not apply to the current request. However, a different 461 // role binding might grant the same role to one or more of the members 462 // in this binding. To learn which resources support conditions in their 463 // IAM policies, see the IAM documentation 464 // (https://cloud.google.com/iam/help/conditions/resource-policies). 465 Condition *Expr `json:"condition,omitempty"` 466 467 // Members: Specifies the identities requesting access for a Cloud 468 // Platform resource. `members` can have the following values: * 469 // `allUsers`: A special identifier that represents anyone who is on the 470 // internet; with or without a Google account. * 471 // `allAuthenticatedUsers`: A special identifier that represents anyone 472 // who is authenticated with a Google account or a service account. * 473 // `user:{emailid}`: An email address that represents a specific Google 474 // account. For example, `alice@example.com` . * 475 // `serviceAccount:{emailid}`: An email address that represents a 476 // service account. For example, 477 // `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An 478 // email address that represents a Google group. For example, 479 // `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An 480 // email address (plus unique identifier) representing a user that has 481 // been recently deleted. For example, 482 // `alice@example.com?uid=123456789012345678901`. If the user is 483 // recovered, this value reverts to `user:{emailid}` and the recovered 484 // user retains the role in the binding. * 485 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address 486 // (plus unique identifier) representing a service account that has been 487 // recently deleted. For example, 488 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. 489 // If the service account is undeleted, this value reverts to 490 // `serviceAccount:{emailid}` and the undeleted service account retains 491 // the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: 492 // An email address (plus unique identifier) representing a Google group 493 // that has been recently deleted. For example, 494 // `admins@example.com?uid=123456789012345678901`. If the group is 495 // recovered, this value reverts to `group:{emailid}` and the recovered 496 // group retains the role in the binding. * `domain:{domain}`: The G 497 // Suite domain (primary) that represents all the users of that domain. 498 // For example, `google.com` or `example.com`. 499 Members []string `json:"members,omitempty"` 500 501 // Role: Role that is assigned to `members`. For example, 502 // `roles/viewer`, `roles/editor`, or `roles/owner`. 503 Role string `json:"role,omitempty"` 504 505 // ForceSendFields is a list of field names (e.g. "Condition") to 506 // unconditionally include in API requests. By default, fields with 507 // empty or default values are omitted from API requests. However, any 508 // non-pointer, non-interface field appearing in ForceSendFields will be 509 // sent to the server regardless of whether the field is empty or not. 510 // This may be used to include empty fields in Patch requests. 511 ForceSendFields []string `json:"-"` 512 513 // NullFields is a list of field names (e.g. "Condition") to include in 514 // API requests with the JSON null value. By default, fields with empty 515 // values are omitted from API requests. However, any field with an 516 // empty value appearing in NullFields will be sent to the server as 517 // null. It is an error if a field in this list has a non-empty value. 518 // This may be used to include null fields in Patch requests. 519 NullFields []string `json:"-"` 520} 521 522func (s *Binding) MarshalJSON() ([]byte, error) { 523 type NoMethod Binding 524 raw := NoMethod(*s) 525 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 526} 527 528// CancelOperationRequest: The request message for 529// Operations.CancelOperation. 530type CancelOperationRequest struct { 531} 532 533// ConfigVariable: ConfigVariable represents a configuration variable 534// present in a Connection. or AuthConfig. 535type ConfigVariable struct { 536 // BoolValue: Value is a bool. 537 BoolValue bool `json:"boolValue,omitempty"` 538 539 // IntValue: Value is an integer 540 IntValue int64 `json:"intValue,omitempty,string"` 541 542 // Key: Key of the config variable. 543 Key string `json:"key,omitempty"` 544 545 // SecretValue: Value is a secret. 546 SecretValue *Secret `json:"secretValue,omitempty"` 547 548 // StringValue: Value is a string. 549 StringValue string `json:"stringValue,omitempty"` 550 551 // ForceSendFields is a list of field names (e.g. "BoolValue") to 552 // unconditionally include in API requests. By default, fields with 553 // empty or default values are omitted from API requests. However, any 554 // non-pointer, non-interface field appearing in ForceSendFields will be 555 // sent to the server regardless of whether the field is empty or not. 556 // This may be used to include empty fields in Patch requests. 557 ForceSendFields []string `json:"-"` 558 559 // NullFields is a list of field names (e.g. "BoolValue") to include in 560 // API requests with the JSON null value. By default, fields with empty 561 // values are omitted from API requests. However, any field with an 562 // empty value appearing in NullFields will be sent to the server as 563 // null. It is an error if a field in this list has a non-empty value. 564 // This may be used to include null fields in Patch requests. 565 NullFields []string `json:"-"` 566} 567 568func (s *ConfigVariable) MarshalJSON() ([]byte, error) { 569 type NoMethod ConfigVariable 570 raw := NoMethod(*s) 571 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 572} 573 574// ConfigVariableTemplate: ConfigVariableTemplate provides metadata 575// about a `ConfigVariable` that is used in a Connection. 576type ConfigVariableTemplate struct { 577 // Description: Description. 578 Description string `json:"description,omitempty"` 579 580 // DisplayName: Display name of the parameter. 581 DisplayName string `json:"displayName,omitempty"` 582 583 // Key: Key of the config variable. 584 Key string `json:"key,omitempty"` 585 586 // Required: Flag represents that this `ConfigVariable` must be provided 587 // for a connection. 588 Required bool `json:"required,omitempty"` 589 590 // RoleGrant: Role grant configuration for the config variable. 591 RoleGrant *RoleGrant `json:"roleGrant,omitempty"` 592 593 // ValidationRegex: Regular expression in RE2 syntax used for validating 594 // the `value` of a `ConfigVariable`. 595 ValidationRegex string `json:"validationRegex,omitempty"` 596 597 // ValueType: Type of the parameter: string, int, bool etc. consider 598 // custom type for the benefit for the validation. 599 // 600 // Possible values: 601 // "VALUE_TYPE_UNSPECIFIED" - Value type is not specified. 602 // "STRING" - Value type is string. 603 // "INT" - Value type is integer. 604 // "BOOL" - Value type is boolean. 605 // "SECRET" - Value type is secret. 606 ValueType string `json:"valueType,omitempty"` 607 608 // ForceSendFields is a list of field names (e.g. "Description") to 609 // unconditionally include in API requests. By default, fields with 610 // empty or default values are omitted from API requests. However, any 611 // non-pointer, non-interface field appearing in ForceSendFields will be 612 // sent to the server regardless of whether the field is empty or not. 613 // This may be used to include empty fields in Patch requests. 614 ForceSendFields []string `json:"-"` 615 616 // NullFields is a list of field names (e.g. "Description") to include 617 // in API requests with the JSON null value. By default, fields with 618 // empty values are omitted from API requests. However, any field with 619 // an empty value appearing in NullFields will be sent to the server as 620 // null. It is an error if a field in this list has a non-empty value. 621 // This may be used to include null fields in Patch requests. 622 NullFields []string `json:"-"` 623} 624 625func (s *ConfigVariableTemplate) MarshalJSON() ([]byte, error) { 626 type NoMethod ConfigVariableTemplate 627 raw := NoMethod(*s) 628 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 629} 630 631// Connection: Connection represents an instance of connector. 632type Connection struct { 633 // AuthConfig: Optional. Configuration for establishing the connection's 634 // authentication with an external system. 635 AuthConfig *AuthConfig `json:"authConfig,omitempty"` 636 637 // ConfigVariables: Optional. Configuration for configuring the 638 // connection with an external system. 639 ConfigVariables []*ConfigVariable `json:"configVariables,omitempty"` 640 641 // ConnectorVersion: Required. Connector version on which the connection 642 // is created. The format is: 643 // projects/*/locations/global/providers/*/connectors/*/versions/* 644 ConnectorVersion string `json:"connectorVersion,omitempty"` 645 646 // CreateTime: Output only. Created time. 647 CreateTime string `json:"createTime,omitempty"` 648 649 // Description: Optional. Description of the resource. 650 Description string `json:"description,omitempty"` 651 652 // EgressBackends: Output only. Outbound domains/hosts needs to be 653 // allowlisted. 654 EgressBackends []string `json:"egressBackends,omitempty"` 655 656 // EnvoyImageLocation: Output only. GCR location where the envoy image 657 // is stored. formatted like: gcr.io/{bucketName}/{imageName} 658 EnvoyImageLocation string `json:"envoyImageLocation,omitempty"` 659 660 // ImageLocation: Output only. GCR location where the runtime image is 661 // stored. formatted like: gcr.io/{bucketName}/{imageName} 662 ImageLocation string `json:"imageLocation,omitempty"` 663 664 // Inactive: Optional. Inactive indicates the connection is active to 665 // use or not. 666 Inactive bool `json:"inactive,omitempty"` 667 668 // Labels: Optional. Resource labels to represent user-provided 669 // metadata. Refer to cloud documentation on labels for more details. 670 // https://cloud.google.com/compute/docs/labeling-resources 671 Labels map[string]string `json:"labels,omitempty"` 672 673 // LockConfig: Optional. Configuration that indicates whether or not the 674 // Connection can be edited. 675 LockConfig *LockConfig `json:"lockConfig,omitempty"` 676 677 // Name: Output only. Resource name of the Connection. Format: 678 // projects/{project}/locations/{location}/connections/{connection} 679 Name string `json:"name,omitempty"` 680 681 // ServiceAccount: Optional. Service account needed for runtime plane to 682 // access GCP resources. 683 ServiceAccount string `json:"serviceAccount,omitempty"` 684 685 // ServiceDirectory: Output only. The name of the Service Directory 686 // service name. Used for Private Harpoon to resolve the ILB address. 687 // e.g. 688 // "projects/cloud-connectors-e2e-testing/locations/us-central1/namespace 689 // s/istio-system/services/istio-ingressgateway-connectors" 690 ServiceDirectory string `json:"serviceDirectory,omitempty"` 691 692 // Status: Output only. Current status of the connection. 693 Status *ConnectionStatus `json:"status,omitempty"` 694 695 // UpdateTime: Output only. Updated time. 696 UpdateTime string `json:"updateTime,omitempty"` 697 698 // ServerResponse contains the HTTP response code and headers from the 699 // server. 700 googleapi.ServerResponse `json:"-"` 701 702 // ForceSendFields is a list of field names (e.g. "AuthConfig") to 703 // unconditionally include in API requests. By default, fields with 704 // empty or default values are omitted from API requests. However, any 705 // non-pointer, non-interface field appearing in ForceSendFields will be 706 // sent to the server regardless of whether the field is empty or not. 707 // This may be used to include empty fields in Patch requests. 708 ForceSendFields []string `json:"-"` 709 710 // NullFields is a list of field names (e.g. "AuthConfig") to include in 711 // API requests with the JSON null value. By default, fields with empty 712 // values are omitted from API requests. However, any field with an 713 // empty value appearing in NullFields will be sent to the server as 714 // null. It is an error if a field in this list has a non-empty value. 715 // This may be used to include null fields in Patch requests. 716 NullFields []string `json:"-"` 717} 718 719func (s *Connection) MarshalJSON() ([]byte, error) { 720 type NoMethod Connection 721 raw := NoMethod(*s) 722 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 723} 724 725// ConnectionSchemaMetadata: Metadata of connection schema. 726type ConnectionSchemaMetadata struct { 727 // Actions: Output only. List of actions. 728 Actions []string `json:"actions,omitempty"` 729 730 // Entities: Output only. List of entity names. 731 Entities []string `json:"entities,omitempty"` 732 733 // ServerResponse contains the HTTP response code and headers from the 734 // server. 735 googleapi.ServerResponse `json:"-"` 736 737 // ForceSendFields is a list of field names (e.g. "Actions") to 738 // unconditionally include in API requests. By default, fields with 739 // empty or default values are omitted from API requests. However, any 740 // non-pointer, non-interface field appearing in ForceSendFields will be 741 // sent to the server regardless of whether the field is empty or not. 742 // This may be used to include empty fields in Patch requests. 743 ForceSendFields []string `json:"-"` 744 745 // NullFields is a list of field names (e.g. "Actions") to include in 746 // API requests with the JSON null value. By default, fields with empty 747 // values are omitted from API requests. However, any field with an 748 // empty value appearing in NullFields will be sent to the server as 749 // null. It is an error if a field in this list has a non-empty value. 750 // This may be used to include null fields in Patch requests. 751 NullFields []string `json:"-"` 752} 753 754func (s *ConnectionSchemaMetadata) MarshalJSON() ([]byte, error) { 755 type NoMethod ConnectionSchemaMetadata 756 raw := NoMethod(*s) 757 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 758} 759 760// ConnectionStatus: ConnectionStatus indicates the state of the 761// connection. 762type ConnectionStatus struct { 763 // Description: Description. 764 Description string `json:"description,omitempty"` 765 766 // State: State. 767 // 768 // Possible values: 769 // "STATE_UNSPECIFIED" - Connection does not have a state yet. 770 // "CREATING" - Connection is being created. 771 // "ACTIVE" - Connection is running and ready for requests. 772 // "INACTIVE" - Connection is stopped. 773 // "DELETING" - Connection is being deleted. 774 // "UPDATING" - Connection is being updated. 775 // "ERROR" - Connection is not running due to an error. 776 State string `json:"state,omitempty"` 777 778 // Status: Status provides detailed information for the state. 779 Status string `json:"status,omitempty"` 780 781 // ForceSendFields is a list of field names (e.g. "Description") to 782 // unconditionally include in API requests. By default, fields with 783 // empty or default values are omitted from API requests. However, any 784 // non-pointer, non-interface field appearing in ForceSendFields will be 785 // sent to the server regardless of whether the field is empty or not. 786 // This may be used to include empty fields in Patch requests. 787 ForceSendFields []string `json:"-"` 788 789 // NullFields is a list of field names (e.g. "Description") to include 790 // in API requests with the JSON null value. By default, fields with 791 // empty values are omitted from API requests. However, any field with 792 // an empty value appearing in NullFields will be sent to the server as 793 // null. It is an error if a field in this list has a non-empty value. 794 // This may be used to include null fields in Patch requests. 795 NullFields []string `json:"-"` 796} 797 798func (s *ConnectionStatus) MarshalJSON() ([]byte, error) { 799 type NoMethod ConnectionStatus 800 raw := NoMethod(*s) 801 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 802} 803 804// Connector: Connectors indicates a specific connector type, e.x. 805// Salesforce, SAP etc. 806type Connector struct { 807 // CreateTime: Output only. Created time. 808 CreateTime string `json:"createTime,omitempty"` 809 810 // Description: Output only. Description of the resource. 811 Description string `json:"description,omitempty"` 812 813 // DisplayName: Output only. Display name. 814 DisplayName string `json:"displayName,omitempty"` 815 816 // DocumentationUri: Output only. Link to documentation page. 817 DocumentationUri string `json:"documentationUri,omitempty"` 818 819 // ExternalUri: Output only. Link to external page. 820 ExternalUri string `json:"externalUri,omitempty"` 821 822 // Labels: Output only. Resource labels to represent user-provided 823 // metadata. Refer to cloud documentation on labels for more details. 824 // https://cloud.google.com/compute/docs/labeling-resources 825 Labels map[string]string `json:"labels,omitempty"` 826 827 // Name: Output only. Resource name of the Connector. Format: 828 // projects/{project}/locations/{location}/providers/{provider}/connector 829 // s/{connector} 830 Name string `json:"name,omitempty"` 831 832 // UpdateTime: Output only. Updated time. 833 UpdateTime string `json:"updateTime,omitempty"` 834 835 // WebAssetsLocation: Output only. Cloud storage location of icons etc 836 // consumed by UI. 837 WebAssetsLocation string `json:"webAssetsLocation,omitempty"` 838 839 // ServerResponse contains the HTTP response code and headers from the 840 // server. 841 googleapi.ServerResponse `json:"-"` 842 843 // ForceSendFields is a list of field names (e.g. "CreateTime") to 844 // unconditionally include in API requests. By default, fields with 845 // empty or default values are omitted from API requests. However, any 846 // non-pointer, non-interface field appearing in ForceSendFields will be 847 // sent to the server regardless of whether the field is empty or not. 848 // This may be used to include empty fields in Patch requests. 849 ForceSendFields []string `json:"-"` 850 851 // NullFields is a list of field names (e.g. "CreateTime") to include in 852 // API requests with the JSON null value. By default, fields with empty 853 // values are omitted from API requests. However, any field with an 854 // empty value appearing in NullFields will be sent to the server as 855 // null. It is an error if a field in this list has a non-empty value. 856 // This may be used to include null fields in Patch requests. 857 NullFields []string `json:"-"` 858} 859 860func (s *Connector) MarshalJSON() ([]byte, error) { 861 type NoMethod Connector 862 raw := NoMethod(*s) 863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 864} 865 866// ConnectorVersion: ConnectorVersion indicates a specific version of a 867// connector. 868type ConnectorVersion struct { 869 // AuthConfigTemplates: Output only. List of auth configs supported by 870 // the Connector Version. 871 AuthConfigTemplates []*AuthConfigTemplate `json:"authConfigTemplates,omitempty"` 872 873 // ConfigVariableTemplates: Output only. List of config variables needed 874 // to create a connection. 875 ConfigVariableTemplates []*ConfigVariableTemplate `json:"configVariableTemplates,omitempty"` 876 877 // CreateTime: Output only. Created time. 878 CreateTime string `json:"createTime,omitempty"` 879 880 // DisplayName: Output only. Display name. 881 DisplayName string `json:"displayName,omitempty"` 882 883 // EgressControlConfig: Output only. Configuration for Egress Control. 884 EgressControlConfig *EgressControlConfig `json:"egressControlConfig,omitempty"` 885 886 // Labels: Output only. Resource labels to represent user-provided 887 // metadata. Refer to cloud documentation on labels for more details. 888 // https://cloud.google.com/compute/docs/labeling-resources 889 Labels map[string]string `json:"labels,omitempty"` 890 891 // LaunchStage: Output only. Flag to mark the version indicating the 892 // launch stage. 893 // 894 // Possible values: 895 // "LAUNCH_STAGE_UNSPECIFIED" - LAUNCH_STAGE_UNSPECIFIED. 896 // "PREVIEW" - PREVIEW. 897 // "GA" - GA. 898 // "DEPRECATED" - DEPRECATED. 899 LaunchStage string `json:"launchStage,omitempty"` 900 901 // Name: Output only. Resource name of the Version. Format: 902 // projects/{project}/locations/{location}/providers/{provider}/connector 903 // s/{connector}/versions/{version} 904 Name string `json:"name,omitempty"` 905 906 // ReleaseVersion: Output only. ReleaseVersion of the connector, for 907 // example: "1.0.1-alpha". 908 ReleaseVersion string `json:"releaseVersion,omitempty"` 909 910 // RoleGrant: Output only. Role grant configuration for this config 911 // variable. It will be DEPRECATED soon. 912 RoleGrant *RoleGrant `json:"roleGrant,omitempty"` 913 914 // RoleGrants: Output only. Role grant configurations for this connector 915 // version. 916 RoleGrants []*RoleGrant `json:"roleGrants,omitempty"` 917 918 // SupportedRuntimeFeatures: Output only. Information about the runtime 919 // features supported by the Connector. 920 SupportedRuntimeFeatures *SupportedRuntimeFeatures `json:"supportedRuntimeFeatures,omitempty"` 921 922 // UpdateTime: Output only. Updated time. 923 UpdateTime string `json:"updateTime,omitempty"` 924 925 // ServerResponse contains the HTTP response code and headers from the 926 // server. 927 googleapi.ServerResponse `json:"-"` 928 929 // ForceSendFields is a list of field names (e.g. "AuthConfigTemplates") 930 // to unconditionally include in API requests. By default, fields with 931 // empty or default values are omitted from API requests. However, any 932 // non-pointer, non-interface field appearing in ForceSendFields will be 933 // sent to the server regardless of whether the field is empty or not. 934 // This may be used to include empty fields in Patch requests. 935 ForceSendFields []string `json:"-"` 936 937 // NullFields is a list of field names (e.g. "AuthConfigTemplates") to 938 // include in API requests with the JSON null value. By default, fields 939 // with empty values are omitted from API requests. However, any field 940 // with an empty value appearing in NullFields will be sent to the 941 // server as null. It is an error if a field in this list has a 942 // non-empty value. This may be used to include null fields in Patch 943 // requests. 944 NullFields []string `json:"-"` 945} 946 947func (s *ConnectorVersion) MarshalJSON() ([]byte, error) { 948 type NoMethod ConnectorVersion 949 raw := NoMethod(*s) 950 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 951} 952 953// EgressControlConfig: Egress control config for connector runtime. 954// These configurations define the rules to identify which outbound 955// domains/hosts needs to be whitelisted. It may be a static information 956// for a particular connector version or it is derived from the 957// configurations provided by the customer in Connection resource. 958type EgressControlConfig struct { 959 // Backends: Static Comma separated backends which are common for all 960 // Connection resources. Supported formats for each backend are 961 // host:port or just host (host can be ip address or domain name). 962 Backends string `json:"backends,omitempty"` 963 964 // ExtractionRules: Extractions Rules to extract the backends from 965 // customer provided configuration. 966 ExtractionRules *ExtractionRules `json:"extractionRules,omitempty"` 967 968 // ForceSendFields is a list of field names (e.g. "Backends") to 969 // unconditionally include in API requests. By default, fields with 970 // empty or default values are omitted from API requests. However, any 971 // non-pointer, non-interface field appearing in ForceSendFields will be 972 // sent to the server regardless of whether the field is empty or not. 973 // This may be used to include empty fields in Patch requests. 974 ForceSendFields []string `json:"-"` 975 976 // NullFields is a list of field names (e.g. "Backends") to include in 977 // API requests with the JSON null value. By default, fields with empty 978 // values are omitted from API requests. However, any field with an 979 // empty value appearing in NullFields will be sent to the server as 980 // null. It is an error if a field in this list has a non-empty value. 981 // This may be used to include null fields in Patch requests. 982 NullFields []string `json:"-"` 983} 984 985func (s *EgressControlConfig) MarshalJSON() ([]byte, error) { 986 type NoMethod EgressControlConfig 987 raw := NoMethod(*s) 988 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 989} 990 991// Empty: A generic empty message that you can re-use to avoid defining 992// duplicated empty messages in your APIs. A typical example is to use 993// it as the request or the response type of an API method. For 994// instance: service Foo { rpc Bar(google.protobuf.Empty) returns 995// (google.protobuf.Empty); } The JSON representation for `Empty` is 996// empty JSON object `{}`. 997type Empty struct { 998 // ServerResponse contains the HTTP response code and headers from the 999 // server. 1000 googleapi.ServerResponse `json:"-"` 1001} 1002 1003// Expr: Represents a textual expression in the Common Expression 1004// Language (CEL) syntax. CEL is a C-like expression language. The 1005// syntax and semantics of CEL are documented at 1006// https://github.com/google/cel-spec. Example (Comparison): title: 1007// "Summary size limit" description: "Determines if a summary is less 1008// than 100 chars" expression: "document.summary.size() < 100" Example 1009// (Equality): title: "Requestor is owner" description: "Determines if 1010// requestor is the document owner" expression: "document.owner == 1011// request.auth.claims.email" Example (Logic): title: "Public documents" 1012// description: "Determine whether the document should be publicly 1013// visible" expression: "document.type != 'private' && document.type != 1014// 'internal'" Example (Data Manipulation): title: "Notification string" 1015// description: "Create a notification string with a timestamp." 1016// expression: "'New message received at ' + 1017// string(document.create_time)" The exact variables and functions that 1018// may be referenced within an expression are determined by the service 1019// that evaluates it. See the service documentation for additional 1020// information. 1021type Expr struct { 1022 // Description: Optional. Description of the expression. This is a 1023 // longer text which describes the expression, e.g. when hovered over it 1024 // in a UI. 1025 Description string `json:"description,omitempty"` 1026 1027 // Expression: Textual representation of an expression in Common 1028 // Expression Language syntax. 1029 Expression string `json:"expression,omitempty"` 1030 1031 // Location: Optional. String indicating the location of the expression 1032 // for error reporting, e.g. a file name and a position in the file. 1033 Location string `json:"location,omitempty"` 1034 1035 // Title: Optional. Title for the expression, i.e. a short string 1036 // describing its purpose. This can be used e.g. in UIs which allow to 1037 // enter the expression. 1038 Title string `json:"title,omitempty"` 1039 1040 // ForceSendFields is a list of field names (e.g. "Description") to 1041 // unconditionally include in API requests. By default, fields with 1042 // empty or default values are omitted from API requests. However, any 1043 // non-pointer, non-interface field appearing in ForceSendFields will be 1044 // sent to the server regardless of whether the field is empty or not. 1045 // This may be used to include empty fields in Patch requests. 1046 ForceSendFields []string `json:"-"` 1047 1048 // NullFields is a list of field names (e.g. "Description") to include 1049 // in API requests with the JSON null value. By default, fields with 1050 // empty values are omitted from API requests. However, any field with 1051 // an empty value appearing in NullFields will be sent to the server as 1052 // null. It is an error if a field in this list has a non-empty value. 1053 // This may be used to include null fields in Patch requests. 1054 NullFields []string `json:"-"` 1055} 1056 1057func (s *Expr) MarshalJSON() ([]byte, error) { 1058 type NoMethod Expr 1059 raw := NoMethod(*s) 1060 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1061} 1062 1063// ExtractionRule: Extraction Rule. 1064type ExtractionRule struct { 1065 // ExtractionRegex: Regex used to extract backend details from source. 1066 // If empty, whole source value will be used. 1067 ExtractionRegex string `json:"extractionRegex,omitempty"` 1068 1069 // Source: Source on which the rule is applied. 1070 Source *Source `json:"source,omitempty"` 1071 1072 // ForceSendFields is a list of field names (e.g. "ExtractionRegex") to 1073 // unconditionally include in API requests. By default, fields with 1074 // empty or default values are omitted from API requests. However, any 1075 // non-pointer, non-interface field appearing in ForceSendFields will be 1076 // sent to the server regardless of whether the field is empty or not. 1077 // This may be used to include empty fields in Patch requests. 1078 ForceSendFields []string `json:"-"` 1079 1080 // NullFields is a list of field names (e.g. "ExtractionRegex") to 1081 // include in API requests with the JSON null value. By default, fields 1082 // with empty values are omitted from API requests. However, any field 1083 // with an empty value appearing in NullFields will be sent to the 1084 // server as null. It is an error if a field in this list has a 1085 // non-empty value. This may be used to include null fields in Patch 1086 // requests. 1087 NullFields []string `json:"-"` 1088} 1089 1090func (s *ExtractionRule) MarshalJSON() ([]byte, error) { 1091 type NoMethod ExtractionRule 1092 raw := NoMethod(*s) 1093 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1094} 1095 1096// ExtractionRules: Extraction Rules to identity the backends from 1097// customer provided configuration in Connection resource. 1098type ExtractionRules struct { 1099 // ExtractionRule: Collection of Extraction Rule. 1100 ExtractionRule []*ExtractionRule `json:"extractionRule,omitempty"` 1101 1102 // ForceSendFields is a list of field names (e.g. "ExtractionRule") to 1103 // unconditionally include in API requests. By default, fields with 1104 // empty or default values are omitted from API requests. However, any 1105 // non-pointer, non-interface field appearing in ForceSendFields will be 1106 // sent to the server regardless of whether the field is empty or not. 1107 // This may be used to include empty fields in Patch requests. 1108 ForceSendFields []string `json:"-"` 1109 1110 // NullFields is a list of field names (e.g. "ExtractionRule") to 1111 // include in API requests with the JSON null value. By default, fields 1112 // with empty values are omitted from API requests. However, any field 1113 // with an empty value appearing in NullFields will be sent to the 1114 // server as null. It is an error if a field in this list has a 1115 // non-empty value. This may be used to include null fields in Patch 1116 // requests. 1117 NullFields []string `json:"-"` 1118} 1119 1120func (s *ExtractionRules) MarshalJSON() ([]byte, error) { 1121 type NoMethod ExtractionRules 1122 raw := NoMethod(*s) 1123 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1124} 1125 1126// Field: Metadata of an entity field. 1127type Field struct { 1128 // AdditionalDetails: The following map contains fields that are not 1129 // explicitly mentioned above,this give connectors the flexibility to 1130 // add new metadata fields. 1131 AdditionalDetails googleapi.RawMessage `json:"additionalDetails,omitempty"` 1132 1133 // DataType: The data type of the Field. 1134 // 1135 // Possible values: 1136 // "DATA_TYPE_UNSPECIFIED" - Data type is not specified. 1137 // "DATA_TYPE_INT" - DEPRECATED! Use DATA_TYPE_INTEGER. 1138 // "DATA_TYPE_SMALLINT" - Short integer(int16) data type. 1139 // "DATA_TYPE_DOUBLE" - Double data type. 1140 // "DATA_TYPE_DATE" - Date data type. 1141 // "DATA_TYPE_DATETIME" - DEPRECATED! Use DATA_TYPE_TIMESTAMP. 1142 // "DATA_TYPE_TIME" - Time data type. 1143 // "DATA_TYPE_STRING" - DEPRECATED! Use DATA_TYPE_VARCHAR. 1144 // "DATA_TYPE_LONG" - DEPRECATED! Use DATA_TYPE_BIGINT. 1145 // "DATA_TYPE_BOOLEAN" - Boolean data type. 1146 // "DATA_TYPE_DECIMAL" - Decimal data type. 1147 // "DATA_TYPE_UUID" - DEPRECATED! Use DATA_TYPE_VARCHAR. 1148 // "DATA_TYPE_BLOB" - UNSUPPORTED! Binary data type. 1149 // "DATA_TYPE_BIT" - Bit data type. 1150 // "DATA_TYPE_TINYINT" - Small integer(int8) data type. 1151 // "DATA_TYPE_INTEGER" - Integer(int32) data type. 1152 // "DATA_TYPE_BIGINT" - Long integer(int64) data type. 1153 // "DATA_TYPE_FLOAT" - Float data type. 1154 // "DATA_TYPE_REAL" - Real data type. 1155 // "DATA_TYPE_NUMERIC" - Numeric data type. 1156 // "DATA_TYPE_CHAR" - Char data type. 1157 // "DATA_TYPE_VARCHAR" - Varchar data type. 1158 // "DATA_TYPE_LONGVARCHAR" - Longvarchar data type. 1159 // "DATA_TYPE_TIMESTAMP" - Timestamp data type. 1160 // "DATA_TYPE_NCHAR" - Nchar data type. 1161 // "DATA_TYPE_NVARCHAR" - Nvarchar data type. 1162 // "DATA_TYPE_LONGNVARCHAR" - Longnvarchar data type. 1163 // "DATA_TYPE_NULL" - Null data type. 1164 // "DATA_TYPE_OTHER" - UNSUPPORTED! Binary data type. 1165 // "DATA_TYPE_JAVA_OBJECT" - UNSUPPORTED! Binary data type. 1166 // "DATA_TYPE_DISTINCT" - UNSUPPORTED! Binary data type. 1167 // "DATA_TYPE_STRUCT" - UNSUPPORTED! Binary data type. 1168 // "DATA_TYPE_ARRAY" - UNSUPPORTED! Binary data type. 1169 // "DATA_TYPE_CLOB" - UNSUPPORTED! Binary data type. 1170 // "DATA_TYPE_REF" - UNSUPPORTED! Binary data type. 1171 // "DATA_TYPE_DATALINK" - UNSUPPORTED! Binary data type. 1172 // "DATA_TYPE_ROWID" - UNSUPPORTED! Row id data type. 1173 // "DATA_TYPE_BINARY" - UNSUPPORTED! Binary data type. 1174 // "DATA_TYPE_VARBINARY" - UNSUPPORTED! Variable binary data type. 1175 // "DATA_TYPE_LONGVARBINARY" - UNSUPPORTED! Long variable binary data 1176 // type. 1177 // "DATA_TYPE_NCLOB" - UNSUPPORTED! NCLOB data type. 1178 // "DATA_TYPE_SQLXML" - UNSUPPORTED! SQL XML data type is not 1179 // supported. 1180 // "DATA_TYPE_REF_CURSOR" - UNSUPPORTED! Cursor reference type is not 1181 // supported. 1182 // "DATA_TYPE_TIME_WITH_TIMEZONE" - UNSUPPORTED! Use TIME or TIMESTAMP 1183 // instead. 1184 // "DATA_TYPE_TIMESTAMP_WITH_TIMEZONE" - UNSUPPORTED! Use TIMESTAMP 1185 // instead. 1186 DataType string `json:"dataType,omitempty"` 1187 1188 // DefaultValue: The following field specifies the default value of the 1189 // Field provided by the external system if a value is not provided. 1190 DefaultValue interface{} `json:"defaultValue,omitempty"` 1191 1192 // Description: A brief description of the Field. 1193 Description string `json:"description,omitempty"` 1194 1195 // Field: Name of the Field. 1196 Field string `json:"field,omitempty"` 1197 1198 // Key: The following boolean field specifies if the current Field acts 1199 // as a primary key or id if the parent is of type entity. 1200 Key bool `json:"key,omitempty"` 1201 1202 // Nullable: Specifies whether a null value is allowed. 1203 Nullable bool `json:"nullable,omitempty"` 1204 1205 // Readonly: Specifies if the Field is readonly. 1206 Readonly bool `json:"readonly,omitempty"` 1207 1208 // ForceSendFields is a list of field names (e.g. "AdditionalDetails") 1209 // to unconditionally include in API requests. By default, fields with 1210 // empty or default values are omitted from API requests. However, any 1211 // non-pointer, non-interface field appearing in ForceSendFields will be 1212 // sent to the server regardless of whether the field is empty or not. 1213 // This may be used to include empty fields in Patch requests. 1214 ForceSendFields []string `json:"-"` 1215 1216 // NullFields is a list of field names (e.g. "AdditionalDetails") to 1217 // include in API requests with the JSON null value. By default, fields 1218 // with empty values are omitted from API requests. However, any field 1219 // with an empty value appearing in NullFields will be sent to the 1220 // server as null. It is an error if a field in this list has a 1221 // non-empty value. This may be used to include null fields in Patch 1222 // requests. 1223 NullFields []string `json:"-"` 1224} 1225 1226func (s *Field) MarshalJSON() ([]byte, error) { 1227 type NoMethod Field 1228 raw := NoMethod(*s) 1229 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1230} 1231 1232// InputParameter: Metadata of an input parameter. 1233type InputParameter struct { 1234 // DataType: The data type of the Parameter. 1235 // 1236 // Possible values: 1237 // "DATA_TYPE_UNSPECIFIED" - Data type is not specified. 1238 // "DATA_TYPE_INT" - DEPRECATED! Use DATA_TYPE_INTEGER. 1239 // "DATA_TYPE_SMALLINT" - Short integer(int16) data type. 1240 // "DATA_TYPE_DOUBLE" - Double data type. 1241 // "DATA_TYPE_DATE" - Date data type. 1242 // "DATA_TYPE_DATETIME" - DEPRECATED! Use DATA_TYPE_TIMESTAMP. 1243 // "DATA_TYPE_TIME" - Time data type. 1244 // "DATA_TYPE_STRING" - DEPRECATED! Use DATA_TYPE_VARCHAR. 1245 // "DATA_TYPE_LONG" - DEPRECATED! Use DATA_TYPE_BIGINT. 1246 // "DATA_TYPE_BOOLEAN" - Boolean data type. 1247 // "DATA_TYPE_DECIMAL" - Decimal data type. 1248 // "DATA_TYPE_UUID" - DEPRECATED! Use DATA_TYPE_VARCHAR. 1249 // "DATA_TYPE_BLOB" - UNSUPPORTED! Binary data type. 1250 // "DATA_TYPE_BIT" - Bit data type. 1251 // "DATA_TYPE_TINYINT" - Small integer(int8) data type. 1252 // "DATA_TYPE_INTEGER" - Integer(int32) data type. 1253 // "DATA_TYPE_BIGINT" - Long integer(int64) data type. 1254 // "DATA_TYPE_FLOAT" - Float data type. 1255 // "DATA_TYPE_REAL" - Real data type. 1256 // "DATA_TYPE_NUMERIC" - Numeric data type. 1257 // "DATA_TYPE_CHAR" - Char data type. 1258 // "DATA_TYPE_VARCHAR" - Varchar data type. 1259 // "DATA_TYPE_LONGVARCHAR" - Longvarchar data type. 1260 // "DATA_TYPE_TIMESTAMP" - Timestamp data type. 1261 // "DATA_TYPE_NCHAR" - Nchar data type. 1262 // "DATA_TYPE_NVARCHAR" - Nvarchar data type. 1263 // "DATA_TYPE_LONGNVARCHAR" - Longnvarchar data type. 1264 // "DATA_TYPE_NULL" - Null data type. 1265 // "DATA_TYPE_OTHER" - UNSUPPORTED! Binary data type. 1266 // "DATA_TYPE_JAVA_OBJECT" - UNSUPPORTED! Binary data type. 1267 // "DATA_TYPE_DISTINCT" - UNSUPPORTED! Binary data type. 1268 // "DATA_TYPE_STRUCT" - UNSUPPORTED! Binary data type. 1269 // "DATA_TYPE_ARRAY" - UNSUPPORTED! Binary data type. 1270 // "DATA_TYPE_CLOB" - UNSUPPORTED! Binary data type. 1271 // "DATA_TYPE_REF" - UNSUPPORTED! Binary data type. 1272 // "DATA_TYPE_DATALINK" - UNSUPPORTED! Binary data type. 1273 // "DATA_TYPE_ROWID" - UNSUPPORTED! Row id data type. 1274 // "DATA_TYPE_BINARY" - UNSUPPORTED! Binary data type. 1275 // "DATA_TYPE_VARBINARY" - UNSUPPORTED! Variable binary data type. 1276 // "DATA_TYPE_LONGVARBINARY" - UNSUPPORTED! Long variable binary data 1277 // type. 1278 // "DATA_TYPE_NCLOB" - UNSUPPORTED! NCLOB data type. 1279 // "DATA_TYPE_SQLXML" - UNSUPPORTED! SQL XML data type is not 1280 // supported. 1281 // "DATA_TYPE_REF_CURSOR" - UNSUPPORTED! Cursor reference type is not 1282 // supported. 1283 // "DATA_TYPE_TIME_WITH_TIMEZONE" - UNSUPPORTED! Use TIME or TIMESTAMP 1284 // instead. 1285 // "DATA_TYPE_TIMESTAMP_WITH_TIMEZONE" - UNSUPPORTED! Use TIMESTAMP 1286 // instead. 1287 DataType string `json:"dataType,omitempty"` 1288 1289 // DefaultValue: The following field specifies the default value of the 1290 // Parameter provided by the external system if a value is not provided. 1291 DefaultValue interface{} `json:"defaultValue,omitempty"` 1292 1293 // Description: A brief description of the Parameter. 1294 Description string `json:"description,omitempty"` 1295 1296 // Nullable: Specifies whether a null value is allowed. 1297 Nullable bool `json:"nullable,omitempty"` 1298 1299 // Parameter: Name of the Parameter. 1300 Parameter string `json:"parameter,omitempty"` 1301 1302 // ForceSendFields is a list of field names (e.g. "DataType") to 1303 // unconditionally include in API requests. By default, fields with 1304 // empty or default values are omitted from API requests. However, any 1305 // non-pointer, non-interface field appearing in ForceSendFields will be 1306 // sent to the server regardless of whether the field is empty or not. 1307 // This may be used to include empty fields in Patch requests. 1308 ForceSendFields []string `json:"-"` 1309 1310 // NullFields is a list of field names (e.g. "DataType") to include in 1311 // API requests with the JSON null value. By default, fields with empty 1312 // values are omitted from API requests. However, any field with an 1313 // empty value appearing in NullFields will be sent to the server as 1314 // null. It is an error if a field in this list has a non-empty value. 1315 // This may be used to include null fields in Patch requests. 1316 NullFields []string `json:"-"` 1317} 1318 1319func (s *InputParameter) MarshalJSON() ([]byte, error) { 1320 type NoMethod InputParameter 1321 raw := NoMethod(*s) 1322 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1323} 1324 1325// JwtClaims: JWT claims used for the jwt-bearer authorization grant. 1326type JwtClaims struct { 1327 // Audience: Value for the "aud" claim. 1328 Audience string `json:"audience,omitempty"` 1329 1330 // Issuer: Value for the "iss" claim. 1331 Issuer string `json:"issuer,omitempty"` 1332 1333 // Subject: Value for the "sub" claim. 1334 Subject string `json:"subject,omitempty"` 1335 1336 // ForceSendFields is a list of field names (e.g. "Audience") to 1337 // unconditionally include in API requests. By default, fields with 1338 // empty or default values are omitted from API requests. However, any 1339 // non-pointer, non-interface field appearing in ForceSendFields will be 1340 // sent to the server regardless of whether the field is empty or not. 1341 // This may be used to include empty fields in Patch requests. 1342 ForceSendFields []string `json:"-"` 1343 1344 // NullFields is a list of field names (e.g. "Audience") to include in 1345 // API requests with the JSON null value. By default, fields with empty 1346 // values are omitted from API requests. However, any field with an 1347 // empty value appearing in NullFields will be sent to the server as 1348 // null. It is an error if a field in this list has a non-empty value. 1349 // This may be used to include null fields in Patch requests. 1350 NullFields []string `json:"-"` 1351} 1352 1353func (s *JwtClaims) MarshalJSON() ([]byte, error) { 1354 type NoMethod JwtClaims 1355 raw := NoMethod(*s) 1356 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1357} 1358 1359// ListConnectionsResponse: Response message for 1360// ConnectorsService.ListConnections 1361type ListConnectionsResponse struct { 1362 // Connections: Connections. 1363 Connections []*Connection `json:"connections,omitempty"` 1364 1365 // NextPageToken: Next page token. 1366 NextPageToken string `json:"nextPageToken,omitempty"` 1367 1368 // Unreachable: Locations that could not be reached. 1369 Unreachable []string `json:"unreachable,omitempty"` 1370 1371 // ServerResponse contains the HTTP response code and headers from the 1372 // server. 1373 googleapi.ServerResponse `json:"-"` 1374 1375 // ForceSendFields is a list of field names (e.g. "Connections") to 1376 // unconditionally include in API requests. By default, fields with 1377 // empty or default values are omitted from API requests. However, any 1378 // non-pointer, non-interface field appearing in ForceSendFields will be 1379 // sent to the server regardless of whether the field is empty or not. 1380 // This may be used to include empty fields in Patch requests. 1381 ForceSendFields []string `json:"-"` 1382 1383 // NullFields is a list of field names (e.g. "Connections") to include 1384 // in API requests with the JSON null value. By default, fields with 1385 // empty values are omitted from API requests. However, any field with 1386 // an empty value appearing in NullFields will be sent to the server as 1387 // null. It is an error if a field in this list has a non-empty value. 1388 // This may be used to include null fields in Patch requests. 1389 NullFields []string `json:"-"` 1390} 1391 1392func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) { 1393 type NoMethod ListConnectionsResponse 1394 raw := NoMethod(*s) 1395 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1396} 1397 1398// ListConnectorVersionsResponse: Response message for 1399// Connectors.ListConnectorVersions. 1400type ListConnectorVersionsResponse struct { 1401 // ConnectorVersions: A list of connector versions. 1402 ConnectorVersions []*ConnectorVersion `json:"connectorVersions,omitempty"` 1403 1404 // NextPageToken: Next page token. 1405 NextPageToken string `json:"nextPageToken,omitempty"` 1406 1407 // Unreachable: Locations that could not be reached. 1408 Unreachable []string `json:"unreachable,omitempty"` 1409 1410 // ServerResponse contains the HTTP response code and headers from the 1411 // server. 1412 googleapi.ServerResponse `json:"-"` 1413 1414 // ForceSendFields is a list of field names (e.g. "ConnectorVersions") 1415 // to unconditionally include in API requests. By default, fields with 1416 // empty or default values are omitted from API requests. However, any 1417 // non-pointer, non-interface field appearing in ForceSendFields will be 1418 // sent to the server regardless of whether the field is empty or not. 1419 // This may be used to include empty fields in Patch requests. 1420 ForceSendFields []string `json:"-"` 1421 1422 // NullFields is a list of field names (e.g. "ConnectorVersions") to 1423 // include in API requests with the JSON null value. By default, fields 1424 // with empty values are omitted from API requests. However, any field 1425 // with an empty value appearing in NullFields will be sent to the 1426 // server as null. It is an error if a field in this list has a 1427 // non-empty value. This may be used to include null fields in Patch 1428 // requests. 1429 NullFields []string `json:"-"` 1430} 1431 1432func (s *ListConnectorVersionsResponse) MarshalJSON() ([]byte, error) { 1433 type NoMethod ListConnectorVersionsResponse 1434 raw := NoMethod(*s) 1435 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1436} 1437 1438// ListConnectorsResponse: Response message for 1439// Connectors.ListConnectors. 1440type ListConnectorsResponse struct { 1441 // Connectors: A list of connectors. 1442 Connectors []*Connector `json:"connectors,omitempty"` 1443 1444 // NextPageToken: Next page token. 1445 NextPageToken string `json:"nextPageToken,omitempty"` 1446 1447 // Unreachable: Locations that could not be reached. 1448 Unreachable []string `json:"unreachable,omitempty"` 1449 1450 // ServerResponse contains the HTTP response code and headers from the 1451 // server. 1452 googleapi.ServerResponse `json:"-"` 1453 1454 // ForceSendFields is a list of field names (e.g. "Connectors") to 1455 // unconditionally include in API requests. By default, fields with 1456 // empty or default values are omitted from API requests. However, any 1457 // non-pointer, non-interface field appearing in ForceSendFields will be 1458 // sent to the server regardless of whether the field is empty or not. 1459 // This may be used to include empty fields in Patch requests. 1460 ForceSendFields []string `json:"-"` 1461 1462 // NullFields is a list of field names (e.g. "Connectors") to include in 1463 // API requests with the JSON null value. By default, fields with empty 1464 // values are omitted from API requests. However, any field with an 1465 // empty value appearing in NullFields will be sent to the server as 1466 // null. It is an error if a field in this list has a non-empty value. 1467 // This may be used to include null fields in Patch requests. 1468 NullFields []string `json:"-"` 1469} 1470 1471func (s *ListConnectorsResponse) MarshalJSON() ([]byte, error) { 1472 type NoMethod ListConnectorsResponse 1473 raw := NoMethod(*s) 1474 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1475} 1476 1477// ListLocationsResponse: The response message for 1478// Locations.ListLocations. 1479type ListLocationsResponse struct { 1480 // Locations: A list of locations that matches the specified filter in 1481 // the request. 1482 Locations []*Location `json:"locations,omitempty"` 1483 1484 // NextPageToken: The standard List next-page token. 1485 NextPageToken string `json:"nextPageToken,omitempty"` 1486 1487 // ServerResponse contains the HTTP response code and headers from the 1488 // server. 1489 googleapi.ServerResponse `json:"-"` 1490 1491 // ForceSendFields is a list of field names (e.g. "Locations") to 1492 // unconditionally include in API requests. By default, fields with 1493 // empty or default values are omitted from API requests. However, any 1494 // non-pointer, non-interface field appearing in ForceSendFields will be 1495 // sent to the server regardless of whether the field is empty or not. 1496 // This may be used to include empty fields in Patch requests. 1497 ForceSendFields []string `json:"-"` 1498 1499 // NullFields is a list of field names (e.g. "Locations") to include in 1500 // API requests with the JSON null value. By default, fields with empty 1501 // values are omitted from API requests. However, any field with an 1502 // empty value appearing in NullFields will be sent to the server as 1503 // null. It is an error if a field in this list has a non-empty value. 1504 // This may be used to include null fields in Patch requests. 1505 NullFields []string `json:"-"` 1506} 1507 1508func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 1509 type NoMethod ListLocationsResponse 1510 raw := NoMethod(*s) 1511 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1512} 1513 1514// ListOperationsResponse: The response message for 1515// Operations.ListOperations. 1516type ListOperationsResponse struct { 1517 // NextPageToken: The standard List next-page token. 1518 NextPageToken string `json:"nextPageToken,omitempty"` 1519 1520 // Operations: A list of operations that matches the specified filter in 1521 // the request. 1522 Operations []*Operation `json:"operations,omitempty"` 1523 1524 // ServerResponse contains the HTTP response code and headers from the 1525 // server. 1526 googleapi.ServerResponse `json:"-"` 1527 1528 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1529 // unconditionally include in API requests. By default, fields with 1530 // empty or default values are omitted from API requests. However, any 1531 // non-pointer, non-interface field appearing in ForceSendFields will be 1532 // sent to the server regardless of whether the field is empty or not. 1533 // This may be used to include empty fields in Patch requests. 1534 ForceSendFields []string `json:"-"` 1535 1536 // NullFields is a list of field names (e.g. "NextPageToken") to include 1537 // in API requests with the JSON null value. By default, fields with 1538 // empty values are omitted from API requests. However, any field with 1539 // an empty value appearing in NullFields will be sent to the server as 1540 // null. It is an error if a field in this list has a non-empty value. 1541 // This may be used to include null fields in Patch requests. 1542 NullFields []string `json:"-"` 1543} 1544 1545func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) { 1546 type NoMethod ListOperationsResponse 1547 raw := NoMethod(*s) 1548 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1549} 1550 1551// ListProvidersResponse: Response message for Connectors.ListProviders. 1552type ListProvidersResponse struct { 1553 // NextPageToken: Next page token. 1554 NextPageToken string `json:"nextPageToken,omitempty"` 1555 1556 // Providers: A list of providers. 1557 Providers []*Provider `json:"providers,omitempty"` 1558 1559 // Unreachable: Locations that could not be reached. 1560 Unreachable []string `json:"unreachable,omitempty"` 1561 1562 // ServerResponse contains the HTTP response code and headers from the 1563 // server. 1564 googleapi.ServerResponse `json:"-"` 1565 1566 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1567 // unconditionally include in API requests. By default, fields with 1568 // empty or default values are omitted from API requests. However, any 1569 // non-pointer, non-interface field appearing in ForceSendFields will be 1570 // sent to the server regardless of whether the field is empty or not. 1571 // This may be used to include empty fields in Patch requests. 1572 ForceSendFields []string `json:"-"` 1573 1574 // NullFields is a list of field names (e.g. "NextPageToken") to include 1575 // in API requests with the JSON null value. By default, fields with 1576 // empty values are omitted from API requests. However, any field with 1577 // an empty value appearing in NullFields will be sent to the server as 1578 // null. It is an error if a field in this list has a non-empty value. 1579 // This may be used to include null fields in Patch requests. 1580 NullFields []string `json:"-"` 1581} 1582 1583func (s *ListProvidersResponse) MarshalJSON() ([]byte, error) { 1584 type NoMethod ListProvidersResponse 1585 raw := NoMethod(*s) 1586 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1587} 1588 1589// ListRuntimeActionSchemasResponse: Response message for 1590// ConnectorsService.ListRuntimeActionSchemas. 1591type ListRuntimeActionSchemasResponse struct { 1592 // NextPageToken: Next page token. 1593 NextPageToken string `json:"nextPageToken,omitempty"` 1594 1595 // RuntimeActionSchemas: Runtime action schemas. 1596 RuntimeActionSchemas []*RuntimeActionSchema `json:"runtimeActionSchemas,omitempty"` 1597 1598 // ServerResponse contains the HTTP response code and headers from the 1599 // server. 1600 googleapi.ServerResponse `json:"-"` 1601 1602 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1603 // unconditionally include in API requests. By default, fields with 1604 // empty or default values are omitted from API requests. However, any 1605 // non-pointer, non-interface field appearing in ForceSendFields will be 1606 // sent to the server regardless of whether the field is empty or not. 1607 // This may be used to include empty fields in Patch requests. 1608 ForceSendFields []string `json:"-"` 1609 1610 // NullFields is a list of field names (e.g. "NextPageToken") to include 1611 // in API requests with the JSON null value. By default, fields with 1612 // empty values are omitted from API requests. However, any field with 1613 // an empty value appearing in NullFields will be sent to the server as 1614 // null. It is an error if a field in this list has a non-empty value. 1615 // This may be used to include null fields in Patch requests. 1616 NullFields []string `json:"-"` 1617} 1618 1619func (s *ListRuntimeActionSchemasResponse) MarshalJSON() ([]byte, error) { 1620 type NoMethod ListRuntimeActionSchemasResponse 1621 raw := NoMethod(*s) 1622 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1623} 1624 1625// ListRuntimeEntitySchemasResponse: Response message for 1626// ConnectorsService.ListRuntimeEntitySchemas. 1627type ListRuntimeEntitySchemasResponse struct { 1628 // NextPageToken: Next page token. 1629 NextPageToken string `json:"nextPageToken,omitempty"` 1630 1631 // RuntimeEntitySchemas: Runtime entity schemas. 1632 RuntimeEntitySchemas []*RuntimeEntitySchema `json:"runtimeEntitySchemas,omitempty"` 1633 1634 // ServerResponse contains the HTTP response code and headers from the 1635 // server. 1636 googleapi.ServerResponse `json:"-"` 1637 1638 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1639 // unconditionally include in API requests. By default, fields with 1640 // empty or default values are omitted from API requests. However, any 1641 // non-pointer, non-interface field appearing in ForceSendFields will be 1642 // sent to the server regardless of whether the field is empty or not. 1643 // This may be used to include empty fields in Patch requests. 1644 ForceSendFields []string `json:"-"` 1645 1646 // NullFields is a list of field names (e.g. "NextPageToken") to include 1647 // in API requests with the JSON null value. By default, fields with 1648 // empty values are omitted from API requests. However, any field with 1649 // an empty value appearing in NullFields will be sent to the server as 1650 // null. It is an error if a field in this list has a non-empty value. 1651 // This may be used to include null fields in Patch requests. 1652 NullFields []string `json:"-"` 1653} 1654 1655func (s *ListRuntimeEntitySchemasResponse) MarshalJSON() ([]byte, error) { 1656 type NoMethod ListRuntimeEntitySchemasResponse 1657 raw := NoMethod(*s) 1658 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1659} 1660 1661// Location: A resource that represents Google Cloud Platform location. 1662type Location struct { 1663 // DisplayName: The friendly name for this location, typically a nearby 1664 // city name. For example, "Tokyo". 1665 DisplayName string `json:"displayName,omitempty"` 1666 1667 // Labels: Cross-service attributes for the location. For example 1668 // {"cloud.googleapis.com/region": "us-east1"} 1669 Labels map[string]string `json:"labels,omitempty"` 1670 1671 // LocationId: The canonical id for this location. For example: 1672 // "us-east1". 1673 LocationId string `json:"locationId,omitempty"` 1674 1675 // Metadata: Service-specific metadata. For example the available 1676 // capacity at the given location. 1677 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1678 1679 // Name: Resource name for the location, which may vary between 1680 // implementations. For example: 1681 // "projects/example-project/locations/us-east1" 1682 Name string `json:"name,omitempty"` 1683 1684 // ServerResponse contains the HTTP response code and headers from the 1685 // server. 1686 googleapi.ServerResponse `json:"-"` 1687 1688 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1689 // unconditionally include in API requests. By default, fields with 1690 // empty or default values are omitted from API requests. However, any 1691 // non-pointer, non-interface field appearing in ForceSendFields will be 1692 // sent to the server regardless of whether the field is empty or not. 1693 // This may be used to include empty fields in Patch requests. 1694 ForceSendFields []string `json:"-"` 1695 1696 // NullFields is a list of field names (e.g. "DisplayName") to include 1697 // in API requests with the JSON null value. By default, fields with 1698 // empty values are omitted from API requests. However, any field with 1699 // an empty value appearing in NullFields will be sent to the server as 1700 // null. It is an error if a field in this list has a non-empty value. 1701 // This may be used to include null fields in Patch requests. 1702 NullFields []string `json:"-"` 1703} 1704 1705func (s *Location) MarshalJSON() ([]byte, error) { 1706 type NoMethod Location 1707 raw := NoMethod(*s) 1708 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1709} 1710 1711// LockConfig: Determines whether or no a connection is locked. If 1712// locked, a reason must be specified. 1713type LockConfig struct { 1714 // Locked: Indicates whether or not the connection is locked. 1715 Locked bool `json:"locked,omitempty"` 1716 1717 // Reason: Describes why a connection is locked. 1718 Reason string `json:"reason,omitempty"` 1719 1720 // ForceSendFields is a list of field names (e.g. "Locked") to 1721 // unconditionally include in API requests. By default, fields with 1722 // empty or default values are omitted from API requests. However, any 1723 // non-pointer, non-interface field appearing in ForceSendFields will be 1724 // sent to the server regardless of whether the field is empty or not. 1725 // This may be used to include empty fields in Patch requests. 1726 ForceSendFields []string `json:"-"` 1727 1728 // NullFields is a list of field names (e.g. "Locked") to include in API 1729 // requests with the JSON null value. By default, fields with empty 1730 // values are omitted from API requests. However, any field with an 1731 // empty value appearing in NullFields will be sent to the server as 1732 // null. It is an error if a field in this list has a non-empty value. 1733 // This may be used to include null fields in Patch requests. 1734 NullFields []string `json:"-"` 1735} 1736 1737func (s *LockConfig) MarshalJSON() ([]byte, error) { 1738 type NoMethod LockConfig 1739 raw := NoMethod(*s) 1740 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1741} 1742 1743// Oauth2ClientCredentials: Parameters to support Oauth 2.0 Client 1744// Credentials Grant Authentication. See 1745// https://tools.ietf.org/html/rfc6749#section-1.3.4 for more details. 1746type Oauth2ClientCredentials struct { 1747 // ClientId: The client identifier. 1748 ClientId string `json:"clientId,omitempty"` 1749 1750 // ClientSecret: Secret version reference containing the client secret. 1751 ClientSecret *Secret `json:"clientSecret,omitempty"` 1752 1753 // ForceSendFields is a list of field names (e.g. "ClientId") to 1754 // unconditionally include in API requests. By default, fields with 1755 // empty or default values are omitted from API requests. However, any 1756 // non-pointer, non-interface field appearing in ForceSendFields will be 1757 // sent to the server regardless of whether the field is empty or not. 1758 // This may be used to include empty fields in Patch requests. 1759 ForceSendFields []string `json:"-"` 1760 1761 // NullFields is a list of field names (e.g. "ClientId") to include in 1762 // API requests with the JSON null value. By default, fields with empty 1763 // values are omitted from API requests. However, any field with an 1764 // empty value appearing in NullFields will be sent to the server as 1765 // null. It is an error if a field in this list has a non-empty value. 1766 // This may be used to include null fields in Patch requests. 1767 NullFields []string `json:"-"` 1768} 1769 1770func (s *Oauth2ClientCredentials) MarshalJSON() ([]byte, error) { 1771 type NoMethod Oauth2ClientCredentials 1772 raw := NoMethod(*s) 1773 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1774} 1775 1776// Oauth2JwtBearer: Parameters to support JSON Web Token (JWT) Profile 1777// for Oauth 2.0 Authorization Grant based authentication. See 1778// https://tools.ietf.org/html/rfc7523 for more details. 1779type Oauth2JwtBearer struct { 1780 // ClientKey: Secret version reference containing a PKCS#8 PEM-encoded 1781 // private key associated with the Client Certificate. This private key 1782 // will be used to sign JWTs used for the jwt-bearer authorization 1783 // grant. Specified in the form as: `projects/*/secrets/*/versions/*`. 1784 ClientKey *Secret `json:"clientKey,omitempty"` 1785 1786 // JwtClaims: JwtClaims providers fields to generate the token. 1787 JwtClaims *JwtClaims `json:"jwtClaims,omitempty"` 1788 1789 // ForceSendFields is a list of field names (e.g. "ClientKey") to 1790 // unconditionally include in API requests. By default, fields with 1791 // empty or default values are omitted from API requests. However, any 1792 // non-pointer, non-interface field appearing in ForceSendFields will be 1793 // sent to the server regardless of whether the field is empty or not. 1794 // This may be used to include empty fields in Patch requests. 1795 ForceSendFields []string `json:"-"` 1796 1797 // NullFields is a list of field names (e.g. "ClientKey") to include in 1798 // API requests with the JSON null value. By default, fields with empty 1799 // values are omitted from API requests. However, any field with an 1800 // empty value appearing in NullFields will be sent to the server as 1801 // null. It is an error if a field in this list has a non-empty value. 1802 // This may be used to include null fields in Patch requests. 1803 NullFields []string `json:"-"` 1804} 1805 1806func (s *Oauth2JwtBearer) MarshalJSON() ([]byte, error) { 1807 type NoMethod Oauth2JwtBearer 1808 raw := NoMethod(*s) 1809 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1810} 1811 1812// Operation: This resource represents a long-running operation that is 1813// the result of a network API call. 1814type Operation struct { 1815 // Done: If the value is `false`, it means the operation is still in 1816 // progress. If `true`, the operation is completed, and either `error` 1817 // or `response` is available. 1818 Done bool `json:"done,omitempty"` 1819 1820 // Error: The error result of the operation in case of failure or 1821 // cancellation. 1822 Error *Status `json:"error,omitempty"` 1823 1824 // Metadata: Service-specific metadata associated with the operation. It 1825 // typically contains progress information and common metadata such as 1826 // create time. Some services might not provide such metadata. Any 1827 // method that returns a long-running operation should document the 1828 // metadata type, if any. 1829 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1830 1831 // Name: The server-assigned name, which is only unique within the same 1832 // service that originally returns it. If you use the default HTTP 1833 // mapping, the `name` should be a resource name ending with 1834 // `operations/{unique_id}`. 1835 Name string `json:"name,omitempty"` 1836 1837 // Response: The normal response of the operation in case of success. If 1838 // the original method returns no data on success, such as `Delete`, the 1839 // response is `google.protobuf.Empty`. If the original method is 1840 // standard `Get`/`Create`/`Update`, the response should be the 1841 // resource. For other methods, the response should have the type 1842 // `XxxResponse`, where `Xxx` is the original method name. For example, 1843 // if the original method name is `TakeSnapshot()`, the inferred 1844 // response type is `TakeSnapshotResponse`. 1845 Response googleapi.RawMessage `json:"response,omitempty"` 1846 1847 // ServerResponse contains the HTTP response code and headers from the 1848 // server. 1849 googleapi.ServerResponse `json:"-"` 1850 1851 // ForceSendFields is a list of field names (e.g. "Done") to 1852 // unconditionally include in API requests. By default, fields with 1853 // empty or default values are omitted from API requests. However, any 1854 // non-pointer, non-interface field appearing in ForceSendFields will be 1855 // sent to the server regardless of whether the field is empty or not. 1856 // This may be used to include empty fields in Patch requests. 1857 ForceSendFields []string `json:"-"` 1858 1859 // NullFields is a list of field names (e.g. "Done") to include in API 1860 // requests with the JSON null value. By default, fields with empty 1861 // values are omitted from API requests. However, any field with an 1862 // empty value appearing in NullFields will be sent to the server as 1863 // null. It is an error if a field in this list has a non-empty value. 1864 // This may be used to include null fields in Patch requests. 1865 NullFields []string `json:"-"` 1866} 1867 1868func (s *Operation) MarshalJSON() ([]byte, error) { 1869 type NoMethod Operation 1870 raw := NoMethod(*s) 1871 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1872} 1873 1874// OperationMetadata: Represents the metadata of the long-running 1875// operation. 1876type OperationMetadata struct { 1877 // ApiVersion: Output only. API version used to start the operation. 1878 ApiVersion string `json:"apiVersion,omitempty"` 1879 1880 // CreateTime: Output only. The time the operation was created. 1881 CreateTime string `json:"createTime,omitempty"` 1882 1883 // EndTime: Output only. The time the operation finished running. 1884 EndTime string `json:"endTime,omitempty"` 1885 1886 // RequestedCancellation: Output only. Identifies whether the user has 1887 // requested cancellation of the operation. Operations that have 1888 // successfully been cancelled have Operation.error value with a 1889 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. 1890 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 1891 1892 // StatusMessage: Output only. Human-readable status of the operation, 1893 // if any. 1894 StatusMessage string `json:"statusMessage,omitempty"` 1895 1896 // Target: Output only. Server-defined resource path for the target of 1897 // the operation. 1898 Target string `json:"target,omitempty"` 1899 1900 // Verb: Output only. Name of the verb executed by the operation. 1901 Verb string `json:"verb,omitempty"` 1902 1903 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1904 // unconditionally include in API requests. By default, fields with 1905 // empty or default values are omitted from API requests. However, any 1906 // non-pointer, non-interface field appearing in ForceSendFields will be 1907 // sent to the server regardless of whether the field is empty or not. 1908 // This may be used to include empty fields in Patch requests. 1909 ForceSendFields []string `json:"-"` 1910 1911 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1912 // API requests with the JSON null value. By default, fields with empty 1913 // values are omitted from API requests. However, any field with an 1914 // empty value appearing in NullFields will be sent to the server as 1915 // null. It is an error if a field in this list has a non-empty value. 1916 // This may be used to include null fields in Patch requests. 1917 NullFields []string `json:"-"` 1918} 1919 1920func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 1921 type NoMethod OperationMetadata 1922 raw := NoMethod(*s) 1923 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1924} 1925 1926// Policy: An Identity and Access Management (IAM) policy, which 1927// specifies access controls for Google Cloud resources. A `Policy` is a 1928// collection of `bindings`. A `binding` binds one or more `members` to 1929// a single `role`. Members can be user accounts, service accounts, 1930// Google groups, and domains (such as G Suite). A `role` is a named 1931// list of permissions; each `role` can be an IAM predefined role or a 1932// user-created custom role. For some types of Google Cloud resources, a 1933// `binding` can also specify a `condition`, which is a logical 1934// expression that allows access to a resource only if the expression 1935// evaluates to `true`. A condition can add constraints based on 1936// attributes of the request, the resource, or both. To learn which 1937// resources support conditions in their IAM policies, see the IAM 1938// documentation 1939// (https://cloud.google.com/iam/help/conditions/resource-policies). 1940// **JSON example:** { "bindings": [ { "role": 1941// "roles/resourcemanager.organizationAdmin", "members": [ 1942// "user:mike@example.com", "group:admins@example.com", 1943// "domain:google.com", 1944// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { 1945// "role": "roles/resourcemanager.organizationViewer", "members": [ 1946// "user:eve@example.com" ], "condition": { "title": "expirable access", 1947// "description": "Does not grant access after Sep 2020", "expression": 1948// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], 1949// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - 1950// members: - user:mike@example.com - group:admins@example.com - 1951// domain:google.com - 1952// serviceAccount:my-project-id@appspot.gserviceaccount.com role: 1953// roles/resourcemanager.organizationAdmin - members: - 1954// user:eve@example.com role: roles/resourcemanager.organizationViewer 1955// condition: title: expirable access description: Does not grant access 1956// after Sep 2020 expression: request.time < 1957// timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 1958// For a description of IAM and its features, see the IAM documentation 1959// (https://cloud.google.com/iam/docs/). 1960type Policy struct { 1961 // AuditConfigs: Specifies cloud audit logging configuration for this 1962 // policy. 1963 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 1964 1965 // Bindings: Associates a list of `members` to a `role`. Optionally, may 1966 // specify a `condition` that determines how and when the `bindings` are 1967 // applied. Each of the `bindings` must contain at least one member. The 1968 // `bindings` in a `Policy` can refer to up to 1,500 members; up to 250 1969 // of these members can be Google groups. Each occurrence of a member 1970 // counts towards these limits. For example, if the `bindings` grant 50 1971 // different roles to `user:alice@example.com`, and not to any other 1972 // member, then you can add another 1,450 members to the `bindings` in 1973 // the `Policy`. 1974 Bindings []*Binding `json:"bindings,omitempty"` 1975 1976 // Etag: `etag` is used for optimistic concurrency control as a way to 1977 // help prevent simultaneous updates of a policy from overwriting each 1978 // other. It is strongly suggested that systems make use of the `etag` 1979 // in the read-modify-write cycle to perform policy updates in order to 1980 // avoid race conditions: An `etag` is returned in the response to 1981 // `getIamPolicy`, and systems are expected to put that etag in the 1982 // request to `setIamPolicy` to ensure that their change will be applied 1983 // to the same version of the policy. **Important:** If you use IAM 1984 // Conditions, you must include the `etag` field whenever you call 1985 // `setIamPolicy`. If you omit this field, then IAM allows you to 1986 // overwrite a version `3` policy with a version `1` policy, and all of 1987 // the conditions in the version `3` policy are lost. 1988 Etag string `json:"etag,omitempty"` 1989 1990 // Version: Specifies the format of the policy. Valid values are `0`, 1991 // `1`, and `3`. Requests that specify an invalid value are rejected. 1992 // Any operation that affects conditional role bindings must specify 1993 // version `3`. This requirement applies to the following operations: * 1994 // Getting a policy that includes a conditional role binding * Adding a 1995 // conditional role binding to a policy * Changing a conditional role 1996 // binding in a policy * Removing any role binding, with or without a 1997 // condition, from a policy that includes conditions **Important:** If 1998 // you use IAM Conditions, you must include the `etag` field whenever 1999 // you call `setIamPolicy`. If you omit this field, then IAM allows you 2000 // to overwrite a version `3` policy with a version `1` policy, and all 2001 // of the conditions in the version `3` policy are lost. If a policy 2002 // does not include any conditions, operations on that policy may 2003 // specify any valid version or leave the field unset. To learn which 2004 // resources support conditions in their IAM policies, see the IAM 2005 // documentation 2006 // (https://cloud.google.com/iam/help/conditions/resource-policies). 2007 Version int64 `json:"version,omitempty"` 2008 2009 // ServerResponse contains the HTTP response code and headers from the 2010 // server. 2011 googleapi.ServerResponse `json:"-"` 2012 2013 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 2014 // unconditionally include in API requests. By default, fields with 2015 // empty or default values are omitted from API requests. However, any 2016 // non-pointer, non-interface field appearing in ForceSendFields will be 2017 // sent to the server regardless of whether the field is empty or not. 2018 // This may be used to include empty fields in Patch requests. 2019 ForceSendFields []string `json:"-"` 2020 2021 // NullFields is a list of field names (e.g. "AuditConfigs") to include 2022 // in API requests with the JSON null value. By default, fields with 2023 // empty values are omitted from API requests. However, any field with 2024 // an empty value appearing in NullFields will be sent to the server as 2025 // null. It is an error if a field in this list has a non-empty value. 2026 // This may be used to include null fields in Patch requests. 2027 NullFields []string `json:"-"` 2028} 2029 2030func (s *Policy) MarshalJSON() ([]byte, error) { 2031 type NoMethod Policy 2032 raw := NoMethod(*s) 2033 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2034} 2035 2036// Provider: Provider indicates the owner who provides the connectors. 2037type Provider struct { 2038 // CreateTime: Output only. Created time. 2039 CreateTime string `json:"createTime,omitempty"` 2040 2041 // Description: Output only. Description of the resource. 2042 Description string `json:"description,omitempty"` 2043 2044 // DisplayName: Output only. Display name. 2045 DisplayName string `json:"displayName,omitempty"` 2046 2047 // DocumentationUri: Output only. Link to documentation page. 2048 DocumentationUri string `json:"documentationUri,omitempty"` 2049 2050 // ExternalUri: Output only. Link to external page. 2051 ExternalUri string `json:"externalUri,omitempty"` 2052 2053 // Labels: Output only. Resource labels to represent user-provided 2054 // metadata. Refer to cloud documentation on labels for more details. 2055 // https://cloud.google.com/compute/docs/labeling-resources 2056 Labels map[string]string `json:"labels,omitempty"` 2057 2058 // Name: Output only. Resource name of the Provider. Format: 2059 // projects/{project}/locations/{location}/providers/{provider} 2060 Name string `json:"name,omitempty"` 2061 2062 // UpdateTime: Output only. Updated time. 2063 UpdateTime string `json:"updateTime,omitempty"` 2064 2065 // WebAssetsLocation: Output only. Cloud storage location of icons etc 2066 // consumed by UI. 2067 WebAssetsLocation string `json:"webAssetsLocation,omitempty"` 2068 2069 // ServerResponse contains the HTTP response code and headers from the 2070 // server. 2071 googleapi.ServerResponse `json:"-"` 2072 2073 // ForceSendFields is a list of field names (e.g. "CreateTime") to 2074 // unconditionally include in API requests. By default, fields with 2075 // empty or default values are omitted from API requests. However, any 2076 // non-pointer, non-interface field appearing in ForceSendFields will be 2077 // sent to the server regardless of whether the field is empty or not. 2078 // This may be used to include empty fields in Patch requests. 2079 ForceSendFields []string `json:"-"` 2080 2081 // NullFields is a list of field names (e.g. "CreateTime") to include in 2082 // API requests with the JSON null value. By default, fields with empty 2083 // values are omitted from API requests. However, any field with an 2084 // empty value appearing in NullFields will be sent to the server as 2085 // null. It is an error if a field in this list has a non-empty value. 2086 // This may be used to include null fields in Patch requests. 2087 NullFields []string `json:"-"` 2088} 2089 2090func (s *Provider) MarshalJSON() ([]byte, error) { 2091 type NoMethod Provider 2092 raw := NoMethod(*s) 2093 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2094} 2095 2096// Resource: Resource definition 2097type Resource struct { 2098 // PathTemplate: Template to uniquely represent a GCP resource in a 2099 // format IAM expects This is a template that can have references to 2100 // other values provided in the config variable template. 2101 PathTemplate string `json:"pathTemplate,omitempty"` 2102 2103 // Type: Different types of resource supported. 2104 // 2105 // Possible values: 2106 // "TYPE_UNSPECIFIED" - Value type is not specified. 2107 // "GCP_PROJECT" - GCP Project Resource. 2108 // "GCP_RESOURCE" - Any GCP Resource which is identified uniquely by 2109 // IAM. 2110 // "GCP_SECRETMANAGER_SECRET" - GCP Secret Resource. 2111 // "GCP_SECRETMANAGER_SECRET_VERSION" - GCP Secret Version Resource. 2112 Type string `json:"type,omitempty"` 2113 2114 // ForceSendFields is a list of field names (e.g. "PathTemplate") to 2115 // unconditionally include in API requests. By default, fields with 2116 // empty or default values are omitted from API requests. However, any 2117 // non-pointer, non-interface field appearing in ForceSendFields will be 2118 // sent to the server regardless of whether the field is empty or not. 2119 // This may be used to include empty fields in Patch requests. 2120 ForceSendFields []string `json:"-"` 2121 2122 // NullFields is a list of field names (e.g. "PathTemplate") to include 2123 // in API requests with the JSON null value. By default, fields with 2124 // empty values are omitted from API requests. However, any field with 2125 // an empty value appearing in NullFields will be sent to the server as 2126 // null. It is an error if a field in this list has a non-empty value. 2127 // This may be used to include null fields in Patch requests. 2128 NullFields []string `json:"-"` 2129} 2130 2131func (s *Resource) MarshalJSON() ([]byte, error) { 2132 type NoMethod Resource 2133 raw := NoMethod(*s) 2134 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2135} 2136 2137// ResultMetadata: Metadata of result field. 2138type ResultMetadata struct { 2139 // DataType: The data type of the field. 2140 // 2141 // Possible values: 2142 // "DATA_TYPE_UNSPECIFIED" - Data type is not specified. 2143 // "DATA_TYPE_INT" - DEPRECATED! Use DATA_TYPE_INTEGER. 2144 // "DATA_TYPE_SMALLINT" - Short integer(int16) data type. 2145 // "DATA_TYPE_DOUBLE" - Double data type. 2146 // "DATA_TYPE_DATE" - Date data type. 2147 // "DATA_TYPE_DATETIME" - DEPRECATED! Use DATA_TYPE_TIMESTAMP. 2148 // "DATA_TYPE_TIME" - Time data type. 2149 // "DATA_TYPE_STRING" - DEPRECATED! Use DATA_TYPE_VARCHAR. 2150 // "DATA_TYPE_LONG" - DEPRECATED! Use DATA_TYPE_BIGINT. 2151 // "DATA_TYPE_BOOLEAN" - Boolean data type. 2152 // "DATA_TYPE_DECIMAL" - Decimal data type. 2153 // "DATA_TYPE_UUID" - DEPRECATED! Use DATA_TYPE_VARCHAR. 2154 // "DATA_TYPE_BLOB" - UNSUPPORTED! Binary data type. 2155 // "DATA_TYPE_BIT" - Bit data type. 2156 // "DATA_TYPE_TINYINT" - Small integer(int8) data type. 2157 // "DATA_TYPE_INTEGER" - Integer(int32) data type. 2158 // "DATA_TYPE_BIGINT" - Long integer(int64) data type. 2159 // "DATA_TYPE_FLOAT" - Float data type. 2160 // "DATA_TYPE_REAL" - Real data type. 2161 // "DATA_TYPE_NUMERIC" - Numeric data type. 2162 // "DATA_TYPE_CHAR" - Char data type. 2163 // "DATA_TYPE_VARCHAR" - Varchar data type. 2164 // "DATA_TYPE_LONGVARCHAR" - Longvarchar data type. 2165 // "DATA_TYPE_TIMESTAMP" - Timestamp data type. 2166 // "DATA_TYPE_NCHAR" - Nchar data type. 2167 // "DATA_TYPE_NVARCHAR" - Nvarchar data type. 2168 // "DATA_TYPE_LONGNVARCHAR" - Longnvarchar data type. 2169 // "DATA_TYPE_NULL" - Null data type. 2170 // "DATA_TYPE_OTHER" - UNSUPPORTED! Binary data type. 2171 // "DATA_TYPE_JAVA_OBJECT" - UNSUPPORTED! Binary data type. 2172 // "DATA_TYPE_DISTINCT" - UNSUPPORTED! Binary data type. 2173 // "DATA_TYPE_STRUCT" - UNSUPPORTED! Binary data type. 2174 // "DATA_TYPE_ARRAY" - UNSUPPORTED! Binary data type. 2175 // "DATA_TYPE_CLOB" - UNSUPPORTED! Binary data type. 2176 // "DATA_TYPE_REF" - UNSUPPORTED! Binary data type. 2177 // "DATA_TYPE_DATALINK" - UNSUPPORTED! Binary data type. 2178 // "DATA_TYPE_ROWID" - UNSUPPORTED! Row id data type. 2179 // "DATA_TYPE_BINARY" - UNSUPPORTED! Binary data type. 2180 // "DATA_TYPE_VARBINARY" - UNSUPPORTED! Variable binary data type. 2181 // "DATA_TYPE_LONGVARBINARY" - UNSUPPORTED! Long variable binary data 2182 // type. 2183 // "DATA_TYPE_NCLOB" - UNSUPPORTED! NCLOB data type. 2184 // "DATA_TYPE_SQLXML" - UNSUPPORTED! SQL XML data type is not 2185 // supported. 2186 // "DATA_TYPE_REF_CURSOR" - UNSUPPORTED! Cursor reference type is not 2187 // supported. 2188 // "DATA_TYPE_TIME_WITH_TIMEZONE" - UNSUPPORTED! Use TIME or TIMESTAMP 2189 // instead. 2190 // "DATA_TYPE_TIMESTAMP_WITH_TIMEZONE" - UNSUPPORTED! Use TIMESTAMP 2191 // instead. 2192 DataType string `json:"dataType,omitempty"` 2193 2194 // Description: A brief description of the field. 2195 Description string `json:"description,omitempty"` 2196 2197 // Field: Name of the result field. 2198 Field string `json:"field,omitempty"` 2199 2200 // ForceSendFields is a list of field names (e.g. "DataType") to 2201 // unconditionally include in API requests. By default, fields with 2202 // empty or default values are omitted from API requests. However, any 2203 // non-pointer, non-interface field appearing in ForceSendFields will be 2204 // sent to the server regardless of whether the field is empty or not. 2205 // This may be used to include empty fields in Patch requests. 2206 ForceSendFields []string `json:"-"` 2207 2208 // NullFields is a list of field names (e.g. "DataType") to include in 2209 // API requests with the JSON null value. By default, fields with empty 2210 // values are omitted from API requests. However, any field with an 2211 // empty value appearing in NullFields will be sent to the server as 2212 // null. It is an error if a field in this list has a non-empty value. 2213 // This may be used to include null fields in Patch requests. 2214 NullFields []string `json:"-"` 2215} 2216 2217func (s *ResultMetadata) MarshalJSON() ([]byte, error) { 2218 type NoMethod ResultMetadata 2219 raw := NoMethod(*s) 2220 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2221} 2222 2223// RoleGrant: This configuration defines all the Cloud IAM roles that 2224// needs to be granted to a particular GCP resource for the selected 2225// prinicpal like service account. These configurations will let UI 2226// display to customers what IAM roles need to be granted by them. Or 2227// these configurations can be used by the UI to render a 'grant' button 2228// to do the same on behalf of the user. 2229type RoleGrant struct { 2230 // HelperTextTemplate: Template that UI can use to provide helper text 2231 // to customers. 2232 HelperTextTemplate string `json:"helperTextTemplate,omitempty"` 2233 2234 // Principal: Prinicipal/Identity for whom the role need to assigned. 2235 // 2236 // Possible values: 2237 // "PRINCIPAL_UNSPECIFIED" - Value type is not specified. 2238 // "CONNECTOR_SA" - Service Account used for Connector workload 2239 // identity This is either the default service account if unspecified or 2240 // Service Account provided by Customers through BYOSA. 2241 Principal string `json:"principal,omitempty"` 2242 2243 // Resource: Resource on which the roles needs to be granted for the 2244 // principal. 2245 Resource *Resource `json:"resource,omitempty"` 2246 2247 // Roles: List of roles that need to be granted. 2248 Roles []string `json:"roles,omitempty"` 2249 2250 // ForceSendFields is a list of field names (e.g. "HelperTextTemplate") 2251 // to unconditionally include in API requests. By default, fields with 2252 // empty or default values are omitted from API requests. However, any 2253 // non-pointer, non-interface field appearing in ForceSendFields will be 2254 // sent to the server regardless of whether the field is empty or not. 2255 // This may be used to include empty fields in Patch requests. 2256 ForceSendFields []string `json:"-"` 2257 2258 // NullFields is a list of field names (e.g. "HelperTextTemplate") to 2259 // include in API requests with the JSON null value. By default, fields 2260 // with empty values are omitted from API requests. However, any field 2261 // with an empty value appearing in NullFields will be sent to the 2262 // server as null. It is an error if a field in this list has a 2263 // non-empty value. This may be used to include null fields in Patch 2264 // requests. 2265 NullFields []string `json:"-"` 2266} 2267 2268func (s *RoleGrant) MarshalJSON() ([]byte, error) { 2269 type NoMethod RoleGrant 2270 raw := NoMethod(*s) 2271 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2272} 2273 2274// RuntimeActionSchema: Schema of a runtime action. 2275type RuntimeActionSchema struct { 2276 // Action: Output only. Name of the action. 2277 Action string `json:"action,omitempty"` 2278 2279 // InputParameters: Output only. List of input parameter metadata for 2280 // the action. 2281 InputParameters []*InputParameter `json:"inputParameters,omitempty"` 2282 2283 // ResultMetadata: Output only. List of result field metadata. 2284 ResultMetadata []*ResultMetadata `json:"resultMetadata,omitempty"` 2285 2286 // ForceSendFields is a list of field names (e.g. "Action") to 2287 // unconditionally include in API requests. By default, fields with 2288 // empty or default values are omitted from API requests. However, any 2289 // non-pointer, non-interface field appearing in ForceSendFields will be 2290 // sent to the server regardless of whether the field is empty or not. 2291 // This may be used to include empty fields in Patch requests. 2292 ForceSendFields []string `json:"-"` 2293 2294 // NullFields is a list of field names (e.g. "Action") to include in API 2295 // requests with the JSON null value. By default, fields with empty 2296 // values are omitted from API requests. However, any field with an 2297 // empty value appearing in NullFields will be sent to the server as 2298 // null. It is an error if a field in this list has a non-empty value. 2299 // This may be used to include null fields in Patch requests. 2300 NullFields []string `json:"-"` 2301} 2302 2303func (s *RuntimeActionSchema) MarshalJSON() ([]byte, error) { 2304 type NoMethod RuntimeActionSchema 2305 raw := NoMethod(*s) 2306 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2307} 2308 2309// RuntimeConfig: RuntimeConfig is the singleton resource of each 2310// location. It includes generic resource configs consumed by control 2311// plane and runtime plane like: pub/sub topic/subscription resource 2312// name, Cloud Storage location storing schema etc. 2313type RuntimeConfig struct { 2314 // ConndSubscription: Output only. Pub/Sub subscription for connd to 2315 // receive message. E.g. projects/{project-id}/subscriptions/{topic-id} 2316 ConndSubscription string `json:"conndSubscription,omitempty"` 2317 2318 // ConndTopic: Output only. Pub/Sub topic for connd to send message. 2319 // E.g. projects/{project-id}/topics/{topic-id} 2320 ConndTopic string `json:"conndTopic,omitempty"` 2321 2322 // ControlPlaneSubscription: Output only. Pub/Sub subscription for 2323 // control plane to receive message. E.g. 2324 // projects/{project-id}/subscriptions/{topic-id} 2325 ControlPlaneSubscription string `json:"controlPlaneSubscription,omitempty"` 2326 2327 // ControlPlaneTopic: Output only. Pub/Sub topic for control plne to 2328 // send message. communication. E.g. 2329 // projects/{project-id}/topics/{topic-id} 2330 ControlPlaneTopic string `json:"controlPlaneTopic,omitempty"` 2331 2332 // LocationId: Output only. location_id of the runtime location. E.g. 2333 // "us-west1". 2334 LocationId string `json:"locationId,omitempty"` 2335 2336 // RuntimeEndpoint: Output only. The endpoint of the connectors runtime 2337 // ingress. 2338 RuntimeEndpoint string `json:"runtimeEndpoint,omitempty"` 2339 2340 // SchemaGcsBucket: Output only. The Cloud Storage bucket that stores 2341 // connector's schema reports. 2342 SchemaGcsBucket string `json:"schemaGcsBucket,omitempty"` 2343 2344 // ServiceDirectory: Output only. The name of the Service Directory 2345 // service name. Used for Private Harpoon to resolve the ILB address. 2346 // e.g. 2347 // "projects/cloud-connectors-e2e-testing/locations/us-central1/namespace 2348 // s/istio-system/services/istio-ingressgateway-connectors" 2349 ServiceDirectory string `json:"serviceDirectory,omitempty"` 2350 2351 // State: Output only. The state of the location. 2352 // 2353 // Possible values: 2354 // "STATE_UNSPECIFIED" - STATE_UNSPECIFIED. 2355 // "INACTIVE" - INACTIVE. 2356 // "ACTIVATING" - ACTIVATING. 2357 // "ACTIVE" - ACTIVE. 2358 // "CREATING" - CREATING. 2359 // "DELETING" - DELETING. 2360 // "UPDATING" - UPDATING. 2361 State string `json:"state,omitempty"` 2362 2363 // ServerResponse contains the HTTP response code and headers from the 2364 // server. 2365 googleapi.ServerResponse `json:"-"` 2366 2367 // ForceSendFields is a list of field names (e.g. "ConndSubscription") 2368 // to unconditionally include in API requests. By default, fields with 2369 // empty or default values are omitted from API requests. However, any 2370 // non-pointer, non-interface field appearing in ForceSendFields will be 2371 // sent to the server regardless of whether the field is empty or not. 2372 // This may be used to include empty fields in Patch requests. 2373 ForceSendFields []string `json:"-"` 2374 2375 // NullFields is a list of field names (e.g. "ConndSubscription") to 2376 // include in API requests with the JSON null value. By default, fields 2377 // with empty values are omitted from API requests. However, any field 2378 // with an empty value appearing in NullFields will be sent to the 2379 // server as null. It is an error if a field in this list has a 2380 // non-empty value. This may be used to include null fields in Patch 2381 // requests. 2382 NullFields []string `json:"-"` 2383} 2384 2385func (s *RuntimeConfig) MarshalJSON() ([]byte, error) { 2386 type NoMethod RuntimeConfig 2387 raw := NoMethod(*s) 2388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2389} 2390 2391// RuntimeEntitySchema: Schema of a runtime entity. 2392type RuntimeEntitySchema struct { 2393 // Entity: Output only. Name of the entity. 2394 Entity string `json:"entity,omitempty"` 2395 2396 // Fields: Output only. List of fields in the entity. 2397 Fields []*Field `json:"fields,omitempty"` 2398 2399 // ForceSendFields is a list of field names (e.g. "Entity") to 2400 // unconditionally include in API requests. By default, fields with 2401 // empty or default values are omitted from API requests. However, any 2402 // non-pointer, non-interface field appearing in ForceSendFields will be 2403 // sent to the server regardless of whether the field is empty or not. 2404 // This may be used to include empty fields in Patch requests. 2405 ForceSendFields []string `json:"-"` 2406 2407 // NullFields is a list of field names (e.g. "Entity") to include in API 2408 // requests with the JSON null value. By default, fields with empty 2409 // values are omitted from API requests. However, any field with an 2410 // empty value appearing in NullFields will be sent to the server as 2411 // null. It is an error if a field in this list has a non-empty value. 2412 // This may be used to include null fields in Patch requests. 2413 NullFields []string `json:"-"` 2414} 2415 2416func (s *RuntimeEntitySchema) MarshalJSON() ([]byte, error) { 2417 type NoMethod RuntimeEntitySchema 2418 raw := NoMethod(*s) 2419 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2420} 2421 2422// Secret: Secret provides a reference to entries in Secret Manager. 2423type Secret struct { 2424 // SecretVersion: The resource name of the secret version in the format, 2425 // format as: `projects/*/secrets/*/versions/*`. 2426 SecretVersion string `json:"secretVersion,omitempty"` 2427 2428 // ForceSendFields is a list of field names (e.g. "SecretVersion") to 2429 // unconditionally include in API requests. By default, fields with 2430 // empty or default values are omitted from API requests. However, any 2431 // non-pointer, non-interface field appearing in ForceSendFields will be 2432 // sent to the server regardless of whether the field is empty or not. 2433 // This may be used to include empty fields in Patch requests. 2434 ForceSendFields []string `json:"-"` 2435 2436 // NullFields is a list of field names (e.g. "SecretVersion") to include 2437 // in API requests with the JSON null value. By default, fields with 2438 // empty values are omitted from API requests. However, any field with 2439 // an empty value appearing in NullFields will be sent to the server as 2440 // null. It is an error if a field in this list has a non-empty value. 2441 // This may be used to include null fields in Patch requests. 2442 NullFields []string `json:"-"` 2443} 2444 2445func (s *Secret) MarshalJSON() ([]byte, error) { 2446 type NoMethod Secret 2447 raw := NoMethod(*s) 2448 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2449} 2450 2451// SetIamPolicyRequest: Request message for `SetIamPolicy` method. 2452type SetIamPolicyRequest struct { 2453 // Policy: REQUIRED: The complete policy to be applied to the 2454 // `resource`. The size of the policy is limited to a few 10s of KB. An 2455 // empty policy is a valid policy but certain Cloud Platform services 2456 // (such as Projects) might reject them. 2457 Policy *Policy `json:"policy,omitempty"` 2458 2459 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the 2460 // policy to modify. Only the fields in the mask will be modified. If no 2461 // mask is provided, the following default mask is used: `paths: 2462 // "bindings, etag" 2463 UpdateMask string `json:"updateMask,omitempty"` 2464 2465 // ForceSendFields is a list of field names (e.g. "Policy") to 2466 // unconditionally include in API requests. By default, fields with 2467 // empty or default values are omitted from API requests. However, any 2468 // non-pointer, non-interface field appearing in ForceSendFields will be 2469 // sent to the server regardless of whether the field is empty or not. 2470 // This may be used to include empty fields in Patch requests. 2471 ForceSendFields []string `json:"-"` 2472 2473 // NullFields is a list of field names (e.g. "Policy") to include in API 2474 // requests with the JSON null value. By default, fields with empty 2475 // values are omitted from API requests. However, any field with an 2476 // empty value appearing in NullFields will be sent to the server as 2477 // null. It is an error if a field in this list has a non-empty value. 2478 // This may be used to include null fields in Patch requests. 2479 NullFields []string `json:"-"` 2480} 2481 2482func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 2483 type NoMethod SetIamPolicyRequest 2484 raw := NoMethod(*s) 2485 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2486} 2487 2488// Source: Source to extract the backend from. 2489type Source struct { 2490 // FieldId: Field identifier. For example config vaiable name. 2491 FieldId string `json:"fieldId,omitempty"` 2492 2493 // SourceType: Type of the source. 2494 // 2495 // Possible values: 2496 // "SOURCE_TYPE_UNSPECIFIED" - Default SOURCE. 2497 // "CONFIG_VARIABLE" - Config Variable source type. 2498 SourceType string `json:"sourceType,omitempty"` 2499 2500 // ForceSendFields is a list of field names (e.g. "FieldId") to 2501 // unconditionally include in API requests. By default, fields with 2502 // empty or default values are omitted from API requests. However, any 2503 // non-pointer, non-interface field appearing in ForceSendFields will be 2504 // sent to the server regardless of whether the field is empty or not. 2505 // This may be used to include empty fields in Patch requests. 2506 ForceSendFields []string `json:"-"` 2507 2508 // NullFields is a list of field names (e.g. "FieldId") to include in 2509 // API requests with the JSON null value. By default, fields with empty 2510 // values are omitted from API requests. However, any field with an 2511 // empty value appearing in NullFields will be sent to the server as 2512 // null. It is an error if a field in this list has a non-empty value. 2513 // This may be used to include null fields in Patch requests. 2514 NullFields []string `json:"-"` 2515} 2516 2517func (s *Source) MarshalJSON() ([]byte, error) { 2518 type NoMethod Source 2519 raw := NoMethod(*s) 2520 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2521} 2522 2523// Status: The `Status` type defines a logical error model that is 2524// suitable for different programming environments, including REST APIs 2525// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 2526// `Status` message contains three pieces of data: error code, error 2527// message, and error details. You can find out more about this error 2528// model and how to work with it in the API Design Guide 2529// (https://cloud.google.com/apis/design/errors). 2530type Status struct { 2531 // Code: The status code, which should be an enum value of 2532 // google.rpc.Code. 2533 Code int64 `json:"code,omitempty"` 2534 2535 // Details: A list of messages that carry the error details. There is a 2536 // common set of message types for APIs to use. 2537 Details []googleapi.RawMessage `json:"details,omitempty"` 2538 2539 // Message: A developer-facing error message, which should be in 2540 // English. Any user-facing error message should be localized and sent 2541 // in the google.rpc.Status.details field, or localized by the client. 2542 Message string `json:"message,omitempty"` 2543 2544 // ForceSendFields is a list of field names (e.g. "Code") to 2545 // unconditionally include in API requests. By default, fields with 2546 // empty or default values are omitted from API requests. However, any 2547 // non-pointer, non-interface field appearing in ForceSendFields will be 2548 // sent to the server regardless of whether the field is empty or not. 2549 // This may be used to include empty fields in Patch requests. 2550 ForceSendFields []string `json:"-"` 2551 2552 // NullFields is a list of field names (e.g. "Code") to include in API 2553 // requests with the JSON null value. By default, fields with empty 2554 // values are omitted from API requests. However, any field with an 2555 // empty value appearing in NullFields will be sent to the server as 2556 // null. It is an error if a field in this list has a non-empty value. 2557 // This may be used to include null fields in Patch requests. 2558 NullFields []string `json:"-"` 2559} 2560 2561func (s *Status) MarshalJSON() ([]byte, error) { 2562 type NoMethod Status 2563 raw := NoMethod(*s) 2564 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2565} 2566 2567// SupportedRuntimeFeatures: Supported runtime features of a connector 2568// version. This is passed to the management layer to add a new 2569// connector version by the connector developer. Details about how this 2570// proto is passed to the management layer is covered in this doc - 2571// go/runtime-manifest. 2572type SupportedRuntimeFeatures struct { 2573 // ActionApis: Specifies if the connector supports action apis like 2574 // 'executeAction'. 2575 ActionApis bool `json:"actionApis,omitempty"` 2576 2577 // EntityApis: Specifies if the connector supports entity apis like 2578 // 'createEntity'. 2579 EntityApis bool `json:"entityApis,omitempty"` 2580 2581 // SqlQuery: Specifies if the connector supports 'ExecuteSqlQuery' 2582 // operation. 2583 SqlQuery bool `json:"sqlQuery,omitempty"` 2584 2585 // ForceSendFields is a list of field names (e.g. "ActionApis") to 2586 // unconditionally include in API requests. By default, fields with 2587 // empty or default values are omitted from API requests. However, any 2588 // non-pointer, non-interface field appearing in ForceSendFields will be 2589 // sent to the server regardless of whether the field is empty or not. 2590 // This may be used to include empty fields in Patch requests. 2591 ForceSendFields []string `json:"-"` 2592 2593 // NullFields is a list of field names (e.g. "ActionApis") to include in 2594 // API requests with the JSON null value. By default, fields with empty 2595 // values are omitted from API requests. However, any field with an 2596 // empty value appearing in NullFields will be sent to the server as 2597 // null. It is an error if a field in this list has a non-empty value. 2598 // This may be used to include null fields in Patch requests. 2599 NullFields []string `json:"-"` 2600} 2601 2602func (s *SupportedRuntimeFeatures) MarshalJSON() ([]byte, error) { 2603 type NoMethod SupportedRuntimeFeatures 2604 raw := NoMethod(*s) 2605 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2606} 2607 2608// TestIamPermissionsRequest: Request message for `TestIamPermissions` 2609// method. 2610type TestIamPermissionsRequest struct { 2611 // Permissions: The set of permissions to check for the `resource`. 2612 // Permissions with wildcards (such as '*' or 'storage.*') are not 2613 // allowed. For more information see IAM Overview 2614 // (https://cloud.google.com/iam/docs/overview#permissions). 2615 Permissions []string `json:"permissions,omitempty"` 2616 2617 // ForceSendFields is a list of field names (e.g. "Permissions") to 2618 // unconditionally include in API requests. By default, fields with 2619 // empty or default values are omitted from API requests. However, any 2620 // non-pointer, non-interface field appearing in ForceSendFields will be 2621 // sent to the server regardless of whether the field is empty or not. 2622 // This may be used to include empty fields in Patch requests. 2623 ForceSendFields []string `json:"-"` 2624 2625 // NullFields is a list of field names (e.g. "Permissions") to include 2626 // in API requests with the JSON null value. By default, fields with 2627 // empty values are omitted from API requests. However, any field with 2628 // an empty value appearing in NullFields will be sent to the server as 2629 // null. It is an error if a field in this list has a non-empty value. 2630 // This may be used to include null fields in Patch requests. 2631 NullFields []string `json:"-"` 2632} 2633 2634func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 2635 type NoMethod TestIamPermissionsRequest 2636 raw := NoMethod(*s) 2637 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2638} 2639 2640// TestIamPermissionsResponse: Response message for `TestIamPermissions` 2641// method. 2642type TestIamPermissionsResponse struct { 2643 // Permissions: A subset of `TestPermissionsRequest.permissions` that 2644 // the caller is allowed. 2645 Permissions []string `json:"permissions,omitempty"` 2646 2647 // ServerResponse contains the HTTP response code and headers from the 2648 // server. 2649 googleapi.ServerResponse `json:"-"` 2650 2651 // ForceSendFields is a list of field names (e.g. "Permissions") to 2652 // unconditionally include in API requests. By default, fields with 2653 // empty or default values are omitted from API requests. However, any 2654 // non-pointer, non-interface field appearing in ForceSendFields will be 2655 // sent to the server regardless of whether the field is empty or not. 2656 // This may be used to include empty fields in Patch requests. 2657 ForceSendFields []string `json:"-"` 2658 2659 // NullFields is a list of field names (e.g. "Permissions") to include 2660 // in API requests with the JSON null value. By default, fields with 2661 // empty values are omitted from API requests. However, any field with 2662 // an empty value appearing in NullFields will be sent to the server as 2663 // null. It is an error if a field in this list has a non-empty value. 2664 // This may be used to include null fields in Patch requests. 2665 NullFields []string `json:"-"` 2666} 2667 2668func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 2669 type NoMethod TestIamPermissionsResponse 2670 raw := NoMethod(*s) 2671 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2672} 2673 2674// UserPassword: Parameters to support Username and Password 2675// Authentication. 2676type UserPassword struct { 2677 // Password: Secret version reference containing the password. 2678 Password *Secret `json:"password,omitempty"` 2679 2680 // Username: Username. 2681 Username string `json:"username,omitempty"` 2682 2683 // ForceSendFields is a list of field names (e.g. "Password") to 2684 // unconditionally include in API requests. By default, fields with 2685 // empty or default values are omitted from API requests. However, any 2686 // non-pointer, non-interface field appearing in ForceSendFields will be 2687 // sent to the server regardless of whether the field is empty or not. 2688 // This may be used to include empty fields in Patch requests. 2689 ForceSendFields []string `json:"-"` 2690 2691 // NullFields is a list of field names (e.g. "Password") to include in 2692 // API requests with the JSON null value. By default, fields with empty 2693 // values are omitted from API requests. However, any field with an 2694 // empty value appearing in NullFields will be sent to the server as 2695 // null. It is an error if a field in this list has a non-empty value. 2696 // This may be used to include null fields in Patch requests. 2697 NullFields []string `json:"-"` 2698} 2699 2700func (s *UserPassword) MarshalJSON() ([]byte, error) { 2701 type NoMethod UserPassword 2702 raw := NoMethod(*s) 2703 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2704} 2705 2706// method id "connectors.projects.locations.get": 2707 2708type ProjectsLocationsGetCall struct { 2709 s *Service 2710 name string 2711 urlParams_ gensupport.URLParams 2712 ifNoneMatch_ string 2713 ctx_ context.Context 2714 header_ http.Header 2715} 2716 2717// Get: Gets information about a location. 2718// 2719// - name: Resource name for the location. 2720func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 2721 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2722 c.name = name 2723 return c 2724} 2725 2726// Fields allows partial responses to be retrieved. See 2727// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2728// for more information. 2729func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 2730 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2731 return c 2732} 2733 2734// IfNoneMatch sets the optional parameter which makes the operation 2735// fail if the object's ETag matches the given value. This is useful for 2736// getting updates only after the object has changed since the last 2737// request. Use googleapi.IsNotModified to check whether the response 2738// error from Do is the result of In-None-Match. 2739func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 2740 c.ifNoneMatch_ = entityTag 2741 return c 2742} 2743 2744// Context sets the context to be used in this call's Do method. Any 2745// pending HTTP request will be aborted if the provided context is 2746// canceled. 2747func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 2748 c.ctx_ = ctx 2749 return c 2750} 2751 2752// Header returns an http.Header that can be modified by the caller to 2753// add HTTP headers to the request. 2754func (c *ProjectsLocationsGetCall) Header() http.Header { 2755 if c.header_ == nil { 2756 c.header_ = make(http.Header) 2757 } 2758 return c.header_ 2759} 2760 2761func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 2762 reqHeaders := make(http.Header) 2763 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 2764 for k, v := range c.header_ { 2765 reqHeaders[k] = v 2766 } 2767 reqHeaders.Set("User-Agent", c.s.userAgent()) 2768 if c.ifNoneMatch_ != "" { 2769 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2770 } 2771 var body io.Reader = nil 2772 c.urlParams_.Set("alt", alt) 2773 c.urlParams_.Set("prettyPrint", "false") 2774 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2775 urls += "?" + c.urlParams_.Encode() 2776 req, err := http.NewRequest("GET", urls, body) 2777 if err != nil { 2778 return nil, err 2779 } 2780 req.Header = reqHeaders 2781 googleapi.Expand(req.URL, map[string]string{ 2782 "name": c.name, 2783 }) 2784 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2785} 2786 2787// Do executes the "connectors.projects.locations.get" call. 2788// Exactly one of *Location or error will be non-nil. Any non-2xx status 2789// code is an error. Response headers are in either 2790// *Location.ServerResponse.Header or (if a response was returned at 2791// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 2792// to check whether the returned error was because 2793// http.StatusNotModified was returned. 2794func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 2795 gensupport.SetOptions(c.urlParams_, opts...) 2796 res, err := c.doRequest("json") 2797 if res != nil && res.StatusCode == http.StatusNotModified { 2798 if res.Body != nil { 2799 res.Body.Close() 2800 } 2801 return nil, &googleapi.Error{ 2802 Code: res.StatusCode, 2803 Header: res.Header, 2804 } 2805 } 2806 if err != nil { 2807 return nil, err 2808 } 2809 defer googleapi.CloseBody(res) 2810 if err := googleapi.CheckResponse(res); err != nil { 2811 return nil, err 2812 } 2813 ret := &Location{ 2814 ServerResponse: googleapi.ServerResponse{ 2815 Header: res.Header, 2816 HTTPStatusCode: res.StatusCode, 2817 }, 2818 } 2819 target := &ret 2820 if err := gensupport.DecodeResponse(target, res); err != nil { 2821 return nil, err 2822 } 2823 return ret, nil 2824 // { 2825 // "description": "Gets information about a location.", 2826 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}", 2827 // "httpMethod": "GET", 2828 // "id": "connectors.projects.locations.get", 2829 // "parameterOrder": [ 2830 // "name" 2831 // ], 2832 // "parameters": { 2833 // "name": { 2834 // "description": "Resource name for the location.", 2835 // "location": "path", 2836 // "pattern": "^projects/[^/]+/locations/[^/]+$", 2837 // "required": true, 2838 // "type": "string" 2839 // } 2840 // }, 2841 // "path": "v1/{+name}", 2842 // "response": { 2843 // "$ref": "Location" 2844 // }, 2845 // "scopes": [ 2846 // "https://www.googleapis.com/auth/cloud-platform" 2847 // ] 2848 // } 2849 2850} 2851 2852// method id "connectors.projects.locations.getRuntimeConfig": 2853 2854type ProjectsLocationsGetRuntimeConfigCall struct { 2855 s *Service 2856 name string 2857 urlParams_ gensupport.URLParams 2858 ifNoneMatch_ string 2859 ctx_ context.Context 2860 header_ http.Header 2861} 2862 2863// GetRuntimeConfig: Gets the runtimeConfig of a location. RuntimeConfig 2864// is a singleton resource for each location. 2865// 2866// - name: Resource name of the form: 2867// `projects/*/locations/*/runtimeConfig`. 2868func (r *ProjectsLocationsService) GetRuntimeConfig(name string) *ProjectsLocationsGetRuntimeConfigCall { 2869 c := &ProjectsLocationsGetRuntimeConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2870 c.name = name 2871 return c 2872} 2873 2874// Fields allows partial responses to be retrieved. See 2875// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 2876// for more information. 2877func (c *ProjectsLocationsGetRuntimeConfigCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetRuntimeConfigCall { 2878 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 2879 return c 2880} 2881 2882// IfNoneMatch sets the optional parameter which makes the operation 2883// fail if the object's ETag matches the given value. This is useful for 2884// getting updates only after the object has changed since the last 2885// request. Use googleapi.IsNotModified to check whether the response 2886// error from Do is the result of In-None-Match. 2887func (c *ProjectsLocationsGetRuntimeConfigCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetRuntimeConfigCall { 2888 c.ifNoneMatch_ = entityTag 2889 return c 2890} 2891 2892// Context sets the context to be used in this call's Do method. Any 2893// pending HTTP request will be aborted if the provided context is 2894// canceled. 2895func (c *ProjectsLocationsGetRuntimeConfigCall) Context(ctx context.Context) *ProjectsLocationsGetRuntimeConfigCall { 2896 c.ctx_ = ctx 2897 return c 2898} 2899 2900// Header returns an http.Header that can be modified by the caller to 2901// add HTTP headers to the request. 2902func (c *ProjectsLocationsGetRuntimeConfigCall) Header() http.Header { 2903 if c.header_ == nil { 2904 c.header_ = make(http.Header) 2905 } 2906 return c.header_ 2907} 2908 2909func (c *ProjectsLocationsGetRuntimeConfigCall) doRequest(alt string) (*http.Response, error) { 2910 reqHeaders := make(http.Header) 2911 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 2912 for k, v := range c.header_ { 2913 reqHeaders[k] = v 2914 } 2915 reqHeaders.Set("User-Agent", c.s.userAgent()) 2916 if c.ifNoneMatch_ != "" { 2917 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 2918 } 2919 var body io.Reader = nil 2920 c.urlParams_.Set("alt", alt) 2921 c.urlParams_.Set("prettyPrint", "false") 2922 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 2923 urls += "?" + c.urlParams_.Encode() 2924 req, err := http.NewRequest("GET", urls, body) 2925 if err != nil { 2926 return nil, err 2927 } 2928 req.Header = reqHeaders 2929 googleapi.Expand(req.URL, map[string]string{ 2930 "name": c.name, 2931 }) 2932 return gensupport.SendRequest(c.ctx_, c.s.client, req) 2933} 2934 2935// Do executes the "connectors.projects.locations.getRuntimeConfig" call. 2936// Exactly one of *RuntimeConfig or error will be non-nil. Any non-2xx 2937// status code is an error. Response headers are in either 2938// *RuntimeConfig.ServerResponse.Header or (if a response was returned 2939// at all) in error.(*googleapi.Error).Header. Use 2940// googleapi.IsNotModified to check whether the returned error was 2941// because http.StatusNotModified was returned. 2942func (c *ProjectsLocationsGetRuntimeConfigCall) Do(opts ...googleapi.CallOption) (*RuntimeConfig, error) { 2943 gensupport.SetOptions(c.urlParams_, opts...) 2944 res, err := c.doRequest("json") 2945 if res != nil && res.StatusCode == http.StatusNotModified { 2946 if res.Body != nil { 2947 res.Body.Close() 2948 } 2949 return nil, &googleapi.Error{ 2950 Code: res.StatusCode, 2951 Header: res.Header, 2952 } 2953 } 2954 if err != nil { 2955 return nil, err 2956 } 2957 defer googleapi.CloseBody(res) 2958 if err := googleapi.CheckResponse(res); err != nil { 2959 return nil, err 2960 } 2961 ret := &RuntimeConfig{ 2962 ServerResponse: googleapi.ServerResponse{ 2963 Header: res.Header, 2964 HTTPStatusCode: res.StatusCode, 2965 }, 2966 } 2967 target := &ret 2968 if err := gensupport.DecodeResponse(target, res); err != nil { 2969 return nil, err 2970 } 2971 return ret, nil 2972 // { 2973 // "description": "Gets the runtimeConfig of a location. RuntimeConfig is a singleton resource for each location.", 2974 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimeConfig", 2975 // "httpMethod": "GET", 2976 // "id": "connectors.projects.locations.getRuntimeConfig", 2977 // "parameterOrder": [ 2978 // "name" 2979 // ], 2980 // "parameters": { 2981 // "name": { 2982 // "description": "Required. Resource name of the form: `projects/*/locations/*/runtimeConfig`", 2983 // "location": "path", 2984 // "pattern": "^projects/[^/]+/locations/[^/]+/runtimeConfig$", 2985 // "required": true, 2986 // "type": "string" 2987 // } 2988 // }, 2989 // "path": "v1/{+name}", 2990 // "response": { 2991 // "$ref": "RuntimeConfig" 2992 // }, 2993 // "scopes": [ 2994 // "https://www.googleapis.com/auth/cloud-platform" 2995 // ] 2996 // } 2997 2998} 2999 3000// method id "connectors.projects.locations.list": 3001 3002type ProjectsLocationsListCall struct { 3003 s *Service 3004 name string 3005 urlParams_ gensupport.URLParams 3006 ifNoneMatch_ string 3007 ctx_ context.Context 3008 header_ http.Header 3009} 3010 3011// List: Lists information about the supported locations for this 3012// service. 3013// 3014// - name: The resource that owns the locations collection, if 3015// applicable. 3016func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 3017 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3018 c.name = name 3019 return c 3020} 3021 3022// Filter sets the optional parameter "filter": A filter to narrow down 3023// results to a preferred subset. The filtering language accepts strings 3024// like "displayName=tokyo", and is documented in more detail in AIP-160 3025// (https://google.aip.dev/160). 3026func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 3027 c.urlParams_.Set("filter", filter) 3028 return c 3029} 3030 3031// PageSize sets the optional parameter "pageSize": The maximum number 3032// of results to return. If not set, the service selects a default. 3033func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 3034 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3035 return c 3036} 3037 3038// PageToken sets the optional parameter "pageToken": A page token 3039// received from the `next_page_token` field in the response. Send that 3040// page token to receive the subsequent page. 3041func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 3042 c.urlParams_.Set("pageToken", pageToken) 3043 return c 3044} 3045 3046// Fields allows partial responses to be retrieved. See 3047// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3048// for more information. 3049func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 3050 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3051 return c 3052} 3053 3054// IfNoneMatch sets the optional parameter which makes the operation 3055// fail if the object's ETag matches the given value. This is useful for 3056// getting updates only after the object has changed since the last 3057// request. Use googleapi.IsNotModified to check whether the response 3058// error from Do is the result of In-None-Match. 3059func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 3060 c.ifNoneMatch_ = entityTag 3061 return c 3062} 3063 3064// Context sets the context to be used in this call's Do method. Any 3065// pending HTTP request will be aborted if the provided context is 3066// canceled. 3067func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 3068 c.ctx_ = ctx 3069 return c 3070} 3071 3072// Header returns an http.Header that can be modified by the caller to 3073// add HTTP headers to the request. 3074func (c *ProjectsLocationsListCall) Header() http.Header { 3075 if c.header_ == nil { 3076 c.header_ = make(http.Header) 3077 } 3078 return c.header_ 3079} 3080 3081func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 3082 reqHeaders := make(http.Header) 3083 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 3084 for k, v := range c.header_ { 3085 reqHeaders[k] = v 3086 } 3087 reqHeaders.Set("User-Agent", c.s.userAgent()) 3088 if c.ifNoneMatch_ != "" { 3089 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3090 } 3091 var body io.Reader = nil 3092 c.urlParams_.Set("alt", alt) 3093 c.urlParams_.Set("prettyPrint", "false") 3094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/locations") 3095 urls += "?" + c.urlParams_.Encode() 3096 req, err := http.NewRequest("GET", urls, body) 3097 if err != nil { 3098 return nil, err 3099 } 3100 req.Header = reqHeaders 3101 googleapi.Expand(req.URL, map[string]string{ 3102 "name": c.name, 3103 }) 3104 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3105} 3106 3107// Do executes the "connectors.projects.locations.list" call. 3108// Exactly one of *ListLocationsResponse or error will be non-nil. Any 3109// non-2xx status code is an error. Response headers are in either 3110// *ListLocationsResponse.ServerResponse.Header or (if a response was 3111// returned at all) in error.(*googleapi.Error).Header. Use 3112// googleapi.IsNotModified to check whether the returned error was 3113// because http.StatusNotModified was returned. 3114func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 3115 gensupport.SetOptions(c.urlParams_, opts...) 3116 res, err := c.doRequest("json") 3117 if res != nil && res.StatusCode == http.StatusNotModified { 3118 if res.Body != nil { 3119 res.Body.Close() 3120 } 3121 return nil, &googleapi.Error{ 3122 Code: res.StatusCode, 3123 Header: res.Header, 3124 } 3125 } 3126 if err != nil { 3127 return nil, err 3128 } 3129 defer googleapi.CloseBody(res) 3130 if err := googleapi.CheckResponse(res); err != nil { 3131 return nil, err 3132 } 3133 ret := &ListLocationsResponse{ 3134 ServerResponse: googleapi.ServerResponse{ 3135 Header: res.Header, 3136 HTTPStatusCode: res.StatusCode, 3137 }, 3138 } 3139 target := &ret 3140 if err := gensupport.DecodeResponse(target, res); err != nil { 3141 return nil, err 3142 } 3143 return ret, nil 3144 // { 3145 // "description": "Lists information about the supported locations for this service.", 3146 // "flatPath": "v1/projects/{projectsId}/locations", 3147 // "httpMethod": "GET", 3148 // "id": "connectors.projects.locations.list", 3149 // "parameterOrder": [ 3150 // "name" 3151 // ], 3152 // "parameters": { 3153 // "filter": { 3154 // "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).", 3155 // "location": "query", 3156 // "type": "string" 3157 // }, 3158 // "name": { 3159 // "description": "The resource that owns the locations collection, if applicable.", 3160 // "location": "path", 3161 // "pattern": "^projects/[^/]+$", 3162 // "required": true, 3163 // "type": "string" 3164 // }, 3165 // "pageSize": { 3166 // "description": "The maximum number of results to return. If not set, the service selects a default.", 3167 // "format": "int32", 3168 // "location": "query", 3169 // "type": "integer" 3170 // }, 3171 // "pageToken": { 3172 // "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", 3173 // "location": "query", 3174 // "type": "string" 3175 // } 3176 // }, 3177 // "path": "v1/{+name}/locations", 3178 // "response": { 3179 // "$ref": "ListLocationsResponse" 3180 // }, 3181 // "scopes": [ 3182 // "https://www.googleapis.com/auth/cloud-platform" 3183 // ] 3184 // } 3185 3186} 3187 3188// Pages invokes f for each page of results. 3189// A non-nil error returned from f will halt the iteration. 3190// The provided context supersedes any context provided to the Context method. 3191func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 3192 c.ctx_ = ctx 3193 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 3194 for { 3195 x, err := c.Do() 3196 if err != nil { 3197 return err 3198 } 3199 if err := f(x); err != nil { 3200 return err 3201 } 3202 if x.NextPageToken == "" { 3203 return nil 3204 } 3205 c.PageToken(x.NextPageToken) 3206 } 3207} 3208 3209// method id "connectors.projects.locations.connections.create": 3210 3211type ProjectsLocationsConnectionsCreateCall struct { 3212 s *Service 3213 parent string 3214 connection *Connection 3215 urlParams_ gensupport.URLParams 3216 ctx_ context.Context 3217 header_ http.Header 3218} 3219 3220// Create: Creates a new Connection in a given project and location. 3221// 3222// - parent: Parent resource of the Connection, of the form: 3223// `projects/*/locations/*`. 3224func (r *ProjectsLocationsConnectionsService) Create(parent string, connection *Connection) *ProjectsLocationsConnectionsCreateCall { 3225 c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3226 c.parent = parent 3227 c.connection = connection 3228 return c 3229} 3230 3231// ConnectionId sets the optional parameter "connectionId": Required. 3232// Identifier to assign to the Connection. Must be unique within scope 3233// of the parent resource. 3234func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall { 3235 c.urlParams_.Set("connectionId", connectionId) 3236 return c 3237} 3238 3239// Fields allows partial responses to be retrieved. See 3240// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3241// for more information. 3242func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall { 3243 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3244 return c 3245} 3246 3247// Context sets the context to be used in this call's Do method. Any 3248// pending HTTP request will be aborted if the provided context is 3249// canceled. 3250func (c *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall { 3251 c.ctx_ = ctx 3252 return c 3253} 3254 3255// Header returns an http.Header that can be modified by the caller to 3256// add HTTP headers to the request. 3257func (c *ProjectsLocationsConnectionsCreateCall) Header() http.Header { 3258 if c.header_ == nil { 3259 c.header_ = make(http.Header) 3260 } 3261 return c.header_ 3262} 3263 3264func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { 3265 reqHeaders := make(http.Header) 3266 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 3267 for k, v := range c.header_ { 3268 reqHeaders[k] = v 3269 } 3270 reqHeaders.Set("User-Agent", c.s.userAgent()) 3271 var body io.Reader = nil 3272 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) 3273 if err != nil { 3274 return nil, err 3275 } 3276 reqHeaders.Set("Content-Type", "application/json") 3277 c.urlParams_.Set("alt", alt) 3278 c.urlParams_.Set("prettyPrint", "false") 3279 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") 3280 urls += "?" + c.urlParams_.Encode() 3281 req, err := http.NewRequest("POST", urls, body) 3282 if err != nil { 3283 return nil, err 3284 } 3285 req.Header = reqHeaders 3286 googleapi.Expand(req.URL, map[string]string{ 3287 "parent": c.parent, 3288 }) 3289 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3290} 3291 3292// Do executes the "connectors.projects.locations.connections.create" call. 3293// Exactly one of *Operation or error will be non-nil. Any non-2xx 3294// status code is an error. Response headers are in either 3295// *Operation.ServerResponse.Header or (if a response was returned at 3296// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3297// to check whether the returned error was because 3298// http.StatusNotModified was returned. 3299func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3300 gensupport.SetOptions(c.urlParams_, opts...) 3301 res, err := c.doRequest("json") 3302 if res != nil && res.StatusCode == http.StatusNotModified { 3303 if res.Body != nil { 3304 res.Body.Close() 3305 } 3306 return nil, &googleapi.Error{ 3307 Code: res.StatusCode, 3308 Header: res.Header, 3309 } 3310 } 3311 if err != nil { 3312 return nil, err 3313 } 3314 defer googleapi.CloseBody(res) 3315 if err := googleapi.CheckResponse(res); err != nil { 3316 return nil, err 3317 } 3318 ret := &Operation{ 3319 ServerResponse: googleapi.ServerResponse{ 3320 Header: res.Header, 3321 HTTPStatusCode: res.StatusCode, 3322 }, 3323 } 3324 target := &ret 3325 if err := gensupport.DecodeResponse(target, res); err != nil { 3326 return nil, err 3327 } 3328 return ret, nil 3329 // { 3330 // "description": "Creates a new Connection in a given project and location.", 3331 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections", 3332 // "httpMethod": "POST", 3333 // "id": "connectors.projects.locations.connections.create", 3334 // "parameterOrder": [ 3335 // "parent" 3336 // ], 3337 // "parameters": { 3338 // "connectionId": { 3339 // "description": "Required. Identifier to assign to the Connection. Must be unique within scope of the parent resource.", 3340 // "location": "query", 3341 // "type": "string" 3342 // }, 3343 // "parent": { 3344 // "description": "Required. Parent resource of the Connection, of the form: `projects/*/locations/*`", 3345 // "location": "path", 3346 // "pattern": "^projects/[^/]+/locations/[^/]+$", 3347 // "required": true, 3348 // "type": "string" 3349 // } 3350 // }, 3351 // "path": "v1/{+parent}/connections", 3352 // "request": { 3353 // "$ref": "Connection" 3354 // }, 3355 // "response": { 3356 // "$ref": "Operation" 3357 // }, 3358 // "scopes": [ 3359 // "https://www.googleapis.com/auth/cloud-platform" 3360 // ] 3361 // } 3362 3363} 3364 3365// method id "connectors.projects.locations.connections.delete": 3366 3367type ProjectsLocationsConnectionsDeleteCall struct { 3368 s *Service 3369 name string 3370 urlParams_ gensupport.URLParams 3371 ctx_ context.Context 3372 header_ http.Header 3373} 3374 3375// Delete: Deletes a single Connection. 3376// 3377// - name: Resource name of the form: 3378// `projects/*/locations/*/connections/*`. 3379func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall { 3380 c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3381 c.name = name 3382 return c 3383} 3384 3385// Fields allows partial responses to be retrieved. See 3386// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3387// for more information. 3388func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall { 3389 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3390 return c 3391} 3392 3393// Context sets the context to be used in this call's Do method. Any 3394// pending HTTP request will be aborted if the provided context is 3395// canceled. 3396func (c *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall { 3397 c.ctx_ = ctx 3398 return c 3399} 3400 3401// Header returns an http.Header that can be modified by the caller to 3402// add HTTP headers to the request. 3403func (c *ProjectsLocationsConnectionsDeleteCall) Header() http.Header { 3404 if c.header_ == nil { 3405 c.header_ = make(http.Header) 3406 } 3407 return c.header_ 3408} 3409 3410func (c *ProjectsLocationsConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { 3411 reqHeaders := make(http.Header) 3412 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 3413 for k, v := range c.header_ { 3414 reqHeaders[k] = v 3415 } 3416 reqHeaders.Set("User-Agent", c.s.userAgent()) 3417 var body io.Reader = nil 3418 c.urlParams_.Set("alt", alt) 3419 c.urlParams_.Set("prettyPrint", "false") 3420 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3421 urls += "?" + c.urlParams_.Encode() 3422 req, err := http.NewRequest("DELETE", urls, body) 3423 if err != nil { 3424 return nil, err 3425 } 3426 req.Header = reqHeaders 3427 googleapi.Expand(req.URL, map[string]string{ 3428 "name": c.name, 3429 }) 3430 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3431} 3432 3433// Do executes the "connectors.projects.locations.connections.delete" call. 3434// Exactly one of *Operation or error will be non-nil. Any non-2xx 3435// status code is an error. Response headers are in either 3436// *Operation.ServerResponse.Header or (if a response was returned at 3437// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3438// to check whether the returned error was because 3439// http.StatusNotModified was returned. 3440func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3441 gensupport.SetOptions(c.urlParams_, opts...) 3442 res, err := c.doRequest("json") 3443 if res != nil && res.StatusCode == http.StatusNotModified { 3444 if res.Body != nil { 3445 res.Body.Close() 3446 } 3447 return nil, &googleapi.Error{ 3448 Code: res.StatusCode, 3449 Header: res.Header, 3450 } 3451 } 3452 if err != nil { 3453 return nil, err 3454 } 3455 defer googleapi.CloseBody(res) 3456 if err := googleapi.CheckResponse(res); err != nil { 3457 return nil, err 3458 } 3459 ret := &Operation{ 3460 ServerResponse: googleapi.ServerResponse{ 3461 Header: res.Header, 3462 HTTPStatusCode: res.StatusCode, 3463 }, 3464 } 3465 target := &ret 3466 if err := gensupport.DecodeResponse(target, res); err != nil { 3467 return nil, err 3468 } 3469 return ret, nil 3470 // { 3471 // "description": "Deletes a single Connection.", 3472 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", 3473 // "httpMethod": "DELETE", 3474 // "id": "connectors.projects.locations.connections.delete", 3475 // "parameterOrder": [ 3476 // "name" 3477 // ], 3478 // "parameters": { 3479 // "name": { 3480 // "description": "Required. Resource name of the form: `projects/*/locations/*/connections/*`", 3481 // "location": "path", 3482 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 3483 // "required": true, 3484 // "type": "string" 3485 // } 3486 // }, 3487 // "path": "v1/{+name}", 3488 // "response": { 3489 // "$ref": "Operation" 3490 // }, 3491 // "scopes": [ 3492 // "https://www.googleapis.com/auth/cloud-platform" 3493 // ] 3494 // } 3495 3496} 3497 3498// method id "connectors.projects.locations.connections.get": 3499 3500type ProjectsLocationsConnectionsGetCall struct { 3501 s *Service 3502 name string 3503 urlParams_ gensupport.URLParams 3504 ifNoneMatch_ string 3505 ctx_ context.Context 3506 header_ http.Header 3507} 3508 3509// Get: Gets details of a single Connection. 3510// 3511// - name: Resource name of the form: 3512// `projects/*/locations/*/connections/*`. 3513func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall { 3514 c := &ProjectsLocationsConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3515 c.name = name 3516 return c 3517} 3518 3519// View sets the optional parameter "view": Specifies which fields of 3520// the Connection are returned in the response. Defaults to `BASIC` 3521// view. 3522// 3523// Possible values: 3524// "CONNECTION_VIEW_UNSPECIFIED" - CONNECTION_UNSPECIFIED. 3525// "BASIC" - Do not include runtime required configs. 3526// "FULL" - Include runtime required configs. 3527func (c *ProjectsLocationsConnectionsGetCall) View(view string) *ProjectsLocationsConnectionsGetCall { 3528 c.urlParams_.Set("view", view) 3529 return c 3530} 3531 3532// Fields allows partial responses to be retrieved. See 3533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3534// for more information. 3535func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall { 3536 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3537 return c 3538} 3539 3540// IfNoneMatch sets the optional parameter which makes the operation 3541// fail if the object's ETag matches the given value. This is useful for 3542// getting updates only after the object has changed since the last 3543// request. Use googleapi.IsNotModified to check whether the response 3544// error from Do is the result of In-None-Match. 3545func (c *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall { 3546 c.ifNoneMatch_ = entityTag 3547 return c 3548} 3549 3550// Context sets the context to be used in this call's Do method. Any 3551// pending HTTP request will be aborted if the provided context is 3552// canceled. 3553func (c *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall { 3554 c.ctx_ = ctx 3555 return c 3556} 3557 3558// Header returns an http.Header that can be modified by the caller to 3559// add HTTP headers to the request. 3560func (c *ProjectsLocationsConnectionsGetCall) Header() http.Header { 3561 if c.header_ == nil { 3562 c.header_ = make(http.Header) 3563 } 3564 return c.header_ 3565} 3566 3567func (c *ProjectsLocationsConnectionsGetCall) doRequest(alt string) (*http.Response, error) { 3568 reqHeaders := make(http.Header) 3569 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 3570 for k, v := range c.header_ { 3571 reqHeaders[k] = v 3572 } 3573 reqHeaders.Set("User-Agent", c.s.userAgent()) 3574 if c.ifNoneMatch_ != "" { 3575 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3576 } 3577 var body io.Reader = nil 3578 c.urlParams_.Set("alt", alt) 3579 c.urlParams_.Set("prettyPrint", "false") 3580 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3581 urls += "?" + c.urlParams_.Encode() 3582 req, err := http.NewRequest("GET", urls, body) 3583 if err != nil { 3584 return nil, err 3585 } 3586 req.Header = reqHeaders 3587 googleapi.Expand(req.URL, map[string]string{ 3588 "name": c.name, 3589 }) 3590 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3591} 3592 3593// Do executes the "connectors.projects.locations.connections.get" call. 3594// Exactly one of *Connection or error will be non-nil. Any non-2xx 3595// status code is an error. Response headers are in either 3596// *Connection.ServerResponse.Header or (if a response was returned at 3597// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3598// to check whether the returned error was because 3599// http.StatusNotModified was returned. 3600func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*Connection, error) { 3601 gensupport.SetOptions(c.urlParams_, opts...) 3602 res, err := c.doRequest("json") 3603 if res != nil && res.StatusCode == http.StatusNotModified { 3604 if res.Body != nil { 3605 res.Body.Close() 3606 } 3607 return nil, &googleapi.Error{ 3608 Code: res.StatusCode, 3609 Header: res.Header, 3610 } 3611 } 3612 if err != nil { 3613 return nil, err 3614 } 3615 defer googleapi.CloseBody(res) 3616 if err := googleapi.CheckResponse(res); err != nil { 3617 return nil, err 3618 } 3619 ret := &Connection{ 3620 ServerResponse: googleapi.ServerResponse{ 3621 Header: res.Header, 3622 HTTPStatusCode: res.StatusCode, 3623 }, 3624 } 3625 target := &ret 3626 if err := gensupport.DecodeResponse(target, res); err != nil { 3627 return nil, err 3628 } 3629 return ret, nil 3630 // { 3631 // "description": "Gets details of a single Connection.", 3632 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", 3633 // "httpMethod": "GET", 3634 // "id": "connectors.projects.locations.connections.get", 3635 // "parameterOrder": [ 3636 // "name" 3637 // ], 3638 // "parameters": { 3639 // "name": { 3640 // "description": "Required. Resource name of the form: `projects/*/locations/*/connections/*`", 3641 // "location": "path", 3642 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 3643 // "required": true, 3644 // "type": "string" 3645 // }, 3646 // "view": { 3647 // "description": "Specifies which fields of the Connection are returned in the response. Defaults to `BASIC` view.", 3648 // "enum": [ 3649 // "CONNECTION_VIEW_UNSPECIFIED", 3650 // "BASIC", 3651 // "FULL" 3652 // ], 3653 // "enumDescriptions": [ 3654 // "CONNECTION_UNSPECIFIED.", 3655 // "Do not include runtime required configs.", 3656 // "Include runtime required configs." 3657 // ], 3658 // "location": "query", 3659 // "type": "string" 3660 // } 3661 // }, 3662 // "path": "v1/{+name}", 3663 // "response": { 3664 // "$ref": "Connection" 3665 // }, 3666 // "scopes": [ 3667 // "https://www.googleapis.com/auth/cloud-platform" 3668 // ] 3669 // } 3670 3671} 3672 3673// method id "connectors.projects.locations.connections.getConnectionSchemaMetadata": 3674 3675type ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall struct { 3676 s *Service 3677 name string 3678 urlParams_ gensupport.URLParams 3679 ifNoneMatch_ string 3680 ctx_ context.Context 3681 header_ http.Header 3682} 3683 3684// GetConnectionSchemaMetadata: Gets schema metadata of a connection. 3685// SchemaMetadata is a singleton resource for each connection. 3686// 3687// - name: Connection name Format: 3688// projects/{project}/locations/{location}/connections/{connection}/con 3689// nectionSchemaMetadata. 3690func (r *ProjectsLocationsConnectionsService) GetConnectionSchemaMetadata(name string) *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall { 3691 c := &ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3692 c.name = name 3693 return c 3694} 3695 3696// Fields allows partial responses to be retrieved. See 3697// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3698// for more information. 3699func (c *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall { 3700 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3701 return c 3702} 3703 3704// IfNoneMatch sets the optional parameter which makes the operation 3705// fail if the object's ETag matches the given value. This is useful for 3706// getting updates only after the object has changed since the last 3707// request. Use googleapi.IsNotModified to check whether the response 3708// error from Do is the result of In-None-Match. 3709func (c *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall { 3710 c.ifNoneMatch_ = entityTag 3711 return c 3712} 3713 3714// Context sets the context to be used in this call's Do method. Any 3715// pending HTTP request will be aborted if the provided context is 3716// canceled. 3717func (c *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall { 3718 c.ctx_ = ctx 3719 return c 3720} 3721 3722// Header returns an http.Header that can be modified by the caller to 3723// add HTTP headers to the request. 3724func (c *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall) Header() http.Header { 3725 if c.header_ == nil { 3726 c.header_ = make(http.Header) 3727 } 3728 return c.header_ 3729} 3730 3731func (c *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall) doRequest(alt string) (*http.Response, error) { 3732 reqHeaders := make(http.Header) 3733 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 3734 for k, v := range c.header_ { 3735 reqHeaders[k] = v 3736 } 3737 reqHeaders.Set("User-Agent", c.s.userAgent()) 3738 if c.ifNoneMatch_ != "" { 3739 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3740 } 3741 var body io.Reader = nil 3742 c.urlParams_.Set("alt", alt) 3743 c.urlParams_.Set("prettyPrint", "false") 3744 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3745 urls += "?" + c.urlParams_.Encode() 3746 req, err := http.NewRequest("GET", urls, body) 3747 if err != nil { 3748 return nil, err 3749 } 3750 req.Header = reqHeaders 3751 googleapi.Expand(req.URL, map[string]string{ 3752 "name": c.name, 3753 }) 3754 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3755} 3756 3757// Do executes the "connectors.projects.locations.connections.getConnectionSchemaMetadata" call. 3758// Exactly one of *ConnectionSchemaMetadata or error will be non-nil. 3759// Any non-2xx status code is an error. Response headers are in either 3760// *ConnectionSchemaMetadata.ServerResponse.Header or (if a response was 3761// returned at all) in error.(*googleapi.Error).Header. Use 3762// googleapi.IsNotModified to check whether the returned error was 3763// because http.StatusNotModified was returned. 3764func (c *ProjectsLocationsConnectionsGetConnectionSchemaMetadataCall) Do(opts ...googleapi.CallOption) (*ConnectionSchemaMetadata, error) { 3765 gensupport.SetOptions(c.urlParams_, opts...) 3766 res, err := c.doRequest("json") 3767 if res != nil && res.StatusCode == http.StatusNotModified { 3768 if res.Body != nil { 3769 res.Body.Close() 3770 } 3771 return nil, &googleapi.Error{ 3772 Code: res.StatusCode, 3773 Header: res.Header, 3774 } 3775 } 3776 if err != nil { 3777 return nil, err 3778 } 3779 defer googleapi.CloseBody(res) 3780 if err := googleapi.CheckResponse(res); err != nil { 3781 return nil, err 3782 } 3783 ret := &ConnectionSchemaMetadata{ 3784 ServerResponse: googleapi.ServerResponse{ 3785 Header: res.Header, 3786 HTTPStatusCode: res.StatusCode, 3787 }, 3788 } 3789 target := &ret 3790 if err := gensupport.DecodeResponse(target, res); err != nil { 3791 return nil, err 3792 } 3793 return ret, nil 3794 // { 3795 // "description": "Gets schema metadata of a connection. SchemaMetadata is a singleton resource for each connection.", 3796 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/connectionSchemaMetadata", 3797 // "httpMethod": "GET", 3798 // "id": "connectors.projects.locations.connections.getConnectionSchemaMetadata", 3799 // "parameterOrder": [ 3800 // "name" 3801 // ], 3802 // "parameters": { 3803 // "name": { 3804 // "description": "Required. Connection name Format: projects/{project}/locations/{location}/connections/{connection}/connectionSchemaMetadata", 3805 // "location": "path", 3806 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+/connectionSchemaMetadata$", 3807 // "required": true, 3808 // "type": "string" 3809 // } 3810 // }, 3811 // "path": "v1/{+name}", 3812 // "response": { 3813 // "$ref": "ConnectionSchemaMetadata" 3814 // }, 3815 // "scopes": [ 3816 // "https://www.googleapis.com/auth/cloud-platform" 3817 // ] 3818 // } 3819 3820} 3821 3822// method id "connectors.projects.locations.connections.getIamPolicy": 3823 3824type ProjectsLocationsConnectionsGetIamPolicyCall struct { 3825 s *Service 3826 resource string 3827 urlParams_ gensupport.URLParams 3828 ifNoneMatch_ string 3829 ctx_ context.Context 3830 header_ http.Header 3831} 3832 3833// GetIamPolicy: Gets the access control policy for a resource. Returns 3834// an empty policy if the resource exists and does not have a policy 3835// set. 3836// 3837// - resource: REQUIRED: The resource for which the policy is being 3838// requested. See the operation documentation for the appropriate 3839// value for this field. 3840func (r *ProjectsLocationsConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsConnectionsGetIamPolicyCall { 3841 c := &ProjectsLocationsConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3842 c.resource = resource 3843 return c 3844} 3845 3846// OptionsRequestedPolicyVersion sets the optional parameter 3847// "options.requestedPolicyVersion": The policy format version to be 3848// returned. Valid values are 0, 1, and 3. Requests specifying an 3849// invalid value will be rejected. Requests for policies with any 3850// conditional bindings must specify version 3. Policies without any 3851// conditional bindings may specify any valid value or leave the field 3852// unset. To learn which resources support conditions in their IAM 3853// policies, see the IAM documentation 3854// (https://cloud.google.com/iam/help/conditions/resource-policies). 3855func (c *ProjectsLocationsConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionsGetIamPolicyCall { 3856 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3857 return c 3858} 3859 3860// Fields allows partial responses to be retrieved. See 3861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3862// for more information. 3863func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetIamPolicyCall { 3864 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3865 return c 3866} 3867 3868// IfNoneMatch sets the optional parameter which makes the operation 3869// fail if the object's ETag matches the given value. This is useful for 3870// getting updates only after the object has changed since the last 3871// request. Use googleapi.IsNotModified to check whether the response 3872// error from Do is the result of In-None-Match. 3873func (c *ProjectsLocationsConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetIamPolicyCall { 3874 c.ifNoneMatch_ = entityTag 3875 return c 3876} 3877 3878// Context sets the context to be used in this call's Do method. Any 3879// pending HTTP request will be aborted if the provided context is 3880// canceled. 3881func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetIamPolicyCall { 3882 c.ctx_ = ctx 3883 return c 3884} 3885 3886// Header returns an http.Header that can be modified by the caller to 3887// add HTTP headers to the request. 3888func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Header() http.Header { 3889 if c.header_ == nil { 3890 c.header_ = make(http.Header) 3891 } 3892 return c.header_ 3893} 3894 3895func (c *ProjectsLocationsConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3896 reqHeaders := make(http.Header) 3897 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 3898 for k, v := range c.header_ { 3899 reqHeaders[k] = v 3900 } 3901 reqHeaders.Set("User-Agent", c.s.userAgent()) 3902 if c.ifNoneMatch_ != "" { 3903 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3904 } 3905 var body io.Reader = nil 3906 c.urlParams_.Set("alt", alt) 3907 c.urlParams_.Set("prettyPrint", "false") 3908 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 3909 urls += "?" + c.urlParams_.Encode() 3910 req, err := http.NewRequest("GET", urls, body) 3911 if err != nil { 3912 return nil, err 3913 } 3914 req.Header = reqHeaders 3915 googleapi.Expand(req.URL, map[string]string{ 3916 "resource": c.resource, 3917 }) 3918 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3919} 3920 3921// Do executes the "connectors.projects.locations.connections.getIamPolicy" call. 3922// Exactly one of *Policy or error will be non-nil. Any non-2xx status 3923// code is an error. Response headers are in either 3924// *Policy.ServerResponse.Header or (if a response was returned at all) 3925// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3926// check whether the returned error was because http.StatusNotModified 3927// was returned. 3928func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3929 gensupport.SetOptions(c.urlParams_, opts...) 3930 res, err := c.doRequest("json") 3931 if res != nil && res.StatusCode == http.StatusNotModified { 3932 if res.Body != nil { 3933 res.Body.Close() 3934 } 3935 return nil, &googleapi.Error{ 3936 Code: res.StatusCode, 3937 Header: res.Header, 3938 } 3939 } 3940 if err != nil { 3941 return nil, err 3942 } 3943 defer googleapi.CloseBody(res) 3944 if err := googleapi.CheckResponse(res); err != nil { 3945 return nil, err 3946 } 3947 ret := &Policy{ 3948 ServerResponse: googleapi.ServerResponse{ 3949 Header: res.Header, 3950 HTTPStatusCode: res.StatusCode, 3951 }, 3952 } 3953 target := &ret 3954 if err := gensupport.DecodeResponse(target, res); err != nil { 3955 return nil, err 3956 } 3957 return ret, nil 3958 // { 3959 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 3960 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:getIamPolicy", 3961 // "httpMethod": "GET", 3962 // "id": "connectors.projects.locations.connections.getIamPolicy", 3963 // "parameterOrder": [ 3964 // "resource" 3965 // ], 3966 // "parameters": { 3967 // "options.requestedPolicyVersion": { 3968 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 3969 // "format": "int32", 3970 // "location": "query", 3971 // "type": "integer" 3972 // }, 3973 // "resource": { 3974 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 3975 // "location": "path", 3976 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 3977 // "required": true, 3978 // "type": "string" 3979 // } 3980 // }, 3981 // "path": "v1/{+resource}:getIamPolicy", 3982 // "response": { 3983 // "$ref": "Policy" 3984 // }, 3985 // "scopes": [ 3986 // "https://www.googleapis.com/auth/cloud-platform" 3987 // ] 3988 // } 3989 3990} 3991 3992// method id "connectors.projects.locations.connections.list": 3993 3994type ProjectsLocationsConnectionsListCall struct { 3995 s *Service 3996 parent string 3997 urlParams_ gensupport.URLParams 3998 ifNoneMatch_ string 3999 ctx_ context.Context 4000 header_ http.Header 4001} 4002 4003// List: Lists Connections in a given project and location. 4004// 4005// - parent: Parent resource of the Connection, of the form: 4006// `projects/*/locations/*`. 4007func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { 4008 c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4009 c.parent = parent 4010 return c 4011} 4012 4013// Filter sets the optional parameter "filter": Filter. 4014func (c *ProjectsLocationsConnectionsListCall) Filter(filter string) *ProjectsLocationsConnectionsListCall { 4015 c.urlParams_.Set("filter", filter) 4016 return c 4017} 4018 4019// OrderBy sets the optional parameter "orderBy": Order by parameters. 4020func (c *ProjectsLocationsConnectionsListCall) OrderBy(orderBy string) *ProjectsLocationsConnectionsListCall { 4021 c.urlParams_.Set("orderBy", orderBy) 4022 return c 4023} 4024 4025// PageSize sets the optional parameter "pageSize": Page size. 4026func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall { 4027 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4028 return c 4029} 4030 4031// PageToken sets the optional parameter "pageToken": Page token. 4032func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall { 4033 c.urlParams_.Set("pageToken", pageToken) 4034 return c 4035} 4036 4037// View sets the optional parameter "view": Specifies which fields of 4038// the Connection are returned in the response. Defaults to `BASIC` 4039// view. 4040// 4041// Possible values: 4042// "CONNECTION_VIEW_UNSPECIFIED" - CONNECTION_UNSPECIFIED. 4043// "BASIC" - Do not include runtime required configs. 4044// "FULL" - Include runtime required configs. 4045func (c *ProjectsLocationsConnectionsListCall) View(view string) *ProjectsLocationsConnectionsListCall { 4046 c.urlParams_.Set("view", view) 4047 return c 4048} 4049 4050// Fields allows partial responses to be retrieved. See 4051// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4052// for more information. 4053func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall { 4054 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4055 return c 4056} 4057 4058// IfNoneMatch sets the optional parameter which makes the operation 4059// fail if the object's ETag matches the given value. This is useful for 4060// getting updates only after the object has changed since the last 4061// request. Use googleapi.IsNotModified to check whether the response 4062// error from Do is the result of In-None-Match. 4063func (c *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall { 4064 c.ifNoneMatch_ = entityTag 4065 return c 4066} 4067 4068// Context sets the context to be used in this call's Do method. Any 4069// pending HTTP request will be aborted if the provided context is 4070// canceled. 4071func (c *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall { 4072 c.ctx_ = ctx 4073 return c 4074} 4075 4076// Header returns an http.Header that can be modified by the caller to 4077// add HTTP headers to the request. 4078func (c *ProjectsLocationsConnectionsListCall) Header() http.Header { 4079 if c.header_ == nil { 4080 c.header_ = make(http.Header) 4081 } 4082 return c.header_ 4083} 4084 4085func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) { 4086 reqHeaders := make(http.Header) 4087 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 4088 for k, v := range c.header_ { 4089 reqHeaders[k] = v 4090 } 4091 reqHeaders.Set("User-Agent", c.s.userAgent()) 4092 if c.ifNoneMatch_ != "" { 4093 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4094 } 4095 var body io.Reader = nil 4096 c.urlParams_.Set("alt", alt) 4097 c.urlParams_.Set("prettyPrint", "false") 4098 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connections") 4099 urls += "?" + c.urlParams_.Encode() 4100 req, err := http.NewRequest("GET", urls, body) 4101 if err != nil { 4102 return nil, err 4103 } 4104 req.Header = reqHeaders 4105 googleapi.Expand(req.URL, map[string]string{ 4106 "parent": c.parent, 4107 }) 4108 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4109} 4110 4111// Do executes the "connectors.projects.locations.connections.list" call. 4112// Exactly one of *ListConnectionsResponse or error will be non-nil. Any 4113// non-2xx status code is an error. Response headers are in either 4114// *ListConnectionsResponse.ServerResponse.Header or (if a response was 4115// returned at all) in error.(*googleapi.Error).Header. Use 4116// googleapi.IsNotModified to check whether the returned error was 4117// because http.StatusNotModified was returned. 4118func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { 4119 gensupport.SetOptions(c.urlParams_, opts...) 4120 res, err := c.doRequest("json") 4121 if res != nil && res.StatusCode == http.StatusNotModified { 4122 if res.Body != nil { 4123 res.Body.Close() 4124 } 4125 return nil, &googleapi.Error{ 4126 Code: res.StatusCode, 4127 Header: res.Header, 4128 } 4129 } 4130 if err != nil { 4131 return nil, err 4132 } 4133 defer googleapi.CloseBody(res) 4134 if err := googleapi.CheckResponse(res); err != nil { 4135 return nil, err 4136 } 4137 ret := &ListConnectionsResponse{ 4138 ServerResponse: googleapi.ServerResponse{ 4139 Header: res.Header, 4140 HTTPStatusCode: res.StatusCode, 4141 }, 4142 } 4143 target := &ret 4144 if err := gensupport.DecodeResponse(target, res); err != nil { 4145 return nil, err 4146 } 4147 return ret, nil 4148 // { 4149 // "description": "Lists Connections in a given project and location.", 4150 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections", 4151 // "httpMethod": "GET", 4152 // "id": "connectors.projects.locations.connections.list", 4153 // "parameterOrder": [ 4154 // "parent" 4155 // ], 4156 // "parameters": { 4157 // "filter": { 4158 // "description": "Filter.", 4159 // "location": "query", 4160 // "type": "string" 4161 // }, 4162 // "orderBy": { 4163 // "description": "Order by parameters.", 4164 // "location": "query", 4165 // "type": "string" 4166 // }, 4167 // "pageSize": { 4168 // "description": "Page size.", 4169 // "format": "int32", 4170 // "location": "query", 4171 // "type": "integer" 4172 // }, 4173 // "pageToken": { 4174 // "description": "Page token.", 4175 // "location": "query", 4176 // "type": "string" 4177 // }, 4178 // "parent": { 4179 // "description": "Required. Parent resource of the Connection, of the form: `projects/*/locations/*`", 4180 // "location": "path", 4181 // "pattern": "^projects/[^/]+/locations/[^/]+$", 4182 // "required": true, 4183 // "type": "string" 4184 // }, 4185 // "view": { 4186 // "description": "Specifies which fields of the Connection are returned in the response. Defaults to `BASIC` view.", 4187 // "enum": [ 4188 // "CONNECTION_VIEW_UNSPECIFIED", 4189 // "BASIC", 4190 // "FULL" 4191 // ], 4192 // "enumDescriptions": [ 4193 // "CONNECTION_UNSPECIFIED.", 4194 // "Do not include runtime required configs.", 4195 // "Include runtime required configs." 4196 // ], 4197 // "location": "query", 4198 // "type": "string" 4199 // } 4200 // }, 4201 // "path": "v1/{+parent}/connections", 4202 // "response": { 4203 // "$ref": "ListConnectionsResponse" 4204 // }, 4205 // "scopes": [ 4206 // "https://www.googleapis.com/auth/cloud-platform" 4207 // ] 4208 // } 4209 4210} 4211 4212// Pages invokes f for each page of results. 4213// A non-nil error returned from f will halt the iteration. 4214// The provided context supersedes any context provided to the Context method. 4215func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error { 4216 c.ctx_ = ctx 4217 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4218 for { 4219 x, err := c.Do() 4220 if err != nil { 4221 return err 4222 } 4223 if err := f(x); err != nil { 4224 return err 4225 } 4226 if x.NextPageToken == "" { 4227 return nil 4228 } 4229 c.PageToken(x.NextPageToken) 4230 } 4231} 4232 4233// method id "connectors.projects.locations.connections.patch": 4234 4235type ProjectsLocationsConnectionsPatchCall struct { 4236 s *Service 4237 name string 4238 connection *Connection 4239 urlParams_ gensupport.URLParams 4240 ctx_ context.Context 4241 header_ http.Header 4242} 4243 4244// Patch: Updates the parameters of a single Connection. 4245// 4246// - name: Output only. Resource name of the Connection. Format: 4247// projects/{project}/locations/{location}/connections/{connection}. 4248func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Connection) *ProjectsLocationsConnectionsPatchCall { 4249 c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4250 c.name = name 4251 c.connection = connection 4252 return c 4253} 4254 4255// UpdateMask sets the optional parameter "updateMask": Field mask is 4256// used to specify the fields to be overwritten in the Connection 4257// resource by the update. The fields specified in the update_mask are 4258// relative to the resource, not the full request. A field will be 4259// overwritten if it is in the mask. If the user does not provide a mask 4260// then all fields will be overwritten. 4261func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { 4262 c.urlParams_.Set("updateMask", updateMask) 4263 return c 4264} 4265 4266// Fields allows partial responses to be retrieved. See 4267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4268// for more information. 4269func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall { 4270 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4271 return c 4272} 4273 4274// Context sets the context to be used in this call's Do method. Any 4275// pending HTTP request will be aborted if the provided context is 4276// canceled. 4277func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall { 4278 c.ctx_ = ctx 4279 return c 4280} 4281 4282// Header returns an http.Header that can be modified by the caller to 4283// add HTTP headers to the request. 4284func (c *ProjectsLocationsConnectionsPatchCall) Header() http.Header { 4285 if c.header_ == nil { 4286 c.header_ = make(http.Header) 4287 } 4288 return c.header_ 4289} 4290 4291func (c *ProjectsLocationsConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { 4292 reqHeaders := make(http.Header) 4293 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 4294 for k, v := range c.header_ { 4295 reqHeaders[k] = v 4296 } 4297 reqHeaders.Set("User-Agent", c.s.userAgent()) 4298 var body io.Reader = nil 4299 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) 4300 if err != nil { 4301 return nil, err 4302 } 4303 reqHeaders.Set("Content-Type", "application/json") 4304 c.urlParams_.Set("alt", alt) 4305 c.urlParams_.Set("prettyPrint", "false") 4306 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 4307 urls += "?" + c.urlParams_.Encode() 4308 req, err := http.NewRequest("PATCH", urls, body) 4309 if err != nil { 4310 return nil, err 4311 } 4312 req.Header = reqHeaders 4313 googleapi.Expand(req.URL, map[string]string{ 4314 "name": c.name, 4315 }) 4316 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4317} 4318 4319// Do executes the "connectors.projects.locations.connections.patch" call. 4320// Exactly one of *Operation or error will be non-nil. Any non-2xx 4321// status code is an error. Response headers are in either 4322// *Operation.ServerResponse.Header or (if a response was returned at 4323// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4324// to check whether the returned error was because 4325// http.StatusNotModified was returned. 4326func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4327 gensupport.SetOptions(c.urlParams_, opts...) 4328 res, err := c.doRequest("json") 4329 if res != nil && res.StatusCode == http.StatusNotModified { 4330 if res.Body != nil { 4331 res.Body.Close() 4332 } 4333 return nil, &googleapi.Error{ 4334 Code: res.StatusCode, 4335 Header: res.Header, 4336 } 4337 } 4338 if err != nil { 4339 return nil, err 4340 } 4341 defer googleapi.CloseBody(res) 4342 if err := googleapi.CheckResponse(res); err != nil { 4343 return nil, err 4344 } 4345 ret := &Operation{ 4346 ServerResponse: googleapi.ServerResponse{ 4347 Header: res.Header, 4348 HTTPStatusCode: res.StatusCode, 4349 }, 4350 } 4351 target := &ret 4352 if err := gensupport.DecodeResponse(target, res); err != nil { 4353 return nil, err 4354 } 4355 return ret, nil 4356 // { 4357 // "description": "Updates the parameters of a single Connection.", 4358 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}", 4359 // "httpMethod": "PATCH", 4360 // "id": "connectors.projects.locations.connections.patch", 4361 // "parameterOrder": [ 4362 // "name" 4363 // ], 4364 // "parameters": { 4365 // "name": { 4366 // "description": "Output only. Resource name of the Connection. Format: projects/{project}/locations/{location}/connections/{connection}", 4367 // "location": "path", 4368 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 4369 // "required": true, 4370 // "type": "string" 4371 // }, 4372 // "updateMask": { 4373 // "description": "Field mask is used to specify the fields to be overwritten in the Connection resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", 4374 // "format": "google-fieldmask", 4375 // "location": "query", 4376 // "type": "string" 4377 // } 4378 // }, 4379 // "path": "v1/{+name}", 4380 // "request": { 4381 // "$ref": "Connection" 4382 // }, 4383 // "response": { 4384 // "$ref": "Operation" 4385 // }, 4386 // "scopes": [ 4387 // "https://www.googleapis.com/auth/cloud-platform" 4388 // ] 4389 // } 4390 4391} 4392 4393// method id "connectors.projects.locations.connections.setIamPolicy": 4394 4395type ProjectsLocationsConnectionsSetIamPolicyCall struct { 4396 s *Service 4397 resource string 4398 setiampolicyrequest *SetIamPolicyRequest 4399 urlParams_ gensupport.URLParams 4400 ctx_ context.Context 4401 header_ http.Header 4402} 4403 4404// SetIamPolicy: Sets the access control policy on the specified 4405// resource. Replaces any existing policy. Can return `NOT_FOUND`, 4406// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 4407// 4408// - resource: REQUIRED: The resource for which the policy is being 4409// specified. See the operation documentation for the appropriate 4410// value for this field. 4411func (r *ProjectsLocationsConnectionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionsSetIamPolicyCall { 4412 c := &ProjectsLocationsConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4413 c.resource = resource 4414 c.setiampolicyrequest = setiampolicyrequest 4415 return c 4416} 4417 4418// Fields allows partial responses to be retrieved. See 4419// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4420// for more information. 4421func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSetIamPolicyCall { 4422 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4423 return c 4424} 4425 4426// Context sets the context to be used in this call's Do method. Any 4427// pending HTTP request will be aborted if the provided context is 4428// canceled. 4429func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSetIamPolicyCall { 4430 c.ctx_ = ctx 4431 return c 4432} 4433 4434// Header returns an http.Header that can be modified by the caller to 4435// add HTTP headers to the request. 4436func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Header() http.Header { 4437 if c.header_ == nil { 4438 c.header_ = make(http.Header) 4439 } 4440 return c.header_ 4441} 4442 4443func (c *ProjectsLocationsConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4444 reqHeaders := make(http.Header) 4445 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 4446 for k, v := range c.header_ { 4447 reqHeaders[k] = v 4448 } 4449 reqHeaders.Set("User-Agent", c.s.userAgent()) 4450 var body io.Reader = nil 4451 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 4452 if err != nil { 4453 return nil, err 4454 } 4455 reqHeaders.Set("Content-Type", "application/json") 4456 c.urlParams_.Set("alt", alt) 4457 c.urlParams_.Set("prettyPrint", "false") 4458 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 4459 urls += "?" + c.urlParams_.Encode() 4460 req, err := http.NewRequest("POST", urls, body) 4461 if err != nil { 4462 return nil, err 4463 } 4464 req.Header = reqHeaders 4465 googleapi.Expand(req.URL, map[string]string{ 4466 "resource": c.resource, 4467 }) 4468 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4469} 4470 4471// Do executes the "connectors.projects.locations.connections.setIamPolicy" call. 4472// Exactly one of *Policy or error will be non-nil. Any non-2xx status 4473// code is an error. Response headers are in either 4474// *Policy.ServerResponse.Header or (if a response was returned at all) 4475// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4476// check whether the returned error was because http.StatusNotModified 4477// was returned. 4478func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4479 gensupport.SetOptions(c.urlParams_, opts...) 4480 res, err := c.doRequest("json") 4481 if res != nil && res.StatusCode == http.StatusNotModified { 4482 if res.Body != nil { 4483 res.Body.Close() 4484 } 4485 return nil, &googleapi.Error{ 4486 Code: res.StatusCode, 4487 Header: res.Header, 4488 } 4489 } 4490 if err != nil { 4491 return nil, err 4492 } 4493 defer googleapi.CloseBody(res) 4494 if err := googleapi.CheckResponse(res); err != nil { 4495 return nil, err 4496 } 4497 ret := &Policy{ 4498 ServerResponse: googleapi.ServerResponse{ 4499 Header: res.Header, 4500 HTTPStatusCode: res.StatusCode, 4501 }, 4502 } 4503 target := &ret 4504 if err := gensupport.DecodeResponse(target, res); err != nil { 4505 return nil, err 4506 } 4507 return ret, nil 4508 // { 4509 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 4510 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:setIamPolicy", 4511 // "httpMethod": "POST", 4512 // "id": "connectors.projects.locations.connections.setIamPolicy", 4513 // "parameterOrder": [ 4514 // "resource" 4515 // ], 4516 // "parameters": { 4517 // "resource": { 4518 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 4519 // "location": "path", 4520 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 4521 // "required": true, 4522 // "type": "string" 4523 // } 4524 // }, 4525 // "path": "v1/{+resource}:setIamPolicy", 4526 // "request": { 4527 // "$ref": "SetIamPolicyRequest" 4528 // }, 4529 // "response": { 4530 // "$ref": "Policy" 4531 // }, 4532 // "scopes": [ 4533 // "https://www.googleapis.com/auth/cloud-platform" 4534 // ] 4535 // } 4536 4537} 4538 4539// method id "connectors.projects.locations.connections.testIamPermissions": 4540 4541type ProjectsLocationsConnectionsTestIamPermissionsCall struct { 4542 s *Service 4543 resource string 4544 testiampermissionsrequest *TestIamPermissionsRequest 4545 urlParams_ gensupport.URLParams 4546 ctx_ context.Context 4547 header_ http.Header 4548} 4549 4550// TestIamPermissions: Returns permissions that a caller has on the 4551// specified resource. If the resource does not exist, this will return 4552// an empty set of permissions, not a `NOT_FOUND` error. Note: This 4553// operation is designed to be used for building permission-aware UIs 4554// and command-line tools, not for authorization checking. This 4555// operation may "fail open" without warning. 4556// 4557// - resource: REQUIRED: The resource for which the policy detail is 4558// being requested. See the operation documentation for the 4559// appropriate value for this field. 4560func (r *ProjectsLocationsConnectionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionsTestIamPermissionsCall { 4561 c := &ProjectsLocationsConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4562 c.resource = resource 4563 c.testiampermissionsrequest = testiampermissionsrequest 4564 return c 4565} 4566 4567// Fields allows partial responses to be retrieved. See 4568// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4569// for more information. 4570func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsTestIamPermissionsCall { 4571 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4572 return c 4573} 4574 4575// Context sets the context to be used in this call's Do method. Any 4576// pending HTTP request will be aborted if the provided context is 4577// canceled. 4578func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsTestIamPermissionsCall { 4579 c.ctx_ = ctx 4580 return c 4581} 4582 4583// Header returns an http.Header that can be modified by the caller to 4584// add HTTP headers to the request. 4585func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Header() http.Header { 4586 if c.header_ == nil { 4587 c.header_ = make(http.Header) 4588 } 4589 return c.header_ 4590} 4591 4592func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4593 reqHeaders := make(http.Header) 4594 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 4595 for k, v := range c.header_ { 4596 reqHeaders[k] = v 4597 } 4598 reqHeaders.Set("User-Agent", c.s.userAgent()) 4599 var body io.Reader = nil 4600 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 4601 if err != nil { 4602 return nil, err 4603 } 4604 reqHeaders.Set("Content-Type", "application/json") 4605 c.urlParams_.Set("alt", alt) 4606 c.urlParams_.Set("prettyPrint", "false") 4607 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 4608 urls += "?" + c.urlParams_.Encode() 4609 req, err := http.NewRequest("POST", urls, body) 4610 if err != nil { 4611 return nil, err 4612 } 4613 req.Header = reqHeaders 4614 googleapi.Expand(req.URL, map[string]string{ 4615 "resource": c.resource, 4616 }) 4617 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4618} 4619 4620// Do executes the "connectors.projects.locations.connections.testIamPermissions" call. 4621// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 4622// Any non-2xx status code is an error. Response headers are in either 4623// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 4624// was returned at all) in error.(*googleapi.Error).Header. Use 4625// googleapi.IsNotModified to check whether the returned error was 4626// because http.StatusNotModified was returned. 4627func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 4628 gensupport.SetOptions(c.urlParams_, opts...) 4629 res, err := c.doRequest("json") 4630 if res != nil && res.StatusCode == http.StatusNotModified { 4631 if res.Body != nil { 4632 res.Body.Close() 4633 } 4634 return nil, &googleapi.Error{ 4635 Code: res.StatusCode, 4636 Header: res.Header, 4637 } 4638 } 4639 if err != nil { 4640 return nil, err 4641 } 4642 defer googleapi.CloseBody(res) 4643 if err := googleapi.CheckResponse(res); err != nil { 4644 return nil, err 4645 } 4646 ret := &TestIamPermissionsResponse{ 4647 ServerResponse: googleapi.ServerResponse{ 4648 Header: res.Header, 4649 HTTPStatusCode: res.StatusCode, 4650 }, 4651 } 4652 target := &ret 4653 if err := gensupport.DecodeResponse(target, res); err != nil { 4654 return nil, err 4655 } 4656 return ret, nil 4657 // { 4658 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 4659 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}:testIamPermissions", 4660 // "httpMethod": "POST", 4661 // "id": "connectors.projects.locations.connections.testIamPermissions", 4662 // "parameterOrder": [ 4663 // "resource" 4664 // ], 4665 // "parameters": { 4666 // "resource": { 4667 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 4668 // "location": "path", 4669 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 4670 // "required": true, 4671 // "type": "string" 4672 // } 4673 // }, 4674 // "path": "v1/{+resource}:testIamPermissions", 4675 // "request": { 4676 // "$ref": "TestIamPermissionsRequest" 4677 // }, 4678 // "response": { 4679 // "$ref": "TestIamPermissionsResponse" 4680 // }, 4681 // "scopes": [ 4682 // "https://www.googleapis.com/auth/cloud-platform" 4683 // ] 4684 // } 4685 4686} 4687 4688// method id "connectors.projects.locations.connections.runtimeActionSchemas.list": 4689 4690type ProjectsLocationsConnectionsRuntimeActionSchemasListCall struct { 4691 s *Service 4692 parent string 4693 urlParams_ gensupport.URLParams 4694 ifNoneMatch_ string 4695 ctx_ context.Context 4696 header_ http.Header 4697} 4698 4699// List: List schema of a runtime actions filtered by action name. 4700// 4701// - parent: Parent resource of RuntimeActionSchema Format: 4702// projects/{project}/locations/{location}/connections/{connection}. 4703func (r *ProjectsLocationsConnectionsRuntimeActionSchemasService) List(parent string) *ProjectsLocationsConnectionsRuntimeActionSchemasListCall { 4704 c := &ProjectsLocationsConnectionsRuntimeActionSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4705 c.parent = parent 4706 return c 4707} 4708 4709// Filter sets the optional parameter "filter": Filter 4710func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) Filter(filter string) *ProjectsLocationsConnectionsRuntimeActionSchemasListCall { 4711 c.urlParams_.Set("filter", filter) 4712 return c 4713} 4714 4715// PageSize sets the optional parameter "pageSize": Page size. 4716func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsRuntimeActionSchemasListCall { 4717 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4718 return c 4719} 4720 4721// PageToken sets the optional parameter "pageToken": Page token. 4722func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsRuntimeActionSchemasListCall { 4723 c.urlParams_.Set("pageToken", pageToken) 4724 return c 4725} 4726 4727// Fields allows partial responses to be retrieved. See 4728// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4729// for more information. 4730func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRuntimeActionSchemasListCall { 4731 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4732 return c 4733} 4734 4735// IfNoneMatch sets the optional parameter which makes the operation 4736// fail if the object's ETag matches the given value. This is useful for 4737// getting updates only after the object has changed since the last 4738// request. Use googleapi.IsNotModified to check whether the response 4739// error from Do is the result of In-None-Match. 4740func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRuntimeActionSchemasListCall { 4741 c.ifNoneMatch_ = entityTag 4742 return c 4743} 4744 4745// Context sets the context to be used in this call's Do method. Any 4746// pending HTTP request will be aborted if the provided context is 4747// canceled. 4748func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRuntimeActionSchemasListCall { 4749 c.ctx_ = ctx 4750 return c 4751} 4752 4753// Header returns an http.Header that can be modified by the caller to 4754// add HTTP headers to the request. 4755func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) Header() http.Header { 4756 if c.header_ == nil { 4757 c.header_ = make(http.Header) 4758 } 4759 return c.header_ 4760} 4761 4762func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) doRequest(alt string) (*http.Response, error) { 4763 reqHeaders := make(http.Header) 4764 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 4765 for k, v := range c.header_ { 4766 reqHeaders[k] = v 4767 } 4768 reqHeaders.Set("User-Agent", c.s.userAgent()) 4769 if c.ifNoneMatch_ != "" { 4770 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4771 } 4772 var body io.Reader = nil 4773 c.urlParams_.Set("alt", alt) 4774 c.urlParams_.Set("prettyPrint", "false") 4775 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runtimeActionSchemas") 4776 urls += "?" + c.urlParams_.Encode() 4777 req, err := http.NewRequest("GET", urls, body) 4778 if err != nil { 4779 return nil, err 4780 } 4781 req.Header = reqHeaders 4782 googleapi.Expand(req.URL, map[string]string{ 4783 "parent": c.parent, 4784 }) 4785 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4786} 4787 4788// Do executes the "connectors.projects.locations.connections.runtimeActionSchemas.list" call. 4789// Exactly one of *ListRuntimeActionSchemasResponse or error will be 4790// non-nil. Any non-2xx status code is an error. Response headers are in 4791// either *ListRuntimeActionSchemasResponse.ServerResponse.Header or (if 4792// a response was returned at all) in error.(*googleapi.Error).Header. 4793// Use googleapi.IsNotModified to check whether the returned error was 4794// because http.StatusNotModified was returned. 4795func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) Do(opts ...googleapi.CallOption) (*ListRuntimeActionSchemasResponse, error) { 4796 gensupport.SetOptions(c.urlParams_, opts...) 4797 res, err := c.doRequest("json") 4798 if res != nil && res.StatusCode == http.StatusNotModified { 4799 if res.Body != nil { 4800 res.Body.Close() 4801 } 4802 return nil, &googleapi.Error{ 4803 Code: res.StatusCode, 4804 Header: res.Header, 4805 } 4806 } 4807 if err != nil { 4808 return nil, err 4809 } 4810 defer googleapi.CloseBody(res) 4811 if err := googleapi.CheckResponse(res); err != nil { 4812 return nil, err 4813 } 4814 ret := &ListRuntimeActionSchemasResponse{ 4815 ServerResponse: googleapi.ServerResponse{ 4816 Header: res.Header, 4817 HTTPStatusCode: res.StatusCode, 4818 }, 4819 } 4820 target := &ret 4821 if err := gensupport.DecodeResponse(target, res); err != nil { 4822 return nil, err 4823 } 4824 return ret, nil 4825 // { 4826 // "description": "List schema of a runtime actions filtered by action name.", 4827 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/runtimeActionSchemas", 4828 // "httpMethod": "GET", 4829 // "id": "connectors.projects.locations.connections.runtimeActionSchemas.list", 4830 // "parameterOrder": [ 4831 // "parent" 4832 // ], 4833 // "parameters": { 4834 // "filter": { 4835 // "description": "Filter", 4836 // "location": "query", 4837 // "type": "string" 4838 // }, 4839 // "pageSize": { 4840 // "description": "Page size.", 4841 // "format": "int32", 4842 // "location": "query", 4843 // "type": "integer" 4844 // }, 4845 // "pageToken": { 4846 // "description": "Page token.", 4847 // "location": "query", 4848 // "type": "string" 4849 // }, 4850 // "parent": { 4851 // "description": "Required. Parent resource of RuntimeActionSchema Format: projects/{project}/locations/{location}/connections/{connection}", 4852 // "location": "path", 4853 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 4854 // "required": true, 4855 // "type": "string" 4856 // } 4857 // }, 4858 // "path": "v1/{+parent}/runtimeActionSchemas", 4859 // "response": { 4860 // "$ref": "ListRuntimeActionSchemasResponse" 4861 // }, 4862 // "scopes": [ 4863 // "https://www.googleapis.com/auth/cloud-platform" 4864 // ] 4865 // } 4866 4867} 4868 4869// Pages invokes f for each page of results. 4870// A non-nil error returned from f will halt the iteration. 4871// The provided context supersedes any context provided to the Context method. 4872func (c *ProjectsLocationsConnectionsRuntimeActionSchemasListCall) Pages(ctx context.Context, f func(*ListRuntimeActionSchemasResponse) error) error { 4873 c.ctx_ = ctx 4874 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4875 for { 4876 x, err := c.Do() 4877 if err != nil { 4878 return err 4879 } 4880 if err := f(x); err != nil { 4881 return err 4882 } 4883 if x.NextPageToken == "" { 4884 return nil 4885 } 4886 c.PageToken(x.NextPageToken) 4887 } 4888} 4889 4890// method id "connectors.projects.locations.connections.runtimeEntitySchemas.list": 4891 4892type ProjectsLocationsConnectionsRuntimeEntitySchemasListCall struct { 4893 s *Service 4894 parent string 4895 urlParams_ gensupport.URLParams 4896 ifNoneMatch_ string 4897 ctx_ context.Context 4898 header_ http.Header 4899} 4900 4901// List: List schema of a runtime entities filtered by entity name. 4902// 4903// - parent: Parent resource of RuntimeEntitySchema Format: 4904// projects/{project}/locations/{location}/connections/{connection}. 4905func (r *ProjectsLocationsConnectionsRuntimeEntitySchemasService) List(parent string) *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall { 4906 c := &ProjectsLocationsConnectionsRuntimeEntitySchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4907 c.parent = parent 4908 return c 4909} 4910 4911// Filter sets the optional parameter "filter": Filter 4912func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) Filter(filter string) *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall { 4913 c.urlParams_.Set("filter", filter) 4914 return c 4915} 4916 4917// PageSize sets the optional parameter "pageSize": Page size. 4918func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall { 4919 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4920 return c 4921} 4922 4923// PageToken sets the optional parameter "pageToken": Page token. 4924func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall { 4925 c.urlParams_.Set("pageToken", pageToken) 4926 return c 4927} 4928 4929// Fields allows partial responses to be retrieved. See 4930// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4931// for more information. 4932func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall { 4933 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4934 return c 4935} 4936 4937// IfNoneMatch sets the optional parameter which makes the operation 4938// fail if the object's ETag matches the given value. This is useful for 4939// getting updates only after the object has changed since the last 4940// request. Use googleapi.IsNotModified to check whether the response 4941// error from Do is the result of In-None-Match. 4942func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall { 4943 c.ifNoneMatch_ = entityTag 4944 return c 4945} 4946 4947// Context sets the context to be used in this call's Do method. Any 4948// pending HTTP request will be aborted if the provided context is 4949// canceled. 4950func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall { 4951 c.ctx_ = ctx 4952 return c 4953} 4954 4955// Header returns an http.Header that can be modified by the caller to 4956// add HTTP headers to the request. 4957func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) Header() http.Header { 4958 if c.header_ == nil { 4959 c.header_ = make(http.Header) 4960 } 4961 return c.header_ 4962} 4963 4964func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) doRequest(alt string) (*http.Response, error) { 4965 reqHeaders := make(http.Header) 4966 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 4967 for k, v := range c.header_ { 4968 reqHeaders[k] = v 4969 } 4970 reqHeaders.Set("User-Agent", c.s.userAgent()) 4971 if c.ifNoneMatch_ != "" { 4972 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4973 } 4974 var body io.Reader = nil 4975 c.urlParams_.Set("alt", alt) 4976 c.urlParams_.Set("prettyPrint", "false") 4977 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/runtimeEntitySchemas") 4978 urls += "?" + c.urlParams_.Encode() 4979 req, err := http.NewRequest("GET", urls, body) 4980 if err != nil { 4981 return nil, err 4982 } 4983 req.Header = reqHeaders 4984 googleapi.Expand(req.URL, map[string]string{ 4985 "parent": c.parent, 4986 }) 4987 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4988} 4989 4990// Do executes the "connectors.projects.locations.connections.runtimeEntitySchemas.list" call. 4991// Exactly one of *ListRuntimeEntitySchemasResponse or error will be 4992// non-nil. Any non-2xx status code is an error. Response headers are in 4993// either *ListRuntimeEntitySchemasResponse.ServerResponse.Header or (if 4994// a response was returned at all) in error.(*googleapi.Error).Header. 4995// Use googleapi.IsNotModified to check whether the returned error was 4996// because http.StatusNotModified was returned. 4997func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) Do(opts ...googleapi.CallOption) (*ListRuntimeEntitySchemasResponse, error) { 4998 gensupport.SetOptions(c.urlParams_, opts...) 4999 res, err := c.doRequest("json") 5000 if res != nil && res.StatusCode == http.StatusNotModified { 5001 if res.Body != nil { 5002 res.Body.Close() 5003 } 5004 return nil, &googleapi.Error{ 5005 Code: res.StatusCode, 5006 Header: res.Header, 5007 } 5008 } 5009 if err != nil { 5010 return nil, err 5011 } 5012 defer googleapi.CloseBody(res) 5013 if err := googleapi.CheckResponse(res); err != nil { 5014 return nil, err 5015 } 5016 ret := &ListRuntimeEntitySchemasResponse{ 5017 ServerResponse: googleapi.ServerResponse{ 5018 Header: res.Header, 5019 HTTPStatusCode: res.StatusCode, 5020 }, 5021 } 5022 target := &ret 5023 if err := gensupport.DecodeResponse(target, res); err != nil { 5024 return nil, err 5025 } 5026 return ret, nil 5027 // { 5028 // "description": "List schema of a runtime entities filtered by entity name.", 5029 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connections/{connectionsId}/runtimeEntitySchemas", 5030 // "httpMethod": "GET", 5031 // "id": "connectors.projects.locations.connections.runtimeEntitySchemas.list", 5032 // "parameterOrder": [ 5033 // "parent" 5034 // ], 5035 // "parameters": { 5036 // "filter": { 5037 // "description": "Filter", 5038 // "location": "query", 5039 // "type": "string" 5040 // }, 5041 // "pageSize": { 5042 // "description": "Page size.", 5043 // "format": "int32", 5044 // "location": "query", 5045 // "type": "integer" 5046 // }, 5047 // "pageToken": { 5048 // "description": "Page token.", 5049 // "location": "query", 5050 // "type": "string" 5051 // }, 5052 // "parent": { 5053 // "description": "Required. Parent resource of RuntimeEntitySchema Format: projects/{project}/locations/{location}/connections/{connection}", 5054 // "location": "path", 5055 // "pattern": "^projects/[^/]+/locations/[^/]+/connections/[^/]+$", 5056 // "required": true, 5057 // "type": "string" 5058 // } 5059 // }, 5060 // "path": "v1/{+parent}/runtimeEntitySchemas", 5061 // "response": { 5062 // "$ref": "ListRuntimeEntitySchemasResponse" 5063 // }, 5064 // "scopes": [ 5065 // "https://www.googleapis.com/auth/cloud-platform" 5066 // ] 5067 // } 5068 5069} 5070 5071// Pages invokes f for each page of results. 5072// A non-nil error returned from f will halt the iteration. 5073// The provided context supersedes any context provided to the Context method. 5074func (c *ProjectsLocationsConnectionsRuntimeEntitySchemasListCall) Pages(ctx context.Context, f func(*ListRuntimeEntitySchemasResponse) error) error { 5075 c.ctx_ = ctx 5076 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5077 for { 5078 x, err := c.Do() 5079 if err != nil { 5080 return err 5081 } 5082 if err := f(x); err != nil { 5083 return err 5084 } 5085 if x.NextPageToken == "" { 5086 return nil 5087 } 5088 c.PageToken(x.NextPageToken) 5089 } 5090} 5091 5092// method id "connectors.projects.locations.global.providers.get": 5093 5094type ProjectsLocationsGlobalProvidersGetCall struct { 5095 s *Service 5096 name string 5097 urlParams_ gensupport.URLParams 5098 ifNoneMatch_ string 5099 ctx_ context.Context 5100 header_ http.Header 5101} 5102 5103// Get: Gets details of a single Provider. 5104// 5105// - name: Resource name of the form: 5106// `projects/*/locations/*/providers/*`. 5107func (r *ProjectsLocationsGlobalProvidersService) Get(name string) *ProjectsLocationsGlobalProvidersGetCall { 5108 c := &ProjectsLocationsGlobalProvidersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5109 c.name = name 5110 return c 5111} 5112 5113// Fields allows partial responses to be retrieved. See 5114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5115// for more information. 5116func (c *ProjectsLocationsGlobalProvidersGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalProvidersGetCall { 5117 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5118 return c 5119} 5120 5121// IfNoneMatch sets the optional parameter which makes the operation 5122// fail if the object's ETag matches the given value. This is useful for 5123// getting updates only after the object has changed since the last 5124// request. Use googleapi.IsNotModified to check whether the response 5125// error from Do is the result of In-None-Match. 5126func (c *ProjectsLocationsGlobalProvidersGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalProvidersGetCall { 5127 c.ifNoneMatch_ = entityTag 5128 return c 5129} 5130 5131// Context sets the context to be used in this call's Do method. Any 5132// pending HTTP request will be aborted if the provided context is 5133// canceled. 5134func (c *ProjectsLocationsGlobalProvidersGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalProvidersGetCall { 5135 c.ctx_ = ctx 5136 return c 5137} 5138 5139// Header returns an http.Header that can be modified by the caller to 5140// add HTTP headers to the request. 5141func (c *ProjectsLocationsGlobalProvidersGetCall) Header() http.Header { 5142 if c.header_ == nil { 5143 c.header_ = make(http.Header) 5144 } 5145 return c.header_ 5146} 5147 5148func (c *ProjectsLocationsGlobalProvidersGetCall) doRequest(alt string) (*http.Response, error) { 5149 reqHeaders := make(http.Header) 5150 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 5151 for k, v := range c.header_ { 5152 reqHeaders[k] = v 5153 } 5154 reqHeaders.Set("User-Agent", c.s.userAgent()) 5155 if c.ifNoneMatch_ != "" { 5156 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5157 } 5158 var body io.Reader = nil 5159 c.urlParams_.Set("alt", alt) 5160 c.urlParams_.Set("prettyPrint", "false") 5161 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5162 urls += "?" + c.urlParams_.Encode() 5163 req, err := http.NewRequest("GET", urls, body) 5164 if err != nil { 5165 return nil, err 5166 } 5167 req.Header = reqHeaders 5168 googleapi.Expand(req.URL, map[string]string{ 5169 "name": c.name, 5170 }) 5171 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5172} 5173 5174// Do executes the "connectors.projects.locations.global.providers.get" call. 5175// Exactly one of *Provider or error will be non-nil. Any non-2xx status 5176// code is an error. Response headers are in either 5177// *Provider.ServerResponse.Header or (if a response was returned at 5178// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5179// to check whether the returned error was because 5180// http.StatusNotModified was returned. 5181func (c *ProjectsLocationsGlobalProvidersGetCall) Do(opts ...googleapi.CallOption) (*Provider, error) { 5182 gensupport.SetOptions(c.urlParams_, opts...) 5183 res, err := c.doRequest("json") 5184 if res != nil && res.StatusCode == http.StatusNotModified { 5185 if res.Body != nil { 5186 res.Body.Close() 5187 } 5188 return nil, &googleapi.Error{ 5189 Code: res.StatusCode, 5190 Header: res.Header, 5191 } 5192 } 5193 if err != nil { 5194 return nil, err 5195 } 5196 defer googleapi.CloseBody(res) 5197 if err := googleapi.CheckResponse(res); err != nil { 5198 return nil, err 5199 } 5200 ret := &Provider{ 5201 ServerResponse: googleapi.ServerResponse{ 5202 Header: res.Header, 5203 HTTPStatusCode: res.StatusCode, 5204 }, 5205 } 5206 target := &ret 5207 if err := gensupport.DecodeResponse(target, res); err != nil { 5208 return nil, err 5209 } 5210 return ret, nil 5211 // { 5212 // "description": "Gets details of a single Provider.", 5213 // "flatPath": "v1/projects/{projectsId}/locations/global/providers/{providersId}", 5214 // "httpMethod": "GET", 5215 // "id": "connectors.projects.locations.global.providers.get", 5216 // "parameterOrder": [ 5217 // "name" 5218 // ], 5219 // "parameters": { 5220 // "name": { 5221 // "description": "Required. Resource name of the form: `projects/*/locations/*/providers/*`", 5222 // "location": "path", 5223 // "pattern": "^projects/[^/]+/locations/global/providers/[^/]+$", 5224 // "required": true, 5225 // "type": "string" 5226 // } 5227 // }, 5228 // "path": "v1/{+name}", 5229 // "response": { 5230 // "$ref": "Provider" 5231 // }, 5232 // "scopes": [ 5233 // "https://www.googleapis.com/auth/cloud-platform" 5234 // ] 5235 // } 5236 5237} 5238 5239// method id "connectors.projects.locations.global.providers.list": 5240 5241type ProjectsLocationsGlobalProvidersListCall struct { 5242 s *Service 5243 parent string 5244 urlParams_ gensupport.URLParams 5245 ifNoneMatch_ string 5246 ctx_ context.Context 5247 header_ http.Header 5248} 5249 5250// List: Lists Providers in a given project and location. 5251// 5252// - parent: Parent resource of the API, of the form: 5253// `projects/*/locations/*`. 5254func (r *ProjectsLocationsGlobalProvidersService) List(parent string) *ProjectsLocationsGlobalProvidersListCall { 5255 c := &ProjectsLocationsGlobalProvidersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5256 c.parent = parent 5257 return c 5258} 5259 5260// PageSize sets the optional parameter "pageSize": Page size. 5261func (c *ProjectsLocationsGlobalProvidersListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalProvidersListCall { 5262 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5263 return c 5264} 5265 5266// PageToken sets the optional parameter "pageToken": Page token. 5267func (c *ProjectsLocationsGlobalProvidersListCall) PageToken(pageToken string) *ProjectsLocationsGlobalProvidersListCall { 5268 c.urlParams_.Set("pageToken", pageToken) 5269 return c 5270} 5271 5272// Fields allows partial responses to be retrieved. See 5273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5274// for more information. 5275func (c *ProjectsLocationsGlobalProvidersListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalProvidersListCall { 5276 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5277 return c 5278} 5279 5280// IfNoneMatch sets the optional parameter which makes the operation 5281// fail if the object's ETag matches the given value. This is useful for 5282// getting updates only after the object has changed since the last 5283// request. Use googleapi.IsNotModified to check whether the response 5284// error from Do is the result of In-None-Match. 5285func (c *ProjectsLocationsGlobalProvidersListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalProvidersListCall { 5286 c.ifNoneMatch_ = entityTag 5287 return c 5288} 5289 5290// Context sets the context to be used in this call's Do method. Any 5291// pending HTTP request will be aborted if the provided context is 5292// canceled. 5293func (c *ProjectsLocationsGlobalProvidersListCall) Context(ctx context.Context) *ProjectsLocationsGlobalProvidersListCall { 5294 c.ctx_ = ctx 5295 return c 5296} 5297 5298// Header returns an http.Header that can be modified by the caller to 5299// add HTTP headers to the request. 5300func (c *ProjectsLocationsGlobalProvidersListCall) Header() http.Header { 5301 if c.header_ == nil { 5302 c.header_ = make(http.Header) 5303 } 5304 return c.header_ 5305} 5306 5307func (c *ProjectsLocationsGlobalProvidersListCall) doRequest(alt string) (*http.Response, error) { 5308 reqHeaders := make(http.Header) 5309 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 5310 for k, v := range c.header_ { 5311 reqHeaders[k] = v 5312 } 5313 reqHeaders.Set("User-Agent", c.s.userAgent()) 5314 if c.ifNoneMatch_ != "" { 5315 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5316 } 5317 var body io.Reader = nil 5318 c.urlParams_.Set("alt", alt) 5319 c.urlParams_.Set("prettyPrint", "false") 5320 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/providers") 5321 urls += "?" + c.urlParams_.Encode() 5322 req, err := http.NewRequest("GET", urls, body) 5323 if err != nil { 5324 return nil, err 5325 } 5326 req.Header = reqHeaders 5327 googleapi.Expand(req.URL, map[string]string{ 5328 "parent": c.parent, 5329 }) 5330 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5331} 5332 5333// Do executes the "connectors.projects.locations.global.providers.list" call. 5334// Exactly one of *ListProvidersResponse or error will be non-nil. Any 5335// non-2xx status code is an error. Response headers are in either 5336// *ListProvidersResponse.ServerResponse.Header or (if a response was 5337// returned at all) in error.(*googleapi.Error).Header. Use 5338// googleapi.IsNotModified to check whether the returned error was 5339// because http.StatusNotModified was returned. 5340func (c *ProjectsLocationsGlobalProvidersListCall) Do(opts ...googleapi.CallOption) (*ListProvidersResponse, error) { 5341 gensupport.SetOptions(c.urlParams_, opts...) 5342 res, err := c.doRequest("json") 5343 if res != nil && res.StatusCode == http.StatusNotModified { 5344 if res.Body != nil { 5345 res.Body.Close() 5346 } 5347 return nil, &googleapi.Error{ 5348 Code: res.StatusCode, 5349 Header: res.Header, 5350 } 5351 } 5352 if err != nil { 5353 return nil, err 5354 } 5355 defer googleapi.CloseBody(res) 5356 if err := googleapi.CheckResponse(res); err != nil { 5357 return nil, err 5358 } 5359 ret := &ListProvidersResponse{ 5360 ServerResponse: googleapi.ServerResponse{ 5361 Header: res.Header, 5362 HTTPStatusCode: res.StatusCode, 5363 }, 5364 } 5365 target := &ret 5366 if err := gensupport.DecodeResponse(target, res); err != nil { 5367 return nil, err 5368 } 5369 return ret, nil 5370 // { 5371 // "description": "Lists Providers in a given project and location.", 5372 // "flatPath": "v1/projects/{projectsId}/locations/global/providers", 5373 // "httpMethod": "GET", 5374 // "id": "connectors.projects.locations.global.providers.list", 5375 // "parameterOrder": [ 5376 // "parent" 5377 // ], 5378 // "parameters": { 5379 // "pageSize": { 5380 // "description": "Page size.", 5381 // "format": "int32", 5382 // "location": "query", 5383 // "type": "integer" 5384 // }, 5385 // "pageToken": { 5386 // "description": "Page token.", 5387 // "location": "query", 5388 // "type": "string" 5389 // }, 5390 // "parent": { 5391 // "description": "Required. Parent resource of the API, of the form: `projects/*/locations/*`", 5392 // "location": "path", 5393 // "pattern": "^projects/[^/]+/locations/global$", 5394 // "required": true, 5395 // "type": "string" 5396 // } 5397 // }, 5398 // "path": "v1/{+parent}/providers", 5399 // "response": { 5400 // "$ref": "ListProvidersResponse" 5401 // }, 5402 // "scopes": [ 5403 // "https://www.googleapis.com/auth/cloud-platform" 5404 // ] 5405 // } 5406 5407} 5408 5409// Pages invokes f for each page of results. 5410// A non-nil error returned from f will halt the iteration. 5411// The provided context supersedes any context provided to the Context method. 5412func (c *ProjectsLocationsGlobalProvidersListCall) Pages(ctx context.Context, f func(*ListProvidersResponse) error) error { 5413 c.ctx_ = ctx 5414 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5415 for { 5416 x, err := c.Do() 5417 if err != nil { 5418 return err 5419 } 5420 if err := f(x); err != nil { 5421 return err 5422 } 5423 if x.NextPageToken == "" { 5424 return nil 5425 } 5426 c.PageToken(x.NextPageToken) 5427 } 5428} 5429 5430// method id "connectors.projects.locations.global.providers.connectors.get": 5431 5432type ProjectsLocationsGlobalProvidersConnectorsGetCall struct { 5433 s *Service 5434 name string 5435 urlParams_ gensupport.URLParams 5436 ifNoneMatch_ string 5437 ctx_ context.Context 5438 header_ http.Header 5439} 5440 5441// Get: Gets details of a single Connector. 5442// 5443// - name: Resource name of the form: 5444// `projects/*/locations/*/providers/*/connectors/*`. 5445func (r *ProjectsLocationsGlobalProvidersConnectorsService) Get(name string) *ProjectsLocationsGlobalProvidersConnectorsGetCall { 5446 c := &ProjectsLocationsGlobalProvidersConnectorsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5447 c.name = name 5448 return c 5449} 5450 5451// Fields allows partial responses to be retrieved. See 5452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5453// for more information. 5454func (c *ProjectsLocationsGlobalProvidersConnectorsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalProvidersConnectorsGetCall { 5455 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5456 return c 5457} 5458 5459// IfNoneMatch sets the optional parameter which makes the operation 5460// fail if the object's ETag matches the given value. This is useful for 5461// getting updates only after the object has changed since the last 5462// request. Use googleapi.IsNotModified to check whether the response 5463// error from Do is the result of In-None-Match. 5464func (c *ProjectsLocationsGlobalProvidersConnectorsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalProvidersConnectorsGetCall { 5465 c.ifNoneMatch_ = entityTag 5466 return c 5467} 5468 5469// Context sets the context to be used in this call's Do method. Any 5470// pending HTTP request will be aborted if the provided context is 5471// canceled. 5472func (c *ProjectsLocationsGlobalProvidersConnectorsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalProvidersConnectorsGetCall { 5473 c.ctx_ = ctx 5474 return c 5475} 5476 5477// Header returns an http.Header that can be modified by the caller to 5478// add HTTP headers to the request. 5479func (c *ProjectsLocationsGlobalProvidersConnectorsGetCall) Header() http.Header { 5480 if c.header_ == nil { 5481 c.header_ = make(http.Header) 5482 } 5483 return c.header_ 5484} 5485 5486func (c *ProjectsLocationsGlobalProvidersConnectorsGetCall) doRequest(alt string) (*http.Response, error) { 5487 reqHeaders := make(http.Header) 5488 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 5489 for k, v := range c.header_ { 5490 reqHeaders[k] = v 5491 } 5492 reqHeaders.Set("User-Agent", c.s.userAgent()) 5493 if c.ifNoneMatch_ != "" { 5494 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5495 } 5496 var body io.Reader = nil 5497 c.urlParams_.Set("alt", alt) 5498 c.urlParams_.Set("prettyPrint", "false") 5499 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5500 urls += "?" + c.urlParams_.Encode() 5501 req, err := http.NewRequest("GET", urls, body) 5502 if err != nil { 5503 return nil, err 5504 } 5505 req.Header = reqHeaders 5506 googleapi.Expand(req.URL, map[string]string{ 5507 "name": c.name, 5508 }) 5509 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5510} 5511 5512// Do executes the "connectors.projects.locations.global.providers.connectors.get" call. 5513// Exactly one of *Connector or error will be non-nil. Any non-2xx 5514// status code is an error. Response headers are in either 5515// *Connector.ServerResponse.Header or (if a response was returned at 5516// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 5517// to check whether the returned error was because 5518// http.StatusNotModified was returned. 5519func (c *ProjectsLocationsGlobalProvidersConnectorsGetCall) Do(opts ...googleapi.CallOption) (*Connector, error) { 5520 gensupport.SetOptions(c.urlParams_, opts...) 5521 res, err := c.doRequest("json") 5522 if res != nil && res.StatusCode == http.StatusNotModified { 5523 if res.Body != nil { 5524 res.Body.Close() 5525 } 5526 return nil, &googleapi.Error{ 5527 Code: res.StatusCode, 5528 Header: res.Header, 5529 } 5530 } 5531 if err != nil { 5532 return nil, err 5533 } 5534 defer googleapi.CloseBody(res) 5535 if err := googleapi.CheckResponse(res); err != nil { 5536 return nil, err 5537 } 5538 ret := &Connector{ 5539 ServerResponse: googleapi.ServerResponse{ 5540 Header: res.Header, 5541 HTTPStatusCode: res.StatusCode, 5542 }, 5543 } 5544 target := &ret 5545 if err := gensupport.DecodeResponse(target, res); err != nil { 5546 return nil, err 5547 } 5548 return ret, nil 5549 // { 5550 // "description": "Gets details of a single Connector.", 5551 // "flatPath": "v1/projects/{projectsId}/locations/global/providers/{providersId}/connectors/{connectorsId}", 5552 // "httpMethod": "GET", 5553 // "id": "connectors.projects.locations.global.providers.connectors.get", 5554 // "parameterOrder": [ 5555 // "name" 5556 // ], 5557 // "parameters": { 5558 // "name": { 5559 // "description": "Required. Resource name of the form: `projects/*/locations/*/providers/*/connectors/*`", 5560 // "location": "path", 5561 // "pattern": "^projects/[^/]+/locations/global/providers/[^/]+/connectors/[^/]+$", 5562 // "required": true, 5563 // "type": "string" 5564 // } 5565 // }, 5566 // "path": "v1/{+name}", 5567 // "response": { 5568 // "$ref": "Connector" 5569 // }, 5570 // "scopes": [ 5571 // "https://www.googleapis.com/auth/cloud-platform" 5572 // ] 5573 // } 5574 5575} 5576 5577// method id "connectors.projects.locations.global.providers.connectors.list": 5578 5579type ProjectsLocationsGlobalProvidersConnectorsListCall struct { 5580 s *Service 5581 parent string 5582 urlParams_ gensupport.URLParams 5583 ifNoneMatch_ string 5584 ctx_ context.Context 5585 header_ http.Header 5586} 5587 5588// List: Lists Connectors in a given project and location. 5589// 5590// - parent: Parent resource of the connectors, of the form: 5591// `projects/*/locations/*/providers/*`. 5592func (r *ProjectsLocationsGlobalProvidersConnectorsService) List(parent string) *ProjectsLocationsGlobalProvidersConnectorsListCall { 5593 c := &ProjectsLocationsGlobalProvidersConnectorsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5594 c.parent = parent 5595 return c 5596} 5597 5598// PageSize sets the optional parameter "pageSize": Page size. 5599func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalProvidersConnectorsListCall { 5600 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5601 return c 5602} 5603 5604// PageToken sets the optional parameter "pageToken": Page token. 5605func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalProvidersConnectorsListCall { 5606 c.urlParams_.Set("pageToken", pageToken) 5607 return c 5608} 5609 5610// Fields allows partial responses to be retrieved. See 5611// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5612// for more information. 5613func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalProvidersConnectorsListCall { 5614 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5615 return c 5616} 5617 5618// IfNoneMatch sets the optional parameter which makes the operation 5619// fail if the object's ETag matches the given value. This is useful for 5620// getting updates only after the object has changed since the last 5621// request. Use googleapi.IsNotModified to check whether the response 5622// error from Do is the result of In-None-Match. 5623func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalProvidersConnectorsListCall { 5624 c.ifNoneMatch_ = entityTag 5625 return c 5626} 5627 5628// Context sets the context to be used in this call's Do method. Any 5629// pending HTTP request will be aborted if the provided context is 5630// canceled. 5631func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalProvidersConnectorsListCall { 5632 c.ctx_ = ctx 5633 return c 5634} 5635 5636// Header returns an http.Header that can be modified by the caller to 5637// add HTTP headers to the request. 5638func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) Header() http.Header { 5639 if c.header_ == nil { 5640 c.header_ = make(http.Header) 5641 } 5642 return c.header_ 5643} 5644 5645func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) doRequest(alt string) (*http.Response, error) { 5646 reqHeaders := make(http.Header) 5647 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 5648 for k, v := range c.header_ { 5649 reqHeaders[k] = v 5650 } 5651 reqHeaders.Set("User-Agent", c.s.userAgent()) 5652 if c.ifNoneMatch_ != "" { 5653 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5654 } 5655 var body io.Reader = nil 5656 c.urlParams_.Set("alt", alt) 5657 c.urlParams_.Set("prettyPrint", "false") 5658 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/connectors") 5659 urls += "?" + c.urlParams_.Encode() 5660 req, err := http.NewRequest("GET", urls, body) 5661 if err != nil { 5662 return nil, err 5663 } 5664 req.Header = reqHeaders 5665 googleapi.Expand(req.URL, map[string]string{ 5666 "parent": c.parent, 5667 }) 5668 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5669} 5670 5671// Do executes the "connectors.projects.locations.global.providers.connectors.list" call. 5672// Exactly one of *ListConnectorsResponse or error will be non-nil. Any 5673// non-2xx status code is an error. Response headers are in either 5674// *ListConnectorsResponse.ServerResponse.Header or (if a response was 5675// returned at all) in error.(*googleapi.Error).Header. Use 5676// googleapi.IsNotModified to check whether the returned error was 5677// because http.StatusNotModified was returned. 5678func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) Do(opts ...googleapi.CallOption) (*ListConnectorsResponse, error) { 5679 gensupport.SetOptions(c.urlParams_, opts...) 5680 res, err := c.doRequest("json") 5681 if res != nil && res.StatusCode == http.StatusNotModified { 5682 if res.Body != nil { 5683 res.Body.Close() 5684 } 5685 return nil, &googleapi.Error{ 5686 Code: res.StatusCode, 5687 Header: res.Header, 5688 } 5689 } 5690 if err != nil { 5691 return nil, err 5692 } 5693 defer googleapi.CloseBody(res) 5694 if err := googleapi.CheckResponse(res); err != nil { 5695 return nil, err 5696 } 5697 ret := &ListConnectorsResponse{ 5698 ServerResponse: googleapi.ServerResponse{ 5699 Header: res.Header, 5700 HTTPStatusCode: res.StatusCode, 5701 }, 5702 } 5703 target := &ret 5704 if err := gensupport.DecodeResponse(target, res); err != nil { 5705 return nil, err 5706 } 5707 return ret, nil 5708 // { 5709 // "description": "Lists Connectors in a given project and location.", 5710 // "flatPath": "v1/projects/{projectsId}/locations/global/providers/{providersId}/connectors", 5711 // "httpMethod": "GET", 5712 // "id": "connectors.projects.locations.global.providers.connectors.list", 5713 // "parameterOrder": [ 5714 // "parent" 5715 // ], 5716 // "parameters": { 5717 // "pageSize": { 5718 // "description": "Page size.", 5719 // "format": "int32", 5720 // "location": "query", 5721 // "type": "integer" 5722 // }, 5723 // "pageToken": { 5724 // "description": "Page token.", 5725 // "location": "query", 5726 // "type": "string" 5727 // }, 5728 // "parent": { 5729 // "description": "Required. Parent resource of the connectors, of the form: `projects/*/locations/*/providers/*`", 5730 // "location": "path", 5731 // "pattern": "^projects/[^/]+/locations/global/providers/[^/]+$", 5732 // "required": true, 5733 // "type": "string" 5734 // } 5735 // }, 5736 // "path": "v1/{+parent}/connectors", 5737 // "response": { 5738 // "$ref": "ListConnectorsResponse" 5739 // }, 5740 // "scopes": [ 5741 // "https://www.googleapis.com/auth/cloud-platform" 5742 // ] 5743 // } 5744 5745} 5746 5747// Pages invokes f for each page of results. 5748// A non-nil error returned from f will halt the iteration. 5749// The provided context supersedes any context provided to the Context method. 5750func (c *ProjectsLocationsGlobalProvidersConnectorsListCall) Pages(ctx context.Context, f func(*ListConnectorsResponse) error) error { 5751 c.ctx_ = ctx 5752 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 5753 for { 5754 x, err := c.Do() 5755 if err != nil { 5756 return err 5757 } 5758 if err := f(x); err != nil { 5759 return err 5760 } 5761 if x.NextPageToken == "" { 5762 return nil 5763 } 5764 c.PageToken(x.NextPageToken) 5765 } 5766} 5767 5768// method id "connectors.projects.locations.global.providers.connectors.versions.get": 5769 5770type ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall struct { 5771 s *Service 5772 name string 5773 urlParams_ gensupport.URLParams 5774 ifNoneMatch_ string 5775 ctx_ context.Context 5776 header_ http.Header 5777} 5778 5779// Get: Gets details of a single connector version. 5780// 5781// - name: Resource name of the form: 5782// `projects/*/locations/*/providers/*/connectors/*/versions/*`. 5783func (r *ProjectsLocationsGlobalProvidersConnectorsVersionsService) Get(name string) *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall { 5784 c := &ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5785 c.name = name 5786 return c 5787} 5788 5789// View sets the optional parameter "view": Specifies which fields of 5790// the ConnectorVersion are returned in the response. Defaults to 5791// `CUSTOMER` view. 5792// 5793// Possible values: 5794// "CONNECTOR_VERSION_VIEW_UNSPECIFIED" - 5795// CONNECTOR_VERSION_VIEW_UNSPECIFIED. 5796// "CONNECTOR_VERSION_VIEW_BASIC" - Do not include role grant configs. 5797// "CONNECTOR_VERSION_VIEW_FULL" - Include role grant configs. 5798func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall) View(view string) *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall { 5799 c.urlParams_.Set("view", view) 5800 return c 5801} 5802 5803// Fields allows partial responses to be retrieved. See 5804// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5805// for more information. 5806func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall { 5807 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5808 return c 5809} 5810 5811// IfNoneMatch sets the optional parameter which makes the operation 5812// fail if the object's ETag matches the given value. This is useful for 5813// getting updates only after the object has changed since the last 5814// request. Use googleapi.IsNotModified to check whether the response 5815// error from Do is the result of In-None-Match. 5816func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall { 5817 c.ifNoneMatch_ = entityTag 5818 return c 5819} 5820 5821// Context sets the context to be used in this call's Do method. Any 5822// pending HTTP request will be aborted if the provided context is 5823// canceled. 5824func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall { 5825 c.ctx_ = ctx 5826 return c 5827} 5828 5829// Header returns an http.Header that can be modified by the caller to 5830// add HTTP headers to the request. 5831func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall) Header() http.Header { 5832 if c.header_ == nil { 5833 c.header_ = make(http.Header) 5834 } 5835 return c.header_ 5836} 5837 5838func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall) doRequest(alt string) (*http.Response, error) { 5839 reqHeaders := make(http.Header) 5840 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 5841 for k, v := range c.header_ { 5842 reqHeaders[k] = v 5843 } 5844 reqHeaders.Set("User-Agent", c.s.userAgent()) 5845 if c.ifNoneMatch_ != "" { 5846 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5847 } 5848 var body io.Reader = nil 5849 c.urlParams_.Set("alt", alt) 5850 c.urlParams_.Set("prettyPrint", "false") 5851 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 5852 urls += "?" + c.urlParams_.Encode() 5853 req, err := http.NewRequest("GET", urls, body) 5854 if err != nil { 5855 return nil, err 5856 } 5857 req.Header = reqHeaders 5858 googleapi.Expand(req.URL, map[string]string{ 5859 "name": c.name, 5860 }) 5861 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5862} 5863 5864// Do executes the "connectors.projects.locations.global.providers.connectors.versions.get" call. 5865// Exactly one of *ConnectorVersion or error will be non-nil. Any 5866// non-2xx status code is an error. Response headers are in either 5867// *ConnectorVersion.ServerResponse.Header or (if a response was 5868// returned at all) in error.(*googleapi.Error).Header. Use 5869// googleapi.IsNotModified to check whether the returned error was 5870// because http.StatusNotModified was returned. 5871func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsGetCall) Do(opts ...googleapi.CallOption) (*ConnectorVersion, error) { 5872 gensupport.SetOptions(c.urlParams_, opts...) 5873 res, err := c.doRequest("json") 5874 if res != nil && res.StatusCode == http.StatusNotModified { 5875 if res.Body != nil { 5876 res.Body.Close() 5877 } 5878 return nil, &googleapi.Error{ 5879 Code: res.StatusCode, 5880 Header: res.Header, 5881 } 5882 } 5883 if err != nil { 5884 return nil, err 5885 } 5886 defer googleapi.CloseBody(res) 5887 if err := googleapi.CheckResponse(res); err != nil { 5888 return nil, err 5889 } 5890 ret := &ConnectorVersion{ 5891 ServerResponse: googleapi.ServerResponse{ 5892 Header: res.Header, 5893 HTTPStatusCode: res.StatusCode, 5894 }, 5895 } 5896 target := &ret 5897 if err := gensupport.DecodeResponse(target, res); err != nil { 5898 return nil, err 5899 } 5900 return ret, nil 5901 // { 5902 // "description": "Gets details of a single connector version.", 5903 // "flatPath": "v1/projects/{projectsId}/locations/global/providers/{providersId}/connectors/{connectorsId}/versions/{versionsId}", 5904 // "httpMethod": "GET", 5905 // "id": "connectors.projects.locations.global.providers.connectors.versions.get", 5906 // "parameterOrder": [ 5907 // "name" 5908 // ], 5909 // "parameters": { 5910 // "name": { 5911 // "description": "Required. Resource name of the form: `projects/*/locations/*/providers/*/connectors/*/versions/*`", 5912 // "location": "path", 5913 // "pattern": "^projects/[^/]+/locations/global/providers/[^/]+/connectors/[^/]+/versions/[^/]+$", 5914 // "required": true, 5915 // "type": "string" 5916 // }, 5917 // "view": { 5918 // "description": "Specifies which fields of the ConnectorVersion are returned in the response. Defaults to `CUSTOMER` view.", 5919 // "enum": [ 5920 // "CONNECTOR_VERSION_VIEW_UNSPECIFIED", 5921 // "CONNECTOR_VERSION_VIEW_BASIC", 5922 // "CONNECTOR_VERSION_VIEW_FULL" 5923 // ], 5924 // "enumDescriptions": [ 5925 // "CONNECTOR_VERSION_VIEW_UNSPECIFIED.", 5926 // "Do not include role grant configs.", 5927 // "Include role grant configs." 5928 // ], 5929 // "location": "query", 5930 // "type": "string" 5931 // } 5932 // }, 5933 // "path": "v1/{+name}", 5934 // "response": { 5935 // "$ref": "ConnectorVersion" 5936 // }, 5937 // "scopes": [ 5938 // "https://www.googleapis.com/auth/cloud-platform" 5939 // ] 5940 // } 5941 5942} 5943 5944// method id "connectors.projects.locations.global.providers.connectors.versions.list": 5945 5946type ProjectsLocationsGlobalProvidersConnectorsVersionsListCall struct { 5947 s *Service 5948 parent string 5949 urlParams_ gensupport.URLParams 5950 ifNoneMatch_ string 5951 ctx_ context.Context 5952 header_ http.Header 5953} 5954 5955// List: Lists Connector Versions in a given project and location. 5956// 5957// - parent: Parent resource of the connectors, of the form: 5958// `projects/*/locations/*/providers/*/connectors/*`. 5959func (r *ProjectsLocationsGlobalProvidersConnectorsVersionsService) List(parent string) *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall { 5960 c := &ProjectsLocationsGlobalProvidersConnectorsVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5961 c.parent = parent 5962 return c 5963} 5964 5965// PageSize sets the optional parameter "pageSize": Page size. 5966func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall { 5967 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5968 return c 5969} 5970 5971// PageToken sets the optional parameter "pageToken": Page token. 5972func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) PageToken(pageToken string) *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall { 5973 c.urlParams_.Set("pageToken", pageToken) 5974 return c 5975} 5976 5977// View sets the optional parameter "view": Specifies which fields of 5978// the ConnectorVersion are returned in the response. Defaults to 5979// `CUSTOMER` view. 5980// 5981// Possible values: 5982// "CONNECTOR_VERSION_VIEW_UNSPECIFIED" - 5983// CONNECTOR_VERSION_VIEW_UNSPECIFIED. 5984// "CONNECTOR_VERSION_VIEW_BASIC" - Do not include role grant configs. 5985// "CONNECTOR_VERSION_VIEW_FULL" - Include role grant configs. 5986func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) View(view string) *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall { 5987 c.urlParams_.Set("view", view) 5988 return c 5989} 5990 5991// Fields allows partial responses to be retrieved. See 5992// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 5993// for more information. 5994func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall { 5995 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5996 return c 5997} 5998 5999// IfNoneMatch sets the optional parameter which makes the operation 6000// fail if the object's ETag matches the given value. This is useful for 6001// getting updates only after the object has changed since the last 6002// request. Use googleapi.IsNotModified to check whether the response 6003// error from Do is the result of In-None-Match. 6004func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall { 6005 c.ifNoneMatch_ = entityTag 6006 return c 6007} 6008 6009// Context sets the context to be used in this call's Do method. Any 6010// pending HTTP request will be aborted if the provided context is 6011// canceled. 6012func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) Context(ctx context.Context) *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall { 6013 c.ctx_ = ctx 6014 return c 6015} 6016 6017// Header returns an http.Header that can be modified by the caller to 6018// add HTTP headers to the request. 6019func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) Header() http.Header { 6020 if c.header_ == nil { 6021 c.header_ = make(http.Header) 6022 } 6023 return c.header_ 6024} 6025 6026func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) doRequest(alt string) (*http.Response, error) { 6027 reqHeaders := make(http.Header) 6028 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 6029 for k, v := range c.header_ { 6030 reqHeaders[k] = v 6031 } 6032 reqHeaders.Set("User-Agent", c.s.userAgent()) 6033 if c.ifNoneMatch_ != "" { 6034 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6035 } 6036 var body io.Reader = nil 6037 c.urlParams_.Set("alt", alt) 6038 c.urlParams_.Set("prettyPrint", "false") 6039 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/versions") 6040 urls += "?" + c.urlParams_.Encode() 6041 req, err := http.NewRequest("GET", urls, body) 6042 if err != nil { 6043 return nil, err 6044 } 6045 req.Header = reqHeaders 6046 googleapi.Expand(req.URL, map[string]string{ 6047 "parent": c.parent, 6048 }) 6049 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6050} 6051 6052// Do executes the "connectors.projects.locations.global.providers.connectors.versions.list" call. 6053// Exactly one of *ListConnectorVersionsResponse or error will be 6054// non-nil. Any non-2xx status code is an error. Response headers are in 6055// either *ListConnectorVersionsResponse.ServerResponse.Header or (if a 6056// response was returned at all) in error.(*googleapi.Error).Header. Use 6057// googleapi.IsNotModified to check whether the returned error was 6058// because http.StatusNotModified was returned. 6059func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectorVersionsResponse, error) { 6060 gensupport.SetOptions(c.urlParams_, opts...) 6061 res, err := c.doRequest("json") 6062 if res != nil && res.StatusCode == http.StatusNotModified { 6063 if res.Body != nil { 6064 res.Body.Close() 6065 } 6066 return nil, &googleapi.Error{ 6067 Code: res.StatusCode, 6068 Header: res.Header, 6069 } 6070 } 6071 if err != nil { 6072 return nil, err 6073 } 6074 defer googleapi.CloseBody(res) 6075 if err := googleapi.CheckResponse(res); err != nil { 6076 return nil, err 6077 } 6078 ret := &ListConnectorVersionsResponse{ 6079 ServerResponse: googleapi.ServerResponse{ 6080 Header: res.Header, 6081 HTTPStatusCode: res.StatusCode, 6082 }, 6083 } 6084 target := &ret 6085 if err := gensupport.DecodeResponse(target, res); err != nil { 6086 return nil, err 6087 } 6088 return ret, nil 6089 // { 6090 // "description": "Lists Connector Versions in a given project and location.", 6091 // "flatPath": "v1/projects/{projectsId}/locations/global/providers/{providersId}/connectors/{connectorsId}/versions", 6092 // "httpMethod": "GET", 6093 // "id": "connectors.projects.locations.global.providers.connectors.versions.list", 6094 // "parameterOrder": [ 6095 // "parent" 6096 // ], 6097 // "parameters": { 6098 // "pageSize": { 6099 // "description": "Page size.", 6100 // "format": "int32", 6101 // "location": "query", 6102 // "type": "integer" 6103 // }, 6104 // "pageToken": { 6105 // "description": "Page token.", 6106 // "location": "query", 6107 // "type": "string" 6108 // }, 6109 // "parent": { 6110 // "description": "Required. Parent resource of the connectors, of the form: `projects/*/locations/*/providers/*/connectors/*`", 6111 // "location": "path", 6112 // "pattern": "^projects/[^/]+/locations/global/providers/[^/]+/connectors/[^/]+$", 6113 // "required": true, 6114 // "type": "string" 6115 // }, 6116 // "view": { 6117 // "description": "Specifies which fields of the ConnectorVersion are returned in the response. Defaults to `CUSTOMER` view.", 6118 // "enum": [ 6119 // "CONNECTOR_VERSION_VIEW_UNSPECIFIED", 6120 // "CONNECTOR_VERSION_VIEW_BASIC", 6121 // "CONNECTOR_VERSION_VIEW_FULL" 6122 // ], 6123 // "enumDescriptions": [ 6124 // "CONNECTOR_VERSION_VIEW_UNSPECIFIED.", 6125 // "Do not include role grant configs.", 6126 // "Include role grant configs." 6127 // ], 6128 // "location": "query", 6129 // "type": "string" 6130 // } 6131 // }, 6132 // "path": "v1/{+parent}/versions", 6133 // "response": { 6134 // "$ref": "ListConnectorVersionsResponse" 6135 // }, 6136 // "scopes": [ 6137 // "https://www.googleapis.com/auth/cloud-platform" 6138 // ] 6139 // } 6140 6141} 6142 6143// Pages invokes f for each page of results. 6144// A non-nil error returned from f will halt the iteration. 6145// The provided context supersedes any context provided to the Context method. 6146func (c *ProjectsLocationsGlobalProvidersConnectorsVersionsListCall) Pages(ctx context.Context, f func(*ListConnectorVersionsResponse) error) error { 6147 c.ctx_ = ctx 6148 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6149 for { 6150 x, err := c.Do() 6151 if err != nil { 6152 return err 6153 } 6154 if err := f(x); err != nil { 6155 return err 6156 } 6157 if x.NextPageToken == "" { 6158 return nil 6159 } 6160 c.PageToken(x.NextPageToken) 6161 } 6162} 6163 6164// method id "connectors.projects.locations.operations.cancel": 6165 6166type ProjectsLocationsOperationsCancelCall struct { 6167 s *Service 6168 name string 6169 canceloperationrequest *CancelOperationRequest 6170 urlParams_ gensupport.URLParams 6171 ctx_ context.Context 6172 header_ http.Header 6173} 6174 6175// Cancel: Starts asynchronous cancellation on a long-running operation. 6176// The server makes a best effort to cancel the operation, but success 6177// is not guaranteed. If the server doesn't support this method, it 6178// returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use 6179// Operations.GetOperation or other methods to check whether the 6180// cancellation succeeded or whether the operation completed despite 6181// cancellation. On successful cancellation, the operation is not 6182// deleted; instead, it becomes an operation with an Operation.error 6183// value with a google.rpc.Status.code of 1, corresponding to 6184// `Code.CANCELLED`. 6185// 6186// - name: The name of the operation resource to be cancelled. 6187func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 6188 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6189 c.name = name 6190 c.canceloperationrequest = canceloperationrequest 6191 return c 6192} 6193 6194// Fields allows partial responses to be retrieved. See 6195// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6196// for more information. 6197func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 6198 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6199 return c 6200} 6201 6202// Context sets the context to be used in this call's Do method. Any 6203// pending HTTP request will be aborted if the provided context is 6204// canceled. 6205func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 6206 c.ctx_ = ctx 6207 return c 6208} 6209 6210// Header returns an http.Header that can be modified by the caller to 6211// add HTTP headers to the request. 6212func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 6213 if c.header_ == nil { 6214 c.header_ = make(http.Header) 6215 } 6216 return c.header_ 6217} 6218 6219func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 6220 reqHeaders := make(http.Header) 6221 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 6222 for k, v := range c.header_ { 6223 reqHeaders[k] = v 6224 } 6225 reqHeaders.Set("User-Agent", c.s.userAgent()) 6226 var body io.Reader = nil 6227 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 6228 if err != nil { 6229 return nil, err 6230 } 6231 reqHeaders.Set("Content-Type", "application/json") 6232 c.urlParams_.Set("alt", alt) 6233 c.urlParams_.Set("prettyPrint", "false") 6234 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 6235 urls += "?" + c.urlParams_.Encode() 6236 req, err := http.NewRequest("POST", urls, body) 6237 if err != nil { 6238 return nil, err 6239 } 6240 req.Header = reqHeaders 6241 googleapi.Expand(req.URL, map[string]string{ 6242 "name": c.name, 6243 }) 6244 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6245} 6246 6247// Do executes the "connectors.projects.locations.operations.cancel" call. 6248// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6249// code is an error. Response headers are in either 6250// *Empty.ServerResponse.Header or (if a response was returned at all) 6251// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6252// check whether the returned error was because http.StatusNotModified 6253// was returned. 6254func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6255 gensupport.SetOptions(c.urlParams_, opts...) 6256 res, err := c.doRequest("json") 6257 if res != nil && res.StatusCode == http.StatusNotModified { 6258 if res.Body != nil { 6259 res.Body.Close() 6260 } 6261 return nil, &googleapi.Error{ 6262 Code: res.StatusCode, 6263 Header: res.Header, 6264 } 6265 } 6266 if err != nil { 6267 return nil, err 6268 } 6269 defer googleapi.CloseBody(res) 6270 if err := googleapi.CheckResponse(res); err != nil { 6271 return nil, err 6272 } 6273 ret := &Empty{ 6274 ServerResponse: googleapi.ServerResponse{ 6275 Header: res.Header, 6276 HTTPStatusCode: res.StatusCode, 6277 }, 6278 } 6279 target := &ret 6280 if err := gensupport.DecodeResponse(target, res); err != nil { 6281 return nil, err 6282 } 6283 return ret, nil 6284 // { 6285 // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", 6286 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 6287 // "httpMethod": "POST", 6288 // "id": "connectors.projects.locations.operations.cancel", 6289 // "parameterOrder": [ 6290 // "name" 6291 // ], 6292 // "parameters": { 6293 // "name": { 6294 // "description": "The name of the operation resource to be cancelled.", 6295 // "location": "path", 6296 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 6297 // "required": true, 6298 // "type": "string" 6299 // } 6300 // }, 6301 // "path": "v1/{+name}:cancel", 6302 // "request": { 6303 // "$ref": "CancelOperationRequest" 6304 // }, 6305 // "response": { 6306 // "$ref": "Empty" 6307 // }, 6308 // "scopes": [ 6309 // "https://www.googleapis.com/auth/cloud-platform" 6310 // ] 6311 // } 6312 6313} 6314 6315// method id "connectors.projects.locations.operations.delete": 6316 6317type ProjectsLocationsOperationsDeleteCall struct { 6318 s *Service 6319 name string 6320 urlParams_ gensupport.URLParams 6321 ctx_ context.Context 6322 header_ http.Header 6323} 6324 6325// Delete: Deletes a long-running operation. This method indicates that 6326// the client is no longer interested in the operation result. It does 6327// not cancel the operation. If the server doesn't support this method, 6328// it returns `google.rpc.Code.UNIMPLEMENTED`. 6329// 6330// - name: The name of the operation resource to be deleted. 6331func (r *ProjectsLocationsOperationsService) Delete(name string) *ProjectsLocationsOperationsDeleteCall { 6332 c := &ProjectsLocationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6333 c.name = name 6334 return c 6335} 6336 6337// Fields allows partial responses to be retrieved. See 6338// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6339// for more information. 6340func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { 6341 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6342 return c 6343} 6344 6345// Context sets the context to be used in this call's Do method. Any 6346// pending HTTP request will be aborted if the provided context is 6347// canceled. 6348func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { 6349 c.ctx_ = ctx 6350 return c 6351} 6352 6353// Header returns an http.Header that can be modified by the caller to 6354// add HTTP headers to the request. 6355func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { 6356 if c.header_ == nil { 6357 c.header_ = make(http.Header) 6358 } 6359 return c.header_ 6360} 6361 6362func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 6363 reqHeaders := make(http.Header) 6364 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 6365 for k, v := range c.header_ { 6366 reqHeaders[k] = v 6367 } 6368 reqHeaders.Set("User-Agent", c.s.userAgent()) 6369 var body io.Reader = nil 6370 c.urlParams_.Set("alt", alt) 6371 c.urlParams_.Set("prettyPrint", "false") 6372 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6373 urls += "?" + c.urlParams_.Encode() 6374 req, err := http.NewRequest("DELETE", urls, body) 6375 if err != nil { 6376 return nil, err 6377 } 6378 req.Header = reqHeaders 6379 googleapi.Expand(req.URL, map[string]string{ 6380 "name": c.name, 6381 }) 6382 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6383} 6384 6385// Do executes the "connectors.projects.locations.operations.delete" call. 6386// Exactly one of *Empty or error will be non-nil. Any non-2xx status 6387// code is an error. Response headers are in either 6388// *Empty.ServerResponse.Header or (if a response was returned at all) 6389// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6390// check whether the returned error was because http.StatusNotModified 6391// was returned. 6392func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 6393 gensupport.SetOptions(c.urlParams_, opts...) 6394 res, err := c.doRequest("json") 6395 if res != nil && res.StatusCode == http.StatusNotModified { 6396 if res.Body != nil { 6397 res.Body.Close() 6398 } 6399 return nil, &googleapi.Error{ 6400 Code: res.StatusCode, 6401 Header: res.Header, 6402 } 6403 } 6404 if err != nil { 6405 return nil, err 6406 } 6407 defer googleapi.CloseBody(res) 6408 if err := googleapi.CheckResponse(res); err != nil { 6409 return nil, err 6410 } 6411 ret := &Empty{ 6412 ServerResponse: googleapi.ServerResponse{ 6413 Header: res.Header, 6414 HTTPStatusCode: res.StatusCode, 6415 }, 6416 } 6417 target := &ret 6418 if err := gensupport.DecodeResponse(target, res); err != nil { 6419 return nil, err 6420 } 6421 return ret, nil 6422 // { 6423 // "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", 6424 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 6425 // "httpMethod": "DELETE", 6426 // "id": "connectors.projects.locations.operations.delete", 6427 // "parameterOrder": [ 6428 // "name" 6429 // ], 6430 // "parameters": { 6431 // "name": { 6432 // "description": "The name of the operation resource to be deleted.", 6433 // "location": "path", 6434 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 6435 // "required": true, 6436 // "type": "string" 6437 // } 6438 // }, 6439 // "path": "v1/{+name}", 6440 // "response": { 6441 // "$ref": "Empty" 6442 // }, 6443 // "scopes": [ 6444 // "https://www.googleapis.com/auth/cloud-platform" 6445 // ] 6446 // } 6447 6448} 6449 6450// method id "connectors.projects.locations.operations.get": 6451 6452type ProjectsLocationsOperationsGetCall struct { 6453 s *Service 6454 name string 6455 urlParams_ gensupport.URLParams 6456 ifNoneMatch_ string 6457 ctx_ context.Context 6458 header_ http.Header 6459} 6460 6461// Get: Gets the latest state of a long-running operation. Clients can 6462// use this method to poll the operation result at intervals as 6463// recommended by the API service. 6464// 6465// - name: The name of the operation resource. 6466func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 6467 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6468 c.name = name 6469 return c 6470} 6471 6472// Fields allows partial responses to be retrieved. See 6473// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6474// for more information. 6475func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 6476 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6477 return c 6478} 6479 6480// IfNoneMatch sets the optional parameter which makes the operation 6481// fail if the object's ETag matches the given value. This is useful for 6482// getting updates only after the object has changed since the last 6483// request. Use googleapi.IsNotModified to check whether the response 6484// error from Do is the result of In-None-Match. 6485func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 6486 c.ifNoneMatch_ = entityTag 6487 return c 6488} 6489 6490// Context sets the context to be used in this call's Do method. Any 6491// pending HTTP request will be aborted if the provided context is 6492// canceled. 6493func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 6494 c.ctx_ = ctx 6495 return c 6496} 6497 6498// Header returns an http.Header that can be modified by the caller to 6499// add HTTP headers to the request. 6500func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 6501 if c.header_ == nil { 6502 c.header_ = make(http.Header) 6503 } 6504 return c.header_ 6505} 6506 6507func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 6508 reqHeaders := make(http.Header) 6509 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 6510 for k, v := range c.header_ { 6511 reqHeaders[k] = v 6512 } 6513 reqHeaders.Set("User-Agent", c.s.userAgent()) 6514 if c.ifNoneMatch_ != "" { 6515 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6516 } 6517 var body io.Reader = nil 6518 c.urlParams_.Set("alt", alt) 6519 c.urlParams_.Set("prettyPrint", "false") 6520 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 6521 urls += "?" + c.urlParams_.Encode() 6522 req, err := http.NewRequest("GET", urls, body) 6523 if err != nil { 6524 return nil, err 6525 } 6526 req.Header = reqHeaders 6527 googleapi.Expand(req.URL, map[string]string{ 6528 "name": c.name, 6529 }) 6530 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6531} 6532 6533// Do executes the "connectors.projects.locations.operations.get" call. 6534// Exactly one of *Operation or error will be non-nil. Any non-2xx 6535// status code is an error. Response headers are in either 6536// *Operation.ServerResponse.Header or (if a response was returned at 6537// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 6538// to check whether the returned error was because 6539// http.StatusNotModified was returned. 6540func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 6541 gensupport.SetOptions(c.urlParams_, opts...) 6542 res, err := c.doRequest("json") 6543 if res != nil && res.StatusCode == http.StatusNotModified { 6544 if res.Body != nil { 6545 res.Body.Close() 6546 } 6547 return nil, &googleapi.Error{ 6548 Code: res.StatusCode, 6549 Header: res.Header, 6550 } 6551 } 6552 if err != nil { 6553 return nil, err 6554 } 6555 defer googleapi.CloseBody(res) 6556 if err := googleapi.CheckResponse(res); err != nil { 6557 return nil, err 6558 } 6559 ret := &Operation{ 6560 ServerResponse: googleapi.ServerResponse{ 6561 Header: res.Header, 6562 HTTPStatusCode: res.StatusCode, 6563 }, 6564 } 6565 target := &ret 6566 if err := gensupport.DecodeResponse(target, res); err != nil { 6567 return nil, err 6568 } 6569 return ret, nil 6570 // { 6571 // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", 6572 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 6573 // "httpMethod": "GET", 6574 // "id": "connectors.projects.locations.operations.get", 6575 // "parameterOrder": [ 6576 // "name" 6577 // ], 6578 // "parameters": { 6579 // "name": { 6580 // "description": "The name of the operation resource.", 6581 // "location": "path", 6582 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 6583 // "required": true, 6584 // "type": "string" 6585 // } 6586 // }, 6587 // "path": "v1/{+name}", 6588 // "response": { 6589 // "$ref": "Operation" 6590 // }, 6591 // "scopes": [ 6592 // "https://www.googleapis.com/auth/cloud-platform" 6593 // ] 6594 // } 6595 6596} 6597 6598// method id "connectors.projects.locations.operations.list": 6599 6600type ProjectsLocationsOperationsListCall struct { 6601 s *Service 6602 name string 6603 urlParams_ gensupport.URLParams 6604 ifNoneMatch_ string 6605 ctx_ context.Context 6606 header_ http.Header 6607} 6608 6609// List: Lists operations that match the specified filter in the 6610// request. If the server doesn't support this method, it returns 6611// `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to 6612// override the binding to use different resource name schemes, such as 6613// `users/*/operations`. To override the binding, API services can add a 6614// binding such as "/v1/{name=users/*}/operations" to their service 6615// configuration. For backwards compatibility, the default name includes 6616// the operations collection id, however overriding users must ensure 6617// the name binding is the parent resource, without the operations 6618// collection id. 6619// 6620// - name: The name of the operation's parent resource. 6621func (r *ProjectsLocationsOperationsService) List(name string) *ProjectsLocationsOperationsListCall { 6622 c := &ProjectsLocationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6623 c.name = name 6624 return c 6625} 6626 6627// Filter sets the optional parameter "filter": The standard list 6628// filter. 6629func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 6630 c.urlParams_.Set("filter", filter) 6631 return c 6632} 6633 6634// PageSize sets the optional parameter "pageSize": The standard list 6635// page size. 6636func (c *ProjectsLocationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsOperationsListCall { 6637 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 6638 return c 6639} 6640 6641// PageToken sets the optional parameter "pageToken": The standard list 6642// page token. 6643func (c *ProjectsLocationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsOperationsListCall { 6644 c.urlParams_.Set("pageToken", pageToken) 6645 return c 6646} 6647 6648// Fields allows partial responses to be retrieved. See 6649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6650// for more information. 6651func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { 6652 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6653 return c 6654} 6655 6656// IfNoneMatch sets the optional parameter which makes the operation 6657// fail if the object's ETag matches the given value. This is useful for 6658// getting updates only after the object has changed since the last 6659// request. Use googleapi.IsNotModified to check whether the response 6660// error from Do is the result of In-None-Match. 6661func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { 6662 c.ifNoneMatch_ = entityTag 6663 return c 6664} 6665 6666// Context sets the context to be used in this call's Do method. Any 6667// pending HTTP request will be aborted if the provided context is 6668// canceled. 6669func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { 6670 c.ctx_ = ctx 6671 return c 6672} 6673 6674// Header returns an http.Header that can be modified by the caller to 6675// add HTTP headers to the request. 6676func (c *ProjectsLocationsOperationsListCall) Header() http.Header { 6677 if c.header_ == nil { 6678 c.header_ = make(http.Header) 6679 } 6680 return c.header_ 6681} 6682 6683func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { 6684 reqHeaders := make(http.Header) 6685 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 6686 for k, v := range c.header_ { 6687 reqHeaders[k] = v 6688 } 6689 reqHeaders.Set("User-Agent", c.s.userAgent()) 6690 if c.ifNoneMatch_ != "" { 6691 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6692 } 6693 var body io.Reader = nil 6694 c.urlParams_.Set("alt", alt) 6695 c.urlParams_.Set("prettyPrint", "false") 6696 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 6697 urls += "?" + c.urlParams_.Encode() 6698 req, err := http.NewRequest("GET", urls, body) 6699 if err != nil { 6700 return nil, err 6701 } 6702 req.Header = reqHeaders 6703 googleapi.Expand(req.URL, map[string]string{ 6704 "name": c.name, 6705 }) 6706 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6707} 6708 6709// Do executes the "connectors.projects.locations.operations.list" call. 6710// Exactly one of *ListOperationsResponse or error will be non-nil. Any 6711// non-2xx status code is an error. Response headers are in either 6712// *ListOperationsResponse.ServerResponse.Header or (if a response was 6713// returned at all) in error.(*googleapi.Error).Header. Use 6714// googleapi.IsNotModified to check whether the returned error was 6715// because http.StatusNotModified was returned. 6716func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) { 6717 gensupport.SetOptions(c.urlParams_, opts...) 6718 res, err := c.doRequest("json") 6719 if res != nil && res.StatusCode == http.StatusNotModified { 6720 if res.Body != nil { 6721 res.Body.Close() 6722 } 6723 return nil, &googleapi.Error{ 6724 Code: res.StatusCode, 6725 Header: res.Header, 6726 } 6727 } 6728 if err != nil { 6729 return nil, err 6730 } 6731 defer googleapi.CloseBody(res) 6732 if err := googleapi.CheckResponse(res); err != nil { 6733 return nil, err 6734 } 6735 ret := &ListOperationsResponse{ 6736 ServerResponse: googleapi.ServerResponse{ 6737 Header: res.Header, 6738 HTTPStatusCode: res.StatusCode, 6739 }, 6740 } 6741 target := &ret 6742 if err := gensupport.DecodeResponse(target, res); err != nil { 6743 return nil, err 6744 } 6745 return ret, nil 6746 // { 6747 // "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", 6748 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", 6749 // "httpMethod": "GET", 6750 // "id": "connectors.projects.locations.operations.list", 6751 // "parameterOrder": [ 6752 // "name" 6753 // ], 6754 // "parameters": { 6755 // "filter": { 6756 // "description": "The standard list filter.", 6757 // "location": "query", 6758 // "type": "string" 6759 // }, 6760 // "name": { 6761 // "description": "The name of the operation's parent resource.", 6762 // "location": "path", 6763 // "pattern": "^projects/[^/]+/locations/[^/]+$", 6764 // "required": true, 6765 // "type": "string" 6766 // }, 6767 // "pageSize": { 6768 // "description": "The standard list page size.", 6769 // "format": "int32", 6770 // "location": "query", 6771 // "type": "integer" 6772 // }, 6773 // "pageToken": { 6774 // "description": "The standard list page token.", 6775 // "location": "query", 6776 // "type": "string" 6777 // } 6778 // }, 6779 // "path": "v1/{+name}/operations", 6780 // "response": { 6781 // "$ref": "ListOperationsResponse" 6782 // }, 6783 // "scopes": [ 6784 // "https://www.googleapis.com/auth/cloud-platform" 6785 // ] 6786 // } 6787 6788} 6789 6790// Pages invokes f for each page of results. 6791// A non-nil error returned from f will halt the iteration. 6792// The provided context supersedes any context provided to the Context method. 6793func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error { 6794 c.ctx_ = ctx 6795 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 6796 for { 6797 x, err := c.Do() 6798 if err != nil { 6799 return err 6800 } 6801 if err := f(x); err != nil { 6802 return err 6803 } 6804 if x.NextPageToken == "" { 6805 return nil 6806 } 6807 c.PageToken(x.NextPageToken) 6808 } 6809} 6810 6811// method id "connectors.projects.locations.providers.getIamPolicy": 6812 6813type ProjectsLocationsProvidersGetIamPolicyCall struct { 6814 s *Service 6815 resource string 6816 urlParams_ gensupport.URLParams 6817 ifNoneMatch_ string 6818 ctx_ context.Context 6819 header_ http.Header 6820} 6821 6822// GetIamPolicy: Gets the access control policy for a resource. Returns 6823// an empty policy if the resource exists and does not have a policy 6824// set. 6825// 6826// - resource: REQUIRED: The resource for which the policy is being 6827// requested. See the operation documentation for the appropriate 6828// value for this field. 6829func (r *ProjectsLocationsProvidersService) GetIamPolicy(resource string) *ProjectsLocationsProvidersGetIamPolicyCall { 6830 c := &ProjectsLocationsProvidersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 6831 c.resource = resource 6832 return c 6833} 6834 6835// OptionsRequestedPolicyVersion sets the optional parameter 6836// "options.requestedPolicyVersion": The policy format version to be 6837// returned. Valid values are 0, 1, and 3. Requests specifying an 6838// invalid value will be rejected. Requests for policies with any 6839// conditional bindings must specify version 3. Policies without any 6840// conditional bindings may specify any valid value or leave the field 6841// unset. To learn which resources support conditions in their IAM 6842// policies, see the IAM documentation 6843// (https://cloud.google.com/iam/help/conditions/resource-policies). 6844func (c *ProjectsLocationsProvidersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsProvidersGetIamPolicyCall { 6845 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 6846 return c 6847} 6848 6849// Fields allows partial responses to be retrieved. See 6850// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 6851// for more information. 6852func (c *ProjectsLocationsProvidersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvidersGetIamPolicyCall { 6853 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 6854 return c 6855} 6856 6857// IfNoneMatch sets the optional parameter which makes the operation 6858// fail if the object's ETag matches the given value. This is useful for 6859// getting updates only after the object has changed since the last 6860// request. Use googleapi.IsNotModified to check whether the response 6861// error from Do is the result of In-None-Match. 6862func (c *ProjectsLocationsProvidersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsProvidersGetIamPolicyCall { 6863 c.ifNoneMatch_ = entityTag 6864 return c 6865} 6866 6867// Context sets the context to be used in this call's Do method. Any 6868// pending HTTP request will be aborted if the provided context is 6869// canceled. 6870func (c *ProjectsLocationsProvidersGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsProvidersGetIamPolicyCall { 6871 c.ctx_ = ctx 6872 return c 6873} 6874 6875// Header returns an http.Header that can be modified by the caller to 6876// add HTTP headers to the request. 6877func (c *ProjectsLocationsProvidersGetIamPolicyCall) Header() http.Header { 6878 if c.header_ == nil { 6879 c.header_ = make(http.Header) 6880 } 6881 return c.header_ 6882} 6883 6884func (c *ProjectsLocationsProvidersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 6885 reqHeaders := make(http.Header) 6886 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 6887 for k, v := range c.header_ { 6888 reqHeaders[k] = v 6889 } 6890 reqHeaders.Set("User-Agent", c.s.userAgent()) 6891 if c.ifNoneMatch_ != "" { 6892 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 6893 } 6894 var body io.Reader = nil 6895 c.urlParams_.Set("alt", alt) 6896 c.urlParams_.Set("prettyPrint", "false") 6897 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 6898 urls += "?" + c.urlParams_.Encode() 6899 req, err := http.NewRequest("GET", urls, body) 6900 if err != nil { 6901 return nil, err 6902 } 6903 req.Header = reqHeaders 6904 googleapi.Expand(req.URL, map[string]string{ 6905 "resource": c.resource, 6906 }) 6907 return gensupport.SendRequest(c.ctx_, c.s.client, req) 6908} 6909 6910// Do executes the "connectors.projects.locations.providers.getIamPolicy" call. 6911// Exactly one of *Policy or error will be non-nil. Any non-2xx status 6912// code is an error. Response headers are in either 6913// *Policy.ServerResponse.Header or (if a response was returned at all) 6914// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 6915// check whether the returned error was because http.StatusNotModified 6916// was returned. 6917func (c *ProjectsLocationsProvidersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 6918 gensupport.SetOptions(c.urlParams_, opts...) 6919 res, err := c.doRequest("json") 6920 if res != nil && res.StatusCode == http.StatusNotModified { 6921 if res.Body != nil { 6922 res.Body.Close() 6923 } 6924 return nil, &googleapi.Error{ 6925 Code: res.StatusCode, 6926 Header: res.Header, 6927 } 6928 } 6929 if err != nil { 6930 return nil, err 6931 } 6932 defer googleapi.CloseBody(res) 6933 if err := googleapi.CheckResponse(res); err != nil { 6934 return nil, err 6935 } 6936 ret := &Policy{ 6937 ServerResponse: googleapi.ServerResponse{ 6938 Header: res.Header, 6939 HTTPStatusCode: res.StatusCode, 6940 }, 6941 } 6942 target := &ret 6943 if err := gensupport.DecodeResponse(target, res); err != nil { 6944 return nil, err 6945 } 6946 return ret, nil 6947 // { 6948 // "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", 6949 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/providers/{providersId}:getIamPolicy", 6950 // "httpMethod": "GET", 6951 // "id": "connectors.projects.locations.providers.getIamPolicy", 6952 // "parameterOrder": [ 6953 // "resource" 6954 // ], 6955 // "parameters": { 6956 // "options.requestedPolicyVersion": { 6957 // "description": "Optional. The policy format version to be returned. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", 6958 // "format": "int32", 6959 // "location": "query", 6960 // "type": "integer" 6961 // }, 6962 // "resource": { 6963 // "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.", 6964 // "location": "path", 6965 // "pattern": "^projects/[^/]+/locations/[^/]+/providers/[^/]+$", 6966 // "required": true, 6967 // "type": "string" 6968 // } 6969 // }, 6970 // "path": "v1/{+resource}:getIamPolicy", 6971 // "response": { 6972 // "$ref": "Policy" 6973 // }, 6974 // "scopes": [ 6975 // "https://www.googleapis.com/auth/cloud-platform" 6976 // ] 6977 // } 6978 6979} 6980 6981// method id "connectors.projects.locations.providers.setIamPolicy": 6982 6983type ProjectsLocationsProvidersSetIamPolicyCall struct { 6984 s *Service 6985 resource string 6986 setiampolicyrequest *SetIamPolicyRequest 6987 urlParams_ gensupport.URLParams 6988 ctx_ context.Context 6989 header_ http.Header 6990} 6991 6992// SetIamPolicy: Sets the access control policy on the specified 6993// resource. Replaces any existing policy. Can return `NOT_FOUND`, 6994// `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. 6995// 6996// - resource: REQUIRED: The resource for which the policy is being 6997// specified. See the operation documentation for the appropriate 6998// value for this field. 6999func (r *ProjectsLocationsProvidersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsProvidersSetIamPolicyCall { 7000 c := &ProjectsLocationsProvidersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7001 c.resource = resource 7002 c.setiampolicyrequest = setiampolicyrequest 7003 return c 7004} 7005 7006// Fields allows partial responses to be retrieved. See 7007// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7008// for more information. 7009func (c *ProjectsLocationsProvidersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvidersSetIamPolicyCall { 7010 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7011 return c 7012} 7013 7014// Context sets the context to be used in this call's Do method. Any 7015// pending HTTP request will be aborted if the provided context is 7016// canceled. 7017func (c *ProjectsLocationsProvidersSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsProvidersSetIamPolicyCall { 7018 c.ctx_ = ctx 7019 return c 7020} 7021 7022// Header returns an http.Header that can be modified by the caller to 7023// add HTTP headers to the request. 7024func (c *ProjectsLocationsProvidersSetIamPolicyCall) Header() http.Header { 7025 if c.header_ == nil { 7026 c.header_ = make(http.Header) 7027 } 7028 return c.header_ 7029} 7030 7031func (c *ProjectsLocationsProvidersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 7032 reqHeaders := make(http.Header) 7033 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 7034 for k, v := range c.header_ { 7035 reqHeaders[k] = v 7036 } 7037 reqHeaders.Set("User-Agent", c.s.userAgent()) 7038 var body io.Reader = nil 7039 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 7040 if err != nil { 7041 return nil, err 7042 } 7043 reqHeaders.Set("Content-Type", "application/json") 7044 c.urlParams_.Set("alt", alt) 7045 c.urlParams_.Set("prettyPrint", "false") 7046 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") 7047 urls += "?" + c.urlParams_.Encode() 7048 req, err := http.NewRequest("POST", urls, body) 7049 if err != nil { 7050 return nil, err 7051 } 7052 req.Header = reqHeaders 7053 googleapi.Expand(req.URL, map[string]string{ 7054 "resource": c.resource, 7055 }) 7056 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7057} 7058 7059// Do executes the "connectors.projects.locations.providers.setIamPolicy" call. 7060// Exactly one of *Policy or error will be non-nil. Any non-2xx status 7061// code is an error. Response headers are in either 7062// *Policy.ServerResponse.Header or (if a response was returned at all) 7063// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 7064// check whether the returned error was because http.StatusNotModified 7065// was returned. 7066func (c *ProjectsLocationsProvidersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 7067 gensupport.SetOptions(c.urlParams_, opts...) 7068 res, err := c.doRequest("json") 7069 if res != nil && res.StatusCode == http.StatusNotModified { 7070 if res.Body != nil { 7071 res.Body.Close() 7072 } 7073 return nil, &googleapi.Error{ 7074 Code: res.StatusCode, 7075 Header: res.Header, 7076 } 7077 } 7078 if err != nil { 7079 return nil, err 7080 } 7081 defer googleapi.CloseBody(res) 7082 if err := googleapi.CheckResponse(res); err != nil { 7083 return nil, err 7084 } 7085 ret := &Policy{ 7086 ServerResponse: googleapi.ServerResponse{ 7087 Header: res.Header, 7088 HTTPStatusCode: res.StatusCode, 7089 }, 7090 } 7091 target := &ret 7092 if err := gensupport.DecodeResponse(target, res); err != nil { 7093 return nil, err 7094 } 7095 return ret, nil 7096 // { 7097 // "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", 7098 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/providers/{providersId}:setIamPolicy", 7099 // "httpMethod": "POST", 7100 // "id": "connectors.projects.locations.providers.setIamPolicy", 7101 // "parameterOrder": [ 7102 // "resource" 7103 // ], 7104 // "parameters": { 7105 // "resource": { 7106 // "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.", 7107 // "location": "path", 7108 // "pattern": "^projects/[^/]+/locations/[^/]+/providers/[^/]+$", 7109 // "required": true, 7110 // "type": "string" 7111 // } 7112 // }, 7113 // "path": "v1/{+resource}:setIamPolicy", 7114 // "request": { 7115 // "$ref": "SetIamPolicyRequest" 7116 // }, 7117 // "response": { 7118 // "$ref": "Policy" 7119 // }, 7120 // "scopes": [ 7121 // "https://www.googleapis.com/auth/cloud-platform" 7122 // ] 7123 // } 7124 7125} 7126 7127// method id "connectors.projects.locations.providers.testIamPermissions": 7128 7129type ProjectsLocationsProvidersTestIamPermissionsCall struct { 7130 s *Service 7131 resource string 7132 testiampermissionsrequest *TestIamPermissionsRequest 7133 urlParams_ gensupport.URLParams 7134 ctx_ context.Context 7135 header_ http.Header 7136} 7137 7138// TestIamPermissions: Returns permissions that a caller has on the 7139// specified resource. If the resource does not exist, this will return 7140// an empty set of permissions, not a `NOT_FOUND` error. Note: This 7141// operation is designed to be used for building permission-aware UIs 7142// and command-line tools, not for authorization checking. This 7143// operation may "fail open" without warning. 7144// 7145// - resource: REQUIRED: The resource for which the policy detail is 7146// being requested. See the operation documentation for the 7147// appropriate value for this field. 7148func (r *ProjectsLocationsProvidersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsProvidersTestIamPermissionsCall { 7149 c := &ProjectsLocationsProvidersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 7150 c.resource = resource 7151 c.testiampermissionsrequest = testiampermissionsrequest 7152 return c 7153} 7154 7155// Fields allows partial responses to be retrieved. See 7156// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 7157// for more information. 7158func (c *ProjectsLocationsProvidersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsProvidersTestIamPermissionsCall { 7159 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 7160 return c 7161} 7162 7163// Context sets the context to be used in this call's Do method. Any 7164// pending HTTP request will be aborted if the provided context is 7165// canceled. 7166func (c *ProjectsLocationsProvidersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsProvidersTestIamPermissionsCall { 7167 c.ctx_ = ctx 7168 return c 7169} 7170 7171// Header returns an http.Header that can be modified by the caller to 7172// add HTTP headers to the request. 7173func (c *ProjectsLocationsProvidersTestIamPermissionsCall) Header() http.Header { 7174 if c.header_ == nil { 7175 c.header_ = make(http.Header) 7176 } 7177 return c.header_ 7178} 7179 7180func (c *ProjectsLocationsProvidersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 7181 reqHeaders := make(http.Header) 7182 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20211027") 7183 for k, v := range c.header_ { 7184 reqHeaders[k] = v 7185 } 7186 reqHeaders.Set("User-Agent", c.s.userAgent()) 7187 var body io.Reader = nil 7188 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 7189 if err != nil { 7190 return nil, err 7191 } 7192 reqHeaders.Set("Content-Type", "application/json") 7193 c.urlParams_.Set("alt", alt) 7194 c.urlParams_.Set("prettyPrint", "false") 7195 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") 7196 urls += "?" + c.urlParams_.Encode() 7197 req, err := http.NewRequest("POST", urls, body) 7198 if err != nil { 7199 return nil, err 7200 } 7201 req.Header = reqHeaders 7202 googleapi.Expand(req.URL, map[string]string{ 7203 "resource": c.resource, 7204 }) 7205 return gensupport.SendRequest(c.ctx_, c.s.client, req) 7206} 7207 7208// Do executes the "connectors.projects.locations.providers.testIamPermissions" call. 7209// Exactly one of *TestIamPermissionsResponse or error will be non-nil. 7210// Any non-2xx status code is an error. Response headers are in either 7211// *TestIamPermissionsResponse.ServerResponse.Header or (if a response 7212// was returned at all) in error.(*googleapi.Error).Header. Use 7213// googleapi.IsNotModified to check whether the returned error was 7214// because http.StatusNotModified was returned. 7215func (c *ProjectsLocationsProvidersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 7216 gensupport.SetOptions(c.urlParams_, opts...) 7217 res, err := c.doRequest("json") 7218 if res != nil && res.StatusCode == http.StatusNotModified { 7219 if res.Body != nil { 7220 res.Body.Close() 7221 } 7222 return nil, &googleapi.Error{ 7223 Code: res.StatusCode, 7224 Header: res.Header, 7225 } 7226 } 7227 if err != nil { 7228 return nil, err 7229 } 7230 defer googleapi.CloseBody(res) 7231 if err := googleapi.CheckResponse(res); err != nil { 7232 return nil, err 7233 } 7234 ret := &TestIamPermissionsResponse{ 7235 ServerResponse: googleapi.ServerResponse{ 7236 Header: res.Header, 7237 HTTPStatusCode: res.StatusCode, 7238 }, 7239 } 7240 target := &ret 7241 if err := gensupport.DecodeResponse(target, res); err != nil { 7242 return nil, err 7243 } 7244 return ret, nil 7245 // { 7246 // "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", 7247 // "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/providers/{providersId}:testIamPermissions", 7248 // "httpMethod": "POST", 7249 // "id": "connectors.projects.locations.providers.testIamPermissions", 7250 // "parameterOrder": [ 7251 // "resource" 7252 // ], 7253 // "parameters": { 7254 // "resource": { 7255 // "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.", 7256 // "location": "path", 7257 // "pattern": "^projects/[^/]+/locations/[^/]+/providers/[^/]+$", 7258 // "required": true, 7259 // "type": "string" 7260 // } 7261 // }, 7262 // "path": "v1/{+resource}:testIamPermissions", 7263 // "request": { 7264 // "$ref": "TestIamPermissionsRequest" 7265 // }, 7266 // "response": { 7267 // "$ref": "TestIamPermissionsResponse" 7268 // }, 7269 // "scopes": [ 7270 // "https://www.googleapis.com/auth/cloud-platform" 7271 // ] 7272 // } 7273 7274} 7275