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