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/v1alpha" 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/v1alpha" 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:v1alpha" 75const apiName = "remotebuildexecution" 76const apiVersion = "v1alpha" 77const basePath = "https://admin-remotebuildexecution.googleapis.com/" 78const mtlsBasePath = "https://admin-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.Projects = NewProjectsService(s) 120 return s, nil 121} 122 123type Service struct { 124 client *http.Client 125 BasePath string // API endpoint base URL 126 UserAgent string // optional additional User-Agent fragment 127 128 Projects *ProjectsService 129} 130 131func (s *Service) userAgent() string { 132 if s.UserAgent == "" { 133 return googleapi.UserAgent 134 } 135 return googleapi.UserAgent + " " + s.UserAgent 136} 137 138func NewProjectsService(s *Service) *ProjectsService { 139 rs := &ProjectsService{s: s} 140 rs.Instances = NewProjectsInstancesService(s) 141 rs.Operations = NewProjectsOperationsService(s) 142 return rs 143} 144 145type ProjectsService struct { 146 s *Service 147 148 Instances *ProjectsInstancesService 149 150 Operations *ProjectsOperationsService 151} 152 153func NewProjectsInstancesService(s *Service) *ProjectsInstancesService { 154 rs := &ProjectsInstancesService{s: s} 155 rs.Workerpools = NewProjectsInstancesWorkerpoolsService(s) 156 return rs 157} 158 159type ProjectsInstancesService struct { 160 s *Service 161 162 Workerpools *ProjectsInstancesWorkerpoolsService 163} 164 165func NewProjectsInstancesWorkerpoolsService(s *Service) *ProjectsInstancesWorkerpoolsService { 166 rs := &ProjectsInstancesWorkerpoolsService{s: s} 167 return rs 168} 169 170type ProjectsInstancesWorkerpoolsService struct { 171 s *Service 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// GoogleDevtoolsRemotebuildbotCommandDurations: CommandDuration 1471// contains the various duration metrics tracked when a bot performs a 1472// command. 1473type GoogleDevtoolsRemotebuildbotCommandDurations struct { 1474 // CasRelease: The time spent to release the CAS blobs used by the task. 1475 CasRelease string `json:"casRelease,omitempty"` 1476 1477 // CmWaitForAssignment: The time spent waiting for Container Manager to 1478 // assign an asynchronous container for execution. 1479 CmWaitForAssignment string `json:"cmWaitForAssignment,omitempty"` 1480 1481 // DockerPrep: The time spent preparing the command to be run in a 1482 // Docker container (includes pulling the Docker image, if necessary). 1483 DockerPrep string `json:"dockerPrep,omitempty"` 1484 1485 // DockerPrepStartTime: The timestamp when docker preparation begins. 1486 DockerPrepStartTime string `json:"dockerPrepStartTime,omitempty"` 1487 1488 // Download: The time spent downloading the input files and constructing 1489 // the working directory. 1490 Download string `json:"download,omitempty"` 1491 1492 // DownloadStartTime: The timestamp when downloading the input files 1493 // begins. 1494 DownloadStartTime string `json:"downloadStartTime,omitempty"` 1495 1496 // ExecStartTime: The timestamp when execution begins. 1497 ExecStartTime string `json:"execStartTime,omitempty"` 1498 1499 // Execution: The time spent executing the command (i.e., doing useful 1500 // work). 1501 Execution string `json:"execution,omitempty"` 1502 1503 // IsoPrepDone: The timestamp when preparation is done and bot starts 1504 // downloading files. 1505 IsoPrepDone string `json:"isoPrepDone,omitempty"` 1506 1507 // Overall: The time spent completing the command, in total. 1508 Overall string `json:"overall,omitempty"` 1509 1510 // Stdout: The time spent uploading the stdout logs. 1511 Stdout string `json:"stdout,omitempty"` 1512 1513 // Upload: The time spent uploading the output files. 1514 Upload string `json:"upload,omitempty"` 1515 1516 // UploadStartTime: The timestamp when uploading the output files 1517 // begins. 1518 UploadStartTime string `json:"uploadStartTime,omitempty"` 1519 1520 // ForceSendFields is a list of field names (e.g. "CasRelease") to 1521 // unconditionally include in API requests. By default, fields with 1522 // empty values are omitted from API requests. However, any non-pointer, 1523 // non-interface field appearing in ForceSendFields will be sent to the 1524 // server regardless of whether the field is empty or not. This may be 1525 // used to include empty fields in Patch requests. 1526 ForceSendFields []string `json:"-"` 1527 1528 // NullFields is a list of field names (e.g. "CasRelease") to include in 1529 // API requests with the JSON null value. By default, fields with empty 1530 // values are omitted from API requests. However, any field with an 1531 // empty value appearing in NullFields will be sent to the server as 1532 // null. It is an error if a field in this list has a non-empty value. 1533 // This may be used to include null fields in Patch requests. 1534 NullFields []string `json:"-"` 1535} 1536 1537func (s *GoogleDevtoolsRemotebuildbotCommandDurations) MarshalJSON() ([]byte, error) { 1538 type NoMethod GoogleDevtoolsRemotebuildbotCommandDurations 1539 raw := NoMethod(*s) 1540 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1541} 1542 1543// GoogleDevtoolsRemotebuildbotCommandEvents: CommandEvents contains 1544// counters for the number of warnings and errors that occurred during 1545// the execution of a command. 1546type GoogleDevtoolsRemotebuildbotCommandEvents struct { 1547 // CmUsage: Indicates if and how Container Manager is being used for 1548 // task execution. 1549 // 1550 // Possible values: 1551 // "CONFIG_NONE" - Container Manager is disabled or not running for 1552 // this execution. 1553 // "CONFIG_MATCH" - Container Manager is enabled and there was a 1554 // matching container available for use during execution. 1555 // "CONFIG_MISMATCH" - Container Manager is enabled, but there was no 1556 // matching container available for execution. 1557 CmUsage string `json:"cmUsage,omitempty"` 1558 1559 // DockerCacheHit: Indicates whether we are using a cached Docker image 1560 // (true) or had to pull the Docker image (false) for this command. 1561 DockerCacheHit bool `json:"dockerCacheHit,omitempty"` 1562 1563 // DockerImageName: Docker Image name. 1564 DockerImageName string `json:"dockerImageName,omitempty"` 1565 1566 // InputCacheMiss: The input cache miss ratio. 1567 InputCacheMiss float64 `json:"inputCacheMiss,omitempty"` 1568 1569 // NumErrors: The number of errors reported. 1570 NumErrors uint64 `json:"numErrors,omitempty,string"` 1571 1572 // NumWarnings: The number of warnings reported. 1573 NumWarnings uint64 `json:"numWarnings,omitempty,string"` 1574 1575 // OutputLocation: Indicates whether output files and/or output 1576 // directories were found relative to the execution root or to the user 1577 // provided work directory or both or none. 1578 // 1579 // Possible values: 1580 // "LOCATION_UNDEFINED" - Location is set to LOCATION_UNDEFINED for 1581 // tasks where the working directorty is not specified or is identical 1582 // to the execution root directory. 1583 // "LOCATION_NONE" - No output files or directories were found neither 1584 // relative to the execution root directory nor relative to the working 1585 // directory. 1586 // "LOCATION_EXEC_ROOT_RELATIVE" - Output files or directories were 1587 // found relative to the execution root directory but not relative to 1588 // the working directory. 1589 // "LOCATION_WORKING_DIR_RELATIVE" - Output files or directories were 1590 // found relative to the working directory but not relative to the 1591 // execution root directory. 1592 // "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE" - Output files or 1593 // directories were found both relative to the execution root directory 1594 // and relative to the working directory. 1595 // "LOCATION_EXEC_ROOT_RELATIVE_OUTPUT_OUTSIDE_WORKING_DIR" - Output 1596 // files or directories were found relative to the execution root 1597 // directory but not relative to the working directory. In addition at 1598 // least one output file or directory was found outside of the working 1599 // directory such that a working-directory-relative-path would have 1600 // needed to start with a `..`. 1601 // 1602 // "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE_OUTPUT_OUTSIDE_WORKING_DI 1603 // R" - Output files or directories were found both relative to the 1604 // execution root directory and relative to the working directory. In 1605 // addition at least one exec-root-relative output file or directory was 1606 // found outside of the working directory such that a 1607 // working-directory-relative-path would have needed to start with a 1608 // `..`. 1609 OutputLocation string `json:"outputLocation,omitempty"` 1610 1611 // UsedAsyncContainer: Indicates whether an asynchronous container was 1612 // used for execution. 1613 UsedAsyncContainer bool `json:"usedAsyncContainer,omitempty"` 1614 1615 // ForceSendFields is a list of field names (e.g. "CmUsage") to 1616 // unconditionally include in API requests. By default, fields with 1617 // empty values are omitted from API requests. However, any non-pointer, 1618 // non-interface field appearing in ForceSendFields will be sent to the 1619 // server regardless of whether the field is empty or not. This may be 1620 // used to include empty fields in Patch requests. 1621 ForceSendFields []string `json:"-"` 1622 1623 // NullFields is a list of field names (e.g. "CmUsage") to include in 1624 // API requests with the JSON null value. By default, fields with empty 1625 // values are omitted from API requests. However, any field with an 1626 // empty value appearing in NullFields will be sent to the server as 1627 // null. It is an error if a field in this list has a non-empty value. 1628 // This may be used to include null fields in Patch requests. 1629 NullFields []string `json:"-"` 1630} 1631 1632func (s *GoogleDevtoolsRemotebuildbotCommandEvents) MarshalJSON() ([]byte, error) { 1633 type NoMethod GoogleDevtoolsRemotebuildbotCommandEvents 1634 raw := NoMethod(*s) 1635 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1636} 1637 1638func (s *GoogleDevtoolsRemotebuildbotCommandEvents) UnmarshalJSON(data []byte) error { 1639 type NoMethod GoogleDevtoolsRemotebuildbotCommandEvents 1640 var s1 struct { 1641 InputCacheMiss gensupport.JSONFloat64 `json:"inputCacheMiss"` 1642 *NoMethod 1643 } 1644 s1.NoMethod = (*NoMethod)(s) 1645 if err := json.Unmarshal(data, &s1); err != nil { 1646 return err 1647 } 1648 s.InputCacheMiss = float64(s1.InputCacheMiss) 1649 return nil 1650} 1651 1652// GoogleDevtoolsRemotebuildbotCommandStatus: The internal status of the 1653// command result. 1654type GoogleDevtoolsRemotebuildbotCommandStatus struct { 1655 // Code: The status code. 1656 // 1657 // Possible values: 1658 // "OK" - The command succeeded. 1659 // "INVALID_ARGUMENT" - The command input was invalid. 1660 // "DEADLINE_EXCEEDED" - The command had passed its expiry time while 1661 // it was still running. 1662 // "NOT_FOUND" - The resources requested by the command were not 1663 // found. 1664 // "PERMISSION_DENIED" - The command failed due to permission errors. 1665 // "INTERNAL" - The command failed because of some invariants expected 1666 // by the underlying system have been broken. This usually indicates a 1667 // bug wit the system. 1668 // "ABORTED" - The command was aborted. 1669 // "FAILED_PRECONDITION" - The command failed because the system is 1670 // not in a state required for the command, e.g. the command inputs 1671 // cannot be found on the server. 1672 // "CLEANUP_ERROR" - The bot failed to do the cleanup, e.g. unable to 1673 // delete the command working directory or the command process. 1674 // "DOWNLOAD_INPUTS_ERROR" - The bot failed to download the inputs. 1675 // "UNKNOWN" - Unknown error. 1676 // "UPLOAD_OUTPUTS_ERROR" - The bot failed to upload the outputs. 1677 // "UPLOAD_OUTPUTS_BYTES_LIMIT_EXCEEDED" - The bot tried to upload 1678 // files having a total size that is too large. 1679 // "DOCKER_LOGIN_ERROR" - The bot failed to login to docker. 1680 // "DOCKER_IMAGE_PULL_ERROR" - The bot failed to pull docker image. 1681 // "DOCKER_IMAGE_EXIST_ERROR" - The bot failed to check docker images. 1682 // "DUPLICATE_INPUTS" - The inputs contain duplicate files. 1683 // "DOCKER_IMAGE_PERMISSION_DENIED" - The bot doesn't have the 1684 // permissions to pull docker images. 1685 // "DOCKER_IMAGE_NOT_FOUND" - The docker image cannot be found. 1686 // "WORKING_DIR_NOT_FOUND" - Working directory is not found. 1687 // "WORKING_DIR_NOT_IN_BASE_DIR" - Working directory is not under the 1688 // base directory 1689 // "DOCKER_UNAVAILABLE" - There are issues with docker 1690 // service/runtime. 1691 // "NO_CUDA_CAPABLE_DEVICE" - The command failed with "no cuda-capable 1692 // device is detected" error. 1693 // "REMOTE_CAS_DOWNLOAD_ERROR" - The bot encountered errors from 1694 // remote CAS when downloading blobs. 1695 // "REMOTE_CAS_UPLOAD_ERROR" - The bot encountered errors from remote 1696 // CAS when uploading blobs. 1697 // "LOCAL_CASPROXY_NOT_RUNNING" - The local casproxy is not running. 1698 // "DOCKER_CREATE_CONTAINER_ERROR" - The bot couldn't start the 1699 // container. 1700 // "DOCKER_INVALID_ULIMIT" - The docker ulimit is not valid. 1701 // "DOCKER_UNKNOWN_RUNTIME" - The docker runtime is unknown. 1702 // "DOCKER_UNKNOWN_CAPABILITY" - The docker capability is unknown. 1703 // "DOCKER_UNKNOWN_ERROR" - The command failed with unknown docker 1704 // errors. 1705 // "DOCKER_CREATE_COMPUTE_SYSTEM_ERROR" - Docker failed to run 1706 // containers with CreateComputeSystem error. 1707 // "DOCKER_PREPARELAYER_ERROR" - Docker failed to run containers with 1708 // hcsshim::PrepareLayer error. 1709 // "DOCKER_INCOMPATIBLE_OS_ERROR" - Docker incompatible operating 1710 // system error. 1711 // "DOCKER_CREATE_RUNTIME_FILE_NOT_FOUND" - Docker failed to create 1712 // OCI runtime because of file not found. 1713 // "DOCKER_CREATE_RUNTIME_PERMISSION_DENIED" - Docker failed to create 1714 // OCI runtime because of permission denied. 1715 // "DOCKER_CREATE_PROCESS_FILE_NOT_FOUND" - Docker failed to create 1716 // process because of file not found. 1717 // "DOCKER_CREATE_COMPUTE_SYSTEM_INCORRECT_PARAMETER_ERROR" - Docker 1718 // failed to run containers with CreateComputeSystem error that involves 1719 // an incorrect parameter (more specific version of 1720 // DOCKER_CREATE_COMPUTE_SYSTEM_ERROR that is user-caused). 1721 // "DOCKER_TOO_MANY_SYMBOLIC_LINK_LEVELS" - Docker failed to create an 1722 // overlay mount because of too many levels of symbolic links. 1723 // "LOCAL_CONTAINER_MANAGER_NOT_RUNNING" - The local Container Manager 1724 // is not running. 1725 // "DOCKER_IMAGE_VPCSC_PERMISSION_DENIED" - Docker failed because a 1726 // request was denied by the organization's policy. 1727 // "WORKING_DIR_NOT_RELATIVE" - Working directory is not relative 1728 // "DOCKER_MISSING_CONTAINER" - Docker cannot find the container 1729 // specified in the command. This error is likely to only occur if an 1730 // asynchronous container is not running when the command is run. 1731 Code string `json:"code,omitempty"` 1732 1733 // Message: The error message. 1734 Message string `json:"message,omitempty"` 1735 1736 // ForceSendFields is a list of field names (e.g. "Code") to 1737 // unconditionally include in API requests. By default, fields with 1738 // empty values are omitted from API requests. However, any non-pointer, 1739 // non-interface field appearing in ForceSendFields will be sent to the 1740 // server regardless of whether the field is empty or not. This may be 1741 // used to include empty fields in Patch requests. 1742 ForceSendFields []string `json:"-"` 1743 1744 // NullFields is a list of field names (e.g. "Code") to include in API 1745 // requests with the JSON null value. By default, fields with empty 1746 // values are omitted from API requests. However, any field with an 1747 // empty value appearing in NullFields will be sent to the server as 1748 // null. It is an error if a field in this list has a non-empty value. 1749 // This may be used to include null fields in Patch requests. 1750 NullFields []string `json:"-"` 1751} 1752 1753func (s *GoogleDevtoolsRemotebuildbotCommandStatus) MarshalJSON() ([]byte, error) { 1754 type NoMethod GoogleDevtoolsRemotebuildbotCommandStatus 1755 raw := NoMethod(*s) 1756 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1757} 1758 1759// GoogleDevtoolsRemotebuildbotResourceUsage: ResourceUsage is the 1760// system resource usage of the host machine. 1761type GoogleDevtoolsRemotebuildbotResourceUsage struct { 1762 CpuUsedPercent float64 `json:"cpuUsedPercent,omitempty"` 1763 1764 DiskUsage *GoogleDevtoolsRemotebuildbotResourceUsageStat `json:"diskUsage,omitempty"` 1765 1766 MemoryUsage *GoogleDevtoolsRemotebuildbotResourceUsageStat `json:"memoryUsage,omitempty"` 1767 1768 TotalDiskIoStats *GoogleDevtoolsRemotebuildbotResourceUsageIOStats `json:"totalDiskIoStats,omitempty"` 1769 1770 // ForceSendFields is a list of field names (e.g. "CpuUsedPercent") to 1771 // unconditionally include in API requests. By default, fields with 1772 // empty values are omitted from API requests. However, any non-pointer, 1773 // non-interface field appearing in ForceSendFields will be sent to the 1774 // server regardless of whether the field is empty or not. This may be 1775 // used to include empty fields in Patch requests. 1776 ForceSendFields []string `json:"-"` 1777 1778 // NullFields is a list of field names (e.g. "CpuUsedPercent") to 1779 // include in API requests with the JSON null value. By default, fields 1780 // with empty values are omitted from API requests. However, any field 1781 // with an empty value appearing in NullFields will be sent to the 1782 // server as null. It is an error if a field in this list has a 1783 // non-empty value. This may be used to include null fields in Patch 1784 // requests. 1785 NullFields []string `json:"-"` 1786} 1787 1788func (s *GoogleDevtoolsRemotebuildbotResourceUsage) MarshalJSON() ([]byte, error) { 1789 type NoMethod GoogleDevtoolsRemotebuildbotResourceUsage 1790 raw := NoMethod(*s) 1791 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1792} 1793 1794func (s *GoogleDevtoolsRemotebuildbotResourceUsage) UnmarshalJSON(data []byte) error { 1795 type NoMethod GoogleDevtoolsRemotebuildbotResourceUsage 1796 var s1 struct { 1797 CpuUsedPercent gensupport.JSONFloat64 `json:"cpuUsedPercent"` 1798 *NoMethod 1799 } 1800 s1.NoMethod = (*NoMethod)(s) 1801 if err := json.Unmarshal(data, &s1); err != nil { 1802 return err 1803 } 1804 s.CpuUsedPercent = float64(s1.CpuUsedPercent) 1805 return nil 1806} 1807 1808type GoogleDevtoolsRemotebuildbotResourceUsageIOStats struct { 1809 ReadBytesCount uint64 `json:"readBytesCount,omitempty,string"` 1810 1811 ReadCount uint64 `json:"readCount,omitempty,string"` 1812 1813 ReadTimeMs uint64 `json:"readTimeMs,omitempty,string"` 1814 1815 WriteBytesCount uint64 `json:"writeBytesCount,omitempty,string"` 1816 1817 WriteCount uint64 `json:"writeCount,omitempty,string"` 1818 1819 WriteTimeMs uint64 `json:"writeTimeMs,omitempty,string"` 1820 1821 // ForceSendFields is a list of field names (e.g. "ReadBytesCount") to 1822 // unconditionally include in API requests. By default, fields with 1823 // empty values are omitted from API requests. However, any non-pointer, 1824 // non-interface field appearing in ForceSendFields will be sent to the 1825 // server regardless of whether the field is empty or not. This may be 1826 // used to include empty fields in Patch requests. 1827 ForceSendFields []string `json:"-"` 1828 1829 // NullFields is a list of field names (e.g. "ReadBytesCount") to 1830 // include in API requests with the JSON null value. By default, fields 1831 // with empty values are omitted from API requests. However, any field 1832 // with an empty value appearing in NullFields will be sent to the 1833 // server as null. It is an error if a field in this list has a 1834 // non-empty value. This may be used to include null fields in Patch 1835 // requests. 1836 NullFields []string `json:"-"` 1837} 1838 1839func (s *GoogleDevtoolsRemotebuildbotResourceUsageIOStats) MarshalJSON() ([]byte, error) { 1840 type NoMethod GoogleDevtoolsRemotebuildbotResourceUsageIOStats 1841 raw := NoMethod(*s) 1842 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1843} 1844 1845type GoogleDevtoolsRemotebuildbotResourceUsageStat struct { 1846 Total uint64 `json:"total,omitempty,string"` 1847 1848 Used uint64 `json:"used,omitempty,string"` 1849 1850 // ForceSendFields is a list of field names (e.g. "Total") to 1851 // unconditionally include in API requests. By default, fields with 1852 // empty values are omitted from API requests. However, any non-pointer, 1853 // non-interface field appearing in ForceSendFields will be sent to the 1854 // server regardless of whether the field is empty or not. This may be 1855 // used to include empty fields in Patch requests. 1856 ForceSendFields []string `json:"-"` 1857 1858 // NullFields is a list of field names (e.g. "Total") to include in API 1859 // requests with the JSON null value. By default, fields with empty 1860 // values are omitted from API requests. However, any field with an 1861 // empty value appearing in NullFields will be sent to the server as 1862 // null. It is an error if a field in this list has a non-empty value. 1863 // This may be used to include null fields in Patch requests. 1864 NullFields []string `json:"-"` 1865} 1866 1867func (s *GoogleDevtoolsRemotebuildbotResourceUsageStat) MarshalJSON() ([]byte, error) { 1868 type NoMethod GoogleDevtoolsRemotebuildbotResourceUsageStat 1869 raw := NoMethod(*s) 1870 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1871} 1872 1873// GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig: 1874// AcceleratorConfig defines the accelerator cards to attach to the VM. 1875type GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig struct { 1876 // AcceleratorCount: The number of guest accelerator cards exposed to 1877 // each VM. 1878 AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"` 1879 1880 // AcceleratorType: The type of accelerator to attach to each VM, e.g. 1881 // "nvidia-tesla-k80" for nVidia Tesla K80. 1882 AcceleratorType string `json:"acceleratorType,omitempty"` 1883 1884 // ForceSendFields is a list of field names (e.g. "AcceleratorCount") to 1885 // unconditionally include in API requests. By default, fields with 1886 // empty values are omitted from API requests. However, any non-pointer, 1887 // non-interface field appearing in ForceSendFields will be sent to the 1888 // server regardless of whether the field is empty or not. This may be 1889 // used to include empty fields in Patch requests. 1890 ForceSendFields []string `json:"-"` 1891 1892 // NullFields is a list of field names (e.g. "AcceleratorCount") to 1893 // include in API requests with the JSON null value. By default, fields 1894 // with empty values are omitted from API requests. However, any field 1895 // with an empty value appearing in NullFields will be sent to the 1896 // server as null. It is an error if a field in this list has a 1897 // non-empty value. This may be used to include null fields in Patch 1898 // requests. 1899 NullFields []string `json:"-"` 1900} 1901 1902func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig) MarshalJSON() ([]byte, error) { 1903 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig 1904 raw := NoMethod(*s) 1905 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1906} 1907 1908// GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale: Autoscale 1909// defines the autoscaling policy of a worker pool. 1910type GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale struct { 1911 // MaxSize: The maximal number of workers. Must be equal to or greater 1912 // than min_size. 1913 MaxSize int64 `json:"maxSize,omitempty,string"` 1914 1915 // MinSize: The minimal number of workers. Must be greater than 0. 1916 MinSize int64 `json:"minSize,omitempty,string"` 1917 1918 // ForceSendFields is a list of field names (e.g. "MaxSize") to 1919 // unconditionally include in API requests. By default, fields with 1920 // empty values are omitted from API requests. However, any non-pointer, 1921 // non-interface field appearing in ForceSendFields will be sent to the 1922 // server regardless of whether the field is empty or not. This may be 1923 // used to include empty fields in Patch requests. 1924 ForceSendFields []string `json:"-"` 1925 1926 // NullFields is a list of field names (e.g. "MaxSize") to include in 1927 // API requests with the JSON null value. By default, fields with empty 1928 // values are omitted from API requests. However, any field with an 1929 // empty value appearing in NullFields will be sent to the server as 1930 // null. It is an error if a field in this list has a non-empty value. 1931 // This may be used to include null fields in Patch requests. 1932 NullFields []string `json:"-"` 1933} 1934 1935func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale) MarshalJSON() ([]byte, error) { 1936 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale 1937 raw := NoMethod(*s) 1938 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1939} 1940 1941// GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest: 1942// The request used for `CreateInstance`. 1943type GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest struct { 1944 // Instance: Specifies the instance to create. The name in the instance, 1945 // if specified in the instance, is ignored. 1946 Instance *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance `json:"instance,omitempty"` 1947 1948 // InstanceId: ID of the created instance. A valid `instance_id` must: 1949 // be 6-50 characters long, contain only lowercase letters, digits, 1950 // hyphens and underscores, start with a lowercase letter, and end with 1951 // a lowercase letter or a digit. 1952 InstanceId string `json:"instanceId,omitempty"` 1953 1954 // Parent: Resource name of the project containing the instance. Format: 1955 // `projects/[PROJECT_ID]`. 1956 Parent string `json:"parent,omitempty"` 1957 1958 // ForceSendFields is a list of field names (e.g. "Instance") to 1959 // unconditionally include in API requests. By default, fields with 1960 // empty values are omitted from API requests. However, any non-pointer, 1961 // non-interface field appearing in ForceSendFields will be sent to the 1962 // server regardless of whether the field is empty or not. This may be 1963 // used to include empty fields in Patch requests. 1964 ForceSendFields []string `json:"-"` 1965 1966 // NullFields is a list of field names (e.g. "Instance") to include in 1967 // API requests with the JSON null value. By default, fields with empty 1968 // values are omitted from API requests. However, any field with an 1969 // empty value appearing in NullFields will be sent to the server as 1970 // null. It is an error if a field in this list has a non-empty value. 1971 // This may be used to include null fields in Patch requests. 1972 NullFields []string `json:"-"` 1973} 1974 1975func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest) MarshalJSON() ([]byte, error) { 1976 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest 1977 raw := NoMethod(*s) 1978 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 1979} 1980 1981// GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest: 1982// The request used for `CreateWorkerPool`. 1983type GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest struct { 1984 // Parent: Resource name of the instance in which to create the new 1985 // worker pool. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 1986 Parent string `json:"parent,omitempty"` 1987 1988 // PoolId: ID of the created worker pool. A valid pool ID must: be 6-50 1989 // characters long, contain only lowercase letters, digits, hyphens and 1990 // underscores, start with a lowercase letter, and end with a lowercase 1991 // letter or a digit. 1992 PoolId string `json:"poolId,omitempty"` 1993 1994 // WorkerPool: Specifies the worker pool to create. The name in the 1995 // worker pool, if specified, is ignored. 1996 WorkerPool *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPool,omitempty"` 1997 1998 // ForceSendFields is a list of field names (e.g. "Parent") to 1999 // unconditionally include in API requests. By default, fields with 2000 // empty values are omitted from API requests. However, any non-pointer, 2001 // non-interface field appearing in ForceSendFields will be sent to the 2002 // server regardless of whether the field is empty or not. This may be 2003 // used to include empty fields in Patch requests. 2004 ForceSendFields []string `json:"-"` 2005 2006 // NullFields is a list of field names (e.g. "Parent") to include in API 2007 // requests with the JSON null value. By default, fields with empty 2008 // values are omitted from API requests. However, any field with an 2009 // empty value appearing in NullFields will be sent to the server as 2010 // null. It is an error if a field in this list has a non-empty value. 2011 // This may be used to include null fields in Patch requests. 2012 NullFields []string `json:"-"` 2013} 2014 2015func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2016 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest 2017 raw := NoMethod(*s) 2018 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2019} 2020 2021// GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest: 2022// The request used for `DeleteInstance`. 2023type GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest struct { 2024 // Name: Name of the instance to delete. Format: 2025 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2026 Name string `json:"name,omitempty"` 2027 2028 // ForceSendFields is a list of field names (e.g. "Name") to 2029 // unconditionally include in API requests. By default, fields with 2030 // empty values are omitted from API requests. However, any non-pointer, 2031 // non-interface field appearing in ForceSendFields will be sent to the 2032 // server regardless of whether the field is empty or not. This may be 2033 // used to include empty fields in Patch requests. 2034 ForceSendFields []string `json:"-"` 2035 2036 // NullFields is a list of field names (e.g. "Name") to include in API 2037 // requests with the JSON null value. By default, fields with empty 2038 // values are omitted from API requests. However, any field with an 2039 // empty value appearing in NullFields will be sent to the server as 2040 // null. It is an error if a field in this list has a non-empty value. 2041 // This may be used to include null fields in Patch requests. 2042 NullFields []string `json:"-"` 2043} 2044 2045func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest) MarshalJSON() ([]byte, error) { 2046 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest 2047 raw := NoMethod(*s) 2048 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2049} 2050 2051// GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest: 2052// The request used for DeleteWorkerPool. 2053type GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest struct { 2054 // Name: Name of the worker pool to delete. Format: 2055 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. 2056 Name string `json:"name,omitempty"` 2057 2058 // ForceSendFields is a list of field names (e.g. "Name") to 2059 // unconditionally include in API requests. By default, fields with 2060 // empty values are omitted from API requests. However, any non-pointer, 2061 // non-interface field appearing in ForceSendFields will be sent to the 2062 // server regardless of whether the field is empty or not. This may be 2063 // used to include empty fields in Patch requests. 2064 ForceSendFields []string `json:"-"` 2065 2066 // NullFields is a list of field names (e.g. "Name") to include in API 2067 // requests with the JSON null value. By default, fields with empty 2068 // values are omitted from API requests. However, any field with an 2069 // empty value appearing in NullFields will be sent to the server as 2070 // null. It is an error if a field in this list has a non-empty value. 2071 // This may be used to include null fields in Patch requests. 2072 NullFields []string `json:"-"` 2073} 2074 2075func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2076 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest 2077 raw := NoMethod(*s) 2078 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2079} 2080 2081// GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy: 2082// FeaturePolicy defines features allowed to be used on RBE instances, 2083// as well as instance-wide behavior changes that take effect without 2084// opt-in or opt-out at usage time. 2085type GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy struct { 2086 // ContainerImageSources: Which container image sources are allowed. 2087 // Currently only RBE-supported registry (gcr.io) is allowed. One can 2088 // allow all repositories under a project or one specific repository 2089 // only. E.g. container_image_sources { policy: RESTRICTED 2090 // allowed_values: [ "gcr.io/project-foo", 2091 // "gcr.io/project-bar/repo-baz", ] } will allow any repositories under 2092 // "gcr.io/project-foo" plus the repository 2093 // "gcr.io/project-bar/repo-baz". Default (UNSPECIFIED) is equivalent to 2094 // any source is allowed. 2095 ContainerImageSources *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"containerImageSources,omitempty"` 2096 2097 // DockerAddCapabilities: Whether dockerAddCapabilities can be used or 2098 // what capabilities are allowed. 2099 DockerAddCapabilities *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"dockerAddCapabilities,omitempty"` 2100 2101 // DockerChrootPath: Whether dockerChrootPath can be used. 2102 DockerChrootPath *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"dockerChrootPath,omitempty"` 2103 2104 // DockerNetwork: Whether dockerNetwork can be used or what network 2105 // modes are allowed. E.g. one may allow `off` value only via 2106 // `allowed_values`. 2107 DockerNetwork *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"dockerNetwork,omitempty"` 2108 2109 // DockerPrivileged: Whether dockerPrivileged can be used. 2110 DockerPrivileged *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"dockerPrivileged,omitempty"` 2111 2112 // DockerRunAsRoot: Whether dockerRunAsRoot can be used. 2113 DockerRunAsRoot *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"dockerRunAsRoot,omitempty"` 2114 2115 // DockerRuntime: Whether dockerRuntime is allowed to be set or what 2116 // runtimes are allowed. Note linux_isolation takes precedence, and if 2117 // set, docker_runtime values may be rejected if they are incompatible 2118 // with the selected isolation. 2119 DockerRuntime *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"dockerRuntime,omitempty"` 2120 2121 // DockerSiblingContainers: Whether dockerSiblingContainers can be used. 2122 DockerSiblingContainers *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature `json:"dockerSiblingContainers,omitempty"` 2123 2124 // LinuxIsolation: linux_isolation allows overriding the docker runtime 2125 // used for containers started on Linux. 2126 // 2127 // Possible values: 2128 // "LINUX_ISOLATION_UNSPECIFIED" - Default value. Will be using Linux 2129 // default runtime. 2130 // "GVISOR" - Use gVisor runsc runtime. 2131 // "OFF" - Use stardard Linux runtime. This has the same behaviour as 2132 // unspecified, but it can be used to revert back from gVisor. 2133 LinuxIsolation string `json:"linuxIsolation,omitempty"` 2134 2135 // ForceSendFields is a list of field names (e.g. 2136 // "ContainerImageSources") to unconditionally include in API requests. 2137 // By default, fields with empty values are omitted from API requests. 2138 // However, any non-pointer, non-interface field appearing in 2139 // ForceSendFields will be sent to the server regardless of whether the 2140 // field is empty or not. This may be used to include empty fields in 2141 // Patch requests. 2142 ForceSendFields []string `json:"-"` 2143 2144 // NullFields is a list of field names (e.g. "ContainerImageSources") to 2145 // include in API requests with the JSON null value. By default, fields 2146 // with empty values are omitted from API requests. However, any field 2147 // with an empty value appearing in NullFields will be sent to the 2148 // server as null. It is an error if a field in this list has a 2149 // non-empty value. This may be used to include null fields in Patch 2150 // requests. 2151 NullFields []string `json:"-"` 2152} 2153 2154func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy) MarshalJSON() ([]byte, error) { 2155 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy 2156 raw := NoMethod(*s) 2157 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2158} 2159 2160// GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature: 2161// Defines whether a feature can be used or what values are accepted. 2162type GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature struct { 2163 // AllowedValues: A list of acceptable values. Only effective when the 2164 // policy is `RESTRICTED`. 2165 AllowedValues []string `json:"allowedValues,omitempty"` 2166 2167 // Policy: The policy of the feature. 2168 // 2169 // Possible values: 2170 // "POLICY_UNSPECIFIED" - Default value, if not explicitly set. 2171 // Equivalent to FORBIDDEN, unless otherwise documented on a specific 2172 // Feature. 2173 // "ALLOWED" - Feature is explicitly allowed. 2174 // "FORBIDDEN" - Feature is forbidden. Requests attempting to leverage 2175 // it will get an FailedPrecondition error, with a message like: 2176 // "Feature forbidden by FeaturePolicy: Feature on instance " 2177 // "RESTRICTED" - Only the values specified in the `allowed_values` 2178 // are allowed. 2179 Policy string `json:"policy,omitempty"` 2180 2181 // ForceSendFields is a list of field names (e.g. "AllowedValues") to 2182 // unconditionally include in API requests. By default, fields with 2183 // empty values are omitted from API requests. However, any non-pointer, 2184 // non-interface field appearing in ForceSendFields will be sent to the 2185 // server regardless of whether the field is empty or not. This may be 2186 // used to include empty fields in Patch requests. 2187 ForceSendFields []string `json:"-"` 2188 2189 // NullFields is a list of field names (e.g. "AllowedValues") to include 2190 // in API requests with the JSON null value. By default, fields with 2191 // empty values are omitted from API requests. However, any field with 2192 // an empty value appearing in NullFields will be sent to the server as 2193 // null. It is an error if a field in this list has a non-empty value. 2194 // This may be used to include null fields in Patch requests. 2195 NullFields []string `json:"-"` 2196} 2197 2198func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature) MarshalJSON() ([]byte, error) { 2199 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature 2200 raw := NoMethod(*s) 2201 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2202} 2203 2204// GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest: The 2205// request used for `GetInstance`. 2206type GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest struct { 2207 // Name: Name of the instance to retrieve. Format: 2208 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2209 Name string `json:"name,omitempty"` 2210 2211 // ForceSendFields is a list of field names (e.g. "Name") to 2212 // unconditionally include in API requests. By default, fields with 2213 // empty values are omitted from API requests. However, any non-pointer, 2214 // non-interface field appearing in ForceSendFields will be sent to the 2215 // server regardless of whether the field is empty or not. This may be 2216 // used to include empty fields in Patch requests. 2217 ForceSendFields []string `json:"-"` 2218 2219 // NullFields is a list of field names (e.g. "Name") to include in API 2220 // requests with the JSON null value. By default, fields with empty 2221 // values are omitted from API requests. However, any field with an 2222 // empty value appearing in NullFields will be sent to the server as 2223 // null. It is an error if a field in this list has a non-empty value. 2224 // This may be used to include null fields in Patch requests. 2225 NullFields []string `json:"-"` 2226} 2227 2228func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest) MarshalJSON() ([]byte, error) { 2229 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest 2230 raw := NoMethod(*s) 2231 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2232} 2233 2234// GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest: 2235// The request used for GetWorkerPool. 2236type GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest struct { 2237 // Name: Name of the worker pool to retrieve. Format: 2238 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. 2239 Name string `json:"name,omitempty"` 2240 2241 // ForceSendFields is a list of field names (e.g. "Name") to 2242 // unconditionally include in API requests. By default, fields with 2243 // empty values are omitted from API requests. However, any non-pointer, 2244 // non-interface field appearing in ForceSendFields will be sent to the 2245 // server regardless of whether the field is empty or not. This may be 2246 // used to include empty fields in Patch requests. 2247 ForceSendFields []string `json:"-"` 2248 2249 // NullFields is a list of field names (e.g. "Name") to include in API 2250 // requests with the JSON null value. By default, fields with empty 2251 // values are omitted from API requests. However, any field with an 2252 // empty value appearing in NullFields will be sent to the server as 2253 // null. It is an error if a field in this list has a non-empty value. 2254 // This may be used to include null fields in Patch requests. 2255 NullFields []string `json:"-"` 2256} 2257 2258func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2259 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest 2260 raw := NoMethod(*s) 2261 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2262} 2263 2264// GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance: Instance 2265// conceptually encapsulates all Remote Build Execution resources for 2266// remote builds. An instance consists of storage and compute resources 2267// (for example, `ContentAddressableStorage`, `ActionCache`, 2268// `WorkerPools`) used for running remote builds. All Remote Build 2269// Execution API calls are scoped to an instance. 2270type GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance struct { 2271 // FeaturePolicy: The policy to define whether or not RBE features can 2272 // be used or how they can be used. 2273 FeaturePolicy *GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy `json:"featurePolicy,omitempty"` 2274 2275 // Location: The location is a GCP region. Currently only `us-central1` 2276 // is supported. 2277 Location string `json:"location,omitempty"` 2278 2279 // LoggingEnabled: Output only. Whether stack driver logging is enabled 2280 // for the instance. 2281 LoggingEnabled bool `json:"loggingEnabled,omitempty"` 2282 2283 // Name: Output only. Instance resource name formatted as: 2284 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be 2285 // populated when creating an instance since it is provided in the 2286 // `instance_id` field. 2287 Name string `json:"name,omitempty"` 2288 2289 // State: Output only. State of the instance. 2290 // 2291 // Possible values: 2292 // "STATE_UNSPECIFIED" - Not a valid state, but the default value of 2293 // the enum. 2294 // "CREATING" - The instance is in state `CREATING` once 2295 // `CreateInstance` is called and before the instance is ready for use. 2296 // "RUNNING" - The instance is in state `RUNNING` when it is ready for 2297 // use. 2298 // "INACTIVE" - An `INACTIVE` instance indicates that there is a 2299 // problem that needs to be fixed. Such instances cannot be used for 2300 // execution and instances that remain in this state for a significant 2301 // period of time will be removed permanently. 2302 State string `json:"state,omitempty"` 2303 2304 // ServerResponse contains the HTTP response code and headers from the 2305 // server. 2306 googleapi.ServerResponse `json:"-"` 2307 2308 // ForceSendFields is a list of field names (e.g. "FeaturePolicy") to 2309 // unconditionally include in API requests. By default, fields with 2310 // empty values are omitted from API requests. However, any non-pointer, 2311 // non-interface field appearing in ForceSendFields will be sent to the 2312 // server regardless of whether the field is empty or not. This may be 2313 // used to include empty fields in Patch requests. 2314 ForceSendFields []string `json:"-"` 2315 2316 // NullFields is a list of field names (e.g. "FeaturePolicy") to include 2317 // in API requests with the JSON null value. By default, fields with 2318 // empty values are omitted from API requests. However, any field with 2319 // an empty value appearing in NullFields will be sent to the server as 2320 // null. It is an error if a field in this list has a non-empty value. 2321 // This may be used to include null fields in Patch requests. 2322 NullFields []string `json:"-"` 2323} 2324 2325func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance) MarshalJSON() ([]byte, error) { 2326 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance 2327 raw := NoMethod(*s) 2328 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2329} 2330 2331type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest struct { 2332 // Parent: Resource name of the project. Format: 2333 // `projects/[PROJECT_ID]`. 2334 Parent string `json:"parent,omitempty"` 2335 2336 // ForceSendFields is a list of field names (e.g. "Parent") to 2337 // unconditionally include in API requests. By default, fields with 2338 // empty values are omitted from API requests. However, any non-pointer, 2339 // non-interface field appearing in ForceSendFields will be sent to the 2340 // server regardless of whether the field is empty or not. This may be 2341 // used to include empty fields in Patch requests. 2342 ForceSendFields []string `json:"-"` 2343 2344 // NullFields is a list of field names (e.g. "Parent") to include in API 2345 // requests with the JSON null value. By default, fields with empty 2346 // values are omitted from API requests. However, any field with an 2347 // empty value appearing in NullFields will be sent to the server as 2348 // null. It is an error if a field in this list has a non-empty value. 2349 // This may be used to include null fields in Patch requests. 2350 NullFields []string `json:"-"` 2351} 2352 2353func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest) MarshalJSON() ([]byte, error) { 2354 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest 2355 raw := NoMethod(*s) 2356 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2357} 2358 2359type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse struct { 2360 // Instances: The list of instances in a given project. 2361 Instances []*GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance `json:"instances,omitempty"` 2362 2363 // ServerResponse contains the HTTP response code and headers from the 2364 // server. 2365 googleapi.ServerResponse `json:"-"` 2366 2367 // ForceSendFields is a list of field names (e.g. "Instances") to 2368 // unconditionally include in API requests. By default, fields with 2369 // empty values are omitted from API requests. However, any non-pointer, 2370 // non-interface field appearing in ForceSendFields will be sent to the 2371 // server regardless of whether the field is empty or not. This may be 2372 // used to include empty fields in Patch requests. 2373 ForceSendFields []string `json:"-"` 2374 2375 // NullFields is a list of field names (e.g. "Instances") to include in 2376 // API requests with the JSON null value. By default, fields with empty 2377 // values are omitted from API requests. However, any field with an 2378 // empty value appearing in NullFields will be sent to the server as 2379 // null. It is an error if a field in this list has a non-empty value. 2380 // This may be used to include null fields in Patch requests. 2381 NullFields []string `json:"-"` 2382} 2383 2384func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse) MarshalJSON() ([]byte, error) { 2385 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse 2386 raw := NoMethod(*s) 2387 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2388} 2389 2390type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest struct { 2391 // Filter: Optional. A filter expression that filters resources listed 2392 // in the response. The expression must specify the field name, a 2393 // comparison operator, and the value that you want to use for 2394 // filtering. The value must be a string, a number, or a boolean. String 2395 // values are case-insensitive. The comparison operator must be either 2396 // `:`, `=`, `!=`, `>`, `>=`, `<=` or `<`. The `:` operator can be used 2397 // with string fields to match substrings. For non-string fields it is 2398 // equivalent to the `=` operator. The `:*` comparison can be used to 2399 // test whether a key has been defined. You can also filter on nested 2400 // fields. To filter on multiple expressions, you can separate 2401 // expression using `AND` and `OR` operators, using parentheses to 2402 // specify precedence. If neither operator is specified, `AND` is 2403 // assumed. Examples: Include only pools with more than 100 reserved 2404 // workers: `(worker_count > 100) (worker_config.reserved = true)` 2405 // Include only pools with a certain label or machines of the 2406 // e2-standard family: `worker_config.labels.key1 : * OR 2407 // worker_config.machine_type: e2-standard` 2408 Filter string `json:"filter,omitempty"` 2409 2410 // Parent: Resource name of the instance. Format: 2411 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2412 Parent string `json:"parent,omitempty"` 2413 2414 // ForceSendFields is a list of field names (e.g. "Filter") to 2415 // unconditionally include in API requests. By default, fields with 2416 // empty values are omitted from API requests. However, any non-pointer, 2417 // non-interface field appearing in ForceSendFields will be sent to the 2418 // server regardless of whether the field is empty or not. This may be 2419 // used to include empty fields in Patch requests. 2420 ForceSendFields []string `json:"-"` 2421 2422 // NullFields is a list of field names (e.g. "Filter") to include in API 2423 // requests with the JSON null value. By default, fields with empty 2424 // values are omitted from API requests. However, any field with an 2425 // empty value appearing in NullFields will be sent to the server as 2426 // null. It is an error if a field in this list has a non-empty value. 2427 // This may be used to include null fields in Patch requests. 2428 NullFields []string `json:"-"` 2429} 2430 2431func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest) MarshalJSON() ([]byte, error) { 2432 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest 2433 raw := NoMethod(*s) 2434 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2435} 2436 2437type GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse struct { 2438 // WorkerPools: The list of worker pools in a given instance. 2439 WorkerPools []*GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPools,omitempty"` 2440 2441 // ServerResponse contains the HTTP response code and headers from the 2442 // server. 2443 googleapi.ServerResponse `json:"-"` 2444 2445 // ForceSendFields is a list of field names (e.g. "WorkerPools") to 2446 // unconditionally include in API requests. By default, fields with 2447 // empty values are omitted from API requests. However, any non-pointer, 2448 // non-interface field appearing in ForceSendFields will be sent to the 2449 // server regardless of whether the field is empty or not. This may be 2450 // used to include empty fields in Patch requests. 2451 ForceSendFields []string `json:"-"` 2452 2453 // NullFields is a list of field names (e.g. "WorkerPools") to include 2454 // in API requests with the JSON null value. By default, fields with 2455 // empty values are omitted from API requests. However, any field with 2456 // an empty value appearing in NullFields will be sent to the server as 2457 // null. It is an error if a field in this list has a non-empty value. 2458 // This may be used to include null fields in Patch requests. 2459 NullFields []string `json:"-"` 2460} 2461 2462func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse) MarshalJSON() ([]byte, error) { 2463 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse 2464 raw := NoMethod(*s) 2465 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2466} 2467 2468// GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest: 2469// The request used for `UpdateInstance`. 2470type GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest struct { 2471 // Instance: Specifies the instance to update. 2472 Instance *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance `json:"instance,omitempty"` 2473 2474 // LoggingEnabled: Deprecated, use instance.logging_enabled instead. 2475 // Whether to enable Stackdriver logging for this instance. 2476 LoggingEnabled bool `json:"loggingEnabled,omitempty"` 2477 2478 // Name: Deprecated, use instance.Name instead. Name of the instance to 2479 // update. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 2480 Name string `json:"name,omitempty"` 2481 2482 // UpdateMask: The update mask applies to instance. For the `FieldMask` 2483 // definition, see 2484 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 2485 // If an empty update_mask is provided, only the non-default valued 2486 // field in the worker pool field will be updated. Note that in order to 2487 // update a field to the default value (zero, false, empty string) an 2488 // explicit update_mask must be provided. 2489 UpdateMask string `json:"updateMask,omitempty"` 2490 2491 // ForceSendFields is a list of field names (e.g. "Instance") to 2492 // unconditionally include in API requests. By default, fields with 2493 // empty values are omitted from API requests. However, any non-pointer, 2494 // non-interface field appearing in ForceSendFields will be sent to the 2495 // server regardless of whether the field is empty or not. This may be 2496 // used to include empty fields in Patch requests. 2497 ForceSendFields []string `json:"-"` 2498 2499 // NullFields is a list of field names (e.g. "Instance") to include in 2500 // API requests with the JSON null value. By default, fields with empty 2501 // values are omitted from API requests. However, any field with an 2502 // empty value appearing in NullFields will be sent to the server as 2503 // null. It is an error if a field in this list has a non-empty value. 2504 // This may be used to include null fields in Patch requests. 2505 NullFields []string `json:"-"` 2506} 2507 2508func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest) MarshalJSON() ([]byte, error) { 2509 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest 2510 raw := NoMethod(*s) 2511 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2512} 2513 2514// GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest: 2515// The request used for UpdateWorkerPool. 2516type GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest struct { 2517 // UpdateMask: The update mask applies to worker_pool. For the 2518 // `FieldMask` definition, see 2519 // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 2520 // If an empty update_mask is provided, only the non-default valued 2521 // field in the worker pool field will be updated. Note that in order to 2522 // update a field to the default value (zero, false, empty string) an 2523 // explicit update_mask must be provided. 2524 UpdateMask string `json:"updateMask,omitempty"` 2525 2526 // WorkerPool: Specifies the worker pool to update. 2527 WorkerPool *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool `json:"workerPool,omitempty"` 2528 2529 // ForceSendFields is a list of field names (e.g. "UpdateMask") to 2530 // unconditionally include in API requests. By default, fields with 2531 // empty values are omitted from API requests. However, any non-pointer, 2532 // non-interface field appearing in ForceSendFields will be sent to the 2533 // server regardless of whether the field is empty or not. This may be 2534 // used to include empty fields in Patch requests. 2535 ForceSendFields []string `json:"-"` 2536 2537 // NullFields is a list of field names (e.g. "UpdateMask") to include in 2538 // API requests with the JSON null value. By default, fields with empty 2539 // values are omitted from API requests. However, any field with an 2540 // empty value appearing in NullFields will be sent to the server as 2541 // null. It is an error if a field in this list has a non-empty value. 2542 // This may be used to include null fields in Patch requests. 2543 NullFields []string `json:"-"` 2544} 2545 2546func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest) MarshalJSON() ([]byte, error) { 2547 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest 2548 raw := NoMethod(*s) 2549 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2550} 2551 2552// GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig: Defines 2553// the configuration to be used for creating workers in the worker pool. 2554type GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig struct { 2555 // Accelerator: The accelerator card attached to each VM. 2556 Accelerator *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig `json:"accelerator,omitempty"` 2557 2558 // DiskSizeGb: Required. Size of the disk attached to the worker, in GB. 2559 // See https://cloud.google.com/compute/docs/disks/ 2560 DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` 2561 2562 // DiskType: Required. Disk Type to use for the worker. See Storage 2563 // options (https://cloud.google.com/compute/docs/disks/#introduction). 2564 // Currently only `pd-standard` and `pd-ssd` are supported. 2565 DiskType string `json:"diskType,omitempty"` 2566 2567 // Labels: Labels associated with the workers. Label keys and values can 2568 // be no longer than 63 characters, can only contain lowercase letters, 2569 // numeric characters, underscores and dashes. International letters are 2570 // permitted. Label keys must start with a letter. Label values are 2571 // optional. There can not be more than 64 labels per resource. 2572 Labels map[string]string `json:"labels,omitempty"` 2573 2574 // MachineType: Required. Machine type of the worker, such as 2575 // `e2-standard-2`. See 2576 // https://cloud.google.com/compute/docs/machine-types for a list of 2577 // supported machine types. Note that `f1-micro` and `g1-small` are not 2578 // yet supported. 2579 MachineType string `json:"machineType,omitempty"` 2580 2581 // MaxConcurrentActions: The maximum number of actions a worker can 2582 // execute concurrently. 2583 MaxConcurrentActions int64 `json:"maxConcurrentActions,omitempty,string"` 2584 2585 // MinCpuPlatform: Minimum CPU platform to use when creating the worker. 2586 // See CPU Platforms 2587 // (https://cloud.google.com/compute/docs/cpu-platforms). 2588 MinCpuPlatform string `json:"minCpuPlatform,omitempty"` 2589 2590 // NetworkAccess: Determines the type of network access granted to 2591 // workers. Possible values: - "public": Workers can connect to the 2592 // public internet. - "private": Workers can only connect to Google APIs 2593 // and services. - "restricted-private": Workers can only connect to 2594 // Google APIs that are reachable through `restricted.googleapis.com` 2595 // (`199.36.153.4/30`). 2596 NetworkAccess string `json:"networkAccess,omitempty"` 2597 2598 // Reserved: Determines whether the worker is reserved (equivalent to a 2599 // Compute Engine on-demand VM and therefore won't be preempted). See 2600 // Preemptible VMs (https://cloud.google.com/preemptible-vms/) for more 2601 // details. 2602 Reserved bool `json:"reserved,omitempty"` 2603 2604 // SoleTenantNodeType: The node type name to be used for sole-tenant 2605 // nodes. 2606 SoleTenantNodeType string `json:"soleTenantNodeType,omitempty"` 2607 2608 // VmImage: The name of the image used by each VM. 2609 VmImage string `json:"vmImage,omitempty"` 2610 2611 // ForceSendFields is a list of field names (e.g. "Accelerator") to 2612 // unconditionally include in API requests. By default, fields with 2613 // empty values are omitted from API requests. However, any non-pointer, 2614 // non-interface field appearing in ForceSendFields will be sent to the 2615 // server regardless of whether the field is empty or not. This may be 2616 // used to include empty fields in Patch requests. 2617 ForceSendFields []string `json:"-"` 2618 2619 // NullFields is a list of field names (e.g. "Accelerator") to include 2620 // in API requests with the JSON null value. By default, fields with 2621 // empty values are omitted from API requests. However, any field with 2622 // an empty value appearing in NullFields will be sent to the server as 2623 // null. It is an error if a field in this list has a non-empty value. 2624 // This may be used to include null fields in Patch requests. 2625 NullFields []string `json:"-"` 2626} 2627 2628func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig) MarshalJSON() ([]byte, error) { 2629 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig 2630 raw := NoMethod(*s) 2631 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2632} 2633 2634// GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool: A worker 2635// pool resource in the Remote Build Execution API. 2636type GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool struct { 2637 // Autoscale: The autoscale policy to apply on a pool. 2638 Autoscale *GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale `json:"autoscale,omitempty"` 2639 2640 // Channel: Channel specifies the release channel of the pool. 2641 Channel string `json:"channel,omitempty"` 2642 2643 // Name: WorkerPool resource name formatted as: 2644 // `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. 2645 // name should not be populated when creating a worker pool since it is 2646 // provided in the `poolId` field. 2647 Name string `json:"name,omitempty"` 2648 2649 // State: Output only. State of the worker pool. 2650 // 2651 // Possible values: 2652 // "STATE_UNSPECIFIED" - Not a valid state, but the default value of 2653 // the enum. 2654 // "CREATING" - The worker pool is in state `CREATING` once 2655 // `CreateWorkerPool` is called and before all requested workers are 2656 // ready. 2657 // "RUNNING" - The worker pool is in state `RUNNING` when all its 2658 // workers are ready for use. 2659 // "UPDATING" - The worker pool is in state `UPDATING` once 2660 // `UpdateWorkerPool` is called and before the new configuration has all 2661 // the requested workers ready for use, and no older configuration has 2662 // any workers. At that point the state transitions to `RUNNING`. 2663 // "DELETING" - The worker pool is in state `DELETING` once the 2664 // `Delete` method is called and before the deletion completes. 2665 // "INACTIVE" - The worker pool is in state `INACTIVE` when the 2666 // instance hosting the worker pool in not running. 2667 State string `json:"state,omitempty"` 2668 2669 // WorkerConfig: Specifies the properties, such as machine type and disk 2670 // size, used for creating workers in a worker pool. 2671 WorkerConfig *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig `json:"workerConfig,omitempty"` 2672 2673 // WorkerCount: The desired number of workers in the worker pool. Must 2674 // be a value between 0 and 15000. 2675 WorkerCount int64 `json:"workerCount,omitempty,string"` 2676 2677 // ServerResponse contains the HTTP response code and headers from the 2678 // server. 2679 googleapi.ServerResponse `json:"-"` 2680 2681 // ForceSendFields is a list of field names (e.g. "Autoscale") to 2682 // unconditionally include in API requests. By default, fields with 2683 // empty values are omitted from API requests. However, any non-pointer, 2684 // non-interface field appearing in ForceSendFields will be sent to the 2685 // server regardless of whether the field is empty or not. This may be 2686 // used to include empty fields in Patch requests. 2687 ForceSendFields []string `json:"-"` 2688 2689 // NullFields is a list of field names (e.g. "Autoscale") to include in 2690 // API requests with the JSON null value. By default, fields with empty 2691 // values are omitted from API requests. However, any field with an 2692 // empty value appearing in NullFields will be sent to the server as 2693 // null. It is an error if a field in this list has a non-empty value. 2694 // This may be used to include null fields in Patch requests. 2695 NullFields []string `json:"-"` 2696} 2697 2698func (s *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool) MarshalJSON() ([]byte, error) { 2699 type NoMethod GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool 2700 raw := NoMethod(*s) 2701 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2702} 2703 2704// GoogleDevtoolsRemoteworkersV1test2AdminTemp: AdminTemp is a 2705// prelimiary set of administration tasks. It's called "Temp" because we 2706// do not yet know the best way to represent admin tasks; it's possible 2707// that this will be entirely replaced in later versions of this API. If 2708// this message proves to be sufficient, it will be renamed in the alpha 2709// or beta release of this API. This message (suitably marshalled into a 2710// protobuf.Any) can be used as the inline_assignment field in a lease; 2711// the lease assignment field should simply be "admin" in these cases. 2712// This message is heavily based on Swarming administration tasks from 2713// the LUCI project (http://github.com/luci/luci-py/appengine/swarming). 2714type GoogleDevtoolsRemoteworkersV1test2AdminTemp struct { 2715 // Arg: The argument to the admin action; see `Command` for semantics. 2716 Arg string `json:"arg,omitempty"` 2717 2718 // Command: The admin action; see `Command` for legal values. 2719 // 2720 // Possible values: 2721 // "UNSPECIFIED" - Illegal value. 2722 // "BOT_UPDATE" - Download and run a new version of the bot. `arg` 2723 // will be a resource accessible via `ByteStream.Read` to obtain the new 2724 // bot code. 2725 // "BOT_RESTART" - Restart the bot without downloading a new version. 2726 // `arg` will be a message to log. 2727 // "BOT_TERMINATE" - Shut down the bot. `arg` will be a task resource 2728 // name (similar to those in tasks.proto) that the bot can use to tell 2729 // the server that it is terminating. 2730 // "HOST_RESTART" - Restart the host computer. `arg` will be a message 2731 // to log. 2732 Command string `json:"command,omitempty"` 2733 2734 // ForceSendFields is a list of field names (e.g. "Arg") to 2735 // unconditionally include in API requests. By default, fields with 2736 // empty values are omitted from API requests. However, any non-pointer, 2737 // non-interface field appearing in ForceSendFields will be sent to the 2738 // server regardless of whether the field is empty or not. This may be 2739 // used to include empty fields in Patch requests. 2740 ForceSendFields []string `json:"-"` 2741 2742 // NullFields is a list of field names (e.g. "Arg") to include in API 2743 // requests with the JSON null value. By default, fields with empty 2744 // values are omitted from API requests. However, any field with an 2745 // empty value appearing in NullFields will be sent to the server as 2746 // null. It is an error if a field in this list has a non-empty value. 2747 // This may be used to include null fields in Patch requests. 2748 NullFields []string `json:"-"` 2749} 2750 2751func (s *GoogleDevtoolsRemoteworkersV1test2AdminTemp) MarshalJSON() ([]byte, error) { 2752 type NoMethod GoogleDevtoolsRemoteworkersV1test2AdminTemp 2753 raw := NoMethod(*s) 2754 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2755} 2756 2757// GoogleDevtoolsRemoteworkersV1test2Blob: Describes a blob of binary 2758// content with its digest. 2759type GoogleDevtoolsRemoteworkersV1test2Blob struct { 2760 // Contents: The contents of the blob. 2761 Contents string `json:"contents,omitempty"` 2762 2763 // Digest: The digest of the blob. This should be verified by the 2764 // receiver. 2765 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 2766 2767 // ForceSendFields is a list of field names (e.g. "Contents") to 2768 // unconditionally include in API requests. By default, fields with 2769 // empty values are omitted from API requests. However, any non-pointer, 2770 // non-interface field appearing in ForceSendFields will be sent to the 2771 // server regardless of whether the field is empty or not. This may be 2772 // used to include empty fields in Patch requests. 2773 ForceSendFields []string `json:"-"` 2774 2775 // NullFields is a list of field names (e.g. "Contents") to include in 2776 // API requests with the JSON null value. By default, fields with empty 2777 // values are omitted from API requests. However, any field with an 2778 // empty value appearing in NullFields will be sent to the server as 2779 // null. It is an error if a field in this list has a non-empty value. 2780 // This may be used to include null fields in Patch requests. 2781 NullFields []string `json:"-"` 2782} 2783 2784func (s *GoogleDevtoolsRemoteworkersV1test2Blob) MarshalJSON() ([]byte, error) { 2785 type NoMethod GoogleDevtoolsRemoteworkersV1test2Blob 2786 raw := NoMethod(*s) 2787 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2788} 2789 2790// GoogleDevtoolsRemoteworkersV1test2CommandOutputs: DEPRECATED - use 2791// CommandResult instead. Describes the actual outputs from the task. 2792type GoogleDevtoolsRemoteworkersV1test2CommandOutputs struct { 2793 // ExitCode: exit_code is only fully reliable if the status' code is OK. 2794 // If the task exceeded its deadline or was cancelled, the process may 2795 // still produce an exit code as it is cancelled, and this will be 2796 // populated, but a successful (zero) is unlikely to be correct unless 2797 // the status code is OK. 2798 ExitCode int64 `json:"exitCode,omitempty"` 2799 2800 // Outputs: The output files. The blob referenced by the digest should 2801 // contain one of the following (implementation-dependent): * A 2802 // marshalled DirectoryMetadata of the returned filesystem * A 2803 // LUCI-style .isolated file 2804 Outputs *GoogleDevtoolsRemoteworkersV1test2Digest `json:"outputs,omitempty"` 2805 2806 // ForceSendFields is a list of field names (e.g. "ExitCode") to 2807 // unconditionally include in API requests. By default, fields with 2808 // empty values are omitted from API requests. However, any non-pointer, 2809 // non-interface field appearing in ForceSendFields will be sent to the 2810 // server regardless of whether the field is empty or not. This may be 2811 // used to include empty fields in Patch requests. 2812 ForceSendFields []string `json:"-"` 2813 2814 // NullFields is a list of field names (e.g. "ExitCode") to include in 2815 // API requests with the JSON null value. By default, fields with empty 2816 // values are omitted from API requests. However, any field with an 2817 // empty value appearing in NullFields will be sent to the server as 2818 // null. It is an error if a field in this list has a non-empty value. 2819 // This may be used to include null fields in Patch requests. 2820 NullFields []string `json:"-"` 2821} 2822 2823func (s *GoogleDevtoolsRemoteworkersV1test2CommandOutputs) MarshalJSON() ([]byte, error) { 2824 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandOutputs 2825 raw := NoMethod(*s) 2826 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2827} 2828 2829// GoogleDevtoolsRemoteworkersV1test2CommandOverhead: DEPRECATED - use 2830// CommandResult instead. Can be used as part of 2831// CompleteRequest.metadata, or are part of a more sophisticated 2832// message. 2833type GoogleDevtoolsRemoteworkersV1test2CommandOverhead struct { 2834 // Duration: The elapsed time between calling Accept and Complete. The 2835 // server will also have its own idea of what this should be, but this 2836 // excludes the overhead of the RPCs and the bot response time. 2837 Duration string `json:"duration,omitempty"` 2838 2839 // Overhead: The amount of time *not* spent executing the command (ie 2840 // uploading/downloading files). 2841 Overhead string `json:"overhead,omitempty"` 2842 2843 // ForceSendFields is a list of field names (e.g. "Duration") to 2844 // unconditionally include in API requests. By default, fields with 2845 // empty values are omitted from API requests. However, any non-pointer, 2846 // non-interface field appearing in ForceSendFields will be sent to the 2847 // server regardless of whether the field is empty or not. This may be 2848 // used to include empty fields in Patch requests. 2849 ForceSendFields []string `json:"-"` 2850 2851 // NullFields is a list of field names (e.g. "Duration") to include in 2852 // API requests with the JSON null value. By default, fields with empty 2853 // values are omitted from API requests. However, any field with an 2854 // empty value appearing in NullFields will be sent to the server as 2855 // null. It is an error if a field in this list has a non-empty value. 2856 // This may be used to include null fields in Patch requests. 2857 NullFields []string `json:"-"` 2858} 2859 2860func (s *GoogleDevtoolsRemoteworkersV1test2CommandOverhead) MarshalJSON() ([]byte, error) { 2861 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandOverhead 2862 raw := NoMethod(*s) 2863 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2864} 2865 2866// GoogleDevtoolsRemoteworkersV1test2CommandResult: All information 2867// about the execution of a command, suitable for providing as the Bots 2868// interface's `Lease.result` field. 2869type GoogleDevtoolsRemoteworkersV1test2CommandResult struct { 2870 // Duration: The elapsed time between calling Accept and Complete. The 2871 // server will also have its own idea of what this should be, but this 2872 // excludes the overhead of the RPCs and the bot response time. 2873 Duration string `json:"duration,omitempty"` 2874 2875 // ExitCode: The exit code of the process. An exit code of "0" should 2876 // only be trusted if `status` has a code of OK (otherwise it may simply 2877 // be unset). 2878 ExitCode int64 `json:"exitCode,omitempty"` 2879 2880 // Metadata: Implementation-dependent metadata about the task. Both 2881 // servers and bots may define messages which can be encoded here; bots 2882 // are free to provide metadata in multiple formats, and servers are 2883 // free to choose one or more of the values to process and ignore 2884 // others. In particular, it is *not* considered an error for the bot to 2885 // provide the server with a field that it doesn't know about. 2886 Metadata []googleapi.RawMessage `json:"metadata,omitempty"` 2887 2888 // Outputs: The output files. The blob referenced by the digest should 2889 // contain one of the following (implementation-dependent): * A 2890 // marshalled DirectoryMetadata of the returned filesystem * A 2891 // LUCI-style .isolated file 2892 Outputs *GoogleDevtoolsRemoteworkersV1test2Digest `json:"outputs,omitempty"` 2893 2894 // Overhead: The amount of time *not* spent executing the command (ie 2895 // uploading/downloading files). 2896 Overhead string `json:"overhead,omitempty"` 2897 2898 // Status: An overall status for the command. For example, if the 2899 // command timed out, this might have a code of DEADLINE_EXCEEDED; if it 2900 // was killed by the OS for memory exhaustion, it might have a code of 2901 // RESOURCE_EXHAUSTED. 2902 Status *GoogleRpcStatus `json:"status,omitempty"` 2903 2904 // ForceSendFields is a list of field names (e.g. "Duration") to 2905 // unconditionally include in API requests. By default, fields with 2906 // empty values are omitted from API requests. However, any non-pointer, 2907 // non-interface field appearing in ForceSendFields will be sent to the 2908 // server regardless of whether the field is empty or not. This may be 2909 // used to include empty fields in Patch requests. 2910 ForceSendFields []string `json:"-"` 2911 2912 // NullFields is a list of field names (e.g. "Duration") to include in 2913 // API requests with the JSON null value. By default, fields with empty 2914 // values are omitted from API requests. However, any field with an 2915 // empty value appearing in NullFields will be sent to the server as 2916 // null. It is an error if a field in this list has a non-empty value. 2917 // This may be used to include null fields in Patch requests. 2918 NullFields []string `json:"-"` 2919} 2920 2921func (s *GoogleDevtoolsRemoteworkersV1test2CommandResult) MarshalJSON() ([]byte, error) { 2922 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandResult 2923 raw := NoMethod(*s) 2924 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2925} 2926 2927// GoogleDevtoolsRemoteworkersV1test2CommandTask: Describes a 2928// shell-style task to execute, suitable for providing as the Bots 2929// interface's `Lease.payload` field. 2930type GoogleDevtoolsRemoteworkersV1test2CommandTask struct { 2931 // ExpectedOutputs: The expected outputs from the task. 2932 ExpectedOutputs *GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs `json:"expectedOutputs,omitempty"` 2933 2934 // Inputs: The inputs to the task. 2935 Inputs *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs `json:"inputs,omitempty"` 2936 2937 // Timeouts: The timeouts of this task. 2938 Timeouts *GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts `json:"timeouts,omitempty"` 2939 2940 // ForceSendFields is a list of field names (e.g. "ExpectedOutputs") to 2941 // unconditionally include in API requests. By default, fields with 2942 // empty values are omitted from API requests. However, any non-pointer, 2943 // non-interface field appearing in ForceSendFields will be sent to the 2944 // server regardless of whether the field is empty or not. This may be 2945 // used to include empty fields in Patch requests. 2946 ForceSendFields []string `json:"-"` 2947 2948 // NullFields is a list of field names (e.g. "ExpectedOutputs") to 2949 // include in API requests with the JSON null value. By default, fields 2950 // with empty values are omitted from API requests. However, any field 2951 // with an empty value appearing in NullFields will be sent to the 2952 // server as null. It is an error if a field in this list has a 2953 // non-empty value. This may be used to include null fields in Patch 2954 // requests. 2955 NullFields []string `json:"-"` 2956} 2957 2958func (s *GoogleDevtoolsRemoteworkersV1test2CommandTask) MarshalJSON() ([]byte, error) { 2959 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTask 2960 raw := NoMethod(*s) 2961 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 2962} 2963 2964// GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs: Describes the 2965// inputs to a shell-style task. 2966type GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs struct { 2967 // Arguments: The command itself to run (e.g., argv). This field should 2968 // be passed directly to the underlying operating system, and so it must 2969 // be sensible to that operating system. For example, on Windows, the 2970 // first argument might be "C:\Windows\System32\ping.exe" - that is, 2971 // using drive letters and backslashes. A command for a *nix system, on 2972 // the other hand, would use forward slashes. All other fields in the 2973 // RWAPI must consistently use forward slashes, since those fields may 2974 // be interpretted by both the service and the bot. 2975 Arguments []string `json:"arguments,omitempty"` 2976 2977 // EnvironmentVariables: All environment variables required by the task. 2978 EnvironmentVariables []*GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable `json:"environmentVariables,omitempty"` 2979 2980 // Files: The input filesystem to be set up prior to the task beginning. 2981 // The contents should be a repeated set of FileMetadata messages though 2982 // other formats are allowed if better for the implementation (eg, a 2983 // LUCI-style .isolated file). This field is repeated since 2984 // implementations might want to cache the metadata, in which case it 2985 // may be useful to break up portions of the filesystem that change 2986 // frequently (eg, specific input files) from those that don't (eg, 2987 // standard header files). 2988 Files []*GoogleDevtoolsRemoteworkersV1test2Digest `json:"files,omitempty"` 2989 2990 // InlineBlobs: Inline contents for blobs expected to be needed by the 2991 // bot to execute the task. For example, contents of entries in `files` 2992 // or blobs that are indirectly referenced by an entry there. The bot 2993 // should check against this list before downloading required task 2994 // inputs to reduce the number of communications between itself and the 2995 // remote CAS server. 2996 InlineBlobs []*GoogleDevtoolsRemoteworkersV1test2Blob `json:"inlineBlobs,omitempty"` 2997 2998 // WorkingDirectory: Directory from which a command is executed. It is a 2999 // relative directory with respect to the bot's working directory (i.e., 3000 // "./"). If it is non-empty, then it must exist under "./". Otherwise, 3001 // "./" will be used. 3002 WorkingDirectory string `json:"workingDirectory,omitempty"` 3003 3004 // ForceSendFields is a list of field names (e.g. "Arguments") to 3005 // unconditionally include in API requests. By default, fields with 3006 // empty values are omitted from API requests. However, any non-pointer, 3007 // non-interface field appearing in ForceSendFields will be sent to the 3008 // server regardless of whether the field is empty or not. This may be 3009 // used to include empty fields in Patch requests. 3010 ForceSendFields []string `json:"-"` 3011 3012 // NullFields is a list of field names (e.g. "Arguments") to include in 3013 // API requests with the JSON null value. By default, fields with empty 3014 // values are omitted from API requests. However, any field with an 3015 // empty value appearing in NullFields will be sent to the server as 3016 // null. It is an error if a field in this list has a non-empty value. 3017 // This may be used to include null fields in Patch requests. 3018 NullFields []string `json:"-"` 3019} 3020 3021func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs) MarshalJSON() ([]byte, error) { 3022 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs 3023 raw := NoMethod(*s) 3024 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3025} 3026 3027// GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable 3028// : An environment variable required by this task. 3029type GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable struct { 3030 // Name: The envvar name. 3031 Name string `json:"name,omitempty"` 3032 3033 // Value: The envvar value. 3034 Value string `json:"value,omitempty"` 3035 3036 // ForceSendFields is a list of field names (e.g. "Name") to 3037 // unconditionally include in API requests. By default, fields with 3038 // empty values are omitted from API requests. However, any non-pointer, 3039 // non-interface field appearing in ForceSendFields will be sent to the 3040 // server regardless of whether the field is empty or not. This may be 3041 // used to include empty fields in Patch requests. 3042 ForceSendFields []string `json:"-"` 3043 3044 // NullFields is a list of field names (e.g. "Name") to include in API 3045 // requests with the JSON null value. By default, fields with empty 3046 // values are omitted from API requests. However, any field with an 3047 // empty value appearing in NullFields will be sent to the server as 3048 // null. It is an error if a field in this list has a non-empty value. 3049 // This may be used to include null fields in Patch requests. 3050 NullFields []string `json:"-"` 3051} 3052 3053func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable) MarshalJSON() ([]byte, error) { 3054 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable 3055 raw := NoMethod(*s) 3056 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3057} 3058 3059// GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs: Describes the 3060// expected outputs of the command. 3061type GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs struct { 3062 // Directories: A list of expected directories, relative to the 3063 // execution root. All paths MUST be delimited by forward slashes. 3064 Directories []string `json:"directories,omitempty"` 3065 3066 // Files: A list of expected files, relative to the execution root. All 3067 // paths MUST be delimited by forward slashes. 3068 Files []string `json:"files,omitempty"` 3069 3070 // StderrDestination: The destination to which any stderr should be 3071 // sent. The method by which the bot should send the stream contents to 3072 // that destination is not defined in this API. As examples, the 3073 // destination could be a file referenced in the `files` field in this 3074 // message, or it could be a URI that must be written via the ByteStream 3075 // API. 3076 StderrDestination string `json:"stderrDestination,omitempty"` 3077 3078 // StdoutDestination: The destination to which any stdout should be 3079 // sent. The method by which the bot should send the stream contents to 3080 // that destination is not defined in this API. As examples, the 3081 // destination could be a file referenced in the `files` field in this 3082 // message, or it could be a URI that must be written via the ByteStream 3083 // API. 3084 StdoutDestination string `json:"stdoutDestination,omitempty"` 3085 3086 // ForceSendFields is a list of field names (e.g. "Directories") to 3087 // unconditionally include in API requests. By default, fields with 3088 // empty values are omitted from API requests. However, any non-pointer, 3089 // non-interface field appearing in ForceSendFields will be sent to the 3090 // server regardless of whether the field is empty or not. This may be 3091 // used to include empty fields in Patch requests. 3092 ForceSendFields []string `json:"-"` 3093 3094 // NullFields is a list of field names (e.g. "Directories") to include 3095 // in API requests with the JSON null value. By default, fields with 3096 // empty values are omitted from API requests. However, any field with 3097 // an empty value appearing in NullFields will be sent to the server as 3098 // null. It is an error if a field in this list has a non-empty value. 3099 // This may be used to include null fields in Patch requests. 3100 NullFields []string `json:"-"` 3101} 3102 3103func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs) MarshalJSON() ([]byte, error) { 3104 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs 3105 raw := NoMethod(*s) 3106 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3107} 3108 3109// GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts: Describes the 3110// timeouts associated with this task. 3111type GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts struct { 3112 // Execution: This specifies the maximum time that the task can run, 3113 // excluding the time required to download inputs or upload outputs. 3114 // That is, the worker will terminate the task if it runs longer than 3115 // this. 3116 Execution string `json:"execution,omitempty"` 3117 3118 // Idle: This specifies the maximum amount of time the task can be idle 3119 // - that is, go without generating some output in either stdout or 3120 // stderr. If the process is silent for more than the specified time, 3121 // the worker will terminate the task. 3122 Idle string `json:"idle,omitempty"` 3123 3124 // Shutdown: If the execution or IO timeouts are exceeded, the worker 3125 // will try to gracefully terminate the task and return any existing 3126 // logs. However, tasks may be hard-frozen in which case this process 3127 // will fail. This timeout specifies how long to wait for a terminated 3128 // task to shut down gracefully (e.g. via SIGTERM) before we bring down 3129 // the hammer (e.g. SIGKILL on *nix, CTRL_BREAK_EVENT on Windows). 3130 Shutdown string `json:"shutdown,omitempty"` 3131 3132 // ForceSendFields is a list of field names (e.g. "Execution") to 3133 // unconditionally include in API requests. By default, fields with 3134 // empty values are omitted from API requests. However, any non-pointer, 3135 // non-interface field appearing in ForceSendFields will be sent to the 3136 // server regardless of whether the field is empty or not. This may be 3137 // used to include empty fields in Patch requests. 3138 ForceSendFields []string `json:"-"` 3139 3140 // NullFields is a list of field names (e.g. "Execution") to include in 3141 // API requests with the JSON null value. By default, fields with empty 3142 // values are omitted from API requests. However, any field with an 3143 // empty value appearing in NullFields will be sent to the server as 3144 // null. It is an error if a field in this list has a non-empty value. 3145 // This may be used to include null fields in Patch requests. 3146 NullFields []string `json:"-"` 3147} 3148 3149func (s *GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts) MarshalJSON() ([]byte, error) { 3150 type NoMethod GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts 3151 raw := NoMethod(*s) 3152 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3153} 3154 3155// GoogleDevtoolsRemoteworkersV1test2Digest: The CommandTask and 3156// CommandResult messages assume the existence of a service that can 3157// serve blobs of content, identified by a hash and size known as a 3158// "digest." The method by which these blobs may be retrieved is not 3159// specified here, but a model implementation is in the Remote Execution 3160// API's "ContentAddressibleStorage" interface. In the context of the 3161// RWAPI, a Digest will virtually always refer to the contents of a file 3162// or a directory. The latter is represented by the byte-encoded 3163// Directory message. 3164type GoogleDevtoolsRemoteworkersV1test2Digest struct { 3165 // Hash: A string-encoded hash (eg "1a2b3c", not the byte array [0x1a, 3166 // 0x2b, 0x3c]) using an implementation-defined hash algorithm (eg 3167 // SHA-256). 3168 Hash string `json:"hash,omitempty"` 3169 3170 // SizeBytes: The size of the contents. While this is not strictly 3171 // required as part of an identifier (after all, any given hash will 3172 // have exactly one canonical size), it's useful in almost all cases 3173 // when one might want to send or retrieve blobs of content and is 3174 // included here for this reason. 3175 SizeBytes int64 `json:"sizeBytes,omitempty,string"` 3176 3177 // ForceSendFields is a list of field names (e.g. "Hash") to 3178 // unconditionally include in API requests. By default, fields with 3179 // empty values are omitted from API requests. However, any non-pointer, 3180 // non-interface field appearing in ForceSendFields will be sent to the 3181 // server regardless of whether the field is empty or not. This may be 3182 // used to include empty fields in Patch requests. 3183 ForceSendFields []string `json:"-"` 3184 3185 // NullFields is a list of field names (e.g. "Hash") to include in API 3186 // requests with the JSON null value. By default, fields with empty 3187 // values are omitted from API requests. However, any field with an 3188 // empty value appearing in NullFields will be sent to the server as 3189 // null. It is an error if a field in this list has a non-empty value. 3190 // This may be used to include null fields in Patch requests. 3191 NullFields []string `json:"-"` 3192} 3193 3194func (s *GoogleDevtoolsRemoteworkersV1test2Digest) MarshalJSON() ([]byte, error) { 3195 type NoMethod GoogleDevtoolsRemoteworkersV1test2Digest 3196 raw := NoMethod(*s) 3197 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3198} 3199 3200// GoogleDevtoolsRemoteworkersV1test2Directory: The contents of a 3201// directory. Similar to the equivalent message in the Remote Execution 3202// API. 3203type GoogleDevtoolsRemoteworkersV1test2Directory struct { 3204 // Directories: Any subdirectories 3205 Directories []*GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata `json:"directories,omitempty"` 3206 3207 // Files: The files in this directory 3208 Files []*GoogleDevtoolsRemoteworkersV1test2FileMetadata `json:"files,omitempty"` 3209 3210 // ForceSendFields is a list of field names (e.g. "Directories") to 3211 // unconditionally include in API requests. By default, fields with 3212 // empty values are omitted from API requests. However, any non-pointer, 3213 // non-interface field appearing in ForceSendFields will be sent to the 3214 // server regardless of whether the field is empty or not. This may be 3215 // used to include empty fields in Patch requests. 3216 ForceSendFields []string `json:"-"` 3217 3218 // NullFields is a list of field names (e.g. "Directories") to include 3219 // in API requests with the JSON null value. By default, fields with 3220 // empty values are omitted from API requests. However, any field with 3221 // an empty value appearing in NullFields will be sent to the server as 3222 // null. It is an error if a field in this list has a non-empty value. 3223 // This may be used to include null fields in Patch requests. 3224 NullFields []string `json:"-"` 3225} 3226 3227func (s *GoogleDevtoolsRemoteworkersV1test2Directory) MarshalJSON() ([]byte, error) { 3228 type NoMethod GoogleDevtoolsRemoteworkersV1test2Directory 3229 raw := NoMethod(*s) 3230 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3231} 3232 3233// GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata: The metadata for 3234// a directory. Similar to the equivalent message in the Remote 3235// Execution API. 3236type GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata struct { 3237 // Digest: A pointer to the contents of the directory, in the form of a 3238 // marshalled Directory message. 3239 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 3240 3241 // Path: The path of the directory, as in FileMetadata.path. 3242 Path string `json:"path,omitempty"` 3243 3244 // ForceSendFields is a list of field names (e.g. "Digest") to 3245 // unconditionally include in API requests. By default, fields with 3246 // empty values are omitted from API requests. However, any non-pointer, 3247 // non-interface field appearing in ForceSendFields will be sent to the 3248 // server regardless of whether the field is empty or not. This may be 3249 // used to include empty fields in Patch requests. 3250 ForceSendFields []string `json:"-"` 3251 3252 // NullFields is a list of field names (e.g. "Digest") to include in API 3253 // requests with the JSON null value. By default, fields with empty 3254 // values are omitted from API requests. However, any field with an 3255 // empty value appearing in NullFields will be sent to the server as 3256 // null. It is an error if a field in this list has a non-empty value. 3257 // This may be used to include null fields in Patch requests. 3258 NullFields []string `json:"-"` 3259} 3260 3261func (s *GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata) MarshalJSON() ([]byte, error) { 3262 type NoMethod GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata 3263 raw := NoMethod(*s) 3264 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3265} 3266 3267// GoogleDevtoolsRemoteworkersV1test2FileMetadata: The metadata for a 3268// file. Similar to the equivalent message in the Remote Execution API. 3269type GoogleDevtoolsRemoteworkersV1test2FileMetadata struct { 3270 // Contents: If the file is small enough, its contents may also or 3271 // alternatively be listed here. 3272 Contents string `json:"contents,omitempty"` 3273 3274 // Digest: A pointer to the contents of the file. The method by which a 3275 // client retrieves the contents from a CAS system is not defined here. 3276 Digest *GoogleDevtoolsRemoteworkersV1test2Digest `json:"digest,omitempty"` 3277 3278 // IsExecutable: Properties of the file 3279 IsExecutable bool `json:"isExecutable,omitempty"` 3280 3281 // Path: The path of this file. If this message is part of the 3282 // CommandOutputs.outputs fields, the path is relative to the execution 3283 // root and must correspond to an entry in CommandTask.outputs.files. If 3284 // this message is part of a Directory message, then the path is 3285 // relative to the root of that directory. All paths MUST be delimited 3286 // by forward slashes. 3287 Path string `json:"path,omitempty"` 3288 3289 // ForceSendFields is a list of field names (e.g. "Contents") to 3290 // unconditionally include in API requests. By default, fields with 3291 // empty values are omitted from API requests. However, any non-pointer, 3292 // non-interface field appearing in ForceSendFields will be sent to the 3293 // server regardless of whether the field is empty or not. This may be 3294 // used to include empty fields in Patch requests. 3295 ForceSendFields []string `json:"-"` 3296 3297 // NullFields is a list of field names (e.g. "Contents") to include in 3298 // API requests with the JSON null value. By default, fields with empty 3299 // values are omitted from API requests. However, any field with an 3300 // empty value appearing in NullFields will be sent to the server as 3301 // null. It is an error if a field in this list has a non-empty value. 3302 // This may be used to include null fields in Patch requests. 3303 NullFields []string `json:"-"` 3304} 3305 3306func (s *GoogleDevtoolsRemoteworkersV1test2FileMetadata) MarshalJSON() ([]byte, error) { 3307 type NoMethod GoogleDevtoolsRemoteworkersV1test2FileMetadata 3308 raw := NoMethod(*s) 3309 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3310} 3311 3312// GoogleLongrunningOperation: This resource represents a long-running 3313// operation that is the result of a network API call. 3314type GoogleLongrunningOperation struct { 3315 // Done: If the value is `false`, it means the operation is still in 3316 // progress. If `true`, the operation is completed, and either `error` 3317 // or `response` is available. 3318 Done bool `json:"done,omitempty"` 3319 3320 // Error: The error result of the operation in case of failure or 3321 // cancellation. 3322 Error *GoogleRpcStatus `json:"error,omitempty"` 3323 3324 // Metadata: Service-specific metadata associated with the operation. It 3325 // typically contains progress information and common metadata such as 3326 // create time. Some services might not provide such metadata. Any 3327 // method that returns a long-running operation should document the 3328 // metadata type, if any. 3329 Metadata googleapi.RawMessage `json:"metadata,omitempty"` 3330 3331 // Name: The server-assigned name, which is only unique within the same 3332 // service that originally returns it. If you use the default HTTP 3333 // mapping, the `name` should be a resource name ending with 3334 // `operations/{unique_id}`. 3335 Name string `json:"name,omitempty"` 3336 3337 // Response: The normal response of the operation in case of success. If 3338 // the original method returns no data on success, such as `Delete`, the 3339 // response is `google.protobuf.Empty`. If the original method is 3340 // standard `Get`/`Create`/`Update`, the response should be the 3341 // resource. For other methods, the response should have the type 3342 // `XxxResponse`, where `Xxx` is the original method name. For example, 3343 // if the original method name is `TakeSnapshot()`, the inferred 3344 // response type is `TakeSnapshotResponse`. 3345 Response googleapi.RawMessage `json:"response,omitempty"` 3346 3347 // ServerResponse contains the HTTP response code and headers from the 3348 // server. 3349 googleapi.ServerResponse `json:"-"` 3350 3351 // ForceSendFields is a list of field names (e.g. "Done") to 3352 // unconditionally include in API requests. By default, fields with 3353 // empty values are omitted from API requests. However, any non-pointer, 3354 // non-interface field appearing in ForceSendFields will be sent to the 3355 // server regardless of whether the field is empty or not. This may be 3356 // used to include empty fields in Patch requests. 3357 ForceSendFields []string `json:"-"` 3358 3359 // NullFields is a list of field names (e.g. "Done") to include in API 3360 // requests with the JSON null value. By default, fields with empty 3361 // values are omitted from API requests. However, any field with an 3362 // empty value appearing in NullFields will be sent to the server as 3363 // null. It is an error if a field in this list has a non-empty value. 3364 // This may be used to include null fields in Patch requests. 3365 NullFields []string `json:"-"` 3366} 3367 3368func (s *GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { 3369 type NoMethod GoogleLongrunningOperation 3370 raw := NoMethod(*s) 3371 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3372} 3373 3374// GoogleRpcStatus: The `Status` type defines a logical error model that 3375// is suitable for different programming environments, including REST 3376// APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each 3377// `Status` message contains three pieces of data: error code, error 3378// message, and error details. You can find out more about this error 3379// model and how to work with it in the API Design Guide 3380// (https://cloud.google.com/apis/design/errors). 3381type GoogleRpcStatus struct { 3382 // Code: The status code, which should be an enum value of 3383 // google.rpc.Code. 3384 Code int64 `json:"code,omitempty"` 3385 3386 // Details: A list of messages that carry the error details. There is a 3387 // common set of message types for APIs to use. 3388 Details []googleapi.RawMessage `json:"details,omitempty"` 3389 3390 // Message: A developer-facing error message, which should be in 3391 // English. Any user-facing error message should be localized and sent 3392 // in the google.rpc.Status.details field, or localized by the client. 3393 Message string `json:"message,omitempty"` 3394 3395 // ForceSendFields is a list of field names (e.g. "Code") to 3396 // unconditionally include in API requests. By default, fields with 3397 // empty values are omitted from API requests. However, any non-pointer, 3398 // non-interface field appearing in ForceSendFields will be sent to the 3399 // server regardless of whether the field is empty or not. This may be 3400 // used to include empty fields in Patch requests. 3401 ForceSendFields []string `json:"-"` 3402 3403 // NullFields is a list of field names (e.g. "Code") to include in API 3404 // requests with the JSON null value. By default, fields with empty 3405 // values are omitted from API requests. However, any field with an 3406 // empty value appearing in NullFields will be sent to the server as 3407 // null. It is an error if a field in this list has a non-empty value. 3408 // This may be used to include null fields in Patch requests. 3409 NullFields []string `json:"-"` 3410} 3411 3412func (s *GoogleRpcStatus) MarshalJSON() ([]byte, error) { 3413 type NoMethod GoogleRpcStatus 3414 raw := NoMethod(*s) 3415 return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields) 3416} 3417 3418// method id "remotebuildexecution.projects.instances.create": 3419 3420type ProjectsInstancesCreateCall struct { 3421 s *Service 3422 parent string 3423 googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest 3424 urlParams_ gensupport.URLParams 3425 ctx_ context.Context 3426 header_ http.Header 3427} 3428 3429// Create: Creates a new instance in the specified region. Returns a 3430// long running operation which contains an instance on completion. 3431// While the long running operation is in progress, any call to 3432// `GetInstance` returns an instance in state `CREATING`. 3433// 3434// - parent: Resource name of the project containing the instance. 3435// Format: `projects/[PROJECT_ID]`. 3436func (r *ProjectsInstancesService) Create(parent string, googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest) *ProjectsInstancesCreateCall { 3437 c := &ProjectsInstancesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3438 c.parent = parent 3439 c.googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest = googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest 3440 return c 3441} 3442 3443// Fields allows partial responses to be retrieved. See 3444// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3445// for more information. 3446func (c *ProjectsInstancesCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesCreateCall { 3447 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3448 return c 3449} 3450 3451// Context sets the context to be used in this call's Do method. Any 3452// pending HTTP request will be aborted if the provided context is 3453// canceled. 3454func (c *ProjectsInstancesCreateCall) Context(ctx context.Context) *ProjectsInstancesCreateCall { 3455 c.ctx_ = ctx 3456 return c 3457} 3458 3459// Header returns an http.Header that can be modified by the caller to 3460// add HTTP headers to the request. 3461func (c *ProjectsInstancesCreateCall) Header() http.Header { 3462 if c.header_ == nil { 3463 c.header_ = make(http.Header) 3464 } 3465 return c.header_ 3466} 3467 3468func (c *ProjectsInstancesCreateCall) doRequest(alt string) (*http.Response, error) { 3469 reqHeaders := make(http.Header) 3470 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 3471 for k, v := range c.header_ { 3472 reqHeaders[k] = v 3473 } 3474 reqHeaders.Set("User-Agent", c.s.userAgent()) 3475 var body io.Reader = nil 3476 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledevtoolsremotebuildexecutionadminv1alphacreateinstancerequest) 3477 if err != nil { 3478 return nil, err 3479 } 3480 reqHeaders.Set("Content-Type", "application/json") 3481 c.urlParams_.Set("alt", alt) 3482 c.urlParams_.Set("prettyPrint", "false") 3483 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/instances") 3484 urls += "?" + c.urlParams_.Encode() 3485 req, err := http.NewRequest("POST", urls, body) 3486 if err != nil { 3487 return nil, err 3488 } 3489 req.Header = reqHeaders 3490 googleapi.Expand(req.URL, map[string]string{ 3491 "parent": c.parent, 3492 }) 3493 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3494} 3495 3496// Do executes the "remotebuildexecution.projects.instances.create" call. 3497// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 3498// Any non-2xx status code is an error. Response headers are in either 3499// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 3500// was returned at all) in error.(*googleapi.Error).Header. Use 3501// googleapi.IsNotModified to check whether the returned error was 3502// because http.StatusNotModified was returned. 3503func (c *ProjectsInstancesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 3504 gensupport.SetOptions(c.urlParams_, opts...) 3505 res, err := c.doRequest("json") 3506 if res != nil && res.StatusCode == http.StatusNotModified { 3507 if res.Body != nil { 3508 res.Body.Close() 3509 } 3510 return nil, &googleapi.Error{ 3511 Code: res.StatusCode, 3512 Header: res.Header, 3513 } 3514 } 3515 if err != nil { 3516 return nil, err 3517 } 3518 defer googleapi.CloseBody(res) 3519 if err := googleapi.CheckResponse(res); err != nil { 3520 return nil, err 3521 } 3522 ret := &GoogleLongrunningOperation{ 3523 ServerResponse: googleapi.ServerResponse{ 3524 Header: res.Header, 3525 HTTPStatusCode: res.StatusCode, 3526 }, 3527 } 3528 target := &ret 3529 if err := gensupport.DecodeResponse(target, res); err != nil { 3530 return nil, err 3531 } 3532 return ret, nil 3533 // { 3534 // "description": "Creates a new instance in the specified region. Returns a long running operation which contains an instance on completion. While the long running operation is in progress, any call to `GetInstance` returns an instance in state `CREATING`.", 3535 // "flatPath": "v1alpha/projects/{projectsId}/instances", 3536 // "httpMethod": "POST", 3537 // "id": "remotebuildexecution.projects.instances.create", 3538 // "parameterOrder": [ 3539 // "parent" 3540 // ], 3541 // "parameters": { 3542 // "parent": { 3543 // "description": "Resource name of the project containing the instance. Format: `projects/[PROJECT_ID]`.", 3544 // "location": "path", 3545 // "pattern": "^projects/[^/]+$", 3546 // "required": true, 3547 // "type": "string" 3548 // } 3549 // }, 3550 // "path": "v1alpha/{+parent}/instances", 3551 // "request": { 3552 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest" 3553 // }, 3554 // "response": { 3555 // "$ref": "GoogleLongrunningOperation" 3556 // }, 3557 // "scopes": [ 3558 // "https://www.googleapis.com/auth/cloud-platform" 3559 // ] 3560 // } 3561 3562} 3563 3564// method id "remotebuildexecution.projects.instances.delete": 3565 3566type ProjectsInstancesDeleteCall struct { 3567 s *Service 3568 name string 3569 urlParams_ gensupport.URLParams 3570 ctx_ context.Context 3571 header_ http.Header 3572} 3573 3574// Delete: Deletes the specified instance. Returns a long running 3575// operation which contains a `google.protobuf.Empty` response on 3576// completion. Deleting an instance with worker pools in it will delete 3577// these worker pools. 3578// 3579// - name: Name of the instance to delete. Format: 3580// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 3581func (r *ProjectsInstancesService) Delete(name string) *ProjectsInstancesDeleteCall { 3582 c := &ProjectsInstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3583 c.name = name 3584 return c 3585} 3586 3587// Fields allows partial responses to be retrieved. See 3588// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3589// for more information. 3590func (c *ProjectsInstancesDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesDeleteCall { 3591 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3592 return c 3593} 3594 3595// Context sets the context to be used in this call's Do method. Any 3596// pending HTTP request will be aborted if the provided context is 3597// canceled. 3598func (c *ProjectsInstancesDeleteCall) Context(ctx context.Context) *ProjectsInstancesDeleteCall { 3599 c.ctx_ = ctx 3600 return c 3601} 3602 3603// Header returns an http.Header that can be modified by the caller to 3604// add HTTP headers to the request. 3605func (c *ProjectsInstancesDeleteCall) Header() http.Header { 3606 if c.header_ == nil { 3607 c.header_ = make(http.Header) 3608 } 3609 return c.header_ 3610} 3611 3612func (c *ProjectsInstancesDeleteCall) doRequest(alt string) (*http.Response, error) { 3613 reqHeaders := make(http.Header) 3614 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 3615 for k, v := range c.header_ { 3616 reqHeaders[k] = v 3617 } 3618 reqHeaders.Set("User-Agent", c.s.userAgent()) 3619 var body io.Reader = nil 3620 c.urlParams_.Set("alt", alt) 3621 c.urlParams_.Set("prettyPrint", "false") 3622 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 3623 urls += "?" + c.urlParams_.Encode() 3624 req, err := http.NewRequest("DELETE", urls, body) 3625 if err != nil { 3626 return nil, err 3627 } 3628 req.Header = reqHeaders 3629 googleapi.Expand(req.URL, map[string]string{ 3630 "name": c.name, 3631 }) 3632 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3633} 3634 3635// Do executes the "remotebuildexecution.projects.instances.delete" call. 3636// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 3637// Any non-2xx status code is an error. Response headers are in either 3638// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 3639// was returned at all) in error.(*googleapi.Error).Header. Use 3640// googleapi.IsNotModified to check whether the returned error was 3641// because http.StatusNotModified was returned. 3642func (c *ProjectsInstancesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 3643 gensupport.SetOptions(c.urlParams_, opts...) 3644 res, err := c.doRequest("json") 3645 if res != nil && res.StatusCode == http.StatusNotModified { 3646 if res.Body != nil { 3647 res.Body.Close() 3648 } 3649 return nil, &googleapi.Error{ 3650 Code: res.StatusCode, 3651 Header: res.Header, 3652 } 3653 } 3654 if err != nil { 3655 return nil, err 3656 } 3657 defer googleapi.CloseBody(res) 3658 if err := googleapi.CheckResponse(res); err != nil { 3659 return nil, err 3660 } 3661 ret := &GoogleLongrunningOperation{ 3662 ServerResponse: googleapi.ServerResponse{ 3663 Header: res.Header, 3664 HTTPStatusCode: res.StatusCode, 3665 }, 3666 } 3667 target := &ret 3668 if err := gensupport.DecodeResponse(target, res); err != nil { 3669 return nil, err 3670 } 3671 return ret, nil 3672 // { 3673 // "description": "Deletes the specified instance. Returns a long running operation which contains a `google.protobuf.Empty` response on completion. Deleting an instance with worker pools in it will delete these worker pools.", 3674 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", 3675 // "httpMethod": "DELETE", 3676 // "id": "remotebuildexecution.projects.instances.delete", 3677 // "parameterOrder": [ 3678 // "name" 3679 // ], 3680 // "parameters": { 3681 // "name": { 3682 // "description": "Name of the instance to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 3683 // "location": "path", 3684 // "pattern": "^projects/[^/]+/instances/[^/]+$", 3685 // "required": true, 3686 // "type": "string" 3687 // } 3688 // }, 3689 // "path": "v1alpha/{+name}", 3690 // "response": { 3691 // "$ref": "GoogleLongrunningOperation" 3692 // }, 3693 // "scopes": [ 3694 // "https://www.googleapis.com/auth/cloud-platform" 3695 // ] 3696 // } 3697 3698} 3699 3700// method id "remotebuildexecution.projects.instances.get": 3701 3702type ProjectsInstancesGetCall struct { 3703 s *Service 3704 name string 3705 urlParams_ gensupport.URLParams 3706 ifNoneMatch_ string 3707 ctx_ context.Context 3708 header_ http.Header 3709} 3710 3711// Get: Returns the specified instance. 3712// 3713// - name: Name of the instance to retrieve. Format: 3714// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 3715func (r *ProjectsInstancesService) Get(name string) *ProjectsInstancesGetCall { 3716 c := &ProjectsInstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3717 c.name = name 3718 return c 3719} 3720 3721// Fields allows partial responses to be retrieved. See 3722// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3723// for more information. 3724func (c *ProjectsInstancesGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesGetCall { 3725 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3726 return c 3727} 3728 3729// IfNoneMatch sets the optional parameter which makes the operation 3730// fail if the object's ETag matches the given value. This is useful for 3731// getting updates only after the object has changed since the last 3732// request. Use googleapi.IsNotModified to check whether the response 3733// error from Do is the result of In-None-Match. 3734func (c *ProjectsInstancesGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesGetCall { 3735 c.ifNoneMatch_ = entityTag 3736 return c 3737} 3738 3739// Context sets the context to be used in this call's Do method. Any 3740// pending HTTP request will be aborted if the provided context is 3741// canceled. 3742func (c *ProjectsInstancesGetCall) Context(ctx context.Context) *ProjectsInstancesGetCall { 3743 c.ctx_ = ctx 3744 return c 3745} 3746 3747// Header returns an http.Header that can be modified by the caller to 3748// add HTTP headers to the request. 3749func (c *ProjectsInstancesGetCall) Header() http.Header { 3750 if c.header_ == nil { 3751 c.header_ = make(http.Header) 3752 } 3753 return c.header_ 3754} 3755 3756func (c *ProjectsInstancesGetCall) doRequest(alt string) (*http.Response, error) { 3757 reqHeaders := make(http.Header) 3758 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 3759 for k, v := range c.header_ { 3760 reqHeaders[k] = v 3761 } 3762 reqHeaders.Set("User-Agent", c.s.userAgent()) 3763 if c.ifNoneMatch_ != "" { 3764 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3765 } 3766 var body io.Reader = nil 3767 c.urlParams_.Set("alt", alt) 3768 c.urlParams_.Set("prettyPrint", "false") 3769 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 3770 urls += "?" + c.urlParams_.Encode() 3771 req, err := http.NewRequest("GET", urls, body) 3772 if err != nil { 3773 return nil, err 3774 } 3775 req.Header = reqHeaders 3776 googleapi.Expand(req.URL, map[string]string{ 3777 "name": c.name, 3778 }) 3779 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3780} 3781 3782// Do executes the "remotebuildexecution.projects.instances.get" call. 3783// Exactly one of 3784// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance or error will 3785// be non-nil. Any non-2xx status code is an error. Response headers are 3786// in either 3787// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance.ServerResponse 3788// .Header or (if a response was returned at all) in 3789// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3790// whether the returned error was because http.StatusNotModified was 3791// returned. 3792func (c *ProjectsInstancesGetCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance, error) { 3793 gensupport.SetOptions(c.urlParams_, opts...) 3794 res, err := c.doRequest("json") 3795 if res != nil && res.StatusCode == http.StatusNotModified { 3796 if res.Body != nil { 3797 res.Body.Close() 3798 } 3799 return nil, &googleapi.Error{ 3800 Code: res.StatusCode, 3801 Header: res.Header, 3802 } 3803 } 3804 if err != nil { 3805 return nil, err 3806 } 3807 defer googleapi.CloseBody(res) 3808 if err := googleapi.CheckResponse(res); err != nil { 3809 return nil, err 3810 } 3811 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance{ 3812 ServerResponse: googleapi.ServerResponse{ 3813 Header: res.Header, 3814 HTTPStatusCode: res.StatusCode, 3815 }, 3816 } 3817 target := &ret 3818 if err := gensupport.DecodeResponse(target, res); err != nil { 3819 return nil, err 3820 } 3821 return ret, nil 3822 // { 3823 // "description": "Returns the specified instance.", 3824 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", 3825 // "httpMethod": "GET", 3826 // "id": "remotebuildexecution.projects.instances.get", 3827 // "parameterOrder": [ 3828 // "name" 3829 // ], 3830 // "parameters": { 3831 // "name": { 3832 // "description": "Name of the instance to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 3833 // "location": "path", 3834 // "pattern": "^projects/[^/]+/instances/[^/]+$", 3835 // "required": true, 3836 // "type": "string" 3837 // } 3838 // }, 3839 // "path": "v1alpha/{+name}", 3840 // "response": { 3841 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" 3842 // }, 3843 // "scopes": [ 3844 // "https://www.googleapis.com/auth/cloud-platform" 3845 // ] 3846 // } 3847 3848} 3849 3850// method id "remotebuildexecution.projects.instances.list": 3851 3852type ProjectsInstancesListCall struct { 3853 s *Service 3854 parent string 3855 urlParams_ gensupport.URLParams 3856 ifNoneMatch_ string 3857 ctx_ context.Context 3858 header_ http.Header 3859} 3860 3861// List: Lists instances in a project. 3862// 3863// - parent: Resource name of the project. Format: 3864// `projects/[PROJECT_ID]`. 3865func (r *ProjectsInstancesService) List(parent string) *ProjectsInstancesListCall { 3866 c := &ProjectsInstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 3867 c.parent = parent 3868 return c 3869} 3870 3871// Fields allows partial responses to be retrieved. See 3872// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 3873// for more information. 3874func (c *ProjectsInstancesListCall) Fields(s ...googleapi.Field) *ProjectsInstancesListCall { 3875 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 3876 return c 3877} 3878 3879// IfNoneMatch sets the optional parameter which makes the operation 3880// fail if the object's ETag matches the given value. This is useful for 3881// getting updates only after the object has changed since the last 3882// request. Use googleapi.IsNotModified to check whether the response 3883// error from Do is the result of In-None-Match. 3884func (c *ProjectsInstancesListCall) IfNoneMatch(entityTag string) *ProjectsInstancesListCall { 3885 c.ifNoneMatch_ = entityTag 3886 return c 3887} 3888 3889// Context sets the context to be used in this call's Do method. Any 3890// pending HTTP request will be aborted if the provided context is 3891// canceled. 3892func (c *ProjectsInstancesListCall) Context(ctx context.Context) *ProjectsInstancesListCall { 3893 c.ctx_ = ctx 3894 return c 3895} 3896 3897// Header returns an http.Header that can be modified by the caller to 3898// add HTTP headers to the request. 3899func (c *ProjectsInstancesListCall) Header() http.Header { 3900 if c.header_ == nil { 3901 c.header_ = make(http.Header) 3902 } 3903 return c.header_ 3904} 3905 3906func (c *ProjectsInstancesListCall) doRequest(alt string) (*http.Response, error) { 3907 reqHeaders := make(http.Header) 3908 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 3909 for k, v := range c.header_ { 3910 reqHeaders[k] = v 3911 } 3912 reqHeaders.Set("User-Agent", c.s.userAgent()) 3913 if c.ifNoneMatch_ != "" { 3914 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 3915 } 3916 var body io.Reader = nil 3917 c.urlParams_.Set("alt", alt) 3918 c.urlParams_.Set("prettyPrint", "false") 3919 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/instances") 3920 urls += "?" + c.urlParams_.Encode() 3921 req, err := http.NewRequest("GET", urls, body) 3922 if err != nil { 3923 return nil, err 3924 } 3925 req.Header = reqHeaders 3926 googleapi.Expand(req.URL, map[string]string{ 3927 "parent": c.parent, 3928 }) 3929 return gensupport.SendRequest(c.ctx_, c.s.client, req) 3930} 3931 3932// Do executes the "remotebuildexecution.projects.instances.list" call. 3933// Exactly one of 3934// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse 3935// or error will be non-nil. Any non-2xx status code is an error. 3936// Response headers are in either 3937// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse.S 3938// erverResponse.Header or (if a response was returned at all) in 3939// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 3940// whether the returned error was because http.StatusNotModified was 3941// returned. 3942func (c *ProjectsInstancesListCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse, error) { 3943 gensupport.SetOptions(c.urlParams_, opts...) 3944 res, err := c.doRequest("json") 3945 if res != nil && res.StatusCode == http.StatusNotModified { 3946 if res.Body != nil { 3947 res.Body.Close() 3948 } 3949 return nil, &googleapi.Error{ 3950 Code: res.StatusCode, 3951 Header: res.Header, 3952 } 3953 } 3954 if err != nil { 3955 return nil, err 3956 } 3957 defer googleapi.CloseBody(res) 3958 if err := googleapi.CheckResponse(res); err != nil { 3959 return nil, err 3960 } 3961 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse{ 3962 ServerResponse: googleapi.ServerResponse{ 3963 Header: res.Header, 3964 HTTPStatusCode: res.StatusCode, 3965 }, 3966 } 3967 target := &ret 3968 if err := gensupport.DecodeResponse(target, res); err != nil { 3969 return nil, err 3970 } 3971 return ret, nil 3972 // { 3973 // "description": "Lists instances in a project.", 3974 // "flatPath": "v1alpha/projects/{projectsId}/instances", 3975 // "httpMethod": "GET", 3976 // "id": "remotebuildexecution.projects.instances.list", 3977 // "parameterOrder": [ 3978 // "parent" 3979 // ], 3980 // "parameters": { 3981 // "parent": { 3982 // "description": "Resource name of the project. Format: `projects/[PROJECT_ID]`.", 3983 // "location": "path", 3984 // "pattern": "^projects/[^/]+$", 3985 // "required": true, 3986 // "type": "string" 3987 // } 3988 // }, 3989 // "path": "v1alpha/{+parent}/instances", 3990 // "response": { 3991 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse" 3992 // }, 3993 // "scopes": [ 3994 // "https://www.googleapis.com/auth/cloud-platform" 3995 // ] 3996 // } 3997 3998} 3999 4000// method id "remotebuildexecution.projects.instances.patch": 4001 4002type ProjectsInstancesPatchCall struct { 4003 s *Service 4004 name string 4005 googledevtoolsremotebuildexecutionadminv1alphainstance *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance 4006 urlParams_ gensupport.URLParams 4007 ctx_ context.Context 4008 header_ http.Header 4009} 4010 4011// Patch: Updates the specified instance. Returns a long running 4012// operation which contains the updated instance in the response on 4013// completion. 4014// 4015// - name: Output only. Instance resource name formatted as: 4016// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be 4017// populated when creating an instance since it is provided in the 4018// `instance_id` field. 4019func (r *ProjectsInstancesService) Patch(name string, googledevtoolsremotebuildexecutionadminv1alphainstance *GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance) *ProjectsInstancesPatchCall { 4020 c := &ProjectsInstancesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4021 c.name = name 4022 c.googledevtoolsremotebuildexecutionadminv1alphainstance = googledevtoolsremotebuildexecutionadminv1alphainstance 4023 return c 4024} 4025 4026// LoggingEnabled sets the optional parameter "loggingEnabled": 4027// Deprecated, use instance.logging_enabled instead. Whether to enable 4028// Stackdriver logging for this instance. 4029func (c *ProjectsInstancesPatchCall) LoggingEnabled(loggingEnabled bool) *ProjectsInstancesPatchCall { 4030 c.urlParams_.Set("loggingEnabled", fmt.Sprint(loggingEnabled)) 4031 return c 4032} 4033 4034// Name1 sets the optional parameter "name1": Deprecated, use 4035// instance.Name instead. Name of the instance to update. Format: 4036// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 4037func (c *ProjectsInstancesPatchCall) Name1(name1 string) *ProjectsInstancesPatchCall { 4038 c.urlParams_.Set("name1", name1) 4039 return c 4040} 4041 4042// UpdateMask sets the optional parameter "updateMask": The update mask 4043// applies to instance. For the `FieldMask` definition, see 4044// https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask 4045// If an empty update_mask is provided, only the non-default valued 4046// field in the worker pool field will be updated. Note that in order to 4047// update a field to the default value (zero, false, empty string) an 4048// explicit update_mask must be provided. 4049func (c *ProjectsInstancesPatchCall) UpdateMask(updateMask string) *ProjectsInstancesPatchCall { 4050 c.urlParams_.Set("updateMask", updateMask) 4051 return c 4052} 4053 4054// Fields allows partial responses to be retrieved. See 4055// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4056// for more information. 4057func (c *ProjectsInstancesPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesPatchCall { 4058 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4059 return c 4060} 4061 4062// Context sets the context to be used in this call's Do method. Any 4063// pending HTTP request will be aborted if the provided context is 4064// canceled. 4065func (c *ProjectsInstancesPatchCall) Context(ctx context.Context) *ProjectsInstancesPatchCall { 4066 c.ctx_ = ctx 4067 return c 4068} 4069 4070// Header returns an http.Header that can be modified by the caller to 4071// add HTTP headers to the request. 4072func (c *ProjectsInstancesPatchCall) Header() http.Header { 4073 if c.header_ == nil { 4074 c.header_ = make(http.Header) 4075 } 4076 return c.header_ 4077} 4078 4079func (c *ProjectsInstancesPatchCall) doRequest(alt string) (*http.Response, error) { 4080 reqHeaders := make(http.Header) 4081 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 4082 for k, v := range c.header_ { 4083 reqHeaders[k] = v 4084 } 4085 reqHeaders.Set("User-Agent", c.s.userAgent()) 4086 var body io.Reader = nil 4087 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledevtoolsremotebuildexecutionadminv1alphainstance) 4088 if err != nil { 4089 return nil, err 4090 } 4091 reqHeaders.Set("Content-Type", "application/json") 4092 c.urlParams_.Set("alt", alt) 4093 c.urlParams_.Set("prettyPrint", "false") 4094 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4095 urls += "?" + c.urlParams_.Encode() 4096 req, err := http.NewRequest("PATCH", urls, body) 4097 if err != nil { 4098 return nil, err 4099 } 4100 req.Header = reqHeaders 4101 googleapi.Expand(req.URL, map[string]string{ 4102 "name": c.name, 4103 }) 4104 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4105} 4106 4107// Do executes the "remotebuildexecution.projects.instances.patch" call. 4108// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4109// Any non-2xx status code is an error. Response headers are in either 4110// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4111// was returned at all) in error.(*googleapi.Error).Header. Use 4112// googleapi.IsNotModified to check whether the returned error was 4113// because http.StatusNotModified was returned. 4114func (c *ProjectsInstancesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4115 gensupport.SetOptions(c.urlParams_, opts...) 4116 res, err := c.doRequest("json") 4117 if res != nil && res.StatusCode == http.StatusNotModified { 4118 if res.Body != nil { 4119 res.Body.Close() 4120 } 4121 return nil, &googleapi.Error{ 4122 Code: res.StatusCode, 4123 Header: res.Header, 4124 } 4125 } 4126 if err != nil { 4127 return nil, err 4128 } 4129 defer googleapi.CloseBody(res) 4130 if err := googleapi.CheckResponse(res); err != nil { 4131 return nil, err 4132 } 4133 ret := &GoogleLongrunningOperation{ 4134 ServerResponse: googleapi.ServerResponse{ 4135 Header: res.Header, 4136 HTTPStatusCode: res.StatusCode, 4137 }, 4138 } 4139 target := &ret 4140 if err := gensupport.DecodeResponse(target, res); err != nil { 4141 return nil, err 4142 } 4143 return ret, nil 4144 // { 4145 // "description": "Updates the specified instance. Returns a long running operation which contains the updated instance in the response on completion.", 4146 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", 4147 // "httpMethod": "PATCH", 4148 // "id": "remotebuildexecution.projects.instances.patch", 4149 // "parameterOrder": [ 4150 // "name" 4151 // ], 4152 // "parameters": { 4153 // "loggingEnabled": { 4154 // "description": "Deprecated, use instance.logging_enabled instead. Whether to enable Stackdriver logging for this instance.", 4155 // "location": "query", 4156 // "type": "boolean" 4157 // }, 4158 // "name": { 4159 // "description": "Output only. Instance resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be populated when creating an instance since it is provided in the `instance_id` field.", 4160 // "location": "path", 4161 // "pattern": "^projects/[^/]+/instances/[^/]+$", 4162 // "required": true, 4163 // "type": "string" 4164 // }, 4165 // "name1": { 4166 // "description": "Deprecated, use instance.Name instead. Name of the instance to update. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 4167 // "location": "query", 4168 // "type": "string" 4169 // }, 4170 // "updateMask": { 4171 // "description": "The update mask applies to instance. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", 4172 // "format": "google-fieldmask", 4173 // "location": "query", 4174 // "type": "string" 4175 // } 4176 // }, 4177 // "path": "v1alpha/{+name}", 4178 // "request": { 4179 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" 4180 // }, 4181 // "response": { 4182 // "$ref": "GoogleLongrunningOperation" 4183 // }, 4184 // "scopes": [ 4185 // "https://www.googleapis.com/auth/cloud-platform" 4186 // ] 4187 // } 4188 4189} 4190 4191// method id "remotebuildexecution.projects.instances.workerpools.create": 4192 4193type ProjectsInstancesWorkerpoolsCreateCall struct { 4194 s *Service 4195 parent string 4196 googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest 4197 urlParams_ gensupport.URLParams 4198 ctx_ context.Context 4199 header_ http.Header 4200} 4201 4202// Create: Creates a new worker pool with a specified size and 4203// configuration. Returns a long running operation which contains a 4204// worker pool on completion. While the long running operation is in 4205// progress, any call to `GetWorkerPool` returns a worker pool in state 4206// `CREATING`. 4207// 4208// - parent: Resource name of the instance in which to create the new 4209// worker pool. Format: 4210// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 4211func (r *ProjectsInstancesWorkerpoolsService) Create(parent string, googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest) *ProjectsInstancesWorkerpoolsCreateCall { 4212 c := &ProjectsInstancesWorkerpoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4213 c.parent = parent 4214 c.googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest = googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest 4215 return c 4216} 4217 4218// Fields allows partial responses to be retrieved. See 4219// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4220// for more information. 4221func (c *ProjectsInstancesWorkerpoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsCreateCall { 4222 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4223 return c 4224} 4225 4226// Context sets the context to be used in this call's Do method. Any 4227// pending HTTP request will be aborted if the provided context is 4228// canceled. 4229func (c *ProjectsInstancesWorkerpoolsCreateCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsCreateCall { 4230 c.ctx_ = ctx 4231 return c 4232} 4233 4234// Header returns an http.Header that can be modified by the caller to 4235// add HTTP headers to the request. 4236func (c *ProjectsInstancesWorkerpoolsCreateCall) Header() http.Header { 4237 if c.header_ == nil { 4238 c.header_ = make(http.Header) 4239 } 4240 return c.header_ 4241} 4242 4243func (c *ProjectsInstancesWorkerpoolsCreateCall) doRequest(alt string) (*http.Response, error) { 4244 reqHeaders := make(http.Header) 4245 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 4246 for k, v := range c.header_ { 4247 reqHeaders[k] = v 4248 } 4249 reqHeaders.Set("User-Agent", c.s.userAgent()) 4250 var body io.Reader = nil 4251 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledevtoolsremotebuildexecutionadminv1alphacreateworkerpoolrequest) 4252 if err != nil { 4253 return nil, err 4254 } 4255 reqHeaders.Set("Content-Type", "application/json") 4256 c.urlParams_.Set("alt", alt) 4257 c.urlParams_.Set("prettyPrint", "false") 4258 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workerpools") 4259 urls += "?" + c.urlParams_.Encode() 4260 req, err := http.NewRequest("POST", urls, body) 4261 if err != nil { 4262 return nil, err 4263 } 4264 req.Header = reqHeaders 4265 googleapi.Expand(req.URL, map[string]string{ 4266 "parent": c.parent, 4267 }) 4268 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4269} 4270 4271// Do executes the "remotebuildexecution.projects.instances.workerpools.create" call. 4272// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4273// Any non-2xx status code is an error. Response headers are in either 4274// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4275// was returned at all) in error.(*googleapi.Error).Header. Use 4276// googleapi.IsNotModified to check whether the returned error was 4277// because http.StatusNotModified was returned. 4278func (c *ProjectsInstancesWorkerpoolsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4279 gensupport.SetOptions(c.urlParams_, opts...) 4280 res, err := c.doRequest("json") 4281 if res != nil && res.StatusCode == http.StatusNotModified { 4282 if res.Body != nil { 4283 res.Body.Close() 4284 } 4285 return nil, &googleapi.Error{ 4286 Code: res.StatusCode, 4287 Header: res.Header, 4288 } 4289 } 4290 if err != nil { 4291 return nil, err 4292 } 4293 defer googleapi.CloseBody(res) 4294 if err := googleapi.CheckResponse(res); err != nil { 4295 return nil, err 4296 } 4297 ret := &GoogleLongrunningOperation{ 4298 ServerResponse: googleapi.ServerResponse{ 4299 Header: res.Header, 4300 HTTPStatusCode: res.StatusCode, 4301 }, 4302 } 4303 target := &ret 4304 if err := gensupport.DecodeResponse(target, res); err != nil { 4305 return nil, err 4306 } 4307 return ret, nil 4308 // { 4309 // "description": "Creates a new worker pool with a specified size and configuration. Returns a long running operation which contains a worker pool on completion. While the long running operation is in progress, any call to `GetWorkerPool` returns a worker pool in state `CREATING`.", 4310 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools", 4311 // "httpMethod": "POST", 4312 // "id": "remotebuildexecution.projects.instances.workerpools.create", 4313 // "parameterOrder": [ 4314 // "parent" 4315 // ], 4316 // "parameters": { 4317 // "parent": { 4318 // "description": "Resource name of the instance in which to create the new worker pool. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 4319 // "location": "path", 4320 // "pattern": "^projects/[^/]+/instances/[^/]+$", 4321 // "required": true, 4322 // "type": "string" 4323 // } 4324 // }, 4325 // "path": "v1alpha/{+parent}/workerpools", 4326 // "request": { 4327 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest" 4328 // }, 4329 // "response": { 4330 // "$ref": "GoogleLongrunningOperation" 4331 // }, 4332 // "scopes": [ 4333 // "https://www.googleapis.com/auth/cloud-platform" 4334 // ] 4335 // } 4336 4337} 4338 4339// method id "remotebuildexecution.projects.instances.workerpools.delete": 4340 4341type ProjectsInstancesWorkerpoolsDeleteCall struct { 4342 s *Service 4343 name string 4344 urlParams_ gensupport.URLParams 4345 ctx_ context.Context 4346 header_ http.Header 4347} 4348 4349// Delete: Deletes the specified worker pool. Returns a long running 4350// operation, which contains a `google.protobuf.Empty` response on 4351// completion. While the long running operation is in progress, any call 4352// to `GetWorkerPool` returns a worker pool in state `DELETING`. 4353// 4354// - name: Name of the worker pool to delete. Format: 4355// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID] 4356// `. 4357func (r *ProjectsInstancesWorkerpoolsService) Delete(name string) *ProjectsInstancesWorkerpoolsDeleteCall { 4358 c := &ProjectsInstancesWorkerpoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4359 c.name = name 4360 return c 4361} 4362 4363// Fields allows partial responses to be retrieved. See 4364// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4365// for more information. 4366func (c *ProjectsInstancesWorkerpoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsDeleteCall { 4367 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4368 return c 4369} 4370 4371// Context sets the context to be used in this call's Do method. Any 4372// pending HTTP request will be aborted if the provided context is 4373// canceled. 4374func (c *ProjectsInstancesWorkerpoolsDeleteCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsDeleteCall { 4375 c.ctx_ = ctx 4376 return c 4377} 4378 4379// Header returns an http.Header that can be modified by the caller to 4380// add HTTP headers to the request. 4381func (c *ProjectsInstancesWorkerpoolsDeleteCall) Header() http.Header { 4382 if c.header_ == nil { 4383 c.header_ = make(http.Header) 4384 } 4385 return c.header_ 4386} 4387 4388func (c *ProjectsInstancesWorkerpoolsDeleteCall) doRequest(alt string) (*http.Response, error) { 4389 reqHeaders := make(http.Header) 4390 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 4391 for k, v := range c.header_ { 4392 reqHeaders[k] = v 4393 } 4394 reqHeaders.Set("User-Agent", c.s.userAgent()) 4395 var body io.Reader = nil 4396 c.urlParams_.Set("alt", alt) 4397 c.urlParams_.Set("prettyPrint", "false") 4398 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4399 urls += "?" + c.urlParams_.Encode() 4400 req, err := http.NewRequest("DELETE", urls, body) 4401 if err != nil { 4402 return nil, err 4403 } 4404 req.Header = reqHeaders 4405 googleapi.Expand(req.URL, map[string]string{ 4406 "name": c.name, 4407 }) 4408 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4409} 4410 4411// Do executes the "remotebuildexecution.projects.instances.workerpools.delete" call. 4412// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4413// Any non-2xx status code is an error. Response headers are in either 4414// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4415// was returned at all) in error.(*googleapi.Error).Header. Use 4416// googleapi.IsNotModified to check whether the returned error was 4417// because http.StatusNotModified was returned. 4418func (c *ProjectsInstancesWorkerpoolsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4419 gensupport.SetOptions(c.urlParams_, opts...) 4420 res, err := c.doRequest("json") 4421 if res != nil && res.StatusCode == http.StatusNotModified { 4422 if res.Body != nil { 4423 res.Body.Close() 4424 } 4425 return nil, &googleapi.Error{ 4426 Code: res.StatusCode, 4427 Header: res.Header, 4428 } 4429 } 4430 if err != nil { 4431 return nil, err 4432 } 4433 defer googleapi.CloseBody(res) 4434 if err := googleapi.CheckResponse(res); err != nil { 4435 return nil, err 4436 } 4437 ret := &GoogleLongrunningOperation{ 4438 ServerResponse: googleapi.ServerResponse{ 4439 Header: res.Header, 4440 HTTPStatusCode: res.StatusCode, 4441 }, 4442 } 4443 target := &ret 4444 if err := gensupport.DecodeResponse(target, res); err != nil { 4445 return nil, err 4446 } 4447 return ret, nil 4448 // { 4449 // "description": "Deletes the specified worker pool. Returns a long running operation, which contains a `google.protobuf.Empty` response on completion. While the long running operation is in progress, any call to `GetWorkerPool` returns a worker pool in state `DELETING`.", 4450 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", 4451 // "httpMethod": "DELETE", 4452 // "id": "remotebuildexecution.projects.instances.workerpools.delete", 4453 // "parameterOrder": [ 4454 // "name" 4455 // ], 4456 // "parameters": { 4457 // "name": { 4458 // "description": "Name of the worker pool to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", 4459 // "location": "path", 4460 // "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", 4461 // "required": true, 4462 // "type": "string" 4463 // } 4464 // }, 4465 // "path": "v1alpha/{+name}", 4466 // "response": { 4467 // "$ref": "GoogleLongrunningOperation" 4468 // }, 4469 // "scopes": [ 4470 // "https://www.googleapis.com/auth/cloud-platform" 4471 // ] 4472 // } 4473 4474} 4475 4476// method id "remotebuildexecution.projects.instances.workerpools.get": 4477 4478type ProjectsInstancesWorkerpoolsGetCall struct { 4479 s *Service 4480 name string 4481 urlParams_ gensupport.URLParams 4482 ifNoneMatch_ string 4483 ctx_ context.Context 4484 header_ http.Header 4485} 4486 4487// Get: Returns the specified worker pool. 4488// 4489// - name: Name of the worker pool to retrieve. Format: 4490// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID] 4491// `. 4492func (r *ProjectsInstancesWorkerpoolsService) Get(name string) *ProjectsInstancesWorkerpoolsGetCall { 4493 c := &ProjectsInstancesWorkerpoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4494 c.name = name 4495 return c 4496} 4497 4498// Fields allows partial responses to be retrieved. See 4499// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4500// for more information. 4501func (c *ProjectsInstancesWorkerpoolsGetCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsGetCall { 4502 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4503 return c 4504} 4505 4506// IfNoneMatch sets the optional parameter which makes the operation 4507// fail if the object's ETag matches the given value. This is useful for 4508// getting updates only after the object has changed since the last 4509// request. Use googleapi.IsNotModified to check whether the response 4510// error from Do is the result of In-None-Match. 4511func (c *ProjectsInstancesWorkerpoolsGetCall) IfNoneMatch(entityTag string) *ProjectsInstancesWorkerpoolsGetCall { 4512 c.ifNoneMatch_ = entityTag 4513 return c 4514} 4515 4516// Context sets the context to be used in this call's Do method. Any 4517// pending HTTP request will be aborted if the provided context is 4518// canceled. 4519func (c *ProjectsInstancesWorkerpoolsGetCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsGetCall { 4520 c.ctx_ = ctx 4521 return c 4522} 4523 4524// Header returns an http.Header that can be modified by the caller to 4525// add HTTP headers to the request. 4526func (c *ProjectsInstancesWorkerpoolsGetCall) Header() http.Header { 4527 if c.header_ == nil { 4528 c.header_ = make(http.Header) 4529 } 4530 return c.header_ 4531} 4532 4533func (c *ProjectsInstancesWorkerpoolsGetCall) doRequest(alt string) (*http.Response, error) { 4534 reqHeaders := make(http.Header) 4535 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 4536 for k, v := range c.header_ { 4537 reqHeaders[k] = v 4538 } 4539 reqHeaders.Set("User-Agent", c.s.userAgent()) 4540 if c.ifNoneMatch_ != "" { 4541 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4542 } 4543 var body io.Reader = nil 4544 c.urlParams_.Set("alt", alt) 4545 c.urlParams_.Set("prettyPrint", "false") 4546 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4547 urls += "?" + c.urlParams_.Encode() 4548 req, err := http.NewRequest("GET", urls, body) 4549 if err != nil { 4550 return nil, err 4551 } 4552 req.Header = reqHeaders 4553 googleapi.Expand(req.URL, map[string]string{ 4554 "name": c.name, 4555 }) 4556 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4557} 4558 4559// Do executes the "remotebuildexecution.projects.instances.workerpools.get" call. 4560// Exactly one of 4561// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool or error 4562// will be non-nil. Any non-2xx status code is an error. Response 4563// headers are in either 4564// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool.ServerRespon 4565// se.Header or (if a response was returned at all) in 4566// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4567// whether the returned error was because http.StatusNotModified was 4568// returned. 4569func (c *ProjectsInstancesWorkerpoolsGetCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool, error) { 4570 gensupport.SetOptions(c.urlParams_, opts...) 4571 res, err := c.doRequest("json") 4572 if res != nil && res.StatusCode == http.StatusNotModified { 4573 if res.Body != nil { 4574 res.Body.Close() 4575 } 4576 return nil, &googleapi.Error{ 4577 Code: res.StatusCode, 4578 Header: res.Header, 4579 } 4580 } 4581 if err != nil { 4582 return nil, err 4583 } 4584 defer googleapi.CloseBody(res) 4585 if err := googleapi.CheckResponse(res); err != nil { 4586 return nil, err 4587 } 4588 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool{ 4589 ServerResponse: googleapi.ServerResponse{ 4590 Header: res.Header, 4591 HTTPStatusCode: res.StatusCode, 4592 }, 4593 } 4594 target := &ret 4595 if err := gensupport.DecodeResponse(target, res); err != nil { 4596 return nil, err 4597 } 4598 return ret, nil 4599 // { 4600 // "description": "Returns the specified worker pool.", 4601 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", 4602 // "httpMethod": "GET", 4603 // "id": "remotebuildexecution.projects.instances.workerpools.get", 4604 // "parameterOrder": [ 4605 // "name" 4606 // ], 4607 // "parameters": { 4608 // "name": { 4609 // "description": "Name of the worker pool to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", 4610 // "location": "path", 4611 // "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", 4612 // "required": true, 4613 // "type": "string" 4614 // } 4615 // }, 4616 // "path": "v1alpha/{+name}", 4617 // "response": { 4618 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool" 4619 // }, 4620 // "scopes": [ 4621 // "https://www.googleapis.com/auth/cloud-platform" 4622 // ] 4623 // } 4624 4625} 4626 4627// method id "remotebuildexecution.projects.instances.workerpools.list": 4628 4629type ProjectsInstancesWorkerpoolsListCall struct { 4630 s *Service 4631 parent string 4632 urlParams_ gensupport.URLParams 4633 ifNoneMatch_ string 4634 ctx_ context.Context 4635 header_ http.Header 4636} 4637 4638// List: Lists worker pools in an instance. 4639// 4640// - parent: Resource name of the instance. Format: 4641// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. 4642func (r *ProjectsInstancesWorkerpoolsService) List(parent string) *ProjectsInstancesWorkerpoolsListCall { 4643 c := &ProjectsInstancesWorkerpoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4644 c.parent = parent 4645 return c 4646} 4647 4648// Filter sets the optional parameter "filter": A filter expression that 4649// filters resources listed in the response. The expression must specify 4650// the field name, a comparison operator, and the value that you want to 4651// use for filtering. The value must be a string, a number, or a 4652// boolean. String values are case-insensitive. The comparison operator 4653// must be either `:`, `=`, `!=`, `>`, `>=`, `<=` or `<`. The `:` 4654// operator can be used with string fields to match substrings. For 4655// non-string fields it is equivalent to the `=` operator. The `:*` 4656// comparison can be used to test whether a key has been defined. You 4657// can also filter on nested fields. To filter on multiple expressions, 4658// you can separate expression using `AND` and `OR` operators, using 4659// parentheses to specify precedence. If neither operator is specified, 4660// `AND` is assumed. Examples: Include only pools with more than 100 4661// reserved workers: `(worker_count > 100) (worker_config.reserved = 4662// true)` Include only pools with a certain label or machines of the 4663// e2-standard family: `worker_config.labels.key1 : * OR 4664// worker_config.machine_type: e2-standard` 4665func (c *ProjectsInstancesWorkerpoolsListCall) Filter(filter string) *ProjectsInstancesWorkerpoolsListCall { 4666 c.urlParams_.Set("filter", filter) 4667 return c 4668} 4669 4670// Fields allows partial responses to be retrieved. See 4671// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4672// for more information. 4673func (c *ProjectsInstancesWorkerpoolsListCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsListCall { 4674 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4675 return c 4676} 4677 4678// IfNoneMatch sets the optional parameter which makes the operation 4679// fail if the object's ETag matches the given value. This is useful for 4680// getting updates only after the object has changed since the last 4681// request. Use googleapi.IsNotModified to check whether the response 4682// error from Do is the result of In-None-Match. 4683func (c *ProjectsInstancesWorkerpoolsListCall) IfNoneMatch(entityTag string) *ProjectsInstancesWorkerpoolsListCall { 4684 c.ifNoneMatch_ = entityTag 4685 return c 4686} 4687 4688// Context sets the context to be used in this call's Do method. Any 4689// pending HTTP request will be aborted if the provided context is 4690// canceled. 4691func (c *ProjectsInstancesWorkerpoolsListCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsListCall { 4692 c.ctx_ = ctx 4693 return c 4694} 4695 4696// Header returns an http.Header that can be modified by the caller to 4697// add HTTP headers to the request. 4698func (c *ProjectsInstancesWorkerpoolsListCall) Header() http.Header { 4699 if c.header_ == nil { 4700 c.header_ = make(http.Header) 4701 } 4702 return c.header_ 4703} 4704 4705func (c *ProjectsInstancesWorkerpoolsListCall) doRequest(alt string) (*http.Response, error) { 4706 reqHeaders := make(http.Header) 4707 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 4708 for k, v := range c.header_ { 4709 reqHeaders[k] = v 4710 } 4711 reqHeaders.Set("User-Agent", c.s.userAgent()) 4712 if c.ifNoneMatch_ != "" { 4713 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 4714 } 4715 var body io.Reader = nil 4716 c.urlParams_.Set("alt", alt) 4717 c.urlParams_.Set("prettyPrint", "false") 4718 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+parent}/workerpools") 4719 urls += "?" + c.urlParams_.Encode() 4720 req, err := http.NewRequest("GET", urls, body) 4721 if err != nil { 4722 return nil, err 4723 } 4724 req.Header = reqHeaders 4725 googleapi.Expand(req.URL, map[string]string{ 4726 "parent": c.parent, 4727 }) 4728 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4729} 4730 4731// Do executes the "remotebuildexecution.projects.instances.workerpools.list" call. 4732// Exactly one of 4733// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse 4734// or error will be non-nil. Any non-2xx status code is an error. 4735// Response headers are in either 4736// *GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse 4737// .ServerResponse.Header or (if a response was returned at all) in 4738// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check 4739// whether the returned error was because http.StatusNotModified was 4740// returned. 4741func (c *ProjectsInstancesWorkerpoolsListCall) Do(opts ...googleapi.CallOption) (*GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse, error) { 4742 gensupport.SetOptions(c.urlParams_, opts...) 4743 res, err := c.doRequest("json") 4744 if res != nil && res.StatusCode == http.StatusNotModified { 4745 if res.Body != nil { 4746 res.Body.Close() 4747 } 4748 return nil, &googleapi.Error{ 4749 Code: res.StatusCode, 4750 Header: res.Header, 4751 } 4752 } 4753 if err != nil { 4754 return nil, err 4755 } 4756 defer googleapi.CloseBody(res) 4757 if err := googleapi.CheckResponse(res); err != nil { 4758 return nil, err 4759 } 4760 ret := &GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse{ 4761 ServerResponse: googleapi.ServerResponse{ 4762 Header: res.Header, 4763 HTTPStatusCode: res.StatusCode, 4764 }, 4765 } 4766 target := &ret 4767 if err := gensupport.DecodeResponse(target, res); err != nil { 4768 return nil, err 4769 } 4770 return ret, nil 4771 // { 4772 // "description": "Lists worker pools in an instance.", 4773 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools", 4774 // "httpMethod": "GET", 4775 // "id": "remotebuildexecution.projects.instances.workerpools.list", 4776 // "parameterOrder": [ 4777 // "parent" 4778 // ], 4779 // "parameters": { 4780 // "filter": { 4781 // "description": "Optional. A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. String values are case-insensitive. The comparison operator must be either `:`, `=`, `!=`, `\u003e`, `\u003e=`, `\u003c=` or `\u003c`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. You can also filter on nested fields. To filter on multiple expressions, you can separate expression using `AND` and `OR` operators, using parentheses to specify precedence. If neither operator is specified, `AND` is assumed. Examples: Include only pools with more than 100 reserved workers: `(worker_count \u003e 100) (worker_config.reserved = true)` Include only pools with a certain label or machines of the e2-standard family: `worker_config.labels.key1 : * OR worker_config.machine_type: e2-standard`", 4782 // "location": "query", 4783 // "type": "string" 4784 // }, 4785 // "parent": { 4786 // "description": "Resource name of the instance. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", 4787 // "location": "path", 4788 // "pattern": "^projects/[^/]+/instances/[^/]+$", 4789 // "required": true, 4790 // "type": "string" 4791 // } 4792 // }, 4793 // "path": "v1alpha/{+parent}/workerpools", 4794 // "response": { 4795 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse" 4796 // }, 4797 // "scopes": [ 4798 // "https://www.googleapis.com/auth/cloud-platform" 4799 // ] 4800 // } 4801 4802} 4803 4804// method id "remotebuildexecution.projects.instances.workerpools.patch": 4805 4806type ProjectsInstancesWorkerpoolsPatchCall struct { 4807 s *Service 4808 name string 4809 googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest 4810 urlParams_ gensupport.URLParams 4811 ctx_ context.Context 4812 header_ http.Header 4813} 4814 4815// Patch: Updates an existing worker pool with a specified size and/or 4816// configuration. Returns a long running operation, which contains a 4817// worker pool on completion. While the long running operation is in 4818// progress, any call to `GetWorkerPool` returns a worker pool in state 4819// `UPDATING`. 4820// 4821// - name: WorkerPool resource name formatted as: 4822// `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID] 4823// `. name should not be populated when creating a worker pool since 4824// it is provided in the `poolId` field. 4825func (r *ProjectsInstancesWorkerpoolsService) Patch(name string, googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest *GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest) *ProjectsInstancesWorkerpoolsPatchCall { 4826 c := &ProjectsInstancesWorkerpoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4827 c.name = name 4828 c.googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest = googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest 4829 return c 4830} 4831 4832// Fields allows partial responses to be retrieved. See 4833// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4834// for more information. 4835func (c *ProjectsInstancesWorkerpoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsInstancesWorkerpoolsPatchCall { 4836 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4837 return c 4838} 4839 4840// Context sets the context to be used in this call's Do method. Any 4841// pending HTTP request will be aborted if the provided context is 4842// canceled. 4843func (c *ProjectsInstancesWorkerpoolsPatchCall) Context(ctx context.Context) *ProjectsInstancesWorkerpoolsPatchCall { 4844 c.ctx_ = ctx 4845 return c 4846} 4847 4848// Header returns an http.Header that can be modified by the caller to 4849// add HTTP headers to the request. 4850func (c *ProjectsInstancesWorkerpoolsPatchCall) Header() http.Header { 4851 if c.header_ == nil { 4852 c.header_ = make(http.Header) 4853 } 4854 return c.header_ 4855} 4856 4857func (c *ProjectsInstancesWorkerpoolsPatchCall) doRequest(alt string) (*http.Response, error) { 4858 reqHeaders := make(http.Header) 4859 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 4860 for k, v := range c.header_ { 4861 reqHeaders[k] = v 4862 } 4863 reqHeaders.Set("User-Agent", c.s.userAgent()) 4864 var body io.Reader = nil 4865 body, err := googleapi.WithoutDataWrapper.JSONReader(c.googledevtoolsremotebuildexecutionadminv1alphaupdateworkerpoolrequest) 4866 if err != nil { 4867 return nil, err 4868 } 4869 reqHeaders.Set("Content-Type", "application/json") 4870 c.urlParams_.Set("alt", alt) 4871 c.urlParams_.Set("prettyPrint", "false") 4872 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 4873 urls += "?" + c.urlParams_.Encode() 4874 req, err := http.NewRequest("PATCH", urls, body) 4875 if err != nil { 4876 return nil, err 4877 } 4878 req.Header = reqHeaders 4879 googleapi.Expand(req.URL, map[string]string{ 4880 "name": c.name, 4881 }) 4882 return gensupport.SendRequest(c.ctx_, c.s.client, req) 4883} 4884 4885// Do executes the "remotebuildexecution.projects.instances.workerpools.patch" call. 4886// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 4887// Any non-2xx status code is an error. Response headers are in either 4888// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 4889// was returned at all) in error.(*googleapi.Error).Header. Use 4890// googleapi.IsNotModified to check whether the returned error was 4891// because http.StatusNotModified was returned. 4892func (c *ProjectsInstancesWorkerpoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 4893 gensupport.SetOptions(c.urlParams_, opts...) 4894 res, err := c.doRequest("json") 4895 if res != nil && res.StatusCode == http.StatusNotModified { 4896 if res.Body != nil { 4897 res.Body.Close() 4898 } 4899 return nil, &googleapi.Error{ 4900 Code: res.StatusCode, 4901 Header: res.Header, 4902 } 4903 } 4904 if err != nil { 4905 return nil, err 4906 } 4907 defer googleapi.CloseBody(res) 4908 if err := googleapi.CheckResponse(res); err != nil { 4909 return nil, err 4910 } 4911 ret := &GoogleLongrunningOperation{ 4912 ServerResponse: googleapi.ServerResponse{ 4913 Header: res.Header, 4914 HTTPStatusCode: res.StatusCode, 4915 }, 4916 } 4917 target := &ret 4918 if err := gensupport.DecodeResponse(target, res); err != nil { 4919 return nil, err 4920 } 4921 return ret, nil 4922 // { 4923 // "description": "Updates an existing worker pool with a specified size and/or configuration. Returns a long running operation, which contains a worker pool on completion. While the long running operation is in progress, any call to `GetWorkerPool` returns a worker pool in state `UPDATING`.", 4924 // "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", 4925 // "httpMethod": "PATCH", 4926 // "id": "remotebuildexecution.projects.instances.workerpools.patch", 4927 // "parameterOrder": [ 4928 // "name" 4929 // ], 4930 // "parameters": { 4931 // "name": { 4932 // "description": "WorkerPool resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. name should not be populated when creating a worker pool since it is provided in the `poolId` field.", 4933 // "location": "path", 4934 // "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", 4935 // "required": true, 4936 // "type": "string" 4937 // } 4938 // }, 4939 // "path": "v1alpha/{+name}", 4940 // "request": { 4941 // "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest" 4942 // }, 4943 // "response": { 4944 // "$ref": "GoogleLongrunningOperation" 4945 // }, 4946 // "scopes": [ 4947 // "https://www.googleapis.com/auth/cloud-platform" 4948 // ] 4949 // } 4950 4951} 4952 4953// method id "remotebuildexecution.projects.operations.get": 4954 4955type ProjectsOperationsGetCall struct { 4956 s *Service 4957 name string 4958 urlParams_ gensupport.URLParams 4959 ifNoneMatch_ string 4960 ctx_ context.Context 4961 header_ http.Header 4962} 4963 4964// Get: Gets the latest state of a long-running operation. Clients can 4965// use this method to poll the operation result at intervals as 4966// recommended by the API service. 4967// 4968// - name: The name of the operation resource. 4969func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall { 4970 c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} 4971 c.name = name 4972 return c 4973} 4974 4975// Fields allows partial responses to be retrieved. See 4976// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse 4977// for more information. 4978func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall { 4979 c.urlParams_.Set("fields", googleapi.CombineFields(s)) 4980 return c 4981} 4982 4983// IfNoneMatch sets the optional parameter which makes the operation 4984// fail if the object's ETag matches the given value. This is useful for 4985// getting updates only after the object has changed since the last 4986// request. Use googleapi.IsNotModified to check whether the response 4987// error from Do is the result of In-None-Match. 4988func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall { 4989 c.ifNoneMatch_ = entityTag 4990 return c 4991} 4992 4993// Context sets the context to be used in this call's Do method. Any 4994// pending HTTP request will be aborted if the provided context is 4995// canceled. 4996func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall { 4997 c.ctx_ = ctx 4998 return c 4999} 5000 5001// Header returns an http.Header that can be modified by the caller to 5002// add HTTP headers to the request. 5003func (c *ProjectsOperationsGetCall) Header() http.Header { 5004 if c.header_ == nil { 5005 c.header_ = make(http.Header) 5006 } 5007 return c.header_ 5008} 5009 5010func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) { 5011 reqHeaders := make(http.Header) 5012 reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210721") 5013 for k, v := range c.header_ { 5014 reqHeaders[k] = v 5015 } 5016 reqHeaders.Set("User-Agent", c.s.userAgent()) 5017 if c.ifNoneMatch_ != "" { 5018 reqHeaders.Set("If-None-Match", c.ifNoneMatch_) 5019 } 5020 var body io.Reader = nil 5021 c.urlParams_.Set("alt", alt) 5022 c.urlParams_.Set("prettyPrint", "false") 5023 urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+name}") 5024 urls += "?" + c.urlParams_.Encode() 5025 req, err := http.NewRequest("GET", urls, body) 5026 if err != nil { 5027 return nil, err 5028 } 5029 req.Header = reqHeaders 5030 googleapi.Expand(req.URL, map[string]string{ 5031 "name": c.name, 5032 }) 5033 return gensupport.SendRequest(c.ctx_, c.s.client, req) 5034} 5035 5036// Do executes the "remotebuildexecution.projects.operations.get" call. 5037// Exactly one of *GoogleLongrunningOperation or error will be non-nil. 5038// Any non-2xx status code is an error. Response headers are in either 5039// *GoogleLongrunningOperation.ServerResponse.Header or (if a response 5040// was returned at all) in error.(*googleapi.Error).Header. Use 5041// googleapi.IsNotModified to check whether the returned error was 5042// because http.StatusNotModified was returned. 5043func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { 5044 gensupport.SetOptions(c.urlParams_, opts...) 5045 res, err := c.doRequest("json") 5046 if res != nil && res.StatusCode == http.StatusNotModified { 5047 if res.Body != nil { 5048 res.Body.Close() 5049 } 5050 return nil, &googleapi.Error{ 5051 Code: res.StatusCode, 5052 Header: res.Header, 5053 } 5054 } 5055 if err != nil { 5056 return nil, err 5057 } 5058 defer googleapi.CloseBody(res) 5059 if err := googleapi.CheckResponse(res); err != nil { 5060 return nil, err 5061 } 5062 ret := &GoogleLongrunningOperation{ 5063 ServerResponse: googleapi.ServerResponse{ 5064 Header: res.Header, 5065 HTTPStatusCode: res.StatusCode, 5066 }, 5067 } 5068 target := &ret 5069 if err := gensupport.DecodeResponse(target, res); err != nil { 5070 return nil, err 5071 } 5072 return ret, nil 5073 // { 5074 // "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.", 5075 // "flatPath": "v1alpha/projects/{projectsId}/operations/{operationsId}", 5076 // "httpMethod": "GET", 5077 // "id": "remotebuildexecution.projects.operations.get", 5078 // "parameterOrder": [ 5079 // "name" 5080 // ], 5081 // "parameters": { 5082 // "name": { 5083 // "description": "The name of the operation resource.", 5084 // "location": "path", 5085 // "pattern": "^projects/[^/]+/operations/[^/]+$", 5086 // "required": true, 5087 // "type": "string" 5088 // } 5089 // }, 5090 // "path": "v1alpha/{+name}", 5091 // "response": { 5092 // "$ref": "GoogleLongrunningOperation" 5093 // }, 5094 // "scopes": [ 5095 // "https://www.googleapis.com/auth/cloud-platform" 5096 // ] 5097 // } 5098 5099} 5100