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.
 
 
 

3703 line
134 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/v1alpha2"
  8. // ...
  9. // genomicsService, err := genomics.New(oauthHttpClient)
  10. package genomics // import "google.golang.org/api/genomics/v1alpha2"
  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:v1alpha2"
  41. const apiName = "genomics"
  42. const apiVersion = "v1alpha2"
  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 your Google Compute Engine resources
  49. ComputeScope = "https://www.googleapis.com/auth/compute"
  50. // View and manage Genomics data
  51. GenomicsScope = "https://www.googleapis.com/auth/genomics"
  52. )
  53. func New(client *http.Client) (*Service, error) {
  54. if client == nil {
  55. return nil, errors.New("client is nil")
  56. }
  57. s := &Service{client: client, BasePath: basePath}
  58. s.Operations = NewOperationsService(s)
  59. s.Pipelines = NewPipelinesService(s)
  60. return s, nil
  61. }
  62. type Service struct {
  63. client *http.Client
  64. BasePath string // API endpoint base URL
  65. UserAgent string // optional additional User-Agent fragment
  66. Operations *OperationsService
  67. Pipelines *PipelinesService
  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 NewOperationsService(s *Service) *OperationsService {
  76. rs := &OperationsService{s: s}
  77. return rs
  78. }
  79. type OperationsService struct {
  80. s *Service
  81. }
  82. func NewPipelinesService(s *Service) *PipelinesService {
  83. rs := &PipelinesService{s: s}
  84. return rs
  85. }
  86. type PipelinesService struct {
  87. s *Service
  88. }
  89. // CancelOperationRequest: The request message for
  90. // Operations.CancelOperation.
  91. type CancelOperationRequest struct {
  92. }
  93. // ComputeEngine: Describes a Compute Engine resource that is being
  94. // managed by a running
  95. // pipeline.
  96. type ComputeEngine struct {
  97. // DiskNames: The names of the disks that were created for this
  98. // pipeline.
  99. DiskNames []string `json:"diskNames,omitempty"`
  100. // InstanceName: The instance on which the operation is running.
  101. InstanceName string `json:"instanceName,omitempty"`
  102. // MachineType: The machine type of the instance.
  103. MachineType string `json:"machineType,omitempty"`
  104. // Zone: The availability zone in which the instance resides.
  105. Zone string `json:"zone,omitempty"`
  106. // ForceSendFields is a list of field names (e.g. "DiskNames") to
  107. // unconditionally include in API requests. By default, fields with
  108. // empty values are omitted from API requests. However, any non-pointer,
  109. // non-interface field appearing in ForceSendFields will be sent to the
  110. // server regardless of whether the field is empty or not. This may be
  111. // used to include empty fields in Patch requests.
  112. ForceSendFields []string `json:"-"`
  113. // NullFields is a list of field names (e.g. "DiskNames") to include in
  114. // API requests with the JSON null value. By default, fields with empty
  115. // values are omitted from API requests. However, any field with an
  116. // empty value appearing in NullFields will be sent to the server as
  117. // null. It is an error if a field in this list has a non-empty value.
  118. // This may be used to include null fields in Patch requests.
  119. NullFields []string `json:"-"`
  120. }
  121. func (s *ComputeEngine) MarshalJSON() ([]byte, error) {
  122. type NoMethod ComputeEngine
  123. raw := NoMethod(*s)
  124. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  125. }
  126. // ContainerStartedEvent: This event is generated when a container
  127. // starts.
  128. type ContainerStartedEvent struct {
  129. // ActionId: The numeric ID of the action that started this container.
  130. ActionId int64 `json:"actionId,omitempty"`
  131. // IpAddress: The public IP address that can be used to connect to the
  132. // container. This
  133. // field is only populated when at least one port mapping is present.
  134. // If the
  135. // instance was created with a private address this field will be empty
  136. // even
  137. // if port mappings exist.
  138. IpAddress string `json:"ipAddress,omitempty"`
  139. // PortMappings: The container to host port mappings installed for this
  140. // container. This
  141. // set will contain any ports exposed using the PUBLISH_EXPOSED_PORTS
  142. // flag as
  143. // well as any specified in the Action definition.
  144. PortMappings map[string]int64 `json:"portMappings,omitempty"`
  145. // ForceSendFields is a list of field names (e.g. "ActionId") to
  146. // unconditionally include in API requests. By default, fields with
  147. // empty values are omitted from API requests. However, any non-pointer,
  148. // non-interface field appearing in ForceSendFields will be sent to the
  149. // server regardless of whether the field is empty or not. This may be
  150. // used to include empty fields in Patch requests.
  151. ForceSendFields []string `json:"-"`
  152. // NullFields is a list of field names (e.g. "ActionId") to include in
  153. // API requests with the JSON null value. By default, fields with empty
  154. // values are omitted from API requests. However, any field with an
  155. // empty value appearing in NullFields will be sent to the server as
  156. // null. It is an error if a field in this list has a non-empty value.
  157. // This may be used to include null fields in Patch requests.
  158. NullFields []string `json:"-"`
  159. }
  160. func (s *ContainerStartedEvent) MarshalJSON() ([]byte, error) {
  161. type NoMethod ContainerStartedEvent
  162. raw := NoMethod(*s)
  163. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  164. }
  165. // ContainerStoppedEvent: This event is generated when a container
  166. // exits.
  167. type ContainerStoppedEvent struct {
  168. // ActionId: The numeric ID of the action that started this container.
  169. ActionId int64 `json:"actionId,omitempty"`
  170. // ExitStatus: The exit status of the container.
  171. ExitStatus int64 `json:"exitStatus,omitempty"`
  172. // Stderr: The tail end of any content written to standard error by the
  173. // container.
  174. // To prevent this from being recorded if the action is known to
  175. // emit
  176. // large amounts of debugging noise or sensitive information, set
  177. // the
  178. // DISABLE_STANDARD_ERROR_CAPTURE flag.
  179. //
  180. // Note that only a small amount of the end of the stream is captured
  181. // here.
  182. // The entire stream is stored in the /google/logs directory mounted
  183. // into
  184. // each action, and may be copied off the machine as described
  185. // elsewhere.
  186. Stderr string `json:"stderr,omitempty"`
  187. // ForceSendFields is a list of field names (e.g. "ActionId") to
  188. // unconditionally include in API requests. By default, fields with
  189. // empty values are omitted from API requests. However, any non-pointer,
  190. // non-interface field appearing in ForceSendFields will be sent to the
  191. // server regardless of whether the field is empty or not. This may be
  192. // used to include empty fields in Patch requests.
  193. ForceSendFields []string `json:"-"`
  194. // NullFields is a list of field names (e.g. "ActionId") to include in
  195. // API requests with the JSON null value. By default, fields with empty
  196. // values are omitted from API requests. However, any field with an
  197. // empty value appearing in NullFields will be sent to the server as
  198. // null. It is an error if a field in this list has a non-empty value.
  199. // This may be used to include null fields in Patch requests.
  200. NullFields []string `json:"-"`
  201. }
  202. func (s *ContainerStoppedEvent) MarshalJSON() ([]byte, error) {
  203. type NoMethod ContainerStoppedEvent
  204. raw := NoMethod(*s)
  205. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  206. }
  207. // ControllerConfig: Stores the information that the controller will
  208. // fetch from the
  209. // server in order to run. Should only be used by VMs created by
  210. // the
  211. // Pipelines Service and not by end users.
  212. type ControllerConfig struct {
  213. Cmd string `json:"cmd,omitempty"`
  214. Disks map[string]string `json:"disks,omitempty"`
  215. GcsLogPath string `json:"gcsLogPath,omitempty"`
  216. GcsSinks map[string]RepeatedString `json:"gcsSinks,omitempty"`
  217. GcsSources map[string]RepeatedString `json:"gcsSources,omitempty"`
  218. Image string `json:"image,omitempty"`
  219. MachineType string `json:"machineType,omitempty"`
  220. Vars map[string]string `json:"vars,omitempty"`
  221. // ServerResponse contains the HTTP response code and headers from the
  222. // server.
  223. googleapi.ServerResponse `json:"-"`
  224. // ForceSendFields is a list of field names (e.g. "Cmd") to
  225. // unconditionally include in API requests. By default, fields with
  226. // empty values are omitted from API requests. However, any non-pointer,
  227. // non-interface field appearing in ForceSendFields will be sent to the
  228. // server regardless of whether the field is empty or not. This may be
  229. // used to include empty fields in Patch requests.
  230. ForceSendFields []string `json:"-"`
  231. // NullFields is a list of field names (e.g. "Cmd") to include in API
  232. // requests with the JSON null value. By default, fields with empty
  233. // values are omitted from API requests. However, any field with an
  234. // empty value appearing in NullFields will be sent to the server as
  235. // null. It is an error if a field in this list has a non-empty value.
  236. // This may be used to include null fields in Patch requests.
  237. NullFields []string `json:"-"`
  238. }
  239. func (s *ControllerConfig) MarshalJSON() ([]byte, error) {
  240. type NoMethod ControllerConfig
  241. raw := NoMethod(*s)
  242. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  243. }
  244. // DelayedEvent: This event is generated whenever a resource limitation
  245. // or transient error
  246. // delays execution of a pipeline that was otherwise ready to run.
  247. type DelayedEvent struct {
  248. // Cause: A textual description of the cause of the delay. The string
  249. // may change
  250. // without notice since it is often generated by another service (such
  251. // as
  252. // Compute Engine).
  253. Cause string `json:"cause,omitempty"`
  254. // Metrics: If the delay was caused by a resource shortage, this field
  255. // lists the
  256. // Compute Engine metrics that are preventing this operation from
  257. // running
  258. // (for example, CPUS or INSTANCES). If the particular metric is not
  259. // known,
  260. // a single UNKNOWN metric will be present.
  261. Metrics []string `json:"metrics,omitempty"`
  262. // ForceSendFields is a list of field names (e.g. "Cause") to
  263. // unconditionally include in API requests. By default, fields with
  264. // empty values are omitted from API requests. However, any non-pointer,
  265. // non-interface field appearing in ForceSendFields will be sent to the
  266. // server regardless of whether the field is empty or not. This may be
  267. // used to include empty fields in Patch requests.
  268. ForceSendFields []string `json:"-"`
  269. // NullFields is a list of field names (e.g. "Cause") to include in API
  270. // requests with the JSON null value. By default, fields with empty
  271. // values are omitted from API requests. However, any field with an
  272. // empty value appearing in NullFields will be sent to the server as
  273. // null. It is an error if a field in this list has a non-empty value.
  274. // This may be used to include null fields in Patch requests.
  275. NullFields []string `json:"-"`
  276. }
  277. func (s *DelayedEvent) MarshalJSON() ([]byte, error) {
  278. type NoMethod DelayedEvent
  279. raw := NoMethod(*s)
  280. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  281. }
  282. // Disk: A Google Compute Engine disk resource specification.
  283. type Disk struct {
  284. // AutoDelete: Deprecated. Disks created by the Pipelines API will be
  285. // deleted at the end
  286. // of the pipeline run, regardless of what this field is set to.
  287. AutoDelete bool `json:"autoDelete,omitempty"`
  288. // MountPoint: Required at create time and cannot be overridden at run
  289. // time.
  290. // Specifies the path in the docker container where files on
  291. // this disk should be located. For example, if `mountPoint`
  292. // is `/mnt/disk`, and the parameter has `localPath`
  293. // `inputs/file.txt`, the docker container can access the data
  294. // at
  295. // `/mnt/disk/inputs/file.txt`.
  296. MountPoint string `json:"mountPoint,omitempty"`
  297. // Name: Required. The name of the disk that can be used in the
  298. // pipeline
  299. // parameters. Must be 1 - 63 characters.
  300. // The name "boot" is reserved for system use.
  301. Name string `json:"name,omitempty"`
  302. // ReadOnly: Specifies how a sourced-base persistent disk will be
  303. // mounted.
  304. // See
  305. // https://cloud.google.com/compute/docs/disks/persistent-disks#use_m
  306. // ulti_instances
  307. // for more details.
  308. // Can only be set at create time.
  309. ReadOnly bool `json:"readOnly,omitempty"`
  310. // SizeGb: The size of the disk. Defaults to 500 (GB).
  311. // This field is not applicable for local SSD.
  312. SizeGb int64 `json:"sizeGb,omitempty"`
  313. // Source: The full or partial URL of the persistent disk to attach.
  314. // See
  315. // https://cloud.google.com/compute/docs/reference/latest/instances#r
  316. // esource
  317. // and
  318. // https://cloud.google.com/compute/docs/disks/persistent-dis
  319. // ks#snapshots
  320. // for more details.
  321. Source string `json:"source,omitempty"`
  322. // Type: Required. The type of the disk to create.
  323. //
  324. // Possible values:
  325. // "TYPE_UNSPECIFIED" - Default disk type. Use one of the other
  326. // options below.
  327. // "PERSISTENT_HDD" - Specifies a Google Compute Engine persistent
  328. // hard disk. See
  329. // https://cloud.google.com/compute/docs/disks/#pdspecs for details.
  330. // "PERSISTENT_SSD" - Specifies a Google Compute Engine persistent
  331. // solid-state disk.
  332. // See
  333. // https://cloud.google.com/compute/docs/disks/#pdspecs for details.
  334. // "LOCAL_SSD" - Specifies a Google Compute Engine local SSD.
  335. // See https://cloud.google.com/compute/docs/disks/local-ssd for
  336. // details.
  337. Type string `json:"type,omitempty"`
  338. // ForceSendFields is a list of field names (e.g. "AutoDelete") to
  339. // unconditionally include in API requests. By default, fields with
  340. // empty values are omitted from API requests. However, any non-pointer,
  341. // non-interface field appearing in ForceSendFields will be sent to the
  342. // server regardless of whether the field is empty or not. This may be
  343. // used to include empty fields in Patch requests.
  344. ForceSendFields []string `json:"-"`
  345. // NullFields is a list of field names (e.g. "AutoDelete") to include in
  346. // API requests with the JSON null value. By default, fields with empty
  347. // values are omitted from API requests. However, any field with an
  348. // empty value appearing in NullFields will be sent to the server as
  349. // null. It is an error if a field in this list has a non-empty value.
  350. // This may be used to include null fields in Patch requests.
  351. NullFields []string `json:"-"`
  352. }
  353. func (s *Disk) MarshalJSON() ([]byte, error) {
  354. type NoMethod Disk
  355. raw := NoMethod(*s)
  356. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  357. }
  358. // DockerExecutor: The Docker execuctor specification.
  359. type DockerExecutor struct {
  360. // Cmd: Required. The command or newline delimited script to run. The
  361. // command
  362. // string will be executed within a bash shell.
  363. //
  364. // If the command exits with a non-zero exit code, output
  365. // parameter
  366. // de-localization will be skipped and the pipeline operation's
  367. // `error` field will be populated.
  368. //
  369. // Maximum command string length is 16384.
  370. Cmd string `json:"cmd,omitempty"`
  371. // ImageName: Required. Image name from either Docker Hub or Google
  372. // Container Registry.
  373. // Users that run pipelines must have READ access to the image.
  374. ImageName string `json:"imageName,omitempty"`
  375. // ForceSendFields is a list of field names (e.g. "Cmd") to
  376. // unconditionally include in API requests. By default, fields with
  377. // empty values are omitted from API requests. However, any non-pointer,
  378. // non-interface field appearing in ForceSendFields will be sent to the
  379. // server regardless of whether the field is empty or not. This may be
  380. // used to include empty fields in Patch requests.
  381. ForceSendFields []string `json:"-"`
  382. // NullFields is a list of field names (e.g. "Cmd") to include in API
  383. // requests with the JSON null value. By default, fields with empty
  384. // values are omitted from API requests. However, any field with an
  385. // empty value appearing in NullFields will be sent to the server as
  386. // null. It is an error if a field in this list has a non-empty value.
  387. // This may be used to include null fields in Patch requests.
  388. NullFields []string `json:"-"`
  389. }
  390. func (s *DockerExecutor) MarshalJSON() ([]byte, error) {
  391. type NoMethod DockerExecutor
  392. raw := NoMethod(*s)
  393. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  394. }
  395. // Empty: A generic empty message that you can re-use to avoid defining
  396. // duplicated
  397. // empty messages in your APIs. A typical example is to use it as the
  398. // request
  399. // or the response type of an API method. For instance:
  400. //
  401. // service Foo {
  402. // rpc Bar(google.protobuf.Empty) returns
  403. // (google.protobuf.Empty);
  404. // }
  405. //
  406. // The JSON representation for `Empty` is empty JSON object `{}`.
  407. type Empty struct {
  408. // ServerResponse contains the HTTP response code and headers from the
  409. // server.
  410. googleapi.ServerResponse `json:"-"`
  411. }
  412. // Event: Event carries information about events that occur during
  413. // pipeline execution.
  414. type Event struct {
  415. // Description: A human readable description of the event. Note that
  416. // these strings may
  417. // change at any time without notice. Any application logic must use
  418. // the
  419. // information in the details field.
  420. Description string `json:"description,omitempty"`
  421. // Details: Machine readable details about the event.
  422. Details googleapi.RawMessage `json:"details,omitempty"`
  423. // Timestamp: The time that the event occurred.
  424. Timestamp string `json:"timestamp,omitempty"`
  425. // ForceSendFields is a list of field names (e.g. "Description") to
  426. // unconditionally include in API requests. By default, fields with
  427. // empty values are omitted from API requests. However, any non-pointer,
  428. // non-interface field appearing in ForceSendFields will be sent to the
  429. // server regardless of whether the field is empty or not. This may be
  430. // used to include empty fields in Patch requests.
  431. ForceSendFields []string `json:"-"`
  432. // NullFields is a list of field names (e.g. "Description") to include
  433. // in API requests with the JSON null value. By default, fields with
  434. // empty values are omitted from API requests. However, any field with
  435. // an empty value appearing in NullFields will be sent to the server as
  436. // null. It is an error if a field in this list has a non-empty value.
  437. // This may be used to include null fields in Patch requests.
  438. NullFields []string `json:"-"`
  439. }
  440. func (s *Event) MarshalJSON() ([]byte, error) {
  441. type NoMethod Event
  442. raw := NoMethod(*s)
  443. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  444. }
  445. // FailedEvent: This event is generated when the execution of a pipeline
  446. // has failed. Note
  447. // that other events may continue to occur after this event.
  448. type FailedEvent struct {
  449. // Cause: The human readable description of the cause of the failure.
  450. Cause string `json:"cause,omitempty"`
  451. // Code: The Google standard error code that best describes this
  452. // failure.
  453. //
  454. // Possible values:
  455. // "OK" - Not an error; returned on success
  456. //
  457. // HTTP Mapping: 200 OK
  458. // "CANCELLED" - The operation was cancelled, typically by the
  459. // caller.
  460. //
  461. // HTTP Mapping: 499 Client Closed Request
  462. // "UNKNOWN" - Unknown error. For example, this error may be returned
  463. // when
  464. // a `Status` value received from another address space belongs to
  465. // an error space that is not known in this address space. Also
  466. // errors raised by APIs that do not return enough error information
  467. // may be converted to this error.
  468. //
  469. // HTTP Mapping: 500 Internal Server Error
  470. // "INVALID_ARGUMENT" - The client specified an invalid argument.
  471. // Note that this differs
  472. // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates
  473. // arguments
  474. // that are problematic regardless of the state of the system
  475. // (e.g., a malformed file name).
  476. //
  477. // HTTP Mapping: 400 Bad Request
  478. // "DEADLINE_EXCEEDED" - The deadline expired before the operation
  479. // could complete. For operations
  480. // that change the state of the system, this error may be returned
  481. // even if the operation has completed successfully. For example,
  482. // a
  483. // successful response from a server could have been delayed long
  484. // enough for the deadline to expire.
  485. //
  486. // HTTP Mapping: 504 Gateway Timeout
  487. // "NOT_FOUND" - Some requested entity (e.g., file or directory) was
  488. // not found.
  489. //
  490. // Note to server developers: if a request is denied for an entire
  491. // class
  492. // of users, such as gradual feature rollout or undocumented
  493. // whitelist,
  494. // `NOT_FOUND` may be used. If a request is denied for some users
  495. // within
  496. // a class of users, such as user-based access control,
  497. // `PERMISSION_DENIED`
  498. // must be used.
  499. //
  500. // HTTP Mapping: 404 Not Found
  501. // "ALREADY_EXISTS" - The entity that a client attempted to create
  502. // (e.g., file or directory)
  503. // already exists.
  504. //
  505. // HTTP Mapping: 409 Conflict
  506. // "PERMISSION_DENIED" - The caller does not have permission to
  507. // execute the specified
  508. // operation. `PERMISSION_DENIED` must not be used for rejections
  509. // caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
  510. // instead for those errors). `PERMISSION_DENIED` must not be
  511. // used if the caller can not be identified (use
  512. // `UNAUTHENTICATED`
  513. // instead for those errors). This error code does not imply the
  514. // request is valid or the requested entity exists or satisfies
  515. // other pre-conditions.
  516. //
  517. // HTTP Mapping: 403 Forbidden
  518. // "UNAUTHENTICATED" - The request does not have valid authentication
  519. // credentials for the
  520. // operation.
  521. //
  522. // HTTP Mapping: 401 Unauthorized
  523. // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
  524. // per-user quota, or
  525. // perhaps the entire file system is out of space.
  526. //
  527. // HTTP Mapping: 429 Too Many Requests
  528. // "FAILED_PRECONDITION" - The operation was rejected because the
  529. // system is not in a state
  530. // required for the operation's execution. For example, the
  531. // directory
  532. // to be deleted is non-empty, an rmdir operation is applied to
  533. // a non-directory, etc.
  534. //
  535. // Service implementors can use the following guidelines to
  536. // decide
  537. // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
  538. // (a) Use `UNAVAILABLE` if the client can retry just the failing
  539. // call.
  540. // (b) Use `ABORTED` if the client should retry at a higher level
  541. // (e.g., when a client-specified test-and-set fails, indicating
  542. // the
  543. // client should restart a read-modify-write sequence).
  544. // (c) Use `FAILED_PRECONDITION` if the client should not retry until
  545. // the system state has been explicitly fixed. E.g., if an
  546. // "rmdir"
  547. // fails because the directory is non-empty, `FAILED_PRECONDITION`
  548. // should be returned since the client should not retry unless
  549. // the files are deleted from the directory.
  550. //
  551. // HTTP Mapping: 400 Bad Request
  552. // "ABORTED" - The operation was aborted, typically due to a
  553. // concurrency issue such as
  554. // a sequencer check failure or transaction abort.
  555. //
  556. // See the guidelines above for deciding between
  557. // `FAILED_PRECONDITION`,
  558. // `ABORTED`, and `UNAVAILABLE`.
  559. //
  560. // HTTP Mapping: 409 Conflict
  561. // "OUT_OF_RANGE" - The operation was attempted past the valid range.
  562. // E.g., seeking or
  563. // reading past end-of-file.
  564. //
  565. // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
  566. // be fixed if the system state changes. For example, a 32-bit
  567. // file
  568. // system will generate `INVALID_ARGUMENT` if asked to read at an
  569. // offset that is not in the range [0,2^32-1], but it will
  570. // generate
  571. // `OUT_OF_RANGE` if asked to read from an offset past the current
  572. // file size.
  573. //
  574. // There is a fair bit of overlap between `FAILED_PRECONDITION`
  575. // and
  576. // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more
  577. // specific
  578. // error) when it applies so that callers who are iterating through
  579. // a space can easily look for an `OUT_OF_RANGE` error to detect
  580. // when
  581. // they are done.
  582. //
  583. // HTTP Mapping: 400 Bad Request
  584. // "UNIMPLEMENTED" - The operation is not implemented or is not
  585. // supported/enabled in this
  586. // service.
  587. //
  588. // HTTP Mapping: 501 Not Implemented
  589. // "INTERNAL" - Internal errors. This means that some invariants
  590. // expected by the
  591. // underlying system have been broken. This error code is reserved
  592. // for serious errors.
  593. //
  594. // HTTP Mapping: 500 Internal Server Error
  595. // "UNAVAILABLE" - The service is currently unavailable. This is most
  596. // likely a
  597. // transient condition, which can be corrected by retrying with
  598. // a backoff.
  599. //
  600. // See the guidelines above for deciding between
  601. // `FAILED_PRECONDITION`,
  602. // `ABORTED`, and `UNAVAILABLE`.
  603. //
  604. // HTTP Mapping: 503 Service Unavailable
  605. // "DATA_LOSS" - Unrecoverable data loss or corruption.
  606. //
  607. // HTTP Mapping: 500 Internal Server Error
  608. Code string `json:"code,omitempty"`
  609. // ForceSendFields is a list of field names (e.g. "Cause") to
  610. // unconditionally include in API requests. By default, fields with
  611. // empty values are omitted from API requests. However, any non-pointer,
  612. // non-interface field appearing in ForceSendFields will be sent to the
  613. // server regardless of whether the field is empty or not. This may be
  614. // used to include empty fields in Patch requests.
  615. ForceSendFields []string `json:"-"`
  616. // NullFields is a list of field names (e.g. "Cause") to include in API
  617. // requests with the JSON null value. By default, fields with empty
  618. // values are omitted from API requests. However, any field with an
  619. // empty value appearing in NullFields will be sent to the server as
  620. // null. It is an error if a field in this list has a non-empty value.
  621. // This may be used to include null fields in Patch requests.
  622. NullFields []string `json:"-"`
  623. }
  624. func (s *FailedEvent) MarshalJSON() ([]byte, error) {
  625. type NoMethod FailedEvent
  626. raw := NoMethod(*s)
  627. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  628. }
  629. // ImportReadGroupSetsResponse: The read group set import response.
  630. type ImportReadGroupSetsResponse struct {
  631. // ReadGroupSetIds: IDs of the read group sets that were created.
  632. ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
  633. // ForceSendFields is a list of field names (e.g. "ReadGroupSetIds") to
  634. // unconditionally include in API requests. By default, fields with
  635. // empty values are omitted from API requests. However, any non-pointer,
  636. // non-interface field appearing in ForceSendFields will be sent to the
  637. // server regardless of whether the field is empty or not. This may be
  638. // used to include empty fields in Patch requests.
  639. ForceSendFields []string `json:"-"`
  640. // NullFields is a list of field names (e.g. "ReadGroupSetIds") to
  641. // include in API requests with the JSON null value. By default, fields
  642. // with empty values are omitted from API requests. However, any field
  643. // with an empty value appearing in NullFields will be sent to the
  644. // server as null. It is an error if a field in this list has a
  645. // non-empty value. This may be used to include null fields in Patch
  646. // requests.
  647. NullFields []string `json:"-"`
  648. }
  649. func (s *ImportReadGroupSetsResponse) MarshalJSON() ([]byte, error) {
  650. type NoMethod ImportReadGroupSetsResponse
  651. raw := NoMethod(*s)
  652. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  653. }
  654. // ImportVariantsResponse: The variant data import response.
  655. type ImportVariantsResponse struct {
  656. // CallSetIds: IDs of the call sets created during the import.
  657. CallSetIds []string `json:"callSetIds,omitempty"`
  658. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  659. // unconditionally include in API requests. By default, fields with
  660. // empty values are omitted from API requests. However, any non-pointer,
  661. // non-interface field appearing in ForceSendFields will be sent to the
  662. // server regardless of whether the field is empty or not. This may be
  663. // used to include empty fields in Patch requests.
  664. ForceSendFields []string `json:"-"`
  665. // NullFields is a list of field names (e.g. "CallSetIds") to include in
  666. // API requests with the JSON null value. By default, fields with empty
  667. // values are omitted from API requests. However, any field with an
  668. // empty value appearing in NullFields will be sent to the server as
  669. // null. It is an error if a field in this list has a non-empty value.
  670. // This may be used to include null fields in Patch requests.
  671. NullFields []string `json:"-"`
  672. }
  673. func (s *ImportVariantsResponse) MarshalJSON() ([]byte, error) {
  674. type NoMethod ImportVariantsResponse
  675. raw := NoMethod(*s)
  676. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  677. }
  678. // ListOperationsResponse: The response message for
  679. // Operations.ListOperations.
  680. type ListOperationsResponse struct {
  681. // NextPageToken: The standard List next-page token.
  682. NextPageToken string `json:"nextPageToken,omitempty"`
  683. // Operations: A list of operations that matches the specified filter in
  684. // the request.
  685. Operations []*Operation `json:"operations,omitempty"`
  686. // ServerResponse contains the HTTP response code and headers from the
  687. // server.
  688. googleapi.ServerResponse `json:"-"`
  689. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  690. // unconditionally include in API requests. By default, fields with
  691. // empty values are omitted from API requests. However, any non-pointer,
  692. // non-interface field appearing in ForceSendFields will be sent to the
  693. // server regardless of whether the field is empty or not. This may be
  694. // used to include empty fields in Patch requests.
  695. ForceSendFields []string `json:"-"`
  696. // NullFields is a list of field names (e.g. "NextPageToken") to include
  697. // in API requests with the JSON null value. By default, fields with
  698. // empty values are omitted from API requests. However, any field with
  699. // an empty value appearing in NullFields will be sent to the server as
  700. // null. It is an error if a field in this list has a non-empty value.
  701. // This may be used to include null fields in Patch requests.
  702. NullFields []string `json:"-"`
  703. }
  704. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  705. type NoMethod ListOperationsResponse
  706. raw := NoMethod(*s)
  707. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  708. }
  709. // ListPipelinesResponse: The response of ListPipelines. Contains at
  710. // most `pageSize`
  711. // pipelines. If it contains `pageSize` pipelines, and more
  712. // pipelines
  713. // exist, then `nextPageToken` will be populated and should be
  714. // used as the `pageToken` argument to a subsequent
  715. // ListPipelines
  716. // request.
  717. type ListPipelinesResponse struct {
  718. // NextPageToken: The token to use to get the next page of results.
  719. NextPageToken string `json:"nextPageToken,omitempty"`
  720. // Pipelines: The matched pipelines.
  721. Pipelines []*Pipeline `json:"pipelines,omitempty"`
  722. // ServerResponse contains the HTTP response code and headers from the
  723. // server.
  724. googleapi.ServerResponse `json:"-"`
  725. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  726. // unconditionally include in API requests. By default, fields with
  727. // empty values are omitted from API requests. However, any non-pointer,
  728. // non-interface field appearing in ForceSendFields will be sent to the
  729. // server regardless of whether the field is empty or not. This may be
  730. // used to include empty fields in Patch requests.
  731. ForceSendFields []string `json:"-"`
  732. // NullFields is a list of field names (e.g. "NextPageToken") to include
  733. // in API requests with the JSON null value. By default, fields with
  734. // empty values are omitted from API requests. However, any field with
  735. // an empty value appearing in NullFields will be sent to the server as
  736. // null. It is an error if a field in this list has a non-empty value.
  737. // This may be used to include null fields in Patch requests.
  738. NullFields []string `json:"-"`
  739. }
  740. func (s *ListPipelinesResponse) MarshalJSON() ([]byte, error) {
  741. type NoMethod ListPipelinesResponse
  742. raw := NoMethod(*s)
  743. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  744. }
  745. // LocalCopy: LocalCopy defines how a remote file should be copied to
  746. // and from the VM.
  747. type LocalCopy struct {
  748. // Disk: Required. The name of the disk where this parameter is
  749. // located. Can be the name of one of the disks specified in
  750. // the
  751. // Resources field, or "boot", which represents the Docker
  752. // instance's boot disk and has a mount point of `/`.
  753. Disk string `json:"disk,omitempty"`
  754. // Path: Required. The path within the user's docker container
  755. // where
  756. // this input should be localized to and from, relative to the
  757. // specified
  758. // disk's mount point. For example: file.txt,
  759. Path string `json:"path,omitempty"`
  760. // ForceSendFields is a list of field names (e.g. "Disk") to
  761. // unconditionally include in API requests. By default, fields with
  762. // empty values are omitted from API requests. However, any non-pointer,
  763. // non-interface field appearing in ForceSendFields will be sent to the
  764. // server regardless of whether the field is empty or not. This may be
  765. // used to include empty fields in Patch requests.
  766. ForceSendFields []string `json:"-"`
  767. // NullFields is a list of field names (e.g. "Disk") to include in API
  768. // requests with the JSON null value. By default, fields with empty
  769. // values are omitted from API requests. However, any field with an
  770. // empty value appearing in NullFields will be sent to the server as
  771. // null. It is an error if a field in this list has a non-empty value.
  772. // This may be used to include null fields in Patch requests.
  773. NullFields []string `json:"-"`
  774. }
  775. func (s *LocalCopy) MarshalJSON() ([]byte, error) {
  776. type NoMethod LocalCopy
  777. raw := NoMethod(*s)
  778. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  779. }
  780. // LoggingOptions: The logging options for the pipeline run.
  781. type LoggingOptions struct {
  782. // GcsPath: The location in Google Cloud Storage to which the pipeline
  783. // logs
  784. // will be copied. Can be specified as a fully qualified directory
  785. // path, in which case logs will be output with a unique identifier
  786. // as the filename in that directory, or as a fully specified
  787. // path,
  788. // which must end in `.log`, in which case that path will be
  789. // used, and the user must ensure that logs are not
  790. // overwritten. Stdout and stderr logs from the run are also
  791. // generated and output as `-stdout.log` and `-stderr.log`.
  792. GcsPath string `json:"gcsPath,omitempty"`
  793. // ForceSendFields is a list of field names (e.g. "GcsPath") to
  794. // unconditionally include in API requests. By default, fields with
  795. // empty values are omitted from API requests. However, any non-pointer,
  796. // non-interface field appearing in ForceSendFields will be sent to the
  797. // server regardless of whether the field is empty or not. This may be
  798. // used to include empty fields in Patch requests.
  799. ForceSendFields []string `json:"-"`
  800. // NullFields is a list of field names (e.g. "GcsPath") to include in
  801. // API requests with the JSON null value. By default, fields with empty
  802. // values are omitted from API requests. However, any field with an
  803. // empty value appearing in NullFields will be sent to the server as
  804. // null. It is an error if a field in this list has a non-empty value.
  805. // This may be used to include null fields in Patch requests.
  806. NullFields []string `json:"-"`
  807. }
  808. func (s *LoggingOptions) MarshalJSON() ([]byte, error) {
  809. type NoMethod LoggingOptions
  810. raw := NoMethod(*s)
  811. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  812. }
  813. // Operation: This resource represents a long-running operation that is
  814. // the result of a
  815. // network API call.
  816. type Operation struct {
  817. // Done: If the value is `false`, it means the operation is still in
  818. // progress.
  819. // If `true`, the operation is completed, and either `error` or
  820. // `response` is
  821. // available.
  822. Done bool `json:"done,omitempty"`
  823. // Error: The error result of the operation in case of failure or
  824. // cancellation.
  825. Error *Status `json:"error,omitempty"`
  826. // Metadata: An OperationMetadata or Metadata object. This will always
  827. // be returned with the Operation.
  828. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  829. // Name: The server-assigned name, which is only unique within the same
  830. // service that originally returns it. For example:
  831. // `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`
  832. Name string `json:"name,omitempty"`
  833. // Response: If importing ReadGroupSets, an ImportReadGroupSetsResponse
  834. // is returned. If importing Variants, an ImportVariantsResponse is
  835. // returned. For pipelines and exports, an Empty response is returned.
  836. Response googleapi.RawMessage `json:"response,omitempty"`
  837. // ServerResponse contains the HTTP response code and headers from the
  838. // server.
  839. googleapi.ServerResponse `json:"-"`
  840. // ForceSendFields is a list of field names (e.g. "Done") to
  841. // unconditionally include in API requests. By default, fields with
  842. // empty values are omitted from API requests. However, any non-pointer,
  843. // non-interface field appearing in ForceSendFields will be sent to the
  844. // server regardless of whether the field is empty or not. This may be
  845. // used to include empty fields in Patch requests.
  846. ForceSendFields []string `json:"-"`
  847. // NullFields is a list of field names (e.g. "Done") to include in API
  848. // requests with the JSON null value. By default, fields with empty
  849. // values are omitted from API requests. However, any field with an
  850. // empty value appearing in NullFields will be sent to the server as
  851. // null. It is an error if a field in this list has a non-empty value.
  852. // This may be used to include null fields in Patch requests.
  853. NullFields []string `json:"-"`
  854. }
  855. func (s *Operation) MarshalJSON() ([]byte, error) {
  856. type NoMethod Operation
  857. raw := NoMethod(*s)
  858. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  859. }
  860. // OperationEvent: An event that occurred during an Operation.
  861. type OperationEvent struct {
  862. // Description: Required description of event.
  863. Description string `json:"description,omitempty"`
  864. // EndTime: Optional time of when event finished. An event can have a
  865. // start time and no
  866. // finish time. If an event has a finish time, there must be a start
  867. // time.
  868. EndTime string `json:"endTime,omitempty"`
  869. // StartTime: Optional time of when event started.
  870. StartTime string `json:"startTime,omitempty"`
  871. // ForceSendFields is a list of field names (e.g. "Description") to
  872. // unconditionally include in API requests. By default, fields with
  873. // empty values are omitted from API requests. However, any non-pointer,
  874. // non-interface field appearing in ForceSendFields will be sent to the
  875. // server regardless of whether the field is empty or not. This may be
  876. // used to include empty fields in Patch requests.
  877. ForceSendFields []string `json:"-"`
  878. // NullFields is a list of field names (e.g. "Description") to include
  879. // in API requests with the JSON null value. By default, fields with
  880. // empty values are omitted from API requests. However, any field with
  881. // an empty value appearing in NullFields will be sent to the server as
  882. // null. It is an error if a field in this list has a non-empty value.
  883. // This may be used to include null fields in Patch requests.
  884. NullFields []string `json:"-"`
  885. }
  886. func (s *OperationEvent) MarshalJSON() ([]byte, error) {
  887. type NoMethod OperationEvent
  888. raw := NoMethod(*s)
  889. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  890. }
  891. // OperationMetadata: Metadata describing an Operation.
  892. type OperationMetadata struct {
  893. // ClientId: This field is deprecated. Use `labels` instead. Optionally
  894. // provided by the
  895. // caller when submitting the request that creates the operation.
  896. ClientId string `json:"clientId,omitempty"`
  897. // CreateTime: The time at which the job was submitted to the Genomics
  898. // service.
  899. CreateTime string `json:"createTime,omitempty"`
  900. // EndTime: The time at which the job stopped running.
  901. EndTime string `json:"endTime,omitempty"`
  902. // Events: Optional event messages that were generated during the job's
  903. // execution.
  904. // This also contains any warnings that were generated during import
  905. // or export.
  906. Events []*OperationEvent `json:"events,omitempty"`
  907. // Labels: Optionally provided by the caller when submitting the request
  908. // that creates
  909. // the operation.
  910. Labels map[string]string `json:"labels,omitempty"`
  911. // ProjectId: The Google Cloud Project in which the job is scoped.
  912. ProjectId string `json:"projectId,omitempty"`
  913. // Request: The original request that started the operation. Note that
  914. // this will be in
  915. // current version of the API. If the operation was started with v1beta2
  916. // API
  917. // and a GetOperation is performed on v1 API, a v1 request will be
  918. // returned.
  919. Request googleapi.RawMessage `json:"request,omitempty"`
  920. // RuntimeMetadata: Runtime metadata on this Operation.
  921. RuntimeMetadata googleapi.RawMessage `json:"runtimeMetadata,omitempty"`
  922. // StartTime: The time at which the job began to run.
  923. StartTime string `json:"startTime,omitempty"`
  924. // ForceSendFields is a list of field names (e.g. "ClientId") to
  925. // unconditionally include in API requests. By default, fields with
  926. // empty values are omitted from API requests. However, any non-pointer,
  927. // non-interface field appearing in ForceSendFields will be sent to the
  928. // server regardless of whether the field is empty or not. This may be
  929. // used to include empty fields in Patch requests.
  930. ForceSendFields []string `json:"-"`
  931. // NullFields is a list of field names (e.g. "ClientId") to include in
  932. // API requests with the JSON null value. By default, fields with empty
  933. // values are omitted from API requests. However, any field with an
  934. // empty value appearing in NullFields will be sent to the server as
  935. // null. It is an error if a field in this list has a non-empty value.
  936. // This may be used to include null fields in Patch requests.
  937. NullFields []string `json:"-"`
  938. }
  939. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  940. type NoMethod OperationMetadata
  941. raw := NoMethod(*s)
  942. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  943. }
  944. // Pipeline: The pipeline object. Represents a transformation from a set
  945. // of input
  946. // parameters to a set of output parameters. The transformation is
  947. // defined
  948. // as a docker image and command to run within that image. Each
  949. // pipeline
  950. // is run on a Google Compute Engine VM. A pipeline can be created with
  951. // the
  952. // `create` method and then later run with the `run` method, or a
  953. // pipeline can
  954. // be defined and run all at once with the `run` method.
  955. type Pipeline struct {
  956. // Description: User-specified description.
  957. Description string `json:"description,omitempty"`
  958. // Docker: Specifies the docker run information.
  959. Docker *DockerExecutor `json:"docker,omitempty"`
  960. // InputParameters: Input parameters of the pipeline.
  961. InputParameters []*PipelineParameter `json:"inputParameters,omitempty"`
  962. // Name: Required. A user specified pipeline name that does not have to
  963. // be unique.
  964. // This name can be used for filtering Pipelines in ListPipelines.
  965. Name string `json:"name,omitempty"`
  966. // OutputParameters: Output parameters of the pipeline.
  967. OutputParameters []*PipelineParameter `json:"outputParameters,omitempty"`
  968. // PipelineId: Unique pipeline id that is generated by the service when
  969. // CreatePipeline
  970. // is called. Cannot be specified in the Pipeline used in
  971. // the
  972. // CreatePipelineRequest, and will be populated in the response
  973. // to
  974. // CreatePipeline and all subsequent Get and List calls. Indicates that
  975. // the
  976. // service has registered this pipeline.
  977. PipelineId string `json:"pipelineId,omitempty"`
  978. // ProjectId: Required. The project in which to create the pipeline. The
  979. // caller must have
  980. // WRITE access.
  981. ProjectId string `json:"projectId,omitempty"`
  982. // Resources: Required. Specifies resource requirements for the pipeline
  983. // run.
  984. // Required fields:
  985. //
  986. // *
  987. // minimumCpuCores
  988. //
  989. // *
  990. // minimumRamGb
  991. Resources *PipelineResources `json:"resources,omitempty"`
  992. // ServerResponse contains the HTTP response code and headers from the
  993. // server.
  994. googleapi.ServerResponse `json:"-"`
  995. // ForceSendFields is a list of field names (e.g. "Description") to
  996. // unconditionally include in API requests. By default, fields with
  997. // empty values are omitted from API requests. However, any non-pointer,
  998. // non-interface field appearing in ForceSendFields will be sent to the
  999. // server regardless of whether the field is empty or not. This may be
  1000. // used to include empty fields in Patch requests.
  1001. ForceSendFields []string `json:"-"`
  1002. // NullFields is a list of field names (e.g. "Description") to include
  1003. // in API requests with the JSON null value. By default, fields with
  1004. // empty values are omitted from API requests. However, any field with
  1005. // an empty value appearing in NullFields will be sent to the server as
  1006. // null. It is an error if a field in this list has a non-empty value.
  1007. // This may be used to include null fields in Patch requests.
  1008. NullFields []string `json:"-"`
  1009. }
  1010. func (s *Pipeline) MarshalJSON() ([]byte, error) {
  1011. type NoMethod Pipeline
  1012. raw := NoMethod(*s)
  1013. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1014. }
  1015. // PipelineParameter: Parameters facilitate setting and delivering data
  1016. // into the
  1017. // pipeline's execution environment. They are defined at create
  1018. // time,
  1019. // with optional defaults, and can be overridden at run time.
  1020. //
  1021. // If `localCopy` is unset, then the parameter specifies a string
  1022. // that
  1023. // is passed as-is into the pipeline, as the value of the
  1024. // environment
  1025. // variable with the given name. A default value can be
  1026. // optionally
  1027. // specified at create time. The default can be overridden at run
  1028. // time
  1029. // using the inputs map. If no default is given, a value must
  1030. // be
  1031. // supplied at runtime.
  1032. //
  1033. // If `localCopy` is defined, then the parameter specifies a data
  1034. // source or sink, both in Google Cloud Storage and on the Docker
  1035. // container
  1036. // where the pipeline computation is run. The service account associated
  1037. // with
  1038. // the Pipeline (by
  1039. // default the project's Compute Engine service account) must have
  1040. // access to the
  1041. // Google Cloud Storage paths.
  1042. //
  1043. // At run time, the Google Cloud Storage paths can be overridden if a
  1044. // default
  1045. // was provided at create time, or must be set otherwise. The pipeline
  1046. // runner
  1047. // should add a key/value pair to either the inputs or outputs map.
  1048. // The
  1049. // indicated data copies will be carried out before/after pipeline
  1050. // execution,
  1051. // just as if the corresponding arguments were provided to `gsutil
  1052. // cp`.
  1053. //
  1054. // For example: Given the following `PipelineParameter`, specified
  1055. // in the `inputParameters` list:
  1056. //
  1057. // ```
  1058. // {name: "input_file", localCopy: {path: "file.txt", disk:
  1059. // "pd1"}}
  1060. // ```
  1061. //
  1062. // where `disk` is defined in the `PipelineResources` object
  1063. // as:
  1064. //
  1065. // ```
  1066. // {name: "pd1", mountPoint: "/mnt/disk/"}
  1067. // ```
  1068. //
  1069. // We create a disk named `pd1`, mount it on the host VM, and
  1070. // map
  1071. // `/mnt/pd1` to `/mnt/disk` in the docker container. At
  1072. // runtime, an entry for `input_file` would be required in the
  1073. // inputs
  1074. // map, such as:
  1075. //
  1076. // ```
  1077. // inputs["input_file"] = "gs://my-bucket/bar.txt"
  1078. // ```
  1079. //
  1080. // This would generate the following gsutil call:
  1081. //
  1082. // ```
  1083. // gsutil cp gs://my-bucket/bar.txt /mnt/pd1/file.txt
  1084. // ```
  1085. //
  1086. // The file `/mnt/pd1/file.txt` maps to `/mnt/disk/file.txt` in
  1087. // the
  1088. // Docker container. Acceptable paths are:
  1089. //
  1090. // <table>
  1091. // <thead>
  1092. // <tr><th>Google Cloud storage path</th><th>Local path</th></tr>
  1093. // </thead>
  1094. // <tbody>
  1095. // <tr><td>file</td><td>file</td></tr>
  1096. // <tr><td>glob</td><td>directory</td></tr>
  1097. // </tbody>
  1098. // </table>
  1099. //
  1100. // For outputs, the direction of the copy is reversed:
  1101. //
  1102. // ```
  1103. // gsutil cp /mnt/disk/file.txt gs://my-bucket/bar.txt
  1104. // ```
  1105. //
  1106. // Acceptable paths are:
  1107. //
  1108. // <table>
  1109. // <thead>
  1110. // <tr><th>Local path</th><th>Google Cloud Storage path</th></tr>
  1111. // </thead>
  1112. // <tbody>
  1113. // <tr><td>file</td><td>file</td></tr>
  1114. // <tr>
  1115. // <td>file</td>
  1116. // <td>directory - directory must already exist</td>
  1117. // </tr>
  1118. // <tr>
  1119. // <td>glob</td>
  1120. // <td>directory - directory will be created if it doesn't
  1121. // exist</td></tr>
  1122. // </tbody>
  1123. // </table>
  1124. //
  1125. // One restriction due to docker limitations, is that for outputs that
  1126. // are found
  1127. // on the boot disk, the local path cannot be a glob and must be a file.
  1128. type PipelineParameter struct {
  1129. // DefaultValue: The default value for this parameter. Can be overridden
  1130. // at runtime.
  1131. // If `localCopy` is present, then this must be a Google Cloud Storage
  1132. // path
  1133. // beginning with `gs://`.
  1134. DefaultValue string `json:"defaultValue,omitempty"`
  1135. // Description: Human-readable description.
  1136. Description string `json:"description,omitempty"`
  1137. // LocalCopy: If present, this parameter is marked for copying to and
  1138. // from the VM.
  1139. // `LocalCopy` indicates where on the VM the file should be. The
  1140. // value
  1141. // given to this parameter (either at runtime or using
  1142. // `defaultValue`)
  1143. // must be the remote path where the file should be.
  1144. LocalCopy *LocalCopy `json:"localCopy,omitempty"`
  1145. // Name: Required. Name of the parameter - the pipeline runner uses this
  1146. // string
  1147. // as the key to the input and output maps in RunPipeline.
  1148. Name string `json:"name,omitempty"`
  1149. // ForceSendFields is a list of field names (e.g. "DefaultValue") to
  1150. // unconditionally include in API requests. By default, fields with
  1151. // empty values are omitted from API requests. However, any non-pointer,
  1152. // non-interface field appearing in ForceSendFields will be sent to the
  1153. // server regardless of whether the field is empty or not. This may be
  1154. // used to include empty fields in Patch requests.
  1155. ForceSendFields []string `json:"-"`
  1156. // NullFields is a list of field names (e.g. "DefaultValue") to include
  1157. // in API requests with the JSON null value. By default, fields with
  1158. // empty values are omitted from API requests. However, any field with
  1159. // an empty value appearing in NullFields will be sent to the server as
  1160. // null. It is an error if a field in this list has a non-empty value.
  1161. // This may be used to include null fields in Patch requests.
  1162. NullFields []string `json:"-"`
  1163. }
  1164. func (s *PipelineParameter) MarshalJSON() ([]byte, error) {
  1165. type NoMethod PipelineParameter
  1166. raw := NoMethod(*s)
  1167. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1168. }
  1169. // PipelineResources: The system resources for the pipeline run.
  1170. type PipelineResources struct {
  1171. // AcceleratorCount: Optional. The number of accelerators of the
  1172. // specified type to attach.
  1173. // By specifying this parameter, you will download and install the
  1174. // following
  1175. // third-party software onto your managed Compute Engine
  1176. // instances:
  1177. // NVIDIA® Tesla® drivers and NVIDIA® CUDA toolkit.
  1178. AcceleratorCount int64 `json:"acceleratorCount,omitempty,string"`
  1179. // AcceleratorType: Optional. The Compute Engine defined accelerator
  1180. // type.
  1181. // By specifying this parameter, you will download and install the
  1182. // following
  1183. // third-party software onto your managed Compute Engine instances:
  1184. // NVIDIA®
  1185. // Tesla® drivers and NVIDIA® CUDA toolkit.
  1186. // Please see https://cloud.google.com/compute/docs/gpus/ for a list
  1187. // of
  1188. // available accelerator types.
  1189. AcceleratorType string `json:"acceleratorType,omitempty"`
  1190. // BootDiskSizeGb: The size of the boot disk. Defaults to 10 (GB).
  1191. BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
  1192. // Disks: Disks to attach.
  1193. Disks []*Disk `json:"disks,omitempty"`
  1194. // MinimumCpuCores: The minimum number of cores to use. Defaults to 1.
  1195. MinimumCpuCores int64 `json:"minimumCpuCores,omitempty"`
  1196. // MinimumRamGb: The minimum amount of RAM to use. Defaults to 3.75 (GB)
  1197. MinimumRamGb float64 `json:"minimumRamGb,omitempty"`
  1198. // NoAddress: Whether to assign an external IP to the instance. This is
  1199. // an experimental
  1200. // feature that may go away. Defaults to false.
  1201. // Corresponds to `--no_address` flag for [gcloud compute instances
  1202. // create]
  1203. // (https://cloud.google.com/sdk/gcloud/reference/compute/instanc
  1204. // es/create).
  1205. // In order to use this, must be true for both create time and run
  1206. // time.
  1207. // Cannot be true at run time if false at create time. If you need to
  1208. // ssh into
  1209. // a private IP VM for debugging, you can ssh to a public VM and then
  1210. // ssh into
  1211. // the private VM's Internal IP. If noAddress is set, this pipeline run
  1212. // may
  1213. // only load docker images from Google Container Registry and not Docker
  1214. // Hub.
  1215. // Before using this, you must
  1216. // [configure access to Google services from internal
  1217. // IPs](https://cloud.google.com/compute/docs/configure-private-google-ac
  1218. // cess#configuring_access_to_google_services_from_internal_ips).
  1219. NoAddress bool `json:"noAddress,omitempty"`
  1220. // Preemptible: Whether to use preemptible VMs. Defaults to `false`. In
  1221. // order to use this,
  1222. // must be true for both create time and run time. Cannot be true at run
  1223. // time
  1224. // if false at create time.
  1225. Preemptible bool `json:"preemptible,omitempty"`
  1226. // Zones: List of Google Compute Engine availability zones to which
  1227. // resource
  1228. // creation will restricted. If empty, any zone may be chosen.
  1229. Zones []string `json:"zones,omitempty"`
  1230. // ForceSendFields is a list of field names (e.g. "AcceleratorCount") 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. "AcceleratorCount") to
  1238. // include in API requests with the JSON null value. By default, fields
  1239. // with empty values are omitted from API requests. However, any field
  1240. // with an empty value appearing in NullFields will be sent to the
  1241. // server as null. It is an error if a field in this list has a
  1242. // non-empty value. This may be used to include null fields in Patch
  1243. // requests.
  1244. NullFields []string `json:"-"`
  1245. }
  1246. func (s *PipelineResources) MarshalJSON() ([]byte, error) {
  1247. type NoMethod PipelineResources
  1248. raw := NoMethod(*s)
  1249. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1250. }
  1251. func (s *PipelineResources) UnmarshalJSON(data []byte) error {
  1252. type NoMethod PipelineResources
  1253. var s1 struct {
  1254. MinimumRamGb gensupport.JSONFloat64 `json:"minimumRamGb"`
  1255. *NoMethod
  1256. }
  1257. s1.NoMethod = (*NoMethod)(s)
  1258. if err := json.Unmarshal(data, &s1); err != nil {
  1259. return err
  1260. }
  1261. s.MinimumRamGb = float64(s1.MinimumRamGb)
  1262. return nil
  1263. }
  1264. // PullStartedEvent: This event is generated when the worker starts
  1265. // pulling an image.
  1266. type PullStartedEvent struct {
  1267. // ImageUri: The URI of the image that was pulled.
  1268. ImageUri string `json:"imageUri,omitempty"`
  1269. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  1270. // unconditionally include in API requests. By default, fields with
  1271. // empty values are omitted from API requests. However, any non-pointer,
  1272. // non-interface field appearing in ForceSendFields will be sent to the
  1273. // server regardless of whether the field is empty or not. This may be
  1274. // used to include empty fields in Patch requests.
  1275. ForceSendFields []string `json:"-"`
  1276. // NullFields is a list of field names (e.g. "ImageUri") to include in
  1277. // API requests with the JSON null value. By default, fields with empty
  1278. // values are omitted from API requests. However, any field with an
  1279. // empty value appearing in NullFields will be sent to the server as
  1280. // null. It is an error if a field in this list has a non-empty value.
  1281. // This may be used to include null fields in Patch requests.
  1282. NullFields []string `json:"-"`
  1283. }
  1284. func (s *PullStartedEvent) MarshalJSON() ([]byte, error) {
  1285. type NoMethod PullStartedEvent
  1286. raw := NoMethod(*s)
  1287. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1288. }
  1289. // PullStoppedEvent: This event is generated when the worker stops
  1290. // pulling an image.
  1291. type PullStoppedEvent struct {
  1292. // ImageUri: The URI of the image that was pulled.
  1293. ImageUri string `json:"imageUri,omitempty"`
  1294. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  1295. // unconditionally include in API requests. By default, fields with
  1296. // empty values are omitted from API requests. However, any non-pointer,
  1297. // non-interface field appearing in ForceSendFields will be sent to the
  1298. // server regardless of whether the field is empty or not. This may be
  1299. // used to include empty fields in Patch requests.
  1300. ForceSendFields []string `json:"-"`
  1301. // NullFields is a list of field names (e.g. "ImageUri") to include in
  1302. // API requests with the JSON null value. By default, fields with empty
  1303. // values are omitted from API requests. However, any field with an
  1304. // empty value appearing in NullFields will be sent to the server as
  1305. // null. It is an error if a field in this list has a non-empty value.
  1306. // This may be used to include null fields in Patch requests.
  1307. NullFields []string `json:"-"`
  1308. }
  1309. func (s *PullStoppedEvent) MarshalJSON() ([]byte, error) {
  1310. type NoMethod PullStoppedEvent
  1311. raw := NoMethod(*s)
  1312. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1313. }
  1314. type RepeatedString struct {
  1315. Values []string `json:"values,omitempty"`
  1316. // ForceSendFields is a list of field names (e.g. "Values") to
  1317. // unconditionally include in API requests. By default, fields with
  1318. // empty values are omitted from API requests. However, any non-pointer,
  1319. // non-interface field appearing in ForceSendFields will be sent to the
  1320. // server regardless of whether the field is empty or not. This may be
  1321. // used to include empty fields in Patch requests.
  1322. ForceSendFields []string `json:"-"`
  1323. // NullFields is a list of field names (e.g. "Values") to include in API
  1324. // requests with the JSON null value. By default, fields with empty
  1325. // values are omitted from API requests. However, any field with an
  1326. // empty value appearing in NullFields will be sent to the server as
  1327. // null. It is an error if a field in this list has a non-empty value.
  1328. // This may be used to include null fields in Patch requests.
  1329. NullFields []string `json:"-"`
  1330. }
  1331. func (s *RepeatedString) MarshalJSON() ([]byte, error) {
  1332. type NoMethod RepeatedString
  1333. raw := NoMethod(*s)
  1334. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1335. }
  1336. // RunPipelineArgs: The pipeline run arguments.
  1337. type RunPipelineArgs struct {
  1338. // ClientId: This field is deprecated. Use `labels` instead.
  1339. // Client-specified pipeline
  1340. // operation identifier.
  1341. ClientId string `json:"clientId,omitempty"`
  1342. // Inputs: Pipeline input arguments; keys are defined in the pipeline
  1343. // documentation.
  1344. // All input parameters that do not have default values must be
  1345. // specified.
  1346. // If parameters with defaults are specified here, the defaults will
  1347. // be
  1348. // overridden.
  1349. Inputs map[string]string `json:"inputs,omitempty"`
  1350. // KeepVmAliveOnFailureDuration: How long to keep the VM up after a
  1351. // failure (for example docker command
  1352. // failed, copying input or output files failed, etc). While the VM is
  1353. // up, one
  1354. // can ssh into the VM to debug. Default is 0; maximum allowed value is
  1355. // 1 day.
  1356. KeepVmAliveOnFailureDuration string `json:"keepVmAliveOnFailureDuration,omitempty"`
  1357. // Labels: Labels to apply to this pipeline run. Labels will also be
  1358. // applied to
  1359. // compute resources (VM, disks) created by this pipeline run. When
  1360. // listing
  1361. // operations, operations can filtered by labels.
  1362. // Label keys may not be empty; label values may be empty. Non-empty
  1363. // labels
  1364. // must be 1-63 characters long, and comply with
  1365. // [RFC1035]
  1366. // (https://www.ietf.org/rfc/rfc1035.txt).
  1367. // Specifically, the name must be 1-63 characters long and match the
  1368. // regular
  1369. // expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the
  1370. // first
  1371. // character must be a lowercase letter, and all following characters
  1372. // must be
  1373. // a dash, lowercase letter, or digit, except the last character, which
  1374. // cannot
  1375. // be a dash.
  1376. Labels map[string]string `json:"labels,omitempty"`
  1377. // Logging: Required. Logging options. Used by the service to
  1378. // communicate results
  1379. // to the user.
  1380. Logging *LoggingOptions `json:"logging,omitempty"`
  1381. // Outputs: Pipeline output arguments; keys are defined in the
  1382. // pipeline
  1383. // documentation. All output parameters of without default values
  1384. // must be specified. If parameters with defaults are specified
  1385. // here, the defaults will be overridden.
  1386. Outputs map[string]string `json:"outputs,omitempty"`
  1387. // ProjectId: Required. The project in which to run the pipeline. The
  1388. // caller must have
  1389. // WRITER access to all Google Cloud services and resources (e.g.
  1390. // Google
  1391. // Compute Engine) will be used.
  1392. ProjectId string `json:"projectId,omitempty"`
  1393. // Resources: Specifies resource requirements/overrides for the pipeline
  1394. // run.
  1395. Resources *PipelineResources `json:"resources,omitempty"`
  1396. // ServiceAccount: The Google Cloud Service Account that will be used to
  1397. // access data and
  1398. // services. By default, the compute service account associated
  1399. // with
  1400. // `projectId` is used.
  1401. ServiceAccount *ServiceAccount `json:"serviceAccount,omitempty"`
  1402. // ForceSendFields is a list of field names (e.g. "ClientId") to
  1403. // unconditionally include in API requests. By default, fields with
  1404. // empty values are omitted from API requests. However, any non-pointer,
  1405. // non-interface field appearing in ForceSendFields will be sent to the
  1406. // server regardless of whether the field is empty or not. This may be
  1407. // used to include empty fields in Patch requests.
  1408. ForceSendFields []string `json:"-"`
  1409. // NullFields is a list of field names (e.g. "ClientId") to include in
  1410. // API requests with the JSON null value. By default, fields with empty
  1411. // values are omitted from API requests. However, any field with an
  1412. // empty value appearing in NullFields will be sent to the server as
  1413. // null. It is an error if a field in this list has a non-empty value.
  1414. // This may be used to include null fields in Patch requests.
  1415. NullFields []string `json:"-"`
  1416. }
  1417. func (s *RunPipelineArgs) MarshalJSON() ([]byte, error) {
  1418. type NoMethod RunPipelineArgs
  1419. raw := NoMethod(*s)
  1420. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1421. }
  1422. // RunPipelineRequest: The request to run a pipeline. If `pipelineId` is
  1423. // specified, it
  1424. // refers to a saved pipeline created with CreatePipeline and set as
  1425. // the `pipelineId` of the returned Pipeline object.
  1426. // If
  1427. // `ephemeralPipeline` is specified, that pipeline is run once
  1428. // with the given args and not saved. It is an error to specify
  1429. // both
  1430. // `pipelineId` and `ephemeralPipeline`. `pipelineArgs`
  1431. // must be specified.
  1432. type RunPipelineRequest struct {
  1433. // EphemeralPipeline: A new pipeline object to run once and then delete.
  1434. EphemeralPipeline *Pipeline `json:"ephemeralPipeline,omitempty"`
  1435. // PipelineArgs: The arguments to use when running this pipeline.
  1436. PipelineArgs *RunPipelineArgs `json:"pipelineArgs,omitempty"`
  1437. // PipelineId: The already created pipeline to run.
  1438. PipelineId string `json:"pipelineId,omitempty"`
  1439. // ForceSendFields is a list of field names (e.g. "EphemeralPipeline")
  1440. // to unconditionally include in API requests. By default, fields with
  1441. // empty values are omitted from API requests. However, any non-pointer,
  1442. // non-interface field appearing in ForceSendFields will be sent to the
  1443. // server regardless of whether the field is empty or not. This may be
  1444. // used to include empty fields in Patch requests.
  1445. ForceSendFields []string `json:"-"`
  1446. // NullFields is a list of field names (e.g. "EphemeralPipeline") to
  1447. // include in API requests with the JSON null value. By default, fields
  1448. // with empty values are omitted from API requests. However, any field
  1449. // with an empty value appearing in NullFields will be sent to the
  1450. // server as null. It is an error if a field in this list has a
  1451. // non-empty value. This may be used to include null fields in Patch
  1452. // requests.
  1453. NullFields []string `json:"-"`
  1454. }
  1455. func (s *RunPipelineRequest) MarshalJSON() ([]byte, error) {
  1456. type NoMethod RunPipelineRequest
  1457. raw := NoMethod(*s)
  1458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1459. }
  1460. // RuntimeMetadata: Runtime metadata that will be populated in
  1461. // the
  1462. // runtimeMetadata
  1463. // field of the Operation associated with a RunPipeline execution.
  1464. type RuntimeMetadata struct {
  1465. // ComputeEngine: Execution information specific to Google Compute
  1466. // Engine.
  1467. ComputeEngine *ComputeEngine `json:"computeEngine,omitempty"`
  1468. // ForceSendFields is a list of field names (e.g. "ComputeEngine") to
  1469. // unconditionally include in API requests. By default, fields with
  1470. // empty values are omitted from API requests. However, any non-pointer,
  1471. // non-interface field appearing in ForceSendFields will be sent to the
  1472. // server regardless of whether the field is empty or not. This may be
  1473. // used to include empty fields in Patch requests.
  1474. ForceSendFields []string `json:"-"`
  1475. // NullFields is a list of field names (e.g. "ComputeEngine") to include
  1476. // in API requests with the JSON null value. By default, fields with
  1477. // empty values are omitted from API requests. However, any field with
  1478. // an empty value appearing in NullFields will be sent to the server as
  1479. // null. It is an error if a field in this list has a non-empty value.
  1480. // This may be used to include null fields in Patch requests.
  1481. NullFields []string `json:"-"`
  1482. }
  1483. func (s *RuntimeMetadata) MarshalJSON() ([]byte, error) {
  1484. type NoMethod RuntimeMetadata
  1485. raw := NoMethod(*s)
  1486. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1487. }
  1488. // ServiceAccount: A Google Cloud Service Account.
  1489. type ServiceAccount struct {
  1490. // Email: Email address of the service account. Defaults to
  1491. // `default`,
  1492. // which uses the compute service account associated with the project.
  1493. Email string `json:"email,omitempty"`
  1494. // Scopes: List of scopes to be enabled for this service account on the
  1495. // VM.
  1496. // The following scopes are automatically included:
  1497. //
  1498. // * https://www.googleapis.com/auth/compute
  1499. // * https://www.googleapis.com/auth/devstorage.full_control
  1500. // * https://www.googleapis.com/auth/genomics
  1501. // * https://www.googleapis.com/auth/logging.write
  1502. // * https://www.googleapis.com/auth/monitoring.write
  1503. Scopes []string `json:"scopes,omitempty"`
  1504. // ForceSendFields is a list of field names (e.g. "Email") to
  1505. // unconditionally include in API requests. By default, fields with
  1506. // empty values are omitted from API requests. However, any non-pointer,
  1507. // non-interface field appearing in ForceSendFields will be sent to the
  1508. // server regardless of whether the field is empty or not. This may be
  1509. // used to include empty fields in Patch requests.
  1510. ForceSendFields []string `json:"-"`
  1511. // NullFields is a list of field names (e.g. "Email") to include in API
  1512. // requests with the JSON null value. By default, fields with empty
  1513. // values are omitted from API requests. However, any field with an
  1514. // empty value appearing in NullFields will be sent to the server as
  1515. // null. It is an error if a field in this list has a non-empty value.
  1516. // This may be used to include null fields in Patch requests.
  1517. NullFields []string `json:"-"`
  1518. }
  1519. func (s *ServiceAccount) MarshalJSON() ([]byte, error) {
  1520. type NoMethod ServiceAccount
  1521. raw := NoMethod(*s)
  1522. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1523. }
  1524. // SetOperationStatusRequest: Request to set operation status. Should
  1525. // only be used by VMs
  1526. // created by the Pipelines Service and not by end users.
  1527. type SetOperationStatusRequest struct {
  1528. // Possible values:
  1529. // "OK" - Not an error; returned on success
  1530. //
  1531. // HTTP Mapping: 200 OK
  1532. // "CANCELLED" - The operation was cancelled, typically by the
  1533. // caller.
  1534. //
  1535. // HTTP Mapping: 499 Client Closed Request
  1536. // "UNKNOWN" - Unknown error. For example, this error may be returned
  1537. // when
  1538. // a `Status` value received from another address space belongs to
  1539. // an error space that is not known in this address space. Also
  1540. // errors raised by APIs that do not return enough error information
  1541. // may be converted to this error.
  1542. //
  1543. // HTTP Mapping: 500 Internal Server Error
  1544. // "INVALID_ARGUMENT" - The client specified an invalid argument.
  1545. // Note that this differs
  1546. // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates
  1547. // arguments
  1548. // that are problematic regardless of the state of the system
  1549. // (e.g., a malformed file name).
  1550. //
  1551. // HTTP Mapping: 400 Bad Request
  1552. // "DEADLINE_EXCEEDED" - The deadline expired before the operation
  1553. // could complete. For operations
  1554. // that change the state of the system, this error may be returned
  1555. // even if the operation has completed successfully. For example,
  1556. // a
  1557. // successful response from a server could have been delayed long
  1558. // enough for the deadline to expire.
  1559. //
  1560. // HTTP Mapping: 504 Gateway Timeout
  1561. // "NOT_FOUND" - Some requested entity (e.g., file or directory) was
  1562. // not found.
  1563. //
  1564. // Note to server developers: if a request is denied for an entire
  1565. // class
  1566. // of users, such as gradual feature rollout or undocumented
  1567. // whitelist,
  1568. // `NOT_FOUND` may be used. If a request is denied for some users
  1569. // within
  1570. // a class of users, such as user-based access control,
  1571. // `PERMISSION_DENIED`
  1572. // must be used.
  1573. //
  1574. // HTTP Mapping: 404 Not Found
  1575. // "ALREADY_EXISTS" - The entity that a client attempted to create
  1576. // (e.g., file or directory)
  1577. // already exists.
  1578. //
  1579. // HTTP Mapping: 409 Conflict
  1580. // "PERMISSION_DENIED" - The caller does not have permission to
  1581. // execute the specified
  1582. // operation. `PERMISSION_DENIED` must not be used for rejections
  1583. // caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
  1584. // instead for those errors). `PERMISSION_DENIED` must not be
  1585. // used if the caller can not be identified (use
  1586. // `UNAUTHENTICATED`
  1587. // instead for those errors). This error code does not imply the
  1588. // request is valid or the requested entity exists or satisfies
  1589. // other pre-conditions.
  1590. //
  1591. // HTTP Mapping: 403 Forbidden
  1592. // "UNAUTHENTICATED" - The request does not have valid authentication
  1593. // credentials for the
  1594. // operation.
  1595. //
  1596. // HTTP Mapping: 401 Unauthorized
  1597. // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
  1598. // per-user quota, or
  1599. // perhaps the entire file system is out of space.
  1600. //
  1601. // HTTP Mapping: 429 Too Many Requests
  1602. // "FAILED_PRECONDITION" - The operation was rejected because the
  1603. // system is not in a state
  1604. // required for the operation's execution. For example, the
  1605. // directory
  1606. // to be deleted is non-empty, an rmdir operation is applied to
  1607. // a non-directory, etc.
  1608. //
  1609. // Service implementors can use the following guidelines to
  1610. // decide
  1611. // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
  1612. // (a) Use `UNAVAILABLE` if the client can retry just the failing
  1613. // call.
  1614. // (b) Use `ABORTED` if the client should retry at a higher level
  1615. // (e.g., when a client-specified test-and-set fails, indicating
  1616. // the
  1617. // client should restart a read-modify-write sequence).
  1618. // (c) Use `FAILED_PRECONDITION` if the client should not retry until
  1619. // the system state has been explicitly fixed. E.g., if an
  1620. // "rmdir"
  1621. // fails because the directory is non-empty, `FAILED_PRECONDITION`
  1622. // should be returned since the client should not retry unless
  1623. // the files are deleted from the directory.
  1624. //
  1625. // HTTP Mapping: 400 Bad Request
  1626. // "ABORTED" - The operation was aborted, typically due to a
  1627. // concurrency issue such as
  1628. // a sequencer check failure or transaction abort.
  1629. //
  1630. // See the guidelines above for deciding between
  1631. // `FAILED_PRECONDITION`,
  1632. // `ABORTED`, and `UNAVAILABLE`.
  1633. //
  1634. // HTTP Mapping: 409 Conflict
  1635. // "OUT_OF_RANGE" - The operation was attempted past the valid range.
  1636. // E.g., seeking or
  1637. // reading past end-of-file.
  1638. //
  1639. // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
  1640. // be fixed if the system state changes. For example, a 32-bit
  1641. // file
  1642. // system will generate `INVALID_ARGUMENT` if asked to read at an
  1643. // offset that is not in the range [0,2^32-1], but it will
  1644. // generate
  1645. // `OUT_OF_RANGE` if asked to read from an offset past the current
  1646. // file size.
  1647. //
  1648. // There is a fair bit of overlap between `FAILED_PRECONDITION`
  1649. // and
  1650. // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more
  1651. // specific
  1652. // error) when it applies so that callers who are iterating through
  1653. // a space can easily look for an `OUT_OF_RANGE` error to detect
  1654. // when
  1655. // they are done.
  1656. //
  1657. // HTTP Mapping: 400 Bad Request
  1658. // "UNIMPLEMENTED" - The operation is not implemented or is not
  1659. // supported/enabled in this
  1660. // service.
  1661. //
  1662. // HTTP Mapping: 501 Not Implemented
  1663. // "INTERNAL" - Internal errors. This means that some invariants
  1664. // expected by the
  1665. // underlying system have been broken. This error code is reserved
  1666. // for serious errors.
  1667. //
  1668. // HTTP Mapping: 500 Internal Server Error
  1669. // "UNAVAILABLE" - The service is currently unavailable. This is most
  1670. // likely a
  1671. // transient condition, which can be corrected by retrying with
  1672. // a backoff.
  1673. //
  1674. // See the guidelines above for deciding between
  1675. // `FAILED_PRECONDITION`,
  1676. // `ABORTED`, and `UNAVAILABLE`.
  1677. //
  1678. // HTTP Mapping: 503 Service Unavailable
  1679. // "DATA_LOSS" - Unrecoverable data loss or corruption.
  1680. //
  1681. // HTTP Mapping: 500 Internal Server Error
  1682. ErrorCode string `json:"errorCode,omitempty"`
  1683. ErrorMessage string `json:"errorMessage,omitempty"`
  1684. OperationId string `json:"operationId,omitempty"`
  1685. TimestampEvents []*TimestampEvent `json:"timestampEvents,omitempty"`
  1686. ValidationToken uint64 `json:"validationToken,omitempty,string"`
  1687. // ForceSendFields is a list of field names (e.g. "ErrorCode") to
  1688. // unconditionally include in API requests. By default, fields with
  1689. // empty values are omitted from API requests. However, any non-pointer,
  1690. // non-interface field appearing in ForceSendFields will be sent to the
  1691. // server regardless of whether the field is empty or not. This may be
  1692. // used to include empty fields in Patch requests.
  1693. ForceSendFields []string `json:"-"`
  1694. // NullFields is a list of field names (e.g. "ErrorCode") to include in
  1695. // API requests with the JSON null value. By default, fields with empty
  1696. // values are omitted from API requests. However, any field with an
  1697. // empty value appearing in NullFields will be sent to the server as
  1698. // null. It is an error if a field in this list has a non-empty value.
  1699. // This may be used to include null fields in Patch requests.
  1700. NullFields []string `json:"-"`
  1701. }
  1702. func (s *SetOperationStatusRequest) MarshalJSON() ([]byte, error) {
  1703. type NoMethod SetOperationStatusRequest
  1704. raw := NoMethod(*s)
  1705. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1706. }
  1707. // Status: The `Status` type defines a logical error model that is
  1708. // suitable for different
  1709. // programming environments, including REST APIs and RPC APIs. It is
  1710. // used by
  1711. // [gRPC](https://github.com/grpc). The error model is designed to
  1712. // be:
  1713. //
  1714. // - Simple to use and understand for most users
  1715. // - Flexible enough to meet unexpected needs
  1716. //
  1717. // # Overview
  1718. //
  1719. // The `Status` message contains three pieces of data: error code, error
  1720. // message,
  1721. // and error details. The error code should be an enum value
  1722. // of
  1723. // google.rpc.Code, but it may accept additional error codes if needed.
  1724. // The
  1725. // error message should be a developer-facing English message that
  1726. // helps
  1727. // developers *understand* and *resolve* the error. If a localized
  1728. // user-facing
  1729. // error message is needed, put the localized message in the error
  1730. // details or
  1731. // localize it in the client. The optional error details may contain
  1732. // arbitrary
  1733. // information about the error. There is a predefined set of error
  1734. // detail types
  1735. // in the package `google.rpc` that can be used for common error
  1736. // conditions.
  1737. //
  1738. // # Language mapping
  1739. //
  1740. // The `Status` message is the logical representation of the error
  1741. // model, but it
  1742. // is not necessarily the actual wire format. When the `Status` message
  1743. // is
  1744. // exposed in different client libraries and different wire protocols,
  1745. // it can be
  1746. // mapped differently. For example, it will likely be mapped to some
  1747. // exceptions
  1748. // in Java, but more likely mapped to some error codes in C.
  1749. //
  1750. // # Other uses
  1751. //
  1752. // The error model and the `Status` message can be used in a variety
  1753. // of
  1754. // environments, either with or without APIs, to provide a
  1755. // consistent developer experience across different
  1756. // environments.
  1757. //
  1758. // Example uses of this error model include:
  1759. //
  1760. // - Partial errors. If a service needs to return partial errors to the
  1761. // client,
  1762. // it may embed the `Status` in the normal response to indicate the
  1763. // partial
  1764. // errors.
  1765. //
  1766. // - Workflow errors. A typical workflow has multiple steps. Each step
  1767. // may
  1768. // have a `Status` message for error reporting.
  1769. //
  1770. // - Batch operations. If a client uses batch request and batch
  1771. // response, the
  1772. // `Status` message should be used directly inside batch response,
  1773. // one for
  1774. // each error sub-response.
  1775. //
  1776. // - Asynchronous operations. If an API call embeds asynchronous
  1777. // operation
  1778. // results in its response, the status of those operations should
  1779. // be
  1780. // represented directly using the `Status` message.
  1781. //
  1782. // - Logging. If some API errors are stored in logs, the message
  1783. // `Status` could
  1784. // be used directly after any stripping needed for security/privacy
  1785. // reasons.
  1786. type Status struct {
  1787. // Code: The status code, which should be an enum value of
  1788. // google.rpc.Code.
  1789. Code int64 `json:"code,omitempty"`
  1790. // Details: A list of messages that carry the error details. There is a
  1791. // common set of
  1792. // message types for APIs to use.
  1793. Details []googleapi.RawMessage `json:"details,omitempty"`
  1794. // Message: A developer-facing error message, which should be in
  1795. // English. Any
  1796. // user-facing error message should be localized and sent in
  1797. // the
  1798. // google.rpc.Status.details field, or localized by the client.
  1799. Message string `json:"message,omitempty"`
  1800. // ForceSendFields is a list of field names (e.g. "Code") to
  1801. // unconditionally include in API requests. By default, fields with
  1802. // empty values are omitted from API requests. However, any non-pointer,
  1803. // non-interface field appearing in ForceSendFields will be sent to the
  1804. // server regardless of whether the field is empty or not. This may be
  1805. // used to include empty fields in Patch requests.
  1806. ForceSendFields []string `json:"-"`
  1807. // NullFields is a list of field names (e.g. "Code") to include in API
  1808. // requests with the JSON null value. By default, fields with empty
  1809. // values are omitted from API requests. However, any field with an
  1810. // empty value appearing in NullFields will be sent to the server as
  1811. // null. It is an error if a field in this list has a non-empty value.
  1812. // This may be used to include null fields in Patch requests.
  1813. NullFields []string `json:"-"`
  1814. }
  1815. func (s *Status) MarshalJSON() ([]byte, error) {
  1816. type NoMethod Status
  1817. raw := NoMethod(*s)
  1818. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1819. }
  1820. // TimestampEvent: Stores the list of events and times they occured for
  1821. // major events in job
  1822. // execution.
  1823. type TimestampEvent struct {
  1824. // Description: String indicating the type of event
  1825. Description string `json:"description,omitempty"`
  1826. // Timestamp: The time this event occured.
  1827. Timestamp string `json:"timestamp,omitempty"`
  1828. // ForceSendFields is a list of field names (e.g. "Description") to
  1829. // unconditionally include in API requests. By default, fields with
  1830. // empty values are omitted from API requests. However, any non-pointer,
  1831. // non-interface field appearing in ForceSendFields will be sent to the
  1832. // server regardless of whether the field is empty or not. This may be
  1833. // used to include empty fields in Patch requests.
  1834. ForceSendFields []string `json:"-"`
  1835. // NullFields is a list of field names (e.g. "Description") to include
  1836. // in API requests with the JSON null value. By default, fields with
  1837. // empty values are omitted from API requests. However, any field with
  1838. // an empty value appearing in NullFields will be sent to the server as
  1839. // null. It is an error if a field in this list has a non-empty value.
  1840. // This may be used to include null fields in Patch requests.
  1841. NullFields []string `json:"-"`
  1842. }
  1843. func (s *TimestampEvent) MarshalJSON() ([]byte, error) {
  1844. type NoMethod TimestampEvent
  1845. raw := NoMethod(*s)
  1846. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1847. }
  1848. // UnexpectedExitStatusEvent: This event is generated when the execution
  1849. // of a container results in a
  1850. // non-zero exit status that was not otherwise ignored. Execution
  1851. // will
  1852. // continue, but only actions that are flagged as ALWAYS_RUN will be
  1853. // executed:
  1854. // other actions will be skipped.
  1855. type UnexpectedExitStatusEvent struct {
  1856. // ActionId: The numeric ID of the action that started the container.
  1857. ActionId int64 `json:"actionId,omitempty"`
  1858. // ExitStatus: The exit status of the container.
  1859. ExitStatus int64 `json:"exitStatus,omitempty"`
  1860. // ForceSendFields is a list of field names (e.g. "ActionId") to
  1861. // unconditionally include in API requests. By default, fields with
  1862. // empty values are omitted from API requests. However, any non-pointer,
  1863. // non-interface field appearing in ForceSendFields will be sent to the
  1864. // server regardless of whether the field is empty or not. This may be
  1865. // used to include empty fields in Patch requests.
  1866. ForceSendFields []string `json:"-"`
  1867. // NullFields is a list of field names (e.g. "ActionId") to include in
  1868. // API requests with the JSON null value. By default, fields with empty
  1869. // values are omitted from API requests. However, any field with an
  1870. // empty value appearing in NullFields will be sent to the server as
  1871. // null. It is an error if a field in this list has a non-empty value.
  1872. // This may be used to include null fields in Patch requests.
  1873. NullFields []string `json:"-"`
  1874. }
  1875. func (s *UnexpectedExitStatusEvent) MarshalJSON() ([]byte, error) {
  1876. type NoMethod UnexpectedExitStatusEvent
  1877. raw := NoMethod(*s)
  1878. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1879. }
  1880. // WorkerAssignedEvent: This event is generated once a worker VM has
  1881. // been assigned to run the
  1882. // pipeline.
  1883. type WorkerAssignedEvent struct {
  1884. // Instance: The worker's instance name.
  1885. Instance string `json:"instance,omitempty"`
  1886. // Zone: The zone the worker is running in.
  1887. Zone string `json:"zone,omitempty"`
  1888. // ForceSendFields is a list of field names (e.g. "Instance") to
  1889. // unconditionally include in API requests. By default, fields with
  1890. // empty values are omitted from API requests. However, any non-pointer,
  1891. // non-interface field appearing in ForceSendFields will be sent to the
  1892. // server regardless of whether the field is empty or not. This may be
  1893. // used to include empty fields in Patch requests.
  1894. ForceSendFields []string `json:"-"`
  1895. // NullFields is a list of field names (e.g. "Instance") to include in
  1896. // API requests with the JSON null value. By default, fields with empty
  1897. // values are omitted from API requests. However, any field with an
  1898. // empty value appearing in NullFields will be sent to the server as
  1899. // null. It is an error if a field in this list has a non-empty value.
  1900. // This may be used to include null fields in Patch requests.
  1901. NullFields []string `json:"-"`
  1902. }
  1903. func (s *WorkerAssignedEvent) MarshalJSON() ([]byte, error) {
  1904. type NoMethod WorkerAssignedEvent
  1905. raw := NoMethod(*s)
  1906. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1907. }
  1908. // WorkerReleasedEvent: This event is generated when the worker VM that
  1909. // was assigned to the pipeline
  1910. // has been released (i.e., deleted).
  1911. type WorkerReleasedEvent struct {
  1912. // Instance: The worker's instance name.
  1913. Instance string `json:"instance,omitempty"`
  1914. // Zone: The zone the worker was running in.
  1915. Zone string `json:"zone,omitempty"`
  1916. // ForceSendFields is a list of field names (e.g. "Instance") to
  1917. // unconditionally include in API requests. By default, fields with
  1918. // empty values are omitted from API requests. However, any non-pointer,
  1919. // non-interface field appearing in ForceSendFields will be sent to the
  1920. // server regardless of whether the field is empty or not. This may be
  1921. // used to include empty fields in Patch requests.
  1922. ForceSendFields []string `json:"-"`
  1923. // NullFields is a list of field names (e.g. "Instance") to include in
  1924. // API requests with the JSON null value. By default, fields with empty
  1925. // values are omitted from API requests. However, any field with an
  1926. // empty value appearing in NullFields will be sent to the server as
  1927. // null. It is an error if a field in this list has a non-empty value.
  1928. // This may be used to include null fields in Patch requests.
  1929. NullFields []string `json:"-"`
  1930. }
  1931. func (s *WorkerReleasedEvent) MarshalJSON() ([]byte, error) {
  1932. type NoMethod WorkerReleasedEvent
  1933. raw := NoMethod(*s)
  1934. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1935. }
  1936. // method id "genomics.operations.cancel":
  1937. type OperationsCancelCall struct {
  1938. s *Service
  1939. name string
  1940. canceloperationrequest *CancelOperationRequest
  1941. urlParams_ gensupport.URLParams
  1942. ctx_ context.Context
  1943. header_ http.Header
  1944. }
  1945. // Cancel: Starts asynchronous cancellation on a long-running operation.
  1946. // The server makes a best effort to cancel the operation, but success
  1947. // is not guaranteed. Clients may use Operations.GetOperation or
  1948. // Operations.ListOperations to check whether the cancellation succeeded
  1949. // or the operation completed despite cancellation.
  1950. func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
  1951. c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1952. c.name = name
  1953. c.canceloperationrequest = canceloperationrequest
  1954. return c
  1955. }
  1956. // Fields allows partial responses to be retrieved. See
  1957. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1958. // for more information.
  1959. func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
  1960. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1961. return c
  1962. }
  1963. // Context sets the context to be used in this call's Do method. Any
  1964. // pending HTTP request will be aborted if the provided context is
  1965. // canceled.
  1966. func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
  1967. c.ctx_ = ctx
  1968. return c
  1969. }
  1970. // Header returns an http.Header that can be modified by the caller to
  1971. // add HTTP headers to the request.
  1972. func (c *OperationsCancelCall) Header() http.Header {
  1973. if c.header_ == nil {
  1974. c.header_ = make(http.Header)
  1975. }
  1976. return c.header_
  1977. }
  1978. func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  1979. reqHeaders := make(http.Header)
  1980. for k, v := range c.header_ {
  1981. reqHeaders[k] = v
  1982. }
  1983. reqHeaders.Set("User-Agent", c.s.userAgent())
  1984. var body io.Reader = nil
  1985. body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  1986. if err != nil {
  1987. return nil, err
  1988. }
  1989. reqHeaders.Set("Content-Type", "application/json")
  1990. c.urlParams_.Set("alt", alt)
  1991. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}:cancel")
  1992. urls += "?" + c.urlParams_.Encode()
  1993. req, _ := http.NewRequest("POST", urls, body)
  1994. req.Header = reqHeaders
  1995. googleapi.Expand(req.URL, map[string]string{
  1996. "name": c.name,
  1997. })
  1998. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1999. }
  2000. // Do executes the "genomics.operations.cancel" call.
  2001. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2002. // code is an error. Response headers are in either
  2003. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2004. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2005. // check whether the returned error was because http.StatusNotModified
  2006. // was returned.
  2007. func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2008. gensupport.SetOptions(c.urlParams_, opts...)
  2009. res, err := c.doRequest("json")
  2010. if res != nil && res.StatusCode == http.StatusNotModified {
  2011. if res.Body != nil {
  2012. res.Body.Close()
  2013. }
  2014. return nil, &googleapi.Error{
  2015. Code: res.StatusCode,
  2016. Header: res.Header,
  2017. }
  2018. }
  2019. if err != nil {
  2020. return nil, err
  2021. }
  2022. defer googleapi.CloseBody(res)
  2023. if err := googleapi.CheckResponse(res); err != nil {
  2024. return nil, err
  2025. }
  2026. ret := &Empty{
  2027. ServerResponse: googleapi.ServerResponse{
  2028. Header: res.Header,
  2029. HTTPStatusCode: res.StatusCode,
  2030. },
  2031. }
  2032. target := &ret
  2033. if err := gensupport.DecodeResponse(target, res); err != nil {
  2034. return nil, err
  2035. }
  2036. return ret, nil
  2037. // {
  2038. // "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.",
  2039. // "flatPath": "v1alpha2/operations/{operationsId}:cancel",
  2040. // "httpMethod": "POST",
  2041. // "id": "genomics.operations.cancel",
  2042. // "parameterOrder": [
  2043. // "name"
  2044. // ],
  2045. // "parameters": {
  2046. // "name": {
  2047. // "description": "The name of the operation resource to be cancelled.",
  2048. // "location": "path",
  2049. // "pattern": "^operations/.+$",
  2050. // "required": true,
  2051. // "type": "string"
  2052. // }
  2053. // },
  2054. // "path": "v1alpha2/{+name}:cancel",
  2055. // "request": {
  2056. // "$ref": "CancelOperationRequest"
  2057. // },
  2058. // "response": {
  2059. // "$ref": "Empty"
  2060. // },
  2061. // "scopes": [
  2062. // "https://www.googleapis.com/auth/cloud-platform",
  2063. // "https://www.googleapis.com/auth/genomics"
  2064. // ]
  2065. // }
  2066. }
  2067. // method id "genomics.operations.get":
  2068. type OperationsGetCall struct {
  2069. s *Service
  2070. name string
  2071. urlParams_ gensupport.URLParams
  2072. ifNoneMatch_ string
  2073. ctx_ context.Context
  2074. header_ http.Header
  2075. }
  2076. // Get: Gets the latest state of a long-running operation. Clients can
  2077. // use this
  2078. // method to poll the operation result at intervals as recommended by
  2079. // the API
  2080. // service.
  2081. func (r *OperationsService) Get(name string) *OperationsGetCall {
  2082. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2083. c.name = name
  2084. return c
  2085. }
  2086. // Fields allows partial responses to be retrieved. See
  2087. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2088. // for more information.
  2089. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  2090. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2091. return c
  2092. }
  2093. // IfNoneMatch sets the optional parameter which makes the operation
  2094. // fail if the object's ETag matches the given value. This is useful for
  2095. // getting updates only after the object has changed since the last
  2096. // request. Use googleapi.IsNotModified to check whether the response
  2097. // error from Do is the result of In-None-Match.
  2098. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  2099. c.ifNoneMatch_ = entityTag
  2100. return c
  2101. }
  2102. // Context sets the context to be used in this call's Do method. Any
  2103. // pending HTTP request will be aborted if the provided context is
  2104. // canceled.
  2105. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  2106. c.ctx_ = ctx
  2107. return c
  2108. }
  2109. // Header returns an http.Header that can be modified by the caller to
  2110. // add HTTP headers to the request.
  2111. func (c *OperationsGetCall) Header() http.Header {
  2112. if c.header_ == nil {
  2113. c.header_ = make(http.Header)
  2114. }
  2115. return c.header_
  2116. }
  2117. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  2118. reqHeaders := make(http.Header)
  2119. for k, v := range c.header_ {
  2120. reqHeaders[k] = v
  2121. }
  2122. reqHeaders.Set("User-Agent", c.s.userAgent())
  2123. if c.ifNoneMatch_ != "" {
  2124. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2125. }
  2126. var body io.Reader = nil
  2127. c.urlParams_.Set("alt", alt)
  2128. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  2129. urls += "?" + c.urlParams_.Encode()
  2130. req, _ := http.NewRequest("GET", urls, body)
  2131. req.Header = reqHeaders
  2132. googleapi.Expand(req.URL, map[string]string{
  2133. "name": c.name,
  2134. })
  2135. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2136. }
  2137. // Do executes the "genomics.operations.get" call.
  2138. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  2139. // status code is an error. Response headers are in either
  2140. // *Operation.ServerResponse.Header or (if a response was returned at
  2141. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2142. // to check whether the returned error was because
  2143. // http.StatusNotModified was returned.
  2144. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  2145. gensupport.SetOptions(c.urlParams_, opts...)
  2146. res, err := c.doRequest("json")
  2147. if res != nil && res.StatusCode == http.StatusNotModified {
  2148. if res.Body != nil {
  2149. res.Body.Close()
  2150. }
  2151. return nil, &googleapi.Error{
  2152. Code: res.StatusCode,
  2153. Header: res.Header,
  2154. }
  2155. }
  2156. if err != nil {
  2157. return nil, err
  2158. }
  2159. defer googleapi.CloseBody(res)
  2160. if err := googleapi.CheckResponse(res); err != nil {
  2161. return nil, err
  2162. }
  2163. ret := &Operation{
  2164. ServerResponse: googleapi.ServerResponse{
  2165. Header: res.Header,
  2166. HTTPStatusCode: res.StatusCode,
  2167. },
  2168. }
  2169. target := &ret
  2170. if err := gensupport.DecodeResponse(target, res); err != nil {
  2171. return nil, err
  2172. }
  2173. return ret, nil
  2174. // {
  2175. // "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.",
  2176. // "flatPath": "v1alpha2/operations/{operationsId}",
  2177. // "httpMethod": "GET",
  2178. // "id": "genomics.operations.get",
  2179. // "parameterOrder": [
  2180. // "name"
  2181. // ],
  2182. // "parameters": {
  2183. // "name": {
  2184. // "description": "The name of the operation resource.",
  2185. // "location": "path",
  2186. // "pattern": "^operations/.+$",
  2187. // "required": true,
  2188. // "type": "string"
  2189. // }
  2190. // },
  2191. // "path": "v1alpha2/{+name}",
  2192. // "response": {
  2193. // "$ref": "Operation"
  2194. // },
  2195. // "scopes": [
  2196. // "https://www.googleapis.com/auth/cloud-platform",
  2197. // "https://www.googleapis.com/auth/genomics"
  2198. // ]
  2199. // }
  2200. }
  2201. // method id "genomics.operations.list":
  2202. type OperationsListCall struct {
  2203. s *Service
  2204. name string
  2205. urlParams_ gensupport.URLParams
  2206. ifNoneMatch_ string
  2207. ctx_ context.Context
  2208. header_ http.Header
  2209. }
  2210. // List: Lists operations that match the specified filter in the
  2211. // request.
  2212. func (r *OperationsService) List(name string) *OperationsListCall {
  2213. c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2214. c.name = name
  2215. return c
  2216. }
  2217. // Filter sets the optional parameter "filter": A string for filtering
  2218. // Operations.
  2219. // In v2alpha1, the following filter fields are supported&#58;
  2220. //
  2221. // * createTime&#58; The time this job was created
  2222. // * events&#58; The set of event (names) that have occurred while
  2223. // running
  2224. // the pipeline. The &#58; operator can be used to determine if a
  2225. // particular event has occurred.
  2226. // * error&#58; If the pipeline is running, this value is NULL. Once
  2227. // the
  2228. // pipeline finishes, the value is the standard Google error code.
  2229. // * labels.key or labels."key with space" where key is a label key.
  2230. //
  2231. // In v1 and v1alpha2, the following filter fields are supported&#58;
  2232. //
  2233. // * projectId&#58; Required. Corresponds to
  2234. // OperationMetadata.projectId.
  2235. // * createTime&#58; The time this job was created, in seconds from the
  2236. // [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=`
  2237. // and/or `<=`
  2238. // operators.
  2239. // * status&#58; Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`.
  2240. // Only
  2241. // one status may be specified.
  2242. // * labels.key where key is a label key.
  2243. //
  2244. // Examples&#58;
  2245. //
  2246. // * `projectId = my-project AND createTime >= 1432140000`
  2247. // * `projectId = my-project AND createTime >= 1432140000 AND createTime
  2248. // <= 1432150000 AND status = RUNNING`
  2249. // * `projectId = my-project AND labels.color = *`
  2250. // * `projectId = my-project AND labels.color = red`
  2251. func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  2252. c.urlParams_.Set("filter", filter)
  2253. return c
  2254. }
  2255. // PageSize sets the optional parameter "pageSize": The maximum number
  2256. // of results to return. If unspecified, defaults to
  2257. // 256. The maximum value is 2048.
  2258. func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
  2259. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2260. return c
  2261. }
  2262. // PageToken sets the optional parameter "pageToken": The standard list
  2263. // page token.
  2264. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  2265. c.urlParams_.Set("pageToken", pageToken)
  2266. return c
  2267. }
  2268. // Fields allows partial responses to be retrieved. See
  2269. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2270. // for more information.
  2271. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  2272. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2273. return c
  2274. }
  2275. // IfNoneMatch sets the optional parameter which makes the operation
  2276. // fail if the object's ETag matches the given value. This is useful for
  2277. // getting updates only after the object has changed since the last
  2278. // request. Use googleapi.IsNotModified to check whether the response
  2279. // error from Do is the result of In-None-Match.
  2280. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  2281. c.ifNoneMatch_ = entityTag
  2282. return c
  2283. }
  2284. // Context sets the context to be used in this call's Do method. Any
  2285. // pending HTTP request will be aborted if the provided context is
  2286. // canceled.
  2287. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  2288. c.ctx_ = ctx
  2289. return c
  2290. }
  2291. // Header returns an http.Header that can be modified by the caller to
  2292. // add HTTP headers to the request.
  2293. func (c *OperationsListCall) Header() http.Header {
  2294. if c.header_ == nil {
  2295. c.header_ = make(http.Header)
  2296. }
  2297. return c.header_
  2298. }
  2299. func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  2300. reqHeaders := make(http.Header)
  2301. for k, v := range c.header_ {
  2302. reqHeaders[k] = v
  2303. }
  2304. reqHeaders.Set("User-Agent", c.s.userAgent())
  2305. if c.ifNoneMatch_ != "" {
  2306. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2307. }
  2308. var body io.Reader = nil
  2309. c.urlParams_.Set("alt", alt)
  2310. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/{+name}")
  2311. urls += "?" + c.urlParams_.Encode()
  2312. req, _ := http.NewRequest("GET", urls, body)
  2313. req.Header = reqHeaders
  2314. googleapi.Expand(req.URL, map[string]string{
  2315. "name": c.name,
  2316. })
  2317. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2318. }
  2319. // Do executes the "genomics.operations.list" call.
  2320. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  2321. // non-2xx status code is an error. Response headers are in either
  2322. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  2323. // returned at all) in error.(*googleapi.Error).Header. Use
  2324. // googleapi.IsNotModified to check whether the returned error was
  2325. // because http.StatusNotModified was returned.
  2326. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  2327. gensupport.SetOptions(c.urlParams_, opts...)
  2328. res, err := c.doRequest("json")
  2329. if res != nil && res.StatusCode == http.StatusNotModified {
  2330. if res.Body != nil {
  2331. res.Body.Close()
  2332. }
  2333. return nil, &googleapi.Error{
  2334. Code: res.StatusCode,
  2335. Header: res.Header,
  2336. }
  2337. }
  2338. if err != nil {
  2339. return nil, err
  2340. }
  2341. defer googleapi.CloseBody(res)
  2342. if err := googleapi.CheckResponse(res); err != nil {
  2343. return nil, err
  2344. }
  2345. ret := &ListOperationsResponse{
  2346. ServerResponse: googleapi.ServerResponse{
  2347. Header: res.Header,
  2348. HTTPStatusCode: res.StatusCode,
  2349. },
  2350. }
  2351. target := &ret
  2352. if err := gensupport.DecodeResponse(target, res); err != nil {
  2353. return nil, err
  2354. }
  2355. return ret, nil
  2356. // {
  2357. // "description": "Lists operations that match the specified filter in the request.",
  2358. // "flatPath": "v1alpha2/operations",
  2359. // "httpMethod": "GET",
  2360. // "id": "genomics.operations.list",
  2361. // "parameterOrder": [
  2362. // "name"
  2363. // ],
  2364. // "parameters": {
  2365. // "filter": {
  2366. // "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`",
  2367. // "location": "query",
  2368. // "type": "string"
  2369. // },
  2370. // "name": {
  2371. // "description": "The name of the operation's parent resource.",
  2372. // "location": "path",
  2373. // "pattern": "^operations$",
  2374. // "required": true,
  2375. // "type": "string"
  2376. // },
  2377. // "pageSize": {
  2378. // "description": "The maximum number of results to return. If unspecified, defaults to\n256. The maximum value is 2048.",
  2379. // "format": "int32",
  2380. // "location": "query",
  2381. // "type": "integer"
  2382. // },
  2383. // "pageToken": {
  2384. // "description": "The standard list page token.",
  2385. // "location": "query",
  2386. // "type": "string"
  2387. // }
  2388. // },
  2389. // "path": "v1alpha2/{+name}",
  2390. // "response": {
  2391. // "$ref": "ListOperationsResponse"
  2392. // },
  2393. // "scopes": [
  2394. // "https://www.googleapis.com/auth/cloud-platform",
  2395. // "https://www.googleapis.com/auth/genomics"
  2396. // ]
  2397. // }
  2398. }
  2399. // Pages invokes f for each page of results.
  2400. // A non-nil error returned from f will halt the iteration.
  2401. // The provided context supersedes any context provided to the Context method.
  2402. func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  2403. c.ctx_ = ctx
  2404. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  2405. for {
  2406. x, err := c.Do()
  2407. if err != nil {
  2408. return err
  2409. }
  2410. if err := f(x); err != nil {
  2411. return err
  2412. }
  2413. if x.NextPageToken == "" {
  2414. return nil
  2415. }
  2416. c.PageToken(x.NextPageToken)
  2417. }
  2418. }
  2419. // method id "genomics.pipelines.create":
  2420. type PipelinesCreateCall struct {
  2421. s *Service
  2422. pipeline *Pipeline
  2423. urlParams_ gensupport.URLParams
  2424. ctx_ context.Context
  2425. header_ http.Header
  2426. }
  2427. // Create: Creates a pipeline that can be run later. Create takes a
  2428. // Pipeline that
  2429. // has all fields other than `pipelineId` populated, and then
  2430. // returns
  2431. // the same pipeline with `pipelineId` populated. This id can be used
  2432. // to run the pipeline.
  2433. //
  2434. // Caller must have WRITE permission to the project.
  2435. func (r *PipelinesService) Create(pipeline *Pipeline) *PipelinesCreateCall {
  2436. c := &PipelinesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2437. c.pipeline = pipeline
  2438. return c
  2439. }
  2440. // Fields allows partial responses to be retrieved. See
  2441. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2442. // for more information.
  2443. func (c *PipelinesCreateCall) Fields(s ...googleapi.Field) *PipelinesCreateCall {
  2444. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2445. return c
  2446. }
  2447. // Context sets the context to be used in this call's Do method. Any
  2448. // pending HTTP request will be aborted if the provided context is
  2449. // canceled.
  2450. func (c *PipelinesCreateCall) Context(ctx context.Context) *PipelinesCreateCall {
  2451. c.ctx_ = ctx
  2452. return c
  2453. }
  2454. // Header returns an http.Header that can be modified by the caller to
  2455. // add HTTP headers to the request.
  2456. func (c *PipelinesCreateCall) Header() http.Header {
  2457. if c.header_ == nil {
  2458. c.header_ = make(http.Header)
  2459. }
  2460. return c.header_
  2461. }
  2462. func (c *PipelinesCreateCall) doRequest(alt string) (*http.Response, error) {
  2463. reqHeaders := make(http.Header)
  2464. for k, v := range c.header_ {
  2465. reqHeaders[k] = v
  2466. }
  2467. reqHeaders.Set("User-Agent", c.s.userAgent())
  2468. var body io.Reader = nil
  2469. body, err := googleapi.WithoutDataWrapper.JSONReader(c.pipeline)
  2470. if err != nil {
  2471. return nil, err
  2472. }
  2473. reqHeaders.Set("Content-Type", "application/json")
  2474. c.urlParams_.Set("alt", alt)
  2475. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/pipelines")
  2476. urls += "?" + c.urlParams_.Encode()
  2477. req, _ := http.NewRequest("POST", urls, body)
  2478. req.Header = reqHeaders
  2479. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2480. }
  2481. // Do executes the "genomics.pipelines.create" call.
  2482. // Exactly one of *Pipeline or error will be non-nil. Any non-2xx status
  2483. // code is an error. Response headers are in either
  2484. // *Pipeline.ServerResponse.Header or (if a response was returned at
  2485. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2486. // to check whether the returned error was because
  2487. // http.StatusNotModified was returned.
  2488. func (c *PipelinesCreateCall) Do(opts ...googleapi.CallOption) (*Pipeline, error) {
  2489. gensupport.SetOptions(c.urlParams_, opts...)
  2490. res, err := c.doRequest("json")
  2491. if res != nil && res.StatusCode == http.StatusNotModified {
  2492. if res.Body != nil {
  2493. res.Body.Close()
  2494. }
  2495. return nil, &googleapi.Error{
  2496. Code: res.StatusCode,
  2497. Header: res.Header,
  2498. }
  2499. }
  2500. if err != nil {
  2501. return nil, err
  2502. }
  2503. defer googleapi.CloseBody(res)
  2504. if err := googleapi.CheckResponse(res); err != nil {
  2505. return nil, err
  2506. }
  2507. ret := &Pipeline{
  2508. ServerResponse: googleapi.ServerResponse{
  2509. Header: res.Header,
  2510. HTTPStatusCode: res.StatusCode,
  2511. },
  2512. }
  2513. target := &ret
  2514. if err := gensupport.DecodeResponse(target, res); err != nil {
  2515. return nil, err
  2516. }
  2517. return ret, nil
  2518. // {
  2519. // "description": "Creates a pipeline that can be run later. Create takes a Pipeline that\nhas all fields other than `pipelineId` populated, and then returns\nthe same pipeline with `pipelineId` populated. This id can be used\nto run the pipeline.\n\nCaller must have WRITE permission to the project.",
  2520. // "flatPath": "v1alpha2/pipelines",
  2521. // "httpMethod": "POST",
  2522. // "id": "genomics.pipelines.create",
  2523. // "parameterOrder": [],
  2524. // "parameters": {},
  2525. // "path": "v1alpha2/pipelines",
  2526. // "request": {
  2527. // "$ref": "Pipeline"
  2528. // },
  2529. // "response": {
  2530. // "$ref": "Pipeline"
  2531. // },
  2532. // "scopes": [
  2533. // "https://www.googleapis.com/auth/cloud-platform",
  2534. // "https://www.googleapis.com/auth/genomics"
  2535. // ]
  2536. // }
  2537. }
  2538. // method id "genomics.pipelines.delete":
  2539. type PipelinesDeleteCall struct {
  2540. s *Service
  2541. pipelineId string
  2542. urlParams_ gensupport.URLParams
  2543. ctx_ context.Context
  2544. header_ http.Header
  2545. }
  2546. // Delete: Deletes a pipeline based on ID.
  2547. //
  2548. // Caller must have WRITE permission to the project.
  2549. func (r *PipelinesService) Delete(pipelineId string) *PipelinesDeleteCall {
  2550. c := &PipelinesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2551. c.pipelineId = pipelineId
  2552. return c
  2553. }
  2554. // Fields allows partial responses to be retrieved. See
  2555. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2556. // for more information.
  2557. func (c *PipelinesDeleteCall) Fields(s ...googleapi.Field) *PipelinesDeleteCall {
  2558. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2559. return c
  2560. }
  2561. // Context sets the context to be used in this call's Do method. Any
  2562. // pending HTTP request will be aborted if the provided context is
  2563. // canceled.
  2564. func (c *PipelinesDeleteCall) Context(ctx context.Context) *PipelinesDeleteCall {
  2565. c.ctx_ = ctx
  2566. return c
  2567. }
  2568. // Header returns an http.Header that can be modified by the caller to
  2569. // add HTTP headers to the request.
  2570. func (c *PipelinesDeleteCall) Header() http.Header {
  2571. if c.header_ == nil {
  2572. c.header_ = make(http.Header)
  2573. }
  2574. return c.header_
  2575. }
  2576. func (c *PipelinesDeleteCall) doRequest(alt string) (*http.Response, error) {
  2577. reqHeaders := make(http.Header)
  2578. for k, v := range c.header_ {
  2579. reqHeaders[k] = v
  2580. }
  2581. reqHeaders.Set("User-Agent", c.s.userAgent())
  2582. var body io.Reader = nil
  2583. c.urlParams_.Set("alt", alt)
  2584. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/pipelines/{pipelineId}")
  2585. urls += "?" + c.urlParams_.Encode()
  2586. req, _ := http.NewRequest("DELETE", urls, body)
  2587. req.Header = reqHeaders
  2588. googleapi.Expand(req.URL, map[string]string{
  2589. "pipelineId": c.pipelineId,
  2590. })
  2591. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2592. }
  2593. // Do executes the "genomics.pipelines.delete" call.
  2594. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  2595. // code is an error. Response headers are in either
  2596. // *Empty.ServerResponse.Header or (if a response was returned at all)
  2597. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  2598. // check whether the returned error was because http.StatusNotModified
  2599. // was returned.
  2600. func (c *PipelinesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  2601. gensupport.SetOptions(c.urlParams_, opts...)
  2602. res, err := c.doRequest("json")
  2603. if res != nil && res.StatusCode == http.StatusNotModified {
  2604. if res.Body != nil {
  2605. res.Body.Close()
  2606. }
  2607. return nil, &googleapi.Error{
  2608. Code: res.StatusCode,
  2609. Header: res.Header,
  2610. }
  2611. }
  2612. if err != nil {
  2613. return nil, err
  2614. }
  2615. defer googleapi.CloseBody(res)
  2616. if err := googleapi.CheckResponse(res); err != nil {
  2617. return nil, err
  2618. }
  2619. ret := &Empty{
  2620. ServerResponse: googleapi.ServerResponse{
  2621. Header: res.Header,
  2622. HTTPStatusCode: res.StatusCode,
  2623. },
  2624. }
  2625. target := &ret
  2626. if err := gensupport.DecodeResponse(target, res); err != nil {
  2627. return nil, err
  2628. }
  2629. return ret, nil
  2630. // {
  2631. // "description": "Deletes a pipeline based on ID.\n\nCaller must have WRITE permission to the project.",
  2632. // "flatPath": "v1alpha2/pipelines/{pipelineId}",
  2633. // "httpMethod": "DELETE",
  2634. // "id": "genomics.pipelines.delete",
  2635. // "parameterOrder": [
  2636. // "pipelineId"
  2637. // ],
  2638. // "parameters": {
  2639. // "pipelineId": {
  2640. // "description": "Caller must have WRITE access to the project in which this pipeline\nis defined.",
  2641. // "location": "path",
  2642. // "required": true,
  2643. // "type": "string"
  2644. // }
  2645. // },
  2646. // "path": "v1alpha2/pipelines/{pipelineId}",
  2647. // "response": {
  2648. // "$ref": "Empty"
  2649. // },
  2650. // "scopes": [
  2651. // "https://www.googleapis.com/auth/cloud-platform",
  2652. // "https://www.googleapis.com/auth/genomics"
  2653. // ]
  2654. // }
  2655. }
  2656. // method id "genomics.pipelines.get":
  2657. type PipelinesGetCall struct {
  2658. s *Service
  2659. pipelineId string
  2660. urlParams_ gensupport.URLParams
  2661. ifNoneMatch_ string
  2662. ctx_ context.Context
  2663. header_ http.Header
  2664. }
  2665. // Get: Retrieves a pipeline based on ID.
  2666. //
  2667. // Caller must have READ permission to the project.
  2668. func (r *PipelinesService) Get(pipelineId string) *PipelinesGetCall {
  2669. c := &PipelinesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2670. c.pipelineId = pipelineId
  2671. return c
  2672. }
  2673. // Fields allows partial responses to be retrieved. See
  2674. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2675. // for more information.
  2676. func (c *PipelinesGetCall) Fields(s ...googleapi.Field) *PipelinesGetCall {
  2677. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2678. return c
  2679. }
  2680. // IfNoneMatch sets the optional parameter which makes the operation
  2681. // fail if the object's ETag matches the given value. This is useful for
  2682. // getting updates only after the object has changed since the last
  2683. // request. Use googleapi.IsNotModified to check whether the response
  2684. // error from Do is the result of In-None-Match.
  2685. func (c *PipelinesGetCall) IfNoneMatch(entityTag string) *PipelinesGetCall {
  2686. c.ifNoneMatch_ = entityTag
  2687. return c
  2688. }
  2689. // Context sets the context to be used in this call's Do method. Any
  2690. // pending HTTP request will be aborted if the provided context is
  2691. // canceled.
  2692. func (c *PipelinesGetCall) Context(ctx context.Context) *PipelinesGetCall {
  2693. c.ctx_ = ctx
  2694. return c
  2695. }
  2696. // Header returns an http.Header that can be modified by the caller to
  2697. // add HTTP headers to the request.
  2698. func (c *PipelinesGetCall) Header() http.Header {
  2699. if c.header_ == nil {
  2700. c.header_ = make(http.Header)
  2701. }
  2702. return c.header_
  2703. }
  2704. func (c *PipelinesGetCall) doRequest(alt string) (*http.Response, error) {
  2705. reqHeaders := make(http.Header)
  2706. for k, v := range c.header_ {
  2707. reqHeaders[k] = v
  2708. }
  2709. reqHeaders.Set("User-Agent", c.s.userAgent())
  2710. if c.ifNoneMatch_ != "" {
  2711. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2712. }
  2713. var body io.Reader = nil
  2714. c.urlParams_.Set("alt", alt)
  2715. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/pipelines/{pipelineId}")
  2716. urls += "?" + c.urlParams_.Encode()
  2717. req, _ := http.NewRequest("GET", urls, body)
  2718. req.Header = reqHeaders
  2719. googleapi.Expand(req.URL, map[string]string{
  2720. "pipelineId": c.pipelineId,
  2721. })
  2722. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2723. }
  2724. // Do executes the "genomics.pipelines.get" call.
  2725. // Exactly one of *Pipeline or error will be non-nil. Any non-2xx status
  2726. // code is an error. Response headers are in either
  2727. // *Pipeline.ServerResponse.Header or (if a response was returned at
  2728. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  2729. // to check whether the returned error was because
  2730. // http.StatusNotModified was returned.
  2731. func (c *PipelinesGetCall) Do(opts ...googleapi.CallOption) (*Pipeline, error) {
  2732. gensupport.SetOptions(c.urlParams_, opts...)
  2733. res, err := c.doRequest("json")
  2734. if res != nil && res.StatusCode == http.StatusNotModified {
  2735. if res.Body != nil {
  2736. res.Body.Close()
  2737. }
  2738. return nil, &googleapi.Error{
  2739. Code: res.StatusCode,
  2740. Header: res.Header,
  2741. }
  2742. }
  2743. if err != nil {
  2744. return nil, err
  2745. }
  2746. defer googleapi.CloseBody(res)
  2747. if err := googleapi.CheckResponse(res); err != nil {
  2748. return nil, err
  2749. }
  2750. ret := &Pipeline{
  2751. ServerResponse: googleapi.ServerResponse{
  2752. Header: res.Header,
  2753. HTTPStatusCode: res.StatusCode,
  2754. },
  2755. }
  2756. target := &ret
  2757. if err := gensupport.DecodeResponse(target, res); err != nil {
  2758. return nil, err
  2759. }
  2760. return ret, nil
  2761. // {
  2762. // "description": "Retrieves a pipeline based on ID.\n\nCaller must have READ permission to the project.",
  2763. // "flatPath": "v1alpha2/pipelines/{pipelineId}",
  2764. // "httpMethod": "GET",
  2765. // "id": "genomics.pipelines.get",
  2766. // "parameterOrder": [
  2767. // "pipelineId"
  2768. // ],
  2769. // "parameters": {
  2770. // "pipelineId": {
  2771. // "description": "Caller must have READ access to the project in which this pipeline\nis defined.",
  2772. // "location": "path",
  2773. // "required": true,
  2774. // "type": "string"
  2775. // }
  2776. // },
  2777. // "path": "v1alpha2/pipelines/{pipelineId}",
  2778. // "response": {
  2779. // "$ref": "Pipeline"
  2780. // },
  2781. // "scopes": [
  2782. // "https://www.googleapis.com/auth/cloud-platform",
  2783. // "https://www.googleapis.com/auth/genomics"
  2784. // ]
  2785. // }
  2786. }
  2787. // method id "genomics.pipelines.getControllerConfig":
  2788. type PipelinesGetControllerConfigCall struct {
  2789. s *Service
  2790. urlParams_ gensupport.URLParams
  2791. ifNoneMatch_ string
  2792. ctx_ context.Context
  2793. header_ http.Header
  2794. }
  2795. // GetControllerConfig: Gets controller configuration information.
  2796. // Should only be called
  2797. // by VMs created by the Pipelines Service and not by end users.
  2798. func (r *PipelinesService) GetControllerConfig() *PipelinesGetControllerConfigCall {
  2799. c := &PipelinesGetControllerConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2800. return c
  2801. }
  2802. // OperationId sets the optional parameter "operationId": The operation
  2803. // to retrieve controller configuration for.
  2804. func (c *PipelinesGetControllerConfigCall) OperationId(operationId string) *PipelinesGetControllerConfigCall {
  2805. c.urlParams_.Set("operationId", operationId)
  2806. return c
  2807. }
  2808. // ValidationToken sets the optional parameter "validationToken":
  2809. func (c *PipelinesGetControllerConfigCall) ValidationToken(validationToken uint64) *PipelinesGetControllerConfigCall {
  2810. c.urlParams_.Set("validationToken", fmt.Sprint(validationToken))
  2811. return c
  2812. }
  2813. // Fields allows partial responses to be retrieved. See
  2814. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2815. // for more information.
  2816. func (c *PipelinesGetControllerConfigCall) Fields(s ...googleapi.Field) *PipelinesGetControllerConfigCall {
  2817. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2818. return c
  2819. }
  2820. // IfNoneMatch sets the optional parameter which makes the operation
  2821. // fail if the object's ETag matches the given value. This is useful for
  2822. // getting updates only after the object has changed since the last
  2823. // request. Use googleapi.IsNotModified to check whether the response
  2824. // error from Do is the result of In-None-Match.
  2825. func (c *PipelinesGetControllerConfigCall) IfNoneMatch(entityTag string) *PipelinesGetControllerConfigCall {
  2826. c.ifNoneMatch_ = entityTag
  2827. return c
  2828. }
  2829. // Context sets the context to be used in this call's Do method. Any
  2830. // pending HTTP request will be aborted if the provided context is
  2831. // canceled.
  2832. func (c *PipelinesGetControllerConfigCall) Context(ctx context.Context) *PipelinesGetControllerConfigCall {
  2833. c.ctx_ = ctx
  2834. return c
  2835. }
  2836. // Header returns an http.Header that can be modified by the caller to
  2837. // add HTTP headers to the request.
  2838. func (c *PipelinesGetControllerConfigCall) Header() http.Header {
  2839. if c.header_ == nil {
  2840. c.header_ = make(http.Header)
  2841. }
  2842. return c.header_
  2843. }
  2844. func (c *PipelinesGetControllerConfigCall) doRequest(alt string) (*http.Response, error) {
  2845. reqHeaders := make(http.Header)
  2846. for k, v := range c.header_ {
  2847. reqHeaders[k] = v
  2848. }
  2849. reqHeaders.Set("User-Agent", c.s.userAgent())
  2850. if c.ifNoneMatch_ != "" {
  2851. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  2852. }
  2853. var body io.Reader = nil
  2854. c.urlParams_.Set("alt", alt)
  2855. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/pipelines:getControllerConfig")
  2856. urls += "?" + c.urlParams_.Encode()
  2857. req, _ := http.NewRequest("GET", urls, body)
  2858. req.Header = reqHeaders
  2859. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  2860. }
  2861. // Do executes the "genomics.pipelines.getControllerConfig" call.
  2862. // Exactly one of *ControllerConfig or error will be non-nil. Any
  2863. // non-2xx status code is an error. Response headers are in either
  2864. // *ControllerConfig.ServerResponse.Header or (if a response was
  2865. // returned at all) in error.(*googleapi.Error).Header. Use
  2866. // googleapi.IsNotModified to check whether the returned error was
  2867. // because http.StatusNotModified was returned.
  2868. func (c *PipelinesGetControllerConfigCall) Do(opts ...googleapi.CallOption) (*ControllerConfig, error) {
  2869. gensupport.SetOptions(c.urlParams_, opts...)
  2870. res, err := c.doRequest("json")
  2871. if res != nil && res.StatusCode == http.StatusNotModified {
  2872. if res.Body != nil {
  2873. res.Body.Close()
  2874. }
  2875. return nil, &googleapi.Error{
  2876. Code: res.StatusCode,
  2877. Header: res.Header,
  2878. }
  2879. }
  2880. if err != nil {
  2881. return nil, err
  2882. }
  2883. defer googleapi.CloseBody(res)
  2884. if err := googleapi.CheckResponse(res); err != nil {
  2885. return nil, err
  2886. }
  2887. ret := &ControllerConfig{
  2888. ServerResponse: googleapi.ServerResponse{
  2889. Header: res.Header,
  2890. HTTPStatusCode: res.StatusCode,
  2891. },
  2892. }
  2893. target := &ret
  2894. if err := gensupport.DecodeResponse(target, res); err != nil {
  2895. return nil, err
  2896. }
  2897. return ret, nil
  2898. // {
  2899. // "description": "Gets controller configuration information. Should only be called\nby VMs created by the Pipelines Service and not by end users.",
  2900. // "flatPath": "v1alpha2/pipelines:getControllerConfig",
  2901. // "httpMethod": "GET",
  2902. // "id": "genomics.pipelines.getControllerConfig",
  2903. // "parameterOrder": [],
  2904. // "parameters": {
  2905. // "operationId": {
  2906. // "description": "The operation to retrieve controller configuration for.",
  2907. // "location": "query",
  2908. // "type": "string"
  2909. // },
  2910. // "validationToken": {
  2911. // "format": "uint64",
  2912. // "location": "query",
  2913. // "type": "string"
  2914. // }
  2915. // },
  2916. // "path": "v1alpha2/pipelines:getControllerConfig",
  2917. // "response": {
  2918. // "$ref": "ControllerConfig"
  2919. // },
  2920. // "scopes": [
  2921. // "https://www.googleapis.com/auth/cloud-platform",
  2922. // "https://www.googleapis.com/auth/genomics"
  2923. // ]
  2924. // }
  2925. }
  2926. // method id "genomics.pipelines.list":
  2927. type PipelinesListCall struct {
  2928. s *Service
  2929. urlParams_ gensupport.URLParams
  2930. ifNoneMatch_ string
  2931. ctx_ context.Context
  2932. header_ http.Header
  2933. }
  2934. // List: Lists pipelines.
  2935. //
  2936. // Caller must have READ permission to the project.
  2937. func (r *PipelinesService) List() *PipelinesListCall {
  2938. c := &PipelinesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  2939. return c
  2940. }
  2941. // NamePrefix sets the optional parameter "namePrefix": Pipelines with
  2942. // names that match this prefix should be
  2943. // returned. If unspecified, all pipelines in the project, up
  2944. // to
  2945. // `pageSize`, will be returned.
  2946. func (c *PipelinesListCall) NamePrefix(namePrefix string) *PipelinesListCall {
  2947. c.urlParams_.Set("namePrefix", namePrefix)
  2948. return c
  2949. }
  2950. // PageSize sets the optional parameter "pageSize": Number of pipelines
  2951. // to return at once. Defaults to 256, and max
  2952. // is 2048.
  2953. func (c *PipelinesListCall) PageSize(pageSize int64) *PipelinesListCall {
  2954. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  2955. return c
  2956. }
  2957. // PageToken sets the optional parameter "pageToken": Token to use to
  2958. // indicate where to start getting results.
  2959. // If unspecified, returns the first page of results.
  2960. func (c *PipelinesListCall) PageToken(pageToken string) *PipelinesListCall {
  2961. c.urlParams_.Set("pageToken", pageToken)
  2962. return c
  2963. }
  2964. // ProjectId sets the optional parameter "projectId": Required. The name
  2965. // of the project to search for pipelines. Caller
  2966. // must have READ access to this project.
  2967. func (c *PipelinesListCall) ProjectId(projectId string) *PipelinesListCall {
  2968. c.urlParams_.Set("projectId", projectId)
  2969. return c
  2970. }
  2971. // Fields allows partial responses to be retrieved. See
  2972. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  2973. // for more information.
  2974. func (c *PipelinesListCall) Fields(s ...googleapi.Field) *PipelinesListCall {
  2975. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  2976. return c
  2977. }
  2978. // IfNoneMatch sets the optional parameter which makes the operation
  2979. // fail if the object's ETag matches the given value. This is useful for
  2980. // getting updates only after the object has changed since the last
  2981. // request. Use googleapi.IsNotModified to check whether the response
  2982. // error from Do is the result of In-None-Match.
  2983. func (c *PipelinesListCall) IfNoneMatch(entityTag string) *PipelinesListCall {
  2984. c.ifNoneMatch_ = entityTag
  2985. return c
  2986. }
  2987. // Context sets the context to be used in this call's Do method. Any
  2988. // pending HTTP request will be aborted if the provided context is
  2989. // canceled.
  2990. func (c *PipelinesListCall) Context(ctx context.Context) *PipelinesListCall {
  2991. c.ctx_ = ctx
  2992. return c
  2993. }
  2994. // Header returns an http.Header that can be modified by the caller to
  2995. // add HTTP headers to the request.
  2996. func (c *PipelinesListCall) Header() http.Header {
  2997. if c.header_ == nil {
  2998. c.header_ = make(http.Header)
  2999. }
  3000. return c.header_
  3001. }
  3002. func (c *PipelinesListCall) doRequest(alt string) (*http.Response, error) {
  3003. reqHeaders := make(http.Header)
  3004. for k, v := range c.header_ {
  3005. reqHeaders[k] = v
  3006. }
  3007. reqHeaders.Set("User-Agent", c.s.userAgent())
  3008. if c.ifNoneMatch_ != "" {
  3009. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  3010. }
  3011. var body io.Reader = nil
  3012. c.urlParams_.Set("alt", alt)
  3013. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/pipelines")
  3014. urls += "?" + c.urlParams_.Encode()
  3015. req, _ := http.NewRequest("GET", urls, body)
  3016. req.Header = reqHeaders
  3017. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3018. }
  3019. // Do executes the "genomics.pipelines.list" call.
  3020. // Exactly one of *ListPipelinesResponse or error will be non-nil. Any
  3021. // non-2xx status code is an error. Response headers are in either
  3022. // *ListPipelinesResponse.ServerResponse.Header or (if a response was
  3023. // returned at all) in error.(*googleapi.Error).Header. Use
  3024. // googleapi.IsNotModified to check whether the returned error was
  3025. // because http.StatusNotModified was returned.
  3026. func (c *PipelinesListCall) Do(opts ...googleapi.CallOption) (*ListPipelinesResponse, error) {
  3027. gensupport.SetOptions(c.urlParams_, opts...)
  3028. res, err := c.doRequest("json")
  3029. if res != nil && res.StatusCode == http.StatusNotModified {
  3030. if res.Body != nil {
  3031. res.Body.Close()
  3032. }
  3033. return nil, &googleapi.Error{
  3034. Code: res.StatusCode,
  3035. Header: res.Header,
  3036. }
  3037. }
  3038. if err != nil {
  3039. return nil, err
  3040. }
  3041. defer googleapi.CloseBody(res)
  3042. if err := googleapi.CheckResponse(res); err != nil {
  3043. return nil, err
  3044. }
  3045. ret := &ListPipelinesResponse{
  3046. ServerResponse: googleapi.ServerResponse{
  3047. Header: res.Header,
  3048. HTTPStatusCode: res.StatusCode,
  3049. },
  3050. }
  3051. target := &ret
  3052. if err := gensupport.DecodeResponse(target, res); err != nil {
  3053. return nil, err
  3054. }
  3055. return ret, nil
  3056. // {
  3057. // "description": "Lists pipelines.\n\nCaller must have READ permission to the project.",
  3058. // "flatPath": "v1alpha2/pipelines",
  3059. // "httpMethod": "GET",
  3060. // "id": "genomics.pipelines.list",
  3061. // "parameterOrder": [],
  3062. // "parameters": {
  3063. // "namePrefix": {
  3064. // "description": "Pipelines with names that match this prefix should be\nreturned. If unspecified, all pipelines in the project, up to\n`pageSize`, will be returned.",
  3065. // "location": "query",
  3066. // "type": "string"
  3067. // },
  3068. // "pageSize": {
  3069. // "description": "Number of pipelines to return at once. Defaults to 256, and max\nis 2048.",
  3070. // "format": "int32",
  3071. // "location": "query",
  3072. // "type": "integer"
  3073. // },
  3074. // "pageToken": {
  3075. // "description": "Token to use to indicate where to start getting results.\nIf unspecified, returns the first page of results.",
  3076. // "location": "query",
  3077. // "type": "string"
  3078. // },
  3079. // "projectId": {
  3080. // "description": "Required. The name of the project to search for pipelines. Caller\nmust have READ access to this project.",
  3081. // "location": "query",
  3082. // "type": "string"
  3083. // }
  3084. // },
  3085. // "path": "v1alpha2/pipelines",
  3086. // "response": {
  3087. // "$ref": "ListPipelinesResponse"
  3088. // },
  3089. // "scopes": [
  3090. // "https://www.googleapis.com/auth/cloud-platform",
  3091. // "https://www.googleapis.com/auth/genomics"
  3092. // ]
  3093. // }
  3094. }
  3095. // Pages invokes f for each page of results.
  3096. // A non-nil error returned from f will halt the iteration.
  3097. // The provided context supersedes any context provided to the Context method.
  3098. func (c *PipelinesListCall) Pages(ctx context.Context, f func(*ListPipelinesResponse) error) error {
  3099. c.ctx_ = ctx
  3100. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  3101. for {
  3102. x, err := c.Do()
  3103. if err != nil {
  3104. return err
  3105. }
  3106. if err := f(x); err != nil {
  3107. return err
  3108. }
  3109. if x.NextPageToken == "" {
  3110. return nil
  3111. }
  3112. c.PageToken(x.NextPageToken)
  3113. }
  3114. }
  3115. // method id "genomics.pipelines.run":
  3116. type PipelinesRunCall struct {
  3117. s *Service
  3118. runpipelinerequest *RunPipelineRequest
  3119. urlParams_ gensupport.URLParams
  3120. ctx_ context.Context
  3121. header_ http.Header
  3122. }
  3123. // Run: Runs a pipeline. If `pipelineId` is specified in the request,
  3124. // then
  3125. // run a saved pipeline. If `ephemeralPipeline` is specified, then
  3126. // run
  3127. // that pipeline once without saving a copy.
  3128. //
  3129. // The caller must have READ permission to the project where the
  3130. // pipeline
  3131. // is stored and WRITE permission to the project where the pipeline will
  3132. // be
  3133. // run, as VMs will be created and storage will be used.
  3134. //
  3135. // If a pipeline operation is still running after 6 days, it will be
  3136. // canceled.
  3137. func (r *PipelinesService) Run(runpipelinerequest *RunPipelineRequest) *PipelinesRunCall {
  3138. c := &PipelinesRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3139. c.runpipelinerequest = runpipelinerequest
  3140. return c
  3141. }
  3142. // Fields allows partial responses to be retrieved. See
  3143. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3144. // for more information.
  3145. func (c *PipelinesRunCall) Fields(s ...googleapi.Field) *PipelinesRunCall {
  3146. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3147. return c
  3148. }
  3149. // Context sets the context to be used in this call's Do method. Any
  3150. // pending HTTP request will be aborted if the provided context is
  3151. // canceled.
  3152. func (c *PipelinesRunCall) Context(ctx context.Context) *PipelinesRunCall {
  3153. c.ctx_ = ctx
  3154. return c
  3155. }
  3156. // Header returns an http.Header that can be modified by the caller to
  3157. // add HTTP headers to the request.
  3158. func (c *PipelinesRunCall) Header() http.Header {
  3159. if c.header_ == nil {
  3160. c.header_ = make(http.Header)
  3161. }
  3162. return c.header_
  3163. }
  3164. func (c *PipelinesRunCall) doRequest(alt string) (*http.Response, error) {
  3165. reqHeaders := make(http.Header)
  3166. for k, v := range c.header_ {
  3167. reqHeaders[k] = v
  3168. }
  3169. reqHeaders.Set("User-Agent", c.s.userAgent())
  3170. var body io.Reader = nil
  3171. body, err := googleapi.WithoutDataWrapper.JSONReader(c.runpipelinerequest)
  3172. if err != nil {
  3173. return nil, err
  3174. }
  3175. reqHeaders.Set("Content-Type", "application/json")
  3176. c.urlParams_.Set("alt", alt)
  3177. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/pipelines:run")
  3178. urls += "?" + c.urlParams_.Encode()
  3179. req, _ := http.NewRequest("POST", urls, body)
  3180. req.Header = reqHeaders
  3181. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3182. }
  3183. // Do executes the "genomics.pipelines.run" call.
  3184. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  3185. // status code is an error. Response headers are in either
  3186. // *Operation.ServerResponse.Header or (if a response was returned at
  3187. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  3188. // to check whether the returned error was because
  3189. // http.StatusNotModified was returned.
  3190. func (c *PipelinesRunCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  3191. gensupport.SetOptions(c.urlParams_, opts...)
  3192. res, err := c.doRequest("json")
  3193. if res != nil && res.StatusCode == http.StatusNotModified {
  3194. if res.Body != nil {
  3195. res.Body.Close()
  3196. }
  3197. return nil, &googleapi.Error{
  3198. Code: res.StatusCode,
  3199. Header: res.Header,
  3200. }
  3201. }
  3202. if err != nil {
  3203. return nil, err
  3204. }
  3205. defer googleapi.CloseBody(res)
  3206. if err := googleapi.CheckResponse(res); err != nil {
  3207. return nil, err
  3208. }
  3209. ret := &Operation{
  3210. ServerResponse: googleapi.ServerResponse{
  3211. Header: res.Header,
  3212. HTTPStatusCode: res.StatusCode,
  3213. },
  3214. }
  3215. target := &ret
  3216. if err := gensupport.DecodeResponse(target, res); err != nil {
  3217. return nil, err
  3218. }
  3219. return ret, nil
  3220. // {
  3221. // "description": "Runs a pipeline. If `pipelineId` is specified in the request, then\nrun a saved pipeline. If `ephemeralPipeline` is specified, then run\nthat pipeline once without saving a copy.\n\nThe caller must have READ permission to the project where the pipeline\nis stored and WRITE permission to the project where the pipeline will be\nrun, as VMs will be created and storage will be used.\n\nIf a pipeline operation is still running after 6 days, it will be canceled.",
  3222. // "flatPath": "v1alpha2/pipelines:run",
  3223. // "httpMethod": "POST",
  3224. // "id": "genomics.pipelines.run",
  3225. // "parameterOrder": [],
  3226. // "parameters": {},
  3227. // "path": "v1alpha2/pipelines:run",
  3228. // "request": {
  3229. // "$ref": "RunPipelineRequest"
  3230. // },
  3231. // "response": {
  3232. // "$ref": "Operation"
  3233. // },
  3234. // "scopes": [
  3235. // "https://www.googleapis.com/auth/cloud-platform",
  3236. // "https://www.googleapis.com/auth/compute",
  3237. // "https://www.googleapis.com/auth/genomics"
  3238. // ]
  3239. // }
  3240. }
  3241. // method id "genomics.pipelines.setOperationStatus":
  3242. type PipelinesSetOperationStatusCall struct {
  3243. s *Service
  3244. setoperationstatusrequest *SetOperationStatusRequest
  3245. urlParams_ gensupport.URLParams
  3246. ctx_ context.Context
  3247. header_ http.Header
  3248. }
  3249. // SetOperationStatus: Sets status of a given operation. Any new
  3250. // timestamps (as determined by
  3251. // description) are appended to TimestampEvents. Should only be called
  3252. // by VMs
  3253. // created by the Pipelines Service and not by end users.
  3254. func (r *PipelinesService) SetOperationStatus(setoperationstatusrequest *SetOperationStatusRequest) *PipelinesSetOperationStatusCall {
  3255. c := &PipelinesSetOperationStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  3256. c.setoperationstatusrequest = setoperationstatusrequest
  3257. return c
  3258. }
  3259. // Fields allows partial responses to be retrieved. See
  3260. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  3261. // for more information.
  3262. func (c *PipelinesSetOperationStatusCall) Fields(s ...googleapi.Field) *PipelinesSetOperationStatusCall {
  3263. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  3264. return c
  3265. }
  3266. // Context sets the context to be used in this call's Do method. Any
  3267. // pending HTTP request will be aborted if the provided context is
  3268. // canceled.
  3269. func (c *PipelinesSetOperationStatusCall) Context(ctx context.Context) *PipelinesSetOperationStatusCall {
  3270. c.ctx_ = ctx
  3271. return c
  3272. }
  3273. // Header returns an http.Header that can be modified by the caller to
  3274. // add HTTP headers to the request.
  3275. func (c *PipelinesSetOperationStatusCall) Header() http.Header {
  3276. if c.header_ == nil {
  3277. c.header_ = make(http.Header)
  3278. }
  3279. return c.header_
  3280. }
  3281. func (c *PipelinesSetOperationStatusCall) doRequest(alt string) (*http.Response, error) {
  3282. reqHeaders := make(http.Header)
  3283. for k, v := range c.header_ {
  3284. reqHeaders[k] = v
  3285. }
  3286. reqHeaders.Set("User-Agent", c.s.userAgent())
  3287. var body io.Reader = nil
  3288. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setoperationstatusrequest)
  3289. if err != nil {
  3290. return nil, err
  3291. }
  3292. reqHeaders.Set("Content-Type", "application/json")
  3293. c.urlParams_.Set("alt", alt)
  3294. urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha2/pipelines:setOperationStatus")
  3295. urls += "?" + c.urlParams_.Encode()
  3296. req, _ := http.NewRequest("PUT", urls, body)
  3297. req.Header = reqHeaders
  3298. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  3299. }
  3300. // Do executes the "genomics.pipelines.setOperationStatus" call.
  3301. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  3302. // code is an error. Response headers are in either
  3303. // *Empty.ServerResponse.Header or (if a response was returned at all)
  3304. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  3305. // check whether the returned error was because http.StatusNotModified
  3306. // was returned.
  3307. func (c *PipelinesSetOperationStatusCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  3308. gensupport.SetOptions(c.urlParams_, opts...)
  3309. res, err := c.doRequest("json")
  3310. if res != nil && res.StatusCode == http.StatusNotModified {
  3311. if res.Body != nil {
  3312. res.Body.Close()
  3313. }
  3314. return nil, &googleapi.Error{
  3315. Code: res.StatusCode,
  3316. Header: res.Header,
  3317. }
  3318. }
  3319. if err != nil {
  3320. return nil, err
  3321. }
  3322. defer googleapi.CloseBody(res)
  3323. if err := googleapi.CheckResponse(res); err != nil {
  3324. return nil, err
  3325. }
  3326. ret := &Empty{
  3327. ServerResponse: googleapi.ServerResponse{
  3328. Header: res.Header,
  3329. HTTPStatusCode: res.StatusCode,
  3330. },
  3331. }
  3332. target := &ret
  3333. if err := gensupport.DecodeResponse(target, res); err != nil {
  3334. return nil, err
  3335. }
  3336. return ret, nil
  3337. // {
  3338. // "description": "Sets status of a given operation. Any new timestamps (as determined by\ndescription) are appended to TimestampEvents. Should only be called by VMs\ncreated by the Pipelines Service and not by end users.",
  3339. // "flatPath": "v1alpha2/pipelines:setOperationStatus",
  3340. // "httpMethod": "PUT",
  3341. // "id": "genomics.pipelines.setOperationStatus",
  3342. // "parameterOrder": [],
  3343. // "parameters": {},
  3344. // "path": "v1alpha2/pipelines:setOperationStatus",
  3345. // "request": {
  3346. // "$ref": "SetOperationStatusRequest"
  3347. // },
  3348. // "response": {
  3349. // "$ref": "Empty"
  3350. // },
  3351. // "scopes": [
  3352. // "https://www.googleapis.com/auth/cloud-platform",
  3353. // "https://www.googleapis.com/auth/genomics"
  3354. // ]
  3355. // }
  3356. }