1// Copyright 2019 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 remotebuildexecution provides access to the Remote Build Execution API. 8// 9// For product documentation, see: https://cloud.google.com/remote-build-execution/docs/ 10// 11// Creating a client 12// 13// Usage example: 14// 15// import "google.golang.org/api/remotebuildexecution/v1alpha" 16// ... 17// ctx := context.Background() 18// remotebuildexecutionService, err := remotebuildexecution.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// remotebuildexecutionService, err := remotebuildexecution.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// remotebuildexecutionService, err := remotebuildexecution.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) 36// 37// See https://godoc.org/google.golang.org/api/option/ for details on options. 38package remotebuildexecution // import "google.golang.org/api/remotebuildexecution/v1alpha" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 htransport "google.golang.org/api/transport/http" 56) 57 58// Always reference these packages, just in case the auto-generated code 59// below doesn't. 60var _ = bytes.NewBuffer 61var _ = strconv.Itoa 62var _ = fmt.Sprintf 63var _ = json.NewDecoder 64var _ = io.Copy 65var _ = url.Parse 66var _ = gensupport.MarshalJSON 67var _ = googleapi.Version 68var _ = errors.New 69var _ = strings.Replace 70var _ = context.Canceled 71 72const apiId = "remotebuildexecution:v1alpha" 73const apiName = "remotebuildexecution" 74const apiVersion = "v1alpha" 75const basePath = "https://admin-remotebuildexecution.googleapis.com/" 76 77// OAuth2 scopes used by this API. 78const ( 79 // View and manage your data across Google Cloud Platform services 80 CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" 81) 82 83// NewService creates a new Service. 84func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { 85 scopesOption := option.WithScopes( 86 "https://www.googleapis.com/auth/cloud-platform", 87 ) 88 // NOTE: prepend, so we don't override user-specified scopes. 89 opts = append([]option.ClientOption{scopesOption}, opts...) 90 client, endpoint, err := htransport.NewClient(ctx, opts...) 91 if err != nil { 92 return nil, err 93 } 94 s, err := New(client) 95 if err != nil { 96 return nil, err 97 } 98 if endpoint != "" { 99 s.BasePath = endpoint 100 } 101 return s, nil 102} 103 104// New creates a new Service. It uses the provided http.Client for requests. 105// 106// Deprecated: please use NewService instead. 107// To provide a custom HTTP client, use option.WithHTTPClient. 108// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. 109func New(client *http.Client) (*Service, error) { 110 if client == nil { 111 return nil, errors.New("client is nil") 112 } 113 s := &Service{client: client, BasePath: basePath} 114 s.Projects = NewProjectsService(s) 115 return s, nil 116} 117 118type Service struct { 119 client *http.Client 120 BasePath string // API endpoint base URL 121 UserAgent string // optional additional User-Agent fragment 122 123 Projects *ProjectsService 124} 125 126func (s *Service) userAgent() string { 127 if s.UserAgent == "" { 128 return googleapi.UserAgent 129 } 130 return googleapi.UserAgent + " " + s.UserAgent 131} 132 133func NewProjectsService(s *Service) *ProjectsService { 134 rs := &ProjectsService{s: s} 135 rs.Instances = NewProjectsInstancesService(s) 136 rs.Operations = NewProjectsOperationsService(s) 137 return rs 138} 139 140type ProjectsService struct { 141 s *Service 142 143 Instances *ProjectsInstancesService 144 145 Operations *ProjectsOperationsService 146} 147 148func NewProjectsInstancesService(s *Service) *ProjectsInstancesService { 149 rs := &ProjectsInstancesService{s: s} 150 rs.Workerpools = NewProjectsInstancesWorkerpoolsService(s) 151 return rs 152} 153 154type ProjectsInstancesService struct { 155 s *Service 156 157 Workerpools *ProjectsInstancesWorkerpoolsService 158} 159 160func NewProjectsInstancesWorkerpoolsService(s *Service) *ProjectsInstancesWorkerpoolsService { 161 rs := &ProjectsInstancesWorkerpoolsService{s: s} 162 return rs 163} 164 165type ProjectsInstancesWorkerpoolsService struct { 166 s *Service 167} 168 169func NewProjectsOperationsService(s *Service) *ProjectsOperationsService { 170 rs := &ProjectsOperationsService{s: s} 171 return rs 172} 173 174type ProjectsOperationsService struct { 175 s *Service 176} 177 178// BuildBazelRemoteExecutionV2Action: An `Action` captures all the 179// information about an execution which is required 180// to reproduce it. 181// 182// `Action`s are the core component of the [Execution] service. A 183// single 184// `Action` represents a repeatable action that can be performed by 185// the 186// execution service. `Action`s can be succinctly identified by the 187// digest of 188// their wire format encoding and, once an `Action` has been executed, 189// will be 190// cached in the action cache. Future requests can then use the cached 191// result 192// rather than needing to run afresh. 193// 194// When a server completes execution of an 195// Action, it MAY choose to 196// cache the result in 197// the ActionCache unless 198// `do_not_cache` is `true`. Clients SHOULD expect the server to do so. 199// By 200// default, future calls to 201// Execute the same 202// `Action` will also serve their results from the cache. Clients must 203// take care 204// to understand the caching behaviour. Ideally, all `Action`s will 205// be 206// reproducible so that serving a result from cache is always desirable 207// and 208// correct. 209type BuildBazelRemoteExecutionV2Action struct { 210 // CommandDigest: The digest of the Command 211 // to run, which MUST be present in the 212 // ContentAddressableStorage. 213 CommandDigest *BuildBazelRemoteExecutionV2Digest `json:"commandDigest,omitempty"` 214 215 // DoNotCache: If true, then the `Action`'s result cannot be cached, and 216 // in-flight 217 // requests for the same `Action` may not be merged. 218 DoNotCache bool `json:"doNotCache,omitempty"` 219 220 // InputRootDigest: The digest of the root 221 // Directory for the input 222 // files. The files in the directory tree are available in the 223 // correct 224 // location on the build machine before the command is executed. The 225 // root 226 // directory, as well as every subdirectory and content blob referred 227 // to, MUST 228 // be in the 229 // ContentAddressableStorage. 230 InputRootDigest *BuildBazelRemoteExecutionV2Digest `json:"inputRootDigest,omitempty"` 231 232 // Timeout: A timeout after which the execution should be killed. If the 233 // timeout is 234 // absent, then the client is specifying that the execution should 235 // continue 236 // as long as the server will let it. The server SHOULD impose a timeout 237 // if 238 // the client does not specify one, however, if the client does specify 239 // a 240 // timeout that is longer than the server's maximum timeout, the server 241 // MUST 242 // reject the request. 243 // 244 // The timeout is a part of the 245 // Action message, and 246 // therefore two `Actions` with different timeouts are different, even 247 // if they 248 // are otherwise identical. This is because, if they were not, running 249 // an 250 // `Action` with a lower timeout than is required might result in a 251 // cache hit 252 // from an execution run with a longer timeout, hiding the fact that 253 // the 254 // timeout is too short. By encoding it directly in the `Action`, a 255 // lower 256 // timeout will result in a cache miss and the execution timeout will 257 // fail 258 // immediately, rather than whenever the cache entry gets evicted. 259 Timeout string `json:"timeout,omitempty"` 260 261 // ForceSendFields is a list of field names (e.g. "CommandDigest") to 262 // unconditionally include in API requests. By default, fields with 263 // empty values are omitted from API requests. However, any non-pointer, 264 // non-interface field appearing in ForceSendFields will be sent to the 265 // server regardless of whether the field is empty or not. This may be 266 // used to include empty fields in Patch requests. 267 ForceSendFields []string `json:"-"` 268 269 // NullFields is a list of field names (e.g. "CommandDigest") to include 270 // in API requests with the JSON null value. By default, fields with 271 // empty values are omitted from API requests. However, any field with 272 // an empty value appearing in NullFields will be sent to the server as 273 // null. It is an error if a field in this list has a non-empty value. 274 // This may be used to include null fields in Patch requests. 275 NullFields []string `json:"-"` 276} 277 278func (s *BuildBazelRemoteExecutionV2Action) MarshalJSON() ([]byte, error) { 279 type NoMethod BuildBazelRemoteExecutionV2Action 280 raw := NoMethod(*s) 281 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 282} 283 284// BuildBazelRemoteExecutionV2ActionResult: An ActionResult represents 285// the result of an 286// Action being run. 287type BuildBazelRemoteExecutionV2ActionResult struct { 288 // ExecutionMetadata: The details of the execution that originally 289 // produced this result. 290 ExecutionMetadata *BuildBazelRemoteExecutionV2ExecutedActionMetadata `json:"executionMetadata,omitempty"` 291 292 // ExitCode: The exit code of the command. 293 ExitCode int64 `json:"exitCode,omitempty"` 294 295 // OutputDirectories: The output directories of the action. For each 296 // output directory requested 297 // in the `output_directories` field of the Action, if the 298 // corresponding 299 // directory existed after the action completed, a single entry will 300 // be 301 // present in the output list, which will contain the digest of a 302 // Tree message containing the 303 // directory tree, and the path equal exactly to the corresponding 304 // Action 305 // output_directories member. 306 // 307 // As an example, suppose the Action had an output directory `a/b/dir` 308 // and the 309 // execution produced the following contents in `a/b/dir`: a file named 310 // `bar` 311 // and a directory named `foo` with an executable file named `baz`. 312 // Then, 313 // output_directory will contain (hashes shortened for 314 // readability): 315 // 316 // ```json 317 // // OutputDirectory proto: 318 // { 319 // path: "a/b/dir" 320 // tree_digest: { 321 // hash: "4a73bc9d03...", 322 // size: 55 323 // } 324 // } 325 // // Tree proto with hash "4a73bc9d03..." and size 55: 326 // { 327 // root: { 328 // files: [ 329 // { 330 // name: "bar", 331 // digest: { 332 // hash: "4a73bc9d03...", 333 // size: 65534 334 // } 335 // } 336 // ], 337 // directories: [ 338 // { 339 // name: "foo", 340 // digest: { 341 // hash: "4cf2eda940...", 342 // size: 43 343 // } 344 // } 345 // ] 346 // } 347 // children : { 348 // // (Directory proto with hash "4cf2eda940..." and size 43) 349 // files: [ 350 // { 351 // name: "baz", 352 // digest: { 353 // hash: "b2c941073e...", 354 // size: 1294, 355 // }, 356 // is_executable: true 357 // } 358 // ] 359 // } 360 // } 361 // ``` 362 // If an output of the same name was found, but was not a directory, 363 // the 364 // server will return a FAILED_PRECONDITION. 365 OutputDirectories []*BuildBazelRemoteExecutionV2OutputDirectory `json:"outputDirectories,omitempty"` 366 367 // OutputDirectorySymlinks: The output directories of the action that 368 // are symbolic links to other 369 // directories. Those may be links to other output directories, or 370 // input 371 // directories, or even absolute paths outside of the working 372 // directory, 373 // if the server supports 374 // SymlinkAbsolutePathStrategy.ALLOWED. 375 // For each output directory requested in the `output_directories` field 376 // of 377 // the Action, if the directory existed after the action completed, 378 // a 379 // single entry will be present either in this field, or in 380 // the 381 // `output_directories` field, if the directory was not a symbolic 382 // link. 383 // 384 // If an output of the same name was found, but was a symbolic link to a 385 // file 386 // instead of a directory, the server will return a 387 // FAILED_PRECONDITION. 388 // If the action does not produce the requested output, then that 389 // output 390 // will be omitted from the list. The server is free to arrange the 391 // output 392 // list as desired; clients MUST NOT assume that the output list is 393 // sorted. 394 OutputDirectorySymlinks []*BuildBazelRemoteExecutionV2OutputSymlink `json:"outputDirectorySymlinks,omitempty"` 395 396 // OutputFileSymlinks: The output files of the action that are symbolic 397 // links to other files. Those 398 // may be links to other output files, or input files, or even absolute 399 // paths 400 // outside of the working directory, if the server 401 // supports 402 // SymlinkAbsolutePathStrategy.ALLOWED. 403 // For each output file requested in the `output_files` field of the 404 // Action, 405 // if the corresponding file existed after 406 // the action completed, a single entry will be present either in this 407 // field, 408 // or in the `output_files` field, if the file was not a symbolic 409 // link. 410 // 411 // If an output symbolic link of the same name was found, but its 412 // target 413 // type was not a regular file, the server will return a 414 // FAILED_PRECONDITION. 415 // If the action does not produce the requested output, then that 416 // output 417 // will be omitted from the list. The server is free to arrange the 418 // output 419 // list as desired; clients MUST NOT assume that the output list is 420 // sorted. 421 OutputFileSymlinks []*BuildBazelRemoteExecutionV2OutputSymlink `json:"outputFileSymlinks,omitempty"` 422 423 // OutputFiles: The output files of the action. For each output file 424 // requested in the 425 // `output_files` field of the Action, if the corresponding file existed 426 // after 427 // the action completed, a single entry will be present either in this 428 // field, 429 // or the `output_file_symlinks` field if the file was a symbolic link 430 // to 431 // another file. 432 // 433 // If an output of the same name was found, but was a directory 434 // rather 435 // than a regular file, the server will return a FAILED_PRECONDITION. 436 // If the action does not produce the requested output, then that 437 // output 438 // will be omitted from the list. The server is free to arrange the 439 // output 440 // list as desired; clients MUST NOT assume that the output list is 441 // sorted. 442 OutputFiles []*BuildBazelRemoteExecutionV2OutputFile `json:"outputFiles,omitempty"` 443 444 // StderrDigest: The digest for a blob containing the standard error of 445 // the action, which 446 // can be retrieved from the 447 // ContentAddressableStorage. 448 StderrDigest *BuildBazelRemoteExecutionV2Digest `json:"stderrDigest,omitempty"` 449 450 // StderrRaw: The standard error buffer of the action. The server SHOULD 451 // NOT inline 452 // stderr unless requested by the client in 453 // the 454 // GetActionResultRequest 455 // message. The server MAY omit inlining, even if requested, and MUST do 456 // so if inlining 457 // would cause the response to exceed message size limits. 458 StderrRaw string `json:"stderrRaw,omitempty"` 459 460 // StdoutDigest: The digest for a blob containing the standard output of 461 // the action, which 462 // can be retrieved from the 463 // ContentAddressableStorage. 464 StdoutDigest *BuildBazelRemoteExecutionV2Digest `json:"stdoutDigest,omitempty"` 465 466 // StdoutRaw: The standard output buffer of the action. The server 467 // SHOULD NOT inline 468 // stdout unless requested by the client in 469 // the 470 // GetActionResultRequest 471 // message. The server MAY omit inlining, even if requested, and MUST do 472 // so if inlining 473 // would cause the response to exceed message size limits. 474 StdoutRaw string `json:"stdoutRaw,omitempty"` 475 476 // ForceSendFields is a list of field names (e.g. "ExecutionMetadata") 477 // to unconditionally include in API requests. By default, fields with 478 // empty values are omitted from API requests. However, any non-pointer, 479 // non-interface field appearing in ForceSendFields will be sent to the 480 // server regardless of whether the field is empty or not. This may be 481 // used to include empty fields in Patch requests. 482 ForceSendFields []string `json:"-"` 483 484 // NullFields is a list of field names (e.g. "ExecutionMetadata") to 485 // include in API requests with the JSON null value. By default, fields 486 // with empty values are omitted from API requests. However, any field 487 // with an empty value appearing in NullFields will be sent to the 488 // server as null. It is an error if a field in this list has a 489 // non-empty value. This may be used to include null fields in Patch 490 // requests. 491 NullFields []string `json:"-"` 492} 493 494func (s *BuildBazelRemoteExecutionV2ActionResult) MarshalJSON() ([]byte, error) { 495 type NoMethod BuildBazelRemoteExecutionV2ActionResult 496 raw := NoMethod(*s) 497 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 498} 499 500// BuildBazelRemoteExecutionV2Command: A `Command` is the actual command 501// executed by a worker running an 502// Action and specifications of its 503// environment. 504// 505// Except as otherwise required, the environment (such as which 506// system 507// libraries or binaries are available, and what filesystems are mounted 508// where) 509// is defined by and specific to the implementation of the remote 510// execution API. 511type BuildBazelRemoteExecutionV2Command struct { 512 // Arguments: The arguments to the command. The first argument must be 513 // the path to the 514 // executable, which must be either a relative path, in which case it 515 // is 516 // evaluated with respect to the input root, or an absolute path. 517 Arguments []string `json:"arguments,omitempty"` 518 519 // EnvironmentVariables: The environment variables to set when running 520 // the program. The worker may 521 // provide its own default environment variables; these defaults can 522 // be 523 // overridden using this field. Additional variables can also be 524 // specified. 525 // 526 // In order to ensure that equivalent 527 // Commands always hash to the same 528 // value, the environment variables MUST be lexicographically sorted by 529 // name. 530 // Sorting of strings is done by code point, equivalently, by the UTF-8 531 // bytes. 532 EnvironmentVariables []*BuildBazelRemoteExecutionV2CommandEnvironmentVariable `json:"environmentVariables,omitempty"` 533 534 // OutputDirectories: A list of the output directories that the client 535 // expects to retrieve from 536 // the action. Only the listed directories will be returned (an 537 // entire 538 // directory structure will be returned as a 539 // Tree message digest, see 540 // OutputDirectory), as 541 // well as files listed in `output_files`. Other files or directories 542 // that 543 // may be created during command execution are discarded. 544 // 545 // The paths are relative to the working directory of the action 546 // execution. 547 // The paths are specified using a single forward slash (`/`) as a 548 // path 549 // separator, even if the execution platform natively uses a 550 // different 551 // separator. The path MUST NOT include a trailing slash, nor a leading 552 // slash, 553 // being a relative path. The special value of empty string is 554 // allowed, 555 // although not recommended, and can be used to capture the entire 556 // working 557 // directory tree, including inputs. 558 // 559 // In order to ensure consistent hashing of the same Action, the output 560 // paths 561 // MUST be sorted lexicographically by code point (or, equivalently, by 562 // UTF-8 563 // bytes). 564 // 565 // An output directory cannot be duplicated or have the same path as any 566 // of 567 // the listed output files. An output directory is allowed to be a 568 // parent of 569 // another output directory. 570 // 571 // Directories leading up to the output directories (but not the 572 // output 573 // directories themselves) are created by the worker prior to execution, 574 // even 575 // if they are not explicitly part of the input root. 576 OutputDirectories []string `json:"outputDirectories,omitempty"` 577 578 // OutputFiles: A list of the output files that the client expects to 579 // retrieve from the 580 // action. Only the listed files, as well as directories listed 581 // in 582 // `output_directories`, will be returned to the client as output. 583 // Other files or directories that may be created during command 584 // execution 585 // are discarded. 586 // 587 // The paths are relative to the working directory of the action 588 // execution. 589 // The paths are specified using a single forward slash (`/`) as a 590 // path 591 // separator, even if the execution platform natively uses a 592 // different 593 // separator. The path MUST NOT include a trailing slash, nor a leading 594 // slash, 595 // being a relative path. 596 // 597 // In order to ensure consistent hashing of the same Action, the output 598 // paths 599 // MUST be sorted lexicographically by code point (or, equivalently, by 600 // UTF-8 601 // bytes). 602 // 603 // An output file cannot be duplicated, be a parent of another output 604 // file, or 605 // have the same path as any of the listed output 606 // directories. 607 // 608 // Directories leading up to the output files are created by the worker 609 // prior 610 // to execution, even if they are not explicitly part of the input root. 611 OutputFiles []string `json:"outputFiles,omitempty"` 612 613 // Platform: The platform requirements for the execution environment. 614 // The server MAY 615 // choose to execute the action on any worker satisfying the 616 // requirements, so 617 // the client SHOULD ensure that running the action on any such worker 618 // will 619 // have the same result. 620 // A detailed lexicon for this can be found in the accompanying 621 // platform.md. 622 Platform *BuildBazelRemoteExecutionV2Platform `json:"platform,omitempty"` 623 624 // WorkingDirectory: The working directory, relative to the input root, 625 // for the command to run 626 // in. It must be a directory which exists in the input tree. If it is 627 // left 628 // empty, then the action is run in the input root. 629 WorkingDirectory string `json:"workingDirectory,omitempty"` 630 631 // ForceSendFields is a list of field names (e.g. "Arguments") to 632 // unconditionally include in API requests. By default, fields with 633 // empty values are omitted from API requests. However, any non-pointer, 634 // non-interface field appearing in ForceSendFields will be sent to the 635 // server regardless of whether the field is empty or not. This may be 636 // used to include empty fields in Patch requests. 637 ForceSendFields []string `json:"-"` 638 639 // NullFields is a list of field names (e.g. "Arguments") to include in 640 // API requests with the JSON null value. By default, fields with empty 641 // values are omitted from API requests. However, any field with an 642 // empty value appearing in NullFields will be sent to the server as 643 // null. It is an error if a field in this list has a non-empty value. 644 // This may be used to include null fields in Patch requests. 645 NullFields []string `json:"-"` 646} 647 648func (s *BuildBazelRemoteExecutionV2Command) MarshalJSON() ([]byte, error) { 649 type NoMethod BuildBazelRemoteExecutionV2Command 650 raw := NoMethod(*s) 651 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 652} 653 654// BuildBazelRemoteExecutionV2CommandEnvironmentVariable: An 655// `EnvironmentVariable` is one variable to set in the running 656// program's 657// environment. 658type BuildBazelRemoteExecutionV2CommandEnvironmentVariable struct { 659 // Name: The variable name. 660 Name string `json:"name,omitempty"` 661 662 // Value: The variable value. 663 Value string `json:"value,omitempty"` 664 665 // ForceSendFields is a list of field names (e.g. "Name") to 666 // unconditionally include in API requests. By default, fields with 667 // empty values are omitted from API requests. However, any non-pointer, 668 // non-interface field appearing in ForceSendFields will be sent to the 669 // server regardless of whether the field is empty or not. This may be 670 // used to include empty fields in Patch requests. 671 ForceSendFields []string `json:"-"` 672 673 // NullFields is a list of field names (e.g. "Name") to include in API 674 // requests with the JSON null value. By default, fields with empty 675 // values are omitted from API requests. However, any field with an 676 // empty value appearing in NullFields will be sent to the server as 677 // null. It is an error if a field in this list has a non-empty value. 678 // This may be used to include null fields in Patch requests. 679 NullFields []string `json:"-"` 680} 681 682func (s *BuildBazelRemoteExecutionV2CommandEnvironmentVariable) MarshalJSON() ([]byte, error) { 683 type NoMethod BuildBazelRemoteExecutionV2CommandEnvironmentVariable 684 raw := NoMethod(*s) 685 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 686} 687 688// BuildBazelRemoteExecutionV2Digest: A content digest. A digest for a 689// given blob consists of the size of the blob 690// and its hash. The hash algorithm to use is defined by the server, but 691// servers 692// SHOULD use SHA-256. 693// 694// The size is considered to be an integral part of the digest and 695// cannot be 696// separated. That is, even if the `hash` field is correctly specified 697// but 698// `size_bytes` is not, the server MUST reject the request. 699// 700// The reason for including the size in the digest is as follows: in a 701// great 702// many cases, the server needs to know the size of the blob it is about 703// to work 704// with prior to starting an operation with it, such as flattening 705// Merkle tree 706// structures or streaming it to a worker. Technically, the server 707// could 708// implement a separate metadata store, but this results in a 709// significantly more 710// complicated implementation as opposed to having the client specify 711// the size 712// up-front (or storing the size along with the digest in every message 713// where 714// digests are embedded). This does mean that the API leaks some 715// implementation 716// details of (what we consider to be) a reasonable server 717// implementation, but 718// we consider this to be a worthwhile tradeoff. 719// 720// When a `Digest` is used to refer to a proto message, it always refers 721// to the 722// message in binary encoded form. To ensure consistent hashing, clients 723// and 724// servers MUST ensure that they serialize messages according to the 725// following 726// rules, even if there are alternate valid encodings for the same 727// message: 728// 729// * Fields are serialized in tag order. 730// * There are no unknown fields. 731// * There are no duplicate fields. 732// * Fields are serialized according to the default semantics for their 733// type. 734// 735// Most protocol buffer implementations will always follow these rules 736// when 737// serializing, but care should be taken to avoid shortcuts. For 738// instance, 739// concatenating two messages to merge them may produce duplicate 740// fields. 741type BuildBazelRemoteExecutionV2Digest struct { 742 // Hash: The hash. In the case of SHA-256, it will always be a lowercase 743 // hex string 744 // exactly 64 characters long. 745 Hash string `json:"hash,omitempty"` 746 747 // SizeBytes: The size of the blob, in bytes. 748 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 749 750 // ForceSendFields is a list of field names (e.g. "Hash") to 751 // unconditionally include in API requests. By default, fields with 752 // empty values are omitted from API requests. However, any non-pointer, 753 // non-interface field appearing in ForceSendFields will be sent to the 754 // server regardless of whether the field is empty or not. This may be 755 // used to include empty fields in Patch requests. 756 ForceSendFields []string `json:"-"` 757 758 // NullFields is a list of field names (e.g. "Hash") to include in API 759 // requests with the JSON null value. By default, fields with empty 760 // values are omitted from API requests. However, any field with an 761 // empty value appearing in NullFields will be sent to the server as 762 // null. It is an error if a field in this list has a non-empty value. 763 // This may be used to include null fields in Patch requests. 764 NullFields []string `json:"-"` 765} 766 767func (s *BuildBazelRemoteExecutionV2Digest) MarshalJSON() ([]byte, error) { 768 type NoMethod BuildBazelRemoteExecutionV2Digest 769 raw := NoMethod(*s) 770 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 771} 772 773// BuildBazelRemoteExecutionV2Directory: A `Directory` represents a 774// directory node in a file tree, containing zero or 775// more children FileNodes, 776// DirectoryNodes and 777// SymlinkNodes. 778// Each `Node` contains its name in the directory, either the digest of 779// its 780// content (either a file blob or a `Directory` proto) or a symlink 781// target, as 782// well as possibly some metadata about the file or directory. 783// 784// In order to ensure that two equivalent directory trees hash to the 785// same 786// value, the following restrictions MUST be obeyed when constructing 787// a 788// a `Directory`: 789// 790// * Every child in the directory must have a path of exactly one 791// segment. 792// Multiple levels of directory hierarchy may not be collapsed. 793// * Each child in the directory must have a unique path segment (file 794// name). 795// Note that while the API itself is case-sensitive, the environment 796// where 797// the Action is executed may or may not be case-sensitive. That is, 798// it is 799// legal to call the API with a Directory that has both "Foo" and 800// "foo" as 801// children, but the Action may be rejected by the remote system upon 802// execution. 803// * The files, directories and symlinks in the directory must each be 804// sorted 805// in lexicographical order by path. The path strings must be sorted 806// by code 807// point, equivalently, by UTF-8 bytes. 808// 809// A `Directory` that obeys the restrictions is said to be in canonical 810// form. 811// 812// As an example, the following could be used for a file named `bar` and 813// a 814// directory named `foo` with an executable file named `baz` (hashes 815// shortened 816// for readability): 817// 818// ```json 819// // (Directory proto) 820// { 821// files: [ 822// { 823// name: "bar", 824// digest: { 825// hash: "4a73bc9d03...", 826// size: 65534 827// } 828// } 829// ], 830// directories: [ 831// { 832// name: "foo", 833// digest: { 834// hash: "4cf2eda940...", 835// size: 43 836// } 837// } 838// ] 839// } 840// 841// // (Directory proto with hash "4cf2eda940..." and size 43) 842// { 843// files: [ 844// { 845// name: "baz", 846// digest: { 847// hash: "b2c941073e...", 848// size: 1294, 849// }, 850// is_executable: true 851// } 852// ] 853// } 854// ``` 855type BuildBazelRemoteExecutionV2Directory struct { 856 // Directories: The subdirectories in the directory. 857 Directories []*BuildBazelRemoteExecutionV2DirectoryNode `json:"directories,omitempty"` 858 859 // Files: The files in the directory. 860 Files []*BuildBazelRemoteExecutionV2FileNode `json:"files,omitempty"` 861 862 // Symlinks: The symlinks in the directory. 863 Symlinks []*BuildBazelRemoteExecutionV2SymlinkNode `json:"symlinks,omitempty"` 864 865 // ForceSendFields is a list of field names (e.g. "Directories") to 866 // unconditionally include in API requests. By default, fields with 867 // empty values are omitted from API requests. However, any non-pointer, 868 // non-interface field appearing in ForceSendFields will be sent to the 869 // server regardless of whether the field is empty or not. This may be 870 // used to include empty fields in Patch requests. 871 ForceSendFields []string `json:"-"` 872 873 // NullFields is a list of field names (e.g. "Directories") to include 874 // in API requests with the JSON null value. By default, fields with 875 // empty values are omitted from API requests. However, any field with 876 // an empty value appearing in NullFields will be sent to the server as 877 // null. It is an error if a field in this list has a non-empty value. 878 // This may be used to include null fields in Patch requests. 879 NullFields []string `json:"-"` 880} 881 882func (s *BuildBazelRemoteExecutionV2Directory) MarshalJSON() ([]byte, error) { 883 type NoMethod BuildBazelRemoteExecutionV2Directory 884 raw := NoMethod(*s) 885 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 886} 887 888// BuildBazelRemoteExecutionV2DirectoryNode: A `DirectoryNode` 889// represents a child of a 890// Directory which is itself 891// a `Directory` and its associated metadata. 892type BuildBazelRemoteExecutionV2DirectoryNode struct { 893 // Digest: The digest of the 894 // Directory object 895 // represented. See Digest 896 // for information about how to take the digest of a proto message. 897 Digest *BuildBazelRemoteExecutionV2Digest `json:"digest,omitempty"` 898 899 // Name: The name of the directory. 900 Name string `json:"name,omitempty"` 901 902 // ForceSendFields is a list of field names (e.g. "Digest") to 903 // unconditionally include in API requests. By default, fields with 904 // empty values are omitted from API requests. However, any non-pointer, 905 // non-interface field appearing in ForceSendFields will be sent to the 906 // server regardless of whether the field is empty or not. This may be 907 // used to include empty fields in Patch requests. 908 ForceSendFields []string `json:"-"` 909 910 // NullFields is a list of field names (e.g. "Digest") to include in API 911 // requests with the JSON null value. By default, fields with empty 912 // values are omitted from API requests. However, any field with an 913 // empty value appearing in NullFields will be sent to the server as 914 // null. It is an error if a field in this list has a non-empty value. 915 // This may be used to include null fields in Patch requests. 916 NullFields []string `json:"-"` 917} 918 919func (s *BuildBazelRemoteExecutionV2DirectoryNode) MarshalJSON() ([]byte, error) { 920 type NoMethod BuildBazelRemoteExecutionV2DirectoryNode 921 raw := NoMethod(*s) 922 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 923} 924 925// BuildBazelRemoteExecutionV2ExecuteOperationMetadata: Metadata about 926// an ongoing 927// execution, which 928// will be contained in the metadata 929// field of the 930// Operation. 931type BuildBazelRemoteExecutionV2ExecuteOperationMetadata struct { 932 // ActionDigest: The digest of the Action 933 // being executed. 934 ActionDigest *BuildBazelRemoteExecutionV2Digest `json:"actionDigest,omitempty"` 935 936 // Stage: The current stage of execution. 937 // 938 // Possible values: 939 // "UNKNOWN" - Invalid value. 940 // "CACHE_CHECK" - Checking the result against the cache. 941 // "QUEUED" - Currently idle, awaiting a free machine to execute. 942 // "EXECUTING" - Currently being executed by a worker. 943 // "COMPLETED" - Finished execution. 944 Stage string `json:"stage,omitempty"` 945 946 // StderrStreamName: If set, the client can use this name 947 // with 948 // ByteStream.Read to stream the 949 // standard error. 950 StderrStreamName string `json:"stderrStreamName,omitempty"` 951 952 // StdoutStreamName: If set, the client can use this name 953 // with 954 // ByteStream.Read to stream the 955 // standard output. 956 StdoutStreamName string `json:"stdoutStreamName,omitempty"` 957 958 // ForceSendFields is a list of field names (e.g. "ActionDigest") to 959 // unconditionally include in API requests. By default, fields with 960 // empty values are omitted from API requests. However, any non-pointer, 961 // non-interface field appearing in ForceSendFields will be sent to the 962 // server regardless of whether the field is empty or not. This may be 963 // used to include empty fields in Patch requests. 964 ForceSendFields []string `json:"-"` 965 966 // NullFields is a list of field names (e.g. "ActionDigest") to include 967 // in API requests with the JSON null value. By default, fields with 968 // empty values are omitted from API requests. However, any field with 969 // an empty value appearing in NullFields will be sent to the server as 970 // null. It is an error if a field in this list has a non-empty value. 971 // This may be used to include null fields in Patch requests. 972 NullFields []string `json:"-"` 973} 974 975func (s *BuildBazelRemoteExecutionV2ExecuteOperationMetadata) MarshalJSON() ([]byte, error) { 976 type NoMethod BuildBazelRemoteExecutionV2ExecuteOperationMetadata 977 raw := NoMethod(*s) 978 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 979} 980 981// BuildBazelRemoteExecutionV2ExecuteResponse: The response message 982// for 983// Execution.Execute, 984// which will be contained in the response 985// field of the 986// Operation. 987type BuildBazelRemoteExecutionV2ExecuteResponse struct { 988 // CachedResult: True if the result was served from cache, false if it 989 // was executed. 990 CachedResult bool `json:"cachedResult,omitempty"` 991 992 // Message: Freeform informational message with details on the execution 993 // of the action 994 // that may be displayed to the user upon failure or when requested 995 // explicitly. 996 Message string `json:"message,omitempty"` 997 998 // Result: The result of the action. 999 Result *BuildBazelRemoteExecutionV2ActionResult `json:"result,omitempty"` 1000 1001 // ServerLogs: An optional list of additional log outputs the server 1002 // wishes to provide. A 1003 // server can use this to return execution-specific logs however it 1004 // wishes. 1005 // This is intended primarily to make it easier for users to debug 1006 // issues that 1007 // may be outside of the actual job execution, such as by identifying 1008 // the 1009 // worker executing the action or by providing logs from the worker's 1010 // setup 1011 // phase. The keys SHOULD be human readable so that a client can display 1012 // them 1013 // to a user. 1014 ServerLogs map[string]BuildBazelRemoteExecutionV2LogFile `json:"serverLogs,omitempty"` 1015 1016 // Status: If the status has a code other than `OK`, it indicates that 1017 // the action did 1018 // not finish execution. For example, if the operation times out 1019 // during 1020 // execution, the status will have a `DEADLINE_EXCEEDED` code. Servers 1021 // MUST 1022 // use this field for errors in execution, rather than the error field 1023 // on the 1024 // `Operation` object. 1025 // 1026 // If the status code is other than `OK`, then the result MUST NOT be 1027 // cached. 1028 // For an error status, the `result` field is optional; the server 1029 // may 1030 // populate the output-, stdout-, and stderr-related fields if it has 1031 // any 1032 // information available, such as the stdout and stderr of a timed-out 1033 // action. 1034 Status *GoogleRpcStatus `json:"status,omitempty"` 1035 1036 // ForceSendFields is a list of field names (e.g. "CachedResult") to 1037 // unconditionally include in API requests. By default, fields with 1038 // empty values are omitted from API requests. However, any non-pointer, 1039 // non-interface field appearing in ForceSendFields will be sent to the 1040 // server regardless of whether the field is empty or not. This may be 1041 // used to include empty fields in Patch requests. 1042 ForceSendFields []string `json:"-"` 1043 1044 // NullFields is a list of field names (e.g. "CachedResult") to include 1045 // in API requests with the JSON null value. By default, fields with 1046 // empty values are omitted from API requests. However, any field with 1047 // an empty value appearing in NullFields will be sent to the server as 1048 // null. It is an error if a field in this list has a non-empty value. 1049 // This may be used to include null fields in Patch requests. 1050 NullFields []string `json:"-"` 1051} 1052 1053func (s *BuildBazelRemoteExecutionV2ExecuteResponse) MarshalJSON() ([]byte, error) { 1054 type NoMethod BuildBazelRemoteExecutionV2ExecuteResponse 1055 raw := NoMethod(*s) 1056 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1057} 1058 1059// BuildBazelRemoteExecutionV2ExecutedActionMetadata: 1060// ExecutedActionMetadata contains details about a completed execution. 1061type BuildBazelRemoteExecutionV2ExecutedActionMetadata struct { 1062 // ExecutionCompletedTimestamp: When the worker completed executing the 1063 // action command. 1064 ExecutionCompletedTimestamp string `json:"executionCompletedTimestamp,omitempty"` 1065 1066 // ExecutionStartTimestamp: When the worker started executing the action 1067 // command. 1068 ExecutionStartTimestamp string `json:"executionStartTimestamp,omitempty"` 1069 1070 // InputFetchCompletedTimestamp: When the worker finished fetching 1071 // action inputs. 1072 InputFetchCompletedTimestamp string `json:"inputFetchCompletedTimestamp,omitempty"` 1073 1074 // InputFetchStartTimestamp: When the worker started fetching action 1075 // inputs. 1076 InputFetchStartTimestamp string `json:"inputFetchStartTimestamp,omitempty"` 1077 1078 // OutputUploadCompletedTimestamp: When the worker finished uploading 1079 // action outputs. 1080 OutputUploadCompletedTimestamp string `json:"outputUploadCompletedTimestamp,omitempty"` 1081 1082 // OutputUploadStartTimestamp: When the worker started uploading action 1083 // outputs. 1084 OutputUploadStartTimestamp string `json:"outputUploadStartTimestamp,omitempty"` 1085 1086 // QueuedTimestamp: When was the action added to the queue. 1087 QueuedTimestamp string `json:"queuedTimestamp,omitempty"` 1088 1089 // Worker: The name of the worker which ran the execution. 1090 Worker string `json:"worker,omitempty"` 1091 1092 // WorkerCompletedTimestamp: When the worker completed the action, 1093 // including all stages. 1094 WorkerCompletedTimestamp string `json:"workerCompletedTimestamp,omitempty"` 1095 1096 // WorkerStartTimestamp: When the worker received the action. 1097 WorkerStartTimestamp string `json:"workerStartTimestamp,omitempty"` 1098 1099 // ForceSendFields is a list of field names (e.g. 1100 // "ExecutionCompletedTimestamp") to unconditionally include in API 1101 // requests. By default, fields with empty values are omitted from API 1102 // requests. However, any non-pointer, non-interface field appearing in 1103 // ForceSendFields will be sent to the server regardless of whether the 1104 // field is empty or not. This may be used to include empty fields in 1105 // Patch requests. 1106 ForceSendFields []string `json:"-"` 1107 1108 // NullFields is a list of field names (e.g. 1109 // "ExecutionCompletedTimestamp") to include in API requests with the 1110 // JSON null value. By default, fields with empty values are omitted 1111 // from API requests. However, any field with an empty value appearing 1112 // in NullFields will be sent to the server as null. It is an error if a 1113 // field in this list has a non-empty value. This may be used to include 1114 // null fields in Patch requests. 1115 NullFields []string `json:"-"` 1116} 1117 1118func (s *BuildBazelRemoteExecutionV2ExecutedActionMetadata) MarshalJSON() ([]byte, error) { 1119 type NoMethod BuildBazelRemoteExecutionV2ExecutedActionMetadata 1120 raw := NoMethod(*s) 1121 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1122} 1123 1124// BuildBazelRemoteExecutionV2FileNode: A `FileNode` represents a single 1125// file and associated metadata. 1126type BuildBazelRemoteExecutionV2FileNode struct { 1127 // Digest: The digest of the file's content. 1128 Digest *BuildBazelRemoteExecutionV2Digest `json:"digest,omitempty"` 1129 1130 // IsExecutable: True if file is executable, false otherwise. 1131 IsExecutable bool `json:"isExecutable,omitempty"` 1132 1133 // Name: The name of the file. 1134 Name string `json:"name,omitempty"` 1135 1136 // ForceSendFields is a list of field names (e.g. "Digest") to 1137 // unconditionally include in API requests. By default, fields with 1138 // empty values are omitted from API requests. However, any non-pointer, 1139 // non-interface field appearing in ForceSendFields will be sent to the 1140 // server regardless of whether the field is empty or not. This may be 1141 // used to include empty fields in Patch requests. 1142 ForceSendFields []string `json:"-"` 1143 1144 // NullFields is a list of field names (e.g. "Digest") to include in API 1145 // requests with the JSON null value. By default, fields with empty 1146 // values are omitted from API requests. However, any field with an 1147 // empty value appearing in NullFields will be sent to the server as 1148 // null. It is an error if a field in this list has a non-empty value. 1149 // This may be used to include null fields in Patch requests. 1150 NullFields []string `json:"-"` 1151} 1152 1153func (s *BuildBazelRemoteExecutionV2FileNode) MarshalJSON() ([]byte, error) { 1154 type NoMethod BuildBazelRemoteExecutionV2FileNode 1155 raw := NoMethod(*s) 1156 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1157} 1158 1159// BuildBazelRemoteExecutionV2LogFile: A `LogFile` is a log stored in 1160// the CAS. 1161type BuildBazelRemoteExecutionV2LogFile struct { 1162 // Digest: The digest of the log contents. 1163 Digest *BuildBazelRemoteExecutionV2Digest `json:"digest,omitempty"` 1164 1165 // HumanReadable: This is a hint as to the purpose of the log, and is 1166 // set to true if the log 1167 // is human-readable text that can be usefully displayed to a user, and 1168 // false 1169 // otherwise. For instance, if a command-line client wishes to print 1170 // the 1171 // server logs to the terminal for a failed action, this allows it to 1172 // avoid 1173 // displaying a binary file. 1174 HumanReadable bool `json:"humanReadable,omitempty"` 1175 1176 // ForceSendFields is a list of field names (e.g. "Digest") to 1177 // unconditionally include in API requests. By default, fields with 1178 // empty values are omitted from API requests. However, any non-pointer, 1179 // non-interface field appearing in ForceSendFields will be sent to the 1180 // server regardless of whether the field is empty or not. This may be 1181 // used to include empty fields in Patch requests. 1182 ForceSendFields []string `json:"-"` 1183 1184 // NullFields is a list of field names (e.g. "Digest") to include in API 1185 // requests with the JSON null value. By default, fields with empty 1186 // values are omitted from API requests. However, any field with an 1187 // empty value appearing in NullFields will be sent to the server as 1188 // null. It is an error if a field in this list has a non-empty value. 1189 // This may be used to include null fields in Patch requests. 1190 NullFields []string `json:"-"` 1191} 1192 1193func (s *BuildBazelRemoteExecutionV2LogFile) MarshalJSON() ([]byte, error) { 1194 type NoMethod BuildBazelRemoteExecutionV2LogFile 1195 raw := NoMethod(*s) 1196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1197} 1198 1199// BuildBazelRemoteExecutionV2OutputDirectory: An `OutputDirectory` is 1200// the output in an `ActionResult` corresponding to a 1201// directory's full contents rather than a single file. 1202type BuildBazelRemoteExecutionV2OutputDirectory struct { 1203 // Path: The full path of the directory relative to the working 1204 // directory. The path 1205 // separator is a forward slash `/`. Since this is a relative path, it 1206 // MUST 1207 // NOT begin with a leading forward slash. The empty string value is 1208 // allowed, 1209 // and it denotes the entire working directory. 1210 Path string `json:"path,omitempty"` 1211 1212 // TreeDigest: The digest of the encoded 1213 // Tree proto containing the 1214 // directory's contents. 1215 TreeDigest *BuildBazelRemoteExecutionV2Digest `json:"treeDigest,omitempty"` 1216 1217 // ForceSendFields is a list of field names (e.g. "Path") to 1218 // unconditionally include in API requests. By default, fields with 1219 // empty values are omitted from API requests. However, any non-pointer, 1220 // non-interface field appearing in ForceSendFields will be sent to the 1221 // server regardless of whether the field is empty or not. This may be 1222 // used to include empty fields in Patch requests. 1223 ForceSendFields []string `json:"-"` 1224 1225 // NullFields is a list of field names (e.g. "Path") to include in API 1226 // requests with the JSON null value. By default, fields with empty 1227 // values are omitted from API requests. However, any field with an 1228 // empty value appearing in NullFields will be sent to the server as 1229 // null. It is an error if a field in this list has a non-empty value. 1230 // This may be used to include null fields in Patch requests. 1231 NullFields []string `json:"-"` 1232} 1233 1234func (s *BuildBazelRemoteExecutionV2OutputDirectory) MarshalJSON() ([]byte, error) { 1235 type NoMethod BuildBazelRemoteExecutionV2OutputDirectory 1236 raw := NoMethod(*s) 1237 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1238} 1239 1240// BuildBazelRemoteExecutionV2OutputFile: An `OutputFile` is similar to 1241// a 1242// FileNode, but it is used as an 1243// output in an `ActionResult`. It allows a full file path rather 1244// than 1245// only a name. 1246type BuildBazelRemoteExecutionV2OutputFile struct { 1247 // Contents: The contents of the file if inlining was requested. The 1248 // server SHOULD NOT inline 1249 // file contents unless requested by the client in 1250 // the 1251 // GetActionResultRequest 1252 // message. The server MAY omit inlining, even if requested, and MUST do 1253 // so if inlining 1254 // would cause the response to exceed message size limits. 1255 Contents string `json:"contents,omitempty"` 1256 1257 // Digest: The digest of the file's content. 1258 Digest *BuildBazelRemoteExecutionV2Digest `json:"digest,omitempty"` 1259 1260 // IsExecutable: True if file is executable, false otherwise. 1261 IsExecutable bool `json:"isExecutable,omitempty"` 1262 1263 // Path: The full path of the file relative to the working directory, 1264 // including the 1265 // filename. The path separator is a forward slash `/`. Since this is 1266 // a 1267 // relative path, it MUST NOT begin with a leading forward slash. 1268 Path string `json:"path,omitempty"` 1269 1270 // ForceSendFields is a list of field names (e.g. "Contents") to 1271 // unconditionally include in API requests. By default, fields with 1272 // empty values are omitted from API requests. However, any non-pointer, 1273 // non-interface field appearing in ForceSendFields will be sent to the 1274 // server regardless of whether the field is empty or not. This may be 1275 // used to include empty fields in Patch requests. 1276 ForceSendFields []string `json:"-"` 1277 1278 // NullFields is a list of field names (e.g. "Contents") to include in 1279 // API requests with the JSON null value. By default, fields with empty 1280 // values are omitted from API requests. However, any field with an 1281 // empty value appearing in NullFields will be sent to the server as 1282 // null. It is an error if a field in this list has a non-empty value. 1283 // This may be used to include null fields in Patch requests. 1284 NullFields []string `json:"-"` 1285} 1286 1287func (s *BuildBazelRemoteExecutionV2OutputFile) MarshalJSON() ([]byte, error) { 1288 type NoMethod BuildBazelRemoteExecutionV2OutputFile 1289 raw := NoMethod(*s) 1290 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1291} 1292 1293// BuildBazelRemoteExecutionV2OutputSymlink: An `OutputSymlink` is 1294// similar to a 1295// Symlink, but it is used as an 1296// output in an `ActionResult`. 1297// 1298// `OutputSymlink` is binary-compatible with `SymlinkNode`. 1299type BuildBazelRemoteExecutionV2OutputSymlink struct { 1300 // Path: The full path of the symlink relative to the working directory, 1301 // including the 1302 // filename. The path separator is a forward slash `/`. Since this is 1303 // a 1304 // relative path, it MUST NOT begin with a leading forward slash. 1305 Path string `json:"path,omitempty"` 1306 1307 // Target: The target path of the symlink. The path separator is a 1308 // forward slash `/`. 1309 // The target path can be relative to the parent directory of the 1310 // symlink or 1311 // it can be an absolute path starting with `/`. Support for absolute 1312 // paths 1313 // can be checked using the Capabilities 1314 // API. The canonical form forbids the substrings `/./` and `//` in the 1315 // target 1316 // path. `..` components are allowed anywhere in the target path. 1317 Target string `json:"target,omitempty"` 1318 1319 // ForceSendFields is a list of field names (e.g. "Path") to 1320 // unconditionally include in API requests. By default, fields with 1321 // empty values are omitted from API requests. However, any non-pointer, 1322 // non-interface field appearing in ForceSendFields will be sent to the 1323 // server regardless of whether the field is empty or not. This may be 1324 // used to include empty fields in Patch requests. 1325 ForceSendFields []string `json:"-"` 1326 1327 // NullFields is a list of field names (e.g. "Path") to include in API 1328 // requests with the JSON null value. By default, fields with empty 1329 // values are omitted from API requests. However, any field with an 1330 // empty value appearing in NullFields will be sent to the server as 1331 // null. It is an error if a field in this list has a non-empty value. 1332 // This may be used to include null fields in Patch requests. 1333 NullFields []string `json:"-"` 1334} 1335 1336func (s *BuildBazelRemoteExecutionV2OutputSymlink) MarshalJSON() ([]byte, error) { 1337 type NoMethod BuildBazelRemoteExecutionV2OutputSymlink 1338 raw := NoMethod(*s) 1339 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1340} 1341 1342// BuildBazelRemoteExecutionV2Platform: A `Platform` is a set of 1343// requirements, such as hardware, operating system, or 1344// compiler toolchain, for an 1345// Action's execution 1346// environment. A `Platform` is represented as a series of key-value 1347// pairs 1348// representing the properties that are required of the platform. 1349type BuildBazelRemoteExecutionV2Platform struct { 1350 // Properties: The properties that make up this platform. In order to 1351 // ensure that 1352 // equivalent `Platform`s always hash to the same value, the properties 1353 // MUST 1354 // be lexicographically sorted by name, and then by value. Sorting of 1355 // strings 1356 // is done by code point, equivalently, by the UTF-8 bytes. 1357 Properties []*BuildBazelRemoteExecutionV2PlatformProperty `json:"properties,omitempty"` 1358 1359 // ForceSendFields is a list of field names (e.g. "Properties") to 1360 // unconditionally include in API requests. By default, fields with 1361 // empty values are omitted from API requests. However, any non-pointer, 1362 // non-interface field appearing in ForceSendFields will be sent to the 1363 // server regardless of whether the field is empty or not. This may be 1364 // used to include empty fields in Patch requests. 1365 ForceSendFields []string `json:"-"` 1366 1367 // NullFields is a list of field names (e.g. "Properties") to include in 1368 // API requests with the JSON null value. By default, fields with empty 1369 // values are omitted from API requests. However, any field with an 1370 // empty value appearing in NullFields will be sent to the server as 1371 // null. It is an error if a field in this list has a non-empty value. 1372 // This may be used to include null fields in Patch requests. 1373 NullFields []string `json:"-"` 1374} 1375 1376func (s *BuildBazelRemoteExecutionV2Platform) MarshalJSON() ([]byte, error) { 1377 type NoMethod BuildBazelRemoteExecutionV2Platform 1378 raw := NoMethod(*s) 1379 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1380} 1381 1382// BuildBazelRemoteExecutionV2PlatformProperty: A single property for 1383// the environment. The server is responsible for 1384// specifying the property `name`s that it accepts. If an unknown `name` 1385// is 1386// provided in the requirements for an 1387// Action, the server SHOULD 1388// reject the execution request. If permitted by the server, the same 1389// `name` 1390// may occur multiple times. 1391// 1392// The server is also responsible for specifying the interpretation 1393// of 1394// property `value`s. For instance, a property describing how much RAM 1395// must be 1396// available may be interpreted as allowing a worker with 16GB to 1397// fulfill a 1398// request for 8GB, while a property describing the OS environment on 1399// which 1400// the action must be performed may require an exact match with the 1401// worker's 1402// OS. 1403// 1404// The server MAY use the `value` of one or more properties to determine 1405// how 1406// it sets up the execution environment, such as by making specific 1407// system 1408// files available to the worker. 1409type BuildBazelRemoteExecutionV2PlatformProperty struct { 1410 // Name: The property name. 1411 Name string `json:"name,omitempty"` 1412 1413 // Value: The property value. 1414 Value string `json:"value,omitempty"` 1415 1416 // ForceSendFields is a list of field names (e.g. "Name") to 1417 // unconditionally include in API requests. By default, fields with 1418 // empty values are omitted from API requests. However, any non-pointer, 1419 // non-interface field appearing in ForceSendFields will be sent to the 1420 // server regardless of whether the field is empty or not. This may be 1421 // used to include empty fields in Patch requests. 1422 ForceSendFields []string `json:"-"` 1423 1424 // NullFields is a list of field names (e.g. "Name") to include in API 1425 // requests with the JSON null value. By default, fields with empty 1426 // values are omitted from API requests. However, any field with an 1427 // empty value appearing in NullFields will be sent to the server as 1428 // null. It is an error if a field in this list has a non-empty value. 1429 // This may be used to include null fields in Patch requests. 1430 NullFields []string `json:"-"` 1431} 1432 1433func (s *BuildBazelRemoteExecutionV2PlatformProperty) MarshalJSON() ([]byte, error) { 1434 type NoMethod BuildBazelRemoteExecutionV2PlatformProperty 1435 raw := NoMethod(*s) 1436 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1437} 1438 1439// BuildBazelRemoteExecutionV2RequestMetadata: An optional Metadata to 1440// attach to any RPC request to tell the server about an 1441// external context of the request. The server may use this for logging 1442// or other 1443// purposes. To use it, the client attaches the header to the call using 1444// the 1445// canonical proto serialization: 1446// 1447// * name: `build.bazel.remote.execution.v2.requestmetadata-bin` 1448// * contents: the base64 encoded binary `RequestMetadata` 1449// message. 1450// Note: the gRPC library serializes binary headers encoded in base 64 1451// by 1452// default 1453// (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#reques 1454// ts). 1455// Therefore, if the gRPC library is used to pass/retrieve 1456// this 1457// metadata, the user may ignore the base64 encoding and assume it is 1458// simply 1459// serialized as a binary message. 1460type BuildBazelRemoteExecutionV2RequestMetadata struct { 1461 // ActionId: An identifier that ties multiple requests to the same 1462 // action. 1463 // For example, multiple requests to the CAS, Action Cache, and 1464 // Execution 1465 // API are used in order to compile foo.cc. 1466 ActionId string `json:"actionId,omitempty"` 1467 1468 // CorrelatedInvocationsId: An identifier to tie multiple tool 1469 // invocations together. For example, 1470 // runs of foo_test, bar_test and baz_test on a post-submit of a given 1471 // patch. 1472 CorrelatedInvocationsId string `json:"correlatedInvocationsId,omitempty"` 1473 1474 // ToolDetails: The details for the tool invoking the requests. 1475 ToolDetails *BuildBazelRemoteExecutionV2ToolDetails `json:"toolDetails,omitempty"` 1476 1477 // ToolInvocationId: An identifier that ties multiple actions together 1478 // to a final result. 1479 // For example, multiple actions are required to build and run foo_test. 1480 ToolInvocationId string `json:"toolInvocationId,omitempty"` 1481 1482 // ForceSendFields is a list of field names (e.g. "ActionId") to 1483 // unconditionally include in API requests. By default, fields with 1484 // empty values are omitted from API requests. However, any non-pointer, 1485 // non-interface field appearing in ForceSendFields will be sent to the 1486 // server regardless of whether the field is empty or not. This may be 1487 // used to include empty fields in Patch requests. 1488 ForceSendFields []string `json:"-"` 1489 1490 // NullFields is a list of field names (e.g. "ActionId") to include in 1491 // API requests with the JSON null value. By default, fields with empty 1492 // values are omitted from API requests. However, any field with an 1493 // empty value appearing in NullFields will be sent to the server as 1494 // null. It is an error if a field in this list has a non-empty value. 1495 // This may be used to include null fields in Patch requests. 1496 NullFields []string `json:"-"` 1497} 1498 1499func (s *BuildBazelRemoteExecutionV2RequestMetadata) MarshalJSON() ([]byte, error) { 1500 type NoMethod BuildBazelRemoteExecutionV2RequestMetadata 1501 raw := NoMethod(*s) 1502 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1503} 1504 1505// BuildBazelRemoteExecutionV2SymlinkNode: A `SymlinkNode` represents a 1506// symbolic link. 1507type BuildBazelRemoteExecutionV2SymlinkNode struct { 1508 // Name: The name of the symlink. 1509 Name string `json:"name,omitempty"` 1510 1511 // Target: The target path of the symlink. The path separator is a 1512 // forward slash `/`. 1513 // The target path can be relative to the parent directory of the 1514 // symlink or 1515 // it can be an absolute path starting with `/`. Support for absolute 1516 // paths 1517 // can be checked using the Capabilities 1518 // API. The canonical form forbids the substrings `/./` and `//` in the 1519 // target 1520 // path. `..` components are allowed anywhere in the target path. 1521 Target string `json:"target,omitempty"` 1522 1523 // ForceSendFields is a list of field names (e.g. "Name") to 1524 // unconditionally include in API requests. By default, fields with 1525 // empty values are omitted from API requests. However, any non-pointer, 1526 // non-interface field appearing in ForceSendFields will be sent to the 1527 // server regardless of whether the field is empty or not. This may be 1528 // used to include empty fields in Patch requests. 1529 ForceSendFields []string `json:"-"` 1530 1531 // NullFields is a list of field names (e.g. "Name") to include in API 1532 // requests with the JSON null value. By default, fields with empty 1533 // values are omitted from API requests. However, any field with an 1534 // empty value appearing in NullFields will be sent to the server as 1535 // null. It is an error if a field in this list has a non-empty value. 1536 // This may be used to include null fields in Patch requests. 1537 NullFields []string `json:"-"` 1538} 1539 1540func (s *BuildBazelRemoteExecutionV2SymlinkNode) MarshalJSON() ([]byte, error) { 1541 type NoMethod BuildBazelRemoteExecutionV2SymlinkNode 1542 raw := NoMethod(*s) 1543 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1544} 1545 1546// BuildBazelRemoteExecutionV2ToolDetails: Details for the tool used to 1547// call the API. 1548type BuildBazelRemoteExecutionV2ToolDetails struct { 1549 // ToolName: Name of the tool, e.g. bazel. 1550 ToolName string `json:"toolName,omitempty"` 1551 1552 // ToolVersion: Version of the tool used for the request, e.g. 5.0.3. 1553 ToolVersion string `json:"toolVersion,omitempty"` 1554 1555 // ForceSendFields is a list of field names (e.g. "ToolName") to 1556 // unconditionally include in API requests. By default, fields with 1557 // empty values are omitted from API requests. However, any non-pointer, 1558 // non-interface field appearing in ForceSendFields will be sent to the 1559 // server regardless of whether the field is empty or not. This may be 1560 // used to include empty fields in Patch requests. 1561 ForceSendFields []string `json:"-"` 1562 1563 // NullFields is a list of field names (e.g. "ToolName") to include in 1564 // API requests with the JSON null value. By default, fields with empty 1565 // values are omitted from API requests. However, any field with an 1566 // empty value appearing in NullFields will be sent to the server as 1567 // null. It is an error if a field in this list has a non-empty value. 1568 // This may be used to include null fields in Patch requests. 1569 NullFields []string `json:"-"` 1570} 1571 1572func (s *BuildBazelRemoteExecutionV2ToolDetails) MarshalJSON() ([]byte, error) { 1573 type NoMethod BuildBazelRemoteExecutionV2ToolDetails 1574 raw := NoMethod(*s) 1575 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1576} 1577 1578// BuildBazelRemoteExecutionV2Tree: A `Tree` contains all the 1579// Directory protos in a 1580// single directory Merkle tree, compressed into one message. 1581type BuildBazelRemoteExecutionV2Tree struct { 1582 // Children: All the child directories: the directories referred to by 1583 // the root and, 1584 // recursively, all its children. In order to reconstruct the directory 1585 // tree, 1586 // the client must take the digests of each of the child directories and 1587 // then 1588 // build up a tree starting from the `root`. 1589 Children []*BuildBazelRemoteExecutionV2Directory `json:"children,omitempty"` 1590 1591 // Root: The root directory in the tree. 1592 Root *BuildBazelRemoteExecutionV2Directory `json:"root,omitempty"` 1593 1594 // ForceSendFields is a list of field names (e.g. "Children") to 1595 // unconditionally include in API requests. By default, fields with 1596 // empty values are omitted from API requests. However, any non-pointer, 1597 // non-interface field appearing in ForceSendFields will be sent to the 1598 // server regardless of whether the field is empty or not. This may be 1599 // used to include empty fields in Patch requests. 1600 ForceSendFields []string `json:"-"` 1601 1602 // NullFields is a list of field names (e.g. "Children") to include in 1603 // API requests with the JSON null value. By default, fields with empty 1604 // values are omitted from API requests. However, any field with an 1605 // empty value appearing in NullFields will be sent to the server as 1606 // null. It is an error if a field in this list has a non-empty value. 1607 // This may be used to include null fields in Patch requests. 1608 NullFields []string `json:"-"` 1609} 1610 1611func (s *BuildBazelRemoteExecutionV2Tree) MarshalJSON() ([]byte, error) { 1612 type NoMethod BuildBazelRemoteExecutionV2Tree 1613 raw := NoMethod(*s) 1614 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1615} 1616 1617// GoogleDevtoolsRemotebuildbotCommandDurations: CommandDuration 1618// contains the various duration metrics tracked when a bot 1619// performs a command. 1620type GoogleDevtoolsRemotebuildbotCommandDurations struct { 1621 // DockerPrep: The time spent preparing the command to be run in a 1622 // Docker container 1623 // (includes pulling the Docker image, if necessary). 1624 DockerPrep string `json:"dockerPrep,omitempty"` 1625 1626 // Download: The time spent downloading the input files and constructing 1627 // the working 1628 // directory. 1629 Download string `json:"download,omitempty"` 1630 1631 // Execution: The time spent executing the command (i.e., doing useful 1632 // work). 1633 Execution string `json:"execution,omitempty"` 1634 1635 // IsoPrepDone: The timestamp when preparation is done and bot starts 1636 // downloading files. 1637 IsoPrepDone string `json:"isoPrepDone,omitempty"` 1638 1639 // Overall: The time spent completing the command, in total. 1640 Overall string `json:"overall,omitempty"` 1641 1642 // Stdout: The time spent uploading the stdout logs. 1643 Stdout string `json:"stdout,omitempty"` 1644 1645 // Upload: The time spent uploading the output files. 1646 Upload string `json:"upload,omitempty"` 1647 1648 // ForceSendFields is a list of field names (e.g. "DockerPrep") to 1649 // unconditionally include in API requests. By default, fields with 1650 // empty values are omitted from API requests. However, any non-pointer, 1651 // non-interface field appearing in ForceSendFields will be sent to the 1652 // server regardless of whether the field is empty or not. This may be 1653 // used to include empty fields in Patch requests. 1654 ForceSendFields []string `json:"-"` 1655 1656 // NullFields is a list of field names (e.g. "DockerPrep") to include in 1657 // API requests with the JSON null value. By default, fields with empty 1658 // values are omitted from API requests. However, any field with an 1659 // empty value appearing in NullFields will be sent to the server as 1660 // null. It is an error if a field in this list has a non-empty value. 1661 // This may be used to include null fields in Patch requests. 1662 NullFields []string `json:"-"` 1663} 1664 1665func (s *GoogleDevtoolsRemotebuildbotCommandDurations) MarshalJSON() ([]byte, error) { 1666 type NoMethod GoogleDevtoolsRemotebuildbotCommandDurations 1667 raw := NoMethod(*s) 1668 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1669} 1670 1671// GoogleDevtoolsRemotebuildbotCommandEvents: CommandEvents contains 1672// counters for the number of warnings and errors 1673// that occurred during the execution of a command. 1674type GoogleDevtoolsRemotebuildbotCommandEvents struct { 1675 // DockerCacheHit: Indicates whether we are using a cached Docker image 1676 // (true) or had to pull 1677 // the Docker image (false) for this command. 1678 DockerCacheHit bool `json:"dockerCacheHit,omitempty"` 1679 1680 // InputCacheMiss: The input cache miss ratio. 1681 InputCacheMiss float64 `json:"inputCacheMiss,omitempty"` 1682 1683 // NumErrors: The number of errors reported. 1684 NumErrors uint64 `json:"numErrors,omitempty,string"` 1685 1686 // NumWarnings: The number of warnings reported. 1687 NumWarnings uint64 `json:"numWarnings,omitempty,string"` 1688 1689 // ForceSendFields is a list of field names (e.g. "DockerCacheHit") to 1690 // unconditionally include in API requests. By default, fields with 1691 // empty values are omitted from API requests. However, any non-pointer, 1692 // non-interface field appearing in ForceSendFields will be sent to the 1693 // server regardless of whether the field is empty or not. This may be 1694 // used to include empty fields in Patch requests. 1695 ForceSendFields []string `json:"-"` 1696 1697 // NullFields is a list of field names (e.g. "DockerCacheHit") to 1698 // include in API requests with the JSON null value. By default, fields 1699 // with empty values are omitted from API requests. However, any field 1700 // with an empty value appearing in NullFields will be sent to the 1701 // server as null. It is an error if a field in this list has a 1702 // non-empty value. This may be used to include null fields in Patch 1703 // requests. 1704 NullFields []string `json:"-"` 1705} 1706 1707func (s *GoogleDevtoolsRemotebuildbotCommandEvents) MarshalJSON() ([]byte, error) { 1708 type NoMethod GoogleDevtoolsRemotebuildbotCommandEvents 1709 raw := NoMethod(*s) 1710 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1711} 1712 1713func (s *GoogleDevtoolsRemotebuildbotCommandEvents) UnmarshalJSON(data []byte) error { 1714 type NoMethod GoogleDevtoolsRemotebuildbotCommandEvents 1715 var s1 struct { 1716 InputCacheMiss gensupport.JSONFloat64 `json:"inputCacheMiss"` 1717 *NoMethod 1718 } 1719 s1.NoMethod = (*NoMethod)(s) 1720 if err := json.Unmarshal(data, &s1); err != nil { 1721 return err 1722 } 1723 s.InputCacheMiss = float64(s1.InputCacheMiss) 1724 return nil 1725} 1726 1727// GoogleDevtoolsRemotebuildbotCommandStatus: The internal status of the 1728// command result. 1729type GoogleDevtoolsRemotebuildbotCommandStatus struct { 1730 // Code: The status code. 1731 // 1732 // Possible values: 1733 // "OK" - The command succeeded. 1734 // "INVALID_ARGUMENT" - The command input was invalid. 1735 // "DEADLINE_EXCEEDED" - The command had passed its expiry time while 1736 // it was still running. 1737 // "NOT_FOUND" - The resources requested by the command were not 1738 // found. 1739 // "PERMISSION_DENIED" - The command failed due to permission errors. 1740 // "INTERNAL" - The command failed because of some invariants expected 1741 // by the underlying 1742 // system have been broken. This usually indicates a bug wit the system. 1743 // "ABORTED" - The command was aborted. 1744 // "CLEANUP_ERROR" - The bot failed to do the cleanup, e.g. unable to 1745 // delete the command 1746 // working directory or the command process. 1747 // "DOWNLOAD_INPUTS_ERROR" - The bot failed to download the inputs. 1748 // "UNKNOWN" - Unknown error. 1749 // "UPLOAD_OUTPUTS_ERROR" - The bot failed to upload the outputs. 1750 // "DOCKER_LOGIN_ERROR" - The bot failed to login to docker. 1751 // "DOCKER_IMAGE_PULL_ERROR" - The bot failed to pull docker image. 1752 // "DOCKER_IMAGE_EXIST_ERROR" - The bot failed to check docker images. 1753 // "DUPLICATE_INPUTS" - The inputs contain duplicate files. 1754 // "DOCKER_IMAGE_PERMISSION_DENIED" - The bot doesn't have the 1755 // permissions to pull docker images. 1756 // "DOCKER_IMAGE_NOT_FOUND" - The docker image cannot be found. 1757 // "WORKING_DIR_NOT_FOUND" - Working directory is not found. 1758 // "WORKING_DIR_NOT_IN_BASE_DIR" - Working directory is not under the 1759 // base directory 1760 // "DOCKER_UNAVAILABLE" - There are issues with docker 1761 // service/runtime. 1762 Code string `json:"code,omitempty"` 1763 1764 // Message: The error message. 1765 Message string `json:"message,omitempty"` 1766 1767 // ForceSendFields is a list of field names (e.g. "Code") to 1768 // unconditionally include in API requests. By default, fields with 1769 // empty values are omitted from API requests. However, any non-pointer, 1770 // non-interface field appearing in ForceSendFields will be sent to the 1771 // server regardless of whether the field is empty or not. This may be 1772 // used to include empty fields in Patch requests. 1773 ForceSendFields []string `json:"-"` 1774 1775 // NullFields is a list of field names (e.g. "Code") 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 1784func (s *GoogleDevtoolsRemotebuildbotCommandStatus) MarshalJSON() ([]byte, error) { 1785 type NoMethod GoogleDevtoolsRemotebuildbotCommandStatus 1786 raw := NoMethod(*s) 1787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1788} 1789 1790// GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig: 1791// AcceleratorConfig defines the accelerator cards to attach to the VM. 1792type GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig struct { 1793 // AcceleratorCount: The number of guest accelerator cards exposed to 1794 // each VM. 1795 AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` 1796 1797 // AcceleratorType: The type of accelerator to attach to each VM, e.g. 1798 // "nvidia-tesla-k80" for 1799 // nVidia Tesla K80. 1800 AcceleratorType string `json:"acceleratorType,omitempty"` 1801 1802 // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to 1803 // unconditionally include in API requests. By default, fields with 1804 // empty values are omitted from API requests. However, any non-pointer, 1805 // non-interface field appearing in ForceSendFields will be sent to the 1806 // server regardless of whether the field is empty or not. This may be 1807 // used to include empty fields in Patch requests. 1808 ForceSendFields []string `json:"-"` 1809 1810 // NullFields is a list of field names (e.g. "AcceleratorCount") to 1811 // include in API requests with the JSON null value. By default, fields 1812 // with empty values are omitted from API requests. However, any field 1813 // with an empty value appearing in NullFields will be sent to the 1814 // server as null. It is an error if a field in this list has a 1815 // non-empty value. This may be used to include null fields in Patch 1816 // requests. 1817 NullFields []string `json:"-"` 1818} 1819 1820func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig) MarshalJSON() ([]byte, error) { 1821 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig 1822 raw := NoMethod(*s) 1823 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1824} 1825 1826// GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest: 1827// The request used for `CreateInstance`. 1828type GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest struct { 1829 // Instance: Specifies the instance to create. 1830 // The name in the instance, if specified in the instance, is ignored. 1831 Instance *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance `json:"instance,omitempty"` 1832 1833 // InstanceId: ID of the created instance. 1834 // A valid `instance_id` must: 1835 // be 6-50 characters long, 1836 // contain only lowercase letters, digits, hyphens and 1837 // underscores, 1838 // start with a lowercase letter, and 1839 // end with a lowercase letter or a digit. 1840 InstanceId string `json:"instanceId,omitempty"` 1841 1842 // Parent: Resource name of the project containing the instance. 1843 // Format: `projects/[PROJECT_ID]`. 1844 Parent string `json:"parent,omitempty"` 1845 1846 // ForceSendFields is a list of field names (e.g. "Instance") to 1847 // unconditionally include in API requests. By default, fields with 1848 // empty values are omitted from API requests. However, any non-pointer, 1849 // non-interface field appearing in ForceSendFields will be sent to the 1850 // server regardless of whether the field is empty or not. This may be 1851 // used to include empty fields in Patch requests. 1852 ForceSendFields []string `json:"-"` 1853 1854 // NullFields is a list of field names (e.g. "Instance") to include in 1855 // API requests with the JSON null value. By default, fields with empty 1856 // values are omitted from API requests. However, any field with an 1857 // empty value appearing in NullFields will be sent to the server as 1858 // null. It is an error if a field in this list has a non-empty value. 1859 // This may be used to include null fields in Patch requests. 1860 NullFields []string `json:"-"` 1861} 1862 1863func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest) MarshalJSON() ([]byte, error) { 1864 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest 1865 raw := NoMethod(*s) 1866 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1867} 1868 1869// GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest: 1870// The request used for `CreateWorkerPool`. 1871type GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest struct { 1872 // Parent: Resource name of the instance in which to create the new 1873 // worker pool. 1874 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 1875 Parent string `json:"parent,omitempty"` 1876 1877 // PoolId: ID of the created worker pool. 1878 // A valid pool ID must: 1879 // be 6-50 characters long, 1880 // contain only lowercase letters, digits, hyphens and 1881 // underscores, 1882 // start with a lowercase letter, and 1883 // end with a lowercase letter or a digit. 1884 PoolId string `json:"poolId,omitempty"` 1885 1886 // WorkerPool: Specifies the worker pool to create. 1887 // The name in the worker pool, if specified, is ignored. 1888 WorkerPool *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPool,omitempty"` 1889 1890 // ForceSendFields is a list of field names (e.g. "Parent") to 1891 // unconditionally include in API requests. By default, fields with 1892 // empty values are omitted from API requests. However, any non-pointer, 1893 // non-interface field appearing in ForceSendFields will be sent to the 1894 // server regardless of whether the field is empty or not. This may be 1895 // used to include empty fields in Patch requests. 1896 ForceSendFields []string `json:"-"` 1897 1898 // NullFields is a list of field names (e.g. "Parent") to include in API 1899 // requests with the JSON null value. By default, fields with empty 1900 // values are omitted from API requests. However, any field with an 1901 // empty value appearing in NullFields will be sent to the server as 1902 // null. It is an error if a field in this list has a non-empty value. 1903 // This may be used to include null fields in Patch requests. 1904 NullFields []string `json:"-"` 1905} 1906 1907func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest) MarshalJSON() ([]byte, error) { 1908 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest 1909 raw := NoMethod(*s) 1910 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1911} 1912 1913// GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest: 1914// The request used for `DeleteInstance`. 1915type GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest struct { 1916 // Name: Name of the instance to delete. 1917 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 1918 Name string `json:"name,omitempty"` 1919 1920 // ForceSendFields is a list of field names (e.g. "Name") to 1921 // unconditionally include in API requests. By default, fields with 1922 // empty values are omitted from API requests. However, any non-pointer, 1923 // non-interface field appearing in ForceSendFields will be sent to the 1924 // server regardless of whether the field is empty or not. This may be 1925 // used to include empty fields in Patch requests. 1926 ForceSendFields []string `json:"-"` 1927 1928 // NullFields is a list of field names (e.g. "Name") to include in API 1929 // requests with the JSON null value. By default, fields with empty 1930 // values are omitted from API requests. However, any field with an 1931 // empty value appearing in NullFields will be sent to the server as 1932 // null. It is an error if a field in this list has a non-empty value. 1933 // This may be used to include null fields in Patch requests. 1934 NullFields []string `json:"-"` 1935} 1936 1937func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest) MarshalJSON() ([]byte, error) { 1938 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest 1939 raw := NoMethod(*s) 1940 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1941} 1942 1943// GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest: 1944// The request used for DeleteWorkerPool. 1945type GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest struct { 1946 // Name: Name of the worker pool to 1947 // delete. 1948 // Format: 1949 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerp 1950 // ools/[POOL_ID]`. 1951 Name string `json:"name,omitempty"` 1952 1953 // ForceSendFields is a list of field names (e.g. "Name") to 1954 // unconditionally include in API requests. By default, fields with 1955 // empty values are omitted from API requests. However, any non-pointer, 1956 // non-interface field appearing in ForceSendFields will be sent to the 1957 // server regardless of whether the field is empty or not. This may be 1958 // used to include empty fields in Patch requests. 1959 ForceSendFields []string `json:"-"` 1960 1961 // NullFields is a list of field names (e.g. "Name") to include in API 1962 // requests with the JSON null value. By default, fields with empty 1963 // values are omitted from API requests. However, any field with an 1964 // empty value appearing in NullFields will be sent to the server as 1965 // null. It is an error if a field in this list has a non-empty value. 1966 // This may be used to include null fields in Patch requests. 1967 NullFields []string `json:"-"` 1968} 1969 1970func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest) MarshalJSON() ([]byte, error) { 1971 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest 1972 raw := NoMethod(*s) 1973 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1974} 1975 1976// GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest: The 1977// request used for `GetInstance`. 1978type GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest struct { 1979 // Name: Name of the instance to retrieve. 1980 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 1981 Name string `json:"name,omitempty"` 1982 1983 // ForceSendFields is a list of field names (e.g. "Name") to 1984 // unconditionally include in API requests. By default, fields with 1985 // empty values are omitted from API requests. However, any non-pointer, 1986 // non-interface field appearing in ForceSendFields will be sent to the 1987 // server regardless of whether the field is empty or not. This may be 1988 // used to include empty fields in Patch requests. 1989 ForceSendFields []string `json:"-"` 1990 1991 // NullFields is a list of field names (e.g. "Name") to include in API 1992 // requests with the JSON null value. By default, fields with empty 1993 // values are omitted from API requests. However, any field with an 1994 // empty value appearing in NullFields will be sent to the server as 1995 // null. It is an error if a field in this list has a non-empty value. 1996 // This may be used to include null fields in Patch requests. 1997 NullFields []string `json:"-"` 1998} 1999 2000func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest) MarshalJSON() ([]byte, error) { 2001 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest 2002 raw := NoMethod(*s) 2003 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2004} 2005 2006// GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest: 2007// The request used for GetWorkerPool. 2008type GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest struct { 2009 // Name: Name of the worker pool to 2010 // retrieve. 2011 // Format: 2012 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/worke 2013 // rpools/[POOL_ID]`. 2014 Name string `json:"name,omitempty"` 2015 2016 // ForceSendFields is a list of field names (e.g. "Name") to 2017 // unconditionally include in API requests. By default, fields with 2018 // empty values are omitted from API requests. However, any non-pointer, 2019 // non-interface field appearing in ForceSendFields will be sent to the 2020 // server regardless of whether the field is empty or not. This may be 2021 // used to include empty fields in Patch requests. 2022 ForceSendFields []string `json:"-"` 2023 2024 // NullFields is a list of field names (e.g. "Name") to include in API 2025 // requests with the JSON null value. By default, fields with empty 2026 // values are omitted from API requests. However, any field with an 2027 // empty value appearing in NullFields will be sent to the server as 2028 // null. It is an error if a field in this list has a non-empty value. 2029 // This may be used to include null fields in Patch requests. 2030 NullFields []string `json:"-"` 2031} 2032 2033func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2034 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest 2035 raw := NoMethod(*s) 2036 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2037} 2038 2039// GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance: Instance 2040// conceptually encapsulates all Remote Build Execution resources 2041// for remote builds. 2042// An instance consists of storage and compute resources (for 2043// example, 2044// `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used 2045// for 2046// running remote builds. 2047// All Remote Build Execution API calls are scoped to an instance. 2048type GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance struct { 2049 // Location: The location is a GCP region. Currently only `us-central1` 2050 // is supported. 2051 Location string `json:"location,omitempty"` 2052 2053 // LoggingEnabled: Output only. Whether stack driver logging is enabled 2054 // for the instance. 2055 LoggingEnabled bool `json:"loggingEnabled,omitempty"` 2056 2057 // Name: Output only. Instance resource name formatted 2058 // as: 2059 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2060 // Name should not be populated when creating an instance since it is 2061 // provided 2062 // in the `instance_id` field. 2063 Name string `json:"name,omitempty"` 2064 2065 // State: Output only. State of the instance. 2066 // 2067 // Possible values: 2068 // "STATE_UNSPECIFIED" - Not a valid state, but the default value of 2069 // the enum. 2070 // "CREATING" - The instance is in state `CREATING` once 2071 // `CreateInstance` is called and 2072 // before the instance is ready for use. 2073 // "RUNNING" - The instance is in state `RUNNING` when it is ready for 2074 // use. 2075 // "INACTIVE" - An `INACTIVE` instance indicates that there is a 2076 // problem that needs to be 2077 // fixed. Such instances cannot be used for execution and instances 2078 // that 2079 // remain in this state for a significant period of time will be 2080 // removed 2081 // permanently. 2082 State string `json:"state,omitempty"` 2083 2084 // ServerResponse contains the HTTP response code and headers from the 2085 // server. 2086 googleapi.ServerResponse `json:"-"` 2087 2088 // ForceSendFields is a list of field names (e.g. "Location") to 2089 // unconditionally include in API requests. By default, fields with 2090 // empty values are omitted from API requests. However, any non-pointer, 2091 // non-interface field appearing in ForceSendFields will be sent to the 2092 // server regardless of whether the field is empty or not. This may be 2093 // used to include empty fields in Patch requests. 2094 ForceSendFields []string `json:"-"` 2095 2096 // NullFields is a list of field names (e.g. "Location") to include in 2097 // API requests with the JSON null value. By default, fields with empty 2098 // values are omitted from API requests. However, any field with an 2099 // empty value appearing in NullFields will be sent to the server as 2100 // null. It is an error if a field in this list has a non-empty value. 2101 // This may be used to include null fields in Patch requests. 2102 NullFields []string `json:"-"` 2103} 2104 2105func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance) MarshalJSON() ([]byte, error) { 2106 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance 2107 raw := NoMethod(*s) 2108 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2109} 2110 2111type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest struct { 2112 // Parent: Resource name of the project. 2113 // Format: `projects/[PROJECT_ID]`. 2114 Parent string `json:"parent,omitempty"` 2115 2116 // ForceSendFields is a list of field names (e.g. "Parent") to 2117 // unconditionally include in API requests. By default, fields with 2118 // empty values are omitted from API requests. However, any non-pointer, 2119 // non-interface field appearing in ForceSendFields will be sent to the 2120 // server regardless of whether the field is empty or not. This may be 2121 // used to include empty fields in Patch requests. 2122 ForceSendFields []string `json:"-"` 2123 2124 // NullFields is a list of field names (e.g. "Parent") to include in API 2125 // requests with the JSON null value. By default, fields with empty 2126 // values are omitted from API requests. However, any field with an 2127 // empty value appearing in NullFields will be sent to the server as 2128 // null. It is an error if a field in this list has a non-empty value. 2129 // This may be used to include null fields in Patch requests. 2130 NullFields []string `json:"-"` 2131} 2132 2133func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest) MarshalJSON() ([]byte, error) { 2134 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest 2135 raw := NoMethod(*s) 2136 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2137} 2138 2139type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse struct { 2140 // Instances: The list of instances in a given project. 2141 Instances []*GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance `json:"instances,omitempty"` 2142 2143 // ServerResponse contains the HTTP response code and headers from the 2144 // server. 2145 googleapi.ServerResponse `json:"-"` 2146 2147 // ForceSendFields is a list of field names (e.g. "Instances") to 2148 // unconditionally include in API requests. By default, fields with 2149 // empty values are omitted from API requests. However, any non-pointer, 2150 // non-interface field appearing in ForceSendFields will be sent to the 2151 // server regardless of whether the field is empty or not. This may be 2152 // used to include empty fields in Patch requests. 2153 ForceSendFields []string `json:"-"` 2154 2155 // NullFields is a list of field names (e.g. "Instances") to include in 2156 // API requests with the JSON null value. By default, fields with empty 2157 // values are omitted from API requests. However, any field with an 2158 // empty value appearing in NullFields will be sent to the server as 2159 // null. It is an error if a field in this list has a non-empty value. 2160 // This may be used to include null fields in Patch requests. 2161 NullFields []string `json:"-"` 2162} 2163 2164func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse) MarshalJSON() ([]byte, error) { 2165 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse 2166 raw := NoMethod(*s) 2167 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2168} 2169 2170type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest struct { 2171 // Filter: Optional. A filter expression that filters resources listed 2172 // in 2173 // the response. The expression must specify the field name, a 2174 // comparison 2175 // operator, and the value that you want to use for filtering. The 2176 // value 2177 // must be a string, a number, or a boolean. String values 2178 // are 2179 // case-insensitive. 2180 // The comparison operator must be either `:`, `=`, `!=`, `>`, `>=`, 2181 // `<=` or 2182 // `<`. 2183 // The `:` operator can be used with string fields to match 2184 // substrings. 2185 // For non-string fields it is equivalent to the `=` operator. 2186 // The `:*` comparison can be used to test whether a key has been 2187 // defined. 2188 // 2189 // You can also filter on nested fields. 2190 // 2191 // To filter on multiple expressions, you can separate expression 2192 // using 2193 // `AND` and `OR` operators, using parentheses to specify precedence. 2194 // If 2195 // neither operator is specified, `AND` is assumed. 2196 // 2197 // Examples: 2198 // 2199 // Include only pools with more than 100 reserved 2200 // workers: 2201 // `(worker_count > 100) (worker_config.reserved = true)` 2202 // 2203 // Include only pools with a certain label or machines of the 2204 // n1-standard 2205 // family: 2206 // `worker_config.labels.key1 : * OR worker_config.machine_type: 2207 // n1-standard` 2208 Filter string `json:"filter,omitempty"` 2209 2210 // Parent: Resource name of the instance. 2211 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2212 Parent string `json:"parent,omitempty"` 2213 2214 // ForceSendFields is a list of field names (e.g. "Filter") to 2215 // unconditionally include in API requests. By default, fields with 2216 // empty values are omitted from API requests. However, any non-pointer, 2217 // non-interface field appearing in ForceSendFields will be sent to the 2218 // server regardless of whether the field is empty or not. This may be 2219 // used to include empty fields in Patch requests. 2220 ForceSendFields []string `json:"-"` 2221 2222 // NullFields is a list of field names (e.g. "Filter") to include in API 2223 // requests with the JSON null value. By default, fields with empty 2224 // values are omitted from API requests. However, any field with an 2225 // empty value appearing in NullFields will be sent to the server as 2226 // null. It is an error if a field in this list has a non-empty value. 2227 // This may be used to include null fields in Patch requests. 2228 NullFields []string `json:"-"` 2229} 2230 2231func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest) MarshalJSON() ([]byte, error) { 2232 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest 2233 raw := NoMethod(*s) 2234 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2235} 2236 2237type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse struct { 2238 // WorkerPools: The list of worker pools in a given instance. 2239 WorkerPools []*GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPools,omitempty"` 2240 2241 // ServerResponse contains the HTTP response code and headers from the 2242 // server. 2243 googleapi.ServerResponse `json:"-"` 2244 2245 // ForceSendFields is a list of field names (e.g. "WorkerPools") to 2246 // unconditionally include in API requests. By default, fields with 2247 // empty values are omitted from API requests. However, any non-pointer, 2248 // non-interface field appearing in ForceSendFields will be sent to the 2249 // server regardless of whether the field is empty or not. This may be 2250 // used to include empty fields in Patch requests. 2251 ForceSendFields []string `json:"-"` 2252 2253 // NullFields is a list of field names (e.g. "WorkerPools") to include 2254 // in API requests with the JSON null value. By default, fields with 2255 // empty values are omitted from API requests. However, any field with 2256 // an empty value appearing in NullFields will be sent to the server as 2257 // null. It is an error if a field in this list has a non-empty value. 2258 // This may be used to include null fields in Patch requests. 2259 NullFields []string `json:"-"` 2260} 2261 2262func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse) MarshalJSON() ([]byte, error) { 2263 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse 2264 raw := NoMethod(*s) 2265 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2266} 2267 2268// GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest: 2269// The request used for UpdateWorkerPool. 2270type GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest struct { 2271 // UpdateMask: The update mask applies to worker_pool. For the 2272 // `FieldMask` 2273 // definition, 2274 // see 2275 // https://developers.google.com/protocol-buffers/docs/re 2276 // ference/google.protobuf#fieldmask 2277 // If an empty update_mask is provided, only the non-default valued 2278 // field in 2279 // the worker pool field will be updated. Note that in order to update a 2280 // field 2281 // to the default value (zero, false, empty string) an explicit 2282 // update_mask 2283 // must be provided. 2284 UpdateMask string `json:"updateMask,omitempty"` 2285 2286 // WorkerPool: Specifies the worker pool to update. 2287 WorkerPool *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPool,omitempty"` 2288 2289 // ForceSendFields is a list of field names (e.g. "UpdateMask") to 2290 // unconditionally include in API requests. By default, fields with 2291 // empty values are omitted from API requests. However, any non-pointer, 2292 // non-interface field appearing in ForceSendFields will be sent to the 2293 // server regardless of whether the field is empty or not. This may be 2294 // used to include empty fields in Patch requests. 2295 ForceSendFields []string `json:"-"` 2296 2297 // NullFields is a list of field names (e.g. "UpdateMask") to include in 2298 // API requests with the JSON null value. By default, fields with empty 2299 // values are omitted from API requests. However, any field with an 2300 // empty value appearing in NullFields will be sent to the server as 2301 // null. It is an error if a field in this list has a non-empty value. 2302 // This may be used to include null fields in Patch requests. 2303 NullFields []string `json:"-"` 2304} 2305 2306func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2307 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest 2308 raw := NoMethod(*s) 2309 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2310} 2311 2312// GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig: Defines 2313// the configuration to be used for a creating workers in 2314// the worker pool. 2315type GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig struct { 2316 // Accelerator: The accelerator card attached to each VM. 2317 Accelerator *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig `json:"accelerator,omitempty"` 2318 2319 // DiskSizeGb: Required. Size of the disk attached to the worker, in 2320 // GB. 2321 // See https://cloud.google.com/compute/docs/disks/ 2322 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 2323 2324 // DiskType: Required. Disk Type to use for the worker. 2325 // See 2326 // [Storage 2327 // options](https://cloud.google.com/compute/docs/disks/#introdu 2328 // ction). 2329 // Currently only `pd-standard` is supported. 2330 DiskType string `json:"diskType,omitempty"` 2331 2332 // Labels: Labels associated with the workers. 2333 // Label keys and values can be no longer than 63 characters, can only 2334 // contain 2335 // lowercase letters, numeric characters, underscores and 2336 // dashes. 2337 // International letters are permitted. Label keys must start with a 2338 // letter. 2339 // Label values are optional. 2340 // There can not be more than 64 labels per resource. 2341 Labels map[string]string `json:"labels,omitempty"` 2342 2343 // MachineType: Required. Machine type of the worker, such as 2344 // `n1-standard-2`. 2345 // See https://cloud.google.com/compute/docs/machine-types for a list 2346 // of 2347 // supported machine types. Note that `f1-micro` and `g1-small` are not 2348 // yet 2349 // supported. 2350 MachineType string `json:"machineType,omitempty"` 2351 2352 // MinCpuPlatform: Minimum CPU platform to use when creating the 2353 // worker. 2354 // See [CPU 2355 // Platforms](https://cloud.google.com/compute/docs/cpu-platforms). 2356 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 2357 2358 // NetworkAccess: Determines the type of network access granted to 2359 // workers. Possible values: 2360 // 2361 // - "public": Workers can connect to the public internet. 2362 // - "private": Workers can only connect to Google APIs and services. 2363 // - "restricted-private": Workers can only connect to Google APIs that 2364 // are 2365 // reachable through `restricted.googleapis.com` (`199.36.153.4/30`). 2366 NetworkAccess string `json:"networkAccess,omitempty"` 2367 2368 // Reserved: Determines whether the worker is reserved (equivalent to a 2369 // Compute Engine 2370 // on-demand VM and therefore won't be preempted). 2371 // See [Preemptible VMs](https://cloud.google.com/preemptible-vms/) for 2372 // more 2373 // details. 2374 Reserved bool `json:"reserved,omitempty"` 2375 2376 // ForceSendFields is a list of field names (e.g. "Accelerator") to 2377 // unconditionally include in API requests. By default, fields with 2378 // empty values are omitted from API requests. However, any non-pointer, 2379 // non-interface field appearing in ForceSendFields will be sent to the 2380 // server regardless of whether the field is empty or not. This may be 2381 // used to include empty fields in Patch requests. 2382 ForceSendFields []string `json:"-"` 2383 2384 // NullFields is a list of field names (e.g. "Accelerator") to include 2385 // in API requests with the JSON null value. By default, fields with 2386 // empty values are omitted from API requests. However, any field with 2387 // an empty value appearing in NullFields will be sent to the server as 2388 // null. It is an error if a field in this list has a non-empty value. 2389 // This may be used to include null fields in Patch requests. 2390 NullFields []string `json:"-"` 2391} 2392 2393func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig) MarshalJSON() ([]byte, error) { 2394 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig 2395 raw := NoMethod(*s) 2396 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2397} 2398 2399// GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool: A worker 2400// pool resource in the Remote Build Execution API. 2401type GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool struct { 2402 // Name: WorkerPool resource name formatted 2403 // as: 2404 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_I 2405 // D]`. 2406 // name should not be populated when creating a worker pool since it 2407 // is 2408 // provided in the `poolId` field. 2409 Name string `json:"name,omitempty"` 2410 2411 // State: Output only. State of the worker pool. 2412 // 2413 // Possible values: 2414 // "STATE_UNSPECIFIED" - Not a valid state, but the default value of 2415 // the enum. 2416 // "CREATING" - The worker pool is in state `CREATING` once 2417 // `CreateWorkerPool` is called 2418 // and before all requested workers are ready. 2419 // "RUNNING" - The worker pool is in state `RUNNING` when all its 2420 // workers are ready for 2421 // use. 2422 // "UPDATING" - The worker pool is in state `UPDATING` once 2423 // `UpdateWorkerPool` is called 2424 // and before the new configuration has all the requested workers ready 2425 // for 2426 // use, and no older configuration has any workers. At that point the 2427 // state 2428 // transitions to `RUNNING`. 2429 // "DELETING" - The worker pool is in state `DELETING` once the 2430 // `Delete` method is called 2431 // and before the deletion completes. 2432 // "INACTIVE" - The worker pool is in state `INACTIVE` when the 2433 // instance hosting the 2434 // worker pool in not running. 2435 State string `json:"state,omitempty"` 2436 2437 // WorkerConfig: Specifies the properties, such as machine type and disk 2438 // size, used for 2439 // creating workers in a worker pool. 2440 WorkerConfig *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig `json:"workerConfig,omitempty"` 2441 2442 // WorkerCount: The desired number of workers in the worker pool. Must 2443 // be a value between 2444 // 0 and 1000. 2445 WorkerCount int64 `json:"workerCount,omitempty,string"` 2446 2447 // ServerResponse contains the HTTP response code and headers from the 2448 // server. 2449 googleapi.ServerResponse `json:"-"` 2450 2451 // ForceSendFields is a list of field names (e.g. "Name") to 2452 // unconditionally include in API requests. By default, fields with 2453 // empty values are omitted from API requests. However, any non-pointer, 2454 // non-interface field appearing in ForceSendFields will be sent to the 2455 // server regardless of whether the field is empty or not. This may be 2456 // used to include empty fields in Patch requests. 2457 ForceSendFields []string `json:"-"` 2458 2459 // NullFields is a list of field names (e.g. "Name") to include in API 2460 // requests with the JSON null value. By default, fields with empty 2461 // values are omitted from API requests. However, any field with an 2462 // empty value appearing in NullFields will be sent to the server as 2463 // null. It is an error if a field in this list has a non-empty value. 2464 // This may be used to include null fields in Patch requests. 2465 NullFields []string `json:"-"` 2466} 2467 2468func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool) MarshalJSON() ([]byte, error) { 2469 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool 2470 raw := NoMethod(*s) 2471 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2472} 2473 2474// GoogleDevtoolsRemoteworkersV1test2AdminTemp: AdminTemp is a 2475// prelimiary set of administration tasks. It's called "Temp" 2476// because we do not yet know the best way to represent admin tasks; 2477// it's 2478// possible that this will be entirely replaced in later versions of 2479// this API. 2480// If this message proves to be sufficient, it will be renamed in the 2481// alpha or 2482// beta release of this API. 2483// 2484// This message (suitably marshalled into a protobuf.Any) can be used as 2485// the 2486// inline_assignment field in a lease; the lease assignment field should 2487// simply 2488// be "admin" in these cases. 2489// 2490// This message is heavily based on Swarming administration tasks from 2491// the LUCI 2492// project (http://github.com/luci/luci-py/appengine/swarming). 2493type GoogleDevtoolsRemoteworkersV1test2AdminTemp struct { 2494 // Arg: The argument to the admin action; see `Command` for semantics. 2495 Arg string `json:"arg,omitempty"` 2496 2497 // Command: The admin action; see `Command` for legal values. 2498 // 2499 // Possible values: 2500 // "UNSPECIFIED" - Illegal value. 2501 // "BOT_UPDATE" - Download and run a new version of the bot. `arg` 2502 // will be a resource 2503 // accessible via `ByteStream.Read` to obtain the new bot code. 2504 // "BOT_RESTART" - Restart the bot without downloading a new version. 2505 // `arg` will be a 2506 // message to log. 2507 // "BOT_TERMINATE" - Shut down the bot. `arg` will be a task resource 2508 // name (similar to those 2509 // in tasks.proto) that the bot can use to tell the server that it 2510 // is 2511 // terminating. 2512 // "HOST_RESTART" - Restart the host computer. `arg` will be a message 2513 // to log. 2514 Command string `json:"command,omitempty"` 2515 2516 // ForceSendFields is a list of field names (e.g. "Arg") to 2517 // unconditionally include in API requests. By default, fields with 2518 // empty values are omitted from API requests. However, any non-pointer, 2519 // non-interface field appearing in ForceSendFields will be sent to the 2520 // server regardless of whether the field is empty or not. This may be 2521 // used to include empty fields in Patch requests. 2522 ForceSendFields []string `json:"-"` 2523 2524 // NullFields is a list of field names (e.g. "Arg") to include in API 2525 // requests with the JSON null value. By default, fields with empty 2526 // values are omitted from API requests. However, any field with an 2527 // empty value appearing in NullFields will be sent to the server as 2528 // null. It is an error if a field in this list has a non-empty value. 2529 // This may be used to include null fields in Patch requests. 2530 NullFields []string `json:"-"` 2531} 2532 2533func (s *GoogleDevtoolsRemoteworkersV1test2AdminTemp) MarshalJSON() ([]byte, error) { 2534 type NoMethod GoogleDevtoolsRemoteworkersV1test2AdminTemp 2535 raw := NoMethod(*s) 2536 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2537} 2538 2539// GoogleDevtoolsRemoteworkersV1test2Blob: Describes a blob of binary 2540// content with its digest. 2541type GoogleDevtoolsRemoteworkersV1test2Blob struct { 2542 // Contents: The contents of the blob. 2543 Contents string `json:"contents,omitempty"` 2544 2545 // Digest: The digest of the blob. This should be verified by the 2546 // receiver. 2547 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 2548 2549 // ForceSendFields is a list of field names (e.g. "Contents") to 2550 // unconditionally include in API requests. By default, fields with 2551 // empty values are omitted from API requests. However, any non-pointer, 2552 // non-interface field appearing in ForceSendFields will be sent to the 2553 // server regardless of whether the field is empty or not. This may be 2554 // used to include empty fields in Patch requests. 2555 ForceSendFields []string `json:"-"` 2556 2557 // NullFields is a list of field names (e.g. "Contents") to include in 2558 // API requests with the JSON null value. By default, fields with empty 2559 // values are omitted from API requests. However, any field with an 2560 // empty value appearing in NullFields will be sent to the server as 2561 // null. It is an error if a field in this list has a non-empty value. 2562 // This may be used to include null fields in Patch requests. 2563 NullFields []string `json:"-"` 2564} 2565 2566func (s *GoogleDevtoolsRemoteworkersV1test2Blob) MarshalJSON() ([]byte, error) { 2567 type NoMethod GoogleDevtoolsRemoteworkersV1test2Blob 2568 raw := NoMethod(*s) 2569 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2570} 2571 2572// GoogleDevtoolsRemoteworkersV1test2CommandOutputs: DEPRECATED - use 2573// CommandResult instead. 2574// Describes the actual outputs from the task. 2575type GoogleDevtoolsRemoteworkersV1test2CommandOutputs struct { 2576 // ExitCode: exit_code is only fully reliable if the status' code is OK. 2577 // If the task 2578 // exceeded its deadline or was cancelled, the process may still produce 2579 // an 2580 // exit code as it is cancelled, and this will be populated, but a 2581 // successful 2582 // (zero) is unlikely to be correct unless the status code is OK. 2583 ExitCode int64 `json:"exitCode,omitempty"` 2584 2585 // Outputs: The output files. The blob referenced by the digest should 2586 // contain 2587 // one of the following (implementation-dependent): 2588 // * A marshalled DirectoryMetadata of the returned filesystem 2589 // * A LUCI-style .isolated file 2590 Outputs *GoogleDevtoolsRemoteworkersV1test2Digest `json:"outputs,omitempty"` 2591 2592 // ForceSendFields is a list of field names (e.g. "ExitCode") to 2593 // unconditionally include in API requests. By default, fields with 2594 // empty values are omitted from API requests. However, any non-pointer, 2595 // non-interface field appearing in ForceSendFields will be sent to the 2596 // server regardless of whether the field is empty or not. This may be 2597 // used to include empty fields in Patch requests. 2598 ForceSendFields []string `json:"-"` 2599 2600 // NullFields is a list of field names (e.g. "ExitCode") to include in 2601 // API requests with the JSON null value. By default, fields with empty 2602 // values are omitted from API requests. However, any field with an 2603 // empty value appearing in NullFields will be sent to the server as 2604 // null. It is an error if a field in this list has a non-empty value. 2605 // This may be used to include null fields in Patch requests. 2606 NullFields []string `json:"-"` 2607} 2608 2609func (s *GoogleDevtoolsRemoteworkersV1test2CommandOutputs) MarshalJSON() ([]byte, error) { 2610 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandOutputs 2611 raw := NoMethod(*s) 2612 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2613} 2614 2615// GoogleDevtoolsRemoteworkersV1test2CommandOverhead: DEPRECATED - use 2616// CommandResult instead. 2617// Can be used as part of CompleteRequest.metadata, or are part of a 2618// more 2619// sophisticated message. 2620type GoogleDevtoolsRemoteworkersV1test2CommandOverhead struct { 2621 // Duration: The elapsed time between calling Accept and Complete. The 2622 // server will also 2623 // have its own idea of what this should be, but this excludes the 2624 // overhead of 2625 // the RPCs and the bot response time. 2626 Duration string `json:"duration,omitempty"` 2627 2628 // Overhead: The amount of time *not* spent executing the command 2629 // (ie 2630 // uploading/downloading files). 2631 Overhead string `json:"overhead,omitempty"` 2632 2633 // ForceSendFields is a list of field names (e.g. "Duration") to 2634 // unconditionally include in API requests. By default, fields with 2635 // empty values are omitted from API requests. However, any non-pointer, 2636 // non-interface field appearing in ForceSendFields will be sent to the 2637 // server regardless of whether the field is empty or not. This may be 2638 // used to include empty fields in Patch requests. 2639 ForceSendFields []string `json:"-"` 2640 2641 // NullFields is a list of field names (e.g. "Duration") to include in 2642 // API requests with the JSON null value. By default, fields with empty 2643 // values are omitted from API requests. However, any field with an 2644 // empty value appearing in NullFields will be sent to the server as 2645 // null. It is an error if a field in this list has a non-empty value. 2646 // This may be used to include null fields in Patch requests. 2647 NullFields []string `json:"-"` 2648} 2649 2650func (s *GoogleDevtoolsRemoteworkersV1test2CommandOverhead) MarshalJSON() ([]byte, error) { 2651 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandOverhead 2652 raw := NoMethod(*s) 2653 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2654} 2655 2656// GoogleDevtoolsRemoteworkersV1test2CommandResult: All information 2657// about the execution of a command, suitable for providing as 2658// the Bots interface's `Lease.result` field. 2659type GoogleDevtoolsRemoteworkersV1test2CommandResult struct { 2660 // Duration: The elapsed time between calling Accept and Complete. The 2661 // server will also 2662 // have its own idea of what this should be, but this excludes the 2663 // overhead of 2664 // the RPCs and the bot response time. 2665 Duration string `json:"duration,omitempty"` 2666 2667 // ExitCode: The exit code of the process. An exit code of "0" should 2668 // only be trusted if 2669 // `status` has a code of OK (otherwise it may simply be unset). 2670 ExitCode int64 `json:"exitCode,omitempty"` 2671 2672 // Metadata: Implementation-dependent metadata about the task. Both 2673 // servers and bots 2674 // may define messages which can be encoded here; bots are free to 2675 // provide 2676 // metadata in multiple formats, and servers are free to choose one or 2677 // more 2678 // of the values to process and ignore others. In particular, it is 2679 // *not* 2680 // considered an error for the bot to provide the server with a field 2681 // that it 2682 // doesn't know about. 2683 Metadata []googleapi.RawMessage `json:"metadata,omitempty"` 2684 2685 // Outputs: The output files. The blob referenced by the digest should 2686 // contain 2687 // one of the following (implementation-dependent): 2688 // * A marshalled DirectoryMetadata of the returned filesystem 2689 // * A LUCI-style .isolated file 2690 Outputs *GoogleDevtoolsRemoteworkersV1test2Digest `json:"outputs,omitempty"` 2691 2692 // Overhead: The amount of time *not* spent executing the command 2693 // (ie 2694 // uploading/downloading files). 2695 Overhead string `json:"overhead,omitempty"` 2696 2697 // Status: An overall status for the command. For example, if the 2698 // command timed out, 2699 // this might have a code of DEADLINE_EXCEEDED; if it was killed by the 2700 // OS for 2701 // memory exhaustion, it might have a code of RESOURCE_EXHAUSTED. 2702 Status *GoogleRpcStatus `json:"status,omitempty"` 2703 2704 // ForceSendFields is a list of field names (e.g. "Duration") to 2705 // unconditionally include in API requests. By default, fields with 2706 // empty values are omitted from API requests. However, any non-pointer, 2707 // non-interface field appearing in ForceSendFields will be sent to the 2708 // server regardless of whether the field is empty or not. This may be 2709 // used to include empty fields in Patch requests. 2710 ForceSendFields []string `json:"-"` 2711 2712 // NullFields is a list of field names (e.g. "Duration") to include in 2713 // API requests with the JSON null value. By default, fields with empty 2714 // values are omitted from API requests. However, any field with an 2715 // empty value appearing in NullFields will be sent to the server as 2716 // null. It is an error if a field in this list has a non-empty value. 2717 // This may be used to include null fields in Patch requests. 2718 NullFields []string `json:"-"` 2719} 2720 2721func (s *GoogleDevtoolsRemoteworkersV1test2CommandResult) MarshalJSON() ([]byte, error) { 2722 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandResult 2723 raw := NoMethod(*s) 2724 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2725} 2726 2727// GoogleDevtoolsRemoteworkersV1test2CommandTask: Describes a 2728// shell-style task to execute, suitable for providing as the 2729// Bots 2730// interface's `Lease.payload` field. 2731type GoogleDevtoolsRemoteworkersV1test2CommandTask struct { 2732 // ExpectedOutputs: The expected outputs from the task. 2733 ExpectedOutputs *GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs `json:"expectedOutputs,omitempty"` 2734 2735 // Inputs: The inputs to the task. 2736 Inputs *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs `json:"inputs,omitempty"` 2737 2738 // Timeouts: The timeouts of this task. 2739 Timeouts *GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts `json:"timeouts,omitempty"` 2740 2741 // ForceSendFields is a list of field names (e.g. "ExpectedOutputs") to 2742 // unconditionally include in API requests. By default, fields with 2743 // empty values are omitted from API requests. However, any non-pointer, 2744 // non-interface field appearing in ForceSendFields will be sent to the 2745 // server regardless of whether the field is empty or not. This may be 2746 // used to include empty fields in Patch requests. 2747 ForceSendFields []string `json:"-"` 2748 2749 // NullFields is a list of field names (e.g. "ExpectedOutputs") to 2750 // include in API requests with the JSON null value. By default, fields 2751 // with empty values are omitted from API requests. However, any field 2752 // with an empty value appearing in NullFields will be sent to the 2753 // server as null. It is an error if a field in this list has a 2754 // non-empty value. This may be used to include null fields in Patch 2755 // requests. 2756 NullFields []string `json:"-"` 2757} 2758 2759func (s *GoogleDevtoolsRemoteworkersV1test2CommandTask) MarshalJSON() ([]byte, error) { 2760 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTask 2761 raw := NoMethod(*s) 2762 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2763} 2764 2765// GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs: Describes the 2766// inputs to a shell-style task. 2767type GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs struct { 2768 // Arguments: The command itself to run (e.g., argv). 2769 // 2770 // This field should be passed directly to the underlying operating 2771 // system, 2772 // and so it must be sensible to that operating system. For example, 2773 // on 2774 // Windows, the first argument might be "C:\Windows\System32\ping.exe" 2775 // - 2776 // that is, using drive letters and backslashes. A command for a 2777 // *nix 2778 // system, on the other hand, would use forward slashes. 2779 // 2780 // All other fields in the RWAPI must consistently use forward 2781 // slashes, 2782 // since those fields may be interpretted by both the service and the 2783 // bot. 2784 Arguments []string `json:"arguments,omitempty"` 2785 2786 // EnvironmentVariables: All environment variables required by the task. 2787 EnvironmentVariables []*GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable `json:"environmentVariables,omitempty"` 2788 2789 // Files: The input filesystem to be set up prior to the task beginning. 2790 // The 2791 // contents should be a repeated set of FileMetadata messages though 2792 // other 2793 // formats are allowed if better for the implementation (eg, a 2794 // LUCI-style 2795 // .isolated file). 2796 // 2797 // This field is repeated since implementations might want to cache 2798 // the 2799 // metadata, in which case it may be useful to break up portions of 2800 // the 2801 // filesystem that change frequently (eg, specific input files) from 2802 // those 2803 // that don't (eg, standard header files). 2804 Files []*GoogleDevtoolsRemoteworkersV1test2Digest `json:"files,omitempty"` 2805 2806 // InlineBlobs: Inline contents for blobs expected to be needed by the 2807 // bot to execute the 2808 // task. For example, contents of entries in `files` or blobs that 2809 // are 2810 // indirectly referenced by an entry there. 2811 // 2812 // The bot should check against this list before downloading required 2813 // task 2814 // inputs to reduce the number of communications between itself and 2815 // the 2816 // remote CAS server. 2817 InlineBlobs []*GoogleDevtoolsRemoteworkersV1test2Blob `json:"inlineBlobs,omitempty"` 2818 2819 // WorkingDirectory: Directory from which a command is executed. It is a 2820 // relative directory 2821 // with respect to the bot's working directory (i.e., "./"). If it 2822 // is 2823 // non-empty, then it must exist under "./". Otherwise, "./" will be 2824 // used. 2825 WorkingDirectory string `json:"workingDirectory,omitempty"` 2826 2827 // ForceSendFields is a list of field names (e.g. "Arguments") to 2828 // unconditionally include in API requests. By default, fields with 2829 // empty values are omitted from API requests. However, any non-pointer, 2830 // non-interface field appearing in ForceSendFields will be sent to the 2831 // server regardless of whether the field is empty or not. This may be 2832 // used to include empty fields in Patch requests. 2833 ForceSendFields []string `json:"-"` 2834 2835 // NullFields is a list of field names (e.g. "Arguments") to include in 2836 // API requests with the JSON null value. By default, fields with empty 2837 // values are omitted from API requests. However, any field with an 2838 // empty value appearing in NullFields will be sent to the server as 2839 // null. It is an error if a field in this list has a non-empty value. 2840 // This may be used to include null fields in Patch requests. 2841 NullFields []string `json:"-"` 2842} 2843 2844func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs) MarshalJSON() ([]byte, error) { 2845 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs 2846 raw := NoMethod(*s) 2847 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2848} 2849 2850// GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable 2851// : An environment variable required by this task. 2852type GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable struct { 2853 // Name: The envvar name. 2854 Name string `json:"name,omitempty"` 2855 2856 // Value: The envvar value. 2857 Value string `json:"value,omitempty"` 2858 2859 // ForceSendFields is a list of field names (e.g. "Name") to 2860 // unconditionally include in API requests. By default, fields with 2861 // empty values are omitted from API requests. However, any non-pointer, 2862 // non-interface field appearing in ForceSendFields will be sent to the 2863 // server regardless of whether the field is empty or not. This may be 2864 // used to include empty fields in Patch requests. 2865 ForceSendFields []string `json:"-"` 2866 2867 // NullFields is a list of field names (e.g. "Name") to include in API 2868 // requests with the JSON null value. By default, fields with empty 2869 // values are omitted from API requests. However, any field with an 2870 // empty value appearing in NullFields will be sent to the server as 2871 // null. It is an error if a field in this list has a non-empty value. 2872 // This may be used to include null fields in Patch requests. 2873 NullFields []string `json:"-"` 2874} 2875 2876func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable) MarshalJSON() ([]byte, error) { 2877 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable 2878 raw := NoMethod(*s) 2879 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2880} 2881 2882// GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs: Describes the 2883// expected outputs of the command. 2884type GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs struct { 2885 // Directories: A list of expected directories, relative to the 2886 // execution root. All paths 2887 // MUST be delimited by forward slashes. 2888 Directories []string `json:"directories,omitempty"` 2889 2890 // Files: A list of expected files, relative to the execution root. All 2891 // paths 2892 // MUST be delimited by forward slashes. 2893 Files []string `json:"files,omitempty"` 2894 2895 // StderrDestination: The destination to which any stderr should be 2896 // sent. The method by which 2897 // the bot should send the stream contents to that destination is 2898 // not 2899 // defined in this API. As examples, the destination could be a 2900 // file 2901 // referenced in the `files` field in this message, or it could be a 2902 // URI 2903 // that must be written via the ByteStream API. 2904 StderrDestination string `json:"stderrDestination,omitempty"` 2905 2906 // StdoutDestination: The destination to which any stdout should be 2907 // sent. The method by which 2908 // the bot should send the stream contents to that destination is 2909 // not 2910 // defined in this API. As examples, the destination could be a 2911 // file 2912 // referenced in the `files` field in this message, or it could be a 2913 // URI 2914 // that must be written via the ByteStream API. 2915 StdoutDestination string `json:"stdoutDestination,omitempty"` 2916 2917 // ForceSendFields is a list of field names (e.g. "Directories") to 2918 // unconditionally include in API requests. By default, fields with 2919 // empty values are omitted from API requests. However, any non-pointer, 2920 // non-interface field appearing in ForceSendFields will be sent to the 2921 // server regardless of whether the field is empty or not. This may be 2922 // used to include empty fields in Patch requests. 2923 ForceSendFields []string `json:"-"` 2924 2925 // NullFields is a list of field names (e.g. "Directories") to include 2926 // in API requests with the JSON null value. By default, fields with 2927 // empty values are omitted from API requests. However, any field with 2928 // an empty value appearing in NullFields will be sent to the server as 2929 // null. It is an error if a field in this list has a non-empty value. 2930 // This may be used to include null fields in Patch requests. 2931 NullFields []string `json:"-"` 2932} 2933 2934func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs) MarshalJSON() ([]byte, error) { 2935 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs 2936 raw := NoMethod(*s) 2937 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2938} 2939 2940// GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts: Describes the 2941// timeouts associated with this task. 2942type GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts struct { 2943 // Execution: This specifies the maximum time that the task can run, 2944 // excluding the 2945 // time required to download inputs or upload outputs. That is, the 2946 // worker 2947 // will terminate the task if it runs longer than this. 2948 Execution string `json:"execution,omitempty"` 2949 2950 // Idle: This specifies the maximum amount of time the task can be idle 2951 // - that is, 2952 // go without generating some output in either stdout or stderr. If 2953 // the 2954 // process is silent for more than the specified time, the worker 2955 // will 2956 // terminate the task. 2957 Idle string `json:"idle,omitempty"` 2958 2959 // Shutdown: If the execution or IO timeouts are exceeded, the worker 2960 // will try to 2961 // gracefully terminate the task and return any existing logs. 2962 // However, 2963 // tasks may be hard-frozen in which case this process will fail. 2964 // This 2965 // timeout specifies how long to wait for a terminated task to shut 2966 // down 2967 // gracefully (e.g. via SIGTERM) before we bring down the hammer 2968 // (e.g. 2969 // SIGKILL on *nix, CTRL_BREAK_EVENT on Windows). 2970 Shutdown string `json:"shutdown,omitempty"` 2971 2972 // ForceSendFields is a list of field names (e.g. "Execution") to 2973 // unconditionally include in API requests. By default, fields with 2974 // empty values are omitted from API requests. However, any non-pointer, 2975 // non-interface field appearing in ForceSendFields will be sent to the 2976 // server regardless of whether the field is empty or not. This may be 2977 // used to include empty fields in Patch requests. 2978 ForceSendFields []string `json:"-"` 2979 2980 // NullFields is a list of field names (e.g. "Execution") to include in 2981 // API requests with the JSON null value. By default, fields with empty 2982 // values are omitted from API requests. However, any field with an 2983 // empty value appearing in NullFields will be sent to the server as 2984 // null. It is an error if a field in this list has a non-empty value. 2985 // This may be used to include null fields in Patch requests. 2986 NullFields []string `json:"-"` 2987} 2988 2989func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts) MarshalJSON() ([]byte, error) { 2990 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts 2991 raw := NoMethod(*s) 2992 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2993} 2994 2995// GoogleDevtoolsRemoteworkersV1test2Digest: The CommandTask and 2996// CommandResult messages assume the existence of a service 2997// that can serve blobs of content, identified by a hash and size known 2998// as a 2999// "digest." The method by which these blobs may be retrieved is not 3000// specified 3001// here, but a model implementation is in the Remote Execution 3002// API's 3003// "ContentAddressibleStorage" interface. 3004// 3005// In the context of the RWAPI, a Digest will virtually always refer to 3006// the 3007// contents of a file or a directory. The latter is represented by 3008// the 3009// byte-encoded Directory message. 3010type GoogleDevtoolsRemoteworkersV1test2Digest struct { 3011 // Hash: A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, 3012 // 0x2b, 0x3c]) 3013 // using an implementation-defined hash algorithm (eg SHA-256). 3014 Hash string `json:"hash,omitempty"` 3015 3016 // SizeBytes: The size of the contents. While this is not strictly 3017 // required as part of an 3018 // identifier (after all, any given hash will have exactly one 3019 // canonical 3020 // size), it's useful in almost all cases when one might want to send 3021 // or 3022 // retrieve blobs of content and is included here for this reason. 3023 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 3024 3025 // ForceSendFields is a list of field names (e.g. "Hash") to 3026 // unconditionally include in API requests. By default, fields with 3027 // empty values are omitted from API requests. However, any non-pointer, 3028 // non-interface field appearing in ForceSendFields will be sent to the 3029 // server regardless of whether the field is empty or not. This may be 3030 // used to include empty fields in Patch requests. 3031 ForceSendFields []string `json:"-"` 3032 3033 // NullFields is a list of field names (e.g. "Hash") to include in API 3034 // requests with the JSON null value. By default, fields with empty 3035 // values are omitted from API requests. However, any field with an 3036 // empty value appearing in NullFields will be sent to the server as 3037 // null. It is an error if a field in this list has a non-empty value. 3038 // This may be used to include null fields in Patch requests. 3039 NullFields []string `json:"-"` 3040} 3041 3042func (s *GoogleDevtoolsRemoteworkersV1test2Digest) MarshalJSON() ([]byte, error) { 3043 type NoMethod GoogleDevtoolsRemoteworkersV1test2Digest 3044 raw := NoMethod(*s) 3045 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3046} 3047 3048// GoogleDevtoolsRemoteworkersV1test2Directory: The contents of a 3049// directory. Similar to the equivalent message in the Remote 3050// Execution API. 3051type GoogleDevtoolsRemoteworkersV1test2Directory struct { 3052 // Directories: Any subdirectories 3053 Directories []*GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata `json:"directories,omitempty"` 3054 3055 // Files: The files in this directory 3056 Files []*GoogleDevtoolsRemoteworkersV1test2FileMetadata `json:"files,omitempty"` 3057 3058 // ForceSendFields is a list of field names (e.g. "Directories") to 3059 // unconditionally include in API requests. By default, fields with 3060 // empty values are omitted from API requests. However, any non-pointer, 3061 // non-interface field appearing in ForceSendFields will be sent to the 3062 // server regardless of whether the field is empty or not. This may be 3063 // used to include empty fields in Patch requests. 3064 ForceSendFields []string `json:"-"` 3065 3066 // NullFields is a list of field names (e.g. "Directories") to include 3067 // in API requests with the JSON null value. By default, fields with 3068 // empty values are omitted from API requests. However, any field with 3069 // an empty value appearing in NullFields will be sent to the server as 3070 // null. It is an error if a field in this list has a non-empty value. 3071 // This may be used to include null fields in Patch requests. 3072 NullFields []string `json:"-"` 3073} 3074 3075func (s *GoogleDevtoolsRemoteworkersV1test2Directory) MarshalJSON() ([]byte, error) { 3076 type NoMethod GoogleDevtoolsRemoteworkersV1test2Directory 3077 raw := NoMethod(*s) 3078 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3079} 3080 3081// GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata: The metadata for 3082// a directory. Similar to the equivalent message in the 3083// Remote 3084// Execution API. 3085type GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata struct { 3086 // Digest: A pointer to the contents of the directory, in the form of a 3087 // marshalled 3088 // Directory message. 3089 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 3090 3091 // Path: The path of the directory, as in FileMetadata.path. 3092 Path string `json:"path,omitempty"` 3093 3094 // ForceSendFields is a list of field names (e.g. "Digest") to 3095 // unconditionally include in API requests. By default, fields with 3096 // empty values are omitted from API requests. However, any non-pointer, 3097 // non-interface field appearing in ForceSendFields will be sent to the 3098 // server regardless of whether the field is empty or not. This may be 3099 // used to include empty fields in Patch requests. 3100 ForceSendFields []string `json:"-"` 3101 3102 // NullFields is a list of field names (e.g. "Digest") to include in API 3103 // requests with the JSON null value. By default, fields with empty 3104 // values are omitted from API requests. However, any field with an 3105 // 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 3111func (s *GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata) MarshalJSON() ([]byte, error) { 3112 type NoMethod GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata 3113 raw := NoMethod(*s) 3114 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3115} 3116 3117// GoogleDevtoolsRemoteworkersV1test2FileMetadata: The metadata for a 3118// file. Similar to the equivalent message in the Remote 3119// Execution API. 3120type GoogleDevtoolsRemoteworkersV1test2FileMetadata struct { 3121 // Contents: If the file is small enough, its contents may also or 3122 // alternatively be 3123 // listed here. 3124 Contents string `json:"contents,omitempty"` 3125 3126 // Digest: A pointer to the contents of the file. The method by which a 3127 // client 3128 // retrieves the contents from a CAS system is not defined here. 3129 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 3130 3131 // IsExecutable: Properties of the file 3132 IsExecutable bool `json:"isExecutable,omitempty"` 3133 3134 // Path: The path of this file. If this message is part of 3135 // the 3136 // CommandOutputs.outputs fields, the path is relative to the execution 3137 // root 3138 // and must correspond to an entry in CommandTask.outputs.files. If 3139 // this 3140 // message is part of a Directory message, then the path is relative to 3141 // the 3142 // root of that directory. All paths MUST be delimited by forward 3143 // slashes. 3144 Path string `json:"path,omitempty"` 3145 3146 // ForceSendFields is a list of field names (e.g. "Contents") to 3147 // unconditionally include in API requests. By default, fields with 3148 // empty values are omitted from API requests. However, any non-pointer, 3149 // non-interface field appearing in ForceSendFields will be sent to the 3150 // server regardless of whether the field is empty or not. This may be 3151 // used to include empty fields in Patch requests. 3152 ForceSendFields []string `json:"-"` 3153 3154 // NullFields is a list of field names (e.g. "Contents") to include in 3155 // API requests with the JSON null value. By default, fields with empty 3156 // values are omitted from API requests. However, any field with an 3157 // empty value appearing in NullFields will be sent to the server as 3158 // null. It is an error if a field in this list has a non-empty value. 3159 // This may be used to include null fields in Patch requests. 3160 NullFields []string `json:"-"` 3161} 3162 3163func (s *GoogleDevtoolsRemoteworkersV1test2FileMetadata) MarshalJSON() ([]byte, error) { 3164 type NoMethod GoogleDevtoolsRemoteworkersV1test2FileMetadata 3165 raw := NoMethod(*s) 3166 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3167} 3168 3169// GoogleLongrunningOperation: This resource represents a long-running 3170// operation that is the result of a 3171// network API call. 3172type GoogleLongrunningOperation struct { 3173 // Done: If the value is `false`, it means the operation is still in 3174 // progress. 3175 // If `true`, the operation is completed, and either `error` or 3176 // `response` is 3177 // available. 3178 Done bool `json:"done,omitempty"` 3179 3180 // Error: The error result of the operation in case of failure or 3181 // cancellation. 3182 Error *GoogleRpcStatus `json:"error,omitempty"` 3183 3184 // Metadata: Service-specific metadata associated with the operation. 3185 // It typically 3186 // contains progress information and common metadata such as create 3187 // time. 3188 // Some services might not provide such metadata. Any method that 3189 // returns a 3190 // long-running operation should document the metadata type, if any. 3191 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3192 3193 // Name: The server-assigned name, which is only unique within the same 3194 // service that 3195 // originally returns it. If you use the default HTTP mapping, 3196 // the 3197 // `name` should be a resource name ending with 3198 // `operations/{unique_id}`. 3199 Name string `json:"name,omitempty"` 3200 3201 // Response: The normal response of the operation in case of success. 3202 // If the original 3203 // method returns no data on success, such as `Delete`, the response 3204 // is 3205 // `google.protobuf.Empty`. If the original method is 3206 // standard 3207 // `Get`/`Create`/`Update`, the response should be the resource. For 3208 // other 3209 // methods, the response should have the type `XxxResponse`, where 3210 // `Xxx` 3211 // is the original method name. For example, if the original method 3212 // name 3213 // is `TakeSnapshot()`, the inferred response type 3214 // is 3215 // `TakeSnapshotResponse`. 3216 Response googleapi.RawMessage `json:"response,omitempty"` 3217 3218 // ServerResponse contains the HTTP response code and headers from the 3219 // server. 3220 googleapi.ServerResponse `json:"-"` 3221 3222 // ForceSendFields is a list of field names (e.g. "Done") to 3223 // unconditionally include in API requests. By default, fields with 3224 // empty values are omitted from API requests. However, any non-pointer, 3225 // non-interface field appearing in ForceSendFields will be sent to the 3226 // server regardless of whether the field is empty or not. This may be 3227 // used to include empty fields in Patch requests. 3228 ForceSendFields []string `json:"-"` 3229 3230 // NullFields is a list of field names (e.g. "Done") to include in API 3231 // requests with the JSON null value. By default, fields with empty 3232 // values are omitted from API requests. However, any field with an 3233 // empty value appearing in NullFields will be sent to the server as 3234 // null. It is an error if a field in this list has a non-empty value. 3235 // This may be used to include null fields in Patch requests. 3236 NullFields []string `json:"-"` 3237} 3238 3239func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 3240 type NoMethod GoogleLongrunningOperation 3241 raw := NoMethod(*s) 3242 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3243} 3244 3245// GoogleRpcStatus: The `Status` type defines a logical error model that 3246// is suitable for 3247// different programming environments, including REST APIs and RPC APIs. 3248// It is 3249// used by [gRPC](https://github.com/grpc). Each `Status` message 3250// contains 3251// three pieces of data: error code, error message, and error 3252// details. 3253// 3254// You can find out more about this error model and how to work with it 3255// in the 3256// [API Design Guide](https://cloud.google.com/apis/design/errors). 3257type GoogleRpcStatus struct { 3258 // Code: The status code, which should be an enum value of 3259 // google.rpc.Code. 3260 Code int64 `json:"code,omitempty"` 3261 3262 // Details: A list of messages that carry the error details. There is a 3263 // common set of 3264 // message types for APIs to use. 3265 Details []googleapi.RawMessage `json:"details,omitempty"` 3266 3267 // Message: A developer-facing error message, which should be in 3268 // English. Any 3269 // user-facing error message should be localized and sent in 3270 // the 3271 // google.rpc.Status.details field, or localized by the client. 3272 Message string `json:"message,omitempty"` 3273 3274 // ForceSendFields is a list of field names (e.g. "Code") to 3275 // unconditionally include in API requests. By default, fields with 3276 // empty values are omitted from API requests. However, any non-pointer, 3277 // non-interface field appearing in ForceSendFields will be sent to the 3278 // server regardless of whether the field is empty or not. This may be 3279 // used to include empty fields in Patch requests. 3280 ForceSendFields []string `json:"-"` 3281 3282 // NullFields is a list of field names (e.g. "Code") to include in API 3283 // requests with the JSON null value. By default, fields with empty 3284 // values are omitted from API requests. However, any field with an 3285 // empty value appearing in NullFields will be sent to the server as 3286 // null. It is an error if a field in this list has a non-empty value. 3287 // This may be used to include null fields in Patch requests. 3288 NullFields []string `json:"-"` 3289} 3290 3291func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 3292 type NoMethod GoogleRpcStatus 3293 raw := NoMethod(*s) 3294 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3295} 3296 3297// method id "remotebuildexecution.projects.instances.create": 3298 3299type ProjectsInstancesCreateCall struct { 3300 s *Service 3301 parent string 3302 googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest 3303 urlParams_ gensupport.URLParams 3304 ctx_ context.Context 3305 header_ http.Header 3306} 3307 3308// Create: Creates a new instance in the specified region. 3309// Returns a long running operation which contains an instance on 3310// completion. 3311// While the long running operation is in progress, any call to 3312// `GetInstance` 3313// returns an instance in state `CREATING`. 3314func (r *ProjectsInstancesService) Create(parent string, googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest) *ProjectsInstancesCreateCall { 3315 c := &ProjectsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3316 c.parent = parent 3317 c.googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest = googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest 3318 return c 3319} 3320 3321// Fields allows partial responses to be retrieved. See 3322// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3323// for more information. 3324func (c *ProjectsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesCreateCall { 3325 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3326 return c 3327} 3328 3329// Context sets the context to be used in this call's Do method. Any 3330// pending HTTP request will be aborted if the provided context is 3331// canceled. 3332func (c *ProjectsInstancesCreateCall) Context(ctx context.Context) *ProjectsInstancesCreateCall { 3333 c.ctx_ = ctx 3334 return c 3335} 3336 3337// Header returns an http.Header that can be modified by the caller to 3338// add HTTP headers to the request. 3339func (c *ProjectsInstancesCreateCall) Header() http.Header { 3340 if c.header_ == nil { 3341 c.header_ = make(http.Header) 3342 } 3343 return c.header_ 3344} 3345 3346func (c *ProjectsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { 3347 reqHeaders := make(http.Header) 3348 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 3349 for k, v := range c.header_ { 3350 reqHeaders[k] = v 3351 } 3352 reqHeaders.Set("User-Agent", c.s.userAgent()) 3353 var body io.Reader = nil 3354 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest) 3355 if err != nil { 3356 return nil, err 3357 } 3358 reqHeaders.Set("Content-Type", "application/json") 3359 c.urlParams_.Set("alt", alt) 3360 c.urlParams_.Set("prettyPrint", "false") 3361 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/instances") 3362 urls += "?" + c.urlParams_.Encode() 3363 req, err := http.NewRequest("POST", urls, body) 3364 if err != nil { 3365 return nil, err 3366 } 3367 req.Header = reqHeaders 3368 googleapi.Expand(req.URL, map[string]string{ 3369 "parent": c.parent, 3370 }) 3371 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3372} 3373 3374// Do executes the "remotebuildexecution.projects.instances.create" call. 3375// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 3376// Any non-2xx status code is an error. Response headers are in either 3377// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 3378// was returned at all) in error.(*googleapi.Error).Header. Use 3379// googleapi.IsNotModified to check whether the returned error was 3380// because http.StatusNotModified was returned. 3381func (c *ProjectsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 3382 gensupport.SetOptions(c.urlParams_, opts...) 3383 res, err := c.doRequest("json") 3384 if res != nil && res.StatusCode == http.StatusNotModified { 3385 if res.Body != nil { 3386 res.Body.Close() 3387 } 3388 return nil, &googleapi.Error{ 3389 Code: res.StatusCode, 3390 Header: res.Header, 3391 } 3392 } 3393 if err != nil { 3394 return nil, err 3395 } 3396 defer googleapi.CloseBody(res) 3397 if err := googleapi.CheckResponse(res); err != nil { 3398 return nil, err 3399 } 3400 ret := &GoogleLongrunningOperation{ 3401 ServerResponse: googleapi.ServerResponse{ 3402 Header: res.Header, 3403 HTTPStatusCode: res.StatusCode, 3404 }, 3405 } 3406 target := &ret 3407 if err := gensupport.DecodeResponse(target, res); err != nil { 3408 return nil, err 3409 } 3410 return ret, nil 3411 // { 3412 // "description": "Creates a new instance in the specified region.\nReturns a long running operation which contains an instance on completion.\nWhile the long running operation is in progress, any call to `GetInstance`\nreturns an instance in state `CREATING`.", 3413 // "flatPath": "v1alpha/projects/{projectsId}/instances", 3414 // "httpMethod": "POST", 3415 // "id": "remotebuildexecution.projects.instances.create", 3416 // "parameterOrder": [ 3417 // "parent" 3418 // ], 3419 // "parameters": { 3420 // "parent": { 3421 // "description": "Resource name of the project containing the instance.\nFormat: `projects/[PROJECT_ID]`.", 3422 // "location": "path", 3423 // "pattern": "^projects/[^/]+$", 3424 // "required": true, 3425 // "type": "string" 3426 // } 3427 // }, 3428 // "path": "v1alpha/{+parent}/instances", 3429 // "request": { 3430 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest" 3431 // }, 3432 // "response": { 3433 // "$ref": "GoogleLongrunningOperation" 3434 // }, 3435 // "scopes": [ 3436 // "https://www.googleapis.com/auth/cloud-platform" 3437 // ] 3438 // } 3439 3440} 3441 3442// method id "remotebuildexecution.projects.instances.delete": 3443 3444type ProjectsInstancesDeleteCall struct { 3445 s *Service 3446 name string 3447 urlParams_ gensupport.URLParams 3448 ctx_ context.Context 3449 header_ http.Header 3450} 3451 3452// Delete: Deletes the specified instance. 3453// Returns a long running operation which contains a 3454// `google.protobuf.Empty` 3455// response on completion. 3456// Deleting an instance with worker pools in it will delete these 3457// worker 3458// pools. 3459func (r *ProjectsInstancesService) Delete(name string) *ProjectsInstancesDeleteCall { 3460 c := &ProjectsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3461 c.name = name 3462 return c 3463} 3464 3465// Fields allows partial responses to be retrieved. See 3466// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3467// for more information. 3468func (c *ProjectsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDeleteCall { 3469 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3470 return c 3471} 3472 3473// Context sets the context to be used in this call's Do method. Any 3474// pending HTTP request will be aborted if the provided context is 3475// canceled. 3476func (c *ProjectsInstancesDeleteCall) Context(ctx context.Context) *ProjectsInstancesDeleteCall { 3477 c.ctx_ = ctx 3478 return c 3479} 3480 3481// Header returns an http.Header that can be modified by the caller to 3482// add HTTP headers to the request. 3483func (c *ProjectsInstancesDeleteCall) Header() http.Header { 3484 if c.header_ == nil { 3485 c.header_ = make(http.Header) 3486 } 3487 return c.header_ 3488} 3489 3490func (c *ProjectsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 3491 reqHeaders := make(http.Header) 3492 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 3493 for k, v := range c.header_ { 3494 reqHeaders[k] = v 3495 } 3496 reqHeaders.Set("User-Agent", c.s.userAgent()) 3497 var body io.Reader = nil 3498 c.urlParams_.Set("alt", alt) 3499 c.urlParams_.Set("prettyPrint", "false") 3500 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 3501 urls += "?" + c.urlParams_.Encode() 3502 req, err := http.NewRequest("DELETE", urls, body) 3503 if err != nil { 3504 return nil, err 3505 } 3506 req.Header = reqHeaders 3507 googleapi.Expand(req.URL, map[string]string{ 3508 "name": c.name, 3509 }) 3510 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3511} 3512 3513// Do executes the "remotebuildexecution.projects.instances.delete" call. 3514// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 3515// Any non-2xx status code is an error. Response headers are in either 3516// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 3517// was returned at all) in error.(*googleapi.Error).Header. Use 3518// googleapi.IsNotModified to check whether the returned error was 3519// because http.StatusNotModified was returned. 3520func (c *ProjectsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 3521 gensupport.SetOptions(c.urlParams_, opts...) 3522 res, err := c.doRequest("json") 3523 if res != nil && res.StatusCode == http.StatusNotModified { 3524 if res.Body != nil { 3525 res.Body.Close() 3526 } 3527 return nil, &googleapi.Error{ 3528 Code: res.StatusCode, 3529 Header: res.Header, 3530 } 3531 } 3532 if err != nil { 3533 return nil, err 3534 } 3535 defer googleapi.CloseBody(res) 3536 if err := googleapi.CheckResponse(res); err != nil { 3537 return nil, err 3538 } 3539 ret := &GoogleLongrunningOperation{ 3540 ServerResponse: googleapi.ServerResponse{ 3541 Header: res.Header, 3542 HTTPStatusCode: res.StatusCode, 3543 }, 3544 } 3545 target := &ret 3546 if err := gensupport.DecodeResponse(target, res); err != nil { 3547 return nil, err 3548 } 3549 return ret, nil 3550 // { 3551 // "description": "Deletes the specified instance.\nReturns a long running operation which contains a `google.protobuf.Empty`\nresponse on completion.\nDeleting an instance with worker pools in it will delete these worker\npools.", 3552 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", 3553 // "httpMethod": "DELETE", 3554 // "id": "remotebuildexecution.projects.instances.delete", 3555 // "parameterOrder": [ 3556 // "name" 3557 // ], 3558 // "parameters": { 3559 // "name": { 3560 // "description": "Name of the instance to delete.\nFormat: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 3561 // "location": "path", 3562 // "pattern": "^projects/[^/]+/instances/[^/]+$", 3563 // "required": true, 3564 // "type": "string" 3565 // } 3566 // }, 3567 // "path": "v1alpha/{+name}", 3568 // "response": { 3569 // "$ref": "GoogleLongrunningOperation" 3570 // }, 3571 // "scopes": [ 3572 // "https://www.googleapis.com/auth/cloud-platform" 3573 // ] 3574 // } 3575 3576} 3577 3578// method id "remotebuildexecution.projects.instances.get": 3579 3580type ProjectsInstancesGetCall struct { 3581 s *Service 3582 name string 3583 urlParams_ gensupport.URLParams 3584 ifNoneMatch_ string 3585 ctx_ context.Context 3586 header_ http.Header 3587} 3588 3589// Get: Returns the specified instance. 3590func (r *ProjectsInstancesService) Get(name string) *ProjectsInstancesGetCall { 3591 c := &ProjectsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3592 c.name = name 3593 return c 3594} 3595 3596// Fields allows partial responses to be retrieved. See 3597// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3598// for more information. 3599func (c *ProjectsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetCall { 3600 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3601 return c 3602} 3603 3604// IfNoneMatch sets the optional parameter which makes the operation 3605// fail if the object's ETag matches the given value. This is useful for 3606// getting updates only after the object has changed since the last 3607// request. Use googleapi.IsNotModified to check whether the response 3608// error from Do is the result of In-None-Match. 3609func (c *ProjectsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetCall { 3610 c.ifNoneMatch_ = entityTag 3611 return c 3612} 3613 3614// Context sets the context to be used in this call's Do method. Any 3615// pending HTTP request will be aborted if the provided context is 3616// canceled. 3617func (c *ProjectsInstancesGetCall) Context(ctx context.Context) *ProjectsInstancesGetCall { 3618 c.ctx_ = ctx 3619 return c 3620} 3621 3622// Header returns an http.Header that can be modified by the caller to 3623// add HTTP headers to the request. 3624func (c *ProjectsInstancesGetCall) Header() http.Header { 3625 if c.header_ == nil { 3626 c.header_ = make(http.Header) 3627 } 3628 return c.header_ 3629} 3630 3631func (c *ProjectsInstancesGetCall) doRequest(alt string) (*http.Response, error) { 3632 reqHeaders := make(http.Header) 3633 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 3634 for k, v := range c.header_ { 3635 reqHeaders[k] = v 3636 } 3637 reqHeaders.Set("User-Agent", c.s.userAgent()) 3638 if c.ifNoneMatch_ != "" { 3639 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3640 } 3641 var body io.Reader = nil 3642 c.urlParams_.Set("alt", alt) 3643 c.urlParams_.Set("prettyPrint", "false") 3644 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 3645 urls += "?" + c.urlParams_.Encode() 3646 req, err := http.NewRequest("GET", urls, body) 3647 if err != nil { 3648 return nil, err 3649 } 3650 req.Header = reqHeaders 3651 googleapi.Expand(req.URL, map[string]string{ 3652 "name": c.name, 3653 }) 3654 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3655} 3656 3657// Do executes the "remotebuildexecution.projects.instances.get" call. 3658// Exactly one of 3659// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance or error will 3660// be non-nil. Any non-2xx status code is an error. Response headers are 3661// in either 3662// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance.ServerResponse 3663// .Header or (if a response was returned at all) in 3664// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3665// whether the returned error was because http.StatusNotModified was 3666// returned. 3667func (c *ProjectsInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance, error) { 3668 gensupport.SetOptions(c.urlParams_, opts...) 3669 res, err := c.doRequest("json") 3670 if res != nil && res.StatusCode == http.StatusNotModified { 3671 if res.Body != nil { 3672 res.Body.Close() 3673 } 3674 return nil, &googleapi.Error{ 3675 Code: res.StatusCode, 3676 Header: res.Header, 3677 } 3678 } 3679 if err != nil { 3680 return nil, err 3681 } 3682 defer googleapi.CloseBody(res) 3683 if err := googleapi.CheckResponse(res); err != nil { 3684 return nil, err 3685 } 3686 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance{ 3687 ServerResponse: googleapi.ServerResponse{ 3688 Header: res.Header, 3689 HTTPStatusCode: res.StatusCode, 3690 }, 3691 } 3692 target := &ret 3693 if err := gensupport.DecodeResponse(target, res); err != nil { 3694 return nil, err 3695 } 3696 return ret, nil 3697 // { 3698 // "description": "Returns the specified instance.", 3699 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", 3700 // "httpMethod": "GET", 3701 // "id": "remotebuildexecution.projects.instances.get", 3702 // "parameterOrder": [ 3703 // "name" 3704 // ], 3705 // "parameters": { 3706 // "name": { 3707 // "description": "Name of the instance to retrieve.\nFormat: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 3708 // "location": "path", 3709 // "pattern": "^projects/[^/]+/instances/[^/]+$", 3710 // "required": true, 3711 // "type": "string" 3712 // } 3713 // }, 3714 // "path": "v1alpha/{+name}", 3715 // "response": { 3716 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" 3717 // }, 3718 // "scopes": [ 3719 // "https://www.googleapis.com/auth/cloud-platform" 3720 // ] 3721 // } 3722 3723} 3724 3725// method id "remotebuildexecution.projects.instances.list": 3726 3727type ProjectsInstancesListCall struct { 3728 s *Service 3729 parent string 3730 urlParams_ gensupport.URLParams 3731 ifNoneMatch_ string 3732 ctx_ context.Context 3733 header_ http.Header 3734} 3735 3736// List: Lists instances in a project. 3737func (r *ProjectsInstancesService) List(parent string) *ProjectsInstancesListCall { 3738 c := &ProjectsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3739 c.parent = parent 3740 return c 3741} 3742 3743// Fields allows partial responses to be retrieved. See 3744// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3745// for more information. 3746func (c *ProjectsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesListCall { 3747 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3748 return c 3749} 3750 3751// IfNoneMatch sets the optional parameter which makes the operation 3752// fail if the object's ETag matches the given value. This is useful for 3753// getting updates only after the object has changed since the last 3754// request. Use googleapi.IsNotModified to check whether the response 3755// error from Do is the result of In-None-Match. 3756func (c *ProjectsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesListCall { 3757 c.ifNoneMatch_ = entityTag 3758 return c 3759} 3760 3761// Context sets the context to be used in this call's Do method. Any 3762// pending HTTP request will be aborted if the provided context is 3763// canceled. 3764func (c *ProjectsInstancesListCall) Context(ctx context.Context) *ProjectsInstancesListCall { 3765 c.ctx_ = ctx 3766 return c 3767} 3768 3769// Header returns an http.Header that can be modified by the caller to 3770// add HTTP headers to the request. 3771func (c *ProjectsInstancesListCall) Header() http.Header { 3772 if c.header_ == nil { 3773 c.header_ = make(http.Header) 3774 } 3775 return c.header_ 3776} 3777 3778func (c *ProjectsInstancesListCall) doRequest(alt string) (*http.Response, error) { 3779 reqHeaders := make(http.Header) 3780 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 3781 for k, v := range c.header_ { 3782 reqHeaders[k] = v 3783 } 3784 reqHeaders.Set("User-Agent", c.s.userAgent()) 3785 if c.ifNoneMatch_ != "" { 3786 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3787 } 3788 var body io.Reader = nil 3789 c.urlParams_.Set("alt", alt) 3790 c.urlParams_.Set("prettyPrint", "false") 3791 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/instances") 3792 urls += "?" + c.urlParams_.Encode() 3793 req, err := http.NewRequest("GET", urls, body) 3794 if err != nil { 3795 return nil, err 3796 } 3797 req.Header = reqHeaders 3798 googleapi.Expand(req.URL, map[string]string{ 3799 "parent": c.parent, 3800 }) 3801 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3802} 3803 3804// Do executes the "remotebuildexecution.projects.instances.list" call. 3805// Exactly one of 3806// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse 3807// or error will be non-nil. Any non-2xx status code is an error. 3808// Response headers are in either 3809// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse.S 3810// erverResponse.Header or (if a response was returned at all) in 3811// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3812// whether the returned error was because http.StatusNotModified was 3813// returned. 3814func (c *ProjectsInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse, error) { 3815 gensupport.SetOptions(c.urlParams_, opts...) 3816 res, err := c.doRequest("json") 3817 if res != nil && res.StatusCode == http.StatusNotModified { 3818 if res.Body != nil { 3819 res.Body.Close() 3820 } 3821 return nil, &googleapi.Error{ 3822 Code: res.StatusCode, 3823 Header: res.Header, 3824 } 3825 } 3826 if err != nil { 3827 return nil, err 3828 } 3829 defer googleapi.CloseBody(res) 3830 if err := googleapi.CheckResponse(res); err != nil { 3831 return nil, err 3832 } 3833 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse{ 3834 ServerResponse: googleapi.ServerResponse{ 3835 Header: res.Header, 3836 HTTPStatusCode: res.StatusCode, 3837 }, 3838 } 3839 target := &ret 3840 if err := gensupport.DecodeResponse(target, res); err != nil { 3841 return nil, err 3842 } 3843 return ret, nil 3844 // { 3845 // "description": "Lists instances in a project.", 3846 // "flatPath": "v1alpha/projects/{projectsId}/instances", 3847 // "httpMethod": "GET", 3848 // "id": "remotebuildexecution.projects.instances.list", 3849 // "parameterOrder": [ 3850 // "parent" 3851 // ], 3852 // "parameters": { 3853 // "parent": { 3854 // "description": "Resource name of the project.\nFormat: `projects/[PROJECT_ID]`.", 3855 // "location": "path", 3856 // "pattern": "^projects/[^/]+$", 3857 // "required": true, 3858 // "type": "string" 3859 // } 3860 // }, 3861 // "path": "v1alpha/{+parent}/instances", 3862 // "response": { 3863 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse" 3864 // }, 3865 // "scopes": [ 3866 // "https://www.googleapis.com/auth/cloud-platform" 3867 // ] 3868 // } 3869 3870} 3871 3872// method id "remotebuildexecution.projects.instances.workerpools.create": 3873 3874type ProjectsInstancesWorkerpoolsCreateCall struct { 3875 s *Service 3876 parent string 3877 googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest 3878 urlParams_ gensupport.URLParams 3879 ctx_ context.Context 3880 header_ http.Header 3881} 3882 3883// Create: Creates a new worker pool with a specified size and 3884// configuration. 3885// Returns a long running operation which contains a worker pool 3886// on 3887// completion. While the long running operation is in progress, any call 3888// to 3889// `GetWorkerPool` returns a worker pool in state `CREATING`. 3890func (r *ProjectsInstancesWorkerpoolsService) Create(parent string, googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest) *ProjectsInstancesWorkerpoolsCreateCall { 3891 c := &ProjectsInstancesWorkerpoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3892 c.parent = parent 3893 c.googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest = googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest 3894 return c 3895} 3896 3897// Fields allows partial responses to be retrieved. See 3898// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3899// for more information. 3900func (c *ProjectsInstancesWorkerpoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsCreateCall { 3901 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3902 return c 3903} 3904 3905// Context sets the context to be used in this call's Do method. Any 3906// pending HTTP request will be aborted if the provided context is 3907// canceled. 3908func (c *ProjectsInstancesWorkerpoolsCreateCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsCreateCall { 3909 c.ctx_ = ctx 3910 return c 3911} 3912 3913// Header returns an http.Header that can be modified by the caller to 3914// add HTTP headers to the request. 3915func (c *ProjectsInstancesWorkerpoolsCreateCall) Header() http.Header { 3916 if c.header_ == nil { 3917 c.header_ = make(http.Header) 3918 } 3919 return c.header_ 3920} 3921 3922func (c *ProjectsInstancesWorkerpoolsCreateCall) doRequest(alt string) (*http.Response, error) { 3923 reqHeaders := make(http.Header) 3924 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 3925 for k, v := range c.header_ { 3926 reqHeaders[k] = v 3927 } 3928 reqHeaders.Set("User-Agent", c.s.userAgent()) 3929 var body io.Reader = nil 3930 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest) 3931 if err != nil { 3932 return nil, err 3933 } 3934 reqHeaders.Set("Content-Type", "application/json") 3935 c.urlParams_.Set("alt", alt) 3936 c.urlParams_.Set("prettyPrint", "false") 3937 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workerpools") 3938 urls += "?" + c.urlParams_.Encode() 3939 req, err := http.NewRequest("POST", urls, body) 3940 if err != nil { 3941 return nil, err 3942 } 3943 req.Header = reqHeaders 3944 googleapi.Expand(req.URL, map[string]string{ 3945 "parent": c.parent, 3946 }) 3947 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3948} 3949 3950// Do executes the "remotebuildexecution.projects.instances.workerpools.create" call. 3951// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 3952// Any non-2xx status code is an error. Response headers are in either 3953// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 3954// was returned at all) in error.(*googleapi.Error).Header. Use 3955// googleapi.IsNotModified to check whether the returned error was 3956// because http.StatusNotModified was returned. 3957func (c *ProjectsInstancesWorkerpoolsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 3958 gensupport.SetOptions(c.urlParams_, opts...) 3959 res, err := c.doRequest("json") 3960 if res != nil && res.StatusCode == http.StatusNotModified { 3961 if res.Body != nil { 3962 res.Body.Close() 3963 } 3964 return nil, &googleapi.Error{ 3965 Code: res.StatusCode, 3966 Header: res.Header, 3967 } 3968 } 3969 if err != nil { 3970 return nil, err 3971 } 3972 defer googleapi.CloseBody(res) 3973 if err := googleapi.CheckResponse(res); err != nil { 3974 return nil, err 3975 } 3976 ret := &GoogleLongrunningOperation{ 3977 ServerResponse: googleapi.ServerResponse{ 3978 Header: res.Header, 3979 HTTPStatusCode: res.StatusCode, 3980 }, 3981 } 3982 target := &ret 3983 if err := gensupport.DecodeResponse(target, res); err != nil { 3984 return nil, err 3985 } 3986 return ret, nil 3987 // { 3988 // "description": "Creates a new worker pool with a specified size and configuration.\nReturns a long running operation which contains a worker pool on\ncompletion. While the long running operation is in progress, any call to\n`GetWorkerPool` returns a worker pool in state `CREATING`.", 3989 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools", 3990 // "httpMethod": "POST", 3991 // "id": "remotebuildexecution.projects.instances.workerpools.create", 3992 // "parameterOrder": [ 3993 // "parent" 3994 // ], 3995 // "parameters": { 3996 // "parent": { 3997 // "description": "Resource name of the instance in which to create the new worker pool.\nFormat: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 3998 // "location": "path", 3999 // "pattern": "^projects/[^/]+/instances/[^/]+$", 4000 // "required": true, 4001 // "type": "string" 4002 // } 4003 // }, 4004 // "path": "v1alpha/{+parent}/workerpools", 4005 // "request": { 4006 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest" 4007 // }, 4008 // "response": { 4009 // "$ref": "GoogleLongrunningOperation" 4010 // }, 4011 // "scopes": [ 4012 // "https://www.googleapis.com/auth/cloud-platform" 4013 // ] 4014 // } 4015 4016} 4017 4018// method id "remotebuildexecution.projects.instances.workerpools.delete": 4019 4020type ProjectsInstancesWorkerpoolsDeleteCall struct { 4021 s *Service 4022 name string 4023 urlParams_ gensupport.URLParams 4024 ctx_ context.Context 4025 header_ http.Header 4026} 4027 4028// Delete: Deletes the specified worker pool. 4029// Returns a long running operation, which contains a 4030// `google.protobuf.Empty` 4031// response on completion. 4032// While the long running operation is in progress, any call 4033// to 4034// `GetWorkerPool` returns a worker pool in state `DELETING`. 4035func (r *ProjectsInstancesWorkerpoolsService) Delete(name string) *ProjectsInstancesWorkerpoolsDeleteCall { 4036 c := &ProjectsInstancesWorkerpoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4037 c.name = name 4038 return c 4039} 4040 4041// Fields allows partial responses to be retrieved. See 4042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4043// for more information. 4044func (c *ProjectsInstancesWorkerpoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsDeleteCall { 4045 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4046 return c 4047} 4048 4049// Context sets the context to be used in this call's Do method. Any 4050// pending HTTP request will be aborted if the provided context is 4051// canceled. 4052func (c *ProjectsInstancesWorkerpoolsDeleteCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsDeleteCall { 4053 c.ctx_ = ctx 4054 return c 4055} 4056 4057// Header returns an http.Header that can be modified by the caller to 4058// add HTTP headers to the request. 4059func (c *ProjectsInstancesWorkerpoolsDeleteCall) Header() http.Header { 4060 if c.header_ == nil { 4061 c.header_ = make(http.Header) 4062 } 4063 return c.header_ 4064} 4065 4066func (c *ProjectsInstancesWorkerpoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 4067 reqHeaders := make(http.Header) 4068 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4069 for k, v := range c.header_ { 4070 reqHeaders[k] = v 4071 } 4072 reqHeaders.Set("User-Agent", c.s.userAgent()) 4073 var body io.Reader = nil 4074 c.urlParams_.Set("alt", alt) 4075 c.urlParams_.Set("prettyPrint", "false") 4076 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4077 urls += "?" + c.urlParams_.Encode() 4078 req, err := http.NewRequest("DELETE", urls, body) 4079 if err != nil { 4080 return nil, err 4081 } 4082 req.Header = reqHeaders 4083 googleapi.Expand(req.URL, map[string]string{ 4084 "name": c.name, 4085 }) 4086 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4087} 4088 4089// Do executes the "remotebuildexecution.projects.instances.workerpools.delete" call. 4090// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4091// Any non-2xx status code is an error. Response headers are in either 4092// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4093// was returned at all) in error.(*googleapi.Error).Header. Use 4094// googleapi.IsNotModified to check whether the returned error was 4095// because http.StatusNotModified was returned. 4096func (c *ProjectsInstancesWorkerpoolsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4097 gensupport.SetOptions(c.urlParams_, opts...) 4098 res, err := c.doRequest("json") 4099 if res != nil && res.StatusCode == http.StatusNotModified { 4100 if res.Body != nil { 4101 res.Body.Close() 4102 } 4103 return nil, &googleapi.Error{ 4104 Code: res.StatusCode, 4105 Header: res.Header, 4106 } 4107 } 4108 if err != nil { 4109 return nil, err 4110 } 4111 defer googleapi.CloseBody(res) 4112 if err := googleapi.CheckResponse(res); err != nil { 4113 return nil, err 4114 } 4115 ret := &GoogleLongrunningOperation{ 4116 ServerResponse: googleapi.ServerResponse{ 4117 Header: res.Header, 4118 HTTPStatusCode: res.StatusCode, 4119 }, 4120 } 4121 target := &ret 4122 if err := gensupport.DecodeResponse(target, res); err != nil { 4123 return nil, err 4124 } 4125 return ret, nil 4126 // { 4127 // "description": "Deletes the specified worker pool.\nReturns a long running operation, which contains a `google.protobuf.Empty`\nresponse on completion.\nWhile the long running operation is in progress, any call to\n`GetWorkerPool` returns a worker pool in state `DELETING`.", 4128 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", 4129 // "httpMethod": "DELETE", 4130 // "id": "remotebuildexecution.projects.instances.workerpools.delete", 4131 // "parameterOrder": [ 4132 // "name" 4133 // ], 4134 // "parameters": { 4135 // "name": { 4136 // "description": "Name of the worker pool to delete.\nFormat:\n`projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", 4137 // "location": "path", 4138 // "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", 4139 // "required": true, 4140 // "type": "string" 4141 // } 4142 // }, 4143 // "path": "v1alpha/{+name}", 4144 // "response": { 4145 // "$ref": "GoogleLongrunningOperation" 4146 // }, 4147 // "scopes": [ 4148 // "https://www.googleapis.com/auth/cloud-platform" 4149 // ] 4150 // } 4151 4152} 4153 4154// method id "remotebuildexecution.projects.instances.workerpools.get": 4155 4156type ProjectsInstancesWorkerpoolsGetCall struct { 4157 s *Service 4158 name string 4159 urlParams_ gensupport.URLParams 4160 ifNoneMatch_ string 4161 ctx_ context.Context 4162 header_ http.Header 4163} 4164 4165// Get: Returns the specified worker pool. 4166func (r *ProjectsInstancesWorkerpoolsService) Get(name string) *ProjectsInstancesWorkerpoolsGetCall { 4167 c := &ProjectsInstancesWorkerpoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4168 c.name = name 4169 return c 4170} 4171 4172// Fields allows partial responses to be retrieved. See 4173// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4174// for more information. 4175func (c *ProjectsInstancesWorkerpoolsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsGetCall { 4176 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4177 return c 4178} 4179 4180// IfNoneMatch sets the optional parameter which makes the operation 4181// fail if the object's ETag matches the given value. This is useful for 4182// getting updates only after the object has changed since the last 4183// request. Use googleapi.IsNotModified to check whether the response 4184// error from Do is the result of In-None-Match. 4185func (c *ProjectsInstancesWorkerpoolsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesWorkerpoolsGetCall { 4186 c.ifNoneMatch_ = entityTag 4187 return c 4188} 4189 4190// Context sets the context to be used in this call's Do method. Any 4191// pending HTTP request will be aborted if the provided context is 4192// canceled. 4193func (c *ProjectsInstancesWorkerpoolsGetCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsGetCall { 4194 c.ctx_ = ctx 4195 return c 4196} 4197 4198// Header returns an http.Header that can be modified by the caller to 4199// add HTTP headers to the request. 4200func (c *ProjectsInstancesWorkerpoolsGetCall) Header() http.Header { 4201 if c.header_ == nil { 4202 c.header_ = make(http.Header) 4203 } 4204 return c.header_ 4205} 4206 4207func (c *ProjectsInstancesWorkerpoolsGetCall) doRequest(alt string) (*http.Response, error) { 4208 reqHeaders := make(http.Header) 4209 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4210 for k, v := range c.header_ { 4211 reqHeaders[k] = v 4212 } 4213 reqHeaders.Set("User-Agent", c.s.userAgent()) 4214 if c.ifNoneMatch_ != "" { 4215 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4216 } 4217 var body io.Reader = nil 4218 c.urlParams_.Set("alt", alt) 4219 c.urlParams_.Set("prettyPrint", "false") 4220 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4221 urls += "?" + c.urlParams_.Encode() 4222 req, err := http.NewRequest("GET", urls, body) 4223 if err != nil { 4224 return nil, err 4225 } 4226 req.Header = reqHeaders 4227 googleapi.Expand(req.URL, map[string]string{ 4228 "name": c.name, 4229 }) 4230 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4231} 4232 4233// Do executes the "remotebuildexecution.projects.instances.workerpools.get" call. 4234// Exactly one of 4235// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool or error 4236// will be non-nil. Any non-2xx status code is an error. Response 4237// headers are in either 4238// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool.ServerRespon 4239// se.Header or (if a response was returned at all) in 4240// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4241// whether the returned error was because http.StatusNotModified was 4242// returned. 4243func (c *ProjectsInstancesWorkerpoolsGetCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool, error) { 4244 gensupport.SetOptions(c.urlParams_, opts...) 4245 res, err := c.doRequest("json") 4246 if res != nil && res.StatusCode == http.StatusNotModified { 4247 if res.Body != nil { 4248 res.Body.Close() 4249 } 4250 return nil, &googleapi.Error{ 4251 Code: res.StatusCode, 4252 Header: res.Header, 4253 } 4254 } 4255 if err != nil { 4256 return nil, err 4257 } 4258 defer googleapi.CloseBody(res) 4259 if err := googleapi.CheckResponse(res); err != nil { 4260 return nil, err 4261 } 4262 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool{ 4263 ServerResponse: googleapi.ServerResponse{ 4264 Header: res.Header, 4265 HTTPStatusCode: res.StatusCode, 4266 }, 4267 } 4268 target := &ret 4269 if err := gensupport.DecodeResponse(target, res); err != nil { 4270 return nil, err 4271 } 4272 return ret, nil 4273 // { 4274 // "description": "Returns the specified worker pool.", 4275 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", 4276 // "httpMethod": "GET", 4277 // "id": "remotebuildexecution.projects.instances.workerpools.get", 4278 // "parameterOrder": [ 4279 // "name" 4280 // ], 4281 // "parameters": { 4282 // "name": { 4283 // "description": "Name of the worker pool to retrieve.\nFormat:\n`projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", 4284 // "location": "path", 4285 // "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", 4286 // "required": true, 4287 // "type": "string" 4288 // } 4289 // }, 4290 // "path": "v1alpha/{+name}", 4291 // "response": { 4292 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool" 4293 // }, 4294 // "scopes": [ 4295 // "https://www.googleapis.com/auth/cloud-platform" 4296 // ] 4297 // } 4298 4299} 4300 4301// method id "remotebuildexecution.projects.instances.workerpools.list": 4302 4303type ProjectsInstancesWorkerpoolsListCall struct { 4304 s *Service 4305 parent string 4306 urlParams_ gensupport.URLParams 4307 ifNoneMatch_ string 4308 ctx_ context.Context 4309 header_ http.Header 4310} 4311 4312// List: Lists worker pools in an instance. 4313func (r *ProjectsInstancesWorkerpoolsService) List(parent string) *ProjectsInstancesWorkerpoolsListCall { 4314 c := &ProjectsInstancesWorkerpoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4315 c.parent = parent 4316 return c 4317} 4318 4319// Filter sets the optional parameter "filter": A filter expression that 4320// filters resources listed in 4321// the response. The expression must specify the field name, a 4322// comparison 4323// operator, and the value that you want to use for filtering. The 4324// value 4325// must be a string, a number, or a boolean. String values 4326// are 4327// case-insensitive. 4328// The comparison operator must be either `:`, `=`, `!=`, `>`, `>=`, 4329// `<=` or 4330// `<`. 4331// The `:` operator can be used with string fields to match 4332// substrings. 4333// For non-string fields it is equivalent to the `=` operator. 4334// The `:*` comparison can be used to test whether a key has been 4335// defined. 4336// 4337// You can also filter on nested fields. 4338// 4339// To filter on multiple expressions, you can separate expression 4340// using 4341// `AND` and `OR` operators, using parentheses to specify precedence. 4342// If 4343// neither operator is specified, `AND` is assumed. 4344// 4345// Examples: 4346// 4347// Include only pools with more than 100 reserved 4348// workers: 4349// `(worker_count > 100) (worker_config.reserved = true)` 4350// 4351// Include only pools with a certain label or machines of the 4352// n1-standard 4353// family: 4354// `worker_config.labels.key1 : * OR worker_config.machine_type: 4355// n1-standard` 4356func (c *ProjectsInstancesWorkerpoolsListCall) Filter(filter string) *ProjectsInstancesWorkerpoolsListCall { 4357 c.urlParams_.Set("filter", filter) 4358 return c 4359} 4360 4361// Fields allows partial responses to be retrieved. See 4362// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4363// for more information. 4364func (c *ProjectsInstancesWorkerpoolsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsListCall { 4365 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4366 return c 4367} 4368 4369// IfNoneMatch sets the optional parameter which makes the operation 4370// fail if the object's ETag matches the given value. This is useful for 4371// getting updates only after the object has changed since the last 4372// request. Use googleapi.IsNotModified to check whether the response 4373// error from Do is the result of In-None-Match. 4374func (c *ProjectsInstancesWorkerpoolsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesWorkerpoolsListCall { 4375 c.ifNoneMatch_ = entityTag 4376 return c 4377} 4378 4379// Context sets the context to be used in this call's Do method. Any 4380// pending HTTP request will be aborted if the provided context is 4381// canceled. 4382func (c *ProjectsInstancesWorkerpoolsListCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsListCall { 4383 c.ctx_ = ctx 4384 return c 4385} 4386 4387// Header returns an http.Header that can be modified by the caller to 4388// add HTTP headers to the request. 4389func (c *ProjectsInstancesWorkerpoolsListCall) Header() http.Header { 4390 if c.header_ == nil { 4391 c.header_ = make(http.Header) 4392 } 4393 return c.header_ 4394} 4395 4396func (c *ProjectsInstancesWorkerpoolsListCall) doRequest(alt string) (*http.Response, error) { 4397 reqHeaders := make(http.Header) 4398 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4399 for k, v := range c.header_ { 4400 reqHeaders[k] = v 4401 } 4402 reqHeaders.Set("User-Agent", c.s.userAgent()) 4403 if c.ifNoneMatch_ != "" { 4404 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4405 } 4406 var body io.Reader = nil 4407 c.urlParams_.Set("alt", alt) 4408 c.urlParams_.Set("prettyPrint", "false") 4409 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workerpools") 4410 urls += "?" + c.urlParams_.Encode() 4411 req, err := http.NewRequest("GET", urls, body) 4412 if err != nil { 4413 return nil, err 4414 } 4415 req.Header = reqHeaders 4416 googleapi.Expand(req.URL, map[string]string{ 4417 "parent": c.parent, 4418 }) 4419 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4420} 4421 4422// Do executes the "remotebuildexecution.projects.instances.workerpools.list" call. 4423// Exactly one of 4424// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse 4425// or error will be non-nil. Any non-2xx status code is an error. 4426// Response headers are in either 4427// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse 4428// .ServerResponse.Header or (if a response was returned at all) in 4429// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4430// whether the returned error was because http.StatusNotModified was 4431// returned. 4432func (c *ProjectsInstancesWorkerpoolsListCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse, error) { 4433 gensupport.SetOptions(c.urlParams_, opts...) 4434 res, err := c.doRequest("json") 4435 if res != nil && res.StatusCode == http.StatusNotModified { 4436 if res.Body != nil { 4437 res.Body.Close() 4438 } 4439 return nil, &googleapi.Error{ 4440 Code: res.StatusCode, 4441 Header: res.Header, 4442 } 4443 } 4444 if err != nil { 4445 return nil, err 4446 } 4447 defer googleapi.CloseBody(res) 4448 if err := googleapi.CheckResponse(res); err != nil { 4449 return nil, err 4450 } 4451 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse{ 4452 ServerResponse: googleapi.ServerResponse{ 4453 Header: res.Header, 4454 HTTPStatusCode: res.StatusCode, 4455 }, 4456 } 4457 target := &ret 4458 if err := gensupport.DecodeResponse(target, res); err != nil { 4459 return nil, err 4460 } 4461 return ret, nil 4462 // { 4463 // "description": "Lists worker pools in an instance.", 4464 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools", 4465 // "httpMethod": "GET", 4466 // "id": "remotebuildexecution.projects.instances.workerpools.list", 4467 // "parameterOrder": [ 4468 // "parent" 4469 // ], 4470 // "parameters": { 4471 // "filter": { 4472 // "description": "Optional. A filter expression that filters resources listed in\nthe response. The expression must specify the field name, a comparison\noperator, and the value that you want to use for filtering. The value\nmust be a string, a number, or a boolean. String values are\ncase-insensitive.\nThe comparison operator must be either `:`, `=`, `!=`, `\u003e`, `\u003e=`, `\u003c=` or\n`\u003c`.\nThe `:` operator can be used with string fields to match substrings.\nFor non-string fields it is equivalent to the `=` operator.\nThe `:*` comparison can be used to test whether a key has been defined.\n\nYou can also filter on nested fields.\n\nTo filter on multiple expressions, you can separate expression using\n`AND` and `OR` operators, using parentheses to specify precedence. If\nneither operator is specified, `AND` is assumed.\n\nExamples:\n\nInclude only pools with more than 100 reserved workers:\n`(worker_count \u003e 100) (worker_config.reserved = true)`\n\nInclude only pools with a certain label or machines of the n1-standard\nfamily:\n`worker_config.labels.key1 : * OR worker_config.machine_type: n1-standard`", 4473 // "location": "query", 4474 // "type": "string" 4475 // }, 4476 // "parent": { 4477 // "description": "Resource name of the instance.\nFormat: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 4478 // "location": "path", 4479 // "pattern": "^projects/[^/]+/instances/[^/]+$", 4480 // "required": true, 4481 // "type": "string" 4482 // } 4483 // }, 4484 // "path": "v1alpha/{+parent}/workerpools", 4485 // "response": { 4486 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse" 4487 // }, 4488 // "scopes": [ 4489 // "https://www.googleapis.com/auth/cloud-platform" 4490 // ] 4491 // } 4492 4493} 4494 4495// method id "remotebuildexecution.projects.instances.workerpools.patch": 4496 4497type ProjectsInstancesWorkerpoolsPatchCall struct { 4498 s *Service 4499 name string 4500 googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest 4501 urlParams_ gensupport.URLParams 4502 ctx_ context.Context 4503 header_ http.Header 4504} 4505 4506// Patch: Updates an existing worker pool with a specified size and/or 4507// configuration. 4508// Returns a long running operation, which contains a worker pool 4509// on 4510// completion. While the long running operation is in progress, any call 4511// to 4512// `GetWorkerPool` returns a worker pool in state `UPDATING`. 4513func (r *ProjectsInstancesWorkerpoolsService) Patch(name string, googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest) *ProjectsInstancesWorkerpoolsPatchCall { 4514 c := &ProjectsInstancesWorkerpoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4515 c.name = name 4516 c.googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest = googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest 4517 return c 4518} 4519 4520// Fields allows partial responses to be retrieved. See 4521// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4522// for more information. 4523func (c *ProjectsInstancesWorkerpoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsPatchCall { 4524 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4525 return c 4526} 4527 4528// Context sets the context to be used in this call's Do method. Any 4529// pending HTTP request will be aborted if the provided context is 4530// canceled. 4531func (c *ProjectsInstancesWorkerpoolsPatchCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsPatchCall { 4532 c.ctx_ = ctx 4533 return c 4534} 4535 4536// Header returns an http.Header that can be modified by the caller to 4537// add HTTP headers to the request. 4538func (c *ProjectsInstancesWorkerpoolsPatchCall) Header() http.Header { 4539 if c.header_ == nil { 4540 c.header_ = make(http.Header) 4541 } 4542 return c.header_ 4543} 4544 4545func (c *ProjectsInstancesWorkerpoolsPatchCall) doRequest(alt string) (*http.Response, error) { 4546 reqHeaders := make(http.Header) 4547 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4548 for k, v := range c.header_ { 4549 reqHeaders[k] = v 4550 } 4551 reqHeaders.Set("User-Agent", c.s.userAgent()) 4552 var body io.Reader = nil 4553 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest) 4554 if err != nil { 4555 return nil, err 4556 } 4557 reqHeaders.Set("Content-Type", "application/json") 4558 c.urlParams_.Set("alt", alt) 4559 c.urlParams_.Set("prettyPrint", "false") 4560 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4561 urls += "?" + c.urlParams_.Encode() 4562 req, err := http.NewRequest("PATCH", urls, body) 4563 if err != nil { 4564 return nil, err 4565 } 4566 req.Header = reqHeaders 4567 googleapi.Expand(req.URL, map[string]string{ 4568 "name": c.name, 4569 }) 4570 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4571} 4572 4573// Do executes the "remotebuildexecution.projects.instances.workerpools.patch" call. 4574// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4575// Any non-2xx status code is an error. Response headers are in either 4576// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4577// was returned at all) in error.(*googleapi.Error).Header. Use 4578// googleapi.IsNotModified to check whether the returned error was 4579// because http.StatusNotModified was returned. 4580func (c *ProjectsInstancesWorkerpoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4581 gensupport.SetOptions(c.urlParams_, opts...) 4582 res, err := c.doRequest("json") 4583 if res != nil && res.StatusCode == http.StatusNotModified { 4584 if res.Body != nil { 4585 res.Body.Close() 4586 } 4587 return nil, &googleapi.Error{ 4588 Code: res.StatusCode, 4589 Header: res.Header, 4590 } 4591 } 4592 if err != nil { 4593 return nil, err 4594 } 4595 defer googleapi.CloseBody(res) 4596 if err := googleapi.CheckResponse(res); err != nil { 4597 return nil, err 4598 } 4599 ret := &GoogleLongrunningOperation{ 4600 ServerResponse: googleapi.ServerResponse{ 4601 Header: res.Header, 4602 HTTPStatusCode: res.StatusCode, 4603 }, 4604 } 4605 target := &ret 4606 if err := gensupport.DecodeResponse(target, res); err != nil { 4607 return nil, err 4608 } 4609 return ret, nil 4610 // { 4611 // "description": "Updates an existing worker pool with a specified size and/or configuration.\nReturns a long running operation, which contains a worker pool on\ncompletion. While the long running operation is in progress, any call to\n`GetWorkerPool` returns a worker pool in state `UPDATING`.", 4612 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", 4613 // "httpMethod": "PATCH", 4614 // "id": "remotebuildexecution.projects.instances.workerpools.patch", 4615 // "parameterOrder": [ 4616 // "name" 4617 // ], 4618 // "parameters": { 4619 // "name": { 4620 // "description": "WorkerPool resource name formatted as:\n`projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.\nname should not be populated when creating a worker pool since it is\nprovided in the `poolId` field.", 4621 // "location": "path", 4622 // "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", 4623 // "required": true, 4624 // "type": "string" 4625 // } 4626 // }, 4627 // "path": "v1alpha/{+name}", 4628 // "request": { 4629 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest" 4630 // }, 4631 // "response": { 4632 // "$ref": "GoogleLongrunningOperation" 4633 // }, 4634 // "scopes": [ 4635 // "https://www.googleapis.com/auth/cloud-platform" 4636 // ] 4637 // } 4638 4639} 4640 4641// method id "remotebuildexecution.projects.operations.get": 4642 4643type ProjectsOperationsGetCall struct { 4644 s *Service 4645 name string 4646 urlParams_ gensupport.URLParams 4647 ifNoneMatch_ string 4648 ctx_ context.Context 4649 header_ http.Header 4650} 4651 4652// Get: Gets the latest state of a long-running operation. Clients can 4653// use this 4654// method to poll the operation result at intervals as recommended by 4655// the API 4656// service. 4657func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { 4658 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4659 c.name = name 4660 return c 4661} 4662 4663// Fields allows partial responses to be retrieved. See 4664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4665// for more information. 4666func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { 4667 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4668 return c 4669} 4670 4671// IfNoneMatch sets the optional parameter which makes the operation 4672// fail if the object's ETag matches the given value. This is useful for 4673// getting updates only after the object has changed since the last 4674// request. Use googleapi.IsNotModified to check whether the response 4675// error from Do is the result of In-None-Match. 4676func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { 4677 c.ifNoneMatch_ = entityTag 4678 return c 4679} 4680 4681// Context sets the context to be used in this call's Do method. Any 4682// pending HTTP request will be aborted if the provided context is 4683// canceled. 4684func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { 4685 c.ctx_ = ctx 4686 return c 4687} 4688 4689// Header returns an http.Header that can be modified by the caller to 4690// add HTTP headers to the request. 4691func (c *ProjectsOperationsGetCall) Header() http.Header { 4692 if c.header_ == nil { 4693 c.header_ = make(http.Header) 4694 } 4695 return c.header_ 4696} 4697 4698func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 4699 reqHeaders := make(http.Header) 4700 reqHeaders.Set("x-goog-api-client", "gl-go/1.11.0 gdcl/20190926") 4701 for k, v := range c.header_ { 4702 reqHeaders[k] = v 4703 } 4704 reqHeaders.Set("User-Agent", c.s.userAgent()) 4705 if c.ifNoneMatch_ != "" { 4706 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4707 } 4708 var body io.Reader = nil 4709 c.urlParams_.Set("alt", alt) 4710 c.urlParams_.Set("prettyPrint", "false") 4711 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4712 urls += "?" + c.urlParams_.Encode() 4713 req, err := http.NewRequest("GET", urls, body) 4714 if err != nil { 4715 return nil, err 4716 } 4717 req.Header = reqHeaders 4718 googleapi.Expand(req.URL, map[string]string{ 4719 "name": c.name, 4720 }) 4721 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4722} 4723 4724// Do executes the "remotebuildexecution.projects.operations.get" call. 4725// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4726// Any non-2xx status code is an error. Response headers are in either 4727// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4728// was returned at all) in error.(*googleapi.Error).Header. Use 4729// googleapi.IsNotModified to check whether the returned error was 4730// because http.StatusNotModified was returned. 4731func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4732 gensupport.SetOptions(c.urlParams_, opts...) 4733 res, err := c.doRequest("json") 4734 if res != nil && res.StatusCode == http.StatusNotModified { 4735 if res.Body != nil { 4736 res.Body.Close() 4737 } 4738 return nil, &googleapi.Error{ 4739 Code: res.StatusCode, 4740 Header: res.Header, 4741 } 4742 } 4743 if err != nil { 4744 return nil, err 4745 } 4746 defer googleapi.CloseBody(res) 4747 if err := googleapi.CheckResponse(res); err != nil { 4748 return nil, err 4749 } 4750 ret := &GoogleLongrunningOperation{ 4751 ServerResponse: googleapi.ServerResponse{ 4752 Header: res.Header, 4753 HTTPStatusCode: res.StatusCode, 4754 }, 4755 } 4756 target := &ret 4757 if err := gensupport.DecodeResponse(target, res); err != nil { 4758 return nil, err 4759 } 4760 return ret, nil 4761 // { 4762 // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.", 4763 // "flatPath": "v1alpha/projects/{projectsId}/operations/{operationsId}", 4764 // "httpMethod": "GET", 4765 // "id": "remotebuildexecution.projects.operations.get", 4766 // "parameterOrder": [ 4767 // "name" 4768 // ], 4769 // "parameters": { 4770 // "name": { 4771 // "description": "The name of the operation resource.", 4772 // "location": "path", 4773 // "pattern": "^projects/[^/]+/operations/[^/]+$", 4774 // "required": true, 4775 // "type": "string" 4776 // } 4777 // }, 4778 // "path": "v1alpha/{+name}", 4779 // "response": { 4780 // "$ref": "GoogleLongrunningOperation" 4781 // }, 4782 // "scopes": [ 4783 // "https://www.googleapis.com/auth/cloud-platform" 4784 // ] 4785 // } 4786 4787} 4788