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.
 
 
 

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