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