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