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.
 
 
 

1721 lines
64 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/v1"
  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/v1"
  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:v1"
  71. const apiName = "genomics"
  72. const apiVersion = "v1"
  73. const basePath = "https://genomics.googleapis.com/"
  74. // OAuth2 scopes used by this API.
  75. const (
  76. // View and manage your data across Google Cloud Platform services
  77. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  78. // View and manage Genomics data
  79. GenomicsScope = "https://www.googleapis.com/auth/genomics"
  80. )
  81. // NewService creates a new Service.
  82. func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
  83. scopesOption := option.WithScopes(
  84. "https://www.googleapis.com/auth/cloud-platform",
  85. "https://www.googleapis.com/auth/genomics",
  86. )
  87. // NOTE: prepend, so we don't override user-specified scopes.
  88. opts = append([]option.ClientOption{scopesOption}, opts...)
  89. client, endpoint, err := htransport.NewClient(ctx, opts...)
  90. if err != nil {
  91. return nil, err
  92. }
  93. s, err := New(client)
  94. if err != nil {
  95. return nil, err
  96. }
  97. if endpoint != "" {
  98. s.BasePath = endpoint
  99. }
  100. return s, nil
  101. }
  102. // New creates a new Service. It uses the provided http.Client for requests.
  103. //
  104. // Deprecated: please use NewService instead.
  105. // To provide a custom HTTP client, use option.WithHTTPClient.
  106. // If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
  107. func New(client *http.Client) (*Service, error) {
  108. if client == nil {
  109. return nil, errors.New("client is nil")
  110. }
  111. s := &Service{client: client, BasePath: basePath}
  112. s.Operations = NewOperationsService(s)
  113. return s, nil
  114. }
  115. type Service struct {
  116. client *http.Client
  117. BasePath string // API endpoint base URL
  118. UserAgent string // optional additional User-Agent fragment
  119. Operations *OperationsService
  120. }
  121. func (s *Service) userAgent() string {
  122. if s.UserAgent == "" {
  123. return googleapi.UserAgent
  124. }
  125. return googleapi.UserAgent + " " + s.UserAgent
  126. }
  127. func NewOperationsService(s *Service) *OperationsService {
  128. rs := &OperationsService{s: s}
  129. return rs
  130. }
  131. type OperationsService struct {
  132. s *Service
  133. }
  134. // CancelOperationRequest: The request message for
  135. // Operations.CancelOperation.
  136. type CancelOperationRequest struct {
  137. }
  138. // ComputeEngine: Describes a Compute Engine resource that is being
  139. // managed by a running
  140. // pipeline.
  141. type ComputeEngine struct {
  142. // DiskNames: The names of the disks that were created for this
  143. // pipeline.
  144. DiskNames []string `json:"diskNames,omitempty"`
  145. // InstanceName: The instance on which the operation is running.
  146. InstanceName string `json:"instanceName,omitempty"`
  147. // MachineType: The machine type of the instance.
  148. MachineType string `json:"machineType,omitempty"`
  149. // Zone: The availability zone in which the instance resides.
  150. Zone string `json:"zone,omitempty"`
  151. // ForceSendFields is a list of field names (e.g. "DiskNames") to
  152. // unconditionally include in API requests. By default, fields with
  153. // empty values are omitted from API requests. However, any non-pointer,
  154. // non-interface field appearing in ForceSendFields will be sent to the
  155. // server regardless of whether the field is empty or not. This may be
  156. // used to include empty fields in Patch requests.
  157. ForceSendFields []string `json:"-"`
  158. // NullFields is a list of field names (e.g. "DiskNames") to include in
  159. // API requests with the JSON null value. By default, fields with empty
  160. // values are omitted from API requests. However, any field with an
  161. // empty value appearing in NullFields will be sent to the server as
  162. // null. It is an error if a field in this list has a non-empty value.
  163. // This may be used to include null fields in Patch requests.
  164. NullFields []string `json:"-"`
  165. }
  166. func (s *ComputeEngine) MarshalJSON() ([]byte, error) {
  167. type NoMethod ComputeEngine
  168. raw := NoMethod(*s)
  169. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  170. }
  171. // ContainerKilledEvent: An event generated when a container is forcibly
  172. // terminated by the
  173. // worker. Currently, this only occurs when the container outlives
  174. // the
  175. // timeout specified by the user.
  176. type ContainerKilledEvent struct {
  177. // ActionId: The numeric ID of the action that started the container.
  178. ActionId int64 `json:"actionId,omitempty"`
  179. // ForceSendFields is a list of field names (e.g. "ActionId") to
  180. // unconditionally include in API requests. By default, fields with
  181. // empty values are omitted from API requests. However, any non-pointer,
  182. // non-interface field appearing in ForceSendFields will be sent to the
  183. // server regardless of whether the field is empty or not. This may be
  184. // used to include empty fields in Patch requests.
  185. ForceSendFields []string `json:"-"`
  186. // NullFields is a list of field names (e.g. "ActionId") to include in
  187. // API requests with the JSON null value. By default, fields with empty
  188. // values are omitted from API requests. However, any field with an
  189. // empty value appearing in NullFields will be sent to the server as
  190. // null. It is an error if a field in this list has a non-empty value.
  191. // This may be used to include null fields in Patch requests.
  192. NullFields []string `json:"-"`
  193. }
  194. func (s *ContainerKilledEvent) MarshalJSON() ([]byte, error) {
  195. type NoMethod ContainerKilledEvent
  196. raw := NoMethod(*s)
  197. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  198. }
  199. // ContainerStartedEvent: An event generated when a container starts.
  200. type ContainerStartedEvent struct {
  201. // ActionId: The numeric ID of the action that started this container.
  202. ActionId int64 `json:"actionId,omitempty"`
  203. // IpAddress: The public IP address that can be used to connect to the
  204. // container. This
  205. // field is only populated when at least one port mapping is present. If
  206. // the
  207. // instance was created with a private address, this field will be empty
  208. // even
  209. // if port mappings exist.
  210. IpAddress string `json:"ipAddress,omitempty"`
  211. // PortMappings: The container-to-host port mappings installed for this
  212. // container. This
  213. // set will contain any ports exposed using the `PUBLISH_EXPOSED_PORTS`
  214. // flag
  215. // as well as any specified in the `Action` definition.
  216. PortMappings map[string]int64 `json:"portMappings,omitempty"`
  217. // ForceSendFields is a list of field names (e.g. "ActionId") to
  218. // unconditionally include in API requests. By default, fields with
  219. // empty values are omitted from API requests. However, any non-pointer,
  220. // non-interface field appearing in ForceSendFields will be sent to the
  221. // server regardless of whether the field is empty or not. This may be
  222. // used to include empty fields in Patch requests.
  223. ForceSendFields []string `json:"-"`
  224. // NullFields is a list of field names (e.g. "ActionId") to include in
  225. // API requests with the JSON null value. By default, fields with empty
  226. // values are omitted from API requests. However, any field with an
  227. // empty value appearing in NullFields will be sent to the server as
  228. // null. It is an error if a field in this list has a non-empty value.
  229. // This may be used to include null fields in Patch requests.
  230. NullFields []string `json:"-"`
  231. }
  232. func (s *ContainerStartedEvent) MarshalJSON() ([]byte, error) {
  233. type NoMethod ContainerStartedEvent
  234. raw := NoMethod(*s)
  235. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  236. }
  237. // ContainerStoppedEvent: An event generated when a container exits.
  238. type ContainerStoppedEvent struct {
  239. // ActionId: The numeric ID of the action that started this container.
  240. ActionId int64 `json:"actionId,omitempty"`
  241. // ExitStatus: The exit status of the container.
  242. ExitStatus int64 `json:"exitStatus,omitempty"`
  243. // Stderr: The tail end of any content written to standard error by the
  244. // container.
  245. // If the content emits large amounts of debugging noise or
  246. // contains
  247. // sensitive information, you can prevent the content from being printed
  248. // by
  249. // setting the `DISABLE_STANDARD_ERROR_CAPTURE` flag.
  250. //
  251. // Note that only a small amount of the end of the stream is captured
  252. // here.
  253. // The entire stream is stored in the `/google/logs` directory mounted
  254. // into
  255. // each action, and can be copied off the machine as described
  256. // elsewhere.
  257. Stderr string `json:"stderr,omitempty"`
  258. // ForceSendFields is a list of field names (e.g. "ActionId") to
  259. // unconditionally include in API requests. By default, fields with
  260. // empty values are omitted from API requests. However, any non-pointer,
  261. // non-interface field appearing in ForceSendFields will be sent to the
  262. // server regardless of whether the field is empty or not. This may be
  263. // used to include empty fields in Patch requests.
  264. ForceSendFields []string `json:"-"`
  265. // NullFields is a list of field names (e.g. "ActionId") to include in
  266. // API requests with the JSON null value. By default, fields with empty
  267. // values are omitted from API requests. However, any field with an
  268. // empty value appearing in NullFields will be sent to the server as
  269. // null. It is an error if a field in this list has a non-empty value.
  270. // This may be used to include null fields in Patch requests.
  271. NullFields []string `json:"-"`
  272. }
  273. func (s *ContainerStoppedEvent) MarshalJSON() ([]byte, error) {
  274. type NoMethod ContainerStoppedEvent
  275. raw := NoMethod(*s)
  276. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  277. }
  278. // DelayedEvent: An event generated whenever a resource limitation or
  279. // transient error
  280. // delays execution of a pipeline that was otherwise ready to run.
  281. type DelayedEvent struct {
  282. // Cause: A textual description of the cause of the delay. The string
  283. // can change
  284. // without notice because it is often generated by another service (such
  285. // as
  286. // Compute Engine).
  287. Cause string `json:"cause,omitempty"`
  288. // Metrics: If the delay was caused by a resource shortage, this field
  289. // lists the
  290. // Compute Engine metrics that are preventing this operation from
  291. // running
  292. // (for example, `CPUS` or `INSTANCES`). If the particular metric is
  293. // not
  294. // known, a single `UNKNOWN` metric will be present.
  295. Metrics []string `json:"metrics,omitempty"`
  296. // ForceSendFields is a list of field names (e.g. "Cause") to
  297. // unconditionally include in API requests. By default, fields with
  298. // empty values are omitted from API requests. However, any non-pointer,
  299. // non-interface field appearing in ForceSendFields will be sent to the
  300. // server regardless of whether the field is empty or not. This may be
  301. // used to include empty fields in Patch requests.
  302. ForceSendFields []string `json:"-"`
  303. // NullFields is a list of field names (e.g. "Cause") to include in API
  304. // requests with the JSON null value. By default, fields with empty
  305. // values are omitted from API requests. However, any field with an
  306. // empty value appearing in NullFields will be sent to the server as
  307. // null. It is an error if a field in this list has a non-empty value.
  308. // This may be used to include null fields in Patch requests.
  309. NullFields []string `json:"-"`
  310. }
  311. func (s *DelayedEvent) MarshalJSON() ([]byte, error) {
  312. type NoMethod DelayedEvent
  313. raw := NoMethod(*s)
  314. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  315. }
  316. // Empty: A generic empty message that you can re-use to avoid defining
  317. // duplicated
  318. // empty messages in your APIs. A typical example is to use it as the
  319. // request
  320. // or the response type of an API method. For instance:
  321. //
  322. // service Foo {
  323. // rpc Bar(google.protobuf.Empty) returns
  324. // (google.protobuf.Empty);
  325. // }
  326. //
  327. // The JSON representation for `Empty` is empty JSON object `{}`.
  328. type Empty struct {
  329. // ServerResponse contains the HTTP response code and headers from the
  330. // server.
  331. googleapi.ServerResponse `json:"-"`
  332. }
  333. // Event: Carries information about events that occur during pipeline
  334. // execution.
  335. type Event struct {
  336. // Description: A human-readable description of the event. Note that
  337. // these strings can
  338. // change at any time without notice. Any application logic must use
  339. // the
  340. // information in the `details` field.
  341. Description string `json:"description,omitempty"`
  342. // Details: Machine-readable details about the event.
  343. Details googleapi.RawMessage `json:"details,omitempty"`
  344. // Timestamp: The time at which the event occurred.
  345. Timestamp string `json:"timestamp,omitempty"`
  346. // ForceSendFields is a list of field names (e.g. "Description") to
  347. // unconditionally include in API requests. By default, fields with
  348. // empty values are omitted from API requests. However, any non-pointer,
  349. // non-interface field appearing in ForceSendFields will be sent to the
  350. // server regardless of whether the field is empty or not. This may be
  351. // used to include empty fields in Patch requests.
  352. ForceSendFields []string `json:"-"`
  353. // NullFields is a list of field names (e.g. "Description") to include
  354. // in API requests with the JSON null value. By default, fields with
  355. // empty values are omitted from API requests. However, any field with
  356. // an empty value appearing in NullFields will be sent to the server as
  357. // null. It is an error if a field in this list has a non-empty value.
  358. // This may be used to include null fields in Patch requests.
  359. NullFields []string `json:"-"`
  360. }
  361. func (s *Event) MarshalJSON() ([]byte, error) {
  362. type NoMethod Event
  363. raw := NoMethod(*s)
  364. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  365. }
  366. // FailedEvent: An event generated when the execution of a pipeline has
  367. // failed. Note
  368. // that other events can continue to occur after this event.
  369. type FailedEvent struct {
  370. // Cause: The human-readable description of the cause of the failure.
  371. Cause string `json:"cause,omitempty"`
  372. // Code: The Google standard error code that best describes this
  373. // failure.
  374. //
  375. // Possible values:
  376. // "OK" - Not an error; returned on success
  377. //
  378. // HTTP Mapping: 200 OK
  379. // "CANCELLED" - The operation was cancelled, typically by the
  380. // caller.
  381. //
  382. // HTTP Mapping: 499 Client Closed Request
  383. // "UNKNOWN" - Unknown error. For example, this error may be returned
  384. // when
  385. // a `Status` value received from another address space belongs to
  386. // an error space that is not known in this address space. Also
  387. // errors raised by APIs that do not return enough error information
  388. // may be converted to this error.
  389. //
  390. // HTTP Mapping: 500 Internal Server Error
  391. // "INVALID_ARGUMENT" - The client specified an invalid argument.
  392. // Note that this differs
  393. // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates
  394. // arguments
  395. // that are problematic regardless of the state of the system
  396. // (e.g., a malformed file name).
  397. //
  398. // HTTP Mapping: 400 Bad Request
  399. // "DEADLINE_EXCEEDED" - The deadline expired before the operation
  400. // could complete. For operations
  401. // that change the state of the system, this error may be returned
  402. // even if the operation has completed successfully. For example,
  403. // a
  404. // successful response from a server could have been delayed long
  405. // enough for the deadline to expire.
  406. //
  407. // HTTP Mapping: 504 Gateway Timeout
  408. // "NOT_FOUND" - Some requested entity (e.g., file or directory) was
  409. // not found.
  410. //
  411. // Note to server developers: if a request is denied for an entire
  412. // class
  413. // of users, such as gradual feature rollout or undocumented
  414. // whitelist,
  415. // `NOT_FOUND` may be used. If a request is denied for some users
  416. // within
  417. // a class of users, such as user-based access control,
  418. // `PERMISSION_DENIED`
  419. // must be used.
  420. //
  421. // HTTP Mapping: 404 Not Found
  422. // "ALREADY_EXISTS" - The entity that a client attempted to create
  423. // (e.g., file or directory)
  424. // already exists.
  425. //
  426. // HTTP Mapping: 409 Conflict
  427. // "PERMISSION_DENIED" - The caller does not have permission to
  428. // execute the specified
  429. // operation. `PERMISSION_DENIED` must not be used for rejections
  430. // caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
  431. // instead for those errors). `PERMISSION_DENIED` must not be
  432. // used if the caller can not be identified (use
  433. // `UNAUTHENTICATED`
  434. // instead for those errors). This error code does not imply the
  435. // request is valid or the requested entity exists or satisfies
  436. // other pre-conditions.
  437. //
  438. // HTTP Mapping: 403 Forbidden
  439. // "UNAUTHENTICATED" - The request does not have valid authentication
  440. // credentials for the
  441. // operation.
  442. //
  443. // HTTP Mapping: 401 Unauthorized
  444. // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
  445. // per-user quota, or
  446. // perhaps the entire file system is out of space.
  447. //
  448. // HTTP Mapping: 429 Too Many Requests
  449. // "FAILED_PRECONDITION" - The operation was rejected because the
  450. // system is not in a state
  451. // required for the operation's execution. For example, the
  452. // directory
  453. // to be deleted is non-empty, an rmdir operation is applied to
  454. // a non-directory, etc.
  455. //
  456. // Service implementors can use the following guidelines to
  457. // decide
  458. // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
  459. // (a) Use `UNAVAILABLE` if the client can retry just the failing
  460. // call.
  461. // (b) Use `ABORTED` if the client should retry at a higher level
  462. // (e.g., when a client-specified test-and-set fails, indicating
  463. // the
  464. // client should restart a read-modify-write sequence).
  465. // (c) Use `FAILED_PRECONDITION` if the client should not retry until
  466. // the system state has been explicitly fixed. E.g., if an
  467. // "rmdir"
  468. // fails because the directory is non-empty, `FAILED_PRECONDITION`
  469. // should be returned since the client should not retry unless
  470. // the files are deleted from the directory.
  471. //
  472. // HTTP Mapping: 400 Bad Request
  473. // "ABORTED" - The operation was aborted, typically due to a
  474. // concurrency issue such as
  475. // a sequencer check failure or transaction abort.
  476. //
  477. // See the guidelines above for deciding between
  478. // `FAILED_PRECONDITION`,
  479. // `ABORTED`, and `UNAVAILABLE`.
  480. //
  481. // HTTP Mapping: 409 Conflict
  482. // "OUT_OF_RANGE" - The operation was attempted past the valid range.
  483. // E.g., seeking or
  484. // reading past end-of-file.
  485. //
  486. // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
  487. // be fixed if the system state changes. For example, a 32-bit
  488. // file
  489. // system will generate `INVALID_ARGUMENT` if asked to read at an
  490. // offset that is not in the range [0,2^32-1], but it will
  491. // generate
  492. // `OUT_OF_RANGE` if asked to read from an offset past the current
  493. // file size.
  494. //
  495. // There is a fair bit of overlap between `FAILED_PRECONDITION`
  496. // and
  497. // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more
  498. // specific
  499. // error) when it applies so that callers who are iterating through
  500. // a space can easily look for an `OUT_OF_RANGE` error to detect
  501. // when
  502. // they are done.
  503. //
  504. // HTTP Mapping: 400 Bad Request
  505. // "UNIMPLEMENTED" - The operation is not implemented or is not
  506. // supported/enabled in this
  507. // service.
  508. //
  509. // HTTP Mapping: 501 Not Implemented
  510. // "INTERNAL" - Internal errors. This means that some invariants
  511. // expected by the
  512. // underlying system have been broken. This error code is reserved
  513. // for serious errors.
  514. //
  515. // HTTP Mapping: 500 Internal Server Error
  516. // "UNAVAILABLE" - The service is currently unavailable. This is most
  517. // likely a
  518. // transient condition, which can be corrected by retrying with
  519. // a backoff.
  520. //
  521. // See the guidelines above for deciding between
  522. // `FAILED_PRECONDITION`,
  523. // `ABORTED`, and `UNAVAILABLE`.
  524. //
  525. // HTTP Mapping: 503 Service Unavailable
  526. // "DATA_LOSS" - Unrecoverable data loss or corruption.
  527. //
  528. // HTTP Mapping: 500 Internal Server Error
  529. Code string `json:"code,omitempty"`
  530. // ForceSendFields is a list of field names (e.g. "Cause") to
  531. // unconditionally include in API requests. By default, fields with
  532. // empty values are omitted from API requests. However, any non-pointer,
  533. // non-interface field appearing in ForceSendFields will be sent to the
  534. // server regardless of whether the field is empty or not. This may be
  535. // used to include empty fields in Patch requests.
  536. ForceSendFields []string `json:"-"`
  537. // NullFields is a list of field names (e.g. "Cause") to include in API
  538. // requests with the JSON null value. By default, fields with empty
  539. // values are omitted from API requests. However, any field with an
  540. // empty value appearing in NullFields will be sent to the server as
  541. // null. It is an error if a field in this list has a non-empty value.
  542. // This may be used to include null fields in Patch requests.
  543. NullFields []string `json:"-"`
  544. }
  545. func (s *FailedEvent) MarshalJSON() ([]byte, error) {
  546. type NoMethod FailedEvent
  547. raw := NoMethod(*s)
  548. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  549. }
  550. // ImportReadGroupSetsResponse: The read group set import response.
  551. type ImportReadGroupSetsResponse struct {
  552. // ReadGroupSetIds: IDs of the read group sets that were created.
  553. ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
  554. // ForceSendFields is a list of field names (e.g. "ReadGroupSetIds") to
  555. // unconditionally include in API requests. By default, fields with
  556. // empty values are omitted from API requests. However, any non-pointer,
  557. // non-interface field appearing in ForceSendFields will be sent to the
  558. // server regardless of whether the field is empty or not. This may be
  559. // used to include empty fields in Patch requests.
  560. ForceSendFields []string `json:"-"`
  561. // NullFields is a list of field names (e.g. "ReadGroupSetIds") to
  562. // include in API requests with the JSON null value. By default, fields
  563. // with empty values are omitted from API requests. However, any field
  564. // with an empty value appearing in NullFields will be sent to the
  565. // server as null. It is an error if a field in this list has a
  566. // non-empty value. This may be used to include null fields in Patch
  567. // requests.
  568. NullFields []string `json:"-"`
  569. }
  570. func (s *ImportReadGroupSetsResponse) MarshalJSON() ([]byte, error) {
  571. type NoMethod ImportReadGroupSetsResponse
  572. raw := NoMethod(*s)
  573. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  574. }
  575. // ImportVariantsResponse: The variant data import response.
  576. type ImportVariantsResponse struct {
  577. // CallSetIds: IDs of the call sets created during the import.
  578. CallSetIds []string `json:"callSetIds,omitempty"`
  579. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  580. // unconditionally include in API requests. By default, fields with
  581. // empty values are omitted from API requests. However, any non-pointer,
  582. // non-interface field appearing in ForceSendFields will be sent to the
  583. // server regardless of whether the field is empty or not. This may be
  584. // used to include empty fields in Patch requests.
  585. ForceSendFields []string `json:"-"`
  586. // NullFields is a list of field names (e.g. "CallSetIds") to include in
  587. // API requests with the JSON null value. By default, fields with empty
  588. // values are omitted from API requests. However, any field with an
  589. // empty value appearing in NullFields will be sent to the server as
  590. // null. It is an error if a field in this list has a non-empty value.
  591. // This may be used to include null fields in Patch requests.
  592. NullFields []string `json:"-"`
  593. }
  594. func (s *ImportVariantsResponse) MarshalJSON() ([]byte, error) {
  595. type NoMethod ImportVariantsResponse
  596. raw := NoMethod(*s)
  597. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  598. }
  599. // ListOperationsResponse: The response message for
  600. // Operations.ListOperations.
  601. type ListOperationsResponse struct {
  602. // NextPageToken: The standard List next-page token.
  603. NextPageToken string `json:"nextPageToken,omitempty"`
  604. // Operations: A list of operations that matches the specified filter in
  605. // the request.
  606. Operations []*Operation `json:"operations,omitempty"`
  607. // ServerResponse contains the HTTP response code and headers from the
  608. // server.
  609. googleapi.ServerResponse `json:"-"`
  610. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  611. // unconditionally include in API requests. By default, fields with
  612. // empty values are omitted from API requests. However, any non-pointer,
  613. // non-interface field appearing in ForceSendFields will be sent to the
  614. // server regardless of whether the field is empty or not. This may be
  615. // used to include empty fields in Patch requests.
  616. ForceSendFields []string `json:"-"`
  617. // NullFields is a list of field names (e.g. "NextPageToken") to include
  618. // in API requests with the JSON null value. By default, fields with
  619. // empty values are omitted from API requests. However, any field with
  620. // an empty value appearing in NullFields will be sent to the server as
  621. // null. It is an error if a field in this list has a non-empty value.
  622. // This may be used to include null fields in Patch requests.
  623. NullFields []string `json:"-"`
  624. }
  625. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  626. type NoMethod ListOperationsResponse
  627. raw := NoMethod(*s)
  628. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  629. }
  630. // Operation: This resource represents a long-running operation that is
  631. // the result of a
  632. // network API call.
  633. type Operation struct {
  634. // Done: If the value is `false`, it means the operation is still in
  635. // progress.
  636. // If `true`, the operation is completed, and either `error` or
  637. // `response` is
  638. // available.
  639. Done bool `json:"done,omitempty"`
  640. // Error: The error result of the operation in case of failure or
  641. // cancellation.
  642. Error *Status `json:"error,omitempty"`
  643. // Metadata: An OperationMetadata or Metadata object. This will always
  644. // be returned with the Operation.
  645. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  646. // Name: The server-assigned name, which is only unique within the same
  647. // service that originally returns it. For example:
  648. // `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`
  649. Name string `json:"name,omitempty"`
  650. // Response: If importing ReadGroupSets, an ImportReadGroupSetsResponse
  651. // is returned. If importing Variants, an ImportVariantsResponse is
  652. // returned. For pipelines and exports, an Empty response is returned.
  653. Response googleapi.RawMessage `json:"response,omitempty"`
  654. // ServerResponse contains the HTTP response code and headers from the
  655. // server.
  656. googleapi.ServerResponse `json:"-"`
  657. // ForceSendFields is a list of field names (e.g. "Done") to
  658. // unconditionally include in API requests. By default, fields with
  659. // empty values are omitted from API requests. However, any non-pointer,
  660. // non-interface field appearing in ForceSendFields will be sent to the
  661. // server regardless of whether the field is empty or not. This may be
  662. // used to include empty fields in Patch requests.
  663. ForceSendFields []string `json:"-"`
  664. // NullFields is a list of field names (e.g. "Done") to include in API
  665. // requests with the JSON null value. By default, fields with empty
  666. // values are omitted from API requests. However, any field with an
  667. // empty value appearing in NullFields will be sent to the server as
  668. // null. It is an error if a field in this list has a non-empty value.
  669. // This may be used to include null fields in Patch requests.
  670. NullFields []string `json:"-"`
  671. }
  672. func (s *Operation) MarshalJSON() ([]byte, error) {
  673. type NoMethod Operation
  674. raw := NoMethod(*s)
  675. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  676. }
  677. // OperationEvent: An event that occurred during an Operation.
  678. type OperationEvent struct {
  679. // Description: Required description of event.
  680. Description string `json:"description,omitempty"`
  681. // EndTime: Optional time of when event finished. An event can have a
  682. // start time and no
  683. // finish time. If an event has a finish time, there must be a start
  684. // time.
  685. EndTime string `json:"endTime,omitempty"`
  686. // StartTime: Optional time of when event started.
  687. StartTime string `json:"startTime,omitempty"`
  688. // ForceSendFields is a list of field names (e.g. "Description") to
  689. // unconditionally include in API requests. By default, fields with
  690. // empty values are omitted from API requests. However, any non-pointer,
  691. // non-interface field appearing in ForceSendFields will be sent to the
  692. // server regardless of whether the field is empty or not. This may be
  693. // used to include empty fields in Patch requests.
  694. ForceSendFields []string `json:"-"`
  695. // NullFields is a list of field names (e.g. "Description") to include
  696. // in API requests with the JSON null value. By default, fields with
  697. // empty values are omitted from API requests. However, any field with
  698. // an empty value appearing in NullFields will be sent to the server as
  699. // null. It is an error if a field in this list has a non-empty value.
  700. // This may be used to include null fields in Patch requests.
  701. NullFields []string `json:"-"`
  702. }
  703. func (s *OperationEvent) MarshalJSON() ([]byte, error) {
  704. type NoMethod OperationEvent
  705. raw := NoMethod(*s)
  706. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  707. }
  708. // OperationMetadata: Metadata describing an Operation.
  709. type OperationMetadata struct {
  710. // ClientId: This field is deprecated. Use `labels` instead. Optionally
  711. // provided by the
  712. // caller when submitting the request that creates the operation.
  713. ClientId string `json:"clientId,omitempty"`
  714. // CreateTime: The time at which the job was submitted to the Genomics
  715. // service.
  716. CreateTime string `json:"createTime,omitempty"`
  717. // EndTime: The time at which the job stopped running.
  718. EndTime string `json:"endTime,omitempty"`
  719. // Events: Optional event messages that were generated during the job's
  720. // execution.
  721. // This also contains any warnings that were generated during import
  722. // or export.
  723. Events []*OperationEvent `json:"events,omitempty"`
  724. // Labels: Optionally provided by the caller when submitting the request
  725. // that creates
  726. // the operation.
  727. Labels map[string]string `json:"labels,omitempty"`
  728. // ProjectId: The Google Cloud Project in which the job is scoped.
  729. ProjectId string `json:"projectId,omitempty"`
  730. // Request: The original request that started the operation. Note that
  731. // this will be in
  732. // current version of the API. If the operation was started with v1beta2
  733. // API
  734. // and a GetOperation is performed on v1 API, a v1 request will be
  735. // returned.
  736. Request googleapi.RawMessage `json:"request,omitempty"`
  737. // RuntimeMetadata: Runtime metadata on this Operation.
  738. RuntimeMetadata googleapi.RawMessage `json:"runtimeMetadata,omitempty"`
  739. // StartTime: The time at which the job began to run.
  740. StartTime string `json:"startTime,omitempty"`
  741. // ForceSendFields is a list of field names (e.g. "ClientId") 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. "ClientId") 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 *OperationMetadata) MarshalJSON() ([]byte, error) {
  757. type NoMethod OperationMetadata
  758. raw := NoMethod(*s)
  759. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  760. }
  761. // PullStartedEvent: An event generated when the worker starts pulling
  762. // an image.
  763. type PullStartedEvent struct {
  764. // ImageUri: The URI of the image that was pulled.
  765. ImageUri string `json:"imageUri,omitempty"`
  766. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  767. // unconditionally include in API requests. By default, fields with
  768. // empty values are omitted from API requests. However, any non-pointer,
  769. // non-interface field appearing in ForceSendFields will be sent to the
  770. // server regardless of whether the field is empty or not. This may be
  771. // used to include empty fields in Patch requests.
  772. ForceSendFields []string `json:"-"`
  773. // NullFields is a list of field names (e.g. "ImageUri") to include in
  774. // API requests with the JSON null value. By default, fields with empty
  775. // values are omitted from API requests. However, any field with an
  776. // empty value appearing in NullFields will be sent to the server as
  777. // null. It is an error if a field in this list has a non-empty value.
  778. // This may be used to include null fields in Patch requests.
  779. NullFields []string `json:"-"`
  780. }
  781. func (s *PullStartedEvent) MarshalJSON() ([]byte, error) {
  782. type NoMethod PullStartedEvent
  783. raw := NoMethod(*s)
  784. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  785. }
  786. // PullStoppedEvent: An event generated when the worker stops pulling an
  787. // image.
  788. type PullStoppedEvent struct {
  789. // ImageUri: The URI of the image that was pulled.
  790. ImageUri string `json:"imageUri,omitempty"`
  791. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  792. // unconditionally include in API requests. By default, fields with
  793. // empty values are omitted from API requests. However, any non-pointer,
  794. // non-interface field appearing in ForceSendFields will be sent to the
  795. // server regardless of whether the field is empty or not. This may be
  796. // used to include empty fields in Patch requests.
  797. ForceSendFields []string `json:"-"`
  798. // NullFields is a list of field names (e.g. "ImageUri") to include in
  799. // API requests with the JSON null value. By default, fields with empty
  800. // values are omitted from API requests. However, any field with an
  801. // empty value appearing in NullFields will be sent to the server as
  802. // null. It is an error if a field in this list has a non-empty value.
  803. // This may be used to include null fields in Patch requests.
  804. NullFields []string `json:"-"`
  805. }
  806. func (s *PullStoppedEvent) MarshalJSON() ([]byte, error) {
  807. type NoMethod PullStoppedEvent
  808. raw := NoMethod(*s)
  809. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  810. }
  811. // RunPipelineResponse: The response to the RunPipeline method, returned
  812. // in the operation's result
  813. // field on success.
  814. type RunPipelineResponse struct {
  815. }
  816. // RuntimeMetadata: Runtime metadata that will be populated in
  817. // the
  818. // runtimeMetadata
  819. // field of the Operation associated with a RunPipeline execution.
  820. type RuntimeMetadata struct {
  821. // ComputeEngine: Execution information specific to Google Compute
  822. // Engine.
  823. ComputeEngine *ComputeEngine `json:"computeEngine,omitempty"`
  824. // ForceSendFields is a list of field names (e.g. "ComputeEngine") to
  825. // unconditionally include in API requests. By default, fields with
  826. // empty values are omitted from API requests. However, any non-pointer,
  827. // non-interface field appearing in ForceSendFields will be sent to the
  828. // server regardless of whether the field is empty or not. This may be
  829. // used to include empty fields in Patch requests.
  830. ForceSendFields []string `json:"-"`
  831. // NullFields is a list of field names (e.g. "ComputeEngine") to include
  832. // in API requests with the JSON null value. By default, fields with
  833. // empty values are omitted from API requests. However, any field with
  834. // an empty value appearing in NullFields will be sent to the server as
  835. // null. It is an error if a field in this list has a non-empty value.
  836. // This may be used to include null fields in Patch requests.
  837. NullFields []string `json:"-"`
  838. }
  839. func (s *RuntimeMetadata) MarshalJSON() ([]byte, error) {
  840. type NoMethod RuntimeMetadata
  841. raw := NoMethod(*s)
  842. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  843. }
  844. // Status: The `Status` type defines a logical error model that is
  845. // suitable for
  846. // different programming environments, including REST APIs and RPC APIs.
  847. // It is
  848. // used by [gRPC](https://github.com/grpc). The error model is designed
  849. // to be:
  850. //
  851. // - Simple to use and understand for most users
  852. // - Flexible enough to meet unexpected needs
  853. //
  854. // # Overview
  855. //
  856. // The `Status` message contains three pieces of data: error code,
  857. // error
  858. // message, and error details. The error code should be an enum value
  859. // of
  860. // google.rpc.Code, but it may accept additional error codes if needed.
  861. // The
  862. // error message should be a developer-facing English message that
  863. // helps
  864. // developers *understand* and *resolve* the error. If a localized
  865. // user-facing
  866. // error message is needed, put the localized message in the error
  867. // details or
  868. // localize it in the client. The optional error details may contain
  869. // arbitrary
  870. // information about the error. There is a predefined set of error
  871. // detail types
  872. // in the package `google.rpc` that can be used for common error
  873. // conditions.
  874. //
  875. // # Language mapping
  876. //
  877. // The `Status` message is the logical representation of the error
  878. // model, but it
  879. // is not necessarily the actual wire format. When the `Status` message
  880. // is
  881. // exposed in different client libraries and different wire protocols,
  882. // it can be
  883. // mapped differently. For example, it will likely be mapped to some
  884. // exceptions
  885. // in Java, but more likely mapped to some error codes in C.
  886. //
  887. // # Other uses
  888. //
  889. // The error model and the `Status` message can be used in a variety
  890. // of
  891. // environments, either with or without APIs, to provide a
  892. // consistent developer experience across different
  893. // environments.
  894. //
  895. // Example uses of this error model include:
  896. //
  897. // - Partial errors. If a service needs to return partial errors to the
  898. // client,
  899. // it may embed the `Status` in the normal response to indicate the
  900. // partial
  901. // errors.
  902. //
  903. // - Workflow errors. A typical workflow has multiple steps. Each step
  904. // may
  905. // have a `Status` message for error reporting.
  906. //
  907. // - Batch operations. If a client uses batch request and batch
  908. // response, the
  909. // `Status` message should be used directly inside batch response,
  910. // one for
  911. // each error sub-response.
  912. //
  913. // - Asynchronous operations. If an API call embeds asynchronous
  914. // operation
  915. // results in its response, the status of those operations should
  916. // be
  917. // represented directly using the `Status` message.
  918. //
  919. // - Logging. If some API errors are stored in logs, the message
  920. // `Status` could
  921. // be used directly after any stripping needed for security/privacy
  922. // reasons.
  923. type Status struct {
  924. // Code: The status code, which should be an enum value of
  925. // google.rpc.Code.
  926. Code int64 `json:"code,omitempty"`
  927. // Details: A list of messages that carry the error details. There is a
  928. // common set of
  929. // message types for APIs to use.
  930. Details []googleapi.RawMessage `json:"details,omitempty"`
  931. // Message: A developer-facing error message, which should be in
  932. // English. Any
  933. // user-facing error message should be localized and sent in
  934. // the
  935. // google.rpc.Status.details field, or localized by the client.
  936. Message string `json:"message,omitempty"`
  937. // ForceSendFields is a list of field names (e.g. "Code") to
  938. // unconditionally include in API requests. By default, fields with
  939. // empty values are omitted from API requests. However, any non-pointer,
  940. // non-interface field appearing in ForceSendFields will be sent to the
  941. // server regardless of whether the field is empty or not. This may be
  942. // used to include empty fields in Patch requests.
  943. ForceSendFields []string `json:"-"`
  944. // NullFields is a list of field names (e.g. "Code") to include in API
  945. // requests with the JSON null value. By default, fields with empty
  946. // values are omitted from API requests. However, any field with an
  947. // empty value appearing in NullFields will be sent to the server as
  948. // null. It is an error if a field in this list has a non-empty value.
  949. // This may be used to include null fields in Patch requests.
  950. NullFields []string `json:"-"`
  951. }
  952. func (s *Status) MarshalJSON() ([]byte, error) {
  953. type NoMethod Status
  954. raw := NoMethod(*s)
  955. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  956. }
  957. // UnexpectedExitStatusEvent: An event generated when the execution of a
  958. // container results in a
  959. // non-zero exit status that was not otherwise ignored. Execution
  960. // will
  961. // continue, but only actions that are flagged as `ALWAYS_RUN` will
  962. // be
  963. // executed. Other actions will be skipped.
  964. type UnexpectedExitStatusEvent struct {
  965. // ActionId: The numeric ID of the action that started the container.
  966. ActionId int64 `json:"actionId,omitempty"`
  967. // ExitStatus: The exit status of the container.
  968. ExitStatus int64 `json:"exitStatus,omitempty"`
  969. // ForceSendFields is a list of field names (e.g. "ActionId") to
  970. // unconditionally include in API requests. By default, fields with
  971. // empty values are omitted from API requests. However, any non-pointer,
  972. // non-interface field appearing in ForceSendFields will be sent to the
  973. // server regardless of whether the field is empty or not. This may be
  974. // used to include empty fields in Patch requests.
  975. ForceSendFields []string `json:"-"`
  976. // NullFields is a list of field names (e.g. "ActionId") to include in
  977. // API requests with the JSON null value. By default, fields with empty
  978. // values are omitted from API requests. However, any field with an
  979. // empty value appearing in NullFields will be sent to the server as
  980. // null. It is an error if a field in this list has a non-empty value.
  981. // This may be used to include null fields in Patch requests.
  982. NullFields []string `json:"-"`
  983. }
  984. func (s *UnexpectedExitStatusEvent) MarshalJSON() ([]byte, error) {
  985. type NoMethod UnexpectedExitStatusEvent
  986. raw := NoMethod(*s)
  987. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  988. }
  989. // WorkerAssignedEvent: An event generated after a worker VM has been
  990. // assigned to run the
  991. // pipeline.
  992. type WorkerAssignedEvent struct {
  993. // Instance: The worker's instance name.
  994. Instance string `json:"instance,omitempty"`
  995. // Zone: The zone the worker is running in.
  996. Zone string `json:"zone,omitempty"`
  997. // ForceSendFields is a list of field names (e.g. "Instance") to
  998. // unconditionally include in API requests. By default, fields with
  999. // empty values are omitted from API requests. However, any non-pointer,
  1000. // non-interface field appearing in ForceSendFields will be sent to the
  1001. // server regardless of whether the field is empty or not. This may be
  1002. // used to include empty fields in Patch requests.
  1003. ForceSendFields []string `json:"-"`
  1004. // NullFields is a list of field names (e.g. "Instance") to include in
  1005. // API requests with the JSON null value. By default, fields with empty
  1006. // values are omitted from API requests. However, any field with an
  1007. // empty value appearing in NullFields will be sent to the server as
  1008. // null. It is an error if a field in this list has a non-empty value.
  1009. // This may be used to include null fields in Patch requests.
  1010. NullFields []string `json:"-"`
  1011. }
  1012. func (s *WorkerAssignedEvent) MarshalJSON() ([]byte, error) {
  1013. type NoMethod WorkerAssignedEvent
  1014. raw := NoMethod(*s)
  1015. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1016. }
  1017. // WorkerReleasedEvent: An event generated when the worker VM that was
  1018. // assigned to the pipeline
  1019. // has been released (deleted).
  1020. type WorkerReleasedEvent struct {
  1021. // Instance: The worker's instance name.
  1022. Instance string `json:"instance,omitempty"`
  1023. // Zone: The zone the worker was running in.
  1024. Zone string `json:"zone,omitempty"`
  1025. // ForceSendFields is a list of field names (e.g. "Instance") to
  1026. // unconditionally include in API requests. By default, fields with
  1027. // empty values are omitted from API requests. However, any non-pointer,
  1028. // non-interface field appearing in ForceSendFields will be sent to the
  1029. // server regardless of whether the field is empty or not. This may be
  1030. // used to include empty fields in Patch requests.
  1031. ForceSendFields []string `json:"-"`
  1032. // NullFields is a list of field names (e.g. "Instance") to include in
  1033. // API requests with the JSON null value. By default, fields with empty
  1034. // values are omitted from API requests. However, any field with an
  1035. // empty value appearing in NullFields will be sent to the server as
  1036. // null. It is an error if a field in this list has a non-empty value.
  1037. // This may be used to include null fields in Patch requests.
  1038. NullFields []string `json:"-"`
  1039. }
  1040. func (s *WorkerReleasedEvent) MarshalJSON() ([]byte, error) {
  1041. type NoMethod WorkerReleasedEvent
  1042. raw := NoMethod(*s)
  1043. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1044. }
  1045. // method id "genomics.operations.cancel":
  1046. type OperationsCancelCall struct {
  1047. s *Service
  1048. name string
  1049. canceloperationrequest *CancelOperationRequest
  1050. urlParams_ gensupport.URLParams
  1051. ctx_ context.Context
  1052. header_ http.Header
  1053. }
  1054. // Cancel: Starts asynchronous cancellation on a long-running
  1055. // operation.
  1056. // The server makes a best effort to cancel the operation, but success
  1057. // is not
  1058. // guaranteed. Clients may use Operations.GetOperation
  1059. // or Operations.ListOperations
  1060. // to check whether the cancellation succeeded or the operation
  1061. // completed
  1062. // despite cancellation.
  1063. // Authorization requires the following [Google
  1064. // IAM](https://cloud.google.com/iam) permission:
  1065. //
  1066. // * `genomics.operations.cancel`
  1067. func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
  1068. c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1069. c.name = name
  1070. c.canceloperationrequest = canceloperationrequest
  1071. return c
  1072. }
  1073. // Fields allows partial responses to be retrieved. See
  1074. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1075. // for more information.
  1076. func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
  1077. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1078. return c
  1079. }
  1080. // Context sets the context to be used in this call's Do method. Any
  1081. // pending HTTP request will be aborted if the provided context is
  1082. // canceled.
  1083. func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
  1084. c.ctx_ = ctx
  1085. return c
  1086. }
  1087. // Header returns an http.Header that can be modified by the caller to
  1088. // add HTTP headers to the request.
  1089. func (c *OperationsCancelCall) Header() http.Header {
  1090. if c.header_ == nil {
  1091. c.header_ = make(http.Header)
  1092. }
  1093. return c.header_
  1094. }
  1095. func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  1096. reqHeaders := make(http.Header)
  1097. for k, v := range c.header_ {
  1098. reqHeaders[k] = v
  1099. }
  1100. reqHeaders.Set("User-Agent", c.s.userAgent())
  1101. var body io.Reader = nil
  1102. body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  1103. if err != nil {
  1104. return nil, err
  1105. }
  1106. reqHeaders.Set("Content-Type", "application/json")
  1107. c.urlParams_.Set("alt", alt)
  1108. c.urlParams_.Set("prettyPrint", "false")
  1109. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  1110. urls += "?" + c.urlParams_.Encode()
  1111. req, err := http.NewRequest("POST", urls, body)
  1112. if err != nil {
  1113. return nil, err
  1114. }
  1115. req.Header = reqHeaders
  1116. googleapi.Expand(req.URL, map[string]string{
  1117. "name": c.name,
  1118. })
  1119. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1120. }
  1121. // Do executes the "genomics.operations.cancel" call.
  1122. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  1123. // code is an error. Response headers are in either
  1124. // *Empty.ServerResponse.Header or (if a response was returned at all)
  1125. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  1126. // check whether the returned error was because http.StatusNotModified
  1127. // was returned.
  1128. func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  1129. gensupport.SetOptions(c.urlParams_, opts...)
  1130. res, err := c.doRequest("json")
  1131. if res != nil && res.StatusCode == http.StatusNotModified {
  1132. if res.Body != nil {
  1133. res.Body.Close()
  1134. }
  1135. return nil, &googleapi.Error{
  1136. Code: res.StatusCode,
  1137. Header: res.Header,
  1138. }
  1139. }
  1140. if err != nil {
  1141. return nil, err
  1142. }
  1143. defer googleapi.CloseBody(res)
  1144. if err := googleapi.CheckResponse(res); err != nil {
  1145. return nil, err
  1146. }
  1147. ret := &Empty{
  1148. ServerResponse: googleapi.ServerResponse{
  1149. Header: res.Header,
  1150. HTTPStatusCode: res.StatusCode,
  1151. },
  1152. }
  1153. target := &ret
  1154. if err := gensupport.DecodeResponse(target, res); err != nil {
  1155. return nil, err
  1156. }
  1157. return ret, nil
  1158. // {
  1159. // "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`",
  1160. // "flatPath": "v1/operations/{operationsId}:cancel",
  1161. // "httpMethod": "POST",
  1162. // "id": "genomics.operations.cancel",
  1163. // "parameterOrder": [
  1164. // "name"
  1165. // ],
  1166. // "parameters": {
  1167. // "name": {
  1168. // "description": "The name of the operation resource to be cancelled.",
  1169. // "location": "path",
  1170. // "pattern": "^operations/.+$",
  1171. // "required": true,
  1172. // "type": "string"
  1173. // }
  1174. // },
  1175. // "path": "v1/{+name}:cancel",
  1176. // "request": {
  1177. // "$ref": "CancelOperationRequest"
  1178. // },
  1179. // "response": {
  1180. // "$ref": "Empty"
  1181. // },
  1182. // "scopes": [
  1183. // "https://www.googleapis.com/auth/cloud-platform",
  1184. // "https://www.googleapis.com/auth/genomics"
  1185. // ]
  1186. // }
  1187. }
  1188. // method id "genomics.operations.get":
  1189. type OperationsGetCall struct {
  1190. s *Service
  1191. name string
  1192. urlParams_ gensupport.URLParams
  1193. ifNoneMatch_ string
  1194. ctx_ context.Context
  1195. header_ http.Header
  1196. }
  1197. // Get: Gets the latest state of a long-running operation.
  1198. // Clients can use this method to poll the operation result at intervals
  1199. // as
  1200. // recommended by the API service.
  1201. // Authorization requires the following [Google
  1202. // IAM](https://cloud.google.com/iam) permission:
  1203. //
  1204. // * `genomics.operations.get`
  1205. func (r *OperationsService) Get(name string) *OperationsGetCall {
  1206. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1207. c.name = name
  1208. return c
  1209. }
  1210. // Fields allows partial responses to be retrieved. See
  1211. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1212. // for more information.
  1213. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  1214. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1215. return c
  1216. }
  1217. // IfNoneMatch sets the optional parameter which makes the operation
  1218. // fail if the object's ETag matches the given value. This is useful for
  1219. // getting updates only after the object has changed since the last
  1220. // request. Use googleapi.IsNotModified to check whether the response
  1221. // error from Do is the result of In-None-Match.
  1222. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  1223. c.ifNoneMatch_ = entityTag
  1224. return c
  1225. }
  1226. // Context sets the context to be used in this call's Do method. Any
  1227. // pending HTTP request will be aborted if the provided context is
  1228. // canceled.
  1229. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  1230. c.ctx_ = ctx
  1231. return c
  1232. }
  1233. // Header returns an http.Header that can be modified by the caller to
  1234. // add HTTP headers to the request.
  1235. func (c *OperationsGetCall) Header() http.Header {
  1236. if c.header_ == nil {
  1237. c.header_ = make(http.Header)
  1238. }
  1239. return c.header_
  1240. }
  1241. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  1242. reqHeaders := make(http.Header)
  1243. for k, v := range c.header_ {
  1244. reqHeaders[k] = v
  1245. }
  1246. reqHeaders.Set("User-Agent", c.s.userAgent())
  1247. if c.ifNoneMatch_ != "" {
  1248. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1249. }
  1250. var body io.Reader = nil
  1251. c.urlParams_.Set("alt", alt)
  1252. c.urlParams_.Set("prettyPrint", "false")
  1253. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1254. urls += "?" + c.urlParams_.Encode()
  1255. req, err := http.NewRequest("GET", urls, body)
  1256. if err != nil {
  1257. return nil, err
  1258. }
  1259. req.Header = reqHeaders
  1260. googleapi.Expand(req.URL, map[string]string{
  1261. "name": c.name,
  1262. })
  1263. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1264. }
  1265. // Do executes the "genomics.operations.get" call.
  1266. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  1267. // status code is an error. Response headers are in either
  1268. // *Operation.ServerResponse.Header or (if a response was returned at
  1269. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  1270. // to check whether the returned error was because
  1271. // http.StatusNotModified was returned.
  1272. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  1273. gensupport.SetOptions(c.urlParams_, opts...)
  1274. res, err := c.doRequest("json")
  1275. if res != nil && res.StatusCode == http.StatusNotModified {
  1276. if res.Body != nil {
  1277. res.Body.Close()
  1278. }
  1279. return nil, &googleapi.Error{
  1280. Code: res.StatusCode,
  1281. Header: res.Header,
  1282. }
  1283. }
  1284. if err != nil {
  1285. return nil, err
  1286. }
  1287. defer googleapi.CloseBody(res)
  1288. if err := googleapi.CheckResponse(res); err != nil {
  1289. return nil, err
  1290. }
  1291. ret := &Operation{
  1292. ServerResponse: googleapi.ServerResponse{
  1293. Header: res.Header,
  1294. HTTPStatusCode: res.StatusCode,
  1295. },
  1296. }
  1297. target := &ret
  1298. if err := gensupport.DecodeResponse(target, res); err != nil {
  1299. return nil, err
  1300. }
  1301. return ret, nil
  1302. // {
  1303. // "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`",
  1304. // "flatPath": "v1/operations/{operationsId}",
  1305. // "httpMethod": "GET",
  1306. // "id": "genomics.operations.get",
  1307. // "parameterOrder": [
  1308. // "name"
  1309. // ],
  1310. // "parameters": {
  1311. // "name": {
  1312. // "description": "The name of the operation resource.",
  1313. // "location": "path",
  1314. // "pattern": "^operations/.+$",
  1315. // "required": true,
  1316. // "type": "string"
  1317. // }
  1318. // },
  1319. // "path": "v1/{+name}",
  1320. // "response": {
  1321. // "$ref": "Operation"
  1322. // },
  1323. // "scopes": [
  1324. // "https://www.googleapis.com/auth/cloud-platform",
  1325. // "https://www.googleapis.com/auth/genomics"
  1326. // ]
  1327. // }
  1328. }
  1329. // method id "genomics.operations.list":
  1330. type OperationsListCall struct {
  1331. s *Service
  1332. name string
  1333. urlParams_ gensupport.URLParams
  1334. ifNoneMatch_ string
  1335. ctx_ context.Context
  1336. header_ http.Header
  1337. }
  1338. // List: Lists operations that match the specified filter in the
  1339. // request.
  1340. // Authorization requires the following [Google
  1341. // IAM](https://cloud.google.com/iam) permission:
  1342. //
  1343. // * `genomics.operations.list`
  1344. func (r *OperationsService) List(name string) *OperationsListCall {
  1345. c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  1346. c.name = name
  1347. return c
  1348. }
  1349. // Filter sets the optional parameter "filter": A string for filtering
  1350. // Operations.
  1351. // In v2alpha1, the following filter fields are supported:
  1352. //
  1353. // * createTime: The time this job was created
  1354. // * events: The set of event (names) that have occurred while
  1355. // running
  1356. // the pipeline. The : operator can be used to determine if a
  1357. // particular event has occurred.
  1358. // * error: If the pipeline is running, this value is NULL. Once
  1359. // the
  1360. // pipeline finishes, the value is the standard Google error code.
  1361. // * labels.key or labels."key with space" where key is a label key.
  1362. // * done: If the pipeline is running, this value is false. Once
  1363. // the
  1364. // pipeline finishes, the value is true.
  1365. //
  1366. // In v1 and v1alpha2, the following filter fields are supported:
  1367. //
  1368. // * projectId: Required. Corresponds to
  1369. // OperationMetadata.projectId.
  1370. // * createTime: The time this job was created, in seconds from the
  1371. // [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=`
  1372. // and/or `<=`
  1373. // operators.
  1374. // * status&#58; Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`.
  1375. // Only
  1376. // one status may be specified.
  1377. // * labels.key where key is a label key.
  1378. //
  1379. // Examples&#58;
  1380. //
  1381. // * `projectId = my-project AND createTime >= 1432140000`
  1382. // * `projectId = my-project AND createTime >= 1432140000 AND createTime
  1383. // <= 1432150000 AND status = RUNNING`
  1384. // * `projectId = my-project AND labels.color = *`
  1385. // * `projectId = my-project AND labels.color = red`
  1386. func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  1387. c.urlParams_.Set("filter", filter)
  1388. return c
  1389. }
  1390. // PageSize sets the optional parameter "pageSize": The maximum number
  1391. // of results to return. The maximum value is 256.
  1392. func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
  1393. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  1394. return c
  1395. }
  1396. // PageToken sets the optional parameter "pageToken": The standard list
  1397. // page token.
  1398. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  1399. c.urlParams_.Set("pageToken", pageToken)
  1400. return c
  1401. }
  1402. // Fields allows partial responses to be retrieved. See
  1403. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  1404. // for more information.
  1405. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  1406. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  1407. return c
  1408. }
  1409. // IfNoneMatch sets the optional parameter which makes the operation
  1410. // fail if the object's ETag matches the given value. This is useful for
  1411. // getting updates only after the object has changed since the last
  1412. // request. Use googleapi.IsNotModified to check whether the response
  1413. // error from Do is the result of In-None-Match.
  1414. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  1415. c.ifNoneMatch_ = entityTag
  1416. return c
  1417. }
  1418. // Context sets the context to be used in this call's Do method. Any
  1419. // pending HTTP request will be aborted if the provided context is
  1420. // canceled.
  1421. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  1422. c.ctx_ = ctx
  1423. return c
  1424. }
  1425. // Header returns an http.Header that can be modified by the caller to
  1426. // add HTTP headers to the request.
  1427. func (c *OperationsListCall) Header() http.Header {
  1428. if c.header_ == nil {
  1429. c.header_ = make(http.Header)
  1430. }
  1431. return c.header_
  1432. }
  1433. func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  1434. reqHeaders := make(http.Header)
  1435. for k, v := range c.header_ {
  1436. reqHeaders[k] = v
  1437. }
  1438. reqHeaders.Set("User-Agent", c.s.userAgent())
  1439. if c.ifNoneMatch_ != "" {
  1440. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  1441. }
  1442. var body io.Reader = nil
  1443. c.urlParams_.Set("alt", alt)
  1444. c.urlParams_.Set("prettyPrint", "false")
  1445. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  1446. urls += "?" + c.urlParams_.Encode()
  1447. req, err := http.NewRequest("GET", urls, body)
  1448. if err != nil {
  1449. return nil, err
  1450. }
  1451. req.Header = reqHeaders
  1452. googleapi.Expand(req.URL, map[string]string{
  1453. "name": c.name,
  1454. })
  1455. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  1456. }
  1457. // Do executes the "genomics.operations.list" call.
  1458. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  1459. // non-2xx status code is an error. Response headers are in either
  1460. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  1461. // returned at all) in error.(*googleapi.Error).Header. Use
  1462. // googleapi.IsNotModified to check whether the returned error was
  1463. // because http.StatusNotModified was returned.
  1464. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  1465. gensupport.SetOptions(c.urlParams_, opts...)
  1466. res, err := c.doRequest("json")
  1467. if res != nil && res.StatusCode == http.StatusNotModified {
  1468. if res.Body != nil {
  1469. res.Body.Close()
  1470. }
  1471. return nil, &googleapi.Error{
  1472. Code: res.StatusCode,
  1473. Header: res.Header,
  1474. }
  1475. }
  1476. if err != nil {
  1477. return nil, err
  1478. }
  1479. defer googleapi.CloseBody(res)
  1480. if err := googleapi.CheckResponse(res); err != nil {
  1481. return nil, err
  1482. }
  1483. ret := &ListOperationsResponse{
  1484. ServerResponse: googleapi.ServerResponse{
  1485. Header: res.Header,
  1486. HTTPStatusCode: res.StatusCode,
  1487. },
  1488. }
  1489. target := &ret
  1490. if err := gensupport.DecodeResponse(target, res); err != nil {
  1491. return nil, err
  1492. }
  1493. return ret, nil
  1494. // {
  1495. // "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`",
  1496. // "flatPath": "v1/operations",
  1497. // "httpMethod": "GET",
  1498. // "id": "genomics.operations.list",
  1499. // "parameterOrder": [
  1500. // "name"
  1501. // ],
  1502. // "parameters": {
  1503. // "filter": {
  1504. // "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`",
  1505. // "location": "query",
  1506. // "type": "string"
  1507. // },
  1508. // "name": {
  1509. // "description": "The name of the operation's parent resource.",
  1510. // "location": "path",
  1511. // "pattern": "^operations$",
  1512. // "required": true,
  1513. // "type": "string"
  1514. // },
  1515. // "pageSize": {
  1516. // "description": "The maximum number of results to return. The maximum value is 256.",
  1517. // "format": "int32",
  1518. // "location": "query",
  1519. // "type": "integer"
  1520. // },
  1521. // "pageToken": {
  1522. // "description": "The standard list page token.",
  1523. // "location": "query",
  1524. // "type": "string"
  1525. // }
  1526. // },
  1527. // "path": "v1/{+name}",
  1528. // "response": {
  1529. // "$ref": "ListOperationsResponse"
  1530. // },
  1531. // "scopes": [
  1532. // "https://www.googleapis.com/auth/cloud-platform",
  1533. // "https://www.googleapis.com/auth/genomics"
  1534. // ]
  1535. // }
  1536. }
  1537. // Pages invokes f for each page of results.
  1538. // A non-nil error returned from f will halt the iteration.
  1539. // The provided context supersedes any context provided to the Context method.
  1540. func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  1541. c.ctx_ = ctx
  1542. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  1543. for {
  1544. x, err := c.Do()
  1545. if err != nil {
  1546. return err
  1547. }
  1548. if err := f(x); err != nil {
  1549. return err
  1550. }
  1551. if x.NextPageToken == "" {
  1552. return nil
  1553. }
  1554. c.PageToken(x.NextPageToken)
  1555. }
  1556. }