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