You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

5502 lines
215 KiB

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