1 // Copyright 2023 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 // # Creating a client 12 // 13 // Usage example: 14 // 15 // import "google.golang.org/api/cloudbuild/v1alpha1" 16 // ... 17 // ctx := context.Background() 18 // cloudbuildService, err := cloudbuild.NewService(ctx) 19 // 20 // In this example, Google Application Default Credentials are used for authentication. 21 // 22 // For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. 23 // 24 // # Other authentication options 25 // 26 // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey: 27 // 28 // cloudbuildService, err := cloudbuild.NewService(ctx, option.WithAPIKey("AIza...")) 29 // 30 // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource: 31 // 32 // config := &oauth2.Config{...} 33 // // ... 34 // token, err := config.Exchange(ctx, ...) 35 // cloudbuildService, err := cloudbuild.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36 // 37 // See https://godoc.org/google.golang.org/api/option/ for details on options. 38 package cloudbuild // import "google.golang.org/api/cloudbuild/v1alpha1" 39 40 import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 internal "google.golang.org/api/internal" 54 gensupport "google.golang.org/api/internal/gensupport" 55 option "google.golang.org/api/option" 56 internaloption "google.golang.org/api/option/internaloption" 57 htransport "google.golang.org/api/transport/http" 58 ) 59 60 // Always reference these packages, just in case the auto-generated code 61 // below doesn't. 62 var _ = bytes.NewBuffer 63 var _ = strconv.Itoa 64 var _ = fmt.Sprintf 65 var _ = json.NewDecoder 66 var _ = io.Copy 67 var _ = url.Parse 68 var _ = gensupport.MarshalJSON 69 var _ = googleapi.Version 70 var _ = errors.New 71 var _ = strings.Replace 72 var _ = context.Canceled 73 var _ = internaloption.WithDefaultEndpoint 74 75 const apiId = "cloudbuild:v1alpha1" 76 const apiName = "cloudbuild" 77 const apiVersion = "v1alpha1" 78 const basePath = "https://cloudbuild.googleapis.com/" 79 const mtlsBasePath = "https://cloudbuild.mtls.googleapis.com/" 80 81 // OAuth2 scopes used by this API. 82 const ( 83 // See, edit, configure, and delete your Google Cloud data and see the 84 // email address for your Google Account. 85 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 86 ) 87 88 // NewService creates a new Service. 89 func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 90 scopesOption := internaloption.WithDefaultScopes( 91 "https://www.googleapis.com/auth/cloud-platform", 92 ) 93 // NOTE: prepend, so we don't override user-specified scopes. 94 opts = append([]option.ClientOption{scopesOption}, opts...) 95 opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) 96 opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) 97 client, endpoint, err := htransport.NewClient(ctx, opts...) 98 if err != nil { 99 return nil, err 100 } 101 s, err := New(client) 102 if err != nil { 103 return nil, err 104 } 105 if endpoint != "" { 106 s.BasePath = endpoint 107 } 108 return s, nil 109 } 110 111 // New creates a new Service. It uses the provided http.Client for requests. 112 // 113 // Deprecated: please use NewService instead. 114 // To provide a custom HTTP client, use option.WithHTTPClient. 115 // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 116 func New(client *http.Client) (*Service, error) { 117 if client == nil { 118 return nil, errors.New("client is nil") 119 } 120 s := &Service{client: client, BasePath: basePath} 121 s.Projects = NewProjectsService(s) 122 return s, nil 123 } 124 125 type Service struct { 126 client *http.Client 127 BasePath string // API endpoint base URL 128 UserAgent string // optional additional User-Agent fragment 129 130 Projects *ProjectsService 131 } 132 133 func (s *Service) userAgent() string { 134 if s.UserAgent == "" { 135 return googleapi.UserAgent 136 } 137 return googleapi.UserAgent + " " + s.UserAgent 138 } 139 140 func NewProjectsService(s *Service) *ProjectsService { 141 rs := &ProjectsService{s: s} 142 rs.Locations = NewProjectsLocationsService(s) 143 rs.WorkerPools = NewProjectsWorkerPoolsService(s) 144 return rs 145 } 146 147 type ProjectsService struct { 148 s *Service 149 150 Locations *ProjectsLocationsService 151 152 WorkerPools *ProjectsWorkerPoolsService 153 } 154 155 func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { 156 rs := &ProjectsLocationsService{s: s} 157 rs.Operations = NewProjectsLocationsOperationsService(s) 158 return rs 159 } 160 161 type ProjectsLocationsService struct { 162 s *Service 163 164 Operations *ProjectsLocationsOperationsService 165 } 166 167 func NewProjectsLocationsOperationsService(s *Service) *ProjectsLocationsOperationsService { 168 rs := &ProjectsLocationsOperationsService{s: s} 169 return rs 170 } 171 172 type ProjectsLocationsOperationsService struct { 173 s *Service 174 } 175 176 func NewProjectsWorkerPoolsService(s *Service) *ProjectsWorkerPoolsService { 177 rs := &ProjectsWorkerPoolsService{s: s} 178 return rs 179 } 180 181 type ProjectsWorkerPoolsService struct { 182 s *Service 183 } 184 185 // ApprovalConfig: ApprovalConfig describes configuration for manual 186 // approval of a build. 187 type ApprovalConfig struct { 188 // ApprovalRequired: Whether or not approval is needed. If this is set 189 // on a build, it will become pending when created, and will need to be 190 // explicitly approved to start. 191 ApprovalRequired bool `json:"approvalRequired,omitempty"` 192 193 // ForceSendFields is a list of field names (e.g. "ApprovalRequired") to 194 // unconditionally include in API requests. By default, fields with 195 // empty or default values are omitted from API requests. However, any 196 // non-pointer, non-interface field appearing in ForceSendFields will be 197 // sent to the server regardless of whether the field is empty or not. 198 // This may be used to include empty fields in Patch requests. 199 ForceSendFields []string `json:"-"` 200 201 // NullFields is a list of field names (e.g. "ApprovalRequired") to 202 // include in API requests with the JSON null value. By default, fields 203 // with empty values are omitted from API requests. However, any field 204 // with an empty value appearing in NullFields will be sent to the 205 // server as null. It is an error if a field in this list has a 206 // non-empty value. This may be used to include null fields in Patch 207 // requests. 208 NullFields []string `json:"-"` 209 } 210 211 func (s *ApprovalConfig) MarshalJSON() ([]byte, error) { 212 type NoMethod ApprovalConfig 213 raw := NoMethod(*s) 214 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 215 } 216 217 // ApprovalResult: ApprovalResult describes the decision and associated 218 // metadata of a manual approval of a build. 219 type ApprovalResult struct { 220 // ApprovalTime: Output only. The time when the approval decision was 221 // made. 222 ApprovalTime string `json:"approvalTime,omitempty"` 223 224 // ApproverAccount: Output only. Email of the user that called the 225 // ApproveBuild API to approve or reject a build at the time that the 226 // API was called. 227 ApproverAccount string `json:"approverAccount,omitempty"` 228 229 // Comment: Optional. An optional comment for this manual approval 230 // result. 231 Comment string `json:"comment,omitempty"` 232 233 // Decision: Required. The decision of this manual approval. 234 // 235 // Possible values: 236 // "DECISION_UNSPECIFIED" - Default enum type. This should not be 237 // used. 238 // "APPROVED" - Build is approved. 239 // "REJECTED" - Build is rejected. 240 Decision string `json:"decision,omitempty"` 241 242 // Url: Optional. An optional URL tied to this manual approval result. 243 // This field is essentially the same as comment, except that it will be 244 // rendered by the UI differently. An example use case is a link to an 245 // external job that approved this Build. 246 Url string `json:"url,omitempty"` 247 248 // ForceSendFields is a list of field names (e.g. "ApprovalTime") to 249 // unconditionally include in API requests. By default, fields with 250 // empty or default values are omitted from API requests. However, any 251 // non-pointer, non-interface field appearing in ForceSendFields will be 252 // sent to the server regardless of whether the field is empty or not. 253 // This may be used to include empty fields in Patch requests. 254 ForceSendFields []string `json:"-"` 255 256 // NullFields is a list of field names (e.g. "ApprovalTime") to include 257 // in API requests with the JSON null value. By default, fields with 258 // empty values are omitted from API requests. However, any field with 259 // an empty value appearing in NullFields will be sent to the server as 260 // null. It is an error if a field in this list has a non-empty value. 261 // This may be used to include null fields in Patch requests. 262 NullFields []string `json:"-"` 263 } 264 265 func (s *ApprovalResult) MarshalJSON() ([]byte, error) { 266 type NoMethod ApprovalResult 267 raw := NoMethod(*s) 268 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 269 } 270 271 // ArtifactObjects: Files in the workspace to upload to Cloud Storage 272 // upon successful completion of all build steps. 273 type ArtifactObjects struct { 274 // Location: Cloud Storage bucket and optional object path, in the form 275 // "gs://bucket/path/to/somewhere/". (see Bucket Name Requirements 276 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 277 // Files in the workspace matching any path pattern will be uploaded to 278 // Cloud Storage with this location as a prefix. 279 Location string `json:"location,omitempty"` 280 281 // Paths: Path globs used to match files in the build's workspace. 282 Paths []string `json:"paths,omitempty"` 283 284 // Timing: Output only. Stores timing information for pushing all 285 // artifact objects. 286 Timing *TimeSpan `json:"timing,omitempty"` 287 288 // ForceSendFields is a list of field names (e.g. "Location") to 289 // unconditionally include in API requests. By default, fields with 290 // empty or default values are omitted from API requests. However, any 291 // non-pointer, non-interface field appearing in ForceSendFields will be 292 // sent to the server regardless of whether the field is empty or not. 293 // This may be used to include empty fields in Patch requests. 294 ForceSendFields []string `json:"-"` 295 296 // NullFields is a list of field names (e.g. "Location") to include in 297 // API requests with the JSON null value. By default, fields with empty 298 // values are omitted from API requests. However, any field with an 299 // empty value appearing in NullFields will be sent to the server as 300 // null. It is an error if a field in this list has a non-empty value. 301 // This may be used to include null fields in Patch requests. 302 NullFields []string `json:"-"` 303 } 304 305 func (s *ArtifactObjects) MarshalJSON() ([]byte, error) { 306 type NoMethod ArtifactObjects 307 raw := NoMethod(*s) 308 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 309 } 310 311 // ArtifactResult: An artifact that was uploaded during a build. This is 312 // a single record in the artifact manifest JSON file. 313 type ArtifactResult struct { 314 // FileHash: The file hash of the artifact. 315 FileHash []*FileHashes `json:"fileHash,omitempty"` 316 317 // Location: The path of an artifact in a Google Cloud Storage bucket, 318 // with the generation number. For example, 319 // `gs://mybucket/path/to/output.jar#generation`. 320 Location string `json:"location,omitempty"` 321 322 // ForceSendFields is a list of field names (e.g. "FileHash") to 323 // unconditionally include in API requests. By default, fields with 324 // empty or default values are omitted from API requests. However, any 325 // non-pointer, non-interface field appearing in ForceSendFields will be 326 // sent to the server regardless of whether the field is empty or not. 327 // This may be used to include empty fields in Patch requests. 328 ForceSendFields []string `json:"-"` 329 330 // NullFields is a list of field names (e.g. "FileHash") to include in 331 // API requests with the JSON null value. By default, fields with empty 332 // values are omitted from API requests. However, any field with an 333 // empty value appearing in NullFields will be sent to the server as 334 // null. It is an error if a field in this list has a non-empty value. 335 // This may be used to include null fields in Patch requests. 336 NullFields []string `json:"-"` 337 } 338 339 func (s *ArtifactResult) MarshalJSON() ([]byte, error) { 340 type NoMethod ArtifactResult 341 raw := NoMethod(*s) 342 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 343 } 344 345 // Artifacts: Artifacts produced by a build that should be uploaded upon 346 // successful completion of all build steps. 347 type Artifacts struct { 348 // Images: A list of images to be pushed upon the successful completion 349 // of all build steps. The images will be pushed using the builder 350 // service account's credentials. The digests of the pushed images will 351 // be stored in the Build resource's results field. If any of the images 352 // fail to be pushed, the build is marked FAILURE. 353 Images []string `json:"images,omitempty"` 354 355 // MavenArtifacts: A list of Maven artifacts to be uploaded to Artifact 356 // Registry upon successful completion of all build steps. Artifacts in 357 // the workspace matching specified paths globs will be uploaded to the 358 // specified Artifact Registry repository using the builder service 359 // account's credentials. If any artifacts fail to be pushed, the build 360 // is marked FAILURE. 361 MavenArtifacts []*MavenArtifact `json:"mavenArtifacts,omitempty"` 362 363 // Objects: A list of objects to be uploaded to Cloud Storage upon 364 // successful completion of all build steps. Files in the workspace 365 // matching specified paths globs will be uploaded to the specified 366 // Cloud Storage location using the builder service account's 367 // credentials. The location and generation of the uploaded objects will 368 // be stored in the Build resource's results field. If any objects fail 369 // to be pushed, the build is marked FAILURE. 370 Objects *ArtifactObjects `json:"objects,omitempty"` 371 372 // PythonPackages: A list of Python packages to be uploaded to Artifact 373 // Registry upon successful completion of all build steps. The build 374 // service account credentials will be used to perform the upload. If 375 // any objects fail to be pushed, the build is marked FAILURE. 376 PythonPackages []*PythonPackage `json:"pythonPackages,omitempty"` 377 378 // ForceSendFields is a list of field names (e.g. "Images") to 379 // unconditionally include in API requests. By default, fields with 380 // empty or default values are omitted from API requests. However, any 381 // non-pointer, non-interface field appearing in ForceSendFields will be 382 // sent to the server regardless of whether the field is empty or not. 383 // This may be used to include empty fields in Patch requests. 384 ForceSendFields []string `json:"-"` 385 386 // NullFields is a list of field names (e.g. "Images") to include in API 387 // requests with the JSON null value. By default, fields with empty 388 // values are omitted from API requests. However, any field with an 389 // empty value appearing in NullFields will be sent to the server as 390 // null. It is an error if a field in this list has a non-empty value. 391 // This may be used to include null fields in Patch requests. 392 NullFields []string `json:"-"` 393 } 394 395 func (s *Artifacts) MarshalJSON() ([]byte, error) { 396 type NoMethod Artifacts 397 raw := NoMethod(*s) 398 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 399 } 400 401 // BatchCreateBitbucketServerConnectedRepositoriesResponse: Response of 402 // BatchCreateBitbucketServerConnectedRepositories RPC method including 403 // all successfully connected Bitbucket Server repositories. 404 type BatchCreateBitbucketServerConnectedRepositoriesResponse struct { 405 // BitbucketServerConnectedRepositories: The connected Bitbucket Server 406 // repositories. 407 BitbucketServerConnectedRepositories []*BitbucketServerConnectedRepository `json:"bitbucketServerConnectedRepositories,omitempty"` 408 409 // ForceSendFields is a list of field names (e.g. 410 // "BitbucketServerConnectedRepositories") to unconditionally include in 411 // API requests. By default, fields with empty or default values are 412 // omitted from API requests. However, any non-pointer, non-interface 413 // field appearing in ForceSendFields will be sent to the server 414 // regardless of whether the field is empty or not. This may be used to 415 // include empty fields in Patch requests. 416 ForceSendFields []string `json:"-"` 417 418 // NullFields is a list of field names (e.g. 419 // "BitbucketServerConnectedRepositories") to include in API requests 420 // with the JSON null value. By default, fields with empty values are 421 // omitted from API requests. However, any field with an empty value 422 // appearing in NullFields will be sent to the server as null. It is an 423 // error if a field in this list has a non-empty value. This may be used 424 // to include null fields in Patch requests. 425 NullFields []string `json:"-"` 426 } 427 428 func (s *BatchCreateBitbucketServerConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) { 429 type NoMethod BatchCreateBitbucketServerConnectedRepositoriesResponse 430 raw := NoMethod(*s) 431 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 432 } 433 434 // BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata: 435 // Metadata for `BatchCreateBitbucketServerConnectedRepositories` 436 // operation. 437 type BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata struct { 438 // CompleteTime: Time the operation was completed. 439 CompleteTime string `json:"completeTime,omitempty"` 440 441 // Config: The name of the `BitbucketServerConfig` that added connected 442 // repositories. Format: 443 // `projects/{project}/locations/{location}/bitbucketServerConfigs/{confi 444 // g}` 445 Config string `json:"config,omitempty"` 446 447 // CreateTime: Time the operation was created. 448 CreateTime string `json:"createTime,omitempty"` 449 450 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 451 // unconditionally include in API requests. By default, fields with 452 // empty or default values are omitted from API requests. However, any 453 // non-pointer, non-interface field appearing in ForceSendFields will be 454 // sent to the server regardless of whether the field is empty or not. 455 // This may be used to include empty fields in Patch requests. 456 ForceSendFields []string `json:"-"` 457 458 // NullFields is a list of field names (e.g. "CompleteTime") to include 459 // in API requests with the JSON null value. By default, fields with 460 // empty values are omitted from API requests. However, any field with 461 // an empty value appearing in NullFields will be sent to the server as 462 // null. It is an error if a field in this list has a non-empty value. 463 // This may be used to include null fields in Patch requests. 464 NullFields []string `json:"-"` 465 } 466 467 func (s *BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) { 468 type NoMethod BatchCreateBitbucketServerConnectedRepositoriesResponseMetadata 469 raw := NoMethod(*s) 470 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 471 } 472 473 // BatchCreateGitLabConnectedRepositoriesResponse: Response of 474 // BatchCreateGitLabConnectedRepositories RPC method. 475 type BatchCreateGitLabConnectedRepositoriesResponse struct { 476 // GitlabConnectedRepositories: The GitLab connected repository 477 // requests' responses. 478 GitlabConnectedRepositories []*GitLabConnectedRepository `json:"gitlabConnectedRepositories,omitempty"` 479 480 // ForceSendFields is a list of field names (e.g. 481 // "GitlabConnectedRepositories") to unconditionally include in API 482 // requests. By default, fields with empty or default values are omitted 483 // from API requests. However, any non-pointer, non-interface field 484 // appearing in ForceSendFields will be sent to the server regardless of 485 // whether the field is empty or not. This may be used to include empty 486 // fields in Patch requests. 487 ForceSendFields []string `json:"-"` 488 489 // NullFields is a list of field names (e.g. 490 // "GitlabConnectedRepositories") to include in API requests with the 491 // JSON null value. By default, fields with empty values are omitted 492 // from API requests. However, any field with an empty value appearing 493 // in NullFields will be sent to the server as null. It is an error if a 494 // field in this list has a non-empty value. This may be used to include 495 // null fields in Patch requests. 496 NullFields []string `json:"-"` 497 } 498 499 func (s *BatchCreateGitLabConnectedRepositoriesResponse) MarshalJSON() ([]byte, error) { 500 type NoMethod BatchCreateGitLabConnectedRepositoriesResponse 501 raw := NoMethod(*s) 502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 503 } 504 505 // BatchCreateGitLabConnectedRepositoriesResponseMetadata: Metadata for 506 // `BatchCreateGitLabConnectedRepositories` operation. 507 type BatchCreateGitLabConnectedRepositoriesResponseMetadata struct { 508 // CompleteTime: Time the operation was completed. 509 CompleteTime string `json:"completeTime,omitempty"` 510 511 // Config: The name of the `GitLabConfig` that added connected 512 // repositories. Format: 513 // `projects/{project}/locations/{location}/gitLabConfigs/{config}` 514 Config string `json:"config,omitempty"` 515 516 // CreateTime: Time the operation was created. 517 CreateTime string `json:"createTime,omitempty"` 518 519 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 520 // unconditionally include in API requests. By default, fields with 521 // empty or default values are omitted from API requests. However, any 522 // non-pointer, non-interface field appearing in ForceSendFields will be 523 // sent to the server regardless of whether the field is empty or not. 524 // This may be used to include empty fields in Patch requests. 525 ForceSendFields []string `json:"-"` 526 527 // NullFields is a list of field names (e.g. "CompleteTime") to include 528 // in API requests with the JSON null value. By default, fields with 529 // empty values are omitted from API requests. However, any field with 530 // an empty value appearing in NullFields will be sent to the server as 531 // null. It is an error if a field in this list has a non-empty value. 532 // This may be used to include null fields in Patch requests. 533 NullFields []string `json:"-"` 534 } 535 536 func (s *BatchCreateGitLabConnectedRepositoriesResponseMetadata) MarshalJSON() ([]byte, error) { 537 type NoMethod BatchCreateGitLabConnectedRepositoriesResponseMetadata 538 raw := NoMethod(*s) 539 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 540 } 541 542 // BatchCreateRepositoriesResponse: Message for response of creating 543 // repositories in batch. 544 type BatchCreateRepositoriesResponse struct { 545 // Repositories: Repository resources created. 546 Repositories []*Repository `json:"repositories,omitempty"` 547 548 // ForceSendFields is a list of field names (e.g. "Repositories") to 549 // unconditionally include in API requests. By default, fields with 550 // empty or default values are omitted from API requests. However, any 551 // non-pointer, non-interface field appearing in ForceSendFields will be 552 // sent to the server regardless of whether the field is empty or not. 553 // This may be used to include empty fields in Patch requests. 554 ForceSendFields []string `json:"-"` 555 556 // NullFields is a list of field names (e.g. "Repositories") to include 557 // in API requests with the JSON null value. By default, fields with 558 // empty values are omitted from API requests. However, any field with 559 // an empty value appearing in NullFields will be sent to the server as 560 // null. It is an error if a field in this list has a non-empty value. 561 // This may be used to include null fields in Patch requests. 562 NullFields []string `json:"-"` 563 } 564 565 func (s *BatchCreateRepositoriesResponse) MarshalJSON() ([]byte, error) { 566 type NoMethod BatchCreateRepositoriesResponse 567 raw := NoMethod(*s) 568 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 569 } 570 571 // BitbucketServerConnectedRepository: / 572 // BitbucketServerConnectedRepository represents a connected Bitbucket 573 // Server / repository. 574 type BitbucketServerConnectedRepository struct { 575 // Parent: The name of the `BitbucketServerConfig` that added connected 576 // repository. Format: 577 // `projects/{project}/locations/{location}/bitbucketServerConfigs/{confi 578 // g}` 579 Parent string `json:"parent,omitempty"` 580 581 // Repo: The Bitbucket Server repositories to connect. 582 Repo *BitbucketServerRepositoryId `json:"repo,omitempty"` 583 584 // Status: Output only. The status of the repo connection request. 585 Status *Status `json:"status,omitempty"` 586 587 // ForceSendFields is a list of field names (e.g. "Parent") to 588 // unconditionally include in API requests. By default, fields with 589 // empty or default values are omitted from API requests. However, any 590 // non-pointer, non-interface field appearing in ForceSendFields will be 591 // sent to the server regardless of whether the field is empty or not. 592 // This may be used to include empty fields in Patch requests. 593 ForceSendFields []string `json:"-"` 594 595 // NullFields is a list of field names (e.g. "Parent") to include in API 596 // requests with the JSON null value. By default, fields with empty 597 // values are omitted from API requests. However, any field with an 598 // empty value appearing in NullFields will be sent to the server as 599 // null. It is an error if a field in this list has a non-empty value. 600 // This may be used to include null fields in Patch requests. 601 NullFields []string `json:"-"` 602 } 603 604 func (s *BitbucketServerConnectedRepository) MarshalJSON() ([]byte, error) { 605 type NoMethod BitbucketServerConnectedRepository 606 raw := NoMethod(*s) 607 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 608 } 609 610 // BitbucketServerRepositoryId: BitbucketServerRepositoryId identifies a 611 // specific repository hosted on a Bitbucket Server. 612 type BitbucketServerRepositoryId struct { 613 // ProjectKey: Required. Identifier for the project storing the 614 // repository. 615 ProjectKey string `json:"projectKey,omitempty"` 616 617 // RepoSlug: Required. Identifier for the repository. 618 RepoSlug string `json:"repoSlug,omitempty"` 619 620 // WebhookId: Output only. The ID of the webhook that was created for 621 // receiving events from this repo. We only create and manage a single 622 // webhook for each repo. 623 WebhookId int64 `json:"webhookId,omitempty"` 624 625 // ForceSendFields is a list of field names (e.g. "ProjectKey") to 626 // unconditionally include in API requests. By default, fields with 627 // empty or default values are omitted from API requests. However, any 628 // non-pointer, non-interface field appearing in ForceSendFields will be 629 // sent to the server regardless of whether the field is empty or not. 630 // This may be used to include empty fields in Patch requests. 631 ForceSendFields []string `json:"-"` 632 633 // NullFields is a list of field names (e.g. "ProjectKey") to include in 634 // API requests with the JSON null value. By default, fields with empty 635 // values are omitted from API requests. However, any field with an 636 // empty value appearing in NullFields will be sent to the server as 637 // null. It is an error if a field in this list has a non-empty value. 638 // This may be used to include null fields in Patch requests. 639 NullFields []string `json:"-"` 640 } 641 642 func (s *BitbucketServerRepositoryId) MarshalJSON() ([]byte, error) { 643 type NoMethod BitbucketServerRepositoryId 644 raw := NoMethod(*s) 645 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 646 } 647 648 // Build: A build resource in the Cloud Build API. At a high level, a 649 // `Build` describes where to find source code, how to build it (for 650 // example, the builder image to run on the source), and where to store 651 // the built artifacts. Fields can include the following variables, 652 // which will be expanded when the build is created: - $PROJECT_ID: the 653 // project ID of the build. - $PROJECT_NUMBER: the project number of the 654 // build. - $LOCATION: the location/region of the build. - $BUILD_ID: 655 // the autogenerated ID of the build. - $REPO_NAME: the source 656 // repository name specified by RepoSource. - $BRANCH_NAME: the branch 657 // name specified by RepoSource. - $TAG_NAME: the tag name specified by 658 // RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified 659 // by RepoSource or resolved from the specified branch or tag. - 660 // $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA. 661 type Build struct { 662 // Approval: Output only. Describes this build's approval configuration, 663 // status, and result. 664 Approval *BuildApproval `json:"approval,omitempty"` 665 666 // Artifacts: Artifacts produced by the build that should be uploaded 667 // upon successful completion of all build steps. 668 Artifacts *Artifacts `json:"artifacts,omitempty"` 669 670 // AvailableSecrets: Secrets and secret environment variables. 671 AvailableSecrets *Secrets `json:"availableSecrets,omitempty"` 672 673 // BuildTriggerId: Output only. The ID of the `BuildTrigger` that 674 // triggered this build, if it was triggered automatically. 675 BuildTriggerId string `json:"buildTriggerId,omitempty"` 676 677 // CreateTime: Output only. Time at which the request to create the 678 // build was received. 679 CreateTime string `json:"createTime,omitempty"` 680 681 // FailureInfo: Output only. Contains information about the build when 682 // status=FAILURE. 683 FailureInfo *FailureInfo `json:"failureInfo,omitempty"` 684 685 // FinishTime: Output only. Time at which execution of the build was 686 // finished. The difference between finish_time and start_time is the 687 // duration of the build's execution. 688 FinishTime string `json:"finishTime,omitempty"` 689 690 // Id: Output only. Unique identifier of the build. 691 Id string `json:"id,omitempty"` 692 693 // Images: A list of images to be pushed upon the successful completion 694 // of all build steps. The images are pushed using the builder service 695 // account's credentials. The digests of the pushed images will be 696 // stored in the `Build` resource's results field. If any of the images 697 // fail to be pushed, the build status is marked `FAILURE`. 698 Images []string `json:"images,omitempty"` 699 700 // LogUrl: Output only. URL to logs for this build in Google Cloud 701 // Console. 702 LogUrl string `json:"logUrl,omitempty"` 703 704 // LogsBucket: Google Cloud Storage bucket where logs should be written 705 // (see Bucket Name Requirements 706 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 707 // Logs file names will be of the format 708 // `${logs_bucket}/log-${build_id}.txt`. 709 LogsBucket string `json:"logsBucket,omitempty"` 710 711 // Name: Output only. The 'Build' name with format: 712 // `projects/{project}/locations/{location}/builds/{build}`, where 713 // {build} is a unique identifier generated by the service. 714 Name string `json:"name,omitempty"` 715 716 // Options: Special options for this build. 717 Options *BuildOptions `json:"options,omitempty"` 718 719 // ProjectId: Output only. ID of the project. 720 ProjectId string `json:"projectId,omitempty"` 721 722 // QueueTtl: TTL in queue for this build. If provided and the build is 723 // enqueued longer than this value, the build will expire and the build 724 // status will be `EXPIRED`. The TTL starts ticking from create_time. 725 QueueTtl string `json:"queueTtl,omitempty"` 726 727 // Results: Output only. Results of the build. 728 Results *Results `json:"results,omitempty"` 729 730 // Secrets: Secrets to decrypt using Cloud Key Management Service. Note: 731 // Secret Manager is the recommended technique for managing sensitive 732 // data with Cloud Build. Use `available_secrets` to configure builds to 733 // access secrets from Secret Manager. For instructions, see: 734 // https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets 735 Secrets []*Secret `json:"secrets,omitempty"` 736 737 // ServiceAccount: IAM service account whose credentials will be used at 738 // build runtime. Must be of the format 739 // `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be 740 // email address or uniqueId of the service account. 741 ServiceAccount string `json:"serviceAccount,omitempty"` 742 743 // Source: The location of the source files to build. 744 Source *Source `json:"source,omitempty"` 745 746 // SourceProvenance: Output only. A permanent fixed identifier for 747 // source. 748 SourceProvenance *SourceProvenance `json:"sourceProvenance,omitempty"` 749 750 // StartTime: Output only. Time at which execution of the build was 751 // started. 752 StartTime string `json:"startTime,omitempty"` 753 754 // Status: Output only. Status of the build. 755 // 756 // Possible values: 757 // "STATUS_UNKNOWN" - Status of the build is unknown. 758 // "PENDING" - Build has been created and is pending execution and 759 // queuing. It has not been queued. 760 // "QUEUED" - Build or step is queued; work has not yet begun. 761 // "WORKING" - Build or step is being executed. 762 // "SUCCESS" - Build or step finished successfully. 763 // "FAILURE" - Build or step failed to complete successfully. 764 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 765 // "TIMEOUT" - Build or step took longer than was allowed. 766 // "CANCELLED" - Build or step was canceled by a user. 767 // "EXPIRED" - Build was enqueued for longer than the value of 768 // `queue_ttl`. 769 Status string `json:"status,omitempty"` 770 771 // StatusDetail: Output only. Customer-readable message about the 772 // current status. 773 StatusDetail string `json:"statusDetail,omitempty"` 774 775 // Steps: Required. The operations to be performed on the workspace. 776 Steps []*BuildStep `json:"steps,omitempty"` 777 778 // Substitutions: Substitutions data for `Build` resource. 779 Substitutions map[string]string `json:"substitutions,omitempty"` 780 781 // Tags: Tags for annotation of a `Build`. These are not docker tags. 782 Tags []string `json:"tags,omitempty"` 783 784 // Timeout: Amount of time that this build should be allowed to run, to 785 // second granularity. If this amount of time elapses, work on the build 786 // will cease and the build status will be `TIMEOUT`. `timeout` starts 787 // ticking from `startTime`. Default time is ten minutes. 788 Timeout string `json:"timeout,omitempty"` 789 790 // Timing: Output only. Stores timing information for phases of the 791 // build. Valid keys are: * BUILD: time to execute all build steps. * 792 // PUSH: time to push all artifacts including docker images and non 793 // docker artifacts. * FETCHSOURCE: time to fetch source. * SETUPBUILD: 794 // time to set up build. If the build does not specify source or images, 795 // these keys will not be included. 796 Timing map[string]TimeSpan `json:"timing,omitempty"` 797 798 // Warnings: Output only. Non-fatal problems encountered during the 799 // execution of the build. 800 Warnings []*Warning `json:"warnings,omitempty"` 801 802 // ForceSendFields is a list of field names (e.g. "Approval") to 803 // unconditionally include in API requests. By default, fields with 804 // empty or default values are omitted from API requests. However, any 805 // non-pointer, non-interface field appearing in ForceSendFields will be 806 // sent to the server regardless of whether the field is empty or not. 807 // This may be used to include empty fields in Patch requests. 808 ForceSendFields []string `json:"-"` 809 810 // NullFields is a list of field names (e.g. "Approval") to include in 811 // API requests with the JSON null value. By default, fields with empty 812 // values are omitted from API requests. However, any field with an 813 // empty value appearing in NullFields will be sent to the server as 814 // null. It is an error if a field in this list has a non-empty value. 815 // This may be used to include null fields in Patch requests. 816 NullFields []string `json:"-"` 817 } 818 819 func (s *Build) MarshalJSON() ([]byte, error) { 820 type NoMethod Build 821 raw := NoMethod(*s) 822 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 823 } 824 825 // BuildApproval: BuildApproval describes a build's approval 826 // configuration, state, and result. 827 type BuildApproval struct { 828 // Config: Output only. Configuration for manual approval of this build. 829 Config *ApprovalConfig `json:"config,omitempty"` 830 831 // Result: Output only. Result of manual approval for this Build. 832 Result *ApprovalResult `json:"result,omitempty"` 833 834 // State: Output only. The state of this build's approval. 835 // 836 // Possible values: 837 // "STATE_UNSPECIFIED" - Default enum type. This should not be used. 838 // "PENDING" - Build approval is pending. 839 // "APPROVED" - Build approval has been approved. 840 // "REJECTED" - Build approval has been rejected. 841 // "CANCELLED" - Build was cancelled while it was still pending 842 // approval. 843 State string `json:"state,omitempty"` 844 845 // ForceSendFields is a list of field names (e.g. "Config") to 846 // unconditionally include in API requests. By default, fields with 847 // empty or default values are omitted from API requests. However, any 848 // non-pointer, non-interface field appearing in ForceSendFields will be 849 // sent to the server regardless of whether the field is empty or not. 850 // This may be used to include empty fields in Patch requests. 851 ForceSendFields []string `json:"-"` 852 853 // NullFields is a list of field names (e.g. "Config") to include in API 854 // requests with the JSON null value. By default, fields with empty 855 // values are omitted from API requests. However, any field with an 856 // empty value appearing in NullFields will be sent to the server as 857 // null. It is an error if a field in this list has a non-empty value. 858 // This may be used to include null fields in Patch requests. 859 NullFields []string `json:"-"` 860 } 861 862 func (s *BuildApproval) MarshalJSON() ([]byte, error) { 863 type NoMethod BuildApproval 864 raw := NoMethod(*s) 865 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 866 } 867 868 // BuildOperationMetadata: Metadata for build operations. 869 type BuildOperationMetadata struct { 870 // Build: The build that the operation is tracking. 871 Build *Build `json:"build,omitempty"` 872 873 // ForceSendFields is a list of field names (e.g. "Build") to 874 // unconditionally include in API requests. By default, fields with 875 // empty or default values are omitted from API requests. However, any 876 // non-pointer, non-interface field appearing in ForceSendFields will be 877 // sent to the server regardless of whether the field is empty or not. 878 // This may be used to include empty fields in Patch requests. 879 ForceSendFields []string `json:"-"` 880 881 // NullFields is a list of field names (e.g. "Build") to include in API 882 // requests with the JSON null value. By default, fields with empty 883 // values are omitted from API requests. However, any field with an 884 // empty value appearing in NullFields will be sent to the server as 885 // null. It is an error if a field in this list has a non-empty value. 886 // This may be used to include null fields in Patch requests. 887 NullFields []string `json:"-"` 888 } 889 890 func (s *BuildOperationMetadata) MarshalJSON() ([]byte, error) { 891 type NoMethod BuildOperationMetadata 892 raw := NoMethod(*s) 893 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 894 } 895 896 // BuildOptions: Optional arguments to enable specific features of 897 // builds. 898 type BuildOptions struct { 899 // DiskSizeGb: Requested disk size for the VM that runs the build. Note 900 // that this is *NOT* "disk free"; some of the space will be used by the 901 // operating system and build utilities. Also note that this is the 902 // minimum disk size that will be allocated for the build -- the build 903 // may run with a larger disk than requested. At present, the maximum 904 // disk size is 2000GB; builds that request more than the maximum are 905 // rejected with an error. 906 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 907 908 // DynamicSubstitutions: Option to specify whether or not to apply bash 909 // style string operations to the substitutions. NOTE: this is always 910 // enabled for triggered builds and cannot be overridden in the build 911 // configuration file. 912 DynamicSubstitutions bool `json:"dynamicSubstitutions,omitempty"` 913 914 // Env: A list of global environment variable definitions that will 915 // exist for all build steps in this build. If a variable is defined in 916 // both globally and in a build step, the variable will use the build 917 // step value. The elements are of the form "KEY=VALUE" for the 918 // environment variable "KEY" being given the value "VALUE". 919 Env []string `json:"env,omitempty"` 920 921 // LogStreamingOption: Option to define build log streaming behavior to 922 // Google Cloud Storage. 923 // 924 // Possible values: 925 // "STREAM_DEFAULT" - Service may automatically determine build log 926 // streaming behavior. 927 // "STREAM_ON" - Build logs should be streamed to Google Cloud 928 // Storage. 929 // "STREAM_OFF" - Build logs should not be streamed to Google Cloud 930 // Storage; they will be written when the build is completed. 931 LogStreamingOption string `json:"logStreamingOption,omitempty"` 932 933 // Logging: Option to specify the logging mode, which determines if and 934 // where build logs are stored. 935 // 936 // Possible values: 937 // "LOGGING_UNSPECIFIED" - The service determines the logging mode. 938 // The default is `LEGACY`. Do not rely on the default logging behavior 939 // as it may change in the future. 940 // "LEGACY" - Build logs are stored in Cloud Logging and Cloud 941 // Storage. 942 // "GCS_ONLY" - Build logs are stored in Cloud Storage. 943 // "STACKDRIVER_ONLY" - This option is the same as CLOUD_LOGGING_ONLY. 944 // "CLOUD_LOGGING_ONLY" - Build logs are stored in Cloud Logging. 945 // Selecting this option will not allow [logs 946 // streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log). 947 // "NONE" - Turn off all logging. No build logs will be captured. 948 Logging string `json:"logging,omitempty"` 949 950 // MachineType: Compute Engine machine type on which to run the build. 951 // 952 // Possible values: 953 // "UNSPECIFIED" - Standard machine type. 954 // "N1_HIGHCPU_8" - Highcpu machine with 8 CPUs. 955 // "N1_HIGHCPU_32" - Highcpu machine with 32 CPUs. 956 // "E2_HIGHCPU_8" - Highcpu e2 machine with 8 CPUs. 957 // "E2_HIGHCPU_32" - Highcpu e2 machine with 32 CPUs. 958 MachineType string `json:"machineType,omitempty"` 959 960 // Pool: Optional. Specification for execution on a `WorkerPool`. See 961 // running builds in a private pool 962 // (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 963 // for more information. 964 Pool *PoolOption `json:"pool,omitempty"` 965 966 // RequestedVerifyOption: Requested verifiability options. 967 // 968 // Possible values: 969 // "NOT_VERIFIED" - Not a verifiable build (the default). 970 // "VERIFIED" - Build must be verified. 971 RequestedVerifyOption string `json:"requestedVerifyOption,omitempty"` 972 973 // SecretEnv: A list of global environment variables, which are 974 // encrypted using a Cloud Key Management Service crypto key. These 975 // values must be specified in the build's `Secret`. These variables 976 // will be available to all build steps in this build. 977 SecretEnv []string `json:"secretEnv,omitempty"` 978 979 // SourceProvenanceHash: Requested hash for SourceProvenance. 980 // 981 // Possible values: 982 // "NONE" - No hash requested. 983 // "SHA256" - Use a sha256 hash. 984 // "MD5" - Use a md5 hash. 985 SourceProvenanceHash []string `json:"sourceProvenanceHash,omitempty"` 986 987 // SubstitutionOption: Option to specify behavior when there is an error 988 // in the substitution checks. NOTE: this is always set to ALLOW_LOOSE 989 // for triggered builds and cannot be overridden in the build 990 // configuration file. 991 // 992 // Possible values: 993 // "MUST_MATCH" - Fails the build if error in substitutions checks, 994 // like missing a substitution in the template or in the map. 995 // "ALLOW_LOOSE" - Do not fail the build if error in substitutions 996 // checks. 997 SubstitutionOption string `json:"substitutionOption,omitempty"` 998 999 // Volumes: Global list of volumes to mount for ALL build steps Each 1000 // volume is created as an empty volume prior to starting the build 1001 // process. Upon completion of the build, volumes and their contents are 1002 // discarded. Global volume names and paths cannot conflict with the 1003 // volumes defined a build step. Using a global volume in a build with 1004 // only one step is not valid as it is indicative of a build request 1005 // with an incorrect configuration. 1006 Volumes []*Volume `json:"volumes,omitempty"` 1007 1008 // WorkerPool: This field deprecated; please use `pool.name` instead. 1009 WorkerPool string `json:"workerPool,omitempty"` 1010 1011 // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to 1012 // unconditionally include in API requests. By default, fields with 1013 // empty or default values are omitted from API requests. However, any 1014 // non-pointer, non-interface field appearing in ForceSendFields will be 1015 // sent to the server regardless of whether the field is empty or not. 1016 // This may be used to include empty fields in Patch requests. 1017 ForceSendFields []string `json:"-"` 1018 1019 // NullFields is a list of field names (e.g. "DiskSizeGb") to include in 1020 // API requests with the JSON null value. By default, fields with empty 1021 // values are omitted from API requests. However, any field with an 1022 // empty value appearing in NullFields will be sent to the server as 1023 // null. It is an error if a field in this list has a non-empty value. 1024 // This may be used to include null fields in Patch requests. 1025 NullFields []string `json:"-"` 1026 } 1027 1028 func (s *BuildOptions) MarshalJSON() ([]byte, error) { 1029 type NoMethod BuildOptions 1030 raw := NoMethod(*s) 1031 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1032 } 1033 1034 // BuildStep: A step in the build pipeline. 1035 type BuildStep struct { 1036 // AllowExitCodes: Allow this build step to fail without failing the 1037 // entire build if and only if the exit code is one of the specified 1038 // codes. If allow_failure is also specified, this field will take 1039 // precedence. 1040 AllowExitCodes []int64 `json:"allowExitCodes,omitempty"` 1041 1042 // AllowFailure: Allow this build step to fail without failing the 1043 // entire build. If false, the entire build will fail if this step 1044 // fails. Otherwise, the build will succeed, but this step will still 1045 // have a failure status. Error information will be reported in the 1046 // failure_detail field. 1047 AllowFailure bool `json:"allowFailure,omitempty"` 1048 1049 // Args: A list of arguments that will be presented to the step when it 1050 // is started. If the image used to run the step's container has an 1051 // entrypoint, the `args` are used as arguments to that entrypoint. If 1052 // the image does not define an entrypoint, the first element in args is 1053 // used as the entrypoint, and the remainder will be used as arguments. 1054 Args []string `json:"args,omitempty"` 1055 1056 // Dir: Working directory to use when running this step's container. If 1057 // this value is a relative path, it is relative to the build's working 1058 // directory. If this value is absolute, it may be outside the build's 1059 // working directory, in which case the contents of the path may not be 1060 // persisted across build step executions, unless a `volume` for that 1061 // path is specified. If the build specifies a `RepoSource` with `dir` 1062 // and a step with a `dir`, which specifies an absolute path, the 1063 // `RepoSource` `dir` is ignored for the step's execution. 1064 Dir string `json:"dir,omitempty"` 1065 1066 // Entrypoint: Entrypoint to be used instead of the build step image's 1067 // default entrypoint. If unset, the image's default entrypoint is used. 1068 Entrypoint string `json:"entrypoint,omitempty"` 1069 1070 // Env: A list of environment variable definitions to be used when 1071 // running a step. The elements are of the form "KEY=VALUE" for the 1072 // environment variable "KEY" being given the value "VALUE". 1073 Env []string `json:"env,omitempty"` 1074 1075 // ExitCode: Output only. Return code from running the step. 1076 ExitCode int64 `json:"exitCode,omitempty"` 1077 1078 // Id: Unique identifier for this build step, used in `wait_for` to 1079 // reference this build step as a dependency. 1080 Id string `json:"id,omitempty"` 1081 1082 // Name: Required. The name of the container image that will run this 1083 // particular build step. If the image is available in the host's Docker 1084 // daemon's cache, it will be run directly. If not, the host will 1085 // attempt to pull the image first, using the builder service account's 1086 // credentials if necessary. The Docker daemon's cache will already have 1087 // the latest versions of all of the officially supported build steps 1088 // (https://github.com/GoogleCloudPlatform/cloud-builders 1089 // (https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker 1090 // daemon will also have cached many of the layers for some popular 1091 // images, like "ubuntu", "debian", but they will be refreshed at the 1092 // time you attempt to use them. If you built an image in a previous 1093 // build step, it will be stored in the host's Docker daemon's cache and 1094 // is available to use as the name for a later build step. 1095 Name string `json:"name,omitempty"` 1096 1097 // PullTiming: Output only. Stores timing information for pulling this 1098 // build step's builder image only. 1099 PullTiming *TimeSpan `json:"pullTiming,omitempty"` 1100 1101 // Script: A shell script to be executed in the step. When script is 1102 // provided, the user cannot specify the entrypoint or args. 1103 Script string `json:"script,omitempty"` 1104 1105 // SecretEnv: A list of environment variables which are encrypted using 1106 // a Cloud Key Management Service crypto key. These values must be 1107 // specified in the build's `Secret`. 1108 SecretEnv []string `json:"secretEnv,omitempty"` 1109 1110 // Status: Output only. Status of the build step. At this time, build 1111 // step status is only updated on build completion; step status is not 1112 // updated in real-time as the build progresses. 1113 // 1114 // Possible values: 1115 // "STATUS_UNKNOWN" - Status of the build is unknown. 1116 // "PENDING" - Build has been created and is pending execution and 1117 // queuing. It has not been queued. 1118 // "QUEUED" - Build or step is queued; work has not yet begun. 1119 // "WORKING" - Build or step is being executed. 1120 // "SUCCESS" - Build or step finished successfully. 1121 // "FAILURE" - Build or step failed to complete successfully. 1122 // "INTERNAL_ERROR" - Build or step failed due to an internal cause. 1123 // "TIMEOUT" - Build or step took longer than was allowed. 1124 // "CANCELLED" - Build or step was canceled by a user. 1125 // "EXPIRED" - Build was enqueued for longer than the value of 1126 // `queue_ttl`. 1127 Status string `json:"status,omitempty"` 1128 1129 // Timeout: Time limit for executing this build step. If not defined, 1130 // the step has no time limit and will be allowed to continue to run 1131 // until either it completes or the build itself times out. 1132 Timeout string `json:"timeout,omitempty"` 1133 1134 // Timing: Output only. Stores timing information for executing this 1135 // build step. 1136 Timing *TimeSpan `json:"timing,omitempty"` 1137 1138 // Volumes: List of volumes to mount into the build step. Each volume is 1139 // created as an empty volume prior to execution of the build step. Upon 1140 // completion of the build, volumes and their contents are discarded. 1141 // Using a named volume in only one step is not valid as it is 1142 // indicative of a build request with an incorrect configuration. 1143 Volumes []*Volume `json:"volumes,omitempty"` 1144 1145 // WaitFor: The ID(s) of the step(s) that this build step depends on. 1146 // This build step will not start until all the build steps in 1147 // `wait_for` have completed successfully. If `wait_for` is empty, this 1148 // build step will start when all previous build steps in the 1149 // `Build.Steps` list have completed successfully. 1150 WaitFor []string `json:"waitFor,omitempty"` 1151 1152 // ForceSendFields is a list of field names (e.g. "AllowExitCodes") to 1153 // unconditionally include in API requests. By default, fields with 1154 // empty or default values are omitted from API requests. However, any 1155 // non-pointer, non-interface field appearing in ForceSendFields will be 1156 // sent to the server regardless of whether the field is empty or not. 1157 // This may be used to include empty fields in Patch requests. 1158 ForceSendFields []string `json:"-"` 1159 1160 // NullFields is a list of field names (e.g. "AllowExitCodes") to 1161 // include in API requests with the JSON null value. By default, fields 1162 // with empty values are omitted from API requests. However, any field 1163 // with an empty value appearing in NullFields will be sent to the 1164 // server as null. It is an error if a field in this list has a 1165 // non-empty value. This may be used to include null fields in Patch 1166 // requests. 1167 NullFields []string `json:"-"` 1168 } 1169 1170 func (s *BuildStep) MarshalJSON() ([]byte, error) { 1171 type NoMethod BuildStep 1172 raw := NoMethod(*s) 1173 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1174 } 1175 1176 // BuiltImage: An image built by the pipeline. 1177 type BuiltImage struct { 1178 // Digest: Docker Registry 2.0 digest. 1179 Digest string `json:"digest,omitempty"` 1180 1181 // Name: Name used to push the container image to Google Container 1182 // Registry, as presented to `docker push`. 1183 Name string `json:"name,omitempty"` 1184 1185 // PushTiming: Output only. Stores timing information for pushing the 1186 // specified image. 1187 PushTiming *TimeSpan `json:"pushTiming,omitempty"` 1188 1189 // ForceSendFields is a list of field names (e.g. "Digest") to 1190 // unconditionally include in API requests. By default, fields with 1191 // empty or default values are omitted from API requests. However, any 1192 // non-pointer, non-interface field appearing in ForceSendFields will be 1193 // sent to the server regardless of whether the field is empty or not. 1194 // This may be used to include empty fields in Patch requests. 1195 ForceSendFields []string `json:"-"` 1196 1197 // NullFields is a list of field names (e.g. "Digest") to include in API 1198 // requests with the JSON null value. By default, fields with empty 1199 // values are omitted from API requests. However, any field with an 1200 // empty value appearing in NullFields will be sent to the server as 1201 // null. It is an error if a field in this list has a non-empty value. 1202 // This may be used to include null fields in Patch requests. 1203 NullFields []string `json:"-"` 1204 } 1205 1206 func (s *BuiltImage) MarshalJSON() ([]byte, error) { 1207 type NoMethod BuiltImage 1208 raw := NoMethod(*s) 1209 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1210 } 1211 1212 // CancelOperationRequest: The request message for 1213 // Operations.CancelOperation. 1214 type CancelOperationRequest struct { 1215 } 1216 1217 // CreateBitbucketServerConfigOperationMetadata: Metadata for 1218 // `CreateBitbucketServerConfig` operation. 1219 type CreateBitbucketServerConfigOperationMetadata struct { 1220 // BitbucketServerConfig: The resource name of the BitbucketServerConfig 1221 // to be created. Format: 1222 // `projects/{project}/locations/{location}/bitbucketServerConfigs/{id}`. 1223 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"` 1224 1225 // CompleteTime: Time the operation was completed. 1226 CompleteTime string `json:"completeTime,omitempty"` 1227 1228 // CreateTime: Time the operation was created. 1229 CreateTime string `json:"createTime,omitempty"` 1230 1231 // ForceSendFields is a list of field names (e.g. 1232 // "BitbucketServerConfig") to unconditionally include in API requests. 1233 // By default, fields with empty or default values are omitted from API 1234 // requests. However, any non-pointer, non-interface field appearing in 1235 // ForceSendFields will be sent to the server regardless of whether the 1236 // field is empty or not. This may be used to include empty fields in 1237 // Patch requests. 1238 ForceSendFields []string `json:"-"` 1239 1240 // NullFields is a list of field names (e.g. "BitbucketServerConfig") to 1241 // include in API requests with the JSON null value. By default, fields 1242 // with empty values are omitted from API requests. However, any field 1243 // with an empty value appearing in NullFields will be sent to the 1244 // server as null. It is an error if a field in this list has a 1245 // non-empty value. This may be used to include null fields in Patch 1246 // requests. 1247 NullFields []string `json:"-"` 1248 } 1249 1250 func (s *CreateBitbucketServerConfigOperationMetadata) MarshalJSON() ([]byte, error) { 1251 type NoMethod CreateBitbucketServerConfigOperationMetadata 1252 raw := NoMethod(*s) 1253 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1254 } 1255 1256 // CreateGitHubEnterpriseConfigOperationMetadata: Metadata for 1257 // `CreateGithubEnterpriseConfig` operation. 1258 type CreateGitHubEnterpriseConfigOperationMetadata struct { 1259 // CompleteTime: Time the operation was completed. 1260 CompleteTime string `json:"completeTime,omitempty"` 1261 1262 // CreateTime: Time the operation was created. 1263 CreateTime string `json:"createTime,omitempty"` 1264 1265 // GithubEnterpriseConfig: The resource name of the GitHubEnterprise to 1266 // be created. Format: 1267 // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}` 1268 // . 1269 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"` 1270 1271 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 1272 // unconditionally include in API requests. By default, fields with 1273 // empty or default values are omitted from API requests. However, any 1274 // non-pointer, non-interface field appearing in ForceSendFields will be 1275 // sent to the server regardless of whether the field is empty or not. 1276 // This may be used to include empty fields in Patch requests. 1277 ForceSendFields []string `json:"-"` 1278 1279 // NullFields is a list of field names (e.g. "CompleteTime") to include 1280 // in API requests with the JSON null value. By default, fields with 1281 // empty values are omitted from API requests. However, any field with 1282 // an empty value appearing in NullFields will be sent to the server as 1283 // null. It is an error if a field in this list has a non-empty value. 1284 // This may be used to include null fields in Patch requests. 1285 NullFields []string `json:"-"` 1286 } 1287 1288 func (s *CreateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) { 1289 type NoMethod CreateGitHubEnterpriseConfigOperationMetadata 1290 raw := NoMethod(*s) 1291 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1292 } 1293 1294 // CreateGitLabConfigOperationMetadata: Metadata for 1295 // `CreateGitLabConfig` operation. 1296 type CreateGitLabConfigOperationMetadata struct { 1297 // CompleteTime: Time the operation was completed. 1298 CompleteTime string `json:"completeTime,omitempty"` 1299 1300 // CreateTime: Time the operation was created. 1301 CreateTime string `json:"createTime,omitempty"` 1302 1303 // GitlabConfig: The resource name of the GitLabConfig to be created. 1304 // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. 1305 GitlabConfig string `json:"gitlabConfig,omitempty"` 1306 1307 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 1308 // unconditionally include in API requests. By default, fields with 1309 // empty or default values are omitted from API requests. However, any 1310 // non-pointer, non-interface field appearing in ForceSendFields will be 1311 // sent to the server regardless of whether the field is empty or not. 1312 // This may be used to include empty fields in Patch requests. 1313 ForceSendFields []string `json:"-"` 1314 1315 // NullFields is a list of field names (e.g. "CompleteTime") to include 1316 // in API requests with the JSON null value. By default, fields with 1317 // empty values are omitted from API requests. However, any field with 1318 // an empty value appearing in NullFields will be sent to the server as 1319 // null. It is an error if a field in this list has a non-empty value. 1320 // This may be used to include null fields in Patch requests. 1321 NullFields []string `json:"-"` 1322 } 1323 1324 func (s *CreateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { 1325 type NoMethod CreateGitLabConfigOperationMetadata 1326 raw := NoMethod(*s) 1327 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1328 } 1329 1330 // CreateWorkerPoolOperationMetadata: Metadata for the 1331 // `CreateWorkerPool` operation. 1332 type CreateWorkerPoolOperationMetadata struct { 1333 // CompleteTime: Time the operation was completed. 1334 CompleteTime string `json:"completeTime,omitempty"` 1335 1336 // CreateTime: Time the operation was created. 1337 CreateTime string `json:"createTime,omitempty"` 1338 1339 // WorkerPool: The resource name of the `WorkerPool` to create. Format: 1340 // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. 1341 WorkerPool string `json:"workerPool,omitempty"` 1342 1343 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 1344 // unconditionally include in API requests. By default, fields with 1345 // empty or default values are omitted from API requests. However, any 1346 // non-pointer, non-interface field appearing in ForceSendFields will be 1347 // sent to the server regardless of whether the field is empty or not. 1348 // This may be used to include empty fields in Patch requests. 1349 ForceSendFields []string `json:"-"` 1350 1351 // NullFields is a list of field names (e.g. "CompleteTime") to include 1352 // in API requests with the JSON null value. By default, fields with 1353 // empty values are omitted from API requests. However, any field with 1354 // an empty value appearing in NullFields will be sent to the server as 1355 // null. It is an error if a field in this list has a non-empty value. 1356 // This may be used to include null fields in Patch requests. 1357 NullFields []string `json:"-"` 1358 } 1359 1360 func (s *CreateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { 1361 type NoMethod CreateWorkerPoolOperationMetadata 1362 raw := NoMethod(*s) 1363 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1364 } 1365 1366 // DeleteBitbucketServerConfigOperationMetadata: Metadata for 1367 // `DeleteBitbucketServerConfig` operation. 1368 type DeleteBitbucketServerConfigOperationMetadata struct { 1369 // BitbucketServerConfig: The resource name of the BitbucketServerConfig 1370 // to be deleted. Format: 1371 // `projects/{project}/locations/{location}/bitbucketServerConfigs/{id}`. 1372 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"` 1373 1374 // CompleteTime: Time the operation was completed. 1375 CompleteTime string `json:"completeTime,omitempty"` 1376 1377 // CreateTime: Time the operation was created. 1378 CreateTime string `json:"createTime,omitempty"` 1379 1380 // ForceSendFields is a list of field names (e.g. 1381 // "BitbucketServerConfig") to unconditionally include in API requests. 1382 // By default, fields with empty or default values are omitted from API 1383 // requests. However, any non-pointer, non-interface field appearing in 1384 // ForceSendFields will be sent to the server regardless of whether the 1385 // field is empty or not. This may be used to include empty fields in 1386 // Patch requests. 1387 ForceSendFields []string `json:"-"` 1388 1389 // NullFields is a list of field names (e.g. "BitbucketServerConfig") to 1390 // include in API requests with the JSON null value. By default, fields 1391 // with empty values are omitted from API requests. However, any field 1392 // with an empty value appearing in NullFields will be sent to the 1393 // server as null. It is an error if a field in this list has a 1394 // non-empty value. This may be used to include null fields in Patch 1395 // requests. 1396 NullFields []string `json:"-"` 1397 } 1398 1399 func (s *DeleteBitbucketServerConfigOperationMetadata) MarshalJSON() ([]byte, error) { 1400 type NoMethod DeleteBitbucketServerConfigOperationMetadata 1401 raw := NoMethod(*s) 1402 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1403 } 1404 1405 // DeleteGitHubEnterpriseConfigOperationMetadata: Metadata for 1406 // `DeleteGitHubEnterpriseConfig` operation. 1407 type DeleteGitHubEnterpriseConfigOperationMetadata struct { 1408 // CompleteTime: Time the operation was completed. 1409 CompleteTime string `json:"completeTime,omitempty"` 1410 1411 // CreateTime: Time the operation was created. 1412 CreateTime string `json:"createTime,omitempty"` 1413 1414 // GithubEnterpriseConfig: The resource name of the GitHubEnterprise to 1415 // be deleted. Format: 1416 // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}` 1417 // . 1418 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"` 1419 1420 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 1421 // unconditionally include in API requests. By default, fields with 1422 // empty or default values are omitted from API requests. However, any 1423 // non-pointer, non-interface field appearing in ForceSendFields will be 1424 // sent to the server regardless of whether the field is empty or not. 1425 // This may be used to include empty fields in Patch requests. 1426 ForceSendFields []string `json:"-"` 1427 1428 // NullFields is a list of field names (e.g. "CompleteTime") to include 1429 // in API requests with the JSON null value. By default, fields with 1430 // empty values are omitted from API requests. However, any field with 1431 // an empty value appearing in NullFields will be sent to the server as 1432 // null. It is an error if a field in this list has a non-empty value. 1433 // This may be used to include null fields in Patch requests. 1434 NullFields []string `json:"-"` 1435 } 1436 1437 func (s *DeleteGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) { 1438 type NoMethod DeleteGitHubEnterpriseConfigOperationMetadata 1439 raw := NoMethod(*s) 1440 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1441 } 1442 1443 // DeleteGitLabConfigOperationMetadata: Metadata for 1444 // `DeleteGitLabConfig` operation. 1445 type DeleteGitLabConfigOperationMetadata struct { 1446 // CompleteTime: Time the operation was completed. 1447 CompleteTime string `json:"completeTime,omitempty"` 1448 1449 // CreateTime: Time the operation was created. 1450 CreateTime string `json:"createTime,omitempty"` 1451 1452 // GitlabConfig: The resource name of the GitLabConfig to be created. 1453 // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. 1454 GitlabConfig string `json:"gitlabConfig,omitempty"` 1455 1456 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 1457 // unconditionally include in API requests. By default, fields with 1458 // empty or default values are omitted from API requests. However, any 1459 // non-pointer, non-interface field appearing in ForceSendFields will be 1460 // sent to the server regardless of whether the field is empty or not. 1461 // This may be used to include empty fields in Patch requests. 1462 ForceSendFields []string `json:"-"` 1463 1464 // NullFields is a list of field names (e.g. "CompleteTime") to include 1465 // in API requests with the JSON null value. By default, fields with 1466 // empty values are omitted from API requests. However, any field with 1467 // an empty value appearing in NullFields will be sent to the server as 1468 // null. It is an error if a field in this list has a non-empty value. 1469 // This may be used to include null fields in Patch requests. 1470 NullFields []string `json:"-"` 1471 } 1472 1473 func (s *DeleteGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { 1474 type NoMethod DeleteGitLabConfigOperationMetadata 1475 raw := NoMethod(*s) 1476 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1477 } 1478 1479 // DeleteWorkerPoolOperationMetadata: Metadata for the 1480 // `DeleteWorkerPool` operation. 1481 type DeleteWorkerPoolOperationMetadata struct { 1482 // CompleteTime: Time the operation was completed. 1483 CompleteTime string `json:"completeTime,omitempty"` 1484 1485 // CreateTime: Time the operation was created. 1486 CreateTime string `json:"createTime,omitempty"` 1487 1488 // WorkerPool: The resource name of the `WorkerPool` being deleted. 1489 // Format: 1490 // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. 1491 WorkerPool string `json:"workerPool,omitempty"` 1492 1493 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 1494 // unconditionally include in API requests. By default, fields with 1495 // empty or default values are omitted from API requests. However, any 1496 // non-pointer, non-interface field appearing in ForceSendFields will be 1497 // sent to the server regardless of whether the field is empty or not. 1498 // This may be used to include empty fields in Patch requests. 1499 ForceSendFields []string `json:"-"` 1500 1501 // NullFields is a list of field names (e.g. "CompleteTime") to include 1502 // in API requests with the JSON null value. By default, fields with 1503 // empty values are omitted from API requests. However, any field with 1504 // an empty value appearing in NullFields will be sent to the server as 1505 // null. It is an error if a field in this list has a non-empty value. 1506 // This may be used to include null fields in Patch requests. 1507 NullFields []string `json:"-"` 1508 } 1509 1510 func (s *DeleteWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { 1511 type NoMethod DeleteWorkerPoolOperationMetadata 1512 raw := NoMethod(*s) 1513 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1514 } 1515 1516 // Empty: A generic empty message that you can re-use to avoid defining 1517 // duplicated empty messages in your APIs. A typical example is to use 1518 // it as the request or the response type of an API method. For 1519 // instance: service Foo { rpc Bar(google.protobuf.Empty) returns 1520 // (google.protobuf.Empty); } 1521 type Empty struct { 1522 // ServerResponse contains the HTTP response code and headers from the 1523 // server. 1524 googleapi.ServerResponse `json:"-"` 1525 } 1526 1527 // FailureInfo: A fatal problem encountered during the execution of the 1528 // build. 1529 type FailureInfo struct { 1530 // Detail: Explains the failure issue in more detail using hard-coded 1531 // text. 1532 Detail string `json:"detail,omitempty"` 1533 1534 // Type: The name of the failure. 1535 // 1536 // Possible values: 1537 // "FAILURE_TYPE_UNSPECIFIED" - Type unspecified 1538 // "PUSH_FAILED" - Unable to push the image to the repository. 1539 // "PUSH_IMAGE_NOT_FOUND" - Final image not found. 1540 // "PUSH_NOT_AUTHORIZED" - Unauthorized push of the final image. 1541 // "LOGGING_FAILURE" - Backend logging failures. Should retry. 1542 // "USER_BUILD_STEP" - A build step has failed. 1543 // "FETCH_SOURCE_FAILED" - The source fetching has failed. 1544 Type string `json:"type,omitempty"` 1545 1546 // ForceSendFields is a list of field names (e.g. "Detail") to 1547 // unconditionally include in API requests. By default, fields with 1548 // empty or default values are omitted from API requests. However, any 1549 // non-pointer, non-interface field appearing in ForceSendFields will be 1550 // sent to the server regardless of whether the field is empty or not. 1551 // This may be used to include empty fields in Patch requests. 1552 ForceSendFields []string `json:"-"` 1553 1554 // NullFields is a list of field names (e.g. "Detail") to include in API 1555 // requests with the JSON null value. By default, fields with empty 1556 // values are omitted from API requests. However, any field with an 1557 // empty value appearing in NullFields will be sent to the server as 1558 // null. It is an error if a field in this list has a non-empty value. 1559 // This may be used to include null fields in Patch requests. 1560 NullFields []string `json:"-"` 1561 } 1562 1563 func (s *FailureInfo) MarshalJSON() ([]byte, error) { 1564 type NoMethod FailureInfo 1565 raw := NoMethod(*s) 1566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1567 } 1568 1569 // FileHashes: Container message for hashes of byte content of files, 1570 // used in SourceProvenance messages to verify integrity of source input 1571 // to the build. 1572 type FileHashes struct { 1573 // FileHash: Collection of file hashes. 1574 FileHash []*Hash `json:"fileHash,omitempty"` 1575 1576 // ForceSendFields is a list of field names (e.g. "FileHash") to 1577 // unconditionally include in API requests. By default, fields with 1578 // empty or default values are omitted from API requests. However, any 1579 // non-pointer, non-interface field appearing in ForceSendFields will be 1580 // sent to the server regardless of whether the field is empty or not. 1581 // This may be used to include empty fields in Patch requests. 1582 ForceSendFields []string `json:"-"` 1583 1584 // NullFields is a list of field names (e.g. "FileHash") to include in 1585 // API requests with the JSON null value. By default, fields with empty 1586 // values are omitted from API requests. However, any field with an 1587 // empty value appearing in NullFields will be sent to the server as 1588 // null. It is an error if a field in this list has a non-empty value. 1589 // This may be used to include null fields in Patch requests. 1590 NullFields []string `json:"-"` 1591 } 1592 1593 func (s *FileHashes) MarshalJSON() ([]byte, error) { 1594 type NoMethod FileHashes 1595 raw := NoMethod(*s) 1596 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1597 } 1598 1599 // GitLabConnectedRepository: GitLabConnectedRepository represents a 1600 // GitLab connected repository request response. 1601 type GitLabConnectedRepository struct { 1602 // Parent: The name of the `GitLabConfig` that added connected 1603 // repository. Format: 1604 // `projects/{project}/locations/{location}/gitLabConfigs/{config}` 1605 Parent string `json:"parent,omitempty"` 1606 1607 // Repo: The GitLab repositories to connect. 1608 Repo *GitLabRepositoryId `json:"repo,omitempty"` 1609 1610 // Status: Output only. The status of the repo connection request. 1611 Status *Status `json:"status,omitempty"` 1612 1613 // ForceSendFields is a list of field names (e.g. "Parent") to 1614 // unconditionally include in API requests. By default, fields with 1615 // empty or default values are omitted from API requests. However, any 1616 // non-pointer, non-interface field appearing in ForceSendFields will be 1617 // sent to the server regardless of whether the field is empty or not. 1618 // This may be used to include empty fields in Patch requests. 1619 ForceSendFields []string `json:"-"` 1620 1621 // NullFields is a list of field names (e.g. "Parent") to include in API 1622 // requests with the JSON null value. By default, fields with empty 1623 // values are omitted from API requests. However, any field with an 1624 // empty value appearing in NullFields will be sent to the server as 1625 // null. It is an error if a field in this list has a non-empty value. 1626 // This may be used to include null fields in Patch requests. 1627 NullFields []string `json:"-"` 1628 } 1629 1630 func (s *GitLabConnectedRepository) MarshalJSON() ([]byte, error) { 1631 type NoMethod GitLabConnectedRepository 1632 raw := NoMethod(*s) 1633 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1634 } 1635 1636 // GitLabRepositoryId: GitLabRepositoryId identifies a specific 1637 // repository hosted on GitLab.com or GitLabEnterprise 1638 type GitLabRepositoryId struct { 1639 // Id: Required. Identifier for the repository. example: 1640 // "namespace/project-slug", namespace is usually the username or group 1641 // ID 1642 Id string `json:"id,omitempty"` 1643 1644 // WebhookId: Output only. The ID of the webhook that was created for 1645 // receiving events from this repo. We only create and manage a single 1646 // webhook for each repo. 1647 WebhookId int64 `json:"webhookId,omitempty"` 1648 1649 // ForceSendFields is a list of field names (e.g. "Id") to 1650 // unconditionally include in API requests. By default, fields with 1651 // empty or default values are omitted from API requests. However, any 1652 // non-pointer, non-interface field appearing in ForceSendFields will be 1653 // sent to the server regardless of whether the field is empty or not. 1654 // This may be used to include empty fields in Patch requests. 1655 ForceSendFields []string `json:"-"` 1656 1657 // NullFields is a list of field names (e.g. "Id") to include in API 1658 // requests with the JSON null value. By default, fields with empty 1659 // values are omitted from API requests. However, any field with an 1660 // empty value appearing in NullFields will be sent to the server as 1661 // null. It is an error if a field in this list has a non-empty value. 1662 // This may be used to include null fields in Patch requests. 1663 NullFields []string `json:"-"` 1664 } 1665 1666 func (s *GitLabRepositoryId) MarshalJSON() ([]byte, error) { 1667 type NoMethod GitLabRepositoryId 1668 raw := NoMethod(*s) 1669 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1670 } 1671 1672 // GoogleDevtoolsCloudbuildV2OperationMetadata: Represents the metadata 1673 // of the long-running operation. 1674 type GoogleDevtoolsCloudbuildV2OperationMetadata struct { 1675 // ApiVersion: Output only. API version used to start the operation. 1676 ApiVersion string `json:"apiVersion,omitempty"` 1677 1678 // CreateTime: Output only. The time the operation was created. 1679 CreateTime string `json:"createTime,omitempty"` 1680 1681 // EndTime: Output only. The time the operation finished running. 1682 EndTime string `json:"endTime,omitempty"` 1683 1684 // RequestedCancellation: Output only. Identifies whether the user has 1685 // requested cancellation of the operation. Operations that have 1686 // successfully been cancelled have Operation.error value with a 1687 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. 1688 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 1689 1690 // StatusMessage: Output only. Human-readable status of the operation, 1691 // if any. 1692 StatusMessage string `json:"statusMessage,omitempty"` 1693 1694 // Target: Output only. Server-defined resource path for the target of 1695 // the operation. 1696 Target string `json:"target,omitempty"` 1697 1698 // Verb: Output only. Name of the verb executed by the operation. 1699 Verb string `json:"verb,omitempty"` 1700 1701 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 1702 // unconditionally include in API requests. By default, fields with 1703 // empty or default values are omitted from API requests. However, any 1704 // non-pointer, non-interface field appearing in ForceSendFields will be 1705 // sent to the server regardless of whether the field is empty or not. 1706 // This may be used to include empty fields in Patch requests. 1707 ForceSendFields []string `json:"-"` 1708 1709 // NullFields is a list of field names (e.g. "ApiVersion") to include in 1710 // API requests with the JSON null value. By default, fields with empty 1711 // values are omitted from API requests. However, any field with an 1712 // empty value appearing in NullFields will be sent to the server as 1713 // null. It is an error if a field in this list has a non-empty value. 1714 // This may be used to include null fields in Patch requests. 1715 NullFields []string `json:"-"` 1716 } 1717 1718 func (s *GoogleDevtoolsCloudbuildV2OperationMetadata) MarshalJSON() ([]byte, error) { 1719 type NoMethod GoogleDevtoolsCloudbuildV2OperationMetadata 1720 raw := NoMethod(*s) 1721 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1722 } 1723 1724 // HTTPDelivery: HTTPDelivery is the delivery configuration for an HTTP 1725 // notification. 1726 type HTTPDelivery struct { 1727 // Uri: The URI to which JSON-containing HTTP POST requests should be 1728 // sent. 1729 Uri string `json:"uri,omitempty"` 1730 1731 // ForceSendFields is a list of field names (e.g. "Uri") to 1732 // unconditionally include in API requests. By default, fields with 1733 // empty or default values are omitted from API requests. However, any 1734 // non-pointer, non-interface field appearing in ForceSendFields will be 1735 // sent to the server regardless of whether the field is empty or not. 1736 // This may be used to include empty fields in Patch requests. 1737 ForceSendFields []string `json:"-"` 1738 1739 // NullFields is a list of field names (e.g. "Uri") to include in API 1740 // requests with the JSON null value. By default, fields with empty 1741 // values are omitted from API requests. However, any field with an 1742 // empty value appearing in NullFields will be sent to the server as 1743 // null. It is an error if a field in this list has a non-empty value. 1744 // This may be used to include null fields in Patch requests. 1745 NullFields []string `json:"-"` 1746 } 1747 1748 func (s *HTTPDelivery) MarshalJSON() ([]byte, error) { 1749 type NoMethod HTTPDelivery 1750 raw := NoMethod(*s) 1751 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1752 } 1753 1754 // Hash: Container message for hash values. 1755 type Hash struct { 1756 // Type: The type of hash that was performed. 1757 // 1758 // Possible values: 1759 // "NONE" - No hash requested. 1760 // "SHA256" - Use a sha256 hash. 1761 // "MD5" - Use a md5 hash. 1762 Type string `json:"type,omitempty"` 1763 1764 // Value: The hash value. 1765 Value string `json:"value,omitempty"` 1766 1767 // ForceSendFields is a list of field names (e.g. "Type") to 1768 // unconditionally include in API requests. By default, fields with 1769 // empty or default values are omitted from API requests. However, any 1770 // non-pointer, non-interface field appearing in ForceSendFields will be 1771 // sent to the server regardless of whether the field is empty or not. 1772 // This may be used to include empty fields in Patch requests. 1773 ForceSendFields []string `json:"-"` 1774 1775 // NullFields is a list of field names (e.g. "Type") to include in API 1776 // requests with the JSON null value. By default, fields with empty 1777 // values are omitted from API requests. However, any field with an 1778 // empty value appearing in NullFields will be sent to the server as 1779 // null. It is an error if a field in this list has a non-empty value. 1780 // This may be used to include null fields in Patch requests. 1781 NullFields []string `json:"-"` 1782 } 1783 1784 func (s *Hash) MarshalJSON() ([]byte, error) { 1785 type NoMethod Hash 1786 raw := NoMethod(*s) 1787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1788 } 1789 1790 // InlineSecret: Pairs a set of secret environment variables mapped to 1791 // encrypted values with the Cloud KMS key to use to decrypt the value. 1792 type InlineSecret struct { 1793 // EnvMap: Map of environment variable name to its encrypted value. 1794 // Secret environment variables must be unique across all of a build's 1795 // secrets, and must be used by at least one build step. Values can be 1796 // at most 64 KB in size. There can be at most 100 secret values across 1797 // all of a build's secrets. 1798 EnvMap map[string]string `json:"envMap,omitempty"` 1799 1800 // KmsKeyName: Resource name of Cloud KMS crypto key to decrypt the 1801 // encrypted value. In format: 1802 // projects/*/locations/*/keyRings/*/cryptoKeys/* 1803 KmsKeyName string `json:"kmsKeyName,omitempty"` 1804 1805 // ForceSendFields is a list of field names (e.g. "EnvMap") to 1806 // unconditionally include in API requests. By default, fields with 1807 // empty or default values are omitted from API requests. However, any 1808 // non-pointer, non-interface field appearing in ForceSendFields will be 1809 // sent to the server regardless of whether the field is empty or not. 1810 // This may be used to include empty fields in Patch requests. 1811 ForceSendFields []string `json:"-"` 1812 1813 // NullFields is a list of field names (e.g. "EnvMap") to include in API 1814 // requests with the JSON null value. By default, fields with empty 1815 // values are omitted from API requests. However, any field with an 1816 // empty value appearing in NullFields will be sent to the server as 1817 // null. It is an error if a field in this list has a non-empty value. 1818 // This may be used to include null fields in Patch requests. 1819 NullFields []string `json:"-"` 1820 } 1821 1822 func (s *InlineSecret) MarshalJSON() ([]byte, error) { 1823 type NoMethod InlineSecret 1824 raw := NoMethod(*s) 1825 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1826 } 1827 1828 // ListWorkerPoolsResponse: Response containing existing `WorkerPools`. 1829 type ListWorkerPoolsResponse struct { 1830 // WorkerPools: `WorkerPools` for the project. 1831 WorkerPools []*WorkerPool `json:"workerPools,omitempty"` 1832 1833 // ServerResponse contains the HTTP response code and headers from the 1834 // server. 1835 googleapi.ServerResponse `json:"-"` 1836 1837 // ForceSendFields is a list of field names (e.g. "WorkerPools") to 1838 // unconditionally include in API requests. By default, fields with 1839 // empty or default values are omitted from API requests. However, any 1840 // non-pointer, non-interface field appearing in ForceSendFields will be 1841 // sent to the server regardless of whether the field is empty or not. 1842 // This may be used to include empty fields in Patch requests. 1843 ForceSendFields []string `json:"-"` 1844 1845 // NullFields is a list of field names (e.g. "WorkerPools") to include 1846 // in API requests with the JSON null value. By default, fields with 1847 // empty values are omitted from API requests. However, any field with 1848 // an empty value appearing in NullFields will be sent to the server as 1849 // null. It is an error if a field in this list has a non-empty value. 1850 // This may be used to include null fields in Patch requests. 1851 NullFields []string `json:"-"` 1852 } 1853 1854 func (s *ListWorkerPoolsResponse) MarshalJSON() ([]byte, error) { 1855 type NoMethod ListWorkerPoolsResponse 1856 raw := NoMethod(*s) 1857 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1858 } 1859 1860 // MavenArtifact: A Maven artifact to upload to Artifact Registry upon 1861 // successful completion of all build steps. 1862 type MavenArtifact struct { 1863 // ArtifactId: Maven `artifactId` value used when uploading the artifact 1864 // to Artifact Registry. 1865 ArtifactId string `json:"artifactId,omitempty"` 1866 1867 // GroupId: Maven `groupId` value used when uploading the artifact to 1868 // Artifact Registry. 1869 GroupId string `json:"groupId,omitempty"` 1870 1871 // Path: Path to an artifact in the build's workspace to be uploaded to 1872 // Artifact Registry. This can be either an absolute path, e.g. 1873 // /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path 1874 // from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar. 1875 Path string `json:"path,omitempty"` 1876 1877 // Repository: Artifact Registry repository, in the form 1878 // "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" Artifact in the 1879 // workspace specified by path will be uploaded to Artifact Registry 1880 // with this location as a prefix. 1881 Repository string `json:"repository,omitempty"` 1882 1883 // Version: Maven `version` value used when uploading the artifact to 1884 // Artifact Registry. 1885 Version string `json:"version,omitempty"` 1886 1887 // ForceSendFields is a list of field names (e.g. "ArtifactId") to 1888 // unconditionally include in API requests. By default, fields with 1889 // empty or default values are omitted from API requests. However, any 1890 // non-pointer, non-interface field appearing in ForceSendFields will be 1891 // sent to the server regardless of whether the field is empty or not. 1892 // This may be used to include empty fields in Patch requests. 1893 ForceSendFields []string `json:"-"` 1894 1895 // NullFields is a list of field names (e.g. "ArtifactId") to include in 1896 // API requests with the JSON null value. By default, fields with empty 1897 // values are omitted from API requests. However, any field with an 1898 // empty value appearing in NullFields will be sent to the server as 1899 // null. It is an error if a field in this list has a non-empty value. 1900 // This may be used to include null fields in Patch requests. 1901 NullFields []string `json:"-"` 1902 } 1903 1904 func (s *MavenArtifact) MarshalJSON() ([]byte, error) { 1905 type NoMethod MavenArtifact 1906 raw := NoMethod(*s) 1907 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1908 } 1909 1910 // Network: Network describes the GCP network used to create workers in. 1911 type Network struct { 1912 // Network: Network on which the workers are created. "default" network 1913 // is used if empty. 1914 Network string `json:"network,omitempty"` 1915 1916 // ProjectId: Project id containing the defined network and subnetwork. 1917 // For a peered VPC, this will be the same as the project_id in which 1918 // the workers are created. For a shared VPC, this will be the project 1919 // sharing the network with the project_id project in which workers will 1920 // be created. For custom workers with no VPC, this will be the same as 1921 // project_id. 1922 ProjectId string `json:"projectId,omitempty"` 1923 1924 // Subnetwork: Subnetwork on which the workers are created. "default" 1925 // subnetwork is used if empty. 1926 Subnetwork string `json:"subnetwork,omitempty"` 1927 1928 // ForceSendFields is a list of field names (e.g. "Network") to 1929 // unconditionally include in API requests. By default, fields with 1930 // empty or default values are omitted from API requests. However, any 1931 // non-pointer, non-interface field appearing in ForceSendFields will be 1932 // sent to the server regardless of whether the field is empty or not. 1933 // This may be used to include empty fields in Patch requests. 1934 ForceSendFields []string `json:"-"` 1935 1936 // NullFields is a list of field names (e.g. "Network") to include in 1937 // API requests with the JSON null value. By default, fields with empty 1938 // values are omitted from API requests. However, any field with an 1939 // empty value appearing in NullFields will be sent to the server as 1940 // null. It is an error if a field in this list has a non-empty value. 1941 // This may be used to include null fields in Patch requests. 1942 NullFields []string `json:"-"` 1943 } 1944 1945 func (s *Network) MarshalJSON() ([]byte, error) { 1946 type NoMethod Network 1947 raw := NoMethod(*s) 1948 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1949 } 1950 1951 // Notification: Notification is the container which holds the data that 1952 // is relevant to this particular notification. 1953 type Notification struct { 1954 // Filter: The filter string to use for notification filtering. 1955 // Currently, this is assumed to be a CEL program. See 1956 // https://opensource.google/projects/cel for more. 1957 Filter string `json:"filter,omitempty"` 1958 1959 // HttpDelivery: Configuration for HTTP delivery. 1960 HttpDelivery *HTTPDelivery `json:"httpDelivery,omitempty"` 1961 1962 // SlackDelivery: Configuration for Slack delivery. 1963 SlackDelivery *SlackDelivery `json:"slackDelivery,omitempty"` 1964 1965 // SmtpDelivery: Configuration for SMTP (email) delivery. 1966 SmtpDelivery *SMTPDelivery `json:"smtpDelivery,omitempty"` 1967 1968 // StructDelivery: Escape hatch for users to supply custom delivery 1969 // configs. 1970 StructDelivery googleapi.RawMessage `json:"structDelivery,omitempty"` 1971 1972 // ForceSendFields is a list of field names (e.g. "Filter") to 1973 // unconditionally include in API requests. By default, fields with 1974 // empty or default values are omitted from API requests. However, any 1975 // non-pointer, non-interface field appearing in ForceSendFields will be 1976 // sent to the server regardless of whether the field is empty or not. 1977 // This may be used to include empty fields in Patch requests. 1978 ForceSendFields []string `json:"-"` 1979 1980 // NullFields is a list of field names (e.g. "Filter") to include in API 1981 // requests with the JSON null value. By default, fields with empty 1982 // values are omitted from API requests. However, any field with an 1983 // empty value appearing in NullFields will be sent to the server as 1984 // null. It is an error if a field in this list has a non-empty value. 1985 // This may be used to include null fields in Patch requests. 1986 NullFields []string `json:"-"` 1987 } 1988 1989 func (s *Notification) MarshalJSON() ([]byte, error) { 1990 type NoMethod Notification 1991 raw := NoMethod(*s) 1992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1993 } 1994 1995 // NotifierConfig: NotifierConfig is the top-level configuration 1996 // message. 1997 type NotifierConfig struct { 1998 // ApiVersion: The API version of this configuration format. 1999 ApiVersion string `json:"apiVersion,omitempty"` 2000 2001 // Kind: The type of notifier to use (e.g. SMTPNotifier). 2002 Kind string `json:"kind,omitempty"` 2003 2004 // Metadata: Metadata for referring to/handling/deploying this notifier. 2005 Metadata *NotifierMetadata `json:"metadata,omitempty"` 2006 2007 // Spec: The actual configuration for this notifier. 2008 Spec *NotifierSpec `json:"spec,omitempty"` 2009 2010 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2011 // unconditionally include in API requests. By default, fields with 2012 // empty or default values are omitted from API requests. However, any 2013 // non-pointer, non-interface field appearing in ForceSendFields will be 2014 // sent to the server regardless of whether the field is empty or not. 2015 // This may be used to include empty fields in Patch requests. 2016 ForceSendFields []string `json:"-"` 2017 2018 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2019 // API requests with the JSON null value. By default, fields with empty 2020 // values are omitted from API requests. However, any field with an 2021 // empty value appearing in NullFields will be sent to the server as 2022 // null. It is an error if a field in this list has a non-empty value. 2023 // This may be used to include null fields in Patch requests. 2024 NullFields []string `json:"-"` 2025 } 2026 2027 func (s *NotifierConfig) MarshalJSON() ([]byte, error) { 2028 type NoMethod NotifierConfig 2029 raw := NoMethod(*s) 2030 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2031 } 2032 2033 // NotifierMetadata: NotifierMetadata contains the data which can be 2034 // used to reference or describe this notifier. 2035 type NotifierMetadata struct { 2036 // Name: The human-readable and user-given name for the notifier. For 2037 // example: "repo-merge-email-notifier". 2038 Name string `json:"name,omitempty"` 2039 2040 // Notifier: The string representing the name and version of notifier to 2041 // deploy. Expected to be of the form of "/:". For example: 2042 // "gcr.io/my-project/notifiers/smtp:1.2.34". 2043 Notifier string `json:"notifier,omitempty"` 2044 2045 // ForceSendFields is a list of field names (e.g. "Name") to 2046 // unconditionally include in API requests. By default, fields with 2047 // empty or default values are omitted from API requests. However, any 2048 // non-pointer, non-interface field appearing in ForceSendFields will be 2049 // sent to the server regardless of whether the field is empty or not. 2050 // This may be used to include empty fields in Patch requests. 2051 ForceSendFields []string `json:"-"` 2052 2053 // NullFields is a list of field names (e.g. "Name") to include in API 2054 // requests with the JSON null value. By default, fields with empty 2055 // values are omitted from API requests. However, any field with an 2056 // empty value appearing in NullFields will be sent to the server as 2057 // null. It is an error if a field in this list has a non-empty value. 2058 // This may be used to include null fields in Patch requests. 2059 NullFields []string `json:"-"` 2060 } 2061 2062 func (s *NotifierMetadata) MarshalJSON() ([]byte, error) { 2063 type NoMethod NotifierMetadata 2064 raw := NoMethod(*s) 2065 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2066 } 2067 2068 // NotifierSecret: NotifierSecret is the container that maps a secret 2069 // name (reference) to its Google Cloud Secret Manager resource path. 2070 type NotifierSecret struct { 2071 // Name: Name is the local name of the secret, such as the verbatim 2072 // string "my-smtp-password". 2073 Name string `json:"name,omitempty"` 2074 2075 // Value: Value is interpreted to be a resource path for fetching the 2076 // actual (versioned) secret data for this secret. For example, this 2077 // would be a Google Cloud Secret Manager secret version resource path 2078 // like: "projects/my-project/secrets/my-secret/versions/latest". 2079 Value string `json:"value,omitempty"` 2080 2081 // ForceSendFields is a list of field names (e.g. "Name") to 2082 // unconditionally include in API requests. By default, fields with 2083 // empty or default values are omitted from API requests. However, any 2084 // non-pointer, non-interface field appearing in ForceSendFields will be 2085 // sent to the server regardless of whether the field is empty or not. 2086 // This may be used to include empty fields in Patch requests. 2087 ForceSendFields []string `json:"-"` 2088 2089 // NullFields is a list of field names (e.g. "Name") to include in API 2090 // requests with the JSON null value. By default, fields with empty 2091 // values are omitted from API requests. However, any field with an 2092 // empty value appearing in NullFields will be sent to the server as 2093 // null. It is an error if a field in this list has a non-empty value. 2094 // This may be used to include null fields in Patch requests. 2095 NullFields []string `json:"-"` 2096 } 2097 2098 func (s *NotifierSecret) MarshalJSON() ([]byte, error) { 2099 type NoMethod NotifierSecret 2100 raw := NoMethod(*s) 2101 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2102 } 2103 2104 // NotifierSecretRef: NotifierSecretRef contains the reference to a 2105 // secret stored in the corresponding NotifierSpec. 2106 type NotifierSecretRef struct { 2107 // SecretRef: The value of `secret_ref` should be a `name` that is 2108 // registered in a `Secret` in the `secrets` list of the `Spec`. 2109 SecretRef string `json:"secretRef,omitempty"` 2110 2111 // ForceSendFields is a list of field names (e.g. "SecretRef") to 2112 // unconditionally include in API requests. By default, fields with 2113 // empty or default values are omitted from API requests. However, any 2114 // non-pointer, non-interface field appearing in ForceSendFields will be 2115 // sent to the server regardless of whether the field is empty or not. 2116 // This may be used to include empty fields in Patch requests. 2117 ForceSendFields []string `json:"-"` 2118 2119 // NullFields is a list of field names (e.g. "SecretRef") to include in 2120 // API requests with the JSON null value. By default, fields with empty 2121 // values are omitted from API requests. However, any field with an 2122 // empty value appearing in NullFields will be sent to the server as 2123 // null. It is an error if a field in this list has a non-empty value. 2124 // This may be used to include null fields in Patch requests. 2125 NullFields []string `json:"-"` 2126 } 2127 2128 func (s *NotifierSecretRef) MarshalJSON() ([]byte, error) { 2129 type NoMethod NotifierSecretRef 2130 raw := NoMethod(*s) 2131 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2132 } 2133 2134 // NotifierSpec: NotifierSpec is the configuration container for 2135 // notifications. 2136 type NotifierSpec struct { 2137 // Notification: The configuration of this particular notifier. 2138 Notification *Notification `json:"notification,omitempty"` 2139 2140 // Secrets: Configurations for secret resources used by this particular 2141 // notifier. 2142 Secrets []*NotifierSecret `json:"secrets,omitempty"` 2143 2144 // ForceSendFields is a list of field names (e.g. "Notification") to 2145 // unconditionally include in API requests. By default, fields with 2146 // empty or default values are omitted from API requests. However, any 2147 // non-pointer, non-interface field appearing in ForceSendFields will be 2148 // sent to the server regardless of whether the field is empty or not. 2149 // This may be used to include empty fields in Patch requests. 2150 ForceSendFields []string `json:"-"` 2151 2152 // NullFields is a list of field names (e.g. "Notification") to include 2153 // in API requests with the JSON null value. By default, fields with 2154 // empty values are omitted from API requests. However, any field with 2155 // an empty value appearing in NullFields will be sent to the server as 2156 // null. It is an error if a field in this list has a non-empty value. 2157 // This may be used to include null fields in Patch requests. 2158 NullFields []string `json:"-"` 2159 } 2160 2161 func (s *NotifierSpec) MarshalJSON() ([]byte, error) { 2162 type NoMethod NotifierSpec 2163 raw := NoMethod(*s) 2164 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2165 } 2166 2167 // Operation: This resource represents a long-running operation that is 2168 // the result of a network API call. 2169 type Operation struct { 2170 // Done: If the value is `false`, it means the operation is still in 2171 // progress. If `true`, the operation is completed, and either `error` 2172 // or `response` is available. 2173 Done bool `json:"done,omitempty"` 2174 2175 // Error: The error result of the operation in case of failure or 2176 // cancellation. 2177 Error *Status `json:"error,omitempty"` 2178 2179 // Metadata: Service-specific metadata associated with the operation. It 2180 // typically contains progress information and common metadata such as 2181 // create time. Some services might not provide such metadata. Any 2182 // method that returns a long-running operation should document the 2183 // metadata type, if any. 2184 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 2185 2186 // Name: The server-assigned name, which is only unique within the same 2187 // service that originally returns it. If you use the default HTTP 2188 // mapping, the `name` should be a resource name ending with 2189 // `operations/{unique_id}`. 2190 Name string `json:"name,omitempty"` 2191 2192 // Response: The normal response of the operation in case of success. If 2193 // the original method returns no data on success, such as `Delete`, the 2194 // response is `google.protobuf.Empty`. If the original method is 2195 // standard `Get`/`Create`/`Update`, the response should be the 2196 // resource. For other methods, the response should have the type 2197 // `XxxResponse`, where `Xxx` is the original method name. For example, 2198 // if the original method name is `TakeSnapshot()`, the inferred 2199 // response type is `TakeSnapshotResponse`. 2200 Response googleapi.RawMessage `json:"response,omitempty"` 2201 2202 // ServerResponse contains the HTTP response code and headers from the 2203 // server. 2204 googleapi.ServerResponse `json:"-"` 2205 2206 // ForceSendFields is a list of field names (e.g. "Done") to 2207 // unconditionally include in API requests. By default, fields with 2208 // empty or default values are omitted from API requests. However, any 2209 // non-pointer, non-interface field appearing in ForceSendFields will be 2210 // sent to the server regardless of whether the field is empty or not. 2211 // This may be used to include empty fields in Patch requests. 2212 ForceSendFields []string `json:"-"` 2213 2214 // NullFields is a list of field names (e.g. "Done") to include in API 2215 // requests with the JSON null value. By default, fields with empty 2216 // values are omitted from API requests. However, any field with an 2217 // empty value appearing in NullFields will be sent to the server as 2218 // null. It is an error if a field in this list has a non-empty value. 2219 // This may be used to include null fields in Patch requests. 2220 NullFields []string `json:"-"` 2221 } 2222 2223 func (s *Operation) MarshalJSON() ([]byte, error) { 2224 type NoMethod Operation 2225 raw := NoMethod(*s) 2226 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2227 } 2228 2229 // OperationMetadata: Represents the metadata of the long-running 2230 // operation. 2231 type OperationMetadata struct { 2232 // ApiVersion: Output only. API version used to start the operation. 2233 ApiVersion string `json:"apiVersion,omitempty"` 2234 2235 // CancelRequested: Output only. Identifies whether the user has 2236 // requested cancellation of the operation. Operations that have been 2237 // cancelled successfully have Operation.error value with a 2238 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. 2239 CancelRequested bool `json:"cancelRequested,omitempty"` 2240 2241 // CreateTime: Output only. The time the operation was created. 2242 CreateTime string `json:"createTime,omitempty"` 2243 2244 // EndTime: Output only. The time the operation finished running. 2245 EndTime string `json:"endTime,omitempty"` 2246 2247 // StatusDetail: Output only. Human-readable status of the operation, if 2248 // any. 2249 StatusDetail string `json:"statusDetail,omitempty"` 2250 2251 // Target: Output only. Server-defined resource path for the target of 2252 // the operation. 2253 Target string `json:"target,omitempty"` 2254 2255 // Verb: Output only. Name of the verb executed by the operation. 2256 Verb string `json:"verb,omitempty"` 2257 2258 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2259 // unconditionally include in API requests. By default, fields with 2260 // empty or default values are omitted from API requests. However, any 2261 // non-pointer, non-interface field appearing in ForceSendFields will be 2262 // sent to the server regardless of whether the field is empty or not. 2263 // This may be used to include empty fields in Patch requests. 2264 ForceSendFields []string `json:"-"` 2265 2266 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2267 // API requests with the JSON null value. By default, fields with empty 2268 // values are omitted from API requests. However, any field with an 2269 // empty value appearing in NullFields will be sent to the server as 2270 // null. It is an error if a field in this list has a non-empty value. 2271 // This may be used to include null fields in Patch requests. 2272 NullFields []string `json:"-"` 2273 } 2274 2275 func (s *OperationMetadata) MarshalJSON() ([]byte, error) { 2276 type NoMethod OperationMetadata 2277 raw := NoMethod(*s) 2278 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2279 } 2280 2281 // PoolOption: Details about how a build should be executed on a 2282 // `WorkerPool`. See running builds in a private pool 2283 // (https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) 2284 // for more information. 2285 type PoolOption struct { 2286 // Name: The `WorkerPool` resource to execute the build on. You must 2287 // have `cloudbuild.workerpools.use` on the project hosting the 2288 // WorkerPool. Format 2289 // projects/{project}/locations/{location}/workerPools/{workerPoolId} 2290 Name string `json:"name,omitempty"` 2291 2292 // ForceSendFields is a list of field names (e.g. "Name") to 2293 // unconditionally include in API requests. By default, fields with 2294 // empty or default values are omitted from API requests. However, any 2295 // non-pointer, non-interface field appearing in ForceSendFields will be 2296 // sent to the server regardless of whether the field is empty or not. 2297 // This may be used to include empty fields in Patch requests. 2298 ForceSendFields []string `json:"-"` 2299 2300 // NullFields is a list of field names (e.g. "Name") to include in API 2301 // requests with the JSON null value. By default, fields with empty 2302 // values are omitted from API requests. However, any field with an 2303 // empty value appearing in NullFields will be sent to the server as 2304 // null. It is an error if a field in this list has a non-empty value. 2305 // This may be used to include null fields in Patch requests. 2306 NullFields []string `json:"-"` 2307 } 2308 2309 func (s *PoolOption) MarshalJSON() ([]byte, error) { 2310 type NoMethod PoolOption 2311 raw := NoMethod(*s) 2312 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2313 } 2314 2315 // ProcessAppManifestCallbackOperationMetadata: Metadata for 2316 // `ProcessAppManifestCallback` operation. 2317 type ProcessAppManifestCallbackOperationMetadata struct { 2318 // CompleteTime: Time the operation was completed. 2319 CompleteTime string `json:"completeTime,omitempty"` 2320 2321 // CreateTime: Time the operation was created. 2322 CreateTime string `json:"createTime,omitempty"` 2323 2324 // GithubEnterpriseConfig: The resource name of the GitHubEnterprise to 2325 // be created. Format: 2326 // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}` 2327 // . 2328 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"` 2329 2330 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 2331 // unconditionally include in API requests. By default, fields with 2332 // empty or default values are omitted from API requests. However, any 2333 // non-pointer, non-interface field appearing in ForceSendFields will be 2334 // sent to the server regardless of whether the field is empty or not. 2335 // This may be used to include empty fields in Patch requests. 2336 ForceSendFields []string `json:"-"` 2337 2338 // NullFields is a list of field names (e.g. "CompleteTime") to include 2339 // in API requests with the JSON null value. By default, fields with 2340 // empty values are omitted from API requests. However, any field with 2341 // an empty value appearing in NullFields will be sent to the server as 2342 // null. It is an error if a field in this list has a non-empty value. 2343 // This may be used to include null fields in Patch requests. 2344 NullFields []string `json:"-"` 2345 } 2346 2347 func (s *ProcessAppManifestCallbackOperationMetadata) MarshalJSON() ([]byte, error) { 2348 type NoMethod ProcessAppManifestCallbackOperationMetadata 2349 raw := NoMethod(*s) 2350 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2351 } 2352 2353 // PythonPackage: Python package to upload to Artifact Registry upon 2354 // successful completion of all build steps. A package can encapsulate 2355 // multiple objects to be uploaded to a single repository. 2356 type PythonPackage struct { 2357 // Paths: Path globs used to match files in the build's workspace. For 2358 // Python/ Twine, this is usually `dist/*`, and sometimes additionally 2359 // an `.asc` file. 2360 Paths []string `json:"paths,omitempty"` 2361 2362 // Repository: Artifact Registry repository, in the form 2363 // "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" Files in the 2364 // workspace matching any path pattern will be uploaded to Artifact 2365 // Registry with this location as a prefix. 2366 Repository string `json:"repository,omitempty"` 2367 2368 // ForceSendFields is a list of field names (e.g. "Paths") to 2369 // unconditionally include in API requests. By default, fields with 2370 // empty or default values are omitted from API requests. However, any 2371 // non-pointer, non-interface field appearing in ForceSendFields will be 2372 // sent to the server regardless of whether the field is empty or not. 2373 // This may be used to include empty fields in Patch requests. 2374 ForceSendFields []string `json:"-"` 2375 2376 // NullFields is a list of field names (e.g. "Paths") to include in API 2377 // requests with the JSON null value. By default, fields with empty 2378 // values are omitted from API requests. However, any field with an 2379 // empty value appearing in NullFields will be sent to the server as 2380 // null. It is an error if a field in this list has a non-empty value. 2381 // This may be used to include null fields in Patch requests. 2382 NullFields []string `json:"-"` 2383 } 2384 2385 func (s *PythonPackage) MarshalJSON() ([]byte, error) { 2386 type NoMethod PythonPackage 2387 raw := NoMethod(*s) 2388 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2389 } 2390 2391 // RepoSource: Location of the source in a Google Cloud Source 2392 // Repository. 2393 type RepoSource struct { 2394 // BranchName: Regex matching branches to build. The syntax of the 2395 // regular expressions accepted is the syntax accepted by RE2 and 2396 // described at https://github.com/google/re2/wiki/Syntax 2397 BranchName string `json:"branchName,omitempty"` 2398 2399 // CommitSha: Explicit commit SHA to build. 2400 CommitSha string `json:"commitSha,omitempty"` 2401 2402 // Dir: Directory, relative to the source root, in which to run the 2403 // build. This must be a relative path. If a step's `dir` is specified 2404 // and is an absolute path, this value is ignored for that step's 2405 // execution. 2406 Dir string `json:"dir,omitempty"` 2407 2408 // InvertRegex: Only trigger a build if the revision regex does NOT 2409 // match the revision regex. 2410 InvertRegex bool `json:"invertRegex,omitempty"` 2411 2412 // ProjectId: ID of the project that owns the Cloud Source Repository. 2413 // If omitted, the project ID requesting the build is assumed. 2414 ProjectId string `json:"projectId,omitempty"` 2415 2416 // RepoName: Name of the Cloud Source Repository. 2417 RepoName string `json:"repoName,omitempty"` 2418 2419 // Substitutions: Substitutions to use in a triggered build. Should only 2420 // be used with RunBuildTrigger 2421 Substitutions map[string]string `json:"substitutions,omitempty"` 2422 2423 // TagName: Regex matching tags to build. The syntax of the regular 2424 // expressions accepted is the syntax accepted by RE2 and described at 2425 // https://github.com/google/re2/wiki/Syntax 2426 TagName string `json:"tagName,omitempty"` 2427 2428 // ForceSendFields is a list of field names (e.g. "BranchName") to 2429 // unconditionally include in API requests. By default, fields with 2430 // empty or default values are omitted from API requests. However, any 2431 // non-pointer, non-interface field appearing in ForceSendFields will be 2432 // sent to the server regardless of whether the field is empty or not. 2433 // This may be used to include empty fields in Patch requests. 2434 ForceSendFields []string `json:"-"` 2435 2436 // NullFields is a list of field names (e.g. "BranchName") to include in 2437 // API requests with the JSON null value. By default, fields with empty 2438 // values are omitted from API requests. However, any field with an 2439 // empty value appearing in NullFields will be sent to the server as 2440 // null. It is an error if a field in this list has a non-empty value. 2441 // This may be used to include null fields in Patch requests. 2442 NullFields []string `json:"-"` 2443 } 2444 2445 func (s *RepoSource) MarshalJSON() ([]byte, error) { 2446 type NoMethod RepoSource 2447 raw := NoMethod(*s) 2448 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2449 } 2450 2451 // Repository: A repository associated to a parent connection. 2452 type Repository struct { 2453 // Annotations: Allows clients to store small amounts of arbitrary data. 2454 Annotations map[string]string `json:"annotations,omitempty"` 2455 2456 // CreateTime: Output only. Server assigned timestamp for when the 2457 // connection was created. 2458 CreateTime string `json:"createTime,omitempty"` 2459 2460 // Etag: This checksum is computed by the server based on the value of 2461 // other fields, and may be sent on update and delete requests to ensure 2462 // the client has an up-to-date value before proceeding. 2463 Etag string `json:"etag,omitempty"` 2464 2465 // Name: Immutable. Resource name of the repository, in the format 2466 // `projects/*/locations/*/connections/*/repositories/*`. 2467 Name string `json:"name,omitempty"` 2468 2469 // RemoteUri: Required. Git Clone HTTPS URI. 2470 RemoteUri string `json:"remoteUri,omitempty"` 2471 2472 // UpdateTime: Output only. Server assigned timestamp for when the 2473 // connection was updated. 2474 UpdateTime string `json:"updateTime,omitempty"` 2475 2476 // ForceSendFields is a list of field names (e.g. "Annotations") to 2477 // unconditionally include in API requests. By default, fields with 2478 // empty or default values are omitted from API requests. However, any 2479 // non-pointer, non-interface field appearing in ForceSendFields will be 2480 // sent to the server regardless of whether the field is empty or not. 2481 // This may be used to include empty fields in Patch requests. 2482 ForceSendFields []string `json:"-"` 2483 2484 // NullFields is a list of field names (e.g. "Annotations") to include 2485 // in API requests with the JSON null value. By default, fields with 2486 // empty values are omitted from API requests. However, any field with 2487 // an empty value appearing in NullFields will be sent to the server as 2488 // null. It is an error if a field in this list has a non-empty value. 2489 // This may be used to include null fields in Patch requests. 2490 NullFields []string `json:"-"` 2491 } 2492 2493 func (s *Repository) MarshalJSON() ([]byte, error) { 2494 type NoMethod Repository 2495 raw := NoMethod(*s) 2496 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2497 } 2498 2499 // Results: Artifacts created by the build pipeline. 2500 type Results struct { 2501 // ArtifactManifest: Path to the artifact manifest for non-container 2502 // artifacts uploaded to Cloud Storage. Only populated when artifacts 2503 // are uploaded to Cloud Storage. 2504 ArtifactManifest string `json:"artifactManifest,omitempty"` 2505 2506 // ArtifactTiming: Time to push all non-container artifacts to Cloud 2507 // Storage. 2508 ArtifactTiming *TimeSpan `json:"artifactTiming,omitempty"` 2509 2510 // BuildStepImages: List of build step digests, in the order 2511 // corresponding to build step indices. 2512 BuildStepImages []string `json:"buildStepImages,omitempty"` 2513 2514 // BuildStepOutputs: List of build step outputs, produced by builder 2515 // images, in the order corresponding to build step indices. Cloud 2516 // Builders (https://cloud.google.com/cloud-build/docs/cloud-builders) 2517 // can produce this output by writing to `$BUILDER_OUTPUT/output`. Only 2518 // the first 4KB of data is stored. 2519 BuildStepOutputs []string `json:"buildStepOutputs,omitempty"` 2520 2521 // Images: Container images that were built as a part of the build. 2522 Images []*BuiltImage `json:"images,omitempty"` 2523 2524 // MavenArtifacts: Maven artifacts uploaded to Artifact Registry at the 2525 // end of the build. 2526 MavenArtifacts []*UploadedMavenArtifact `json:"mavenArtifacts,omitempty"` 2527 2528 // NumArtifacts: Number of non-container artifacts uploaded to Cloud 2529 // Storage. Only populated when artifacts are uploaded to Cloud Storage. 2530 NumArtifacts int64 `json:"numArtifacts,omitempty,string"` 2531 2532 // PythonPackages: Python artifacts uploaded to Artifact Registry at the 2533 // end of the build. 2534 PythonPackages []*UploadedPythonPackage `json:"pythonPackages,omitempty"` 2535 2536 // ForceSendFields is a list of field names (e.g. "ArtifactManifest") to 2537 // unconditionally include in API requests. By default, fields with 2538 // empty or default values are omitted from API requests. However, any 2539 // non-pointer, non-interface field appearing in ForceSendFields will be 2540 // sent to the server regardless of whether the field is empty or not. 2541 // This may be used to include empty fields in Patch requests. 2542 ForceSendFields []string `json:"-"` 2543 2544 // NullFields is a list of field names (e.g. "ArtifactManifest") to 2545 // include in API requests with the JSON null value. By default, fields 2546 // with empty values are omitted from API requests. However, any field 2547 // with an empty value appearing in NullFields will be sent to the 2548 // server as null. It is an error if a field in this list has a 2549 // non-empty value. This may be used to include null fields in Patch 2550 // requests. 2551 NullFields []string `json:"-"` 2552 } 2553 2554 func (s *Results) MarshalJSON() ([]byte, error) { 2555 type NoMethod Results 2556 raw := NoMethod(*s) 2557 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2558 } 2559 2560 // RunWorkflowCustomOperationMetadata: Represents the custom metadata of 2561 // the RunWorkflow long-running operation. 2562 type RunWorkflowCustomOperationMetadata struct { 2563 // ApiVersion: Output only. API version used to start the operation. 2564 ApiVersion string `json:"apiVersion,omitempty"` 2565 2566 // CreateTime: Output only. The time the operation was created. 2567 CreateTime string `json:"createTime,omitempty"` 2568 2569 // EndTime: Output only. The time the operation finished running. 2570 EndTime string `json:"endTime,omitempty"` 2571 2572 // PipelineRunId: Output only. ID of the pipeline run created by 2573 // RunWorkflow. 2574 PipelineRunId string `json:"pipelineRunId,omitempty"` 2575 2576 // RequestedCancellation: Output only. Identifies whether the user has 2577 // requested cancellation of the operation. Operations that have 2578 // successfully been cancelled have Operation.error value with a 2579 // google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. 2580 RequestedCancellation bool `json:"requestedCancellation,omitempty"` 2581 2582 // Target: Output only. Server-defined resource path for the target of 2583 // the operation. 2584 Target string `json:"target,omitempty"` 2585 2586 // Verb: Output only. Name of the verb executed by the operation. 2587 Verb string `json:"verb,omitempty"` 2588 2589 // ForceSendFields is a list of field names (e.g. "ApiVersion") to 2590 // unconditionally include in API requests. By default, fields with 2591 // empty or default values are omitted from API requests. However, any 2592 // non-pointer, non-interface field appearing in ForceSendFields will be 2593 // sent to the server regardless of whether the field is empty or not. 2594 // This may be used to include empty fields in Patch requests. 2595 ForceSendFields []string `json:"-"` 2596 2597 // NullFields is a list of field names (e.g. "ApiVersion") to include in 2598 // API requests with the JSON null value. By default, fields with empty 2599 // values are omitted from API requests. However, any field with an 2600 // empty value appearing in NullFields will be sent to the server as 2601 // null. It is an error if a field in this list has a non-empty value. 2602 // This may be used to include null fields in Patch requests. 2603 NullFields []string `json:"-"` 2604 } 2605 2606 func (s *RunWorkflowCustomOperationMetadata) MarshalJSON() ([]byte, error) { 2607 type NoMethod RunWorkflowCustomOperationMetadata 2608 raw := NoMethod(*s) 2609 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2610 } 2611 2612 // SMTPDelivery: SMTPDelivery is the delivery configuration for an SMTP 2613 // (email) notification. 2614 type SMTPDelivery struct { 2615 // FromAddress: This is the SMTP account/email that appears in the 2616 // `From:` of the email. If empty, it is assumed to be sender. 2617 FromAddress string `json:"fromAddress,omitempty"` 2618 2619 // Password: The SMTP sender's password. 2620 Password *NotifierSecretRef `json:"password,omitempty"` 2621 2622 // Port: The SMTP port of the server. 2623 Port string `json:"port,omitempty"` 2624 2625 // RecipientAddresses: This is the list of addresses to which we send 2626 // the email (i.e. in the `To:` of the email). 2627 RecipientAddresses []string `json:"recipientAddresses,omitempty"` 2628 2629 // SenderAddress: This is the SMTP account/email that is used to send 2630 // the message. 2631 SenderAddress string `json:"senderAddress,omitempty"` 2632 2633 // Server: The address of the SMTP server. 2634 Server string `json:"server,omitempty"` 2635 2636 // ForceSendFields is a list of field names (e.g. "FromAddress") to 2637 // unconditionally include in API requests. By default, fields with 2638 // empty or default values are omitted from API requests. However, any 2639 // non-pointer, non-interface field appearing in ForceSendFields will be 2640 // sent to the server regardless of whether the field is empty or not. 2641 // This may be used to include empty fields in Patch requests. 2642 ForceSendFields []string `json:"-"` 2643 2644 // NullFields is a list of field names (e.g. "FromAddress") to include 2645 // in API requests with the JSON null value. By default, fields with 2646 // empty values are omitted from API requests. However, any field with 2647 // an empty value appearing in NullFields will be sent to the server as 2648 // null. It is an error if a field in this list has a non-empty value. 2649 // This may be used to include null fields in Patch requests. 2650 NullFields []string `json:"-"` 2651 } 2652 2653 func (s *SMTPDelivery) MarshalJSON() ([]byte, error) { 2654 type NoMethod SMTPDelivery 2655 raw := NoMethod(*s) 2656 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2657 } 2658 2659 // Secret: Pairs a set of secret environment variables containing 2660 // encrypted values with the Cloud KMS key to use to decrypt the value. 2661 // Note: Use `kmsKeyName` with `available_secrets` instead of using 2662 // `kmsKeyName` with `secret`. For instructions see: 2663 // https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials. 2664 type Secret struct { 2665 // KmsKeyName: Cloud KMS key name to use to decrypt these envs. 2666 KmsKeyName string `json:"kmsKeyName,omitempty"` 2667 2668 // SecretEnv: Map of environment variable name to its encrypted value. 2669 // Secret environment variables must be unique across all of a build's 2670 // secrets, and must be used by at least one build step. Values can be 2671 // at most 64 KB in size. There can be at most 100 secret values across 2672 // all of a build's secrets. 2673 SecretEnv map[string]string `json:"secretEnv,omitempty"` 2674 2675 // ForceSendFields is a list of field names (e.g. "KmsKeyName") to 2676 // unconditionally include in API requests. By default, fields with 2677 // empty or default values are omitted from API requests. However, any 2678 // non-pointer, non-interface field appearing in ForceSendFields will be 2679 // sent to the server regardless of whether the field is empty or not. 2680 // This may be used to include empty fields in Patch requests. 2681 ForceSendFields []string `json:"-"` 2682 2683 // NullFields is a list of field names (e.g. "KmsKeyName") to include in 2684 // API requests with the JSON null value. By default, fields with empty 2685 // values are omitted from API requests. However, any field with an 2686 // empty value appearing in NullFields will be sent to the server as 2687 // null. It is an error if a field in this list has a non-empty value. 2688 // This may be used to include null fields in Patch requests. 2689 NullFields []string `json:"-"` 2690 } 2691 2692 func (s *Secret) MarshalJSON() ([]byte, error) { 2693 type NoMethod Secret 2694 raw := NoMethod(*s) 2695 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2696 } 2697 2698 // SecretManagerSecret: Pairs a secret environment variable with a 2699 // SecretVersion in Secret Manager. 2700 type SecretManagerSecret struct { 2701 // Env: Environment variable name to associate with the secret. Secret 2702 // environment variables must be unique across all of a build's secrets, 2703 // and must be used by at least one build step. 2704 Env string `json:"env,omitempty"` 2705 2706 // VersionName: Resource name of the SecretVersion. In format: 2707 // projects/*/secrets/*/versions/* 2708 VersionName string `json:"versionName,omitempty"` 2709 2710 // ForceSendFields is a list of field names (e.g. "Env") to 2711 // unconditionally include in API requests. By default, fields with 2712 // empty or default values are omitted from API requests. However, any 2713 // non-pointer, non-interface field appearing in ForceSendFields will be 2714 // sent to the server regardless of whether the field is empty or not. 2715 // This may be used to include empty fields in Patch requests. 2716 ForceSendFields []string `json:"-"` 2717 2718 // NullFields is a list of field names (e.g. "Env") to include in API 2719 // requests with the JSON null value. By default, fields with empty 2720 // values are omitted from API requests. However, any field with an 2721 // empty value appearing in NullFields will be sent to the server as 2722 // null. It is an error if a field in this list has a non-empty value. 2723 // This may be used to include null fields in Patch requests. 2724 NullFields []string `json:"-"` 2725 } 2726 2727 func (s *SecretManagerSecret) MarshalJSON() ([]byte, error) { 2728 type NoMethod SecretManagerSecret 2729 raw := NoMethod(*s) 2730 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2731 } 2732 2733 // Secrets: Secrets and secret environment variables. 2734 type Secrets struct { 2735 // Inline: Secrets encrypted with KMS key and the associated secret 2736 // environment variable. 2737 Inline []*InlineSecret `json:"inline,omitempty"` 2738 2739 // SecretManager: Secrets in Secret Manager and associated secret 2740 // environment variable. 2741 SecretManager []*SecretManagerSecret `json:"secretManager,omitempty"` 2742 2743 // ForceSendFields is a list of field names (e.g. "Inline") to 2744 // unconditionally include in API requests. By default, fields with 2745 // empty or default values are omitted from API requests. However, any 2746 // non-pointer, non-interface field appearing in ForceSendFields will be 2747 // sent to the server regardless of whether the field is empty or not. 2748 // This may be used to include empty fields in Patch requests. 2749 ForceSendFields []string `json:"-"` 2750 2751 // NullFields is a list of field names (e.g. "Inline") to include in API 2752 // requests with the JSON null value. By default, fields with empty 2753 // values are omitted from API requests. However, any field with an 2754 // empty value appearing in NullFields will be sent to the server as 2755 // null. It is an error if a field in this list has a non-empty value. 2756 // This may be used to include null fields in Patch requests. 2757 NullFields []string `json:"-"` 2758 } 2759 2760 func (s *Secrets) MarshalJSON() ([]byte, error) { 2761 type NoMethod Secrets 2762 raw := NoMethod(*s) 2763 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2764 } 2765 2766 // SlackDelivery: SlackDelivery is the delivery configuration for 2767 // delivering Slack messages via webhooks. See Slack webhook 2768 // documentation at: https://api.slack.com/messaging/webhooks. 2769 type SlackDelivery struct { 2770 // WebhookUri: The secret reference for the Slack webhook URI for 2771 // sending messages to a channel. 2772 WebhookUri *NotifierSecretRef `json:"webhookUri,omitempty"` 2773 2774 // ForceSendFields is a list of field names (e.g. "WebhookUri") to 2775 // unconditionally include in API requests. By default, fields with 2776 // empty or default values are omitted from API requests. However, any 2777 // non-pointer, non-interface field appearing in ForceSendFields will be 2778 // sent to the server regardless of whether the field is empty or not. 2779 // This may be used to include empty fields in Patch requests. 2780 ForceSendFields []string `json:"-"` 2781 2782 // NullFields is a list of field names (e.g. "WebhookUri") to include in 2783 // API requests with the JSON null value. By default, fields with empty 2784 // values are omitted from API requests. However, any field with an 2785 // empty value appearing in NullFields will be sent to the server as 2786 // null. It is an error if a field in this list has a non-empty value. 2787 // This may be used to include null fields in Patch requests. 2788 NullFields []string `json:"-"` 2789 } 2790 2791 func (s *SlackDelivery) MarshalJSON() ([]byte, error) { 2792 type NoMethod SlackDelivery 2793 raw := NoMethod(*s) 2794 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2795 } 2796 2797 // Source: Location of the source in a supported storage service. 2798 type Source struct { 2799 // RepoSource: If provided, get the source from this location in a Cloud 2800 // Source Repository. 2801 RepoSource *RepoSource `json:"repoSource,omitempty"` 2802 2803 // StorageSource: If provided, get the source from this location in 2804 // Google Cloud Storage. 2805 StorageSource *StorageSource `json:"storageSource,omitempty"` 2806 2807 // StorageSourceManifest: If provided, get the source from this manifest 2808 // in Google Cloud Storage. This feature is in Preview; see description 2809 // here 2810 // (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). 2811 StorageSourceManifest *StorageSourceManifest `json:"storageSourceManifest,omitempty"` 2812 2813 // ForceSendFields is a list of field names (e.g. "RepoSource") to 2814 // unconditionally include in API requests. By default, fields with 2815 // empty or default values are omitted from API requests. However, any 2816 // non-pointer, non-interface field appearing in ForceSendFields will be 2817 // sent to the server regardless of whether the field is empty or not. 2818 // This may be used to include empty fields in Patch requests. 2819 ForceSendFields []string `json:"-"` 2820 2821 // NullFields is a list of field names (e.g. "RepoSource") to include in 2822 // API requests with the JSON null value. By default, fields with empty 2823 // values are omitted from API requests. However, any field with an 2824 // empty value appearing in NullFields will be sent to the server as 2825 // null. It is an error if a field in this list has a non-empty value. 2826 // This may be used to include null fields in Patch requests. 2827 NullFields []string `json:"-"` 2828 } 2829 2830 func (s *Source) MarshalJSON() ([]byte, error) { 2831 type NoMethod Source 2832 raw := NoMethod(*s) 2833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2834 } 2835 2836 // SourceProvenance: Provenance of the source. Ways to find the original 2837 // source, or verify that some source was used for this build. 2838 type SourceProvenance struct { 2839 // FileHashes: Output only. Hash(es) of the build source, which can be 2840 // used to verify that the original source integrity was maintained in 2841 // the build. Note that `FileHashes` will only be populated if 2842 // `BuildOptions` has requested a `SourceProvenanceHash`. The keys to 2843 // this map are file paths used as build source and the values contain 2844 // the hash values for those files. If the build source came in a single 2845 // package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be 2846 // for the single path to that file. 2847 FileHashes map[string]FileHashes `json:"fileHashes,omitempty"` 2848 2849 // ResolvedRepoSource: A copy of the build's `source.repo_source`, if 2850 // exists, with any revisions resolved. 2851 ResolvedRepoSource *RepoSource `json:"resolvedRepoSource,omitempty"` 2852 2853 // ResolvedStorageSource: A copy of the build's `source.storage_source`, 2854 // if exists, with any generations resolved. 2855 ResolvedStorageSource *StorageSource `json:"resolvedStorageSource,omitempty"` 2856 2857 // ResolvedStorageSourceManifest: A copy of the build's 2858 // `source.storage_source_manifest`, if exists, with any revisions 2859 // resolved. This feature is in Preview. 2860 ResolvedStorageSourceManifest *StorageSourceManifest `json:"resolvedStorageSourceManifest,omitempty"` 2861 2862 // ForceSendFields is a list of field names (e.g. "FileHashes") to 2863 // unconditionally include in API requests. By default, fields with 2864 // empty or default values are omitted from API requests. However, any 2865 // non-pointer, non-interface field appearing in ForceSendFields will be 2866 // sent to the server regardless of whether the field is empty or not. 2867 // This may be used to include empty fields in Patch requests. 2868 ForceSendFields []string `json:"-"` 2869 2870 // NullFields is a list of field names (e.g. "FileHashes") to include in 2871 // API requests with the JSON null value. By default, fields with empty 2872 // values are omitted from API requests. However, any field with an 2873 // empty value appearing in NullFields will be sent to the server as 2874 // null. It is an error if a field in this list has a non-empty value. 2875 // This may be used to include null fields in Patch requests. 2876 NullFields []string `json:"-"` 2877 } 2878 2879 func (s *SourceProvenance) MarshalJSON() ([]byte, error) { 2880 type NoMethod SourceProvenance 2881 raw := NoMethod(*s) 2882 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2883 } 2884 2885 // Status: The `Status` type defines a logical error model that is 2886 // suitable for different programming environments, including REST APIs 2887 // and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 2888 // `Status` message contains three pieces of data: error code, error 2889 // message, and error details. You can find out more about this error 2890 // model and how to work with it in the API Design Guide 2891 // (https://cloud.google.com/apis/design/errors). 2892 type Status struct { 2893 // Code: The status code, which should be an enum value of 2894 // google.rpc.Code. 2895 Code int64 `json:"code,omitempty"` 2896 2897 // Details: A list of messages that carry the error details. There is a 2898 // common set of message types for APIs to use. 2899 Details []googleapi.RawMessage `json:"details,omitempty"` 2900 2901 // Message: A developer-facing error message, which should be in 2902 // English. Any user-facing error message should be localized and sent 2903 // in the google.rpc.Status.details field, or localized by the client. 2904 Message string `json:"message,omitempty"` 2905 2906 // ForceSendFields is a list of field names (e.g. "Code") to 2907 // unconditionally include in API requests. By default, fields with 2908 // empty or default values are omitted from API requests. However, any 2909 // non-pointer, non-interface field appearing in ForceSendFields will be 2910 // sent to the server regardless of whether the field is empty or not. 2911 // This may be used to include empty fields in Patch requests. 2912 ForceSendFields []string `json:"-"` 2913 2914 // NullFields is a list of field names (e.g. "Code") to include in API 2915 // requests with the JSON null value. By default, fields with empty 2916 // values are omitted from API requests. However, any field with an 2917 // empty value appearing in NullFields will be sent to the server as 2918 // null. It is an error if a field in this list has a non-empty value. 2919 // This may be used to include null fields in Patch requests. 2920 NullFields []string `json:"-"` 2921 } 2922 2923 func (s *Status) MarshalJSON() ([]byte, error) { 2924 type NoMethod Status 2925 raw := NoMethod(*s) 2926 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2927 } 2928 2929 // StorageSource: Location of the source in an archive file in Google 2930 // Cloud Storage. 2931 type StorageSource struct { 2932 // Bucket: Google Cloud Storage bucket containing the source (see Bucket 2933 // Name Requirements 2934 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 2935 Bucket string `json:"bucket,omitempty"` 2936 2937 // Generation: Google Cloud Storage generation for the object. If the 2938 // generation is omitted, the latest generation will be used. 2939 Generation int64 `json:"generation,omitempty,string"` 2940 2941 // Object: Google Cloud Storage object containing the source. This 2942 // object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) 2943 // containing source to build. 2944 Object string `json:"object,omitempty"` 2945 2946 // ForceSendFields is a list of field names (e.g. "Bucket") to 2947 // unconditionally include in API requests. By default, fields with 2948 // empty or default values are omitted from API requests. However, any 2949 // non-pointer, non-interface field appearing in ForceSendFields will be 2950 // sent to the server regardless of whether the field is empty or not. 2951 // This may be used to include empty fields in Patch requests. 2952 ForceSendFields []string `json:"-"` 2953 2954 // NullFields is a list of field names (e.g. "Bucket") to include in API 2955 // requests with the JSON null value. By default, fields with empty 2956 // values are omitted from API requests. However, any field with an 2957 // empty value appearing in NullFields will be sent to the server as 2958 // null. It is an error if a field in this list has a non-empty value. 2959 // This may be used to include null fields in Patch requests. 2960 NullFields []string `json:"-"` 2961 } 2962 2963 func (s *StorageSource) MarshalJSON() ([]byte, error) { 2964 type NoMethod StorageSource 2965 raw := NoMethod(*s) 2966 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2967 } 2968 2969 // StorageSourceManifest: Location of the source manifest in Google 2970 // Cloud Storage. This feature is in Preview; see description here 2971 // (https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). 2972 type StorageSourceManifest struct { 2973 // Bucket: Google Cloud Storage bucket containing the source manifest 2974 // (see Bucket Name Requirements 2975 // (https://cloud.google.com/storage/docs/bucket-naming#requirements)). 2976 Bucket string `json:"bucket,omitempty"` 2977 2978 // Generation: Google Cloud Storage generation for the object. If the 2979 // generation is omitted, the latest generation will be used. 2980 Generation int64 `json:"generation,omitempty,string"` 2981 2982 // Object: Google Cloud Storage object containing the source manifest. 2983 // This object must be a JSON file. 2984 Object string `json:"object,omitempty"` 2985 2986 // ForceSendFields is a list of field names (e.g. "Bucket") to 2987 // unconditionally include in API requests. By default, fields with 2988 // empty or default values are omitted from API requests. However, any 2989 // non-pointer, non-interface field appearing in ForceSendFields will be 2990 // sent to the server regardless of whether the field is empty or not. 2991 // This may be used to include empty fields in Patch requests. 2992 ForceSendFields []string `json:"-"` 2993 2994 // NullFields is a list of field names (e.g. "Bucket") to include in API 2995 // requests with the JSON null value. By default, fields with empty 2996 // values are omitted from API requests. However, any field with an 2997 // empty value appearing in NullFields will be sent to the server as 2998 // null. It is an error if a field in this list has a non-empty value. 2999 // This may be used to include null fields in Patch requests. 3000 NullFields []string `json:"-"` 3001 } 3002 3003 func (s *StorageSourceManifest) MarshalJSON() ([]byte, error) { 3004 type NoMethod StorageSourceManifest 3005 raw := NoMethod(*s) 3006 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3007 } 3008 3009 // TimeSpan: Start and end times for a build execution phase. 3010 type TimeSpan struct { 3011 // EndTime: End of time span. 3012 EndTime string `json:"endTime,omitempty"` 3013 3014 // StartTime: Start of time span. 3015 StartTime string `json:"startTime,omitempty"` 3016 3017 // ForceSendFields is a list of field names (e.g. "EndTime") to 3018 // unconditionally include in API requests. By default, fields with 3019 // empty or default values are omitted from API requests. However, any 3020 // non-pointer, non-interface field appearing in ForceSendFields will be 3021 // sent to the server regardless of whether the field is empty or not. 3022 // This may be used to include empty fields in Patch requests. 3023 ForceSendFields []string `json:"-"` 3024 3025 // NullFields is a list of field names (e.g. "EndTime") to include in 3026 // API requests with the JSON null value. By default, fields with empty 3027 // values are omitted from API requests. However, any field with an 3028 // empty value appearing in NullFields will be sent to the server as 3029 // null. It is an error if a field in this list has a non-empty value. 3030 // This may be used to include null fields in Patch requests. 3031 NullFields []string `json:"-"` 3032 } 3033 3034 func (s *TimeSpan) MarshalJSON() ([]byte, error) { 3035 type NoMethod TimeSpan 3036 raw := NoMethod(*s) 3037 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3038 } 3039 3040 // UpdateBitbucketServerConfigOperationMetadata: Metadata for 3041 // `UpdateBitbucketServerConfig` operation. 3042 type UpdateBitbucketServerConfigOperationMetadata struct { 3043 // BitbucketServerConfig: The resource name of the BitbucketServerConfig 3044 // to be updated. Format: 3045 // `projects/{project}/locations/{location}/bitbucketServerConfigs/{id}`. 3046 BitbucketServerConfig string `json:"bitbucketServerConfig,omitempty"` 3047 3048 // CompleteTime: Time the operation was completed. 3049 CompleteTime string `json:"completeTime,omitempty"` 3050 3051 // CreateTime: Time the operation was created. 3052 CreateTime string `json:"createTime,omitempty"` 3053 3054 // ForceSendFields is a list of field names (e.g. 3055 // "BitbucketServerConfig") to unconditionally include in API requests. 3056 // By default, fields with empty or default values are omitted from API 3057 // requests. However, any non-pointer, non-interface field appearing in 3058 // ForceSendFields will be sent to the server regardless of whether the 3059 // field is empty or not. This may be used to include empty fields in 3060 // Patch requests. 3061 ForceSendFields []string `json:"-"` 3062 3063 // NullFields is a list of field names (e.g. "BitbucketServerConfig") to 3064 // include in API requests with the JSON null value. By default, fields 3065 // with empty values are omitted from API requests. However, any field 3066 // with an empty value appearing in NullFields will be sent to the 3067 // server as null. It is an error if a field in this list has a 3068 // non-empty value. This may be used to include null fields in Patch 3069 // requests. 3070 NullFields []string `json:"-"` 3071 } 3072 3073 func (s *UpdateBitbucketServerConfigOperationMetadata) MarshalJSON() ([]byte, error) { 3074 type NoMethod UpdateBitbucketServerConfigOperationMetadata 3075 raw := NoMethod(*s) 3076 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3077 } 3078 3079 // UpdateGitHubEnterpriseConfigOperationMetadata: Metadata for 3080 // `UpdateGitHubEnterpriseConfig` operation. 3081 type UpdateGitHubEnterpriseConfigOperationMetadata struct { 3082 // CompleteTime: Time the operation was completed. 3083 CompleteTime string `json:"completeTime,omitempty"` 3084 3085 // CreateTime: Time the operation was created. 3086 CreateTime string `json:"createTime,omitempty"` 3087 3088 // GithubEnterpriseConfig: The resource name of the GitHubEnterprise to 3089 // be updated. Format: 3090 // `projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}` 3091 // . 3092 GithubEnterpriseConfig string `json:"githubEnterpriseConfig,omitempty"` 3093 3094 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 3095 // unconditionally include in API requests. By default, fields with 3096 // empty or default values are omitted from API requests. However, any 3097 // non-pointer, non-interface field appearing in ForceSendFields will be 3098 // sent to the server regardless of whether the field is empty or not. 3099 // This may be used to include empty fields in Patch requests. 3100 ForceSendFields []string `json:"-"` 3101 3102 // NullFields is a list of field names (e.g. "CompleteTime") to include 3103 // in API requests with the JSON null value. By default, fields with 3104 // empty values are omitted from API requests. However, any field with 3105 // an empty value appearing in NullFields will be sent to the server as 3106 // null. It is an error if a field in this list has a non-empty value. 3107 // This may be used to include null fields in Patch requests. 3108 NullFields []string `json:"-"` 3109 } 3110 3111 func (s *UpdateGitHubEnterpriseConfigOperationMetadata) MarshalJSON() ([]byte, error) { 3112 type NoMethod UpdateGitHubEnterpriseConfigOperationMetadata 3113 raw := NoMethod(*s) 3114 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3115 } 3116 3117 // UpdateGitLabConfigOperationMetadata: Metadata for 3118 // `UpdateGitLabConfig` operation. 3119 type UpdateGitLabConfigOperationMetadata struct { 3120 // CompleteTime: Time the operation was completed. 3121 CompleteTime string `json:"completeTime,omitempty"` 3122 3123 // CreateTime: Time the operation was created. 3124 CreateTime string `json:"createTime,omitempty"` 3125 3126 // GitlabConfig: The resource name of the GitLabConfig to be created. 3127 // Format: `projects/{project}/locations/{location}/gitlabConfigs/{id}`. 3128 GitlabConfig string `json:"gitlabConfig,omitempty"` 3129 3130 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 3131 // unconditionally include in API requests. By default, fields with 3132 // empty or default values are omitted from API requests. However, any 3133 // non-pointer, non-interface field appearing in ForceSendFields will be 3134 // sent to the server regardless of whether the field is empty or not. 3135 // This may be used to include empty fields in Patch requests. 3136 ForceSendFields []string `json:"-"` 3137 3138 // NullFields is a list of field names (e.g. "CompleteTime") to include 3139 // in API requests with the JSON null value. By default, fields with 3140 // empty values are omitted from API requests. However, any field with 3141 // an empty value appearing in NullFields will be sent to the server as 3142 // null. It is an error if a field in this list has a non-empty value. 3143 // This may be used to include null fields in Patch requests. 3144 NullFields []string `json:"-"` 3145 } 3146 3147 func (s *UpdateGitLabConfigOperationMetadata) MarshalJSON() ([]byte, error) { 3148 type NoMethod UpdateGitLabConfigOperationMetadata 3149 raw := NoMethod(*s) 3150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3151 } 3152 3153 // UpdateWorkerPoolOperationMetadata: Metadata for the 3154 // `UpdateWorkerPool` operation. 3155 type UpdateWorkerPoolOperationMetadata struct { 3156 // CompleteTime: Time the operation was completed. 3157 CompleteTime string `json:"completeTime,omitempty"` 3158 3159 // CreateTime: Time the operation was created. 3160 CreateTime string `json:"createTime,omitempty"` 3161 3162 // WorkerPool: The resource name of the `WorkerPool` being updated. 3163 // Format: 3164 // `projects/{project}/locations/{location}/workerPools/{worker_pool}`. 3165 WorkerPool string `json:"workerPool,omitempty"` 3166 3167 // ForceSendFields is a list of field names (e.g. "CompleteTime") to 3168 // unconditionally include in API requests. By default, fields with 3169 // empty or default values are omitted from API requests. However, any 3170 // non-pointer, non-interface field appearing in ForceSendFields will be 3171 // sent to the server regardless of whether the field is empty or not. 3172 // This may be used to include empty fields in Patch requests. 3173 ForceSendFields []string `json:"-"` 3174 3175 // NullFields is a list of field names (e.g. "CompleteTime") to include 3176 // in API requests with the JSON null value. By default, fields with 3177 // empty values are omitted from API requests. However, any field with 3178 // an empty value appearing in NullFields will be sent to the server as 3179 // null. It is an error if a field in this list has a non-empty value. 3180 // This may be used to include null fields in Patch requests. 3181 NullFields []string `json:"-"` 3182 } 3183 3184 func (s *UpdateWorkerPoolOperationMetadata) MarshalJSON() ([]byte, error) { 3185 type NoMethod UpdateWorkerPoolOperationMetadata 3186 raw := NoMethod(*s) 3187 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3188 } 3189 3190 // UploadedMavenArtifact: A Maven artifact uploaded using the 3191 // MavenArtifact directive. 3192 type UploadedMavenArtifact struct { 3193 // FileHashes: Hash types and values of the Maven Artifact. 3194 FileHashes *FileHashes `json:"fileHashes,omitempty"` 3195 3196 // PushTiming: Output only. Stores timing information for pushing the 3197 // specified artifact. 3198 PushTiming *TimeSpan `json:"pushTiming,omitempty"` 3199 3200 // Uri: URI of the uploaded artifact. 3201 Uri string `json:"uri,omitempty"` 3202 3203 // ForceSendFields is a list of field names (e.g. "FileHashes") to 3204 // unconditionally include in API requests. By default, fields with 3205 // empty or default values are omitted from API requests. However, any 3206 // non-pointer, non-interface field appearing in ForceSendFields will be 3207 // sent to the server regardless of whether the field is empty or not. 3208 // This may be used to include empty fields in Patch requests. 3209 ForceSendFields []string `json:"-"` 3210 3211 // NullFields is a list of field names (e.g. "FileHashes") to include in 3212 // API requests with the JSON null value. By default, fields with empty 3213 // values are omitted from API requests. However, any field with an 3214 // empty value appearing in NullFields will be sent to the server as 3215 // null. It is an error if a field in this list has a non-empty value. 3216 // This may be used to include null fields in Patch requests. 3217 NullFields []string `json:"-"` 3218 } 3219 3220 func (s *UploadedMavenArtifact) MarshalJSON() ([]byte, error) { 3221 type NoMethod UploadedMavenArtifact 3222 raw := NoMethod(*s) 3223 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3224 } 3225 3226 // UploadedPythonPackage: Artifact uploaded using the PythonPackage 3227 // directive. 3228 type UploadedPythonPackage struct { 3229 // FileHashes: Hash types and values of the Python Artifact. 3230 FileHashes *FileHashes `json:"fileHashes,omitempty"` 3231 3232 // PushTiming: Output only. Stores timing information for pushing the 3233 // specified artifact. 3234 PushTiming *TimeSpan `json:"pushTiming,omitempty"` 3235 3236 // Uri: URI of the uploaded artifact. 3237 Uri string `json:"uri,omitempty"` 3238 3239 // ForceSendFields is a list of field names (e.g. "FileHashes") to 3240 // unconditionally include in API requests. By default, fields with 3241 // empty or default values are omitted from API requests. However, any 3242 // non-pointer, non-interface field appearing in ForceSendFields will be 3243 // sent to the server regardless of whether the field is empty or not. 3244 // This may be used to include empty fields in Patch requests. 3245 ForceSendFields []string `json:"-"` 3246 3247 // NullFields is a list of field names (e.g. "FileHashes") to include in 3248 // API requests with the JSON null value. By default, fields with empty 3249 // values are omitted from API requests. However, any field with an 3250 // empty value appearing in NullFields will be sent to the server as 3251 // null. It is an error if a field in this list has a non-empty value. 3252 // This may be used to include null fields in Patch requests. 3253 NullFields []string `json:"-"` 3254 } 3255 3256 func (s *UploadedPythonPackage) MarshalJSON() ([]byte, error) { 3257 type NoMethod UploadedPythonPackage 3258 raw := NoMethod(*s) 3259 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3260 } 3261 3262 // Volume: Volume describes a Docker container volume which is mounted 3263 // into build steps in order to persist files across build step 3264 // execution. 3265 type Volume struct { 3266 // Name: Name of the volume to mount. Volume names must be unique per 3267 // build step and must be valid names for Docker volumes. Each named 3268 // volume must be used by at least two build steps. 3269 Name string `json:"name,omitempty"` 3270 3271 // Path: Path at which to mount the volume. Paths must be absolute and 3272 // cannot conflict with other volume paths on the same build step or 3273 // with certain reserved volume paths. 3274 Path string `json:"path,omitempty"` 3275 3276 // ForceSendFields is a list of field names (e.g. "Name") to 3277 // unconditionally include in API requests. By default, fields with 3278 // empty or default values are omitted from API requests. However, any 3279 // non-pointer, non-interface field appearing in ForceSendFields will be 3280 // sent to the server regardless of whether the field is empty or not. 3281 // This may be used to include empty fields in Patch requests. 3282 ForceSendFields []string `json:"-"` 3283 3284 // NullFields is a list of field names (e.g. "Name") to include in API 3285 // requests with the JSON null value. By default, fields with empty 3286 // values are omitted from API requests. However, any field with an 3287 // empty value appearing in NullFields will be sent to the server as 3288 // null. It is an error if a field in this list has a non-empty value. 3289 // This may be used to include null fields in Patch requests. 3290 NullFields []string `json:"-"` 3291 } 3292 3293 func (s *Volume) MarshalJSON() ([]byte, error) { 3294 type NoMethod Volume 3295 raw := NoMethod(*s) 3296 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3297 } 3298 3299 // Warning: A non-fatal problem encountered during the execution of the 3300 // build. 3301 type Warning struct { 3302 // Priority: The priority for this warning. 3303 // 3304 // Possible values: 3305 // "PRIORITY_UNSPECIFIED" - Should not be used. 3306 // "INFO" - e.g. deprecation warnings and alternative feature 3307 // highlights. 3308 // "WARNING" - e.g. automated detection of possible issues with the 3309 // build. 3310 // "ALERT" - e.g. alerts that a feature used in the build is pending 3311 // removal 3312 Priority string `json:"priority,omitempty"` 3313 3314 // Text: Explanation of the warning generated. 3315 Text string `json:"text,omitempty"` 3316 3317 // ForceSendFields is a list of field names (e.g. "Priority") to 3318 // unconditionally include in API requests. By default, fields with 3319 // empty or default values are omitted from API requests. However, any 3320 // non-pointer, non-interface field appearing in ForceSendFields will be 3321 // sent to the server regardless of whether the field is empty or not. 3322 // This may be used to include empty fields in Patch requests. 3323 ForceSendFields []string `json:"-"` 3324 3325 // NullFields is a list of field names (e.g. "Priority") to include in 3326 // API requests with the JSON null value. By default, fields with empty 3327 // values are omitted from API requests. However, any field with an 3328 // empty value appearing in NullFields will be sent to the server as 3329 // null. It is an error if a field in this list has a non-empty value. 3330 // This may be used to include null fields in Patch requests. 3331 NullFields []string `json:"-"` 3332 } 3333 3334 func (s *Warning) MarshalJSON() ([]byte, error) { 3335 type NoMethod Warning 3336 raw := NoMethod(*s) 3337 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3338 } 3339 3340 // WorkerConfig: WorkerConfig defines the configuration to be used for a 3341 // creating workers in the pool. 3342 type WorkerConfig struct { 3343 // DiskSizeGb: Size of the disk attached to the worker, in GB. See 3344 // https://cloud.google.com/compute/docs/disks/ If `0` is specified, 3345 // Cloud Build will use a standard disk size. `disk_size` is overridden 3346 // if you specify a different disk size in `build_options`. In this 3347 // case, a VM with a disk size specified in the `build_options` will be 3348 // created on demand at build time. For more information see 3349 // https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.builds#buildoptions 3350 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 3351 3352 // MachineType: Machine Type of the worker, such as n1-standard-1. See 3353 // https://cloud.google.com/compute/docs/machine-types. If left blank, 3354 // Cloud Build will use a standard unspecified machine to create the 3355 // worker pool. `machine_type` is overridden if you specify a different 3356 // machine type in `build_options`. In this case, the VM specified in 3357 // the `build_options` will be created on demand at build time. For more 3358 // information see 3359 // https://cloud.google.com/cloud-build/docs/speeding-up-builds#using_custom_virtual_machine_sizes 3360 MachineType string `json:"machineType,omitempty"` 3361 3362 // Network: The network definition used to create the worker. If this 3363 // section is left empty, the workers will be created in 3364 // WorkerPool.project_id on the default network. 3365 Network *Network `json:"network,omitempty"` 3366 3367 // Tag: The tag applied to the worker, and the same tag used by the 3368 // firewall rule. It is used to identify the Cloud Build workers among 3369 // other VMs. The default value for tag is `worker`. 3370 Tag string `json:"tag,omitempty"` 3371 3372 // ForceSendFields is a list of field names (e.g. "DiskSizeGb") to 3373 // unconditionally include in API requests. By default, fields with 3374 // empty or default values are omitted from API requests. However, any 3375 // non-pointer, non-interface field appearing in ForceSendFields will be 3376 // sent to the server regardless of whether the field is empty or not. 3377 // This may be used to include empty fields in Patch requests. 3378 ForceSendFields []string `json:"-"` 3379 3380 // NullFields is a list of field names (e.g. "DiskSizeGb") to include in 3381 // API requests with the JSON null value. By default, fields with empty 3382 // values are omitted from API requests. However, any field with an 3383 // empty value appearing in NullFields will be sent to the server as 3384 // null. It is an error if a field in this list has a non-empty value. 3385 // This may be used to include null fields in Patch requests. 3386 NullFields []string `json:"-"` 3387 } 3388 3389 func (s *WorkerConfig) MarshalJSON() ([]byte, error) { 3390 type NoMethod WorkerConfig 3391 raw := NoMethod(*s) 3392 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3393 } 3394 3395 // WorkerPool: Configuration for a WorkerPool to run the builds. Workers 3396 // are machines that Cloud Build uses to run your builds. By default, 3397 // all workers run in a project owned by Cloud Build. To have full 3398 // control over the workers that execute your builds -- such as enabling 3399 // them to access private resources on your private network -- you can 3400 // request Cloud Build to run the workers in your own project by 3401 // creating a custom workers pool. 3402 type WorkerPool struct { 3403 // CreateTime: Output only. Time at which the request to create the 3404 // `WorkerPool` was received. 3405 CreateTime string `json:"createTime,omitempty"` 3406 3407 // DeleteTime: Output only. Time at which the request to delete the 3408 // `WorkerPool` was received. 3409 DeleteTime string `json:"deleteTime,omitempty"` 3410 3411 // Name: User-defined name of the `WorkerPool`. 3412 Name string `json:"name,omitempty"` 3413 3414 // ProjectId: The project ID of the GCP project for which the 3415 // `WorkerPool` is created. 3416 ProjectId string `json:"projectId,omitempty"` 3417 3418 // Regions: List of regions to create the `WorkerPool`. Regions can't be 3419 // empty. If Cloud Build adds a new GCP region in the future, the 3420 // existing `WorkerPool` will not be enabled in the new region 3421 // automatically; you must add the new region to the `regions` field to 3422 // enable the `WorkerPool` in that region. 3423 // 3424 // Possible values: 3425 // "REGION_UNSPECIFIED" - no region 3426 // "us-central1" - us-central1 region 3427 // "us-west1" - us-west1 region 3428 // "us-east1" - us-east1 region 3429 // "us-east4" - us-east4 region 3430 Regions []string `json:"regions,omitempty"` 3431 3432 // ServiceAccountEmail: Output only. The service account used to manage 3433 // the `WorkerPool`. The service account must have the Compute Instance 3434 // Admin (Beta) permission at the project level. 3435 ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` 3436 3437 // Status: Output only. WorkerPool Status. 3438 // 3439 // Possible values: 3440 // "STATUS_UNSPECIFIED" - Status of the `WorkerPool` is unknown. 3441 // "CREATING" - `WorkerPool` is being created. 3442 // "RUNNING" - `WorkerPool` is running. 3443 // "DELETING" - `WorkerPool` is being deleted: cancelling builds and 3444 // draining workers. 3445 // "DELETED" - `WorkerPool` is deleted. 3446 Status string `json:"status,omitempty"` 3447 3448 // UpdateTime: Output only. Time at which the request to update the 3449 // `WorkerPool` was received. 3450 UpdateTime string `json:"updateTime,omitempty"` 3451 3452 // WorkerConfig: Configuration to be used for a creating workers in the 3453 // `WorkerPool`. 3454 WorkerConfig *WorkerConfig `json:"workerConfig,omitempty"` 3455 3456 // WorkerCount: Total number of workers to be created across all 3457 // requested regions. 3458 WorkerCount int64 `json:"workerCount,omitempty,string"` 3459 3460 // ServerResponse contains the HTTP response code and headers from the 3461 // server. 3462 googleapi.ServerResponse `json:"-"` 3463 3464 // ForceSendFields is a list of field names (e.g. "CreateTime") to 3465 // unconditionally include in API requests. By default, fields with 3466 // empty or default values are omitted from API requests. However, any 3467 // non-pointer, non-interface field appearing in ForceSendFields will be 3468 // sent to the server regardless of whether the field is empty or not. 3469 // This may be used to include empty fields in Patch requests. 3470 ForceSendFields []string `json:"-"` 3471 3472 // NullFields is a list of field names (e.g. "CreateTime") to include in 3473 // API requests with the JSON null value. By default, fields with empty 3474 // values are omitted from API requests. However, any field with an 3475 // empty value appearing in NullFields will be sent to the server as 3476 // null. It is an error if a field in this list has a non-empty value. 3477 // This may be used to include null fields in Patch requests. 3478 NullFields []string `json:"-"` 3479 } 3480 3481 func (s *WorkerPool) MarshalJSON() ([]byte, error) { 3482 type NoMethod WorkerPool 3483 raw := NoMethod(*s) 3484 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3485 } 3486 3487 // method id "cloudbuild.projects.locations.operations.cancel": 3488 3489 type ProjectsLocationsOperationsCancelCall struct { 3490 s *Service 3491 name string 3492 canceloperationrequest *CancelOperationRequest 3493 urlParams_ gensupport.URLParams 3494 ctx_ context.Context 3495 header_ http.Header 3496 } 3497 3498 // Cancel: Starts asynchronous cancellation on a long-running operation. 3499 // The server makes a best effort to cancel the operation, but success 3500 // is not guaranteed. If the server doesn't support this method, it 3501 // returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use 3502 // Operations.GetOperation or other methods to check whether the 3503 // cancellation succeeded or whether the operation completed despite 3504 // cancellation. On successful cancellation, the operation is not 3505 // deleted; instead, it becomes an operation with an Operation.error 3506 // value with a google.rpc.Status.code of 1, corresponding to 3507 // `Code.CANCELLED`. 3508 // 3509 // - name: The name of the operation resource to be cancelled. 3510 func (r *ProjectsLocationsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsLocationsOperationsCancelCall { 3511 c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3512 c.name = name 3513 c.canceloperationrequest = canceloperationrequest 3514 return c 3515 } 3516 3517 // Fields allows partial responses to be retrieved. See 3518 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3519 // for more information. 3520 func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { 3521 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3522 return c 3523 } 3524 3525 // Context sets the context to be used in this call's Do method. Any 3526 // pending HTTP request will be aborted if the provided context is 3527 // canceled. 3528 func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { 3529 c.ctx_ = ctx 3530 return c 3531 } 3532 3533 // Header returns an http.Header that can be modified by the caller to 3534 // add HTTP headers to the request. 3535 func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { 3536 if c.header_ == nil { 3537 c.header_ = make(http.Header) 3538 } 3539 return c.header_ 3540 } 3541 3542 func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { 3543 reqHeaders := make(http.Header) 3544 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 3545 for k, v := range c.header_ { 3546 reqHeaders[k] = v 3547 } 3548 reqHeaders.Set("User-Agent", c.s.userAgent()) 3549 var body io.Reader = nil 3550 body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest) 3551 if err != nil { 3552 return nil, err 3553 } 3554 reqHeaders.Set("Content-Type", "application/json") 3555 c.urlParams_.Set("alt", alt) 3556 c.urlParams_.Set("prettyPrint", "false") 3557 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}:cancel") 3558 urls += "?" + c.urlParams_.Encode() 3559 req, err := http.NewRequest("POST", urls, body) 3560 if err != nil { 3561 return nil, err 3562 } 3563 req.Header = reqHeaders 3564 googleapi.Expand(req.URL, map[string]string{ 3565 "name": c.name, 3566 }) 3567 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3568 } 3569 3570 // Do executes the "cloudbuild.projects.locations.operations.cancel" call. 3571 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 3572 // code is an error. Response headers are in either 3573 // *Empty.ServerResponse.Header or (if a response was returned at all) 3574 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 3575 // check whether the returned error was because http.StatusNotModified 3576 // was returned. 3577 func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 3578 gensupport.SetOptions(c.urlParams_, opts...) 3579 res, err := c.doRequest("json") 3580 if res != nil && res.StatusCode == http.StatusNotModified { 3581 if res.Body != nil { 3582 res.Body.Close() 3583 } 3584 return nil, gensupport.WrapError(&googleapi.Error{ 3585 Code: res.StatusCode, 3586 Header: res.Header, 3587 }) 3588 } 3589 if err != nil { 3590 return nil, err 3591 } 3592 defer googleapi.CloseBody(res) 3593 if err := googleapi.CheckResponse(res); err != nil { 3594 return nil, gensupport.WrapError(err) 3595 } 3596 ret := &Empty{ 3597 ServerResponse: googleapi.ServerResponse{ 3598 Header: res.Header, 3599 HTTPStatusCode: res.StatusCode, 3600 }, 3601 } 3602 target := &ret 3603 if err := gensupport.DecodeResponse(target, res); err != nil { 3604 return nil, err 3605 } 3606 return ret, nil 3607 // { 3608 // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", 3609 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", 3610 // "httpMethod": "POST", 3611 // "id": "cloudbuild.projects.locations.operations.cancel", 3612 // "parameterOrder": [ 3613 // "name" 3614 // ], 3615 // "parameters": { 3616 // "name": { 3617 // "description": "The name of the operation resource to be cancelled.", 3618 // "location": "path", 3619 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 3620 // "required": true, 3621 // "type": "string" 3622 // } 3623 // }, 3624 // "path": "v1alpha1/{+name}:cancel", 3625 // "request": { 3626 // "$ref": "CancelOperationRequest" 3627 // }, 3628 // "response": { 3629 // "$ref": "Empty" 3630 // }, 3631 // "scopes": [ 3632 // "https://www.googleapis.com/auth/cloud-platform" 3633 // ] 3634 // } 3635 3636 } 3637 3638 // method id "cloudbuild.projects.locations.operations.get": 3639 3640 type ProjectsLocationsOperationsGetCall struct { 3641 s *Service 3642 name string 3643 urlParams_ gensupport.URLParams 3644 ifNoneMatch_ string 3645 ctx_ context.Context 3646 header_ http.Header 3647 } 3648 3649 // Get: Gets the latest state of a long-running operation. Clients can 3650 // use this method to poll the operation result at intervals as 3651 // recommended by the API service. 3652 // 3653 // - name: The name of the operation resource. 3654 func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { 3655 c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3656 c.name = name 3657 return c 3658 } 3659 3660 // Fields allows partial responses to be retrieved. See 3661 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3662 // for more information. 3663 func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { 3664 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3665 return c 3666 } 3667 3668 // IfNoneMatch sets the optional parameter which makes the operation 3669 // fail if the object's ETag matches the given value. This is useful for 3670 // getting updates only after the object has changed since the last 3671 // request. Use googleapi.IsNotModified to check whether the response 3672 // error from Do is the result of In-None-Match. 3673 func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { 3674 c.ifNoneMatch_ = entityTag 3675 return c 3676 } 3677 3678 // Context sets the context to be used in this call's Do method. Any 3679 // pending HTTP request will be aborted if the provided context is 3680 // canceled. 3681 func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { 3682 c.ctx_ = ctx 3683 return c 3684 } 3685 3686 // Header returns an http.Header that can be modified by the caller to 3687 // add HTTP headers to the request. 3688 func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { 3689 if c.header_ == nil { 3690 c.header_ = make(http.Header) 3691 } 3692 return c.header_ 3693 } 3694 3695 func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 3696 reqHeaders := make(http.Header) 3697 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 3698 for k, v := range c.header_ { 3699 reqHeaders[k] = v 3700 } 3701 reqHeaders.Set("User-Agent", c.s.userAgent()) 3702 if c.ifNoneMatch_ != "" { 3703 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3704 } 3705 var body io.Reader = nil 3706 c.urlParams_.Set("alt", alt) 3707 c.urlParams_.Set("prettyPrint", "false") 3708 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 3709 urls += "?" + c.urlParams_.Encode() 3710 req, err := http.NewRequest("GET", urls, body) 3711 if err != nil { 3712 return nil, err 3713 } 3714 req.Header = reqHeaders 3715 googleapi.Expand(req.URL, map[string]string{ 3716 "name": c.name, 3717 }) 3718 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3719 } 3720 3721 // Do executes the "cloudbuild.projects.locations.operations.get" call. 3722 // Exactly one of *Operation or error will be non-nil. Any non-2xx 3723 // status code is an error. Response headers are in either 3724 // *Operation.ServerResponse.Header or (if a response was returned at 3725 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3726 // to check whether the returned error was because 3727 // http.StatusNotModified was returned. 3728 func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { 3729 gensupport.SetOptions(c.urlParams_, opts...) 3730 res, err := c.doRequest("json") 3731 if res != nil && res.StatusCode == http.StatusNotModified { 3732 if res.Body != nil { 3733 res.Body.Close() 3734 } 3735 return nil, gensupport.WrapError(&googleapi.Error{ 3736 Code: res.StatusCode, 3737 Header: res.Header, 3738 }) 3739 } 3740 if err != nil { 3741 return nil, err 3742 } 3743 defer googleapi.CloseBody(res) 3744 if err := googleapi.CheckResponse(res); err != nil { 3745 return nil, gensupport.WrapError(err) 3746 } 3747 ret := &Operation{ 3748 ServerResponse: googleapi.ServerResponse{ 3749 Header: res.Header, 3750 HTTPStatusCode: res.StatusCode, 3751 }, 3752 } 3753 target := &ret 3754 if err := gensupport.DecodeResponse(target, res); err != nil { 3755 return nil, err 3756 } 3757 return ret, nil 3758 // { 3759 // "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", 3760 // "flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", 3761 // "httpMethod": "GET", 3762 // "id": "cloudbuild.projects.locations.operations.get", 3763 // "parameterOrder": [ 3764 // "name" 3765 // ], 3766 // "parameters": { 3767 // "name": { 3768 // "description": "The name of the operation resource.", 3769 // "location": "path", 3770 // "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", 3771 // "required": true, 3772 // "type": "string" 3773 // } 3774 // }, 3775 // "path": "v1alpha1/{+name}", 3776 // "response": { 3777 // "$ref": "Operation" 3778 // }, 3779 // "scopes": [ 3780 // "https://www.googleapis.com/auth/cloud-platform" 3781 // ] 3782 // } 3783 3784 } 3785 3786 // method id "cloudbuild.projects.workerPools.create": 3787 3788 type ProjectsWorkerPoolsCreateCall struct { 3789 s *Service 3790 parent string 3791 workerpool *WorkerPool 3792 urlParams_ gensupport.URLParams 3793 ctx_ context.Context 3794 header_ http.Header 3795 } 3796 3797 // Create: Creates a `WorkerPool` to run the builds, and returns the new 3798 // worker pool. 3799 // 3800 // - parent: ID of the parent project. 3801 func (r *ProjectsWorkerPoolsService) Create(parent string, workerpool *WorkerPool) *ProjectsWorkerPoolsCreateCall { 3802 c := &ProjectsWorkerPoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3803 c.parent = parent 3804 c.workerpool = workerpool 3805 return c 3806 } 3807 3808 // Fields allows partial responses to be retrieved. See 3809 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3810 // for more information. 3811 func (c *ProjectsWorkerPoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsCreateCall { 3812 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3813 return c 3814 } 3815 3816 // Context sets the context to be used in this call's Do method. Any 3817 // pending HTTP request will be aborted if the provided context is 3818 // canceled. 3819 func (c *ProjectsWorkerPoolsCreateCall) Context(ctx context.Context) *ProjectsWorkerPoolsCreateCall { 3820 c.ctx_ = ctx 3821 return c 3822 } 3823 3824 // Header returns an http.Header that can be modified by the caller to 3825 // add HTTP headers to the request. 3826 func (c *ProjectsWorkerPoolsCreateCall) Header() http.Header { 3827 if c.header_ == nil { 3828 c.header_ = make(http.Header) 3829 } 3830 return c.header_ 3831 } 3832 3833 func (c *ProjectsWorkerPoolsCreateCall) doRequest(alt string) (*http.Response, error) { 3834 reqHeaders := make(http.Header) 3835 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 3836 for k, v := range c.header_ { 3837 reqHeaders[k] = v 3838 } 3839 reqHeaders.Set("User-Agent", c.s.userAgent()) 3840 var body io.Reader = nil 3841 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool) 3842 if err != nil { 3843 return nil, err 3844 } 3845 reqHeaders.Set("Content-Type", "application/json") 3846 c.urlParams_.Set("alt", alt) 3847 c.urlParams_.Set("prettyPrint", "false") 3848 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/workerPools") 3849 urls += "?" + c.urlParams_.Encode() 3850 req, err := http.NewRequest("POST", urls, body) 3851 if err != nil { 3852 return nil, err 3853 } 3854 req.Header = reqHeaders 3855 googleapi.Expand(req.URL, map[string]string{ 3856 "parent": c.parent, 3857 }) 3858 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3859 } 3860 3861 // Do executes the "cloudbuild.projects.workerPools.create" call. 3862 // Exactly one of *WorkerPool or error will be non-nil. Any non-2xx 3863 // status code is an error. Response headers are in either 3864 // *WorkerPool.ServerResponse.Header or (if a response was returned at 3865 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 3866 // to check whether the returned error was because 3867 // http.StatusNotModified was returned. 3868 func (c *ProjectsWorkerPoolsCreateCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) { 3869 gensupport.SetOptions(c.urlParams_, opts...) 3870 res, err := c.doRequest("json") 3871 if res != nil && res.StatusCode == http.StatusNotModified { 3872 if res.Body != nil { 3873 res.Body.Close() 3874 } 3875 return nil, gensupport.WrapError(&googleapi.Error{ 3876 Code: res.StatusCode, 3877 Header: res.Header, 3878 }) 3879 } 3880 if err != nil { 3881 return nil, err 3882 } 3883 defer googleapi.CloseBody(res) 3884 if err := googleapi.CheckResponse(res); err != nil { 3885 return nil, gensupport.WrapError(err) 3886 } 3887 ret := &WorkerPool{ 3888 ServerResponse: googleapi.ServerResponse{ 3889 Header: res.Header, 3890 HTTPStatusCode: res.StatusCode, 3891 }, 3892 } 3893 target := &ret 3894 if err := gensupport.DecodeResponse(target, res); err != nil { 3895 return nil, err 3896 } 3897 return ret, nil 3898 // { 3899 // "description": "Creates a `WorkerPool` to run the builds, and returns the new worker pool.", 3900 // "flatPath": "v1alpha1/projects/{projectsId}/workerPools", 3901 // "httpMethod": "POST", 3902 // "id": "cloudbuild.projects.workerPools.create", 3903 // "parameterOrder": [ 3904 // "parent" 3905 // ], 3906 // "parameters": { 3907 // "parent": { 3908 // "description": "ID of the parent project.", 3909 // "location": "path", 3910 // "pattern": "^projects/[^/]+$", 3911 // "required": true, 3912 // "type": "string" 3913 // } 3914 // }, 3915 // "path": "v1alpha1/{+parent}/workerPools", 3916 // "request": { 3917 // "$ref": "WorkerPool" 3918 // }, 3919 // "response": { 3920 // "$ref": "WorkerPool" 3921 // }, 3922 // "scopes": [ 3923 // "https://www.googleapis.com/auth/cloud-platform" 3924 // ] 3925 // } 3926 3927 } 3928 3929 // method id "cloudbuild.projects.workerPools.delete": 3930 3931 type ProjectsWorkerPoolsDeleteCall struct { 3932 s *Service 3933 name string 3934 urlParams_ gensupport.URLParams 3935 ctx_ context.Context 3936 header_ http.Header 3937 } 3938 3939 // Delete: Deletes a `WorkerPool` by its project ID and WorkerPool name. 3940 // 3941 // - name: The field will contain name of the resource requested, for 3942 // example: "projects/project-1/workerPools/workerpool-name". 3943 func (r *ProjectsWorkerPoolsService) Delete(name string) *ProjectsWorkerPoolsDeleteCall { 3944 c := &ProjectsWorkerPoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3945 c.name = name 3946 return c 3947 } 3948 3949 // Fields allows partial responses to be retrieved. See 3950 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3951 // for more information. 3952 func (c *ProjectsWorkerPoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsDeleteCall { 3953 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3954 return c 3955 } 3956 3957 // Context sets the context to be used in this call's Do method. Any 3958 // pending HTTP request will be aborted if the provided context is 3959 // canceled. 3960 func (c *ProjectsWorkerPoolsDeleteCall) Context(ctx context.Context) *ProjectsWorkerPoolsDeleteCall { 3961 c.ctx_ = ctx 3962 return c 3963 } 3964 3965 // Header returns an http.Header that can be modified by the caller to 3966 // add HTTP headers to the request. 3967 func (c *ProjectsWorkerPoolsDeleteCall) Header() http.Header { 3968 if c.header_ == nil { 3969 c.header_ = make(http.Header) 3970 } 3971 return c.header_ 3972 } 3973 3974 func (c *ProjectsWorkerPoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 3975 reqHeaders := make(http.Header) 3976 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 3977 for k, v := range c.header_ { 3978 reqHeaders[k] = v 3979 } 3980 reqHeaders.Set("User-Agent", c.s.userAgent()) 3981 var body io.Reader = nil 3982 c.urlParams_.Set("alt", alt) 3983 c.urlParams_.Set("prettyPrint", "false") 3984 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 3985 urls += "?" + c.urlParams_.Encode() 3986 req, err := http.NewRequest("DELETE", urls, body) 3987 if err != nil { 3988 return nil, err 3989 } 3990 req.Header = reqHeaders 3991 googleapi.Expand(req.URL, map[string]string{ 3992 "name": c.name, 3993 }) 3994 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3995 } 3996 3997 // Do executes the "cloudbuild.projects.workerPools.delete" call. 3998 // Exactly one of *Empty or error will be non-nil. Any non-2xx status 3999 // code is an error. Response headers are in either 4000 // *Empty.ServerResponse.Header or (if a response was returned at all) 4001 // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to 4002 // check whether the returned error was because http.StatusNotModified 4003 // was returned. 4004 func (c *ProjectsWorkerPoolsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { 4005 gensupport.SetOptions(c.urlParams_, opts...) 4006 res, err := c.doRequest("json") 4007 if res != nil && res.StatusCode == http.StatusNotModified { 4008 if res.Body != nil { 4009 res.Body.Close() 4010 } 4011 return nil, gensupport.WrapError(&googleapi.Error{ 4012 Code: res.StatusCode, 4013 Header: res.Header, 4014 }) 4015 } 4016 if err != nil { 4017 return nil, err 4018 } 4019 defer googleapi.CloseBody(res) 4020 if err := googleapi.CheckResponse(res); err != nil { 4021 return nil, gensupport.WrapError(err) 4022 } 4023 ret := &Empty{ 4024 ServerResponse: googleapi.ServerResponse{ 4025 Header: res.Header, 4026 HTTPStatusCode: res.StatusCode, 4027 }, 4028 } 4029 target := &ret 4030 if err := gensupport.DecodeResponse(target, res); err != nil { 4031 return nil, err 4032 } 4033 return ret, nil 4034 // { 4035 // "description": "Deletes a `WorkerPool` by its project ID and WorkerPool name.", 4036 // "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}", 4037 // "httpMethod": "DELETE", 4038 // "id": "cloudbuild.projects.workerPools.delete", 4039 // "parameterOrder": [ 4040 // "name" 4041 // ], 4042 // "parameters": { 4043 // "name": { 4044 // "description": "The field will contain name of the resource requested, for example: \"projects/project-1/workerPools/workerpool-name\"", 4045 // "location": "path", 4046 // "pattern": "^projects/[^/]+/workerPools/[^/]+$", 4047 // "required": true, 4048 // "type": "string" 4049 // } 4050 // }, 4051 // "path": "v1alpha1/{+name}", 4052 // "response": { 4053 // "$ref": "Empty" 4054 // }, 4055 // "scopes": [ 4056 // "https://www.googleapis.com/auth/cloud-platform" 4057 // ] 4058 // } 4059 4060 } 4061 4062 // method id "cloudbuild.projects.workerPools.get": 4063 4064 type ProjectsWorkerPoolsGetCall struct { 4065 s *Service 4066 name string 4067 urlParams_ gensupport.URLParams 4068 ifNoneMatch_ string 4069 ctx_ context.Context 4070 header_ http.Header 4071 } 4072 4073 // Get: Returns information about a `WorkerPool`. 4074 // 4075 // - name: The field will contain name of the resource requested, for 4076 // example: "projects/project-1/workerPools/workerpool-name". 4077 func (r *ProjectsWorkerPoolsService) Get(name string) *ProjectsWorkerPoolsGetCall { 4078 c := &ProjectsWorkerPoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4079 c.name = name 4080 return c 4081 } 4082 4083 // Fields allows partial responses to be retrieved. See 4084 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4085 // for more information. 4086 func (c *ProjectsWorkerPoolsGetCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsGetCall { 4087 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4088 return c 4089 } 4090 4091 // IfNoneMatch sets the optional parameter which makes the operation 4092 // fail if the object's ETag matches the given value. This is useful for 4093 // getting updates only after the object has changed since the last 4094 // request. Use googleapi.IsNotModified to check whether the response 4095 // error from Do is the result of In-None-Match. 4096 func (c *ProjectsWorkerPoolsGetCall) IfNoneMatch(entityTag string) *ProjectsWorkerPoolsGetCall { 4097 c.ifNoneMatch_ = entityTag 4098 return c 4099 } 4100 4101 // Context sets the context to be used in this call's Do method. Any 4102 // pending HTTP request will be aborted if the provided context is 4103 // canceled. 4104 func (c *ProjectsWorkerPoolsGetCall) Context(ctx context.Context) *ProjectsWorkerPoolsGetCall { 4105 c.ctx_ = ctx 4106 return c 4107 } 4108 4109 // Header returns an http.Header that can be modified by the caller to 4110 // add HTTP headers to the request. 4111 func (c *ProjectsWorkerPoolsGetCall) Header() http.Header { 4112 if c.header_ == nil { 4113 c.header_ = make(http.Header) 4114 } 4115 return c.header_ 4116 } 4117 4118 func (c *ProjectsWorkerPoolsGetCall) doRequest(alt string) (*http.Response, error) { 4119 reqHeaders := make(http.Header) 4120 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 4121 for k, v := range c.header_ { 4122 reqHeaders[k] = v 4123 } 4124 reqHeaders.Set("User-Agent", c.s.userAgent()) 4125 if c.ifNoneMatch_ != "" { 4126 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4127 } 4128 var body io.Reader = nil 4129 c.urlParams_.Set("alt", alt) 4130 c.urlParams_.Set("prettyPrint", "false") 4131 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 4132 urls += "?" + c.urlParams_.Encode() 4133 req, err := http.NewRequest("GET", urls, body) 4134 if err != nil { 4135 return nil, err 4136 } 4137 req.Header = reqHeaders 4138 googleapi.Expand(req.URL, map[string]string{ 4139 "name": c.name, 4140 }) 4141 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4142 } 4143 4144 // Do executes the "cloudbuild.projects.workerPools.get" call. 4145 // Exactly one of *WorkerPool or error will be non-nil. Any non-2xx 4146 // status code is an error. Response headers are in either 4147 // *WorkerPool.ServerResponse.Header or (if a response was returned at 4148 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4149 // to check whether the returned error was because 4150 // http.StatusNotModified was returned. 4151 func (c *ProjectsWorkerPoolsGetCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) { 4152 gensupport.SetOptions(c.urlParams_, opts...) 4153 res, err := c.doRequest("json") 4154 if res != nil && res.StatusCode == http.StatusNotModified { 4155 if res.Body != nil { 4156 res.Body.Close() 4157 } 4158 return nil, gensupport.WrapError(&googleapi.Error{ 4159 Code: res.StatusCode, 4160 Header: res.Header, 4161 }) 4162 } 4163 if err != nil { 4164 return nil, err 4165 } 4166 defer googleapi.CloseBody(res) 4167 if err := googleapi.CheckResponse(res); err != nil { 4168 return nil, gensupport.WrapError(err) 4169 } 4170 ret := &WorkerPool{ 4171 ServerResponse: googleapi.ServerResponse{ 4172 Header: res.Header, 4173 HTTPStatusCode: res.StatusCode, 4174 }, 4175 } 4176 target := &ret 4177 if err := gensupport.DecodeResponse(target, res); err != nil { 4178 return nil, err 4179 } 4180 return ret, nil 4181 // { 4182 // "description": "Returns information about a `WorkerPool`.", 4183 // "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}", 4184 // "httpMethod": "GET", 4185 // "id": "cloudbuild.projects.workerPools.get", 4186 // "parameterOrder": [ 4187 // "name" 4188 // ], 4189 // "parameters": { 4190 // "name": { 4191 // "description": "The field will contain name of the resource requested, for example: \"projects/project-1/workerPools/workerpool-name\"", 4192 // "location": "path", 4193 // "pattern": "^projects/[^/]+/workerPools/[^/]+$", 4194 // "required": true, 4195 // "type": "string" 4196 // } 4197 // }, 4198 // "path": "v1alpha1/{+name}", 4199 // "response": { 4200 // "$ref": "WorkerPool" 4201 // }, 4202 // "scopes": [ 4203 // "https://www.googleapis.com/auth/cloud-platform" 4204 // ] 4205 // } 4206 4207 } 4208 4209 // method id "cloudbuild.projects.workerPools.list": 4210 4211 type ProjectsWorkerPoolsListCall struct { 4212 s *Service 4213 parent string 4214 urlParams_ gensupport.URLParams 4215 ifNoneMatch_ string 4216 ctx_ context.Context 4217 header_ http.Header 4218 } 4219 4220 // List: List project's `WorkerPool`s. 4221 // 4222 // - parent: ID of the parent project. 4223 func (r *ProjectsWorkerPoolsService) List(parent string) *ProjectsWorkerPoolsListCall { 4224 c := &ProjectsWorkerPoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4225 c.parent = parent 4226 return c 4227 } 4228 4229 // Fields allows partial responses to be retrieved. See 4230 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4231 // for more information. 4232 func (c *ProjectsWorkerPoolsListCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsListCall { 4233 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4234 return c 4235 } 4236 4237 // IfNoneMatch sets the optional parameter which makes the operation 4238 // fail if the object's ETag matches the given value. This is useful for 4239 // getting updates only after the object has changed since the last 4240 // request. Use googleapi.IsNotModified to check whether the response 4241 // error from Do is the result of In-None-Match. 4242 func (c *ProjectsWorkerPoolsListCall) IfNoneMatch(entityTag string) *ProjectsWorkerPoolsListCall { 4243 c.ifNoneMatch_ = entityTag 4244 return c 4245 } 4246 4247 // Context sets the context to be used in this call's Do method. Any 4248 // pending HTTP request will be aborted if the provided context is 4249 // canceled. 4250 func (c *ProjectsWorkerPoolsListCall) Context(ctx context.Context) *ProjectsWorkerPoolsListCall { 4251 c.ctx_ = ctx 4252 return c 4253 } 4254 4255 // Header returns an http.Header that can be modified by the caller to 4256 // add HTTP headers to the request. 4257 func (c *ProjectsWorkerPoolsListCall) Header() http.Header { 4258 if c.header_ == nil { 4259 c.header_ = make(http.Header) 4260 } 4261 return c.header_ 4262 } 4263 4264 func (c *ProjectsWorkerPoolsListCall) doRequest(alt string) (*http.Response, error) { 4265 reqHeaders := make(http.Header) 4266 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 4267 for k, v := range c.header_ { 4268 reqHeaders[k] = v 4269 } 4270 reqHeaders.Set("User-Agent", c.s.userAgent()) 4271 if c.ifNoneMatch_ != "" { 4272 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4273 } 4274 var body io.Reader = nil 4275 c.urlParams_.Set("alt", alt) 4276 c.urlParams_.Set("prettyPrint", "false") 4277 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+parent}/workerPools") 4278 urls += "?" + c.urlParams_.Encode() 4279 req, err := http.NewRequest("GET", urls, body) 4280 if err != nil { 4281 return nil, err 4282 } 4283 req.Header = reqHeaders 4284 googleapi.Expand(req.URL, map[string]string{ 4285 "parent": c.parent, 4286 }) 4287 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4288 } 4289 4290 // Do executes the "cloudbuild.projects.workerPools.list" call. 4291 // Exactly one of *ListWorkerPoolsResponse or error will be non-nil. Any 4292 // non-2xx status code is an error. Response headers are in either 4293 // *ListWorkerPoolsResponse.ServerResponse.Header or (if a response was 4294 // returned at all) in error.(*googleapi.Error).Header. Use 4295 // googleapi.IsNotModified to check whether the returned error was 4296 // because http.StatusNotModified was returned. 4297 func (c *ProjectsWorkerPoolsListCall) Do(opts ...googleapi.CallOption) (*ListWorkerPoolsResponse, error) { 4298 gensupport.SetOptions(c.urlParams_, opts...) 4299 res, err := c.doRequest("json") 4300 if res != nil && res.StatusCode == http.StatusNotModified { 4301 if res.Body != nil { 4302 res.Body.Close() 4303 } 4304 return nil, gensupport.WrapError(&googleapi.Error{ 4305 Code: res.StatusCode, 4306 Header: res.Header, 4307 }) 4308 } 4309 if err != nil { 4310 return nil, err 4311 } 4312 defer googleapi.CloseBody(res) 4313 if err := googleapi.CheckResponse(res); err != nil { 4314 return nil, gensupport.WrapError(err) 4315 } 4316 ret := &ListWorkerPoolsResponse{ 4317 ServerResponse: googleapi.ServerResponse{ 4318 Header: res.Header, 4319 HTTPStatusCode: res.StatusCode, 4320 }, 4321 } 4322 target := &ret 4323 if err := gensupport.DecodeResponse(target, res); err != nil { 4324 return nil, err 4325 } 4326 return ret, nil 4327 // { 4328 // "description": "List project's `WorkerPool`s.", 4329 // "flatPath": "v1alpha1/projects/{projectsId}/workerPools", 4330 // "httpMethod": "GET", 4331 // "id": "cloudbuild.projects.workerPools.list", 4332 // "parameterOrder": [ 4333 // "parent" 4334 // ], 4335 // "parameters": { 4336 // "parent": { 4337 // "description": "ID of the parent project.", 4338 // "location": "path", 4339 // "pattern": "^projects/[^/]+$", 4340 // "required": true, 4341 // "type": "string" 4342 // } 4343 // }, 4344 // "path": "v1alpha1/{+parent}/workerPools", 4345 // "response": { 4346 // "$ref": "ListWorkerPoolsResponse" 4347 // }, 4348 // "scopes": [ 4349 // "https://www.googleapis.com/auth/cloud-platform" 4350 // ] 4351 // } 4352 4353 } 4354 4355 // method id "cloudbuild.projects.workerPools.patch": 4356 4357 type ProjectsWorkerPoolsPatchCall struct { 4358 s *Service 4359 name string 4360 workerpool *WorkerPool 4361 urlParams_ gensupport.URLParams 4362 ctx_ context.Context 4363 header_ http.Header 4364 } 4365 4366 // Patch: Update a `WorkerPool`. 4367 // 4368 // - name: The field will contain name of the resource requested, for 4369 // example: "projects/project-1/workerPools/workerpool-name". 4370 func (r *ProjectsWorkerPoolsService) Patch(name string, workerpool *WorkerPool) *ProjectsWorkerPoolsPatchCall { 4371 c := &ProjectsWorkerPoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4372 c.name = name 4373 c.workerpool = workerpool 4374 return c 4375 } 4376 4377 // Fields allows partial responses to be retrieved. See 4378 // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4379 // for more information. 4380 func (c *ProjectsWorkerPoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsWorkerPoolsPatchCall { 4381 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4382 return c 4383 } 4384 4385 // Context sets the context to be used in this call's Do method. Any 4386 // pending HTTP request will be aborted if the provided context is 4387 // canceled. 4388 func (c *ProjectsWorkerPoolsPatchCall) Context(ctx context.Context) *ProjectsWorkerPoolsPatchCall { 4389 c.ctx_ = ctx 4390 return c 4391 } 4392 4393 // Header returns an http.Header that can be modified by the caller to 4394 // add HTTP headers to the request. 4395 func (c *ProjectsWorkerPoolsPatchCall) Header() http.Header { 4396 if c.header_ == nil { 4397 c.header_ = make(http.Header) 4398 } 4399 return c.header_ 4400 } 4401 4402 func (c *ProjectsWorkerPoolsPatchCall) doRequest(alt string) (*http.Response, error) { 4403 reqHeaders := make(http.Header) 4404 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/"+internal.Version) 4405 for k, v := range c.header_ { 4406 reqHeaders[k] = v 4407 } 4408 reqHeaders.Set("User-Agent", c.s.userAgent()) 4409 var body io.Reader = nil 4410 body, err := googleapi.WithoutDataWrapper.JSONReader(c.workerpool) 4411 if err != nil { 4412 return nil, err 4413 } 4414 reqHeaders.Set("Content-Type", "application/json") 4415 c.urlParams_.Set("alt", alt) 4416 c.urlParams_.Set("prettyPrint", "false") 4417 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha1/{+name}") 4418 urls += "?" + c.urlParams_.Encode() 4419 req, err := http.NewRequest("PATCH", urls, body) 4420 if err != nil { 4421 return nil, err 4422 } 4423 req.Header = reqHeaders 4424 googleapi.Expand(req.URL, map[string]string{ 4425 "name": c.name, 4426 }) 4427 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4428 } 4429 4430 // Do executes the "cloudbuild.projects.workerPools.patch" call. 4431 // Exactly one of *WorkerPool or error will be non-nil. Any non-2xx 4432 // status code is an error. Response headers are in either 4433 // *WorkerPool.ServerResponse.Header or (if a response was returned at 4434 // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified 4435 // to check whether the returned error was because 4436 // http.StatusNotModified was returned. 4437 func (c *ProjectsWorkerPoolsPatchCall) Do(opts ...googleapi.CallOption) (*WorkerPool, error) { 4438 gensupport.SetOptions(c.urlParams_, opts...) 4439 res, err := c.doRequest("json") 4440 if res != nil && res.StatusCode == http.StatusNotModified { 4441 if res.Body != nil { 4442 res.Body.Close() 4443 } 4444 return nil, gensupport.WrapError(&googleapi.Error{ 4445 Code: res.StatusCode, 4446 Header: res.Header, 4447 }) 4448 } 4449 if err != nil { 4450 return nil, err 4451 } 4452 defer googleapi.CloseBody(res) 4453 if err := googleapi.CheckResponse(res); err != nil { 4454 return nil, gensupport.WrapError(err) 4455 } 4456 ret := &WorkerPool{ 4457 ServerResponse: googleapi.ServerResponse{ 4458 Header: res.Header, 4459 HTTPStatusCode: res.StatusCode, 4460 }, 4461 } 4462 target := &ret 4463 if err := gensupport.DecodeResponse(target, res); err != nil { 4464 return nil, err 4465 } 4466 return ret, nil 4467 // { 4468 // "description": "Update a `WorkerPool`.", 4469 // "flatPath": "v1alpha1/projects/{projectsId}/workerPools/{workerPoolsId}", 4470 // "httpMethod": "PATCH", 4471 // "id": "cloudbuild.projects.workerPools.patch", 4472 // "parameterOrder": [ 4473 // "name" 4474 // ], 4475 // "parameters": { 4476 // "name": { 4477 // "description": "The field will contain name of the resource requested, for example: \"projects/project-1/workerPools/workerpool-name\"", 4478 // "location": "path", 4479 // "pattern": "^projects/[^/]+/workerPools/[^/]+$", 4480 // "required": true, 4481 // "type": "string" 4482 // } 4483 // }, 4484 // "path": "v1alpha1/{+name}", 4485 // "request": { 4486 // "$ref": "WorkerPool" 4487 // }, 4488 // "response": { 4489 // "$ref": "WorkerPool" 4490 // }, 4491 // "scopes": [ 4492 // "https://www.googleapis.com/auth/cloud-platform" 4493 // ] 4494 // } 4495 4496 } 4497