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