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