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

2742 lines
102 KiB

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