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.
 
 
 

3857 lines
139 KiB

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