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/v1" 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/v1" 39 40import ( 41 "bytes" 42 "context" 43 "encoding/json" 44 "errors" 45 "fmt" 46 "io" 47 "net/http" 48 "net/url" 49 "strconv" 50 "strings" 51 52 googleapi "google.golang.org/api/googleapi" 53 gensupport "google.golang.org/api/internal/gensupport" 54 option "google.golang.org/api/option" 55 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:v1" 73const apiName = "remotebuildexecution" 74const apiVersion = "v1" 75const basePath = "https://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.Media = NewMediaService(s) 115 s.Operations = NewOperationsService(s) 116 s.Projects = NewProjectsService(s) 117 return s, nil 118} 119 120type Service struct { 121 client *http.Client 122 BasePath string // API endpoint base URL 123 UserAgent string // optional additional User-Agent fragment 124 125 Media *MediaService 126 127 Operations *OperationsService 128 129 Projects *ProjectsService 130} 131 132func (s *Service) userAgent() string { 133 if s.UserAgent == "" { 134 return googleapi.UserAgent 135 } 136 return googleapi.UserAgent + " " + s.UserAgent 137} 138 139func NewMediaService(s *Service) *MediaService { 140 rs := &MediaService{s: s} 141 return rs 142} 143 144type MediaService struct { 145 s *Service 146} 147 148func NewOperationsService(s *Service) *OperationsService { 149 rs := &OperationsService{s: s} 150 return rs 151} 152 153type OperationsService struct { 154 s *Service 155} 156 157func NewProjectsService(s *Service) *ProjectsService { 158 rs := &ProjectsService{s: s} 159 rs.Operations = NewProjectsOperationsService(s) 160 return rs 161} 162 163type ProjectsService struct { 164 s *Service 165 166 Operations *ProjectsOperationsService 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// GoogleBytestreamMedia: Media resource. 1618type GoogleBytestreamMedia struct { 1619 // ResourceName: Name of the media resource. 1620 ResourceName string `json:"resourceName,omitempty"` 1621 1622 // ServerResponse contains the HTTP response code and headers from the 1623 // server. 1624 googleapi.ServerResponse `json:"-"` 1625 1626 // ForceSendFields is a list of field names (e.g. "ResourceName") to 1627 // unconditionally include in API requests. By default, fields with 1628 // empty values are omitted from API requests. However, any non-pointer, 1629 // non-interface field appearing in ForceSendFields will be sent to the 1630 // server regardless of whether the field is empty or not. This may be 1631 // used to include empty fields in Patch requests. 1632 ForceSendFields []string `json:"-"` 1633 1634 // NullFields is a list of field names (e.g. "ResourceName") to include 1635 // in API requests with the JSON null value. By default, fields with 1636 // empty values are omitted from API requests. However, any field with 1637 // an empty value appearing in NullFields will be sent to the server as 1638 // null. It is an error if a field in this list has a non-empty value. 1639 // This may be used to include null fields in Patch requests. 1640 NullFields []string `json:"-"` 1641} 1642 1643func (s *GoogleBytestreamMedia) MarshalJSON() ([]byte, error) { 1644 type NoMethod GoogleBytestreamMedia 1645 raw := NoMethod(*s) 1646 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1647} 1648 1649// GoogleDevtoolsRemotebuildbotCommandDurations: CommandDuration 1650// contains the various duration metrics tracked when a bot 1651// performs a command. 1652type GoogleDevtoolsRemotebuildbotCommandDurations struct { 1653 // DockerPrep: The time spent preparing the command to be run in a 1654 // Docker container 1655 // (includes pulling the Docker image, if necessary). 1656 DockerPrep string `json:"dockerPrep,omitempty"` 1657 1658 // DockerPrepStartTime: The timestamp when docker prepartion begins. 1659 DockerPrepStartTime string `json:"dockerPrepStartTime,omitempty"` 1660 1661 // Download: The time spent downloading the input files and constructing 1662 // the working 1663 // directory. 1664 Download string `json:"download,omitempty"` 1665 1666 // DownloadStartTime: The timestamp when downloading the input files 1667 // begins. 1668 DownloadStartTime string `json:"downloadStartTime,omitempty"` 1669 1670 // ExecStartTime: The timestamp when execution begins. 1671 ExecStartTime string `json:"execStartTime,omitempty"` 1672 1673 // Execution: The time spent executing the command (i.e., doing useful 1674 // work). 1675 Execution string `json:"execution,omitempty"` 1676 1677 // IsoPrepDone: The timestamp when preparation is done and bot starts 1678 // downloading files. 1679 IsoPrepDone string `json:"isoPrepDone,omitempty"` 1680 1681 // Overall: The time spent completing the command, in total. 1682 Overall string `json:"overall,omitempty"` 1683 1684 // Stdout: The time spent uploading the stdout logs. 1685 Stdout string `json:"stdout,omitempty"` 1686 1687 // Upload: The time spent uploading the output files. 1688 Upload string `json:"upload,omitempty"` 1689 1690 // UploadStartTime: The timestamp when uploading the output files 1691 // begins. 1692 UploadStartTime string `json:"uploadStartTime,omitempty"` 1693 1694 // ForceSendFields is a list of field names (e.g. "DockerPrep") to 1695 // unconditionally include in API requests. By default, fields with 1696 // empty values are omitted from API requests. However, any non-pointer, 1697 // non-interface field appearing in ForceSendFields will be sent to the 1698 // server regardless of whether the field is empty or not. This may be 1699 // used to include empty fields in Patch requests. 1700 ForceSendFields []string `json:"-"` 1701 1702 // NullFields is a list of field names (e.g. "DockerPrep") to include in 1703 // API requests with the JSON null value. By default, fields with empty 1704 // values are omitted from API requests. However, any field with an 1705 // empty value appearing in NullFields will be sent to the server as 1706 // null. It is an error if a field in this list has a non-empty value. 1707 // This may be used to include null fields in Patch requests. 1708 NullFields []string `json:"-"` 1709} 1710 1711func (s *GoogleDevtoolsRemotebuildbotCommandDurations) MarshalJSON() ([]byte, error) { 1712 type NoMethod GoogleDevtoolsRemotebuildbotCommandDurations 1713 raw := NoMethod(*s) 1714 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1715} 1716 1717// GoogleDevtoolsRemotebuildbotCommandEvents: CommandEvents contains 1718// counters for the number of warnings and errors 1719// that occurred during the execution of a command. 1720type GoogleDevtoolsRemotebuildbotCommandEvents struct { 1721 // DockerCacheHit: Indicates whether we are using a cached Docker image 1722 // (true) or had to pull 1723 // the Docker image (false) for this command. 1724 DockerCacheHit bool `json:"dockerCacheHit,omitempty"` 1725 1726 // InputCacheMiss: The input cache miss ratio. 1727 InputCacheMiss float64 `json:"inputCacheMiss,omitempty"` 1728 1729 // NumErrors: The number of errors reported. 1730 NumErrors uint64 `json:"numErrors,omitempty,string"` 1731 1732 // NumWarnings: The number of warnings reported. 1733 NumWarnings uint64 `json:"numWarnings,omitempty,string"` 1734 1735 // ForceSendFields is a list of field names (e.g. "DockerCacheHit") to 1736 // unconditionally include in API requests. By default, fields with 1737 // empty values are omitted from API requests. However, any non-pointer, 1738 // non-interface field appearing in ForceSendFields will be sent to the 1739 // server regardless of whether the field is empty or not. This may be 1740 // used to include empty fields in Patch requests. 1741 ForceSendFields []string `json:"-"` 1742 1743 // NullFields is a list of field names (e.g. "DockerCacheHit") to 1744 // include in API requests with the JSON null value. By default, fields 1745 // with empty values are omitted from API requests. However, any field 1746 // with an empty value appearing in NullFields will be sent to the 1747 // server as null. It is an error if a field in this list has a 1748 // non-empty value. This may be used to include null fields in Patch 1749 // requests. 1750 NullFields []string `json:"-"` 1751} 1752 1753func (s *GoogleDevtoolsRemotebuildbotCommandEvents) MarshalJSON() ([]byte, error) { 1754 type NoMethod GoogleDevtoolsRemotebuildbotCommandEvents 1755 raw := NoMethod(*s) 1756 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1757} 1758 1759func (s *GoogleDevtoolsRemotebuildbotCommandEvents) UnmarshalJSON(data []byte) error { 1760 type NoMethod GoogleDevtoolsRemotebuildbotCommandEvents 1761 var s1 struct { 1762 InputCacheMiss gensupport.JSONFloat64 `json:"inputCacheMiss"` 1763 *NoMethod 1764 } 1765 s1.NoMethod = (*NoMethod)(s) 1766 if err := json.Unmarshal(data, &s1); err != nil { 1767 return err 1768 } 1769 s.InputCacheMiss = float64(s1.InputCacheMiss) 1770 return nil 1771} 1772 1773// GoogleDevtoolsRemotebuildbotCommandStatus: The internal status of the 1774// command result. 1775type GoogleDevtoolsRemotebuildbotCommandStatus struct { 1776 // Code: The status code. 1777 // 1778 // Possible values: 1779 // "OK" - The command succeeded. 1780 // "INVALID_ARGUMENT" - The command input was invalid. 1781 // "DEADLINE_EXCEEDED" - The command had passed its expiry time while 1782 // it was still running. 1783 // "NOT_FOUND" - The resources requested by the command were not 1784 // found. 1785 // "PERMISSION_DENIED" - The command failed due to permission errors. 1786 // "INTERNAL" - The command failed because of some invariants expected 1787 // by the underlying 1788 // system have been broken. This usually indicates a bug wit the system. 1789 // "ABORTED" - The command was aborted. 1790 // "CLEANUP_ERROR" - The bot failed to do the cleanup, e.g. unable to 1791 // delete the command 1792 // working directory or the command process. 1793 // "DOWNLOAD_INPUTS_ERROR" - The bot failed to download the inputs. 1794 // "UNKNOWN" - Unknown error. 1795 // "UPLOAD_OUTPUTS_ERROR" - The bot failed to upload the outputs. 1796 // "DOCKER_LOGIN_ERROR" - The bot failed to login to docker. 1797 // "DOCKER_IMAGE_PULL_ERROR" - The bot failed to pull docker image. 1798 // "DOCKER_IMAGE_EXIST_ERROR" - The bot failed to check docker images. 1799 // "DUPLICATE_INPUTS" - The inputs contain duplicate files. 1800 // "DOCKER_IMAGE_PERMISSION_DENIED" - The bot doesn't have the 1801 // permissions to pull docker images. 1802 // "DOCKER_IMAGE_NOT_FOUND" - The docker image cannot be found. 1803 // "WORKING_DIR_NOT_FOUND" - Working directory is not found. 1804 // "WORKING_DIR_NOT_IN_BASE_DIR" - Working directory is not under the 1805 // base directory 1806 // "DOCKER_UNAVAILABLE" - There are issues with docker 1807 // service/runtime. 1808 Code string `json:"code,omitempty"` 1809 1810 // Message: The error message. 1811 Message string `json:"message,omitempty"` 1812 1813 // ForceSendFields is a list of field names (e.g. "Code") to 1814 // unconditionally include in API requests. By default, fields with 1815 // empty values are omitted from API requests. However, any non-pointer, 1816 // non-interface field appearing in ForceSendFields will be sent to the 1817 // server regardless of whether the field is empty or not. This may be 1818 // used to include empty fields in Patch requests. 1819 ForceSendFields []string `json:"-"` 1820 1821 // NullFields is a list of field names (e.g. "Code") to include in API 1822 // requests with the JSON null value. By default, fields with empty 1823 // values are omitted from API requests. However, any field with an 1824 // empty value appearing in NullFields will be sent to the server as 1825 // null. It is an error if a field in this list has a non-empty value. 1826 // This may be used to include null fields in Patch requests. 1827 NullFields []string `json:"-"` 1828} 1829 1830func (s *GoogleDevtoolsRemotebuildbotCommandStatus) MarshalJSON() ([]byte, error) { 1831 type NoMethod GoogleDevtoolsRemotebuildbotCommandStatus 1832 raw := NoMethod(*s) 1833 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1834} 1835 1836// GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig: 1837// AcceleratorConfig defines the accelerator cards to attach to the VM. 1838type GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig struct { 1839 // AcceleratorCount: The number of guest accelerator cards exposed to 1840 // each VM. 1841 AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` 1842 1843 // AcceleratorType: The type of accelerator to attach to each VM, e.g. 1844 // "nvidia-tesla-k80" for 1845 // nVidia Tesla K80. 1846 AcceleratorType string `json:"acceleratorType,omitempty"` 1847 1848 // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to 1849 // unconditionally include in API requests. By default, fields with 1850 // empty values are omitted from API requests. However, any non-pointer, 1851 // non-interface field appearing in ForceSendFields will be sent to the 1852 // server regardless of whether the field is empty or not. This may be 1853 // used to include empty fields in Patch requests. 1854 ForceSendFields []string `json:"-"` 1855 1856 // NullFields is a list of field names (e.g. "AcceleratorCount") to 1857 // include in API requests with the JSON null value. By default, fields 1858 // with empty values are omitted from API requests. However, any field 1859 // with an empty value appearing in NullFields will be sent to the 1860 // server as null. It is an error if a field in this list has a 1861 // non-empty value. This may be used to include null fields in Patch 1862 // requests. 1863 NullFields []string `json:"-"` 1864} 1865 1866func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig) MarshalJSON() ([]byte, error) { 1867 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig 1868 raw := NoMethod(*s) 1869 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1870} 1871 1872// GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest: 1873// The request used for `CreateInstance`. 1874type GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest struct { 1875 // Instance: Specifies the instance to create. 1876 // The name in the instance, if specified in the instance, is ignored. 1877 Instance *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance `json:"instance,omitempty"` 1878 1879 // InstanceId: ID of the created instance. 1880 // A valid `instance_id` must: 1881 // be 6-50 characters long, 1882 // contain only lowercase letters, digits, hyphens and 1883 // underscores, 1884 // start with a lowercase letter, and 1885 // end with a lowercase letter or a digit. 1886 InstanceId string `json:"instanceId,omitempty"` 1887 1888 // Parent: Resource name of the project containing the instance. 1889 // Format: `projects/[PROJECT_ID]`. 1890 Parent string `json:"parent,omitempty"` 1891 1892 // ForceSendFields is a list of field names (e.g. "Instance") to 1893 // unconditionally include in API requests. By default, fields with 1894 // empty values are omitted from API requests. However, any non-pointer, 1895 // non-interface field appearing in ForceSendFields will be sent to the 1896 // server regardless of whether the field is empty or not. This may be 1897 // used to include empty fields in Patch requests. 1898 ForceSendFields []string `json:"-"` 1899 1900 // NullFields is a list of field names (e.g. "Instance") to include in 1901 // API requests with the JSON null value. By default, fields with empty 1902 // values are omitted from API requests. However, any field with an 1903 // empty value appearing in NullFields will be sent to the server as 1904 // null. It is an error if a field in this list has a non-empty value. 1905 // This may be used to include null fields in Patch requests. 1906 NullFields []string `json:"-"` 1907} 1908 1909func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest) MarshalJSON() ([]byte, error) { 1910 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest 1911 raw := NoMethod(*s) 1912 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1913} 1914 1915// GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest: 1916// The request used for `CreateWorkerPool`. 1917type GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest struct { 1918 // Parent: Resource name of the instance in which to create the new 1919 // worker pool. 1920 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 1921 Parent string `json:"parent,omitempty"` 1922 1923 // PoolId: ID of the created worker pool. 1924 // A valid pool ID must: 1925 // be 6-50 characters long, 1926 // contain only lowercase letters, digits, hyphens and 1927 // underscores, 1928 // start with a lowercase letter, and 1929 // end with a lowercase letter or a digit. 1930 PoolId string `json:"poolId,omitempty"` 1931 1932 // WorkerPool: Specifies the worker pool to create. 1933 // The name in the worker pool, if specified, is ignored. 1934 WorkerPool *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPool,omitempty"` 1935 1936 // ForceSendFields is a list of field names (e.g. "Parent") to 1937 // unconditionally include in API requests. By default, fields with 1938 // empty values are omitted from API requests. However, any non-pointer, 1939 // non-interface field appearing in ForceSendFields will be sent to the 1940 // server regardless of whether the field is empty or not. This may be 1941 // used to include empty fields in Patch requests. 1942 ForceSendFields []string `json:"-"` 1943 1944 // NullFields is a list of field names (e.g. "Parent") to include in API 1945 // requests with the JSON null value. By default, fields with empty 1946 // values are omitted from API requests. However, any field with an 1947 // empty value appearing in NullFields will be sent to the server as 1948 // null. It is an error if a field in this list has a non-empty value. 1949 // This may be used to include null fields in Patch requests. 1950 NullFields []string `json:"-"` 1951} 1952 1953func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest) MarshalJSON() ([]byte, error) { 1954 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest 1955 raw := NoMethod(*s) 1956 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1957} 1958 1959// GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest: 1960// The request used for `DeleteInstance`. 1961type GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest struct { 1962 // Name: Name of the instance to delete. 1963 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 1964 Name string `json:"name,omitempty"` 1965 1966 // ForceSendFields is a list of field names (e.g. "Name") to 1967 // unconditionally include in API requests. By default, fields with 1968 // empty values are omitted from API requests. However, any non-pointer, 1969 // non-interface field appearing in ForceSendFields will be sent to the 1970 // server regardless of whether the field is empty or not. This may be 1971 // used to include empty fields in Patch requests. 1972 ForceSendFields []string `json:"-"` 1973 1974 // NullFields is a list of field names (e.g. "Name") to include in API 1975 // requests with the JSON null value. By default, fields with empty 1976 // values are omitted from API requests. However, any field with an 1977 // empty value appearing in NullFields will be sent to the server as 1978 // null. It is an error if a field in this list has a non-empty value. 1979 // This may be used to include null fields in Patch requests. 1980 NullFields []string `json:"-"` 1981} 1982 1983func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest) MarshalJSON() ([]byte, error) { 1984 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest 1985 raw := NoMethod(*s) 1986 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1987} 1988 1989// GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest: 1990// The request used for DeleteWorkerPool. 1991type GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest struct { 1992 // Name: Name of the worker pool to 1993 // delete. 1994 // Format: 1995 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerp 1996 // ools/[POOL_ID]`. 1997 Name string `json:"name,omitempty"` 1998 1999 // ForceSendFields is a list of field names (e.g. "Name") to 2000 // unconditionally include in API requests. By default, fields with 2001 // empty values are omitted from API requests. However, any non-pointer, 2002 // non-interface field appearing in ForceSendFields will be sent to the 2003 // server regardless of whether the field is empty or not. This may be 2004 // used to include empty fields in Patch requests. 2005 ForceSendFields []string `json:"-"` 2006 2007 // NullFields is a list of field names (e.g. "Name") to include in API 2008 // requests with the JSON null value. By default, fields with empty 2009 // values are omitted from API requests. However, any field with an 2010 // empty value appearing in NullFields will be sent to the server as 2011 // null. It is an error if a field in this list has a non-empty value. 2012 // This may be used to include null fields in Patch requests. 2013 NullFields []string `json:"-"` 2014} 2015 2016func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2017 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest 2018 raw := NoMethod(*s) 2019 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2020} 2021 2022// GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest: The 2023// request used for `GetInstance`. 2024type GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest struct { 2025 // Name: Name of the instance to retrieve. 2026 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2027 Name string `json:"name,omitempty"` 2028 2029 // ForceSendFields is a list of field names (e.g. "Name") to 2030 // unconditionally include in API requests. By default, fields with 2031 // empty values are omitted from API requests. However, any non-pointer, 2032 // non-interface field appearing in ForceSendFields will be sent to the 2033 // server regardless of whether the field is empty or not. This may be 2034 // used to include empty fields in Patch requests. 2035 ForceSendFields []string `json:"-"` 2036 2037 // NullFields is a list of field names (e.g. "Name") to include in API 2038 // requests with the JSON null value. By default, fields with empty 2039 // values are omitted from API requests. However, any field with an 2040 // empty value appearing in NullFields will be sent to the server as 2041 // null. It is an error if a field in this list has a non-empty value. 2042 // This may be used to include null fields in Patch requests. 2043 NullFields []string `json:"-"` 2044} 2045 2046func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest) MarshalJSON() ([]byte, error) { 2047 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest 2048 raw := NoMethod(*s) 2049 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2050} 2051 2052// GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest: 2053// The request used for GetWorkerPool. 2054type GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest struct { 2055 // Name: Name of the worker pool to 2056 // retrieve. 2057 // Format: 2058 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/worke 2059 // rpools/[POOL_ID]`. 2060 Name string `json:"name,omitempty"` 2061 2062 // ForceSendFields is a list of field names (e.g. "Name") to 2063 // unconditionally include in API requests. By default, fields with 2064 // empty values are omitted from API requests. However, any non-pointer, 2065 // non-interface field appearing in ForceSendFields will be sent to the 2066 // server regardless of whether the field is empty or not. This may be 2067 // used to include empty fields in Patch requests. 2068 ForceSendFields []string `json:"-"` 2069 2070 // NullFields is a list of field names (e.g. "Name") to include in API 2071 // requests with the JSON null value. By default, fields with empty 2072 // values are omitted from API requests. However, any field with an 2073 // empty value appearing in NullFields will be sent to the server as 2074 // null. It is an error if a field in this list has a non-empty value. 2075 // This may be used to include null fields in Patch requests. 2076 NullFields []string `json:"-"` 2077} 2078 2079func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2080 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest 2081 raw := NoMethod(*s) 2082 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2083} 2084 2085// GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance: Instance 2086// conceptually encapsulates all Remote Build Execution resources 2087// for remote builds. 2088// An instance consists of storage and compute resources (for 2089// example, 2090// `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used 2091// for 2092// running remote builds. 2093// All Remote Build Execution API calls are scoped to an instance. 2094type GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance struct { 2095 // Location: The location is a GCP region. Currently only `us-central1` 2096 // is supported. 2097 Location string `json:"location,omitempty"` 2098 2099 // LoggingEnabled: Output only. Whether stack driver logging is enabled 2100 // for the instance. 2101 LoggingEnabled bool `json:"loggingEnabled,omitempty"` 2102 2103 // Name: Output only. Instance resource name formatted 2104 // as: 2105 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2106 // Name should not be populated when creating an instance since it is 2107 // provided 2108 // in the `instance_id` field. 2109 Name string `json:"name,omitempty"` 2110 2111 // State: Output only. State of the instance. 2112 // 2113 // Possible values: 2114 // "STATE_UNSPECIFIED" - Not a valid state, but the default value of 2115 // the enum. 2116 // "CREATING" - The instance is in state `CREATING` once 2117 // `CreateInstance` is called and 2118 // before the instance is ready for use. 2119 // "RUNNING" - The instance is in state `RUNNING` when it is ready for 2120 // use. 2121 // "INACTIVE" - An `INACTIVE` instance indicates that there is a 2122 // problem that needs to be 2123 // fixed. Such instances cannot be used for execution and instances 2124 // that 2125 // remain in this state for a significant period of time will be 2126 // removed 2127 // permanently. 2128 State string `json:"state,omitempty"` 2129 2130 // ForceSendFields is a list of field names (e.g. "Location") to 2131 // unconditionally include in API requests. By default, fields with 2132 // empty values are omitted from API requests. However, any non-pointer, 2133 // non-interface field appearing in ForceSendFields will be sent to the 2134 // server regardless of whether the field is empty or not. This may be 2135 // used to include empty fields in Patch requests. 2136 ForceSendFields []string `json:"-"` 2137 2138 // NullFields is a list of field names (e.g. "Location") to include in 2139 // API requests with the JSON null value. By default, fields with empty 2140 // values are omitted from API requests. However, any field with an 2141 // empty value appearing in NullFields will be sent to the server as 2142 // null. It is an error if a field in this list has a non-empty value. 2143 // This may be used to include null fields in Patch requests. 2144 NullFields []string `json:"-"` 2145} 2146 2147func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance) MarshalJSON() ([]byte, error) { 2148 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance 2149 raw := NoMethod(*s) 2150 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2151} 2152 2153type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest struct { 2154 // Parent: Resource name of the project. 2155 // Format: `projects/[PROJECT_ID]`. 2156 Parent string `json:"parent,omitempty"` 2157 2158 // ForceSendFields is a list of field names (e.g. "Parent") to 2159 // unconditionally include in API requests. By default, fields with 2160 // empty values are omitted from API requests. However, any non-pointer, 2161 // non-interface field appearing in ForceSendFields will be sent to the 2162 // server regardless of whether the field is empty or not. This may be 2163 // used to include empty fields in Patch requests. 2164 ForceSendFields []string `json:"-"` 2165 2166 // NullFields is a list of field names (e.g. "Parent") to include in API 2167 // requests with the JSON null value. By default, fields with empty 2168 // values are omitted from API requests. However, any field with an 2169 // empty value appearing in NullFields will be sent to the server as 2170 // null. It is an error if a field in this list has a non-empty value. 2171 // This may be used to include null fields in Patch requests. 2172 NullFields []string `json:"-"` 2173} 2174 2175func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest) MarshalJSON() ([]byte, error) { 2176 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest 2177 raw := NoMethod(*s) 2178 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2179} 2180 2181type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse struct { 2182 // Instances: The list of instances in a given project. 2183 Instances []*GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance `json:"instances,omitempty"` 2184 2185 // ForceSendFields is a list of field names (e.g. "Instances") to 2186 // unconditionally include in API requests. By default, fields with 2187 // empty values are omitted from API requests. However, any non-pointer, 2188 // non-interface field appearing in ForceSendFields will be sent to the 2189 // server regardless of whether the field is empty or not. This may be 2190 // used to include empty fields in Patch requests. 2191 ForceSendFields []string `json:"-"` 2192 2193 // NullFields is a list of field names (e.g. "Instances") to include in 2194 // API requests with the JSON null value. By default, fields with empty 2195 // values are omitted from API requests. However, any field with an 2196 // empty value appearing in NullFields will be sent to the server as 2197 // null. It is an error if a field in this list has a non-empty value. 2198 // This may be used to include null fields in Patch requests. 2199 NullFields []string `json:"-"` 2200} 2201 2202func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse) MarshalJSON() ([]byte, error) { 2203 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse 2204 raw := NoMethod(*s) 2205 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2206} 2207 2208type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest struct { 2209 // Filter: Optional. A filter expression that filters resources listed 2210 // in 2211 // the response. The expression must specify the field name, a 2212 // comparison 2213 // operator, and the value that you want to use for filtering. The 2214 // value 2215 // must be a string, a number, or a boolean. String values 2216 // are 2217 // case-insensitive. 2218 // The comparison operator must be either `:`, `=`, `!=`, `>`, `>=`, 2219 // `<=` or 2220 // `<`. 2221 // The `:` operator can be used with string fields to match 2222 // substrings. 2223 // For non-string fields it is equivalent to the `=` operator. 2224 // The `:*` comparison can be used to test whether a key has been 2225 // defined. 2226 // 2227 // You can also filter on nested fields. 2228 // 2229 // To filter on multiple expressions, you can separate expression 2230 // using 2231 // `AND` and `OR` operators, using parentheses to specify precedence. 2232 // If 2233 // neither operator is specified, `AND` is assumed. 2234 // 2235 // Examples: 2236 // 2237 // Include only pools with more than 100 reserved 2238 // workers: 2239 // `(worker_count > 100) (worker_config.reserved = true)` 2240 // 2241 // Include only pools with a certain label or machines of the 2242 // n1-standard 2243 // family: 2244 // `worker_config.labels.key1 : * OR worker_config.machine_type: 2245 // n1-standard` 2246 Filter string `json:"filter,omitempty"` 2247 2248 // Parent: Resource name of the instance. 2249 // Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2250 Parent string `json:"parent,omitempty"` 2251 2252 // ForceSendFields is a list of field names (e.g. "Filter") to 2253 // unconditionally include in API requests. By default, fields with 2254 // empty values are omitted from API requests. However, any non-pointer, 2255 // non-interface field appearing in ForceSendFields will be sent to the 2256 // server regardless of whether the field is empty or not. This may be 2257 // used to include empty fields in Patch requests. 2258 ForceSendFields []string `json:"-"` 2259 2260 // NullFields is a list of field names (e.g. "Filter") to include in API 2261 // requests with the JSON null value. By default, fields with empty 2262 // values are omitted from API requests. However, any field with an 2263 // empty value appearing in NullFields will be sent to the server as 2264 // null. It is an error if a field in this list has a non-empty value. 2265 // This may be used to include null fields in Patch requests. 2266 NullFields []string `json:"-"` 2267} 2268 2269func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest) MarshalJSON() ([]byte, error) { 2270 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest 2271 raw := NoMethod(*s) 2272 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2273} 2274 2275type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse struct { 2276 // WorkerPools: The list of worker pools in a given instance. 2277 WorkerPools []*GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPools,omitempty"` 2278 2279 // ForceSendFields is a list of field names (e.g. "WorkerPools") to 2280 // unconditionally include in API requests. By default, fields with 2281 // empty values are omitted from API requests. However, any non-pointer, 2282 // non-interface field appearing in ForceSendFields will be sent to the 2283 // server regardless of whether the field is empty or not. This may be 2284 // used to include empty fields in Patch requests. 2285 ForceSendFields []string `json:"-"` 2286 2287 // NullFields is a list of field names (e.g. "WorkerPools") to include 2288 // in API requests with the JSON null value. By default, fields with 2289 // empty values are omitted from API requests. However, any field with 2290 // an empty value appearing in NullFields will be sent to the server as 2291 // null. It is an error if a field in this list has a non-empty value. 2292 // This may be used to include null fields in Patch requests. 2293 NullFields []string `json:"-"` 2294} 2295 2296func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse) MarshalJSON() ([]byte, error) { 2297 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse 2298 raw := NoMethod(*s) 2299 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2300} 2301 2302// GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest: 2303// The request used for UpdateWorkerPool. 2304type GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest struct { 2305 // UpdateMask: The update mask applies to worker_pool. For the 2306 // `FieldMask` 2307 // definition, 2308 // see 2309 // https://developers.google.com/protocol-buffers/docs/re 2310 // ference/google.protobuf#fieldmask 2311 // If an empty update_mask is provided, only the non-default valued 2312 // field in 2313 // the worker pool field will be updated. Note that in order to update a 2314 // field 2315 // to the default value (zero, false, empty string) an explicit 2316 // update_mask 2317 // must be provided. 2318 UpdateMask string `json:"updateMask,omitempty"` 2319 2320 // WorkerPool: Specifies the worker pool to update. 2321 WorkerPool *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPool,omitempty"` 2322 2323 // ForceSendFields is a list of field names (e.g. "UpdateMask") to 2324 // unconditionally include in API requests. By default, fields with 2325 // empty values are omitted from API requests. However, any non-pointer, 2326 // non-interface field appearing in ForceSendFields will be sent to the 2327 // server regardless of whether the field is empty or not. This may be 2328 // used to include empty fields in Patch requests. 2329 ForceSendFields []string `json:"-"` 2330 2331 // NullFields is a list of field names (e.g. "UpdateMask") to include in 2332 // API requests with the JSON null value. By default, fields with empty 2333 // values are omitted from API requests. However, any field with an 2334 // empty value appearing in NullFields will be sent to the server as 2335 // null. It is an error if a field in this list has a non-empty value. 2336 // This may be used to include null fields in Patch requests. 2337 NullFields []string `json:"-"` 2338} 2339 2340func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2341 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest 2342 raw := NoMethod(*s) 2343 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2344} 2345 2346// GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig: Defines 2347// the configuration to be used for a creating workers in 2348// the worker pool. 2349type GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig struct { 2350 // Accelerator: The accelerator card attached to each VM. 2351 Accelerator *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig `json:"accelerator,omitempty"` 2352 2353 // DiskSizeGb: Required. Size of the disk attached to the worker, in 2354 // GB. 2355 // See https://cloud.google.com/compute/docs/disks/ 2356 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 2357 2358 // DiskType: Required. Disk Type to use for the worker. 2359 // See 2360 // [Storage 2361 // options](https://cloud.google.com/compute/docs/disks/#introdu 2362 // ction). 2363 // Currently only `pd-standard` is supported. 2364 DiskType string `json:"diskType,omitempty"` 2365 2366 // Labels: Labels associated with the workers. 2367 // Label keys and values can be no longer than 63 characters, can only 2368 // contain 2369 // lowercase letters, numeric characters, underscores and 2370 // dashes. 2371 // International letters are permitted. Label keys must start with a 2372 // letter. 2373 // Label values are optional. 2374 // There can not be more than 64 labels per resource. 2375 Labels map[string]string `json:"labels,omitempty"` 2376 2377 // MachineType: Required. Machine type of the worker, such as 2378 // `n1-standard-2`. 2379 // See https://cloud.google.com/compute/docs/machine-types for a list 2380 // of 2381 // supported machine types. Note that `f1-micro` and `g1-small` are not 2382 // yet 2383 // supported. 2384 MachineType string `json:"machineType,omitempty"` 2385 2386 // MinCpuPlatform: Minimum CPU platform to use when creating the 2387 // worker. 2388 // See [CPU 2389 // Platforms](https://cloud.google.com/compute/docs/cpu-platforms). 2390 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 2391 2392 // NetworkAccess: Determines the type of network access granted to 2393 // workers. Possible values: 2394 // 2395 // - "public": Workers can connect to the public internet. 2396 // - "private": Workers can only connect to Google APIs and services. 2397 // - "restricted-private": Workers can only connect to Google APIs that 2398 // are 2399 // reachable through `restricted.googleapis.com` (`199.36.153.4/30`). 2400 NetworkAccess string `json:"networkAccess,omitempty"` 2401 2402 // Reserved: Determines whether the worker is reserved (equivalent to a 2403 // Compute Engine 2404 // on-demand VM and therefore won't be preempted). 2405 // See [Preemptible VMs](https://cloud.google.com/preemptible-vms/) for 2406 // more 2407 // details. 2408 Reserved bool `json:"reserved,omitempty"` 2409 2410 // ForceSendFields is a list of field names (e.g. "Accelerator") to 2411 // unconditionally include in API requests. By default, fields with 2412 // empty values are omitted from API requests. However, any non-pointer, 2413 // non-interface field appearing in ForceSendFields will be sent to the 2414 // server regardless of whether the field is empty or not. This may be 2415 // used to include empty fields in Patch requests. 2416 ForceSendFields []string `json:"-"` 2417 2418 // NullFields is a list of field names (e.g. "Accelerator") to include 2419 // in API requests with the JSON null value. By default, fields with 2420 // empty values are omitted from API requests. However, any field with 2421 // an empty value appearing in NullFields will be sent to the server as 2422 // null. It is an error if a field in this list has a non-empty value. 2423 // This may be used to include null fields in Patch requests. 2424 NullFields []string `json:"-"` 2425} 2426 2427func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig) MarshalJSON() ([]byte, error) { 2428 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig 2429 raw := NoMethod(*s) 2430 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2431} 2432 2433// GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool: A worker 2434// pool resource in the Remote Build Execution API. 2435type GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool struct { 2436 // Name: WorkerPool resource name formatted 2437 // as: 2438 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_I 2439 // D]`. 2440 // name should not be populated when creating a worker pool since it 2441 // is 2442 // provided in the `poolId` field. 2443 Name string `json:"name,omitempty"` 2444 2445 // State: Output only. State of the worker pool. 2446 // 2447 // Possible values: 2448 // "STATE_UNSPECIFIED" - Not a valid state, but the default value of 2449 // the enum. 2450 // "CREATING" - The worker pool is in state `CREATING` once 2451 // `CreateWorkerPool` is called 2452 // and before all requested workers are ready. 2453 // "RUNNING" - The worker pool is in state `RUNNING` when all its 2454 // workers are ready for 2455 // use. 2456 // "UPDATING" - The worker pool is in state `UPDATING` once 2457 // `UpdateWorkerPool` is called 2458 // and before the new configuration has all the requested workers ready 2459 // for 2460 // use, and no older configuration has any workers. At that point the 2461 // state 2462 // transitions to `RUNNING`. 2463 // "DELETING" - The worker pool is in state `DELETING` once the 2464 // `Delete` method is called 2465 // and before the deletion completes. 2466 // "INACTIVE" - The worker pool is in state `INACTIVE` when the 2467 // instance hosting the 2468 // worker pool in not running. 2469 State string `json:"state,omitempty"` 2470 2471 // WorkerConfig: Specifies the properties, such as machine type and disk 2472 // size, used for 2473 // creating workers in a worker pool. 2474 WorkerConfig *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig `json:"workerConfig,omitempty"` 2475 2476 // WorkerCount: The desired number of workers in the worker pool. Must 2477 // be a value between 2478 // 0 and 1000. 2479 WorkerCount int64 `json:"workerCount,omitempty,string"` 2480 2481 // ForceSendFields is a list of field names (e.g. "Name") to 2482 // unconditionally include in API requests. By default, fields with 2483 // empty values are omitted from API requests. However, any non-pointer, 2484 // non-interface field appearing in ForceSendFields will be sent to the 2485 // server regardless of whether the field is empty or not. This may be 2486 // used to include empty fields in Patch requests. 2487 ForceSendFields []string `json:"-"` 2488 2489 // NullFields is a list of field names (e.g. "Name") to include in API 2490 // requests with the JSON null value. By default, fields with empty 2491 // values are omitted from API requests. However, any field with an 2492 // empty value appearing in NullFields will be sent to the server as 2493 // null. It is an error if a field in this list has a non-empty value. 2494 // This may be used to include null fields in Patch requests. 2495 NullFields []string `json:"-"` 2496} 2497 2498func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool) MarshalJSON() ([]byte, error) { 2499 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool 2500 raw := NoMethod(*s) 2501 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2502} 2503 2504// GoogleDevtoolsRemoteworkersV1test2AdminTemp: AdminTemp is a 2505// prelimiary set of administration tasks. It's called "Temp" 2506// because we do not yet know the best way to represent admin tasks; 2507// it's 2508// possible that this will be entirely replaced in later versions of 2509// this API. 2510// If this message proves to be sufficient, it will be renamed in the 2511// alpha or 2512// beta release of this API. 2513// 2514// This message (suitably marshalled into a protobuf.Any) can be used as 2515// the 2516// inline_assignment field in a lease; the lease assignment field should 2517// simply 2518// be "admin" in these cases. 2519// 2520// This message is heavily based on Swarming administration tasks from 2521// the LUCI 2522// project (http://github.com/luci/luci-py/appengine/swarming). 2523type GoogleDevtoolsRemoteworkersV1test2AdminTemp struct { 2524 // Arg: The argument to the admin action; see `Command` for semantics. 2525 Arg string `json:"arg,omitempty"` 2526 2527 // Command: The admin action; see `Command` for legal values. 2528 // 2529 // Possible values: 2530 // "UNSPECIFIED" - Illegal value. 2531 // "BOT_UPDATE" - Download and run a new version of the bot. `arg` 2532 // will be a resource 2533 // accessible via `ByteStream.Read` to obtain the new bot code. 2534 // "BOT_RESTART" - Restart the bot without downloading a new version. 2535 // `arg` will be a 2536 // message to log. 2537 // "BOT_TERMINATE" - Shut down the bot. `arg` will be a task resource 2538 // name (similar to those 2539 // in tasks.proto) that the bot can use to tell the server that it 2540 // is 2541 // terminating. 2542 // "HOST_RESTART" - Restart the host computer. `arg` will be a message 2543 // to log. 2544 Command string `json:"command,omitempty"` 2545 2546 // ForceSendFields is a list of field names (e.g. "Arg") to 2547 // unconditionally include in API requests. By default, fields with 2548 // empty values are omitted from API requests. However, any non-pointer, 2549 // non-interface field appearing in ForceSendFields will be sent to the 2550 // server regardless of whether the field is empty or not. This may be 2551 // used to include empty fields in Patch requests. 2552 ForceSendFields []string `json:"-"` 2553 2554 // NullFields is a list of field names (e.g. "Arg") to include in API 2555 // requests with the JSON null value. By default, fields with empty 2556 // values are omitted from API requests. However, any field with an 2557 // empty value appearing in NullFields will be sent to the server as 2558 // null. It is an error if a field in this list has a non-empty value. 2559 // This may be used to include null fields in Patch requests. 2560 NullFields []string `json:"-"` 2561} 2562 2563func (s *GoogleDevtoolsRemoteworkersV1test2AdminTemp) MarshalJSON() ([]byte, error) { 2564 type NoMethod GoogleDevtoolsRemoteworkersV1test2AdminTemp 2565 raw := NoMethod(*s) 2566 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2567} 2568 2569// GoogleDevtoolsRemoteworkersV1test2Blob: Describes a blob of binary 2570// content with its digest. 2571type GoogleDevtoolsRemoteworkersV1test2Blob struct { 2572 // Contents: The contents of the blob. 2573 Contents string `json:"contents,omitempty"` 2574 2575 // Digest: The digest of the blob. This should be verified by the 2576 // receiver. 2577 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 2578 2579 // ForceSendFields is a list of field names (e.g. "Contents") to 2580 // unconditionally include in API requests. By default, fields with 2581 // empty values are omitted from API requests. However, any non-pointer, 2582 // non-interface field appearing in ForceSendFields will be sent to the 2583 // server regardless of whether the field is empty or not. This may be 2584 // used to include empty fields in Patch requests. 2585 ForceSendFields []string `json:"-"` 2586 2587 // NullFields is a list of field names (e.g. "Contents") to include in 2588 // API requests with the JSON null value. By default, fields with empty 2589 // values are omitted from API requests. However, any field with an 2590 // empty value appearing in NullFields will be sent to the server as 2591 // null. It is an error if a field in this list has a non-empty value. 2592 // This may be used to include null fields in Patch requests. 2593 NullFields []string `json:"-"` 2594} 2595 2596func (s *GoogleDevtoolsRemoteworkersV1test2Blob) MarshalJSON() ([]byte, error) { 2597 type NoMethod GoogleDevtoolsRemoteworkersV1test2Blob 2598 raw := NoMethod(*s) 2599 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2600} 2601 2602// GoogleDevtoolsRemoteworkersV1test2CommandOutputs: DEPRECATED - use 2603// CommandResult instead. 2604// Describes the actual outputs from the task. 2605type GoogleDevtoolsRemoteworkersV1test2CommandOutputs struct { 2606 // ExitCode: exit_code is only fully reliable if the status' code is OK. 2607 // If the task 2608 // exceeded its deadline or was cancelled, the process may still produce 2609 // an 2610 // exit code as it is cancelled, and this will be populated, but a 2611 // successful 2612 // (zero) is unlikely to be correct unless the status code is OK. 2613 ExitCode int64 `json:"exitCode,omitempty"` 2614 2615 // Outputs: The output files. The blob referenced by the digest should 2616 // contain 2617 // one of the following (implementation-dependent): 2618 // * A marshalled DirectoryMetadata of the returned filesystem 2619 // * A LUCI-style .isolated file 2620 Outputs *GoogleDevtoolsRemoteworkersV1test2Digest `json:"outputs,omitempty"` 2621 2622 // ForceSendFields is a list of field names (e.g. "ExitCode") to 2623 // unconditionally include in API requests. By default, fields with 2624 // empty values are omitted from API requests. However, any non-pointer, 2625 // non-interface field appearing in ForceSendFields will be sent to the 2626 // server regardless of whether the field is empty or not. This may be 2627 // used to include empty fields in Patch requests. 2628 ForceSendFields []string `json:"-"` 2629 2630 // NullFields is a list of field names (e.g. "ExitCode") to include in 2631 // API requests with the JSON null value. By default, fields with empty 2632 // values are omitted from API requests. However, any field with an 2633 // empty value appearing in NullFields will be sent to the server as 2634 // null. It is an error if a field in this list has a non-empty value. 2635 // This may be used to include null fields in Patch requests. 2636 NullFields []string `json:"-"` 2637} 2638 2639func (s *GoogleDevtoolsRemoteworkersV1test2CommandOutputs) MarshalJSON() ([]byte, error) { 2640 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandOutputs 2641 raw := NoMethod(*s) 2642 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2643} 2644 2645// GoogleDevtoolsRemoteworkersV1test2CommandOverhead: DEPRECATED - use 2646// CommandResult instead. 2647// Can be used as part of CompleteRequest.metadata, or are part of a 2648// more 2649// sophisticated message. 2650type GoogleDevtoolsRemoteworkersV1test2CommandOverhead struct { 2651 // Duration: The elapsed time between calling Accept and Complete. The 2652 // server will also 2653 // have its own idea of what this should be, but this excludes the 2654 // overhead of 2655 // the RPCs and the bot response time. 2656 Duration string `json:"duration,omitempty"` 2657 2658 // Overhead: The amount of time *not* spent executing the command 2659 // (ie 2660 // uploading/downloading files). 2661 Overhead string `json:"overhead,omitempty"` 2662 2663 // ForceSendFields is a list of field names (e.g. "Duration") to 2664 // unconditionally include in API requests. By default, fields with 2665 // empty values are omitted from API requests. However, any non-pointer, 2666 // non-interface field appearing in ForceSendFields will be sent to the 2667 // server regardless of whether the field is empty or not. This may be 2668 // used to include empty fields in Patch requests. 2669 ForceSendFields []string `json:"-"` 2670 2671 // NullFields is a list of field names (e.g. "Duration") to include in 2672 // API requests with the JSON null value. By default, fields with empty 2673 // values are omitted from API requests. However, any field with an 2674 // empty value appearing in NullFields will be sent to the server as 2675 // null. It is an error if a field in this list has a non-empty value. 2676 // This may be used to include null fields in Patch requests. 2677 NullFields []string `json:"-"` 2678} 2679 2680func (s *GoogleDevtoolsRemoteworkersV1test2CommandOverhead) MarshalJSON() ([]byte, error) { 2681 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandOverhead 2682 raw := NoMethod(*s) 2683 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2684} 2685 2686// GoogleDevtoolsRemoteworkersV1test2CommandResult: All information 2687// about the execution of a command, suitable for providing as 2688// the Bots interface's `Lease.result` field. 2689type GoogleDevtoolsRemoteworkersV1test2CommandResult struct { 2690 // Duration: The elapsed time between calling Accept and Complete. The 2691 // server will also 2692 // have its own idea of what this should be, but this excludes the 2693 // overhead of 2694 // the RPCs and the bot response time. 2695 Duration string `json:"duration,omitempty"` 2696 2697 // ExitCode: The exit code of the process. An exit code of "0" should 2698 // only be trusted if 2699 // `status` has a code of OK (otherwise it may simply be unset). 2700 ExitCode int64 `json:"exitCode,omitempty"` 2701 2702 // Metadata: Implementation-dependent metadata about the task. Both 2703 // servers and bots 2704 // may define messages which can be encoded here; bots are free to 2705 // provide 2706 // metadata in multiple formats, and servers are free to choose one or 2707 // more 2708 // of the values to process and ignore others. In particular, it is 2709 // *not* 2710 // considered an error for the bot to provide the server with a field 2711 // that it 2712 // doesn't know about. 2713 Metadata []googleapi.RawMessage `json:"metadata,omitempty"` 2714 2715 // Outputs: The output files. The blob referenced by the digest should 2716 // contain 2717 // one of the following (implementation-dependent): 2718 // * A marshalled DirectoryMetadata of the returned filesystem 2719 // * A LUCI-style .isolated file 2720 Outputs *GoogleDevtoolsRemoteworkersV1test2Digest `json:"outputs,omitempty"` 2721 2722 // Overhead: The amount of time *not* spent executing the command 2723 // (ie 2724 // uploading/downloading files). 2725 Overhead string `json:"overhead,omitempty"` 2726 2727 // Status: An overall status for the command. For example, if the 2728 // command timed out, 2729 // this might have a code of DEADLINE_EXCEEDED; if it was killed by the 2730 // OS for 2731 // memory exhaustion, it might have a code of RESOURCE_EXHAUSTED. 2732 Status *GoogleRpcStatus `json:"status,omitempty"` 2733 2734 // ForceSendFields is a list of field names (e.g. "Duration") to 2735 // unconditionally include in API requests. By default, fields with 2736 // empty values are omitted from API requests. However, any non-pointer, 2737 // non-interface field appearing in ForceSendFields will be sent to the 2738 // server regardless of whether the field is empty or not. This may be 2739 // used to include empty fields in Patch requests. 2740 ForceSendFields []string `json:"-"` 2741 2742 // NullFields is a list of field names (e.g. "Duration") to include in 2743 // API requests with the JSON null value. By default, fields with empty 2744 // values are omitted from API requests. However, any field with an 2745 // empty value appearing in NullFields will be sent to the server as 2746 // null. It is an error if a field in this list has a non-empty value. 2747 // This may be used to include null fields in Patch requests. 2748 NullFields []string `json:"-"` 2749} 2750 2751func (s *GoogleDevtoolsRemoteworkersV1test2CommandResult) MarshalJSON() ([]byte, error) { 2752 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandResult 2753 raw := NoMethod(*s) 2754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2755} 2756 2757// GoogleDevtoolsRemoteworkersV1test2CommandTask: Describes a 2758// shell-style task to execute, suitable for providing as the 2759// Bots 2760// interface's `Lease.payload` field. 2761type GoogleDevtoolsRemoteworkersV1test2CommandTask struct { 2762 // ExpectedOutputs: The expected outputs from the task. 2763 ExpectedOutputs *GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs `json:"expectedOutputs,omitempty"` 2764 2765 // Inputs: The inputs to the task. 2766 Inputs *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs `json:"inputs,omitempty"` 2767 2768 // Timeouts: The timeouts of this task. 2769 Timeouts *GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts `json:"timeouts,omitempty"` 2770 2771 // ForceSendFields is a list of field names (e.g. "ExpectedOutputs") to 2772 // unconditionally include in API requests. By default, fields with 2773 // empty values are omitted from API requests. However, any non-pointer, 2774 // non-interface field appearing in ForceSendFields will be sent to the 2775 // server regardless of whether the field is empty or not. This may be 2776 // used to include empty fields in Patch requests. 2777 ForceSendFields []string `json:"-"` 2778 2779 // NullFields is a list of field names (e.g. "ExpectedOutputs") to 2780 // include in API requests with the JSON null value. By default, fields 2781 // with empty values are omitted from API requests. However, any field 2782 // with an empty value appearing in NullFields will be sent to the 2783 // server as null. It is an error if a field in this list has a 2784 // non-empty value. This may be used to include null fields in Patch 2785 // requests. 2786 NullFields []string `json:"-"` 2787} 2788 2789func (s *GoogleDevtoolsRemoteworkersV1test2CommandTask) MarshalJSON() ([]byte, error) { 2790 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTask 2791 raw := NoMethod(*s) 2792 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2793} 2794 2795// GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs: Describes the 2796// inputs to a shell-style task. 2797type GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs struct { 2798 // Arguments: The command itself to run (e.g., argv). 2799 // 2800 // This field should be passed directly to the underlying operating 2801 // system, 2802 // and so it must be sensible to that operating system. For example, 2803 // on 2804 // Windows, the first argument might be "C:\Windows\System32\ping.exe" 2805 // - 2806 // that is, using drive letters and backslashes. A command for a 2807 // *nix 2808 // system, on the other hand, would use forward slashes. 2809 // 2810 // All other fields in the RWAPI must consistently use forward 2811 // slashes, 2812 // since those fields may be interpretted by both the service and the 2813 // bot. 2814 Arguments []string `json:"arguments,omitempty"` 2815 2816 // EnvironmentVariables: All environment variables required by the task. 2817 EnvironmentVariables []*GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable `json:"environmentVariables,omitempty"` 2818 2819 // Files: The input filesystem to be set up prior to the task beginning. 2820 // The 2821 // contents should be a repeated set of FileMetadata messages though 2822 // other 2823 // formats are allowed if better for the implementation (eg, a 2824 // LUCI-style 2825 // .isolated file). 2826 // 2827 // This field is repeated since implementations might want to cache 2828 // the 2829 // metadata, in which case it may be useful to break up portions of 2830 // the 2831 // filesystem that change frequently (eg, specific input files) from 2832 // those 2833 // that don't (eg, standard header files). 2834 Files []*GoogleDevtoolsRemoteworkersV1test2Digest `json:"files,omitempty"` 2835 2836 // InlineBlobs: Inline contents for blobs expected to be needed by the 2837 // bot to execute the 2838 // task. For example, contents of entries in `files` or blobs that 2839 // are 2840 // indirectly referenced by an entry there. 2841 // 2842 // The bot should check against this list before downloading required 2843 // task 2844 // inputs to reduce the number of communications between itself and 2845 // the 2846 // remote CAS server. 2847 InlineBlobs []*GoogleDevtoolsRemoteworkersV1test2Blob `json:"inlineBlobs,omitempty"` 2848 2849 // WorkingDirectory: Directory from which a command is executed. It is a 2850 // relative directory 2851 // with respect to the bot's working directory (i.e., "./"). If it 2852 // is 2853 // non-empty, then it must exist under "./". Otherwise, "./" will be 2854 // used. 2855 WorkingDirectory string `json:"workingDirectory,omitempty"` 2856 2857 // ForceSendFields is a list of field names (e.g. "Arguments") to 2858 // unconditionally include in API requests. By default, fields with 2859 // empty values are omitted from API requests. However, any non-pointer, 2860 // non-interface field appearing in ForceSendFields will be sent to the 2861 // server regardless of whether the field is empty or not. This may be 2862 // used to include empty fields in Patch requests. 2863 ForceSendFields []string `json:"-"` 2864 2865 // NullFields is a list of field names (e.g. "Arguments") to include in 2866 // API requests with the JSON null value. By default, fields with empty 2867 // values are omitted from API requests. However, any field with an 2868 // empty value appearing in NullFields will be sent to the server as 2869 // null. It is an error if a field in this list has a non-empty value. 2870 // This may be used to include null fields in Patch requests. 2871 NullFields []string `json:"-"` 2872} 2873 2874func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs) MarshalJSON() ([]byte, error) { 2875 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs 2876 raw := NoMethod(*s) 2877 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2878} 2879 2880// GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable 2881// : An environment variable required by this task. 2882type GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable struct { 2883 // Name: The envvar name. 2884 Name string `json:"name,omitempty"` 2885 2886 // Value: The envvar value. 2887 Value string `json:"value,omitempty"` 2888 2889 // ForceSendFields is a list of field names (e.g. "Name") to 2890 // unconditionally include in API requests. By default, fields with 2891 // empty values are omitted from API requests. However, any non-pointer, 2892 // non-interface field appearing in ForceSendFields will be sent to the 2893 // server regardless of whether the field is empty or not. This may be 2894 // used to include empty fields in Patch requests. 2895 ForceSendFields []string `json:"-"` 2896 2897 // NullFields is a list of field names (e.g. "Name") to include in API 2898 // requests with the JSON null value. By default, fields with empty 2899 // values are omitted from API requests. However, any field with an 2900 // empty value appearing in NullFields will be sent to the server as 2901 // null. It is an error if a field in this list has a non-empty value. 2902 // This may be used to include null fields in Patch requests. 2903 NullFields []string `json:"-"` 2904} 2905 2906func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable) MarshalJSON() ([]byte, error) { 2907 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable 2908 raw := NoMethod(*s) 2909 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2910} 2911 2912// GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs: Describes the 2913// expected outputs of the command. 2914type GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs struct { 2915 // Directories: A list of expected directories, relative to the 2916 // execution root. All paths 2917 // MUST be delimited by forward slashes. 2918 Directories []string `json:"directories,omitempty"` 2919 2920 // Files: A list of expected files, relative to the execution root. All 2921 // paths 2922 // MUST be delimited by forward slashes. 2923 Files []string `json:"files,omitempty"` 2924 2925 // StderrDestination: The destination to which any stderr should be 2926 // sent. The method by which 2927 // the bot should send the stream contents to that destination is 2928 // not 2929 // defined in this API. As examples, the destination could be a 2930 // file 2931 // referenced in the `files` field in this message, or it could be a 2932 // URI 2933 // that must be written via the ByteStream API. 2934 StderrDestination string `json:"stderrDestination,omitempty"` 2935 2936 // StdoutDestination: The destination to which any stdout should be 2937 // sent. The method by which 2938 // the bot should send the stream contents to that destination is 2939 // not 2940 // defined in this API. As examples, the destination could be a 2941 // file 2942 // referenced in the `files` field in this message, or it could be a 2943 // URI 2944 // that must be written via the ByteStream API. 2945 StdoutDestination string `json:"stdoutDestination,omitempty"` 2946 2947 // ForceSendFields is a list of field names (e.g. "Directories") to 2948 // unconditionally include in API requests. By default, fields with 2949 // empty values are omitted from API requests. However, any non-pointer, 2950 // non-interface field appearing in ForceSendFields will be sent to the 2951 // server regardless of whether the field is empty or not. This may be 2952 // used to include empty fields in Patch requests. 2953 ForceSendFields []string `json:"-"` 2954 2955 // NullFields is a list of field names (e.g. "Directories") to include 2956 // in API requests with the JSON null value. By default, fields with 2957 // empty values are omitted from API requests. However, any field with 2958 // an empty value appearing in NullFields will be sent to the server as 2959 // null. It is an error if a field in this list has a non-empty value. 2960 // This may be used to include null fields in Patch requests. 2961 NullFields []string `json:"-"` 2962} 2963 2964func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs) MarshalJSON() ([]byte, error) { 2965 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs 2966 raw := NoMethod(*s) 2967 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2968} 2969 2970// GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts: Describes the 2971// timeouts associated with this task. 2972type GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts struct { 2973 // Execution: This specifies the maximum time that the task can run, 2974 // excluding the 2975 // time required to download inputs or upload outputs. That is, the 2976 // worker 2977 // will terminate the task if it runs longer than this. 2978 Execution string `json:"execution,omitempty"` 2979 2980 // Idle: This specifies the maximum amount of time the task can be idle 2981 // - that is, 2982 // go without generating some output in either stdout or stderr. If 2983 // the 2984 // process is silent for more than the specified time, the worker 2985 // will 2986 // terminate the task. 2987 Idle string `json:"idle,omitempty"` 2988 2989 // Shutdown: If the execution or IO timeouts are exceeded, the worker 2990 // will try to 2991 // gracefully terminate the task and return any existing logs. 2992 // However, 2993 // tasks may be hard-frozen in which case this process will fail. 2994 // This 2995 // timeout specifies how long to wait for a terminated task to shut 2996 // down 2997 // gracefully (e.g. via SIGTERM) before we bring down the hammer 2998 // (e.g. 2999 // SIGKILL on *nix, CTRL_BREAK_EVENT on Windows). 3000 Shutdown string `json:"shutdown,omitempty"` 3001 3002 // ForceSendFields is a list of field names (e.g. "Execution") to 3003 // unconditionally include in API requests. By default, fields with 3004 // empty values are omitted from API requests. However, any non-pointer, 3005 // non-interface field appearing in ForceSendFields will be sent to the 3006 // server regardless of whether the field is empty or not. This may be 3007 // used to include empty fields in Patch requests. 3008 ForceSendFields []string `json:"-"` 3009 3010 // NullFields is a list of field names (e.g. "Execution") to include in 3011 // API requests with the JSON null value. By default, fields with empty 3012 // values are omitted from API requests. However, any field with an 3013 // empty value appearing in NullFields will be sent to the server as 3014 // null. It is an error if a field in this list has a non-empty value. 3015 // This may be used to include null fields in Patch requests. 3016 NullFields []string `json:"-"` 3017} 3018 3019func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts) MarshalJSON() ([]byte, error) { 3020 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts 3021 raw := NoMethod(*s) 3022 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3023} 3024 3025// GoogleDevtoolsRemoteworkersV1test2Digest: The CommandTask and 3026// CommandResult messages assume the existence of a service 3027// that can serve blobs of content, identified by a hash and size known 3028// as a 3029// "digest." The method by which these blobs may be retrieved is not 3030// specified 3031// here, but a model implementation is in the Remote Execution 3032// API's 3033// "ContentAddressibleStorage" interface. 3034// 3035// In the context of the RWAPI, a Digest will virtually always refer to 3036// the 3037// contents of a file or a directory. The latter is represented by 3038// the 3039// byte-encoded Directory message. 3040type GoogleDevtoolsRemoteworkersV1test2Digest struct { 3041 // Hash: A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, 3042 // 0x2b, 0x3c]) 3043 // using an implementation-defined hash algorithm (eg SHA-256). 3044 Hash string `json:"hash,omitempty"` 3045 3046 // SizeBytes: The size of the contents. While this is not strictly 3047 // required as part of an 3048 // identifier (after all, any given hash will have exactly one 3049 // canonical 3050 // size), it's useful in almost all cases when one might want to send 3051 // or 3052 // retrieve blobs of content and is included here for this reason. 3053 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 3054 3055 // ForceSendFields is a list of field names (e.g. "Hash") to 3056 // unconditionally include in API requests. By default, fields with 3057 // empty values are omitted from API requests. However, any non-pointer, 3058 // non-interface field appearing in ForceSendFields will be sent to the 3059 // server regardless of whether the field is empty or not. This may be 3060 // used to include empty fields in Patch requests. 3061 ForceSendFields []string `json:"-"` 3062 3063 // NullFields is a list of field names (e.g. "Hash") to include in API 3064 // requests with the JSON null value. By default, fields with empty 3065 // values are omitted from API requests. However, any field with an 3066 // empty value appearing in NullFields will be sent to the server as 3067 // null. It is an error if a field in this list has a non-empty value. 3068 // This may be used to include null fields in Patch requests. 3069 NullFields []string `json:"-"` 3070} 3071 3072func (s *GoogleDevtoolsRemoteworkersV1test2Digest) MarshalJSON() ([]byte, error) { 3073 type NoMethod GoogleDevtoolsRemoteworkersV1test2Digest 3074 raw := NoMethod(*s) 3075 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3076} 3077 3078// GoogleDevtoolsRemoteworkersV1test2Directory: The contents of a 3079// directory. Similar to the equivalent message in the Remote 3080// Execution API. 3081type GoogleDevtoolsRemoteworkersV1test2Directory struct { 3082 // Directories: Any subdirectories 3083 Directories []*GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata `json:"directories,omitempty"` 3084 3085 // Files: The files in this directory 3086 Files []*GoogleDevtoolsRemoteworkersV1test2FileMetadata `json:"files,omitempty"` 3087 3088 // ForceSendFields is a list of field names (e.g. "Directories") to 3089 // unconditionally include in API requests. By default, fields with 3090 // empty values are omitted from API requests. However, any non-pointer, 3091 // non-interface field appearing in ForceSendFields will be sent to the 3092 // server regardless of whether the field is empty or not. This may be 3093 // used to include empty fields in Patch requests. 3094 ForceSendFields []string `json:"-"` 3095 3096 // NullFields is a list of field names (e.g. "Directories") to include 3097 // in API requests with the JSON null value. By default, fields with 3098 // empty values are omitted from API requests. However, any field with 3099 // an empty value appearing in NullFields will be sent to the server as 3100 // null. It is an error if a field in this list has a non-empty value. 3101 // This may be used to include null fields in Patch requests. 3102 NullFields []string `json:"-"` 3103} 3104 3105func (s *GoogleDevtoolsRemoteworkersV1test2Directory) MarshalJSON() ([]byte, error) { 3106 type NoMethod GoogleDevtoolsRemoteworkersV1test2Directory 3107 raw := NoMethod(*s) 3108 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3109} 3110 3111// GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata: The metadata for 3112// a directory. Similar to the equivalent message in the 3113// Remote 3114// Execution API. 3115type GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata struct { 3116 // Digest: A pointer to the contents of the directory, in the form of a 3117 // marshalled 3118 // Directory message. 3119 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 3120 3121 // Path: The path of the directory, as in FileMetadata.path. 3122 Path string `json:"path,omitempty"` 3123 3124 // ForceSendFields is a list of field names (e.g. "Digest") to 3125 // unconditionally include in API requests. By default, fields with 3126 // empty values are omitted from API requests. However, any non-pointer, 3127 // non-interface field appearing in ForceSendFields will be sent to the 3128 // server regardless of whether the field is empty or not. This may be 3129 // used to include empty fields in Patch requests. 3130 ForceSendFields []string `json:"-"` 3131 3132 // NullFields is a list of field names (e.g. "Digest") to include in API 3133 // requests with the JSON null value. By default, fields with empty 3134 // values are omitted from API requests. However, any field with an 3135 // empty value appearing in NullFields will be sent to the server as 3136 // null. It is an error if a field in this list has a non-empty value. 3137 // This may be used to include null fields in Patch requests. 3138 NullFields []string `json:"-"` 3139} 3140 3141func (s *GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata) MarshalJSON() ([]byte, error) { 3142 type NoMethod GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata 3143 raw := NoMethod(*s) 3144 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3145} 3146 3147// GoogleDevtoolsRemoteworkersV1test2FileMetadata: The metadata for a 3148// file. Similar to the equivalent message in the Remote 3149// Execution API. 3150type GoogleDevtoolsRemoteworkersV1test2FileMetadata struct { 3151 // Contents: If the file is small enough, its contents may also or 3152 // alternatively be 3153 // listed here. 3154 Contents string `json:"contents,omitempty"` 3155 3156 // Digest: A pointer to the contents of the file. The method by which a 3157 // client 3158 // retrieves the contents from a CAS system is not defined here. 3159 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 3160 3161 // IsExecutable: Properties of the file 3162 IsExecutable bool `json:"isExecutable,omitempty"` 3163 3164 // Path: The path of this file. If this message is part of 3165 // the 3166 // CommandOutputs.outputs fields, the path is relative to the execution 3167 // root 3168 // and must correspond to an entry in CommandTask.outputs.files. If 3169 // this 3170 // message is part of a Directory message, then the path is relative to 3171 // the 3172 // root of that directory. All paths MUST be delimited by forward 3173 // slashes. 3174 Path string `json:"path,omitempty"` 3175 3176 // ForceSendFields is a list of field names (e.g. "Contents") to 3177 // unconditionally include in API requests. By default, fields with 3178 // empty values are omitted from API requests. However, any non-pointer, 3179 // non-interface field appearing in ForceSendFields will be sent to the 3180 // server regardless of whether the field is empty or not. This may be 3181 // used to include empty fields in Patch requests. 3182 ForceSendFields []string `json:"-"` 3183 3184 // NullFields is a list of field names (e.g. "Contents") to include in 3185 // API requests with the JSON null value. By default, fields with empty 3186 // values are omitted from API requests. However, any field with an 3187 // empty value appearing in NullFields will be sent to the server as 3188 // null. It is an error if a field in this list has a non-empty value. 3189 // This may be used to include null fields in Patch requests. 3190 NullFields []string `json:"-"` 3191} 3192 3193func (s *GoogleDevtoolsRemoteworkersV1test2FileMetadata) MarshalJSON() ([]byte, error) { 3194 type NoMethod GoogleDevtoolsRemoteworkersV1test2FileMetadata 3195 raw := NoMethod(*s) 3196 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3197} 3198 3199// GoogleLongrunningCancelOperationRequest: The request message for 3200// Operations.CancelOperation. 3201type GoogleLongrunningCancelOperationRequest struct { 3202} 3203 3204// GoogleLongrunningListOperationsResponse: The response message for 3205// Operations.ListOperations. 3206type GoogleLongrunningListOperationsResponse struct { 3207 // NextPageToken: The standard List next-page token. 3208 NextPageToken string `json:"nextPageToken,omitempty"` 3209 3210 // Operations: A list of operations that matches the specified filter in 3211 // the request. 3212 Operations []*GoogleLongrunningOperation `json:"operations,omitempty"` 3213 3214 // ServerResponse contains the HTTP response code and headers from the 3215 // server. 3216 googleapi.ServerResponse `json:"-"` 3217 3218 // ForceSendFields is a list of field names (e.g. "NextPageToken") to 3219 // unconditionally include in API requests. By default, fields with 3220 // empty values are omitted from API requests. However, any non-pointer, 3221 // non-interface field appearing in ForceSendFields will be sent to the 3222 // server regardless of whether the field is empty or not. This may be 3223 // used to include empty fields in Patch requests. 3224 ForceSendFields []string `json:"-"` 3225 3226 // NullFields is a list of field names (e.g. "NextPageToken") to include 3227 // in API requests with the JSON null value. By default, fields with 3228 // empty values are omitted from API requests. However, any field with 3229 // an empty value appearing in NullFields will be sent to the server as 3230 // null. It is an error if a field in this list has a non-empty value. 3231 // This may be used to include null fields in Patch requests. 3232 NullFields []string `json:"-"` 3233} 3234 3235func (s *GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { 3236 type NoMethod GoogleLongrunningListOperationsResponse 3237 raw := NoMethod(*s) 3238 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3239} 3240 3241// GoogleLongrunningOperation: This resource represents a long-running 3242// operation that is the result of a 3243// network API call. 3244type GoogleLongrunningOperation struct { 3245 // Done: If the value is `false`, it means the operation is still in 3246 // progress. 3247 // If `true`, the operation is completed, and either `error` or 3248 // `response` is 3249 // available. 3250 Done bool `json:"done,omitempty"` 3251 3252 // Error: The error result of the operation in case of failure or 3253 // cancellation. 3254 Error *GoogleRpcStatus `json:"error,omitempty"` 3255 3256 // Metadata: Service-specific metadata associated with the operation. 3257 // It typically 3258 // contains progress information and common metadata such as create 3259 // time. 3260 // Some services might not provide such metadata. Any method that 3261 // returns a 3262 // long-running operation should document the metadata type, if any. 3263 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3264 3265 // Name: The server-assigned name, which is only unique within the same 3266 // service that 3267 // originally returns it. If you use the default HTTP mapping, 3268 // the 3269 // `name` should be a resource name ending with 3270 // `operations/{unique_id}`. 3271 Name string `json:"name,omitempty"` 3272 3273 // Response: The normal response of the operation in case of success. 3274 // If the original 3275 // method returns no data on success, such as `Delete`, the response 3276 // is 3277 // `google.protobuf.Empty`. If the original method is 3278 // standard 3279 // `Get`/`Create`/`Update`, the response should be the resource. For 3280 // other 3281 // methods, the response should have the type `XxxResponse`, where 3282 // `Xxx` 3283 // is the original method name. For example, if the original method 3284 // name 3285 // is `TakeSnapshot()`, the inferred response type 3286 // is 3287 // `TakeSnapshotResponse`. 3288 Response googleapi.RawMessage `json:"response,omitempty"` 3289 3290 // ServerResponse contains the HTTP response code and headers from the 3291 // server. 3292 googleapi.ServerResponse `json:"-"` 3293 3294 // ForceSendFields is a list of field names (e.g. "Done") to 3295 // unconditionally include in API requests. By default, fields with 3296 // empty values are omitted from API requests. However, any non-pointer, 3297 // non-interface field appearing in ForceSendFields will be sent to the 3298 // server regardless of whether the field is empty or not. This may be 3299 // used to include empty fields in Patch requests. 3300 ForceSendFields []string `json:"-"` 3301 3302 // NullFields is a list of field names (e.g. "Done") to include in API 3303 // requests with the JSON null value. By default, fields with empty 3304 // values are omitted from API requests. However, any field with an 3305 // empty value appearing in NullFields will be sent to the server as 3306 // null. It is an error if a field in this list has a non-empty value. 3307 // This may be used to include null fields in Patch requests. 3308 NullFields []string `json:"-"` 3309} 3310 3311func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 3312 type NoMethod GoogleLongrunningOperation 3313 raw := NoMethod(*s) 3314 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3315} 3316 3317// GoogleProtobufEmpty: A generic empty message that you can re-use to 3318// avoid defining duplicated 3319// empty messages in your APIs. A typical example is to use it as the 3320// request 3321// or the response type of an API method. For instance: 3322// 3323// service Foo { 3324// rpc Bar(google.protobuf.Empty) returns 3325// (google.protobuf.Empty); 3326// } 3327// 3328// The JSON representation for `Empty` is empty JSON object `{}`. 3329type GoogleProtobufEmpty struct { 3330 // ServerResponse contains the HTTP response code and headers from the 3331 // server. 3332 googleapi.ServerResponse `json:"-"` 3333} 3334 3335// GoogleRpcStatus: The `Status` type defines a logical error model that 3336// is suitable for 3337// different programming environments, including REST APIs and RPC APIs. 3338// It is 3339// used by [gRPC](https://github.com/grpc). Each `Status` message 3340// contains 3341// three pieces of data: error code, error message, and error 3342// details. 3343// 3344// You can find out more about this error model and how to work with it 3345// in the 3346// [API Design Guide](https://cloud.google.com/apis/design/errors). 3347type GoogleRpcStatus struct { 3348 // Code: The status code, which should be an enum value of 3349 // google.rpc.Code. 3350 Code int64 `json:"code,omitempty"` 3351 3352 // Details: A list of messages that carry the error details. There is a 3353 // common set of 3354 // message types for APIs to use. 3355 Details []googleapi.RawMessage `json:"details,omitempty"` 3356 3357 // Message: A developer-facing error message, which should be in 3358 // English. Any 3359 // user-facing error message should be localized and sent in 3360 // the 3361 // google.rpc.Status.details field, or localized by the client. 3362 Message string `json:"message,omitempty"` 3363 3364 // ForceSendFields is a list of field names (e.g. "Code") to 3365 // unconditionally include in API requests. By default, fields with 3366 // empty values are omitted from API requests. However, any non-pointer, 3367 // non-interface field appearing in ForceSendFields will be sent to the 3368 // server regardless of whether the field is empty or not. This may be 3369 // used to include empty fields in Patch requests. 3370 ForceSendFields []string `json:"-"` 3371 3372 // NullFields is a list of field names (e.g. "Code") to include in API 3373 // requests with the JSON null value. By default, fields with empty 3374 // values are omitted from API requests. However, any field with an 3375 // empty value appearing in NullFields will be sent to the server as 3376 // null. It is an error if a field in this list has a non-empty value. 3377 // This may be used to include null fields in Patch requests. 3378 NullFields []string `json:"-"` 3379} 3380 3381func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 3382 type NoMethod GoogleRpcStatus 3383 raw := NoMethod(*s) 3384 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3385} 3386 3387// method id "remotebuildexecution.media.download": 3388 3389type MediaDownloadCall struct { 3390 s *Service 3391 resourceName string 3392 urlParams_ gensupport.URLParams 3393 ifNoneMatch_ string 3394 ctx_ context.Context 3395 header_ http.Header 3396} 3397 3398// Download: Downloads media. Download is supported 3399// on the URI `/v1/media/{+name}?alt=media`. 3400func (r *MediaService) Download(resourceName string) *MediaDownloadCall { 3401 c := &MediaDownloadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3402 c.resourceName = resourceName 3403 return c 3404} 3405 3406// Fields allows partial responses to be retrieved. See 3407// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3408// for more information. 3409func (c *MediaDownloadCall) Fields(s ...googleapi.Field) *MediaDownloadCall { 3410 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3411 return c 3412} 3413 3414// IfNoneMatch sets the optional parameter which makes the operation 3415// fail if the object's ETag matches the given value. This is useful for 3416// getting updates only after the object has changed since the last 3417// request. Use googleapi.IsNotModified to check whether the response 3418// error from Do is the result of In-None-Match. 3419func (c *MediaDownloadCall) IfNoneMatch(entityTag string) *MediaDownloadCall { 3420 c.ifNoneMatch_ = entityTag 3421 return c 3422} 3423 3424// Context sets the context to be used in this call's Do and Download 3425// methods. Any pending HTTP request will be aborted if the provided 3426// context is canceled. 3427func (c *MediaDownloadCall) Context(ctx context.Context) *MediaDownloadCall { 3428 c.ctx_ = ctx 3429 return c 3430} 3431 3432// Header returns an http.Header that can be modified by the caller to 3433// add HTTP headers to the request. 3434func (c *MediaDownloadCall) Header() http.Header { 3435 if c.header_ == nil { 3436 c.header_ = make(http.Header) 3437 } 3438 return c.header_ 3439} 3440 3441func (c *MediaDownloadCall) doRequest(alt string) (*http.Response, error) { 3442 reqHeaders := make(http.Header) 3443 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 3444 for k, v := range c.header_ { 3445 reqHeaders[k] = v 3446 } 3447 reqHeaders.Set("User-Agent", c.s.userAgent()) 3448 if c.ifNoneMatch_ != "" { 3449 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3450 } 3451 var body io.Reader = nil 3452 c.urlParams_.Set("alt", alt) 3453 c.urlParams_.Set("prettyPrint", "false") 3454 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/media/{+resourceName}") 3455 urls += "?" + c.urlParams_.Encode() 3456 req, err := http.NewRequest("GET", urls, body) 3457 if err != nil { 3458 return nil, err 3459 } 3460 req.Header = reqHeaders 3461 googleapi.Expand(req.URL, map[string]string{ 3462 "resourceName": c.resourceName, 3463 }) 3464 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3465} 3466 3467// Download fetches the API endpoint's "media" value, instead of the normal 3468// API response value. If the returned error is nil, the Response is guaranteed to 3469// have a 2xx status code. Callers must close the Response.Body as usual. 3470func (c *MediaDownloadCall) Download(opts ...googleapi.CallOption) (*http.Response, error) { 3471 gensupport.SetOptions(c.urlParams_, opts...) 3472 res, err := c.doRequest("media") 3473 if err != nil { 3474 return nil, err 3475 } 3476 if err := googleapi.CheckMediaResponse(res); err != nil { 3477 res.Body.Close() 3478 return nil, err 3479 } 3480 return res, nil 3481} 3482 3483// Do executes the "remotebuildexecution.media.download" call. 3484// Exactly one of *GoogleBytestreamMedia or error will be non-nil. Any 3485// non-2xx status code is an error. Response headers are in either 3486// *GoogleBytestreamMedia.ServerResponse.Header or (if a response was 3487// returned at all) in error.(*googleapi.Error).Header. Use 3488// googleapi.IsNotModified to check whether the returned error was 3489// because http.StatusNotModified was returned. 3490func (c *MediaDownloadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) { 3491 gensupport.SetOptions(c.urlParams_, opts...) 3492 res, err := c.doRequest("json") 3493 if res != nil && res.StatusCode == http.StatusNotModified { 3494 if res.Body != nil { 3495 res.Body.Close() 3496 } 3497 return nil, &googleapi.Error{ 3498 Code: res.StatusCode, 3499 Header: res.Header, 3500 } 3501 } 3502 if err != nil { 3503 return nil, err 3504 } 3505 defer googleapi.CloseBody(res) 3506 if err := googleapi.CheckResponse(res); err != nil { 3507 return nil, err 3508 } 3509 ret := &GoogleBytestreamMedia{ 3510 ServerResponse: googleapi.ServerResponse{ 3511 Header: res.Header, 3512 HTTPStatusCode: res.StatusCode, 3513 }, 3514 } 3515 target := &ret 3516 if err := gensupport.DecodeResponse(target, res); err != nil { 3517 return nil, err 3518 } 3519 return ret, nil 3520 // { 3521 // "description": "Downloads media. Download is supported\non the URI `/v1/media/{+name}?alt=media`.", 3522 // "flatPath": "v1/media/{mediaId}", 3523 // "httpMethod": "GET", 3524 // "id": "remotebuildexecution.media.download", 3525 // "parameterOrder": [ 3526 // "resourceName" 3527 // ], 3528 // "parameters": { 3529 // "resourceName": { 3530 // "description": "Name of the media that is being downloaded. See\nReadRequest.resource_name.", 3531 // "location": "path", 3532 // "pattern": "^.+$", 3533 // "required": true, 3534 // "type": "string" 3535 // } 3536 // }, 3537 // "path": "v1/media/{+resourceName}", 3538 // "response": { 3539 // "$ref": "GoogleBytestreamMedia" 3540 // }, 3541 // "scopes": [ 3542 // "https://www.googleapis.com/auth/cloud-platform" 3543 // ], 3544 // "supportsMediaDownload": true 3545 // } 3546 3547} 3548 3549// method id "remotebuildexecution.media.upload": 3550 3551type MediaUploadCall struct { 3552 s *Service 3553 resourceName string 3554 googlebytestreammedia *GoogleBytestreamMedia 3555 urlParams_ gensupport.URLParams 3556 mediaInfo_ *gensupport.MediaInfo 3557 ctx_ context.Context 3558 header_ http.Header 3559} 3560 3561// Upload: Uploads media. Upload is supported on 3562// the URI `/upload/v1/media/{+name}`. 3563func (r *MediaService) Upload(resourceName string, googlebytestreammedia *GoogleBytestreamMedia) *MediaUploadCall { 3564 c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3565 c.resourceName = resourceName 3566 c.googlebytestreammedia = googlebytestreammedia 3567 return c 3568} 3569 3570// Media specifies the media to upload in one or more chunks. The chunk 3571// size may be controlled by supplying a MediaOption generated by 3572// googleapi.ChunkSize. The chunk size defaults to 3573// googleapi.DefaultUploadChunkSize.The Content-Type header used in the 3574// upload request will be determined by sniffing the contents of r, 3575// unless a MediaOption generated by googleapi.ContentType is 3576// supplied. 3577// At most one of Media and ResumableMedia may be set. 3578func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { 3579 c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) 3580 return c 3581} 3582 3583// ResumableMedia specifies the media to upload in chunks and can be 3584// canceled with ctx. 3585// 3586// Deprecated: use Media instead. 3587// 3588// At most one of Media and ResumableMedia may be set. mediaType 3589// identifies the MIME media type of the upload, such as "image/png". If 3590// mediaType is "", it will be auto-detected. The provided ctx will 3591// supersede any context previously provided to the Context method. 3592func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { 3593 c.ctx_ = ctx 3594 c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) 3595 return c 3596} 3597 3598// ProgressUpdater provides a callback function that will be called 3599// after every chunk. It should be a low-latency function in order to 3600// not slow down the upload operation. This should only be called when 3601// using ResumableMedia (as opposed to Media). 3602func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { 3603 c.mediaInfo_.SetProgressUpdater(pu) 3604 return c 3605} 3606 3607// Fields allows partial responses to be retrieved. See 3608// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3609// for more information. 3610func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { 3611 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3612 return c 3613} 3614 3615// Context sets the context to be used in this call's Do method. Any 3616// pending HTTP request will be aborted if the provided context is 3617// canceled. 3618// This context will supersede any context previously provided to the 3619// ResumableMedia method. 3620func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { 3621 c.ctx_ = ctx 3622 return c 3623} 3624 3625// Header returns an http.Header that can be modified by the caller to 3626// add HTTP headers to the request. 3627func (c *MediaUploadCall) Header() http.Header { 3628 if c.header_ == nil { 3629 c.header_ = make(http.Header) 3630 } 3631 return c.header_ 3632} 3633 3634func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { 3635 reqHeaders := make(http.Header) 3636 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 3637 for k, v := range c.header_ { 3638 reqHeaders[k] = v 3639 } 3640 reqHeaders.Set("User-Agent", c.s.userAgent()) 3641 var body io.Reader = nil 3642 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlebytestreammedia) 3643 if err != nil { 3644 return nil, err 3645 } 3646 reqHeaders.Set("Content-Type", "application/json") 3647 c.urlParams_.Set("alt", alt) 3648 c.urlParams_.Set("prettyPrint", "false") 3649 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/media/{+resourceName}") 3650 if c.mediaInfo_ != nil { 3651 urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/media/{+resourceName}") 3652 c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) 3653 } 3654 if body == nil { 3655 body = new(bytes.Buffer) 3656 reqHeaders.Set("Content-Type", "application/json") 3657 } 3658 body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) 3659 defer cleanup() 3660 urls += "?" + c.urlParams_.Encode() 3661 req, err := http.NewRequest("POST", urls, body) 3662 if err != nil { 3663 return nil, err 3664 } 3665 req.Header = reqHeaders 3666 req.GetBody = getBody 3667 googleapi.Expand(req.URL, map[string]string{ 3668 "resourceName": c.resourceName, 3669 }) 3670 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3671} 3672 3673// Do executes the "remotebuildexecution.media.upload" call. 3674// Exactly one of *GoogleBytestreamMedia or error will be non-nil. Any 3675// non-2xx status code is an error. Response headers are in either 3676// *GoogleBytestreamMedia.ServerResponse.Header or (if a response was 3677// returned at all) in error.(*googleapi.Error).Header. Use 3678// googleapi.IsNotModified to check whether the returned error was 3679// because http.StatusNotModified was returned. 3680func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleBytestreamMedia, error) { 3681 gensupport.SetOptions(c.urlParams_, opts...) 3682 res, err := c.doRequest("json") 3683 if res != nil && res.StatusCode == http.StatusNotModified { 3684 if res.Body != nil { 3685 res.Body.Close() 3686 } 3687 return nil, &googleapi.Error{ 3688 Code: res.StatusCode, 3689 Header: res.Header, 3690 } 3691 } 3692 if err != nil { 3693 return nil, err 3694 } 3695 defer googleapi.CloseBody(res) 3696 if err := googleapi.CheckResponse(res); err != nil { 3697 return nil, err 3698 } 3699 rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) 3700 if rx != nil { 3701 rx.Client = c.s.client 3702 rx.UserAgent = c.s.userAgent() 3703 ctx := c.ctx_ 3704 if ctx == nil { 3705 ctx = context.TODO() 3706 } 3707 res, err = rx.Upload(ctx) 3708 if err != nil { 3709 return nil, err 3710 } 3711 defer res.Body.Close() 3712 if err := googleapi.CheckResponse(res); err != nil { 3713 return nil, err 3714 } 3715 } 3716 ret := &GoogleBytestreamMedia{ 3717 ServerResponse: googleapi.ServerResponse{ 3718 Header: res.Header, 3719 HTTPStatusCode: res.StatusCode, 3720 }, 3721 } 3722 target := &ret 3723 if err := gensupport.DecodeResponse(target, res); err != nil { 3724 return nil, err 3725 } 3726 return ret, nil 3727 // { 3728 // "description": "Uploads media. Upload is supported on\nthe URI `/upload/v1/media/{+name}`.", 3729 // "flatPath": "v1/media/{mediaId}", 3730 // "httpMethod": "POST", 3731 // "id": "remotebuildexecution.media.upload", 3732 // "mediaUpload": { 3733 // "accept": [ 3734 // "*/*" 3735 // ], 3736 // "protocols": { 3737 // "simple": { 3738 // "multipart": true, 3739 // "path": "/upload/v1/media/{+resourceName}" 3740 // } 3741 // } 3742 // }, 3743 // "parameterOrder": [ 3744 // "resourceName" 3745 // ], 3746 // "parameters": { 3747 // "resourceName": { 3748 // "description": "Name of the media that is being downloaded. See\nReadRequest.resource_name.", 3749 // "location": "path", 3750 // "pattern": "^.+$", 3751 // "required": true, 3752 // "type": "string" 3753 // } 3754 // }, 3755 // "path": "v1/media/{+resourceName}", 3756 // "request": { 3757 // "$ref": "GoogleBytestreamMedia" 3758 // }, 3759 // "response": { 3760 // "$ref": "GoogleBytestreamMedia" 3761 // }, 3762 // "scopes": [ 3763 // "https://www.googleapis.com/auth/cloud-platform" 3764 // ], 3765 // "supportsMediaUpload": true 3766 // } 3767 3768} 3769 3770// method id "remotebuildexecution.operations.cancel": 3771 3772type OperationsCancelCall struct { 3773 s *Service 3774 name string 3775 googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest 3776 urlParams_ gensupport.URLParams 3777 ctx_ context.Context 3778 header_ http.Header 3779} 3780 3781// Cancel: Starts asynchronous cancellation on a long-running operation. 3782// The server 3783// makes a best effort to cancel the operation, but success is 3784// not 3785// guaranteed. If the server doesn't support this method, it 3786// returns 3787// `google.rpc.Code.UNIMPLEMENTED`. Clients can 3788// use 3789// Operations.GetOperation or 3790// other methods to check whether the cancellation succeeded or whether 3791// the 3792// operation completed despite cancellation. On successful 3793// cancellation, 3794// the operation is not deleted; instead, it becomes an operation 3795// with 3796// an Operation.error value with a google.rpc.Status.code of 3797// 1, 3798// corresponding to `Code.CANCELLED`. 3799func (r *OperationsService) Cancel(name string, googlelongrunningcanceloperationrequest *GoogleLongrunningCancelOperationRequest) *OperationsCancelCall { 3800 c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3801 c.name = name 3802 c.googlelongrunningcanceloperationrequest = googlelongrunningcanceloperationrequest 3803 return c 3804} 3805 3806// Fields allows partial responses to be retrieved. See 3807// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3808// for more information. 3809func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall { 3810 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3811 return c 3812} 3813 3814// Context sets the context to be used in this call's Do method. Any 3815// pending HTTP request will be aborted if the provided context is 3816// canceled. 3817func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall { 3818 c.ctx_ = ctx 3819 return c 3820} 3821 3822// Header returns an http.Header that can be modified by the caller to 3823// add HTTP headers to the request. 3824func (c *OperationsCancelCall) Header() http.Header { 3825 if c.header_ == nil { 3826 c.header_ = make(http.Header) 3827 } 3828 return c.header_ 3829} 3830 3831func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) { 3832 reqHeaders := make(http.Header) 3833 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 3834 for k, v := range c.header_ { 3835 reqHeaders[k] = v 3836 } 3837 reqHeaders.Set("User-Agent", c.s.userAgent()) 3838 var body io.Reader = nil 3839 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlelongrunningcanceloperationrequest) 3840 if err != nil { 3841 return nil, err 3842 } 3843 reqHeaders.Set("Content-Type", "application/json") 3844 c.urlParams_.Set("alt", alt) 3845 c.urlParams_.Set("prettyPrint", "false") 3846 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 3847 urls += "?" + c.urlParams_.Encode() 3848 req, err := http.NewRequest("POST", urls, body) 3849 if err != nil { 3850 return nil, err 3851 } 3852 req.Header = reqHeaders 3853 googleapi.Expand(req.URL, map[string]string{ 3854 "name": c.name, 3855 }) 3856 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3857} 3858 3859// Do executes the "remotebuildexecution.operations.cancel" call. 3860// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 3861// non-2xx status code is an error. Response headers are in either 3862// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 3863// returned at all) in error.(*googleapi.Error).Header. Use 3864// googleapi.IsNotModified to check whether the returned error was 3865// because http.StatusNotModified was returned. 3866func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 3867 gensupport.SetOptions(c.urlParams_, opts...) 3868 res, err := c.doRequest("json") 3869 if res != nil && res.StatusCode == http.StatusNotModified { 3870 if res.Body != nil { 3871 res.Body.Close() 3872 } 3873 return nil, &googleapi.Error{ 3874 Code: res.StatusCode, 3875 Header: res.Header, 3876 } 3877 } 3878 if err != nil { 3879 return nil, err 3880 } 3881 defer googleapi.CloseBody(res) 3882 if err := googleapi.CheckResponse(res); err != nil { 3883 return nil, err 3884 } 3885 ret := &GoogleProtobufEmpty{ 3886 ServerResponse: googleapi.ServerResponse{ 3887 Header: res.Header, 3888 HTTPStatusCode: res.StatusCode, 3889 }, 3890 } 3891 target := &ret 3892 if err := gensupport.DecodeResponse(target, res); err != nil { 3893 return nil, err 3894 } 3895 return ret, nil 3896 // { 3897 // "description": "Starts asynchronous cancellation on a long-running operation. The server\nmakes a best effort to cancel the operation, but success is not\nguaranteed. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`. Clients can use\nOperations.GetOperation or\nother methods to check whether the cancellation succeeded or whether the\noperation completed despite cancellation. On successful cancellation,\nthe operation is not deleted; instead, it becomes an operation with\nan Operation.error value with a google.rpc.Status.code of 1,\ncorresponding to `Code.CANCELLED`.", 3898 // "flatPath": "v1/operations/{operationsId}:cancel", 3899 // "httpMethod": "POST", 3900 // "id": "remotebuildexecution.operations.cancel", 3901 // "parameterOrder": [ 3902 // "name" 3903 // ], 3904 // "parameters": { 3905 // "name": { 3906 // "description": "The name of the operation resource to be cancelled.", 3907 // "location": "path", 3908 // "pattern": "^operations/.+$", 3909 // "required": true, 3910 // "type": "string" 3911 // } 3912 // }, 3913 // "path": "v1/{+name}:cancel", 3914 // "request": { 3915 // "$ref": "GoogleLongrunningCancelOperationRequest" 3916 // }, 3917 // "response": { 3918 // "$ref": "GoogleProtobufEmpty" 3919 // }, 3920 // "scopes": [ 3921 // "https://www.googleapis.com/auth/cloud-platform" 3922 // ] 3923 // } 3924 3925} 3926 3927// method id "remotebuildexecution.operations.delete": 3928 3929type OperationsDeleteCall struct { 3930 s *Service 3931 name string 3932 urlParams_ gensupport.URLParams 3933 ctx_ context.Context 3934 header_ http.Header 3935} 3936 3937// Delete: Deletes a long-running operation. This method indicates that 3938// the client is 3939// no longer interested in the operation result. It does not cancel 3940// the 3941// operation. If the server doesn't support this method, it 3942// returns 3943// `google.rpc.Code.UNIMPLEMENTED`. 3944func (r *OperationsService) Delete(name string) *OperationsDeleteCall { 3945 c := &OperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3946 c.name = name 3947 return c 3948} 3949 3950// Fields allows partial responses to be retrieved. See 3951// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3952// for more information. 3953func (c *OperationsDeleteCall) Fields(s ...googleapi.Field) *OperationsDeleteCall { 3954 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3955 return c 3956} 3957 3958// Context sets the context to be used in this call's Do method. Any 3959// pending HTTP request will be aborted if the provided context is 3960// canceled. 3961func (c *OperationsDeleteCall) Context(ctx context.Context) *OperationsDeleteCall { 3962 c.ctx_ = ctx 3963 return c 3964} 3965 3966// Header returns an http.Header that can be modified by the caller to 3967// add HTTP headers to the request. 3968func (c *OperationsDeleteCall) Header() http.Header { 3969 if c.header_ == nil { 3970 c.header_ = make(http.Header) 3971 } 3972 return c.header_ 3973} 3974 3975func (c *OperationsDeleteCall) doRequest(alt string) (*http.Response, error) { 3976 reqHeaders := make(http.Header) 3977 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 3978 for k, v := range c.header_ { 3979 reqHeaders[k] = v 3980 } 3981 reqHeaders.Set("User-Agent", c.s.userAgent()) 3982 var body io.Reader = nil 3983 c.urlParams_.Set("alt", alt) 3984 c.urlParams_.Set("prettyPrint", "false") 3985 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 3986 urls += "?" + c.urlParams_.Encode() 3987 req, err := http.NewRequest("DELETE", urls, body) 3988 if err != nil { 3989 return nil, err 3990 } 3991 req.Header = reqHeaders 3992 googleapi.Expand(req.URL, map[string]string{ 3993 "name": c.name, 3994 }) 3995 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3996} 3997 3998// Do executes the "remotebuildexecution.operations.delete" call. 3999// Exactly one of *GoogleProtobufEmpty or error will be non-nil. Any 4000// non-2xx status code is an error. Response headers are in either 4001// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was 4002// returned at all) in error.(*googleapi.Error).Header. Use 4003// googleapi.IsNotModified to check whether the returned error was 4004// because http.StatusNotModified was returned. 4005func (c *OperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { 4006 gensupport.SetOptions(c.urlParams_, opts...) 4007 res, err := c.doRequest("json") 4008 if res != nil && res.StatusCode == http.StatusNotModified { 4009 if res.Body != nil { 4010 res.Body.Close() 4011 } 4012 return nil, &googleapi.Error{ 4013 Code: res.StatusCode, 4014 Header: res.Header, 4015 } 4016 } 4017 if err != nil { 4018 return nil, err 4019 } 4020 defer googleapi.CloseBody(res) 4021 if err := googleapi.CheckResponse(res); err != nil { 4022 return nil, err 4023 } 4024 ret := &GoogleProtobufEmpty{ 4025 ServerResponse: googleapi.ServerResponse{ 4026 Header: res.Header, 4027 HTTPStatusCode: res.StatusCode, 4028 }, 4029 } 4030 target := &ret 4031 if err := gensupport.DecodeResponse(target, res); err != nil { 4032 return nil, err 4033 } 4034 return ret, nil 4035 // { 4036 // "description": "Deletes a long-running operation. This method indicates that the client is\nno longer interested in the operation result. It does not cancel the\noperation. If the server doesn't support this method, it returns\n`google.rpc.Code.UNIMPLEMENTED`.", 4037 // "flatPath": "v1/operations/{operationsId}", 4038 // "httpMethod": "DELETE", 4039 // "id": "remotebuildexecution.operations.delete", 4040 // "parameterOrder": [ 4041 // "name" 4042 // ], 4043 // "parameters": { 4044 // "name": { 4045 // "description": "The name of the operation resource to be deleted.", 4046 // "location": "path", 4047 // "pattern": "^operations/.+$", 4048 // "required": true, 4049 // "type": "string" 4050 // } 4051 // }, 4052 // "path": "v1/{+name}", 4053 // "response": { 4054 // "$ref": "GoogleProtobufEmpty" 4055 // }, 4056 // "scopes": [ 4057 // "https://www.googleapis.com/auth/cloud-platform" 4058 // ] 4059 // } 4060 4061} 4062 4063// method id "remotebuildexecution.operations.list": 4064 4065type OperationsListCall struct { 4066 s *Service 4067 name string 4068 urlParams_ gensupport.URLParams 4069 ifNoneMatch_ string 4070 ctx_ context.Context 4071 header_ http.Header 4072} 4073 4074// List: Lists operations that match the specified filter in the 4075// request. If the 4076// server doesn't support this method, it returns 4077// `UNIMPLEMENTED`. 4078// 4079// NOTE: the `name` binding allows API services to override the 4080// binding 4081// to use different resource name schemes, such as `users/*/operations`. 4082// To 4083// override the binding, API services can add a binding such 4084// as 4085// "/v1/{name=users/*}/operations" to their service configuration. 4086// For backwards compatibility, the default name includes the 4087// operations 4088// collection id, however overriding users must ensure the name 4089// binding 4090// is the parent resource, without the operations collection id. 4091func (r *OperationsService) List(name string) *OperationsListCall { 4092 c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4093 c.name = name 4094 return c 4095} 4096 4097// Filter sets the optional parameter "filter": The standard list 4098// filter. 4099func (c *OperationsListCall) Filter(filter string) *OperationsListCall { 4100 c.urlParams_.Set("filter", filter) 4101 return c 4102} 4103 4104// PageSize sets the optional parameter "pageSize": The standard list 4105// page size. 4106func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall { 4107 c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) 4108 return c 4109} 4110 4111// PageToken sets the optional parameter "pageToken": The standard list 4112// page token. 4113func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall { 4114 c.urlParams_.Set("pageToken", pageToken) 4115 return c 4116} 4117 4118// Fields allows partial responses to be retrieved. See 4119// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4120// for more information. 4121func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall { 4122 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4123 return c 4124} 4125 4126// IfNoneMatch sets the optional parameter which makes the operation 4127// fail if the object's ETag matches the given value. This is useful for 4128// getting updates only after the object has changed since the last 4129// request. Use googleapi.IsNotModified to check whether the response 4130// error from Do is the result of In-None-Match. 4131func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall { 4132 c.ifNoneMatch_ = entityTag 4133 return c 4134} 4135 4136// Context sets the context to be used in this call's Do method. Any 4137// pending HTTP request will be aborted if the provided context is 4138// canceled. 4139func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall { 4140 c.ctx_ = ctx 4141 return c 4142} 4143 4144// Header returns an http.Header that can be modified by the caller to 4145// add HTTP headers to the request. 4146func (c *OperationsListCall) Header() http.Header { 4147 if c.header_ == nil { 4148 c.header_ = make(http.Header) 4149 } 4150 return c.header_ 4151} 4152 4153func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) { 4154 reqHeaders := make(http.Header) 4155 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 4156 for k, v := range c.header_ { 4157 reqHeaders[k] = v 4158 } 4159 reqHeaders.Set("User-Agent", c.s.userAgent()) 4160 if c.ifNoneMatch_ != "" { 4161 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4162 } 4163 var body io.Reader = nil 4164 c.urlParams_.Set("alt", alt) 4165 c.urlParams_.Set("prettyPrint", "false") 4166 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 4167 urls += "?" + c.urlParams_.Encode() 4168 req, err := http.NewRequest("GET", urls, body) 4169 if err != nil { 4170 return nil, err 4171 } 4172 req.Header = reqHeaders 4173 googleapi.Expand(req.URL, map[string]string{ 4174 "name": c.name, 4175 }) 4176 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4177} 4178 4179// Do executes the "remotebuildexecution.operations.list" call. 4180// Exactly one of *GoogleLongrunningListOperationsResponse or error will 4181// be non-nil. Any non-2xx status code is an error. Response headers are 4182// in either 4183// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if 4184// a response was returned at all) in error.(*googleapi.Error).Header. 4185// Use googleapi.IsNotModified to check whether the returned error was 4186// because http.StatusNotModified was returned. 4187func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { 4188 gensupport.SetOptions(c.urlParams_, opts...) 4189 res, err := c.doRequest("json") 4190 if res != nil && res.StatusCode == http.StatusNotModified { 4191 if res.Body != nil { 4192 res.Body.Close() 4193 } 4194 return nil, &googleapi.Error{ 4195 Code: res.StatusCode, 4196 Header: res.Header, 4197 } 4198 } 4199 if err != nil { 4200 return nil, err 4201 } 4202 defer googleapi.CloseBody(res) 4203 if err := googleapi.CheckResponse(res); err != nil { 4204 return nil, err 4205 } 4206 ret := &GoogleLongrunningListOperationsResponse{ 4207 ServerResponse: googleapi.ServerResponse{ 4208 Header: res.Header, 4209 HTTPStatusCode: res.StatusCode, 4210 }, 4211 } 4212 target := &ret 4213 if err := gensupport.DecodeResponse(target, res); err != nil { 4214 return nil, err 4215 } 4216 return ret, nil 4217 // { 4218 // "description": "Lists operations that match the specified filter in the request. If the\nserver doesn't support this method, it returns `UNIMPLEMENTED`.\n\nNOTE: the `name` binding allows API services to override the binding\nto use different resource name schemes, such as `users/*/operations`. To\noverride the binding, API services can add a binding such as\n`\"/v1/{name=users/*}/operations\"` to their service configuration.\nFor backwards compatibility, the default name includes the operations\ncollection id, however overriding users must ensure the name binding\nis the parent resource, without the operations collection id.", 4219 // "flatPath": "v1/operations", 4220 // "httpMethod": "GET", 4221 // "id": "remotebuildexecution.operations.list", 4222 // "parameterOrder": [ 4223 // "name" 4224 // ], 4225 // "parameters": { 4226 // "filter": { 4227 // "description": "The standard list filter.", 4228 // "location": "query", 4229 // "type": "string" 4230 // }, 4231 // "name": { 4232 // "description": "The name of the operation's parent resource.", 4233 // "location": "path", 4234 // "pattern": "^operations$", 4235 // "required": true, 4236 // "type": "string" 4237 // }, 4238 // "pageSize": { 4239 // "description": "The standard list page size.", 4240 // "format": "int32", 4241 // "location": "query", 4242 // "type": "integer" 4243 // }, 4244 // "pageToken": { 4245 // "description": "The standard list page token.", 4246 // "location": "query", 4247 // "type": "string" 4248 // } 4249 // }, 4250 // "path": "v1/{+name}", 4251 // "response": { 4252 // "$ref": "GoogleLongrunningListOperationsResponse" 4253 // }, 4254 // "scopes": [ 4255 // "https://www.googleapis.com/auth/cloud-platform" 4256 // ] 4257 // } 4258 4259} 4260 4261// Pages invokes f for each page of results. 4262// A non-nil error returned from f will halt the iteration. 4263// The provided context supersedes any context provided to the Context method. 4264func (c *OperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { 4265 c.ctx_ = ctx 4266 defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point 4267 for { 4268 x, err := c.Do() 4269 if err != nil { 4270 return err 4271 } 4272 if err := f(x); err != nil { 4273 return err 4274 } 4275 if x.NextPageToken == "" { 4276 return nil 4277 } 4278 c.PageToken(x.NextPageToken) 4279 } 4280} 4281 4282// method id "remotebuildexecution.projects.operations.get": 4283 4284type ProjectsOperationsGetCall struct { 4285 s *Service 4286 name string 4287 urlParams_ gensupport.URLParams 4288 ifNoneMatch_ string 4289 ctx_ context.Context 4290 header_ http.Header 4291} 4292 4293// Get: Gets the latest state of a long-running operation. Clients can 4294// use this 4295// method to poll the operation result at intervals as recommended by 4296// the API 4297// service. 4298func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { 4299 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4300 c.name = name 4301 return c 4302} 4303 4304// Fields allows partial responses to be retrieved. See 4305// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4306// for more information. 4307func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { 4308 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4309 return c 4310} 4311 4312// IfNoneMatch sets the optional parameter which makes the operation 4313// fail if the object's ETag matches the given value. This is useful for 4314// getting updates only after the object has changed since the last 4315// request. Use googleapi.IsNotModified to check whether the response 4316// error from Do is the result of In-None-Match. 4317func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { 4318 c.ifNoneMatch_ = entityTag 4319 return c 4320} 4321 4322// Context sets the context to be used in this call's Do method. Any 4323// pending HTTP request will be aborted if the provided context is 4324// canceled. 4325func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { 4326 c.ctx_ = ctx 4327 return c 4328} 4329 4330// Header returns an http.Header that can be modified by the caller to 4331// add HTTP headers to the request. 4332func (c *ProjectsOperationsGetCall) Header() http.Header { 4333 if c.header_ == nil { 4334 c.header_ = make(http.Header) 4335 } 4336 return c.header_ 4337} 4338 4339func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 4340 reqHeaders := make(http.Header) 4341 reqHeaders.Set("x-goog-api-client", "gl-go/1.13.4 gdcl/20191114") 4342 for k, v := range c.header_ { 4343 reqHeaders[k] = v 4344 } 4345 reqHeaders.Set("User-Agent", c.s.userAgent()) 4346 if c.ifNoneMatch_ != "" { 4347 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4348 } 4349 var body io.Reader = nil 4350 c.urlParams_.Set("alt", alt) 4351 c.urlParams_.Set("prettyPrint", "false") 4352 urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") 4353 urls += "?" + c.urlParams_.Encode() 4354 req, err := http.NewRequest("GET", urls, body) 4355 if err != nil { 4356 return nil, err 4357 } 4358 req.Header = reqHeaders 4359 googleapi.Expand(req.URL, map[string]string{ 4360 "name": c.name, 4361 }) 4362 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4363} 4364 4365// Do executes the "remotebuildexecution.projects.operations.get" call. 4366// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4367// Any non-2xx status code is an error. Response headers are in either 4368// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4369// was returned at all) in error.(*googleapi.Error).Header. Use 4370// googleapi.IsNotModified to check whether the returned error was 4371// because http.StatusNotModified was returned. 4372func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4373 gensupport.SetOptions(c.urlParams_, opts...) 4374 res, err := c.doRequest("json") 4375 if res != nil && res.StatusCode == http.StatusNotModified { 4376 if res.Body != nil { 4377 res.Body.Close() 4378 } 4379 return nil, &googleapi.Error{ 4380 Code: res.StatusCode, 4381 Header: res.Header, 4382 } 4383 } 4384 if err != nil { 4385 return nil, err 4386 } 4387 defer googleapi.CloseBody(res) 4388 if err := googleapi.CheckResponse(res); err != nil { 4389 return nil, err 4390 } 4391 ret := &GoogleLongrunningOperation{ 4392 ServerResponse: googleapi.ServerResponse{ 4393 Header: res.Header, 4394 HTTPStatusCode: res.StatusCode, 4395 }, 4396 } 4397 target := &ret 4398 if err := gensupport.DecodeResponse(target, res); err != nil { 4399 return nil, err 4400 } 4401 return ret, nil 4402 // { 4403 // "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.", 4404 // "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", 4405 // "httpMethod": "GET", 4406 // "id": "remotebuildexecution.projects.operations.get", 4407 // "parameterOrder": [ 4408 // "name" 4409 // ], 4410 // "parameters": { 4411 // "name": { 4412 // "description": "The name of the operation resource.", 4413 // "location": "path", 4414 // "pattern": "^projects/[^/]+/operations/[^/]+$", 4415 // "required": true, 4416 // "type": "string" 4417 // } 4418 // }, 4419 // "path": "v1/{+name}", 4420 // "response": { 4421 // "$ref": "GoogleLongrunningOperation" 4422 // }, 4423 // "scopes": [ 4424 // "https://www.googleapis.com/auth/cloud-platform" 4425 // ] 4426 // } 4427 4428} 4429