25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2995 lines
112 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 genomics provides access to the Genomics API.
  6. //
  7. // For product documentation, see: https://cloud.google.com/genomics
  8. //
  9. // Creating a client
  10. //
  11. // Usage example:
  12. //
  13. // import "google.golang.org/api/genomics/v2alpha1"
  14. // ...
  15. // ctx := context.Background()
  16. // genomicsService, err := genomics.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. // By default, all available scopes (see "Constants") are used to authenticate. To restrict scopes, use option.WithScopes:
  25. //
  26. // genomicsService, err := genomics.NewService(ctx, option.WithScopes(genomics.GenomicsScope))
  27. //
  28. // To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
  29. //
  30. // genomicsService, err := genomics.NewService(ctx, option.WithAPIKey("AIza..."))
  31. //
  32. // To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
  33. //
  34. // config := &oauth2.Config{...}
  35. // // ...
  36. // token, err := config.Exchange(ctx, ...)
  37. // genomicsService, err := genomics.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
  38. //
  39. // See https://godoc.org/google.golang.org/api/option/ for details on options.
  40. package genomics // import "google.golang.org/api/genomics/v2alpha1"
  41. import (
  42. "bytes"
  43. "context"
  44. "encoding/json"
  45. "errors"
  46. "fmt"
  47. "io"
  48. "net/http"
  49. "net/url"
  50. "strconv"
  51. "strings"
  52. gensupport "google.golang.org/api/gensupport"
  53. googleapi "google.golang.org/api/googleapi"
  54. option "google.golang.org/api/option"
  55. htransport "google.golang.org/api/transport/http"
  56. )
  57. // Always reference these packages, just in case the auto-generated code
  58. // below doesn't.
  59. var _ = bytes.NewBuffer
  60. var _ = strconv.Itoa
  61. var _ = fmt.Sprintf
  62. var _ = json.NewDecoder
  63. var _ = io.Copy
  64. var _ = url.Parse
  65. var _ = gensupport.MarshalJSON
  66. var _ = googleapi.Version
  67. var _ = errors.New
  68. var _ = strings.Replace
  69. var _ = context.Canceled
  70. const apiId = "genomics:v2alpha1"
  71. const apiName = "genomics"
  72. const apiVersion = "v2alpha1"
  73. const basePath = "https://genomics.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your data across Google Cloud Platform services
  77. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  78. // View and manage Genomics data
  79. GenomicsScope = "https://www.googleapis.com/auth/genomics"
  80. )
  81. // NewService creates a new Service.
  82. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  83. scopesOption := option.WithScopes(
  84. "https://www.googleapis.com/auth/cloud-platform",
  85. "https://www.googleapis.com/auth/genomics",
  86. )
  87. // NOTE: prepend, so we don't override user-specified scopes.
  88. opts = append([]option.ClientOption{scopesOption}, opts...)
  89. client, endpoint, err := htransport.NewClient(ctx, opts...)
  90. if err != nil {
  91. return nil, err
  92. }
  93. s, err := New(client)
  94. if err != nil {
  95. return nil, err
  96. }
  97. if endpoint != "" {
  98. s.BasePath = endpoint
  99. }
  100. return s, nil
  101. }
  102. // New creates a new Service. It uses the provided http.Client for requests.
  103. //
  104. // Deprecated: please use NewService instead.
  105. // To provide a custom HTTP client, use option.WithHTTPClient.
  106. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  107. func New(client *http.Client) (*Service, error) {
  108. if client == nil {
  109. return nil, errors.New("client is nil")
  110. }
  111. s := &Service{client: client, BasePath: basePath}
  112. s.Pipelines = NewPipelinesService(s)
  113. s.Projects = NewProjectsService(s)
  114. s.Workers = NewWorkersService(s)
  115. return s, nil
  116. }
  117. type Service struct {
  118. client *http.Client
  119. BasePath string // API endpoint base URL
  120. UserAgent string // optional additional User-Agent fragment
  121. Pipelines *PipelinesService
  122. Projects *ProjectsService
  123. Workers *WorkersService
  124. }
  125. func (s *Service) userAgent() string {
  126. if s.UserAgent == "" {
  127. return googleapi.UserAgent
  128. }
  129. return googleapi.UserAgent + " " + s.UserAgent
  130. }
  131. func NewPipelinesService(s *Service) *PipelinesService {
  132. rs := &PipelinesService{s: s}
  133. return rs
  134. }
  135. type PipelinesService struct {
  136. s *Service
  137. }
  138. func NewProjectsService(s *Service) *ProjectsService {
  139. rs := &ProjectsService{s: s}
  140. rs.Operations = NewProjectsOperationsService(s)
  141. return rs
  142. }
  143. type ProjectsService struct {
  144. s *Service
  145. Operations *ProjectsOperationsService
  146. }
  147. func NewProjectsOperationsService(s *Service) *ProjectsOperationsService {
  148. rs := &ProjectsOperationsService{s: s}
  149. return rs
  150. }
  151. type ProjectsOperationsService struct {
  152. s *Service
  153. }
  154. func NewWorkersService(s *Service) *WorkersService {
  155. rs := &WorkersService{s: s}
  156. return rs
  157. }
  158. type WorkersService struct {
  159. s *Service
  160. }
  161. // Accelerator: Carries information about an accelerator that can be
  162. // attached to a VM.
  163. type Accelerator struct {
  164. // Count: How many accelerators of this type to attach.
  165. Count int64 `json:"count,omitempty,string"`
  166. // Type: The accelerator type string (for example,
  167. // "nvidia-tesla-k80").
  168. //
  169. // Only NVIDIA GPU accelerators are currently supported. If an NVIDIA
  170. // GPU is
  171. // attached, the required runtime libraries will be made available to
  172. // all
  173. // containers under `/usr/local/nvidia`. The driver version to install
  174. // must
  175. // be specified using the NVIDIA driver version parameter on the
  176. // virtual
  177. // machine specification. Note that attaching a GPU increases the worker
  178. // VM
  179. // startup time by a few minutes.
  180. Type string `json:"type,omitempty"`
  181. // ForceSendFields is a list of field names (e.g. "Count") to
  182. // unconditionally include in API requests. By default, fields with
  183. // empty values are omitted from API requests. However, any non-pointer,
  184. // non-interface field appearing in ForceSendFields will be sent to the
  185. // server regardless of whether the field is empty or not. This may be
  186. // used to include empty fields in Patch requests.
  187. ForceSendFields []string `json:"-"`
  188. // NullFields is a list of field names (e.g. "Count") to include in API
  189. // requests with the JSON null value. By default, fields with empty
  190. // values are omitted from API requests. However, any field with an
  191. // empty value appearing in NullFields will be sent to the server as
  192. // null. It is an error if a field in this list has a non-empty value.
  193. // This may be used to include null fields in Patch requests.
  194. NullFields []string `json:"-"`
  195. }
  196. func (s *Accelerator) MarshalJSON() ([]byte, error) {
  197. type NoMethod Accelerator
  198. raw := NoMethod(*s)
  199. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  200. }
  201. // Action: Specifies a single action that runs a Docker container.
  202. type Action struct {
  203. // Commands: If specified, overrides the `CMD` specified in the
  204. // container. If the
  205. // container also has an `ENTRYPOINT` the values are used as
  206. // entrypoint
  207. // arguments. Otherwise, they are used as a command and arguments to
  208. // run
  209. // inside the container.
  210. Commands []string `json:"commands,omitempty"`
  211. // Credentials: If the specified image is hosted on a private registry
  212. // other than Google
  213. // Container Registry, the credentials required to pull the image must
  214. // be
  215. // specified here as an encrypted secret.
  216. //
  217. // The secret must decrypt to a JSON-encoded dictionary containing
  218. // both
  219. // `username` and `password` keys.
  220. Credentials *Secret `json:"credentials,omitempty"`
  221. // Entrypoint: If specified, overrides the `ENTRYPOINT` specified in the
  222. // container.
  223. Entrypoint string `json:"entrypoint,omitempty"`
  224. // Environment: The environment to pass into the container. This
  225. // environment is merged
  226. // with any values specified in the `Pipeline` message. These
  227. // values
  228. // overwrite any in the `Pipeline` message.
  229. //
  230. // In addition to the values passed here, a few other values
  231. // are
  232. // automatically injected into the environment. These cannot be hidden
  233. // or
  234. // overwritten.
  235. //
  236. // `GOOGLE_PIPELINE_FAILED` will be set to "1" if the pipeline
  237. // failed
  238. // because an action has exited with a non-zero status (and did not have
  239. // the
  240. // `IGNORE_EXIT_STATUS` flag set). This can be used to determine if
  241. // additional
  242. // debug or logging actions should execute.
  243. //
  244. // `GOOGLE_LAST_EXIT_STATUS` will be set to the exit status of the
  245. // last
  246. // non-background action that executed. This can be used by workflow
  247. // engine
  248. // authors to determine whether an individual action has succeeded or
  249. // failed.
  250. Environment map[string]string `json:"environment,omitempty"`
  251. // Flags: The set of flags to apply to this action.
  252. //
  253. // Possible values:
  254. // "FLAG_UNSPECIFIED" - Unspecified flag.
  255. // "IGNORE_EXIT_STATUS" - Normally, a non-zero exit status causes the
  256. // pipeline to fail. This flag
  257. // allows execution of other actions to continue instead.
  258. // "RUN_IN_BACKGROUND" - This flag allows an action to continue
  259. // running in the background while
  260. // executing subsequent actions. This is useful to provide services
  261. // to
  262. // other actions (or to provide debugging support tools like SSH
  263. // servers).
  264. // "ALWAYS_RUN" - By default, after an action fails, no further
  265. // actions are run. This flag
  266. // indicates that this action must be run even if the pipeline has
  267. // already
  268. // failed. This is useful for actions that copy output files off of the
  269. // VM
  270. // or for debugging.
  271. // "ENABLE_FUSE" - Enable access to the FUSE device for this action.
  272. // Filesystems can then
  273. // be mounted into disks shared with other actions. The other actions
  274. // do
  275. // not need the `ENABLE_FUSE` flag to access the mounted
  276. // filesystem.
  277. //
  278. // This has the effect of causing the container to be executed
  279. // with
  280. // `CAP_SYS_ADMIN` and exposes `/dev/fuse` to the container, so use it
  281. // only
  282. // for containers you trust.
  283. // "PUBLISH_EXPOSED_PORTS" - Exposes all ports specified by `EXPOSE`
  284. // statements in the container. To
  285. // discover the host side port numbers, consult the `ACTION_STARTED`
  286. // event
  287. // in the operation metadata.
  288. // "DISABLE_IMAGE_PREFETCH" - All container images are typically
  289. // downloaded before any actions are
  290. // executed. This helps prevent typos in URIs or issues like lack of
  291. // disk
  292. // space from wasting large amounts of compute resources.
  293. //
  294. // If set, this flag prevents the worker from downloading the image
  295. // until
  296. // just before the action is executed.
  297. // "DISABLE_STANDARD_ERROR_CAPTURE" - A small portion of the
  298. // container's standard error stream is typically
  299. // captured and returned inside the `ContainerStoppedEvent`. Setting
  300. // this
  301. // flag disables this functionality.
  302. Flags []string `json:"flags,omitempty"`
  303. // ImageUri: The URI to pull the container image from. Note that all
  304. // images referenced
  305. // by actions in the pipeline are pulled before the first action runs.
  306. // If
  307. // multiple actions reference the same image, it is only pulled
  308. // once,
  309. // ensuring that the same image is used for all actions in a single
  310. // pipeline.
  311. ImageUri string `json:"imageUri,omitempty"`
  312. // Labels: Labels to associate with the action. This field is provided
  313. // to assist
  314. // workflow engine authors in identifying actions (for example, to
  315. // indicate
  316. // what sort of action they perform, such as localization or
  317. // debugging).
  318. // They are returned in the operation metadata, but are otherwise
  319. // ignored.
  320. Labels map[string]string `json:"labels,omitempty"`
  321. // Mounts: A list of mounts to make available to the action.
  322. //
  323. // In addition to the values specified here, every action has a
  324. // special
  325. // virtual disk mounted under `/google` that contains log files and
  326. // other
  327. // operational components.
  328. //
  329. // <ul>
  330. // <li><code>/google/logs</code> All logs written during the pipeline
  331. // execution.</li>
  332. // <li><code>/google/logs/output</code> The combined standard output
  333. // and
  334. // standard error of all actions run as part of the pipeline
  335. // execution.</li>
  336. // <li><code>/google/logs/action/*/stdout</code> The complete contents
  337. // of
  338. // each individual action's standard output.</li>
  339. // <li><code>/google/logs/action/*/stderr</code> The complete contents
  340. // of
  341. // each individual action's standard error output.</li>
  342. // </ul>
  343. Mounts []*Mount `json:"mounts,omitempty"`
  344. // Name: An optional name for the container. The container hostname will
  345. // be set to
  346. // this name, making it useful for inter-container communication. The
  347. // name
  348. // must contain only upper and lowercase alphanumeric characters and
  349. // hypens
  350. // and cannot start with a hypen.
  351. Name string `json:"name,omitempty"`
  352. // PidNamespace: An optional identifier for a PID namespace to run the
  353. // action inside.
  354. // Multiple actions should use the same string to share a namespace.
  355. // If
  356. // unspecified, a separate isolated namespace is used.
  357. PidNamespace string `json:"pidNamespace,omitempty"`
  358. // PortMappings: A map of containers to host port mappings for this
  359. // container. If the
  360. // container already specifies exposed ports, use
  361. // the
  362. // `PUBLISH_EXPOSED_PORTS` flag instead.
  363. //
  364. // The host port number must be less than 65536. If it is zero, an
  365. // unused
  366. // random port is assigned. To determine the resulting port number,
  367. // consult
  368. // the `ContainerStartedEvent` in the operation metadata.
  369. PortMappings map[string]int64 `json:"portMappings,omitempty"`
  370. // Timeout: The maximum amount of time to give the action to complete.
  371. // If the action
  372. // fails to complete before the timeout, it will be terminated and the
  373. // exit
  374. // status will be non-zero. The pipeline will continue or terminate
  375. // based
  376. // on the rules defined by the `ALWAYS_RUN` and `IGNORE_EXIT_STATUS`
  377. // flags.
  378. Timeout string `json:"timeout,omitempty"`
  379. // ForceSendFields is a list of field names (e.g. "Commands") to
  380. // unconditionally include in API requests. By default, fields with
  381. // empty values are omitted from API requests. However, any non-pointer,
  382. // non-interface field appearing in ForceSendFields will be sent to the
  383. // server regardless of whether the field is empty or not. This may be
  384. // used to include empty fields in Patch requests.
  385. ForceSendFields []string `json:"-"`
  386. // NullFields is a list of field names (e.g. "Commands") to include in
  387. // API requests with the JSON null value. By default, fields with empty
  388. // values are omitted from API requests. However, any field with an
  389. // empty value appearing in NullFields will be sent to the server as
  390. // null. It is an error if a field in this list has a non-empty value.
  391. // This may be used to include null fields in Patch requests.
  392. NullFields []string `json:"-"`
  393. }
  394. func (s *Action) MarshalJSON() ([]byte, error) {
  395. type NoMethod Action
  396. raw := NoMethod(*s)
  397. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  398. }
  399. // CancelOperationRequest: The request message for
  400. // Operations.CancelOperation.
  401. type CancelOperationRequest struct {
  402. }
  403. // CheckInRequest: The parameters to the CheckIn method.
  404. type CheckInRequest struct {
  405. // DeadlineExpired: The deadline has expired and the worker needs more
  406. // time.
  407. DeadlineExpired *Empty `json:"deadlineExpired,omitempty"`
  408. // Event: A workflow specific event occurred.
  409. Event googleapi.RawMessage `json:"event,omitempty"`
  410. // Result: The operation has finished with the given result.
  411. Result *Status `json:"result,omitempty"`
  412. // WorkerStatus: Data about the status of the worker VM.
  413. WorkerStatus *WorkerStatus `json:"workerStatus,omitempty"`
  414. // ForceSendFields is a list of field names (e.g. "DeadlineExpired") to
  415. // unconditionally include in API requests. By default, fields with
  416. // empty values are omitted from API requests. However, any non-pointer,
  417. // non-interface field appearing in ForceSendFields will be sent to the
  418. // server regardless of whether the field is empty or not. This may be
  419. // used to include empty fields in Patch requests.
  420. ForceSendFields []string `json:"-"`
  421. // NullFields is a list of field names (e.g. "DeadlineExpired") to
  422. // include in API requests with the JSON null value. By default, fields
  423. // with empty values are omitted from API requests. However, any field
  424. // with an empty value appearing in NullFields will be sent to the
  425. // server as null. It is an error if a field in this list has a
  426. // non-empty value. This may be used to include null fields in Patch
  427. // requests.
  428. NullFields []string `json:"-"`
  429. }
  430. func (s *CheckInRequest) MarshalJSON() ([]byte, error) {
  431. type NoMethod CheckInRequest
  432. raw := NoMethod(*s)
  433. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  434. }
  435. // CheckInResponse: The response to the CheckIn method.
  436. type CheckInResponse struct {
  437. // Deadline: The deadline by which the worker must request an extension.
  438. // The backend
  439. // will allow for network transmission time and other delays, but the
  440. // worker
  441. // must attempt to transmit the extension request no later than the
  442. // deadline.
  443. Deadline string `json:"deadline,omitempty"`
  444. // Metadata: The metadata that describes the operation assigned to the
  445. // worker.
  446. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  447. // ServerResponse contains the HTTP response code and headers from the
  448. // server.
  449. googleapi.ServerResponse `json:"-"`
  450. // ForceSendFields is a list of field names (e.g. "Deadline") to
  451. // unconditionally include in API requests. By default, fields with
  452. // empty values are omitted from API requests. However, any non-pointer,
  453. // non-interface field appearing in ForceSendFields will be sent to the
  454. // server regardless of whether the field is empty or not. This may be
  455. // used to include empty fields in Patch requests.
  456. ForceSendFields []string `json:"-"`
  457. // NullFields is a list of field names (e.g. "Deadline") to include in
  458. // API requests with the JSON null value. By default, fields with empty
  459. // values are omitted from API requests. However, any field with an
  460. // empty value appearing in NullFields will be sent to the server as
  461. // null. It is an error if a field in this list has a non-empty value.
  462. // This may be used to include null fields in Patch requests.
  463. NullFields []string `json:"-"`
  464. }
  465. func (s *CheckInResponse) MarshalJSON() ([]byte, error) {
  466. type NoMethod CheckInResponse
  467. raw := NoMethod(*s)
  468. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  469. }
  470. // ComputeEngine: Describes a Compute Engine resource that is being
  471. // managed by a running
  472. // pipeline.
  473. type ComputeEngine struct {
  474. // DiskNames: The names of the disks that were created for this
  475. // pipeline.
  476. DiskNames []string `json:"diskNames,omitempty"`
  477. // InstanceName: The instance on which the operation is running.
  478. InstanceName string `json:"instanceName,omitempty"`
  479. // MachineType: The machine type of the instance.
  480. MachineType string `json:"machineType,omitempty"`
  481. // Zone: The availability zone in which the instance resides.
  482. Zone string `json:"zone,omitempty"`
  483. // ForceSendFields is a list of field names (e.g. "DiskNames") to
  484. // unconditionally include in API requests. By default, fields with
  485. // empty values are omitted from API requests. However, any non-pointer,
  486. // non-interface field appearing in ForceSendFields will be sent to the
  487. // server regardless of whether the field is empty or not. This may be
  488. // used to include empty fields in Patch requests.
  489. ForceSendFields []string `json:"-"`
  490. // NullFields is a list of field names (e.g. "DiskNames") to include in
  491. // API requests with the JSON null value. By default, fields with empty
  492. // values are omitted from API requests. However, any field with an
  493. // empty value appearing in NullFields will be sent to the server as
  494. // null. It is an error if a field in this list has a non-empty value.
  495. // This may be used to include null fields in Patch requests.
  496. NullFields []string `json:"-"`
  497. }
  498. func (s *ComputeEngine) MarshalJSON() ([]byte, error) {
  499. type NoMethod ComputeEngine
  500. raw := NoMethod(*s)
  501. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  502. }
  503. // ContainerKilledEvent: An event generated when a container is forcibly
  504. // terminated by the
  505. // worker. Currently, this only occurs when the container outlives
  506. // the
  507. // timeout specified by the user.
  508. type ContainerKilledEvent struct {
  509. // ActionId: The numeric ID of the action that started the container.
  510. ActionId int64 `json:"actionId,omitempty"`
  511. // ForceSendFields is a list of field names (e.g. "ActionId") to
  512. // unconditionally include in API requests. By default, fields with
  513. // empty values are omitted from API requests. However, any non-pointer,
  514. // non-interface field appearing in ForceSendFields will be sent to the
  515. // server regardless of whether the field is empty or not. This may be
  516. // used to include empty fields in Patch requests.
  517. ForceSendFields []string `json:"-"`
  518. // NullFields is a list of field names (e.g. "ActionId") to include in
  519. // API requests with the JSON null value. By default, fields with empty
  520. // values are omitted from API requests. However, any field with an
  521. // empty value appearing in NullFields will be sent to the server as
  522. // null. It is an error if a field in this list has a non-empty value.
  523. // This may be used to include null fields in Patch requests.
  524. NullFields []string `json:"-"`
  525. }
  526. func (s *ContainerKilledEvent) MarshalJSON() ([]byte, error) {
  527. type NoMethod ContainerKilledEvent
  528. raw := NoMethod(*s)
  529. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  530. }
  531. // ContainerStartedEvent: An event generated when a container starts.
  532. type ContainerStartedEvent struct {
  533. // ActionId: The numeric ID of the action that started this container.
  534. ActionId int64 `json:"actionId,omitempty"`
  535. // IpAddress: The public IP address that can be used to connect to the
  536. // container. This
  537. // field is only populated when at least one port mapping is present. If
  538. // the
  539. // instance was created with a private address, this field will be empty
  540. // even
  541. // if port mappings exist.
  542. IpAddress string `json:"ipAddress,omitempty"`
  543. // PortMappings: The container-to-host port mappings installed for this
  544. // container. This
  545. // set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS`
  546. // flag
  547. // as well as any specified in the `Action` definition.
  548. PortMappings map[string]int64 `json:"portMappings,omitempty"`
  549. // ForceSendFields is a list of field names (e.g. "ActionId") to
  550. // unconditionally include in API requests. By default, fields with
  551. // empty values are omitted from API requests. However, any non-pointer,
  552. // non-interface field appearing in ForceSendFields will be sent to the
  553. // server regardless of whether the field is empty or not. This may be
  554. // used to include empty fields in Patch requests.
  555. ForceSendFields []string `json:"-"`
  556. // NullFields is a list of field names (e.g. "ActionId") to include in
  557. // API requests with the JSON null value. By default, fields with empty
  558. // values are omitted from API requests. However, any field with an
  559. // empty value appearing in NullFields will be sent to the server as
  560. // null. It is an error if a field in this list has a non-empty value.
  561. // This may be used to include null fields in Patch requests.
  562. NullFields []string `json:"-"`
  563. }
  564. func (s *ContainerStartedEvent) MarshalJSON() ([]byte, error) {
  565. type NoMethod ContainerStartedEvent
  566. raw := NoMethod(*s)
  567. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  568. }
  569. // ContainerStoppedEvent: An event generated when a container exits.
  570. type ContainerStoppedEvent struct {
  571. // ActionId: The numeric ID of the action that started this container.
  572. ActionId int64 `json:"actionId,omitempty"`
  573. // ExitStatus: The exit status of the container.
  574. ExitStatus int64 `json:"exitStatus,omitempty"`
  575. // Stderr: The tail end of any content written to standard error by the
  576. // container.
  577. // If the content emits large amounts of debugging noise or
  578. // contains
  579. // sensitive information, you can prevent the content from being printed
  580. // by
  581. // setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
  582. //
  583. // Note that only a small amount of the end of the stream is captured
  584. // here.
  585. // The entire stream is stored in the `/google/logs` directory mounted
  586. // into
  587. // each action, and can be copied off the machine as described
  588. // elsewhere.
  589. Stderr string `json:"stderr,omitempty"`
  590. // ForceSendFields is a list of field names (e.g. "ActionId") to
  591. // unconditionally include in API requests. By default, fields with
  592. // empty values are omitted from API requests. However, any non-pointer,
  593. // non-interface field appearing in ForceSendFields will be sent to the
  594. // server regardless of whether the field is empty or not. This may be
  595. // used to include empty fields in Patch requests.
  596. ForceSendFields []string `json:"-"`
  597. // NullFields is a list of field names (e.g. "ActionId") to include in
  598. // API requests with the JSON null value. By default, fields with empty
  599. // values are omitted from API requests. However, any field with an
  600. // empty value appearing in NullFields will be sent to the server as
  601. // null. It is an error if a field in this list has a non-empty value.
  602. // This may be used to include null fields in Patch requests.
  603. NullFields []string `json:"-"`
  604. }
  605. func (s *ContainerStoppedEvent) MarshalJSON() ([]byte, error) {
  606. type NoMethod ContainerStoppedEvent
  607. raw := NoMethod(*s)
  608. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  609. }
  610. // DelayedEvent: An event generated whenever a resource limitation or
  611. // transient error
  612. // delays execution of a pipeline that was otherwise ready to run.
  613. type DelayedEvent struct {
  614. // Cause: A textual description of the cause of the delay. The string
  615. // can change
  616. // without notice because it is often generated by another service (such
  617. // as
  618. // Compute Engine).
  619. Cause string `json:"cause,omitempty"`
  620. // Metrics: If the delay was caused by a resource shortage, this field
  621. // lists the
  622. // Compute Engine metrics that are preventing this operation from
  623. // running
  624. // (for example, `CPUS` or `INSTANCES`). If the particular metric is
  625. // not
  626. // known, a single `UNKNOWN` metric will be present.
  627. Metrics []string `json:"metrics,omitempty"`
  628. // ForceSendFields is a list of field names (e.g. "Cause") to
  629. // unconditionally include in API requests. By default, fields with
  630. // empty values are omitted from API requests. However, any non-pointer,
  631. // non-interface field appearing in ForceSendFields will be sent to the
  632. // server regardless of whether the field is empty or not. This may be
  633. // used to include empty fields in Patch requests.
  634. ForceSendFields []string `json:"-"`
  635. // NullFields is a list of field names (e.g. "Cause") to include in API
  636. // requests with the JSON null value. By default, fields with empty
  637. // values are omitted from API requests. However, any field with an
  638. // empty value appearing in NullFields will be sent to the server as
  639. // null. It is an error if a field in this list has a non-empty value.
  640. // This may be used to include null fields in Patch requests.
  641. NullFields []string `json:"-"`
  642. }
  643. func (s *DelayedEvent) MarshalJSON() ([]byte, error) {
  644. type NoMethod DelayedEvent
  645. raw := NoMethod(*s)
  646. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  647. }
  648. // Disk: Carries information about a disk that can be attached to a
  649. // VM.
  650. //
  651. // See https://cloud.google.com/compute/docs/disks/performance for
  652. // more
  653. // information about disk type, size, and performance considerations.
  654. type Disk struct {
  655. // Name: A user-supplied name for the disk. Used when mounting the disk
  656. // into
  657. // actions. The name must contain only upper and lowercase
  658. // alphanumeric
  659. // characters and hypens and cannot start with a hypen.
  660. Name string `json:"name,omitempty"`
  661. // SizeGb: The size, in GB, of the disk to attach. If the size is
  662. // not
  663. // specified, a default is chosen to ensure reasonable I/O
  664. // performance.
  665. //
  666. // If the disk type is specified as `local-ssd`, multiple local drives
  667. // are
  668. // automatically combined to provide the requested size. Note, however,
  669. // that
  670. // each physical SSD is 375GB in size, and no more than 8 drives can
  671. // be
  672. // attached to a single instance.
  673. SizeGb int64 `json:"sizeGb,omitempty"`
  674. // SourceImage: An optional image to put on the disk before attaching it
  675. // to the VM.
  676. SourceImage string `json:"sourceImage,omitempty"`
  677. // Type: The Compute Engine disk type. If unspecified, `pd-standard` is
  678. // used.
  679. Type string `json:"type,omitempty"`
  680. // ForceSendFields is a list of field names (e.g. "Name") to
  681. // unconditionally include in API requests. By default, fields with
  682. // empty values are omitted from API requests. However, any non-pointer,
  683. // non-interface field appearing in ForceSendFields will be sent to the
  684. // server regardless of whether the field is empty or not. This may be
  685. // used to include empty fields in Patch requests.
  686. ForceSendFields []string `json:"-"`
  687. // NullFields is a list of field names (e.g. "Name") to include in API
  688. // requests with the JSON null value. By default, fields with empty
  689. // values are omitted from API requests. However, any field with an
  690. // empty value appearing in NullFields will be sent to the server as
  691. // null. It is an error if a field in this list has a non-empty value.
  692. // This may be used to include null fields in Patch requests.
  693. NullFields []string `json:"-"`
  694. }
  695. func (s *Disk) MarshalJSON() ([]byte, error) {
  696. type NoMethod Disk
  697. raw := NoMethod(*s)
  698. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  699. }
  700. // DiskStatus: The status of a disk on a VM.
  701. type DiskStatus struct {
  702. // FreeSpaceBytes: Free disk space.
  703. FreeSpaceBytes uint64 `json:"freeSpaceBytes,omitempty,string"`
  704. // TotalSpaceBytes: Total disk space.
  705. TotalSpaceBytes uint64 `json:"totalSpaceBytes,omitempty,string"`
  706. // ForceSendFields is a list of field names (e.g. "FreeSpaceBytes") to
  707. // unconditionally include in API requests. By default, fields with
  708. // empty values are omitted from API requests. However, any non-pointer,
  709. // non-interface field appearing in ForceSendFields will be sent to the
  710. // server regardless of whether the field is empty or not. This may be
  711. // used to include empty fields in Patch requests.
  712. ForceSendFields []string `json:"-"`
  713. // NullFields is a list of field names (e.g. "FreeSpaceBytes") to
  714. // include in API requests with the JSON null value. By default, fields
  715. // with empty values are omitted from API requests. However, any field
  716. // with an empty value appearing in NullFields will be sent to the
  717. // server as null. It is an error if a field in this list has a
  718. // non-empty value. This may be used to include null fields in Patch
  719. // requests.
  720. NullFields []string `json:"-"`
  721. }
  722. func (s *DiskStatus) MarshalJSON() ([]byte, error) {
  723. type NoMethod DiskStatus
  724. raw := NoMethod(*s)
  725. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  726. }
  727. // Empty: A generic empty message that you can re-use to avoid defining
  728. // duplicated
  729. // empty messages in your APIs. A typical example is to use it as the
  730. // request
  731. // or the response type of an API method. For instance:
  732. //
  733. // service Foo {
  734. // rpc Bar(google.protobuf.Empty) returns
  735. // (google.protobuf.Empty);
  736. // }
  737. //
  738. // The JSON representation for `Empty` is empty JSON object `{}`.
  739. type Empty struct {
  740. // ServerResponse contains the HTTP response code and headers from the
  741. // server.
  742. googleapi.ServerResponse `json:"-"`
  743. }
  744. // Event: Carries information about events that occur during pipeline
  745. // execution.
  746. type Event struct {
  747. // Description: A human-readable description of the event. Note that
  748. // these strings can
  749. // change at any time without notice. Any application logic must use
  750. // the
  751. // information in the `details` field.
  752. Description string `json:"description,omitempty"`
  753. // Details: Machine-readable details about the event.
  754. Details googleapi.RawMessage `json:"details,omitempty"`
  755. // Timestamp: The time at which the event occurred.
  756. Timestamp string `json:"timestamp,omitempty"`
  757. // ForceSendFields is a list of field names (e.g. "Description") to
  758. // unconditionally include in API requests. By default, fields with
  759. // empty values are omitted from API requests. However, any non-pointer,
  760. // non-interface field appearing in ForceSendFields will be sent to the
  761. // server regardless of whether the field is empty or not. This may be
  762. // used to include empty fields in Patch requests.
  763. ForceSendFields []string `json:"-"`
  764. // NullFields is a list of field names (e.g. "Description") to include
  765. // in API requests with the JSON null value. By default, fields with
  766. // empty values are omitted from API requests. However, any field with
  767. // an empty value appearing in NullFields will be sent to the server as
  768. // null. It is an error if a field in this list has a non-empty value.
  769. // This may be used to include null fields in Patch requests.
  770. NullFields []string `json:"-"`
  771. }
  772. func (s *Event) MarshalJSON() ([]byte, error) {
  773. type NoMethod Event
  774. raw := NoMethod(*s)
  775. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  776. }
  777. // FailedEvent: An event generated when the execution of a pipeline has
  778. // failed. Note
  779. // that other events can continue to occur after this event.
  780. type FailedEvent struct {
  781. // Cause: The human-readable description of the cause of the failure.
  782. Cause string `json:"cause,omitempty"`
  783. // Code: The Google standard error code that best describes this
  784. // failure.
  785. //
  786. // Possible values:
  787. // "OK" - Not an error; returned on success
  788. //
  789. // HTTP Mapping: 200 OK
  790. // "CANCELLED" - The operation was cancelled, typically by the
  791. // caller.
  792. //
  793. // HTTP Mapping: 499 Client Closed Request
  794. // "UNKNOWN" - Unknown error. For example, this error may be returned
  795. // when
  796. // a `Status` value received from another address space belongs to
  797. // an error space that is not known in this address space. Also
  798. // errors raised by APIs that do not return enough error information
  799. // may be converted to this error.
  800. //
  801. // HTTP Mapping: 500 Internal Server Error
  802. // "INVALID_ARGUMENT" - The client specified an invalid argument.
  803. // Note that this differs
  804. // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates
  805. // arguments
  806. // that are problematic regardless of the state of the system
  807. // (e.g., a malformed file name).
  808. //
  809. // HTTP Mapping: 400 Bad Request
  810. // "DEADLINE_EXCEEDED" - The deadline expired before the operation
  811. // could complete. For operations
  812. // that change the state of the system, this error may be returned
  813. // even if the operation has completed successfully. For example,
  814. // a
  815. // successful response from a server could have been delayed long
  816. // enough for the deadline to expire.
  817. //
  818. // HTTP Mapping: 504 Gateway Timeout
  819. // "NOT_FOUND" - Some requested entity (e.g., file or directory) was
  820. // not found.
  821. //
  822. // Note to server developers: if a request is denied for an entire
  823. // class
  824. // of users, such as gradual feature rollout or undocumented
  825. // whitelist,
  826. // `NOT_FOUND` may be used. If a request is denied for some users
  827. // within
  828. // a class of users, such as user-based access control,
  829. // `PERMISSION_DENIED`
  830. // must be used.
  831. //
  832. // HTTP Mapping: 404 Not Found
  833. // "ALREADY_EXISTS" - The entity that a client attempted to create
  834. // (e.g., file or directory)
  835. // already exists.
  836. //
  837. // HTTP Mapping: 409 Conflict
  838. // "PERMISSION_DENIED" - The caller does not have permission to
  839. // execute the specified
  840. // operation. `PERMISSION_DENIED` must not be used for rejections
  841. // caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
  842. // instead for those errors). `PERMISSION_DENIED` must not be
  843. // used if the caller can not be identified (use
  844. // `UNAUTHENTICATED`
  845. // instead for those errors). This error code does not imply the
  846. // request is valid or the requested entity exists or satisfies
  847. // other pre-conditions.
  848. //
  849. // HTTP Mapping: 403 Forbidden
  850. // "UNAUTHENTICATED" - The request does not have valid authentication
  851. // credentials for the
  852. // operation.
  853. //
  854. // HTTP Mapping: 401 Unauthorized
  855. // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
  856. // per-user quota, or
  857. // perhaps the entire file system is out of space.
  858. //
  859. // HTTP Mapping: 429 Too Many Requests
  860. // "FAILED_PRECONDITION" - The operation was rejected because the
  861. // system is not in a state
  862. // required for the operation's execution. For example, the
  863. // directory
  864. // to be deleted is non-empty, an rmdir operation is applied to
  865. // a non-directory, etc.
  866. //
  867. // Service implementors can use the following guidelines to
  868. // decide
  869. // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
  870. // (a) Use `UNAVAILABLE` if the client can retry just the failing
  871. // call.
  872. // (b) Use `ABORTED` if the client should retry at a higher level
  873. // (e.g., when a client-specified test-and-set fails, indicating
  874. // the
  875. // client should restart a read-modify-write sequence).
  876. // (c) Use `FAILED_PRECONDITION` if the client should not retry until
  877. // the system state has been explicitly fixed. E.g., if an
  878. // "rmdir"
  879. // fails because the directory is non-empty, `FAILED_PRECONDITION`
  880. // should be returned since the client should not retry unless
  881. // the files are deleted from the directory.
  882. //
  883. // HTTP Mapping: 400 Bad Request
  884. // "ABORTED" - The operation was aborted, typically due to a
  885. // concurrency issue such as
  886. // a sequencer check failure or transaction abort.
  887. //
  888. // See the guidelines above for deciding between
  889. // `FAILED_PRECONDITION`,
  890. // `ABORTED`, and `UNAVAILABLE`.
  891. //
  892. // HTTP Mapping: 409 Conflict
  893. // "OUT_OF_RANGE" - The operation was attempted past the valid range.
  894. // E.g., seeking or
  895. // reading past end-of-file.
  896. //
  897. // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
  898. // be fixed if the system state changes. For example, a 32-bit
  899. // file
  900. // system will generate `INVALID_ARGUMENT` if asked to read at an
  901. // offset that is not in the range [0,2^32-1], but it will
  902. // generate
  903. // `OUT_OF_RANGE` if asked to read from an offset past the current
  904. // file size.
  905. //
  906. // There is a fair bit of overlap between `FAILED_PRECONDITION`
  907. // and
  908. // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more
  909. // specific
  910. // error) when it applies so that callers who are iterating through
  911. // a space can easily look for an `OUT_OF_RANGE` error to detect
  912. // when
  913. // they are done.
  914. //
  915. // HTTP Mapping: 400 Bad Request
  916. // "UNIMPLEMENTED" - The operation is not implemented or is not
  917. // supported/enabled in this
  918. // service.
  919. //
  920. // HTTP Mapping: 501 Not Implemented
  921. // "INTERNAL" - Internal errors. This means that some invariants
  922. // expected by the
  923. // underlying system have been broken. This error code is reserved
  924. // for serious errors.
  925. //
  926. // HTTP Mapping: 500 Internal Server Error
  927. // "UNAVAILABLE" - The service is currently unavailable. This is most
  928. // likely a
  929. // transient condition, which can be corrected by retrying with
  930. // a backoff.
  931. //
  932. // See the guidelines above for deciding between
  933. // `FAILED_PRECONDITION`,
  934. // `ABORTED`, and `UNAVAILABLE`.
  935. //
  936. // HTTP Mapping: 503 Service Unavailable
  937. // "DATA_LOSS" - Unrecoverable data loss or corruption.
  938. //
  939. // HTTP Mapping: 500 Internal Server Error
  940. Code string `json:"code,omitempty"`
  941. // ForceSendFields is a list of field names (e.g. "Cause") to
  942. // unconditionally include in API requests. By default, fields with
  943. // empty values are omitted from API requests. However, any non-pointer,
  944. // non-interface field appearing in ForceSendFields will be sent to the
  945. // server regardless of whether the field is empty or not. This may be
  946. // used to include empty fields in Patch requests.
  947. ForceSendFields []string `json:"-"`
  948. // NullFields is a list of field names (e.g. "Cause") to include in API
  949. // requests with the JSON null value. By default, fields with empty
  950. // values are omitted from API requests. However, any field with an
  951. // empty value appearing in NullFields will be sent to the server as
  952. // null. It is an error if a field in this list has a non-empty value.
  953. // This may be used to include null fields in Patch requests.
  954. NullFields []string `json:"-"`
  955. }
  956. func (s *FailedEvent) MarshalJSON() ([]byte, error) {
  957. type NoMethod FailedEvent
  958. raw := NoMethod(*s)
  959. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  960. }
  961. // ImportReadGroupSetsResponse: The read group set import response.
  962. type ImportReadGroupSetsResponse struct {
  963. // ReadGroupSetIds: IDs of the read group sets that were created.
  964. ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
  965. // ForceSendFields is a list of field names (e.g. "ReadGroupSetIds") to
  966. // unconditionally include in API requests. By default, fields with
  967. // empty values are omitted from API requests. However, any non-pointer,
  968. // non-interface field appearing in ForceSendFields will be sent to the
  969. // server regardless of whether the field is empty or not. This may be
  970. // used to include empty fields in Patch requests.
  971. ForceSendFields []string `json:"-"`
  972. // NullFields is a list of field names (e.g. "ReadGroupSetIds") to
  973. // include in API requests with the JSON null value. By default, fields
  974. // with empty values are omitted from API requests. However, any field
  975. // with an empty value appearing in NullFields will be sent to the
  976. // server as null. It is an error if a field in this list has a
  977. // non-empty value. This may be used to include null fields in Patch
  978. // requests.
  979. NullFields []string `json:"-"`
  980. }
  981. func (s *ImportReadGroupSetsResponse) MarshalJSON() ([]byte, error) {
  982. type NoMethod ImportReadGroupSetsResponse
  983. raw := NoMethod(*s)
  984. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  985. }
  986. // ImportVariantsResponse: The variant data import response.
  987. type ImportVariantsResponse struct {
  988. // CallSetIds: IDs of the call sets created during the import.
  989. CallSetIds []string `json:"callSetIds,omitempty"`
  990. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  991. // unconditionally include in API requests. By default, fields with
  992. // empty values are omitted from API requests. However, any non-pointer,
  993. // non-interface field appearing in ForceSendFields will be sent to the
  994. // server regardless of whether the field is empty or not. This may be
  995. // used to include empty fields in Patch requests.
  996. ForceSendFields []string `json:"-"`
  997. // NullFields is a list of field names (e.g. "CallSetIds") to include in
  998. // API requests with the JSON null value. By default, fields with empty
  999. // values are omitted from API requests. However, any field with an
  1000. // empty value appearing in NullFields will be sent to the server as
  1001. // null. It is an error if a field in this list has a non-empty value.
  1002. // This may be used to include null fields in Patch requests.
  1003. NullFields []string `json:"-"`
  1004. }
  1005. func (s *ImportVariantsResponse) MarshalJSON() ([]byte, error) {
  1006. type NoMethod ImportVariantsResponse
  1007. raw := NoMethod(*s)
  1008. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1009. }
  1010. // ListOperationsResponse: The response message for
  1011. // Operations.ListOperations.
  1012. type ListOperationsResponse struct {
  1013. // NextPageToken: The standard List next-page token.
  1014. NextPageToken string `json:"nextPageToken,omitempty"`
  1015. // Operations: A list of operations that matches the specified filter in
  1016. // the request.
  1017. Operations []*Operation `json:"operations,omitempty"`
  1018. // ServerResponse contains the HTTP response code and headers from the
  1019. // server.
  1020. googleapi.ServerResponse `json:"-"`
  1021. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1022. // unconditionally include in API requests. By default, fields with
  1023. // empty values are omitted from API requests. However, any non-pointer,
  1024. // non-interface field appearing in ForceSendFields will be sent to the
  1025. // server regardless of whether the field is empty or not. This may be
  1026. // used to include empty fields in Patch requests.
  1027. ForceSendFields []string `json:"-"`
  1028. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1029. // in API requests with the JSON null value. By default, fields with
  1030. // empty values are omitted from API requests. However, any field with
  1031. // an empty value appearing in NullFields will be sent to the server as
  1032. // null. It is an error if a field in this list has a non-empty value.
  1033. // This may be used to include null fields in Patch requests.
  1034. NullFields []string `json:"-"`
  1035. }
  1036. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1037. type NoMethod ListOperationsResponse
  1038. raw := NoMethod(*s)
  1039. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1040. }
  1041. // Metadata: Carries information about the pipeline execution that is
  1042. // returned
  1043. // in the long running operation's metadata field.
  1044. type Metadata struct {
  1045. // CreateTime: The time at which the operation was created by the API.
  1046. CreateTime string `json:"createTime,omitempty"`
  1047. // EndTime: The time at which execution was completed and resources were
  1048. // cleaned up.
  1049. EndTime string `json:"endTime,omitempty"`
  1050. // Events: The list of events that have happened so far during the
  1051. // execution of this
  1052. // operation.
  1053. Events []*Event `json:"events,omitempty"`
  1054. // Labels: The user-defined labels associated with this operation.
  1055. Labels map[string]string `json:"labels,omitempty"`
  1056. // Pipeline: The pipeline this operation represents.
  1057. Pipeline *Pipeline `json:"pipeline,omitempty"`
  1058. // StartTime: The first time at which resources were allocated to
  1059. // execute the pipeline.
  1060. StartTime string `json:"startTime,omitempty"`
  1061. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  1062. // unconditionally include in API requests. By default, fields with
  1063. // empty values are omitted from API requests. However, any non-pointer,
  1064. // non-interface field appearing in ForceSendFields will be sent to the
  1065. // server regardless of whether the field is empty or not. This may be
  1066. // used to include empty fields in Patch requests.
  1067. ForceSendFields []string `json:"-"`
  1068. // NullFields is a list of field names (e.g. "CreateTime") to include in
  1069. // API requests with the JSON null value. By default, fields with empty
  1070. // values are omitted from API requests. However, any field with an
  1071. // empty value appearing in NullFields will be sent to the server as
  1072. // null. It is an error if a field in this list has a non-empty value.
  1073. // This may be used to include null fields in Patch requests.
  1074. NullFields []string `json:"-"`
  1075. }
  1076. func (s *Metadata) MarshalJSON() ([]byte, error) {
  1077. type NoMethod Metadata
  1078. raw := NoMethod(*s)
  1079. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1080. }
  1081. // Mount: Carries information about a particular disk mount inside a
  1082. // container.
  1083. type Mount struct {
  1084. // Disk: The name of the disk to mount, as specified in the resources
  1085. // section.
  1086. Disk string `json:"disk,omitempty"`
  1087. // Path: The path to mount the disk inside the container.
  1088. Path string `json:"path,omitempty"`
  1089. // ReadOnly: If true, the disk is mounted read-only inside the
  1090. // container.
  1091. ReadOnly bool `json:"readOnly,omitempty"`
  1092. // ForceSendFields is a list of field names (e.g. "Disk") to
  1093. // unconditionally include in API requests. By default, fields with
  1094. // empty values are omitted from API requests. However, any non-pointer,
  1095. // non-interface field appearing in ForceSendFields will be sent to the
  1096. // server regardless of whether the field is empty or not. This may be
  1097. // used to include empty fields in Patch requests.
  1098. ForceSendFields []string `json:"-"`
  1099. // NullFields is a list of field names (e.g. "Disk") to include in API
  1100. // requests with the JSON null value. By default, fields with empty
  1101. // values are omitted from API requests. However, any field with an
  1102. // empty value appearing in NullFields will be sent to the server as
  1103. // null. It is an error if a field in this list has a non-empty value.
  1104. // This may be used to include null fields in Patch requests.
  1105. NullFields []string `json:"-"`
  1106. }
  1107. func (s *Mount) MarshalJSON() ([]byte, error) {
  1108. type NoMethod Mount
  1109. raw := NoMethod(*s)
  1110. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1111. }
  1112. // Network: VM networking options.
  1113. type Network struct {
  1114. // Name: The network name to attach the VM's network interface to. The
  1115. // value will
  1116. // be prefixed with `global/networks/` unless it contains a `/`, in
  1117. // which
  1118. // case it is assumed to be a fully specified network resource URL.
  1119. //
  1120. // If unspecified, the global default network is used.
  1121. Name string `json:"name,omitempty"`
  1122. // Subnetwork: If the specified network is configured for custom subnet
  1123. // creation, the
  1124. // name of the subnetwork to attach the instance to must be specified
  1125. // here.
  1126. //
  1127. // The value is prefixed with `regions/*/subnetworks/` unless it
  1128. // contains a
  1129. // `/`, in which case it is assumed to be a fully specified
  1130. // subnetwork
  1131. // resource URL.
  1132. //
  1133. // If the `*` character appears in the value, it is replaced with the
  1134. // region
  1135. // that the virtual machine has been allocated in.
  1136. Subnetwork string `json:"subnetwork,omitempty"`
  1137. // UsePrivateAddress: If set to true, do not attach a public IP address
  1138. // to the VM. Note that
  1139. // without a public IP address, additional configuration is required
  1140. // to
  1141. // allow the VM to access Google services.
  1142. //
  1143. // See
  1144. // https://cloud.google.com/vpc/docs/configure-private-google-access
  1145. // for more information.
  1146. UsePrivateAddress bool `json:"usePrivateAddress,omitempty"`
  1147. // ForceSendFields is a list of field names (e.g. "Name") to
  1148. // unconditionally include in API requests. By default, fields with
  1149. // empty values are omitted from API requests. However, any non-pointer,
  1150. // non-interface field appearing in ForceSendFields will be sent to the
  1151. // server regardless of whether the field is empty or not. This may be
  1152. // used to include empty fields in Patch requests.
  1153. ForceSendFields []string `json:"-"`
  1154. // NullFields is a list of field names (e.g. "Name") to include in API
  1155. // requests with the JSON null value. By default, fields with empty
  1156. // values are omitted from API requests. However, any field with an
  1157. // empty value appearing in NullFields will be sent to the server as
  1158. // null. It is an error if a field in this list has a non-empty value.
  1159. // This may be used to include null fields in Patch requests.
  1160. NullFields []string `json:"-"`
  1161. }
  1162. func (s *Network) MarshalJSON() ([]byte, error) {
  1163. type NoMethod Network
  1164. raw := NoMethod(*s)
  1165. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1166. }
  1167. // Operation: This resource represents a long-running operation that is
  1168. // the result of a
  1169. // network API call.
  1170. type Operation struct {
  1171. // Done: If the value is `false`, it means the operation is still in
  1172. // progress.
  1173. // If `true`, the operation is completed, and either `error` or
  1174. // `response` is
  1175. // available.
  1176. Done bool `json:"done,omitempty"`
  1177. // Error: The error result of the operation in case of failure or
  1178. // cancellation.
  1179. Error *Status `json:"error,omitempty"`
  1180. // Metadata: An OperationMetadata or Metadata object. This will always
  1181. // be returned with the Operation.
  1182. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1183. // Name: The server-assigned name, which is only unique within the same
  1184. // service that originally returns it. For example&#58;
  1185. // `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`
  1186. Name string `json:"name,omitempty"`
  1187. // Response: If importing ReadGroupSets, an ImportReadGroupSetsResponse
  1188. // is returned. If importing Variants, an ImportVariantsResponse is
  1189. // returned. For pipelines and exports, an Empty response is returned.
  1190. Response googleapi.RawMessage `json:"response,omitempty"`
  1191. // ServerResponse contains the HTTP response code and headers from the
  1192. // server.
  1193. googleapi.ServerResponse `json:"-"`
  1194. // ForceSendFields is a list of field names (e.g. "Done") to
  1195. // unconditionally include in API requests. By default, fields with
  1196. // empty values are omitted from API requests. However, any non-pointer,
  1197. // non-interface field appearing in ForceSendFields will be sent to the
  1198. // server regardless of whether the field is empty or not. This may be
  1199. // used to include empty fields in Patch requests.
  1200. ForceSendFields []string `json:"-"`
  1201. // NullFields is a list of field names (e.g. "Done") to include in API
  1202. // requests with the JSON null value. By default, fields with empty
  1203. // values are omitted from API requests. However, any field with an
  1204. // empty value appearing in NullFields will be sent to the server as
  1205. // null. It is an error if a field in this list has a non-empty value.
  1206. // This may be used to include null fields in Patch requests.
  1207. NullFields []string `json:"-"`
  1208. }
  1209. func (s *Operation) MarshalJSON() ([]byte, error) {
  1210. type NoMethod Operation
  1211. raw := NoMethod(*s)
  1212. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1213. }
  1214. // OperationEvent: An event that occurred during an Operation.
  1215. type OperationEvent struct {
  1216. // Description: Required description of event.
  1217. Description string `json:"description,omitempty"`
  1218. // EndTime: Optional time of when event finished. An event can have a
  1219. // start time and no
  1220. // finish time. If an event has a finish time, there must be a start
  1221. // time.
  1222. EndTime string `json:"endTime,omitempty"`
  1223. // StartTime: Optional time of when event started.
  1224. StartTime string `json:"startTime,omitempty"`
  1225. // ForceSendFields is a list of field names (e.g. "Description") to
  1226. // unconditionally include in API requests. By default, fields with
  1227. // empty values are omitted from API requests. However, any non-pointer,
  1228. // non-interface field appearing in ForceSendFields will be sent to the
  1229. // server regardless of whether the field is empty or not. This may be
  1230. // used to include empty fields in Patch requests.
  1231. ForceSendFields []string `json:"-"`
  1232. // NullFields is a list of field names (e.g. "Description") to include
  1233. // in API requests with the JSON null value. By default, fields with
  1234. // empty values are omitted from API requests. However, any field with
  1235. // an empty value appearing in NullFields will be sent to the server as
  1236. // null. It is an error if a field in this list has a non-empty value.
  1237. // This may be used to include null fields in Patch requests.
  1238. NullFields []string `json:"-"`
  1239. }
  1240. func (s *OperationEvent) MarshalJSON() ([]byte, error) {
  1241. type NoMethod OperationEvent
  1242. raw := NoMethod(*s)
  1243. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1244. }
  1245. // OperationMetadata: Metadata describing an Operation.
  1246. type OperationMetadata struct {
  1247. // ClientId: This field is deprecated. Use `labels` instead. Optionally
  1248. // provided by the
  1249. // caller when submitting the request that creates the operation.
  1250. ClientId string `json:"clientId,omitempty"`
  1251. // CreateTime: The time at which the job was submitted to the Genomics
  1252. // service.
  1253. CreateTime string `json:"createTime,omitempty"`
  1254. // EndTime: The time at which the job stopped running.
  1255. EndTime string `json:"endTime,omitempty"`
  1256. // Events: Optional event messages that were generated during the job's
  1257. // execution.
  1258. // This also contains any warnings that were generated during import
  1259. // or export.
  1260. Events []*OperationEvent `json:"events,omitempty"`
  1261. // Labels: Optionally provided by the caller when submitting the request
  1262. // that creates
  1263. // the operation.
  1264. Labels map[string]string `json:"labels,omitempty"`
  1265. // ProjectId: The Google Cloud Project in which the job is scoped.
  1266. ProjectId string `json:"projectId,omitempty"`
  1267. // Request: The original request that started the operation. Note that
  1268. // this will be in
  1269. // current version of the API. If the operation was started with v1beta2
  1270. // API
  1271. // and a GetOperation is performed on v1 API, a v1 request will be
  1272. // returned.
  1273. Request googleapi.RawMessage `json:"request,omitempty"`
  1274. // RuntimeMetadata: Runtime metadata on this Operation.
  1275. RuntimeMetadata googleapi.RawMessage `json:"runtimeMetadata,omitempty"`
  1276. // StartTime: The time at which the job began to run.
  1277. StartTime string `json:"startTime,omitempty"`
  1278. // ForceSendFields is a list of field names (e.g. "ClientId") to
  1279. // unconditionally include in API requests. By default, fields with
  1280. // empty values are omitted from API requests. However, any non-pointer,
  1281. // non-interface field appearing in ForceSendFields will be sent to the
  1282. // server regardless of whether the field is empty or not. This may be
  1283. // used to include empty fields in Patch requests.
  1284. ForceSendFields []string `json:"-"`
  1285. // NullFields is a list of field names (e.g. "ClientId") to include in
  1286. // API requests with the JSON null value. By default, fields with empty
  1287. // values are omitted from API requests. However, any field with an
  1288. // empty value appearing in NullFields will be sent to the server as
  1289. // null. It is an error if a field in this list has a non-empty value.
  1290. // This may be used to include null fields in Patch requests.
  1291. NullFields []string `json:"-"`
  1292. }
  1293. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1294. type NoMethod OperationMetadata
  1295. raw := NoMethod(*s)
  1296. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1297. }
  1298. // Pipeline: Specifies a series of actions to execute, expressed as
  1299. // Docker containers.
  1300. type Pipeline struct {
  1301. // Actions: The list of actions to execute, in the order they are
  1302. // specified.
  1303. Actions []*Action `json:"actions,omitempty"`
  1304. // Environment: The environment to pass into every action. Each action
  1305. // can also specify
  1306. // additional environment variables but cannot delete an entry from this
  1307. // map
  1308. // (though they can overwrite it with a different value).
  1309. Environment map[string]string `json:"environment,omitempty"`
  1310. // Resources: The resources required for execution.
  1311. Resources *Resources `json:"resources,omitempty"`
  1312. // Timeout: The maximum amount of time to give the pipeline to complete.
  1313. // This includes
  1314. // the time spent waiting for a worker to be allocated. If the pipeline
  1315. // fails
  1316. // to complete before the timeout, it will be cancelled and the error
  1317. // code
  1318. // will be set to DEADLINE_EXCEEDED.
  1319. //
  1320. // If unspecified, it will default to 7 days.
  1321. Timeout string `json:"timeout,omitempty"`
  1322. // ForceSendFields is a list of field names (e.g. "Actions") to
  1323. // unconditionally include in API requests. By default, fields with
  1324. // empty values are omitted from API requests. However, any non-pointer,
  1325. // non-interface field appearing in ForceSendFields will be sent to the
  1326. // server regardless of whether the field is empty or not. This may be
  1327. // used to include empty fields in Patch requests.
  1328. ForceSendFields []string `json:"-"`
  1329. // NullFields is a list of field names (e.g. "Actions") to include in
  1330. // API requests with the JSON null value. By default, fields with empty
  1331. // values are omitted from API requests. However, any field with an
  1332. // empty value appearing in NullFields will be sent to the server as
  1333. // null. It is an error if a field in this list has a non-empty value.
  1334. // This may be used to include null fields in Patch requests.
  1335. NullFields []string `json:"-"`
  1336. }
  1337. func (s *Pipeline) MarshalJSON() ([]byte, error) {
  1338. type NoMethod Pipeline
  1339. raw := NoMethod(*s)
  1340. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1341. }
  1342. // PullStartedEvent: An event generated when the worker starts pulling
  1343. // an image.
  1344. type PullStartedEvent struct {
  1345. // ImageUri: The URI of the image that was pulled.
  1346. ImageUri string `json:"imageUri,omitempty"`
  1347. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  1348. // unconditionally include in API requests. By default, fields with
  1349. // empty values are omitted from API requests. However, any non-pointer,
  1350. // non-interface field appearing in ForceSendFields will be sent to the
  1351. // server regardless of whether the field is empty or not. This may be
  1352. // used to include empty fields in Patch requests.
  1353. ForceSendFields []string `json:"-"`
  1354. // NullFields is a list of field names (e.g. "ImageUri") to include in
  1355. // API requests with the JSON null value. By default, fields with empty
  1356. // values are omitted from API requests. However, any field with an
  1357. // empty value appearing in NullFields will be sent to the server as
  1358. // null. It is an error if a field in this list has a non-empty value.
  1359. // This may be used to include null fields in Patch requests.
  1360. NullFields []string `json:"-"`
  1361. }
  1362. func (s *PullStartedEvent) MarshalJSON() ([]byte, error) {
  1363. type NoMethod PullStartedEvent
  1364. raw := NoMethod(*s)
  1365. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1366. }
  1367. // PullStoppedEvent: An event generated when the worker stops pulling an
  1368. // image.
  1369. type PullStoppedEvent struct {
  1370. // ImageUri: The URI of the image that was pulled.
  1371. ImageUri string `json:"imageUri,omitempty"`
  1372. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  1373. // unconditionally include in API requests. By default, fields with
  1374. // empty values are omitted from API requests. However, any non-pointer,
  1375. // non-interface field appearing in ForceSendFields will be sent to the
  1376. // server regardless of whether the field is empty or not. This may be
  1377. // used to include empty fields in Patch requests.
  1378. ForceSendFields []string `json:"-"`
  1379. // NullFields is a list of field names (e.g. "ImageUri") to include in
  1380. // API requests with the JSON null value. By default, fields with empty
  1381. // values are omitted from API requests. However, any field with an
  1382. // empty value appearing in NullFields will be sent to the server as
  1383. // null. It is an error if a field in this list has a non-empty value.
  1384. // This may be used to include null fields in Patch requests.
  1385. NullFields []string `json:"-"`
  1386. }
  1387. func (s *PullStoppedEvent) MarshalJSON() ([]byte, error) {
  1388. type NoMethod PullStoppedEvent
  1389. raw := NoMethod(*s)
  1390. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1391. }
  1392. // Resources: The system resources for the pipeline run.
  1393. //
  1394. // At least one zone or region must be specified or the pipeline run
  1395. // will fail.
  1396. type Resources struct {
  1397. // ProjectId: The project ID to allocate resources in.
  1398. ProjectId string `json:"projectId,omitempty"`
  1399. // Regions: The list of regions allowed for VM allocation. If set, the
  1400. // `zones` field
  1401. // must not be set.
  1402. Regions []string `json:"regions,omitempty"`
  1403. // VirtualMachine: The virtual machine specification.
  1404. VirtualMachine *VirtualMachine `json:"virtualMachine,omitempty"`
  1405. // Zones: The list of zones allowed for VM allocation. If set, the
  1406. // `regions` field
  1407. // must not be set.
  1408. Zones []string `json:"zones,omitempty"`
  1409. // ForceSendFields is a list of field names (e.g. "ProjectId") to
  1410. // unconditionally include in API requests. By default, fields with
  1411. // empty values are omitted from API requests. However, any non-pointer,
  1412. // non-interface field appearing in ForceSendFields will be sent to the
  1413. // server regardless of whether the field is empty or not. This may be
  1414. // used to include empty fields in Patch requests.
  1415. ForceSendFields []string `json:"-"`
  1416. // NullFields is a list of field names (e.g. "ProjectId") to include in
  1417. // API requests with the JSON null value. By default, fields with empty
  1418. // values are omitted from API requests. However, any field with an
  1419. // empty value appearing in NullFields will be sent to the server as
  1420. // null. It is an error if a field in this list has a non-empty value.
  1421. // This may be used to include null fields in Patch requests.
  1422. NullFields []string `json:"-"`
  1423. }
  1424. func (s *Resources) MarshalJSON() ([]byte, error) {
  1425. type NoMethod Resources
  1426. raw := NoMethod(*s)
  1427. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1428. }
  1429. // RunPipelineRequest: The arguments to the `RunPipeline` method. The
  1430. // requesting user must have
  1431. // the `iam.serviceAccounts.actAs` permission for the Cloud Genomics
  1432. // service
  1433. // account or the request will fail.
  1434. type RunPipelineRequest struct {
  1435. // Labels: User-defined labels to associate with the returned operation.
  1436. // These
  1437. // labels are not propagated to any Google Cloud Platform resources used
  1438. // by
  1439. // the operation, and can be modified at any time.
  1440. //
  1441. // To associate labels with resources created while executing the
  1442. // operation,
  1443. // see the appropriate resource message (for example, `VirtualMachine`).
  1444. Labels map[string]string `json:"labels,omitempty"`
  1445. // Pipeline: The description of the pipeline to run.
  1446. Pipeline *Pipeline `json:"pipeline,omitempty"`
  1447. // ForceSendFields is a list of field names (e.g. "Labels") to
  1448. // unconditionally include in API requests. By default, fields with
  1449. // empty values are omitted from API requests. However, any non-pointer,
  1450. // non-interface field appearing in ForceSendFields will be sent to the
  1451. // server regardless of whether the field is empty or not. This may be
  1452. // used to include empty fields in Patch requests.
  1453. ForceSendFields []string `json:"-"`
  1454. // NullFields is a list of field names (e.g. "Labels") to include in API
  1455. // requests with the JSON null value. By default, fields with empty
  1456. // values are omitted from API requests. However, any field with an
  1457. // empty value appearing in NullFields will be sent to the server as
  1458. // null. It is an error if a field in this list has a non-empty value.
  1459. // This may be used to include null fields in Patch requests.
  1460. NullFields []string `json:"-"`
  1461. }
  1462. func (s *RunPipelineRequest) MarshalJSON() ([]byte, error) {
  1463. type NoMethod RunPipelineRequest
  1464. raw := NoMethod(*s)
  1465. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1466. }
  1467. // RunPipelineResponse: The response to the RunPipeline method, returned
  1468. // in the operation's result
  1469. // field on success.
  1470. type RunPipelineResponse struct {
  1471. }
  1472. // RuntimeMetadata: Runtime metadata that will be populated in
  1473. // the
  1474. // runtimeMetadata
  1475. // field of the Operation associated with a RunPipeline execution.
  1476. type RuntimeMetadata struct {
  1477. // ComputeEngine: Execution information specific to Google Compute
  1478. // Engine.
  1479. ComputeEngine *ComputeEngine `json:"computeEngine,omitempty"`
  1480. // ForceSendFields is a list of field names (e.g. "ComputeEngine") to
  1481. // unconditionally include in API requests. By default, fields with
  1482. // empty values are omitted from API requests. However, any non-pointer,
  1483. // non-interface field appearing in ForceSendFields will be sent to the
  1484. // server regardless of whether the field is empty or not. This may be
  1485. // used to include empty fields in Patch requests.
  1486. ForceSendFields []string `json:"-"`
  1487. // NullFields is a list of field names (e.g. "ComputeEngine") to include
  1488. // in API requests with the JSON null value. By default, fields with
  1489. // empty values are omitted from API requests. However, any field with
  1490. // an empty value appearing in NullFields will be sent to the server as
  1491. // null. It is an error if a field in this list has a non-empty value.
  1492. // This may be used to include null fields in Patch requests.
  1493. NullFields []string `json:"-"`
  1494. }
  1495. func (s *RuntimeMetadata) MarshalJSON() ([]byte, error) {
  1496. type NoMethod RuntimeMetadata
  1497. raw := NoMethod(*s)
  1498. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1499. }
  1500. // Secret: Holds encrypted information that is only decrypted and stored
  1501. // in RAM
  1502. // by the worker VM when running the pipeline.
  1503. type Secret struct {
  1504. // CipherText: The value of the cipherText response from the `encrypt`
  1505. // method. This field
  1506. // is intentionally unaudited.
  1507. CipherText string `json:"cipherText,omitempty"`
  1508. // KeyName: The name of the Cloud KMS key that will be used to decrypt
  1509. // the secret
  1510. // value. The VM service account must have the required permissions
  1511. // and
  1512. // authentication scopes to invoke the `decrypt` method on the specified
  1513. // key.
  1514. KeyName string `json:"keyName,omitempty"`
  1515. // ForceSendFields is a list of field names (e.g. "CipherText") to
  1516. // unconditionally include in API requests. By default, fields with
  1517. // empty values are omitted from API requests. However, any non-pointer,
  1518. // non-interface field appearing in ForceSendFields will be sent to the
  1519. // server regardless of whether the field is empty or not. This may be
  1520. // used to include empty fields in Patch requests.
  1521. ForceSendFields []string `json:"-"`
  1522. // NullFields is a list of field names (e.g. "CipherText") to include in
  1523. // API requests with the JSON null value. By default, fields with empty
  1524. // values are omitted from API requests. However, any field with an
  1525. // empty value appearing in NullFields will be sent to the server as
  1526. // null. It is an error if a field in this list has a non-empty value.
  1527. // This may be used to include null fields in Patch requests.
  1528. NullFields []string `json:"-"`
  1529. }
  1530. func (s *Secret) MarshalJSON() ([]byte, error) {
  1531. type NoMethod Secret
  1532. raw := NoMethod(*s)
  1533. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1534. }
  1535. // ServiceAccount: Carries information about a Google Cloud service
  1536. // account.
  1537. type ServiceAccount struct {
  1538. // Email: Email address of the service account. If not specified, the
  1539. // default
  1540. // Compute Engine service account for the project will be used.
  1541. Email string `json:"email,omitempty"`
  1542. // Scopes: List of scopes to be enabled for this service account on the
  1543. // VM, in
  1544. // addition to the Cloud Genomics API scope.
  1545. Scopes []string `json:"scopes,omitempty"`
  1546. // ForceSendFields is a list of field names (e.g. "Email") to
  1547. // unconditionally include in API requests. By default, fields with
  1548. // empty values are omitted from API requests. However, any non-pointer,
  1549. // non-interface field appearing in ForceSendFields will be sent to the
  1550. // server regardless of whether the field is empty or not. This may be
  1551. // used to include empty fields in Patch requests.
  1552. ForceSendFields []string `json:"-"`
  1553. // NullFields is a list of field names (e.g. "Email") to include in API
  1554. // requests with the JSON null value. By default, fields with empty
  1555. // values are omitted from API requests. However, any field with an
  1556. // empty value appearing in NullFields will be sent to the server as
  1557. // null. It is an error if a field in this list has a non-empty value.
  1558. // This may be used to include null fields in Patch requests.
  1559. NullFields []string `json:"-"`
  1560. }
  1561. func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  1562. type NoMethod ServiceAccount
  1563. raw := NoMethod(*s)
  1564. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1565. }
  1566. // Status: The `Status` type defines a logical error model that is
  1567. // suitable for
  1568. // different programming environments, including REST APIs and RPC APIs.
  1569. // It is
  1570. // used by [gRPC](https://github.com/grpc). The error model is designed
  1571. // to be:
  1572. //
  1573. // - Simple to use and understand for most users
  1574. // - Flexible enough to meet unexpected needs
  1575. //
  1576. // # Overview
  1577. //
  1578. // The `Status` message contains three pieces of data: error code,
  1579. // error
  1580. // message, and error details. The error code should be an enum value
  1581. // of
  1582. // google.rpc.Code, but it may accept additional error codes if needed.
  1583. // The
  1584. // error message should be a developer-facing English message that
  1585. // helps
  1586. // developers *understand* and *resolve* the error. If a localized
  1587. // user-facing
  1588. // error message is needed, put the localized message in the error
  1589. // details or
  1590. // localize it in the client. The optional error details may contain
  1591. // arbitrary
  1592. // information about the error. There is a predefined set of error
  1593. // detail types
  1594. // in the package `google.rpc` that can be used for common error
  1595. // conditions.
  1596. //
  1597. // # Language mapping
  1598. //
  1599. // The `Status` message is the logical representation of the error
  1600. // model, but it
  1601. // is not necessarily the actual wire format. When the `Status` message
  1602. // is
  1603. // exposed in different client libraries and different wire protocols,
  1604. // it can be
  1605. // mapped differently. For example, it will likely be mapped to some
  1606. // exceptions
  1607. // in Java, but more likely mapped to some error codes in C.
  1608. //
  1609. // # Other uses
  1610. //
  1611. // The error model and the `Status` message can be used in a variety
  1612. // of
  1613. // environments, either with or without APIs, to provide a
  1614. // consistent developer experience across different
  1615. // environments.
  1616. //
  1617. // Example uses of this error model include:
  1618. //
  1619. // - Partial errors. If a service needs to return partial errors to the
  1620. // client,
  1621. // it may embed the `Status` in the normal response to indicate the
  1622. // partial
  1623. // errors.
  1624. //
  1625. // - Workflow errors. A typical workflow has multiple steps. Each step
  1626. // may
  1627. // have a `Status` message for error reporting.
  1628. //
  1629. // - Batch operations. If a client uses batch request and batch
  1630. // response, the
  1631. // `Status` message should be used directly inside batch response,
  1632. // one for
  1633. // each error sub-response.
  1634. //
  1635. // - Asynchronous operations. If an API call embeds asynchronous
  1636. // operation
  1637. // results in its response, the status of those operations should
  1638. // be
  1639. // represented directly using the `Status` message.
  1640. //
  1641. // - Logging. If some API errors are stored in logs, the message
  1642. // `Status` could
  1643. // be used directly after any stripping needed for security/privacy
  1644. // reasons.
  1645. type Status struct {
  1646. // Code: The status code, which should be an enum value of
  1647. // google.rpc.Code.
  1648. Code int64 `json:"code,omitempty"`
  1649. // Details: A list of messages that carry the error details. There is a
  1650. // common set of
  1651. // message types for APIs to use.
  1652. Details []googleapi.RawMessage `json:"details,omitempty"`
  1653. // Message: A developer-facing error message, which should be in
  1654. // English. Any
  1655. // user-facing error message should be localized and sent in
  1656. // the
  1657. // google.rpc.Status.details field, or localized by the client.
  1658. Message string `json:"message,omitempty"`
  1659. // ForceSendFields is a list of field names (e.g. "Code") to
  1660. // unconditionally include in API requests. By default, fields with
  1661. // empty values are omitted from API requests. However, any non-pointer,
  1662. // non-interface field appearing in ForceSendFields will be sent to the
  1663. // server regardless of whether the field is empty or not. This may be
  1664. // used to include empty fields in Patch requests.
  1665. ForceSendFields []string `json:"-"`
  1666. // NullFields is a list of field names (e.g. "Code") to include in API
  1667. // requests with the JSON null value. By default, fields with empty
  1668. // values are omitted from API requests. However, any field with an
  1669. // empty value appearing in NullFields will be sent to the server as
  1670. // null. It is an error if a field in this list has a non-empty value.
  1671. // This may be used to include null fields in Patch requests.
  1672. NullFields []string `json:"-"`
  1673. }
  1674. func (s *Status) MarshalJSON() ([]byte, error) {
  1675. type NoMethod Status
  1676. raw := NoMethod(*s)
  1677. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1678. }
  1679. // UnexpectedExitStatusEvent: An event generated when the execution of a
  1680. // container results in a
  1681. // non-zero exit status that was not otherwise ignored. Execution
  1682. // will
  1683. // continue, but only actions that are flagged as `ALWAYS_RUN` will
  1684. // be
  1685. // executed. Other actions will be skipped.
  1686. type UnexpectedExitStatusEvent struct {
  1687. // ActionId: The numeric ID of the action that started the container.
  1688. ActionId int64 `json:"actionId,omitempty"`
  1689. // ExitStatus: The exit status of the container.
  1690. ExitStatus int64 `json:"exitStatus,omitempty"`
  1691. // ForceSendFields is a list of field names (e.g. "ActionId") to
  1692. // unconditionally include in API requests. By default, fields with
  1693. // empty values are omitted from API requests. However, any non-pointer,
  1694. // non-interface field appearing in ForceSendFields will be sent to the
  1695. // server regardless of whether the field is empty or not. This may be
  1696. // used to include empty fields in Patch requests.
  1697. ForceSendFields []string `json:"-"`
  1698. // NullFields is a list of field names (e.g. "ActionId") to include in
  1699. // API requests with the JSON null value. By default, fields with empty
  1700. // values are omitted from API requests. However, any field with an
  1701. // empty value appearing in NullFields will be sent to the server as
  1702. // null. It is an error if a field in this list has a non-empty value.
  1703. // This may be used to include null fields in Patch requests.
  1704. NullFields []string `json:"-"`
  1705. }
  1706. func (s *UnexpectedExitStatusEvent) MarshalJSON() ([]byte, error) {
  1707. type NoMethod UnexpectedExitStatusEvent
  1708. raw := NoMethod(*s)
  1709. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1710. }
  1711. // VirtualMachine: Carries information about a Compute Engine VM
  1712. // resource.
  1713. type VirtualMachine struct {
  1714. // Accelerators: The list of accelerators to attach to the VM.
  1715. Accelerators []*Accelerator `json:"accelerators,omitempty"`
  1716. // BootDiskSizeGb: The size of the boot disk, in GB. The boot disk must
  1717. // be large
  1718. // enough to accommodate all of the Docker images from each action in
  1719. // the
  1720. // pipeline at the same time. If not specified, a small but
  1721. // reasonable
  1722. // default value is used.
  1723. BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
  1724. // BootImage: The host operating system image to use.
  1725. //
  1726. // Currently, only Container-Optimized OS images can be used.
  1727. //
  1728. // The default value is
  1729. // `projects/cos-cloud/global/images/family/cos-stable`,
  1730. // which selects the latest stable release of Container-Optimized
  1731. // OS.
  1732. //
  1733. // This option is provided to allow testing against the beta release of
  1734. // the
  1735. // operating system to ensure that the new version does not
  1736. // interact
  1737. // negatively with production pipelines.
  1738. //
  1739. // To test a pipeline against the beta release of Container-Optimized
  1740. // OS,
  1741. // use the value `projects/cos-cloud/global/images/family/cos-beta`.
  1742. BootImage string `json:"bootImage,omitempty"`
  1743. // CpuPlatform: The CPU platform to request. An instance based on a
  1744. // newer platform can be
  1745. // allocated, but never one with fewer capabilities. The value of
  1746. // this
  1747. // parameter must be a valid Compute Engine CPU platform name (such as
  1748. // "Intel
  1749. // Skylake"). This parameter is only useful for carefully optimized
  1750. // work
  1751. // loads where the CPU platform has a significant impact.
  1752. //
  1753. // For more information about the effect of this parameter,
  1754. // see
  1755. // https://cloud.google.com/compute/docs/instances/specify-min-cpu-pl
  1756. // atform.
  1757. CpuPlatform string `json:"cpuPlatform,omitempty"`
  1758. // Disks: The list of disks to create and attach to the VM.
  1759. Disks []*Disk `json:"disks,omitempty"`
  1760. // Labels: Optional set of labels to apply to the VM and any attached
  1761. // disk resources.
  1762. // These labels must adhere to the name and value restrictions on VM
  1763. // labels
  1764. // imposed by Compute Engine.
  1765. //
  1766. // Labels applied at creation time to the VM. Applied on a best-effort
  1767. // basis
  1768. // to attached disk resources shortly after VM creation.
  1769. Labels map[string]string `json:"labels,omitempty"`
  1770. // MachineType: The machine type of the virtual machine to create. Must
  1771. // be the short name
  1772. // of a standard machine type (such as "n1-standard-1") or a custom
  1773. // machine
  1774. // type (such as "custom-1-4096", where "1" indicates the number of
  1775. // vCPUs and
  1776. // "4096" indicates the memory in MB). See
  1777. // [Creating an instance with a custom
  1778. // machine
  1779. // type](https://cloud.google.com/compute/docs/instances/creating
  1780. // -instance-with-custom-machine-type#create)
  1781. // for more specifications on creating a custom machine type.
  1782. MachineType string `json:"machineType,omitempty"`
  1783. // Network: The VM network configuration.
  1784. Network *Network `json:"network,omitempty"`
  1785. // NvidiaDriverVersion: The NVIDIA driver version to use when attaching
  1786. // an NVIDIA GPU accelerator.
  1787. // The version specified here must be compatible with the GPU
  1788. // libraries
  1789. // contained in the container being executed, and must be one of the
  1790. // drivers
  1791. // hosted in the `nvidia-drivers-us-public` bucket on Google Cloud
  1792. // Storage.
  1793. NvidiaDriverVersion string `json:"nvidiaDriverVersion,omitempty"`
  1794. // Preemptible: If true, allocate a preemptible VM.
  1795. Preemptible bool `json:"preemptible,omitempty"`
  1796. // ServiceAccount: The service account to install on the VM. This
  1797. // account does not need
  1798. // any permissions other than those required by the pipeline.
  1799. ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
  1800. // ForceSendFields is a list of field names (e.g. "Accelerators") to
  1801. // unconditionally include in API requests. By default, fields with
  1802. // empty values are omitted from API requests. However, any non-pointer,
  1803. // non-interface field appearing in ForceSendFields will be sent to the
  1804. // server regardless of whether the field is empty or not. This may be
  1805. // used to include empty fields in Patch requests.
  1806. ForceSendFields []string `json:"-"`
  1807. // NullFields is a list of field names (e.g. "Accelerators") to include
  1808. // in API requests with the JSON null value. By default, fields with
  1809. // empty values are omitted from API requests. However, any field with
  1810. // an empty value appearing in NullFields will be sent to the server as
  1811. // null. It is an error if a field in this list has a non-empty value.
  1812. // This may be used to include null fields in Patch requests.
  1813. NullFields []string `json:"-"`
  1814. }
  1815. func (s *VirtualMachine) MarshalJSON() ([]byte, error) {
  1816. type NoMethod VirtualMachine
  1817. raw := NoMethod(*s)
  1818. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1819. }
  1820. // WorkerAssignedEvent: An event generated after a worker VM has been
  1821. // assigned to run the
  1822. // pipeline.
  1823. type WorkerAssignedEvent struct {
  1824. // Instance: The worker's instance name.
  1825. Instance string `json:"instance,omitempty"`
  1826. // Zone: The zone the worker is running in.
  1827. Zone string `json:"zone,omitempty"`
  1828. // ForceSendFields is a list of field names (e.g. "Instance") to
  1829. // unconditionally include in API requests. By default, fields with
  1830. // empty values are omitted from API requests. However, any non-pointer,
  1831. // non-interface field appearing in ForceSendFields will be sent to the
  1832. // server regardless of whether the field is empty or not. This may be
  1833. // used to include empty fields in Patch requests.
  1834. ForceSendFields []string `json:"-"`
  1835. // NullFields is a list of field names (e.g. "Instance") to include in
  1836. // API requests with the JSON null value. By default, fields with empty
  1837. // values are omitted from API requests. However, any field with an
  1838. // empty value appearing in NullFields will be sent to the server as
  1839. // null. It is an error if a field in this list has a non-empty value.
  1840. // This may be used to include null fields in Patch requests.
  1841. NullFields []string `json:"-"`
  1842. }
  1843. func (s *WorkerAssignedEvent) MarshalJSON() ([]byte, error) {
  1844. type NoMethod WorkerAssignedEvent
  1845. raw := NoMethod(*s)
  1846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1847. }
  1848. // WorkerReleasedEvent: An event generated when the worker VM that was
  1849. // assigned to the pipeline
  1850. // has been released (deleted).
  1851. type WorkerReleasedEvent struct {
  1852. // Instance: The worker's instance name.
  1853. Instance string `json:"instance,omitempty"`
  1854. // Zone: The zone the worker was running in.
  1855. Zone string `json:"zone,omitempty"`
  1856. // ForceSendFields is a list of field names (e.g. "Instance") to
  1857. // unconditionally include in API requests. By default, fields with
  1858. // empty values are omitted from API requests. However, any non-pointer,
  1859. // non-interface field appearing in ForceSendFields will be sent to the
  1860. // server regardless of whether the field is empty or not. This may be
  1861. // used to include empty fields in Patch requests.
  1862. ForceSendFields []string `json:"-"`
  1863. // NullFields is a list of field names (e.g. "Instance") to include in
  1864. // API requests with the JSON null value. By default, fields with empty
  1865. // values are omitted from API requests. However, any field with an
  1866. // empty value appearing in NullFields will be sent to the server as
  1867. // null. It is an error if a field in this list has a non-empty value.
  1868. // This may be used to include null fields in Patch requests.
  1869. NullFields []string `json:"-"`
  1870. }
  1871. func (s *WorkerReleasedEvent) MarshalJSON() ([]byte, error) {
  1872. type NoMethod WorkerReleasedEvent
  1873. raw := NoMethod(*s)
  1874. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1875. }
  1876. // WorkerStatus: The status of the worker VM.
  1877. type WorkerStatus struct {
  1878. // AttachedDisks: Status of attached disks.
  1879. AttachedDisks map[string]DiskStatus `json:"attachedDisks,omitempty"`
  1880. // BootDisk: Status of the boot disk.
  1881. BootDisk *DiskStatus `json:"bootDisk,omitempty"`
  1882. // FreeRamBytes: Free RAM.
  1883. FreeRamBytes uint64 `json:"freeRamBytes,omitempty,string"`
  1884. // TotalRamBytes: Total RAM.
  1885. TotalRamBytes uint64 `json:"totalRamBytes,omitempty,string"`
  1886. // UptimeSeconds: System uptime.
  1887. UptimeSeconds int64 `json:"uptimeSeconds,omitempty,string"`
  1888. // ForceSendFields is a list of field names (e.g. "AttachedDisks") to
  1889. // unconditionally include in API requests. By default, fields with
  1890. // empty values are omitted from API requests. However, any non-pointer,
  1891. // non-interface field appearing in ForceSendFields will be sent to the
  1892. // server regardless of whether the field is empty or not. This may be
  1893. // used to include empty fields in Patch requests.
  1894. ForceSendFields []string `json:"-"`
  1895. // NullFields is a list of field names (e.g. "AttachedDisks") to include
  1896. // in API requests with the JSON null value. By default, fields with
  1897. // empty values are omitted from API requests. However, any field with
  1898. // an empty value appearing in NullFields will be sent to the server as
  1899. // null. It is an error if a field in this list has a non-empty value.
  1900. // This may be used to include null fields in Patch requests.
  1901. NullFields []string `json:"-"`
  1902. }
  1903. func (s *WorkerStatus) MarshalJSON() ([]byte, error) {
  1904. type NoMethod WorkerStatus
  1905. raw := NoMethod(*s)
  1906. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1907. }
  1908. // method id "genomics.pipelines.run":
  1909. type PipelinesRunCall struct {
  1910. s *Service
  1911. runpipelinerequest *RunPipelineRequest
  1912. urlParams_ gensupport.URLParams
  1913. ctx_ context.Context
  1914. header_ http.Header
  1915. }
  1916. // Run: Runs a pipeline.
  1917. //
  1918. // **Note:** Before you can use this method, the Genomics Service
  1919. // Agent
  1920. // must have access to your project. This is done automatically when
  1921. // the
  1922. // Cloud Genomics API is first enabled, but if you delete this
  1923. // permission,
  1924. // or if you enabled the Cloud Genomics API before the v2alpha1
  1925. // API
  1926. // launch, you must disable and re-enable the API to grant the
  1927. // Genomics
  1928. // Service Agent the required permissions.
  1929. // Authorization requires the following
  1930. // [Google
  1931. // IAM](https://cloud.google.com/iam/) permission:
  1932. //
  1933. // * `genomics.operations.create`
  1934. //
  1935. // [1]: /genomics/gsa
  1936. func (r *PipelinesService) Run(runpipelinerequest *RunPipelineRequest) *PipelinesRunCall {
  1937. c := &PipelinesRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1938. c.runpipelinerequest = runpipelinerequest
  1939. return c
  1940. }
  1941. // Fields allows partial responses to be retrieved. See
  1942. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1943. // for more information.
  1944. func (c *PipelinesRunCall) Fields(s ...googleapi.Field) *PipelinesRunCall {
  1945. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1946. return c
  1947. }
  1948. // Context sets the context to be used in this call's Do method. Any
  1949. // pending HTTP request will be aborted if the provided context is
  1950. // canceled.
  1951. func (c *PipelinesRunCall) Context(ctx context.Context) *PipelinesRunCall {
  1952. c.ctx_ = ctx
  1953. return c
  1954. }
  1955. // Header returns an http.Header that can be modified by the caller to
  1956. // add HTTP headers to the request.
  1957. func (c *PipelinesRunCall) Header() http.Header {
  1958. if c.header_ == nil {
  1959. c.header_ = make(http.Header)
  1960. }
  1961. return c.header_
  1962. }
  1963. func (c *PipelinesRunCall) doRequest(alt string) (*http.Response, error) {
  1964. reqHeaders := make(http.Header)
  1965. for k, v := range c.header_ {
  1966. reqHeaders[k] = v
  1967. }
  1968. reqHeaders.Set("User-Agent", c.s.userAgent())
  1969. var body io.Reader = nil
  1970. body, err := googleapi.WithoutDataWrapper.JSONReader(c.runpipelinerequest)
  1971. if err != nil {
  1972. return nil, err
  1973. }
  1974. reqHeaders.Set("Content-Type", "application/json")
  1975. c.urlParams_.Set("alt", alt)
  1976. c.urlParams_.Set("prettyPrint", "false")
  1977. urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha1/pipelines:run")
  1978. urls += "?" + c.urlParams_.Encode()
  1979. req, err := http.NewRequest("POST", urls, body)
  1980. if err != nil {
  1981. return nil, err
  1982. }
  1983. req.Header = reqHeaders
  1984. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1985. }
  1986. // Do executes the "genomics.pipelines.run" call.
  1987. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  1988. // status code is an error. Response headers are in either
  1989. // *Operation.ServerResponse.Header or (if a response was returned at
  1990. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1991. // to check whether the returned error was because
  1992. // http.StatusNotModified was returned.
  1993. func (c *PipelinesRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1994. gensupport.SetOptions(c.urlParams_, opts...)
  1995. res, err := c.doRequest("json")
  1996. if res != nil && res.StatusCode == http.StatusNotModified {
  1997. if res.Body != nil {
  1998. res.Body.Close()
  1999. }
  2000. return nil, &googleapi.Error{
  2001. Code: res.StatusCode,
  2002. Header: res.Header,
  2003. }
  2004. }
  2005. if err != nil {
  2006. return nil, err
  2007. }
  2008. defer googleapi.CloseBody(res)
  2009. if err := googleapi.CheckResponse(res); err != nil {
  2010. return nil, err
  2011. }
  2012. ret := &Operation{
  2013. ServerResponse: googleapi.ServerResponse{
  2014. Header: res.Header,
  2015. HTTPStatusCode: res.StatusCode,
  2016. },
  2017. }
  2018. target := &ret
  2019. if err := gensupport.DecodeResponse(target, res); err != nil {
  2020. return nil, err
  2021. }
  2022. return ret, nil
  2023. // {
  2024. // "description": "Runs a pipeline.\n\n**Note:** Before you can use this method, the Genomics Service Agent\nmust have access to your project. This is done automatically when the\nCloud Genomics API is first enabled, but if you delete this permission,\nor if you enabled the Cloud Genomics API before the v2alpha1 API\nlaunch, you must disable and re-enable the API to grant the Genomics\nService Agent the required permissions.\nAuthorization requires the following [Google\nIAM](https://cloud.google.com/iam/) permission:\n\n* `genomics.operations.create`\n\n[1]: /genomics/gsa",
  2025. // "flatPath": "v2alpha1/pipelines:run",
  2026. // "httpMethod": "POST",
  2027. // "id": "genomics.pipelines.run",
  2028. // "parameterOrder": [],
  2029. // "parameters": {},
  2030. // "path": "v2alpha1/pipelines:run",
  2031. // "request": {
  2032. // "$ref": "RunPipelineRequest"
  2033. // },
  2034. // "response": {
  2035. // "$ref": "Operation"
  2036. // },
  2037. // "scopes": [
  2038. // "https://www.googleapis.com/auth/cloud-platform",
  2039. // "https://www.googleapis.com/auth/genomics"
  2040. // ]
  2041. // }
  2042. }
  2043. // method id "genomics.projects.operations.cancel":
  2044. type ProjectsOperationsCancelCall struct {
  2045. s *Service
  2046. name string
  2047. canceloperationrequest *CancelOperationRequest
  2048. urlParams_ gensupport.URLParams
  2049. ctx_ context.Context
  2050. header_ http.Header
  2051. }
  2052. // Cancel: Starts asynchronous cancellation on a long-running
  2053. // operation.
  2054. // The server makes a best effort to cancel the operation, but success
  2055. // is not
  2056. // guaranteed. Clients may use Operations.GetOperation
  2057. // or Operations.ListOperations
  2058. // to check whether the cancellation succeeded or the operation
  2059. // completed
  2060. // despite cancellation.
  2061. // Authorization requires the following [Google
  2062. // IAM](https://cloud.google.com/iam) permission&#58;
  2063. //
  2064. // * `genomics.operations.cancel`
  2065. func (r *ProjectsOperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *ProjectsOperationsCancelCall {
  2066. c := &ProjectsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2067. c.name = name
  2068. c.canceloperationrequest = canceloperationrequest
  2069. return c
  2070. }
  2071. // Fields allows partial responses to be retrieved. See
  2072. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2073. // for more information.
  2074. func (c *ProjectsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsOperationsCancelCall {
  2075. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2076. return c
  2077. }
  2078. // Context sets the context to be used in this call's Do method. Any
  2079. // pending HTTP request will be aborted if the provided context is
  2080. // canceled.
  2081. func (c *ProjectsOperationsCancelCall) Context(ctx context.Context) *ProjectsOperationsCancelCall {
  2082. c.ctx_ = ctx
  2083. return c
  2084. }
  2085. // Header returns an http.Header that can be modified by the caller to
  2086. // add HTTP headers to the request.
  2087. func (c *ProjectsOperationsCancelCall) Header() http.Header {
  2088. if c.header_ == nil {
  2089. c.header_ = make(http.Header)
  2090. }
  2091. return c.header_
  2092. }
  2093. func (c *ProjectsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  2094. reqHeaders := make(http.Header)
  2095. for k, v := range c.header_ {
  2096. reqHeaders[k] = v
  2097. }
  2098. reqHeaders.Set("User-Agent", c.s.userAgent())
  2099. var body io.Reader = nil
  2100. body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  2101. if err != nil {
  2102. return nil, err
  2103. }
  2104. reqHeaders.Set("Content-Type", "application/json")
  2105. c.urlParams_.Set("alt", alt)
  2106. c.urlParams_.Set("prettyPrint", "false")
  2107. urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha1/{+name}:cancel")
  2108. urls += "?" + c.urlParams_.Encode()
  2109. req, err := http.NewRequest("POST", urls, body)
  2110. if err != nil {
  2111. return nil, err
  2112. }
  2113. req.Header = reqHeaders
  2114. googleapi.Expand(req.URL, map[string]string{
  2115. "name": c.name,
  2116. })
  2117. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2118. }
  2119. // Do executes the "genomics.projects.operations.cancel" call.
  2120. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2121. // code is an error. Response headers are in either
  2122. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2123. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2124. // check whether the returned error was because http.StatusNotModified
  2125. // was returned.
  2126. func (c *ProjectsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2127. gensupport.SetOptions(c.urlParams_, opts...)
  2128. res, err := c.doRequest("json")
  2129. if res != nil && res.StatusCode == http.StatusNotModified {
  2130. if res.Body != nil {
  2131. res.Body.Close()
  2132. }
  2133. return nil, &googleapi.Error{
  2134. Code: res.StatusCode,
  2135. Header: res.Header,
  2136. }
  2137. }
  2138. if err != nil {
  2139. return nil, err
  2140. }
  2141. defer googleapi.CloseBody(res)
  2142. if err := googleapi.CheckResponse(res); err != nil {
  2143. return nil, err
  2144. }
  2145. ret := &Empty{
  2146. ServerResponse: googleapi.ServerResponse{
  2147. Header: res.Header,
  2148. HTTPStatusCode: res.StatusCode,
  2149. },
  2150. }
  2151. target := &ret
  2152. if err := gensupport.DecodeResponse(target, res); err != nil {
  2153. return nil, err
  2154. }
  2155. return ret, nil
  2156. // {
  2157. // "description": "Starts asynchronous cancellation on a long-running operation.\nThe server makes a best effort to cancel the operation, but success is not\nguaranteed. Clients may use Operations.GetOperation\nor Operations.ListOperations\nto check whether the cancellation succeeded or the operation completed\ndespite cancellation.\nAuthorization requires the following [Google IAM](https://cloud.google.com/iam) permission\u0026#58;\n\n* `genomics.operations.cancel`",
  2158. // "flatPath": "v2alpha1/projects/{projectsId}/operations/{operationsId}:cancel",
  2159. // "httpMethod": "POST",
  2160. // "id": "genomics.projects.operations.cancel",
  2161. // "parameterOrder": [
  2162. // "name"
  2163. // ],
  2164. // "parameters": {
  2165. // "name": {
  2166. // "description": "The name of the operation resource to be cancelled.",
  2167. // "location": "path",
  2168. // "pattern": "^projects/[^/]+/operations/[^/]+$",
  2169. // "required": true,
  2170. // "type": "string"
  2171. // }
  2172. // },
  2173. // "path": "v2alpha1/{+name}:cancel",
  2174. // "request": {
  2175. // "$ref": "CancelOperationRequest"
  2176. // },
  2177. // "response": {
  2178. // "$ref": "Empty"
  2179. // },
  2180. // "scopes": [
  2181. // "https://www.googleapis.com/auth/cloud-platform",
  2182. // "https://www.googleapis.com/auth/genomics"
  2183. // ]
  2184. // }
  2185. }
  2186. // method id "genomics.projects.operations.get":
  2187. type ProjectsOperationsGetCall struct {
  2188. s *Service
  2189. name string
  2190. urlParams_ gensupport.URLParams
  2191. ifNoneMatch_ string
  2192. ctx_ context.Context
  2193. header_ http.Header
  2194. }
  2195. // Get: Gets the latest state of a long-running operation.
  2196. // Clients can use this method to poll the operation result at intervals
  2197. // as
  2198. // recommended by the API service.
  2199. // Authorization requires the following [Google
  2200. // IAM](https://cloud.google.com/iam) permission&#58;
  2201. //
  2202. // * `genomics.operations.get`
  2203. func (r *ProjectsOperationsService) Get(name string) *ProjectsOperationsGetCall {
  2204. c := &ProjectsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2205. c.name = name
  2206. return c
  2207. }
  2208. // Fields allows partial responses to be retrieved. See
  2209. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2210. // for more information.
  2211. func (c *ProjectsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsOperationsGetCall {
  2212. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2213. return c
  2214. }
  2215. // IfNoneMatch sets the optional parameter which makes the operation
  2216. // fail if the object's ETag matches the given value. This is useful for
  2217. // getting updates only after the object has changed since the last
  2218. // request. Use googleapi.IsNotModified to check whether the response
  2219. // error from Do is the result of In-None-Match.
  2220. func (c *ProjectsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsOperationsGetCall {
  2221. c.ifNoneMatch_ = entityTag
  2222. return c
  2223. }
  2224. // Context sets the context to be used in this call's Do method. Any
  2225. // pending HTTP request will be aborted if the provided context is
  2226. // canceled.
  2227. func (c *ProjectsOperationsGetCall) Context(ctx context.Context) *ProjectsOperationsGetCall {
  2228. c.ctx_ = ctx
  2229. return c
  2230. }
  2231. // Header returns an http.Header that can be modified by the caller to
  2232. // add HTTP headers to the request.
  2233. func (c *ProjectsOperationsGetCall) Header() http.Header {
  2234. if c.header_ == nil {
  2235. c.header_ = make(http.Header)
  2236. }
  2237. return c.header_
  2238. }
  2239. func (c *ProjectsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2240. reqHeaders := make(http.Header)
  2241. for k, v := range c.header_ {
  2242. reqHeaders[k] = v
  2243. }
  2244. reqHeaders.Set("User-Agent", c.s.userAgent())
  2245. if c.ifNoneMatch_ != "" {
  2246. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2247. }
  2248. var body io.Reader = nil
  2249. c.urlParams_.Set("alt", alt)
  2250. c.urlParams_.Set("prettyPrint", "false")
  2251. urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha1/{+name}")
  2252. urls += "?" + c.urlParams_.Encode()
  2253. req, err := http.NewRequest("GET", urls, body)
  2254. if err != nil {
  2255. return nil, err
  2256. }
  2257. req.Header = reqHeaders
  2258. googleapi.Expand(req.URL, map[string]string{
  2259. "name": c.name,
  2260. })
  2261. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2262. }
  2263. // Do executes the "genomics.projects.operations.get" call.
  2264. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2265. // status code is an error. Response headers are in either
  2266. // *Operation.ServerResponse.Header or (if a response was returned at
  2267. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2268. // to check whether the returned error was because
  2269. // http.StatusNotModified was returned.
  2270. func (c *ProjectsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2271. gensupport.SetOptions(c.urlParams_, opts...)
  2272. res, err := c.doRequest("json")
  2273. if res != nil && res.StatusCode == http.StatusNotModified {
  2274. if res.Body != nil {
  2275. res.Body.Close()
  2276. }
  2277. return nil, &googleapi.Error{
  2278. Code: res.StatusCode,
  2279. Header: res.Header,
  2280. }
  2281. }
  2282. if err != nil {
  2283. return nil, err
  2284. }
  2285. defer googleapi.CloseBody(res)
  2286. if err := googleapi.CheckResponse(res); err != nil {
  2287. return nil, err
  2288. }
  2289. ret := &Operation{
  2290. ServerResponse: googleapi.ServerResponse{
  2291. Header: res.Header,
  2292. HTTPStatusCode: res.StatusCode,
  2293. },
  2294. }
  2295. target := &ret
  2296. if err := gensupport.DecodeResponse(target, res); err != nil {
  2297. return nil, err
  2298. }
  2299. return ret, nil
  2300. // {
  2301. // "description": "Gets the latest state of a long-running operation.\nClients can use this method to poll the operation result at intervals as\nrecommended by the API service.\nAuthorization requires the following [Google IAM](https://cloud.google.com/iam) permission\u0026#58;\n\n* `genomics.operations.get`",
  2302. // "flatPath": "v2alpha1/projects/{projectsId}/operations/{operationsId}",
  2303. // "httpMethod": "GET",
  2304. // "id": "genomics.projects.operations.get",
  2305. // "parameterOrder": [
  2306. // "name"
  2307. // ],
  2308. // "parameters": {
  2309. // "name": {
  2310. // "description": "The name of the operation resource.",
  2311. // "location": "path",
  2312. // "pattern": "^projects/[^/]+/operations/[^/]+$",
  2313. // "required": true,
  2314. // "type": "string"
  2315. // }
  2316. // },
  2317. // "path": "v2alpha1/{+name}",
  2318. // "response": {
  2319. // "$ref": "Operation"
  2320. // },
  2321. // "scopes": [
  2322. // "https://www.googleapis.com/auth/cloud-platform",
  2323. // "https://www.googleapis.com/auth/genomics"
  2324. // ]
  2325. // }
  2326. }
  2327. // method id "genomics.projects.operations.list":
  2328. type ProjectsOperationsListCall struct {
  2329. s *Service
  2330. name string
  2331. urlParams_ gensupport.URLParams
  2332. ifNoneMatch_ string
  2333. ctx_ context.Context
  2334. header_ http.Header
  2335. }
  2336. // List: Lists operations that match the specified filter in the
  2337. // request.
  2338. // Authorization requires the following [Google
  2339. // IAM](https://cloud.google.com/iam) permission&#58;
  2340. //
  2341. // * `genomics.operations.list`
  2342. func (r *ProjectsOperationsService) List(name string) *ProjectsOperationsListCall {
  2343. c := &ProjectsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2344. c.name = name
  2345. return c
  2346. }
  2347. // Filter sets the optional parameter "filter": A string for filtering
  2348. // Operations.
  2349. // In v2alpha1, the following filter fields are supported&#58;
  2350. //
  2351. // * createTime&#58; The time this job was created
  2352. // * events&#58; The set of event (names) that have occurred while
  2353. // running
  2354. // the pipeline. The &#58; operator can be used to determine if a
  2355. // particular event has occurred.
  2356. // * error&#58; If the pipeline is running, this value is NULL. Once
  2357. // the
  2358. // pipeline finishes, the value is the standard Google error code.
  2359. // * labels.key or labels."key with space" where key is a label key.
  2360. // * done&#58; If the pipeline is running, this value is false. Once
  2361. // the
  2362. // pipeline finishes, the value is true.
  2363. //
  2364. // In v1 and v1alpha2, the following filter fields are supported&#58;
  2365. //
  2366. // * projectId&#58; Required. Corresponds to
  2367. // OperationMetadata.projectId.
  2368. // * createTime&#58; The time this job was created, in seconds from the
  2369. // [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=`
  2370. // and/or `<=`
  2371. // operators.
  2372. // * status&#58; Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`.
  2373. // Only
  2374. // one status may be specified.
  2375. // * labels.key where key is a label key.
  2376. //
  2377. // Examples&#58;
  2378. //
  2379. // * `projectId = my-project AND createTime >= 1432140000`
  2380. // * `projectId = my-project AND createTime >= 1432140000 AND createTime
  2381. // <= 1432150000 AND status = RUNNING`
  2382. // * `projectId = my-project AND labels.color = *`
  2383. // * `projectId = my-project AND labels.color = red`
  2384. func (c *ProjectsOperationsListCall) Filter(filter string) *ProjectsOperationsListCall {
  2385. c.urlParams_.Set("filter", filter)
  2386. return c
  2387. }
  2388. // PageSize sets the optional parameter "pageSize": The maximum number
  2389. // of results to return. The maximum value is 256.
  2390. func (c *ProjectsOperationsListCall) PageSize(pageSize int64) *ProjectsOperationsListCall {
  2391. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2392. return c
  2393. }
  2394. // PageToken sets the optional parameter "pageToken": The standard list
  2395. // page token.
  2396. func (c *ProjectsOperationsListCall) PageToken(pageToken string) *ProjectsOperationsListCall {
  2397. c.urlParams_.Set("pageToken", pageToken)
  2398. return c
  2399. }
  2400. // Fields allows partial responses to be retrieved. See
  2401. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2402. // for more information.
  2403. func (c *ProjectsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsOperationsListCall {
  2404. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2405. return c
  2406. }
  2407. // IfNoneMatch sets the optional parameter which makes the operation
  2408. // fail if the object's ETag matches the given value. This is useful for
  2409. // getting updates only after the object has changed since the last
  2410. // request. Use googleapi.IsNotModified to check whether the response
  2411. // error from Do is the result of In-None-Match.
  2412. func (c *ProjectsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsOperationsListCall {
  2413. c.ifNoneMatch_ = entityTag
  2414. return c
  2415. }
  2416. // Context sets the context to be used in this call's Do method. Any
  2417. // pending HTTP request will be aborted if the provided context is
  2418. // canceled.
  2419. func (c *ProjectsOperationsListCall) Context(ctx context.Context) *ProjectsOperationsListCall {
  2420. c.ctx_ = ctx
  2421. return c
  2422. }
  2423. // Header returns an http.Header that can be modified by the caller to
  2424. // add HTTP headers to the request.
  2425. func (c *ProjectsOperationsListCall) Header() http.Header {
  2426. if c.header_ == nil {
  2427. c.header_ = make(http.Header)
  2428. }
  2429. return c.header_
  2430. }
  2431. func (c *ProjectsOperationsListCall) doRequest(alt string) (*http.Response, error) {
  2432. reqHeaders := make(http.Header)
  2433. for k, v := range c.header_ {
  2434. reqHeaders[k] = v
  2435. }
  2436. reqHeaders.Set("User-Agent", c.s.userAgent())
  2437. if c.ifNoneMatch_ != "" {
  2438. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2439. }
  2440. var body io.Reader = nil
  2441. c.urlParams_.Set("alt", alt)
  2442. c.urlParams_.Set("prettyPrint", "false")
  2443. urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha1/{+name}")
  2444. urls += "?" + c.urlParams_.Encode()
  2445. req, err := http.NewRequest("GET", urls, body)
  2446. if err != nil {
  2447. return nil, err
  2448. }
  2449. req.Header = reqHeaders
  2450. googleapi.Expand(req.URL, map[string]string{
  2451. "name": c.name,
  2452. })
  2453. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2454. }
  2455. // Do executes the "genomics.projects.operations.list" call.
  2456. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  2457. // non-2xx status code is an error. Response headers are in either
  2458. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  2459. // returned at all) in error.(*googleapi.Error).Header. Use
  2460. // googleapi.IsNotModified to check whether the returned error was
  2461. // because http.StatusNotModified was returned.
  2462. func (c *ProjectsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2463. gensupport.SetOptions(c.urlParams_, opts...)
  2464. res, err := c.doRequest("json")
  2465. if res != nil && res.StatusCode == http.StatusNotModified {
  2466. if res.Body != nil {
  2467. res.Body.Close()
  2468. }
  2469. return nil, &googleapi.Error{
  2470. Code: res.StatusCode,
  2471. Header: res.Header,
  2472. }
  2473. }
  2474. if err != nil {
  2475. return nil, err
  2476. }
  2477. defer googleapi.CloseBody(res)
  2478. if err := googleapi.CheckResponse(res); err != nil {
  2479. return nil, err
  2480. }
  2481. ret := &ListOperationsResponse{
  2482. ServerResponse: googleapi.ServerResponse{
  2483. Header: res.Header,
  2484. HTTPStatusCode: res.StatusCode,
  2485. },
  2486. }
  2487. target := &ret
  2488. if err := gensupport.DecodeResponse(target, res); err != nil {
  2489. return nil, err
  2490. }
  2491. return ret, nil
  2492. // {
  2493. // "description": "Lists operations that match the specified filter in the request.\nAuthorization requires the following [Google IAM](https://cloud.google.com/iam) permission\u0026#58;\n\n* `genomics.operations.list`",
  2494. // "flatPath": "v2alpha1/projects/{projectsId}/operations",
  2495. // "httpMethod": "GET",
  2496. // "id": "genomics.projects.operations.list",
  2497. // "parameterOrder": [
  2498. // "name"
  2499. // ],
  2500. // "parameters": {
  2501. // "filter": {
  2502. // "description": "A string for filtering Operations.\nIn v2alpha1, the following filter fields are supported\u0026#58;\n\n* createTime\u0026#58; The time this job was created\n* events\u0026#58; The set of event (names) that have occurred while running\n the pipeline. The \u0026#58; operator can be used to determine if a\n particular event has occurred.\n* error\u0026#58; If the pipeline is running, this value is NULL. Once the\n pipeline finishes, the value is the standard Google error code.\n* labels.key or labels.\"key with space\" where key is a label key.\n* done\u0026#58; If the pipeline is running, this value is false. Once the\n pipeline finishes, the value is true.\n\nIn v1 and v1alpha2, the following filter fields are supported\u0026#58;\n\n* projectId\u0026#58; Required. Corresponds to\n OperationMetadata.projectId.\n* createTime\u0026#58; The time this job was created, in seconds from the\n [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `\u003c=`\n operators.\n* status\u0026#58; Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only\n one status may be specified.\n* labels.key where key is a label key.\n\nExamples\u0026#58;\n\n* `projectId = my-project AND createTime \u003e= 1432140000`\n* `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING`\n* `projectId = my-project AND labels.color = *`\n* `projectId = my-project AND labels.color = red`",
  2503. // "location": "query",
  2504. // "type": "string"
  2505. // },
  2506. // "name": {
  2507. // "description": "The name of the operation's parent resource.",
  2508. // "location": "path",
  2509. // "pattern": "^projects/[^/]+/operations$",
  2510. // "required": true,
  2511. // "type": "string"
  2512. // },
  2513. // "pageSize": {
  2514. // "description": "The maximum number of results to return. The maximum value is 256.",
  2515. // "format": "int32",
  2516. // "location": "query",
  2517. // "type": "integer"
  2518. // },
  2519. // "pageToken": {
  2520. // "description": "The standard list page token.",
  2521. // "location": "query",
  2522. // "type": "string"
  2523. // }
  2524. // },
  2525. // "path": "v2alpha1/{+name}",
  2526. // "response": {
  2527. // "$ref": "ListOperationsResponse"
  2528. // },
  2529. // "scopes": [
  2530. // "https://www.googleapis.com/auth/cloud-platform",
  2531. // "https://www.googleapis.com/auth/genomics"
  2532. // ]
  2533. // }
  2534. }
  2535. // Pages invokes f for each page of results.
  2536. // A non-nil error returned from f will halt the iteration.
  2537. // The provided context supersedes any context provided to the Context method.
  2538. func (c *ProjectsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2539. c.ctx_ = ctx
  2540. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2541. for {
  2542. x, err := c.Do()
  2543. if err != nil {
  2544. return err
  2545. }
  2546. if err := f(x); err != nil {
  2547. return err
  2548. }
  2549. if x.NextPageToken == "" {
  2550. return nil
  2551. }
  2552. c.PageToken(x.NextPageToken)
  2553. }
  2554. }
  2555. // method id "genomics.workers.checkIn":
  2556. type WorkersCheckInCall struct {
  2557. s *Service
  2558. id string
  2559. checkinrequest *CheckInRequest
  2560. urlParams_ gensupport.URLParams
  2561. ctx_ context.Context
  2562. header_ http.Header
  2563. }
  2564. // CheckIn: The worker uses this method to retrieve the assigned
  2565. // operation and
  2566. // provide periodic status updates.
  2567. func (r *WorkersService) CheckIn(id string, checkinrequest *CheckInRequest) *WorkersCheckInCall {
  2568. c := &WorkersCheckInCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2569. c.id = id
  2570. c.checkinrequest = checkinrequest
  2571. return c
  2572. }
  2573. // Fields allows partial responses to be retrieved. See
  2574. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2575. // for more information.
  2576. func (c *WorkersCheckInCall) Fields(s ...googleapi.Field) *WorkersCheckInCall {
  2577. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2578. return c
  2579. }
  2580. // Context sets the context to be used in this call's Do method. Any
  2581. // pending HTTP request will be aborted if the provided context is
  2582. // canceled.
  2583. func (c *WorkersCheckInCall) Context(ctx context.Context) *WorkersCheckInCall {
  2584. c.ctx_ = ctx
  2585. return c
  2586. }
  2587. // Header returns an http.Header that can be modified by the caller to
  2588. // add HTTP headers to the request.
  2589. func (c *WorkersCheckInCall) Header() http.Header {
  2590. if c.header_ == nil {
  2591. c.header_ = make(http.Header)
  2592. }
  2593. return c.header_
  2594. }
  2595. func (c *WorkersCheckInCall) doRequest(alt string) (*http.Response, error) {
  2596. reqHeaders := make(http.Header)
  2597. for k, v := range c.header_ {
  2598. reqHeaders[k] = v
  2599. }
  2600. reqHeaders.Set("User-Agent", c.s.userAgent())
  2601. var body io.Reader = nil
  2602. body, err := googleapi.WithoutDataWrapper.JSONReader(c.checkinrequest)
  2603. if err != nil {
  2604. return nil, err
  2605. }
  2606. reqHeaders.Set("Content-Type", "application/json")
  2607. c.urlParams_.Set("alt", alt)
  2608. c.urlParams_.Set("prettyPrint", "false")
  2609. urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha1/workers/{id}:checkIn")
  2610. urls += "?" + c.urlParams_.Encode()
  2611. req, err := http.NewRequest("POST", urls, body)
  2612. if err != nil {
  2613. return nil, err
  2614. }
  2615. req.Header = reqHeaders
  2616. googleapi.Expand(req.URL, map[string]string{
  2617. "id": c.id,
  2618. })
  2619. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2620. }
  2621. // Do executes the "genomics.workers.checkIn" call.
  2622. // Exactly one of *CheckInResponse or error will be non-nil. Any non-2xx
  2623. // status code is an error. Response headers are in either
  2624. // *CheckInResponse.ServerResponse.Header or (if a response was returned
  2625. // at all) in error.(*googleapi.Error).Header. Use
  2626. // googleapi.IsNotModified to check whether the returned error was
  2627. // because http.StatusNotModified was returned.
  2628. func (c *WorkersCheckInCall) Do(opts ...googleapi.CallOption) (*CheckInResponse, error) {
  2629. gensupport.SetOptions(c.urlParams_, opts...)
  2630. res, err := c.doRequest("json")
  2631. if res != nil && res.StatusCode == http.StatusNotModified {
  2632. if res.Body != nil {
  2633. res.Body.Close()
  2634. }
  2635. return nil, &googleapi.Error{
  2636. Code: res.StatusCode,
  2637. Header: res.Header,
  2638. }
  2639. }
  2640. if err != nil {
  2641. return nil, err
  2642. }
  2643. defer googleapi.CloseBody(res)
  2644. if err := googleapi.CheckResponse(res); err != nil {
  2645. return nil, err
  2646. }
  2647. ret := &CheckInResponse{
  2648. ServerResponse: googleapi.ServerResponse{
  2649. Header: res.Header,
  2650. HTTPStatusCode: res.StatusCode,
  2651. },
  2652. }
  2653. target := &ret
  2654. if err := gensupport.DecodeResponse(target, res); err != nil {
  2655. return nil, err
  2656. }
  2657. return ret, nil
  2658. // {
  2659. // "description": "The worker uses this method to retrieve the assigned operation and\nprovide periodic status updates.",
  2660. // "flatPath": "v2alpha1/workers/{id}:checkIn",
  2661. // "httpMethod": "POST",
  2662. // "id": "genomics.workers.checkIn",
  2663. // "parameterOrder": [
  2664. // "id"
  2665. // ],
  2666. // "parameters": {
  2667. // "id": {
  2668. // "description": "The worker id, assigned when it was created.",
  2669. // "location": "path",
  2670. // "required": true,
  2671. // "type": "string"
  2672. // }
  2673. // },
  2674. // "path": "v2alpha1/workers/{id}:checkIn",
  2675. // "request": {
  2676. // "$ref": "CheckInRequest"
  2677. // },
  2678. // "response": {
  2679. // "$ref": "CheckInResponse"
  2680. // },
  2681. // "scopes": [
  2682. // "https://www.googleapis.com/auth/cloud-platform",
  2683. // "https://www.googleapis.com/auth/genomics"
  2684. // ]
  2685. // }
  2686. }