1 // Copyright 2024 Google LLC. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Code generated file. DO NOT EDIT. 6 7 // Package cloudbuild provides access to the Cloud Build API. 8 // 9 // For product documentation, see: https://cloud.google.com/cloud-build/docs/ 10 // 11 // # Library status 12 // 13 // These client libraries are officially supported by Google. However, this 14 // library is considered complete and is in maintenance mode. This means 15 // that we will address critical bugs and security issues but will not add 16 // any new features. 17 // 18 // When possible, we recommend using our newer 19 // [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) 20 // that are still actively being worked and iterated on. 21 // 22 // # Creating a client 23 // 24 // Usage example: 25 // 26 // import "google.golang.org/api/cloudbuild/v2" 27 // ... 28 // ctx := context.Background() 29 // cloudbuildService, err := cloudbuild.NewService(ctx) 30 // 31 // In this example, Google Application Default Credentials are used for 32 // authentication. For information on how to create and obtain Application 33 // Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 34 // 35 // # Other authentication options 36 // 37 // To use an API key for authentication (note: some APIs do not support API 38 // keys), use [google.golang.org/api/option.WithAPIKey]: 39 // 40 // cloudbuildService, err := cloudbuild.NewService(ctx, option.WithAPIKey("AIza...")) 41 // 42 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth 43 // flow, use [google.golang.org/api/option.WithTokenSource]: 44 // 45 // config := &oauth2.Config{...} 46 // // ... 47 // token, err := config.Exchange(ctx, ...) 48 // cloudbuildService, err := cloudbuild.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 49 // 50 // See [google.golang.org/api/option.ClientOption] for details on options. 51 package cloudbuild // import "google.golang.org/api/cloudbuild/v2" 52 53 import ( 54 "bytes" 55 "context" 56 "encoding/json" 57 "errors" 58 "fmt" 59 "io" 60 "net/http" 61 "net/url" 62 "strconv" 63 "strings" 64 65 googleapi "google.golang.org/api/googleapi" 66 internal "google.golang.org/api/internal" 67 gensupport "google.golang.org/api/internal/gensupport" 68 option "google.golang.org/api/option" 69 internaloption "google.golang.org/api/option/internaloption" 70 htransport "google.golang.org/api/transport/http" 71 ) 72 73 // Always reference these packages, just in case the auto-generated code 74 // below doesn't. 75 var _ = bytes.NewBuffer 76 var _ = strconv.Itoa 77 var _ = fmt.Sprintf 78 var _ = json.NewDecoder 79 var _ = io.Copy 80 var _ = url.Parse 81 var _ = gensupport.MarshalJSON 82 var _ = googleapi.Version 83 var _ = errors.New 84 var _ = strings.Replace 85 var _ = context.Canceled 86 var _ = internaloption.WithDefaultEndpoint 87 var _ = internal.Version 88 89 const apiId = "cloudbuild:v2" 90 const apiName = "cloudbuild" 91 const apiVersion = "v2" 92 const basePath = "https://cloudbuild.googleapis.com/" 93 const basePathTemplate = "https://cloudbuild.UNIVERSE_DOMAIN/" 94 const mtlsBasePath = "https://cloudbuild.mtls.googleapis.com/" 95 96 // OAuth2 scopes used by this API. 97 const ( 98 // See, edit, configure, and delete your Google Cloud data and see the email 99 // address for your Google Account. 100 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 101 ) 102 103 // NewService creates a new Service. 104 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 105 scopesOption := internaloption.WithDefaultScopes( 106 "https://www.googleapis.com/auth/cloud-platform", 107 ) 108 // NOTE: prepend, so we don't override user-specified scopes. 109 opts = append([]option.ClientOption{scopesOption}, opts...) 110 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 111 opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) 112 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 113 opts = append(opts, internaloption.EnableNewAuthLibrary()) 114 client, endpoint, err := htransport.NewClient(ctx, opts...) 115 if err != nil { 116 return nil, err 117 } 118 s, err := New(client) 119 if err != nil { 120 return nil, err 121 } 122 if endpoint != "" { 123 s.BasePath = endpoint 124 } 125 return s, nil 126 } 127 128 // New creates a new Service. It uses the provided http.Client for requests. 129 // 130 // Deprecated: please use NewService instead. 131 // To provide a custom HTTP client, use option.WithHTTPClient. 132 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 133 func New(client *http.Client) (*Service, error) { 134 if client == nil { 135 return nil, errors.New("client is nil") 136 } 137 s := &Service{client: client, BasePath: basePath} 138 s.Projects = NewProjectsService(s) 139 return s, nil 140 } 141 142 type Service struct { 143 client *http.Client 144 BasePath string // API endpoint base URL 145 UserAgent string // optional additional User-Agent fragment 146 147 Projects *ProjectsService 148 } 149 150 func (s *Service) userAgent() string { 151 if s.UserAgent == "" { 152 return googleapi.UserAgent 153 } 154 return googleapi.UserAgent + " " + s.UserAgent 155 } 156 157 func NewProjectsService(s *Service) *ProjectsService { 158 rs := &ProjectsService{s: s} 159 rs.Locations = NewProjectsLocationsService(s) 160 return rs 161 } 162 163 type ProjectsService struct { 164 s *Service 165 166 Locations *ProjectsLocationsService 167 } 168 169 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 170 rs := &ProjectsLocationsService{s: s} 171 rs.Connections = NewProjectsLocationsConnectionsService(s) 172 rs.Operations = NewProjectsLocationsOperationsService(s) 173 return rs 174 } 175 176 type ProjectsLocationsService struct { 177 s *Service 178 179 Connections *ProjectsLocationsConnectionsService 180 181 Operations *ProjectsLocationsOperationsService 182 } 183 184 func NewProjectsLocationsConnectionsService(s *Service) *ProjectsLocationsConnectionsService { 185 rs := &ProjectsLocationsConnectionsService{s: s} 186 rs.Repositories = NewProjectsLocationsConnectionsRepositoriesService(s) 187 return rs 188 } 189 190 type ProjectsLocationsConnectionsService struct { 191 s *Service 192 193 Repositories *ProjectsLocationsConnectionsRepositoriesService 194 } 195 196 func NewProjectsLocationsConnectionsRepositoriesService(s *Service) *ProjectsLocationsConnectionsRepositoriesService { 197 rs := &ProjectsLocationsConnectionsRepositoriesService{s: s} 198 return rs 199 } 200 201 type ProjectsLocationsConnectionsRepositoriesService struct { 202 s *Service 203 } 204 205 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 206 rs := &ProjectsLocationsOperationsService{s: s} 207 return rs 208 } 209 210 type ProjectsLocationsOperationsService struct { 211 s *Service 212 } 213 214 // AuditConfig: Specifies the audit configuration for a service. The 215 // configuration determines which permission types are logged, and what 216 // identities, if any, are exempted from logging. An AuditConfig must have one 217 // or more AuditLogConfigs. If there are AuditConfigs for both `allServices` 218 // and a specific service, the union of the two AuditConfigs is used for that 219 // service: the log_types specified in each AuditConfig are enabled, and the 220 // exempted_members in each AuditLogConfig are exempted. Example Policy with 221 // multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", 222 // "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ 223 // "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": 224 // "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", 225 // "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": 226 // "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For 227 // sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ 228 // logging. It also exempts `jose@example.com` from DATA_READ logging, and 229 // `aliya@example.com` from DATA_WRITE logging. 230 type AuditConfig struct { 231 // AuditLogConfigs: The configuration for logging of each type of permission. 232 AuditLogConfigs []*AuditLogConfig `json:"auditLogConfigs,omitempty"` 233 // Service: Specifies a service that will be enabled for audit logging. For 234 // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` 235 // is a special value that covers all services. 236 Service string `json:"service,omitempty"` 237 // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to 238 // unconditionally include in API requests. By default, fields with empty or 239 // default values are omitted from API requests. See 240 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 241 // details. 242 ForceSendFields []string `json:"-"` 243 // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in 244 // API requests with the JSON null value. By default, fields with empty values 245 // are omitted from API requests. See 246 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 247 NullFields []string `json:"-"` 248 } 249 250 func (s *AuditConfig) MarshalJSON() ([]byte, error) { 251 type NoMethod AuditConfig 252 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 253 } 254 255 // AuditLogConfig: Provides the configuration for logging a type of 256 // permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", 257 // "exempted_members": [ "user:jose@example.com" ] }, { "log_type": 258 // "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while 259 // exempting jose@example.com from DATA_READ logging. 260 type AuditLogConfig struct { 261 // ExemptedMembers: Specifies the identities that do not cause logging for this 262 // type of permission. Follows the same format of Binding.members. 263 ExemptedMembers []string `json:"exemptedMembers,omitempty"` 264 // LogType: The log type that this config enables. 265 // 266 // Possible values: 267 // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. 268 // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy 269 // "DATA_WRITE" - Data writes. Example: CloudSQL Users create 270 // "DATA_READ" - Data reads. Example: CloudSQL Users list 271 LogType string `json:"logType,omitempty"` 272 // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to 273 // unconditionally include in API requests. By default, fields with empty or 274 // default values are omitted from API requests. See 275 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 276 // details. 277 ForceSendFields []string `json:"-"` 278 // NullFields is a list of field names (e.g. "ExemptedMembers") to include in 279 // API requests with the JSON null value. By default, fields with empty values 280 // are omitted from API requests. See 281 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 282 NullFields []string `json:"-"` 283 } 284 285 func (s *AuditLogConfig) MarshalJSON() ([]byte, error) { 286 type NoMethod AuditLogConfig 287 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 288 } 289 290 // BatchCreateRepositoriesRequest: Message for creating repositoritories in 291 // batch. 292 type BatchCreateRepositoriesRequest struct { 293 // Requests: Required. The request messages specifying the repositories to 294 // create. 295 Requests []*CreateRepositoryRequest `json:"requests,omitempty"` 296 // ForceSendFields is a list of field names (e.g. "Requests") to 297 // unconditionally include in API requests. By default, fields with empty or 298 // default values are omitted from API requests. See 299 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 300 // details. 301 ForceSendFields []string `json:"-"` 302 // NullFields is a list of field names (e.g. "Requests") to include in API 303 // requests with the JSON null value. By default, fields with empty values are 304 // omitted from API requests. See 305 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 306 NullFields []string `json:"-"` 307 } 308 309 func (s *BatchCreateRepositoriesRequest) MarshalJSON() ([]byte, error) { 310 type NoMethod BatchCreateRepositoriesRequest 311 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 312 } 313 314 // BatchCreateRepositoriesResponse: Message for response of creating 315 // repositories in batch. 316 type BatchCreateRepositoriesResponse struct { 317 // Repositories: Repository resources created. 318 Repositories []*Repository `json:"repositories,omitempty"` 319 // ForceSendFields is a list of field names (e.g. "Repositories") to 320 // unconditionally include in API requests. By default, fields with empty or 321 // default values are omitted from API requests. See 322 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 323 // details. 324 ForceSendFields []string `json:"-"` 325 // NullFields is a list of field names (e.g. "Repositories") to include in API 326 // requests with the JSON null value. By default, fields with empty values are 327 // omitted from API requests. See 328 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 329 NullFields []string `json:"-"` 330 } 331 332 func (s *BatchCreateRepositoriesResponse) MarshalJSON() ([]byte, error) { 333 type NoMethod BatchCreateRepositoriesResponse 334 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 335 } 336 337 // Binding: Associates `members`, or principals, with a `role`. 338 type Binding struct { 339 // Condition: The condition that is associated with this binding. If the 340 // condition evaluates to `true`, then this binding applies to the current 341 // request. If the condition evaluates to `false`, then this binding does not 342 // apply to the current request. However, a different role binding might grant 343 // the same role to one or more of the principals in this binding. To learn 344 // which resources support conditions in their IAM policies, see the IAM 345 // documentation 346 // (https://cloud.google.com/iam/help/conditions/resource-policies). 347 Condition *Expr `json:"condition,omitempty"` 348 // Members: Specifies the principals requesting access for a Google Cloud 349 // resource. `members` can have the following values: * `allUsers`: A special 350 // identifier that represents anyone who is on the internet; with or without a 351 // Google account. * `allAuthenticatedUsers`: A special identifier that 352 // represents anyone who is authenticated with a Google account or a service 353 // account. Does not include identities that come from external identity 354 // providers (IdPs) through identity federation. * `user:{emailid}`: An email 355 // address that represents a specific Google account. For example, 356 // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that 357 // represents a Google service account. For example, 358 // `my-other-app@appspot.gserviceaccount.com`. * 359 // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An 360 // identifier for a Kubernetes service account 361 // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). 362 // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * 363 // `group:{emailid}`: An email address that represents a Google group. For 364 // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain 365 // (primary) that represents all the users of that domain. For example, 366 // `google.com` or `example.com`. * 367 // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub 368 // ject/{subject_attribute_value}`: A single identity in a workforce identity 369 // pool. * 370 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 371 // group/{group_id}`: All workforce identities in a group. * 372 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 373 // attribute.{attribute_name}/{attribute_value}`: All workforce identities with 374 // a specific attribute value. * 375 // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ 376 // *`: All identities in a workforce identity pool. * 377 // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo 378 // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single 379 // identity in a workload identity pool. * 380 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 381 // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool 382 // group. * 383 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 384 // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} 385 // `: All identities in a workload identity pool with a certain attribute. * 386 // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global 387 // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity 388 // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus 389 // unique identifier) representing a user that has been recently deleted. For 390 // example, `alice@example.com?uid=123456789012345678901`. If the user is 391 // recovered, this value reverts to `user:{emailid}` and the recovered user 392 // retains the role in the binding. * 393 // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus 394 // unique identifier) representing a service account that has been recently 395 // deleted. For example, 396 // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the 397 // service account is undeleted, this value reverts to 398 // `serviceAccount:{emailid}` and the undeleted service account retains the 399 // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email 400 // address (plus unique identifier) representing a Google group that has been 401 // recently deleted. For example, 402 // `admins@example.com?uid=123456789012345678901`. If the group is recovered, 403 // this value reverts to `group:{emailid}` and the recovered group retains the 404 // role in the binding. * 405 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool 406 // _id}/subject/{subject_attribute_value}`: Deleted single identity in a 407 // workforce identity pool. For example, 408 // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po 409 // ol-id/subject/my-subject-attribute-value`. 410 Members []string `json:"members,omitempty"` 411 // Role: Role that is assigned to the list of `members`, or principals. For 412 // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview 413 // of the IAM roles and permissions, see the IAM documentation 414 // (https://cloud.google.com/iam/docs/roles-overview). For a list of the 415 // available pre-defined roles, see here 416 // (https://cloud.google.com/iam/docs/understanding-roles). 417 Role string `json:"role,omitempty"` 418 // ForceSendFields is a list of field names (e.g. "Condition") to 419 // unconditionally include in API requests. By default, fields with empty or 420 // default values are omitted from API requests. See 421 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 422 // details. 423 ForceSendFields []string `json:"-"` 424 // NullFields is a list of field names (e.g. "Condition") to include in API 425 // requests with the JSON null value. By default, fields with empty values are 426 // omitted from API requests. See 427 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 428 NullFields []string `json:"-"` 429 } 430 431 func (s *Binding) MarshalJSON() ([]byte, error) { 432 type NoMethod Binding 433 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 434 } 435 436 // BitbucketCloudConfig: Configuration for connections to Bitbucket Cloud. 437 type BitbucketCloudConfig struct { 438 // AuthorizerCredential: Required. An access token with the `webhook`, 439 // `repository`, `repository:admin` and `pullrequest` scope access. It can be 440 // either a workspace, project or repository access token. It's recommended to 441 // use a system account to generate these credentials. 442 AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` 443 // ReadAuthorizerCredential: Required. An access token with the `repository` 444 // access. It can be either a workspace, project or repository access token. 445 // It's recommended to use a system account to generate the credentials. 446 ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` 447 // WebhookSecretSecretVersion: Required. SecretManager resource containing the 448 // webhook secret used to verify webhook events, formatted as 449 // `projects/*/secrets/*/versions/*`. 450 WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` 451 // Workspace: Required. The Bitbucket Cloud Workspace ID to be connected to 452 // Google Cloud Platform. 453 Workspace string `json:"workspace,omitempty"` 454 // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to 455 // unconditionally include in API requests. By default, fields with empty or 456 // default values are omitted from API requests. See 457 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 458 // details. 459 ForceSendFields []string `json:"-"` 460 // NullFields is a list of field names (e.g. "AuthorizerCredential") to include 461 // in API requests with the JSON null value. By default, fields with empty 462 // values are omitted from API requests. See 463 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 464 NullFields []string `json:"-"` 465 } 466 467 func (s *BitbucketCloudConfig) MarshalJSON() ([]byte, error) { 468 type NoMethod BitbucketCloudConfig 469 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 470 } 471 472 // BitbucketDataCenterConfig: Configuration for connections to Bitbucket Data 473 // Center. 474 type BitbucketDataCenterConfig struct { 475 // AuthorizerCredential: Required. A http access token with the `REPO_ADMIN` 476 // scope access. 477 AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` 478 // HostUri: Required. The URI of the Bitbucket Data Center instance or cluster 479 // this connection is for. 480 HostUri string `json:"hostUri,omitempty"` 481 // ReadAuthorizerCredential: Required. A http access token with the `REPO_READ` 482 // access. 483 ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` 484 // ServerVersion: Output only. Version of the Bitbucket Data Center running on 485 // the `host_uri`. 486 ServerVersion string `json:"serverVersion,omitempty"` 487 // ServiceDirectoryConfig: Optional. Configuration for using Service Directory 488 // to privately connect to a Bitbucket Data Center. This should only be set if 489 // the Bitbucket Data Center is hosted on-premises and not reachable by public 490 // internet. If this field is left empty, calls to the Bitbucket Data Center 491 // will be made over the public internet. 492 ServiceDirectoryConfig *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` 493 // SslCa: Optional. SSL certificate to use for requests to the Bitbucket Data 494 // Center. 495 SslCa string `json:"sslCa,omitempty"` 496 // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource 497 // containing the webhook secret used to verify webhook events, formatted as 498 // `projects/*/secrets/*/versions/*`. 499 WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` 500 // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to 501 // unconditionally include in API requests. By default, fields with empty or 502 // default values are omitted from API requests. See 503 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 504 // details. 505 ForceSendFields []string `json:"-"` 506 // NullFields is a list of field names (e.g. "AuthorizerCredential") to include 507 // in API requests with the JSON null value. By default, fields with empty 508 // values are omitted from API requests. See 509 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 510 NullFields []string `json:"-"` 511 } 512 513 func (s *BitbucketDataCenterConfig) MarshalJSON() ([]byte, error) { 514 type NoMethod BitbucketDataCenterConfig 515 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 516 } 517 518 // CancelOperationRequest: The request message for Operations.CancelOperation. 519 type CancelOperationRequest struct { 520 } 521 522 // Capabilities: Capabilities adds and removes POSIX capabilities from running 523 // containers. 524 type Capabilities struct { 525 // Add: Optional. Added capabilities +optional 526 Add []string `json:"add,omitempty"` 527 // Drop: Optional. Removed capabilities +optional 528 Drop []string `json:"drop,omitempty"` 529 // ForceSendFields is a list of field names (e.g. "Add") to unconditionally 530 // include in API requests. By default, fields with empty or default values are 531 // omitted from API requests. See 532 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 533 // details. 534 ForceSendFields []string `json:"-"` 535 // NullFields is a list of field names (e.g. "Add") to include in API requests 536 // with the JSON null value. By default, fields with empty values are omitted 537 // from API requests. See 538 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 539 NullFields []string `json:"-"` 540 } 541 542 func (s *Capabilities) MarshalJSON() ([]byte, error) { 543 type NoMethod Capabilities 544 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 545 } 546 547 // ChildStatusReference: ChildStatusReference is used to point to the statuses 548 // of individual TaskRuns and Runs within this PipelineRun. 549 type ChildStatusReference struct { 550 // Name: Name is the name of the TaskRun or Run this is referencing. 551 Name string `json:"name,omitempty"` 552 // PipelineTaskName: PipelineTaskName is the name of the PipelineTask this is 553 // referencing. 554 PipelineTaskName string `json:"pipelineTaskName,omitempty"` 555 // Type: Output only. Type of the child reference. 556 // 557 // Possible values: 558 // "TYPE_UNSPECIFIED" - Default enum type; should not be used. 559 // "TASK_RUN" - TaskRun. 560 Type string `json:"type,omitempty"` 561 // WhenExpressions: WhenExpressions is the list of checks guarding the 562 // execution of the PipelineTask 563 WhenExpressions []*WhenExpression `json:"whenExpressions,omitempty"` 564 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 565 // include in API requests. By default, fields with empty or default values are 566 // omitted from API requests. See 567 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 568 // details. 569 ForceSendFields []string `json:"-"` 570 // NullFields is a list of field names (e.g. "Name") to include in API requests 571 // with the JSON null value. By default, fields with empty values are omitted 572 // from API requests. See 573 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 574 NullFields []string `json:"-"` 575 } 576 577 func (s *ChildStatusReference) MarshalJSON() ([]byte, error) { 578 type NoMethod ChildStatusReference 579 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 580 } 581 582 // Connection: A connection to a SCM like GitHub, GitHub Enterprise, Bitbucket 583 // Data Center, Bitbucket Cloud or GitLab. 584 type Connection struct { 585 // Annotations: Allows clients to store small amounts of arbitrary data. 586 Annotations map[string]string `json:"annotations,omitempty"` 587 // BitbucketCloudConfig: Configuration for connections to Bitbucket Cloud. 588 BitbucketCloudConfig *BitbucketCloudConfig `json:"bitbucketCloudConfig,omitempty"` 589 // BitbucketDataCenterConfig: Configuration for connections to Bitbucket Data 590 // Center. 591 BitbucketDataCenterConfig *BitbucketDataCenterConfig `json:"bitbucketDataCenterConfig,omitempty"` 592 // CreateTime: Output only. Server assigned timestamp for when the connection 593 // was created. 594 CreateTime string `json:"createTime,omitempty"` 595 // Disabled: If disabled is set to true, functionality is disabled for this 596 // connection. Repository based API methods and webhooks processing for 597 // repositories in this connection will be disabled. 598 Disabled bool `json:"disabled,omitempty"` 599 // Etag: This checksum is computed by the server based on the value of other 600 // fields, and may be sent on update and delete requests to ensure the client 601 // has an up-to-date value before proceeding. 602 Etag string `json:"etag,omitempty"` 603 // GithubConfig: Configuration for connections to github.com. 604 GithubConfig *GitHubConfig `json:"githubConfig,omitempty"` 605 // GithubEnterpriseConfig: Configuration for connections to an instance of 606 // GitHub Enterprise. 607 GithubEnterpriseConfig *GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig `json:"githubEnterpriseConfig,omitempty"` 608 // GitlabConfig: Configuration for connections to gitlab.com or an instance of 609 // GitLab Enterprise. 610 GitlabConfig *GoogleDevtoolsCloudbuildV2GitLabConfig `json:"gitlabConfig,omitempty"` 611 // InstallationState: Output only. Installation state of the Connection. 612 InstallationState *InstallationState `json:"installationState,omitempty"` 613 // Name: Immutable. The resource name of the connection, in the format 614 // `projects/{project}/locations/{location}/connections/{connection_id}`. 615 Name string `json:"name,omitempty"` 616 // Reconciling: Output only. Set to true when the connection is being set up or 617 // updated in the background. 618 Reconciling bool `json:"reconciling,omitempty"` 619 // UpdateTime: Output only. Server assigned timestamp for when the connection 620 // was updated. 621 UpdateTime string `json:"updateTime,omitempty"` 622 623 // ServerResponse contains the HTTP response code and headers from the server. 624 googleapi.ServerResponse `json:"-"` 625 // ForceSendFields is a list of field names (e.g. "Annotations") to 626 // unconditionally include in API requests. By default, fields with empty or 627 // default values are omitted from API requests. See 628 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 629 // details. 630 ForceSendFields []string `json:"-"` 631 // NullFields is a list of field names (e.g. "Annotations") to include in API 632 // requests with the JSON null value. By default, fields with empty values are 633 // omitted from API requests. See 634 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 635 NullFields []string `json:"-"` 636 } 637 638 func (s *Connection) MarshalJSON() ([]byte, error) { 639 type NoMethod Connection 640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 641 } 642 643 // CreateRepositoryRequest: Message for creating a Repository. 644 type CreateRepositoryRequest struct { 645 // Parent: Required. The connection to contain the repository. If the request 646 // is part of a BatchCreateRepositoriesRequest, this field should be empty or 647 // match the parent specified there. 648 Parent string `json:"parent,omitempty"` 649 // Repository: Required. The repository to create. 650 Repository *Repository `json:"repository,omitempty"` 651 // RepositoryId: Required. The ID to use for the repository, which will become 652 // the final component of the repository's resource name. This ID should be 653 // unique in the connection. Allows alphanumeric characters and any of 654 // -._~%!$&'()*+,;=@. 655 RepositoryId string `json:"repositoryId,omitempty"` 656 // ForceSendFields is a list of field names (e.g. "Parent") to unconditionally 657 // include in API requests. By default, fields with empty or default values are 658 // omitted from API requests. See 659 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 660 // details. 661 ForceSendFields []string `json:"-"` 662 // NullFields is a list of field names (e.g. "Parent") to include in API 663 // requests with the JSON null value. By default, fields with empty values are 664 // omitted from API requests. See 665 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 666 NullFields []string `json:"-"` 667 } 668 669 func (s *CreateRepositoryRequest) MarshalJSON() ([]byte, error) { 670 type NoMethod CreateRepositoryRequest 671 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 672 } 673 674 // EmbeddedTask: EmbeddedTask defines a Task that is embedded in a Pipeline. 675 type EmbeddedTask struct { 676 // Annotations: User annotations. See https://google.aip.dev/128#annotations 677 Annotations map[string]string `json:"annotations,omitempty"` 678 // TaskSpec: Spec to instantiate this TaskRun. 679 TaskSpec *TaskSpec `json:"taskSpec,omitempty"` 680 // ForceSendFields is a list of field names (e.g. "Annotations") to 681 // unconditionally include in API requests. By default, fields with empty or 682 // default values are omitted from API requests. See 683 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 684 // details. 685 ForceSendFields []string `json:"-"` 686 // NullFields is a list of field names (e.g. "Annotations") to include in API 687 // requests with the JSON null value. By default, fields with empty values are 688 // omitted from API requests. See 689 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 690 NullFields []string `json:"-"` 691 } 692 693 func (s *EmbeddedTask) MarshalJSON() ([]byte, error) { 694 type NoMethod EmbeddedTask 695 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 696 } 697 698 // Empty: A generic empty message that you can re-use to avoid defining 699 // duplicated empty messages in your APIs. A typical example is to use it as 700 // the request or the response type of an API method. For instance: service Foo 701 // { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } 702 type Empty struct { 703 // ServerResponse contains the HTTP response code and headers from the server. 704 googleapi.ServerResponse `json:"-"` 705 } 706 707 // EmptyDirVolumeSource: Represents an empty Volume source. 708 type EmptyDirVolumeSource struct { 709 } 710 711 // EnvVar: Environment variable. 712 type EnvVar struct { 713 // Name: Name of the environment variable. 714 Name string `json:"name,omitempty"` 715 // Value: Value of the environment variable. 716 Value string `json:"value,omitempty"` 717 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 718 // include in API requests. By default, fields with empty or default values are 719 // omitted from API requests. See 720 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 721 // details. 722 ForceSendFields []string `json:"-"` 723 // NullFields is a list of field names (e.g. "Name") to include in API requests 724 // with the JSON null value. By default, fields with empty values are omitted 725 // from API requests. See 726 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 727 NullFields []string `json:"-"` 728 } 729 730 func (s *EnvVar) MarshalJSON() ([]byte, error) { 731 type NoMethod EnvVar 732 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 733 } 734 735 // ExecAction: ExecAction describes a "run in container" action. 736 type ExecAction struct { 737 // Command: Optional. Command is the command line to execute inside the 738 // container, the working directory for the command is root ('/') in the 739 // container's filesystem. The command is simply exec'd, it is not run inside a 740 // shell, so traditional shell instructions ('|', etc) won't work. To use a 741 // shell, you need to explicitly call out to that shell. Exit status of 0 is 742 // treated as live/healthy and non-zero is unhealthy. +optional 743 Command []string `json:"command,omitempty"` 744 // ForceSendFields is a list of field names (e.g. "Command") to unconditionally 745 // include in API requests. By default, fields with empty or default values are 746 // omitted from API requests. See 747 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 748 // details. 749 ForceSendFields []string `json:"-"` 750 // NullFields is a list of field names (e.g. "Command") to include in API 751 // requests with the JSON null value. By default, fields with empty values are 752 // omitted from API requests. See 753 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 754 NullFields []string `json:"-"` 755 } 756 757 func (s *ExecAction) MarshalJSON() ([]byte, error) { 758 type NoMethod ExecAction 759 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 760 } 761 762 // Expr: Represents a textual expression in the Common Expression Language 763 // (CEL) syntax. CEL is a C-like expression language. The syntax and semantics 764 // of CEL are documented at https://github.com/google/cel-spec. Example 765 // (Comparison): title: "Summary size limit" description: "Determines if a 766 // summary is less than 100 chars" expression: "document.summary.size() < 100" 767 // Example (Equality): title: "Requestor is owner" description: "Determines if 768 // requestor is the document owner" expression: "document.owner == 769 // request.auth.claims.email" Example (Logic): title: "Public documents" 770 // description: "Determine whether the document should be publicly visible" 771 // expression: "document.type != 'private' && document.type != 'internal'" 772 // Example (Data Manipulation): title: "Notification string" description: 773 // "Create a notification string with a timestamp." expression: "'New message 774 // received at ' + string(document.create_time)" The exact variables and 775 // functions that may be referenced within an expression are determined by the 776 // service that evaluates it. See the service documentation for additional 777 // information. 778 type Expr struct { 779 // Description: Optional. Description of the expression. This is a longer text 780 // which describes the expression, e.g. when hovered over it in a UI. 781 Description string `json:"description,omitempty"` 782 // Expression: Textual representation of an expression in Common Expression 783 // Language syntax. 784 Expression string `json:"expression,omitempty"` 785 // Location: Optional. String indicating the location of the expression for 786 // error reporting, e.g. a file name and a position in the file. 787 Location string `json:"location,omitempty"` 788 // Title: Optional. Title for the expression, i.e. a short string describing 789 // its purpose. This can be used e.g. in UIs which allow to enter the 790 // expression. 791 Title string `json:"title,omitempty"` 792 // ForceSendFields is a list of field names (e.g. "Description") to 793 // unconditionally include in API requests. By default, fields with empty or 794 // default values are omitted from API requests. See 795 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 796 // details. 797 ForceSendFields []string `json:"-"` 798 // NullFields is a list of field names (e.g. "Description") to include in API 799 // requests with the JSON null value. By default, fields with empty values are 800 // omitted from API requests. See 801 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 802 NullFields []string `json:"-"` 803 } 804 805 func (s *Expr) MarshalJSON() ([]byte, error) { 806 type NoMethod Expr 807 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 808 } 809 810 // FetchGitRefsResponse: Response for fetching git refs 811 type FetchGitRefsResponse struct { 812 // NextPageToken: A token identifying a page of results the server should 813 // return. 814 NextPageToken string `json:"nextPageToken,omitempty"` 815 // RefNames: Name of the refs fetched. 816 RefNames []string `json:"refNames,omitempty"` 817 818 // ServerResponse contains the HTTP response code and headers from the server. 819 googleapi.ServerResponse `json:"-"` 820 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 821 // unconditionally include in API requests. By default, fields with empty or 822 // default values are omitted from API requests. See 823 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 824 // details. 825 ForceSendFields []string `json:"-"` 826 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 827 // requests with the JSON null value. By default, fields with empty values are 828 // omitted from API requests. See 829 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 830 NullFields []string `json:"-"` 831 } 832 833 func (s *FetchGitRefsResponse) MarshalJSON() ([]byte, error) { 834 type NoMethod FetchGitRefsResponse 835 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 836 } 837 838 // FetchLinkableRepositoriesResponse: Response message for 839 // FetchLinkableRepositories. 840 type FetchLinkableRepositoriesResponse struct { 841 // NextPageToken: A token identifying a page of results the server should 842 // return. 843 NextPageToken string `json:"nextPageToken,omitempty"` 844 // Repositories: repositories ready to be created. 845 Repositories []*Repository `json:"repositories,omitempty"` 846 847 // ServerResponse contains the HTTP response code and headers from the server. 848 googleapi.ServerResponse `json:"-"` 849 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 850 // unconditionally include in API requests. By default, fields with empty or 851 // default values are omitted from API requests. See 852 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 853 // details. 854 ForceSendFields []string `json:"-"` 855 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 856 // requests with the JSON null value. By default, fields with empty values are 857 // omitted from API requests. See 858 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 859 NullFields []string `json:"-"` 860 } 861 862 func (s *FetchLinkableRepositoriesResponse) MarshalJSON() ([]byte, error) { 863 type NoMethod FetchLinkableRepositoriesResponse 864 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 865 } 866 867 // FetchReadTokenRequest: Message for fetching SCM read token. 868 type FetchReadTokenRequest struct { 869 } 870 871 // FetchReadTokenResponse: Message for responding to get read token. 872 type FetchReadTokenResponse struct { 873 // ExpirationTime: Expiration timestamp. Can be empty if unknown or 874 // non-expiring. 875 ExpirationTime string `json:"expirationTime,omitempty"` 876 // Token: The token content. 877 Token string `json:"token,omitempty"` 878 879 // ServerResponse contains the HTTP response code and headers from the server. 880 googleapi.ServerResponse `json:"-"` 881 // ForceSendFields is a list of field names (e.g. "ExpirationTime") to 882 // unconditionally include in API requests. By default, fields with empty or 883 // default values are omitted from API requests. See 884 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 885 // details. 886 ForceSendFields []string `json:"-"` 887 // NullFields is a list of field names (e.g. "ExpirationTime") to include in 888 // API requests with the JSON null value. By default, fields with empty values 889 // are omitted from API requests. See 890 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 891 NullFields []string `json:"-"` 892 } 893 894 func (s *FetchReadTokenResponse) MarshalJSON() ([]byte, error) { 895 type NoMethod FetchReadTokenResponse 896 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 897 } 898 899 // FetchReadWriteTokenRequest: Message for fetching SCM read/write token. 900 type FetchReadWriteTokenRequest struct { 901 } 902 903 // FetchReadWriteTokenResponse: Message for responding to get read/write token. 904 type FetchReadWriteTokenResponse struct { 905 // ExpirationTime: Expiration timestamp. Can be empty if unknown or 906 // non-expiring. 907 ExpirationTime string `json:"expirationTime,omitempty"` 908 // Token: The token content. 909 Token string `json:"token,omitempty"` 910 911 // ServerResponse contains the HTTP response code and headers from the server. 912 googleapi.ServerResponse `json:"-"` 913 // ForceSendFields is a list of field names (e.g. "ExpirationTime") to 914 // unconditionally include in API requests. By default, fields with empty or 915 // default values are omitted from API requests. See 916 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 917 // details. 918 ForceSendFields []string `json:"-"` 919 // NullFields is a list of field names (e.g. "ExpirationTime") to include in 920 // API requests with the JSON null value. By default, fields with empty values 921 // are omitted from API requests. See 922 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 923 NullFields []string `json:"-"` 924 } 925 926 func (s *FetchReadWriteTokenResponse) MarshalJSON() ([]byte, error) { 927 type NoMethod FetchReadWriteTokenResponse 928 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 929 } 930 931 // GitHubConfig: Configuration for connections to github.com. 932 type GitHubConfig struct { 933 // AppInstallationId: GitHub App installation id. 934 AppInstallationId int64 `json:"appInstallationId,omitempty,string"` 935 // AuthorizerCredential: OAuth credential of the account that authorized the 936 // Cloud Build GitHub App. It is recommended to use a robot account instead of 937 // a human user account. The OAuth token must be tied to the Cloud Build GitHub 938 // App. 939 AuthorizerCredential *OAuthCredential `json:"authorizerCredential,omitempty"` 940 // ForceSendFields is a list of field names (e.g. "AppInstallationId") to 941 // unconditionally include in API requests. By default, fields with empty or 942 // default values are omitted from API requests. See 943 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 944 // details. 945 ForceSendFields []string `json:"-"` 946 // NullFields is a list of field names (e.g. "AppInstallationId") to include in 947 // API requests with the JSON null value. By default, fields with empty values 948 // are omitted from API requests. See 949 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 950 NullFields []string `json:"-"` 951 } 952 953 func (s *GitHubConfig) MarshalJSON() ([]byte, error) { 954 type NoMethod GitHubConfig 955 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 956 } 957 958 // GoogleDevtoolsCloudbuildV2Condition: Conditions defines a readiness 959 // condition for a Knative resource. 960 type GoogleDevtoolsCloudbuildV2Condition struct { 961 // LastTransitionTime: LastTransitionTime is the last time the condition 962 // transitioned from one status to another. 963 LastTransitionTime string `json:"lastTransitionTime,omitempty"` 964 // Message: A human readable message indicating details about the transition. 965 Message string `json:"message,omitempty"` 966 // Reason: The reason for the condition's last transition. 967 Reason string `json:"reason,omitempty"` 968 // Severity: Severity with which to treat failures of this type of condition. 969 // 970 // Possible values: 971 // "SEVERITY_UNSPECIFIED" - Default enum type; should not be used. 972 // "WARNING" - Severity is warning. 973 // "INFO" - Severity is informational only. 974 Severity string `json:"severity,omitempty"` 975 // Status: Status of the condition. 976 // 977 // Possible values: 978 // "UNKNOWN" - Default enum type indicating execution is still ongoing. 979 // "TRUE" - Success 980 // "FALSE" - Failure 981 Status string `json:"status,omitempty"` 982 // Type: Type of condition. 983 Type string `json:"type,omitempty"` 984 // ForceSendFields is a list of field names (e.g. "LastTransitionTime") to 985 // unconditionally include in API requests. By default, fields with empty or 986 // default values are omitted from API requests. See 987 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 988 // details. 989 ForceSendFields []string `json:"-"` 990 // NullFields is a list of field names (e.g. "LastTransitionTime") to include 991 // in API requests with the JSON null value. By default, fields with empty 992 // values are omitted from API requests. See 993 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 994 NullFields []string `json:"-"` 995 } 996 997 func (s *GoogleDevtoolsCloudbuildV2Condition) MarshalJSON() ([]byte, error) { 998 type NoMethod GoogleDevtoolsCloudbuildV2Condition 999 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1000 } 1001 1002 // GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig: Configuration for 1003 // connections to an instance of GitHub Enterprise. 1004 type GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig struct { 1005 // ApiKey: Required. API Key used for authentication of webhook events. 1006 ApiKey string `json:"apiKey,omitempty"` 1007 // AppId: Id of the GitHub App created from the manifest. 1008 AppId int64 `json:"appId,omitempty,string"` 1009 // AppInstallationId: ID of the installation of the GitHub App. 1010 AppInstallationId int64 `json:"appInstallationId,omitempty,string"` 1011 // AppSlug: The URL-friendly name of the GitHub App. 1012 AppSlug string `json:"appSlug,omitempty"` 1013 // HostUri: Required. The URI of the GitHub Enterprise host this connection is 1014 // for. 1015 HostUri string `json:"hostUri,omitempty"` 1016 // PrivateKeySecretVersion: SecretManager resource containing the private key 1017 // of the GitHub App, formatted as `projects/*/secrets/*/versions/*`. 1018 PrivateKeySecretVersion string `json:"privateKeySecretVersion,omitempty"` 1019 // ServerVersion: Output only. GitHub Enterprise version installed at the 1020 // host_uri. 1021 ServerVersion string `json:"serverVersion,omitempty"` 1022 // ServiceDirectoryConfig: Configuration for using Service Directory to 1023 // privately connect to a GitHub Enterprise server. This should only be set if 1024 // the GitHub Enterprise server is hosted on-premises and not reachable by 1025 // public internet. If this field is left empty, calls to the GitHub Enterprise 1026 // server will be made over the public internet. 1027 ServiceDirectoryConfig *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` 1028 // SslCa: SSL certificate to use for requests to GitHub Enterprise. 1029 SslCa string `json:"sslCa,omitempty"` 1030 // WebhookSecretSecretVersion: SecretManager resource containing the webhook 1031 // secret of the GitHub App, formatted as `projects/*/secrets/*/versions/*`. 1032 WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` 1033 // ForceSendFields is a list of field names (e.g. "ApiKey") to unconditionally 1034 // include in API requests. By default, fields with empty or default values are 1035 // omitted from API requests. See 1036 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1037 // details. 1038 ForceSendFields []string `json:"-"` 1039 // NullFields is a list of field names (e.g. "ApiKey") to include in API 1040 // requests with the JSON null value. By default, fields with empty values are 1041 // omitted from API requests. See 1042 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1043 NullFields []string `json:"-"` 1044 } 1045 1046 func (s *GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig) MarshalJSON() ([]byte, error) { 1047 type NoMethod GoogleDevtoolsCloudbuildV2GitHubEnterpriseConfig 1048 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1049 } 1050 1051 // GoogleDevtoolsCloudbuildV2GitLabConfig: Configuration for connections to 1052 // gitlab.com or an instance of GitLab Enterprise. 1053 type GoogleDevtoolsCloudbuildV2GitLabConfig struct { 1054 // AuthorizerCredential: Required. A GitLab personal access token with the 1055 // `api` scope access. 1056 AuthorizerCredential *UserCredential `json:"authorizerCredential,omitempty"` 1057 // HostUri: The URI of the GitLab Enterprise host this connection is for. If 1058 // not specified, the default value is https://gitlab.com. 1059 HostUri string `json:"hostUri,omitempty"` 1060 // ReadAuthorizerCredential: Required. A GitLab personal access token with the 1061 // minimum `read_api` scope access. 1062 ReadAuthorizerCredential *UserCredential `json:"readAuthorizerCredential,omitempty"` 1063 // ServerVersion: Output only. Version of the GitLab Enterprise server running 1064 // on the `host_uri`. 1065 ServerVersion string `json:"serverVersion,omitempty"` 1066 // ServiceDirectoryConfig: Configuration for using Service Directory to 1067 // privately connect to a GitLab Enterprise server. This should only be set if 1068 // the GitLab Enterprise server is hosted on-premises and not reachable by 1069 // public internet. If this field is left empty, calls to the GitLab Enterprise 1070 // server will be made over the public internet. 1071 ServiceDirectoryConfig *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` 1072 // SslCa: SSL certificate to use for requests to GitLab Enterprise. 1073 SslCa string `json:"sslCa,omitempty"` 1074 // WebhookSecretSecretVersion: Required. Immutable. SecretManager resource 1075 // containing the webhook secret of a GitLab Enterprise project, formatted as 1076 // `projects/*/secrets/*/versions/*`. 1077 WebhookSecretSecretVersion string `json:"webhookSecretSecretVersion,omitempty"` 1078 // ForceSendFields is a list of field names (e.g. "AuthorizerCredential") to 1079 // unconditionally include in API requests. By default, fields with empty or 1080 // default values are omitted from API requests. See 1081 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1082 // details. 1083 ForceSendFields []string `json:"-"` 1084 // NullFields is a list of field names (e.g. "AuthorizerCredential") to include 1085 // in API requests with the JSON null value. By default, fields with empty 1086 // values are omitted from API requests. See 1087 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1088 NullFields []string `json:"-"` 1089 } 1090 1091 func (s *GoogleDevtoolsCloudbuildV2GitLabConfig) MarshalJSON() ([]byte, error) { 1092 type NoMethod GoogleDevtoolsCloudbuildV2GitLabConfig 1093 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1094 } 1095 1096 // GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata of the 1097 // long-running operation. 1098 type GoogleDevtoolsCloudbuildV2OperationMetadata struct { 1099 // ApiVersion: Output only. API version used to start the operation. 1100 ApiVersion string `json:"apiVersion,omitempty"` 1101 // CreateTime: Output only. The time the operation was created. 1102 CreateTime string `json:"createTime,omitempty"` 1103 // EndTime: Output only. The time the operation finished running. 1104 EndTime string `json:"endTime,omitempty"` 1105 // RequestedCancellation: Output only. Identifies whether the user has 1106 // requested cancellation of the operation. Operations that have successfully 1107 // been cancelled have Operation.error value with a google.rpc.Status.code of 1108 // 1, corresponding to `Code.CANCELLED`. 1109 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 1110 // StatusMessage: Output only. Human-readable status of the operation, if any. 1111 StatusMessage string `json:"statusMessage,omitempty"` 1112 // Target: Output only. Server-defined resource path for the target of the 1113 // operation. 1114 Target string `json:"target,omitempty"` 1115 // Verb: Output only. Name of the verb executed by the operation. 1116 Verb string `json:"verb,omitempty"` 1117 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1118 // unconditionally include in API requests. By default, fields with empty or 1119 // default values are omitted from API requests. See 1120 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1121 // details. 1122 ForceSendFields []string `json:"-"` 1123 // NullFields is a list of field names (e.g. "ApiVersion") to include in API 1124 // requests with the JSON null value. By default, fields with empty values are 1125 // omitted from API requests. See 1126 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1127 NullFields []string `json:"-"` 1128 } 1129 1130 func (s *GoogleDevtoolsCloudbuildV2OperationMetadata) MarshalJSON() ([]byte, error) { 1131 type NoMethod GoogleDevtoolsCloudbuildV2OperationMetadata 1132 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1133 } 1134 1135 // GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig: ServiceDirectoryConfig 1136 // represents Service Directory configuration for a connection. 1137 type GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig struct { 1138 // Service: Required. The Service Directory service name. Format: 1139 // projects/{project}/locations/{location}/namespaces/{namespace}/services/{serv 1140 // ice}. 1141 Service string `json:"service,omitempty"` 1142 // ForceSendFields is a list of field names (e.g. "Service") to unconditionally 1143 // include in API requests. By default, fields with empty or default values are 1144 // omitted from API requests. See 1145 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1146 // details. 1147 ForceSendFields []string `json:"-"` 1148 // NullFields is a list of field names (e.g. "Service") to include in API 1149 // requests with the JSON null value. By default, fields with empty values are 1150 // omitted from API requests. See 1151 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1152 NullFields []string `json:"-"` 1153 } 1154 1155 func (s *GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig) MarshalJSON() ([]byte, error) { 1156 type NoMethod GoogleDevtoolsCloudbuildV2ServiceDirectoryConfig 1157 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1158 } 1159 1160 // HttpBody: Message that represents an arbitrary HTTP body. It should only be 1161 // used for payload formats that can't be represented as JSON, such as raw 1162 // binary or an HTML page. This message can be used both in streaming and 1163 // non-streaming API methods in the request as well as the response. It can be 1164 // used as a top-level request field, which is convenient if one wants to 1165 // extract parameters from either the URL or HTTP template into the request 1166 // fields and also want access to the raw HTTP body. Example: message 1167 // GetResourceRequest { // A unique request id. string request_id = 1; // The 1168 // raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } 1169 // service ResourceService { rpc GetResource(GetResourceRequest) returns 1170 // (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns 1171 // (google.protobuf.Empty); } Example with streaming methods: service 1172 // CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream 1173 // google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns 1174 // (stream google.api.HttpBody); } Use of this type only changes how the 1175 // request and response bodies are handled, all other features will continue to 1176 // work unchanged. 1177 type HttpBody struct { 1178 // ContentType: The HTTP Content-Type header value specifying the content type 1179 // of the body. 1180 ContentType string `json:"contentType,omitempty"` 1181 // Data: The HTTP request/response body as raw binary. 1182 Data string `json:"data,omitempty"` 1183 // Extensions: Application specific response metadata. Must be set in the first 1184 // response for streaming APIs. 1185 Extensions []googleapi.RawMessage `json:"extensions,omitempty"` 1186 // ForceSendFields is a list of field names (e.g. "ContentType") to 1187 // unconditionally include in API requests. By default, fields with empty or 1188 // default values are omitted from API requests. See 1189 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1190 // details. 1191 ForceSendFields []string `json:"-"` 1192 // NullFields is a list of field names (e.g. "ContentType") to include in API 1193 // requests with the JSON null value. By default, fields with empty values are 1194 // omitted from API requests. See 1195 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1196 NullFields []string `json:"-"` 1197 } 1198 1199 func (s *HttpBody) MarshalJSON() ([]byte, error) { 1200 type NoMethod HttpBody 1201 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1202 } 1203 1204 // InstallationState: Describes stage and necessary actions to be taken by the 1205 // user to complete the installation. Used for GitHub and GitHub Enterprise 1206 // based connections. 1207 type InstallationState struct { 1208 // ActionUri: Output only. Link to follow for next action. Empty string if the 1209 // installation is already complete. 1210 ActionUri string `json:"actionUri,omitempty"` 1211 // Message: Output only. Message of what the user should do next to continue 1212 // the installation. Empty string if the installation is already complete. 1213 Message string `json:"message,omitempty"` 1214 // Stage: Output only. Current step of the installation process. 1215 // 1216 // Possible values: 1217 // "STAGE_UNSPECIFIED" - No stage specified. 1218 // "PENDING_CREATE_APP" - Only for GitHub Enterprise. An App creation has 1219 // been requested. The user needs to confirm the creation in their GitHub 1220 // enterprise host. 1221 // "PENDING_USER_OAUTH" - User needs to authorize the GitHub (or Enterprise) 1222 // App via OAuth. 1223 // "PENDING_INSTALL_APP" - User needs to follow the link to install the 1224 // GitHub (or Enterprise) App. 1225 // "COMPLETE" - Installation process has been completed. 1226 Stage string `json:"stage,omitempty"` 1227 // ForceSendFields is a list of field names (e.g. "ActionUri") to 1228 // unconditionally include in API requests. By default, fields with empty or 1229 // default values are omitted from API requests. See 1230 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1231 // details. 1232 ForceSendFields []string `json:"-"` 1233 // NullFields is a list of field names (e.g. "ActionUri") to include in API 1234 // requests with the JSON null value. By default, fields with empty values are 1235 // omitted from API requests. See 1236 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1237 NullFields []string `json:"-"` 1238 } 1239 1240 func (s *InstallationState) MarshalJSON() ([]byte, error) { 1241 type NoMethod InstallationState 1242 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1243 } 1244 1245 // ListConnectionsResponse: Message for response to listing Connections. 1246 type ListConnectionsResponse struct { 1247 // Connections: The list of Connections. 1248 Connections []*Connection `json:"connections,omitempty"` 1249 // NextPageToken: A token identifying a page of results the server should 1250 // return. 1251 NextPageToken string `json:"nextPageToken,omitempty"` 1252 1253 // ServerResponse contains the HTTP response code and headers from the server. 1254 googleapi.ServerResponse `json:"-"` 1255 // ForceSendFields is a list of field names (e.g. "Connections") to 1256 // unconditionally include in API requests. By default, fields with empty or 1257 // default values are omitted from API requests. See 1258 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1259 // details. 1260 ForceSendFields []string `json:"-"` 1261 // NullFields is a list of field names (e.g. "Connections") to include in API 1262 // requests with the JSON null value. By default, fields with empty values are 1263 // omitted from API requests. See 1264 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1265 NullFields []string `json:"-"` 1266 } 1267 1268 func (s *ListConnectionsResponse) MarshalJSON() ([]byte, error) { 1269 type NoMethod ListConnectionsResponse 1270 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1271 } 1272 1273 // ListLocationsResponse: The response message for Locations.ListLocations. 1274 type ListLocationsResponse struct { 1275 // Locations: A list of locations that matches the specified filter in the 1276 // request. 1277 Locations []*Location `json:"locations,omitempty"` 1278 // NextPageToken: The standard List next-page token. 1279 NextPageToken string `json:"nextPageToken,omitempty"` 1280 1281 // ServerResponse contains the HTTP response code and headers from the server. 1282 googleapi.ServerResponse `json:"-"` 1283 // ForceSendFields is a list of field names (e.g. "Locations") to 1284 // unconditionally include in API requests. By default, fields with empty or 1285 // default values are omitted from API requests. See 1286 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1287 // details. 1288 ForceSendFields []string `json:"-"` 1289 // NullFields is a list of field names (e.g. "Locations") to include in API 1290 // requests with the JSON null value. By default, fields with empty values are 1291 // omitted from API requests. See 1292 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1293 NullFields []string `json:"-"` 1294 } 1295 1296 func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) { 1297 type NoMethod ListLocationsResponse 1298 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1299 } 1300 1301 // ListRepositoriesResponse: Message for response to listing Repositories. 1302 type ListRepositoriesResponse struct { 1303 // NextPageToken: A token identifying a page of results the server should 1304 // return. 1305 NextPageToken string `json:"nextPageToken,omitempty"` 1306 // Repositories: The list of Repositories. 1307 Repositories []*Repository `json:"repositories,omitempty"` 1308 1309 // ServerResponse contains the HTTP response code and headers from the server. 1310 googleapi.ServerResponse `json:"-"` 1311 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 1312 // unconditionally include in API requests. By default, fields with empty or 1313 // default values are omitted from API requests. See 1314 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1315 // details. 1316 ForceSendFields []string `json:"-"` 1317 // NullFields is a list of field names (e.g. "NextPageToken") to include in API 1318 // requests with the JSON null value. By default, fields with empty values are 1319 // omitted from API requests. See 1320 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1321 NullFields []string `json:"-"` 1322 } 1323 1324 func (s *ListRepositoriesResponse) MarshalJSON() ([]byte, error) { 1325 type NoMethod ListRepositoriesResponse 1326 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1327 } 1328 1329 // Location: A resource that represents a Google Cloud location. 1330 type Location struct { 1331 // DisplayName: The friendly name for this location, typically a nearby city 1332 // name. For example, "Tokyo". 1333 DisplayName string `json:"displayName,omitempty"` 1334 // Labels: Cross-service attributes for the location. For example 1335 // {"cloud.googleapis.com/region": "us-east1"} 1336 Labels map[string]string `json:"labels,omitempty"` 1337 // LocationId: The canonical id for this location. For example: "us-east1". 1338 LocationId string `json:"locationId,omitempty"` 1339 // Metadata: Service-specific metadata. For example the available capacity at 1340 // the given location. 1341 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1342 // Name: Resource name for the location, which may vary between 1343 // implementations. For example: 1344 // "projects/example-project/locations/us-east1" 1345 Name string `json:"name,omitempty"` 1346 1347 // ServerResponse contains the HTTP response code and headers from the server. 1348 googleapi.ServerResponse `json:"-"` 1349 // ForceSendFields is a list of field names (e.g. "DisplayName") to 1350 // unconditionally include in API requests. By default, fields with empty or 1351 // default values are omitted from API requests. See 1352 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1353 // details. 1354 ForceSendFields []string `json:"-"` 1355 // NullFields is a list of field names (e.g. "DisplayName") to include in API 1356 // requests with the JSON null value. By default, fields with empty values are 1357 // omitted from API requests. See 1358 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1359 NullFields []string `json:"-"` 1360 } 1361 1362 func (s *Location) MarshalJSON() ([]byte, error) { 1363 type NoMethod Location 1364 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1365 } 1366 1367 // OAuthCredential: Represents an OAuth token of the account that authorized 1368 // the Connection, and associated metadata. 1369 type OAuthCredential struct { 1370 // OauthTokenSecretVersion: A SecretManager resource containing the OAuth token 1371 // that authorizes the Cloud Build connection. Format: 1372 // `projects/*/secrets/*/versions/*`. 1373 OauthTokenSecretVersion string `json:"oauthTokenSecretVersion,omitempty"` 1374 // Username: Output only. The username associated to this token. 1375 Username string `json:"username,omitempty"` 1376 // ForceSendFields is a list of field names (e.g. "OauthTokenSecretVersion") to 1377 // unconditionally include in API requests. By default, fields with empty or 1378 // default values are omitted from API requests. See 1379 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1380 // details. 1381 ForceSendFields []string `json:"-"` 1382 // NullFields is a list of field names (e.g. "OauthTokenSecretVersion") to 1383 // include in API requests with the JSON null value. By default, fields with 1384 // empty values are omitted from API requests. See 1385 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1386 NullFields []string `json:"-"` 1387 } 1388 1389 func (s *OAuthCredential) MarshalJSON() ([]byte, error) { 1390 type NoMethod OAuthCredential 1391 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1392 } 1393 1394 // Operation: This resource represents a long-running operation that is the 1395 // result of a network API call. 1396 type Operation struct { 1397 // Done: If the value is `false`, it means the operation is still in progress. 1398 // If `true`, the operation is completed, and either `error` or `response` is 1399 // available. 1400 Done bool `json:"done,omitempty"` 1401 // Error: The error result of the operation in case of failure or cancellation. 1402 Error *Status `json:"error,omitempty"` 1403 // Metadata: Service-specific metadata associated with the operation. It 1404 // typically contains progress information and common metadata such as create 1405 // time. Some services might not provide such metadata. Any method that returns 1406 // a long-running operation should document the metadata type, if any. 1407 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 1408 // Name: The server-assigned name, which is only unique within the same service 1409 // that originally returns it. If you use the default HTTP mapping, the `name` 1410 // should be a resource name ending with `operations/{unique_id}`. 1411 Name string `json:"name,omitempty"` 1412 // Response: The normal, successful response of the operation. If the original 1413 // method returns no data on success, such as `Delete`, the response is 1414 // `google.protobuf.Empty`. If the original method is standard 1415 // `Get`/`Create`/`Update`, the response should be the resource. For other 1416 // methods, the response should have the type `XxxResponse`, where `Xxx` is the 1417 // original method name. For example, if the original method name is 1418 // `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. 1419 Response googleapi.RawMessage `json:"response,omitempty"` 1420 1421 // ServerResponse contains the HTTP response code and headers from the server. 1422 googleapi.ServerResponse `json:"-"` 1423 // ForceSendFields is a list of field names (e.g. "Done") to unconditionally 1424 // include in API requests. By default, fields with empty or default values are 1425 // omitted from API requests. See 1426 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1427 // details. 1428 ForceSendFields []string `json:"-"` 1429 // NullFields is a list of field names (e.g. "Done") to include in API requests 1430 // with the JSON null value. By default, fields with empty values are omitted 1431 // from API requests. See 1432 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1433 NullFields []string `json:"-"` 1434 } 1435 1436 func (s *Operation) MarshalJSON() ([]byte, error) { 1437 type NoMethod Operation 1438 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1439 } 1440 1441 // OperationMetadata: Represents the metadata of the long-running operation. 1442 type OperationMetadata struct { 1443 // ApiVersion: Output only. API version used to start the operation. 1444 ApiVersion string `json:"apiVersion,omitempty"` 1445 // CancelRequested: Output only. Identifies whether the user has requested 1446 // cancellation of the operation. Operations that have been cancelled 1447 // successfully have Operation.error value with a google.rpc.Status.code of 1, 1448 // corresponding to `Code.CANCELLED`. 1449 CancelRequested bool `json:"cancelRequested,omitempty"` 1450 // CreateTime: Output only. The time the operation was created. 1451 CreateTime string `json:"createTime,omitempty"` 1452 // EndTime: Output only. The time the operation finished running. 1453 EndTime string `json:"endTime,omitempty"` 1454 // StatusDetail: Output only. Human-readable status of the operation, if any. 1455 StatusDetail string `json:"statusDetail,omitempty"` 1456 // Target: Output only. Server-defined resource path for the target of the 1457 // operation. 1458 Target string `json:"target,omitempty"` 1459 // Verb: Output only. Name of the verb executed by the operation. 1460 Verb string `json:"verb,omitempty"` 1461 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1462 // unconditionally include in API requests. By default, fields with empty or 1463 // default values are omitted from API requests. See 1464 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1465 // details. 1466 ForceSendFields []string `json:"-"` 1467 // NullFields is a list of field names (e.g. "ApiVersion") to include in API 1468 // requests with the JSON null value. By default, fields with empty values are 1469 // omitted from API requests. See 1470 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1471 NullFields []string `json:"-"` 1472 } 1473 1474 func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 1475 type NoMethod OperationMetadata 1476 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1477 } 1478 1479 // Param: Param defined with name and value. PipelineRef can be used to refer 1480 // to a specific instance of a Pipeline. 1481 type Param struct { 1482 // Name: Name of the parameter. 1483 Name string `json:"name,omitempty"` 1484 // Value: Value of the parameter. 1485 Value *ParamValue `json:"value,omitempty"` 1486 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1487 // include in API requests. By default, fields with empty or default values are 1488 // omitted from API requests. See 1489 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1490 // details. 1491 ForceSendFields []string `json:"-"` 1492 // NullFields is a list of field names (e.g. "Name") to include in API requests 1493 // with the JSON null value. By default, fields with empty values are omitted 1494 // from API requests. See 1495 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1496 NullFields []string `json:"-"` 1497 } 1498 1499 func (s *Param) MarshalJSON() ([]byte, error) { 1500 type NoMethod Param 1501 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1502 } 1503 1504 // ParamSpec: ParamSpec defines parameters needed beyond typed inputs (such as 1505 // resources). Parameter values are provided by users as inputs on a TaskRun or 1506 // PipelineRun. 1507 type ParamSpec struct { 1508 // Default: The default value a parameter takes if no input value is supplied 1509 Default *ParamValue `json:"default,omitempty"` 1510 // Description: Description of the ParamSpec 1511 Description string `json:"description,omitempty"` 1512 // Name: Name of the ParamSpec 1513 Name string `json:"name,omitempty"` 1514 // Type: Type of ParamSpec 1515 // 1516 // Possible values: 1517 // "TYPE_UNSPECIFIED" - Default enum type; should not be used. 1518 // "STRING" - Default 1519 // "ARRAY" - Arrary type. 1520 Type string `json:"type,omitempty"` 1521 // ForceSendFields is a list of field names (e.g. "Default") to unconditionally 1522 // include in API requests. By default, fields with empty or default values are 1523 // omitted from API requests. See 1524 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1525 // details. 1526 ForceSendFields []string `json:"-"` 1527 // NullFields is a list of field names (e.g. "Default") to include in API 1528 // requests with the JSON null value. By default, fields with empty values are 1529 // omitted from API requests. See 1530 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1531 NullFields []string `json:"-"` 1532 } 1533 1534 func (s *ParamSpec) MarshalJSON() ([]byte, error) { 1535 type NoMethod ParamSpec 1536 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1537 } 1538 1539 // ParamValue: Parameter value. 1540 type ParamValue struct { 1541 // ArrayVal: Value of the parameter if type is array. 1542 ArrayVal []string `json:"arrayVal,omitempty"` 1543 // StringVal: Value of the parameter if type is string. 1544 StringVal string `json:"stringVal,omitempty"` 1545 // Type: Type of parameter. 1546 // 1547 // Possible values: 1548 // "TYPE_UNSPECIFIED" - Default enum type; should not be used. 1549 // "STRING" - Default 1550 // "ARRAY" - Array type 1551 Type string `json:"type,omitempty"` 1552 // ForceSendFields is a list of field names (e.g. "ArrayVal") to 1553 // unconditionally include in API requests. By default, fields with empty or 1554 // default values are omitted from API requests. See 1555 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1556 // details. 1557 ForceSendFields []string `json:"-"` 1558 // NullFields is a list of field names (e.g. "ArrayVal") to include in API 1559 // requests with the JSON null value. By default, fields with empty values are 1560 // omitted from API requests. See 1561 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1562 NullFields []string `json:"-"` 1563 } 1564 1565 func (s *ParamValue) MarshalJSON() ([]byte, error) { 1566 type NoMethod ParamValue 1567 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1568 } 1569 1570 // PipelineRef: PipelineRef can be used to refer to a specific instance of a 1571 // Pipeline. 1572 type PipelineRef struct { 1573 // Name: Name of the Pipeline. 1574 Name string `json:"name,omitempty"` 1575 // Params: Params contains the parameters used to identify the referenced 1576 // Tekton resource. Example entries might include "repo" or "path" but the set 1577 // of params ultimately depends on the chosen resolver. 1578 Params []*Param `json:"params,omitempty"` 1579 // Resolver: Resolver is the name of the resolver that should perform 1580 // resolution of the referenced Tekton resource. 1581 // 1582 // Possible values: 1583 // "RESOLVER_NAME_UNSPECIFIED" - Default enum type; should not be used. 1584 // "BUNDLES" - Bundles resolver. 1585 // https://tekton.dev/docs/pipelines/bundle-resolver/ 1586 // "GCB_REPO" - GCB repo resolver. 1587 // "GIT" - Simple Git resolver. 1588 // https://tekton.dev/docs/pipelines/git-resolver/ 1589 // "DEVELOPER_CONNECT" - Developer Connect resolver. 1590 Resolver string `json:"resolver,omitempty"` 1591 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1592 // include in API requests. By default, fields with empty or default values are 1593 // omitted from API requests. See 1594 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1595 // details. 1596 ForceSendFields []string `json:"-"` 1597 // NullFields is a list of field names (e.g. "Name") to include in API requests 1598 // with the JSON null value. By default, fields with empty values are omitted 1599 // from API requests. See 1600 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1601 NullFields []string `json:"-"` 1602 } 1603 1604 func (s *PipelineRef) MarshalJSON() ([]byte, error) { 1605 type NoMethod PipelineRef 1606 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1607 } 1608 1609 // PipelineResult: A value produced by a Pipeline. 1610 type PipelineResult struct { 1611 // Description: Output only. Description of the result. 1612 Description string `json:"description,omitempty"` 1613 // Name: Output only. Name of the result. 1614 Name string `json:"name,omitempty"` 1615 // Type: Output only. The type of data that the result holds. 1616 // 1617 // Possible values: 1618 // "TYPE_UNSPECIFIED" - Default enum type; should not be used. 1619 // "STRING" - Default 1620 // "ARRAY" - Array type 1621 // "OBJECT" - Object type 1622 Type string `json:"type,omitempty"` 1623 // Value: Output only. Value of the result. 1624 Value *ResultValue `json:"value,omitempty"` 1625 // ForceSendFields is a list of field names (e.g. "Description") to 1626 // unconditionally include in API requests. By default, fields with empty or 1627 // default values are omitted from API requests. See 1628 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1629 // details. 1630 ForceSendFields []string `json:"-"` 1631 // NullFields is a list of field names (e.g. "Description") to include in API 1632 // requests with the JSON null value. By default, fields with empty values are 1633 // omitted from API requests. See 1634 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1635 NullFields []string `json:"-"` 1636 } 1637 1638 func (s *PipelineResult) MarshalJSON() ([]byte, error) { 1639 type NoMethod PipelineResult 1640 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1641 } 1642 1643 // PipelineRun: Message describing PipelineRun object 1644 type PipelineRun struct { 1645 // Annotations: User annotations. See https://google.aip.dev/128#annotations 1646 Annotations map[string]string `json:"annotations,omitempty"` 1647 // ChildReferences: Output only. List of TaskRun and Run names and PipelineTask 1648 // names for children of this PipelineRun. 1649 ChildReferences []*ChildStatusReference `json:"childReferences,omitempty"` 1650 // CompletionTime: Output only. Time the pipeline completed. 1651 CompletionTime string `json:"completionTime,omitempty"` 1652 // Conditions: Output only. Kubernetes Conditions convention for PipelineRun 1653 // status and error. 1654 Conditions []*GoogleDevtoolsCloudbuildV2Condition `json:"conditions,omitempty"` 1655 // CreateTime: Output only. Time at which the request to create the 1656 // `PipelineRun` was received. 1657 CreateTime string `json:"createTime,omitempty"` 1658 // Etag: Needed for declarative-friendly resources. 1659 Etag string `json:"etag,omitempty"` 1660 // FinallyStartTime: Output only. FinallyStartTime is when all non-finally 1661 // tasks have been completed and only finally tasks are being executed. 1662 // +optional 1663 FinallyStartTime string `json:"finallyStartTime,omitempty"` 1664 // GcbParams: Output only. GCB default params. 1665 GcbParams map[string]string `json:"gcbParams,omitempty"` 1666 // Name: Output only. The `PipelineRun` name with format 1667 // `projects/{project}/locations/{location}/pipelineRuns/{pipeline_run}` 1668 Name string `json:"name,omitempty"` 1669 // Params: Params is a list of parameter names and values. 1670 Params []*Param `json:"params,omitempty"` 1671 // PipelineRef: PipelineRef refer to a specific instance of a Pipeline. 1672 PipelineRef *PipelineRef `json:"pipelineRef,omitempty"` 1673 // PipelineRunStatus: Pipelinerun status the user can provide. Used for 1674 // cancellation. 1675 // 1676 // Possible values: 1677 // "PIPELINE_RUN_STATUS_UNSPECIFIED" - Default enum type; should not be used. 1678 // "PIPELINE_RUN_CANCELLED" - Cancelled status. 1679 PipelineRunStatus string `json:"pipelineRunStatus,omitempty"` 1680 // PipelineSpec: PipelineSpec defines the desired state of Pipeline. 1681 PipelineSpec *PipelineSpec `json:"pipelineSpec,omitempty"` 1682 // PipelineSpecYaml: Output only. Inline pipelineSpec yaml string, used by 1683 // workflow run requests. 1684 PipelineSpecYaml string `json:"pipelineSpecYaml,omitempty"` 1685 // Provenance: Optional. Provenance configuration. 1686 Provenance *Provenance `json:"provenance,omitempty"` 1687 // Record: Output only. The `Record` of this `PipelineRun`. Format: 1688 // `projects/{project}/locations/{location}/results/{result_id}/records/{record_ 1689 // id}` 1690 Record string `json:"record,omitempty"` 1691 // ResolvedPipelineSpec: Output only. The exact PipelineSpec used to 1692 // instantiate the run. 1693 ResolvedPipelineSpec *PipelineSpec `json:"resolvedPipelineSpec,omitempty"` 1694 // Results: Optional. Output only. List of results written out by the 1695 // pipeline's containers 1696 Results []*PipelineRunResult `json:"results,omitempty"` 1697 // Security: Optional. Security configuration. 1698 Security *Security `json:"security,omitempty"` 1699 // ServiceAccount: Service account used in the Pipeline. Deprecated; please use 1700 // security.service_account instead. 1701 ServiceAccount string `json:"serviceAccount,omitempty"` 1702 // SkippedTasks: Output only. List of tasks that were skipped due to when 1703 // expressions evaluating to false. 1704 SkippedTasks []*SkippedTask `json:"skippedTasks,omitempty"` 1705 // StartTime: Output only. Time the pipeline is actually started. 1706 StartTime string `json:"startTime,omitempty"` 1707 // Timeouts: Time after which the Pipeline times out. Currently three keys are 1708 // accepted in the map pipeline, tasks and finally with Timeouts.pipeline >= 1709 // Timeouts.tasks + Timeouts.finally 1710 Timeouts *TimeoutFields `json:"timeouts,omitempty"` 1711 // Uid: Output only. A unique identifier for the `PipelineRun`. 1712 Uid string `json:"uid,omitempty"` 1713 // UpdateTime: Output only. Time at which the request to update the 1714 // `PipelineRun` was received. 1715 UpdateTime string `json:"updateTime,omitempty"` 1716 // Worker: Optional. Worker configuration. 1717 Worker *Worker `json:"worker,omitempty"` 1718 // WorkerPool: Output only. The WorkerPool used to run this PipelineRun. 1719 WorkerPool string `json:"workerPool,omitempty"` 1720 // Workflow: Output only. The Workflow used to create this PipelineRun. 1721 Workflow string `json:"workflow,omitempty"` 1722 // Workspaces: Workspaces is a list of WorkspaceBindings from volumes to 1723 // workspaces. 1724 Workspaces []*WorkspaceBinding `json:"workspaces,omitempty"` 1725 // ForceSendFields is a list of field names (e.g. "Annotations") to 1726 // unconditionally include in API requests. By default, fields with empty or 1727 // default values are omitted from API requests. See 1728 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1729 // details. 1730 ForceSendFields []string `json:"-"` 1731 // NullFields is a list of field names (e.g. "Annotations") to include in API 1732 // requests with the JSON null value. By default, fields with empty values are 1733 // omitted from API requests. See 1734 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1735 NullFields []string `json:"-"` 1736 } 1737 1738 func (s *PipelineRun) MarshalJSON() ([]byte, error) { 1739 type NoMethod PipelineRun 1740 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1741 } 1742 1743 // PipelineRunResult: PipelineRunResult used to describe the results of a 1744 // pipeline 1745 type PipelineRunResult struct { 1746 // Name: Output only. Name of the TaskRun 1747 Name string `json:"name,omitempty"` 1748 // Value: Output only. Value of the result. 1749 Value *ResultValue `json:"value,omitempty"` 1750 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1751 // include in API requests. By default, fields with empty or default values are 1752 // omitted from API requests. See 1753 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1754 // details. 1755 ForceSendFields []string `json:"-"` 1756 // NullFields is a list of field names (e.g. "Name") to include in API requests 1757 // with the JSON null value. By default, fields with empty values are omitted 1758 // from API requests. See 1759 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1760 NullFields []string `json:"-"` 1761 } 1762 1763 func (s *PipelineRunResult) MarshalJSON() ([]byte, error) { 1764 type NoMethod PipelineRunResult 1765 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1766 } 1767 1768 // PipelineSpec: PipelineSpec defines the desired state of Pipeline. 1769 type PipelineSpec struct { 1770 // FinallyTasks: List of Tasks that execute just before leaving the Pipeline 1771 // i.e. either after all Tasks are finished executing successfully or after a 1772 // failure which would result in ending the Pipeline. 1773 FinallyTasks []*PipelineTask `json:"finallyTasks,omitempty"` 1774 // GeneratedYaml: Output only. auto-generated yaml that is output only for 1775 // display purpose for workflows using pipeline_spec, used by UI/gcloud cli for 1776 // Workflows. 1777 GeneratedYaml string `json:"generatedYaml,omitempty"` 1778 // Params: List of parameters. 1779 Params []*ParamSpec `json:"params,omitempty"` 1780 // Results: Optional. Output only. List of results written out by the 1781 // pipeline's containers 1782 Results []*PipelineResult `json:"results,omitempty"` 1783 // Tasks: List of Tasks that execute when this Pipeline is run. 1784 Tasks []*PipelineTask `json:"tasks,omitempty"` 1785 // Workspaces: Workspaces declares a set of named workspaces that are expected 1786 // to be provided by a PipelineRun. 1787 Workspaces []*PipelineWorkspaceDeclaration `json:"workspaces,omitempty"` 1788 // ForceSendFields is a list of field names (e.g. "FinallyTasks") to 1789 // unconditionally include in API requests. By default, fields with empty or 1790 // default values are omitted from API requests. See 1791 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1792 // details. 1793 ForceSendFields []string `json:"-"` 1794 // NullFields is a list of field names (e.g. "FinallyTasks") to include in API 1795 // requests with the JSON null value. By default, fields with empty values are 1796 // omitted from API requests. See 1797 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1798 NullFields []string `json:"-"` 1799 } 1800 1801 func (s *PipelineSpec) MarshalJSON() ([]byte, error) { 1802 type NoMethod PipelineSpec 1803 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1804 } 1805 1806 // PipelineTask: PipelineTask defines a task in a Pipeline. 1807 type PipelineTask struct { 1808 // Name: Name of the task. 1809 Name string `json:"name,omitempty"` 1810 // Params: Params is a list of parameter names and values. 1811 Params []*Param `json:"params,omitempty"` 1812 // Retries: Retries represents how many times this task should be retried in 1813 // case of task failure. 1814 Retries int64 `json:"retries,omitempty"` 1815 // RunAfter: RunAfter is the list of PipelineTask names that should be executed 1816 // before this Task executes. (Used to force a specific ordering in graph 1817 // execution.) 1818 RunAfter []string `json:"runAfter,omitempty"` 1819 // TaskRef: Reference to a specific instance of a task. 1820 TaskRef *TaskRef `json:"taskRef,omitempty"` 1821 // TaskSpec: Spec to instantiate this TaskRun. 1822 TaskSpec *EmbeddedTask `json:"taskSpec,omitempty"` 1823 // Timeout: Time after which the TaskRun times out. Defaults to 1 hour. 1824 // Specified TaskRun timeout should be less than 24h. 1825 Timeout string `json:"timeout,omitempty"` 1826 // WhenExpressions: Conditions that need to be true for the task to run. 1827 WhenExpressions []*WhenExpression `json:"whenExpressions,omitempty"` 1828 // Workspaces: Workspaces maps workspaces from the pipeline spec to the 1829 // workspaces declared in the Task. 1830 Workspaces []*WorkspacePipelineTaskBinding `json:"workspaces,omitempty"` 1831 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 1832 // include in API requests. By default, fields with empty or default values are 1833 // omitted from API requests. See 1834 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1835 // details. 1836 ForceSendFields []string `json:"-"` 1837 // NullFields is a list of field names (e.g. "Name") to include in API requests 1838 // with the JSON null value. By default, fields with empty values are omitted 1839 // from API requests. See 1840 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1841 NullFields []string `json:"-"` 1842 } 1843 1844 func (s *PipelineTask) MarshalJSON() ([]byte, error) { 1845 type NoMethod PipelineTask 1846 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1847 } 1848 1849 // PipelineWorkspaceDeclaration: Workspaces declares a set of named workspaces 1850 // that are expected to be provided by a PipelineRun. 1851 type PipelineWorkspaceDeclaration struct { 1852 // Description: Description is a human readable string describing how the 1853 // workspace will be used in the Pipeline. 1854 Description string `json:"description,omitempty"` 1855 // Name: Name is the name of a workspace to be provided by a PipelineRun. 1856 Name string `json:"name,omitempty"` 1857 // Optional: Optional marks a Workspace as not being required in PipelineRuns. 1858 // By default this field is false and so declared workspaces are required. 1859 Optional bool `json:"optional,omitempty"` 1860 // ForceSendFields is a list of field names (e.g. "Description") to 1861 // unconditionally include in API requests. By default, fields with empty or 1862 // default values are omitted from API requests. See 1863 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1864 // details. 1865 ForceSendFields []string `json:"-"` 1866 // NullFields is a list of field names (e.g. "Description") to include in API 1867 // requests with the JSON null value. By default, fields with empty values are 1868 // omitted from API requests. See 1869 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1870 NullFields []string `json:"-"` 1871 } 1872 1873 func (s *PipelineWorkspaceDeclaration) MarshalJSON() ([]byte, error) { 1874 type NoMethod PipelineWorkspaceDeclaration 1875 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1876 } 1877 1878 // Policy: An Identity and Access Management (IAM) policy, which specifies 1879 // access controls for Google Cloud resources. A `Policy` is a collection of 1880 // `bindings`. A `binding` binds one or more `members`, or principals, to a 1881 // single `role`. Principals can be user accounts, service accounts, Google 1882 // groups, and domains (such as G Suite). A `role` is a named list of 1883 // permissions; each `role` can be an IAM predefined role or a user-created 1884 // custom role. For some types of Google Cloud resources, a `binding` can also 1885 // specify a `condition`, which is a logical expression that allows access to a 1886 // resource only if the expression evaluates to `true`. A condition can add 1887 // constraints based on attributes of the request, the resource, or both. To 1888 // learn which resources support conditions in their IAM policies, see the IAM 1889 // documentation 1890 // (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON 1891 // example:** ``` { "bindings": [ { "role": 1892 // "roles/resourcemanager.organizationAdmin", "members": [ 1893 // "user:mike@example.com", "group:admins@example.com", "domain:google.com", 1894 // "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": 1895 // "roles/resourcemanager.organizationViewer", "members": [ 1896 // "user:eve@example.com" ], "condition": { "title": "expirable access", 1897 // "description": "Does not grant access after Sep 2020", "expression": 1898 // "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": 1899 // "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - 1900 // members: - user:mike@example.com - group:admins@example.com - 1901 // domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com 1902 // role: roles/resourcemanager.organizationAdmin - members: - 1903 // user:eve@example.com role: roles/resourcemanager.organizationViewer 1904 // condition: title: expirable access description: Does not grant access after 1905 // Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') 1906 // etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, 1907 // see the IAM documentation (https://cloud.google.com/iam/docs/). 1908 type Policy struct { 1909 // AuditConfigs: Specifies cloud audit logging configuration for this policy. 1910 AuditConfigs []*AuditConfig `json:"auditConfigs,omitempty"` 1911 // Bindings: Associates a list of `members`, or principals, with a `role`. 1912 // Optionally, may specify a `condition` that determines how and when the 1913 // `bindings` are applied. Each of the `bindings` must contain at least one 1914 // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; 1915 // up to 250 of these principals can be Google groups. Each occurrence of a 1916 // principal counts towards these limits. For example, if the `bindings` grant 1917 // 50 different roles to `user:alice@example.com`, and not to any other 1918 // principal, then you can add another 1,450 principals to the `bindings` in 1919 // the `Policy`. 1920 Bindings []*Binding `json:"bindings,omitempty"` 1921 // Etag: `etag` is used for optimistic concurrency control as a way to help 1922 // prevent simultaneous updates of a policy from overwriting each other. It is 1923 // strongly suggested that systems make use of the `etag` in the 1924 // read-modify-write cycle to perform policy updates in order to avoid race 1925 // conditions: An `etag` is returned in the response to `getIamPolicy`, and 1926 // systems are expected to put that etag in the request to `setIamPolicy` to 1927 // ensure that their change will be applied to the same version of the policy. 1928 // **Important:** If you use IAM Conditions, you must include the `etag` field 1929 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 1930 // you to overwrite a version `3` policy with a version `1` policy, and all of 1931 // the conditions in the version `3` policy are lost. 1932 Etag string `json:"etag,omitempty"` 1933 // Version: Specifies the format of the policy. Valid values are `0`, `1`, and 1934 // `3`. Requests that specify an invalid value are rejected. Any operation that 1935 // affects conditional role bindings must specify version `3`. This requirement 1936 // applies to the following operations: * Getting a policy that includes a 1937 // conditional role binding * Adding a conditional role binding to a policy * 1938 // Changing a conditional role binding in a policy * Removing any role binding, 1939 // with or without a condition, from a policy that includes conditions 1940 // **Important:** If you use IAM Conditions, you must include the `etag` field 1941 // whenever you call `setIamPolicy`. If you omit this field, then IAM allows 1942 // you to overwrite a version `3` policy with a version `1` policy, and all of 1943 // the conditions in the version `3` policy are lost. If a policy does not 1944 // include any conditions, operations on that policy may specify any valid 1945 // version or leave the field unset. To learn which resources support 1946 // conditions in their IAM policies, see the IAM documentation 1947 // (https://cloud.google.com/iam/help/conditions/resource-policies). 1948 Version int64 `json:"version,omitempty"` 1949 1950 // ServerResponse contains the HTTP response code and headers from the server. 1951 googleapi.ServerResponse `json:"-"` 1952 // ForceSendFields is a list of field names (e.g. "AuditConfigs") to 1953 // unconditionally include in API requests. By default, fields with empty or 1954 // default values are omitted from API requests. See 1955 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1956 // details. 1957 ForceSendFields []string `json:"-"` 1958 // NullFields is a list of field names (e.g. "AuditConfigs") to include in API 1959 // requests with the JSON null value. By default, fields with empty values are 1960 // omitted from API requests. See 1961 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1962 NullFields []string `json:"-"` 1963 } 1964 1965 func (s *Policy) MarshalJSON() ([]byte, error) { 1966 type NoMethod Policy 1967 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1968 } 1969 1970 // Probe: Probe describes a health check to be performed against a container to 1971 // determine whether it is alive or ready to receive traffic. 1972 type Probe struct { 1973 // Exec: Optional. Exec specifies the action to take. +optional 1974 Exec *ExecAction `json:"exec,omitempty"` 1975 // PeriodSeconds: Optional. How often (in seconds) to perform the probe. 1976 // Default to 10 seconds. Minimum value is 1. +optional 1977 PeriodSeconds int64 `json:"periodSeconds,omitempty"` 1978 // ForceSendFields is a list of field names (e.g. "Exec") to unconditionally 1979 // include in API requests. By default, fields with empty or default values are 1980 // omitted from API requests. See 1981 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 1982 // details. 1983 ForceSendFields []string `json:"-"` 1984 // NullFields is a list of field names (e.g. "Exec") to include in API requests 1985 // with the JSON null value. By default, fields with empty values are omitted 1986 // from API requests. See 1987 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 1988 NullFields []string `json:"-"` 1989 } 1990 1991 func (s *Probe) MarshalJSON() ([]byte, error) { 1992 type NoMethod Probe 1993 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 1994 } 1995 1996 // PropertySpec: PropertySpec holds information about a property in an object. 1997 type PropertySpec struct { 1998 // Type: A type for the object. 1999 // 2000 // Possible values: 2001 // "TYPE_UNSPECIFIED" - Default enum type; should not be used. 2002 // "STRING" - Default 2003 Type string `json:"type,omitempty"` 2004 // ForceSendFields is a list of field names (e.g. "Type") to unconditionally 2005 // include in API requests. By default, fields with empty or default values are 2006 // omitted from API requests. See 2007 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2008 // details. 2009 ForceSendFields []string `json:"-"` 2010 // NullFields is a list of field names (e.g. "Type") to include in API requests 2011 // with the JSON null value. By default, fields with empty values are omitted 2012 // from API requests. See 2013 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2014 NullFields []string `json:"-"` 2015 } 2016 2017 func (s *PropertySpec) MarshalJSON() ([]byte, error) { 2018 type NoMethod PropertySpec 2019 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2020 } 2021 2022 // Provenance: Provenance configuration. 2023 type Provenance struct { 2024 // Enabled: Optional. Provenance push mode. 2025 // 2026 // Possible values: 2027 // "ENABLED_UNSPECIFIED" - Default to disabled (before AA regionalization), 2028 // optimistic after 2029 // "REQUIRED" - Provenance failures would fail the run 2030 // "OPTIMISTIC" - GCB will attempt to push to artifact analaysis and build 2031 // state would not be impacted by the push failures. 2032 // "DISABLED" - Disable the provenance push entirely. 2033 Enabled string `json:"enabled,omitempty"` 2034 // Region: Optional. Provenance region. 2035 // 2036 // Possible values: 2037 // "REGION_UNSPECIFIED" - The PipelineRun/TaskRun/Workflow will be rejected. 2038 // Update this comment to push to the same region as the run in Artifact 2039 // Analysis when it's regionalized. 2040 // "GLOBAL" - Push provenance to Artifact Analysis in global region. 2041 Region string `json:"region,omitempty"` 2042 // Storage: Optional. Where provenance is stored. 2043 // 2044 // Possible values: 2045 // "STORAGE_UNSPECIFIED" - Default PREFER_ARTIFACT_PROJECT. 2046 // "PREFER_ARTIFACT_PROJECT" - GCB will attempt to push provenance to the 2047 // artifact project. If it is not available, fallback to build project. 2048 // "ARTIFACT_PROJECT_ONLY" - Only push to artifact project. 2049 // "BUILD_PROJECT_ONLY" - Only push to build project. 2050 Storage string `json:"storage,omitempty"` 2051 // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally 2052 // include in API requests. By default, fields with empty or default values are 2053 // omitted from API requests. See 2054 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2055 // details. 2056 ForceSendFields []string `json:"-"` 2057 // NullFields is a list of field names (e.g. "Enabled") to include in API 2058 // requests with the JSON null value. By default, fields with empty values are 2059 // omitted from API requests. See 2060 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2061 NullFields []string `json:"-"` 2062 } 2063 2064 func (s *Provenance) MarshalJSON() ([]byte, error) { 2065 type NoMethod Provenance 2066 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2067 } 2068 2069 // Repository: A repository associated to a parent connection. 2070 type Repository struct { 2071 // Annotations: Allows clients to store small amounts of arbitrary data. 2072 Annotations map[string]string `json:"annotations,omitempty"` 2073 // CreateTime: Output only. Server assigned timestamp for when the connection 2074 // was created. 2075 CreateTime string `json:"createTime,omitempty"` 2076 // Etag: This checksum is computed by the server based on the value of other 2077 // fields, and may be sent on update and delete requests to ensure the client 2078 // has an up-to-date value before proceeding. 2079 Etag string `json:"etag,omitempty"` 2080 // Name: Immutable. Resource name of the repository, in the format 2081 // `projects/*/locations/*/connections/*/repositories/*`. 2082 Name string `json:"name,omitempty"` 2083 // RemoteUri: Required. Git Clone HTTPS URI. 2084 RemoteUri string `json:"remoteUri,omitempty"` 2085 // UpdateTime: Output only. Server assigned timestamp for when the connection 2086 // was updated. 2087 UpdateTime string `json:"updateTime,omitempty"` 2088 // WebhookId: Output only. External ID of the webhook created for the 2089 // repository. 2090 WebhookId string `json:"webhookId,omitempty"` 2091 2092 // ServerResponse contains the HTTP response code and headers from the server. 2093 googleapi.ServerResponse `json:"-"` 2094 // ForceSendFields is a list of field names (e.g. "Annotations") to 2095 // unconditionally include in API requests. By default, fields with empty or 2096 // default values are omitted from API requests. See 2097 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2098 // details. 2099 ForceSendFields []string `json:"-"` 2100 // NullFields is a list of field names (e.g. "Annotations") to include in API 2101 // requests with the JSON null value. By default, fields with empty values are 2102 // omitted from API requests. See 2103 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2104 NullFields []string `json:"-"` 2105 } 2106 2107 func (s *Repository) MarshalJSON() ([]byte, error) { 2108 type NoMethod Repository 2109 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2110 } 2111 2112 // ResultValue: ResultValue holds different types of data for a single result. 2113 type ResultValue struct { 2114 // ArrayVal: Value of the result if type is array. 2115 ArrayVal []string `json:"arrayVal,omitempty"` 2116 // ObjectVal: Value of the result if type is object. 2117 ObjectVal map[string]string `json:"objectVal,omitempty"` 2118 // StringVal: Value of the result if type is string. 2119 StringVal string `json:"stringVal,omitempty"` 2120 // Type: Output only. The type of data that the result holds. 2121 // 2122 // Possible values: 2123 // "TYPE_UNSPECIFIED" - Default enum type; should not be used. 2124 // "STRING" - Default 2125 // "ARRAY" - Array type 2126 // "OBJECT" - Object type 2127 Type string `json:"type,omitempty"` 2128 // ForceSendFields is a list of field names (e.g. "ArrayVal") to 2129 // unconditionally include in API requests. By default, fields with empty or 2130 // default values are omitted from API requests. See 2131 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2132 // details. 2133 ForceSendFields []string `json:"-"` 2134 // NullFields is a list of field names (e.g. "ArrayVal") to include in API 2135 // requests with the JSON null value. By default, fields with empty values are 2136 // omitted from API requests. See 2137 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2138 NullFields []string `json:"-"` 2139 } 2140 2141 func (s *ResultValue) MarshalJSON() ([]byte, error) { 2142 type NoMethod ResultValue 2143 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2144 } 2145 2146 // RunWorkflowCustomOperationMetadata: Represents the custom metadata of the 2147 // RunWorkflow long-running operation. 2148 type RunWorkflowCustomOperationMetadata struct { 2149 // ApiVersion: Output only. API version used to start the operation. 2150 ApiVersion string `json:"apiVersion,omitempty"` 2151 // CreateTime: Output only. The time the operation was created. 2152 CreateTime string `json:"createTime,omitempty"` 2153 // EndTime: Output only. The time the operation finished running. 2154 EndTime string `json:"endTime,omitempty"` 2155 // PipelineRunId: Output only. ID of the pipeline run created by RunWorkflow. 2156 PipelineRunId string `json:"pipelineRunId,omitempty"` 2157 // RequestedCancellation: Output only. Identifies whether the user has 2158 // requested cancellation of the operation. Operations that have successfully 2159 // been cancelled have Operation.error value with a google.rpc.Status.code of 2160 // 1, corresponding to `Code.CANCELLED`. 2161 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 2162 // Target: Output only. Server-defined resource path for the target of the 2163 // operation. 2164 Target string `json:"target,omitempty"` 2165 // Verb: Output only. Name of the verb executed by the operation. 2166 Verb string `json:"verb,omitempty"` 2167 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2168 // unconditionally include in API requests. By default, fields with empty or 2169 // default values are omitted from API requests. See 2170 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2171 // details. 2172 ForceSendFields []string `json:"-"` 2173 // NullFields is a list of field names (e.g. "ApiVersion") to include in API 2174 // requests with the JSON null value. By default, fields with empty values are 2175 // omitted from API requests. See 2176 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2177 NullFields []string `json:"-"` 2178 } 2179 2180 func (s *RunWorkflowCustomOperationMetadata) MarshalJSON() ([]byte, error) { 2181 type NoMethod RunWorkflowCustomOperationMetadata 2182 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2183 } 2184 2185 // SecretVolumeSource: Secret Volume Source. 2186 type SecretVolumeSource struct { 2187 // SecretName: Name of the secret referenced by the WorkspaceBinding. 2188 SecretName string `json:"secretName,omitempty"` 2189 // SecretVersion: Output only. Resource name of the SecretVersion. In format: 2190 // projects/*/secrets/*/versions/* 2191 SecretVersion string `json:"secretVersion,omitempty"` 2192 // ForceSendFields is a list of field names (e.g. "SecretName") to 2193 // unconditionally include in API requests. By default, fields with empty or 2194 // default values are omitted from API requests. See 2195 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2196 // details. 2197 ForceSendFields []string `json:"-"` 2198 // NullFields is a list of field names (e.g. "SecretName") to include in API 2199 // requests with the JSON null value. By default, fields with empty values are 2200 // omitted from API requests. See 2201 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2202 NullFields []string `json:"-"` 2203 } 2204 2205 func (s *SecretVolumeSource) MarshalJSON() ([]byte, error) { 2206 type NoMethod SecretVolumeSource 2207 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2208 } 2209 2210 // Security: Security configuration. 2211 type Security struct { 2212 // PrivilegeMode: Optional. Privilege mode. 2213 // 2214 // Possible values: 2215 // "PRIVILEGE_MODE_UNSPECIFIED" - Default to PRIVILEGED. 2216 // "PRIVILEGED" - Privileged mode. 2217 // "UNPRIVILEGED" - Unprivileged mode. 2218 PrivilegeMode string `json:"privilegeMode,omitempty"` 2219 // ServiceAccount: IAM service account whose credentials will be used at 2220 // runtime. 2221 ServiceAccount string `json:"serviceAccount,omitempty"` 2222 // ForceSendFields is a list of field names (e.g. "PrivilegeMode") to 2223 // unconditionally include in API requests. By default, fields with empty or 2224 // default values are omitted from API requests. See 2225 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2226 // details. 2227 ForceSendFields []string `json:"-"` 2228 // NullFields is a list of field names (e.g. "PrivilegeMode") to include in API 2229 // requests with the JSON null value. By default, fields with empty values are 2230 // omitted from API requests. See 2231 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2232 NullFields []string `json:"-"` 2233 } 2234 2235 func (s *Security) MarshalJSON() ([]byte, error) { 2236 type NoMethod Security 2237 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2238 } 2239 2240 // SecurityContext: Security options the container should be run with. 2241 type SecurityContext struct { 2242 // AllowPrivilegeEscalation: Optional. AllowPrivilegeEscalation controls 2243 // whether a process can gain more privileges than its parent process. This 2244 // bool directly controls if the no_new_privs flag will be set on the container 2245 // process. AllowPrivilegeEscalation is true always when the container is: 1) 2246 // run as Privileged 2) has CAP_SYS_ADMIN Note that this field cannot be set 2247 // when spec.os.name is windows. +optional 2248 AllowPrivilegeEscalation bool `json:"allowPrivilegeEscalation,omitempty"` 2249 // Capabilities: Optional. Adds and removes POSIX capabilities from running 2250 // containers. 2251 Capabilities *Capabilities `json:"capabilities,omitempty"` 2252 // Privileged: Run container in privileged mode. 2253 Privileged bool `json:"privileged,omitempty"` 2254 // RunAsGroup: Optional. The GID to run the entrypoint of the container 2255 // process. Uses runtime default if unset. May also be set in 2256 // PodSecurityContext. If set in both SecurityContext and PodSecurityContext, 2257 // the value specified in SecurityContext takes precedence. Note that this 2258 // field cannot be set when spec.os.name is windows. +optional 2259 RunAsGroup int64 `json:"runAsGroup,omitempty,string"` 2260 // RunAsNonRoot: Optional. Indicates that the container must run as a non-root 2261 // user. If true, the Kubelet will validate the image at runtime to ensure that 2262 // it does not run as UID 0 (root) and fail to start the container if it does. 2263 // If unset or false, no such validation will be performed. May also be set in 2264 // PodSecurityContext. If set in both SecurityContext and PodSecurityContext, 2265 // the value specified in SecurityContext takes precedence. +optional 2266 RunAsNonRoot bool `json:"runAsNonRoot,omitempty"` 2267 // RunAsUser: Optional. The UID to run the entrypoint of the container process. 2268 // Defaults to user specified in image metadata if unspecified. May also be set 2269 // in PodSecurityContext. If set in both SecurityContext and 2270 // PodSecurityContext, the value specified in SecurityContext takes precedence. 2271 // Note that this field cannot be set when spec.os.name is windows. +optional 2272 RunAsUser int64 `json:"runAsUser,omitempty,string"` 2273 // ForceSendFields is a list of field names (e.g. "AllowPrivilegeEscalation") 2274 // to unconditionally include in API requests. By default, fields with empty or 2275 // default values are omitted from API requests. See 2276 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2277 // details. 2278 ForceSendFields []string `json:"-"` 2279 // NullFields is a list of field names (e.g. "AllowPrivilegeEscalation") to 2280 // include in API requests with the JSON null value. By default, fields with 2281 // empty values are omitted from API requests. See 2282 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2283 NullFields []string `json:"-"` 2284 } 2285 2286 func (s *SecurityContext) MarshalJSON() ([]byte, error) { 2287 type NoMethod SecurityContext 2288 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2289 } 2290 2291 // SetIamPolicyRequest: Request message for `SetIamPolicy` method. 2292 type SetIamPolicyRequest struct { 2293 // Policy: REQUIRED: The complete policy to be applied to the `resource`. The 2294 // size of the policy is limited to a few 10s of KB. An empty policy is a valid 2295 // policy but certain Google Cloud services (such as Projects) might reject 2296 // them. 2297 Policy *Policy `json:"policy,omitempty"` 2298 // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to 2299 // modify. Only the fields in the mask will be modified. If no mask is 2300 // provided, the following default mask is used: `paths: "bindings, etag" 2301 UpdateMask string `json:"updateMask,omitempty"` 2302 // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally 2303 // include in API requests. By default, fields with empty or default values are 2304 // omitted from API requests. See 2305 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2306 // details. 2307 ForceSendFields []string `json:"-"` 2308 // NullFields is a list of field names (e.g. "Policy") to include in API 2309 // requests with the JSON null value. By default, fields with empty values are 2310 // omitted from API requests. See 2311 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2312 NullFields []string `json:"-"` 2313 } 2314 2315 func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) { 2316 type NoMethod SetIamPolicyRequest 2317 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2318 } 2319 2320 // Sidecar: Sidecars run alongside the Task's step containers. 2321 type Sidecar struct { 2322 // Args: Arguments to the entrypoint. 2323 Args []string `json:"args,omitempty"` 2324 // Command: Entrypoint array. 2325 Command []string `json:"command,omitempty"` 2326 // Env: List of environment variables to set in the container. 2327 Env []*EnvVar `json:"env,omitempty"` 2328 // Image: Docker image name. 2329 Image string `json:"image,omitempty"` 2330 // Name: Name of the Sidecar. 2331 Name string `json:"name,omitempty"` 2332 // ReadinessProbe: Optional. Periodic probe of Sidecar service readiness. 2333 // Container will be removed from service endpoints if the probe fails. Cannot 2334 // be updated. More info: 2335 // https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes 2336 // +optional 2337 ReadinessProbe *Probe `json:"readinessProbe,omitempty"` 2338 // Script: The contents of an executable file to execute. 2339 Script string `json:"script,omitempty"` 2340 // SecurityContext: Optional. Security options the container should be run 2341 // with. 2342 SecurityContext *SecurityContext `json:"securityContext,omitempty"` 2343 // VolumeMounts: Pod volumes to mount into the container's filesystem. 2344 VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` 2345 // WorkingDir: Container's working directory. 2346 WorkingDir string `json:"workingDir,omitempty"` 2347 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally 2348 // include in API requests. By default, fields with empty or default values are 2349 // omitted from API requests. See 2350 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2351 // details. 2352 ForceSendFields []string `json:"-"` 2353 // NullFields is a list of field names (e.g. "Args") to include in API requests 2354 // with the JSON null value. By default, fields with empty values are omitted 2355 // from API requests. See 2356 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2357 NullFields []string `json:"-"` 2358 } 2359 2360 func (s *Sidecar) MarshalJSON() ([]byte, error) { 2361 type NoMethod Sidecar 2362 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2363 } 2364 2365 // SkippedTask: SkippedTask is used to describe the Tasks that were skipped due 2366 // to their When Expressions evaluating to False. 2367 type SkippedTask struct { 2368 // Name: Name is the Pipeline Task name 2369 Name string `json:"name,omitempty"` 2370 // Reason: Output only. Reason is the cause of the PipelineTask being skipped. 2371 Reason string `json:"reason,omitempty"` 2372 // WhenExpressions: WhenExpressions is the list of checks guarding the 2373 // execution of the PipelineTask 2374 WhenExpressions []*WhenExpression `json:"whenExpressions,omitempty"` 2375 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2376 // include in API requests. By default, fields with empty or default values are 2377 // omitted from API requests. See 2378 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2379 // details. 2380 ForceSendFields []string `json:"-"` 2381 // NullFields is a list of field names (e.g. "Name") to include in API requests 2382 // with the JSON null value. By default, fields with empty values are omitted 2383 // from API requests. See 2384 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2385 NullFields []string `json:"-"` 2386 } 2387 2388 func (s *SkippedTask) MarshalJSON() ([]byte, error) { 2389 type NoMethod SkippedTask 2390 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2391 } 2392 2393 // Status: The `Status` type defines a logical error model that is suitable for 2394 // different programming environments, including REST APIs and RPC APIs. It is 2395 // used by gRPC (https://github.com/grpc). Each `Status` message contains three 2396 // pieces of data: error code, error message, and error details. You can find 2397 // out more about this error model and how to work with it in the API Design 2398 // Guide (https://cloud.google.com/apis/design/errors). 2399 type Status struct { 2400 // Code: The status code, which should be an enum value of google.rpc.Code. 2401 Code int64 `json:"code,omitempty"` 2402 // Details: A list of messages that carry the error details. There is a common 2403 // set of message types for APIs to use. 2404 Details []googleapi.RawMessage `json:"details,omitempty"` 2405 // Message: A developer-facing error message, which should be in English. Any 2406 // user-facing error message should be localized and sent in the 2407 // google.rpc.Status.details field, or localized by the client. 2408 Message string `json:"message,omitempty"` 2409 // ForceSendFields is a list of field names (e.g. "Code") to unconditionally 2410 // include in API requests. By default, fields with empty or default values are 2411 // omitted from API requests. See 2412 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2413 // details. 2414 ForceSendFields []string `json:"-"` 2415 // NullFields is a list of field names (e.g. "Code") to include in API requests 2416 // with the JSON null value. By default, fields with empty values are omitted 2417 // from API requests. See 2418 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2419 NullFields []string `json:"-"` 2420 } 2421 2422 func (s *Status) MarshalJSON() ([]byte, error) { 2423 type NoMethod Status 2424 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2425 } 2426 2427 // Step: Step embeds the Container type, which allows it to include fields not 2428 // provided by Container. 2429 type Step struct { 2430 // Args: Arguments to the entrypoint. 2431 Args []string `json:"args,omitempty"` 2432 // Command: Entrypoint array. 2433 Command []string `json:"command,omitempty"` 2434 // Env: List of environment variables to set in the container. 2435 Env []*EnvVar `json:"env,omitempty"` 2436 // Image: Docker image name. 2437 Image string `json:"image,omitempty"` 2438 // Name: Name of the container specified as a DNS_LABEL. 2439 Name string `json:"name,omitempty"` 2440 // Params: Optional. Optional parameters passed to the StepAction. 2441 Params []*Param `json:"params,omitempty"` 2442 // Ref: Optional. Optional reference to a remote StepAction. 2443 Ref *StepRef `json:"ref,omitempty"` 2444 // Script: The contents of an executable file to execute. 2445 Script string `json:"script,omitempty"` 2446 // SecurityContext: Optional. SecurityContext defines the security options the 2447 // Step should be run with. If set, the fields of SecurityContext override the 2448 // equivalent fields of PodSecurityContext. More info: 2449 // https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ 2450 // +optional 2451 SecurityContext *SecurityContext `json:"securityContext,omitempty"` 2452 // Timeout: Time after which the Step times out. Defaults to never. 2453 Timeout string `json:"timeout,omitempty"` 2454 // VolumeMounts: Pod volumes to mount into the container's filesystem. 2455 VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` 2456 // WorkingDir: Container's working directory. 2457 WorkingDir string `json:"workingDir,omitempty"` 2458 // ForceSendFields is a list of field names (e.g. "Args") to unconditionally 2459 // include in API requests. By default, fields with empty or default values are 2460 // omitted from API requests. See 2461 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2462 // details. 2463 ForceSendFields []string `json:"-"` 2464 // NullFields is a list of field names (e.g. "Args") to include in API requests 2465 // with the JSON null value. By default, fields with empty values are omitted 2466 // from API requests. See 2467 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2468 NullFields []string `json:"-"` 2469 } 2470 2471 func (s *Step) MarshalJSON() ([]byte, error) { 2472 type NoMethod Step 2473 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2474 } 2475 2476 // StepRef: A reference to a remote Step, i.e. a StepAction. 2477 type StepRef struct { 2478 // Name: Optional. Name of the step. 2479 Name string `json:"name,omitempty"` 2480 // Params: Optional. Parameters used to control the resolution. 2481 Params []*Param `json:"params,omitempty"` 2482 // Resolver: Optional. Type of the resolver. 2483 // 2484 // Possible values: 2485 // "RESOLVER_NAME_UNSPECIFIED" - Default enum type; should not be used. 2486 // "BUNDLES" - Bundles resolver. 2487 // https://tekton.dev/docs/pipelines/bundle-resolver/ 2488 // "GCB_REPO" - GCB repo resolver. 2489 // "GIT" - Simple Git resolver. 2490 // https://tekton.dev/docs/pipelines/git-resolver/ 2491 // "DEVELOPER_CONNECT" - Developer Connect resolver. 2492 Resolver string `json:"resolver,omitempty"` 2493 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2494 // include in API requests. By default, fields with empty or default values are 2495 // omitted from API requests. See 2496 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2497 // details. 2498 ForceSendFields []string `json:"-"` 2499 // NullFields is a list of field names (e.g. "Name") to include in API requests 2500 // with the JSON null value. By default, fields with empty values are omitted 2501 // from API requests. See 2502 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2503 NullFields []string `json:"-"` 2504 } 2505 2506 func (s *StepRef) MarshalJSON() ([]byte, error) { 2507 type NoMethod StepRef 2508 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2509 } 2510 2511 // StepTemplate: StepTemplate can be used as the basis for all step containers 2512 // within the Task, so that the steps inherit settings on the base container. 2513 type StepTemplate struct { 2514 // Env: Optional. List of environment variables to set in the Step. Cannot be 2515 // updated. 2516 Env []*EnvVar `json:"env,omitempty"` 2517 // VolumeMounts: Optional. Pod volumes to mount into the container's 2518 // filesystem. 2519 VolumeMounts []*VolumeMount `json:"volumeMounts,omitempty"` 2520 // ForceSendFields is a list of field names (e.g. "Env") to unconditionally 2521 // include in API requests. By default, fields with empty or default values are 2522 // omitted from API requests. See 2523 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2524 // details. 2525 ForceSendFields []string `json:"-"` 2526 // NullFields is a list of field names (e.g. "Env") to include in API requests 2527 // with the JSON null value. By default, fields with empty values are omitted 2528 // from API requests. See 2529 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2530 NullFields []string `json:"-"` 2531 } 2532 2533 func (s *StepTemplate) MarshalJSON() ([]byte, error) { 2534 type NoMethod StepTemplate 2535 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2536 } 2537 2538 // TaskRef: TaskRef can be used to refer to a specific instance of a task. 2539 // PipelineRef can be used to refer to a specific instance of a Pipeline. 2540 type TaskRef struct { 2541 // Name: Name of the task. 2542 Name string `json:"name,omitempty"` 2543 // Params: Params contains the parameters used to identify the referenced 2544 // Tekton resource. Example entries might include "repo" or "path" but the set 2545 // of params ultimately depends on the chosen resolver. 2546 Params []*Param `json:"params,omitempty"` 2547 // Resolver: Resolver is the name of the resolver that should perform 2548 // resolution of the referenced Tekton resource. 2549 // 2550 // Possible values: 2551 // "RESOLVER_NAME_UNSPECIFIED" - Default enum type; should not be used. 2552 // "BUNDLES" - Bundles resolver. 2553 // https://tekton.dev/docs/pipelines/bundle-resolver/ 2554 // "GCB_REPO" - GCB repo resolver. 2555 // "GIT" - Simple Git resolver. 2556 // https://tekton.dev/docs/pipelines/git-resolver/ 2557 // "DEVELOPER_CONNECT" - Developer Connect resolver. 2558 Resolver string `json:"resolver,omitempty"` 2559 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2560 // include in API requests. By default, fields with empty or default values are 2561 // omitted from API requests. See 2562 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2563 // details. 2564 ForceSendFields []string `json:"-"` 2565 // NullFields is a list of field names (e.g. "Name") to include in API requests 2566 // with the JSON null value. By default, fields with empty values are omitted 2567 // from API requests. See 2568 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2569 NullFields []string `json:"-"` 2570 } 2571 2572 func (s *TaskRef) MarshalJSON() ([]byte, error) { 2573 type NoMethod TaskRef 2574 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2575 } 2576 2577 // TaskResult: TaskResult is used to describe the results of a task. 2578 type TaskResult struct { 2579 // Description: Description of the result. 2580 Description string `json:"description,omitempty"` 2581 // Name: Name of the result. 2582 Name string `json:"name,omitempty"` 2583 // Properties: When type is OBJECT, this map holds the names of fields inside 2584 // that object along with the type of data each field holds. 2585 Properties map[string]PropertySpec `json:"properties,omitempty"` 2586 // Type: The type of data that the result holds. 2587 // 2588 // Possible values: 2589 // "TYPE_UNSPECIFIED" - Default enum type; should not be used. 2590 // "STRING" - Default 2591 // "ARRAY" - Array type 2592 // "OBJECT" - Object type 2593 Type string `json:"type,omitempty"` 2594 // Value: Optional. Optionally used to initialize a Task's result with a Step's 2595 // result. 2596 Value *ParamValue `json:"value,omitempty"` 2597 // ForceSendFields is a list of field names (e.g. "Description") to 2598 // unconditionally include in API requests. By default, fields with empty or 2599 // default values are omitted from API requests. See 2600 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2601 // details. 2602 ForceSendFields []string `json:"-"` 2603 // NullFields is a list of field names (e.g. "Description") to include in API 2604 // requests with the JSON null value. By default, fields with empty values are 2605 // omitted from API requests. See 2606 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2607 NullFields []string `json:"-"` 2608 } 2609 2610 func (s *TaskResult) MarshalJSON() ([]byte, error) { 2611 type NoMethod TaskResult 2612 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2613 } 2614 2615 // TaskSpec: TaskSpec contains the Spec to instantiate a TaskRun. 2616 type TaskSpec struct { 2617 // Description: Description of the task. 2618 Description string `json:"description,omitempty"` 2619 // ManagedSidecars: Sidecars that run alongside the Task’s step containers 2620 // that should be added to this Task. 2621 // 2622 // Possible values: 2623 // "MANAGED_SIDECAR_UNSPECIFIED" - Default enum type; should not be used. 2624 // "PRIVILEGED_DOCKER_DAEMON" - Sidecar for a privileged docker daemon. 2625 ManagedSidecars []string `json:"managedSidecars,omitempty"` 2626 // Params: List of parameters. 2627 Params []*ParamSpec `json:"params,omitempty"` 2628 // Results: Values that this Task can output. 2629 Results []*TaskResult `json:"results,omitempty"` 2630 // Sidecars: Sidecars that run alongside the Task's step containers. 2631 Sidecars []*Sidecar `json:"sidecars,omitempty"` 2632 // StepTemplate: Optional. StepTemplate can be used as the basis for all step 2633 // containers within the Task, so that the steps inherit settings on the base 2634 // container. 2635 StepTemplate *StepTemplate `json:"stepTemplate,omitempty"` 2636 // Steps: Steps of the task. 2637 Steps []*Step `json:"steps,omitempty"` 2638 // Volumes: A collection of volumes that are available to mount into steps. 2639 Volumes []*VolumeSource `json:"volumes,omitempty"` 2640 // Workspaces: The volumes that this Task requires. 2641 Workspaces []*WorkspaceDeclaration `json:"workspaces,omitempty"` 2642 // ForceSendFields is a list of field names (e.g. "Description") to 2643 // unconditionally include in API requests. By default, fields with empty or 2644 // default values are omitted from API requests. See 2645 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2646 // details. 2647 ForceSendFields []string `json:"-"` 2648 // NullFields is a list of field names (e.g. "Description") to include in API 2649 // requests with the JSON null value. By default, fields with empty values are 2650 // omitted from API requests. See 2651 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2652 NullFields []string `json:"-"` 2653 } 2654 2655 func (s *TaskSpec) MarshalJSON() ([]byte, error) { 2656 type NoMethod TaskSpec 2657 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2658 } 2659 2660 // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. 2661 type TestIamPermissionsRequest struct { 2662 // Permissions: The set of permissions to check for the `resource`. Permissions 2663 // with wildcards (such as `*` or `storage.*`) are not allowed. For more 2664 // information see IAM Overview 2665 // (https://cloud.google.com/iam/docs/overview#permissions). 2666 Permissions []string `json:"permissions,omitempty"` 2667 // ForceSendFields is a list of field names (e.g. "Permissions") to 2668 // unconditionally include in API requests. By default, fields with empty or 2669 // default values are omitted from API requests. See 2670 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2671 // details. 2672 ForceSendFields []string `json:"-"` 2673 // NullFields is a list of field names (e.g. "Permissions") to include in API 2674 // requests with the JSON null value. By default, fields with empty values are 2675 // omitted from API requests. See 2676 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2677 NullFields []string `json:"-"` 2678 } 2679 2680 func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { 2681 type NoMethod TestIamPermissionsRequest 2682 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2683 } 2684 2685 // TestIamPermissionsResponse: Response message for `TestIamPermissions` 2686 // method. 2687 type TestIamPermissionsResponse struct { 2688 // Permissions: A subset of `TestPermissionsRequest.permissions` that the 2689 // caller is allowed. 2690 Permissions []string `json:"permissions,omitempty"` 2691 2692 // ServerResponse contains the HTTP response code and headers from the server. 2693 googleapi.ServerResponse `json:"-"` 2694 // ForceSendFields is a list of field names (e.g. "Permissions") to 2695 // unconditionally include in API requests. By default, fields with empty or 2696 // default values are omitted from API requests. See 2697 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2698 // details. 2699 ForceSendFields []string `json:"-"` 2700 // NullFields is a list of field names (e.g. "Permissions") to include in API 2701 // requests with the JSON null value. By default, fields with empty values are 2702 // omitted from API requests. See 2703 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2704 NullFields []string `json:"-"` 2705 } 2706 2707 func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { 2708 type NoMethod TestIamPermissionsResponse 2709 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2710 } 2711 2712 // TimeoutFields: TimeoutFields allows granular specification of pipeline, 2713 // task, and finally timeouts 2714 type TimeoutFields struct { 2715 // Finally: Finally sets the maximum allowed duration of this pipeline's 2716 // finally 2717 Finally string `json:"finally,omitempty"` 2718 // Pipeline: Pipeline sets the maximum allowed duration for execution of the 2719 // entire pipeline. The sum of individual timeouts for tasks and finally must 2720 // not exceed this value. 2721 Pipeline string `json:"pipeline,omitempty"` 2722 // Tasks: Tasks sets the maximum allowed duration of this pipeline's tasks 2723 Tasks string `json:"tasks,omitempty"` 2724 // ForceSendFields is a list of field names (e.g. "Finally") to unconditionally 2725 // include in API requests. By default, fields with empty or default values are 2726 // omitted from API requests. See 2727 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2728 // details. 2729 ForceSendFields []string `json:"-"` 2730 // NullFields is a list of field names (e.g. "Finally") to include in API 2731 // requests with the JSON null value. By default, fields with empty values are 2732 // omitted from API requests. See 2733 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2734 NullFields []string `json:"-"` 2735 } 2736 2737 func (s *TimeoutFields) MarshalJSON() ([]byte, error) { 2738 type NoMethod TimeoutFields 2739 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2740 } 2741 2742 // UserCredential: Represents a personal access token that authorized the 2743 // Connection, and associated metadata. 2744 type UserCredential struct { 2745 // UserTokenSecretVersion: Required. A SecretManager resource containing the 2746 // user token that authorizes the Cloud Build connection. Format: 2747 // `projects/*/secrets/*/versions/*`. 2748 UserTokenSecretVersion string `json:"userTokenSecretVersion,omitempty"` 2749 // Username: Output only. The username associated to this token. 2750 Username string `json:"username,omitempty"` 2751 // ForceSendFields is a list of field names (e.g. "UserTokenSecretVersion") to 2752 // unconditionally include in API requests. By default, fields with empty or 2753 // default values are omitted from API requests. See 2754 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2755 // details. 2756 ForceSendFields []string `json:"-"` 2757 // NullFields is a list of field names (e.g. "UserTokenSecretVersion") to 2758 // include in API requests with the JSON null value. By default, fields with 2759 // empty values are omitted from API requests. See 2760 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2761 NullFields []string `json:"-"` 2762 } 2763 2764 func (s *UserCredential) MarshalJSON() ([]byte, error) { 2765 type NoMethod UserCredential 2766 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2767 } 2768 2769 // VolumeMount: Pod volumes to mount into the container's filesystem. 2770 type VolumeMount struct { 2771 // MountPath: Path within the container at which the volume should be mounted. 2772 // Must not contain ':'. 2773 MountPath string `json:"mountPath,omitempty"` 2774 // Name: Name of the volume. 2775 Name string `json:"name,omitempty"` 2776 // ReadOnly: Mounted read-only if true, read-write otherwise (false or 2777 // unspecified). 2778 ReadOnly bool `json:"readOnly,omitempty"` 2779 // SubPath: Path within the volume from which the container's volume should be 2780 // mounted. Defaults to "" (volume's root). 2781 SubPath string `json:"subPath,omitempty"` 2782 // SubPathExpr: Expanded path within the volume from which the container's 2783 // volume should be mounted. Behaves similarly to SubPath but environment 2784 // variable references $(VAR_NAME) are expanded using the container's 2785 // environment. Defaults to "" (volume's root). 2786 SubPathExpr string `json:"subPathExpr,omitempty"` 2787 // ForceSendFields is a list of field names (e.g. "MountPath") to 2788 // unconditionally include in API requests. By default, fields with empty or 2789 // default values are omitted from API requests. See 2790 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2791 // details. 2792 ForceSendFields []string `json:"-"` 2793 // NullFields is a list of field names (e.g. "MountPath") to include in API 2794 // requests with the JSON null value. By default, fields with empty values are 2795 // omitted from API requests. See 2796 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2797 NullFields []string `json:"-"` 2798 } 2799 2800 func (s *VolumeMount) MarshalJSON() ([]byte, error) { 2801 type NoMethod VolumeMount 2802 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2803 } 2804 2805 // VolumeSource: Volumes available to mount. 2806 type VolumeSource struct { 2807 // EmptyDir: A temporary directory that shares a pod's lifetime. 2808 EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty"` 2809 // Name: Name of the Volume. Must be a DNS_LABEL and unique within the pod. 2810 // More info: 2811 // https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names 2812 Name string `json:"name,omitempty"` 2813 // ForceSendFields is a list of field names (e.g. "EmptyDir") to 2814 // unconditionally include in API requests. By default, fields with empty or 2815 // default values are omitted from API requests. See 2816 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2817 // details. 2818 ForceSendFields []string `json:"-"` 2819 // NullFields is a list of field names (e.g. "EmptyDir") to include in API 2820 // requests with the JSON null value. By default, fields with empty values are 2821 // omitted from API requests. See 2822 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2823 NullFields []string `json:"-"` 2824 } 2825 2826 func (s *VolumeSource) MarshalJSON() ([]byte, error) { 2827 type NoMethod VolumeSource 2828 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2829 } 2830 2831 // WhenExpression: Conditions that need to be true for the task to run. 2832 type WhenExpression struct { 2833 // ExpressionOperator: Operator that represents an Input's relationship to the 2834 // values 2835 // 2836 // Possible values: 2837 // "EXPRESSION_OPERATOR_UNSPECIFIED" - Default enum type; should not be used. 2838 // "IN" - Input is in values. 2839 // "NOT_IN" - Input is not in values. 2840 ExpressionOperator string `json:"expressionOperator,omitempty"` 2841 // Input: Input is the string for guard checking which can be a static input or 2842 // an output from a parent Task. 2843 Input string `json:"input,omitempty"` 2844 // Values: Values is an array of strings, which is compared against the input, 2845 // for guard checking. 2846 Values []string `json:"values,omitempty"` 2847 // ForceSendFields is a list of field names (e.g. "ExpressionOperator") to 2848 // unconditionally include in API requests. By default, fields with empty or 2849 // default values are omitted from API requests. See 2850 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2851 // details. 2852 ForceSendFields []string `json:"-"` 2853 // NullFields is a list of field names (e.g. "ExpressionOperator") to include 2854 // in API requests with the JSON null value. By default, fields with empty 2855 // values are omitted from API requests. See 2856 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2857 NullFields []string `json:"-"` 2858 } 2859 2860 func (s *WhenExpression) MarshalJSON() ([]byte, error) { 2861 type NoMethod WhenExpression 2862 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2863 } 2864 2865 // Worker: Configuration for the worker. 2866 type Worker struct { 2867 // MachineType: Optional. Machine type of a worker, default is "e2-standard-2". 2868 MachineType string `json:"machineType,omitempty"` 2869 // ForceSendFields is a list of field names (e.g. "MachineType") to 2870 // unconditionally include in API requests. By default, fields with empty or 2871 // default values are omitted from API requests. See 2872 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2873 // details. 2874 ForceSendFields []string `json:"-"` 2875 // NullFields is a list of field names (e.g. "MachineType") to include in API 2876 // requests with the JSON null value. By default, fields with empty values are 2877 // omitted from API requests. See 2878 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2879 NullFields []string `json:"-"` 2880 } 2881 2882 func (s *Worker) MarshalJSON() ([]byte, error) { 2883 type NoMethod Worker 2884 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2885 } 2886 2887 // WorkspaceBinding: WorkspaceBinding maps a workspace to a Volume. PipelineRef 2888 // can be used to refer to a specific instance of a Pipeline. 2889 type WorkspaceBinding struct { 2890 // Name: Name of the workspace. 2891 Name string `json:"name,omitempty"` 2892 // Secret: Secret Volume Source. 2893 Secret *SecretVolumeSource `json:"secret,omitempty"` 2894 // SubPath: Optional. SubPath is optionally a directory on the volume which 2895 // should be used for this binding (i.e. the volume will be mounted at this sub 2896 // directory). +optional 2897 SubPath string `json:"subPath,omitempty"` 2898 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2899 // include in API requests. By default, fields with empty or default values are 2900 // omitted from API requests. See 2901 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2902 // details. 2903 ForceSendFields []string `json:"-"` 2904 // NullFields is a list of field names (e.g. "Name") to include in API requests 2905 // with the JSON null value. By default, fields with empty values are omitted 2906 // from API requests. See 2907 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2908 NullFields []string `json:"-"` 2909 } 2910 2911 func (s *WorkspaceBinding) MarshalJSON() ([]byte, error) { 2912 type NoMethod WorkspaceBinding 2913 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2914 } 2915 2916 // WorkspaceDeclaration: WorkspaceDeclaration is a declaration of a volume that 2917 // a Task requires. 2918 type WorkspaceDeclaration struct { 2919 // Description: Description is a human readable description of this volume. 2920 Description string `json:"description,omitempty"` 2921 // MountPath: MountPath overrides the directory that the volume will be made 2922 // available at. 2923 MountPath string `json:"mountPath,omitempty"` 2924 // Name: Name is the name by which you can bind the volume at runtime. 2925 Name string `json:"name,omitempty"` 2926 // Optional: Optional. Optional marks a Workspace as not being required in 2927 // TaskRuns. By default this field is false and so declared workspaces are 2928 // required. 2929 Optional bool `json:"optional,omitempty"` 2930 // ReadOnly: ReadOnly dictates whether a mounted volume is writable. 2931 ReadOnly bool `json:"readOnly,omitempty"` 2932 // ForceSendFields is a list of field names (e.g. "Description") to 2933 // unconditionally include in API requests. By default, fields with empty or 2934 // default values are omitted from API requests. See 2935 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2936 // details. 2937 ForceSendFields []string `json:"-"` 2938 // NullFields is a list of field names (e.g. "Description") to include in API 2939 // requests with the JSON null value. By default, fields with empty values are 2940 // omitted from API requests. See 2941 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2942 NullFields []string `json:"-"` 2943 } 2944 2945 func (s *WorkspaceDeclaration) MarshalJSON() ([]byte, error) { 2946 type NoMethod WorkspaceDeclaration 2947 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2948 } 2949 2950 // WorkspacePipelineTaskBinding: WorkspacePipelineTaskBinding maps workspaces 2951 // from the PipelineSpec to the workspaces declared in the Task. 2952 type WorkspacePipelineTaskBinding struct { 2953 // Name: Name of the workspace as declared by the task. 2954 Name string `json:"name,omitempty"` 2955 // SubPath: Optional. SubPath is optionally a directory on the volume which 2956 // should be used for this binding (i.e. the volume will be mounted at this sub 2957 // directory). +optional 2958 SubPath string `json:"subPath,omitempty"` 2959 // Workspace: Name of the workspace declared by the pipeline. 2960 Workspace string `json:"workspace,omitempty"` 2961 // ForceSendFields is a list of field names (e.g. "Name") to unconditionally 2962 // include in API requests. By default, fields with empty or default values are 2963 // omitted from API requests. See 2964 // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more 2965 // details. 2966 ForceSendFields []string `json:"-"` 2967 // NullFields is a list of field names (e.g. "Name") to include in API requests 2968 // with the JSON null value. By default, fields with empty values are omitted 2969 // from API requests. See 2970 // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. 2971 NullFields []string `json:"-"` 2972 } 2973 2974 func (s *WorkspacePipelineTaskBinding) MarshalJSON() ([]byte, error) { 2975 type NoMethod WorkspacePipelineTaskBinding 2976 return gensupport.MarshalJSON(NoMethod(*s), s.ForceSendFields, s.NullFields) 2977 } 2978 2979 type ProjectsLocationsGetCall struct { 2980 s *Service 2981 name string 2982 urlParams_ gensupport.URLParams 2983 ifNoneMatch_ string 2984 ctx_ context.Context 2985 header_ http.Header 2986 } 2987 2988 // Get: Gets information about a location. 2989 // 2990 // - name: Resource name for the location. 2991 func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { 2992 c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 2993 c.name = name 2994 return c 2995 } 2996 2997 // Fields allows partial responses to be retrieved. See 2998 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 2999 // details. 3000 func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { 3001 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3002 return c 3003 } 3004 3005 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3006 // object's ETag matches the given value. This is useful for getting updates 3007 // only after the object has changed since the last request. 3008 func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { 3009 c.ifNoneMatch_ = entityTag 3010 return c 3011 } 3012 3013 // Context sets the context to be used in this call's Do method. 3014 func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { 3015 c.ctx_ = ctx 3016 return c 3017 } 3018 3019 // Header returns a http.Header that can be modified by the caller to add 3020 // headers to the request. 3021 func (c *ProjectsLocationsGetCall) Header() http.Header { 3022 if c.header_ == nil { 3023 c.header_ = make(http.Header) 3024 } 3025 return c.header_ 3026 } 3027 3028 func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) { 3029 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3030 if c.ifNoneMatch_ != "" { 3031 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3032 } 3033 var body io.Reader = nil 3034 c.urlParams_.Set("alt", alt) 3035 c.urlParams_.Set("prettyPrint", "false") 3036 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 3037 urls += "?" + c.urlParams_.Encode() 3038 req, err := http.NewRequest("GET", urls, body) 3039 if err != nil { 3040 return nil, err 3041 } 3042 req.Header = reqHeaders 3043 googleapi.Expand(req.URL, map[string]string{ 3044 "name": c.name, 3045 }) 3046 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3047 } 3048 3049 // Do executes the "cloudbuild.projects.locations.get" call. 3050 // Any non-2xx status code is an error. Response headers are in either 3051 // *Location.ServerResponse.Header or (if a response was returned at all) in 3052 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3053 // whether the returned error was because http.StatusNotModified was returned. 3054 func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) { 3055 gensupport.SetOptions(c.urlParams_, opts...) 3056 res, err := c.doRequest("json") 3057 if res != nil && res.StatusCode == http.StatusNotModified { 3058 if res.Body != nil { 3059 res.Body.Close() 3060 } 3061 return nil, gensupport.WrapError(&googleapi.Error{ 3062 Code: res.StatusCode, 3063 Header: res.Header, 3064 }) 3065 } 3066 if err != nil { 3067 return nil, err 3068 } 3069 defer googleapi.CloseBody(res) 3070 if err := googleapi.CheckResponse(res); err != nil { 3071 return nil, gensupport.WrapError(err) 3072 } 3073 ret := &Location{ 3074 ServerResponse: googleapi.ServerResponse{ 3075 Header: res.Header, 3076 HTTPStatusCode: res.StatusCode, 3077 }, 3078 } 3079 target := &ret 3080 if err := gensupport.DecodeResponse(target, res); err != nil { 3081 return nil, err 3082 } 3083 return ret, nil 3084 } 3085 3086 type ProjectsLocationsListCall struct { 3087 s *Service 3088 name string 3089 urlParams_ gensupport.URLParams 3090 ifNoneMatch_ string 3091 ctx_ context.Context 3092 header_ http.Header 3093 } 3094 3095 // List: Lists information about the supported locations for this service. 3096 // 3097 // - name: The resource that owns the locations collection, if applicable. 3098 func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall { 3099 c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3100 c.name = name 3101 return c 3102 } 3103 3104 // Filter sets the optional parameter "filter": A filter to narrow down results 3105 // to a preferred subset. The filtering language accepts strings like 3106 // "displayName=tokyo", and is documented in more detail in AIP-160 3107 // (https://google.aip.dev/160). 3108 func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall { 3109 c.urlParams_.Set("filter", filter) 3110 return c 3111 } 3112 3113 // PageSize sets the optional parameter "pageSize": The maximum number of 3114 // results to return. If not set, the service selects a default. 3115 func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall { 3116 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3117 return c 3118 } 3119 3120 // PageToken sets the optional parameter "pageToken": A page token received 3121 // from the `next_page_token` field in the response. Send that page token to 3122 // receive the subsequent page. 3123 func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall { 3124 c.urlParams_.Set("pageToken", pageToken) 3125 return c 3126 } 3127 3128 // Fields allows partial responses to be retrieved. See 3129 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3130 // details. 3131 func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { 3132 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3133 return c 3134 } 3135 3136 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3137 // object's ETag matches the given value. This is useful for getting updates 3138 // only after the object has changed since the last request. 3139 func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { 3140 c.ifNoneMatch_ = entityTag 3141 return c 3142 } 3143 3144 // Context sets the context to be used in this call's Do method. 3145 func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { 3146 c.ctx_ = ctx 3147 return c 3148 } 3149 3150 // Header returns a http.Header that can be modified by the caller to add 3151 // headers to the request. 3152 func (c *ProjectsLocationsListCall) Header() http.Header { 3153 if c.header_ == nil { 3154 c.header_ = make(http.Header) 3155 } 3156 return c.header_ 3157 } 3158 3159 func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) { 3160 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3161 if c.ifNoneMatch_ != "" { 3162 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3163 } 3164 var body io.Reader = nil 3165 c.urlParams_.Set("alt", alt) 3166 c.urlParams_.Set("prettyPrint", "false") 3167 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}/locations") 3168 urls += "?" + c.urlParams_.Encode() 3169 req, err := http.NewRequest("GET", urls, body) 3170 if err != nil { 3171 return nil, err 3172 } 3173 req.Header = reqHeaders 3174 googleapi.Expand(req.URL, map[string]string{ 3175 "name": c.name, 3176 }) 3177 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3178 } 3179 3180 // Do executes the "cloudbuild.projects.locations.list" call. 3181 // Any non-2xx status code is an error. Response headers are in either 3182 // *ListLocationsResponse.ServerResponse.Header or (if a response was returned 3183 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3184 // check whether the returned error was because http.StatusNotModified was 3185 // returned. 3186 func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) { 3187 gensupport.SetOptions(c.urlParams_, opts...) 3188 res, err := c.doRequest("json") 3189 if res != nil && res.StatusCode == http.StatusNotModified { 3190 if res.Body != nil { 3191 res.Body.Close() 3192 } 3193 return nil, gensupport.WrapError(&googleapi.Error{ 3194 Code: res.StatusCode, 3195 Header: res.Header, 3196 }) 3197 } 3198 if err != nil { 3199 return nil, err 3200 } 3201 defer googleapi.CloseBody(res) 3202 if err := googleapi.CheckResponse(res); err != nil { 3203 return nil, gensupport.WrapError(err) 3204 } 3205 ret := &ListLocationsResponse{ 3206 ServerResponse: googleapi.ServerResponse{ 3207 Header: res.Header, 3208 HTTPStatusCode: res.StatusCode, 3209 }, 3210 } 3211 target := &ret 3212 if err := gensupport.DecodeResponse(target, res); err != nil { 3213 return nil, err 3214 } 3215 return ret, nil 3216 } 3217 3218 // Pages invokes f for each page of results. 3219 // A non-nil error returned from f will halt the iteration. 3220 // The provided context supersedes any context provided to the Context method. 3221 func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error { 3222 c.ctx_ = ctx 3223 defer c.PageToken(c.urlParams_.Get("pageToken")) 3224 for { 3225 x, err := c.Do() 3226 if err != nil { 3227 return err 3228 } 3229 if err := f(x); err != nil { 3230 return err 3231 } 3232 if x.NextPageToken == "" { 3233 return nil 3234 } 3235 c.PageToken(x.NextPageToken) 3236 } 3237 } 3238 3239 type ProjectsLocationsConnectionsCreateCall struct { 3240 s *Service 3241 parent string 3242 connection *Connection 3243 urlParams_ gensupport.URLParams 3244 ctx_ context.Context 3245 header_ http.Header 3246 } 3247 3248 // Create: Creates a Connection. 3249 // 3250 // - parent: Project and location where the connection will be created. Format: 3251 // `projects/*/locations/*`. 3252 func (r *ProjectsLocationsConnectionsService) Create(parent string, connection *Connection) *ProjectsLocationsConnectionsCreateCall { 3253 c := &ProjectsLocationsConnectionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3254 c.parent = parent 3255 c.connection = connection 3256 return c 3257 } 3258 3259 // ConnectionId sets the optional parameter "connectionId": Required. The ID to 3260 // use for the Connection, which will become the final component of the 3261 // Connection's resource name. Names must be unique per-project per-location. 3262 // Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. 3263 func (c *ProjectsLocationsConnectionsCreateCall) ConnectionId(connectionId string) *ProjectsLocationsConnectionsCreateCall { 3264 c.urlParams_.Set("connectionId", connectionId) 3265 return c 3266 } 3267 3268 // Fields allows partial responses to be retrieved. See 3269 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3270 // details. 3271 func (c *ProjectsLocationsConnectionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsCreateCall { 3272 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3273 return c 3274 } 3275 3276 // Context sets the context to be used in this call's Do method. 3277 func (c *ProjectsLocationsConnectionsCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsCreateCall { 3278 c.ctx_ = ctx 3279 return c 3280 } 3281 3282 // Header returns a http.Header that can be modified by the caller to add 3283 // headers to the request. 3284 func (c *ProjectsLocationsConnectionsCreateCall) Header() http.Header { 3285 if c.header_ == nil { 3286 c.header_ = make(http.Header) 3287 } 3288 return c.header_ 3289 } 3290 3291 func (c *ProjectsLocationsConnectionsCreateCall) doRequest(alt string) (*http.Response, error) { 3292 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 3293 var body io.Reader = nil 3294 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) 3295 if err != nil { 3296 return nil, err 3297 } 3298 c.urlParams_.Set("alt", alt) 3299 c.urlParams_.Set("prettyPrint", "false") 3300 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections") 3301 urls += "?" + c.urlParams_.Encode() 3302 req, err := http.NewRequest("POST", urls, body) 3303 if err != nil { 3304 return nil, err 3305 } 3306 req.Header = reqHeaders 3307 googleapi.Expand(req.URL, map[string]string{ 3308 "parent": c.parent, 3309 }) 3310 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3311 } 3312 3313 // Do executes the "cloudbuild.projects.locations.connections.create" call. 3314 // Any non-2xx status code is an error. Response headers are in either 3315 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3316 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3317 // whether the returned error was because http.StatusNotModified was returned. 3318 func (c *ProjectsLocationsConnectionsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3319 gensupport.SetOptions(c.urlParams_, opts...) 3320 res, err := c.doRequest("json") 3321 if res != nil && res.StatusCode == http.StatusNotModified { 3322 if res.Body != nil { 3323 res.Body.Close() 3324 } 3325 return nil, gensupport.WrapError(&googleapi.Error{ 3326 Code: res.StatusCode, 3327 Header: res.Header, 3328 }) 3329 } 3330 if err != nil { 3331 return nil, err 3332 } 3333 defer googleapi.CloseBody(res) 3334 if err := googleapi.CheckResponse(res); err != nil { 3335 return nil, gensupport.WrapError(err) 3336 } 3337 ret := &Operation{ 3338 ServerResponse: googleapi.ServerResponse{ 3339 Header: res.Header, 3340 HTTPStatusCode: res.StatusCode, 3341 }, 3342 } 3343 target := &ret 3344 if err := gensupport.DecodeResponse(target, res); err != nil { 3345 return nil, err 3346 } 3347 return ret, nil 3348 } 3349 3350 type ProjectsLocationsConnectionsDeleteCall struct { 3351 s *Service 3352 name string 3353 urlParams_ gensupport.URLParams 3354 ctx_ context.Context 3355 header_ http.Header 3356 } 3357 3358 // Delete: Deletes a single connection. 3359 // 3360 // - name: The name of the Connection to delete. Format: 3361 // `projects/*/locations/*/connections/*`. 3362 func (r *ProjectsLocationsConnectionsService) Delete(name string) *ProjectsLocationsConnectionsDeleteCall { 3363 c := &ProjectsLocationsConnectionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3364 c.name = name 3365 return c 3366 } 3367 3368 // Etag sets the optional parameter "etag": The current etag of the connection. 3369 // If an etag is provided and does not match the current etag of the 3370 // connection, deletion will be blocked and an ABORTED error will be returned. 3371 func (c *ProjectsLocationsConnectionsDeleteCall) Etag(etag string) *ProjectsLocationsConnectionsDeleteCall { 3372 c.urlParams_.Set("etag", etag) 3373 return c 3374 } 3375 3376 // ValidateOnly sets the optional parameter "validateOnly": If set, validate 3377 // the request, but do not actually post it. 3378 func (c *ProjectsLocationsConnectionsDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsDeleteCall { 3379 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 3380 return c 3381 } 3382 3383 // Fields allows partial responses to be retrieved. See 3384 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3385 // details. 3386 func (c *ProjectsLocationsConnectionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsDeleteCall { 3387 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3388 return c 3389 } 3390 3391 // Context sets the context to be used in this call's Do method. 3392 func (c *ProjectsLocationsConnectionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsDeleteCall { 3393 c.ctx_ = ctx 3394 return c 3395 } 3396 3397 // Header returns a http.Header that can be modified by the caller to add 3398 // headers to the request. 3399 func (c *ProjectsLocationsConnectionsDeleteCall) Header() http.Header { 3400 if c.header_ == nil { 3401 c.header_ = make(http.Header) 3402 } 3403 return c.header_ 3404 } 3405 3406 func (c *ProjectsLocationsConnectionsDeleteCall) doRequest(alt string) (*http.Response, error) { 3407 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3408 var body io.Reader = nil 3409 c.urlParams_.Set("alt", alt) 3410 c.urlParams_.Set("prettyPrint", "false") 3411 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 3412 urls += "?" + c.urlParams_.Encode() 3413 req, err := http.NewRequest("DELETE", urls, body) 3414 if err != nil { 3415 return nil, err 3416 } 3417 req.Header = reqHeaders 3418 googleapi.Expand(req.URL, map[string]string{ 3419 "name": c.name, 3420 }) 3421 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3422 } 3423 3424 // Do executes the "cloudbuild.projects.locations.connections.delete" call. 3425 // Any non-2xx status code is an error. Response headers are in either 3426 // *Operation.ServerResponse.Header or (if a response was returned at all) in 3427 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3428 // whether the returned error was because http.StatusNotModified was returned. 3429 func (c *ProjectsLocationsConnectionsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3430 gensupport.SetOptions(c.urlParams_, opts...) 3431 res, err := c.doRequest("json") 3432 if res != nil && res.StatusCode == http.StatusNotModified { 3433 if res.Body != nil { 3434 res.Body.Close() 3435 } 3436 return nil, gensupport.WrapError(&googleapi.Error{ 3437 Code: res.StatusCode, 3438 Header: res.Header, 3439 }) 3440 } 3441 if err != nil { 3442 return nil, err 3443 } 3444 defer googleapi.CloseBody(res) 3445 if err := googleapi.CheckResponse(res); err != nil { 3446 return nil, gensupport.WrapError(err) 3447 } 3448 ret := &Operation{ 3449 ServerResponse: googleapi.ServerResponse{ 3450 Header: res.Header, 3451 HTTPStatusCode: res.StatusCode, 3452 }, 3453 } 3454 target := &ret 3455 if err := gensupport.DecodeResponse(target, res); err != nil { 3456 return nil, err 3457 } 3458 return ret, nil 3459 } 3460 3461 type ProjectsLocationsConnectionsFetchLinkableRepositoriesCall struct { 3462 s *Service 3463 connection string 3464 urlParams_ gensupport.URLParams 3465 ifNoneMatch_ string 3466 ctx_ context.Context 3467 header_ http.Header 3468 } 3469 3470 // FetchLinkableRepositories: FetchLinkableRepositories get repositories from 3471 // SCM that are accessible and could be added to the connection. 3472 // 3473 // - connection: The name of the Connection. Format: 3474 // `projects/*/locations/*/connections/*`. 3475 func (r *ProjectsLocationsConnectionsService) FetchLinkableRepositories(connection string) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { 3476 c := &ProjectsLocationsConnectionsFetchLinkableRepositoriesCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3477 c.connection = connection 3478 return c 3479 } 3480 3481 // PageSize sets the optional parameter "pageSize": Number of results to return 3482 // in the list. Default to 20. 3483 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { 3484 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3485 return c 3486 } 3487 3488 // PageToken sets the optional parameter "pageToken": Page start. 3489 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) PageToken(pageToken string) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { 3490 c.urlParams_.Set("pageToken", pageToken) 3491 return c 3492 } 3493 3494 // Fields allows partial responses to be retrieved. See 3495 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3496 // details. 3497 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { 3498 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3499 return c 3500 } 3501 3502 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3503 // object's ETag matches the given value. This is useful for getting updates 3504 // only after the object has changed since the last request. 3505 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { 3506 c.ifNoneMatch_ = entityTag 3507 return c 3508 } 3509 3510 // Context sets the context to be used in this call's Do method. 3511 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Context(ctx context.Context) *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall { 3512 c.ctx_ = ctx 3513 return c 3514 } 3515 3516 // Header returns a http.Header that can be modified by the caller to add 3517 // headers to the request. 3518 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Header() http.Header { 3519 if c.header_ == nil { 3520 c.header_ = make(http.Header) 3521 } 3522 return c.header_ 3523 } 3524 3525 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) doRequest(alt string) (*http.Response, error) { 3526 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3527 if c.ifNoneMatch_ != "" { 3528 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3529 } 3530 var body io.Reader = nil 3531 c.urlParams_.Set("alt", alt) 3532 c.urlParams_.Set("prettyPrint", "false") 3533 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+connection}:fetchLinkableRepositories") 3534 urls += "?" + c.urlParams_.Encode() 3535 req, err := http.NewRequest("GET", urls, body) 3536 if err != nil { 3537 return nil, err 3538 } 3539 req.Header = reqHeaders 3540 googleapi.Expand(req.URL, map[string]string{ 3541 "connection": c.connection, 3542 }) 3543 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3544 } 3545 3546 // Do executes the "cloudbuild.projects.locations.connections.fetchLinkableRepositories" call. 3547 // Any non-2xx status code is an error. Response headers are in either 3548 // *FetchLinkableRepositoriesResponse.ServerResponse.Header or (if a response 3549 // was returned at all) in error.(*googleapi.Error).Header. Use 3550 // googleapi.IsNotModified to check whether the returned error was because 3551 // http.StatusNotModified was returned. 3552 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Do(opts ...googleapi.CallOption) (*FetchLinkableRepositoriesResponse, error) { 3553 gensupport.SetOptions(c.urlParams_, opts...) 3554 res, err := c.doRequest("json") 3555 if res != nil && res.StatusCode == http.StatusNotModified { 3556 if res.Body != nil { 3557 res.Body.Close() 3558 } 3559 return nil, gensupport.WrapError(&googleapi.Error{ 3560 Code: res.StatusCode, 3561 Header: res.Header, 3562 }) 3563 } 3564 if err != nil { 3565 return nil, err 3566 } 3567 defer googleapi.CloseBody(res) 3568 if err := googleapi.CheckResponse(res); err != nil { 3569 return nil, gensupport.WrapError(err) 3570 } 3571 ret := &FetchLinkableRepositoriesResponse{ 3572 ServerResponse: googleapi.ServerResponse{ 3573 Header: res.Header, 3574 HTTPStatusCode: res.StatusCode, 3575 }, 3576 } 3577 target := &ret 3578 if err := gensupport.DecodeResponse(target, res); err != nil { 3579 return nil, err 3580 } 3581 return ret, nil 3582 } 3583 3584 // Pages invokes f for each page of results. 3585 // A non-nil error returned from f will halt the iteration. 3586 // The provided context supersedes any context provided to the Context method. 3587 func (c *ProjectsLocationsConnectionsFetchLinkableRepositoriesCall) Pages(ctx context.Context, f func(*FetchLinkableRepositoriesResponse) error) error { 3588 c.ctx_ = ctx 3589 defer c.PageToken(c.urlParams_.Get("pageToken")) 3590 for { 3591 x, err := c.Do() 3592 if err != nil { 3593 return err 3594 } 3595 if err := f(x); err != nil { 3596 return err 3597 } 3598 if x.NextPageToken == "" { 3599 return nil 3600 } 3601 c.PageToken(x.NextPageToken) 3602 } 3603 } 3604 3605 type ProjectsLocationsConnectionsGetCall struct { 3606 s *Service 3607 name string 3608 urlParams_ gensupport.URLParams 3609 ifNoneMatch_ string 3610 ctx_ context.Context 3611 header_ http.Header 3612 } 3613 3614 // Get: Gets details of a single connection. 3615 // 3616 // - name: The name of the Connection to retrieve. Format: 3617 // `projects/*/locations/*/connections/*`. 3618 func (r *ProjectsLocationsConnectionsService) Get(name string) *ProjectsLocationsConnectionsGetCall { 3619 c := &ProjectsLocationsConnectionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3620 c.name = name 3621 return c 3622 } 3623 3624 // Fields allows partial responses to be retrieved. See 3625 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3626 // details. 3627 func (c *ProjectsLocationsConnectionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetCall { 3628 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3629 return c 3630 } 3631 3632 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3633 // object's ETag matches the given value. This is useful for getting updates 3634 // only after the object has changed since the last request. 3635 func (c *ProjectsLocationsConnectionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetCall { 3636 c.ifNoneMatch_ = entityTag 3637 return c 3638 } 3639 3640 // Context sets the context to be used in this call's Do method. 3641 func (c *ProjectsLocationsConnectionsGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetCall { 3642 c.ctx_ = ctx 3643 return c 3644 } 3645 3646 // Header returns a http.Header that can be modified by the caller to add 3647 // headers to the request. 3648 func (c *ProjectsLocationsConnectionsGetCall) Header() http.Header { 3649 if c.header_ == nil { 3650 c.header_ = make(http.Header) 3651 } 3652 return c.header_ 3653 } 3654 3655 func (c *ProjectsLocationsConnectionsGetCall) doRequest(alt string) (*http.Response, error) { 3656 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3657 if c.ifNoneMatch_ != "" { 3658 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3659 } 3660 var body io.Reader = nil 3661 c.urlParams_.Set("alt", alt) 3662 c.urlParams_.Set("prettyPrint", "false") 3663 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 3664 urls += "?" + c.urlParams_.Encode() 3665 req, err := http.NewRequest("GET", urls, body) 3666 if err != nil { 3667 return nil, err 3668 } 3669 req.Header = reqHeaders 3670 googleapi.Expand(req.URL, map[string]string{ 3671 "name": c.name, 3672 }) 3673 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3674 } 3675 3676 // Do executes the "cloudbuild.projects.locations.connections.get" call. 3677 // Any non-2xx status code is an error. Response headers are in either 3678 // *Connection.ServerResponse.Header or (if a response was returned at all) in 3679 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3680 // whether the returned error was because http.StatusNotModified was returned. 3681 func (c *ProjectsLocationsConnectionsGetCall) Do(opts ...googleapi.CallOption) (*Connection, error) { 3682 gensupport.SetOptions(c.urlParams_, opts...) 3683 res, err := c.doRequest("json") 3684 if res != nil && res.StatusCode == http.StatusNotModified { 3685 if res.Body != nil { 3686 res.Body.Close() 3687 } 3688 return nil, gensupport.WrapError(&googleapi.Error{ 3689 Code: res.StatusCode, 3690 Header: res.Header, 3691 }) 3692 } 3693 if err != nil { 3694 return nil, err 3695 } 3696 defer googleapi.CloseBody(res) 3697 if err := googleapi.CheckResponse(res); err != nil { 3698 return nil, gensupport.WrapError(err) 3699 } 3700 ret := &Connection{ 3701 ServerResponse: googleapi.ServerResponse{ 3702 Header: res.Header, 3703 HTTPStatusCode: res.StatusCode, 3704 }, 3705 } 3706 target := &ret 3707 if err := gensupport.DecodeResponse(target, res); err != nil { 3708 return nil, err 3709 } 3710 return ret, nil 3711 } 3712 3713 type ProjectsLocationsConnectionsGetIamPolicyCall struct { 3714 s *Service 3715 resource string 3716 urlParams_ gensupport.URLParams 3717 ifNoneMatch_ string 3718 ctx_ context.Context 3719 header_ http.Header 3720 } 3721 3722 // GetIamPolicy: Gets the access control policy for a resource. Returns an 3723 // empty policy if the resource exists and does not have a policy set. 3724 // 3725 // - resource: REQUIRED: The resource for which the policy is being requested. 3726 // See Resource names (https://cloud.google.com/apis/design/resource_names) 3727 // for the appropriate value for this field. 3728 func (r *ProjectsLocationsConnectionsService) GetIamPolicy(resource string) *ProjectsLocationsConnectionsGetIamPolicyCall { 3729 c := &ProjectsLocationsConnectionsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3730 c.resource = resource 3731 return c 3732 } 3733 3734 // OptionsRequestedPolicyVersion sets the optional parameter 3735 // "options.requestedPolicyVersion": The maximum policy version that will be 3736 // used to format the policy. Valid values are 0, 1, and 3. Requests specifying 3737 // an invalid value will be rejected. Requests for policies with any 3738 // conditional role bindings must specify version 3. Policies with no 3739 // conditional role bindings may specify any valid value or leave the field 3740 // unset. The policy in the response might use the policy version that you 3741 // specified, or it might use a lower policy version. For example, if you 3742 // specify version 3, but the policy has no conditional role bindings, the 3743 // response uses version 1. To learn which resources support conditions in 3744 // their IAM policies, see the IAM documentation 3745 // (https://cloud.google.com/iam/help/conditions/resource-policies). 3746 func (c *ProjectsLocationsConnectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsConnectionsGetIamPolicyCall { 3747 c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) 3748 return c 3749 } 3750 3751 // Fields allows partial responses to be retrieved. See 3752 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3753 // details. 3754 func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsGetIamPolicyCall { 3755 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3756 return c 3757 } 3758 3759 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3760 // object's ETag matches the given value. This is useful for getting updates 3761 // only after the object has changed since the last request. 3762 func (c *ProjectsLocationsConnectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsGetIamPolicyCall { 3763 c.ifNoneMatch_ = entityTag 3764 return c 3765 } 3766 3767 // Context sets the context to be used in this call's Do method. 3768 func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsGetIamPolicyCall { 3769 c.ctx_ = ctx 3770 return c 3771 } 3772 3773 // Header returns a http.Header that can be modified by the caller to add 3774 // headers to the request. 3775 func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Header() http.Header { 3776 if c.header_ == nil { 3777 c.header_ = make(http.Header) 3778 } 3779 return c.header_ 3780 } 3781 3782 func (c *ProjectsLocationsConnectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 3783 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3784 if c.ifNoneMatch_ != "" { 3785 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3786 } 3787 var body io.Reader = nil 3788 c.urlParams_.Set("alt", alt) 3789 c.urlParams_.Set("prettyPrint", "false") 3790 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:getIamPolicy") 3791 urls += "?" + c.urlParams_.Encode() 3792 req, err := http.NewRequest("GET", urls, body) 3793 if err != nil { 3794 return nil, err 3795 } 3796 req.Header = reqHeaders 3797 googleapi.Expand(req.URL, map[string]string{ 3798 "resource": c.resource, 3799 }) 3800 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3801 } 3802 3803 // Do executes the "cloudbuild.projects.locations.connections.getIamPolicy" call. 3804 // Any non-2xx status code is an error. Response headers are in either 3805 // *Policy.ServerResponse.Header or (if a response was returned at all) in 3806 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3807 // whether the returned error was because http.StatusNotModified was returned. 3808 func (c *ProjectsLocationsConnectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 3809 gensupport.SetOptions(c.urlParams_, opts...) 3810 res, err := c.doRequest("json") 3811 if res != nil && res.StatusCode == http.StatusNotModified { 3812 if res.Body != nil { 3813 res.Body.Close() 3814 } 3815 return nil, gensupport.WrapError(&googleapi.Error{ 3816 Code: res.StatusCode, 3817 Header: res.Header, 3818 }) 3819 } 3820 if err != nil { 3821 return nil, err 3822 } 3823 defer googleapi.CloseBody(res) 3824 if err := googleapi.CheckResponse(res); err != nil { 3825 return nil, gensupport.WrapError(err) 3826 } 3827 ret := &Policy{ 3828 ServerResponse: googleapi.ServerResponse{ 3829 Header: res.Header, 3830 HTTPStatusCode: res.StatusCode, 3831 }, 3832 } 3833 target := &ret 3834 if err := gensupport.DecodeResponse(target, res); err != nil { 3835 return nil, err 3836 } 3837 return ret, nil 3838 } 3839 3840 type ProjectsLocationsConnectionsListCall struct { 3841 s *Service 3842 parent string 3843 urlParams_ gensupport.URLParams 3844 ifNoneMatch_ string 3845 ctx_ context.Context 3846 header_ http.Header 3847 } 3848 3849 // List: Lists Connections in a given project and location. 3850 // 3851 // - parent: The parent, which owns this collection of Connections. Format: 3852 // `projects/*/locations/*`. 3853 func (r *ProjectsLocationsConnectionsService) List(parent string) *ProjectsLocationsConnectionsListCall { 3854 c := &ProjectsLocationsConnectionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3855 c.parent = parent 3856 return c 3857 } 3858 3859 // PageSize sets the optional parameter "pageSize": Number of results to return 3860 // in the list. 3861 func (c *ProjectsLocationsConnectionsListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsListCall { 3862 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 3863 return c 3864 } 3865 3866 // PageToken sets the optional parameter "pageToken": Page start. 3867 func (c *ProjectsLocationsConnectionsListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsListCall { 3868 c.urlParams_.Set("pageToken", pageToken) 3869 return c 3870 } 3871 3872 // Fields allows partial responses to be retrieved. See 3873 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 3874 // details. 3875 func (c *ProjectsLocationsConnectionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsListCall { 3876 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3877 return c 3878 } 3879 3880 // IfNoneMatch sets an optional parameter which makes the operation fail if the 3881 // object's ETag matches the given value. This is useful for getting updates 3882 // only after the object has changed since the last request. 3883 func (c *ProjectsLocationsConnectionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsListCall { 3884 c.ifNoneMatch_ = entityTag 3885 return c 3886 } 3887 3888 // Context sets the context to be used in this call's Do method. 3889 func (c *ProjectsLocationsConnectionsListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsListCall { 3890 c.ctx_ = ctx 3891 return c 3892 } 3893 3894 // Header returns a http.Header that can be modified by the caller to add 3895 // headers to the request. 3896 func (c *ProjectsLocationsConnectionsListCall) Header() http.Header { 3897 if c.header_ == nil { 3898 c.header_ = make(http.Header) 3899 } 3900 return c.header_ 3901 } 3902 3903 func (c *ProjectsLocationsConnectionsListCall) doRequest(alt string) (*http.Response, error) { 3904 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 3905 if c.ifNoneMatch_ != "" { 3906 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3907 } 3908 var body io.Reader = nil 3909 c.urlParams_.Set("alt", alt) 3910 c.urlParams_.Set("prettyPrint", "false") 3911 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections") 3912 urls += "?" + c.urlParams_.Encode() 3913 req, err := http.NewRequest("GET", urls, body) 3914 if err != nil { 3915 return nil, err 3916 } 3917 req.Header = reqHeaders 3918 googleapi.Expand(req.URL, map[string]string{ 3919 "parent": c.parent, 3920 }) 3921 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3922 } 3923 3924 // Do executes the "cloudbuild.projects.locations.connections.list" call. 3925 // Any non-2xx status code is an error. Response headers are in either 3926 // *ListConnectionsResponse.ServerResponse.Header or (if a response was 3927 // returned at all) in error.(*googleapi.Error).Header. Use 3928 // googleapi.IsNotModified to check whether the returned error was because 3929 // http.StatusNotModified was returned. 3930 func (c *ProjectsLocationsConnectionsListCall) Do(opts ...googleapi.CallOption) (*ListConnectionsResponse, error) { 3931 gensupport.SetOptions(c.urlParams_, opts...) 3932 res, err := c.doRequest("json") 3933 if res != nil && res.StatusCode == http.StatusNotModified { 3934 if res.Body != nil { 3935 res.Body.Close() 3936 } 3937 return nil, gensupport.WrapError(&googleapi.Error{ 3938 Code: res.StatusCode, 3939 Header: res.Header, 3940 }) 3941 } 3942 if err != nil { 3943 return nil, err 3944 } 3945 defer googleapi.CloseBody(res) 3946 if err := googleapi.CheckResponse(res); err != nil { 3947 return nil, gensupport.WrapError(err) 3948 } 3949 ret := &ListConnectionsResponse{ 3950 ServerResponse: googleapi.ServerResponse{ 3951 Header: res.Header, 3952 HTTPStatusCode: res.StatusCode, 3953 }, 3954 } 3955 target := &ret 3956 if err := gensupport.DecodeResponse(target, res); err != nil { 3957 return nil, err 3958 } 3959 return ret, nil 3960 } 3961 3962 // Pages invokes f for each page of results. 3963 // A non-nil error returned from f will halt the iteration. 3964 // The provided context supersedes any context provided to the Context method. 3965 func (c *ProjectsLocationsConnectionsListCall) Pages(ctx context.Context, f func(*ListConnectionsResponse) error) error { 3966 c.ctx_ = ctx 3967 defer c.PageToken(c.urlParams_.Get("pageToken")) 3968 for { 3969 x, err := c.Do() 3970 if err != nil { 3971 return err 3972 } 3973 if err := f(x); err != nil { 3974 return err 3975 } 3976 if x.NextPageToken == "" { 3977 return nil 3978 } 3979 c.PageToken(x.NextPageToken) 3980 } 3981 } 3982 3983 type ProjectsLocationsConnectionsPatchCall struct { 3984 s *Service 3985 name string 3986 connection *Connection 3987 urlParams_ gensupport.URLParams 3988 ctx_ context.Context 3989 header_ http.Header 3990 } 3991 3992 // Patch: Updates a single connection. 3993 // 3994 // - name: Immutable. The resource name of the connection, in the format 3995 // `projects/{project}/locations/{location}/connections/{connection_id}`. 3996 func (r *ProjectsLocationsConnectionsService) Patch(name string, connection *Connection) *ProjectsLocationsConnectionsPatchCall { 3997 c := &ProjectsLocationsConnectionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3998 c.name = name 3999 c.connection = connection 4000 return c 4001 } 4002 4003 // AllowMissing sets the optional parameter "allowMissing": If set to true, and 4004 // the connection is not found a new connection will be created. In this 4005 // situation `update_mask` is ignored. The creation will succeed only if the 4006 // input connection has all the necessary information (e.g a github_config with 4007 // both user_oauth_token and installation_id properties). 4008 func (c *ProjectsLocationsConnectionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsConnectionsPatchCall { 4009 c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) 4010 return c 4011 } 4012 4013 // Etag sets the optional parameter "etag": The current etag of the connection. 4014 // If an etag is provided and does not match the current etag of the 4015 // connection, update will be blocked and an ABORTED error will be returned. 4016 func (c *ProjectsLocationsConnectionsPatchCall) Etag(etag string) *ProjectsLocationsConnectionsPatchCall { 4017 c.urlParams_.Set("etag", etag) 4018 return c 4019 } 4020 4021 // UpdateMask sets the optional parameter "updateMask": The list of fields to 4022 // be updated. 4023 func (c *ProjectsLocationsConnectionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsConnectionsPatchCall { 4024 c.urlParams_.Set("updateMask", updateMask) 4025 return c 4026 } 4027 4028 // Fields allows partial responses to be retrieved. See 4029 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4030 // details. 4031 func (c *ProjectsLocationsConnectionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsPatchCall { 4032 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4033 return c 4034 } 4035 4036 // Context sets the context to be used in this call's Do method. 4037 func (c *ProjectsLocationsConnectionsPatchCall) Context(ctx context.Context) *ProjectsLocationsConnectionsPatchCall { 4038 c.ctx_ = ctx 4039 return c 4040 } 4041 4042 // Header returns a http.Header that can be modified by the caller to add 4043 // headers to the request. 4044 func (c *ProjectsLocationsConnectionsPatchCall) Header() http.Header { 4045 if c.header_ == nil { 4046 c.header_ = make(http.Header) 4047 } 4048 return c.header_ 4049 } 4050 4051 func (c *ProjectsLocationsConnectionsPatchCall) doRequest(alt string) (*http.Response, error) { 4052 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4053 var body io.Reader = nil 4054 body, err := googleapi.WithoutDataWrapper.JSONReader(c.connection) 4055 if err != nil { 4056 return nil, err 4057 } 4058 c.urlParams_.Set("alt", alt) 4059 c.urlParams_.Set("prettyPrint", "false") 4060 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 4061 urls += "?" + c.urlParams_.Encode() 4062 req, err := http.NewRequest("PATCH", urls, body) 4063 if err != nil { 4064 return nil, err 4065 } 4066 req.Header = reqHeaders 4067 googleapi.Expand(req.URL, map[string]string{ 4068 "name": c.name, 4069 }) 4070 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4071 } 4072 4073 // Do executes the "cloudbuild.projects.locations.connections.patch" call. 4074 // Any non-2xx status code is an error. Response headers are in either 4075 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4076 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4077 // whether the returned error was because http.StatusNotModified was returned. 4078 func (c *ProjectsLocationsConnectionsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4079 gensupport.SetOptions(c.urlParams_, opts...) 4080 res, err := c.doRequest("json") 4081 if res != nil && res.StatusCode == http.StatusNotModified { 4082 if res.Body != nil { 4083 res.Body.Close() 4084 } 4085 return nil, gensupport.WrapError(&googleapi.Error{ 4086 Code: res.StatusCode, 4087 Header: res.Header, 4088 }) 4089 } 4090 if err != nil { 4091 return nil, err 4092 } 4093 defer googleapi.CloseBody(res) 4094 if err := googleapi.CheckResponse(res); err != nil { 4095 return nil, gensupport.WrapError(err) 4096 } 4097 ret := &Operation{ 4098 ServerResponse: googleapi.ServerResponse{ 4099 Header: res.Header, 4100 HTTPStatusCode: res.StatusCode, 4101 }, 4102 } 4103 target := &ret 4104 if err := gensupport.DecodeResponse(target, res); err != nil { 4105 return nil, err 4106 } 4107 return ret, nil 4108 } 4109 4110 type ProjectsLocationsConnectionsProcessWebhookCall struct { 4111 s *Service 4112 parent string 4113 httpbody *HttpBody 4114 urlParams_ gensupport.URLParams 4115 ctx_ context.Context 4116 header_ http.Header 4117 } 4118 4119 // ProcessWebhook: ProcessWebhook is called by the external SCM for notifying 4120 // of events. 4121 // 4122 // - parent: Project and location where the webhook will be received. Format: 4123 // `projects/*/locations/*`. 4124 func (r *ProjectsLocationsConnectionsService) ProcessWebhook(parent string, httpbody *HttpBody) *ProjectsLocationsConnectionsProcessWebhookCall { 4125 c := &ProjectsLocationsConnectionsProcessWebhookCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4126 c.parent = parent 4127 c.httpbody = httpbody 4128 return c 4129 } 4130 4131 // WebhookKey sets the optional parameter "webhookKey": Arbitrary additional 4132 // key to find the maching repository for a webhook event if needed. 4133 func (c *ProjectsLocationsConnectionsProcessWebhookCall) WebhookKey(webhookKey string) *ProjectsLocationsConnectionsProcessWebhookCall { 4134 c.urlParams_.Set("webhookKey", webhookKey) 4135 return c 4136 } 4137 4138 // Fields allows partial responses to be retrieved. See 4139 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4140 // details. 4141 func (c *ProjectsLocationsConnectionsProcessWebhookCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsProcessWebhookCall { 4142 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4143 return c 4144 } 4145 4146 // Context sets the context to be used in this call's Do method. 4147 func (c *ProjectsLocationsConnectionsProcessWebhookCall) Context(ctx context.Context) *ProjectsLocationsConnectionsProcessWebhookCall { 4148 c.ctx_ = ctx 4149 return c 4150 } 4151 4152 // Header returns a http.Header that can be modified by the caller to add 4153 // headers to the request. 4154 func (c *ProjectsLocationsConnectionsProcessWebhookCall) Header() http.Header { 4155 if c.header_ == nil { 4156 c.header_ = make(http.Header) 4157 } 4158 return c.header_ 4159 } 4160 4161 func (c *ProjectsLocationsConnectionsProcessWebhookCall) doRequest(alt string) (*http.Response, error) { 4162 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4163 var body io.Reader = nil 4164 body, err := googleapi.WithoutDataWrapper.JSONReader(c.httpbody) 4165 if err != nil { 4166 return nil, err 4167 } 4168 c.urlParams_.Set("alt", alt) 4169 c.urlParams_.Set("prettyPrint", "false") 4170 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/connections:processWebhook") 4171 urls += "?" + c.urlParams_.Encode() 4172 req, err := http.NewRequest("POST", urls, body) 4173 if err != nil { 4174 return nil, err 4175 } 4176 req.Header = reqHeaders 4177 googleapi.Expand(req.URL, map[string]string{ 4178 "parent": c.parent, 4179 }) 4180 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4181 } 4182 4183 // Do executes the "cloudbuild.projects.locations.connections.processWebhook" call. 4184 // Any non-2xx status code is an error. Response headers are in either 4185 // *Empty.ServerResponse.Header or (if a response was returned at all) in 4186 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4187 // whether the returned error was because http.StatusNotModified was returned. 4188 func (c *ProjectsLocationsConnectionsProcessWebhookCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4189 gensupport.SetOptions(c.urlParams_, opts...) 4190 res, err := c.doRequest("json") 4191 if res != nil && res.StatusCode == http.StatusNotModified { 4192 if res.Body != nil { 4193 res.Body.Close() 4194 } 4195 return nil, gensupport.WrapError(&googleapi.Error{ 4196 Code: res.StatusCode, 4197 Header: res.Header, 4198 }) 4199 } 4200 if err != nil { 4201 return nil, err 4202 } 4203 defer googleapi.CloseBody(res) 4204 if err := googleapi.CheckResponse(res); err != nil { 4205 return nil, gensupport.WrapError(err) 4206 } 4207 ret := &Empty{ 4208 ServerResponse: googleapi.ServerResponse{ 4209 Header: res.Header, 4210 HTTPStatusCode: res.StatusCode, 4211 }, 4212 } 4213 target := &ret 4214 if err := gensupport.DecodeResponse(target, res); err != nil { 4215 return nil, err 4216 } 4217 return ret, nil 4218 } 4219 4220 type ProjectsLocationsConnectionsSetIamPolicyCall struct { 4221 s *Service 4222 resource string 4223 setiampolicyrequest *SetIamPolicyRequest 4224 urlParams_ gensupport.URLParams 4225 ctx_ context.Context 4226 header_ http.Header 4227 } 4228 4229 // SetIamPolicy: Sets the access control policy on the specified resource. 4230 // Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, 4231 // and `PERMISSION_DENIED` errors. 4232 // 4233 // - resource: REQUIRED: The resource for which the policy is being specified. 4234 // See Resource names (https://cloud.google.com/apis/design/resource_names) 4235 // for the appropriate value for this field. 4236 func (r *ProjectsLocationsConnectionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsConnectionsSetIamPolicyCall { 4237 c := &ProjectsLocationsConnectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4238 c.resource = resource 4239 c.setiampolicyrequest = setiampolicyrequest 4240 return c 4241 } 4242 4243 // Fields allows partial responses to be retrieved. See 4244 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4245 // details. 4246 func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsSetIamPolicyCall { 4247 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4248 return c 4249 } 4250 4251 // Context sets the context to be used in this call's Do method. 4252 func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsConnectionsSetIamPolicyCall { 4253 c.ctx_ = ctx 4254 return c 4255 } 4256 4257 // Header returns a http.Header that can be modified by the caller to add 4258 // headers to the request. 4259 func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Header() http.Header { 4260 if c.header_ == nil { 4261 c.header_ = make(http.Header) 4262 } 4263 return c.header_ 4264 } 4265 4266 func (c *ProjectsLocationsConnectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { 4267 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4268 var body io.Reader = nil 4269 body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) 4270 if err != nil { 4271 return nil, err 4272 } 4273 c.urlParams_.Set("alt", alt) 4274 c.urlParams_.Set("prettyPrint", "false") 4275 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:setIamPolicy") 4276 urls += "?" + c.urlParams_.Encode() 4277 req, err := http.NewRequest("POST", urls, body) 4278 if err != nil { 4279 return nil, err 4280 } 4281 req.Header = reqHeaders 4282 googleapi.Expand(req.URL, map[string]string{ 4283 "resource": c.resource, 4284 }) 4285 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4286 } 4287 4288 // Do executes the "cloudbuild.projects.locations.connections.setIamPolicy" call. 4289 // Any non-2xx status code is an error. Response headers are in either 4290 // *Policy.ServerResponse.Header or (if a response was returned at all) in 4291 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4292 // whether the returned error was because http.StatusNotModified was returned. 4293 func (c *ProjectsLocationsConnectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { 4294 gensupport.SetOptions(c.urlParams_, opts...) 4295 res, err := c.doRequest("json") 4296 if res != nil && res.StatusCode == http.StatusNotModified { 4297 if res.Body != nil { 4298 res.Body.Close() 4299 } 4300 return nil, gensupport.WrapError(&googleapi.Error{ 4301 Code: res.StatusCode, 4302 Header: res.Header, 4303 }) 4304 } 4305 if err != nil { 4306 return nil, err 4307 } 4308 defer googleapi.CloseBody(res) 4309 if err := googleapi.CheckResponse(res); err != nil { 4310 return nil, gensupport.WrapError(err) 4311 } 4312 ret := &Policy{ 4313 ServerResponse: googleapi.ServerResponse{ 4314 Header: res.Header, 4315 HTTPStatusCode: res.StatusCode, 4316 }, 4317 } 4318 target := &ret 4319 if err := gensupport.DecodeResponse(target, res); err != nil { 4320 return nil, err 4321 } 4322 return ret, nil 4323 } 4324 4325 type ProjectsLocationsConnectionsTestIamPermissionsCall struct { 4326 s *Service 4327 resource string 4328 testiampermissionsrequest *TestIamPermissionsRequest 4329 urlParams_ gensupport.URLParams 4330 ctx_ context.Context 4331 header_ http.Header 4332 } 4333 4334 // TestIamPermissions: Returns permissions that a caller has on the specified 4335 // resource. If the resource does not exist, this will return an empty set of 4336 // permissions, not a `NOT_FOUND` error. Note: This operation is designed to be 4337 // used for building permission-aware UIs and command-line tools, not for 4338 // authorization checking. This operation may "fail open" without warning. 4339 // 4340 // - resource: REQUIRED: The resource for which the policy detail is being 4341 // requested. See Resource names 4342 // (https://cloud.google.com/apis/design/resource_names) for the appropriate 4343 // value for this field. 4344 func (r *ProjectsLocationsConnectionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsConnectionsTestIamPermissionsCall { 4345 c := &ProjectsLocationsConnectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4346 c.resource = resource 4347 c.testiampermissionsrequest = testiampermissionsrequest 4348 return c 4349 } 4350 4351 // Fields allows partial responses to be retrieved. See 4352 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4353 // details. 4354 func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsTestIamPermissionsCall { 4355 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4356 return c 4357 } 4358 4359 // Context sets the context to be used in this call's Do method. 4360 func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsTestIamPermissionsCall { 4361 c.ctx_ = ctx 4362 return c 4363 } 4364 4365 // Header returns a http.Header that can be modified by the caller to add 4366 // headers to the request. 4367 func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Header() http.Header { 4368 if c.header_ == nil { 4369 c.header_ = make(http.Header) 4370 } 4371 return c.header_ 4372 } 4373 4374 func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { 4375 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4376 var body io.Reader = nil 4377 body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) 4378 if err != nil { 4379 return nil, err 4380 } 4381 c.urlParams_.Set("alt", alt) 4382 c.urlParams_.Set("prettyPrint", "false") 4383 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+resource}:testIamPermissions") 4384 urls += "?" + c.urlParams_.Encode() 4385 req, err := http.NewRequest("POST", urls, body) 4386 if err != nil { 4387 return nil, err 4388 } 4389 req.Header = reqHeaders 4390 googleapi.Expand(req.URL, map[string]string{ 4391 "resource": c.resource, 4392 }) 4393 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4394 } 4395 4396 // Do executes the "cloudbuild.projects.locations.connections.testIamPermissions" call. 4397 // Any non-2xx status code is an error. Response headers are in either 4398 // *TestIamPermissionsResponse.ServerResponse.Header or (if a response was 4399 // returned at all) in error.(*googleapi.Error).Header. Use 4400 // googleapi.IsNotModified to check whether the returned error was because 4401 // http.StatusNotModified was returned. 4402 func (c *ProjectsLocationsConnectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { 4403 gensupport.SetOptions(c.urlParams_, opts...) 4404 res, err := c.doRequest("json") 4405 if res != nil && res.StatusCode == http.StatusNotModified { 4406 if res.Body != nil { 4407 res.Body.Close() 4408 } 4409 return nil, gensupport.WrapError(&googleapi.Error{ 4410 Code: res.StatusCode, 4411 Header: res.Header, 4412 }) 4413 } 4414 if err != nil { 4415 return nil, err 4416 } 4417 defer googleapi.CloseBody(res) 4418 if err := googleapi.CheckResponse(res); err != nil { 4419 return nil, gensupport.WrapError(err) 4420 } 4421 ret := &TestIamPermissionsResponse{ 4422 ServerResponse: googleapi.ServerResponse{ 4423 Header: res.Header, 4424 HTTPStatusCode: res.StatusCode, 4425 }, 4426 } 4427 target := &ret 4428 if err := gensupport.DecodeResponse(target, res); err != nil { 4429 return nil, err 4430 } 4431 return ret, nil 4432 } 4433 4434 type ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall struct { 4435 s *Service 4436 repository string 4437 fetchreadtokenrequest *FetchReadTokenRequest 4438 urlParams_ gensupport.URLParams 4439 ctx_ context.Context 4440 header_ http.Header 4441 } 4442 4443 // AccessReadToken: Fetches read token of a given repository. 4444 // 4445 // - repository: The resource name of the repository in the format 4446 // `projects/*/locations/*/connections/*/repositories/*`. 4447 func (r *ProjectsLocationsConnectionsRepositoriesService) AccessReadToken(repository string, fetchreadtokenrequest *FetchReadTokenRequest) *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall { 4448 c := &ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4449 c.repository = repository 4450 c.fetchreadtokenrequest = fetchreadtokenrequest 4451 return c 4452 } 4453 4454 // Fields allows partial responses to be retrieved. See 4455 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4456 // details. 4457 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall { 4458 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4459 return c 4460 } 4461 4462 // Context sets the context to be used in this call's Do method. 4463 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall { 4464 c.ctx_ = ctx 4465 return c 4466 } 4467 4468 // Header returns a http.Header that can be modified by the caller to add 4469 // headers to the request. 4470 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Header() http.Header { 4471 if c.header_ == nil { 4472 c.header_ = make(http.Header) 4473 } 4474 return c.header_ 4475 } 4476 4477 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) doRequest(alt string) (*http.Response, error) { 4478 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4479 var body io.Reader = nil 4480 body, err := googleapi.WithoutDataWrapper.JSONReader(c.fetchreadtokenrequest) 4481 if err != nil { 4482 return nil, err 4483 } 4484 c.urlParams_.Set("alt", alt) 4485 c.urlParams_.Set("prettyPrint", "false") 4486 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+repository}:accessReadToken") 4487 urls += "?" + c.urlParams_.Encode() 4488 req, err := http.NewRequest("POST", urls, body) 4489 if err != nil { 4490 return nil, err 4491 } 4492 req.Header = reqHeaders 4493 googleapi.Expand(req.URL, map[string]string{ 4494 "repository": c.repository, 4495 }) 4496 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4497 } 4498 4499 // Do executes the "cloudbuild.projects.locations.connections.repositories.accessReadToken" call. 4500 // Any non-2xx status code is an error. Response headers are in either 4501 // *FetchReadTokenResponse.ServerResponse.Header or (if a response was returned 4502 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4503 // check whether the returned error was because http.StatusNotModified was 4504 // returned. 4505 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadTokenCall) Do(opts ...googleapi.CallOption) (*FetchReadTokenResponse, error) { 4506 gensupport.SetOptions(c.urlParams_, opts...) 4507 res, err := c.doRequest("json") 4508 if res != nil && res.StatusCode == http.StatusNotModified { 4509 if res.Body != nil { 4510 res.Body.Close() 4511 } 4512 return nil, gensupport.WrapError(&googleapi.Error{ 4513 Code: res.StatusCode, 4514 Header: res.Header, 4515 }) 4516 } 4517 if err != nil { 4518 return nil, err 4519 } 4520 defer googleapi.CloseBody(res) 4521 if err := googleapi.CheckResponse(res); err != nil { 4522 return nil, gensupport.WrapError(err) 4523 } 4524 ret := &FetchReadTokenResponse{ 4525 ServerResponse: googleapi.ServerResponse{ 4526 Header: res.Header, 4527 HTTPStatusCode: res.StatusCode, 4528 }, 4529 } 4530 target := &ret 4531 if err := gensupport.DecodeResponse(target, res); err != nil { 4532 return nil, err 4533 } 4534 return ret, nil 4535 } 4536 4537 type ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall struct { 4538 s *Service 4539 repository string 4540 fetchreadwritetokenrequest *FetchReadWriteTokenRequest 4541 urlParams_ gensupport.URLParams 4542 ctx_ context.Context 4543 header_ http.Header 4544 } 4545 4546 // AccessReadWriteToken: Fetches read/write token of a given repository. 4547 // 4548 // - repository: The resource name of the repository in the format 4549 // `projects/*/locations/*/connections/*/repositories/*`. 4550 func (r *ProjectsLocationsConnectionsRepositoriesService) AccessReadWriteToken(repository string, fetchreadwritetokenrequest *FetchReadWriteTokenRequest) *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall { 4551 c := &ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4552 c.repository = repository 4553 c.fetchreadwritetokenrequest = fetchreadwritetokenrequest 4554 return c 4555 } 4556 4557 // Fields allows partial responses to be retrieved. See 4558 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4559 // details. 4560 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall { 4561 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4562 return c 4563 } 4564 4565 // Context sets the context to be used in this call's Do method. 4566 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall { 4567 c.ctx_ = ctx 4568 return c 4569 } 4570 4571 // Header returns a http.Header that can be modified by the caller to add 4572 // headers to the request. 4573 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Header() http.Header { 4574 if c.header_ == nil { 4575 c.header_ = make(http.Header) 4576 } 4577 return c.header_ 4578 } 4579 4580 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) doRequest(alt string) (*http.Response, error) { 4581 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4582 var body io.Reader = nil 4583 body, err := googleapi.WithoutDataWrapper.JSONReader(c.fetchreadwritetokenrequest) 4584 if err != nil { 4585 return nil, err 4586 } 4587 c.urlParams_.Set("alt", alt) 4588 c.urlParams_.Set("prettyPrint", "false") 4589 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+repository}:accessReadWriteToken") 4590 urls += "?" + c.urlParams_.Encode() 4591 req, err := http.NewRequest("POST", urls, body) 4592 if err != nil { 4593 return nil, err 4594 } 4595 req.Header = reqHeaders 4596 googleapi.Expand(req.URL, map[string]string{ 4597 "repository": c.repository, 4598 }) 4599 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4600 } 4601 4602 // Do executes the "cloudbuild.projects.locations.connections.repositories.accessReadWriteToken" call. 4603 // Any non-2xx status code is an error. Response headers are in either 4604 // *FetchReadWriteTokenResponse.ServerResponse.Header or (if a response was 4605 // returned at all) in error.(*googleapi.Error).Header. Use 4606 // googleapi.IsNotModified to check whether the returned error was because 4607 // http.StatusNotModified was returned. 4608 func (c *ProjectsLocationsConnectionsRepositoriesAccessReadWriteTokenCall) Do(opts ...googleapi.CallOption) (*FetchReadWriteTokenResponse, error) { 4609 gensupport.SetOptions(c.urlParams_, opts...) 4610 res, err := c.doRequest("json") 4611 if res != nil && res.StatusCode == http.StatusNotModified { 4612 if res.Body != nil { 4613 res.Body.Close() 4614 } 4615 return nil, gensupport.WrapError(&googleapi.Error{ 4616 Code: res.StatusCode, 4617 Header: res.Header, 4618 }) 4619 } 4620 if err != nil { 4621 return nil, err 4622 } 4623 defer googleapi.CloseBody(res) 4624 if err := googleapi.CheckResponse(res); err != nil { 4625 return nil, gensupport.WrapError(err) 4626 } 4627 ret := &FetchReadWriteTokenResponse{ 4628 ServerResponse: googleapi.ServerResponse{ 4629 Header: res.Header, 4630 HTTPStatusCode: res.StatusCode, 4631 }, 4632 } 4633 target := &ret 4634 if err := gensupport.DecodeResponse(target, res); err != nil { 4635 return nil, err 4636 } 4637 return ret, nil 4638 } 4639 4640 type ProjectsLocationsConnectionsRepositoriesBatchCreateCall struct { 4641 s *Service 4642 parent string 4643 batchcreaterepositoriesrequest *BatchCreateRepositoriesRequest 4644 urlParams_ gensupport.URLParams 4645 ctx_ context.Context 4646 header_ http.Header 4647 } 4648 4649 // BatchCreate: Creates multiple repositories inside a connection. 4650 // 4651 // - parent: The connection to contain all the repositories being created. 4652 // Format: projects/*/locations/*/connections/* The parent field in the 4653 // CreateRepositoryRequest messages must either be empty or match this field. 4654 func (r *ProjectsLocationsConnectionsRepositoriesService) BatchCreate(parent string, batchcreaterepositoriesrequest *BatchCreateRepositoriesRequest) *ProjectsLocationsConnectionsRepositoriesBatchCreateCall { 4655 c := &ProjectsLocationsConnectionsRepositoriesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4656 c.parent = parent 4657 c.batchcreaterepositoriesrequest = batchcreaterepositoriesrequest 4658 return c 4659 } 4660 4661 // Fields allows partial responses to be retrieved. See 4662 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4663 // details. 4664 func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesBatchCreateCall { 4665 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4666 return c 4667 } 4668 4669 // Context sets the context to be used in this call's Do method. 4670 func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesBatchCreateCall { 4671 c.ctx_ = ctx 4672 return c 4673 } 4674 4675 // Header returns a http.Header that can be modified by the caller to add 4676 // headers to the request. 4677 func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Header() http.Header { 4678 if c.header_ == nil { 4679 c.header_ = make(http.Header) 4680 } 4681 return c.header_ 4682 } 4683 4684 func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) doRequest(alt string) (*http.Response, error) { 4685 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4686 var body io.Reader = nil 4687 body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreaterepositoriesrequest) 4688 if err != nil { 4689 return nil, err 4690 } 4691 c.urlParams_.Set("alt", alt) 4692 c.urlParams_.Set("prettyPrint", "false") 4693 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/repositories:batchCreate") 4694 urls += "?" + c.urlParams_.Encode() 4695 req, err := http.NewRequest("POST", urls, body) 4696 if err != nil { 4697 return nil, err 4698 } 4699 req.Header = reqHeaders 4700 googleapi.Expand(req.URL, map[string]string{ 4701 "parent": c.parent, 4702 }) 4703 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4704 } 4705 4706 // Do executes the "cloudbuild.projects.locations.connections.repositories.batchCreate" call. 4707 // Any non-2xx status code is an error. Response headers are in either 4708 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4709 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4710 // whether the returned error was because http.StatusNotModified was returned. 4711 func (c *ProjectsLocationsConnectionsRepositoriesBatchCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4712 gensupport.SetOptions(c.urlParams_, opts...) 4713 res, err := c.doRequest("json") 4714 if res != nil && res.StatusCode == http.StatusNotModified { 4715 if res.Body != nil { 4716 res.Body.Close() 4717 } 4718 return nil, gensupport.WrapError(&googleapi.Error{ 4719 Code: res.StatusCode, 4720 Header: res.Header, 4721 }) 4722 } 4723 if err != nil { 4724 return nil, err 4725 } 4726 defer googleapi.CloseBody(res) 4727 if err := googleapi.CheckResponse(res); err != nil { 4728 return nil, gensupport.WrapError(err) 4729 } 4730 ret := &Operation{ 4731 ServerResponse: googleapi.ServerResponse{ 4732 Header: res.Header, 4733 HTTPStatusCode: res.StatusCode, 4734 }, 4735 } 4736 target := &ret 4737 if err := gensupport.DecodeResponse(target, res); err != nil { 4738 return nil, err 4739 } 4740 return ret, nil 4741 } 4742 4743 type ProjectsLocationsConnectionsRepositoriesCreateCall struct { 4744 s *Service 4745 parent string 4746 repository *Repository 4747 urlParams_ gensupport.URLParams 4748 ctx_ context.Context 4749 header_ http.Header 4750 } 4751 4752 // Create: Creates a Repository. 4753 // 4754 // - parent: The connection to contain the repository. If the request is part 4755 // of a BatchCreateRepositoriesRequest, this field should be empty or match 4756 // the parent specified there. 4757 func (r *ProjectsLocationsConnectionsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsConnectionsRepositoriesCreateCall { 4758 c := &ProjectsLocationsConnectionsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4759 c.parent = parent 4760 c.repository = repository 4761 return c 4762 } 4763 4764 // RepositoryId sets the optional parameter "repositoryId": Required. The ID to 4765 // use for the repository, which will become the final component of the 4766 // repository's resource name. This ID should be unique in the connection. 4767 // Allows alphanumeric characters and any of -._~%!$&'()*+,;=@. 4768 func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsConnectionsRepositoriesCreateCall { 4769 c.urlParams_.Set("repositoryId", repositoryId) 4770 return c 4771 } 4772 4773 // Fields allows partial responses to be retrieved. See 4774 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4775 // details. 4776 func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesCreateCall { 4777 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4778 return c 4779 } 4780 4781 // Context sets the context to be used in this call's Do method. 4782 func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesCreateCall { 4783 c.ctx_ = ctx 4784 return c 4785 } 4786 4787 // Header returns a http.Header that can be modified by the caller to add 4788 // headers to the request. 4789 func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Header() http.Header { 4790 if c.header_ == nil { 4791 c.header_ = make(http.Header) 4792 } 4793 return c.header_ 4794 } 4795 4796 func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) { 4797 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 4798 var body io.Reader = nil 4799 body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository) 4800 if err != nil { 4801 return nil, err 4802 } 4803 c.urlParams_.Set("alt", alt) 4804 c.urlParams_.Set("prettyPrint", "false") 4805 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/repositories") 4806 urls += "?" + c.urlParams_.Encode() 4807 req, err := http.NewRequest("POST", urls, body) 4808 if err != nil { 4809 return nil, err 4810 } 4811 req.Header = reqHeaders 4812 googleapi.Expand(req.URL, map[string]string{ 4813 "parent": c.parent, 4814 }) 4815 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4816 } 4817 4818 // Do executes the "cloudbuild.projects.locations.connections.repositories.create" call. 4819 // Any non-2xx status code is an error. Response headers are in either 4820 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4821 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4822 // whether the returned error was because http.StatusNotModified was returned. 4823 func (c *ProjectsLocationsConnectionsRepositoriesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4824 gensupport.SetOptions(c.urlParams_, opts...) 4825 res, err := c.doRequest("json") 4826 if res != nil && res.StatusCode == http.StatusNotModified { 4827 if res.Body != nil { 4828 res.Body.Close() 4829 } 4830 return nil, gensupport.WrapError(&googleapi.Error{ 4831 Code: res.StatusCode, 4832 Header: res.Header, 4833 }) 4834 } 4835 if err != nil { 4836 return nil, err 4837 } 4838 defer googleapi.CloseBody(res) 4839 if err := googleapi.CheckResponse(res); err != nil { 4840 return nil, gensupport.WrapError(err) 4841 } 4842 ret := &Operation{ 4843 ServerResponse: googleapi.ServerResponse{ 4844 Header: res.Header, 4845 HTTPStatusCode: res.StatusCode, 4846 }, 4847 } 4848 target := &ret 4849 if err := gensupport.DecodeResponse(target, res); err != nil { 4850 return nil, err 4851 } 4852 return ret, nil 4853 } 4854 4855 type ProjectsLocationsConnectionsRepositoriesDeleteCall struct { 4856 s *Service 4857 name string 4858 urlParams_ gensupport.URLParams 4859 ctx_ context.Context 4860 header_ http.Header 4861 } 4862 4863 // Delete: Deletes a single repository. 4864 // 4865 // - name: The name of the Repository to delete. Format: 4866 // `projects/*/locations/*/connections/*/repositories/*`. 4867 func (r *ProjectsLocationsConnectionsRepositoriesService) Delete(name string) *ProjectsLocationsConnectionsRepositoriesDeleteCall { 4868 c := &ProjectsLocationsConnectionsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4869 c.name = name 4870 return c 4871 } 4872 4873 // Etag sets the optional parameter "etag": The current etag of the repository. 4874 // If an etag is provided and does not match the current etag of the 4875 // repository, deletion will be blocked and an ABORTED error will be returned. 4876 func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Etag(etag string) *ProjectsLocationsConnectionsRepositoriesDeleteCall { 4877 c.urlParams_.Set("etag", etag) 4878 return c 4879 } 4880 4881 // ValidateOnly sets the optional parameter "validateOnly": If set, validate 4882 // the request, but do not actually post it. 4883 func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) ValidateOnly(validateOnly bool) *ProjectsLocationsConnectionsRepositoriesDeleteCall { 4884 c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) 4885 return c 4886 } 4887 4888 // Fields allows partial responses to be retrieved. See 4889 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 4890 // details. 4891 func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesDeleteCall { 4892 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4893 return c 4894 } 4895 4896 // Context sets the context to be used in this call's Do method. 4897 func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesDeleteCall { 4898 c.ctx_ = ctx 4899 return c 4900 } 4901 4902 // Header returns a http.Header that can be modified by the caller to add 4903 // headers to the request. 4904 func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Header() http.Header { 4905 if c.header_ == nil { 4906 c.header_ = make(http.Header) 4907 } 4908 return c.header_ 4909 } 4910 4911 func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) { 4912 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 4913 var body io.Reader = nil 4914 c.urlParams_.Set("alt", alt) 4915 c.urlParams_.Set("prettyPrint", "false") 4916 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 4917 urls += "?" + c.urlParams_.Encode() 4918 req, err := http.NewRequest("DELETE", urls, body) 4919 if err != nil { 4920 return nil, err 4921 } 4922 req.Header = reqHeaders 4923 googleapi.Expand(req.URL, map[string]string{ 4924 "name": c.name, 4925 }) 4926 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4927 } 4928 4929 // Do executes the "cloudbuild.projects.locations.connections.repositories.delete" call. 4930 // Any non-2xx status code is an error. Response headers are in either 4931 // *Operation.ServerResponse.Header or (if a response was returned at all) in 4932 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4933 // whether the returned error was because http.StatusNotModified was returned. 4934 func (c *ProjectsLocationsConnectionsRepositoriesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 4935 gensupport.SetOptions(c.urlParams_, opts...) 4936 res, err := c.doRequest("json") 4937 if res != nil && res.StatusCode == http.StatusNotModified { 4938 if res.Body != nil { 4939 res.Body.Close() 4940 } 4941 return nil, gensupport.WrapError(&googleapi.Error{ 4942 Code: res.StatusCode, 4943 Header: res.Header, 4944 }) 4945 } 4946 if err != nil { 4947 return nil, err 4948 } 4949 defer googleapi.CloseBody(res) 4950 if err := googleapi.CheckResponse(res); err != nil { 4951 return nil, gensupport.WrapError(err) 4952 } 4953 ret := &Operation{ 4954 ServerResponse: googleapi.ServerResponse{ 4955 Header: res.Header, 4956 HTTPStatusCode: res.StatusCode, 4957 }, 4958 } 4959 target := &ret 4960 if err := gensupport.DecodeResponse(target, res); err != nil { 4961 return nil, err 4962 } 4963 return ret, nil 4964 } 4965 4966 type ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall struct { 4967 s *Service 4968 repository string 4969 urlParams_ gensupport.URLParams 4970 ifNoneMatch_ string 4971 ctx_ context.Context 4972 header_ http.Header 4973 } 4974 4975 // FetchGitRefs: Fetch the list of branches or tags for a given repository. 4976 // 4977 // - repository: The resource name of the repository in the format 4978 // `projects/*/locations/*/connections/*/repositories/*`. 4979 func (r *ProjectsLocationsConnectionsRepositoriesService) FetchGitRefs(repository string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { 4980 c := &ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4981 c.repository = repository 4982 return c 4983 } 4984 4985 // PageSize sets the optional parameter "pageSize": Number of results to return 4986 // in the list. Default to 20. 4987 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { 4988 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4989 return c 4990 } 4991 4992 // PageToken sets the optional parameter "pageToken": Page start. 4993 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) PageToken(pageToken string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { 4994 c.urlParams_.Set("pageToken", pageToken) 4995 return c 4996 } 4997 4998 // RefType sets the optional parameter "refType": Type of refs to fetch 4999 // 5000 // Possible values: 5001 // 5002 // "REF_TYPE_UNSPECIFIED" - No type specified. 5003 // "TAG" - To fetch tags. 5004 // "BRANCH" - To fetch branches. 5005 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) RefType(refType string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { 5006 c.urlParams_.Set("refType", refType) 5007 return c 5008 } 5009 5010 // Fields allows partial responses to be retrieved. See 5011 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5012 // details. 5013 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { 5014 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5015 return c 5016 } 5017 5018 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5019 // object's ETag matches the given value. This is useful for getting updates 5020 // only after the object has changed since the last request. 5021 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { 5022 c.ifNoneMatch_ = entityTag 5023 return c 5024 } 5025 5026 // Context sets the context to be used in this call's Do method. 5027 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall { 5028 c.ctx_ = ctx 5029 return c 5030 } 5031 5032 // Header returns a http.Header that can be modified by the caller to add 5033 // headers to the request. 5034 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Header() http.Header { 5035 if c.header_ == nil { 5036 c.header_ = make(http.Header) 5037 } 5038 return c.header_ 5039 } 5040 5041 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) doRequest(alt string) (*http.Response, error) { 5042 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5043 if c.ifNoneMatch_ != "" { 5044 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5045 } 5046 var body io.Reader = nil 5047 c.urlParams_.Set("alt", alt) 5048 c.urlParams_.Set("prettyPrint", "false") 5049 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+repository}:fetchGitRefs") 5050 urls += "?" + c.urlParams_.Encode() 5051 req, err := http.NewRequest("GET", urls, body) 5052 if err != nil { 5053 return nil, err 5054 } 5055 req.Header = reqHeaders 5056 googleapi.Expand(req.URL, map[string]string{ 5057 "repository": c.repository, 5058 }) 5059 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5060 } 5061 5062 // Do executes the "cloudbuild.projects.locations.connections.repositories.fetchGitRefs" call. 5063 // Any non-2xx status code is an error. Response headers are in either 5064 // *FetchGitRefsResponse.ServerResponse.Header or (if a response was returned 5065 // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 5066 // check whether the returned error was because http.StatusNotModified was 5067 // returned. 5068 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Do(opts ...googleapi.CallOption) (*FetchGitRefsResponse, error) { 5069 gensupport.SetOptions(c.urlParams_, opts...) 5070 res, err := c.doRequest("json") 5071 if res != nil && res.StatusCode == http.StatusNotModified { 5072 if res.Body != nil { 5073 res.Body.Close() 5074 } 5075 return nil, gensupport.WrapError(&googleapi.Error{ 5076 Code: res.StatusCode, 5077 Header: res.Header, 5078 }) 5079 } 5080 if err != nil { 5081 return nil, err 5082 } 5083 defer googleapi.CloseBody(res) 5084 if err := googleapi.CheckResponse(res); err != nil { 5085 return nil, gensupport.WrapError(err) 5086 } 5087 ret := &FetchGitRefsResponse{ 5088 ServerResponse: googleapi.ServerResponse{ 5089 Header: res.Header, 5090 HTTPStatusCode: res.StatusCode, 5091 }, 5092 } 5093 target := &ret 5094 if err := gensupport.DecodeResponse(target, res); err != nil { 5095 return nil, err 5096 } 5097 return ret, nil 5098 } 5099 5100 // Pages invokes f for each page of results. 5101 // A non-nil error returned from f will halt the iteration. 5102 // The provided context supersedes any context provided to the Context method. 5103 func (c *ProjectsLocationsConnectionsRepositoriesFetchGitRefsCall) Pages(ctx context.Context, f func(*FetchGitRefsResponse) error) error { 5104 c.ctx_ = ctx 5105 defer c.PageToken(c.urlParams_.Get("pageToken")) 5106 for { 5107 x, err := c.Do() 5108 if err != nil { 5109 return err 5110 } 5111 if err := f(x); err != nil { 5112 return err 5113 } 5114 if x.NextPageToken == "" { 5115 return nil 5116 } 5117 c.PageToken(x.NextPageToken) 5118 } 5119 } 5120 5121 type ProjectsLocationsConnectionsRepositoriesGetCall struct { 5122 s *Service 5123 name string 5124 urlParams_ gensupport.URLParams 5125 ifNoneMatch_ string 5126 ctx_ context.Context 5127 header_ http.Header 5128 } 5129 5130 // Get: Gets details of a single repository. 5131 // 5132 // - name: The name of the Repository to retrieve. Format: 5133 // `projects/*/locations/*/connections/*/repositories/*`. 5134 func (r *ProjectsLocationsConnectionsRepositoriesService) Get(name string) *ProjectsLocationsConnectionsRepositoriesGetCall { 5135 c := &ProjectsLocationsConnectionsRepositoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5136 c.name = name 5137 return c 5138 } 5139 5140 // Fields allows partial responses to be retrieved. See 5141 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5142 // details. 5143 func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesGetCall { 5144 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5145 return c 5146 } 5147 5148 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5149 // object's ETag matches the given value. This is useful for getting updates 5150 // only after the object has changed since the last request. 5151 func (c *ProjectsLocationsConnectionsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRepositoriesGetCall { 5152 c.ifNoneMatch_ = entityTag 5153 return c 5154 } 5155 5156 // Context sets the context to be used in this call's Do method. 5157 func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesGetCall { 5158 c.ctx_ = ctx 5159 return c 5160 } 5161 5162 // Header returns a http.Header that can be modified by the caller to add 5163 // headers to the request. 5164 func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Header() http.Header { 5165 if c.header_ == nil { 5166 c.header_ = make(http.Header) 5167 } 5168 return c.header_ 5169 } 5170 5171 func (c *ProjectsLocationsConnectionsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) { 5172 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5173 if c.ifNoneMatch_ != "" { 5174 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5175 } 5176 var body io.Reader = nil 5177 c.urlParams_.Set("alt", alt) 5178 c.urlParams_.Set("prettyPrint", "false") 5179 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 5180 urls += "?" + c.urlParams_.Encode() 5181 req, err := http.NewRequest("GET", urls, body) 5182 if err != nil { 5183 return nil, err 5184 } 5185 req.Header = reqHeaders 5186 googleapi.Expand(req.URL, map[string]string{ 5187 "name": c.name, 5188 }) 5189 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5190 } 5191 5192 // Do executes the "cloudbuild.projects.locations.connections.repositories.get" call. 5193 // Any non-2xx status code is an error. Response headers are in either 5194 // *Repository.ServerResponse.Header or (if a response was returned at all) in 5195 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5196 // whether the returned error was because http.StatusNotModified was returned. 5197 func (c *ProjectsLocationsConnectionsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, error) { 5198 gensupport.SetOptions(c.urlParams_, opts...) 5199 res, err := c.doRequest("json") 5200 if res != nil && res.StatusCode == http.StatusNotModified { 5201 if res.Body != nil { 5202 res.Body.Close() 5203 } 5204 return nil, gensupport.WrapError(&googleapi.Error{ 5205 Code: res.StatusCode, 5206 Header: res.Header, 5207 }) 5208 } 5209 if err != nil { 5210 return nil, err 5211 } 5212 defer googleapi.CloseBody(res) 5213 if err := googleapi.CheckResponse(res); err != nil { 5214 return nil, gensupport.WrapError(err) 5215 } 5216 ret := &Repository{ 5217 ServerResponse: googleapi.ServerResponse{ 5218 Header: res.Header, 5219 HTTPStatusCode: res.StatusCode, 5220 }, 5221 } 5222 target := &ret 5223 if err := gensupport.DecodeResponse(target, res); err != nil { 5224 return nil, err 5225 } 5226 return ret, nil 5227 } 5228 5229 type ProjectsLocationsConnectionsRepositoriesListCall struct { 5230 s *Service 5231 parent string 5232 urlParams_ gensupport.URLParams 5233 ifNoneMatch_ string 5234 ctx_ context.Context 5235 header_ http.Header 5236 } 5237 5238 // List: Lists Repositories in a given connection. 5239 // 5240 // - parent: The parent, which owns this collection of Repositories. Format: 5241 // `projects/*/locations/*/connections/*`. 5242 func (r *ProjectsLocationsConnectionsRepositoriesService) List(parent string) *ProjectsLocationsConnectionsRepositoriesListCall { 5243 c := &ProjectsLocationsConnectionsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5244 c.parent = parent 5245 return c 5246 } 5247 5248 // Filter sets the optional parameter "filter": A filter expression that 5249 // filters resources listed in the response. Expressions must follow API 5250 // improvement proposal AIP-160 (https://google.aip.dev/160). e.g. 5251 // `remote_uri:"https://github.com*". 5252 func (c *ProjectsLocationsConnectionsRepositoriesListCall) Filter(filter string) *ProjectsLocationsConnectionsRepositoriesListCall { 5253 c.urlParams_.Set("filter", filter) 5254 return c 5255 } 5256 5257 // PageSize sets the optional parameter "pageSize": Number of results to return 5258 // in the list. 5259 func (c *ProjectsLocationsConnectionsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsConnectionsRepositoriesListCall { 5260 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 5261 return c 5262 } 5263 5264 // PageToken sets the optional parameter "pageToken": Page start. 5265 func (c *ProjectsLocationsConnectionsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsConnectionsRepositoriesListCall { 5266 c.urlParams_.Set("pageToken", pageToken) 5267 return c 5268 } 5269 5270 // Fields allows partial responses to be retrieved. See 5271 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5272 // details. 5273 func (c *ProjectsLocationsConnectionsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsConnectionsRepositoriesListCall { 5274 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5275 return c 5276 } 5277 5278 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5279 // object's ETag matches the given value. This is useful for getting updates 5280 // only after the object has changed since the last request. 5281 func (c *ProjectsLocationsConnectionsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsConnectionsRepositoriesListCall { 5282 c.ifNoneMatch_ = entityTag 5283 return c 5284 } 5285 5286 // Context sets the context to be used in this call's Do method. 5287 func (c *ProjectsLocationsConnectionsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsConnectionsRepositoriesListCall { 5288 c.ctx_ = ctx 5289 return c 5290 } 5291 5292 // Header returns a http.Header that can be modified by the caller to add 5293 // headers to the request. 5294 func (c *ProjectsLocationsConnectionsRepositoriesListCall) Header() http.Header { 5295 if c.header_ == nil { 5296 c.header_ = make(http.Header) 5297 } 5298 return c.header_ 5299 } 5300 5301 func (c *ProjectsLocationsConnectionsRepositoriesListCall) doRequest(alt string) (*http.Response, error) { 5302 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5303 if c.ifNoneMatch_ != "" { 5304 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5305 } 5306 var body io.Reader = nil 5307 c.urlParams_.Set("alt", alt) 5308 c.urlParams_.Set("prettyPrint", "false") 5309 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/repositories") 5310 urls += "?" + c.urlParams_.Encode() 5311 req, err := http.NewRequest("GET", urls, body) 5312 if err != nil { 5313 return nil, err 5314 } 5315 req.Header = reqHeaders 5316 googleapi.Expand(req.URL, map[string]string{ 5317 "parent": c.parent, 5318 }) 5319 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5320 } 5321 5322 // Do executes the "cloudbuild.projects.locations.connections.repositories.list" call. 5323 // Any non-2xx status code is an error. Response headers are in either 5324 // *ListRepositoriesResponse.ServerResponse.Header or (if a response was 5325 // returned at all) in error.(*googleapi.Error).Header. Use 5326 // googleapi.IsNotModified to check whether the returned error was because 5327 // http.StatusNotModified was returned. 5328 func (c *ProjectsLocationsConnectionsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, error) { 5329 gensupport.SetOptions(c.urlParams_, opts...) 5330 res, err := c.doRequest("json") 5331 if res != nil && res.StatusCode == http.StatusNotModified { 5332 if res.Body != nil { 5333 res.Body.Close() 5334 } 5335 return nil, gensupport.WrapError(&googleapi.Error{ 5336 Code: res.StatusCode, 5337 Header: res.Header, 5338 }) 5339 } 5340 if err != nil { 5341 return nil, err 5342 } 5343 defer googleapi.CloseBody(res) 5344 if err := googleapi.CheckResponse(res); err != nil { 5345 return nil, gensupport.WrapError(err) 5346 } 5347 ret := &ListRepositoriesResponse{ 5348 ServerResponse: googleapi.ServerResponse{ 5349 Header: res.Header, 5350 HTTPStatusCode: res.StatusCode, 5351 }, 5352 } 5353 target := &ret 5354 if err := gensupport.DecodeResponse(target, res); err != nil { 5355 return nil, err 5356 } 5357 return ret, nil 5358 } 5359 5360 // Pages invokes f for each page of results. 5361 // A non-nil error returned from f will halt the iteration. 5362 // The provided context supersedes any context provided to the Context method. 5363 func (c *ProjectsLocationsConnectionsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) error) error { 5364 c.ctx_ = ctx 5365 defer c.PageToken(c.urlParams_.Get("pageToken")) 5366 for { 5367 x, err := c.Do() 5368 if err != nil { 5369 return err 5370 } 5371 if err := f(x); err != nil { 5372 return err 5373 } 5374 if x.NextPageToken == "" { 5375 return nil 5376 } 5377 c.PageToken(x.NextPageToken) 5378 } 5379 } 5380 5381 type ProjectsLocationsOperationsCancelCall struct { 5382 s *Service 5383 name string 5384 canceloperationrequest *CancelOperationRequest 5385 urlParams_ gensupport.URLParams 5386 ctx_ context.Context 5387 header_ http.Header 5388 } 5389 5390 // Cancel: Starts asynchronous cancellation on a long-running operation. The 5391 // server makes a best effort to cancel the operation, but success is not 5392 // guaranteed. If the server doesn't support this method, it returns 5393 // `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or 5394 // other methods to check whether the cancellation succeeded or whether the 5395 // operation completed despite cancellation. On successful cancellation, the 5396 // operation is not deleted; instead, it becomes an operation with an 5397 // Operation.error value with a google.rpc.Status.code of 1, corresponding to 5398 // `Code.CANCELLED`. 5399 // 5400 // - name: The name of the operation resource to be cancelled. 5401 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 5402 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5403 c.name = name 5404 c.canceloperationrequest = canceloperationrequest 5405 return c 5406 } 5407 5408 // Fields allows partial responses to be retrieved. See 5409 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5410 // details. 5411 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 5412 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5413 return c 5414 } 5415 5416 // Context sets the context to be used in this call's Do method. 5417 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 5418 c.ctx_ = ctx 5419 return c 5420 } 5421 5422 // Header returns a http.Header that can be modified by the caller to add 5423 // headers to the request. 5424 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 5425 if c.header_ == nil { 5426 c.header_ = make(http.Header) 5427 } 5428 return c.header_ 5429 } 5430 5431 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 5432 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) 5433 var body io.Reader = nil 5434 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 5435 if err != nil { 5436 return nil, err 5437 } 5438 c.urlParams_.Set("alt", alt) 5439 c.urlParams_.Set("prettyPrint", "false") 5440 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:cancel") 5441 urls += "?" + c.urlParams_.Encode() 5442 req, err := http.NewRequest("POST", urls, body) 5443 if err != nil { 5444 return nil, err 5445 } 5446 req.Header = reqHeaders 5447 googleapi.Expand(req.URL, map[string]string{ 5448 "name": c.name, 5449 }) 5450 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5451 } 5452 5453 // Do executes the "cloudbuild.projects.locations.operations.cancel" call. 5454 // Any non-2xx status code is an error. Response headers are in either 5455 // *Empty.ServerResponse.Header or (if a response was returned at all) in 5456 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5457 // whether the returned error was because http.StatusNotModified was returned. 5458 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 5459 gensupport.SetOptions(c.urlParams_, opts...) 5460 res, err := c.doRequest("json") 5461 if res != nil && res.StatusCode == http.StatusNotModified { 5462 if res.Body != nil { 5463 res.Body.Close() 5464 } 5465 return nil, gensupport.WrapError(&googleapi.Error{ 5466 Code: res.StatusCode, 5467 Header: res.Header, 5468 }) 5469 } 5470 if err != nil { 5471 return nil, err 5472 } 5473 defer googleapi.CloseBody(res) 5474 if err := googleapi.CheckResponse(res); err != nil { 5475 return nil, gensupport.WrapError(err) 5476 } 5477 ret := &Empty{ 5478 ServerResponse: googleapi.ServerResponse{ 5479 Header: res.Header, 5480 HTTPStatusCode: res.StatusCode, 5481 }, 5482 } 5483 target := &ret 5484 if err := gensupport.DecodeResponse(target, res); err != nil { 5485 return nil, err 5486 } 5487 return ret, nil 5488 } 5489 5490 type ProjectsLocationsOperationsGetCall struct { 5491 s *Service 5492 name string 5493 urlParams_ gensupport.URLParams 5494 ifNoneMatch_ string 5495 ctx_ context.Context 5496 header_ http.Header 5497 } 5498 5499 // Get: Gets the latest state of a long-running operation. Clients can use this 5500 // method to poll the operation result at intervals as recommended by the API 5501 // service. 5502 // 5503 // - name: The name of the operation resource. 5504 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 5505 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 5506 c.name = name 5507 return c 5508 } 5509 5510 // Fields allows partial responses to be retrieved. See 5511 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more 5512 // details. 5513 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 5514 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 5515 return c 5516 } 5517 5518 // IfNoneMatch sets an optional parameter which makes the operation fail if the 5519 // object's ETag matches the given value. This is useful for getting updates 5520 // only after the object has changed since the last request. 5521 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 5522 c.ifNoneMatch_ = entityTag 5523 return c 5524 } 5525 5526 // Context sets the context to be used in this call's Do method. 5527 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 5528 c.ctx_ = ctx 5529 return c 5530 } 5531 5532 // Header returns a http.Header that can be modified by the caller to add 5533 // headers to the request. 5534 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 5535 if c.header_ == nil { 5536 c.header_ = make(http.Header) 5537 } 5538 return c.header_ 5539 } 5540 5541 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 5542 reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) 5543 if c.ifNoneMatch_ != "" { 5544 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5545 } 5546 var body io.Reader = nil 5547 c.urlParams_.Set("alt", alt) 5548 c.urlParams_.Set("prettyPrint", "false") 5549 urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}") 5550 urls += "?" + c.urlParams_.Encode() 5551 req, err := http.NewRequest("GET", urls, body) 5552 if err != nil { 5553 return nil, err 5554 } 5555 req.Header = reqHeaders 5556 googleapi.Expand(req.URL, map[string]string{ 5557 "name": c.name, 5558 }) 5559 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5560 } 5561 5562 // Do executes the "cloudbuild.projects.locations.operations.get" call. 5563 // Any non-2xx status code is an error. Response headers are in either 5564 // *Operation.ServerResponse.Header or (if a response was returned at all) in 5565 // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 5566 // whether the returned error was because http.StatusNotModified was returned. 5567 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 5568 gensupport.SetOptions(c.urlParams_, opts...) 5569 res, err := c.doRequest("json") 5570 if res != nil && res.StatusCode == http.StatusNotModified { 5571 if res.Body != nil { 5572 res.Body.Close() 5573 } 5574 return nil, gensupport.WrapError(&googleapi.Error{ 5575 Code: res.StatusCode, 5576 Header: res.Header, 5577 }) 5578 } 5579 if err != nil { 5580 return nil, err 5581 } 5582 defer googleapi.CloseBody(res) 5583 if err := googleapi.CheckResponse(res); err != nil { 5584 return nil, gensupport.WrapError(err) 5585 } 5586 ret := &Operation{ 5587 ServerResponse: googleapi.ServerResponse{ 5588 Header: res.Header, 5589 HTTPStatusCode: res.StatusCode, 5590 }, 5591 } 5592 target := &ret 5593 if err := gensupport.DecodeResponse(target, res); err != nil { 5594 return nil, err 5595 } 5596 return ret, nil 5597 } 5598