Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

12995 righe
451 KiB

  1. // Package genomics provides access to the Genomics API.
  2. //
  3. // See https://cloud.google.com/genomics
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/genomics/v1"
  8. // ...
  9. // genomicsService, err := genomics.New(oauthHttpClient)
  10. package genomics // import "google.golang.org/api/genomics/v1"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "genomics:v1"
  41. const apiName = "genomics"
  42. const apiVersion = "v1"
  43. const basePath = "https://genomics.googleapis.com/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // View and manage your data in Google BigQuery
  47. BigqueryScope = "https://www.googleapis.com/auth/bigquery"
  48. // View and manage your data across Google Cloud Platform services
  49. CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
  50. // Manage your data in Google Cloud Storage
  51. DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write"
  52. // View and manage Genomics data
  53. GenomicsScope = "https://www.googleapis.com/auth/genomics"
  54. // View Genomics data
  55. GenomicsReadonlyScope = "https://www.googleapis.com/auth/genomics.readonly"
  56. )
  57. func New(client *http.Client) (*Service, error) {
  58. if client == nil {
  59. return nil, errors.New("client is nil")
  60. }
  61. s := &Service{client: client, BasePath: basePath}
  62. s.Annotations = NewAnnotationsService(s)
  63. s.Annotationsets = NewAnnotationsetsService(s)
  64. s.Callsets = NewCallsetsService(s)
  65. s.Datasets = NewDatasetsService(s)
  66. s.Operations = NewOperationsService(s)
  67. s.Readgroupsets = NewReadgroupsetsService(s)
  68. s.Reads = NewReadsService(s)
  69. s.References = NewReferencesService(s)
  70. s.Referencesets = NewReferencesetsService(s)
  71. s.Variants = NewVariantsService(s)
  72. s.Variantsets = NewVariantsetsService(s)
  73. return s, nil
  74. }
  75. type Service struct {
  76. client *http.Client
  77. BasePath string // API endpoint base URL
  78. UserAgent string // optional additional User-Agent fragment
  79. Annotations *AnnotationsService
  80. Annotationsets *AnnotationsetsService
  81. Callsets *CallsetsService
  82. Datasets *DatasetsService
  83. Operations *OperationsService
  84. Readgroupsets *ReadgroupsetsService
  85. Reads *ReadsService
  86. References *ReferencesService
  87. Referencesets *ReferencesetsService
  88. Variants *VariantsService
  89. Variantsets *VariantsetsService
  90. }
  91. func (s *Service) userAgent() string {
  92. if s.UserAgent == "" {
  93. return googleapi.UserAgent
  94. }
  95. return googleapi.UserAgent + " " + s.UserAgent
  96. }
  97. func NewAnnotationsService(s *Service) *AnnotationsService {
  98. rs := &AnnotationsService{s: s}
  99. return rs
  100. }
  101. type AnnotationsService struct {
  102. s *Service
  103. }
  104. func NewAnnotationsetsService(s *Service) *AnnotationsetsService {
  105. rs := &AnnotationsetsService{s: s}
  106. return rs
  107. }
  108. type AnnotationsetsService struct {
  109. s *Service
  110. }
  111. func NewCallsetsService(s *Service) *CallsetsService {
  112. rs := &CallsetsService{s: s}
  113. return rs
  114. }
  115. type CallsetsService struct {
  116. s *Service
  117. }
  118. func NewDatasetsService(s *Service) *DatasetsService {
  119. rs := &DatasetsService{s: s}
  120. return rs
  121. }
  122. type DatasetsService struct {
  123. s *Service
  124. }
  125. func NewOperationsService(s *Service) *OperationsService {
  126. rs := &OperationsService{s: s}
  127. return rs
  128. }
  129. type OperationsService struct {
  130. s *Service
  131. }
  132. func NewReadgroupsetsService(s *Service) *ReadgroupsetsService {
  133. rs := &ReadgroupsetsService{s: s}
  134. rs.Coveragebuckets = NewReadgroupsetsCoveragebucketsService(s)
  135. return rs
  136. }
  137. type ReadgroupsetsService struct {
  138. s *Service
  139. Coveragebuckets *ReadgroupsetsCoveragebucketsService
  140. }
  141. func NewReadgroupsetsCoveragebucketsService(s *Service) *ReadgroupsetsCoveragebucketsService {
  142. rs := &ReadgroupsetsCoveragebucketsService{s: s}
  143. return rs
  144. }
  145. type ReadgroupsetsCoveragebucketsService struct {
  146. s *Service
  147. }
  148. func NewReadsService(s *Service) *ReadsService {
  149. rs := &ReadsService{s: s}
  150. return rs
  151. }
  152. type ReadsService struct {
  153. s *Service
  154. }
  155. func NewReferencesService(s *Service) *ReferencesService {
  156. rs := &ReferencesService{s: s}
  157. rs.Bases = NewReferencesBasesService(s)
  158. return rs
  159. }
  160. type ReferencesService struct {
  161. s *Service
  162. Bases *ReferencesBasesService
  163. }
  164. func NewReferencesBasesService(s *Service) *ReferencesBasesService {
  165. rs := &ReferencesBasesService{s: s}
  166. return rs
  167. }
  168. type ReferencesBasesService struct {
  169. s *Service
  170. }
  171. func NewReferencesetsService(s *Service) *ReferencesetsService {
  172. rs := &ReferencesetsService{s: s}
  173. return rs
  174. }
  175. type ReferencesetsService struct {
  176. s *Service
  177. }
  178. func NewVariantsService(s *Service) *VariantsService {
  179. rs := &VariantsService{s: s}
  180. return rs
  181. }
  182. type VariantsService struct {
  183. s *Service
  184. }
  185. func NewVariantsetsService(s *Service) *VariantsetsService {
  186. rs := &VariantsetsService{s: s}
  187. return rs
  188. }
  189. type VariantsetsService struct {
  190. s *Service
  191. }
  192. // Annotation: An annotation describes a region of reference genome. The
  193. // value of an
  194. // annotation may be one of several canonical types, supplemented by
  195. // arbitrary
  196. // info tags. An annotation is not inherently associated with a
  197. // specific
  198. // sample or individual (though a client could choose to use annotations
  199. // in
  200. // this way). Example canonical annotation types are `GENE`
  201. // and
  202. // `VARIANT`.
  203. type Annotation struct {
  204. // AnnotationSetId: The annotation set to which this annotation belongs.
  205. AnnotationSetId string `json:"annotationSetId,omitempty"`
  206. // End: The end position of the range on the reference, 0-based
  207. // exclusive.
  208. End int64 `json:"end,omitempty,string"`
  209. // Id: The server-generated annotation ID, unique across all
  210. // annotations.
  211. Id string `json:"id,omitempty"`
  212. // Info: A map of additional read alignment information. This must be of
  213. // the form
  214. // map<string, string[]> (string key mapping to a list of string
  215. // values).
  216. Info map[string][]interface{} `json:"info,omitempty"`
  217. // Name: The display name of this annotation.
  218. Name string `json:"name,omitempty"`
  219. // ReferenceId: The ID of the Google Genomics reference associated with
  220. // this range.
  221. ReferenceId string `json:"referenceId,omitempty"`
  222. // ReferenceName: The display name corresponding to the reference
  223. // specified by
  224. // `referenceId`, for example `chr1`, `1`, or `chrX`.
  225. ReferenceName string `json:"referenceName,omitempty"`
  226. // ReverseStrand: Whether this range refers to the reverse strand, as
  227. // opposed to the forward
  228. // strand. Note that regardless of this field, the start/end position of
  229. // the
  230. // range always refer to the forward strand.
  231. ReverseStrand bool `json:"reverseStrand,omitempty"`
  232. // Start: The start position of the range on the reference, 0-based
  233. // inclusive.
  234. Start int64 `json:"start,omitempty,string"`
  235. // Transcript: A transcript value represents the assertion that a
  236. // particular region of
  237. // the reference genome may be transcribed as RNA. An alternative
  238. // splicing
  239. // pattern would be represented as a separate transcript object. This
  240. // field
  241. // is only set for annotations of type `TRANSCRIPT`.
  242. Transcript *Transcript `json:"transcript,omitempty"`
  243. // Type: The data type for this annotation. Must match the containing
  244. // annotation
  245. // set's type.
  246. //
  247. // Possible values:
  248. // "ANNOTATION_TYPE_UNSPECIFIED"
  249. // "GENERIC" - A `GENERIC` annotation type should be used when no
  250. // other annotation
  251. // type will suffice. This represents an untyped annotation of the
  252. // reference
  253. // genome.
  254. // "VARIANT" - A `VARIANT` annotation type.
  255. // "GENE" - A `GENE` annotation type represents the existence of a
  256. // gene at the
  257. // associated reference coordinates. The start coordinate is typically
  258. // the
  259. // gene's transcription start site and the end is typically the end of
  260. // the
  261. // gene's last exon.
  262. // "TRANSCRIPT" - A `TRANSCRIPT` annotation type represents the
  263. // assertion that a
  264. // particular region of the reference genome may be transcribed as RNA.
  265. Type string `json:"type,omitempty"`
  266. // Variant: A variant annotation, which describes the effect of a
  267. // variant on the
  268. // genome, the coding sequence, and/or higher level consequences at
  269. // the
  270. // organism level e.g. pathogenicity. This field is only set for
  271. // annotations
  272. // of type `VARIANT`.
  273. Variant *VariantAnnotation `json:"variant,omitempty"`
  274. // ServerResponse contains the HTTP response code and headers from the
  275. // server.
  276. googleapi.ServerResponse `json:"-"`
  277. // ForceSendFields is a list of field names (e.g. "AnnotationSetId") to
  278. // unconditionally include in API requests. By default, fields with
  279. // empty values are omitted from API requests. However, any non-pointer,
  280. // non-interface field appearing in ForceSendFields will be sent to the
  281. // server regardless of whether the field is empty or not. This may be
  282. // used to include empty fields in Patch requests.
  283. ForceSendFields []string `json:"-"`
  284. // NullFields is a list of field names (e.g. "AnnotationSetId") to
  285. // include in API requests with the JSON null value. By default, fields
  286. // with empty values are omitted from API requests. However, any field
  287. // with an empty value appearing in NullFields will be sent to the
  288. // server as null. It is an error if a field in this list has a
  289. // non-empty value. This may be used to include null fields in Patch
  290. // requests.
  291. NullFields []string `json:"-"`
  292. }
  293. func (s *Annotation) MarshalJSON() ([]byte, error) {
  294. type NoMethod Annotation
  295. raw := NoMethod(*s)
  296. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  297. }
  298. // AnnotationSet: An annotation set is a logical grouping of annotations
  299. // that share consistent
  300. // type information and provenance. Examples of annotation sets include
  301. // 'all
  302. // genes from refseq', and 'all variant annotations from ClinVar'.
  303. type AnnotationSet struct {
  304. // DatasetId: The dataset to which this annotation set belongs.
  305. DatasetId string `json:"datasetId,omitempty"`
  306. // Id: The server-generated annotation set ID, unique across all
  307. // annotation sets.
  308. Id string `json:"id,omitempty"`
  309. // Info: A map of additional read alignment information. This must be of
  310. // the form
  311. // map<string, string[]> (string key mapping to a list of string
  312. // values).
  313. Info map[string][]interface{} `json:"info,omitempty"`
  314. // Name: The display name for this annotation set.
  315. Name string `json:"name,omitempty"`
  316. // ReferenceSetId: The ID of the reference set that defines the
  317. // coordinate space for this
  318. // set's annotations.
  319. ReferenceSetId string `json:"referenceSetId,omitempty"`
  320. // SourceUri: The source URI describing the file from which this
  321. // annotation set was
  322. // generated, if any.
  323. SourceUri string `json:"sourceUri,omitempty"`
  324. // Type: The type of annotations contained within this set.
  325. //
  326. // Possible values:
  327. // "ANNOTATION_TYPE_UNSPECIFIED"
  328. // "GENERIC" - A `GENERIC` annotation type should be used when no
  329. // other annotation
  330. // type will suffice. This represents an untyped annotation of the
  331. // reference
  332. // genome.
  333. // "VARIANT" - A `VARIANT` annotation type.
  334. // "GENE" - A `GENE` annotation type represents the existence of a
  335. // gene at the
  336. // associated reference coordinates. The start coordinate is typically
  337. // the
  338. // gene's transcription start site and the end is typically the end of
  339. // the
  340. // gene's last exon.
  341. // "TRANSCRIPT" - A `TRANSCRIPT` annotation type represents the
  342. // assertion that a
  343. // particular region of the reference genome may be transcribed as RNA.
  344. Type string `json:"type,omitempty"`
  345. // ServerResponse contains the HTTP response code and headers from the
  346. // server.
  347. googleapi.ServerResponse `json:"-"`
  348. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  349. // unconditionally include in API requests. By default, fields with
  350. // empty values are omitted from API requests. However, any non-pointer,
  351. // non-interface field appearing in ForceSendFields will be sent to the
  352. // server regardless of whether the field is empty or not. This may be
  353. // used to include empty fields in Patch requests.
  354. ForceSendFields []string `json:"-"`
  355. // NullFields is a list of field names (e.g. "DatasetId") to include in
  356. // API requests with the JSON null value. By default, fields with empty
  357. // values are omitted from API requests. However, any field with an
  358. // empty value appearing in NullFields will be sent to the server as
  359. // null. It is an error if a field in this list has a non-empty value.
  360. // This may be used to include null fields in Patch requests.
  361. NullFields []string `json:"-"`
  362. }
  363. func (s *AnnotationSet) MarshalJSON() ([]byte, error) {
  364. type NoMethod AnnotationSet
  365. raw := NoMethod(*s)
  366. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  367. }
  368. type BatchCreateAnnotationsRequest struct {
  369. // Annotations: The annotations to be created. At most 4096 can be
  370. // specified in a single
  371. // request.
  372. Annotations []*Annotation `json:"annotations,omitempty"`
  373. // RequestId: A unique request ID which enables the server to detect
  374. // duplicated requests.
  375. // If provided, duplicated requests will result in the same response; if
  376. // not
  377. // provided, duplicated requests may result in duplicated data. For a
  378. // given
  379. // annotation set, callers should not reuse `request_id`s when
  380. // writing
  381. // different batches of annotations - behavior in this case is
  382. // undefined.
  383. // A common approach is to use a UUID. For batch jobs where worker
  384. // crashes are
  385. // a possibility, consider using some unique variant of a worker or run
  386. // ID.
  387. RequestId string `json:"requestId,omitempty"`
  388. // ForceSendFields is a list of field names (e.g. "Annotations") to
  389. // unconditionally include in API requests. By default, fields with
  390. // empty values are omitted from API requests. However, any non-pointer,
  391. // non-interface field appearing in ForceSendFields will be sent to the
  392. // server regardless of whether the field is empty or not. This may be
  393. // used to include empty fields in Patch requests.
  394. ForceSendFields []string `json:"-"`
  395. // NullFields is a list of field names (e.g. "Annotations") to include
  396. // in API requests with the JSON null value. By default, fields with
  397. // empty values are omitted from API requests. However, any field with
  398. // an empty value appearing in NullFields will be sent to the server as
  399. // null. It is an error if a field in this list has a non-empty value.
  400. // This may be used to include null fields in Patch requests.
  401. NullFields []string `json:"-"`
  402. }
  403. func (s *BatchCreateAnnotationsRequest) MarshalJSON() ([]byte, error) {
  404. type NoMethod BatchCreateAnnotationsRequest
  405. raw := NoMethod(*s)
  406. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  407. }
  408. type BatchCreateAnnotationsResponse struct {
  409. // Entries: The resulting per-annotation entries, ordered consistently
  410. // with the
  411. // original request.
  412. Entries []*Entry `json:"entries,omitempty"`
  413. // ServerResponse contains the HTTP response code and headers from the
  414. // server.
  415. googleapi.ServerResponse `json:"-"`
  416. // ForceSendFields is a list of field names (e.g. "Entries") to
  417. // unconditionally include in API requests. By default, fields with
  418. // empty values are omitted from API requests. However, any non-pointer,
  419. // non-interface field appearing in ForceSendFields will be sent to the
  420. // server regardless of whether the field is empty or not. This may be
  421. // used to include empty fields in Patch requests.
  422. ForceSendFields []string `json:"-"`
  423. // NullFields is a list of field names (e.g. "Entries") to include in
  424. // API requests with the JSON null value. By default, fields with empty
  425. // values are omitted from API requests. However, any field with an
  426. // empty value appearing in NullFields will be sent to the server as
  427. // null. It is an error if a field in this list has a non-empty value.
  428. // This may be used to include null fields in Patch requests.
  429. NullFields []string `json:"-"`
  430. }
  431. func (s *BatchCreateAnnotationsResponse) MarshalJSON() ([]byte, error) {
  432. type NoMethod BatchCreateAnnotationsResponse
  433. raw := NoMethod(*s)
  434. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  435. }
  436. // Binding: Associates `members` with a `role`.
  437. type Binding struct {
  438. // Members: Specifies the identities requesting access for a Cloud
  439. // Platform resource.
  440. // `members` can have the following values:
  441. //
  442. // * `allUsers`: A special identifier that represents anyone who is
  443. // on the internet; with or without a Google account.
  444. //
  445. // * `allAuthenticatedUsers`: A special identifier that represents
  446. // anyone
  447. // who is authenticated with a Google account or a service
  448. // account.
  449. //
  450. // * `user:{emailid}`: An email address that represents a specific
  451. // Google
  452. // account. For example, `alice@gmail.com` .
  453. //
  454. //
  455. // * `serviceAccount:{emailid}`: An email address that represents a
  456. // service
  457. // account. For example,
  458. // `my-other-app@appspot.gserviceaccount.com`.
  459. //
  460. // * `group:{emailid}`: An email address that represents a Google
  461. // group.
  462. // For example, `admins@example.com`.
  463. //
  464. //
  465. // * `domain:{domain}`: A Google Apps domain name that represents all
  466. // the
  467. // users of that domain. For example, `google.com` or
  468. // `example.com`.
  469. //
  470. //
  471. Members []string `json:"members,omitempty"`
  472. // Role: Role that is assigned to `members`.
  473. // For example, `roles/viewer`, `roles/editor`, or
  474. // `roles/owner`.
  475. // Required
  476. Role string `json:"role,omitempty"`
  477. // ForceSendFields is a list of field names (e.g. "Members") to
  478. // unconditionally include in API requests. By default, fields with
  479. // empty values are omitted from API requests. However, any non-pointer,
  480. // non-interface field appearing in ForceSendFields will be sent to the
  481. // server regardless of whether the field is empty or not. This may be
  482. // used to include empty fields in Patch requests.
  483. ForceSendFields []string `json:"-"`
  484. // NullFields is a list of field names (e.g. "Members") to include in
  485. // API requests with the JSON null value. By default, fields with empty
  486. // values are omitted from API requests. However, any field with an
  487. // empty value appearing in NullFields will be sent to the server as
  488. // null. It is an error if a field in this list has a non-empty value.
  489. // This may be used to include null fields in Patch requests.
  490. NullFields []string `json:"-"`
  491. }
  492. func (s *Binding) MarshalJSON() ([]byte, error) {
  493. type NoMethod Binding
  494. raw := NoMethod(*s)
  495. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  496. }
  497. // CallSet: A call set is a collection of variant calls, typically for
  498. // one sample. It
  499. // belongs to a variant set.
  500. type CallSet struct {
  501. // Created: The date this call set was created in milliseconds from the
  502. // epoch.
  503. Created int64 `json:"created,omitempty,string"`
  504. // Id: The server-generated call set ID, unique across all call sets.
  505. Id string `json:"id,omitempty"`
  506. // Info: A map of additional call set information. This must be of the
  507. // form
  508. // map<string, string[]> (string key mapping to a list of string
  509. // values).
  510. Info map[string][]interface{} `json:"info,omitempty"`
  511. // Name: The call set name.
  512. Name string `json:"name,omitempty"`
  513. // SampleId: The sample ID this call set corresponds to.
  514. SampleId string `json:"sampleId,omitempty"`
  515. // VariantSetIds: The IDs of the variant sets this call set belongs to.
  516. // This field must
  517. // have exactly length one, as a call set belongs to a single variant
  518. // set.
  519. // This field is repeated for compatibility with the
  520. // [GA4GH
  521. // 0.5.1
  522. // API](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resou
  523. // rces/avro/variants.avdl#L76).
  524. VariantSetIds []string `json:"variantSetIds,omitempty"`
  525. // ServerResponse contains the HTTP response code and headers from the
  526. // server.
  527. googleapi.ServerResponse `json:"-"`
  528. // ForceSendFields is a list of field names (e.g. "Created") to
  529. // unconditionally include in API requests. By default, fields with
  530. // empty values are omitted from API requests. However, any non-pointer,
  531. // non-interface field appearing in ForceSendFields will be sent to the
  532. // server regardless of whether the field is empty or not. This may be
  533. // used to include empty fields in Patch requests.
  534. ForceSendFields []string `json:"-"`
  535. // NullFields is a list of field names (e.g. "Created") to include in
  536. // API requests with the JSON null value. By default, fields with empty
  537. // values are omitted from API requests. However, any field with an
  538. // empty value appearing in NullFields will be sent to the server as
  539. // null. It is an error if a field in this list has a non-empty value.
  540. // This may be used to include null fields in Patch requests.
  541. NullFields []string `json:"-"`
  542. }
  543. func (s *CallSet) MarshalJSON() ([]byte, error) {
  544. type NoMethod CallSet
  545. raw := NoMethod(*s)
  546. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  547. }
  548. // CancelOperationRequest: The request message for
  549. // Operations.CancelOperation.
  550. type CancelOperationRequest struct {
  551. }
  552. // CigarUnit: A single CIGAR operation.
  553. type CigarUnit struct {
  554. // Possible values:
  555. // "OPERATION_UNSPECIFIED"
  556. // "ALIGNMENT_MATCH" - An alignment match indicates that a sequence
  557. // can be aligned to the
  558. // reference without evidence of an INDEL. Unlike the
  559. // `SEQUENCE_MATCH` and `SEQUENCE_MISMATCH` operators,
  560. // the `ALIGNMENT_MATCH` operator does not indicate whether
  561. // the
  562. // reference and read sequences are an exact match. This operator
  563. // is
  564. // equivalent to SAM's `M`.
  565. // "INSERT" - The insert operator indicates that the read contains
  566. // evidence of bases
  567. // being inserted into the reference. This operator is equivalent to
  568. // SAM's
  569. // `I`.
  570. // "DELETE" - The delete operator indicates that the read contains
  571. // evidence of bases
  572. // being deleted from the reference. This operator is equivalent to
  573. // SAM's
  574. // `D`.
  575. // "SKIP" - The skip operator indicates that this read skips a long
  576. // segment of the
  577. // reference, but the bases have not been deleted. This operator is
  578. // commonly
  579. // used when working with RNA-seq data, where reads may skip long
  580. // segments
  581. // of the reference between exons. This operator is equivalent to
  582. // SAM's
  583. // `N`.
  584. // "CLIP_SOFT" - The soft clip operator indicates that bases at the
  585. // start/end of a read
  586. // have not been considered during alignment. This may occur if the
  587. // majority
  588. // of a read maps, except for low quality bases at the start/end of a
  589. // read.
  590. // This operator is equivalent to SAM's `S`. Bases that are soft
  591. // clipped will still be stored in the read.
  592. // "CLIP_HARD" - The hard clip operator indicates that bases at the
  593. // start/end of a read
  594. // have been omitted from this alignment. This may occur if this
  595. // linear
  596. // alignment is part of a chimeric alignment, or if the read has
  597. // been
  598. // trimmed (for example, during error correction or to trim poly-A tails
  599. // for
  600. // RNA-seq). This operator is equivalent to SAM's `H`.
  601. // "PAD" - The pad operator indicates that there is padding in an
  602. // alignment. This
  603. // operator is equivalent to SAM's `P`.
  604. // "SEQUENCE_MATCH" - This operator indicates that this portion of the
  605. // aligned sequence exactly
  606. // matches the reference. This operator is equivalent to SAM's `=`.
  607. // "SEQUENCE_MISMATCH" - This operator indicates that this portion of
  608. // the aligned sequence is an
  609. // alignment match to the reference, but a sequence mismatch. This
  610. // can
  611. // indicate a SNP or a read error. This operator is equivalent to
  612. // SAM's
  613. // `X`.
  614. Operation string `json:"operation,omitempty"`
  615. // OperationLength: The number of genomic bases that the operation runs
  616. // for. Required.
  617. OperationLength int64 `json:"operationLength,omitempty,string"`
  618. // ReferenceSequence: `referenceSequence` is only used at
  619. // mismatches
  620. // (`SEQUENCE_MISMATCH`) and deletions (`DELETE`).
  621. // Filling this field replaces SAM's MD tag. If the relevant information
  622. // is
  623. // not available, this field is unset.
  624. ReferenceSequence string `json:"referenceSequence,omitempty"`
  625. // ForceSendFields is a list of field names (e.g. "Operation") to
  626. // unconditionally include in API requests. By default, fields with
  627. // empty values are omitted from API requests. However, any non-pointer,
  628. // non-interface field appearing in ForceSendFields will be sent to the
  629. // server regardless of whether the field is empty or not. This may be
  630. // used to include empty fields in Patch requests.
  631. ForceSendFields []string `json:"-"`
  632. // NullFields is a list of field names (e.g. "Operation") to include in
  633. // API requests with the JSON null value. By default, fields with empty
  634. // values are omitted from API requests. However, any field with an
  635. // empty value appearing in NullFields will be sent to the server as
  636. // null. It is an error if a field in this list has a non-empty value.
  637. // This may be used to include null fields in Patch requests.
  638. NullFields []string `json:"-"`
  639. }
  640. func (s *CigarUnit) MarshalJSON() ([]byte, error) {
  641. type NoMethod CigarUnit
  642. raw := NoMethod(*s)
  643. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  644. }
  645. type ClinicalCondition struct {
  646. // ConceptId: The MedGen concept id associated with this gene.
  647. // Search for these IDs at http://www.ncbi.nlm.nih.gov/medgen/
  648. ConceptId string `json:"conceptId,omitempty"`
  649. // ExternalIds: The set of external IDs for this condition.
  650. ExternalIds []*ExternalId `json:"externalIds,omitempty"`
  651. // Names: A set of names for the condition.
  652. Names []string `json:"names,omitempty"`
  653. // OmimId: The OMIM id for this condition.
  654. // Search for these IDs at http://omim.org/
  655. OmimId string `json:"omimId,omitempty"`
  656. // ForceSendFields is a list of field names (e.g. "ConceptId") to
  657. // unconditionally include in API requests. By default, fields with
  658. // empty values are omitted from API requests. However, any non-pointer,
  659. // non-interface field appearing in ForceSendFields will be sent to the
  660. // server regardless of whether the field is empty or not. This may be
  661. // used to include empty fields in Patch requests.
  662. ForceSendFields []string `json:"-"`
  663. // NullFields is a list of field names (e.g. "ConceptId") to include in
  664. // API requests with the JSON null value. By default, fields with empty
  665. // values are omitted from API requests. However, any field with an
  666. // empty value appearing in NullFields will be sent to the server as
  667. // null. It is an error if a field in this list has a non-empty value.
  668. // This may be used to include null fields in Patch requests.
  669. NullFields []string `json:"-"`
  670. }
  671. func (s *ClinicalCondition) MarshalJSON() ([]byte, error) {
  672. type NoMethod ClinicalCondition
  673. raw := NoMethod(*s)
  674. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  675. }
  676. type CodingSequence struct {
  677. // End: The end of the coding sequence on this annotation's reference
  678. // sequence,
  679. // 0-based exclusive. Note that this position is relative to the
  680. // reference
  681. // start, and *not* the containing annotation start.
  682. End int64 `json:"end,omitempty,string"`
  683. // Start: The start of the coding sequence on this annotation's
  684. // reference sequence,
  685. // 0-based inclusive. Note that this position is relative to the
  686. // reference
  687. // start, and *not* the containing annotation start.
  688. Start int64 `json:"start,omitempty,string"`
  689. // ForceSendFields is a list of field names (e.g. "End") to
  690. // unconditionally include in API requests. By default, fields with
  691. // empty values are omitted from API requests. However, any non-pointer,
  692. // non-interface field appearing in ForceSendFields will be sent to the
  693. // server regardless of whether the field is empty or not. This may be
  694. // used to include empty fields in Patch requests.
  695. ForceSendFields []string `json:"-"`
  696. // NullFields is a list of field names (e.g. "End") to include in API
  697. // requests with the JSON null value. By default, fields with empty
  698. // values are omitted from API requests. However, any field with an
  699. // empty value appearing in NullFields will be sent to the server as
  700. // null. It is an error if a field in this list has a non-empty value.
  701. // This may be used to include null fields in Patch requests.
  702. NullFields []string `json:"-"`
  703. }
  704. func (s *CodingSequence) MarshalJSON() ([]byte, error) {
  705. type NoMethod CodingSequence
  706. raw := NoMethod(*s)
  707. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  708. }
  709. // ComputeEngine: Describes a Compute Engine resource that is being
  710. // managed by a running
  711. // pipeline.
  712. type ComputeEngine struct {
  713. // DiskNames: The names of the disks that were created for this
  714. // pipeline.
  715. DiskNames []string `json:"diskNames,omitempty"`
  716. // InstanceName: The instance on which the operation is running.
  717. InstanceName string `json:"instanceName,omitempty"`
  718. // MachineType: The machine type of the instance.
  719. MachineType string `json:"machineType,omitempty"`
  720. // Zone: The availability zone in which the instance resides.
  721. Zone string `json:"zone,omitempty"`
  722. // ForceSendFields is a list of field names (e.g. "DiskNames") to
  723. // unconditionally include in API requests. By default, fields with
  724. // empty values are omitted from API requests. However, any non-pointer,
  725. // non-interface field appearing in ForceSendFields will be sent to the
  726. // server regardless of whether the field is empty or not. This may be
  727. // used to include empty fields in Patch requests.
  728. ForceSendFields []string `json:"-"`
  729. // NullFields is a list of field names (e.g. "DiskNames") to include in
  730. // API requests with the JSON null value. By default, fields with empty
  731. // values are omitted from API requests. However, any field with an
  732. // empty value appearing in NullFields will be sent to the server as
  733. // null. It is an error if a field in this list has a non-empty value.
  734. // This may be used to include null fields in Patch requests.
  735. NullFields []string `json:"-"`
  736. }
  737. func (s *ComputeEngine) MarshalJSON() ([]byte, error) {
  738. type NoMethod ComputeEngine
  739. raw := NoMethod(*s)
  740. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  741. }
  742. // ContainerStartedEvent: This event is generated when a container
  743. // starts.
  744. type ContainerStartedEvent struct {
  745. // ActionId: The numeric ID of the action that started this container.
  746. ActionId int64 `json:"actionId,omitempty"`
  747. // IpAddress: The public IP address that can be used to connect to the
  748. // container. This
  749. // field is only populated when at least one port mapping is present.
  750. // If the
  751. // instance was created with a private address this field will be empty
  752. // even
  753. // if port mappings exist.
  754. IpAddress string `json:"ipAddress,omitempty"`
  755. // PortMappings: The container to host port mappings installed for this
  756. // container. This
  757. // set will contain any ports exposed using the PUBLISH_EXPOSED_PORTS
  758. // flag as
  759. // well as any specified in the Action definition.
  760. PortMappings map[string]int64 `json:"portMappings,omitempty"`
  761. // ForceSendFields is a list of field names (e.g. "ActionId") to
  762. // unconditionally include in API requests. By default, fields with
  763. // empty values are omitted from API requests. However, any non-pointer,
  764. // non-interface field appearing in ForceSendFields will be sent to the
  765. // server regardless of whether the field is empty or not. This may be
  766. // used to include empty fields in Patch requests.
  767. ForceSendFields []string `json:"-"`
  768. // NullFields is a list of field names (e.g. "ActionId") to include in
  769. // API requests with the JSON null value. By default, fields with empty
  770. // values are omitted from API requests. However, any field with an
  771. // empty value appearing in NullFields will be sent to the server as
  772. // null. It is an error if a field in this list has a non-empty value.
  773. // This may be used to include null fields in Patch requests.
  774. NullFields []string `json:"-"`
  775. }
  776. func (s *ContainerStartedEvent) MarshalJSON() ([]byte, error) {
  777. type NoMethod ContainerStartedEvent
  778. raw := NoMethod(*s)
  779. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  780. }
  781. // ContainerStoppedEvent: This event is generated when a container
  782. // exits.
  783. type ContainerStoppedEvent struct {
  784. // ActionId: The numeric ID of the action that started this container.
  785. ActionId int64 `json:"actionId,omitempty"`
  786. // ExitStatus: The exit status of the container.
  787. ExitStatus int64 `json:"exitStatus,omitempty"`
  788. // Stderr: The tail end of any content written to standard error by the
  789. // container.
  790. // To prevent this from being recorded if the action is known to
  791. // emit
  792. // large amounts of debugging noise or sensitive information, set
  793. // the
  794. // DISABLE_STANDARD_ERROR_CAPTURE flag.
  795. //
  796. // Note that only a small amount of the end of the stream is captured
  797. // here.
  798. // The entire stream is stored in the /google/logs directory mounted
  799. // into
  800. // each action, and may be copied off the machine as described
  801. // elsewhere.
  802. Stderr string `json:"stderr,omitempty"`
  803. // ForceSendFields is a list of field names (e.g. "ActionId") to
  804. // unconditionally include in API requests. By default, fields with
  805. // empty values are omitted from API requests. However, any non-pointer,
  806. // non-interface field appearing in ForceSendFields will be sent to the
  807. // server regardless of whether the field is empty or not. This may be
  808. // used to include empty fields in Patch requests.
  809. ForceSendFields []string `json:"-"`
  810. // NullFields is a list of field names (e.g. "ActionId") to include in
  811. // API requests with the JSON null value. By default, fields with empty
  812. // values are omitted from API requests. However, any field with an
  813. // empty value appearing in NullFields will be sent to the server as
  814. // null. It is an error if a field in this list has a non-empty value.
  815. // This may be used to include null fields in Patch requests.
  816. NullFields []string `json:"-"`
  817. }
  818. func (s *ContainerStoppedEvent) MarshalJSON() ([]byte, error) {
  819. type NoMethod ContainerStoppedEvent
  820. raw := NoMethod(*s)
  821. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  822. }
  823. // CoverageBucket: A bucket over which read coverage has been
  824. // precomputed. A bucket corresponds
  825. // to a specific range of the reference sequence.
  826. type CoverageBucket struct {
  827. // MeanCoverage: The average number of reads which are aligned to each
  828. // individual
  829. // reference base in this bucket.
  830. MeanCoverage float64 `json:"meanCoverage,omitempty"`
  831. // Range: The genomic coordinate range spanned by this bucket.
  832. Range *Range `json:"range,omitempty"`
  833. // ForceSendFields is a list of field names (e.g. "MeanCoverage") to
  834. // unconditionally include in API requests. By default, fields with
  835. // empty values are omitted from API requests. However, any non-pointer,
  836. // non-interface field appearing in ForceSendFields will be sent to the
  837. // server regardless of whether the field is empty or not. This may be
  838. // used to include empty fields in Patch requests.
  839. ForceSendFields []string `json:"-"`
  840. // NullFields is a list of field names (e.g. "MeanCoverage") to include
  841. // in API requests with the JSON null value. By default, fields with
  842. // empty values are omitted from API requests. However, any field with
  843. // an empty value appearing in NullFields will be sent to the server as
  844. // null. It is an error if a field in this list has a non-empty value.
  845. // This may be used to include null fields in Patch requests.
  846. NullFields []string `json:"-"`
  847. }
  848. func (s *CoverageBucket) MarshalJSON() ([]byte, error) {
  849. type NoMethod CoverageBucket
  850. raw := NoMethod(*s)
  851. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  852. }
  853. func (s *CoverageBucket) UnmarshalJSON(data []byte) error {
  854. type NoMethod CoverageBucket
  855. var s1 struct {
  856. MeanCoverage gensupport.JSONFloat64 `json:"meanCoverage"`
  857. *NoMethod
  858. }
  859. s1.NoMethod = (*NoMethod)(s)
  860. if err := json.Unmarshal(data, &s1); err != nil {
  861. return err
  862. }
  863. s.MeanCoverage = float64(s1.MeanCoverage)
  864. return nil
  865. }
  866. // Dataset: A Dataset is a collection of genomic data.
  867. type Dataset struct {
  868. // CreateTime: The time this dataset was created, in seconds from the
  869. // epoch.
  870. CreateTime string `json:"createTime,omitempty"`
  871. // Id: The server-generated dataset ID, unique across all datasets.
  872. Id string `json:"id,omitempty"`
  873. // Name: The dataset name.
  874. Name string `json:"name,omitempty"`
  875. // ProjectId: The Google Cloud project ID that this dataset belongs to.
  876. ProjectId string `json:"projectId,omitempty"`
  877. // ServerResponse contains the HTTP response code and headers from the
  878. // server.
  879. googleapi.ServerResponse `json:"-"`
  880. // ForceSendFields is a list of field names (e.g. "CreateTime") to
  881. // unconditionally include in API requests. By default, fields with
  882. // empty values are omitted from API requests. However, any non-pointer,
  883. // non-interface field appearing in ForceSendFields will be sent to the
  884. // server regardless of whether the field is empty or not. This may be
  885. // used to include empty fields in Patch requests.
  886. ForceSendFields []string `json:"-"`
  887. // NullFields is a list of field names (e.g. "CreateTime") to include in
  888. // API requests with the JSON null value. By default, fields with empty
  889. // values are omitted from API requests. However, any field with an
  890. // empty value appearing in NullFields will be sent to the server as
  891. // null. It is an error if a field in this list has a non-empty value.
  892. // This may be used to include null fields in Patch requests.
  893. NullFields []string `json:"-"`
  894. }
  895. func (s *Dataset) MarshalJSON() ([]byte, error) {
  896. type NoMethod Dataset
  897. raw := NoMethod(*s)
  898. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  899. }
  900. // DelayedEvent: This event is generated whenever a resource limitation
  901. // or transient error
  902. // delays execution of a pipeline that was otherwise ready to run.
  903. type DelayedEvent struct {
  904. // Cause: A textual description of the cause of the delay. The string
  905. // may change
  906. // without notice since it is often generated by another service (such
  907. // as
  908. // Compute Engine).
  909. Cause string `json:"cause,omitempty"`
  910. // Metrics: If the delay was caused by a resource shortage, this field
  911. // lists the
  912. // Compute Engine metrics that are preventing this operation from
  913. // running
  914. // (for example, CPUS or INSTANCES). If the particular metric is not
  915. // known,
  916. // a single UNKNOWN metric will be present.
  917. Metrics []string `json:"metrics,omitempty"`
  918. // ForceSendFields is a list of field names (e.g. "Cause") to
  919. // unconditionally include in API requests. By default, fields with
  920. // empty values are omitted from API requests. However, any non-pointer,
  921. // non-interface field appearing in ForceSendFields will be sent to the
  922. // server regardless of whether the field is empty or not. This may be
  923. // used to include empty fields in Patch requests.
  924. ForceSendFields []string `json:"-"`
  925. // NullFields is a list of field names (e.g. "Cause") to include in API
  926. // requests with the JSON null value. By default, fields with empty
  927. // values are omitted from API requests. However, any field with an
  928. // empty value appearing in NullFields will be sent to the server as
  929. // null. It is an error if a field in this list has a non-empty value.
  930. // This may be used to include null fields in Patch requests.
  931. NullFields []string `json:"-"`
  932. }
  933. func (s *DelayedEvent) MarshalJSON() ([]byte, error) {
  934. type NoMethod DelayedEvent
  935. raw := NoMethod(*s)
  936. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  937. }
  938. // Empty: A generic empty message that you can re-use to avoid defining
  939. // duplicated
  940. // empty messages in your APIs. A typical example is to use it as the
  941. // request
  942. // or the response type of an API method. For instance:
  943. //
  944. // service Foo {
  945. // rpc Bar(google.protobuf.Empty) returns
  946. // (google.protobuf.Empty);
  947. // }
  948. //
  949. // The JSON representation for `Empty` is empty JSON object `{}`.
  950. type Empty struct {
  951. // ServerResponse contains the HTTP response code and headers from the
  952. // server.
  953. googleapi.ServerResponse `json:"-"`
  954. }
  955. type Entry struct {
  956. // Annotation: The created annotation, if creation was successful.
  957. Annotation *Annotation `json:"annotation,omitempty"`
  958. // Status: The creation status.
  959. Status *Status `json:"status,omitempty"`
  960. // ForceSendFields is a list of field names (e.g. "Annotation") to
  961. // unconditionally include in API requests. By default, fields with
  962. // empty values are omitted from API requests. However, any non-pointer,
  963. // non-interface field appearing in ForceSendFields will be sent to the
  964. // server regardless of whether the field is empty or not. This may be
  965. // used to include empty fields in Patch requests.
  966. ForceSendFields []string `json:"-"`
  967. // NullFields is a list of field names (e.g. "Annotation") to include in
  968. // API requests with the JSON null value. By default, fields with empty
  969. // values are omitted from API requests. However, any field with an
  970. // empty value appearing in NullFields will be sent to the server as
  971. // null. It is an error if a field in this list has a non-empty value.
  972. // This may be used to include null fields in Patch requests.
  973. NullFields []string `json:"-"`
  974. }
  975. func (s *Entry) MarshalJSON() ([]byte, error) {
  976. type NoMethod Entry
  977. raw := NoMethod(*s)
  978. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  979. }
  980. // Event: Event carries information about events that occur during
  981. // pipeline execution.
  982. type Event struct {
  983. // Description: A human readable description of the event. Note that
  984. // these strings may
  985. // change at any time without notice. Any application logic must use
  986. // the
  987. // information in the details field.
  988. Description string `json:"description,omitempty"`
  989. // Details: Machine readable details about the event.
  990. Details googleapi.RawMessage `json:"details,omitempty"`
  991. // Timestamp: The time that the event occurred.
  992. Timestamp string `json:"timestamp,omitempty"`
  993. // ForceSendFields is a list of field names (e.g. "Description") to
  994. // unconditionally include in API requests. By default, fields with
  995. // empty values are omitted from API requests. However, any non-pointer,
  996. // non-interface field appearing in ForceSendFields will be sent to the
  997. // server regardless of whether the field is empty or not. This may be
  998. // used to include empty fields in Patch requests.
  999. ForceSendFields []string `json:"-"`
  1000. // NullFields is a list of field names (e.g. "Description") to include
  1001. // in API requests with the JSON null value. By default, fields with
  1002. // empty values are omitted from API requests. However, any field with
  1003. // an empty value appearing in NullFields will be sent to the server as
  1004. // null. It is an error if a field in this list has a non-empty value.
  1005. // This may be used to include null fields in Patch requests.
  1006. NullFields []string `json:"-"`
  1007. }
  1008. func (s *Event) MarshalJSON() ([]byte, error) {
  1009. type NoMethod Event
  1010. raw := NoMethod(*s)
  1011. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1012. }
  1013. type Exon struct {
  1014. // End: The end position of the exon on this annotation's reference
  1015. // sequence,
  1016. // 0-based exclusive. Note that this is relative to the reference start,
  1017. // and
  1018. // *not* the containing annotation start.
  1019. End int64 `json:"end,omitempty,string"`
  1020. // Frame: The frame of this exon. Contains a value of 0, 1, or 2, which
  1021. // indicates
  1022. // the offset of the first coding base of the exon within the reading
  1023. // frame
  1024. // of the coding DNA sequence, if any. This field is dependent on
  1025. // the
  1026. // strandedness of this annotation (see
  1027. // Annotation.reverse_strand).
  1028. // For forward stranded annotations, this offset is relative to
  1029. // the
  1030. // exon.start. For reverse
  1031. // strand annotations, this offset is relative to the
  1032. // exon.end `- 1`.
  1033. //
  1034. // Unset if this exon does not intersect the coding sequence. Upon
  1035. // creation
  1036. // of a transcript, the frame must be populated for all or none of
  1037. // the
  1038. // coding exons.
  1039. Frame int64 `json:"frame,omitempty"`
  1040. // Start: The start position of the exon on this annotation's reference
  1041. // sequence,
  1042. // 0-based inclusive. Note that this is relative to the reference start,
  1043. // and
  1044. // **not** the containing annotation start.
  1045. Start int64 `json:"start,omitempty,string"`
  1046. // ForceSendFields is a list of field names (e.g. "End") to
  1047. // unconditionally include in API requests. By default, fields with
  1048. // empty values are omitted from API requests. However, any non-pointer,
  1049. // non-interface field appearing in ForceSendFields will be sent to the
  1050. // server regardless of whether the field is empty or not. This may be
  1051. // used to include empty fields in Patch requests.
  1052. ForceSendFields []string `json:"-"`
  1053. // NullFields is a list of field names (e.g. "End") to include in API
  1054. // requests with the JSON null value. By default, fields with empty
  1055. // values are omitted from API requests. However, any field with an
  1056. // empty value appearing in NullFields will be sent to the server as
  1057. // null. It is an error if a field in this list has a non-empty value.
  1058. // This may be used to include null fields in Patch requests.
  1059. NullFields []string `json:"-"`
  1060. }
  1061. func (s *Exon) MarshalJSON() ([]byte, error) {
  1062. type NoMethod Exon
  1063. raw := NoMethod(*s)
  1064. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1065. }
  1066. type Experiment struct {
  1067. // InstrumentModel: The instrument model used as part of this
  1068. // experiment. This maps to
  1069. // sequencing technology in the SAM spec.
  1070. InstrumentModel string `json:"instrumentModel,omitempty"`
  1071. // LibraryId: A client-supplied library identifier; a library is a
  1072. // collection of DNA
  1073. // fragments which have been prepared for sequencing from a sample.
  1074. // This
  1075. // field is important for quality control as error or bias can be
  1076. // introduced
  1077. // during sample preparation.
  1078. LibraryId string `json:"libraryId,omitempty"`
  1079. // PlatformUnit: The platform unit used as part of this experiment, for
  1080. // example
  1081. // flowcell-barcode.lane for Illumina or slide for SOLiD. Corresponds to
  1082. // the
  1083. // @RG PU field in the SAM spec.
  1084. PlatformUnit string `json:"platformUnit,omitempty"`
  1085. // SequencingCenter: The sequencing center used as part of this
  1086. // experiment.
  1087. SequencingCenter string `json:"sequencingCenter,omitempty"`
  1088. // ForceSendFields is a list of field names (e.g. "InstrumentModel") to
  1089. // unconditionally include in API requests. By default, fields with
  1090. // empty values are omitted from API requests. However, any non-pointer,
  1091. // non-interface field appearing in ForceSendFields will be sent to the
  1092. // server regardless of whether the field is empty or not. This may be
  1093. // used to include empty fields in Patch requests.
  1094. ForceSendFields []string `json:"-"`
  1095. // NullFields is a list of field names (e.g. "InstrumentModel") to
  1096. // include in API requests with the JSON null value. By default, fields
  1097. // with empty values are omitted from API requests. However, any field
  1098. // with an empty value appearing in NullFields will be sent to the
  1099. // server as null. It is an error if a field in this list has a
  1100. // non-empty value. This may be used to include null fields in Patch
  1101. // requests.
  1102. NullFields []string `json:"-"`
  1103. }
  1104. func (s *Experiment) MarshalJSON() ([]byte, error) {
  1105. type NoMethod Experiment
  1106. raw := NoMethod(*s)
  1107. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1108. }
  1109. // ExportReadGroupSetRequest: The read group set export request.
  1110. type ExportReadGroupSetRequest struct {
  1111. // ExportUri: Required. A Google Cloud Storage URI for the exported BAM
  1112. // file.
  1113. // The currently authenticated user must have write access to the new
  1114. // file.
  1115. // An error will be returned if the URI already contains data.
  1116. ExportUri string `json:"exportUri,omitempty"`
  1117. // ProjectId: Required. The Google Cloud project ID that owns
  1118. // this
  1119. // export. The caller must have WRITE access to this project.
  1120. ProjectId string `json:"projectId,omitempty"`
  1121. // ReferenceNames: The reference names to export. If this is not
  1122. // specified, all reference
  1123. // sequences, including unmapped reads, are exported.
  1124. // Use `*` to export only unmapped reads.
  1125. ReferenceNames []string `json:"referenceNames,omitempty"`
  1126. // ForceSendFields is a list of field names (e.g. "ExportUri") to
  1127. // unconditionally include in API requests. By default, fields with
  1128. // empty values are omitted from API requests. However, any non-pointer,
  1129. // non-interface field appearing in ForceSendFields will be sent to the
  1130. // server regardless of whether the field is empty or not. This may be
  1131. // used to include empty fields in Patch requests.
  1132. ForceSendFields []string `json:"-"`
  1133. // NullFields is a list of field names (e.g. "ExportUri") to include in
  1134. // API requests with the JSON null value. By default, fields with empty
  1135. // values are omitted from API requests. However, any field with an
  1136. // empty value appearing in NullFields will be sent to the server as
  1137. // null. It is an error if a field in this list has a non-empty value.
  1138. // This may be used to include null fields in Patch requests.
  1139. NullFields []string `json:"-"`
  1140. }
  1141. func (s *ExportReadGroupSetRequest) MarshalJSON() ([]byte, error) {
  1142. type NoMethod ExportReadGroupSetRequest
  1143. raw := NoMethod(*s)
  1144. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1145. }
  1146. // ExportVariantSetRequest: The variant data export request.
  1147. type ExportVariantSetRequest struct {
  1148. // BigqueryDataset: Required. The BigQuery dataset to export data to.
  1149. // This dataset must already
  1150. // exist. Note that this is distinct from the Genomics concept of
  1151. // "dataset".
  1152. BigqueryDataset string `json:"bigqueryDataset,omitempty"`
  1153. // BigqueryTable: Required. The BigQuery table to export data to.
  1154. // If the table doesn't exist, it will be created. If it already exists,
  1155. // it
  1156. // will be overwritten.
  1157. BigqueryTable string `json:"bigqueryTable,omitempty"`
  1158. // CallSetIds: If provided, only variant call information from the
  1159. // specified call sets
  1160. // will be exported. By default all variant calls are exported.
  1161. CallSetIds []string `json:"callSetIds,omitempty"`
  1162. // Format: The format for the exported data.
  1163. //
  1164. // Possible values:
  1165. // "FORMAT_UNSPECIFIED"
  1166. // "FORMAT_BIGQUERY" - Export the data to Google BigQuery.
  1167. Format string `json:"format,omitempty"`
  1168. // ProjectId: Required. The Google Cloud project ID that owns the
  1169. // destination
  1170. // BigQuery dataset. The caller must have WRITE access to this project.
  1171. // This
  1172. // project will also own the resulting export job.
  1173. ProjectId string `json:"projectId,omitempty"`
  1174. // ForceSendFields is a list of field names (e.g. "BigqueryDataset") to
  1175. // unconditionally include in API requests. By default, fields with
  1176. // empty values are omitted from API requests. However, any non-pointer,
  1177. // non-interface field appearing in ForceSendFields will be sent to the
  1178. // server regardless of whether the field is empty or not. This may be
  1179. // used to include empty fields in Patch requests.
  1180. ForceSendFields []string `json:"-"`
  1181. // NullFields is a list of field names (e.g. "BigqueryDataset") to
  1182. // include in API requests with the JSON null value. By default, fields
  1183. // with empty values are omitted from API requests. However, any field
  1184. // with an empty value appearing in NullFields will be sent to the
  1185. // server as null. It is an error if a field in this list has a
  1186. // non-empty value. This may be used to include null fields in Patch
  1187. // requests.
  1188. NullFields []string `json:"-"`
  1189. }
  1190. func (s *ExportVariantSetRequest) MarshalJSON() ([]byte, error) {
  1191. type NoMethod ExportVariantSetRequest
  1192. raw := NoMethod(*s)
  1193. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1194. }
  1195. type ExternalId struct {
  1196. // Id: The id used by the source of this data.
  1197. Id string `json:"id,omitempty"`
  1198. // SourceName: The name of the source of this data.
  1199. SourceName string `json:"sourceName,omitempty"`
  1200. // ForceSendFields is a list of field names (e.g. "Id") to
  1201. // unconditionally include in API requests. By default, fields with
  1202. // empty values are omitted from API requests. However, any non-pointer,
  1203. // non-interface field appearing in ForceSendFields will be sent to the
  1204. // server regardless of whether the field is empty or not. This may be
  1205. // used to include empty fields in Patch requests.
  1206. ForceSendFields []string `json:"-"`
  1207. // NullFields is a list of field names (e.g. "Id") to include in API
  1208. // requests with the JSON null value. By default, fields with empty
  1209. // values are omitted from API requests. However, any field with an
  1210. // empty value appearing in NullFields will be sent to the server as
  1211. // null. It is an error if a field in this list has a non-empty value.
  1212. // This may be used to include null fields in Patch requests.
  1213. NullFields []string `json:"-"`
  1214. }
  1215. func (s *ExternalId) MarshalJSON() ([]byte, error) {
  1216. type NoMethod ExternalId
  1217. raw := NoMethod(*s)
  1218. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1219. }
  1220. // FailedEvent: This event is generated when the execution of a pipeline
  1221. // has failed. Note
  1222. // that other events may continue to occur after this event.
  1223. type FailedEvent struct {
  1224. // Cause: The human readable description of the cause of the failure.
  1225. Cause string `json:"cause,omitempty"`
  1226. // Code: The Google standard error code that best describes this
  1227. // failure.
  1228. //
  1229. // Possible values:
  1230. // "OK" - Not an error; returned on success
  1231. //
  1232. // HTTP Mapping: 200 OK
  1233. // "CANCELLED" - The operation was cancelled, typically by the
  1234. // caller.
  1235. //
  1236. // HTTP Mapping: 499 Client Closed Request
  1237. // "UNKNOWN" - Unknown error. For example, this error may be returned
  1238. // when
  1239. // a `Status` value received from another address space belongs to
  1240. // an error space that is not known in this address space. Also
  1241. // errors raised by APIs that do not return enough error information
  1242. // may be converted to this error.
  1243. //
  1244. // HTTP Mapping: 500 Internal Server Error
  1245. // "INVALID_ARGUMENT" - The client specified an invalid argument.
  1246. // Note that this differs
  1247. // from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates
  1248. // arguments
  1249. // that are problematic regardless of the state of the system
  1250. // (e.g., a malformed file name).
  1251. //
  1252. // HTTP Mapping: 400 Bad Request
  1253. // "DEADLINE_EXCEEDED" - The deadline expired before the operation
  1254. // could complete. For operations
  1255. // that change the state of the system, this error may be returned
  1256. // even if the operation has completed successfully. For example,
  1257. // a
  1258. // successful response from a server could have been delayed long
  1259. // enough for the deadline to expire.
  1260. //
  1261. // HTTP Mapping: 504 Gateway Timeout
  1262. // "NOT_FOUND" - Some requested entity (e.g., file or directory) was
  1263. // not found.
  1264. //
  1265. // Note to server developers: if a request is denied for an entire
  1266. // class
  1267. // of users, such as gradual feature rollout or undocumented
  1268. // whitelist,
  1269. // `NOT_FOUND` may be used. If a request is denied for some users
  1270. // within
  1271. // a class of users, such as user-based access control,
  1272. // `PERMISSION_DENIED`
  1273. // must be used.
  1274. //
  1275. // HTTP Mapping: 404 Not Found
  1276. // "ALREADY_EXISTS" - The entity that a client attempted to create
  1277. // (e.g., file or directory)
  1278. // already exists.
  1279. //
  1280. // HTTP Mapping: 409 Conflict
  1281. // "PERMISSION_DENIED" - The caller does not have permission to
  1282. // execute the specified
  1283. // operation. `PERMISSION_DENIED` must not be used for rejections
  1284. // caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
  1285. // instead for those errors). `PERMISSION_DENIED` must not be
  1286. // used if the caller can not be identified (use
  1287. // `UNAUTHENTICATED`
  1288. // instead for those errors). This error code does not imply the
  1289. // request is valid or the requested entity exists or satisfies
  1290. // other pre-conditions.
  1291. //
  1292. // HTTP Mapping: 403 Forbidden
  1293. // "UNAUTHENTICATED" - The request does not have valid authentication
  1294. // credentials for the
  1295. // operation.
  1296. //
  1297. // HTTP Mapping: 401 Unauthorized
  1298. // "RESOURCE_EXHAUSTED" - Some resource has been exhausted, perhaps a
  1299. // per-user quota, or
  1300. // perhaps the entire file system is out of space.
  1301. //
  1302. // HTTP Mapping: 429 Too Many Requests
  1303. // "FAILED_PRECONDITION" - The operation was rejected because the
  1304. // system is not in a state
  1305. // required for the operation's execution. For example, the
  1306. // directory
  1307. // to be deleted is non-empty, an rmdir operation is applied to
  1308. // a non-directory, etc.
  1309. //
  1310. // Service implementors can use the following guidelines to
  1311. // decide
  1312. // between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
  1313. // (a) Use `UNAVAILABLE` if the client can retry just the failing
  1314. // call.
  1315. // (b) Use `ABORTED` if the client should retry at a higher level
  1316. // (e.g., when a client-specified test-and-set fails, indicating
  1317. // the
  1318. // client should restart a read-modify-write sequence).
  1319. // (c) Use `FAILED_PRECONDITION` if the client should not retry until
  1320. // the system state has been explicitly fixed. E.g., if an
  1321. // "rmdir"
  1322. // fails because the directory is non-empty, `FAILED_PRECONDITION`
  1323. // should be returned since the client should not retry unless
  1324. // the files are deleted from the directory.
  1325. //
  1326. // HTTP Mapping: 400 Bad Request
  1327. // "ABORTED" - The operation was aborted, typically due to a
  1328. // concurrency issue such as
  1329. // a sequencer check failure or transaction abort.
  1330. //
  1331. // See the guidelines above for deciding between
  1332. // `FAILED_PRECONDITION`,
  1333. // `ABORTED`, and `UNAVAILABLE`.
  1334. //
  1335. // HTTP Mapping: 409 Conflict
  1336. // "OUT_OF_RANGE" - The operation was attempted past the valid range.
  1337. // E.g., seeking or
  1338. // reading past end-of-file.
  1339. //
  1340. // Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
  1341. // be fixed if the system state changes. For example, a 32-bit
  1342. // file
  1343. // system will generate `INVALID_ARGUMENT` if asked to read at an
  1344. // offset that is not in the range [0,2^32-1], but it will
  1345. // generate
  1346. // `OUT_OF_RANGE` if asked to read from an offset past the current
  1347. // file size.
  1348. //
  1349. // There is a fair bit of overlap between `FAILED_PRECONDITION`
  1350. // and
  1351. // `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more
  1352. // specific
  1353. // error) when it applies so that callers who are iterating through
  1354. // a space can easily look for an `OUT_OF_RANGE` error to detect
  1355. // when
  1356. // they are done.
  1357. //
  1358. // HTTP Mapping: 400 Bad Request
  1359. // "UNIMPLEMENTED" - The operation is not implemented or is not
  1360. // supported/enabled in this
  1361. // service.
  1362. //
  1363. // HTTP Mapping: 501 Not Implemented
  1364. // "INTERNAL" - Internal errors. This means that some invariants
  1365. // expected by the
  1366. // underlying system have been broken. This error code is reserved
  1367. // for serious errors.
  1368. //
  1369. // HTTP Mapping: 500 Internal Server Error
  1370. // "UNAVAILABLE" - The service is currently unavailable. This is most
  1371. // likely a
  1372. // transient condition, which can be corrected by retrying with
  1373. // a backoff.
  1374. //
  1375. // See the guidelines above for deciding between
  1376. // `FAILED_PRECONDITION`,
  1377. // `ABORTED`, and `UNAVAILABLE`.
  1378. //
  1379. // HTTP Mapping: 503 Service Unavailable
  1380. // "DATA_LOSS" - Unrecoverable data loss or corruption.
  1381. //
  1382. // HTTP Mapping: 500 Internal Server Error
  1383. Code string `json:"code,omitempty"`
  1384. // ForceSendFields is a list of field names (e.g. "Cause") to
  1385. // unconditionally include in API requests. By default, fields with
  1386. // empty values are omitted from API requests. However, any non-pointer,
  1387. // non-interface field appearing in ForceSendFields will be sent to the
  1388. // server regardless of whether the field is empty or not. This may be
  1389. // used to include empty fields in Patch requests.
  1390. ForceSendFields []string `json:"-"`
  1391. // NullFields is a list of field names (e.g. "Cause") to include in API
  1392. // requests with the JSON null value. By default, fields with empty
  1393. // values are omitted from API requests. However, any field with an
  1394. // empty value appearing in NullFields will be sent to the server as
  1395. // null. It is an error if a field in this list has a non-empty value.
  1396. // This may be used to include null fields in Patch requests.
  1397. NullFields []string `json:"-"`
  1398. }
  1399. func (s *FailedEvent) MarshalJSON() ([]byte, error) {
  1400. type NoMethod FailedEvent
  1401. raw := NoMethod(*s)
  1402. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1403. }
  1404. // GetIamPolicyRequest: Request message for `GetIamPolicy` method.
  1405. type GetIamPolicyRequest struct {
  1406. }
  1407. // ImportReadGroupSetsRequest: The read group set import request.
  1408. type ImportReadGroupSetsRequest struct {
  1409. // DatasetId: Required. The ID of the dataset these read group sets will
  1410. // belong to. The
  1411. // caller must have WRITE permissions to this dataset.
  1412. DatasetId string `json:"datasetId,omitempty"`
  1413. // PartitionStrategy: The partition strategy describes how read groups
  1414. // are partitioned into read
  1415. // group sets.
  1416. //
  1417. // Possible values:
  1418. // "PARTITION_STRATEGY_UNSPECIFIED"
  1419. // "PER_FILE_PER_SAMPLE" - In most cases, this strategy yields one
  1420. // read group set per file. This is
  1421. // the default behavior.
  1422. //
  1423. // Allocate one read group set per file per sample. For BAM files,
  1424. // read
  1425. // groups are considered to share a sample if they have identical
  1426. // sample
  1427. // names. Furthermore, all reads for each file which do not belong to a
  1428. // read
  1429. // group, if any, will be grouped into a single read group set per-file.
  1430. // "MERGE_ALL" - Includes all read groups in all imported files into a
  1431. // single read group
  1432. // set. Requires that the headers for all imported files are equivalent.
  1433. // All
  1434. // reads which do not belong to a read group, if any, will be grouped
  1435. // into a
  1436. // separate read group set.
  1437. PartitionStrategy string `json:"partitionStrategy,omitempty"`
  1438. // ReferenceSetId: The reference set to which the imported read group
  1439. // sets are aligned to, if
  1440. // any. The reference names of this reference set must be a superset of
  1441. // those
  1442. // found in the imported file headers. If no reference set id is
  1443. // provided, a
  1444. // best effort is made to associate with a matching reference set.
  1445. ReferenceSetId string `json:"referenceSetId,omitempty"`
  1446. // SourceUris: A list of URIs pointing at
  1447. // [BAM
  1448. // files](https://samtools.github.io/hts-specs/SAMv1.pdf)
  1449. // in Google Cloud Storage.
  1450. // Those URIs can include wildcards (*), but do not add or
  1451. // remove
  1452. // matching files before import has completed.
  1453. //
  1454. // Note that Google Cloud Storage object listing is only
  1455. // eventually
  1456. // consistent: files added may be not be immediately visible
  1457. // to
  1458. // everyone. Thus, if using a wildcard it is preferable not to start
  1459. // the import immediately after the files are created.
  1460. SourceUris []string `json:"sourceUris,omitempty"`
  1461. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  1462. // unconditionally include in API requests. By default, fields with
  1463. // empty values are omitted from API requests. However, any non-pointer,
  1464. // non-interface field appearing in ForceSendFields will be sent to the
  1465. // server regardless of whether the field is empty or not. This may be
  1466. // used to include empty fields in Patch requests.
  1467. ForceSendFields []string `json:"-"`
  1468. // NullFields is a list of field names (e.g. "DatasetId") to include in
  1469. // API requests with the JSON null value. By default, fields with empty
  1470. // values are omitted from API requests. However, any field with an
  1471. // empty value appearing in NullFields will be sent to the server as
  1472. // null. It is an error if a field in this list has a non-empty value.
  1473. // This may be used to include null fields in Patch requests.
  1474. NullFields []string `json:"-"`
  1475. }
  1476. func (s *ImportReadGroupSetsRequest) MarshalJSON() ([]byte, error) {
  1477. type NoMethod ImportReadGroupSetsRequest
  1478. raw := NoMethod(*s)
  1479. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1480. }
  1481. // ImportReadGroupSetsResponse: The read group set import response.
  1482. type ImportReadGroupSetsResponse struct {
  1483. // ReadGroupSetIds: IDs of the read group sets that were created.
  1484. ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
  1485. // ForceSendFields is a list of field names (e.g. "ReadGroupSetIds") 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. "ReadGroupSetIds") to
  1493. // include in API requests with the JSON null value. By default, fields
  1494. // with empty values are omitted from API requests. However, any field
  1495. // with an empty value appearing in NullFields will be sent to the
  1496. // server as null. It is an error if a field in this list has a
  1497. // non-empty value. This may be used to include null fields in Patch
  1498. // requests.
  1499. NullFields []string `json:"-"`
  1500. }
  1501. func (s *ImportReadGroupSetsResponse) MarshalJSON() ([]byte, error) {
  1502. type NoMethod ImportReadGroupSetsResponse
  1503. raw := NoMethod(*s)
  1504. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1505. }
  1506. // ImportVariantsRequest: The variant data import request.
  1507. type ImportVariantsRequest struct {
  1508. // Format: The format of the variant data being imported. If
  1509. // unspecified, defaults to
  1510. // to `VCF`.
  1511. //
  1512. // Possible values:
  1513. // "FORMAT_UNSPECIFIED"
  1514. // "FORMAT_VCF" - VCF (Variant Call Format). The VCF files may be gzip
  1515. // compressed. gVCF is
  1516. // also supported. Disclaimer: gzip VCF imports are currently much
  1517. // slower
  1518. // than equivalent uncompressed VCF imports. For this reason,
  1519. // uncompressed
  1520. // VCF is currently recommended for imports with more than 1GB
  1521. // combined
  1522. // uncompressed size, or for time sensitive imports.
  1523. // "FORMAT_COMPLETE_GENOMICS" - Complete Genomics masterVarBeta
  1524. // format. The masterVarBeta files may
  1525. // be bzip2 compressed.
  1526. Format string `json:"format,omitempty"`
  1527. // InfoMergeConfig: A mapping between info field keys and the
  1528. // InfoMergeOperations to
  1529. // be performed on them. This is plumbed down to the
  1530. // MergeVariantRequests
  1531. // generated by the resulting import job.
  1532. InfoMergeConfig map[string]string `json:"infoMergeConfig,omitempty"`
  1533. // NormalizeReferenceNames: Convert reference names to the canonical
  1534. // representation.
  1535. // hg19 haploytypes (those reference names containing "_hap")
  1536. // are not modified in any way.
  1537. // All other reference names are modified according to the following
  1538. // rules:
  1539. // The reference name is capitalized.
  1540. // The "chr" prefix is dropped for all autosomes and sex chromsomes.
  1541. // For example "chr17" becomes "17" and "chrX" becomes "X".
  1542. // All mitochondrial chromosomes ("chrM", "chrMT", etc) become "MT".
  1543. NormalizeReferenceNames bool `json:"normalizeReferenceNames,omitempty"`
  1544. // SourceUris: A list of URIs referencing variant files in Google Cloud
  1545. // Storage. URIs can
  1546. // include wildcards [as
  1547. // described
  1548. // here](https://cloud.google.com/storage/docs/gsutil/addlhelp/
  1549. // WildcardNames).
  1550. // Note that recursive wildcards ('**') are not supported.
  1551. SourceUris []string `json:"sourceUris,omitempty"`
  1552. // VariantSetId: Required. The variant set to which variant data should
  1553. // be imported.
  1554. VariantSetId string `json:"variantSetId,omitempty"`
  1555. // ForceSendFields is a list of field names (e.g. "Format") to
  1556. // unconditionally include in API requests. By default, fields with
  1557. // empty values are omitted from API requests. However, any non-pointer,
  1558. // non-interface field appearing in ForceSendFields will be sent to the
  1559. // server regardless of whether the field is empty or not. This may be
  1560. // used to include empty fields in Patch requests.
  1561. ForceSendFields []string `json:"-"`
  1562. // NullFields is a list of field names (e.g. "Format") to include in API
  1563. // requests with the JSON null value. By default, fields with empty
  1564. // values are omitted from API requests. However, any field with an
  1565. // empty value appearing in NullFields will be sent to the server as
  1566. // null. It is an error if a field in this list has a non-empty value.
  1567. // This may be used to include null fields in Patch requests.
  1568. NullFields []string `json:"-"`
  1569. }
  1570. func (s *ImportVariantsRequest) MarshalJSON() ([]byte, error) {
  1571. type NoMethod ImportVariantsRequest
  1572. raw := NoMethod(*s)
  1573. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1574. }
  1575. // ImportVariantsResponse: The variant data import response.
  1576. type ImportVariantsResponse struct {
  1577. // CallSetIds: IDs of the call sets created during the import.
  1578. CallSetIds []string `json:"callSetIds,omitempty"`
  1579. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  1580. // unconditionally include in API requests. By default, fields with
  1581. // empty values are omitted from API requests. However, any non-pointer,
  1582. // non-interface field appearing in ForceSendFields will be sent to the
  1583. // server regardless of whether the field is empty or not. This may be
  1584. // used to include empty fields in Patch requests.
  1585. ForceSendFields []string `json:"-"`
  1586. // NullFields is a list of field names (e.g. "CallSetIds") to include in
  1587. // API requests with the JSON null value. By default, fields with empty
  1588. // values are omitted from API requests. However, any field with an
  1589. // empty value appearing in NullFields will be sent to the server as
  1590. // null. It is an error if a field in this list has a non-empty value.
  1591. // This may be used to include null fields in Patch requests.
  1592. NullFields []string `json:"-"`
  1593. }
  1594. func (s *ImportVariantsResponse) MarshalJSON() ([]byte, error) {
  1595. type NoMethod ImportVariantsResponse
  1596. raw := NoMethod(*s)
  1597. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1598. }
  1599. // LinearAlignment: A linear alignment can be represented by one CIGAR
  1600. // string. Describes the
  1601. // mapped position and local alignment of the read to the reference.
  1602. type LinearAlignment struct {
  1603. // Cigar: Represents the local alignment of this sequence (alignment
  1604. // matches, indels,
  1605. // etc) against the reference.
  1606. Cigar []*CigarUnit `json:"cigar,omitempty"`
  1607. // MappingQuality: The mapping quality of this alignment. Represents how
  1608. // likely
  1609. // the read maps to this position as opposed to other
  1610. // locations.
  1611. //
  1612. // Specifically, this is -10 log10 Pr(mapping position is wrong),
  1613. // rounded to
  1614. // the nearest integer.
  1615. MappingQuality int64 `json:"mappingQuality,omitempty"`
  1616. // Position: The position of this alignment.
  1617. Position *Position `json:"position,omitempty"`
  1618. // ForceSendFields is a list of field names (e.g. "Cigar") to
  1619. // unconditionally include in API requests. By default, fields with
  1620. // empty values are omitted from API requests. However, any non-pointer,
  1621. // non-interface field appearing in ForceSendFields will be sent to the
  1622. // server regardless of whether the field is empty or not. This may be
  1623. // used to include empty fields in Patch requests.
  1624. ForceSendFields []string `json:"-"`
  1625. // NullFields is a list of field names (e.g. "Cigar") to include in API
  1626. // requests with the JSON null value. By default, fields with empty
  1627. // values are omitted from API requests. However, any field with an
  1628. // empty value appearing in NullFields will be sent to the server as
  1629. // null. It is an error if a field in this list has a non-empty value.
  1630. // This may be used to include null fields in Patch requests.
  1631. NullFields []string `json:"-"`
  1632. }
  1633. func (s *LinearAlignment) MarshalJSON() ([]byte, error) {
  1634. type NoMethod LinearAlignment
  1635. raw := NoMethod(*s)
  1636. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1637. }
  1638. type ListBasesResponse struct {
  1639. // NextPageToken: The continuation token, which is used to page through
  1640. // large result sets.
  1641. // Provide this value in a subsequent request to return the next page
  1642. // of
  1643. // results. This field will be empty if there aren't any additional
  1644. // results.
  1645. NextPageToken string `json:"nextPageToken,omitempty"`
  1646. // Offset: The offset position (0-based) of the given `sequence` from
  1647. // the
  1648. // start of this `Reference`. This value will differ for each page
  1649. // in a paginated request.
  1650. Offset int64 `json:"offset,omitempty,string"`
  1651. // Sequence: A substring of the bases that make up this reference.
  1652. Sequence string `json:"sequence,omitempty"`
  1653. // ServerResponse contains the HTTP response code and headers from the
  1654. // server.
  1655. googleapi.ServerResponse `json:"-"`
  1656. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1657. // unconditionally include in API requests. By default, fields with
  1658. // empty values are omitted from API requests. However, any non-pointer,
  1659. // non-interface field appearing in ForceSendFields will be sent to the
  1660. // server regardless of whether the field is empty or not. This may be
  1661. // used to include empty fields in Patch requests.
  1662. ForceSendFields []string `json:"-"`
  1663. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1664. // in API requests with the JSON null value. By default, fields with
  1665. // empty values are omitted from API requests. However, any field with
  1666. // an empty value appearing in NullFields will be sent to the server as
  1667. // null. It is an error if a field in this list has a non-empty value.
  1668. // This may be used to include null fields in Patch requests.
  1669. NullFields []string `json:"-"`
  1670. }
  1671. func (s *ListBasesResponse) MarshalJSON() ([]byte, error) {
  1672. type NoMethod ListBasesResponse
  1673. raw := NoMethod(*s)
  1674. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1675. }
  1676. type ListCoverageBucketsResponse struct {
  1677. // BucketWidth: The length of each coverage bucket in base pairs. Note
  1678. // that buckets at the
  1679. // end of a reference sequence may be shorter. This value is omitted if
  1680. // the
  1681. // bucket width is infinity (the default behaviour, with no range
  1682. // or
  1683. // `targetBucketWidth`).
  1684. BucketWidth int64 `json:"bucketWidth,omitempty,string"`
  1685. // CoverageBuckets: The coverage buckets. The list of buckets is sparse;
  1686. // a bucket with 0
  1687. // overlapping reads is not returned. A bucket never crosses more than
  1688. // one
  1689. // reference sequence. Each bucket has width `bucketWidth`, unless
  1690. // its end is the end of the reference sequence.
  1691. CoverageBuckets []*CoverageBucket `json:"coverageBuckets,omitempty"`
  1692. // NextPageToken: The continuation token, which is used to page through
  1693. // large result sets.
  1694. // Provide this value in a subsequent request to return the next page
  1695. // of
  1696. // results. This field will be empty if there aren't any additional
  1697. // results.
  1698. NextPageToken string `json:"nextPageToken,omitempty"`
  1699. // ServerResponse contains the HTTP response code and headers from the
  1700. // server.
  1701. googleapi.ServerResponse `json:"-"`
  1702. // ForceSendFields is a list of field names (e.g. "BucketWidth") to
  1703. // unconditionally include in API requests. By default, fields with
  1704. // empty values are omitted from API requests. However, any non-pointer,
  1705. // non-interface field appearing in ForceSendFields will be sent to the
  1706. // server regardless of whether the field is empty or not. This may be
  1707. // used to include empty fields in Patch requests.
  1708. ForceSendFields []string `json:"-"`
  1709. // NullFields is a list of field names (e.g. "BucketWidth") to include
  1710. // in API requests with the JSON null value. By default, fields with
  1711. // empty values are omitted from API requests. However, any field with
  1712. // an empty value appearing in NullFields will be sent to the server as
  1713. // null. It is an error if a field in this list has a non-empty value.
  1714. // This may be used to include null fields in Patch requests.
  1715. NullFields []string `json:"-"`
  1716. }
  1717. func (s *ListCoverageBucketsResponse) MarshalJSON() ([]byte, error) {
  1718. type NoMethod ListCoverageBucketsResponse
  1719. raw := NoMethod(*s)
  1720. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1721. }
  1722. // ListDatasetsResponse: The dataset list response.
  1723. type ListDatasetsResponse struct {
  1724. // Datasets: The list of matching Datasets.
  1725. Datasets []*Dataset `json:"datasets,omitempty"`
  1726. // NextPageToken: The continuation token, which is used to page through
  1727. // large result sets.
  1728. // Provide this value in a subsequent request to return the next page
  1729. // of
  1730. // results. This field will be empty if there aren't any additional
  1731. // results.
  1732. NextPageToken string `json:"nextPageToken,omitempty"`
  1733. // ServerResponse contains the HTTP response code and headers from the
  1734. // server.
  1735. googleapi.ServerResponse `json:"-"`
  1736. // ForceSendFields is a list of field names (e.g. "Datasets") to
  1737. // unconditionally include in API requests. By default, fields with
  1738. // empty values are omitted from API requests. However, any non-pointer,
  1739. // non-interface field appearing in ForceSendFields will be sent to the
  1740. // server regardless of whether the field is empty or not. This may be
  1741. // used to include empty fields in Patch requests.
  1742. ForceSendFields []string `json:"-"`
  1743. // NullFields is a list of field names (e.g. "Datasets") to include in
  1744. // API requests with the JSON null value. By default, fields with empty
  1745. // values are omitted from API requests. However, any field with an
  1746. // empty value appearing in NullFields will be sent to the server as
  1747. // null. It is an error if a field in this list has a non-empty value.
  1748. // This may be used to include null fields in Patch requests.
  1749. NullFields []string `json:"-"`
  1750. }
  1751. func (s *ListDatasetsResponse) MarshalJSON() ([]byte, error) {
  1752. type NoMethod ListDatasetsResponse
  1753. raw := NoMethod(*s)
  1754. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1755. }
  1756. // ListOperationsResponse: The response message for
  1757. // Operations.ListOperations.
  1758. type ListOperationsResponse struct {
  1759. // NextPageToken: The standard List next-page token.
  1760. NextPageToken string `json:"nextPageToken,omitempty"`
  1761. // Operations: A list of operations that matches the specified filter in
  1762. // the request.
  1763. Operations []*Operation `json:"operations,omitempty"`
  1764. // ServerResponse contains the HTTP response code and headers from the
  1765. // server.
  1766. googleapi.ServerResponse `json:"-"`
  1767. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  1768. // unconditionally include in API requests. By default, fields with
  1769. // empty values are omitted from API requests. However, any non-pointer,
  1770. // non-interface field appearing in ForceSendFields will be sent to the
  1771. // server regardless of whether the field is empty or not. This may be
  1772. // used to include empty fields in Patch requests.
  1773. ForceSendFields []string `json:"-"`
  1774. // NullFields is a list of field names (e.g. "NextPageToken") to include
  1775. // in API requests with the JSON null value. By default, fields with
  1776. // empty values are omitted from API requests. However, any field with
  1777. // an empty value appearing in NullFields will be sent to the server as
  1778. // null. It is an error if a field in this list has a non-empty value.
  1779. // This may be used to include null fields in Patch requests.
  1780. NullFields []string `json:"-"`
  1781. }
  1782. func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
  1783. type NoMethod ListOperationsResponse
  1784. raw := NoMethod(*s)
  1785. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1786. }
  1787. type MergeVariantsRequest struct {
  1788. // InfoMergeConfig: A mapping between info field keys and the
  1789. // InfoMergeOperations to
  1790. // be performed on them.
  1791. InfoMergeConfig map[string]string `json:"infoMergeConfig,omitempty"`
  1792. // VariantSetId: The destination variant set.
  1793. VariantSetId string `json:"variantSetId,omitempty"`
  1794. // Variants: The variants to be merged with existing variants.
  1795. Variants []*Variant `json:"variants,omitempty"`
  1796. // ForceSendFields is a list of field names (e.g. "InfoMergeConfig") to
  1797. // unconditionally include in API requests. By default, fields with
  1798. // empty values are omitted from API requests. However, any non-pointer,
  1799. // non-interface field appearing in ForceSendFields will be sent to the
  1800. // server regardless of whether the field is empty or not. This may be
  1801. // used to include empty fields in Patch requests.
  1802. ForceSendFields []string `json:"-"`
  1803. // NullFields is a list of field names (e.g. "InfoMergeConfig") to
  1804. // include in API requests with the JSON null value. By default, fields
  1805. // with empty values are omitted from API requests. However, any field
  1806. // with an empty value appearing in NullFields will be sent to the
  1807. // server as null. It is an error if a field in this list has a
  1808. // non-empty value. This may be used to include null fields in Patch
  1809. // requests.
  1810. NullFields []string `json:"-"`
  1811. }
  1812. func (s *MergeVariantsRequest) MarshalJSON() ([]byte, error) {
  1813. type NoMethod MergeVariantsRequest
  1814. raw := NoMethod(*s)
  1815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1816. }
  1817. // Operation: This resource represents a long-running operation that is
  1818. // the result of a
  1819. // network API call.
  1820. type Operation struct {
  1821. // Done: If the value is `false`, it means the operation is still in
  1822. // progress.
  1823. // If `true`, the operation is completed, and either `error` or
  1824. // `response` is
  1825. // available.
  1826. Done bool `json:"done,omitempty"`
  1827. // Error: The error result of the operation in case of failure or
  1828. // cancellation.
  1829. Error *Status `json:"error,omitempty"`
  1830. // Metadata: An OperationMetadata or Metadata object. This will always
  1831. // be returned with the Operation.
  1832. Metadata googleapi.RawMessage `json:"metadata,omitempty"`
  1833. // Name: The server-assigned name, which is only unique within the same
  1834. // service that originally returns it. For example&#58;
  1835. // `operations/CJHU7Oi_ChDrveSpBRjfuL-qzoWAgEw`
  1836. Name string `json:"name,omitempty"`
  1837. // Response: If importing ReadGroupSets, an ImportReadGroupSetsResponse
  1838. // is returned. If importing Variants, an ImportVariantsResponse is
  1839. // returned. For pipelines and exports, an Empty response is returned.
  1840. Response googleapi.RawMessage `json:"response,omitempty"`
  1841. // ServerResponse contains the HTTP response code and headers from the
  1842. // server.
  1843. googleapi.ServerResponse `json:"-"`
  1844. // ForceSendFields is a list of field names (e.g. "Done") to
  1845. // unconditionally include in API requests. By default, fields with
  1846. // empty values are omitted from API requests. However, any non-pointer,
  1847. // non-interface field appearing in ForceSendFields will be sent to the
  1848. // server regardless of whether the field is empty or not. This may be
  1849. // used to include empty fields in Patch requests.
  1850. ForceSendFields []string `json:"-"`
  1851. // NullFields is a list of field names (e.g. "Done") to include in API
  1852. // requests with the JSON null value. By default, fields with empty
  1853. // values are omitted from API requests. However, any field with an
  1854. // empty value appearing in NullFields will be sent to the server as
  1855. // null. It is an error if a field in this list has a non-empty value.
  1856. // This may be used to include null fields in Patch requests.
  1857. NullFields []string `json:"-"`
  1858. }
  1859. func (s *Operation) MarshalJSON() ([]byte, error) {
  1860. type NoMethod Operation
  1861. raw := NoMethod(*s)
  1862. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1863. }
  1864. // OperationEvent: An event that occurred during an Operation.
  1865. type OperationEvent struct {
  1866. // Description: Required description of event.
  1867. Description string `json:"description,omitempty"`
  1868. // EndTime: Optional time of when event finished. An event can have a
  1869. // start time and no
  1870. // finish time. If an event has a finish time, there must be a start
  1871. // time.
  1872. EndTime string `json:"endTime,omitempty"`
  1873. // StartTime: Optional time of when event started.
  1874. StartTime string `json:"startTime,omitempty"`
  1875. // ForceSendFields is a list of field names (e.g. "Description") to
  1876. // unconditionally include in API requests. By default, fields with
  1877. // empty values are omitted from API requests. However, any non-pointer,
  1878. // non-interface field appearing in ForceSendFields will be sent to the
  1879. // server regardless of whether the field is empty or not. This may be
  1880. // used to include empty fields in Patch requests.
  1881. ForceSendFields []string `json:"-"`
  1882. // NullFields is a list of field names (e.g. "Description") to include
  1883. // in API requests with the JSON null value. By default, fields with
  1884. // empty values are omitted from API requests. However, any field with
  1885. // an empty value appearing in NullFields will be sent to the server as
  1886. // null. It is an error if a field in this list has a non-empty value.
  1887. // This may be used to include null fields in Patch requests.
  1888. NullFields []string `json:"-"`
  1889. }
  1890. func (s *OperationEvent) MarshalJSON() ([]byte, error) {
  1891. type NoMethod OperationEvent
  1892. raw := NoMethod(*s)
  1893. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1894. }
  1895. // OperationMetadata: Metadata describing an Operation.
  1896. type OperationMetadata struct {
  1897. // ClientId: This field is deprecated. Use `labels` instead. Optionally
  1898. // provided by the
  1899. // caller when submitting the request that creates the operation.
  1900. ClientId string `json:"clientId,omitempty"`
  1901. // CreateTime: The time at which the job was submitted to the Genomics
  1902. // service.
  1903. CreateTime string `json:"createTime,omitempty"`
  1904. // EndTime: The time at which the job stopped running.
  1905. EndTime string `json:"endTime,omitempty"`
  1906. // Events: Optional event messages that were generated during the job's
  1907. // execution.
  1908. // This also contains any warnings that were generated during import
  1909. // or export.
  1910. Events []*OperationEvent `json:"events,omitempty"`
  1911. // Labels: Optionally provided by the caller when submitting the request
  1912. // that creates
  1913. // the operation.
  1914. Labels map[string]string `json:"labels,omitempty"`
  1915. // ProjectId: The Google Cloud Project in which the job is scoped.
  1916. ProjectId string `json:"projectId,omitempty"`
  1917. // Request: The original request that started the operation. Note that
  1918. // this will be in
  1919. // current version of the API. If the operation was started with v1beta2
  1920. // API
  1921. // and a GetOperation is performed on v1 API, a v1 request will be
  1922. // returned.
  1923. Request googleapi.RawMessage `json:"request,omitempty"`
  1924. // RuntimeMetadata: Runtime metadata on this Operation.
  1925. RuntimeMetadata googleapi.RawMessage `json:"runtimeMetadata,omitempty"`
  1926. // StartTime: The time at which the job began to run.
  1927. StartTime string `json:"startTime,omitempty"`
  1928. // ForceSendFields is a list of field names (e.g. "ClientId") to
  1929. // unconditionally include in API requests. By default, fields with
  1930. // empty values are omitted from API requests. However, any non-pointer,
  1931. // non-interface field appearing in ForceSendFields will be sent to the
  1932. // server regardless of whether the field is empty or not. This may be
  1933. // used to include empty fields in Patch requests.
  1934. ForceSendFields []string `json:"-"`
  1935. // NullFields is a list of field names (e.g. "ClientId") to include in
  1936. // API requests with the JSON null value. By default, fields with empty
  1937. // values are omitted from API requests. However, any field with an
  1938. // empty value appearing in NullFields will be sent to the server as
  1939. // null. It is an error if a field in this list has a non-empty value.
  1940. // This may be used to include null fields in Patch requests.
  1941. NullFields []string `json:"-"`
  1942. }
  1943. func (s *OperationMetadata) MarshalJSON() ([]byte, error) {
  1944. type NoMethod OperationMetadata
  1945. raw := NoMethod(*s)
  1946. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1947. }
  1948. // Policy: Defines an Identity and Access Management (IAM) policy. It is
  1949. // used to
  1950. // specify access control policies for Cloud Platform resources.
  1951. //
  1952. //
  1953. // A `Policy` consists of a list of `bindings`. A `binding` binds a list
  1954. // of
  1955. // `members` to a `role`, where the members can be user accounts, Google
  1956. // groups,
  1957. // Google domains, and service accounts. A `role` is a named list of
  1958. // permissions
  1959. // defined by IAM.
  1960. //
  1961. // **JSON Example**
  1962. //
  1963. // {
  1964. // "bindings": [
  1965. // {
  1966. // "role": "roles/owner",
  1967. // "members": [
  1968. // "user:mike@example.com",
  1969. // "group:admins@example.com",
  1970. // "domain:google.com",
  1971. //
  1972. // "serviceAccount:my-other-app@appspot.gserviceaccount.com"
  1973. // ]
  1974. // },
  1975. // {
  1976. // "role": "roles/viewer",
  1977. // "members": ["user:sean@example.com"]
  1978. // }
  1979. // ]
  1980. // }
  1981. //
  1982. // **YAML Example**
  1983. //
  1984. // bindings:
  1985. // - members:
  1986. // - user:mike@example.com
  1987. // - group:admins@example.com
  1988. // - domain:google.com
  1989. // - serviceAccount:my-other-app@appspot.gserviceaccount.com
  1990. // role: roles/owner
  1991. // - members:
  1992. // - user:sean@example.com
  1993. // role: roles/viewer
  1994. //
  1995. //
  1996. // For a description of IAM and its features, see the
  1997. // [IAM developer's guide](https://cloud.google.com/iam/docs).
  1998. type Policy struct {
  1999. // Bindings: Associates a list of `members` to a `role`.
  2000. // `bindings` with no members will result in an error.
  2001. Bindings []*Binding `json:"bindings,omitempty"`
  2002. // Etag: `etag` is used for optimistic concurrency control as a way to
  2003. // help
  2004. // prevent simultaneous updates of a policy from overwriting each
  2005. // other.
  2006. // It is strongly suggested that systems make use of the `etag` in
  2007. // the
  2008. // read-modify-write cycle to perform policy updates in order to avoid
  2009. // race
  2010. // conditions: An `etag` is returned in the response to `getIamPolicy`,
  2011. // and
  2012. // systems are expected to put that etag in the request to
  2013. // `setIamPolicy` to
  2014. // ensure that their change will be applied to the same version of the
  2015. // policy.
  2016. //
  2017. // If no `etag` is provided in the call to `setIamPolicy`, then the
  2018. // existing
  2019. // policy is overwritten blindly.
  2020. Etag string `json:"etag,omitempty"`
  2021. // Version: Deprecated.
  2022. Version int64 `json:"version,omitempty"`
  2023. // ServerResponse contains the HTTP response code and headers from the
  2024. // server.
  2025. googleapi.ServerResponse `json:"-"`
  2026. // ForceSendFields is a list of field names (e.g. "Bindings") to
  2027. // unconditionally include in API requests. By default, fields with
  2028. // empty values are omitted from API requests. However, any non-pointer,
  2029. // non-interface field appearing in ForceSendFields will be sent to the
  2030. // server regardless of whether the field is empty or not. This may be
  2031. // used to include empty fields in Patch requests.
  2032. ForceSendFields []string `json:"-"`
  2033. // NullFields is a list of field names (e.g. "Bindings") to include in
  2034. // API requests with the JSON null value. By default, fields with empty
  2035. // values are omitted from API requests. However, any field with an
  2036. // empty value appearing in NullFields will be sent to the server as
  2037. // null. It is an error if a field in this list has a non-empty value.
  2038. // This may be used to include null fields in Patch requests.
  2039. NullFields []string `json:"-"`
  2040. }
  2041. func (s *Policy) MarshalJSON() ([]byte, error) {
  2042. type NoMethod Policy
  2043. raw := NoMethod(*s)
  2044. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2045. }
  2046. // Position: An abstraction for referring to a genomic position, in
  2047. // relation to some
  2048. // already known reference. For now, represents a genomic position as
  2049. // a
  2050. // reference name, a base number on that reference (0-based), and
  2051. // a
  2052. // determination of forward or reverse strand.
  2053. type Position struct {
  2054. // Position: The 0-based offset from the start of the forward strand for
  2055. // that reference.
  2056. Position int64 `json:"position,omitempty,string"`
  2057. // ReferenceName: The name of the reference in whatever reference set is
  2058. // being used.
  2059. ReferenceName string `json:"referenceName,omitempty"`
  2060. // ReverseStrand: Whether this position is on the reverse strand, as
  2061. // opposed to the forward
  2062. // strand.
  2063. ReverseStrand bool `json:"reverseStrand,omitempty"`
  2064. // ForceSendFields is a list of field names (e.g. "Position") to
  2065. // unconditionally include in API requests. By default, fields with
  2066. // empty values are omitted from API requests. However, any non-pointer,
  2067. // non-interface field appearing in ForceSendFields will be sent to the
  2068. // server regardless of whether the field is empty or not. This may be
  2069. // used to include empty fields in Patch requests.
  2070. ForceSendFields []string `json:"-"`
  2071. // NullFields is a list of field names (e.g. "Position") to include in
  2072. // API requests with the JSON null value. By default, fields with empty
  2073. // values are omitted from API requests. However, any field with an
  2074. // empty value appearing in NullFields will be sent to the server as
  2075. // null. It is an error if a field in this list has a non-empty value.
  2076. // This may be used to include null fields in Patch requests.
  2077. NullFields []string `json:"-"`
  2078. }
  2079. func (s *Position) MarshalJSON() ([]byte, error) {
  2080. type NoMethod Position
  2081. raw := NoMethod(*s)
  2082. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2083. }
  2084. type Program struct {
  2085. // CommandLine: The command line used to run this program.
  2086. CommandLine string `json:"commandLine,omitempty"`
  2087. // Id: The user specified locally unique ID of the program. Used along
  2088. // with
  2089. // `prevProgramId` to define an ordering between programs.
  2090. Id string `json:"id,omitempty"`
  2091. // Name: The display name of the program. This is typically the
  2092. // colloquial name of
  2093. // the tool used, for example 'bwa' or 'picard'.
  2094. Name string `json:"name,omitempty"`
  2095. // PrevProgramId: The ID of the program run before this one.
  2096. PrevProgramId string `json:"prevProgramId,omitempty"`
  2097. // Version: The version of the program run.
  2098. Version string `json:"version,omitempty"`
  2099. // ForceSendFields is a list of field names (e.g. "CommandLine") to
  2100. // unconditionally include in API requests. By default, fields with
  2101. // empty values are omitted from API requests. However, any non-pointer,
  2102. // non-interface field appearing in ForceSendFields will be sent to the
  2103. // server regardless of whether the field is empty or not. This may be
  2104. // used to include empty fields in Patch requests.
  2105. ForceSendFields []string `json:"-"`
  2106. // NullFields is a list of field names (e.g. "CommandLine") to include
  2107. // in API requests with the JSON null value. By default, fields with
  2108. // empty values are omitted from API requests. However, any field with
  2109. // an empty value appearing in NullFields will be sent to the server as
  2110. // null. It is an error if a field in this list has a non-empty value.
  2111. // This may be used to include null fields in Patch requests.
  2112. NullFields []string `json:"-"`
  2113. }
  2114. func (s *Program) MarshalJSON() ([]byte, error) {
  2115. type NoMethod Program
  2116. raw := NoMethod(*s)
  2117. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2118. }
  2119. // PullStartedEvent: This event is generated when the worker starts
  2120. // pulling an image.
  2121. type PullStartedEvent struct {
  2122. // ImageUri: The URI of the image that was pulled.
  2123. ImageUri string `json:"imageUri,omitempty"`
  2124. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  2125. // unconditionally include in API requests. By default, fields with
  2126. // empty values are omitted from API requests. However, any non-pointer,
  2127. // non-interface field appearing in ForceSendFields will be sent to the
  2128. // server regardless of whether the field is empty or not. This may be
  2129. // used to include empty fields in Patch requests.
  2130. ForceSendFields []string `json:"-"`
  2131. // NullFields is a list of field names (e.g. "ImageUri") to include in
  2132. // API requests with the JSON null value. By default, fields with empty
  2133. // values are omitted from API requests. However, any field with an
  2134. // empty value appearing in NullFields will be sent to the server as
  2135. // null. It is an error if a field in this list has a non-empty value.
  2136. // This may be used to include null fields in Patch requests.
  2137. NullFields []string `json:"-"`
  2138. }
  2139. func (s *PullStartedEvent) MarshalJSON() ([]byte, error) {
  2140. type NoMethod PullStartedEvent
  2141. raw := NoMethod(*s)
  2142. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2143. }
  2144. // PullStoppedEvent: This event is generated when the worker stops
  2145. // pulling an image.
  2146. type PullStoppedEvent struct {
  2147. // ImageUri: The URI of the image that was pulled.
  2148. ImageUri string `json:"imageUri,omitempty"`
  2149. // ForceSendFields is a list of field names (e.g. "ImageUri") to
  2150. // unconditionally include in API requests. By default, fields with
  2151. // empty values are omitted from API requests. However, any non-pointer,
  2152. // non-interface field appearing in ForceSendFields will be sent to the
  2153. // server regardless of whether the field is empty or not. This may be
  2154. // used to include empty fields in Patch requests.
  2155. ForceSendFields []string `json:"-"`
  2156. // NullFields is a list of field names (e.g. "ImageUri") to include in
  2157. // API requests with the JSON null value. By default, fields with empty
  2158. // values are omitted from API requests. However, any field with an
  2159. // empty value appearing in NullFields will be sent to the server as
  2160. // null. It is an error if a field in this list has a non-empty value.
  2161. // This may be used to include null fields in Patch requests.
  2162. NullFields []string `json:"-"`
  2163. }
  2164. func (s *PullStoppedEvent) MarshalJSON() ([]byte, error) {
  2165. type NoMethod PullStoppedEvent
  2166. raw := NoMethod(*s)
  2167. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2168. }
  2169. // Range: A 0-based half-open genomic coordinate range for search
  2170. // requests.
  2171. type Range struct {
  2172. // End: The end position of the range on the reference, 0-based
  2173. // exclusive.
  2174. End int64 `json:"end,omitempty,string"`
  2175. // ReferenceName: The reference sequence name, for example `chr1`,
  2176. // `1`, or `chrX`.
  2177. ReferenceName string `json:"referenceName,omitempty"`
  2178. // Start: The start position of the range on the reference, 0-based
  2179. // inclusive.
  2180. Start int64 `json:"start,omitempty,string"`
  2181. // ForceSendFields is a list of field names (e.g. "End") to
  2182. // unconditionally include in API requests. By default, fields with
  2183. // empty values are omitted from API requests. However, any non-pointer,
  2184. // non-interface field appearing in ForceSendFields will be sent to the
  2185. // server regardless of whether the field is empty or not. This may be
  2186. // used to include empty fields in Patch requests.
  2187. ForceSendFields []string `json:"-"`
  2188. // NullFields is a list of field names (e.g. "End") to include in API
  2189. // requests with the JSON null value. By default, fields with empty
  2190. // values are omitted from API requests. However, any field with an
  2191. // empty value appearing in NullFields will be sent to the server as
  2192. // null. It is an error if a field in this list has a non-empty value.
  2193. // This may be used to include null fields in Patch requests.
  2194. NullFields []string `json:"-"`
  2195. }
  2196. func (s *Range) MarshalJSON() ([]byte, error) {
  2197. type NoMethod Range
  2198. raw := NoMethod(*s)
  2199. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2200. }
  2201. // Read: A read alignment describes a linear alignment of a string of
  2202. // DNA to a
  2203. // reference sequence, in addition to metadata
  2204. // about the fragment (the molecule of DNA sequenced) and the read (the
  2205. // bases
  2206. // which were read by the sequencer). A read is equivalent to a line in
  2207. // a SAM
  2208. // file. A read belongs to exactly one read group and exactly one
  2209. // read group set.
  2210. //
  2211. // ### Reverse-stranded reads
  2212. //
  2213. // Mapped reads (reads having a non-null `alignment`) can be aligned to
  2214. // either
  2215. // the forward or the reverse strand of their associated reference.
  2216. // Strandedness
  2217. // of a mapped read is encoded by
  2218. // `alignment.position.reverseStrand`.
  2219. //
  2220. // If we consider the reference to be a forward-stranded coordinate
  2221. // space of
  2222. // `[0, reference.length)` with `0` as the left-most position
  2223. // and
  2224. // `reference.length` as the right-most position, reads are always
  2225. // aligned left
  2226. // to right. That is, `alignment.position.position` always refers to
  2227. // the
  2228. // left-most reference coordinate and `alignment.cigar` describes the
  2229. // alignment
  2230. // of this read to the reference from left to right. All per-base fields
  2231. // such as
  2232. // `alignedSequence` and `alignedQuality` share this same
  2233. // left-to-right
  2234. // orientation; this is true of reads which are aligned to either
  2235. // strand. For
  2236. // reverse-stranded reads, this means that `alignedSequence` is the
  2237. // reverse
  2238. // complement of the bases that were originally reported by the
  2239. // sequencing
  2240. // machine.
  2241. //
  2242. // ### Generating a reference-aligned sequence string
  2243. //
  2244. // When interacting with mapped reads, it's often useful to produce a
  2245. // string
  2246. // representing the local alignment of the read to reference. The
  2247. // following
  2248. // pseudocode demonstrates one way of doing this:
  2249. //
  2250. // out = ""
  2251. // offset = 0
  2252. // for c in read.alignment.cigar {
  2253. // switch c.operation {
  2254. // case "ALIGNMENT_MATCH", "SEQUENCE_MATCH", "SEQUENCE_MISMATCH":
  2255. // out += read.alignedSequence[offset:offset+c.operationLength]
  2256. // offset += c.operationLength
  2257. // break
  2258. // case "CLIP_SOFT", "INSERT":
  2259. // offset += c.operationLength
  2260. // break
  2261. // case "PAD":
  2262. // out += repeat("*", c.operationLength)
  2263. // break
  2264. // case "DELETE":
  2265. // out += repeat("-", c.operationLength)
  2266. // break
  2267. // case "SKIP":
  2268. // out += repeat(" ", c.operationLength)
  2269. // break
  2270. // case "CLIP_HARD":
  2271. // break
  2272. // }
  2273. // }
  2274. // return out
  2275. //
  2276. // ### Converting to SAM's CIGAR string
  2277. //
  2278. // The following pseudocode generates a SAM CIGAR string from
  2279. // the
  2280. // `cigar` field. Note that this is a lossy
  2281. // conversion
  2282. // (`cigar.referenceSequence` is lost).
  2283. //
  2284. // cigarMap = {
  2285. // "ALIGNMENT_MATCH": "M",
  2286. // "INSERT": "I",
  2287. // "DELETE": "D",
  2288. // "SKIP": "N",
  2289. // "CLIP_SOFT": "S",
  2290. // "CLIP_HARD": "H",
  2291. // "PAD": "P",
  2292. // "SEQUENCE_MATCH": "=",
  2293. // "SEQUENCE_MISMATCH": "X",
  2294. // }
  2295. // cigarStr = ""
  2296. // for c in read.alignment.cigar {
  2297. // cigarStr += c.operationLength + cigarMap[c.operation]
  2298. // }
  2299. // return cigarStr
  2300. type Read struct {
  2301. // AlignedQuality: The quality of the read sequence contained in this
  2302. // alignment record
  2303. // (equivalent to QUAL in SAM).
  2304. // `alignedSequence` and `alignedQuality` may be shorter than the full
  2305. // read
  2306. // sequence and quality. This will occur if the alignment is part of
  2307. // a
  2308. // chimeric alignment, or if the read was trimmed. When this occurs, the
  2309. // CIGAR
  2310. // for this read will begin/end with a hard clip operator that will
  2311. // indicate
  2312. // the length of the excised sequence.
  2313. AlignedQuality []int64 `json:"alignedQuality,omitempty"`
  2314. // AlignedSequence: The bases of the read sequence contained in this
  2315. // alignment record,
  2316. // **without CIGAR operations applied** (equivalent to SEQ in
  2317. // SAM).
  2318. // `alignedSequence` and `alignedQuality` may be
  2319. // shorter than the full read sequence and quality. This will occur if
  2320. // the
  2321. // alignment is part of a chimeric alignment, or if the read was
  2322. // trimmed. When
  2323. // this occurs, the CIGAR for this read will begin/end with a hard
  2324. // clip
  2325. // operator that will indicate the length of the excised sequence.
  2326. AlignedSequence string `json:"alignedSequence,omitempty"`
  2327. // Alignment: The linear alignment for this alignment record. This field
  2328. // is null for
  2329. // unmapped reads.
  2330. Alignment *LinearAlignment `json:"alignment,omitempty"`
  2331. // DuplicateFragment: The fragment is a PCR or optical duplicate (SAM
  2332. // flag 0x400).
  2333. DuplicateFragment bool `json:"duplicateFragment,omitempty"`
  2334. // FailedVendorQualityChecks: Whether this read did not pass filters,
  2335. // such as platform or vendor quality
  2336. // controls (SAM flag 0x200).
  2337. FailedVendorQualityChecks bool `json:"failedVendorQualityChecks,omitempty"`
  2338. // FragmentLength: The observed length of the fragment, equivalent to
  2339. // TLEN in SAM.
  2340. FragmentLength int64 `json:"fragmentLength,omitempty"`
  2341. // FragmentName: The fragment name. Equivalent to QNAME (query template
  2342. // name) in SAM.
  2343. FragmentName string `json:"fragmentName,omitempty"`
  2344. // Id: The server-generated read ID, unique across all reads. This is
  2345. // different
  2346. // from the `fragmentName`.
  2347. Id string `json:"id,omitempty"`
  2348. // Info: A map of additional read alignment information. This must be of
  2349. // the form
  2350. // map<string, string[]> (string key mapping to a list of string
  2351. // values).
  2352. Info map[string][]interface{} `json:"info,omitempty"`
  2353. // NextMatePosition: The mapping of the primary alignment of
  2354. // the
  2355. // `(readNumber+1)%numberReads` read in the fragment. It replaces
  2356. // mate position and mate strand in SAM.
  2357. NextMatePosition *Position `json:"nextMatePosition,omitempty"`
  2358. // NumberReads: The number of reads in the fragment (extension to SAM
  2359. // flag 0x1).
  2360. NumberReads int64 `json:"numberReads,omitempty"`
  2361. // ProperPlacement: The orientation and the distance between reads from
  2362. // the fragment are
  2363. // consistent with the sequencing protocol (SAM flag 0x2).
  2364. ProperPlacement bool `json:"properPlacement,omitempty"`
  2365. // ReadGroupId: The ID of the read group this read belongs to. A read
  2366. // belongs to exactly
  2367. // one read group. This is a server-generated ID which is distinct from
  2368. // SAM's
  2369. // RG tag (for that value, see
  2370. // ReadGroup.name).
  2371. ReadGroupId string `json:"readGroupId,omitempty"`
  2372. // ReadGroupSetId: The ID of the read group set this read belongs to. A
  2373. // read belongs to
  2374. // exactly one read group set.
  2375. ReadGroupSetId string `json:"readGroupSetId,omitempty"`
  2376. // ReadNumber: The read number in sequencing. 0-based and less than
  2377. // numberReads. This
  2378. // field replaces SAM flag 0x40 and 0x80.
  2379. ReadNumber int64 `json:"readNumber,omitempty"`
  2380. // SecondaryAlignment: Whether this alignment is secondary. Equivalent
  2381. // to SAM flag 0x100.
  2382. // A secondary alignment represents an alternative to the primary
  2383. // alignment
  2384. // for this read. Aligners may return secondary alignments if a read can
  2385. // map
  2386. // ambiguously to multiple coordinates in the genome. By convention,
  2387. // each read
  2388. // has one and only one alignment where both `secondaryAlignment`
  2389. // and `supplementaryAlignment` are false.
  2390. SecondaryAlignment bool `json:"secondaryAlignment,omitempty"`
  2391. // SupplementaryAlignment: Whether this alignment is supplementary.
  2392. // Equivalent to SAM flag 0x800.
  2393. // Supplementary alignments are used in the representation of a
  2394. // chimeric
  2395. // alignment. In a chimeric alignment, a read is split into
  2396. // multiple
  2397. // linear alignments that map to different reference contigs. The
  2398. // first
  2399. // linear alignment in the read will be designated as the
  2400. // representative
  2401. // alignment; the remaining linear alignments will be designated
  2402. // as
  2403. // supplementary alignments. These alignments may have different
  2404. // mapping
  2405. // quality scores. In each linear alignment in a chimeric alignment, the
  2406. // read
  2407. // will be hard clipped. The `alignedSequence` and
  2408. // `alignedQuality` fields in the alignment record will only
  2409. // represent the bases for its respective linear alignment.
  2410. SupplementaryAlignment bool `json:"supplementaryAlignment,omitempty"`
  2411. // ForceSendFields is a list of field names (e.g. "AlignedQuality") to
  2412. // unconditionally include in API requests. By default, fields with
  2413. // empty values are omitted from API requests. However, any non-pointer,
  2414. // non-interface field appearing in ForceSendFields will be sent to the
  2415. // server regardless of whether the field is empty or not. This may be
  2416. // used to include empty fields in Patch requests.
  2417. ForceSendFields []string `json:"-"`
  2418. // NullFields is a list of field names (e.g. "AlignedQuality") to
  2419. // include in API requests with the JSON null value. By default, fields
  2420. // with empty values are omitted from API requests. However, any field
  2421. // with an empty value appearing in NullFields will be sent to the
  2422. // server as null. It is an error if a field in this list has a
  2423. // non-empty value. This may be used to include null fields in Patch
  2424. // requests.
  2425. NullFields []string `json:"-"`
  2426. }
  2427. func (s *Read) MarshalJSON() ([]byte, error) {
  2428. type NoMethod Read
  2429. raw := NoMethod(*s)
  2430. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2431. }
  2432. // ReadGroup: A read group is all the data that's processed the same way
  2433. // by the sequencer.
  2434. type ReadGroup struct {
  2435. // DatasetId: The dataset to which this read group belongs.
  2436. DatasetId string `json:"datasetId,omitempty"`
  2437. // Description: A free-form text description of this read group.
  2438. Description string `json:"description,omitempty"`
  2439. // Experiment: The experiment used to generate this read group.
  2440. Experiment *Experiment `json:"experiment,omitempty"`
  2441. // Id: The server-generated read group ID, unique for all read
  2442. // groups.
  2443. // Note: This is different than the @RG ID field in the SAM spec. For
  2444. // that
  2445. // value, see name.
  2446. Id string `json:"id,omitempty"`
  2447. // Info: A map of additional read group information. This must be of the
  2448. // form
  2449. // map<string, string[]> (string key mapping to a list of string
  2450. // values).
  2451. Info map[string][]interface{} `json:"info,omitempty"`
  2452. // Name: The read group name. This corresponds to the @RG ID field in
  2453. // the SAM spec.
  2454. Name string `json:"name,omitempty"`
  2455. // PredictedInsertSize: The predicted insert size of this read group.
  2456. // The insert size is the length
  2457. // the sequenced DNA fragment from end-to-end, not including the
  2458. // adapters.
  2459. PredictedInsertSize int64 `json:"predictedInsertSize,omitempty"`
  2460. // Programs: The programs used to generate this read group. Programs are
  2461. // always
  2462. // identical for all read groups within a read group set. For this
  2463. // reason,
  2464. // only the first read group in a returned set will have this
  2465. // field
  2466. // populated.
  2467. Programs []*Program `json:"programs,omitempty"`
  2468. // ReferenceSetId: The reference set the reads in this read group are
  2469. // aligned to.
  2470. ReferenceSetId string `json:"referenceSetId,omitempty"`
  2471. // SampleId: A client-supplied sample identifier for the reads in this
  2472. // read group.
  2473. SampleId string `json:"sampleId,omitempty"`
  2474. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  2475. // unconditionally include in API requests. By default, fields with
  2476. // empty values are omitted from API requests. However, any non-pointer,
  2477. // non-interface field appearing in ForceSendFields will be sent to the
  2478. // server regardless of whether the field is empty or not. This may be
  2479. // used to include empty fields in Patch requests.
  2480. ForceSendFields []string `json:"-"`
  2481. // NullFields is a list of field names (e.g. "DatasetId") to include in
  2482. // API requests with the JSON null value. By default, fields with empty
  2483. // values are omitted from API requests. However, any field with an
  2484. // empty value appearing in NullFields will be sent to the server as
  2485. // null. It is an error if a field in this list has a non-empty value.
  2486. // This may be used to include null fields in Patch requests.
  2487. NullFields []string `json:"-"`
  2488. }
  2489. func (s *ReadGroup) MarshalJSON() ([]byte, error) {
  2490. type NoMethod ReadGroup
  2491. raw := NoMethod(*s)
  2492. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2493. }
  2494. // ReadGroupSet: A read group set is a logical collection of read
  2495. // groups, which are
  2496. // collections of reads produced by a sequencer. A read group set
  2497. // typically
  2498. // models reads corresponding to one sample, sequenced one way, and
  2499. // aligned one
  2500. // way.
  2501. //
  2502. // * A read group set belongs to one dataset.
  2503. // * A read group belongs to one read group set.
  2504. // * A read belongs to one read group.
  2505. type ReadGroupSet struct {
  2506. // DatasetId: The dataset to which this read group set belongs.
  2507. DatasetId string `json:"datasetId,omitempty"`
  2508. // Filename: The filename of the original source file for this read
  2509. // group set, if any.
  2510. Filename string `json:"filename,omitempty"`
  2511. // Id: The server-generated read group set ID, unique for all read group
  2512. // sets.
  2513. Id string `json:"id,omitempty"`
  2514. // Info: A map of additional read group set information.
  2515. Info map[string][]interface{} `json:"info,omitempty"`
  2516. // Name: The read group set name. By default this will be initialized to
  2517. // the sample
  2518. // name of the sequenced data contained in this set.
  2519. Name string `json:"name,omitempty"`
  2520. // ReadGroups: The read groups in this set. There are typically 1-10
  2521. // read groups in a read
  2522. // group set.
  2523. ReadGroups []*ReadGroup `json:"readGroups,omitempty"`
  2524. // ReferenceSetId: The reference set to which the reads in this read
  2525. // group set are aligned.
  2526. ReferenceSetId string `json:"referenceSetId,omitempty"`
  2527. // ServerResponse contains the HTTP response code and headers from the
  2528. // server.
  2529. googleapi.ServerResponse `json:"-"`
  2530. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  2531. // unconditionally include in API requests. By default, fields with
  2532. // empty values are omitted from API requests. However, any non-pointer,
  2533. // non-interface field appearing in ForceSendFields will be sent to the
  2534. // server regardless of whether the field is empty or not. This may be
  2535. // used to include empty fields in Patch requests.
  2536. ForceSendFields []string `json:"-"`
  2537. // NullFields is a list of field names (e.g. "DatasetId") to include in
  2538. // API requests with the JSON null value. By default, fields with empty
  2539. // values are omitted from API requests. However, any field with an
  2540. // empty value appearing in NullFields will be sent to the server as
  2541. // null. It is an error if a field in this list has a non-empty value.
  2542. // This may be used to include null fields in Patch requests.
  2543. NullFields []string `json:"-"`
  2544. }
  2545. func (s *ReadGroupSet) MarshalJSON() ([]byte, error) {
  2546. type NoMethod ReadGroupSet
  2547. raw := NoMethod(*s)
  2548. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2549. }
  2550. // Reference: A reference is a canonical assembled DNA sequence,
  2551. // intended to act as a
  2552. // reference coordinate space for other genomic annotations. A single
  2553. // reference
  2554. // might represent the human chromosome 1 or mitochandrial DNA, for
  2555. // instance. A
  2556. // reference belongs to one or more reference sets.
  2557. type Reference struct {
  2558. // Id: The server-generated reference ID, unique across all references.
  2559. Id string `json:"id,omitempty"`
  2560. // Length: The length of this reference's sequence.
  2561. Length int64 `json:"length,omitempty,string"`
  2562. // Md5checksum: MD5 of the upper-case sequence excluding all whitespace
  2563. // characters (this
  2564. // is equivalent to SQ:M5 in SAM). This value is represented in lower
  2565. // case
  2566. // hexadecimal format.
  2567. Md5checksum string `json:"md5checksum,omitempty"`
  2568. // Name: The name of this reference, for example `22`.
  2569. Name string `json:"name,omitempty"`
  2570. // NcbiTaxonId: ID from http://www.ncbi.nlm.nih.gov/taxonomy. For
  2571. // example, 9606 for human.
  2572. NcbiTaxonId int64 `json:"ncbiTaxonId,omitempty"`
  2573. // SourceAccessions: All known corresponding accession IDs in INSDC
  2574. // (GenBank/ENA/DDBJ) ideally
  2575. // with a version number, for example `GCF_000001405.26`.
  2576. SourceAccessions []string `json:"sourceAccessions,omitempty"`
  2577. // SourceUri: The URI from which the sequence was obtained. Typically
  2578. // specifies a FASTA
  2579. // format file.
  2580. SourceUri string `json:"sourceUri,omitempty"`
  2581. // ServerResponse contains the HTTP response code and headers from the
  2582. // server.
  2583. googleapi.ServerResponse `json:"-"`
  2584. // ForceSendFields is a list of field names (e.g. "Id") to
  2585. // unconditionally include in API requests. By default, fields with
  2586. // empty values are omitted from API requests. However, any non-pointer,
  2587. // non-interface field appearing in ForceSendFields will be sent to the
  2588. // server regardless of whether the field is empty or not. This may be
  2589. // used to include empty fields in Patch requests.
  2590. ForceSendFields []string `json:"-"`
  2591. // NullFields is a list of field names (e.g. "Id") to include in API
  2592. // requests with the JSON null value. By default, fields with empty
  2593. // values are omitted from API requests. However, any field with an
  2594. // empty value appearing in NullFields will be sent to the server as
  2595. // null. It is an error if a field in this list has a non-empty value.
  2596. // This may be used to include null fields in Patch requests.
  2597. NullFields []string `json:"-"`
  2598. }
  2599. func (s *Reference) MarshalJSON() ([]byte, error) {
  2600. type NoMethod Reference
  2601. raw := NoMethod(*s)
  2602. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2603. }
  2604. // ReferenceBound: ReferenceBound records an upper bound for the
  2605. // starting coordinate of
  2606. // variants in a particular reference.
  2607. type ReferenceBound struct {
  2608. // ReferenceName: The name of the reference associated with this
  2609. // reference bound.
  2610. ReferenceName string `json:"referenceName,omitempty"`
  2611. // UpperBound: An upper bound (inclusive) on the starting coordinate of
  2612. // any
  2613. // variant in the reference sequence.
  2614. UpperBound int64 `json:"upperBound,omitempty,string"`
  2615. // ForceSendFields is a list of field names (e.g. "ReferenceName") to
  2616. // unconditionally include in API requests. By default, fields with
  2617. // empty values are omitted from API requests. However, any non-pointer,
  2618. // non-interface field appearing in ForceSendFields will be sent to the
  2619. // server regardless of whether the field is empty or not. This may be
  2620. // used to include empty fields in Patch requests.
  2621. ForceSendFields []string `json:"-"`
  2622. // NullFields is a list of field names (e.g. "ReferenceName") to include
  2623. // in API requests with the JSON null value. By default, fields with
  2624. // empty values are omitted from API requests. However, any field with
  2625. // an empty value appearing in NullFields will be sent to the server as
  2626. // null. It is an error if a field in this list has a non-empty value.
  2627. // This may be used to include null fields in Patch requests.
  2628. NullFields []string `json:"-"`
  2629. }
  2630. func (s *ReferenceBound) MarshalJSON() ([]byte, error) {
  2631. type NoMethod ReferenceBound
  2632. raw := NoMethod(*s)
  2633. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2634. }
  2635. // ReferenceSet: A reference set is a set of references which typically
  2636. // comprise a reference
  2637. // assembly for a species, such as `GRCh38` which is representative
  2638. // of the human genome. A reference set defines a common coordinate
  2639. // space for
  2640. // comparing reference-aligned experimental data. A reference set
  2641. // contains 1 or
  2642. // more references.
  2643. type ReferenceSet struct {
  2644. // AssemblyId: Public id of this reference set, such as `GRCh37`.
  2645. AssemblyId string `json:"assemblyId,omitempty"`
  2646. // Description: Free text description of this reference set.
  2647. Description string `json:"description,omitempty"`
  2648. // Id: The server-generated reference set ID, unique across all
  2649. // reference sets.
  2650. Id string `json:"id,omitempty"`
  2651. // Md5checksum: Order-independent MD5 checksum which identifies this
  2652. // reference set. The
  2653. // checksum is computed by sorting all lower case hexidecimal
  2654. // string
  2655. // `reference.md5checksum` (for all reference in this set) in
  2656. // ascending lexicographic order, concatenating, and taking the MD5 of
  2657. // that
  2658. // value. The resulting value is represented in lower case hexadecimal
  2659. // format.
  2660. Md5checksum string `json:"md5checksum,omitempty"`
  2661. // NcbiTaxonId: ID from http://www.ncbi.nlm.nih.gov/taxonomy (for
  2662. // example, 9606 for human)
  2663. // indicating the species which this reference set is intended to model.
  2664. // Note
  2665. // that contained references may specify a different `ncbiTaxonId`,
  2666. // as
  2667. // assemblies may contain reference sequences which do not belong to
  2668. // the
  2669. // modeled species, for example EBV in a human reference genome.
  2670. NcbiTaxonId int64 `json:"ncbiTaxonId,omitempty"`
  2671. // ReferenceIds: The IDs of the reference objects that are part of this
  2672. // set.
  2673. // `Reference.md5checksum` must be unique within this set.
  2674. ReferenceIds []string `json:"referenceIds,omitempty"`
  2675. // SourceAccessions: All known corresponding accession IDs in INSDC
  2676. // (GenBank/ENA/DDBJ) ideally
  2677. // with a version number, for example `NC_000001.11`.
  2678. SourceAccessions []string `json:"sourceAccessions,omitempty"`
  2679. // SourceUri: The URI from which the references were obtained.
  2680. SourceUri string `json:"sourceUri,omitempty"`
  2681. // ServerResponse contains the HTTP response code and headers from the
  2682. // server.
  2683. googleapi.ServerResponse `json:"-"`
  2684. // ForceSendFields is a list of field names (e.g. "AssemblyId") to
  2685. // unconditionally include in API requests. By default, fields with
  2686. // empty values are omitted from API requests. However, any non-pointer,
  2687. // non-interface field appearing in ForceSendFields will be sent to the
  2688. // server regardless of whether the field is empty or not. This may be
  2689. // used to include empty fields in Patch requests.
  2690. ForceSendFields []string `json:"-"`
  2691. // NullFields is a list of field names (e.g. "AssemblyId") to include in
  2692. // API requests with the JSON null value. By default, fields with empty
  2693. // values are omitted from API requests. However, any field with an
  2694. // empty value appearing in NullFields will be sent to the server as
  2695. // null. It is an error if a field in this list has a non-empty value.
  2696. // This may be used to include null fields in Patch requests.
  2697. NullFields []string `json:"-"`
  2698. }
  2699. func (s *ReferenceSet) MarshalJSON() ([]byte, error) {
  2700. type NoMethod ReferenceSet
  2701. raw := NoMethod(*s)
  2702. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2703. }
  2704. // RuntimeMetadata: Runtime metadata that will be populated in
  2705. // the
  2706. // runtimeMetadata
  2707. // field of the Operation associated with a RunPipeline execution.
  2708. type RuntimeMetadata struct {
  2709. // ComputeEngine: Execution information specific to Google Compute
  2710. // Engine.
  2711. ComputeEngine *ComputeEngine `json:"computeEngine,omitempty"`
  2712. // ForceSendFields is a list of field names (e.g. "ComputeEngine") to
  2713. // unconditionally include in API requests. By default, fields with
  2714. // empty values are omitted from API requests. However, any non-pointer,
  2715. // non-interface field appearing in ForceSendFields will be sent to the
  2716. // server regardless of whether the field is empty or not. This may be
  2717. // used to include empty fields in Patch requests.
  2718. ForceSendFields []string `json:"-"`
  2719. // NullFields is a list of field names (e.g. "ComputeEngine") to include
  2720. // in API requests with the JSON null value. By default, fields with
  2721. // empty values are omitted from API requests. However, any field with
  2722. // an empty value appearing in NullFields will be sent to the server as
  2723. // null. It is an error if a field in this list has a non-empty value.
  2724. // This may be used to include null fields in Patch requests.
  2725. NullFields []string `json:"-"`
  2726. }
  2727. func (s *RuntimeMetadata) MarshalJSON() ([]byte, error) {
  2728. type NoMethod RuntimeMetadata
  2729. raw := NoMethod(*s)
  2730. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2731. }
  2732. type SearchAnnotationSetsRequest struct {
  2733. // DatasetIds: Required. The dataset IDs to search within. Caller must
  2734. // have `READ` access
  2735. // to these datasets.
  2736. DatasetIds []string `json:"datasetIds,omitempty"`
  2737. // Name: Only return annotations sets for which a substring of the name
  2738. // matches this
  2739. // string (case insensitive).
  2740. Name string `json:"name,omitempty"`
  2741. // PageSize: The maximum number of results to return in a single page.
  2742. // If unspecified,
  2743. // defaults to 128. The maximum value is 1024.
  2744. PageSize int64 `json:"pageSize,omitempty"`
  2745. // PageToken: The continuation token, which is used to page through
  2746. // large result sets.
  2747. // To get the next page of results, set this parameter to the value
  2748. // of
  2749. // `nextPageToken` from the previous response.
  2750. PageToken string `json:"pageToken,omitempty"`
  2751. // ReferenceSetId: If specified, only annotation sets associated with
  2752. // the given reference set
  2753. // are returned.
  2754. ReferenceSetId string `json:"referenceSetId,omitempty"`
  2755. // Types: If specified, only annotation sets that have any of these
  2756. // types are
  2757. // returned.
  2758. //
  2759. // Possible values:
  2760. // "ANNOTATION_TYPE_UNSPECIFIED"
  2761. // "GENERIC" - A `GENERIC` annotation type should be used when no
  2762. // other annotation
  2763. // type will suffice. This represents an untyped annotation of the
  2764. // reference
  2765. // genome.
  2766. // "VARIANT" - A `VARIANT` annotation type.
  2767. // "GENE" - A `GENE` annotation type represents the existence of a
  2768. // gene at the
  2769. // associated reference coordinates. The start coordinate is typically
  2770. // the
  2771. // gene's transcription start site and the end is typically the end of
  2772. // the
  2773. // gene's last exon.
  2774. // "TRANSCRIPT" - A `TRANSCRIPT` annotation type represents the
  2775. // assertion that a
  2776. // particular region of the reference genome may be transcribed as RNA.
  2777. Types []string `json:"types,omitempty"`
  2778. // ForceSendFields is a list of field names (e.g. "DatasetIds") to
  2779. // unconditionally include in API requests. By default, fields with
  2780. // empty values are omitted from API requests. However, any non-pointer,
  2781. // non-interface field appearing in ForceSendFields will be sent to the
  2782. // server regardless of whether the field is empty or not. This may be
  2783. // used to include empty fields in Patch requests.
  2784. ForceSendFields []string `json:"-"`
  2785. // NullFields is a list of field names (e.g. "DatasetIds") to include in
  2786. // API requests with the JSON null value. By default, fields with empty
  2787. // values are omitted from API requests. However, any field with an
  2788. // empty value appearing in NullFields will be sent to the server as
  2789. // null. It is an error if a field in this list has a non-empty value.
  2790. // This may be used to include null fields in Patch requests.
  2791. NullFields []string `json:"-"`
  2792. }
  2793. func (s *SearchAnnotationSetsRequest) MarshalJSON() ([]byte, error) {
  2794. type NoMethod SearchAnnotationSetsRequest
  2795. raw := NoMethod(*s)
  2796. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2797. }
  2798. type SearchAnnotationSetsResponse struct {
  2799. // AnnotationSets: The matching annotation sets.
  2800. AnnotationSets []*AnnotationSet `json:"annotationSets,omitempty"`
  2801. // NextPageToken: The continuation token, which is used to page through
  2802. // large result sets.
  2803. // Provide this value in a subsequent request to return the next page
  2804. // of
  2805. // results. This field will be empty if there aren't any additional
  2806. // results.
  2807. NextPageToken string `json:"nextPageToken,omitempty"`
  2808. // ServerResponse contains the HTTP response code and headers from the
  2809. // server.
  2810. googleapi.ServerResponse `json:"-"`
  2811. // ForceSendFields is a list of field names (e.g. "AnnotationSets") to
  2812. // unconditionally include in API requests. By default, fields with
  2813. // empty values are omitted from API requests. However, any non-pointer,
  2814. // non-interface field appearing in ForceSendFields will be sent to the
  2815. // server regardless of whether the field is empty or not. This may be
  2816. // used to include empty fields in Patch requests.
  2817. ForceSendFields []string `json:"-"`
  2818. // NullFields is a list of field names (e.g. "AnnotationSets") to
  2819. // include in API requests with the JSON null value. By default, fields
  2820. // with empty values are omitted from API requests. However, any field
  2821. // with an empty value appearing in NullFields will be sent to the
  2822. // server as null. It is an error if a field in this list has a
  2823. // non-empty value. This may be used to include null fields in Patch
  2824. // requests.
  2825. NullFields []string `json:"-"`
  2826. }
  2827. func (s *SearchAnnotationSetsResponse) MarshalJSON() ([]byte, error) {
  2828. type NoMethod SearchAnnotationSetsResponse
  2829. raw := NoMethod(*s)
  2830. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2831. }
  2832. type SearchAnnotationsRequest struct {
  2833. // AnnotationSetIds: Required. The annotation sets to search within. The
  2834. // caller must have
  2835. // `READ` access to these annotation sets.
  2836. // All queried annotation sets must have the same type.
  2837. AnnotationSetIds []string `json:"annotationSetIds,omitempty"`
  2838. // End: The end position of the range on the reference, 0-based
  2839. // exclusive. If
  2840. // referenceId or
  2841. // referenceName
  2842. // must be specified, Defaults to the length of the reference.
  2843. End int64 `json:"end,omitempty,string"`
  2844. // PageSize: The maximum number of results to return in a single page.
  2845. // If unspecified,
  2846. // defaults to 256. The maximum value is 2048.
  2847. PageSize int64 `json:"pageSize,omitempty"`
  2848. // PageToken: The continuation token, which is used to page through
  2849. // large result sets.
  2850. // To get the next page of results, set this parameter to the value
  2851. // of
  2852. // `nextPageToken` from the previous response.
  2853. PageToken string `json:"pageToken,omitempty"`
  2854. // ReferenceId: The ID of the reference to query.
  2855. ReferenceId string `json:"referenceId,omitempty"`
  2856. // ReferenceName: The name of the reference to query, within the
  2857. // reference set associated
  2858. // with this query.
  2859. ReferenceName string `json:"referenceName,omitempty"`
  2860. // Start: The start position of the range on the reference, 0-based
  2861. // inclusive. If
  2862. // specified,
  2863. // referenceId or
  2864. // referenceName
  2865. // must be specified. Defaults to 0.
  2866. Start int64 `json:"start,omitempty,string"`
  2867. // ForceSendFields is a list of field names (e.g. "AnnotationSetIds") to
  2868. // unconditionally include in API requests. By default, fields with
  2869. // empty values are omitted from API requests. However, any non-pointer,
  2870. // non-interface field appearing in ForceSendFields will be sent to the
  2871. // server regardless of whether the field is empty or not. This may be
  2872. // used to include empty fields in Patch requests.
  2873. ForceSendFields []string `json:"-"`
  2874. // NullFields is a list of field names (e.g. "AnnotationSetIds") to
  2875. // include in API requests with the JSON null value. By default, fields
  2876. // with empty values are omitted from API requests. However, any field
  2877. // with an empty value appearing in NullFields will be sent to the
  2878. // server as null. It is an error if a field in this list has a
  2879. // non-empty value. This may be used to include null fields in Patch
  2880. // requests.
  2881. NullFields []string `json:"-"`
  2882. }
  2883. func (s *SearchAnnotationsRequest) MarshalJSON() ([]byte, error) {
  2884. type NoMethod SearchAnnotationsRequest
  2885. raw := NoMethod(*s)
  2886. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2887. }
  2888. type SearchAnnotationsResponse struct {
  2889. // Annotations: The matching annotations.
  2890. Annotations []*Annotation `json:"annotations,omitempty"`
  2891. // NextPageToken: The continuation token, which is used to page through
  2892. // large result sets.
  2893. // Provide this value in a subsequent request to return the next page
  2894. // of
  2895. // results. This field will be empty if there aren't any additional
  2896. // results.
  2897. NextPageToken string `json:"nextPageToken,omitempty"`
  2898. // ServerResponse contains the HTTP response code and headers from the
  2899. // server.
  2900. googleapi.ServerResponse `json:"-"`
  2901. // ForceSendFields is a list of field names (e.g. "Annotations") to
  2902. // unconditionally include in API requests. By default, fields with
  2903. // empty values are omitted from API requests. However, any non-pointer,
  2904. // non-interface field appearing in ForceSendFields will be sent to the
  2905. // server regardless of whether the field is empty or not. This may be
  2906. // used to include empty fields in Patch requests.
  2907. ForceSendFields []string `json:"-"`
  2908. // NullFields is a list of field names (e.g. "Annotations") to include
  2909. // in API requests with the JSON null value. By default, fields with
  2910. // empty values are omitted from API requests. However, any field with
  2911. // an empty value appearing in NullFields will be sent to the server as
  2912. // null. It is an error if a field in this list has a non-empty value.
  2913. // This may be used to include null fields in Patch requests.
  2914. NullFields []string `json:"-"`
  2915. }
  2916. func (s *SearchAnnotationsResponse) MarshalJSON() ([]byte, error) {
  2917. type NoMethod SearchAnnotationsResponse
  2918. raw := NoMethod(*s)
  2919. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2920. }
  2921. // SearchCallSetsRequest: The call set search request.
  2922. type SearchCallSetsRequest struct {
  2923. // Name: Only return call sets for which a substring of the name matches
  2924. // this
  2925. // string.
  2926. Name string `json:"name,omitempty"`
  2927. // PageSize: The maximum number of results to return in a single page.
  2928. // If unspecified,
  2929. // defaults to 1024.
  2930. PageSize int64 `json:"pageSize,omitempty"`
  2931. // PageToken: The continuation token, which is used to page through
  2932. // large result sets.
  2933. // To get the next page of results, set this parameter to the value
  2934. // of
  2935. // `nextPageToken` from the previous response.
  2936. PageToken string `json:"pageToken,omitempty"`
  2937. // VariantSetIds: Restrict the query to call sets within the given
  2938. // variant sets. At least one
  2939. // ID must be provided.
  2940. VariantSetIds []string `json:"variantSetIds,omitempty"`
  2941. // ForceSendFields is a list of field names (e.g. "Name") to
  2942. // unconditionally include in API requests. By default, fields with
  2943. // empty values are omitted from API requests. However, any non-pointer,
  2944. // non-interface field appearing in ForceSendFields will be sent to the
  2945. // server regardless of whether the field is empty or not. This may be
  2946. // used to include empty fields in Patch requests.
  2947. ForceSendFields []string `json:"-"`
  2948. // NullFields is a list of field names (e.g. "Name") to include in API
  2949. // requests with the JSON null value. By default, fields with empty
  2950. // values are omitted from API requests. However, any field with an
  2951. // empty value appearing in NullFields will be sent to the server as
  2952. // null. It is an error if a field in this list has a non-empty value.
  2953. // This may be used to include null fields in Patch requests.
  2954. NullFields []string `json:"-"`
  2955. }
  2956. func (s *SearchCallSetsRequest) MarshalJSON() ([]byte, error) {
  2957. type NoMethod SearchCallSetsRequest
  2958. raw := NoMethod(*s)
  2959. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2960. }
  2961. // SearchCallSetsResponse: The call set search response.
  2962. type SearchCallSetsResponse struct {
  2963. // CallSets: The list of matching call sets.
  2964. CallSets []*CallSet `json:"callSets,omitempty"`
  2965. // NextPageToken: The continuation token, which is used to page through
  2966. // large result sets.
  2967. // Provide this value in a subsequent request to return the next page
  2968. // of
  2969. // results. This field will be empty if there aren't any additional
  2970. // results.
  2971. NextPageToken string `json:"nextPageToken,omitempty"`
  2972. // ServerResponse contains the HTTP response code and headers from the
  2973. // server.
  2974. googleapi.ServerResponse `json:"-"`
  2975. // ForceSendFields is a list of field names (e.g. "CallSets") to
  2976. // unconditionally include in API requests. By default, fields with
  2977. // empty values are omitted from API requests. However, any non-pointer,
  2978. // non-interface field appearing in ForceSendFields will be sent to the
  2979. // server regardless of whether the field is empty or not. This may be
  2980. // used to include empty fields in Patch requests.
  2981. ForceSendFields []string `json:"-"`
  2982. // NullFields is a list of field names (e.g. "CallSets") to include in
  2983. // API requests with the JSON null value. By default, fields with empty
  2984. // values are omitted from API requests. However, any field with an
  2985. // empty value appearing in NullFields will be sent to the server as
  2986. // null. It is an error if a field in this list has a non-empty value.
  2987. // This may be used to include null fields in Patch requests.
  2988. NullFields []string `json:"-"`
  2989. }
  2990. func (s *SearchCallSetsResponse) MarshalJSON() ([]byte, error) {
  2991. type NoMethod SearchCallSetsResponse
  2992. raw := NoMethod(*s)
  2993. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2994. }
  2995. // SearchReadGroupSetsRequest: The read group set search request.
  2996. type SearchReadGroupSetsRequest struct {
  2997. // DatasetIds: Restricts this query to read group sets within the given
  2998. // datasets. At least
  2999. // one ID must be provided.
  3000. DatasetIds []string `json:"datasetIds,omitempty"`
  3001. // Name: Only return read group sets for which a substring of the name
  3002. // matches this
  3003. // string.
  3004. Name string `json:"name,omitempty"`
  3005. // PageSize: The maximum number of results to return in a single page.
  3006. // If unspecified,
  3007. // defaults to 256. The maximum value is 1024.
  3008. PageSize int64 `json:"pageSize,omitempty"`
  3009. // PageToken: The continuation token, which is used to page through
  3010. // large result sets.
  3011. // To get the next page of results, set this parameter to the value
  3012. // of
  3013. // `nextPageToken` from the previous response.
  3014. PageToken string `json:"pageToken,omitempty"`
  3015. // ForceSendFields is a list of field names (e.g. "DatasetIds") to
  3016. // unconditionally include in API requests. By default, fields with
  3017. // empty values are omitted from API requests. However, any non-pointer,
  3018. // non-interface field appearing in ForceSendFields will be sent to the
  3019. // server regardless of whether the field is empty or not. This may be
  3020. // used to include empty fields in Patch requests.
  3021. ForceSendFields []string `json:"-"`
  3022. // NullFields is a list of field names (e.g. "DatasetIds") to include in
  3023. // API requests with the JSON null value. By default, fields with empty
  3024. // values are omitted from API requests. However, any field with an
  3025. // empty value appearing in NullFields will be sent to the server as
  3026. // null. It is an error if a field in this list has a non-empty value.
  3027. // This may be used to include null fields in Patch requests.
  3028. NullFields []string `json:"-"`
  3029. }
  3030. func (s *SearchReadGroupSetsRequest) MarshalJSON() ([]byte, error) {
  3031. type NoMethod SearchReadGroupSetsRequest
  3032. raw := NoMethod(*s)
  3033. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3034. }
  3035. // SearchReadGroupSetsResponse: The read group set search response.
  3036. type SearchReadGroupSetsResponse struct {
  3037. // NextPageToken: The continuation token, which is used to page through
  3038. // large result sets.
  3039. // Provide this value in a subsequent request to return the next page
  3040. // of
  3041. // results. This field will be empty if there aren't any additional
  3042. // results.
  3043. NextPageToken string `json:"nextPageToken,omitempty"`
  3044. // ReadGroupSets: The list of matching read group sets.
  3045. ReadGroupSets []*ReadGroupSet `json:"readGroupSets,omitempty"`
  3046. // ServerResponse contains the HTTP response code and headers from the
  3047. // server.
  3048. googleapi.ServerResponse `json:"-"`
  3049. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3050. // unconditionally include in API requests. By default, fields with
  3051. // empty values are omitted from API requests. However, any non-pointer,
  3052. // non-interface field appearing in ForceSendFields will be sent to the
  3053. // server regardless of whether the field is empty or not. This may be
  3054. // used to include empty fields in Patch requests.
  3055. ForceSendFields []string `json:"-"`
  3056. // NullFields is a list of field names (e.g. "NextPageToken") to include
  3057. // in API requests with the JSON null value. By default, fields with
  3058. // empty values are omitted from API requests. However, any field with
  3059. // an empty value appearing in NullFields will be sent to the server as
  3060. // null. It is an error if a field in this list has a non-empty value.
  3061. // This may be used to include null fields in Patch requests.
  3062. NullFields []string `json:"-"`
  3063. }
  3064. func (s *SearchReadGroupSetsResponse) MarshalJSON() ([]byte, error) {
  3065. type NoMethod SearchReadGroupSetsResponse
  3066. raw := NoMethod(*s)
  3067. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3068. }
  3069. // SearchReadsRequest: The read search request.
  3070. type SearchReadsRequest struct {
  3071. // End: The end position of the range on the reference, 0-based
  3072. // exclusive. If
  3073. // specified, `referenceName` must also be specified.
  3074. End int64 `json:"end,omitempty,string"`
  3075. // PageSize: The maximum number of results to return in a single page.
  3076. // If unspecified,
  3077. // defaults to 256. The maximum value is 2048.
  3078. PageSize int64 `json:"pageSize,omitempty"`
  3079. // PageToken: The continuation token, which is used to page through
  3080. // large result sets.
  3081. // To get the next page of results, set this parameter to the value
  3082. // of
  3083. // `nextPageToken` from the previous response.
  3084. PageToken string `json:"pageToken,omitempty"`
  3085. // ReadGroupIds: The IDs of the read groups within which to search for
  3086. // reads. All specified
  3087. // read groups must belong to the same read group sets. Must specify one
  3088. // of
  3089. // `readGroupSetIds` or `readGroupIds`.
  3090. ReadGroupIds []string `json:"readGroupIds,omitempty"`
  3091. // ReadGroupSetIds: The IDs of the read groups sets within which to
  3092. // search for reads. All
  3093. // specified read group sets must be aligned against a common set of
  3094. // reference
  3095. // sequences; this defines the genomic coordinates for the query. Must
  3096. // specify
  3097. // one of `readGroupSetIds` or `readGroupIds`.
  3098. ReadGroupSetIds []string `json:"readGroupSetIds,omitempty"`
  3099. // ReferenceName: The reference sequence name, for example `chr1`, `1`,
  3100. // or `chrX`. If set to
  3101. // `*`, only unmapped reads are returned. If unspecified, all reads
  3102. // (mapped
  3103. // and unmapped) are returned.
  3104. ReferenceName string `json:"referenceName,omitempty"`
  3105. // Start: The start position of the range on the reference, 0-based
  3106. // inclusive. If
  3107. // specified, `referenceName` must also be specified.
  3108. Start int64 `json:"start,omitempty,string"`
  3109. // ForceSendFields is a list of field names (e.g. "End") to
  3110. // unconditionally include in API requests. By default, fields with
  3111. // empty values are omitted from API requests. However, any non-pointer,
  3112. // non-interface field appearing in ForceSendFields will be sent to the
  3113. // server regardless of whether the field is empty or not. This may be
  3114. // used to include empty fields in Patch requests.
  3115. ForceSendFields []string `json:"-"`
  3116. // NullFields is a list of field names (e.g. "End") to include in API
  3117. // requests with the JSON null value. By default, fields with empty
  3118. // values are omitted from API requests. However, any field with an
  3119. // empty value appearing in NullFields will be sent to the server as
  3120. // null. It is an error if a field in this list has a non-empty value.
  3121. // This may be used to include null fields in Patch requests.
  3122. NullFields []string `json:"-"`
  3123. }
  3124. func (s *SearchReadsRequest) MarshalJSON() ([]byte, error) {
  3125. type NoMethod SearchReadsRequest
  3126. raw := NoMethod(*s)
  3127. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3128. }
  3129. // SearchReadsResponse: The read search response.
  3130. type SearchReadsResponse struct {
  3131. // Alignments: The list of matching alignments sorted by mapped genomic
  3132. // coordinate,
  3133. // if any, ascending in position within the same reference. Unmapped
  3134. // reads,
  3135. // which have no position, are returned contiguously and are sorted
  3136. // in
  3137. // ascending lexicographic order by fragment name.
  3138. Alignments []*Read `json:"alignments,omitempty"`
  3139. // NextPageToken: The continuation token, which is used to page through
  3140. // large result sets.
  3141. // Provide this value in a subsequent request to return the next page
  3142. // of
  3143. // results. This field will be empty if there aren't any additional
  3144. // results.
  3145. NextPageToken string `json:"nextPageToken,omitempty"`
  3146. // ServerResponse contains the HTTP response code and headers from the
  3147. // server.
  3148. googleapi.ServerResponse `json:"-"`
  3149. // ForceSendFields is a list of field names (e.g. "Alignments") to
  3150. // unconditionally include in API requests. By default, fields with
  3151. // empty values are omitted from API requests. However, any non-pointer,
  3152. // non-interface field appearing in ForceSendFields will be sent to the
  3153. // server regardless of whether the field is empty or not. This may be
  3154. // used to include empty fields in Patch requests.
  3155. ForceSendFields []string `json:"-"`
  3156. // NullFields is a list of field names (e.g. "Alignments") to include in
  3157. // API requests with the JSON null value. By default, fields with empty
  3158. // values are omitted from API requests. However, any field with an
  3159. // empty value appearing in NullFields will be sent to the server as
  3160. // null. It is an error if a field in this list has a non-empty value.
  3161. // This may be used to include null fields in Patch requests.
  3162. NullFields []string `json:"-"`
  3163. }
  3164. func (s *SearchReadsResponse) MarshalJSON() ([]byte, error) {
  3165. type NoMethod SearchReadsResponse
  3166. raw := NoMethod(*s)
  3167. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3168. }
  3169. type SearchReferenceSetsRequest struct {
  3170. // Accessions: If present, return reference sets for which a prefix of
  3171. // any of
  3172. // sourceAccessions
  3173. // match any of these strings. Accession numbers typically have a main
  3174. // number
  3175. // and a version, for example `NC_000001.11`.
  3176. Accessions []string `json:"accessions,omitempty"`
  3177. // AssemblyId: If present, return reference sets for which a substring
  3178. // of their
  3179. // `assemblyId` matches this string (case insensitive).
  3180. AssemblyId string `json:"assemblyId,omitempty"`
  3181. // Md5checksums: If present, return reference sets for which
  3182. // the
  3183. // md5checksum matches exactly.
  3184. Md5checksums []string `json:"md5checksums,omitempty"`
  3185. // PageSize: The maximum number of results to return in a single page.
  3186. // If unspecified,
  3187. // defaults to 1024. The maximum value is 4096.
  3188. PageSize int64 `json:"pageSize,omitempty"`
  3189. // PageToken: The continuation token, which is used to page through
  3190. // large result sets.
  3191. // To get the next page of results, set this parameter to the value
  3192. // of
  3193. // `nextPageToken` from the previous response.
  3194. PageToken string `json:"pageToken,omitempty"`
  3195. // ForceSendFields is a list of field names (e.g. "Accessions") to
  3196. // unconditionally include in API requests. By default, fields with
  3197. // empty values are omitted from API requests. However, any non-pointer,
  3198. // non-interface field appearing in ForceSendFields will be sent to the
  3199. // server regardless of whether the field is empty or not. This may be
  3200. // used to include empty fields in Patch requests.
  3201. ForceSendFields []string `json:"-"`
  3202. // NullFields is a list of field names (e.g. "Accessions") to include in
  3203. // API requests with the JSON null value. By default, fields with empty
  3204. // values are omitted from API requests. However, any field with an
  3205. // empty value appearing in NullFields will be sent to the server as
  3206. // null. It is an error if a field in this list has a non-empty value.
  3207. // This may be used to include null fields in Patch requests.
  3208. NullFields []string `json:"-"`
  3209. }
  3210. func (s *SearchReferenceSetsRequest) MarshalJSON() ([]byte, error) {
  3211. type NoMethod SearchReferenceSetsRequest
  3212. raw := NoMethod(*s)
  3213. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3214. }
  3215. type SearchReferenceSetsResponse struct {
  3216. // NextPageToken: The continuation token, which is used to page through
  3217. // large result sets.
  3218. // Provide this value in a subsequent request to return the next page
  3219. // of
  3220. // results. This field will be empty if there aren't any additional
  3221. // results.
  3222. NextPageToken string `json:"nextPageToken,omitempty"`
  3223. // ReferenceSets: The matching references sets.
  3224. ReferenceSets []*ReferenceSet `json:"referenceSets,omitempty"`
  3225. // ServerResponse contains the HTTP response code and headers from the
  3226. // server.
  3227. googleapi.ServerResponse `json:"-"`
  3228. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3229. // unconditionally include in API requests. By default, fields with
  3230. // empty values are omitted from API requests. However, any non-pointer,
  3231. // non-interface field appearing in ForceSendFields will be sent to the
  3232. // server regardless of whether the field is empty or not. This may be
  3233. // used to include empty fields in Patch requests.
  3234. ForceSendFields []string `json:"-"`
  3235. // NullFields is a list of field names (e.g. "NextPageToken") to include
  3236. // in API requests with the JSON null value. By default, fields with
  3237. // empty values are omitted from API requests. However, any field with
  3238. // an empty value appearing in NullFields will be sent to the server as
  3239. // null. It is an error if a field in this list has a non-empty value.
  3240. // This may be used to include null fields in Patch requests.
  3241. NullFields []string `json:"-"`
  3242. }
  3243. func (s *SearchReferenceSetsResponse) MarshalJSON() ([]byte, error) {
  3244. type NoMethod SearchReferenceSetsResponse
  3245. raw := NoMethod(*s)
  3246. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3247. }
  3248. type SearchReferencesRequest struct {
  3249. // Accessions: If present, return references for which a prefix of any
  3250. // of
  3251. // sourceAccessions match
  3252. // any of these strings. Accession numbers typically have a main number
  3253. // and a
  3254. // version, for example `GCF_000001405.26`.
  3255. Accessions []string `json:"accessions,omitempty"`
  3256. // Md5checksums: If present, return references for which the
  3257. // md5checksum matches exactly.
  3258. Md5checksums []string `json:"md5checksums,omitempty"`
  3259. // PageSize: The maximum number of results to return in a single page.
  3260. // If unspecified,
  3261. // defaults to 1024. The maximum value is 4096.
  3262. PageSize int64 `json:"pageSize,omitempty"`
  3263. // PageToken: The continuation token, which is used to page through
  3264. // large result sets.
  3265. // To get the next page of results, set this parameter to the value
  3266. // of
  3267. // `nextPageToken` from the previous response.
  3268. PageToken string `json:"pageToken,omitempty"`
  3269. // ReferenceSetId: If present, return only references which belong to
  3270. // this reference set.
  3271. ReferenceSetId string `json:"referenceSetId,omitempty"`
  3272. // ForceSendFields is a list of field names (e.g. "Accessions") to
  3273. // unconditionally include in API requests. By default, fields with
  3274. // empty values are omitted from API requests. However, any non-pointer,
  3275. // non-interface field appearing in ForceSendFields will be sent to the
  3276. // server regardless of whether the field is empty or not. This may be
  3277. // used to include empty fields in Patch requests.
  3278. ForceSendFields []string `json:"-"`
  3279. // NullFields is a list of field names (e.g. "Accessions") to include in
  3280. // API requests with the JSON null value. By default, fields with empty
  3281. // values are omitted from API requests. However, any field with an
  3282. // empty value appearing in NullFields will be sent to the server as
  3283. // null. It is an error if a field in this list has a non-empty value.
  3284. // This may be used to include null fields in Patch requests.
  3285. NullFields []string `json:"-"`
  3286. }
  3287. func (s *SearchReferencesRequest) MarshalJSON() ([]byte, error) {
  3288. type NoMethod SearchReferencesRequest
  3289. raw := NoMethod(*s)
  3290. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3291. }
  3292. type SearchReferencesResponse struct {
  3293. // NextPageToken: The continuation token, which is used to page through
  3294. // large result sets.
  3295. // Provide this value in a subsequent request to return the next page
  3296. // of
  3297. // results. This field will be empty if there aren't any additional
  3298. // results.
  3299. NextPageToken string `json:"nextPageToken,omitempty"`
  3300. // References: The matching references.
  3301. References []*Reference `json:"references,omitempty"`
  3302. // ServerResponse contains the HTTP response code and headers from the
  3303. // server.
  3304. googleapi.ServerResponse `json:"-"`
  3305. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3306. // unconditionally include in API requests. By default, fields with
  3307. // empty values are omitted from API requests. However, any non-pointer,
  3308. // non-interface field appearing in ForceSendFields will be sent to the
  3309. // server regardless of whether the field is empty or not. This may be
  3310. // used to include empty fields in Patch requests.
  3311. ForceSendFields []string `json:"-"`
  3312. // NullFields is a list of field names (e.g. "NextPageToken") to include
  3313. // in API requests with the JSON null value. By default, fields with
  3314. // empty values are omitted from API requests. However, any field with
  3315. // an empty value appearing in NullFields will be sent to the server as
  3316. // null. It is an error if a field in this list has a non-empty value.
  3317. // This may be used to include null fields in Patch requests.
  3318. NullFields []string `json:"-"`
  3319. }
  3320. func (s *SearchReferencesResponse) MarshalJSON() ([]byte, error) {
  3321. type NoMethod SearchReferencesResponse
  3322. raw := NoMethod(*s)
  3323. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3324. }
  3325. // SearchVariantSetsRequest: The search variant sets request.
  3326. type SearchVariantSetsRequest struct {
  3327. // DatasetIds: Exactly one dataset ID must be provided here. Only
  3328. // variant sets which
  3329. // belong to this dataset will be returned.
  3330. DatasetIds []string `json:"datasetIds,omitempty"`
  3331. // PageSize: The maximum number of results to return in a single page.
  3332. // If unspecified,
  3333. // defaults to 1024.
  3334. PageSize int64 `json:"pageSize,omitempty"`
  3335. // PageToken: The continuation token, which is used to page through
  3336. // large result sets.
  3337. // To get the next page of results, set this parameter to the value
  3338. // of
  3339. // `nextPageToken` from the previous response.
  3340. PageToken string `json:"pageToken,omitempty"`
  3341. // ForceSendFields is a list of field names (e.g. "DatasetIds") to
  3342. // unconditionally include in API requests. By default, fields with
  3343. // empty values are omitted from API requests. However, any non-pointer,
  3344. // non-interface field appearing in ForceSendFields will be sent to the
  3345. // server regardless of whether the field is empty or not. This may be
  3346. // used to include empty fields in Patch requests.
  3347. ForceSendFields []string `json:"-"`
  3348. // NullFields is a list of field names (e.g. "DatasetIds") to include in
  3349. // API requests with the JSON null value. By default, fields with empty
  3350. // values are omitted from API requests. However, any field with an
  3351. // empty value appearing in NullFields will be sent to the server as
  3352. // null. It is an error if a field in this list has a non-empty value.
  3353. // This may be used to include null fields in Patch requests.
  3354. NullFields []string `json:"-"`
  3355. }
  3356. func (s *SearchVariantSetsRequest) MarshalJSON() ([]byte, error) {
  3357. type NoMethod SearchVariantSetsRequest
  3358. raw := NoMethod(*s)
  3359. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3360. }
  3361. // SearchVariantSetsResponse: The search variant sets response.
  3362. type SearchVariantSetsResponse struct {
  3363. // NextPageToken: The continuation token, which is used to page through
  3364. // large result sets.
  3365. // Provide this value in a subsequent request to return the next page
  3366. // of
  3367. // results. This field will be empty if there aren't any additional
  3368. // results.
  3369. NextPageToken string `json:"nextPageToken,omitempty"`
  3370. // VariantSets: The variant sets belonging to the requested dataset.
  3371. VariantSets []*VariantSet `json:"variantSets,omitempty"`
  3372. // ServerResponse contains the HTTP response code and headers from the
  3373. // server.
  3374. googleapi.ServerResponse `json:"-"`
  3375. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3376. // unconditionally include in API requests. By default, fields with
  3377. // empty values are omitted from API requests. However, any non-pointer,
  3378. // non-interface field appearing in ForceSendFields will be sent to the
  3379. // server regardless of whether the field is empty or not. This may be
  3380. // used to include empty fields in Patch requests.
  3381. ForceSendFields []string `json:"-"`
  3382. // NullFields is a list of field names (e.g. "NextPageToken") to include
  3383. // in API requests with the JSON null value. By default, fields with
  3384. // empty values are omitted from API requests. However, any field with
  3385. // an empty value appearing in NullFields will be sent to the server as
  3386. // null. It is an error if a field in this list has a non-empty value.
  3387. // This may be used to include null fields in Patch requests.
  3388. NullFields []string `json:"-"`
  3389. }
  3390. func (s *SearchVariantSetsResponse) MarshalJSON() ([]byte, error) {
  3391. type NoMethod SearchVariantSetsResponse
  3392. raw := NoMethod(*s)
  3393. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3394. }
  3395. // SearchVariantsRequest: The variant search request.
  3396. type SearchVariantsRequest struct {
  3397. // CallSetIds: Only return variant calls which belong to call sets with
  3398. // these ids.
  3399. // Leaving this blank returns all variant calls. If a variant has
  3400. // no
  3401. // calls belonging to any of these call sets, it won't be returned at
  3402. // all.
  3403. CallSetIds []string `json:"callSetIds,omitempty"`
  3404. // End: The end of the window, 0-based exclusive. If unspecified or 0,
  3405. // defaults to
  3406. // the length of the reference.
  3407. End int64 `json:"end,omitempty,string"`
  3408. // MaxCalls: The maximum number of calls to return in a single page.
  3409. // Note that this
  3410. // limit may be exceeded in the event that a matching variant contains
  3411. // more
  3412. // calls than the requested maximum. If unspecified, defaults to 5000.
  3413. // The
  3414. // maximum value is 10000.
  3415. MaxCalls int64 `json:"maxCalls,omitempty"`
  3416. // PageSize: The maximum number of variants to return in a single page.
  3417. // If unspecified,
  3418. // defaults to 5000. The maximum value is 10000.
  3419. PageSize int64 `json:"pageSize,omitempty"`
  3420. // PageToken: The continuation token, which is used to page through
  3421. // large result sets.
  3422. // To get the next page of results, set this parameter to the value
  3423. // of
  3424. // `nextPageToken` from the previous response.
  3425. PageToken string `json:"pageToken,omitempty"`
  3426. // ReferenceName: Required. Only return variants in this reference
  3427. // sequence.
  3428. ReferenceName string `json:"referenceName,omitempty"`
  3429. // Start: The beginning of the window (0-based, inclusive) for
  3430. // which
  3431. // overlapping variants should be returned. If unspecified, defaults to
  3432. // 0.
  3433. Start int64 `json:"start,omitempty,string"`
  3434. // VariantName: Only return variants which have exactly this name.
  3435. VariantName string `json:"variantName,omitempty"`
  3436. // VariantSetIds: At most one variant set ID must be provided. Only
  3437. // variants from this
  3438. // variant set will be returned. If omitted, a call set id must be
  3439. // included in
  3440. // the request.
  3441. VariantSetIds []string `json:"variantSetIds,omitempty"`
  3442. // ForceSendFields is a list of field names (e.g. "CallSetIds") to
  3443. // unconditionally include in API requests. By default, fields with
  3444. // empty values are omitted from API requests. However, any non-pointer,
  3445. // non-interface field appearing in ForceSendFields will be sent to the
  3446. // server regardless of whether the field is empty or not. This may be
  3447. // used to include empty fields in Patch requests.
  3448. ForceSendFields []string `json:"-"`
  3449. // NullFields is a list of field names (e.g. "CallSetIds") to include in
  3450. // API requests with the JSON null value. By default, fields with empty
  3451. // values are omitted from API requests. However, any field with an
  3452. // empty value appearing in NullFields will be sent to the server as
  3453. // null. It is an error if a field in this list has a non-empty value.
  3454. // This may be used to include null fields in Patch requests.
  3455. NullFields []string `json:"-"`
  3456. }
  3457. func (s *SearchVariantsRequest) MarshalJSON() ([]byte, error) {
  3458. type NoMethod SearchVariantsRequest
  3459. raw := NoMethod(*s)
  3460. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3461. }
  3462. // SearchVariantsResponse: The variant search response.
  3463. type SearchVariantsResponse struct {
  3464. // NextPageToken: The continuation token, which is used to page through
  3465. // large result sets.
  3466. // Provide this value in a subsequent request to return the next page
  3467. // of
  3468. // results. This field will be empty if there aren't any additional
  3469. // results.
  3470. NextPageToken string `json:"nextPageToken,omitempty"`
  3471. // Variants: The list of matching Variants.
  3472. Variants []*Variant `json:"variants,omitempty"`
  3473. // ServerResponse contains the HTTP response code and headers from the
  3474. // server.
  3475. googleapi.ServerResponse `json:"-"`
  3476. // ForceSendFields is a list of field names (e.g. "NextPageToken") to
  3477. // unconditionally include in API requests. By default, fields with
  3478. // empty values are omitted from API requests. However, any non-pointer,
  3479. // non-interface field appearing in ForceSendFields will be sent to the
  3480. // server regardless of whether the field is empty or not. This may be
  3481. // used to include empty fields in Patch requests.
  3482. ForceSendFields []string `json:"-"`
  3483. // NullFields is a list of field names (e.g. "NextPageToken") to include
  3484. // in API requests with the JSON null value. By default, fields with
  3485. // empty values are omitted from API requests. However, any field with
  3486. // an empty value appearing in NullFields will be sent to the server as
  3487. // null. It is an error if a field in this list has a non-empty value.
  3488. // This may be used to include null fields in Patch requests.
  3489. NullFields []string `json:"-"`
  3490. }
  3491. func (s *SearchVariantsResponse) MarshalJSON() ([]byte, error) {
  3492. type NoMethod SearchVariantsResponse
  3493. raw := NoMethod(*s)
  3494. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3495. }
  3496. // SetIamPolicyRequest: Request message for `SetIamPolicy` method.
  3497. type SetIamPolicyRequest struct {
  3498. // Policy: REQUIRED: The complete policy to be applied to the
  3499. // `resource`. The size of
  3500. // the policy is limited to a few 10s of KB. An empty policy is a
  3501. // valid policy but certain Cloud Platform services (such as
  3502. // Projects)
  3503. // might reject them.
  3504. Policy *Policy `json:"policy,omitempty"`
  3505. // ForceSendFields is a list of field names (e.g. "Policy") to
  3506. // unconditionally include in API requests. By default, fields with
  3507. // empty values are omitted from API requests. However, any non-pointer,
  3508. // non-interface field appearing in ForceSendFields will be sent to the
  3509. // server regardless of whether the field is empty or not. This may be
  3510. // used to include empty fields in Patch requests.
  3511. ForceSendFields []string `json:"-"`
  3512. // NullFields is a list of field names (e.g. "Policy") to include in API
  3513. // requests with the JSON null value. By default, fields with empty
  3514. // values are omitted from API requests. However, any field with an
  3515. // empty value appearing in NullFields will be sent to the server as
  3516. // null. It is an error if a field in this list has a non-empty value.
  3517. // This may be used to include null fields in Patch requests.
  3518. NullFields []string `json:"-"`
  3519. }
  3520. func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
  3521. type NoMethod SetIamPolicyRequest
  3522. raw := NoMethod(*s)
  3523. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3524. }
  3525. // Status: The `Status` type defines a logical error model that is
  3526. // suitable for different
  3527. // programming environments, including REST APIs and RPC APIs. It is
  3528. // used by
  3529. // [gRPC](https://github.com/grpc). The error model is designed to
  3530. // be:
  3531. //
  3532. // - Simple to use and understand for most users
  3533. // - Flexible enough to meet unexpected needs
  3534. //
  3535. // # Overview
  3536. //
  3537. // The `Status` message contains three pieces of data: error code, error
  3538. // message,
  3539. // and error details. The error code should be an enum value
  3540. // of
  3541. // google.rpc.Code, but it may accept additional error codes if needed.
  3542. // The
  3543. // error message should be a developer-facing English message that
  3544. // helps
  3545. // developers *understand* and *resolve* the error. If a localized
  3546. // user-facing
  3547. // error message is needed, put the localized message in the error
  3548. // details or
  3549. // localize it in the client. The optional error details may contain
  3550. // arbitrary
  3551. // information about the error. There is a predefined set of error
  3552. // detail types
  3553. // in the package `google.rpc` that can be used for common error
  3554. // conditions.
  3555. //
  3556. // # Language mapping
  3557. //
  3558. // The `Status` message is the logical representation of the error
  3559. // model, but it
  3560. // is not necessarily the actual wire format. When the `Status` message
  3561. // is
  3562. // exposed in different client libraries and different wire protocols,
  3563. // it can be
  3564. // mapped differently. For example, it will likely be mapped to some
  3565. // exceptions
  3566. // in Java, but more likely mapped to some error codes in C.
  3567. //
  3568. // # Other uses
  3569. //
  3570. // The error model and the `Status` message can be used in a variety
  3571. // of
  3572. // environments, either with or without APIs, to provide a
  3573. // consistent developer experience across different
  3574. // environments.
  3575. //
  3576. // Example uses of this error model include:
  3577. //
  3578. // - Partial errors. If a service needs to return partial errors to the
  3579. // client,
  3580. // it may embed the `Status` in the normal response to indicate the
  3581. // partial
  3582. // errors.
  3583. //
  3584. // - Workflow errors. A typical workflow has multiple steps. Each step
  3585. // may
  3586. // have a `Status` message for error reporting.
  3587. //
  3588. // - Batch operations. If a client uses batch request and batch
  3589. // response, the
  3590. // `Status` message should be used directly inside batch response,
  3591. // one for
  3592. // each error sub-response.
  3593. //
  3594. // - Asynchronous operations. If an API call embeds asynchronous
  3595. // operation
  3596. // results in its response, the status of those operations should
  3597. // be
  3598. // represented directly using the `Status` message.
  3599. //
  3600. // - Logging. If some API errors are stored in logs, the message
  3601. // `Status` could
  3602. // be used directly after any stripping needed for security/privacy
  3603. // reasons.
  3604. type Status struct {
  3605. // Code: The status code, which should be an enum value of
  3606. // google.rpc.Code.
  3607. Code int64 `json:"code,omitempty"`
  3608. // Details: A list of messages that carry the error details. There is a
  3609. // common set of
  3610. // message types for APIs to use.
  3611. Details []googleapi.RawMessage `json:"details,omitempty"`
  3612. // Message: A developer-facing error message, which should be in
  3613. // English. Any
  3614. // user-facing error message should be localized and sent in
  3615. // the
  3616. // google.rpc.Status.details field, or localized by the client.
  3617. Message string `json:"message,omitempty"`
  3618. // ForceSendFields is a list of field names (e.g. "Code") to
  3619. // unconditionally include in API requests. By default, fields with
  3620. // empty values are omitted from API requests. However, any non-pointer,
  3621. // non-interface field appearing in ForceSendFields will be sent to the
  3622. // server regardless of whether the field is empty or not. This may be
  3623. // used to include empty fields in Patch requests.
  3624. ForceSendFields []string `json:"-"`
  3625. // NullFields is a list of field names (e.g. "Code") to include in API
  3626. // requests with the JSON null value. By default, fields with empty
  3627. // values are omitted from API requests. However, any field with an
  3628. // empty value appearing in NullFields will be sent to the server as
  3629. // null. It is an error if a field in this list has a non-empty value.
  3630. // This may be used to include null fields in Patch requests.
  3631. NullFields []string `json:"-"`
  3632. }
  3633. func (s *Status) MarshalJSON() ([]byte, error) {
  3634. type NoMethod Status
  3635. raw := NoMethod(*s)
  3636. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3637. }
  3638. // TestIamPermissionsRequest: Request message for `TestIamPermissions`
  3639. // method.
  3640. type TestIamPermissionsRequest struct {
  3641. // Permissions: REQUIRED: The set of permissions to check for the
  3642. // 'resource'.
  3643. // Permissions with wildcards (such as '*' or 'storage.*') are not
  3644. // allowed.
  3645. // Allowed permissions are&#58;
  3646. //
  3647. // * `genomics.datasets.create`
  3648. // * `genomics.datasets.delete`
  3649. // * `genomics.datasets.get`
  3650. // * `genomics.datasets.list`
  3651. // * `genomics.datasets.update`
  3652. // * `genomics.datasets.getIamPolicy`
  3653. // * `genomics.datasets.setIamPolicy`
  3654. Permissions []string `json:"permissions,omitempty"`
  3655. // ForceSendFields is a list of field names (e.g. "Permissions") to
  3656. // unconditionally include in API requests. By default, fields with
  3657. // empty values are omitted from API requests. However, any non-pointer,
  3658. // non-interface field appearing in ForceSendFields will be sent to the
  3659. // server regardless of whether the field is empty or not. This may be
  3660. // used to include empty fields in Patch requests.
  3661. ForceSendFields []string `json:"-"`
  3662. // NullFields is a list of field names (e.g. "Permissions") to include
  3663. // in API requests with the JSON null value. By default, fields with
  3664. // empty values are omitted from API requests. However, any field with
  3665. // an empty value appearing in NullFields will be sent to the server as
  3666. // null. It is an error if a field in this list has a non-empty value.
  3667. // This may be used to include null fields in Patch requests.
  3668. NullFields []string `json:"-"`
  3669. }
  3670. func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
  3671. type NoMethod TestIamPermissionsRequest
  3672. raw := NoMethod(*s)
  3673. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3674. }
  3675. // TestIamPermissionsResponse: Response message for `TestIamPermissions`
  3676. // method.
  3677. type TestIamPermissionsResponse struct {
  3678. // Permissions: A subset of `TestPermissionsRequest.permissions` that
  3679. // the caller is
  3680. // allowed.
  3681. Permissions []string `json:"permissions,omitempty"`
  3682. // ServerResponse contains the HTTP response code and headers from the
  3683. // server.
  3684. googleapi.ServerResponse `json:"-"`
  3685. // ForceSendFields is a list of field names (e.g. "Permissions") to
  3686. // unconditionally include in API requests. By default, fields with
  3687. // empty values are omitted from API requests. However, any non-pointer,
  3688. // non-interface field appearing in ForceSendFields will be sent to the
  3689. // server regardless of whether the field is empty or not. This may be
  3690. // used to include empty fields in Patch requests.
  3691. ForceSendFields []string `json:"-"`
  3692. // NullFields is a list of field names (e.g. "Permissions") to include
  3693. // in API requests with the JSON null value. By default, fields with
  3694. // empty values are omitted from API requests. However, any field with
  3695. // an empty value appearing in NullFields will be sent to the server as
  3696. // null. It is an error if a field in this list has a non-empty value.
  3697. // This may be used to include null fields in Patch requests.
  3698. NullFields []string `json:"-"`
  3699. }
  3700. func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
  3701. type NoMethod TestIamPermissionsResponse
  3702. raw := NoMethod(*s)
  3703. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3704. }
  3705. // Transcript: A transcript represents the assertion that a particular
  3706. // region of the
  3707. // reference genome may be transcribed as RNA.
  3708. type Transcript struct {
  3709. // CodingSequence: The range of the coding sequence for this transcript,
  3710. // if any. To determine
  3711. // the exact ranges of coding sequence, intersect this range with those
  3712. // of the
  3713. // exons, if any. If there are any
  3714. // exons, the
  3715. // codingSequence must start
  3716. // and end within them.
  3717. //
  3718. // Note that in some cases, the reference genome will not exactly match
  3719. // the
  3720. // observed mRNA transcript e.g. due to variance in the source genome
  3721. // from
  3722. // reference. In these cases,
  3723. // exon.frame will not necessarily
  3724. // match the expected reference reading frame and coding exon reference
  3725. // bases
  3726. // cannot necessarily be concatenated to produce the original transcript
  3727. // mRNA.
  3728. CodingSequence *CodingSequence `json:"codingSequence,omitempty"`
  3729. // Exons: The <a href="http://en.wikipedia.org/wiki/Exon">exons</a> that
  3730. // compose
  3731. // this transcript. This field should be unset for genomes where
  3732. // transcript
  3733. // splicing does not occur, for example prokaryotes.
  3734. //
  3735. // Introns are regions of the transcript that are not included in
  3736. // the
  3737. // spliced RNA product. Though not explicitly modeled here, intron
  3738. // ranges can
  3739. // be deduced; all regions of this transcript that are not exons are
  3740. // introns.
  3741. //
  3742. // Exonic sequences do not necessarily code for a translational
  3743. // product
  3744. // (amino acids). Only the regions of exons bounded by
  3745. // the
  3746. // codingSequence correspond
  3747. // to coding DNA sequence.
  3748. //
  3749. // Exons are ordered by start position and may not overlap.
  3750. Exons []*Exon `json:"exons,omitempty"`
  3751. // GeneId: The annotation ID of the gene from which this transcript is
  3752. // transcribed.
  3753. GeneId string `json:"geneId,omitempty"`
  3754. // ForceSendFields is a list of field names (e.g. "CodingSequence") to
  3755. // unconditionally include in API requests. By default, fields with
  3756. // empty values are omitted from API requests. However, any non-pointer,
  3757. // non-interface field appearing in ForceSendFields will be sent to the
  3758. // server regardless of whether the field is empty or not. This may be
  3759. // used to include empty fields in Patch requests.
  3760. ForceSendFields []string `json:"-"`
  3761. // NullFields is a list of field names (e.g. "CodingSequence") to
  3762. // include in API requests with the JSON null value. By default, fields
  3763. // with empty values are omitted from API requests. However, any field
  3764. // with an empty value appearing in NullFields will be sent to the
  3765. // server as null. It is an error if a field in this list has a
  3766. // non-empty value. This may be used to include null fields in Patch
  3767. // requests.
  3768. NullFields []string `json:"-"`
  3769. }
  3770. func (s *Transcript) MarshalJSON() ([]byte, error) {
  3771. type NoMethod Transcript
  3772. raw := NoMethod(*s)
  3773. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3774. }
  3775. type UndeleteDatasetRequest struct {
  3776. }
  3777. // UnexpectedExitStatusEvent: This event is generated when the execution
  3778. // of a container results in a
  3779. // non-zero exit status that was not otherwise ignored. Execution
  3780. // will
  3781. // continue, but only actions that are flagged as ALWAYS_RUN will be
  3782. // executed:
  3783. // other actions will be skipped.
  3784. type UnexpectedExitStatusEvent struct {
  3785. // ActionId: The numeric ID of the action that started the container.
  3786. ActionId int64 `json:"actionId,omitempty"`
  3787. // ExitStatus: The exit status of the container.
  3788. ExitStatus int64 `json:"exitStatus,omitempty"`
  3789. // ForceSendFields is a list of field names (e.g. "ActionId") to
  3790. // unconditionally include in API requests. By default, fields with
  3791. // empty values are omitted from API requests. However, any non-pointer,
  3792. // non-interface field appearing in ForceSendFields will be sent to the
  3793. // server regardless of whether the field is empty or not. This may be
  3794. // used to include empty fields in Patch requests.
  3795. ForceSendFields []string `json:"-"`
  3796. // NullFields is a list of field names (e.g. "ActionId") to include in
  3797. // API requests with the JSON null value. By default, fields with empty
  3798. // values are omitted from API requests. However, any field with an
  3799. // empty value appearing in NullFields will be sent to the server as
  3800. // null. It is an error if a field in this list has a non-empty value.
  3801. // This may be used to include null fields in Patch requests.
  3802. NullFields []string `json:"-"`
  3803. }
  3804. func (s *UnexpectedExitStatusEvent) MarshalJSON() ([]byte, error) {
  3805. type NoMethod UnexpectedExitStatusEvent
  3806. raw := NoMethod(*s)
  3807. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3808. }
  3809. // Variant: A variant represents a change in DNA sequence relative to a
  3810. // reference
  3811. // sequence. For example, a variant could represent a SNP or an
  3812. // insertion.
  3813. // Variants belong to a variant set.
  3814. //
  3815. // Each of the calls on a variant represent a determination of genotype
  3816. // with
  3817. // respect to that variant. For example, a call might assign probability
  3818. // of 0.32
  3819. // to the occurrence of a SNP named rs1234 in a sample named NA12345. A
  3820. // call
  3821. // belongs to a call set, which contains related calls typically from
  3822. // one
  3823. // sample.
  3824. type Variant struct {
  3825. // AlternateBases: The bases that appear instead of the reference bases.
  3826. AlternateBases []string `json:"alternateBases,omitempty"`
  3827. // Calls: The variant calls for this particular variant. Each one
  3828. // represents the
  3829. // determination of genotype with respect to this variant.
  3830. Calls []*VariantCall `json:"calls,omitempty"`
  3831. // Created: The date this variant was created, in milliseconds from the
  3832. // epoch.
  3833. Created int64 `json:"created,omitempty,string"`
  3834. // End: The end position (0-based) of this variant. This corresponds to
  3835. // the first
  3836. // base after the last base in the reference allele. So, the length
  3837. // of
  3838. // the reference allele is (end - start). This is useful for
  3839. // variants
  3840. // that don't explicitly give alternate bases, for example large
  3841. // deletions.
  3842. End int64 `json:"end,omitempty,string"`
  3843. // Filter: A list of filters (normally quality filters) this variant has
  3844. // failed.
  3845. // `PASS` indicates this variant has passed all filters.
  3846. Filter []string `json:"filter,omitempty"`
  3847. // Id: The server-generated variant ID, unique across all variants.
  3848. Id string `json:"id,omitempty"`
  3849. // Info: A map of additional variant information. This must be of the
  3850. // form
  3851. // map<string, string[]> (string key mapping to a list of string
  3852. // values).
  3853. Info map[string][]interface{} `json:"info,omitempty"`
  3854. // Names: Names for the variant, for example a RefSNP ID.
  3855. Names []string `json:"names,omitempty"`
  3856. // Quality: A measure of how likely this variant is to be real.
  3857. // A higher value is better.
  3858. Quality float64 `json:"quality,omitempty"`
  3859. // ReferenceBases: The reference bases for this variant. They start at
  3860. // the given
  3861. // position.
  3862. ReferenceBases string `json:"referenceBases,omitempty"`
  3863. // ReferenceName: The reference on which this variant occurs.
  3864. // (such as `chr20` or `X`)
  3865. ReferenceName string `json:"referenceName,omitempty"`
  3866. // Start: The position at which this variant occurs (0-based).
  3867. // This corresponds to the first base of the string of reference bases.
  3868. Start int64 `json:"start,omitempty,string"`
  3869. // VariantSetId: The ID of the variant set this variant belongs to.
  3870. VariantSetId string `json:"variantSetId,omitempty"`
  3871. // ServerResponse contains the HTTP response code and headers from the
  3872. // server.
  3873. googleapi.ServerResponse `json:"-"`
  3874. // ForceSendFields is a list of field names (e.g. "AlternateBases") to
  3875. // unconditionally include in API requests. By default, fields with
  3876. // empty values are omitted from API requests. However, any non-pointer,
  3877. // non-interface field appearing in ForceSendFields will be sent to the
  3878. // server regardless of whether the field is empty or not. This may be
  3879. // used to include empty fields in Patch requests.
  3880. ForceSendFields []string `json:"-"`
  3881. // NullFields is a list of field names (e.g. "AlternateBases") to
  3882. // include in API requests with the JSON null value. By default, fields
  3883. // with empty values are omitted from API requests. However, any field
  3884. // with an empty value appearing in NullFields will be sent to the
  3885. // server as null. It is an error if a field in this list has a
  3886. // non-empty value. This may be used to include null fields in Patch
  3887. // requests.
  3888. NullFields []string `json:"-"`
  3889. }
  3890. func (s *Variant) MarshalJSON() ([]byte, error) {
  3891. type NoMethod Variant
  3892. raw := NoMethod(*s)
  3893. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3894. }
  3895. func (s *Variant) UnmarshalJSON(data []byte) error {
  3896. type NoMethod Variant
  3897. var s1 struct {
  3898. Quality gensupport.JSONFloat64 `json:"quality"`
  3899. *NoMethod
  3900. }
  3901. s1.NoMethod = (*NoMethod)(s)
  3902. if err := json.Unmarshal(data, &s1); err != nil {
  3903. return err
  3904. }
  3905. s.Quality = float64(s1.Quality)
  3906. return nil
  3907. }
  3908. type VariantAnnotation struct {
  3909. // AlternateBases: The alternate allele for this variant. If multiple
  3910. // alternate alleles
  3911. // exist at this location, create a separate variant for each one, as
  3912. // they
  3913. // may represent distinct conditions.
  3914. AlternateBases string `json:"alternateBases,omitempty"`
  3915. // ClinicalSignificance: Describes the clinical significance of a
  3916. // variant.
  3917. // It is adapted from the ClinVar controlled vocabulary for
  3918. // clinical
  3919. // significance described
  3920. // at:
  3921. // http://www.ncbi.nlm.nih.gov/clinvar/docs/clinsig/
  3922. //
  3923. // Possible values:
  3924. // "CLINICAL_SIGNIFICANCE_UNSPECIFIED"
  3925. // "CLINICAL_SIGNIFICANCE_OTHER" - `OTHER` should be used when no
  3926. // other clinical significance
  3927. // value will suffice.
  3928. // "UNCERTAIN"
  3929. // "BENIGN"
  3930. // "LIKELY_BENIGN"
  3931. // "LIKELY_PATHOGENIC"
  3932. // "PATHOGENIC"
  3933. // "DRUG_RESPONSE"
  3934. // "HISTOCOMPATIBILITY"
  3935. // "CONFERS_SENSITIVITY"
  3936. // "RISK_FACTOR"
  3937. // "ASSOCIATION"
  3938. // "PROTECTIVE"
  3939. // "MULTIPLE_REPORTED" - `MULTIPLE_REPORTED` should be used when
  3940. // multiple clinical
  3941. // signficances are reported for a variant. The original
  3942. // clinical
  3943. // significance values may be provided in the `info` field.
  3944. ClinicalSignificance string `json:"clinicalSignificance,omitempty"`
  3945. // Conditions: The set of conditions associated with this variant.
  3946. // A condition describes the way a variant influences human health.
  3947. Conditions []*ClinicalCondition `json:"conditions,omitempty"`
  3948. // Effect: Effect of the variant on the coding sequence.
  3949. //
  3950. // Possible values:
  3951. // "EFFECT_UNSPECIFIED"
  3952. // "EFFECT_OTHER" - `EFFECT_OTHER` should be used when no other
  3953. // Effect
  3954. // will suffice.
  3955. // "FRAMESHIFT" - `FRAMESHIFT` indicates a mutation in which the
  3956. // insertion or
  3957. // deletion of nucleotides resulted in a frameshift change.
  3958. // "FRAME_PRESERVING_INDEL" - `FRAME_PRESERVING_INDEL` indicates a
  3959. // mutation in which a
  3960. // multiple of three nucleotides has been inserted or deleted,
  3961. // resulting
  3962. // in no change to the reading frame of the coding sequence.
  3963. // "SYNONYMOUS_SNP" - `SYNONYMOUS_SNP` indicates a single nucleotide
  3964. // polymorphism
  3965. // mutation that results in no amino acid change.
  3966. // "NONSYNONYMOUS_SNP" - `NONSYNONYMOUS_SNP` indicates a single
  3967. // nucleotide
  3968. // polymorphism mutation that results in an amino acid change.
  3969. // "STOP_GAIN" - `STOP_GAIN` indicates a mutation that leads to the
  3970. // creation
  3971. // of a stop codon at the variant site. Frameshift mutations
  3972. // creating
  3973. // downstream stop codons do not count as `STOP_GAIN`.
  3974. // "STOP_LOSS" - `STOP_LOSS` indicates a mutation that eliminates
  3975. // a
  3976. // stop codon at the variant site.
  3977. // "SPLICE_SITE_DISRUPTION" - `SPLICE_SITE_DISRUPTION` indicates that
  3978. // this variant is
  3979. // found in a splice site for the associated transcript, and alters
  3980. // the
  3981. // normal splicing pattern.
  3982. Effect string `json:"effect,omitempty"`
  3983. // GeneId: Google annotation ID of the gene affected by this variant.
  3984. // This should
  3985. // be provided when the variant is created.
  3986. GeneId string `json:"geneId,omitempty"`
  3987. // TranscriptIds: Google annotation IDs of the transcripts affected by
  3988. // this variant. These
  3989. // should be provided when the variant is created.
  3990. TranscriptIds []string `json:"transcriptIds,omitempty"`
  3991. // Type: Type has been adapted from ClinVar's list of variant types.
  3992. //
  3993. // Possible values:
  3994. // "TYPE_UNSPECIFIED"
  3995. // "TYPE_OTHER" - `TYPE_OTHER` should be used when no other Type will
  3996. // suffice.
  3997. // Further explanation of the variant type may be included in the
  3998. // info field.
  3999. // "INSERTION" - `INSERTION` indicates an insertion.
  4000. // "DELETION" - `DELETION` indicates a deletion.
  4001. // "SUBSTITUTION" - `SUBSTITUTION` indicates a block substitution
  4002. // of
  4003. // two or more nucleotides.
  4004. // "SNP" - `SNP` indicates a single nucleotide polymorphism.
  4005. // "STRUCTURAL" - `STRUCTURAL` indicates a large structural
  4006. // variant,
  4007. // including chromosomal fusions, inversions, etc.
  4008. // "CNV" - `CNV` indicates a variation in copy number.
  4009. Type string `json:"type,omitempty"`
  4010. // ForceSendFields is a list of field names (e.g. "AlternateBases") to
  4011. // unconditionally include in API requests. By default, fields with
  4012. // empty values are omitted from API requests. However, any non-pointer,
  4013. // non-interface field appearing in ForceSendFields will be sent to the
  4014. // server regardless of whether the field is empty or not. This may be
  4015. // used to include empty fields in Patch requests.
  4016. ForceSendFields []string `json:"-"`
  4017. // NullFields is a list of field names (e.g. "AlternateBases") to
  4018. // include in API requests with the JSON null value. By default, fields
  4019. // with empty values are omitted from API requests. However, any field
  4020. // with an empty value appearing in NullFields will be sent to the
  4021. // server as null. It is an error if a field in this list has a
  4022. // non-empty value. This may be used to include null fields in Patch
  4023. // requests.
  4024. NullFields []string `json:"-"`
  4025. }
  4026. func (s *VariantAnnotation) MarshalJSON() ([]byte, error) {
  4027. type NoMethod VariantAnnotation
  4028. raw := NoMethod(*s)
  4029. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4030. }
  4031. // VariantCall: A call represents the determination of genotype with
  4032. // respect to a particular
  4033. // variant. It may include associated information such as quality and
  4034. // phasing.
  4035. // For example, a call might assign a probability of 0.32 to the
  4036. // occurrence of
  4037. // a SNP named rs1234 in a call set with the name NA12345.
  4038. type VariantCall struct {
  4039. // CallSetId: The ID of the call set this variant call belongs to.
  4040. CallSetId string `json:"callSetId,omitempty"`
  4041. // CallSetName: The name of the call set this variant call belongs to.
  4042. CallSetName string `json:"callSetName,omitempty"`
  4043. // Genotype: The genotype of this variant call. Each value represents
  4044. // either the value
  4045. // of the `referenceBases` field or a 1-based index
  4046. // into
  4047. // `alternateBases`. If a variant had a `referenceBases`
  4048. // value of `T` and an `alternateBases`
  4049. // value of `["A", "C"]`, and the `genotype` was
  4050. // `[2, 1]`, that would mean the call
  4051. // represented the heterozygous value `CA` for this variant.
  4052. // If the `genotype` was instead `[0, 1]`, the
  4053. // represented value would be `TA`. Ordering of the
  4054. // genotype values is important if the `phaseset` is present.
  4055. // If a genotype is not called (that is, a `.` is present in the
  4056. // GT string) -1 is returned.
  4057. Genotype []int64 `json:"genotype,omitempty"`
  4058. // GenotypeLikelihood: The genotype likelihoods for this variant call.
  4059. // Each array entry
  4060. // represents how likely a specific genotype is for this call. The
  4061. // value
  4062. // ordering is defined by the GL tag in the VCF spec.
  4063. // If Phred-scaled genotype likelihood scores (PL) are available
  4064. // and
  4065. // log10(P) genotype likelihood scores (GL) are not, PL scores are
  4066. // converted
  4067. // to GL scores. If both are available, PL scores are stored in `info`.
  4068. GenotypeLikelihood []float64 `json:"genotypeLikelihood,omitempty"`
  4069. // Info: A map of additional variant call information. This must be of
  4070. // the form
  4071. // map<string, string[]> (string key mapping to a list of string
  4072. // values).
  4073. Info map[string][]interface{} `json:"info,omitempty"`
  4074. // Phaseset: If this field is present, this variant call's genotype
  4075. // ordering implies
  4076. // the phase of the bases and is consistent with any other variant calls
  4077. // in
  4078. // the same reference sequence which have the same phaseset value.
  4079. // When importing data from VCF, if the genotype data was phased but
  4080. // no
  4081. // phase set was specified this field will be set to `*`.
  4082. Phaseset string `json:"phaseset,omitempty"`
  4083. // ForceSendFields is a list of field names (e.g. "CallSetId") to
  4084. // unconditionally include in API requests. By default, fields with
  4085. // empty values are omitted from API requests. However, any non-pointer,
  4086. // non-interface field appearing in ForceSendFields will be sent to the
  4087. // server regardless of whether the field is empty or not. This may be
  4088. // used to include empty fields in Patch requests.
  4089. ForceSendFields []string `json:"-"`
  4090. // NullFields is a list of field names (e.g. "CallSetId") to include in
  4091. // API requests with the JSON null value. By default, fields with empty
  4092. // values are omitted from API requests. However, any field with an
  4093. // empty value appearing in NullFields will be sent to the server as
  4094. // null. It is an error if a field in this list has a non-empty value.
  4095. // This may be used to include null fields in Patch requests.
  4096. NullFields []string `json:"-"`
  4097. }
  4098. func (s *VariantCall) MarshalJSON() ([]byte, error) {
  4099. type NoMethod VariantCall
  4100. raw := NoMethod(*s)
  4101. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4102. }
  4103. // VariantSet: A variant set is a collection of call sets and variants.
  4104. // It contains summary
  4105. // statistics of those contents. A variant set belongs to a dataset.
  4106. type VariantSet struct {
  4107. // DatasetId: The dataset to which this variant set belongs.
  4108. DatasetId string `json:"datasetId,omitempty"`
  4109. // Description: A textual description of this variant set.
  4110. Description string `json:"description,omitempty"`
  4111. // Id: The server-generated variant set ID, unique across all variant
  4112. // sets.
  4113. Id string `json:"id,omitempty"`
  4114. // Metadata: The metadata associated with this variant set.
  4115. Metadata []*VariantSetMetadata `json:"metadata,omitempty"`
  4116. // Name: User-specified, mutable name.
  4117. Name string `json:"name,omitempty"`
  4118. // ReferenceBounds: A list of all references used by the variants in a
  4119. // variant set
  4120. // with associated coordinate upper bounds for each one.
  4121. ReferenceBounds []*ReferenceBound `json:"referenceBounds,omitempty"`
  4122. // ReferenceSetId: The reference set to which the variant set is mapped.
  4123. // The reference set
  4124. // describes the alignment provenance of the variant set, while
  4125. // the
  4126. // `referenceBounds` describe the shape of the actual variant data.
  4127. // The
  4128. // reference set's reference names are a superset of those found in
  4129. // the
  4130. // `referenceBounds`.
  4131. //
  4132. // For example, given a variant set that is mapped to the GRCh38
  4133. // reference set
  4134. // and contains a single variant on reference 'X', `referenceBounds`
  4135. // would
  4136. // contain only an entry for 'X', while the associated reference
  4137. // set
  4138. // enumerates all possible references: '1', '2', 'X', 'Y', 'MT', etc.
  4139. ReferenceSetId string `json:"referenceSetId,omitempty"`
  4140. // ServerResponse contains the HTTP response code and headers from the
  4141. // server.
  4142. googleapi.ServerResponse `json:"-"`
  4143. // ForceSendFields is a list of field names (e.g. "DatasetId") to
  4144. // unconditionally include in API requests. By default, fields with
  4145. // empty values are omitted from API requests. However, any non-pointer,
  4146. // non-interface field appearing in ForceSendFields will be sent to the
  4147. // server regardless of whether the field is empty or not. This may be
  4148. // used to include empty fields in Patch requests.
  4149. ForceSendFields []string `json:"-"`
  4150. // NullFields is a list of field names (e.g. "DatasetId") to include in
  4151. // API requests with the JSON null value. By default, fields with empty
  4152. // values are omitted from API requests. However, any field with an
  4153. // empty value appearing in NullFields will be sent to the server as
  4154. // null. It is an error if a field in this list has a non-empty value.
  4155. // This may be used to include null fields in Patch requests.
  4156. NullFields []string `json:"-"`
  4157. }
  4158. func (s *VariantSet) MarshalJSON() ([]byte, error) {
  4159. type NoMethod VariantSet
  4160. raw := NoMethod(*s)
  4161. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4162. }
  4163. // VariantSetMetadata: Metadata describes a single piece of variant call
  4164. // metadata.
  4165. // These data include a top level key and either a single value string
  4166. // (value)
  4167. // or a list of key-value pairs (info.)
  4168. // Value and info are mutually exclusive.
  4169. type VariantSetMetadata struct {
  4170. // Description: A textual description of this metadata.
  4171. Description string `json:"description,omitempty"`
  4172. // Id: User-provided ID field, not enforced by this API.
  4173. // Two or more pieces of structured metadata with identical
  4174. // id and key fields are considered equivalent.
  4175. Id string `json:"id,omitempty"`
  4176. // Info: Remaining structured metadata key-value pairs. This must be of
  4177. // the form
  4178. // map<string, string[]> (string key mapping to a list of string
  4179. // values).
  4180. Info map[string][]interface{} `json:"info,omitempty"`
  4181. // Key: The top-level key.
  4182. Key string `json:"key,omitempty"`
  4183. // Number: The number of values that can be included in a field
  4184. // described by this
  4185. // metadata.
  4186. Number string `json:"number,omitempty"`
  4187. // Type: The type of data. Possible types include: Integer, Float,
  4188. // Flag, Character, and String.
  4189. //
  4190. // Possible values:
  4191. // "TYPE_UNSPECIFIED"
  4192. // "INTEGER"
  4193. // "FLOAT"
  4194. // "FLAG"
  4195. // "CHARACTER"
  4196. // "STRING"
  4197. Type string `json:"type,omitempty"`
  4198. // Value: The value field for simple metadata
  4199. Value string `json:"value,omitempty"`
  4200. // ForceSendFields is a list of field names (e.g. "Description") to
  4201. // unconditionally include in API requests. By default, fields with
  4202. // empty values are omitted from API requests. However, any non-pointer,
  4203. // non-interface field appearing in ForceSendFields will be sent to the
  4204. // server regardless of whether the field is empty or not. This may be
  4205. // used to include empty fields in Patch requests.
  4206. ForceSendFields []string `json:"-"`
  4207. // NullFields is a list of field names (e.g. "Description") to include
  4208. // in API requests with the JSON null value. By default, fields with
  4209. // empty values are omitted from API requests. However, any field with
  4210. // an empty value appearing in NullFields will be sent to the server as
  4211. // null. It is an error if a field in this list has a non-empty value.
  4212. // This may be used to include null fields in Patch requests.
  4213. NullFields []string `json:"-"`
  4214. }
  4215. func (s *VariantSetMetadata) MarshalJSON() ([]byte, error) {
  4216. type NoMethod VariantSetMetadata
  4217. raw := NoMethod(*s)
  4218. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4219. }
  4220. // WorkerAssignedEvent: This event is generated once a worker VM has
  4221. // been assigned to run the
  4222. // pipeline.
  4223. type WorkerAssignedEvent struct {
  4224. // Instance: The worker's instance name.
  4225. Instance string `json:"instance,omitempty"`
  4226. // Zone: The zone the worker is running in.
  4227. Zone string `json:"zone,omitempty"`
  4228. // ForceSendFields is a list of field names (e.g. "Instance") to
  4229. // unconditionally include in API requests. By default, fields with
  4230. // empty values are omitted from API requests. However, any non-pointer,
  4231. // non-interface field appearing in ForceSendFields will be sent to the
  4232. // server regardless of whether the field is empty or not. This may be
  4233. // used to include empty fields in Patch requests.
  4234. ForceSendFields []string `json:"-"`
  4235. // NullFields is a list of field names (e.g. "Instance") to include in
  4236. // API requests with the JSON null value. By default, fields with empty
  4237. // values are omitted from API requests. However, any field with an
  4238. // empty value appearing in NullFields will be sent to the server as
  4239. // null. It is an error if a field in this list has a non-empty value.
  4240. // This may be used to include null fields in Patch requests.
  4241. NullFields []string `json:"-"`
  4242. }
  4243. func (s *WorkerAssignedEvent) MarshalJSON() ([]byte, error) {
  4244. type NoMethod WorkerAssignedEvent
  4245. raw := NoMethod(*s)
  4246. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4247. }
  4248. // WorkerReleasedEvent: This event is generated when the worker VM that
  4249. // was assigned to the pipeline
  4250. // has been released (i.e., deleted).
  4251. type WorkerReleasedEvent struct {
  4252. // Instance: The worker's instance name.
  4253. Instance string `json:"instance,omitempty"`
  4254. // Zone: The zone the worker was running in.
  4255. Zone string `json:"zone,omitempty"`
  4256. // ForceSendFields is a list of field names (e.g. "Instance") to
  4257. // unconditionally include in API requests. By default, fields with
  4258. // empty values are omitted from API requests. However, any non-pointer,
  4259. // non-interface field appearing in ForceSendFields will be sent to the
  4260. // server regardless of whether the field is empty or not. This may be
  4261. // used to include empty fields in Patch requests.
  4262. ForceSendFields []string `json:"-"`
  4263. // NullFields is a list of field names (e.g. "Instance") to include in
  4264. // API requests with the JSON null value. By default, fields with empty
  4265. // values are omitted from API requests. However, any field with an
  4266. // empty value appearing in NullFields will be sent to the server as
  4267. // null. It is an error if a field in this list has a non-empty value.
  4268. // This may be used to include null fields in Patch requests.
  4269. NullFields []string `json:"-"`
  4270. }
  4271. func (s *WorkerReleasedEvent) MarshalJSON() ([]byte, error) {
  4272. type NoMethod WorkerReleasedEvent
  4273. raw := NoMethod(*s)
  4274. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4275. }
  4276. // method id "genomics.annotations.batchCreate":
  4277. type AnnotationsBatchCreateCall struct {
  4278. s *Service
  4279. batchcreateannotationsrequest *BatchCreateAnnotationsRequest
  4280. urlParams_ gensupport.URLParams
  4281. ctx_ context.Context
  4282. header_ http.Header
  4283. }
  4284. // BatchCreate: Creates one or more new annotations atomically. All
  4285. // annotations must
  4286. // belong to the same annotation set. Caller must have WRITE
  4287. // permission for this annotation set. For optimal performance,
  4288. // batch
  4289. // positionally adjacent annotations together.
  4290. //
  4291. // If the request has a systemic issue, such as an attempt to write
  4292. // to
  4293. // an inaccessible annotation set, the entire RPC will fail accordingly.
  4294. // For
  4295. // lesser data issues, when possible an error will be isolated to
  4296. // the
  4297. // corresponding batch entry in the response; the remaining well
  4298. // formed
  4299. // annotations will be created normally.
  4300. //
  4301. // For details on the requirements for each individual annotation
  4302. // resource,
  4303. // see
  4304. // CreateAnnotation.
  4305. func (r *AnnotationsService) BatchCreate(batchcreateannotationsrequest *BatchCreateAnnotationsRequest) *AnnotationsBatchCreateCall {
  4306. c := &AnnotationsBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4307. c.batchcreateannotationsrequest = batchcreateannotationsrequest
  4308. return c
  4309. }
  4310. // Fields allows partial responses to be retrieved. See
  4311. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4312. // for more information.
  4313. func (c *AnnotationsBatchCreateCall) Fields(s ...googleapi.Field) *AnnotationsBatchCreateCall {
  4314. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4315. return c
  4316. }
  4317. // Context sets the context to be used in this call's Do method. Any
  4318. // pending HTTP request will be aborted if the provided context is
  4319. // canceled.
  4320. func (c *AnnotationsBatchCreateCall) Context(ctx context.Context) *AnnotationsBatchCreateCall {
  4321. c.ctx_ = ctx
  4322. return c
  4323. }
  4324. // Header returns an http.Header that can be modified by the caller to
  4325. // add HTTP headers to the request.
  4326. func (c *AnnotationsBatchCreateCall) Header() http.Header {
  4327. if c.header_ == nil {
  4328. c.header_ = make(http.Header)
  4329. }
  4330. return c.header_
  4331. }
  4332. func (c *AnnotationsBatchCreateCall) doRequest(alt string) (*http.Response, error) {
  4333. reqHeaders := make(http.Header)
  4334. for k, v := range c.header_ {
  4335. reqHeaders[k] = v
  4336. }
  4337. reqHeaders.Set("User-Agent", c.s.userAgent())
  4338. var body io.Reader = nil
  4339. body, err := googleapi.WithoutDataWrapper.JSONReader(c.batchcreateannotationsrequest)
  4340. if err != nil {
  4341. return nil, err
  4342. }
  4343. reqHeaders.Set("Content-Type", "application/json")
  4344. c.urlParams_.Set("alt", alt)
  4345. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotations:batchCreate")
  4346. urls += "?" + c.urlParams_.Encode()
  4347. req, _ := http.NewRequest("POST", urls, body)
  4348. req.Header = reqHeaders
  4349. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4350. }
  4351. // Do executes the "genomics.annotations.batchCreate" call.
  4352. // Exactly one of *BatchCreateAnnotationsResponse or error will be
  4353. // non-nil. Any non-2xx status code is an error. Response headers are in
  4354. // either *BatchCreateAnnotationsResponse.ServerResponse.Header or (if a
  4355. // response was returned at all) in error.(*googleapi.Error).Header. Use
  4356. // googleapi.IsNotModified to check whether the returned error was
  4357. // because http.StatusNotModified was returned.
  4358. func (c *AnnotationsBatchCreateCall) Do(opts ...googleapi.CallOption) (*BatchCreateAnnotationsResponse, error) {
  4359. gensupport.SetOptions(c.urlParams_, opts...)
  4360. res, err := c.doRequest("json")
  4361. if res != nil && res.StatusCode == http.StatusNotModified {
  4362. if res.Body != nil {
  4363. res.Body.Close()
  4364. }
  4365. return nil, &googleapi.Error{
  4366. Code: res.StatusCode,
  4367. Header: res.Header,
  4368. }
  4369. }
  4370. if err != nil {
  4371. return nil, err
  4372. }
  4373. defer googleapi.CloseBody(res)
  4374. if err := googleapi.CheckResponse(res); err != nil {
  4375. return nil, err
  4376. }
  4377. ret := &BatchCreateAnnotationsResponse{
  4378. ServerResponse: googleapi.ServerResponse{
  4379. Header: res.Header,
  4380. HTTPStatusCode: res.StatusCode,
  4381. },
  4382. }
  4383. target := &ret
  4384. if err := gensupport.DecodeResponse(target, res); err != nil {
  4385. return nil, err
  4386. }
  4387. return ret, nil
  4388. // {
  4389. // "description": "Creates one or more new annotations atomically. All annotations must\nbelong to the same annotation set. Caller must have WRITE\npermission for this annotation set. For optimal performance, batch\npositionally adjacent annotations together.\n\nIf the request has a systemic issue, such as an attempt to write to\nan inaccessible annotation set, the entire RPC will fail accordingly. For\nlesser data issues, when possible an error will be isolated to the\ncorresponding batch entry in the response; the remaining well formed\nannotations will be created normally.\n\nFor details on the requirements for each individual annotation resource,\nsee\nCreateAnnotation.",
  4390. // "flatPath": "v1/annotations:batchCreate",
  4391. // "httpMethod": "POST",
  4392. // "id": "genomics.annotations.batchCreate",
  4393. // "parameterOrder": [],
  4394. // "parameters": {},
  4395. // "path": "v1/annotations:batchCreate",
  4396. // "request": {
  4397. // "$ref": "BatchCreateAnnotationsRequest"
  4398. // },
  4399. // "response": {
  4400. // "$ref": "BatchCreateAnnotationsResponse"
  4401. // },
  4402. // "scopes": [
  4403. // "https://www.googleapis.com/auth/cloud-platform",
  4404. // "https://www.googleapis.com/auth/genomics"
  4405. // ]
  4406. // }
  4407. }
  4408. // method id "genomics.annotations.create":
  4409. type AnnotationsCreateCall struct {
  4410. s *Service
  4411. annotation *Annotation
  4412. urlParams_ gensupport.URLParams
  4413. ctx_ context.Context
  4414. header_ http.Header
  4415. }
  4416. // Create: Creates a new annotation. Caller must have WRITE
  4417. // permission
  4418. // for the associated annotation set.
  4419. //
  4420. // The following fields are required:
  4421. //
  4422. // * annotationSetId
  4423. // * referenceName or
  4424. // referenceId
  4425. //
  4426. // ### Transcripts
  4427. //
  4428. // For annotations of type TRANSCRIPT, the following fields
  4429. // of
  4430. // transcript must be provided:
  4431. //
  4432. // * exons.start
  4433. // * exons.end
  4434. //
  4435. // All other fields may be optionally specified, unless documented as
  4436. // being
  4437. // server-generated (for example, the `id` field). The annotated
  4438. // range must be no longer than 100Mbp (mega base pairs). See
  4439. // the
  4440. // Annotation resource
  4441. // for additional restrictions on each field.
  4442. func (r *AnnotationsService) Create(annotation *Annotation) *AnnotationsCreateCall {
  4443. c := &AnnotationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4444. c.annotation = annotation
  4445. return c
  4446. }
  4447. // Fields allows partial responses to be retrieved. See
  4448. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4449. // for more information.
  4450. func (c *AnnotationsCreateCall) Fields(s ...googleapi.Field) *AnnotationsCreateCall {
  4451. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4452. return c
  4453. }
  4454. // Context sets the context to be used in this call's Do method. Any
  4455. // pending HTTP request will be aborted if the provided context is
  4456. // canceled.
  4457. func (c *AnnotationsCreateCall) Context(ctx context.Context) *AnnotationsCreateCall {
  4458. c.ctx_ = ctx
  4459. return c
  4460. }
  4461. // Header returns an http.Header that can be modified by the caller to
  4462. // add HTTP headers to the request.
  4463. func (c *AnnotationsCreateCall) Header() http.Header {
  4464. if c.header_ == nil {
  4465. c.header_ = make(http.Header)
  4466. }
  4467. return c.header_
  4468. }
  4469. func (c *AnnotationsCreateCall) doRequest(alt string) (*http.Response, error) {
  4470. reqHeaders := make(http.Header)
  4471. for k, v := range c.header_ {
  4472. reqHeaders[k] = v
  4473. }
  4474. reqHeaders.Set("User-Agent", c.s.userAgent())
  4475. var body io.Reader = nil
  4476. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  4477. if err != nil {
  4478. return nil, err
  4479. }
  4480. reqHeaders.Set("Content-Type", "application/json")
  4481. c.urlParams_.Set("alt", alt)
  4482. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotations")
  4483. urls += "?" + c.urlParams_.Encode()
  4484. req, _ := http.NewRequest("POST", urls, body)
  4485. req.Header = reqHeaders
  4486. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4487. }
  4488. // Do executes the "genomics.annotations.create" call.
  4489. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  4490. // status code is an error. Response headers are in either
  4491. // *Annotation.ServerResponse.Header or (if a response was returned at
  4492. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4493. // to check whether the returned error was because
  4494. // http.StatusNotModified was returned.
  4495. func (c *AnnotationsCreateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  4496. gensupport.SetOptions(c.urlParams_, opts...)
  4497. res, err := c.doRequest("json")
  4498. if res != nil && res.StatusCode == http.StatusNotModified {
  4499. if res.Body != nil {
  4500. res.Body.Close()
  4501. }
  4502. return nil, &googleapi.Error{
  4503. Code: res.StatusCode,
  4504. Header: res.Header,
  4505. }
  4506. }
  4507. if err != nil {
  4508. return nil, err
  4509. }
  4510. defer googleapi.CloseBody(res)
  4511. if err := googleapi.CheckResponse(res); err != nil {
  4512. return nil, err
  4513. }
  4514. ret := &Annotation{
  4515. ServerResponse: googleapi.ServerResponse{
  4516. Header: res.Header,
  4517. HTTPStatusCode: res.StatusCode,
  4518. },
  4519. }
  4520. target := &ret
  4521. if err := gensupport.DecodeResponse(target, res); err != nil {
  4522. return nil, err
  4523. }
  4524. return ret, nil
  4525. // {
  4526. // "description": "Creates a new annotation. Caller must have WRITE permission\nfor the associated annotation set.\n\nThe following fields are required:\n\n* annotationSetId\n* referenceName or\n referenceId\n\n### Transcripts\n\nFor annotations of type TRANSCRIPT, the following fields of\ntranscript must be provided:\n\n* exons.start\n* exons.end\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field). The annotated\nrange must be no longer than 100Mbp (mega base pairs). See the\nAnnotation resource\nfor additional restrictions on each field.",
  4527. // "flatPath": "v1/annotations",
  4528. // "httpMethod": "POST",
  4529. // "id": "genomics.annotations.create",
  4530. // "parameterOrder": [],
  4531. // "parameters": {},
  4532. // "path": "v1/annotations",
  4533. // "request": {
  4534. // "$ref": "Annotation"
  4535. // },
  4536. // "response": {
  4537. // "$ref": "Annotation"
  4538. // },
  4539. // "scopes": [
  4540. // "https://www.googleapis.com/auth/cloud-platform",
  4541. // "https://www.googleapis.com/auth/genomics"
  4542. // ]
  4543. // }
  4544. }
  4545. // method id "genomics.annotations.delete":
  4546. type AnnotationsDeleteCall struct {
  4547. s *Service
  4548. annotationId string
  4549. urlParams_ gensupport.URLParams
  4550. ctx_ context.Context
  4551. header_ http.Header
  4552. }
  4553. // Delete: Deletes an annotation. Caller must have WRITE permission
  4554. // for
  4555. // the associated annotation set.
  4556. func (r *AnnotationsService) Delete(annotationId string) *AnnotationsDeleteCall {
  4557. c := &AnnotationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4558. c.annotationId = annotationId
  4559. return c
  4560. }
  4561. // Fields allows partial responses to be retrieved. See
  4562. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4563. // for more information.
  4564. func (c *AnnotationsDeleteCall) Fields(s ...googleapi.Field) *AnnotationsDeleteCall {
  4565. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4566. return c
  4567. }
  4568. // Context sets the context to be used in this call's Do method. Any
  4569. // pending HTTP request will be aborted if the provided context is
  4570. // canceled.
  4571. func (c *AnnotationsDeleteCall) Context(ctx context.Context) *AnnotationsDeleteCall {
  4572. c.ctx_ = ctx
  4573. return c
  4574. }
  4575. // Header returns an http.Header that can be modified by the caller to
  4576. // add HTTP headers to the request.
  4577. func (c *AnnotationsDeleteCall) Header() http.Header {
  4578. if c.header_ == nil {
  4579. c.header_ = make(http.Header)
  4580. }
  4581. return c.header_
  4582. }
  4583. func (c *AnnotationsDeleteCall) doRequest(alt string) (*http.Response, error) {
  4584. reqHeaders := make(http.Header)
  4585. for k, v := range c.header_ {
  4586. reqHeaders[k] = v
  4587. }
  4588. reqHeaders.Set("User-Agent", c.s.userAgent())
  4589. var body io.Reader = nil
  4590. c.urlParams_.Set("alt", alt)
  4591. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotations/{annotationId}")
  4592. urls += "?" + c.urlParams_.Encode()
  4593. req, _ := http.NewRequest("DELETE", urls, body)
  4594. req.Header = reqHeaders
  4595. googleapi.Expand(req.URL, map[string]string{
  4596. "annotationId": c.annotationId,
  4597. })
  4598. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4599. }
  4600. // Do executes the "genomics.annotations.delete" call.
  4601. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  4602. // code is an error. Response headers are in either
  4603. // *Empty.ServerResponse.Header or (if a response was returned at all)
  4604. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  4605. // check whether the returned error was because http.StatusNotModified
  4606. // was returned.
  4607. func (c *AnnotationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  4608. gensupport.SetOptions(c.urlParams_, opts...)
  4609. res, err := c.doRequest("json")
  4610. if res != nil && res.StatusCode == http.StatusNotModified {
  4611. if res.Body != nil {
  4612. res.Body.Close()
  4613. }
  4614. return nil, &googleapi.Error{
  4615. Code: res.StatusCode,
  4616. Header: res.Header,
  4617. }
  4618. }
  4619. if err != nil {
  4620. return nil, err
  4621. }
  4622. defer googleapi.CloseBody(res)
  4623. if err := googleapi.CheckResponse(res); err != nil {
  4624. return nil, err
  4625. }
  4626. ret := &Empty{
  4627. ServerResponse: googleapi.ServerResponse{
  4628. Header: res.Header,
  4629. HTTPStatusCode: res.StatusCode,
  4630. },
  4631. }
  4632. target := &ret
  4633. if err := gensupport.DecodeResponse(target, res); err != nil {
  4634. return nil, err
  4635. }
  4636. return ret, nil
  4637. // {
  4638. // "description": "Deletes an annotation. Caller must have WRITE permission for\nthe associated annotation set.",
  4639. // "flatPath": "v1/annotations/{annotationId}",
  4640. // "httpMethod": "DELETE",
  4641. // "id": "genomics.annotations.delete",
  4642. // "parameterOrder": [
  4643. // "annotationId"
  4644. // ],
  4645. // "parameters": {
  4646. // "annotationId": {
  4647. // "description": "The ID of the annotation to be deleted.",
  4648. // "location": "path",
  4649. // "required": true,
  4650. // "type": "string"
  4651. // }
  4652. // },
  4653. // "path": "v1/annotations/{annotationId}",
  4654. // "response": {
  4655. // "$ref": "Empty"
  4656. // },
  4657. // "scopes": [
  4658. // "https://www.googleapis.com/auth/cloud-platform",
  4659. // "https://www.googleapis.com/auth/genomics"
  4660. // ]
  4661. // }
  4662. }
  4663. // method id "genomics.annotations.get":
  4664. type AnnotationsGetCall struct {
  4665. s *Service
  4666. annotationId string
  4667. urlParams_ gensupport.URLParams
  4668. ifNoneMatch_ string
  4669. ctx_ context.Context
  4670. header_ http.Header
  4671. }
  4672. // Get: Gets an annotation. Caller must have READ permission
  4673. // for the associated annotation set.
  4674. func (r *AnnotationsService) Get(annotationId string) *AnnotationsGetCall {
  4675. c := &AnnotationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4676. c.annotationId = annotationId
  4677. return c
  4678. }
  4679. // Fields allows partial responses to be retrieved. See
  4680. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4681. // for more information.
  4682. func (c *AnnotationsGetCall) Fields(s ...googleapi.Field) *AnnotationsGetCall {
  4683. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4684. return c
  4685. }
  4686. // IfNoneMatch sets the optional parameter which makes the operation
  4687. // fail if the object's ETag matches the given value. This is useful for
  4688. // getting updates only after the object has changed since the last
  4689. // request. Use googleapi.IsNotModified to check whether the response
  4690. // error from Do is the result of In-None-Match.
  4691. func (c *AnnotationsGetCall) IfNoneMatch(entityTag string) *AnnotationsGetCall {
  4692. c.ifNoneMatch_ = entityTag
  4693. return c
  4694. }
  4695. // Context sets the context to be used in this call's Do method. Any
  4696. // pending HTTP request will be aborted if the provided context is
  4697. // canceled.
  4698. func (c *AnnotationsGetCall) Context(ctx context.Context) *AnnotationsGetCall {
  4699. c.ctx_ = ctx
  4700. return c
  4701. }
  4702. // Header returns an http.Header that can be modified by the caller to
  4703. // add HTTP headers to the request.
  4704. func (c *AnnotationsGetCall) Header() http.Header {
  4705. if c.header_ == nil {
  4706. c.header_ = make(http.Header)
  4707. }
  4708. return c.header_
  4709. }
  4710. func (c *AnnotationsGetCall) doRequest(alt string) (*http.Response, error) {
  4711. reqHeaders := make(http.Header)
  4712. for k, v := range c.header_ {
  4713. reqHeaders[k] = v
  4714. }
  4715. reqHeaders.Set("User-Agent", c.s.userAgent())
  4716. if c.ifNoneMatch_ != "" {
  4717. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  4718. }
  4719. var body io.Reader = nil
  4720. c.urlParams_.Set("alt", alt)
  4721. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotations/{annotationId}")
  4722. urls += "?" + c.urlParams_.Encode()
  4723. req, _ := http.NewRequest("GET", urls, body)
  4724. req.Header = reqHeaders
  4725. googleapi.Expand(req.URL, map[string]string{
  4726. "annotationId": c.annotationId,
  4727. })
  4728. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4729. }
  4730. // Do executes the "genomics.annotations.get" call.
  4731. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  4732. // status code is an error. Response headers are in either
  4733. // *Annotation.ServerResponse.Header or (if a response was returned at
  4734. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  4735. // to check whether the returned error was because
  4736. // http.StatusNotModified was returned.
  4737. func (c *AnnotationsGetCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  4738. gensupport.SetOptions(c.urlParams_, opts...)
  4739. res, err := c.doRequest("json")
  4740. if res != nil && res.StatusCode == http.StatusNotModified {
  4741. if res.Body != nil {
  4742. res.Body.Close()
  4743. }
  4744. return nil, &googleapi.Error{
  4745. Code: res.StatusCode,
  4746. Header: res.Header,
  4747. }
  4748. }
  4749. if err != nil {
  4750. return nil, err
  4751. }
  4752. defer googleapi.CloseBody(res)
  4753. if err := googleapi.CheckResponse(res); err != nil {
  4754. return nil, err
  4755. }
  4756. ret := &Annotation{
  4757. ServerResponse: googleapi.ServerResponse{
  4758. Header: res.Header,
  4759. HTTPStatusCode: res.StatusCode,
  4760. },
  4761. }
  4762. target := &ret
  4763. if err := gensupport.DecodeResponse(target, res); err != nil {
  4764. return nil, err
  4765. }
  4766. return ret, nil
  4767. // {
  4768. // "description": "Gets an annotation. Caller must have READ permission\nfor the associated annotation set.",
  4769. // "flatPath": "v1/annotations/{annotationId}",
  4770. // "httpMethod": "GET",
  4771. // "id": "genomics.annotations.get",
  4772. // "parameterOrder": [
  4773. // "annotationId"
  4774. // ],
  4775. // "parameters": {
  4776. // "annotationId": {
  4777. // "description": "The ID of the annotation to be retrieved.",
  4778. // "location": "path",
  4779. // "required": true,
  4780. // "type": "string"
  4781. // }
  4782. // },
  4783. // "path": "v1/annotations/{annotationId}",
  4784. // "response": {
  4785. // "$ref": "Annotation"
  4786. // },
  4787. // "scopes": [
  4788. // "https://www.googleapis.com/auth/cloud-platform",
  4789. // "https://www.googleapis.com/auth/genomics",
  4790. // "https://www.googleapis.com/auth/genomics.readonly"
  4791. // ]
  4792. // }
  4793. }
  4794. // method id "genomics.annotations.search":
  4795. type AnnotationsSearchCall struct {
  4796. s *Service
  4797. searchannotationsrequest *SearchAnnotationsRequest
  4798. urlParams_ gensupport.URLParams
  4799. ctx_ context.Context
  4800. header_ http.Header
  4801. }
  4802. // Search: Searches for annotations that match the given criteria.
  4803. // Results are
  4804. // ordered by genomic coordinate (by reference sequence, then
  4805. // position).
  4806. // Annotations with equivalent genomic coordinates are returned in
  4807. // an
  4808. // unspecified order. This order is consistent, such that two queries
  4809. // for the
  4810. // same content (regardless of page size) yield annotations in the same
  4811. // order
  4812. // across their respective streams of paginated responses. Caller must
  4813. // have
  4814. // READ permission for the queried annotation sets.
  4815. func (r *AnnotationsService) Search(searchannotationsrequest *SearchAnnotationsRequest) *AnnotationsSearchCall {
  4816. c := &AnnotationsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4817. c.searchannotationsrequest = searchannotationsrequest
  4818. return c
  4819. }
  4820. // Fields allows partial responses to be retrieved. See
  4821. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4822. // for more information.
  4823. func (c *AnnotationsSearchCall) Fields(s ...googleapi.Field) *AnnotationsSearchCall {
  4824. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4825. return c
  4826. }
  4827. // Context sets the context to be used in this call's Do method. Any
  4828. // pending HTTP request will be aborted if the provided context is
  4829. // canceled.
  4830. func (c *AnnotationsSearchCall) Context(ctx context.Context) *AnnotationsSearchCall {
  4831. c.ctx_ = ctx
  4832. return c
  4833. }
  4834. // Header returns an http.Header that can be modified by the caller to
  4835. // add HTTP headers to the request.
  4836. func (c *AnnotationsSearchCall) Header() http.Header {
  4837. if c.header_ == nil {
  4838. c.header_ = make(http.Header)
  4839. }
  4840. return c.header_
  4841. }
  4842. func (c *AnnotationsSearchCall) doRequest(alt string) (*http.Response, error) {
  4843. reqHeaders := make(http.Header)
  4844. for k, v := range c.header_ {
  4845. reqHeaders[k] = v
  4846. }
  4847. reqHeaders.Set("User-Agent", c.s.userAgent())
  4848. var body io.Reader = nil
  4849. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchannotationsrequest)
  4850. if err != nil {
  4851. return nil, err
  4852. }
  4853. reqHeaders.Set("Content-Type", "application/json")
  4854. c.urlParams_.Set("alt", alt)
  4855. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotations/search")
  4856. urls += "?" + c.urlParams_.Encode()
  4857. req, _ := http.NewRequest("POST", urls, body)
  4858. req.Header = reqHeaders
  4859. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  4860. }
  4861. // Do executes the "genomics.annotations.search" call.
  4862. // Exactly one of *SearchAnnotationsResponse or error will be non-nil.
  4863. // Any non-2xx status code is an error. Response headers are in either
  4864. // *SearchAnnotationsResponse.ServerResponse.Header or (if a response
  4865. // was returned at all) in error.(*googleapi.Error).Header. Use
  4866. // googleapi.IsNotModified to check whether the returned error was
  4867. // because http.StatusNotModified was returned.
  4868. func (c *AnnotationsSearchCall) Do(opts ...googleapi.CallOption) (*SearchAnnotationsResponse, error) {
  4869. gensupport.SetOptions(c.urlParams_, opts...)
  4870. res, err := c.doRequest("json")
  4871. if res != nil && res.StatusCode == http.StatusNotModified {
  4872. if res.Body != nil {
  4873. res.Body.Close()
  4874. }
  4875. return nil, &googleapi.Error{
  4876. Code: res.StatusCode,
  4877. Header: res.Header,
  4878. }
  4879. }
  4880. if err != nil {
  4881. return nil, err
  4882. }
  4883. defer googleapi.CloseBody(res)
  4884. if err := googleapi.CheckResponse(res); err != nil {
  4885. return nil, err
  4886. }
  4887. ret := &SearchAnnotationsResponse{
  4888. ServerResponse: googleapi.ServerResponse{
  4889. Header: res.Header,
  4890. HTTPStatusCode: res.StatusCode,
  4891. },
  4892. }
  4893. target := &ret
  4894. if err := gensupport.DecodeResponse(target, res); err != nil {
  4895. return nil, err
  4896. }
  4897. return ret, nil
  4898. // {
  4899. // "description": "Searches for annotations that match the given criteria. Results are\nordered by genomic coordinate (by reference sequence, then position).\nAnnotations with equivalent genomic coordinates are returned in an\nunspecified order. This order is consistent, such that two queries for the\nsame content (regardless of page size) yield annotations in the same order\nacross their respective streams of paginated responses. Caller must have\nREAD permission for the queried annotation sets.",
  4900. // "flatPath": "v1/annotations/search",
  4901. // "httpMethod": "POST",
  4902. // "id": "genomics.annotations.search",
  4903. // "parameterOrder": [],
  4904. // "parameters": {},
  4905. // "path": "v1/annotations/search",
  4906. // "request": {
  4907. // "$ref": "SearchAnnotationsRequest"
  4908. // },
  4909. // "response": {
  4910. // "$ref": "SearchAnnotationsResponse"
  4911. // },
  4912. // "scopes": [
  4913. // "https://www.googleapis.com/auth/cloud-platform",
  4914. // "https://www.googleapis.com/auth/genomics",
  4915. // "https://www.googleapis.com/auth/genomics.readonly"
  4916. // ]
  4917. // }
  4918. }
  4919. // Pages invokes f for each page of results.
  4920. // A non-nil error returned from f will halt the iteration.
  4921. // The provided context supersedes any context provided to the Context method.
  4922. func (c *AnnotationsSearchCall) Pages(ctx context.Context, f func(*SearchAnnotationsResponse) error) error {
  4923. c.ctx_ = ctx
  4924. defer func(pt string) { c.searchannotationsrequest.PageToken = pt }(c.searchannotationsrequest.PageToken) // reset paging to original point
  4925. for {
  4926. x, err := c.Do()
  4927. if err != nil {
  4928. return err
  4929. }
  4930. if err := f(x); err != nil {
  4931. return err
  4932. }
  4933. if x.NextPageToken == "" {
  4934. return nil
  4935. }
  4936. c.searchannotationsrequest.PageToken = x.NextPageToken
  4937. }
  4938. }
  4939. // method id "genomics.annotations.update":
  4940. type AnnotationsUpdateCall struct {
  4941. s *Service
  4942. annotationId string
  4943. annotation *Annotation
  4944. urlParams_ gensupport.URLParams
  4945. ctx_ context.Context
  4946. header_ http.Header
  4947. }
  4948. // Update: Updates an annotation. Caller must have
  4949. // WRITE permission for the associated dataset.
  4950. func (r *AnnotationsService) Update(annotationId string, annotation *Annotation) *AnnotationsUpdateCall {
  4951. c := &AnnotationsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  4952. c.annotationId = annotationId
  4953. c.annotation = annotation
  4954. return c
  4955. }
  4956. // UpdateMask sets the optional parameter "updateMask": An optional mask
  4957. // specifying which fields to update. Mutable fields
  4958. // are
  4959. // name,
  4960. // variant,
  4961. // transcript, and
  4962. // info. If unspecified, all mutable
  4963. // fields will be updated.
  4964. func (c *AnnotationsUpdateCall) UpdateMask(updateMask string) *AnnotationsUpdateCall {
  4965. c.urlParams_.Set("updateMask", updateMask)
  4966. return c
  4967. }
  4968. // Fields allows partial responses to be retrieved. See
  4969. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  4970. // for more information.
  4971. func (c *AnnotationsUpdateCall) Fields(s ...googleapi.Field) *AnnotationsUpdateCall {
  4972. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  4973. return c
  4974. }
  4975. // Context sets the context to be used in this call's Do method. Any
  4976. // pending HTTP request will be aborted if the provided context is
  4977. // canceled.
  4978. func (c *AnnotationsUpdateCall) Context(ctx context.Context) *AnnotationsUpdateCall {
  4979. c.ctx_ = ctx
  4980. return c
  4981. }
  4982. // Header returns an http.Header that can be modified by the caller to
  4983. // add HTTP headers to the request.
  4984. func (c *AnnotationsUpdateCall) Header() http.Header {
  4985. if c.header_ == nil {
  4986. c.header_ = make(http.Header)
  4987. }
  4988. return c.header_
  4989. }
  4990. func (c *AnnotationsUpdateCall) doRequest(alt string) (*http.Response, error) {
  4991. reqHeaders := make(http.Header)
  4992. for k, v := range c.header_ {
  4993. reqHeaders[k] = v
  4994. }
  4995. reqHeaders.Set("User-Agent", c.s.userAgent())
  4996. var body io.Reader = nil
  4997. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
  4998. if err != nil {
  4999. return nil, err
  5000. }
  5001. reqHeaders.Set("Content-Type", "application/json")
  5002. c.urlParams_.Set("alt", alt)
  5003. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotations/{annotationId}")
  5004. urls += "?" + c.urlParams_.Encode()
  5005. req, _ := http.NewRequest("PUT", urls, body)
  5006. req.Header = reqHeaders
  5007. googleapi.Expand(req.URL, map[string]string{
  5008. "annotationId": c.annotationId,
  5009. })
  5010. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5011. }
  5012. // Do executes the "genomics.annotations.update" call.
  5013. // Exactly one of *Annotation or error will be non-nil. Any non-2xx
  5014. // status code is an error. Response headers are in either
  5015. // *Annotation.ServerResponse.Header or (if a response was returned at
  5016. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  5017. // to check whether the returned error was because
  5018. // http.StatusNotModified was returned.
  5019. func (c *AnnotationsUpdateCall) Do(opts ...googleapi.CallOption) (*Annotation, error) {
  5020. gensupport.SetOptions(c.urlParams_, opts...)
  5021. res, err := c.doRequest("json")
  5022. if res != nil && res.StatusCode == http.StatusNotModified {
  5023. if res.Body != nil {
  5024. res.Body.Close()
  5025. }
  5026. return nil, &googleapi.Error{
  5027. Code: res.StatusCode,
  5028. Header: res.Header,
  5029. }
  5030. }
  5031. if err != nil {
  5032. return nil, err
  5033. }
  5034. defer googleapi.CloseBody(res)
  5035. if err := googleapi.CheckResponse(res); err != nil {
  5036. return nil, err
  5037. }
  5038. ret := &Annotation{
  5039. ServerResponse: googleapi.ServerResponse{
  5040. Header: res.Header,
  5041. HTTPStatusCode: res.StatusCode,
  5042. },
  5043. }
  5044. target := &ret
  5045. if err := gensupport.DecodeResponse(target, res); err != nil {
  5046. return nil, err
  5047. }
  5048. return ret, nil
  5049. // {
  5050. // "description": "Updates an annotation. Caller must have\nWRITE permission for the associated dataset.",
  5051. // "flatPath": "v1/annotations/{annotationId}",
  5052. // "httpMethod": "PUT",
  5053. // "id": "genomics.annotations.update",
  5054. // "parameterOrder": [
  5055. // "annotationId"
  5056. // ],
  5057. // "parameters": {
  5058. // "annotationId": {
  5059. // "description": "The ID of the annotation to be updated.",
  5060. // "location": "path",
  5061. // "required": true,
  5062. // "type": "string"
  5063. // },
  5064. // "updateMask": {
  5065. // "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nvariant,\ntranscript, and\ninfo. If unspecified, all mutable\nfields will be updated.",
  5066. // "format": "google-fieldmask",
  5067. // "location": "query",
  5068. // "type": "string"
  5069. // }
  5070. // },
  5071. // "path": "v1/annotations/{annotationId}",
  5072. // "request": {
  5073. // "$ref": "Annotation"
  5074. // },
  5075. // "response": {
  5076. // "$ref": "Annotation"
  5077. // },
  5078. // "scopes": [
  5079. // "https://www.googleapis.com/auth/cloud-platform",
  5080. // "https://www.googleapis.com/auth/genomics"
  5081. // ]
  5082. // }
  5083. }
  5084. // method id "genomics.annotationsets.create":
  5085. type AnnotationsetsCreateCall struct {
  5086. s *Service
  5087. annotationset *AnnotationSet
  5088. urlParams_ gensupport.URLParams
  5089. ctx_ context.Context
  5090. header_ http.Header
  5091. }
  5092. // Create: Creates a new annotation set. Caller must have WRITE
  5093. // permission for the
  5094. // associated dataset.
  5095. //
  5096. // The following fields are required:
  5097. //
  5098. // * datasetId
  5099. // * referenceSetId
  5100. //
  5101. // All other fields may be optionally specified, unless documented as
  5102. // being
  5103. // server-generated (for example, the `id` field).
  5104. func (r *AnnotationsetsService) Create(annotationset *AnnotationSet) *AnnotationsetsCreateCall {
  5105. c := &AnnotationsetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5106. c.annotationset = annotationset
  5107. return c
  5108. }
  5109. // Fields allows partial responses to be retrieved. See
  5110. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5111. // for more information.
  5112. func (c *AnnotationsetsCreateCall) Fields(s ...googleapi.Field) *AnnotationsetsCreateCall {
  5113. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5114. return c
  5115. }
  5116. // Context sets the context to be used in this call's Do method. Any
  5117. // pending HTTP request will be aborted if the provided context is
  5118. // canceled.
  5119. func (c *AnnotationsetsCreateCall) Context(ctx context.Context) *AnnotationsetsCreateCall {
  5120. c.ctx_ = ctx
  5121. return c
  5122. }
  5123. // Header returns an http.Header that can be modified by the caller to
  5124. // add HTTP headers to the request.
  5125. func (c *AnnotationsetsCreateCall) Header() http.Header {
  5126. if c.header_ == nil {
  5127. c.header_ = make(http.Header)
  5128. }
  5129. return c.header_
  5130. }
  5131. func (c *AnnotationsetsCreateCall) doRequest(alt string) (*http.Response, error) {
  5132. reqHeaders := make(http.Header)
  5133. for k, v := range c.header_ {
  5134. reqHeaders[k] = v
  5135. }
  5136. reqHeaders.Set("User-Agent", c.s.userAgent())
  5137. var body io.Reader = nil
  5138. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationset)
  5139. if err != nil {
  5140. return nil, err
  5141. }
  5142. reqHeaders.Set("Content-Type", "application/json")
  5143. c.urlParams_.Set("alt", alt)
  5144. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotationsets")
  5145. urls += "?" + c.urlParams_.Encode()
  5146. req, _ := http.NewRequest("POST", urls, body)
  5147. req.Header = reqHeaders
  5148. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5149. }
  5150. // Do executes the "genomics.annotationsets.create" call.
  5151. // Exactly one of *AnnotationSet or error will be non-nil. Any non-2xx
  5152. // status code is an error. Response headers are in either
  5153. // *AnnotationSet.ServerResponse.Header or (if a response was returned
  5154. // at all) in error.(*googleapi.Error).Header. Use
  5155. // googleapi.IsNotModified to check whether the returned error was
  5156. // because http.StatusNotModified was returned.
  5157. func (c *AnnotationsetsCreateCall) Do(opts ...googleapi.CallOption) (*AnnotationSet, error) {
  5158. gensupport.SetOptions(c.urlParams_, opts...)
  5159. res, err := c.doRequest("json")
  5160. if res != nil && res.StatusCode == http.StatusNotModified {
  5161. if res.Body != nil {
  5162. res.Body.Close()
  5163. }
  5164. return nil, &googleapi.Error{
  5165. Code: res.StatusCode,
  5166. Header: res.Header,
  5167. }
  5168. }
  5169. if err != nil {
  5170. return nil, err
  5171. }
  5172. defer googleapi.CloseBody(res)
  5173. if err := googleapi.CheckResponse(res); err != nil {
  5174. return nil, err
  5175. }
  5176. ret := &AnnotationSet{
  5177. ServerResponse: googleapi.ServerResponse{
  5178. Header: res.Header,
  5179. HTTPStatusCode: res.StatusCode,
  5180. },
  5181. }
  5182. target := &ret
  5183. if err := gensupport.DecodeResponse(target, res); err != nil {
  5184. return nil, err
  5185. }
  5186. return ret, nil
  5187. // {
  5188. // "description": "Creates a new annotation set. Caller must have WRITE permission for the\nassociated dataset.\n\nThe following fields are required:\n\n * datasetId\n * referenceSetId\n\nAll other fields may be optionally specified, unless documented as being\nserver-generated (for example, the `id` field).",
  5189. // "flatPath": "v1/annotationsets",
  5190. // "httpMethod": "POST",
  5191. // "id": "genomics.annotationsets.create",
  5192. // "parameterOrder": [],
  5193. // "parameters": {},
  5194. // "path": "v1/annotationsets",
  5195. // "request": {
  5196. // "$ref": "AnnotationSet"
  5197. // },
  5198. // "response": {
  5199. // "$ref": "AnnotationSet"
  5200. // },
  5201. // "scopes": [
  5202. // "https://www.googleapis.com/auth/cloud-platform",
  5203. // "https://www.googleapis.com/auth/genomics"
  5204. // ]
  5205. // }
  5206. }
  5207. // method id "genomics.annotationsets.delete":
  5208. type AnnotationsetsDeleteCall struct {
  5209. s *Service
  5210. annotationSetId string
  5211. urlParams_ gensupport.URLParams
  5212. ctx_ context.Context
  5213. header_ http.Header
  5214. }
  5215. // Delete: Deletes an annotation set. Caller must have WRITE
  5216. // permission
  5217. // for the associated annotation set.
  5218. func (r *AnnotationsetsService) Delete(annotationSetId string) *AnnotationsetsDeleteCall {
  5219. c := &AnnotationsetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5220. c.annotationSetId = annotationSetId
  5221. return c
  5222. }
  5223. // Fields allows partial responses to be retrieved. See
  5224. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5225. // for more information.
  5226. func (c *AnnotationsetsDeleteCall) Fields(s ...googleapi.Field) *AnnotationsetsDeleteCall {
  5227. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5228. return c
  5229. }
  5230. // Context sets the context to be used in this call's Do method. Any
  5231. // pending HTTP request will be aborted if the provided context is
  5232. // canceled.
  5233. func (c *AnnotationsetsDeleteCall) Context(ctx context.Context) *AnnotationsetsDeleteCall {
  5234. c.ctx_ = ctx
  5235. return c
  5236. }
  5237. // Header returns an http.Header that can be modified by the caller to
  5238. // add HTTP headers to the request.
  5239. func (c *AnnotationsetsDeleteCall) Header() http.Header {
  5240. if c.header_ == nil {
  5241. c.header_ = make(http.Header)
  5242. }
  5243. return c.header_
  5244. }
  5245. func (c *AnnotationsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5246. reqHeaders := make(http.Header)
  5247. for k, v := range c.header_ {
  5248. reqHeaders[k] = v
  5249. }
  5250. reqHeaders.Set("User-Agent", c.s.userAgent())
  5251. var body io.Reader = nil
  5252. c.urlParams_.Set("alt", alt)
  5253. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotationsets/{annotationSetId}")
  5254. urls += "?" + c.urlParams_.Encode()
  5255. req, _ := http.NewRequest("DELETE", urls, body)
  5256. req.Header = reqHeaders
  5257. googleapi.Expand(req.URL, map[string]string{
  5258. "annotationSetId": c.annotationSetId,
  5259. })
  5260. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5261. }
  5262. // Do executes the "genomics.annotationsets.delete" call.
  5263. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5264. // code is an error. Response headers are in either
  5265. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5266. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5267. // check whether the returned error was because http.StatusNotModified
  5268. // was returned.
  5269. func (c *AnnotationsetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5270. gensupport.SetOptions(c.urlParams_, opts...)
  5271. res, err := c.doRequest("json")
  5272. if res != nil && res.StatusCode == http.StatusNotModified {
  5273. if res.Body != nil {
  5274. res.Body.Close()
  5275. }
  5276. return nil, &googleapi.Error{
  5277. Code: res.StatusCode,
  5278. Header: res.Header,
  5279. }
  5280. }
  5281. if err != nil {
  5282. return nil, err
  5283. }
  5284. defer googleapi.CloseBody(res)
  5285. if err := googleapi.CheckResponse(res); err != nil {
  5286. return nil, err
  5287. }
  5288. ret := &Empty{
  5289. ServerResponse: googleapi.ServerResponse{
  5290. Header: res.Header,
  5291. HTTPStatusCode: res.StatusCode,
  5292. },
  5293. }
  5294. target := &ret
  5295. if err := gensupport.DecodeResponse(target, res); err != nil {
  5296. return nil, err
  5297. }
  5298. return ret, nil
  5299. // {
  5300. // "description": "Deletes an annotation set. Caller must have WRITE permission\nfor the associated annotation set.",
  5301. // "flatPath": "v1/annotationsets/{annotationSetId}",
  5302. // "httpMethod": "DELETE",
  5303. // "id": "genomics.annotationsets.delete",
  5304. // "parameterOrder": [
  5305. // "annotationSetId"
  5306. // ],
  5307. // "parameters": {
  5308. // "annotationSetId": {
  5309. // "description": "The ID of the annotation set to be deleted.",
  5310. // "location": "path",
  5311. // "required": true,
  5312. // "type": "string"
  5313. // }
  5314. // },
  5315. // "path": "v1/annotationsets/{annotationSetId}",
  5316. // "response": {
  5317. // "$ref": "Empty"
  5318. // },
  5319. // "scopes": [
  5320. // "https://www.googleapis.com/auth/cloud-platform",
  5321. // "https://www.googleapis.com/auth/genomics"
  5322. // ]
  5323. // }
  5324. }
  5325. // method id "genomics.annotationsets.get":
  5326. type AnnotationsetsGetCall struct {
  5327. s *Service
  5328. annotationSetId string
  5329. urlParams_ gensupport.URLParams
  5330. ifNoneMatch_ string
  5331. ctx_ context.Context
  5332. header_ http.Header
  5333. }
  5334. // Get: Gets an annotation set. Caller must have READ permission for
  5335. // the associated dataset.
  5336. func (r *AnnotationsetsService) Get(annotationSetId string) *AnnotationsetsGetCall {
  5337. c := &AnnotationsetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5338. c.annotationSetId = annotationSetId
  5339. return c
  5340. }
  5341. // Fields allows partial responses to be retrieved. See
  5342. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5343. // for more information.
  5344. func (c *AnnotationsetsGetCall) Fields(s ...googleapi.Field) *AnnotationsetsGetCall {
  5345. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5346. return c
  5347. }
  5348. // IfNoneMatch sets the optional parameter which makes the operation
  5349. // fail if the object's ETag matches the given value. This is useful for
  5350. // getting updates only after the object has changed since the last
  5351. // request. Use googleapi.IsNotModified to check whether the response
  5352. // error from Do is the result of In-None-Match.
  5353. func (c *AnnotationsetsGetCall) IfNoneMatch(entityTag string) *AnnotationsetsGetCall {
  5354. c.ifNoneMatch_ = entityTag
  5355. return c
  5356. }
  5357. // Context sets the context to be used in this call's Do method. Any
  5358. // pending HTTP request will be aborted if the provided context is
  5359. // canceled.
  5360. func (c *AnnotationsetsGetCall) Context(ctx context.Context) *AnnotationsetsGetCall {
  5361. c.ctx_ = ctx
  5362. return c
  5363. }
  5364. // Header returns an http.Header that can be modified by the caller to
  5365. // add HTTP headers to the request.
  5366. func (c *AnnotationsetsGetCall) Header() http.Header {
  5367. if c.header_ == nil {
  5368. c.header_ = make(http.Header)
  5369. }
  5370. return c.header_
  5371. }
  5372. func (c *AnnotationsetsGetCall) doRequest(alt string) (*http.Response, error) {
  5373. reqHeaders := make(http.Header)
  5374. for k, v := range c.header_ {
  5375. reqHeaders[k] = v
  5376. }
  5377. reqHeaders.Set("User-Agent", c.s.userAgent())
  5378. if c.ifNoneMatch_ != "" {
  5379. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  5380. }
  5381. var body io.Reader = nil
  5382. c.urlParams_.Set("alt", alt)
  5383. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotationsets/{annotationSetId}")
  5384. urls += "?" + c.urlParams_.Encode()
  5385. req, _ := http.NewRequest("GET", urls, body)
  5386. req.Header = reqHeaders
  5387. googleapi.Expand(req.URL, map[string]string{
  5388. "annotationSetId": c.annotationSetId,
  5389. })
  5390. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5391. }
  5392. // Do executes the "genomics.annotationsets.get" call.
  5393. // Exactly one of *AnnotationSet or error will be non-nil. Any non-2xx
  5394. // status code is an error. Response headers are in either
  5395. // *AnnotationSet.ServerResponse.Header or (if a response was returned
  5396. // at all) in error.(*googleapi.Error).Header. Use
  5397. // googleapi.IsNotModified to check whether the returned error was
  5398. // because http.StatusNotModified was returned.
  5399. func (c *AnnotationsetsGetCall) Do(opts ...googleapi.CallOption) (*AnnotationSet, error) {
  5400. gensupport.SetOptions(c.urlParams_, opts...)
  5401. res, err := c.doRequest("json")
  5402. if res != nil && res.StatusCode == http.StatusNotModified {
  5403. if res.Body != nil {
  5404. res.Body.Close()
  5405. }
  5406. return nil, &googleapi.Error{
  5407. Code: res.StatusCode,
  5408. Header: res.Header,
  5409. }
  5410. }
  5411. if err != nil {
  5412. return nil, err
  5413. }
  5414. defer googleapi.CloseBody(res)
  5415. if err := googleapi.CheckResponse(res); err != nil {
  5416. return nil, err
  5417. }
  5418. ret := &AnnotationSet{
  5419. ServerResponse: googleapi.ServerResponse{
  5420. Header: res.Header,
  5421. HTTPStatusCode: res.StatusCode,
  5422. },
  5423. }
  5424. target := &ret
  5425. if err := gensupport.DecodeResponse(target, res); err != nil {
  5426. return nil, err
  5427. }
  5428. return ret, nil
  5429. // {
  5430. // "description": "Gets an annotation set. Caller must have READ permission for\nthe associated dataset.",
  5431. // "flatPath": "v1/annotationsets/{annotationSetId}",
  5432. // "httpMethod": "GET",
  5433. // "id": "genomics.annotationsets.get",
  5434. // "parameterOrder": [
  5435. // "annotationSetId"
  5436. // ],
  5437. // "parameters": {
  5438. // "annotationSetId": {
  5439. // "description": "The ID of the annotation set to be retrieved.",
  5440. // "location": "path",
  5441. // "required": true,
  5442. // "type": "string"
  5443. // }
  5444. // },
  5445. // "path": "v1/annotationsets/{annotationSetId}",
  5446. // "response": {
  5447. // "$ref": "AnnotationSet"
  5448. // },
  5449. // "scopes": [
  5450. // "https://www.googleapis.com/auth/cloud-platform",
  5451. // "https://www.googleapis.com/auth/genomics",
  5452. // "https://www.googleapis.com/auth/genomics.readonly"
  5453. // ]
  5454. // }
  5455. }
  5456. // method id "genomics.annotationsets.search":
  5457. type AnnotationsetsSearchCall struct {
  5458. s *Service
  5459. searchannotationsetsrequest *SearchAnnotationSetsRequest
  5460. urlParams_ gensupport.URLParams
  5461. ctx_ context.Context
  5462. header_ http.Header
  5463. }
  5464. // Search: Searches for annotation sets that match the given criteria.
  5465. // Annotation sets
  5466. // are returned in an unspecified order. This order is consistent, such
  5467. // that
  5468. // two queries for the same content (regardless of page size) yield
  5469. // annotation
  5470. // sets in the same order across their respective streams of
  5471. // paginated
  5472. // responses. Caller must have READ permission for the queried datasets.
  5473. func (r *AnnotationsetsService) Search(searchannotationsetsrequest *SearchAnnotationSetsRequest) *AnnotationsetsSearchCall {
  5474. c := &AnnotationsetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5475. c.searchannotationsetsrequest = searchannotationsetsrequest
  5476. return c
  5477. }
  5478. // Fields allows partial responses to be retrieved. See
  5479. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5480. // for more information.
  5481. func (c *AnnotationsetsSearchCall) Fields(s ...googleapi.Field) *AnnotationsetsSearchCall {
  5482. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5483. return c
  5484. }
  5485. // Context sets the context to be used in this call's Do method. Any
  5486. // pending HTTP request will be aborted if the provided context is
  5487. // canceled.
  5488. func (c *AnnotationsetsSearchCall) Context(ctx context.Context) *AnnotationsetsSearchCall {
  5489. c.ctx_ = ctx
  5490. return c
  5491. }
  5492. // Header returns an http.Header that can be modified by the caller to
  5493. // add HTTP headers to the request.
  5494. func (c *AnnotationsetsSearchCall) Header() http.Header {
  5495. if c.header_ == nil {
  5496. c.header_ = make(http.Header)
  5497. }
  5498. return c.header_
  5499. }
  5500. func (c *AnnotationsetsSearchCall) doRequest(alt string) (*http.Response, error) {
  5501. reqHeaders := make(http.Header)
  5502. for k, v := range c.header_ {
  5503. reqHeaders[k] = v
  5504. }
  5505. reqHeaders.Set("User-Agent", c.s.userAgent())
  5506. var body io.Reader = nil
  5507. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchannotationsetsrequest)
  5508. if err != nil {
  5509. return nil, err
  5510. }
  5511. reqHeaders.Set("Content-Type", "application/json")
  5512. c.urlParams_.Set("alt", alt)
  5513. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotationsets/search")
  5514. urls += "?" + c.urlParams_.Encode()
  5515. req, _ := http.NewRequest("POST", urls, body)
  5516. req.Header = reqHeaders
  5517. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5518. }
  5519. // Do executes the "genomics.annotationsets.search" call.
  5520. // Exactly one of *SearchAnnotationSetsResponse or error will be
  5521. // non-nil. Any non-2xx status code is an error. Response headers are in
  5522. // either *SearchAnnotationSetsResponse.ServerResponse.Header or (if a
  5523. // response was returned at all) in error.(*googleapi.Error).Header. Use
  5524. // googleapi.IsNotModified to check whether the returned error was
  5525. // because http.StatusNotModified was returned.
  5526. func (c *AnnotationsetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchAnnotationSetsResponse, error) {
  5527. gensupport.SetOptions(c.urlParams_, opts...)
  5528. res, err := c.doRequest("json")
  5529. if res != nil && res.StatusCode == http.StatusNotModified {
  5530. if res.Body != nil {
  5531. res.Body.Close()
  5532. }
  5533. return nil, &googleapi.Error{
  5534. Code: res.StatusCode,
  5535. Header: res.Header,
  5536. }
  5537. }
  5538. if err != nil {
  5539. return nil, err
  5540. }
  5541. defer googleapi.CloseBody(res)
  5542. if err := googleapi.CheckResponse(res); err != nil {
  5543. return nil, err
  5544. }
  5545. ret := &SearchAnnotationSetsResponse{
  5546. ServerResponse: googleapi.ServerResponse{
  5547. Header: res.Header,
  5548. HTTPStatusCode: res.StatusCode,
  5549. },
  5550. }
  5551. target := &ret
  5552. if err := gensupport.DecodeResponse(target, res); err != nil {
  5553. return nil, err
  5554. }
  5555. return ret, nil
  5556. // {
  5557. // "description": "Searches for annotation sets that match the given criteria. Annotation sets\nare returned in an unspecified order. This order is consistent, such that\ntwo queries for the same content (regardless of page size) yield annotation\nsets in the same order across their respective streams of paginated\nresponses. Caller must have READ permission for the queried datasets.",
  5558. // "flatPath": "v1/annotationsets/search",
  5559. // "httpMethod": "POST",
  5560. // "id": "genomics.annotationsets.search",
  5561. // "parameterOrder": [],
  5562. // "parameters": {},
  5563. // "path": "v1/annotationsets/search",
  5564. // "request": {
  5565. // "$ref": "SearchAnnotationSetsRequest"
  5566. // },
  5567. // "response": {
  5568. // "$ref": "SearchAnnotationSetsResponse"
  5569. // },
  5570. // "scopes": [
  5571. // "https://www.googleapis.com/auth/cloud-platform",
  5572. // "https://www.googleapis.com/auth/genomics",
  5573. // "https://www.googleapis.com/auth/genomics.readonly"
  5574. // ]
  5575. // }
  5576. }
  5577. // Pages invokes f for each page of results.
  5578. // A non-nil error returned from f will halt the iteration.
  5579. // The provided context supersedes any context provided to the Context method.
  5580. func (c *AnnotationsetsSearchCall) Pages(ctx context.Context, f func(*SearchAnnotationSetsResponse) error) error {
  5581. c.ctx_ = ctx
  5582. defer func(pt string) { c.searchannotationsetsrequest.PageToken = pt }(c.searchannotationsetsrequest.PageToken) // reset paging to original point
  5583. for {
  5584. x, err := c.Do()
  5585. if err != nil {
  5586. return err
  5587. }
  5588. if err := f(x); err != nil {
  5589. return err
  5590. }
  5591. if x.NextPageToken == "" {
  5592. return nil
  5593. }
  5594. c.searchannotationsetsrequest.PageToken = x.NextPageToken
  5595. }
  5596. }
  5597. // method id "genomics.annotationsets.update":
  5598. type AnnotationsetsUpdateCall struct {
  5599. s *Service
  5600. annotationSetId string
  5601. annotationset *AnnotationSet
  5602. urlParams_ gensupport.URLParams
  5603. ctx_ context.Context
  5604. header_ http.Header
  5605. }
  5606. // Update: Updates an annotation set. The update must respect all
  5607. // mutability
  5608. // restrictions and other invariants described on the annotation set
  5609. // resource.
  5610. // Caller must have WRITE permission for the associated dataset.
  5611. func (r *AnnotationsetsService) Update(annotationSetId string, annotationset *AnnotationSet) *AnnotationsetsUpdateCall {
  5612. c := &AnnotationsetsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5613. c.annotationSetId = annotationSetId
  5614. c.annotationset = annotationset
  5615. return c
  5616. }
  5617. // UpdateMask sets the optional parameter "updateMask": An optional mask
  5618. // specifying which fields to update. Mutable fields
  5619. // are
  5620. // name,
  5621. // source_uri, and
  5622. // info. If unspecified, all
  5623. // mutable fields will be updated.
  5624. func (c *AnnotationsetsUpdateCall) UpdateMask(updateMask string) *AnnotationsetsUpdateCall {
  5625. c.urlParams_.Set("updateMask", updateMask)
  5626. return c
  5627. }
  5628. // Fields allows partial responses to be retrieved. See
  5629. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5630. // for more information.
  5631. func (c *AnnotationsetsUpdateCall) Fields(s ...googleapi.Field) *AnnotationsetsUpdateCall {
  5632. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5633. return c
  5634. }
  5635. // Context sets the context to be used in this call's Do method. Any
  5636. // pending HTTP request will be aborted if the provided context is
  5637. // canceled.
  5638. func (c *AnnotationsetsUpdateCall) Context(ctx context.Context) *AnnotationsetsUpdateCall {
  5639. c.ctx_ = ctx
  5640. return c
  5641. }
  5642. // Header returns an http.Header that can be modified by the caller to
  5643. // add HTTP headers to the request.
  5644. func (c *AnnotationsetsUpdateCall) Header() http.Header {
  5645. if c.header_ == nil {
  5646. c.header_ = make(http.Header)
  5647. }
  5648. return c.header_
  5649. }
  5650. func (c *AnnotationsetsUpdateCall) doRequest(alt string) (*http.Response, error) {
  5651. reqHeaders := make(http.Header)
  5652. for k, v := range c.header_ {
  5653. reqHeaders[k] = v
  5654. }
  5655. reqHeaders.Set("User-Agent", c.s.userAgent())
  5656. var body io.Reader = nil
  5657. body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotationset)
  5658. if err != nil {
  5659. return nil, err
  5660. }
  5661. reqHeaders.Set("Content-Type", "application/json")
  5662. c.urlParams_.Set("alt", alt)
  5663. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/annotationsets/{annotationSetId}")
  5664. urls += "?" + c.urlParams_.Encode()
  5665. req, _ := http.NewRequest("PUT", urls, body)
  5666. req.Header = reqHeaders
  5667. googleapi.Expand(req.URL, map[string]string{
  5668. "annotationSetId": c.annotationSetId,
  5669. })
  5670. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5671. }
  5672. // Do executes the "genomics.annotationsets.update" call.
  5673. // Exactly one of *AnnotationSet or error will be non-nil. Any non-2xx
  5674. // status code is an error. Response headers are in either
  5675. // *AnnotationSet.ServerResponse.Header or (if a response was returned
  5676. // at all) in error.(*googleapi.Error).Header. Use
  5677. // googleapi.IsNotModified to check whether the returned error was
  5678. // because http.StatusNotModified was returned.
  5679. func (c *AnnotationsetsUpdateCall) Do(opts ...googleapi.CallOption) (*AnnotationSet, error) {
  5680. gensupport.SetOptions(c.urlParams_, opts...)
  5681. res, err := c.doRequest("json")
  5682. if res != nil && res.StatusCode == http.StatusNotModified {
  5683. if res.Body != nil {
  5684. res.Body.Close()
  5685. }
  5686. return nil, &googleapi.Error{
  5687. Code: res.StatusCode,
  5688. Header: res.Header,
  5689. }
  5690. }
  5691. if err != nil {
  5692. return nil, err
  5693. }
  5694. defer googleapi.CloseBody(res)
  5695. if err := googleapi.CheckResponse(res); err != nil {
  5696. return nil, err
  5697. }
  5698. ret := &AnnotationSet{
  5699. ServerResponse: googleapi.ServerResponse{
  5700. Header: res.Header,
  5701. HTTPStatusCode: res.StatusCode,
  5702. },
  5703. }
  5704. target := &ret
  5705. if err := gensupport.DecodeResponse(target, res); err != nil {
  5706. return nil, err
  5707. }
  5708. return ret, nil
  5709. // {
  5710. // "description": "Updates an annotation set. The update must respect all mutability\nrestrictions and other invariants described on the annotation set resource.\nCaller must have WRITE permission for the associated dataset.",
  5711. // "flatPath": "v1/annotationsets/{annotationSetId}",
  5712. // "httpMethod": "PUT",
  5713. // "id": "genomics.annotationsets.update",
  5714. // "parameterOrder": [
  5715. // "annotationSetId"
  5716. // ],
  5717. // "parameters": {
  5718. // "annotationSetId": {
  5719. // "description": "The ID of the annotation set to be updated.",
  5720. // "location": "path",
  5721. // "required": true,
  5722. // "type": "string"
  5723. // },
  5724. // "updateMask": {
  5725. // "description": "An optional mask specifying which fields to update. Mutable fields are\nname,\nsource_uri, and\ninfo. If unspecified, all\nmutable fields will be updated.",
  5726. // "format": "google-fieldmask",
  5727. // "location": "query",
  5728. // "type": "string"
  5729. // }
  5730. // },
  5731. // "path": "v1/annotationsets/{annotationSetId}",
  5732. // "request": {
  5733. // "$ref": "AnnotationSet"
  5734. // },
  5735. // "response": {
  5736. // "$ref": "AnnotationSet"
  5737. // },
  5738. // "scopes": [
  5739. // "https://www.googleapis.com/auth/cloud-platform",
  5740. // "https://www.googleapis.com/auth/genomics"
  5741. // ]
  5742. // }
  5743. }
  5744. // method id "genomics.callsets.create":
  5745. type CallsetsCreateCall struct {
  5746. s *Service
  5747. callset *CallSet
  5748. urlParams_ gensupport.URLParams
  5749. ctx_ context.Context
  5750. header_ http.Header
  5751. }
  5752. // Create: Creates a new call set.
  5753. func (r *CallsetsService) Create(callset *CallSet) *CallsetsCreateCall {
  5754. c := &CallsetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5755. c.callset = callset
  5756. return c
  5757. }
  5758. // Fields allows partial responses to be retrieved. See
  5759. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5760. // for more information.
  5761. func (c *CallsetsCreateCall) Fields(s ...googleapi.Field) *CallsetsCreateCall {
  5762. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5763. return c
  5764. }
  5765. // Context sets the context to be used in this call's Do method. Any
  5766. // pending HTTP request will be aborted if the provided context is
  5767. // canceled.
  5768. func (c *CallsetsCreateCall) Context(ctx context.Context) *CallsetsCreateCall {
  5769. c.ctx_ = ctx
  5770. return c
  5771. }
  5772. // Header returns an http.Header that can be modified by the caller to
  5773. // add HTTP headers to the request.
  5774. func (c *CallsetsCreateCall) Header() http.Header {
  5775. if c.header_ == nil {
  5776. c.header_ = make(http.Header)
  5777. }
  5778. return c.header_
  5779. }
  5780. func (c *CallsetsCreateCall) doRequest(alt string) (*http.Response, error) {
  5781. reqHeaders := make(http.Header)
  5782. for k, v := range c.header_ {
  5783. reqHeaders[k] = v
  5784. }
  5785. reqHeaders.Set("User-Agent", c.s.userAgent())
  5786. var body io.Reader = nil
  5787. body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
  5788. if err != nil {
  5789. return nil, err
  5790. }
  5791. reqHeaders.Set("Content-Type", "application/json")
  5792. c.urlParams_.Set("alt", alt)
  5793. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets")
  5794. urls += "?" + c.urlParams_.Encode()
  5795. req, _ := http.NewRequest("POST", urls, body)
  5796. req.Header = reqHeaders
  5797. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5798. }
  5799. // Do executes the "genomics.callsets.create" call.
  5800. // Exactly one of *CallSet or error will be non-nil. Any non-2xx status
  5801. // code is an error. Response headers are in either
  5802. // *CallSet.ServerResponse.Header or (if a response was returned at all)
  5803. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5804. // check whether the returned error was because http.StatusNotModified
  5805. // was returned.
  5806. func (c *CallsetsCreateCall) Do(opts ...googleapi.CallOption) (*CallSet, error) {
  5807. gensupport.SetOptions(c.urlParams_, opts...)
  5808. res, err := c.doRequest("json")
  5809. if res != nil && res.StatusCode == http.StatusNotModified {
  5810. if res.Body != nil {
  5811. res.Body.Close()
  5812. }
  5813. return nil, &googleapi.Error{
  5814. Code: res.StatusCode,
  5815. Header: res.Header,
  5816. }
  5817. }
  5818. if err != nil {
  5819. return nil, err
  5820. }
  5821. defer googleapi.CloseBody(res)
  5822. if err := googleapi.CheckResponse(res); err != nil {
  5823. return nil, err
  5824. }
  5825. ret := &CallSet{
  5826. ServerResponse: googleapi.ServerResponse{
  5827. Header: res.Header,
  5828. HTTPStatusCode: res.StatusCode,
  5829. },
  5830. }
  5831. target := &ret
  5832. if err := gensupport.DecodeResponse(target, res); err != nil {
  5833. return nil, err
  5834. }
  5835. return ret, nil
  5836. // {
  5837. // "description": "Creates a new call set.",
  5838. // "flatPath": "v1/callsets",
  5839. // "httpMethod": "POST",
  5840. // "id": "genomics.callsets.create",
  5841. // "parameterOrder": [],
  5842. // "parameters": {},
  5843. // "path": "v1/callsets",
  5844. // "request": {
  5845. // "$ref": "CallSet"
  5846. // },
  5847. // "response": {
  5848. // "$ref": "CallSet"
  5849. // },
  5850. // "scopes": [
  5851. // "https://www.googleapis.com/auth/cloud-platform",
  5852. // "https://www.googleapis.com/auth/genomics"
  5853. // ]
  5854. // }
  5855. }
  5856. // method id "genomics.callsets.delete":
  5857. type CallsetsDeleteCall struct {
  5858. s *Service
  5859. callSetId string
  5860. urlParams_ gensupport.URLParams
  5861. ctx_ context.Context
  5862. header_ http.Header
  5863. }
  5864. // Delete: Deletes a call set.
  5865. func (r *CallsetsService) Delete(callSetId string) *CallsetsDeleteCall {
  5866. c := &CallsetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5867. c.callSetId = callSetId
  5868. return c
  5869. }
  5870. // Fields allows partial responses to be retrieved. See
  5871. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5872. // for more information.
  5873. func (c *CallsetsDeleteCall) Fields(s ...googleapi.Field) *CallsetsDeleteCall {
  5874. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5875. return c
  5876. }
  5877. // Context sets the context to be used in this call's Do method. Any
  5878. // pending HTTP request will be aborted if the provided context is
  5879. // canceled.
  5880. func (c *CallsetsDeleteCall) Context(ctx context.Context) *CallsetsDeleteCall {
  5881. c.ctx_ = ctx
  5882. return c
  5883. }
  5884. // Header returns an http.Header that can be modified by the caller to
  5885. // add HTTP headers to the request.
  5886. func (c *CallsetsDeleteCall) Header() http.Header {
  5887. if c.header_ == nil {
  5888. c.header_ = make(http.Header)
  5889. }
  5890. return c.header_
  5891. }
  5892. func (c *CallsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  5893. reqHeaders := make(http.Header)
  5894. for k, v := range c.header_ {
  5895. reqHeaders[k] = v
  5896. }
  5897. reqHeaders.Set("User-Agent", c.s.userAgent())
  5898. var body io.Reader = nil
  5899. c.urlParams_.Set("alt", alt)
  5900. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/{callSetId}")
  5901. urls += "?" + c.urlParams_.Encode()
  5902. req, _ := http.NewRequest("DELETE", urls, body)
  5903. req.Header = reqHeaders
  5904. googleapi.Expand(req.URL, map[string]string{
  5905. "callSetId": c.callSetId,
  5906. })
  5907. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  5908. }
  5909. // Do executes the "genomics.callsets.delete" call.
  5910. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  5911. // code is an error. Response headers are in either
  5912. // *Empty.ServerResponse.Header or (if a response was returned at all)
  5913. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  5914. // check whether the returned error was because http.StatusNotModified
  5915. // was returned.
  5916. func (c *CallsetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  5917. gensupport.SetOptions(c.urlParams_, opts...)
  5918. res, err := c.doRequest("json")
  5919. if res != nil && res.StatusCode == http.StatusNotModified {
  5920. if res.Body != nil {
  5921. res.Body.Close()
  5922. }
  5923. return nil, &googleapi.Error{
  5924. Code: res.StatusCode,
  5925. Header: res.Header,
  5926. }
  5927. }
  5928. if err != nil {
  5929. return nil, err
  5930. }
  5931. defer googleapi.CloseBody(res)
  5932. if err := googleapi.CheckResponse(res); err != nil {
  5933. return nil, err
  5934. }
  5935. ret := &Empty{
  5936. ServerResponse: googleapi.ServerResponse{
  5937. Header: res.Header,
  5938. HTTPStatusCode: res.StatusCode,
  5939. },
  5940. }
  5941. target := &ret
  5942. if err := gensupport.DecodeResponse(target, res); err != nil {
  5943. return nil, err
  5944. }
  5945. return ret, nil
  5946. // {
  5947. // "description": "Deletes a call set.",
  5948. // "flatPath": "v1/callsets/{callSetId}",
  5949. // "httpMethod": "DELETE",
  5950. // "id": "genomics.callsets.delete",
  5951. // "parameterOrder": [
  5952. // "callSetId"
  5953. // ],
  5954. // "parameters": {
  5955. // "callSetId": {
  5956. // "description": "The ID of the call set to be deleted.",
  5957. // "location": "path",
  5958. // "required": true,
  5959. // "type": "string"
  5960. // }
  5961. // },
  5962. // "path": "v1/callsets/{callSetId}",
  5963. // "response": {
  5964. // "$ref": "Empty"
  5965. // },
  5966. // "scopes": [
  5967. // "https://www.googleapis.com/auth/cloud-platform",
  5968. // "https://www.googleapis.com/auth/genomics"
  5969. // ]
  5970. // }
  5971. }
  5972. // method id "genomics.callsets.get":
  5973. type CallsetsGetCall struct {
  5974. s *Service
  5975. callSetId string
  5976. urlParams_ gensupport.URLParams
  5977. ifNoneMatch_ string
  5978. ctx_ context.Context
  5979. header_ http.Header
  5980. }
  5981. // Get: Gets a call set by ID.
  5982. func (r *CallsetsService) Get(callSetId string) *CallsetsGetCall {
  5983. c := &CallsetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  5984. c.callSetId = callSetId
  5985. return c
  5986. }
  5987. // Fields allows partial responses to be retrieved. See
  5988. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  5989. // for more information.
  5990. func (c *CallsetsGetCall) Fields(s ...googleapi.Field) *CallsetsGetCall {
  5991. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  5992. return c
  5993. }
  5994. // IfNoneMatch sets the optional parameter which makes the operation
  5995. // fail if the object's ETag matches the given value. This is useful for
  5996. // getting updates only after the object has changed since the last
  5997. // request. Use googleapi.IsNotModified to check whether the response
  5998. // error from Do is the result of In-None-Match.
  5999. func (c *CallsetsGetCall) IfNoneMatch(entityTag string) *CallsetsGetCall {
  6000. c.ifNoneMatch_ = entityTag
  6001. return c
  6002. }
  6003. // Context sets the context to be used in this call's Do method. Any
  6004. // pending HTTP request will be aborted if the provided context is
  6005. // canceled.
  6006. func (c *CallsetsGetCall) Context(ctx context.Context) *CallsetsGetCall {
  6007. c.ctx_ = ctx
  6008. return c
  6009. }
  6010. // Header returns an http.Header that can be modified by the caller to
  6011. // add HTTP headers to the request.
  6012. func (c *CallsetsGetCall) Header() http.Header {
  6013. if c.header_ == nil {
  6014. c.header_ = make(http.Header)
  6015. }
  6016. return c.header_
  6017. }
  6018. func (c *CallsetsGetCall) doRequest(alt string) (*http.Response, error) {
  6019. reqHeaders := make(http.Header)
  6020. for k, v := range c.header_ {
  6021. reqHeaders[k] = v
  6022. }
  6023. reqHeaders.Set("User-Agent", c.s.userAgent())
  6024. if c.ifNoneMatch_ != "" {
  6025. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6026. }
  6027. var body io.Reader = nil
  6028. c.urlParams_.Set("alt", alt)
  6029. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/{callSetId}")
  6030. urls += "?" + c.urlParams_.Encode()
  6031. req, _ := http.NewRequest("GET", urls, body)
  6032. req.Header = reqHeaders
  6033. googleapi.Expand(req.URL, map[string]string{
  6034. "callSetId": c.callSetId,
  6035. })
  6036. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6037. }
  6038. // Do executes the "genomics.callsets.get" call.
  6039. // Exactly one of *CallSet or error will be non-nil. Any non-2xx status
  6040. // code is an error. Response headers are in either
  6041. // *CallSet.ServerResponse.Header or (if a response was returned at all)
  6042. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6043. // check whether the returned error was because http.StatusNotModified
  6044. // was returned.
  6045. func (c *CallsetsGetCall) Do(opts ...googleapi.CallOption) (*CallSet, error) {
  6046. gensupport.SetOptions(c.urlParams_, opts...)
  6047. res, err := c.doRequest("json")
  6048. if res != nil && res.StatusCode == http.StatusNotModified {
  6049. if res.Body != nil {
  6050. res.Body.Close()
  6051. }
  6052. return nil, &googleapi.Error{
  6053. Code: res.StatusCode,
  6054. Header: res.Header,
  6055. }
  6056. }
  6057. if err != nil {
  6058. return nil, err
  6059. }
  6060. defer googleapi.CloseBody(res)
  6061. if err := googleapi.CheckResponse(res); err != nil {
  6062. return nil, err
  6063. }
  6064. ret := &CallSet{
  6065. ServerResponse: googleapi.ServerResponse{
  6066. Header: res.Header,
  6067. HTTPStatusCode: res.StatusCode,
  6068. },
  6069. }
  6070. target := &ret
  6071. if err := gensupport.DecodeResponse(target, res); err != nil {
  6072. return nil, err
  6073. }
  6074. return ret, nil
  6075. // {
  6076. // "description": "Gets a call set by ID.",
  6077. // "flatPath": "v1/callsets/{callSetId}",
  6078. // "httpMethod": "GET",
  6079. // "id": "genomics.callsets.get",
  6080. // "parameterOrder": [
  6081. // "callSetId"
  6082. // ],
  6083. // "parameters": {
  6084. // "callSetId": {
  6085. // "description": "The ID of the call set.",
  6086. // "location": "path",
  6087. // "required": true,
  6088. // "type": "string"
  6089. // }
  6090. // },
  6091. // "path": "v1/callsets/{callSetId}",
  6092. // "response": {
  6093. // "$ref": "CallSet"
  6094. // },
  6095. // "scopes": [
  6096. // "https://www.googleapis.com/auth/cloud-platform",
  6097. // "https://www.googleapis.com/auth/genomics",
  6098. // "https://www.googleapis.com/auth/genomics.readonly"
  6099. // ]
  6100. // }
  6101. }
  6102. // method id "genomics.callsets.patch":
  6103. type CallsetsPatchCall struct {
  6104. s *Service
  6105. callSetId string
  6106. callset *CallSet
  6107. urlParams_ gensupport.URLParams
  6108. ctx_ context.Context
  6109. header_ http.Header
  6110. }
  6111. // Patch: Updates a call set.
  6112. //
  6113. // This method supports patch semantics.
  6114. func (r *CallsetsService) Patch(callSetId string, callset *CallSet) *CallsetsPatchCall {
  6115. c := &CallsetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6116. c.callSetId = callSetId
  6117. c.callset = callset
  6118. return c
  6119. }
  6120. // UpdateMask sets the optional parameter "updateMask": An optional mask
  6121. // specifying which fields to update. At this time, the only
  6122. // mutable field is name. The only
  6123. // acceptable value is "name". If unspecified, all mutable fields will
  6124. // be
  6125. // updated.
  6126. func (c *CallsetsPatchCall) UpdateMask(updateMask string) *CallsetsPatchCall {
  6127. c.urlParams_.Set("updateMask", updateMask)
  6128. return c
  6129. }
  6130. // Fields allows partial responses to be retrieved. See
  6131. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6132. // for more information.
  6133. func (c *CallsetsPatchCall) Fields(s ...googleapi.Field) *CallsetsPatchCall {
  6134. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6135. return c
  6136. }
  6137. // Context sets the context to be used in this call's Do method. Any
  6138. // pending HTTP request will be aborted if the provided context is
  6139. // canceled.
  6140. func (c *CallsetsPatchCall) Context(ctx context.Context) *CallsetsPatchCall {
  6141. c.ctx_ = ctx
  6142. return c
  6143. }
  6144. // Header returns an http.Header that can be modified by the caller to
  6145. // add HTTP headers to the request.
  6146. func (c *CallsetsPatchCall) Header() http.Header {
  6147. if c.header_ == nil {
  6148. c.header_ = make(http.Header)
  6149. }
  6150. return c.header_
  6151. }
  6152. func (c *CallsetsPatchCall) doRequest(alt string) (*http.Response, error) {
  6153. reqHeaders := make(http.Header)
  6154. for k, v := range c.header_ {
  6155. reqHeaders[k] = v
  6156. }
  6157. reqHeaders.Set("User-Agent", c.s.userAgent())
  6158. var body io.Reader = nil
  6159. body, err := googleapi.WithoutDataWrapper.JSONReader(c.callset)
  6160. if err != nil {
  6161. return nil, err
  6162. }
  6163. reqHeaders.Set("Content-Type", "application/json")
  6164. c.urlParams_.Set("alt", alt)
  6165. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/{callSetId}")
  6166. urls += "?" + c.urlParams_.Encode()
  6167. req, _ := http.NewRequest("PATCH", urls, body)
  6168. req.Header = reqHeaders
  6169. googleapi.Expand(req.URL, map[string]string{
  6170. "callSetId": c.callSetId,
  6171. })
  6172. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6173. }
  6174. // Do executes the "genomics.callsets.patch" call.
  6175. // Exactly one of *CallSet or error will be non-nil. Any non-2xx status
  6176. // code is an error. Response headers are in either
  6177. // *CallSet.ServerResponse.Header or (if a response was returned at all)
  6178. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6179. // check whether the returned error was because http.StatusNotModified
  6180. // was returned.
  6181. func (c *CallsetsPatchCall) Do(opts ...googleapi.CallOption) (*CallSet, error) {
  6182. gensupport.SetOptions(c.urlParams_, opts...)
  6183. res, err := c.doRequest("json")
  6184. if res != nil && res.StatusCode == http.StatusNotModified {
  6185. if res.Body != nil {
  6186. res.Body.Close()
  6187. }
  6188. return nil, &googleapi.Error{
  6189. Code: res.StatusCode,
  6190. Header: res.Header,
  6191. }
  6192. }
  6193. if err != nil {
  6194. return nil, err
  6195. }
  6196. defer googleapi.CloseBody(res)
  6197. if err := googleapi.CheckResponse(res); err != nil {
  6198. return nil, err
  6199. }
  6200. ret := &CallSet{
  6201. ServerResponse: googleapi.ServerResponse{
  6202. Header: res.Header,
  6203. HTTPStatusCode: res.StatusCode,
  6204. },
  6205. }
  6206. target := &ret
  6207. if err := gensupport.DecodeResponse(target, res); err != nil {
  6208. return nil, err
  6209. }
  6210. return ret, nil
  6211. // {
  6212. // "description": "Updates a call set.\n\nThis method supports patch semantics.",
  6213. // "flatPath": "v1/callsets/{callSetId}",
  6214. // "httpMethod": "PATCH",
  6215. // "id": "genomics.callsets.patch",
  6216. // "parameterOrder": [
  6217. // "callSetId"
  6218. // ],
  6219. // "parameters": {
  6220. // "callSetId": {
  6221. // "description": "The ID of the call set to be updated.",
  6222. // "location": "path",
  6223. // "required": true,
  6224. // "type": "string"
  6225. // },
  6226. // "updateMask": {
  6227. // "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.",
  6228. // "format": "google-fieldmask",
  6229. // "location": "query",
  6230. // "type": "string"
  6231. // }
  6232. // },
  6233. // "path": "v1/callsets/{callSetId}",
  6234. // "request": {
  6235. // "$ref": "CallSet"
  6236. // },
  6237. // "response": {
  6238. // "$ref": "CallSet"
  6239. // },
  6240. // "scopes": [
  6241. // "https://www.googleapis.com/auth/cloud-platform",
  6242. // "https://www.googleapis.com/auth/genomics"
  6243. // ]
  6244. // }
  6245. }
  6246. // method id "genomics.callsets.search":
  6247. type CallsetsSearchCall struct {
  6248. s *Service
  6249. searchcallsetsrequest *SearchCallSetsRequest
  6250. urlParams_ gensupport.URLParams
  6251. ctx_ context.Context
  6252. header_ http.Header
  6253. }
  6254. // Search: Gets a list of call sets matching the
  6255. // criteria.
  6256. //
  6257. // Implements
  6258. // [GlobalAllianceApi.searchCallSets](https://githu
  6259. // b.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods
  6260. // .avdl#L178).
  6261. func (r *CallsetsService) Search(searchcallsetsrequest *SearchCallSetsRequest) *CallsetsSearchCall {
  6262. c := &CallsetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6263. c.searchcallsetsrequest = searchcallsetsrequest
  6264. return c
  6265. }
  6266. // Fields allows partial responses to be retrieved. See
  6267. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6268. // for more information.
  6269. func (c *CallsetsSearchCall) Fields(s ...googleapi.Field) *CallsetsSearchCall {
  6270. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6271. return c
  6272. }
  6273. // Context sets the context to be used in this call's Do method. Any
  6274. // pending HTTP request will be aborted if the provided context is
  6275. // canceled.
  6276. func (c *CallsetsSearchCall) Context(ctx context.Context) *CallsetsSearchCall {
  6277. c.ctx_ = ctx
  6278. return c
  6279. }
  6280. // Header returns an http.Header that can be modified by the caller to
  6281. // add HTTP headers to the request.
  6282. func (c *CallsetsSearchCall) Header() http.Header {
  6283. if c.header_ == nil {
  6284. c.header_ = make(http.Header)
  6285. }
  6286. return c.header_
  6287. }
  6288. func (c *CallsetsSearchCall) doRequest(alt string) (*http.Response, error) {
  6289. reqHeaders := make(http.Header)
  6290. for k, v := range c.header_ {
  6291. reqHeaders[k] = v
  6292. }
  6293. reqHeaders.Set("User-Agent", c.s.userAgent())
  6294. var body io.Reader = nil
  6295. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchcallsetsrequest)
  6296. if err != nil {
  6297. return nil, err
  6298. }
  6299. reqHeaders.Set("Content-Type", "application/json")
  6300. c.urlParams_.Set("alt", alt)
  6301. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/callsets/search")
  6302. urls += "?" + c.urlParams_.Encode()
  6303. req, _ := http.NewRequest("POST", urls, body)
  6304. req.Header = reqHeaders
  6305. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6306. }
  6307. // Do executes the "genomics.callsets.search" call.
  6308. // Exactly one of *SearchCallSetsResponse or error will be non-nil. Any
  6309. // non-2xx status code is an error. Response headers are in either
  6310. // *SearchCallSetsResponse.ServerResponse.Header or (if a response was
  6311. // returned at all) in error.(*googleapi.Error).Header. Use
  6312. // googleapi.IsNotModified to check whether the returned error was
  6313. // because http.StatusNotModified was returned.
  6314. func (c *CallsetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchCallSetsResponse, error) {
  6315. gensupport.SetOptions(c.urlParams_, opts...)
  6316. res, err := c.doRequest("json")
  6317. if res != nil && res.StatusCode == http.StatusNotModified {
  6318. if res.Body != nil {
  6319. res.Body.Close()
  6320. }
  6321. return nil, &googleapi.Error{
  6322. Code: res.StatusCode,
  6323. Header: res.Header,
  6324. }
  6325. }
  6326. if err != nil {
  6327. return nil, err
  6328. }
  6329. defer googleapi.CloseBody(res)
  6330. if err := googleapi.CheckResponse(res); err != nil {
  6331. return nil, err
  6332. }
  6333. ret := &SearchCallSetsResponse{
  6334. ServerResponse: googleapi.ServerResponse{
  6335. Header: res.Header,
  6336. HTTPStatusCode: res.StatusCode,
  6337. },
  6338. }
  6339. target := &ret
  6340. if err := gensupport.DecodeResponse(target, res); err != nil {
  6341. return nil, err
  6342. }
  6343. return ret, nil
  6344. // {
  6345. // "description": "Gets a list of call sets matching the criteria.\n\nImplements\n[GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178).",
  6346. // "flatPath": "v1/callsets/search",
  6347. // "httpMethod": "POST",
  6348. // "id": "genomics.callsets.search",
  6349. // "parameterOrder": [],
  6350. // "parameters": {},
  6351. // "path": "v1/callsets/search",
  6352. // "request": {
  6353. // "$ref": "SearchCallSetsRequest"
  6354. // },
  6355. // "response": {
  6356. // "$ref": "SearchCallSetsResponse"
  6357. // },
  6358. // "scopes": [
  6359. // "https://www.googleapis.com/auth/cloud-platform",
  6360. // "https://www.googleapis.com/auth/genomics",
  6361. // "https://www.googleapis.com/auth/genomics.readonly"
  6362. // ]
  6363. // }
  6364. }
  6365. // Pages invokes f for each page of results.
  6366. // A non-nil error returned from f will halt the iteration.
  6367. // The provided context supersedes any context provided to the Context method.
  6368. func (c *CallsetsSearchCall) Pages(ctx context.Context, f func(*SearchCallSetsResponse) error) error {
  6369. c.ctx_ = ctx
  6370. defer func(pt string) { c.searchcallsetsrequest.PageToken = pt }(c.searchcallsetsrequest.PageToken) // reset paging to original point
  6371. for {
  6372. x, err := c.Do()
  6373. if err != nil {
  6374. return err
  6375. }
  6376. if err := f(x); err != nil {
  6377. return err
  6378. }
  6379. if x.NextPageToken == "" {
  6380. return nil
  6381. }
  6382. c.searchcallsetsrequest.PageToken = x.NextPageToken
  6383. }
  6384. }
  6385. // method id "genomics.datasets.create":
  6386. type DatasetsCreateCall struct {
  6387. s *Service
  6388. dataset *Dataset
  6389. urlParams_ gensupport.URLParams
  6390. ctx_ context.Context
  6391. header_ http.Header
  6392. }
  6393. // Create: Creates a new dataset.
  6394. func (r *DatasetsService) Create(dataset *Dataset) *DatasetsCreateCall {
  6395. c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6396. c.dataset = dataset
  6397. return c
  6398. }
  6399. // Fields allows partial responses to be retrieved. See
  6400. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6401. // for more information.
  6402. func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall {
  6403. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6404. return c
  6405. }
  6406. // Context sets the context to be used in this call's Do method. Any
  6407. // pending HTTP request will be aborted if the provided context is
  6408. // canceled.
  6409. func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall {
  6410. c.ctx_ = ctx
  6411. return c
  6412. }
  6413. // Header returns an http.Header that can be modified by the caller to
  6414. // add HTTP headers to the request.
  6415. func (c *DatasetsCreateCall) Header() http.Header {
  6416. if c.header_ == nil {
  6417. c.header_ = make(http.Header)
  6418. }
  6419. return c.header_
  6420. }
  6421. func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) {
  6422. reqHeaders := make(http.Header)
  6423. for k, v := range c.header_ {
  6424. reqHeaders[k] = v
  6425. }
  6426. reqHeaders.Set("User-Agent", c.s.userAgent())
  6427. var body io.Reader = nil
  6428. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  6429. if err != nil {
  6430. return nil, err
  6431. }
  6432. reqHeaders.Set("Content-Type", "application/json")
  6433. c.urlParams_.Set("alt", alt)
  6434. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets")
  6435. urls += "?" + c.urlParams_.Encode()
  6436. req, _ := http.NewRequest("POST", urls, body)
  6437. req.Header = reqHeaders
  6438. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6439. }
  6440. // Do executes the "genomics.datasets.create" call.
  6441. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  6442. // code is an error. Response headers are in either
  6443. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  6444. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6445. // check whether the returned error was because http.StatusNotModified
  6446. // was returned.
  6447. func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  6448. gensupport.SetOptions(c.urlParams_, opts...)
  6449. res, err := c.doRequest("json")
  6450. if res != nil && res.StatusCode == http.StatusNotModified {
  6451. if res.Body != nil {
  6452. res.Body.Close()
  6453. }
  6454. return nil, &googleapi.Error{
  6455. Code: res.StatusCode,
  6456. Header: res.Header,
  6457. }
  6458. }
  6459. if err != nil {
  6460. return nil, err
  6461. }
  6462. defer googleapi.CloseBody(res)
  6463. if err := googleapi.CheckResponse(res); err != nil {
  6464. return nil, err
  6465. }
  6466. ret := &Dataset{
  6467. ServerResponse: googleapi.ServerResponse{
  6468. Header: res.Header,
  6469. HTTPStatusCode: res.StatusCode,
  6470. },
  6471. }
  6472. target := &ret
  6473. if err := gensupport.DecodeResponse(target, res); err != nil {
  6474. return nil, err
  6475. }
  6476. return ret, nil
  6477. // {
  6478. // "description": "Creates a new dataset.",
  6479. // "flatPath": "v1/datasets",
  6480. // "httpMethod": "POST",
  6481. // "id": "genomics.datasets.create",
  6482. // "parameterOrder": [],
  6483. // "parameters": {},
  6484. // "path": "v1/datasets",
  6485. // "request": {
  6486. // "$ref": "Dataset"
  6487. // },
  6488. // "response": {
  6489. // "$ref": "Dataset"
  6490. // },
  6491. // "scopes": [
  6492. // "https://www.googleapis.com/auth/cloud-platform",
  6493. // "https://www.googleapis.com/auth/genomics"
  6494. // ]
  6495. // }
  6496. }
  6497. // method id "genomics.datasets.delete":
  6498. type DatasetsDeleteCall struct {
  6499. s *Service
  6500. datasetId string
  6501. urlParams_ gensupport.URLParams
  6502. ctx_ context.Context
  6503. header_ http.Header
  6504. }
  6505. // Delete: Deletes a dataset and all of its contents (all read group
  6506. // sets,
  6507. // reference sets, variant sets, call sets, annotation sets, etc.)
  6508. // This is reversible (up to one week after the deletion)
  6509. // via
  6510. // the
  6511. // datasets.undelete
  6512. // operation.
  6513. func (r *DatasetsService) Delete(datasetId string) *DatasetsDeleteCall {
  6514. c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6515. c.datasetId = datasetId
  6516. return c
  6517. }
  6518. // Fields allows partial responses to be retrieved. See
  6519. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6520. // for more information.
  6521. func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall {
  6522. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6523. return c
  6524. }
  6525. // Context sets the context to be used in this call's Do method. Any
  6526. // pending HTTP request will be aborted if the provided context is
  6527. // canceled.
  6528. func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall {
  6529. c.ctx_ = ctx
  6530. return c
  6531. }
  6532. // Header returns an http.Header that can be modified by the caller to
  6533. // add HTTP headers to the request.
  6534. func (c *DatasetsDeleteCall) Header() http.Header {
  6535. if c.header_ == nil {
  6536. c.header_ = make(http.Header)
  6537. }
  6538. return c.header_
  6539. }
  6540. func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  6541. reqHeaders := make(http.Header)
  6542. for k, v := range c.header_ {
  6543. reqHeaders[k] = v
  6544. }
  6545. reqHeaders.Set("User-Agent", c.s.userAgent())
  6546. var body io.Reader = nil
  6547. c.urlParams_.Set("alt", alt)
  6548. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}")
  6549. urls += "?" + c.urlParams_.Encode()
  6550. req, _ := http.NewRequest("DELETE", urls, body)
  6551. req.Header = reqHeaders
  6552. googleapi.Expand(req.URL, map[string]string{
  6553. "datasetId": c.datasetId,
  6554. })
  6555. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6556. }
  6557. // Do executes the "genomics.datasets.delete" call.
  6558. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  6559. // code is an error. Response headers are in either
  6560. // *Empty.ServerResponse.Header or (if a response was returned at all)
  6561. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6562. // check whether the returned error was because http.StatusNotModified
  6563. // was returned.
  6564. func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  6565. gensupport.SetOptions(c.urlParams_, opts...)
  6566. res, err := c.doRequest("json")
  6567. if res != nil && res.StatusCode == http.StatusNotModified {
  6568. if res.Body != nil {
  6569. res.Body.Close()
  6570. }
  6571. return nil, &googleapi.Error{
  6572. Code: res.StatusCode,
  6573. Header: res.Header,
  6574. }
  6575. }
  6576. if err != nil {
  6577. return nil, err
  6578. }
  6579. defer googleapi.CloseBody(res)
  6580. if err := googleapi.CheckResponse(res); err != nil {
  6581. return nil, err
  6582. }
  6583. ret := &Empty{
  6584. ServerResponse: googleapi.ServerResponse{
  6585. Header: res.Header,
  6586. HTTPStatusCode: res.StatusCode,
  6587. },
  6588. }
  6589. target := &ret
  6590. if err := gensupport.DecodeResponse(target, res); err != nil {
  6591. return nil, err
  6592. }
  6593. return ret, nil
  6594. // {
  6595. // "description": "Deletes a dataset and all of its contents (all read group sets,\nreference sets, variant sets, call sets, annotation sets, etc.)\nThis is reversible (up to one week after the deletion) via\nthe\ndatasets.undelete\noperation.",
  6596. // "flatPath": "v1/datasets/{datasetId}",
  6597. // "httpMethod": "DELETE",
  6598. // "id": "genomics.datasets.delete",
  6599. // "parameterOrder": [
  6600. // "datasetId"
  6601. // ],
  6602. // "parameters": {
  6603. // "datasetId": {
  6604. // "description": "The ID of the dataset to be deleted.",
  6605. // "location": "path",
  6606. // "required": true,
  6607. // "type": "string"
  6608. // }
  6609. // },
  6610. // "path": "v1/datasets/{datasetId}",
  6611. // "response": {
  6612. // "$ref": "Empty"
  6613. // },
  6614. // "scopes": [
  6615. // "https://www.googleapis.com/auth/cloud-platform",
  6616. // "https://www.googleapis.com/auth/genomics"
  6617. // ]
  6618. // }
  6619. }
  6620. // method id "genomics.datasets.get":
  6621. type DatasetsGetCall struct {
  6622. s *Service
  6623. datasetId string
  6624. urlParams_ gensupport.URLParams
  6625. ifNoneMatch_ string
  6626. ctx_ context.Context
  6627. header_ http.Header
  6628. }
  6629. // Get: Gets a dataset by ID.
  6630. func (r *DatasetsService) Get(datasetId string) *DatasetsGetCall {
  6631. c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6632. c.datasetId = datasetId
  6633. return c
  6634. }
  6635. // Fields allows partial responses to be retrieved. See
  6636. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6637. // for more information.
  6638. func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall {
  6639. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6640. return c
  6641. }
  6642. // IfNoneMatch sets the optional parameter which makes the operation
  6643. // fail if the object's ETag matches the given value. This is useful for
  6644. // getting updates only after the object has changed since the last
  6645. // request. Use googleapi.IsNotModified to check whether the response
  6646. // error from Do is the result of In-None-Match.
  6647. func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall {
  6648. c.ifNoneMatch_ = entityTag
  6649. return c
  6650. }
  6651. // Context sets the context to be used in this call's Do method. Any
  6652. // pending HTTP request will be aborted if the provided context is
  6653. // canceled.
  6654. func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall {
  6655. c.ctx_ = ctx
  6656. return c
  6657. }
  6658. // Header returns an http.Header that can be modified by the caller to
  6659. // add HTTP headers to the request.
  6660. func (c *DatasetsGetCall) Header() http.Header {
  6661. if c.header_ == nil {
  6662. c.header_ = make(http.Header)
  6663. }
  6664. return c.header_
  6665. }
  6666. func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) {
  6667. reqHeaders := make(http.Header)
  6668. for k, v := range c.header_ {
  6669. reqHeaders[k] = v
  6670. }
  6671. reqHeaders.Set("User-Agent", c.s.userAgent())
  6672. if c.ifNoneMatch_ != "" {
  6673. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6674. }
  6675. var body io.Reader = nil
  6676. c.urlParams_.Set("alt", alt)
  6677. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}")
  6678. urls += "?" + c.urlParams_.Encode()
  6679. req, _ := http.NewRequest("GET", urls, body)
  6680. req.Header = reqHeaders
  6681. googleapi.Expand(req.URL, map[string]string{
  6682. "datasetId": c.datasetId,
  6683. })
  6684. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6685. }
  6686. // Do executes the "genomics.datasets.get" call.
  6687. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  6688. // code is an error. Response headers are in either
  6689. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  6690. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6691. // check whether the returned error was because http.StatusNotModified
  6692. // was returned.
  6693. func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  6694. gensupport.SetOptions(c.urlParams_, opts...)
  6695. res, err := c.doRequest("json")
  6696. if res != nil && res.StatusCode == http.StatusNotModified {
  6697. if res.Body != nil {
  6698. res.Body.Close()
  6699. }
  6700. return nil, &googleapi.Error{
  6701. Code: res.StatusCode,
  6702. Header: res.Header,
  6703. }
  6704. }
  6705. if err != nil {
  6706. return nil, err
  6707. }
  6708. defer googleapi.CloseBody(res)
  6709. if err := googleapi.CheckResponse(res); err != nil {
  6710. return nil, err
  6711. }
  6712. ret := &Dataset{
  6713. ServerResponse: googleapi.ServerResponse{
  6714. Header: res.Header,
  6715. HTTPStatusCode: res.StatusCode,
  6716. },
  6717. }
  6718. target := &ret
  6719. if err := gensupport.DecodeResponse(target, res); err != nil {
  6720. return nil, err
  6721. }
  6722. return ret, nil
  6723. // {
  6724. // "description": "Gets a dataset by ID.",
  6725. // "flatPath": "v1/datasets/{datasetId}",
  6726. // "httpMethod": "GET",
  6727. // "id": "genomics.datasets.get",
  6728. // "parameterOrder": [
  6729. // "datasetId"
  6730. // ],
  6731. // "parameters": {
  6732. // "datasetId": {
  6733. // "description": "The ID of the dataset.",
  6734. // "location": "path",
  6735. // "required": true,
  6736. // "type": "string"
  6737. // }
  6738. // },
  6739. // "path": "v1/datasets/{datasetId}",
  6740. // "response": {
  6741. // "$ref": "Dataset"
  6742. // },
  6743. // "scopes": [
  6744. // "https://www.googleapis.com/auth/cloud-platform",
  6745. // "https://www.googleapis.com/auth/genomics",
  6746. // "https://www.googleapis.com/auth/genomics.readonly"
  6747. // ]
  6748. // }
  6749. }
  6750. // method id "genomics.datasets.getIamPolicy":
  6751. type DatasetsGetIamPolicyCall struct {
  6752. s *Service
  6753. resource string
  6754. getiampolicyrequest *GetIamPolicyRequest
  6755. urlParams_ gensupport.URLParams
  6756. ctx_ context.Context
  6757. header_ http.Header
  6758. }
  6759. // GetIamPolicy: Gets the access control policy for the dataset. This is
  6760. // empty if the
  6761. // policy or resource does not exist.
  6762. //
  6763. // See <a href="/iam/docs/managing-policies#getting_a_policy">Getting
  6764. // a
  6765. // Policy</a> for more information.
  6766. func (r *DatasetsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *DatasetsGetIamPolicyCall {
  6767. c := &DatasetsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6768. c.resource = resource
  6769. c.getiampolicyrequest = getiampolicyrequest
  6770. return c
  6771. }
  6772. // Fields allows partial responses to be retrieved. See
  6773. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6774. // for more information.
  6775. func (c *DatasetsGetIamPolicyCall) Fields(s ...googleapi.Field) *DatasetsGetIamPolicyCall {
  6776. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6777. return c
  6778. }
  6779. // Context sets the context to be used in this call's Do method. Any
  6780. // pending HTTP request will be aborted if the provided context is
  6781. // canceled.
  6782. func (c *DatasetsGetIamPolicyCall) Context(ctx context.Context) *DatasetsGetIamPolicyCall {
  6783. c.ctx_ = ctx
  6784. return c
  6785. }
  6786. // Header returns an http.Header that can be modified by the caller to
  6787. // add HTTP headers to the request.
  6788. func (c *DatasetsGetIamPolicyCall) Header() http.Header {
  6789. if c.header_ == nil {
  6790. c.header_ = make(http.Header)
  6791. }
  6792. return c.header_
  6793. }
  6794. func (c *DatasetsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  6795. reqHeaders := make(http.Header)
  6796. for k, v := range c.header_ {
  6797. reqHeaders[k] = v
  6798. }
  6799. reqHeaders.Set("User-Agent", c.s.userAgent())
  6800. var body io.Reader = nil
  6801. body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
  6802. if err != nil {
  6803. return nil, err
  6804. }
  6805. reqHeaders.Set("Content-Type", "application/json")
  6806. c.urlParams_.Set("alt", alt)
  6807. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
  6808. urls += "?" + c.urlParams_.Encode()
  6809. req, _ := http.NewRequest("POST", urls, body)
  6810. req.Header = reqHeaders
  6811. googleapi.Expand(req.URL, map[string]string{
  6812. "resource": c.resource,
  6813. })
  6814. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6815. }
  6816. // Do executes the "genomics.datasets.getIamPolicy" call.
  6817. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  6818. // code is an error. Response headers are in either
  6819. // *Policy.ServerResponse.Header or (if a response was returned at all)
  6820. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  6821. // check whether the returned error was because http.StatusNotModified
  6822. // was returned.
  6823. func (c *DatasetsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  6824. gensupport.SetOptions(c.urlParams_, opts...)
  6825. res, err := c.doRequest("json")
  6826. if res != nil && res.StatusCode == http.StatusNotModified {
  6827. if res.Body != nil {
  6828. res.Body.Close()
  6829. }
  6830. return nil, &googleapi.Error{
  6831. Code: res.StatusCode,
  6832. Header: res.Header,
  6833. }
  6834. }
  6835. if err != nil {
  6836. return nil, err
  6837. }
  6838. defer googleapi.CloseBody(res)
  6839. if err := googleapi.CheckResponse(res); err != nil {
  6840. return nil, err
  6841. }
  6842. ret := &Policy{
  6843. ServerResponse: googleapi.ServerResponse{
  6844. Header: res.Header,
  6845. HTTPStatusCode: res.StatusCode,
  6846. },
  6847. }
  6848. target := &ret
  6849. if err := gensupport.DecodeResponse(target, res); err != nil {
  6850. return nil, err
  6851. }
  6852. return ret, nil
  6853. // {
  6854. // "description": "Gets the access control policy for the dataset. This is empty if the\npolicy or resource does not exist.\n\nSee \u003ca href=\"/iam/docs/managing-policies#getting_a_policy\"\u003eGetting a\nPolicy\u003c/a\u003e for more information.",
  6855. // "flatPath": "v1/datasets/{datasetsId}:getIamPolicy",
  6856. // "httpMethod": "POST",
  6857. // "id": "genomics.datasets.getIamPolicy",
  6858. // "parameterOrder": [
  6859. // "resource"
  6860. // ],
  6861. // "parameters": {
  6862. // "resource": {
  6863. // "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.",
  6864. // "location": "path",
  6865. // "pattern": "^datasets/[^/]+$",
  6866. // "required": true,
  6867. // "type": "string"
  6868. // }
  6869. // },
  6870. // "path": "v1/{+resource}:getIamPolicy",
  6871. // "request": {
  6872. // "$ref": "GetIamPolicyRequest"
  6873. // },
  6874. // "response": {
  6875. // "$ref": "Policy"
  6876. // },
  6877. // "scopes": [
  6878. // "https://www.googleapis.com/auth/cloud-platform",
  6879. // "https://www.googleapis.com/auth/genomics"
  6880. // ]
  6881. // }
  6882. }
  6883. // method id "genomics.datasets.list":
  6884. type DatasetsListCall struct {
  6885. s *Service
  6886. urlParams_ gensupport.URLParams
  6887. ifNoneMatch_ string
  6888. ctx_ context.Context
  6889. header_ http.Header
  6890. }
  6891. // List: Lists datasets within a project.
  6892. func (r *DatasetsService) List() *DatasetsListCall {
  6893. c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  6894. return c
  6895. }
  6896. // PageSize sets the optional parameter "pageSize": The maximum number
  6897. // of results to return in a single page. If unspecified,
  6898. // defaults to 50. The maximum value is 1024.
  6899. func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall {
  6900. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  6901. return c
  6902. }
  6903. // PageToken sets the optional parameter "pageToken": The continuation
  6904. // token, which is used to page through large result sets.
  6905. // To get the next page of results, set this parameter to the value
  6906. // of
  6907. // `nextPageToken` from the previous response.
  6908. func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall {
  6909. c.urlParams_.Set("pageToken", pageToken)
  6910. return c
  6911. }
  6912. // ProjectId sets the optional parameter "projectId": Required. The
  6913. // Google Cloud project ID to list datasets for.
  6914. func (c *DatasetsListCall) ProjectId(projectId string) *DatasetsListCall {
  6915. c.urlParams_.Set("projectId", projectId)
  6916. return c
  6917. }
  6918. // Fields allows partial responses to be retrieved. See
  6919. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  6920. // for more information.
  6921. func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall {
  6922. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  6923. return c
  6924. }
  6925. // IfNoneMatch sets the optional parameter which makes the operation
  6926. // fail if the object's ETag matches the given value. This is useful for
  6927. // getting updates only after the object has changed since the last
  6928. // request. Use googleapi.IsNotModified to check whether the response
  6929. // error from Do is the result of In-None-Match.
  6930. func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall {
  6931. c.ifNoneMatch_ = entityTag
  6932. return c
  6933. }
  6934. // Context sets the context to be used in this call's Do method. Any
  6935. // pending HTTP request will be aborted if the provided context is
  6936. // canceled.
  6937. func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall {
  6938. c.ctx_ = ctx
  6939. return c
  6940. }
  6941. // Header returns an http.Header that can be modified by the caller to
  6942. // add HTTP headers to the request.
  6943. func (c *DatasetsListCall) Header() http.Header {
  6944. if c.header_ == nil {
  6945. c.header_ = make(http.Header)
  6946. }
  6947. return c.header_
  6948. }
  6949. func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) {
  6950. reqHeaders := make(http.Header)
  6951. for k, v := range c.header_ {
  6952. reqHeaders[k] = v
  6953. }
  6954. reqHeaders.Set("User-Agent", c.s.userAgent())
  6955. if c.ifNoneMatch_ != "" {
  6956. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  6957. }
  6958. var body io.Reader = nil
  6959. c.urlParams_.Set("alt", alt)
  6960. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets")
  6961. urls += "?" + c.urlParams_.Encode()
  6962. req, _ := http.NewRequest("GET", urls, body)
  6963. req.Header = reqHeaders
  6964. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  6965. }
  6966. // Do executes the "genomics.datasets.list" call.
  6967. // Exactly one of *ListDatasetsResponse or error will be non-nil. Any
  6968. // non-2xx status code is an error. Response headers are in either
  6969. // *ListDatasetsResponse.ServerResponse.Header or (if a response was
  6970. // returned at all) in error.(*googleapi.Error).Header. Use
  6971. // googleapi.IsNotModified to check whether the returned error was
  6972. // because http.StatusNotModified was returned.
  6973. func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*ListDatasetsResponse, error) {
  6974. gensupport.SetOptions(c.urlParams_, opts...)
  6975. res, err := c.doRequest("json")
  6976. if res != nil && res.StatusCode == http.StatusNotModified {
  6977. if res.Body != nil {
  6978. res.Body.Close()
  6979. }
  6980. return nil, &googleapi.Error{
  6981. Code: res.StatusCode,
  6982. Header: res.Header,
  6983. }
  6984. }
  6985. if err != nil {
  6986. return nil, err
  6987. }
  6988. defer googleapi.CloseBody(res)
  6989. if err := googleapi.CheckResponse(res); err != nil {
  6990. return nil, err
  6991. }
  6992. ret := &ListDatasetsResponse{
  6993. ServerResponse: googleapi.ServerResponse{
  6994. Header: res.Header,
  6995. HTTPStatusCode: res.StatusCode,
  6996. },
  6997. }
  6998. target := &ret
  6999. if err := gensupport.DecodeResponse(target, res); err != nil {
  7000. return nil, err
  7001. }
  7002. return ret, nil
  7003. // {
  7004. // "description": "Lists datasets within a project.",
  7005. // "flatPath": "v1/datasets",
  7006. // "httpMethod": "GET",
  7007. // "id": "genomics.datasets.list",
  7008. // "parameterOrder": [],
  7009. // "parameters": {
  7010. // "pageSize": {
  7011. // "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 50. The maximum value is 1024.",
  7012. // "format": "int32",
  7013. // "location": "query",
  7014. // "type": "integer"
  7015. // },
  7016. // "pageToken": {
  7017. // "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.",
  7018. // "location": "query",
  7019. // "type": "string"
  7020. // },
  7021. // "projectId": {
  7022. // "description": "Required. The Google Cloud project ID to list datasets for.",
  7023. // "location": "query",
  7024. // "type": "string"
  7025. // }
  7026. // },
  7027. // "path": "v1/datasets",
  7028. // "response": {
  7029. // "$ref": "ListDatasetsResponse"
  7030. // },
  7031. // "scopes": [
  7032. // "https://www.googleapis.com/auth/cloud-platform",
  7033. // "https://www.googleapis.com/auth/genomics",
  7034. // "https://www.googleapis.com/auth/genomics.readonly"
  7035. // ]
  7036. // }
  7037. }
  7038. // Pages invokes f for each page of results.
  7039. // A non-nil error returned from f will halt the iteration.
  7040. // The provided context supersedes any context provided to the Context method.
  7041. func (c *DatasetsListCall) Pages(ctx context.Context, f func(*ListDatasetsResponse) error) error {
  7042. c.ctx_ = ctx
  7043. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  7044. for {
  7045. x, err := c.Do()
  7046. if err != nil {
  7047. return err
  7048. }
  7049. if err := f(x); err != nil {
  7050. return err
  7051. }
  7052. if x.NextPageToken == "" {
  7053. return nil
  7054. }
  7055. c.PageToken(x.NextPageToken)
  7056. }
  7057. }
  7058. // method id "genomics.datasets.patch":
  7059. type DatasetsPatchCall struct {
  7060. s *Service
  7061. datasetId string
  7062. dataset *Dataset
  7063. urlParams_ gensupport.URLParams
  7064. ctx_ context.Context
  7065. header_ http.Header
  7066. }
  7067. // Patch: Updates a dataset.
  7068. //
  7069. // This method supports patch semantics.
  7070. func (r *DatasetsService) Patch(datasetId string, dataset *Dataset) *DatasetsPatchCall {
  7071. c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7072. c.datasetId = datasetId
  7073. c.dataset = dataset
  7074. return c
  7075. }
  7076. // UpdateMask sets the optional parameter "updateMask": An optional mask
  7077. // specifying which fields to update. At this time, the only
  7078. // mutable field is name. The only
  7079. // acceptable value is "name". If unspecified, all mutable fields will
  7080. // be
  7081. // updated.
  7082. func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall {
  7083. c.urlParams_.Set("updateMask", updateMask)
  7084. return c
  7085. }
  7086. // Fields allows partial responses to be retrieved. See
  7087. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7088. // for more information.
  7089. func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall {
  7090. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7091. return c
  7092. }
  7093. // Context sets the context to be used in this call's Do method. Any
  7094. // pending HTTP request will be aborted if the provided context is
  7095. // canceled.
  7096. func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall {
  7097. c.ctx_ = ctx
  7098. return c
  7099. }
  7100. // Header returns an http.Header that can be modified by the caller to
  7101. // add HTTP headers to the request.
  7102. func (c *DatasetsPatchCall) Header() http.Header {
  7103. if c.header_ == nil {
  7104. c.header_ = make(http.Header)
  7105. }
  7106. return c.header_
  7107. }
  7108. func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) {
  7109. reqHeaders := make(http.Header)
  7110. for k, v := range c.header_ {
  7111. reqHeaders[k] = v
  7112. }
  7113. reqHeaders.Set("User-Agent", c.s.userAgent())
  7114. var body io.Reader = nil
  7115. body, err := googleapi.WithoutDataWrapper.JSONReader(c.dataset)
  7116. if err != nil {
  7117. return nil, err
  7118. }
  7119. reqHeaders.Set("Content-Type", "application/json")
  7120. c.urlParams_.Set("alt", alt)
  7121. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}")
  7122. urls += "?" + c.urlParams_.Encode()
  7123. req, _ := http.NewRequest("PATCH", urls, body)
  7124. req.Header = reqHeaders
  7125. googleapi.Expand(req.URL, map[string]string{
  7126. "datasetId": c.datasetId,
  7127. })
  7128. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7129. }
  7130. // Do executes the "genomics.datasets.patch" call.
  7131. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  7132. // code is an error. Response headers are in either
  7133. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  7134. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7135. // check whether the returned error was because http.StatusNotModified
  7136. // was returned.
  7137. func (c *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  7138. gensupport.SetOptions(c.urlParams_, opts...)
  7139. res, err := c.doRequest("json")
  7140. if res != nil && res.StatusCode == http.StatusNotModified {
  7141. if res.Body != nil {
  7142. res.Body.Close()
  7143. }
  7144. return nil, &googleapi.Error{
  7145. Code: res.StatusCode,
  7146. Header: res.Header,
  7147. }
  7148. }
  7149. if err != nil {
  7150. return nil, err
  7151. }
  7152. defer googleapi.CloseBody(res)
  7153. if err := googleapi.CheckResponse(res); err != nil {
  7154. return nil, err
  7155. }
  7156. ret := &Dataset{
  7157. ServerResponse: googleapi.ServerResponse{
  7158. Header: res.Header,
  7159. HTTPStatusCode: res.StatusCode,
  7160. },
  7161. }
  7162. target := &ret
  7163. if err := gensupport.DecodeResponse(target, res); err != nil {
  7164. return nil, err
  7165. }
  7166. return ret, nil
  7167. // {
  7168. // "description": "Updates a dataset.\n\nThis method supports patch semantics.",
  7169. // "flatPath": "v1/datasets/{datasetId}",
  7170. // "httpMethod": "PATCH",
  7171. // "id": "genomics.datasets.patch",
  7172. // "parameterOrder": [
  7173. // "datasetId"
  7174. // ],
  7175. // "parameters": {
  7176. // "datasetId": {
  7177. // "description": "The ID of the dataset to be updated.",
  7178. // "location": "path",
  7179. // "required": true,
  7180. // "type": "string"
  7181. // },
  7182. // "updateMask": {
  7183. // "description": "An optional mask specifying which fields to update. At this time, the only\nmutable field is name. The only\nacceptable value is \"name\". If unspecified, all mutable fields will be\nupdated.",
  7184. // "format": "google-fieldmask",
  7185. // "location": "query",
  7186. // "type": "string"
  7187. // }
  7188. // },
  7189. // "path": "v1/datasets/{datasetId}",
  7190. // "request": {
  7191. // "$ref": "Dataset"
  7192. // },
  7193. // "response": {
  7194. // "$ref": "Dataset"
  7195. // },
  7196. // "scopes": [
  7197. // "https://www.googleapis.com/auth/cloud-platform",
  7198. // "https://www.googleapis.com/auth/genomics"
  7199. // ]
  7200. // }
  7201. }
  7202. // method id "genomics.datasets.setIamPolicy":
  7203. type DatasetsSetIamPolicyCall struct {
  7204. s *Service
  7205. resource string
  7206. setiampolicyrequest *SetIamPolicyRequest
  7207. urlParams_ gensupport.URLParams
  7208. ctx_ context.Context
  7209. header_ http.Header
  7210. }
  7211. // SetIamPolicy: Sets the access control policy on the specified
  7212. // dataset. Replaces any
  7213. // existing policy.
  7214. //
  7215. // See <a href="/iam/docs/managing-policies#setting_a_policy">Setting
  7216. // a
  7217. // Policy</a> for more information.
  7218. func (r *DatasetsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *DatasetsSetIamPolicyCall {
  7219. c := &DatasetsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7220. c.resource = resource
  7221. c.setiampolicyrequest = setiampolicyrequest
  7222. return c
  7223. }
  7224. // Fields allows partial responses to be retrieved. See
  7225. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7226. // for more information.
  7227. func (c *DatasetsSetIamPolicyCall) Fields(s ...googleapi.Field) *DatasetsSetIamPolicyCall {
  7228. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7229. return c
  7230. }
  7231. // Context sets the context to be used in this call's Do method. Any
  7232. // pending HTTP request will be aborted if the provided context is
  7233. // canceled.
  7234. func (c *DatasetsSetIamPolicyCall) Context(ctx context.Context) *DatasetsSetIamPolicyCall {
  7235. c.ctx_ = ctx
  7236. return c
  7237. }
  7238. // Header returns an http.Header that can be modified by the caller to
  7239. // add HTTP headers to the request.
  7240. func (c *DatasetsSetIamPolicyCall) Header() http.Header {
  7241. if c.header_ == nil {
  7242. c.header_ = make(http.Header)
  7243. }
  7244. return c.header_
  7245. }
  7246. func (c *DatasetsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
  7247. reqHeaders := make(http.Header)
  7248. for k, v := range c.header_ {
  7249. reqHeaders[k] = v
  7250. }
  7251. reqHeaders.Set("User-Agent", c.s.userAgent())
  7252. var body io.Reader = nil
  7253. body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
  7254. if err != nil {
  7255. return nil, err
  7256. }
  7257. reqHeaders.Set("Content-Type", "application/json")
  7258. c.urlParams_.Set("alt", alt)
  7259. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
  7260. urls += "?" + c.urlParams_.Encode()
  7261. req, _ := http.NewRequest("POST", urls, body)
  7262. req.Header = reqHeaders
  7263. googleapi.Expand(req.URL, map[string]string{
  7264. "resource": c.resource,
  7265. })
  7266. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7267. }
  7268. // Do executes the "genomics.datasets.setIamPolicy" call.
  7269. // Exactly one of *Policy or error will be non-nil. Any non-2xx status
  7270. // code is an error. Response headers are in either
  7271. // *Policy.ServerResponse.Header or (if a response was returned at all)
  7272. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7273. // check whether the returned error was because http.StatusNotModified
  7274. // was returned.
  7275. func (c *DatasetsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
  7276. gensupport.SetOptions(c.urlParams_, opts...)
  7277. res, err := c.doRequest("json")
  7278. if res != nil && res.StatusCode == http.StatusNotModified {
  7279. if res.Body != nil {
  7280. res.Body.Close()
  7281. }
  7282. return nil, &googleapi.Error{
  7283. Code: res.StatusCode,
  7284. Header: res.Header,
  7285. }
  7286. }
  7287. if err != nil {
  7288. return nil, err
  7289. }
  7290. defer googleapi.CloseBody(res)
  7291. if err := googleapi.CheckResponse(res); err != nil {
  7292. return nil, err
  7293. }
  7294. ret := &Policy{
  7295. ServerResponse: googleapi.ServerResponse{
  7296. Header: res.Header,
  7297. HTTPStatusCode: res.StatusCode,
  7298. },
  7299. }
  7300. target := &ret
  7301. if err := gensupport.DecodeResponse(target, res); err != nil {
  7302. return nil, err
  7303. }
  7304. return ret, nil
  7305. // {
  7306. // "description": "Sets the access control policy on the specified dataset. Replaces any\nexisting policy.\n\nSee \u003ca href=\"/iam/docs/managing-policies#setting_a_policy\"\u003eSetting a\nPolicy\u003c/a\u003e for more information.",
  7307. // "flatPath": "v1/datasets/{datasetsId}:setIamPolicy",
  7308. // "httpMethod": "POST",
  7309. // "id": "genomics.datasets.setIamPolicy",
  7310. // "parameterOrder": [
  7311. // "resource"
  7312. // ],
  7313. // "parameters": {
  7314. // "resource": {
  7315. // "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.",
  7316. // "location": "path",
  7317. // "pattern": "^datasets/[^/]+$",
  7318. // "required": true,
  7319. // "type": "string"
  7320. // }
  7321. // },
  7322. // "path": "v1/{+resource}:setIamPolicy",
  7323. // "request": {
  7324. // "$ref": "SetIamPolicyRequest"
  7325. // },
  7326. // "response": {
  7327. // "$ref": "Policy"
  7328. // },
  7329. // "scopes": [
  7330. // "https://www.googleapis.com/auth/cloud-platform",
  7331. // "https://www.googleapis.com/auth/genomics"
  7332. // ]
  7333. // }
  7334. }
  7335. // method id "genomics.datasets.testIamPermissions":
  7336. type DatasetsTestIamPermissionsCall struct {
  7337. s *Service
  7338. resource string
  7339. testiampermissionsrequest *TestIamPermissionsRequest
  7340. urlParams_ gensupport.URLParams
  7341. ctx_ context.Context
  7342. header_ http.Header
  7343. }
  7344. // TestIamPermissions: Returns permissions that a caller has on the
  7345. // specified resource.
  7346. // See <a
  7347. // href="/iam/docs/managing-policies#testing_permissions">Testing
  7348. // Permiss
  7349. // ions</a> for more information.
  7350. func (r *DatasetsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *DatasetsTestIamPermissionsCall {
  7351. c := &DatasetsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7352. c.resource = resource
  7353. c.testiampermissionsrequest = testiampermissionsrequest
  7354. return c
  7355. }
  7356. // Fields allows partial responses to be retrieved. See
  7357. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7358. // for more information.
  7359. func (c *DatasetsTestIamPermissionsCall) Fields(s ...googleapi.Field) *DatasetsTestIamPermissionsCall {
  7360. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7361. return c
  7362. }
  7363. // Context sets the context to be used in this call's Do method. Any
  7364. // pending HTTP request will be aborted if the provided context is
  7365. // canceled.
  7366. func (c *DatasetsTestIamPermissionsCall) Context(ctx context.Context) *DatasetsTestIamPermissionsCall {
  7367. c.ctx_ = ctx
  7368. return c
  7369. }
  7370. // Header returns an http.Header that can be modified by the caller to
  7371. // add HTTP headers to the request.
  7372. func (c *DatasetsTestIamPermissionsCall) Header() http.Header {
  7373. if c.header_ == nil {
  7374. c.header_ = make(http.Header)
  7375. }
  7376. return c.header_
  7377. }
  7378. func (c *DatasetsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
  7379. reqHeaders := make(http.Header)
  7380. for k, v := range c.header_ {
  7381. reqHeaders[k] = v
  7382. }
  7383. reqHeaders.Set("User-Agent", c.s.userAgent())
  7384. var body io.Reader = nil
  7385. body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
  7386. if err != nil {
  7387. return nil, err
  7388. }
  7389. reqHeaders.Set("Content-Type", "application/json")
  7390. c.urlParams_.Set("alt", alt)
  7391. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
  7392. urls += "?" + c.urlParams_.Encode()
  7393. req, _ := http.NewRequest("POST", urls, body)
  7394. req.Header = reqHeaders
  7395. googleapi.Expand(req.URL, map[string]string{
  7396. "resource": c.resource,
  7397. })
  7398. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7399. }
  7400. // Do executes the "genomics.datasets.testIamPermissions" call.
  7401. // Exactly one of *TestIamPermissionsResponse or error will be non-nil.
  7402. // Any non-2xx status code is an error. Response headers are in either
  7403. // *TestIamPermissionsResponse.ServerResponse.Header or (if a response
  7404. // was returned at all) in error.(*googleapi.Error).Header. Use
  7405. // googleapi.IsNotModified to check whether the returned error was
  7406. // because http.StatusNotModified was returned.
  7407. func (c *DatasetsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
  7408. gensupport.SetOptions(c.urlParams_, opts...)
  7409. res, err := c.doRequest("json")
  7410. if res != nil && res.StatusCode == http.StatusNotModified {
  7411. if res.Body != nil {
  7412. res.Body.Close()
  7413. }
  7414. return nil, &googleapi.Error{
  7415. Code: res.StatusCode,
  7416. Header: res.Header,
  7417. }
  7418. }
  7419. if err != nil {
  7420. return nil, err
  7421. }
  7422. defer googleapi.CloseBody(res)
  7423. if err := googleapi.CheckResponse(res); err != nil {
  7424. return nil, err
  7425. }
  7426. ret := &TestIamPermissionsResponse{
  7427. ServerResponse: googleapi.ServerResponse{
  7428. Header: res.Header,
  7429. HTTPStatusCode: res.StatusCode,
  7430. },
  7431. }
  7432. target := &ret
  7433. if err := gensupport.DecodeResponse(target, res); err != nil {
  7434. return nil, err
  7435. }
  7436. return ret, nil
  7437. // {
  7438. // "description": "Returns permissions that a caller has on the specified resource.\nSee \u003ca href=\"/iam/docs/managing-policies#testing_permissions\"\u003eTesting\nPermissions\u003c/a\u003e for more information.",
  7439. // "flatPath": "v1/datasets/{datasetsId}:testIamPermissions",
  7440. // "httpMethod": "POST",
  7441. // "id": "genomics.datasets.testIamPermissions",
  7442. // "parameterOrder": [
  7443. // "resource"
  7444. // ],
  7445. // "parameters": {
  7446. // "resource": {
  7447. // "description": "REQUIRED: The resource for which policy is being specified. Format is\n`datasets/\u003cdataset ID\u003e`.",
  7448. // "location": "path",
  7449. // "pattern": "^datasets/[^/]+$",
  7450. // "required": true,
  7451. // "type": "string"
  7452. // }
  7453. // },
  7454. // "path": "v1/{+resource}:testIamPermissions",
  7455. // "request": {
  7456. // "$ref": "TestIamPermissionsRequest"
  7457. // },
  7458. // "response": {
  7459. // "$ref": "TestIamPermissionsResponse"
  7460. // },
  7461. // "scopes": [
  7462. // "https://www.googleapis.com/auth/cloud-platform",
  7463. // "https://www.googleapis.com/auth/genomics"
  7464. // ]
  7465. // }
  7466. }
  7467. // method id "genomics.datasets.undelete":
  7468. type DatasetsUndeleteCall struct {
  7469. s *Service
  7470. datasetId string
  7471. undeletedatasetrequest *UndeleteDatasetRequest
  7472. urlParams_ gensupport.URLParams
  7473. ctx_ context.Context
  7474. header_ http.Header
  7475. }
  7476. // Undelete: Undeletes a dataset by restoring a dataset which was
  7477. // deleted via this API.
  7478. //
  7479. // This operation is only possible for a week after the deletion
  7480. // occurred.
  7481. func (r *DatasetsService) Undelete(datasetId string, undeletedatasetrequest *UndeleteDatasetRequest) *DatasetsUndeleteCall {
  7482. c := &DatasetsUndeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7483. c.datasetId = datasetId
  7484. c.undeletedatasetrequest = undeletedatasetrequest
  7485. return c
  7486. }
  7487. // Fields allows partial responses to be retrieved. See
  7488. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7489. // for more information.
  7490. func (c *DatasetsUndeleteCall) Fields(s ...googleapi.Field) *DatasetsUndeleteCall {
  7491. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7492. return c
  7493. }
  7494. // Context sets the context to be used in this call's Do method. Any
  7495. // pending HTTP request will be aborted if the provided context is
  7496. // canceled.
  7497. func (c *DatasetsUndeleteCall) Context(ctx context.Context) *DatasetsUndeleteCall {
  7498. c.ctx_ = ctx
  7499. return c
  7500. }
  7501. // Header returns an http.Header that can be modified by the caller to
  7502. // add HTTP headers to the request.
  7503. func (c *DatasetsUndeleteCall) Header() http.Header {
  7504. if c.header_ == nil {
  7505. c.header_ = make(http.Header)
  7506. }
  7507. return c.header_
  7508. }
  7509. func (c *DatasetsUndeleteCall) doRequest(alt string) (*http.Response, error) {
  7510. reqHeaders := make(http.Header)
  7511. for k, v := range c.header_ {
  7512. reqHeaders[k] = v
  7513. }
  7514. reqHeaders.Set("User-Agent", c.s.userAgent())
  7515. var body io.Reader = nil
  7516. body, err := googleapi.WithoutDataWrapper.JSONReader(c.undeletedatasetrequest)
  7517. if err != nil {
  7518. return nil, err
  7519. }
  7520. reqHeaders.Set("Content-Type", "application/json")
  7521. c.urlParams_.Set("alt", alt)
  7522. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets/{datasetId}:undelete")
  7523. urls += "?" + c.urlParams_.Encode()
  7524. req, _ := http.NewRequest("POST", urls, body)
  7525. req.Header = reqHeaders
  7526. googleapi.Expand(req.URL, map[string]string{
  7527. "datasetId": c.datasetId,
  7528. })
  7529. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7530. }
  7531. // Do executes the "genomics.datasets.undelete" call.
  7532. // Exactly one of *Dataset or error will be non-nil. Any non-2xx status
  7533. // code is an error. Response headers are in either
  7534. // *Dataset.ServerResponse.Header or (if a response was returned at all)
  7535. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7536. // check whether the returned error was because http.StatusNotModified
  7537. // was returned.
  7538. func (c *DatasetsUndeleteCall) Do(opts ...googleapi.CallOption) (*Dataset, error) {
  7539. gensupport.SetOptions(c.urlParams_, opts...)
  7540. res, err := c.doRequest("json")
  7541. if res != nil && res.StatusCode == http.StatusNotModified {
  7542. if res.Body != nil {
  7543. res.Body.Close()
  7544. }
  7545. return nil, &googleapi.Error{
  7546. Code: res.StatusCode,
  7547. Header: res.Header,
  7548. }
  7549. }
  7550. if err != nil {
  7551. return nil, err
  7552. }
  7553. defer googleapi.CloseBody(res)
  7554. if err := googleapi.CheckResponse(res); err != nil {
  7555. return nil, err
  7556. }
  7557. ret := &Dataset{
  7558. ServerResponse: googleapi.ServerResponse{
  7559. Header: res.Header,
  7560. HTTPStatusCode: res.StatusCode,
  7561. },
  7562. }
  7563. target := &ret
  7564. if err := gensupport.DecodeResponse(target, res); err != nil {
  7565. return nil, err
  7566. }
  7567. return ret, nil
  7568. // {
  7569. // "description": "Undeletes a dataset by restoring a dataset which was deleted via this API.\n\nThis operation is only possible for a week after the deletion occurred.",
  7570. // "flatPath": "v1/datasets/{datasetId}:undelete",
  7571. // "httpMethod": "POST",
  7572. // "id": "genomics.datasets.undelete",
  7573. // "parameterOrder": [
  7574. // "datasetId"
  7575. // ],
  7576. // "parameters": {
  7577. // "datasetId": {
  7578. // "description": "The ID of the dataset to be undeleted.",
  7579. // "location": "path",
  7580. // "required": true,
  7581. // "type": "string"
  7582. // }
  7583. // },
  7584. // "path": "v1/datasets/{datasetId}:undelete",
  7585. // "request": {
  7586. // "$ref": "UndeleteDatasetRequest"
  7587. // },
  7588. // "response": {
  7589. // "$ref": "Dataset"
  7590. // },
  7591. // "scopes": [
  7592. // "https://www.googleapis.com/auth/cloud-platform",
  7593. // "https://www.googleapis.com/auth/genomics"
  7594. // ]
  7595. // }
  7596. }
  7597. // method id "genomics.operations.cancel":
  7598. type OperationsCancelCall struct {
  7599. s *Service
  7600. name string
  7601. canceloperationrequest *CancelOperationRequest
  7602. urlParams_ gensupport.URLParams
  7603. ctx_ context.Context
  7604. header_ http.Header
  7605. }
  7606. // Cancel: Starts asynchronous cancellation on a long-running operation.
  7607. // The server makes a best effort to cancel the operation, but success
  7608. // is not guaranteed. Clients may use Operations.GetOperation or
  7609. // Operations.ListOperations to check whether the cancellation succeeded
  7610. // or the operation completed despite cancellation.
  7611. func (r *OperationsService) Cancel(name string, canceloperationrequest *CancelOperationRequest) *OperationsCancelCall {
  7612. c := &OperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7613. c.name = name
  7614. c.canceloperationrequest = canceloperationrequest
  7615. return c
  7616. }
  7617. // Fields allows partial responses to be retrieved. See
  7618. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7619. // for more information.
  7620. func (c *OperationsCancelCall) Fields(s ...googleapi.Field) *OperationsCancelCall {
  7621. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7622. return c
  7623. }
  7624. // Context sets the context to be used in this call's Do method. Any
  7625. // pending HTTP request will be aborted if the provided context is
  7626. // canceled.
  7627. func (c *OperationsCancelCall) Context(ctx context.Context) *OperationsCancelCall {
  7628. c.ctx_ = ctx
  7629. return c
  7630. }
  7631. // Header returns an http.Header that can be modified by the caller to
  7632. // add HTTP headers to the request.
  7633. func (c *OperationsCancelCall) Header() http.Header {
  7634. if c.header_ == nil {
  7635. c.header_ = make(http.Header)
  7636. }
  7637. return c.header_
  7638. }
  7639. func (c *OperationsCancelCall) doRequest(alt string) (*http.Response, error) {
  7640. reqHeaders := make(http.Header)
  7641. for k, v := range c.header_ {
  7642. reqHeaders[k] = v
  7643. }
  7644. reqHeaders.Set("User-Agent", c.s.userAgent())
  7645. var body io.Reader = nil
  7646. body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceloperationrequest)
  7647. if err != nil {
  7648. return nil, err
  7649. }
  7650. reqHeaders.Set("Content-Type", "application/json")
  7651. c.urlParams_.Set("alt", alt)
  7652. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
  7653. urls += "?" + c.urlParams_.Encode()
  7654. req, _ := http.NewRequest("POST", urls, body)
  7655. req.Header = reqHeaders
  7656. googleapi.Expand(req.URL, map[string]string{
  7657. "name": c.name,
  7658. })
  7659. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7660. }
  7661. // Do executes the "genomics.operations.cancel" call.
  7662. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  7663. // code is an error. Response headers are in either
  7664. // *Empty.ServerResponse.Header or (if a response was returned at all)
  7665. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  7666. // check whether the returned error was because http.StatusNotModified
  7667. // was returned.
  7668. func (c *OperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  7669. gensupport.SetOptions(c.urlParams_, opts...)
  7670. res, err := c.doRequest("json")
  7671. if res != nil && res.StatusCode == http.StatusNotModified {
  7672. if res.Body != nil {
  7673. res.Body.Close()
  7674. }
  7675. return nil, &googleapi.Error{
  7676. Code: res.StatusCode,
  7677. Header: res.Header,
  7678. }
  7679. }
  7680. if err != nil {
  7681. return nil, err
  7682. }
  7683. defer googleapi.CloseBody(res)
  7684. if err := googleapi.CheckResponse(res); err != nil {
  7685. return nil, err
  7686. }
  7687. ret := &Empty{
  7688. ServerResponse: googleapi.ServerResponse{
  7689. Header: res.Header,
  7690. HTTPStatusCode: res.StatusCode,
  7691. },
  7692. }
  7693. target := &ret
  7694. if err := gensupport.DecodeResponse(target, res); err != nil {
  7695. return nil, err
  7696. }
  7697. return ret, nil
  7698. // {
  7699. // "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients may use Operations.GetOperation or Operations.ListOperations to check whether the cancellation succeeded or the operation completed despite cancellation.",
  7700. // "flatPath": "v1/operations/{operationsId}:cancel",
  7701. // "httpMethod": "POST",
  7702. // "id": "genomics.operations.cancel",
  7703. // "parameterOrder": [
  7704. // "name"
  7705. // ],
  7706. // "parameters": {
  7707. // "name": {
  7708. // "description": "The name of the operation resource to be cancelled.",
  7709. // "location": "path",
  7710. // "pattern": "^operations/.+$",
  7711. // "required": true,
  7712. // "type": "string"
  7713. // }
  7714. // },
  7715. // "path": "v1/{+name}:cancel",
  7716. // "request": {
  7717. // "$ref": "CancelOperationRequest"
  7718. // },
  7719. // "response": {
  7720. // "$ref": "Empty"
  7721. // },
  7722. // "scopes": [
  7723. // "https://www.googleapis.com/auth/cloud-platform",
  7724. // "https://www.googleapis.com/auth/genomics"
  7725. // ]
  7726. // }
  7727. }
  7728. // method id "genomics.operations.get":
  7729. type OperationsGetCall struct {
  7730. s *Service
  7731. name string
  7732. urlParams_ gensupport.URLParams
  7733. ifNoneMatch_ string
  7734. ctx_ context.Context
  7735. header_ http.Header
  7736. }
  7737. // Get: Gets the latest state of a long-running operation. Clients can
  7738. // use this
  7739. // method to poll the operation result at intervals as recommended by
  7740. // the API
  7741. // service.
  7742. func (r *OperationsService) Get(name string) *OperationsGetCall {
  7743. c := &OperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7744. c.name = name
  7745. return c
  7746. }
  7747. // Fields allows partial responses to be retrieved. See
  7748. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7749. // for more information.
  7750. func (c *OperationsGetCall) Fields(s ...googleapi.Field) *OperationsGetCall {
  7751. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7752. return c
  7753. }
  7754. // IfNoneMatch sets the optional parameter which makes the operation
  7755. // fail if the object's ETag matches the given value. This is useful for
  7756. // getting updates only after the object has changed since the last
  7757. // request. Use googleapi.IsNotModified to check whether the response
  7758. // error from Do is the result of In-None-Match.
  7759. func (c *OperationsGetCall) IfNoneMatch(entityTag string) *OperationsGetCall {
  7760. c.ifNoneMatch_ = entityTag
  7761. return c
  7762. }
  7763. // Context sets the context to be used in this call's Do method. Any
  7764. // pending HTTP request will be aborted if the provided context is
  7765. // canceled.
  7766. func (c *OperationsGetCall) Context(ctx context.Context) *OperationsGetCall {
  7767. c.ctx_ = ctx
  7768. return c
  7769. }
  7770. // Header returns an http.Header that can be modified by the caller to
  7771. // add HTTP headers to the request.
  7772. func (c *OperationsGetCall) Header() http.Header {
  7773. if c.header_ == nil {
  7774. c.header_ = make(http.Header)
  7775. }
  7776. return c.header_
  7777. }
  7778. func (c *OperationsGetCall) doRequest(alt string) (*http.Response, error) {
  7779. reqHeaders := make(http.Header)
  7780. for k, v := range c.header_ {
  7781. reqHeaders[k] = v
  7782. }
  7783. reqHeaders.Set("User-Agent", c.s.userAgent())
  7784. if c.ifNoneMatch_ != "" {
  7785. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7786. }
  7787. var body io.Reader = nil
  7788. c.urlParams_.Set("alt", alt)
  7789. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7790. urls += "?" + c.urlParams_.Encode()
  7791. req, _ := http.NewRequest("GET", urls, body)
  7792. req.Header = reqHeaders
  7793. googleapi.Expand(req.URL, map[string]string{
  7794. "name": c.name,
  7795. })
  7796. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7797. }
  7798. // Do executes the "genomics.operations.get" call.
  7799. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  7800. // status code is an error. Response headers are in either
  7801. // *Operation.ServerResponse.Header or (if a response was returned at
  7802. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  7803. // to check whether the returned error was because
  7804. // http.StatusNotModified was returned.
  7805. func (c *OperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  7806. gensupport.SetOptions(c.urlParams_, opts...)
  7807. res, err := c.doRequest("json")
  7808. if res != nil && res.StatusCode == http.StatusNotModified {
  7809. if res.Body != nil {
  7810. res.Body.Close()
  7811. }
  7812. return nil, &googleapi.Error{
  7813. Code: res.StatusCode,
  7814. Header: res.Header,
  7815. }
  7816. }
  7817. if err != nil {
  7818. return nil, err
  7819. }
  7820. defer googleapi.CloseBody(res)
  7821. if err := googleapi.CheckResponse(res); err != nil {
  7822. return nil, err
  7823. }
  7824. ret := &Operation{
  7825. ServerResponse: googleapi.ServerResponse{
  7826. Header: res.Header,
  7827. HTTPStatusCode: res.StatusCode,
  7828. },
  7829. }
  7830. target := &ret
  7831. if err := gensupport.DecodeResponse(target, res); err != nil {
  7832. return nil, err
  7833. }
  7834. return ret, nil
  7835. // {
  7836. // "description": "Gets the latest state of a long-running operation. Clients can use this\nmethod to poll the operation result at intervals as recommended by the API\nservice.",
  7837. // "flatPath": "v1/operations/{operationsId}",
  7838. // "httpMethod": "GET",
  7839. // "id": "genomics.operations.get",
  7840. // "parameterOrder": [
  7841. // "name"
  7842. // ],
  7843. // "parameters": {
  7844. // "name": {
  7845. // "description": "The name of the operation resource.",
  7846. // "location": "path",
  7847. // "pattern": "^operations/.+$",
  7848. // "required": true,
  7849. // "type": "string"
  7850. // }
  7851. // },
  7852. // "path": "v1/{+name}",
  7853. // "response": {
  7854. // "$ref": "Operation"
  7855. // },
  7856. // "scopes": [
  7857. // "https://www.googleapis.com/auth/cloud-platform",
  7858. // "https://www.googleapis.com/auth/genomics"
  7859. // ]
  7860. // }
  7861. }
  7862. // method id "genomics.operations.list":
  7863. type OperationsListCall struct {
  7864. s *Service
  7865. name string
  7866. urlParams_ gensupport.URLParams
  7867. ifNoneMatch_ string
  7868. ctx_ context.Context
  7869. header_ http.Header
  7870. }
  7871. // List: Lists operations that match the specified filter in the
  7872. // request.
  7873. func (r *OperationsService) List(name string) *OperationsListCall {
  7874. c := &OperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  7875. c.name = name
  7876. return c
  7877. }
  7878. // Filter sets the optional parameter "filter": A string for filtering
  7879. // Operations.
  7880. // In v2alpha1, the following filter fields are supported&#58;
  7881. //
  7882. // * createTime&#58; The time this job was created
  7883. // * events&#58; The set of event (names) that have occurred while
  7884. // running
  7885. // the pipeline. The &#58; operator can be used to determine if a
  7886. // particular event has occurred.
  7887. // * error&#58; If the pipeline is running, this value is NULL. Once
  7888. // the
  7889. // pipeline finishes, the value is the standard Google error code.
  7890. // * labels.key or labels."key with space" where key is a label key.
  7891. //
  7892. // In v1 and v1alpha2, the following filter fields are supported&#58;
  7893. //
  7894. // * projectId&#58; Required. Corresponds to
  7895. // OperationMetadata.projectId.
  7896. // * createTime&#58; The time this job was created, in seconds from the
  7897. // [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `>=`
  7898. // and/or `<=`
  7899. // operators.
  7900. // * status&#58; Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`.
  7901. // Only
  7902. // one status may be specified.
  7903. // * labels.key where key is a label key.
  7904. //
  7905. // Examples&#58;
  7906. //
  7907. // * `projectId = my-project AND createTime >= 1432140000`
  7908. // * `projectId = my-project AND createTime >= 1432140000 AND createTime
  7909. // <= 1432150000 AND status = RUNNING`
  7910. // * `projectId = my-project AND labels.color = *`
  7911. // * `projectId = my-project AND labels.color = red`
  7912. func (c *OperationsListCall) Filter(filter string) *OperationsListCall {
  7913. c.urlParams_.Set("filter", filter)
  7914. return c
  7915. }
  7916. // PageSize sets the optional parameter "pageSize": The maximum number
  7917. // of results to return. If unspecified, defaults to
  7918. // 256. The maximum value is 2048.
  7919. func (c *OperationsListCall) PageSize(pageSize int64) *OperationsListCall {
  7920. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  7921. return c
  7922. }
  7923. // PageToken sets the optional parameter "pageToken": The standard list
  7924. // page token.
  7925. func (c *OperationsListCall) PageToken(pageToken string) *OperationsListCall {
  7926. c.urlParams_.Set("pageToken", pageToken)
  7927. return c
  7928. }
  7929. // Fields allows partial responses to be retrieved. See
  7930. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  7931. // for more information.
  7932. func (c *OperationsListCall) Fields(s ...googleapi.Field) *OperationsListCall {
  7933. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  7934. return c
  7935. }
  7936. // IfNoneMatch sets the optional parameter which makes the operation
  7937. // fail if the object's ETag matches the given value. This is useful for
  7938. // getting updates only after the object has changed since the last
  7939. // request. Use googleapi.IsNotModified to check whether the response
  7940. // error from Do is the result of In-None-Match.
  7941. func (c *OperationsListCall) IfNoneMatch(entityTag string) *OperationsListCall {
  7942. c.ifNoneMatch_ = entityTag
  7943. return c
  7944. }
  7945. // Context sets the context to be used in this call's Do method. Any
  7946. // pending HTTP request will be aborted if the provided context is
  7947. // canceled.
  7948. func (c *OperationsListCall) Context(ctx context.Context) *OperationsListCall {
  7949. c.ctx_ = ctx
  7950. return c
  7951. }
  7952. // Header returns an http.Header that can be modified by the caller to
  7953. // add HTTP headers to the request.
  7954. func (c *OperationsListCall) Header() http.Header {
  7955. if c.header_ == nil {
  7956. c.header_ = make(http.Header)
  7957. }
  7958. return c.header_
  7959. }
  7960. func (c *OperationsListCall) doRequest(alt string) (*http.Response, error) {
  7961. reqHeaders := make(http.Header)
  7962. for k, v := range c.header_ {
  7963. reqHeaders[k] = v
  7964. }
  7965. reqHeaders.Set("User-Agent", c.s.userAgent())
  7966. if c.ifNoneMatch_ != "" {
  7967. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  7968. }
  7969. var body io.Reader = nil
  7970. c.urlParams_.Set("alt", alt)
  7971. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
  7972. urls += "?" + c.urlParams_.Encode()
  7973. req, _ := http.NewRequest("GET", urls, body)
  7974. req.Header = reqHeaders
  7975. googleapi.Expand(req.URL, map[string]string{
  7976. "name": c.name,
  7977. })
  7978. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  7979. }
  7980. // Do executes the "genomics.operations.list" call.
  7981. // Exactly one of *ListOperationsResponse or error will be non-nil. Any
  7982. // non-2xx status code is an error. Response headers are in either
  7983. // *ListOperationsResponse.ServerResponse.Header or (if a response was
  7984. // returned at all) in error.(*googleapi.Error).Header. Use
  7985. // googleapi.IsNotModified to check whether the returned error was
  7986. // because http.StatusNotModified was returned.
  7987. func (c *OperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
  7988. gensupport.SetOptions(c.urlParams_, opts...)
  7989. res, err := c.doRequest("json")
  7990. if res != nil && res.StatusCode == http.StatusNotModified {
  7991. if res.Body != nil {
  7992. res.Body.Close()
  7993. }
  7994. return nil, &googleapi.Error{
  7995. Code: res.StatusCode,
  7996. Header: res.Header,
  7997. }
  7998. }
  7999. if err != nil {
  8000. return nil, err
  8001. }
  8002. defer googleapi.CloseBody(res)
  8003. if err := googleapi.CheckResponse(res); err != nil {
  8004. return nil, err
  8005. }
  8006. ret := &ListOperationsResponse{
  8007. ServerResponse: googleapi.ServerResponse{
  8008. Header: res.Header,
  8009. HTTPStatusCode: res.StatusCode,
  8010. },
  8011. }
  8012. target := &ret
  8013. if err := gensupport.DecodeResponse(target, res); err != nil {
  8014. return nil, err
  8015. }
  8016. return ret, nil
  8017. // {
  8018. // "description": "Lists operations that match the specified filter in the request.",
  8019. // "flatPath": "v1/operations",
  8020. // "httpMethod": "GET",
  8021. // "id": "genomics.operations.list",
  8022. // "parameterOrder": [
  8023. // "name"
  8024. // ],
  8025. // "parameters": {
  8026. // "filter": {
  8027. // "description": "A string for filtering Operations.\nIn v2alpha1, the following filter fields are supported\u0026#58;\n\n* createTime\u0026#58; The time this job was created\n* events\u0026#58; The set of event (names) that have occurred while running\n the pipeline. The \u0026#58; operator can be used to determine if a\n particular event has occurred.\n* error\u0026#58; If the pipeline is running, this value is NULL. Once the\n pipeline finishes, the value is the standard Google error code.\n* labels.key or labels.\"key with space\" where key is a label key.\n\nIn v1 and v1alpha2, the following filter fields are supported\u0026#58;\n\n* projectId\u0026#58; Required. Corresponds to\n OperationMetadata.projectId.\n* createTime\u0026#58; The time this job was created, in seconds from the\n [epoch](http://en.wikipedia.org/wiki/Unix_time). Can use `\u003e=` and/or `\u003c=`\n operators.\n* status\u0026#58; Can be `RUNNING`, `SUCCESS`, `FAILURE`, or `CANCELED`. Only\n one status may be specified.\n* labels.key where key is a label key.\n\nExamples\u0026#58;\n\n* `projectId = my-project AND createTime \u003e= 1432140000`\n* `projectId = my-project AND createTime \u003e= 1432140000 AND createTime \u003c= 1432150000 AND status = RUNNING`\n* `projectId = my-project AND labels.color = *`\n* `projectId = my-project AND labels.color = red`",
  8028. // "location": "query",
  8029. // "type": "string"
  8030. // },
  8031. // "name": {
  8032. // "description": "The name of the operation's parent resource.",
  8033. // "location": "path",
  8034. // "pattern": "^operations$",
  8035. // "required": true,
  8036. // "type": "string"
  8037. // },
  8038. // "pageSize": {
  8039. // "description": "The maximum number of results to return. If unspecified, defaults to\n256. The maximum value is 2048.",
  8040. // "format": "int32",
  8041. // "location": "query",
  8042. // "type": "integer"
  8043. // },
  8044. // "pageToken": {
  8045. // "description": "The standard list page token.",
  8046. // "location": "query",
  8047. // "type": "string"
  8048. // }
  8049. // },
  8050. // "path": "v1/{+name}",
  8051. // "response": {
  8052. // "$ref": "ListOperationsResponse"
  8053. // },
  8054. // "scopes": [
  8055. // "https://www.googleapis.com/auth/cloud-platform",
  8056. // "https://www.googleapis.com/auth/genomics"
  8057. // ]
  8058. // }
  8059. }
  8060. // Pages invokes f for each page of results.
  8061. // A non-nil error returned from f will halt the iteration.
  8062. // The provided context supersedes any context provided to the Context method.
  8063. func (c *OperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
  8064. c.ctx_ = ctx
  8065. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  8066. for {
  8067. x, err := c.Do()
  8068. if err != nil {
  8069. return err
  8070. }
  8071. if err := f(x); err != nil {
  8072. return err
  8073. }
  8074. if x.NextPageToken == "" {
  8075. return nil
  8076. }
  8077. c.PageToken(x.NextPageToken)
  8078. }
  8079. }
  8080. // method id "genomics.readgroupsets.delete":
  8081. type ReadgroupsetsDeleteCall struct {
  8082. s *Service
  8083. readGroupSetId string
  8084. urlParams_ gensupport.URLParams
  8085. ctx_ context.Context
  8086. header_ http.Header
  8087. }
  8088. // Delete: Deletes a read group set.
  8089. func (r *ReadgroupsetsService) Delete(readGroupSetId string) *ReadgroupsetsDeleteCall {
  8090. c := &ReadgroupsetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8091. c.readGroupSetId = readGroupSetId
  8092. return c
  8093. }
  8094. // Fields allows partial responses to be retrieved. See
  8095. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8096. // for more information.
  8097. func (c *ReadgroupsetsDeleteCall) Fields(s ...googleapi.Field) *ReadgroupsetsDeleteCall {
  8098. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8099. return c
  8100. }
  8101. // Context sets the context to be used in this call's Do method. Any
  8102. // pending HTTP request will be aborted if the provided context is
  8103. // canceled.
  8104. func (c *ReadgroupsetsDeleteCall) Context(ctx context.Context) *ReadgroupsetsDeleteCall {
  8105. c.ctx_ = ctx
  8106. return c
  8107. }
  8108. // Header returns an http.Header that can be modified by the caller to
  8109. // add HTTP headers to the request.
  8110. func (c *ReadgroupsetsDeleteCall) Header() http.Header {
  8111. if c.header_ == nil {
  8112. c.header_ = make(http.Header)
  8113. }
  8114. return c.header_
  8115. }
  8116. func (c *ReadgroupsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8117. reqHeaders := make(http.Header)
  8118. for k, v := range c.header_ {
  8119. reqHeaders[k] = v
  8120. }
  8121. reqHeaders.Set("User-Agent", c.s.userAgent())
  8122. var body io.Reader = nil
  8123. c.urlParams_.Set("alt", alt)
  8124. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}")
  8125. urls += "?" + c.urlParams_.Encode()
  8126. req, _ := http.NewRequest("DELETE", urls, body)
  8127. req.Header = reqHeaders
  8128. googleapi.Expand(req.URL, map[string]string{
  8129. "readGroupSetId": c.readGroupSetId,
  8130. })
  8131. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8132. }
  8133. // Do executes the "genomics.readgroupsets.delete" call.
  8134. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  8135. // code is an error. Response headers are in either
  8136. // *Empty.ServerResponse.Header or (if a response was returned at all)
  8137. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8138. // check whether the returned error was because http.StatusNotModified
  8139. // was returned.
  8140. func (c *ReadgroupsetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  8141. gensupport.SetOptions(c.urlParams_, opts...)
  8142. res, err := c.doRequest("json")
  8143. if res != nil && res.StatusCode == http.StatusNotModified {
  8144. if res.Body != nil {
  8145. res.Body.Close()
  8146. }
  8147. return nil, &googleapi.Error{
  8148. Code: res.StatusCode,
  8149. Header: res.Header,
  8150. }
  8151. }
  8152. if err != nil {
  8153. return nil, err
  8154. }
  8155. defer googleapi.CloseBody(res)
  8156. if err := googleapi.CheckResponse(res); err != nil {
  8157. return nil, err
  8158. }
  8159. ret := &Empty{
  8160. ServerResponse: googleapi.ServerResponse{
  8161. Header: res.Header,
  8162. HTTPStatusCode: res.StatusCode,
  8163. },
  8164. }
  8165. target := &ret
  8166. if err := gensupport.DecodeResponse(target, res); err != nil {
  8167. return nil, err
  8168. }
  8169. return ret, nil
  8170. // {
  8171. // "description": "Deletes a read group set.",
  8172. // "flatPath": "v1/readgroupsets/{readGroupSetId}",
  8173. // "httpMethod": "DELETE",
  8174. // "id": "genomics.readgroupsets.delete",
  8175. // "parameterOrder": [
  8176. // "readGroupSetId"
  8177. // ],
  8178. // "parameters": {
  8179. // "readGroupSetId": {
  8180. // "description": "The ID of the read group set to be deleted. The caller must have WRITE\npermissions to the dataset associated with this read group set.",
  8181. // "location": "path",
  8182. // "required": true,
  8183. // "type": "string"
  8184. // }
  8185. // },
  8186. // "path": "v1/readgroupsets/{readGroupSetId}",
  8187. // "response": {
  8188. // "$ref": "Empty"
  8189. // },
  8190. // "scopes": [
  8191. // "https://www.googleapis.com/auth/cloud-platform",
  8192. // "https://www.googleapis.com/auth/genomics"
  8193. // ]
  8194. // }
  8195. }
  8196. // method id "genomics.readgroupsets.export":
  8197. type ReadgroupsetsExportCall struct {
  8198. s *Service
  8199. readGroupSetId string
  8200. exportreadgroupsetrequest *ExportReadGroupSetRequest
  8201. urlParams_ gensupport.URLParams
  8202. ctx_ context.Context
  8203. header_ http.Header
  8204. }
  8205. // Export: Exports a read group set to a BAM file in Google Cloud
  8206. // Storage.
  8207. //
  8208. // Note that currently there may be some differences between exported
  8209. // BAM
  8210. // files and the original BAM file at the time of import.
  8211. // See
  8212. // ImportReadGroupSets
  8213. // for caveats.
  8214. func (r *ReadgroupsetsService) Export(readGroupSetId string, exportreadgroupsetrequest *ExportReadGroupSetRequest) *ReadgroupsetsExportCall {
  8215. c := &ReadgroupsetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8216. c.readGroupSetId = readGroupSetId
  8217. c.exportreadgroupsetrequest = exportreadgroupsetrequest
  8218. return c
  8219. }
  8220. // Fields allows partial responses to be retrieved. See
  8221. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8222. // for more information.
  8223. func (c *ReadgroupsetsExportCall) Fields(s ...googleapi.Field) *ReadgroupsetsExportCall {
  8224. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8225. return c
  8226. }
  8227. // Context sets the context to be used in this call's Do method. Any
  8228. // pending HTTP request will be aborted if the provided context is
  8229. // canceled.
  8230. func (c *ReadgroupsetsExportCall) Context(ctx context.Context) *ReadgroupsetsExportCall {
  8231. c.ctx_ = ctx
  8232. return c
  8233. }
  8234. // Header returns an http.Header that can be modified by the caller to
  8235. // add HTTP headers to the request.
  8236. func (c *ReadgroupsetsExportCall) Header() http.Header {
  8237. if c.header_ == nil {
  8238. c.header_ = make(http.Header)
  8239. }
  8240. return c.header_
  8241. }
  8242. func (c *ReadgroupsetsExportCall) doRequest(alt string) (*http.Response, error) {
  8243. reqHeaders := make(http.Header)
  8244. for k, v := range c.header_ {
  8245. reqHeaders[k] = v
  8246. }
  8247. reqHeaders.Set("User-Agent", c.s.userAgent())
  8248. var body io.Reader = nil
  8249. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportreadgroupsetrequest)
  8250. if err != nil {
  8251. return nil, err
  8252. }
  8253. reqHeaders.Set("Content-Type", "application/json")
  8254. c.urlParams_.Set("alt", alt)
  8255. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}:export")
  8256. urls += "?" + c.urlParams_.Encode()
  8257. req, _ := http.NewRequest("POST", urls, body)
  8258. req.Header = reqHeaders
  8259. googleapi.Expand(req.URL, map[string]string{
  8260. "readGroupSetId": c.readGroupSetId,
  8261. })
  8262. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8263. }
  8264. // Do executes the "genomics.readgroupsets.export" call.
  8265. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8266. // status code is an error. Response headers are in either
  8267. // *Operation.ServerResponse.Header or (if a response was returned at
  8268. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8269. // to check whether the returned error was because
  8270. // http.StatusNotModified was returned.
  8271. func (c *ReadgroupsetsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8272. gensupport.SetOptions(c.urlParams_, opts...)
  8273. res, err := c.doRequest("json")
  8274. if res != nil && res.StatusCode == http.StatusNotModified {
  8275. if res.Body != nil {
  8276. res.Body.Close()
  8277. }
  8278. return nil, &googleapi.Error{
  8279. Code: res.StatusCode,
  8280. Header: res.Header,
  8281. }
  8282. }
  8283. if err != nil {
  8284. return nil, err
  8285. }
  8286. defer googleapi.CloseBody(res)
  8287. if err := googleapi.CheckResponse(res); err != nil {
  8288. return nil, err
  8289. }
  8290. ret := &Operation{
  8291. ServerResponse: googleapi.ServerResponse{
  8292. Header: res.Header,
  8293. HTTPStatusCode: res.StatusCode,
  8294. },
  8295. }
  8296. target := &ret
  8297. if err := gensupport.DecodeResponse(target, res); err != nil {
  8298. return nil, err
  8299. }
  8300. return ret, nil
  8301. // {
  8302. // "description": "Exports a read group set to a BAM file in Google Cloud Storage.\n\nNote that currently there may be some differences between exported BAM\nfiles and the original BAM file at the time of import. See\nImportReadGroupSets\nfor caveats.",
  8303. // "flatPath": "v1/readgroupsets/{readGroupSetId}:export",
  8304. // "httpMethod": "POST",
  8305. // "id": "genomics.readgroupsets.export",
  8306. // "parameterOrder": [
  8307. // "readGroupSetId"
  8308. // ],
  8309. // "parameters": {
  8310. // "readGroupSetId": {
  8311. // "description": "Required. The ID of the read group set to export. The caller must have\nREAD access to this read group set.",
  8312. // "location": "path",
  8313. // "required": true,
  8314. // "type": "string"
  8315. // }
  8316. // },
  8317. // "path": "v1/readgroupsets/{readGroupSetId}:export",
  8318. // "request": {
  8319. // "$ref": "ExportReadGroupSetRequest"
  8320. // },
  8321. // "response": {
  8322. // "$ref": "Operation"
  8323. // },
  8324. // "scopes": [
  8325. // "https://www.googleapis.com/auth/cloud-platform",
  8326. // "https://www.googleapis.com/auth/devstorage.read_write",
  8327. // "https://www.googleapis.com/auth/genomics"
  8328. // ]
  8329. // }
  8330. }
  8331. // method id "genomics.readgroupsets.get":
  8332. type ReadgroupsetsGetCall struct {
  8333. s *Service
  8334. readGroupSetId string
  8335. urlParams_ gensupport.URLParams
  8336. ifNoneMatch_ string
  8337. ctx_ context.Context
  8338. header_ http.Header
  8339. }
  8340. // Get: Gets a read group set by ID.
  8341. func (r *ReadgroupsetsService) Get(readGroupSetId string) *ReadgroupsetsGetCall {
  8342. c := &ReadgroupsetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8343. c.readGroupSetId = readGroupSetId
  8344. return c
  8345. }
  8346. // Fields allows partial responses to be retrieved. See
  8347. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8348. // for more information.
  8349. func (c *ReadgroupsetsGetCall) Fields(s ...googleapi.Field) *ReadgroupsetsGetCall {
  8350. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8351. return c
  8352. }
  8353. // IfNoneMatch sets the optional parameter which makes the operation
  8354. // fail if the object's ETag matches the given value. This is useful for
  8355. // getting updates only after the object has changed since the last
  8356. // request. Use googleapi.IsNotModified to check whether the response
  8357. // error from Do is the result of In-None-Match.
  8358. func (c *ReadgroupsetsGetCall) IfNoneMatch(entityTag string) *ReadgroupsetsGetCall {
  8359. c.ifNoneMatch_ = entityTag
  8360. return c
  8361. }
  8362. // Context sets the context to be used in this call's Do method. Any
  8363. // pending HTTP request will be aborted if the provided context is
  8364. // canceled.
  8365. func (c *ReadgroupsetsGetCall) Context(ctx context.Context) *ReadgroupsetsGetCall {
  8366. c.ctx_ = ctx
  8367. return c
  8368. }
  8369. // Header returns an http.Header that can be modified by the caller to
  8370. // add HTTP headers to the request.
  8371. func (c *ReadgroupsetsGetCall) Header() http.Header {
  8372. if c.header_ == nil {
  8373. c.header_ = make(http.Header)
  8374. }
  8375. return c.header_
  8376. }
  8377. func (c *ReadgroupsetsGetCall) doRequest(alt string) (*http.Response, error) {
  8378. reqHeaders := make(http.Header)
  8379. for k, v := range c.header_ {
  8380. reqHeaders[k] = v
  8381. }
  8382. reqHeaders.Set("User-Agent", c.s.userAgent())
  8383. if c.ifNoneMatch_ != "" {
  8384. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8385. }
  8386. var body io.Reader = nil
  8387. c.urlParams_.Set("alt", alt)
  8388. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}")
  8389. urls += "?" + c.urlParams_.Encode()
  8390. req, _ := http.NewRequest("GET", urls, body)
  8391. req.Header = reqHeaders
  8392. googleapi.Expand(req.URL, map[string]string{
  8393. "readGroupSetId": c.readGroupSetId,
  8394. })
  8395. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8396. }
  8397. // Do executes the "genomics.readgroupsets.get" call.
  8398. // Exactly one of *ReadGroupSet or error will be non-nil. Any non-2xx
  8399. // status code is an error. Response headers are in either
  8400. // *ReadGroupSet.ServerResponse.Header or (if a response was returned at
  8401. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8402. // to check whether the returned error was because
  8403. // http.StatusNotModified was returned.
  8404. func (c *ReadgroupsetsGetCall) Do(opts ...googleapi.CallOption) (*ReadGroupSet, error) {
  8405. gensupport.SetOptions(c.urlParams_, opts...)
  8406. res, err := c.doRequest("json")
  8407. if res != nil && res.StatusCode == http.StatusNotModified {
  8408. if res.Body != nil {
  8409. res.Body.Close()
  8410. }
  8411. return nil, &googleapi.Error{
  8412. Code: res.StatusCode,
  8413. Header: res.Header,
  8414. }
  8415. }
  8416. if err != nil {
  8417. return nil, err
  8418. }
  8419. defer googleapi.CloseBody(res)
  8420. if err := googleapi.CheckResponse(res); err != nil {
  8421. return nil, err
  8422. }
  8423. ret := &ReadGroupSet{
  8424. ServerResponse: googleapi.ServerResponse{
  8425. Header: res.Header,
  8426. HTTPStatusCode: res.StatusCode,
  8427. },
  8428. }
  8429. target := &ret
  8430. if err := gensupport.DecodeResponse(target, res); err != nil {
  8431. return nil, err
  8432. }
  8433. return ret, nil
  8434. // {
  8435. // "description": "Gets a read group set by ID.",
  8436. // "flatPath": "v1/readgroupsets/{readGroupSetId}",
  8437. // "httpMethod": "GET",
  8438. // "id": "genomics.readgroupsets.get",
  8439. // "parameterOrder": [
  8440. // "readGroupSetId"
  8441. // ],
  8442. // "parameters": {
  8443. // "readGroupSetId": {
  8444. // "description": "The ID of the read group set.",
  8445. // "location": "path",
  8446. // "required": true,
  8447. // "type": "string"
  8448. // }
  8449. // },
  8450. // "path": "v1/readgroupsets/{readGroupSetId}",
  8451. // "response": {
  8452. // "$ref": "ReadGroupSet"
  8453. // },
  8454. // "scopes": [
  8455. // "https://www.googleapis.com/auth/cloud-platform",
  8456. // "https://www.googleapis.com/auth/genomics",
  8457. // "https://www.googleapis.com/auth/genomics.readonly"
  8458. // ]
  8459. // }
  8460. }
  8461. // method id "genomics.readgroupsets.import":
  8462. type ReadgroupsetsImportCall struct {
  8463. s *Service
  8464. importreadgroupsetsrequest *ImportReadGroupSetsRequest
  8465. urlParams_ gensupport.URLParams
  8466. ctx_ context.Context
  8467. header_ http.Header
  8468. }
  8469. // Import: Creates read group sets by asynchronously importing the
  8470. // provided
  8471. // information.
  8472. //
  8473. // The caller must have WRITE permissions to the dataset.
  8474. //
  8475. // ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf)
  8476. // import
  8477. //
  8478. // - Tags will be converted to strings - tag types are not preserved
  8479. // - Comments (`@CO`) in the input file header will not be preserved
  8480. // - Original header order of references (`@SQ`) will not be preserved
  8481. // - Any reverse stranded unmapped reads will be reverse complemented,
  8482. // and
  8483. // their qualities (also the "BQ" and "OQ" tags, if any) will be
  8484. // reversed
  8485. // - Unmapped reads will be stripped of positional information
  8486. // (reference name
  8487. // and position)
  8488. func (r *ReadgroupsetsService) Import(importreadgroupsetsrequest *ImportReadGroupSetsRequest) *ReadgroupsetsImportCall {
  8489. c := &ReadgroupsetsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8490. c.importreadgroupsetsrequest = importreadgroupsetsrequest
  8491. return c
  8492. }
  8493. // Fields allows partial responses to be retrieved. See
  8494. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8495. // for more information.
  8496. func (c *ReadgroupsetsImportCall) Fields(s ...googleapi.Field) *ReadgroupsetsImportCall {
  8497. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8498. return c
  8499. }
  8500. // Context sets the context to be used in this call's Do method. Any
  8501. // pending HTTP request will be aborted if the provided context is
  8502. // canceled.
  8503. func (c *ReadgroupsetsImportCall) Context(ctx context.Context) *ReadgroupsetsImportCall {
  8504. c.ctx_ = ctx
  8505. return c
  8506. }
  8507. // Header returns an http.Header that can be modified by the caller to
  8508. // add HTTP headers to the request.
  8509. func (c *ReadgroupsetsImportCall) Header() http.Header {
  8510. if c.header_ == nil {
  8511. c.header_ = make(http.Header)
  8512. }
  8513. return c.header_
  8514. }
  8515. func (c *ReadgroupsetsImportCall) doRequest(alt string) (*http.Response, error) {
  8516. reqHeaders := make(http.Header)
  8517. for k, v := range c.header_ {
  8518. reqHeaders[k] = v
  8519. }
  8520. reqHeaders.Set("User-Agent", c.s.userAgent())
  8521. var body io.Reader = nil
  8522. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importreadgroupsetsrequest)
  8523. if err != nil {
  8524. return nil, err
  8525. }
  8526. reqHeaders.Set("Content-Type", "application/json")
  8527. c.urlParams_.Set("alt", alt)
  8528. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets:import")
  8529. urls += "?" + c.urlParams_.Encode()
  8530. req, _ := http.NewRequest("POST", urls, body)
  8531. req.Header = reqHeaders
  8532. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8533. }
  8534. // Do executes the "genomics.readgroupsets.import" call.
  8535. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  8536. // status code is an error. Response headers are in either
  8537. // *Operation.ServerResponse.Header or (if a response was returned at
  8538. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8539. // to check whether the returned error was because
  8540. // http.StatusNotModified was returned.
  8541. func (c *ReadgroupsetsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  8542. gensupport.SetOptions(c.urlParams_, opts...)
  8543. res, err := c.doRequest("json")
  8544. if res != nil && res.StatusCode == http.StatusNotModified {
  8545. if res.Body != nil {
  8546. res.Body.Close()
  8547. }
  8548. return nil, &googleapi.Error{
  8549. Code: res.StatusCode,
  8550. Header: res.Header,
  8551. }
  8552. }
  8553. if err != nil {
  8554. return nil, err
  8555. }
  8556. defer googleapi.CloseBody(res)
  8557. if err := googleapi.CheckResponse(res); err != nil {
  8558. return nil, err
  8559. }
  8560. ret := &Operation{
  8561. ServerResponse: googleapi.ServerResponse{
  8562. Header: res.Header,
  8563. HTTPStatusCode: res.StatusCode,
  8564. },
  8565. }
  8566. target := &ret
  8567. if err := gensupport.DecodeResponse(target, res); err != nil {
  8568. return nil, err
  8569. }
  8570. return ret, nil
  8571. // {
  8572. // "description": "Creates read group sets by asynchronously importing the provided\ninformation.\n\nThe caller must have WRITE permissions to the dataset.\n\n## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import\n\n- Tags will be converted to strings - tag types are not preserved\n- Comments (`@CO`) in the input file header will not be preserved\n- Original header order of references (`@SQ`) will not be preserved\n- Any reverse stranded unmapped reads will be reverse complemented, and\ntheir qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed\n- Unmapped reads will be stripped of positional information (reference name\nand position)",
  8573. // "flatPath": "v1/readgroupsets:import",
  8574. // "httpMethod": "POST",
  8575. // "id": "genomics.readgroupsets.import",
  8576. // "parameterOrder": [],
  8577. // "parameters": {},
  8578. // "path": "v1/readgroupsets:import",
  8579. // "request": {
  8580. // "$ref": "ImportReadGroupSetsRequest"
  8581. // },
  8582. // "response": {
  8583. // "$ref": "Operation"
  8584. // },
  8585. // "scopes": [
  8586. // "https://www.googleapis.com/auth/cloud-platform",
  8587. // "https://www.googleapis.com/auth/devstorage.read_write",
  8588. // "https://www.googleapis.com/auth/genomics"
  8589. // ]
  8590. // }
  8591. }
  8592. // method id "genomics.readgroupsets.patch":
  8593. type ReadgroupsetsPatchCall struct {
  8594. s *Service
  8595. readGroupSetId string
  8596. readgroupset *ReadGroupSet
  8597. urlParams_ gensupport.URLParams
  8598. ctx_ context.Context
  8599. header_ http.Header
  8600. }
  8601. // Patch: Updates a read group set.
  8602. //
  8603. // This method supports patch semantics.
  8604. func (r *ReadgroupsetsService) Patch(readGroupSetId string, readgroupset *ReadGroupSet) *ReadgroupsetsPatchCall {
  8605. c := &ReadgroupsetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8606. c.readGroupSetId = readGroupSetId
  8607. c.readgroupset = readgroupset
  8608. return c
  8609. }
  8610. // UpdateMask sets the optional parameter "updateMask": An optional mask
  8611. // specifying which fields to update. Supported fields:
  8612. //
  8613. // * name.
  8614. // * referenceSetId.
  8615. //
  8616. // Leaving `updateMask` unset is equivalent to specifying all
  8617. // mutable
  8618. // fields.
  8619. func (c *ReadgroupsetsPatchCall) UpdateMask(updateMask string) *ReadgroupsetsPatchCall {
  8620. c.urlParams_.Set("updateMask", updateMask)
  8621. return c
  8622. }
  8623. // Fields allows partial responses to be retrieved. See
  8624. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8625. // for more information.
  8626. func (c *ReadgroupsetsPatchCall) Fields(s ...googleapi.Field) *ReadgroupsetsPatchCall {
  8627. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8628. return c
  8629. }
  8630. // Context sets the context to be used in this call's Do method. Any
  8631. // pending HTTP request will be aborted if the provided context is
  8632. // canceled.
  8633. func (c *ReadgroupsetsPatchCall) Context(ctx context.Context) *ReadgroupsetsPatchCall {
  8634. c.ctx_ = ctx
  8635. return c
  8636. }
  8637. // Header returns an http.Header that can be modified by the caller to
  8638. // add HTTP headers to the request.
  8639. func (c *ReadgroupsetsPatchCall) Header() http.Header {
  8640. if c.header_ == nil {
  8641. c.header_ = make(http.Header)
  8642. }
  8643. return c.header_
  8644. }
  8645. func (c *ReadgroupsetsPatchCall) doRequest(alt string) (*http.Response, error) {
  8646. reqHeaders := make(http.Header)
  8647. for k, v := range c.header_ {
  8648. reqHeaders[k] = v
  8649. }
  8650. reqHeaders.Set("User-Agent", c.s.userAgent())
  8651. var body io.Reader = nil
  8652. body, err := googleapi.WithoutDataWrapper.JSONReader(c.readgroupset)
  8653. if err != nil {
  8654. return nil, err
  8655. }
  8656. reqHeaders.Set("Content-Type", "application/json")
  8657. c.urlParams_.Set("alt", alt)
  8658. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}")
  8659. urls += "?" + c.urlParams_.Encode()
  8660. req, _ := http.NewRequest("PATCH", urls, body)
  8661. req.Header = reqHeaders
  8662. googleapi.Expand(req.URL, map[string]string{
  8663. "readGroupSetId": c.readGroupSetId,
  8664. })
  8665. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8666. }
  8667. // Do executes the "genomics.readgroupsets.patch" call.
  8668. // Exactly one of *ReadGroupSet or error will be non-nil. Any non-2xx
  8669. // status code is an error. Response headers are in either
  8670. // *ReadGroupSet.ServerResponse.Header or (if a response was returned at
  8671. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  8672. // to check whether the returned error was because
  8673. // http.StatusNotModified was returned.
  8674. func (c *ReadgroupsetsPatchCall) Do(opts ...googleapi.CallOption) (*ReadGroupSet, error) {
  8675. gensupport.SetOptions(c.urlParams_, opts...)
  8676. res, err := c.doRequest("json")
  8677. if res != nil && res.StatusCode == http.StatusNotModified {
  8678. if res.Body != nil {
  8679. res.Body.Close()
  8680. }
  8681. return nil, &googleapi.Error{
  8682. Code: res.StatusCode,
  8683. Header: res.Header,
  8684. }
  8685. }
  8686. if err != nil {
  8687. return nil, err
  8688. }
  8689. defer googleapi.CloseBody(res)
  8690. if err := googleapi.CheckResponse(res); err != nil {
  8691. return nil, err
  8692. }
  8693. ret := &ReadGroupSet{
  8694. ServerResponse: googleapi.ServerResponse{
  8695. Header: res.Header,
  8696. HTTPStatusCode: res.StatusCode,
  8697. },
  8698. }
  8699. target := &ret
  8700. if err := gensupport.DecodeResponse(target, res); err != nil {
  8701. return nil, err
  8702. }
  8703. return ret, nil
  8704. // {
  8705. // "description": "Updates a read group set.\n\nThis method supports patch semantics.",
  8706. // "flatPath": "v1/readgroupsets/{readGroupSetId}",
  8707. // "httpMethod": "PATCH",
  8708. // "id": "genomics.readgroupsets.patch",
  8709. // "parameterOrder": [
  8710. // "readGroupSetId"
  8711. // ],
  8712. // "parameters": {
  8713. // "readGroupSetId": {
  8714. // "description": "The ID of the read group set to be updated. The caller must have WRITE\npermissions to the dataset associated with this read group set.",
  8715. // "location": "path",
  8716. // "required": true,
  8717. // "type": "string"
  8718. // },
  8719. // "updateMask": {
  8720. // "description": "An optional mask specifying which fields to update. Supported fields:\n\n* name.\n* referenceSetId.\n\nLeaving `updateMask` unset is equivalent to specifying all mutable\nfields.",
  8721. // "format": "google-fieldmask",
  8722. // "location": "query",
  8723. // "type": "string"
  8724. // }
  8725. // },
  8726. // "path": "v1/readgroupsets/{readGroupSetId}",
  8727. // "request": {
  8728. // "$ref": "ReadGroupSet"
  8729. // },
  8730. // "response": {
  8731. // "$ref": "ReadGroupSet"
  8732. // },
  8733. // "scopes": [
  8734. // "https://www.googleapis.com/auth/cloud-platform",
  8735. // "https://www.googleapis.com/auth/genomics"
  8736. // ]
  8737. // }
  8738. }
  8739. // method id "genomics.readgroupsets.search":
  8740. type ReadgroupsetsSearchCall struct {
  8741. s *Service
  8742. searchreadgroupsetsrequest *SearchReadGroupSetsRequest
  8743. urlParams_ gensupport.URLParams
  8744. ctx_ context.Context
  8745. header_ http.Header
  8746. }
  8747. // Search: Searches for read group sets matching the
  8748. // criteria.
  8749. //
  8750. // Implements
  8751. // [GlobalAllianceApi.searchReadGroupSets](https://
  8752. // github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmetho
  8753. // ds.avdl#L135).
  8754. func (r *ReadgroupsetsService) Search(searchreadgroupsetsrequest *SearchReadGroupSetsRequest) *ReadgroupsetsSearchCall {
  8755. c := &ReadgroupsetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8756. c.searchreadgroupsetsrequest = searchreadgroupsetsrequest
  8757. return c
  8758. }
  8759. // Fields allows partial responses to be retrieved. See
  8760. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8761. // for more information.
  8762. func (c *ReadgroupsetsSearchCall) Fields(s ...googleapi.Field) *ReadgroupsetsSearchCall {
  8763. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8764. return c
  8765. }
  8766. // Context sets the context to be used in this call's Do method. Any
  8767. // pending HTTP request will be aborted if the provided context is
  8768. // canceled.
  8769. func (c *ReadgroupsetsSearchCall) Context(ctx context.Context) *ReadgroupsetsSearchCall {
  8770. c.ctx_ = ctx
  8771. return c
  8772. }
  8773. // Header returns an http.Header that can be modified by the caller to
  8774. // add HTTP headers to the request.
  8775. func (c *ReadgroupsetsSearchCall) Header() http.Header {
  8776. if c.header_ == nil {
  8777. c.header_ = make(http.Header)
  8778. }
  8779. return c.header_
  8780. }
  8781. func (c *ReadgroupsetsSearchCall) doRequest(alt string) (*http.Response, error) {
  8782. reqHeaders := make(http.Header)
  8783. for k, v := range c.header_ {
  8784. reqHeaders[k] = v
  8785. }
  8786. reqHeaders.Set("User-Agent", c.s.userAgent())
  8787. var body io.Reader = nil
  8788. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadgroupsetsrequest)
  8789. if err != nil {
  8790. return nil, err
  8791. }
  8792. reqHeaders.Set("Content-Type", "application/json")
  8793. c.urlParams_.Set("alt", alt)
  8794. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/search")
  8795. urls += "?" + c.urlParams_.Encode()
  8796. req, _ := http.NewRequest("POST", urls, body)
  8797. req.Header = reqHeaders
  8798. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8799. }
  8800. // Do executes the "genomics.readgroupsets.search" call.
  8801. // Exactly one of *SearchReadGroupSetsResponse or error will be non-nil.
  8802. // Any non-2xx status code is an error. Response headers are in either
  8803. // *SearchReadGroupSetsResponse.ServerResponse.Header or (if a response
  8804. // was returned at all) in error.(*googleapi.Error).Header. Use
  8805. // googleapi.IsNotModified to check whether the returned error was
  8806. // because http.StatusNotModified was returned.
  8807. func (c *ReadgroupsetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchReadGroupSetsResponse, error) {
  8808. gensupport.SetOptions(c.urlParams_, opts...)
  8809. res, err := c.doRequest("json")
  8810. if res != nil && res.StatusCode == http.StatusNotModified {
  8811. if res.Body != nil {
  8812. res.Body.Close()
  8813. }
  8814. return nil, &googleapi.Error{
  8815. Code: res.StatusCode,
  8816. Header: res.Header,
  8817. }
  8818. }
  8819. if err != nil {
  8820. return nil, err
  8821. }
  8822. defer googleapi.CloseBody(res)
  8823. if err := googleapi.CheckResponse(res); err != nil {
  8824. return nil, err
  8825. }
  8826. ret := &SearchReadGroupSetsResponse{
  8827. ServerResponse: googleapi.ServerResponse{
  8828. Header: res.Header,
  8829. HTTPStatusCode: res.StatusCode,
  8830. },
  8831. }
  8832. target := &ret
  8833. if err := gensupport.DecodeResponse(target, res); err != nil {
  8834. return nil, err
  8835. }
  8836. return ret, nil
  8837. // {
  8838. // "description": "Searches for read group sets matching the criteria.\n\nImplements\n[GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135).",
  8839. // "flatPath": "v1/readgroupsets/search",
  8840. // "httpMethod": "POST",
  8841. // "id": "genomics.readgroupsets.search",
  8842. // "parameterOrder": [],
  8843. // "parameters": {},
  8844. // "path": "v1/readgroupsets/search",
  8845. // "request": {
  8846. // "$ref": "SearchReadGroupSetsRequest"
  8847. // },
  8848. // "response": {
  8849. // "$ref": "SearchReadGroupSetsResponse"
  8850. // },
  8851. // "scopes": [
  8852. // "https://www.googleapis.com/auth/cloud-platform",
  8853. // "https://www.googleapis.com/auth/genomics",
  8854. // "https://www.googleapis.com/auth/genomics.readonly"
  8855. // ]
  8856. // }
  8857. }
  8858. // Pages invokes f for each page of results.
  8859. // A non-nil error returned from f will halt the iteration.
  8860. // The provided context supersedes any context provided to the Context method.
  8861. func (c *ReadgroupsetsSearchCall) Pages(ctx context.Context, f func(*SearchReadGroupSetsResponse) error) error {
  8862. c.ctx_ = ctx
  8863. defer func(pt string) { c.searchreadgroupsetsrequest.PageToken = pt }(c.searchreadgroupsetsrequest.PageToken) // reset paging to original point
  8864. for {
  8865. x, err := c.Do()
  8866. if err != nil {
  8867. return err
  8868. }
  8869. if err := f(x); err != nil {
  8870. return err
  8871. }
  8872. if x.NextPageToken == "" {
  8873. return nil
  8874. }
  8875. c.searchreadgroupsetsrequest.PageToken = x.NextPageToken
  8876. }
  8877. }
  8878. // method id "genomics.readgroupsets.coveragebuckets.list":
  8879. type ReadgroupsetsCoveragebucketsListCall struct {
  8880. s *Service
  8881. readGroupSetId string
  8882. urlParams_ gensupport.URLParams
  8883. ifNoneMatch_ string
  8884. ctx_ context.Context
  8885. header_ http.Header
  8886. }
  8887. // List: Lists fixed width coverage buckets for a read group set, each
  8888. // of which
  8889. // correspond to a range of a reference sequence. Each bucket
  8890. // summarizes
  8891. // coverage information across its corresponding genomic
  8892. // range.
  8893. //
  8894. // Coverage is defined as the number of reads which are aligned to a
  8895. // given
  8896. // base in the reference sequence. Coverage buckets are available at
  8897. // several
  8898. // precomputed bucket widths, enabling retrieval of various coverage
  8899. // 'zoom
  8900. // levels'. The caller must have READ permissions for the target read
  8901. // group
  8902. // set.
  8903. func (r *ReadgroupsetsCoveragebucketsService) List(readGroupSetId string) *ReadgroupsetsCoveragebucketsListCall {
  8904. c := &ReadgroupsetsCoveragebucketsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8905. c.readGroupSetId = readGroupSetId
  8906. return c
  8907. }
  8908. // End sets the optional parameter "end": The end position of the range
  8909. // on the reference, 0-based exclusive. If
  8910. // specified, `referenceName` must also be specified. If unset or 0,
  8911. // defaults
  8912. // to the length of the reference.
  8913. func (c *ReadgroupsetsCoveragebucketsListCall) End(end int64) *ReadgroupsetsCoveragebucketsListCall {
  8914. c.urlParams_.Set("end", fmt.Sprint(end))
  8915. return c
  8916. }
  8917. // PageSize sets the optional parameter "pageSize": The maximum number
  8918. // of results to return in a single page. If unspecified,
  8919. // defaults to 1024. The maximum value is 2048.
  8920. func (c *ReadgroupsetsCoveragebucketsListCall) PageSize(pageSize int64) *ReadgroupsetsCoveragebucketsListCall {
  8921. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  8922. return c
  8923. }
  8924. // PageToken sets the optional parameter "pageToken": The continuation
  8925. // token, which is used to page through large result sets.
  8926. // To get the next page of results, set this parameter to the value
  8927. // of
  8928. // `nextPageToken` from the previous response.
  8929. func (c *ReadgroupsetsCoveragebucketsListCall) PageToken(pageToken string) *ReadgroupsetsCoveragebucketsListCall {
  8930. c.urlParams_.Set("pageToken", pageToken)
  8931. return c
  8932. }
  8933. // ReferenceName sets the optional parameter "referenceName": The name
  8934. // of the reference to query, within the reference set associated
  8935. // with this query.
  8936. func (c *ReadgroupsetsCoveragebucketsListCall) ReferenceName(referenceName string) *ReadgroupsetsCoveragebucketsListCall {
  8937. c.urlParams_.Set("referenceName", referenceName)
  8938. return c
  8939. }
  8940. // Start sets the optional parameter "start": The start position of the
  8941. // range on the reference, 0-based inclusive. If
  8942. // specified, `referenceName` must also be specified. Defaults to 0.
  8943. func (c *ReadgroupsetsCoveragebucketsListCall) Start(start int64) *ReadgroupsetsCoveragebucketsListCall {
  8944. c.urlParams_.Set("start", fmt.Sprint(start))
  8945. return c
  8946. }
  8947. // TargetBucketWidth sets the optional parameter "targetBucketWidth":
  8948. // The desired width of each reported coverage bucket in base pairs.
  8949. // This
  8950. // will be rounded down to the nearest precomputed bucket width; the
  8951. // value
  8952. // of which is returned as `bucketWidth` in the response. Defaults
  8953. // to infinity (each bucket spans an entire reference sequence) or the
  8954. // length
  8955. // of the target range, if specified. The smallest
  8956. // precomputed
  8957. // `bucketWidth` is currently 2048 base pairs; this is subject
  8958. // to
  8959. // change.
  8960. func (c *ReadgroupsetsCoveragebucketsListCall) TargetBucketWidth(targetBucketWidth int64) *ReadgroupsetsCoveragebucketsListCall {
  8961. c.urlParams_.Set("targetBucketWidth", fmt.Sprint(targetBucketWidth))
  8962. return c
  8963. }
  8964. // Fields allows partial responses to be retrieved. See
  8965. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8966. // for more information.
  8967. func (c *ReadgroupsetsCoveragebucketsListCall) Fields(s ...googleapi.Field) *ReadgroupsetsCoveragebucketsListCall {
  8968. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8969. return c
  8970. }
  8971. // IfNoneMatch sets the optional parameter which makes the operation
  8972. // fail if the object's ETag matches the given value. This is useful for
  8973. // getting updates only after the object has changed since the last
  8974. // request. Use googleapi.IsNotModified to check whether the response
  8975. // error from Do is the result of In-None-Match.
  8976. func (c *ReadgroupsetsCoveragebucketsListCall) IfNoneMatch(entityTag string) *ReadgroupsetsCoveragebucketsListCall {
  8977. c.ifNoneMatch_ = entityTag
  8978. return c
  8979. }
  8980. // Context sets the context to be used in this call's Do method. Any
  8981. // pending HTTP request will be aborted if the provided context is
  8982. // canceled.
  8983. func (c *ReadgroupsetsCoveragebucketsListCall) Context(ctx context.Context) *ReadgroupsetsCoveragebucketsListCall {
  8984. c.ctx_ = ctx
  8985. return c
  8986. }
  8987. // Header returns an http.Header that can be modified by the caller to
  8988. // add HTTP headers to the request.
  8989. func (c *ReadgroupsetsCoveragebucketsListCall) Header() http.Header {
  8990. if c.header_ == nil {
  8991. c.header_ = make(http.Header)
  8992. }
  8993. return c.header_
  8994. }
  8995. func (c *ReadgroupsetsCoveragebucketsListCall) doRequest(alt string) (*http.Response, error) {
  8996. reqHeaders := make(http.Header)
  8997. for k, v := range c.header_ {
  8998. reqHeaders[k] = v
  8999. }
  9000. reqHeaders.Set("User-Agent", c.s.userAgent())
  9001. if c.ifNoneMatch_ != "" {
  9002. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9003. }
  9004. var body io.Reader = nil
  9005. c.urlParams_.Set("alt", alt)
  9006. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/readgroupsets/{readGroupSetId}/coveragebuckets")
  9007. urls += "?" + c.urlParams_.Encode()
  9008. req, _ := http.NewRequest("GET", urls, body)
  9009. req.Header = reqHeaders
  9010. googleapi.Expand(req.URL, map[string]string{
  9011. "readGroupSetId": c.readGroupSetId,
  9012. })
  9013. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9014. }
  9015. // Do executes the "genomics.readgroupsets.coveragebuckets.list" call.
  9016. // Exactly one of *ListCoverageBucketsResponse or error will be non-nil.
  9017. // Any non-2xx status code is an error. Response headers are in either
  9018. // *ListCoverageBucketsResponse.ServerResponse.Header or (if a response
  9019. // was returned at all) in error.(*googleapi.Error).Header. Use
  9020. // googleapi.IsNotModified to check whether the returned error was
  9021. // because http.StatusNotModified was returned.
  9022. func (c *ReadgroupsetsCoveragebucketsListCall) Do(opts ...googleapi.CallOption) (*ListCoverageBucketsResponse, error) {
  9023. gensupport.SetOptions(c.urlParams_, opts...)
  9024. res, err := c.doRequest("json")
  9025. if res != nil && res.StatusCode == http.StatusNotModified {
  9026. if res.Body != nil {
  9027. res.Body.Close()
  9028. }
  9029. return nil, &googleapi.Error{
  9030. Code: res.StatusCode,
  9031. Header: res.Header,
  9032. }
  9033. }
  9034. if err != nil {
  9035. return nil, err
  9036. }
  9037. defer googleapi.CloseBody(res)
  9038. if err := googleapi.CheckResponse(res); err != nil {
  9039. return nil, err
  9040. }
  9041. ret := &ListCoverageBucketsResponse{
  9042. ServerResponse: googleapi.ServerResponse{
  9043. Header: res.Header,
  9044. HTTPStatusCode: res.StatusCode,
  9045. },
  9046. }
  9047. target := &ret
  9048. if err := gensupport.DecodeResponse(target, res); err != nil {
  9049. return nil, err
  9050. }
  9051. return ret, nil
  9052. // {
  9053. // "description": "Lists fixed width coverage buckets for a read group set, each of which\ncorrespond to a range of a reference sequence. Each bucket summarizes\ncoverage information across its corresponding genomic range.\n\nCoverage is defined as the number of reads which are aligned to a given\nbase in the reference sequence. Coverage buckets are available at several\nprecomputed bucket widths, enabling retrieval of various coverage 'zoom\nlevels'. The caller must have READ permissions for the target read group\nset.",
  9054. // "flatPath": "v1/readgroupsets/{readGroupSetId}/coveragebuckets",
  9055. // "httpMethod": "GET",
  9056. // "id": "genomics.readgroupsets.coveragebuckets.list",
  9057. // "parameterOrder": [
  9058. // "readGroupSetId"
  9059. // ],
  9060. // "parameters": {
  9061. // "end": {
  9062. // "description": "The end position of the range on the reference, 0-based exclusive. If\nspecified, `referenceName` must also be specified. If unset or 0, defaults\nto the length of the reference.",
  9063. // "format": "int64",
  9064. // "location": "query",
  9065. // "type": "string"
  9066. // },
  9067. // "pageSize": {
  9068. // "description": "The maximum number of results to return in a single page. If unspecified,\ndefaults to 1024. The maximum value is 2048.",
  9069. // "format": "int32",
  9070. // "location": "query",
  9071. // "type": "integer"
  9072. // },
  9073. // "pageToken": {
  9074. // "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.",
  9075. // "location": "query",
  9076. // "type": "string"
  9077. // },
  9078. // "readGroupSetId": {
  9079. // "description": "Required. The ID of the read group set over which coverage is requested.",
  9080. // "location": "path",
  9081. // "required": true,
  9082. // "type": "string"
  9083. // },
  9084. // "referenceName": {
  9085. // "description": "The name of the reference to query, within the reference set associated\nwith this query. Optional.",
  9086. // "location": "query",
  9087. // "type": "string"
  9088. // },
  9089. // "start": {
  9090. // "description": "The start position of the range on the reference, 0-based inclusive. If\nspecified, `referenceName` must also be specified. Defaults to 0.",
  9091. // "format": "int64",
  9092. // "location": "query",
  9093. // "type": "string"
  9094. // },
  9095. // "targetBucketWidth": {
  9096. // "description": "The desired width of each reported coverage bucket in base pairs. This\nwill be rounded down to the nearest precomputed bucket width; the value\nof which is returned as `bucketWidth` in the response. Defaults\nto infinity (each bucket spans an entire reference sequence) or the length\nof the target range, if specified. The smallest precomputed\n`bucketWidth` is currently 2048 base pairs; this is subject to\nchange.",
  9097. // "format": "int64",
  9098. // "location": "query",
  9099. // "type": "string"
  9100. // }
  9101. // },
  9102. // "path": "v1/readgroupsets/{readGroupSetId}/coveragebuckets",
  9103. // "response": {
  9104. // "$ref": "ListCoverageBucketsResponse"
  9105. // },
  9106. // "scopes": [
  9107. // "https://www.googleapis.com/auth/cloud-platform",
  9108. // "https://www.googleapis.com/auth/genomics",
  9109. // "https://www.googleapis.com/auth/genomics.readonly"
  9110. // ]
  9111. // }
  9112. }
  9113. // Pages invokes f for each page of results.
  9114. // A non-nil error returned from f will halt the iteration.
  9115. // The provided context supersedes any context provided to the Context method.
  9116. func (c *ReadgroupsetsCoveragebucketsListCall) Pages(ctx context.Context, f func(*ListCoverageBucketsResponse) error) error {
  9117. c.ctx_ = ctx
  9118. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9119. for {
  9120. x, err := c.Do()
  9121. if err != nil {
  9122. return err
  9123. }
  9124. if err := f(x); err != nil {
  9125. return err
  9126. }
  9127. if x.NextPageToken == "" {
  9128. return nil
  9129. }
  9130. c.PageToken(x.NextPageToken)
  9131. }
  9132. }
  9133. // method id "genomics.reads.search":
  9134. type ReadsSearchCall struct {
  9135. s *Service
  9136. searchreadsrequest *SearchReadsRequest
  9137. urlParams_ gensupport.URLParams
  9138. ctx_ context.Context
  9139. header_ http.Header
  9140. }
  9141. // Search: Gets a list of reads for one or more read group sets.
  9142. //
  9143. // Reads search operates over a genomic coordinate space of reference
  9144. // sequence
  9145. // & position defined over the reference sequences to which the
  9146. // requested
  9147. // read group sets are aligned.
  9148. //
  9149. // If a target positional range is specified, search returns all reads
  9150. // whose
  9151. // alignment to the reference genome overlap the range. A query
  9152. // which
  9153. // specifies only read group set IDs yields all reads in those read
  9154. // group
  9155. // sets, including unmapped reads.
  9156. //
  9157. // All reads returned (including reads on subsequent pages) are ordered
  9158. // by
  9159. // genomic coordinate (by reference sequence, then position). Reads
  9160. // with
  9161. // equivalent genomic coordinates are returned in an unspecified order.
  9162. // This
  9163. // order is consistent, such that two queries for the same content
  9164. // (regardless
  9165. // of page size) yield reads in the same order across their respective
  9166. // streams
  9167. // of paginated
  9168. // responses.
  9169. //
  9170. // Implements
  9171. // [GlobalAllianceApi.searchReads](https://github.
  9172. // com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl
  9173. // #L85).
  9174. func (r *ReadsService) Search(searchreadsrequest *SearchReadsRequest) *ReadsSearchCall {
  9175. c := &ReadsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9176. c.searchreadsrequest = searchreadsrequest
  9177. return c
  9178. }
  9179. // Fields allows partial responses to be retrieved. See
  9180. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9181. // for more information.
  9182. func (c *ReadsSearchCall) Fields(s ...googleapi.Field) *ReadsSearchCall {
  9183. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9184. return c
  9185. }
  9186. // Context sets the context to be used in this call's Do method. Any
  9187. // pending HTTP request will be aborted if the provided context is
  9188. // canceled.
  9189. func (c *ReadsSearchCall) Context(ctx context.Context) *ReadsSearchCall {
  9190. c.ctx_ = ctx
  9191. return c
  9192. }
  9193. // Header returns an http.Header that can be modified by the caller to
  9194. // add HTTP headers to the request.
  9195. func (c *ReadsSearchCall) Header() http.Header {
  9196. if c.header_ == nil {
  9197. c.header_ = make(http.Header)
  9198. }
  9199. return c.header_
  9200. }
  9201. func (c *ReadsSearchCall) doRequest(alt string) (*http.Response, error) {
  9202. reqHeaders := make(http.Header)
  9203. for k, v := range c.header_ {
  9204. reqHeaders[k] = v
  9205. }
  9206. reqHeaders.Set("User-Agent", c.s.userAgent())
  9207. var body io.Reader = nil
  9208. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreadsrequest)
  9209. if err != nil {
  9210. return nil, err
  9211. }
  9212. reqHeaders.Set("Content-Type", "application/json")
  9213. c.urlParams_.Set("alt", alt)
  9214. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/reads/search")
  9215. urls += "?" + c.urlParams_.Encode()
  9216. req, _ := http.NewRequest("POST", urls, body)
  9217. req.Header = reqHeaders
  9218. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9219. }
  9220. // Do executes the "genomics.reads.search" call.
  9221. // Exactly one of *SearchReadsResponse or error will be non-nil. Any
  9222. // non-2xx status code is an error. Response headers are in either
  9223. // *SearchReadsResponse.ServerResponse.Header or (if a response was
  9224. // returned at all) in error.(*googleapi.Error).Header. Use
  9225. // googleapi.IsNotModified to check whether the returned error was
  9226. // because http.StatusNotModified was returned.
  9227. func (c *ReadsSearchCall) Do(opts ...googleapi.CallOption) (*SearchReadsResponse, error) {
  9228. gensupport.SetOptions(c.urlParams_, opts...)
  9229. res, err := c.doRequest("json")
  9230. if res != nil && res.StatusCode == http.StatusNotModified {
  9231. if res.Body != nil {
  9232. res.Body.Close()
  9233. }
  9234. return nil, &googleapi.Error{
  9235. Code: res.StatusCode,
  9236. Header: res.Header,
  9237. }
  9238. }
  9239. if err != nil {
  9240. return nil, err
  9241. }
  9242. defer googleapi.CloseBody(res)
  9243. if err := googleapi.CheckResponse(res); err != nil {
  9244. return nil, err
  9245. }
  9246. ret := &SearchReadsResponse{
  9247. ServerResponse: googleapi.ServerResponse{
  9248. Header: res.Header,
  9249. HTTPStatusCode: res.StatusCode,
  9250. },
  9251. }
  9252. target := &ret
  9253. if err := gensupport.DecodeResponse(target, res); err != nil {
  9254. return nil, err
  9255. }
  9256. return ret, nil
  9257. // {
  9258. // "description": "Gets a list of reads for one or more read group sets.\n\nReads search operates over a genomic coordinate space of reference sequence\n\u0026 position defined over the reference sequences to which the requested\nread group sets are aligned.\n\nIf a target positional range is specified, search returns all reads whose\nalignment to the reference genome overlap the range. A query which\nspecifies only read group set IDs yields all reads in those read group\nsets, including unmapped reads.\n\nAll reads returned (including reads on subsequent pages) are ordered by\ngenomic coordinate (by reference sequence, then position). Reads with\nequivalent genomic coordinates are returned in an unspecified order. This\norder is consistent, such that two queries for the same content (regardless\nof page size) yield reads in the same order across their respective streams\nof paginated responses.\n\nImplements\n[GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85).",
  9259. // "flatPath": "v1/reads/search",
  9260. // "httpMethod": "POST",
  9261. // "id": "genomics.reads.search",
  9262. // "parameterOrder": [],
  9263. // "parameters": {},
  9264. // "path": "v1/reads/search",
  9265. // "request": {
  9266. // "$ref": "SearchReadsRequest"
  9267. // },
  9268. // "response": {
  9269. // "$ref": "SearchReadsResponse"
  9270. // },
  9271. // "scopes": [
  9272. // "https://www.googleapis.com/auth/cloud-platform",
  9273. // "https://www.googleapis.com/auth/genomics",
  9274. // "https://www.googleapis.com/auth/genomics.readonly"
  9275. // ]
  9276. // }
  9277. }
  9278. // Pages invokes f for each page of results.
  9279. // A non-nil error returned from f will halt the iteration.
  9280. // The provided context supersedes any context provided to the Context method.
  9281. func (c *ReadsSearchCall) Pages(ctx context.Context, f func(*SearchReadsResponse) error) error {
  9282. c.ctx_ = ctx
  9283. defer func(pt string) { c.searchreadsrequest.PageToken = pt }(c.searchreadsrequest.PageToken) // reset paging to original point
  9284. for {
  9285. x, err := c.Do()
  9286. if err != nil {
  9287. return err
  9288. }
  9289. if err := f(x); err != nil {
  9290. return err
  9291. }
  9292. if x.NextPageToken == "" {
  9293. return nil
  9294. }
  9295. c.searchreadsrequest.PageToken = x.NextPageToken
  9296. }
  9297. }
  9298. // method id "genomics.references.get":
  9299. type ReferencesGetCall struct {
  9300. s *Service
  9301. referenceId string
  9302. urlParams_ gensupport.URLParams
  9303. ifNoneMatch_ string
  9304. ctx_ context.Context
  9305. header_ http.Header
  9306. }
  9307. // Get: Gets a
  9308. // reference.
  9309. //
  9310. // Implements
  9311. // [GlobalAllianceApi.getReference](https://github
  9312. // .com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethod
  9313. // s.avdl#L158).
  9314. func (r *ReferencesService) Get(referenceId string) *ReferencesGetCall {
  9315. c := &ReferencesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9316. c.referenceId = referenceId
  9317. return c
  9318. }
  9319. // Fields allows partial responses to be retrieved. See
  9320. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9321. // for more information.
  9322. func (c *ReferencesGetCall) Fields(s ...googleapi.Field) *ReferencesGetCall {
  9323. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9324. return c
  9325. }
  9326. // IfNoneMatch sets the optional parameter which makes the operation
  9327. // fail if the object's ETag matches the given value. This is useful for
  9328. // getting updates only after the object has changed since the last
  9329. // request. Use googleapi.IsNotModified to check whether the response
  9330. // error from Do is the result of In-None-Match.
  9331. func (c *ReferencesGetCall) IfNoneMatch(entityTag string) *ReferencesGetCall {
  9332. c.ifNoneMatch_ = entityTag
  9333. return c
  9334. }
  9335. // Context sets the context to be used in this call's Do method. Any
  9336. // pending HTTP request will be aborted if the provided context is
  9337. // canceled.
  9338. func (c *ReferencesGetCall) Context(ctx context.Context) *ReferencesGetCall {
  9339. c.ctx_ = ctx
  9340. return c
  9341. }
  9342. // Header returns an http.Header that can be modified by the caller to
  9343. // add HTTP headers to the request.
  9344. func (c *ReferencesGetCall) Header() http.Header {
  9345. if c.header_ == nil {
  9346. c.header_ = make(http.Header)
  9347. }
  9348. return c.header_
  9349. }
  9350. func (c *ReferencesGetCall) doRequest(alt string) (*http.Response, error) {
  9351. reqHeaders := make(http.Header)
  9352. for k, v := range c.header_ {
  9353. reqHeaders[k] = v
  9354. }
  9355. reqHeaders.Set("User-Agent", c.s.userAgent())
  9356. if c.ifNoneMatch_ != "" {
  9357. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9358. }
  9359. var body io.Reader = nil
  9360. c.urlParams_.Set("alt", alt)
  9361. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/references/{referenceId}")
  9362. urls += "?" + c.urlParams_.Encode()
  9363. req, _ := http.NewRequest("GET", urls, body)
  9364. req.Header = reqHeaders
  9365. googleapi.Expand(req.URL, map[string]string{
  9366. "referenceId": c.referenceId,
  9367. })
  9368. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9369. }
  9370. // Do executes the "genomics.references.get" call.
  9371. // Exactly one of *Reference or error will be non-nil. Any non-2xx
  9372. // status code is an error. Response headers are in either
  9373. // *Reference.ServerResponse.Header or (if a response was returned at
  9374. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9375. // to check whether the returned error was because
  9376. // http.StatusNotModified was returned.
  9377. func (c *ReferencesGetCall) Do(opts ...googleapi.CallOption) (*Reference, error) {
  9378. gensupport.SetOptions(c.urlParams_, opts...)
  9379. res, err := c.doRequest("json")
  9380. if res != nil && res.StatusCode == http.StatusNotModified {
  9381. if res.Body != nil {
  9382. res.Body.Close()
  9383. }
  9384. return nil, &googleapi.Error{
  9385. Code: res.StatusCode,
  9386. Header: res.Header,
  9387. }
  9388. }
  9389. if err != nil {
  9390. return nil, err
  9391. }
  9392. defer googleapi.CloseBody(res)
  9393. if err := googleapi.CheckResponse(res); err != nil {
  9394. return nil, err
  9395. }
  9396. ret := &Reference{
  9397. ServerResponse: googleapi.ServerResponse{
  9398. Header: res.Header,
  9399. HTTPStatusCode: res.StatusCode,
  9400. },
  9401. }
  9402. target := &ret
  9403. if err := gensupport.DecodeResponse(target, res); err != nil {
  9404. return nil, err
  9405. }
  9406. return ret, nil
  9407. // {
  9408. // "description": "Gets a reference.\n\nImplements\n[GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158).",
  9409. // "flatPath": "v1/references/{referenceId}",
  9410. // "httpMethod": "GET",
  9411. // "id": "genomics.references.get",
  9412. // "parameterOrder": [
  9413. // "referenceId"
  9414. // ],
  9415. // "parameters": {
  9416. // "referenceId": {
  9417. // "description": "The ID of the reference.",
  9418. // "location": "path",
  9419. // "required": true,
  9420. // "type": "string"
  9421. // }
  9422. // },
  9423. // "path": "v1/references/{referenceId}",
  9424. // "response": {
  9425. // "$ref": "Reference"
  9426. // },
  9427. // "scopes": [
  9428. // "https://www.googleapis.com/auth/cloud-platform",
  9429. // "https://www.googleapis.com/auth/genomics",
  9430. // "https://www.googleapis.com/auth/genomics.readonly"
  9431. // ]
  9432. // }
  9433. }
  9434. // method id "genomics.references.search":
  9435. type ReferencesSearchCall struct {
  9436. s *Service
  9437. searchreferencesrequest *SearchReferencesRequest
  9438. urlParams_ gensupport.URLParams
  9439. ctx_ context.Context
  9440. header_ http.Header
  9441. }
  9442. // Search: Searches for references which match the given
  9443. // criteria.
  9444. //
  9445. // Implements
  9446. // [GlobalAllianceApi.searchReferences](https://git
  9447. // hub.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemet
  9448. // hods.avdl#L146).
  9449. func (r *ReferencesService) Search(searchreferencesrequest *SearchReferencesRequest) *ReferencesSearchCall {
  9450. c := &ReferencesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9451. c.searchreferencesrequest = searchreferencesrequest
  9452. return c
  9453. }
  9454. // Fields allows partial responses to be retrieved. See
  9455. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9456. // for more information.
  9457. func (c *ReferencesSearchCall) Fields(s ...googleapi.Field) *ReferencesSearchCall {
  9458. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9459. return c
  9460. }
  9461. // Context sets the context to be used in this call's Do method. Any
  9462. // pending HTTP request will be aborted if the provided context is
  9463. // canceled.
  9464. func (c *ReferencesSearchCall) Context(ctx context.Context) *ReferencesSearchCall {
  9465. c.ctx_ = ctx
  9466. return c
  9467. }
  9468. // Header returns an http.Header that can be modified by the caller to
  9469. // add HTTP headers to the request.
  9470. func (c *ReferencesSearchCall) Header() http.Header {
  9471. if c.header_ == nil {
  9472. c.header_ = make(http.Header)
  9473. }
  9474. return c.header_
  9475. }
  9476. func (c *ReferencesSearchCall) doRequest(alt string) (*http.Response, error) {
  9477. reqHeaders := make(http.Header)
  9478. for k, v := range c.header_ {
  9479. reqHeaders[k] = v
  9480. }
  9481. reqHeaders.Set("User-Agent", c.s.userAgent())
  9482. var body io.Reader = nil
  9483. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesrequest)
  9484. if err != nil {
  9485. return nil, err
  9486. }
  9487. reqHeaders.Set("Content-Type", "application/json")
  9488. c.urlParams_.Set("alt", alt)
  9489. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/references/search")
  9490. urls += "?" + c.urlParams_.Encode()
  9491. req, _ := http.NewRequest("POST", urls, body)
  9492. req.Header = reqHeaders
  9493. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9494. }
  9495. // Do executes the "genomics.references.search" call.
  9496. // Exactly one of *SearchReferencesResponse or error will be non-nil.
  9497. // Any non-2xx status code is an error. Response headers are in either
  9498. // *SearchReferencesResponse.ServerResponse.Header or (if a response was
  9499. // returned at all) in error.(*googleapi.Error).Header. Use
  9500. // googleapi.IsNotModified to check whether the returned error was
  9501. // because http.StatusNotModified was returned.
  9502. func (c *ReferencesSearchCall) Do(opts ...googleapi.CallOption) (*SearchReferencesResponse, error) {
  9503. gensupport.SetOptions(c.urlParams_, opts...)
  9504. res, err := c.doRequest("json")
  9505. if res != nil && res.StatusCode == http.StatusNotModified {
  9506. if res.Body != nil {
  9507. res.Body.Close()
  9508. }
  9509. return nil, &googleapi.Error{
  9510. Code: res.StatusCode,
  9511. Header: res.Header,
  9512. }
  9513. }
  9514. if err != nil {
  9515. return nil, err
  9516. }
  9517. defer googleapi.CloseBody(res)
  9518. if err := googleapi.CheckResponse(res); err != nil {
  9519. return nil, err
  9520. }
  9521. ret := &SearchReferencesResponse{
  9522. ServerResponse: googleapi.ServerResponse{
  9523. Header: res.Header,
  9524. HTTPStatusCode: res.StatusCode,
  9525. },
  9526. }
  9527. target := &ret
  9528. if err := gensupport.DecodeResponse(target, res); err != nil {
  9529. return nil, err
  9530. }
  9531. return ret, nil
  9532. // {
  9533. // "description": "Searches for references which match the given criteria.\n\nImplements\n[GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146).",
  9534. // "flatPath": "v1/references/search",
  9535. // "httpMethod": "POST",
  9536. // "id": "genomics.references.search",
  9537. // "parameterOrder": [],
  9538. // "parameters": {},
  9539. // "path": "v1/references/search",
  9540. // "request": {
  9541. // "$ref": "SearchReferencesRequest"
  9542. // },
  9543. // "response": {
  9544. // "$ref": "SearchReferencesResponse"
  9545. // },
  9546. // "scopes": [
  9547. // "https://www.googleapis.com/auth/cloud-platform",
  9548. // "https://www.googleapis.com/auth/genomics",
  9549. // "https://www.googleapis.com/auth/genomics.readonly"
  9550. // ]
  9551. // }
  9552. }
  9553. // Pages invokes f for each page of results.
  9554. // A non-nil error returned from f will halt the iteration.
  9555. // The provided context supersedes any context provided to the Context method.
  9556. func (c *ReferencesSearchCall) Pages(ctx context.Context, f func(*SearchReferencesResponse) error) error {
  9557. c.ctx_ = ctx
  9558. defer func(pt string) { c.searchreferencesrequest.PageToken = pt }(c.searchreferencesrequest.PageToken) // reset paging to original point
  9559. for {
  9560. x, err := c.Do()
  9561. if err != nil {
  9562. return err
  9563. }
  9564. if err := f(x); err != nil {
  9565. return err
  9566. }
  9567. if x.NextPageToken == "" {
  9568. return nil
  9569. }
  9570. c.searchreferencesrequest.PageToken = x.NextPageToken
  9571. }
  9572. }
  9573. // method id "genomics.references.bases.list":
  9574. type ReferencesBasesListCall struct {
  9575. s *Service
  9576. referenceId string
  9577. urlParams_ gensupport.URLParams
  9578. ifNoneMatch_ string
  9579. ctx_ context.Context
  9580. header_ http.Header
  9581. }
  9582. // List: Lists the bases in a reference, optionally restricted to a
  9583. // range.
  9584. //
  9585. // Implements
  9586. // [GlobalAllianceApi.getReferenceBases](https://githu
  9587. // b.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemetho
  9588. // ds.avdl#L221).
  9589. func (r *ReferencesBasesService) List(referenceId string) *ReferencesBasesListCall {
  9590. c := &ReferencesBasesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9591. c.referenceId = referenceId
  9592. return c
  9593. }
  9594. // End sets the optional parameter "end": The end position (0-based,
  9595. // exclusive) of this query. Defaults to the length
  9596. // of this reference.
  9597. func (c *ReferencesBasesListCall) End(end int64) *ReferencesBasesListCall {
  9598. c.urlParams_.Set("end", fmt.Sprint(end))
  9599. return c
  9600. }
  9601. // PageSize sets the optional parameter "pageSize": The maximum number
  9602. // of bases to return in a single page. If unspecified,
  9603. // defaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp
  9604. // (mega base
  9605. // pairs).
  9606. func (c *ReferencesBasesListCall) PageSize(pageSize int64) *ReferencesBasesListCall {
  9607. c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
  9608. return c
  9609. }
  9610. // PageToken sets the optional parameter "pageToken": The continuation
  9611. // token, which is used to page through large result sets.
  9612. // To get the next page of results, set this parameter to the value
  9613. // of
  9614. // `nextPageToken` from the previous response.
  9615. func (c *ReferencesBasesListCall) PageToken(pageToken string) *ReferencesBasesListCall {
  9616. c.urlParams_.Set("pageToken", pageToken)
  9617. return c
  9618. }
  9619. // Start sets the optional parameter "start": The start position
  9620. // (0-based) of this query. Defaults to 0.
  9621. func (c *ReferencesBasesListCall) Start(start int64) *ReferencesBasesListCall {
  9622. c.urlParams_.Set("start", fmt.Sprint(start))
  9623. return c
  9624. }
  9625. // Fields allows partial responses to be retrieved. See
  9626. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9627. // for more information.
  9628. func (c *ReferencesBasesListCall) Fields(s ...googleapi.Field) *ReferencesBasesListCall {
  9629. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9630. return c
  9631. }
  9632. // IfNoneMatch sets the optional parameter which makes the operation
  9633. // fail if the object's ETag matches the given value. This is useful for
  9634. // getting updates only after the object has changed since the last
  9635. // request. Use googleapi.IsNotModified to check whether the response
  9636. // error from Do is the result of In-None-Match.
  9637. func (c *ReferencesBasesListCall) IfNoneMatch(entityTag string) *ReferencesBasesListCall {
  9638. c.ifNoneMatch_ = entityTag
  9639. return c
  9640. }
  9641. // Context sets the context to be used in this call's Do method. Any
  9642. // pending HTTP request will be aborted if the provided context is
  9643. // canceled.
  9644. func (c *ReferencesBasesListCall) Context(ctx context.Context) *ReferencesBasesListCall {
  9645. c.ctx_ = ctx
  9646. return c
  9647. }
  9648. // Header returns an http.Header that can be modified by the caller to
  9649. // add HTTP headers to the request.
  9650. func (c *ReferencesBasesListCall) Header() http.Header {
  9651. if c.header_ == nil {
  9652. c.header_ = make(http.Header)
  9653. }
  9654. return c.header_
  9655. }
  9656. func (c *ReferencesBasesListCall) doRequest(alt string) (*http.Response, error) {
  9657. reqHeaders := make(http.Header)
  9658. for k, v := range c.header_ {
  9659. reqHeaders[k] = v
  9660. }
  9661. reqHeaders.Set("User-Agent", c.s.userAgent())
  9662. if c.ifNoneMatch_ != "" {
  9663. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9664. }
  9665. var body io.Reader = nil
  9666. c.urlParams_.Set("alt", alt)
  9667. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/references/{referenceId}/bases")
  9668. urls += "?" + c.urlParams_.Encode()
  9669. req, _ := http.NewRequest("GET", urls, body)
  9670. req.Header = reqHeaders
  9671. googleapi.Expand(req.URL, map[string]string{
  9672. "referenceId": c.referenceId,
  9673. })
  9674. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9675. }
  9676. // Do executes the "genomics.references.bases.list" call.
  9677. // Exactly one of *ListBasesResponse or error will be non-nil. Any
  9678. // non-2xx status code is an error. Response headers are in either
  9679. // *ListBasesResponse.ServerResponse.Header or (if a response was
  9680. // returned at all) in error.(*googleapi.Error).Header. Use
  9681. // googleapi.IsNotModified to check whether the returned error was
  9682. // because http.StatusNotModified was returned.
  9683. func (c *ReferencesBasesListCall) Do(opts ...googleapi.CallOption) (*ListBasesResponse, error) {
  9684. gensupport.SetOptions(c.urlParams_, opts...)
  9685. res, err := c.doRequest("json")
  9686. if res != nil && res.StatusCode == http.StatusNotModified {
  9687. if res.Body != nil {
  9688. res.Body.Close()
  9689. }
  9690. return nil, &googleapi.Error{
  9691. Code: res.StatusCode,
  9692. Header: res.Header,
  9693. }
  9694. }
  9695. if err != nil {
  9696. return nil, err
  9697. }
  9698. defer googleapi.CloseBody(res)
  9699. if err := googleapi.CheckResponse(res); err != nil {
  9700. return nil, err
  9701. }
  9702. ret := &ListBasesResponse{
  9703. ServerResponse: googleapi.ServerResponse{
  9704. Header: res.Header,
  9705. HTTPStatusCode: res.StatusCode,
  9706. },
  9707. }
  9708. target := &ret
  9709. if err := gensupport.DecodeResponse(target, res); err != nil {
  9710. return nil, err
  9711. }
  9712. return ret, nil
  9713. // {
  9714. // "description": "Lists the bases in a reference, optionally restricted to a range.\n\nImplements\n[GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221).",
  9715. // "flatPath": "v1/references/{referenceId}/bases",
  9716. // "httpMethod": "GET",
  9717. // "id": "genomics.references.bases.list",
  9718. // "parameterOrder": [
  9719. // "referenceId"
  9720. // ],
  9721. // "parameters": {
  9722. // "end": {
  9723. // "description": "The end position (0-based, exclusive) of this query. Defaults to the length\nof this reference.",
  9724. // "format": "int64",
  9725. // "location": "query",
  9726. // "type": "string"
  9727. // },
  9728. // "pageSize": {
  9729. // "description": "The maximum number of bases to return in a single page. If unspecified,\ndefaults to 200Kbp (kilo base pairs). The maximum value is 10Mbp (mega base\npairs).",
  9730. // "format": "int32",
  9731. // "location": "query",
  9732. // "type": "integer"
  9733. // },
  9734. // "pageToken": {
  9735. // "description": "The continuation token, which is used to page through large result sets.\nTo get the next page of results, set this parameter to the value of\n`nextPageToken` from the previous response.",
  9736. // "location": "query",
  9737. // "type": "string"
  9738. // },
  9739. // "referenceId": {
  9740. // "description": "The ID of the reference.",
  9741. // "location": "path",
  9742. // "required": true,
  9743. // "type": "string"
  9744. // },
  9745. // "start": {
  9746. // "description": "The start position (0-based) of this query. Defaults to 0.",
  9747. // "format": "int64",
  9748. // "location": "query",
  9749. // "type": "string"
  9750. // }
  9751. // },
  9752. // "path": "v1/references/{referenceId}/bases",
  9753. // "response": {
  9754. // "$ref": "ListBasesResponse"
  9755. // },
  9756. // "scopes": [
  9757. // "https://www.googleapis.com/auth/cloud-platform",
  9758. // "https://www.googleapis.com/auth/genomics",
  9759. // "https://www.googleapis.com/auth/genomics.readonly"
  9760. // ]
  9761. // }
  9762. }
  9763. // Pages invokes f for each page of results.
  9764. // A non-nil error returned from f will halt the iteration.
  9765. // The provided context supersedes any context provided to the Context method.
  9766. func (c *ReferencesBasesListCall) Pages(ctx context.Context, f func(*ListBasesResponse) error) error {
  9767. c.ctx_ = ctx
  9768. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9769. for {
  9770. x, err := c.Do()
  9771. if err != nil {
  9772. return err
  9773. }
  9774. if err := f(x); err != nil {
  9775. return err
  9776. }
  9777. if x.NextPageToken == "" {
  9778. return nil
  9779. }
  9780. c.PageToken(x.NextPageToken)
  9781. }
  9782. }
  9783. // method id "genomics.referencesets.get":
  9784. type ReferencesetsGetCall struct {
  9785. s *Service
  9786. referenceSetId string
  9787. urlParams_ gensupport.URLParams
  9788. ifNoneMatch_ string
  9789. ctx_ context.Context
  9790. header_ http.Header
  9791. }
  9792. // Get: Gets a reference
  9793. // set.
  9794. //
  9795. // Implements
  9796. // [GlobalAllianceApi.getReferenceSet](https://github.co
  9797. // m/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.a
  9798. // vdl#L83).
  9799. func (r *ReferencesetsService) Get(referenceSetId string) *ReferencesetsGetCall {
  9800. c := &ReferencesetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9801. c.referenceSetId = referenceSetId
  9802. return c
  9803. }
  9804. // Fields allows partial responses to be retrieved. See
  9805. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9806. // for more information.
  9807. func (c *ReferencesetsGetCall) Fields(s ...googleapi.Field) *ReferencesetsGetCall {
  9808. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9809. return c
  9810. }
  9811. // IfNoneMatch sets the optional parameter which makes the operation
  9812. // fail if the object's ETag matches the given value. This is useful for
  9813. // getting updates only after the object has changed since the last
  9814. // request. Use googleapi.IsNotModified to check whether the response
  9815. // error from Do is the result of In-None-Match.
  9816. func (c *ReferencesetsGetCall) IfNoneMatch(entityTag string) *ReferencesetsGetCall {
  9817. c.ifNoneMatch_ = entityTag
  9818. return c
  9819. }
  9820. // Context sets the context to be used in this call's Do method. Any
  9821. // pending HTTP request will be aborted if the provided context is
  9822. // canceled.
  9823. func (c *ReferencesetsGetCall) Context(ctx context.Context) *ReferencesetsGetCall {
  9824. c.ctx_ = ctx
  9825. return c
  9826. }
  9827. // Header returns an http.Header that can be modified by the caller to
  9828. // add HTTP headers to the request.
  9829. func (c *ReferencesetsGetCall) Header() http.Header {
  9830. if c.header_ == nil {
  9831. c.header_ = make(http.Header)
  9832. }
  9833. return c.header_
  9834. }
  9835. func (c *ReferencesetsGetCall) doRequest(alt string) (*http.Response, error) {
  9836. reqHeaders := make(http.Header)
  9837. for k, v := range c.header_ {
  9838. reqHeaders[k] = v
  9839. }
  9840. reqHeaders.Set("User-Agent", c.s.userAgent())
  9841. if c.ifNoneMatch_ != "" {
  9842. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9843. }
  9844. var body io.Reader = nil
  9845. c.urlParams_.Set("alt", alt)
  9846. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/referencesets/{referenceSetId}")
  9847. urls += "?" + c.urlParams_.Encode()
  9848. req, _ := http.NewRequest("GET", urls, body)
  9849. req.Header = reqHeaders
  9850. googleapi.Expand(req.URL, map[string]string{
  9851. "referenceSetId": c.referenceSetId,
  9852. })
  9853. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9854. }
  9855. // Do executes the "genomics.referencesets.get" call.
  9856. // Exactly one of *ReferenceSet or error will be non-nil. Any non-2xx
  9857. // status code is an error. Response headers are in either
  9858. // *ReferenceSet.ServerResponse.Header or (if a response was returned at
  9859. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  9860. // to check whether the returned error was because
  9861. // http.StatusNotModified was returned.
  9862. func (c *ReferencesetsGetCall) Do(opts ...googleapi.CallOption) (*ReferenceSet, error) {
  9863. gensupport.SetOptions(c.urlParams_, opts...)
  9864. res, err := c.doRequest("json")
  9865. if res != nil && res.StatusCode == http.StatusNotModified {
  9866. if res.Body != nil {
  9867. res.Body.Close()
  9868. }
  9869. return nil, &googleapi.Error{
  9870. Code: res.StatusCode,
  9871. Header: res.Header,
  9872. }
  9873. }
  9874. if err != nil {
  9875. return nil, err
  9876. }
  9877. defer googleapi.CloseBody(res)
  9878. if err := googleapi.CheckResponse(res); err != nil {
  9879. return nil, err
  9880. }
  9881. ret := &ReferenceSet{
  9882. ServerResponse: googleapi.ServerResponse{
  9883. Header: res.Header,
  9884. HTTPStatusCode: res.StatusCode,
  9885. },
  9886. }
  9887. target := &ret
  9888. if err := gensupport.DecodeResponse(target, res); err != nil {
  9889. return nil, err
  9890. }
  9891. return ret, nil
  9892. // {
  9893. // "description": "Gets a reference set.\n\nImplements\n[GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83).",
  9894. // "flatPath": "v1/referencesets/{referenceSetId}",
  9895. // "httpMethod": "GET",
  9896. // "id": "genomics.referencesets.get",
  9897. // "parameterOrder": [
  9898. // "referenceSetId"
  9899. // ],
  9900. // "parameters": {
  9901. // "referenceSetId": {
  9902. // "description": "The ID of the reference set.",
  9903. // "location": "path",
  9904. // "required": true,
  9905. // "type": "string"
  9906. // }
  9907. // },
  9908. // "path": "v1/referencesets/{referenceSetId}",
  9909. // "response": {
  9910. // "$ref": "ReferenceSet"
  9911. // },
  9912. // "scopes": [
  9913. // "https://www.googleapis.com/auth/cloud-platform",
  9914. // "https://www.googleapis.com/auth/genomics",
  9915. // "https://www.googleapis.com/auth/genomics.readonly"
  9916. // ]
  9917. // }
  9918. }
  9919. // method id "genomics.referencesets.search":
  9920. type ReferencesetsSearchCall struct {
  9921. s *Service
  9922. searchreferencesetsrequest *SearchReferenceSetsRequest
  9923. urlParams_ gensupport.URLParams
  9924. ctx_ context.Context
  9925. header_ http.Header
  9926. }
  9927. // Search: Searches for reference sets which match the given
  9928. // criteria.
  9929. //
  9930. // Implements
  9931. // [GlobalAllianceApi.searchReferenceSets](https://
  9932. // github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/reference
  9933. // methods.avdl#L71)
  9934. func (r *ReferencesetsService) Search(searchreferencesetsrequest *SearchReferenceSetsRequest) *ReferencesetsSearchCall {
  9935. c := &ReferencesetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9936. c.searchreferencesetsrequest = searchreferencesetsrequest
  9937. return c
  9938. }
  9939. // Fields allows partial responses to be retrieved. See
  9940. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9941. // for more information.
  9942. func (c *ReferencesetsSearchCall) Fields(s ...googleapi.Field) *ReferencesetsSearchCall {
  9943. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9944. return c
  9945. }
  9946. // Context sets the context to be used in this call's Do method. Any
  9947. // pending HTTP request will be aborted if the provided context is
  9948. // canceled.
  9949. func (c *ReferencesetsSearchCall) Context(ctx context.Context) *ReferencesetsSearchCall {
  9950. c.ctx_ = ctx
  9951. return c
  9952. }
  9953. // Header returns an http.Header that can be modified by the caller to
  9954. // add HTTP headers to the request.
  9955. func (c *ReferencesetsSearchCall) Header() http.Header {
  9956. if c.header_ == nil {
  9957. c.header_ = make(http.Header)
  9958. }
  9959. return c.header_
  9960. }
  9961. func (c *ReferencesetsSearchCall) doRequest(alt string) (*http.Response, error) {
  9962. reqHeaders := make(http.Header)
  9963. for k, v := range c.header_ {
  9964. reqHeaders[k] = v
  9965. }
  9966. reqHeaders.Set("User-Agent", c.s.userAgent())
  9967. var body io.Reader = nil
  9968. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchreferencesetsrequest)
  9969. if err != nil {
  9970. return nil, err
  9971. }
  9972. reqHeaders.Set("Content-Type", "application/json")
  9973. c.urlParams_.Set("alt", alt)
  9974. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/referencesets/search")
  9975. urls += "?" + c.urlParams_.Encode()
  9976. req, _ := http.NewRequest("POST", urls, body)
  9977. req.Header = reqHeaders
  9978. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9979. }
  9980. // Do executes the "genomics.referencesets.search" call.
  9981. // Exactly one of *SearchReferenceSetsResponse or error will be non-nil.
  9982. // Any non-2xx status code is an error. Response headers are in either
  9983. // *SearchReferenceSetsResponse.ServerResponse.Header or (if a response
  9984. // was returned at all) in error.(*googleapi.Error).Header. Use
  9985. // googleapi.IsNotModified to check whether the returned error was
  9986. // because http.StatusNotModified was returned.
  9987. func (c *ReferencesetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchReferenceSetsResponse, error) {
  9988. gensupport.SetOptions(c.urlParams_, opts...)
  9989. res, err := c.doRequest("json")
  9990. if res != nil && res.StatusCode == http.StatusNotModified {
  9991. if res.Body != nil {
  9992. res.Body.Close()
  9993. }
  9994. return nil, &googleapi.Error{
  9995. Code: res.StatusCode,
  9996. Header: res.Header,
  9997. }
  9998. }
  9999. if err != nil {
  10000. return nil, err
  10001. }
  10002. defer googleapi.CloseBody(res)
  10003. if err := googleapi.CheckResponse(res); err != nil {
  10004. return nil, err
  10005. }
  10006. ret := &SearchReferenceSetsResponse{
  10007. ServerResponse: googleapi.ServerResponse{
  10008. Header: res.Header,
  10009. HTTPStatusCode: res.StatusCode,
  10010. },
  10011. }
  10012. target := &ret
  10013. if err := gensupport.DecodeResponse(target, res); err != nil {
  10014. return nil, err
  10015. }
  10016. return ret, nil
  10017. // {
  10018. // "description": "Searches for reference sets which match the given criteria.\n\nImplements\n[GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)",
  10019. // "flatPath": "v1/referencesets/search",
  10020. // "httpMethod": "POST",
  10021. // "id": "genomics.referencesets.search",
  10022. // "parameterOrder": [],
  10023. // "parameters": {},
  10024. // "path": "v1/referencesets/search",
  10025. // "request": {
  10026. // "$ref": "SearchReferenceSetsRequest"
  10027. // },
  10028. // "response": {
  10029. // "$ref": "SearchReferenceSetsResponse"
  10030. // },
  10031. // "scopes": [
  10032. // "https://www.googleapis.com/auth/cloud-platform",
  10033. // "https://www.googleapis.com/auth/genomics",
  10034. // "https://www.googleapis.com/auth/genomics.readonly"
  10035. // ]
  10036. // }
  10037. }
  10038. // Pages invokes f for each page of results.
  10039. // A non-nil error returned from f will halt the iteration.
  10040. // The provided context supersedes any context provided to the Context method.
  10041. func (c *ReferencesetsSearchCall) Pages(ctx context.Context, f func(*SearchReferenceSetsResponse) error) error {
  10042. c.ctx_ = ctx
  10043. defer func(pt string) { c.searchreferencesetsrequest.PageToken = pt }(c.searchreferencesetsrequest.PageToken) // reset paging to original point
  10044. for {
  10045. x, err := c.Do()
  10046. if err != nil {
  10047. return err
  10048. }
  10049. if err := f(x); err != nil {
  10050. return err
  10051. }
  10052. if x.NextPageToken == "" {
  10053. return nil
  10054. }
  10055. c.searchreferencesetsrequest.PageToken = x.NextPageToken
  10056. }
  10057. }
  10058. // method id "genomics.variants.create":
  10059. type VariantsCreateCall struct {
  10060. s *Service
  10061. variant *Variant
  10062. urlParams_ gensupport.URLParams
  10063. ctx_ context.Context
  10064. header_ http.Header
  10065. }
  10066. // Create: Creates a new variant.
  10067. func (r *VariantsService) Create(variant *Variant) *VariantsCreateCall {
  10068. c := &VariantsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10069. c.variant = variant
  10070. return c
  10071. }
  10072. // Fields allows partial responses to be retrieved. See
  10073. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10074. // for more information.
  10075. func (c *VariantsCreateCall) Fields(s ...googleapi.Field) *VariantsCreateCall {
  10076. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10077. return c
  10078. }
  10079. // Context sets the context to be used in this call's Do method. Any
  10080. // pending HTTP request will be aborted if the provided context is
  10081. // canceled.
  10082. func (c *VariantsCreateCall) Context(ctx context.Context) *VariantsCreateCall {
  10083. c.ctx_ = ctx
  10084. return c
  10085. }
  10086. // Header returns an http.Header that can be modified by the caller to
  10087. // add HTTP headers to the request.
  10088. func (c *VariantsCreateCall) Header() http.Header {
  10089. if c.header_ == nil {
  10090. c.header_ = make(http.Header)
  10091. }
  10092. return c.header_
  10093. }
  10094. func (c *VariantsCreateCall) doRequest(alt string) (*http.Response, error) {
  10095. reqHeaders := make(http.Header)
  10096. for k, v := range c.header_ {
  10097. reqHeaders[k] = v
  10098. }
  10099. reqHeaders.Set("User-Agent", c.s.userAgent())
  10100. var body io.Reader = nil
  10101. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
  10102. if err != nil {
  10103. return nil, err
  10104. }
  10105. reqHeaders.Set("Content-Type", "application/json")
  10106. c.urlParams_.Set("alt", alt)
  10107. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants")
  10108. urls += "?" + c.urlParams_.Encode()
  10109. req, _ := http.NewRequest("POST", urls, body)
  10110. req.Header = reqHeaders
  10111. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10112. }
  10113. // Do executes the "genomics.variants.create" call.
  10114. // Exactly one of *Variant or error will be non-nil. Any non-2xx status
  10115. // code is an error. Response headers are in either
  10116. // *Variant.ServerResponse.Header or (if a response was returned at all)
  10117. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10118. // check whether the returned error was because http.StatusNotModified
  10119. // was returned.
  10120. func (c *VariantsCreateCall) Do(opts ...googleapi.CallOption) (*Variant, error) {
  10121. gensupport.SetOptions(c.urlParams_, opts...)
  10122. res, err := c.doRequest("json")
  10123. if res != nil && res.StatusCode == http.StatusNotModified {
  10124. if res.Body != nil {
  10125. res.Body.Close()
  10126. }
  10127. return nil, &googleapi.Error{
  10128. Code: res.StatusCode,
  10129. Header: res.Header,
  10130. }
  10131. }
  10132. if err != nil {
  10133. return nil, err
  10134. }
  10135. defer googleapi.CloseBody(res)
  10136. if err := googleapi.CheckResponse(res); err != nil {
  10137. return nil, err
  10138. }
  10139. ret := &Variant{
  10140. ServerResponse: googleapi.ServerResponse{
  10141. Header: res.Header,
  10142. HTTPStatusCode: res.StatusCode,
  10143. },
  10144. }
  10145. target := &ret
  10146. if err := gensupport.DecodeResponse(target, res); err != nil {
  10147. return nil, err
  10148. }
  10149. return ret, nil
  10150. // {
  10151. // "description": "Creates a new variant.",
  10152. // "flatPath": "v1/variants",
  10153. // "httpMethod": "POST",
  10154. // "id": "genomics.variants.create",
  10155. // "parameterOrder": [],
  10156. // "parameters": {},
  10157. // "path": "v1/variants",
  10158. // "request": {
  10159. // "$ref": "Variant"
  10160. // },
  10161. // "response": {
  10162. // "$ref": "Variant"
  10163. // },
  10164. // "scopes": [
  10165. // "https://www.googleapis.com/auth/cloud-platform",
  10166. // "https://www.googleapis.com/auth/genomics"
  10167. // ]
  10168. // }
  10169. }
  10170. // method id "genomics.variants.delete":
  10171. type VariantsDeleteCall struct {
  10172. s *Service
  10173. variantId string
  10174. urlParams_ gensupport.URLParams
  10175. ctx_ context.Context
  10176. header_ http.Header
  10177. }
  10178. // Delete: Deletes a variant.
  10179. func (r *VariantsService) Delete(variantId string) *VariantsDeleteCall {
  10180. c := &VariantsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10181. c.variantId = variantId
  10182. return c
  10183. }
  10184. // Fields allows partial responses to be retrieved. See
  10185. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10186. // for more information.
  10187. func (c *VariantsDeleteCall) Fields(s ...googleapi.Field) *VariantsDeleteCall {
  10188. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10189. return c
  10190. }
  10191. // Context sets the context to be used in this call's Do method. Any
  10192. // pending HTTP request will be aborted if the provided context is
  10193. // canceled.
  10194. func (c *VariantsDeleteCall) Context(ctx context.Context) *VariantsDeleteCall {
  10195. c.ctx_ = ctx
  10196. return c
  10197. }
  10198. // Header returns an http.Header that can be modified by the caller to
  10199. // add HTTP headers to the request.
  10200. func (c *VariantsDeleteCall) Header() http.Header {
  10201. if c.header_ == nil {
  10202. c.header_ = make(http.Header)
  10203. }
  10204. return c.header_
  10205. }
  10206. func (c *VariantsDeleteCall) doRequest(alt string) (*http.Response, error) {
  10207. reqHeaders := make(http.Header)
  10208. for k, v := range c.header_ {
  10209. reqHeaders[k] = v
  10210. }
  10211. reqHeaders.Set("User-Agent", c.s.userAgent())
  10212. var body io.Reader = nil
  10213. c.urlParams_.Set("alt", alt)
  10214. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/{variantId}")
  10215. urls += "?" + c.urlParams_.Encode()
  10216. req, _ := http.NewRequest("DELETE", urls, body)
  10217. req.Header = reqHeaders
  10218. googleapi.Expand(req.URL, map[string]string{
  10219. "variantId": c.variantId,
  10220. })
  10221. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10222. }
  10223. // Do executes the "genomics.variants.delete" call.
  10224. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  10225. // code is an error. Response headers are in either
  10226. // *Empty.ServerResponse.Header or (if a response was returned at all)
  10227. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10228. // check whether the returned error was because http.StatusNotModified
  10229. // was returned.
  10230. func (c *VariantsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  10231. gensupport.SetOptions(c.urlParams_, opts...)
  10232. res, err := c.doRequest("json")
  10233. if res != nil && res.StatusCode == http.StatusNotModified {
  10234. if res.Body != nil {
  10235. res.Body.Close()
  10236. }
  10237. return nil, &googleapi.Error{
  10238. Code: res.StatusCode,
  10239. Header: res.Header,
  10240. }
  10241. }
  10242. if err != nil {
  10243. return nil, err
  10244. }
  10245. defer googleapi.CloseBody(res)
  10246. if err := googleapi.CheckResponse(res); err != nil {
  10247. return nil, err
  10248. }
  10249. ret := &Empty{
  10250. ServerResponse: googleapi.ServerResponse{
  10251. Header: res.Header,
  10252. HTTPStatusCode: res.StatusCode,
  10253. },
  10254. }
  10255. target := &ret
  10256. if err := gensupport.DecodeResponse(target, res); err != nil {
  10257. return nil, err
  10258. }
  10259. return ret, nil
  10260. // {
  10261. // "description": "Deletes a variant.",
  10262. // "flatPath": "v1/variants/{variantId}",
  10263. // "httpMethod": "DELETE",
  10264. // "id": "genomics.variants.delete",
  10265. // "parameterOrder": [
  10266. // "variantId"
  10267. // ],
  10268. // "parameters": {
  10269. // "variantId": {
  10270. // "description": "The ID of the variant to be deleted.",
  10271. // "location": "path",
  10272. // "required": true,
  10273. // "type": "string"
  10274. // }
  10275. // },
  10276. // "path": "v1/variants/{variantId}",
  10277. // "response": {
  10278. // "$ref": "Empty"
  10279. // },
  10280. // "scopes": [
  10281. // "https://www.googleapis.com/auth/cloud-platform",
  10282. // "https://www.googleapis.com/auth/genomics"
  10283. // ]
  10284. // }
  10285. }
  10286. // method id "genomics.variants.get":
  10287. type VariantsGetCall struct {
  10288. s *Service
  10289. variantId string
  10290. urlParams_ gensupport.URLParams
  10291. ifNoneMatch_ string
  10292. ctx_ context.Context
  10293. header_ http.Header
  10294. }
  10295. // Get: Gets a variant by ID.
  10296. func (r *VariantsService) Get(variantId string) *VariantsGetCall {
  10297. c := &VariantsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10298. c.variantId = variantId
  10299. return c
  10300. }
  10301. // Fields allows partial responses to be retrieved. See
  10302. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10303. // for more information.
  10304. func (c *VariantsGetCall) Fields(s ...googleapi.Field) *VariantsGetCall {
  10305. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10306. return c
  10307. }
  10308. // IfNoneMatch sets the optional parameter which makes the operation
  10309. // fail if the object's ETag matches the given value. This is useful for
  10310. // getting updates only after the object has changed since the last
  10311. // request. Use googleapi.IsNotModified to check whether the response
  10312. // error from Do is the result of In-None-Match.
  10313. func (c *VariantsGetCall) IfNoneMatch(entityTag string) *VariantsGetCall {
  10314. c.ifNoneMatch_ = entityTag
  10315. return c
  10316. }
  10317. // Context sets the context to be used in this call's Do method. Any
  10318. // pending HTTP request will be aborted if the provided context is
  10319. // canceled.
  10320. func (c *VariantsGetCall) Context(ctx context.Context) *VariantsGetCall {
  10321. c.ctx_ = ctx
  10322. return c
  10323. }
  10324. // Header returns an http.Header that can be modified by the caller to
  10325. // add HTTP headers to the request.
  10326. func (c *VariantsGetCall) Header() http.Header {
  10327. if c.header_ == nil {
  10328. c.header_ = make(http.Header)
  10329. }
  10330. return c.header_
  10331. }
  10332. func (c *VariantsGetCall) doRequest(alt string) (*http.Response, error) {
  10333. reqHeaders := make(http.Header)
  10334. for k, v := range c.header_ {
  10335. reqHeaders[k] = v
  10336. }
  10337. reqHeaders.Set("User-Agent", c.s.userAgent())
  10338. if c.ifNoneMatch_ != "" {
  10339. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10340. }
  10341. var body io.Reader = nil
  10342. c.urlParams_.Set("alt", alt)
  10343. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/{variantId}")
  10344. urls += "?" + c.urlParams_.Encode()
  10345. req, _ := http.NewRequest("GET", urls, body)
  10346. req.Header = reqHeaders
  10347. googleapi.Expand(req.URL, map[string]string{
  10348. "variantId": c.variantId,
  10349. })
  10350. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10351. }
  10352. // Do executes the "genomics.variants.get" call.
  10353. // Exactly one of *Variant or error will be non-nil. Any non-2xx status
  10354. // code is an error. Response headers are in either
  10355. // *Variant.ServerResponse.Header or (if a response was returned at all)
  10356. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10357. // check whether the returned error was because http.StatusNotModified
  10358. // was returned.
  10359. func (c *VariantsGetCall) Do(opts ...googleapi.CallOption) (*Variant, error) {
  10360. gensupport.SetOptions(c.urlParams_, opts...)
  10361. res, err := c.doRequest("json")
  10362. if res != nil && res.StatusCode == http.StatusNotModified {
  10363. if res.Body != nil {
  10364. res.Body.Close()
  10365. }
  10366. return nil, &googleapi.Error{
  10367. Code: res.StatusCode,
  10368. Header: res.Header,
  10369. }
  10370. }
  10371. if err != nil {
  10372. return nil, err
  10373. }
  10374. defer googleapi.CloseBody(res)
  10375. if err := googleapi.CheckResponse(res); err != nil {
  10376. return nil, err
  10377. }
  10378. ret := &Variant{
  10379. ServerResponse: googleapi.ServerResponse{
  10380. Header: res.Header,
  10381. HTTPStatusCode: res.StatusCode,
  10382. },
  10383. }
  10384. target := &ret
  10385. if err := gensupport.DecodeResponse(target, res); err != nil {
  10386. return nil, err
  10387. }
  10388. return ret, nil
  10389. // {
  10390. // "description": "Gets a variant by ID.",
  10391. // "flatPath": "v1/variants/{variantId}",
  10392. // "httpMethod": "GET",
  10393. // "id": "genomics.variants.get",
  10394. // "parameterOrder": [
  10395. // "variantId"
  10396. // ],
  10397. // "parameters": {
  10398. // "variantId": {
  10399. // "description": "The ID of the variant.",
  10400. // "location": "path",
  10401. // "required": true,
  10402. // "type": "string"
  10403. // }
  10404. // },
  10405. // "path": "v1/variants/{variantId}",
  10406. // "response": {
  10407. // "$ref": "Variant"
  10408. // },
  10409. // "scopes": [
  10410. // "https://www.googleapis.com/auth/cloud-platform",
  10411. // "https://www.googleapis.com/auth/genomics",
  10412. // "https://www.googleapis.com/auth/genomics.readonly"
  10413. // ]
  10414. // }
  10415. }
  10416. // method id "genomics.variants.import":
  10417. type VariantsImportCall struct {
  10418. s *Service
  10419. importvariantsrequest *ImportVariantsRequest
  10420. urlParams_ gensupport.URLParams
  10421. ctx_ context.Context
  10422. header_ http.Header
  10423. }
  10424. // Import: Creates variant data by asynchronously importing the provided
  10425. // information.
  10426. //
  10427. // The variants for import will be merged with any existing variant
  10428. // that
  10429. // matches its reference sequence, start, end, reference bases,
  10430. // and
  10431. // alternative bases. If no such variant exists, a new one will be
  10432. // created.
  10433. //
  10434. // When variants are merged, the call information from the new
  10435. // variant
  10436. // is added to the existing variant, and Variant info fields are
  10437. // merged
  10438. // as specified in
  10439. // infoMergeConfig.
  10440. // As a special case, for single-sample VCF files, QUAL and FILTER
  10441. // fields will
  10442. // be moved to the call level; these are sometimes interpreted in
  10443. // a
  10444. // call-specific context.
  10445. // Imported VCF headers are appended to the metadata already in a
  10446. // variant set.
  10447. func (r *VariantsService) Import(importvariantsrequest *ImportVariantsRequest) *VariantsImportCall {
  10448. c := &VariantsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10449. c.importvariantsrequest = importvariantsrequest
  10450. return c
  10451. }
  10452. // Fields allows partial responses to be retrieved. See
  10453. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10454. // for more information.
  10455. func (c *VariantsImportCall) Fields(s ...googleapi.Field) *VariantsImportCall {
  10456. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10457. return c
  10458. }
  10459. // Context sets the context to be used in this call's Do method. Any
  10460. // pending HTTP request will be aborted if the provided context is
  10461. // canceled.
  10462. func (c *VariantsImportCall) Context(ctx context.Context) *VariantsImportCall {
  10463. c.ctx_ = ctx
  10464. return c
  10465. }
  10466. // Header returns an http.Header that can be modified by the caller to
  10467. // add HTTP headers to the request.
  10468. func (c *VariantsImportCall) Header() http.Header {
  10469. if c.header_ == nil {
  10470. c.header_ = make(http.Header)
  10471. }
  10472. return c.header_
  10473. }
  10474. func (c *VariantsImportCall) doRequest(alt string) (*http.Response, error) {
  10475. reqHeaders := make(http.Header)
  10476. for k, v := range c.header_ {
  10477. reqHeaders[k] = v
  10478. }
  10479. reqHeaders.Set("User-Agent", c.s.userAgent())
  10480. var body io.Reader = nil
  10481. body, err := googleapi.WithoutDataWrapper.JSONReader(c.importvariantsrequest)
  10482. if err != nil {
  10483. return nil, err
  10484. }
  10485. reqHeaders.Set("Content-Type", "application/json")
  10486. c.urlParams_.Set("alt", alt)
  10487. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants:import")
  10488. urls += "?" + c.urlParams_.Encode()
  10489. req, _ := http.NewRequest("POST", urls, body)
  10490. req.Header = reqHeaders
  10491. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10492. }
  10493. // Do executes the "genomics.variants.import" call.
  10494. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  10495. // status code is an error. Response headers are in either
  10496. // *Operation.ServerResponse.Header or (if a response was returned at
  10497. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10498. // to check whether the returned error was because
  10499. // http.StatusNotModified was returned.
  10500. func (c *VariantsImportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  10501. gensupport.SetOptions(c.urlParams_, opts...)
  10502. res, err := c.doRequest("json")
  10503. if res != nil && res.StatusCode == http.StatusNotModified {
  10504. if res.Body != nil {
  10505. res.Body.Close()
  10506. }
  10507. return nil, &googleapi.Error{
  10508. Code: res.StatusCode,
  10509. Header: res.Header,
  10510. }
  10511. }
  10512. if err != nil {
  10513. return nil, err
  10514. }
  10515. defer googleapi.CloseBody(res)
  10516. if err := googleapi.CheckResponse(res); err != nil {
  10517. return nil, err
  10518. }
  10519. ret := &Operation{
  10520. ServerResponse: googleapi.ServerResponse{
  10521. Header: res.Header,
  10522. HTTPStatusCode: res.StatusCode,
  10523. },
  10524. }
  10525. target := &ret
  10526. if err := gensupport.DecodeResponse(target, res); err != nil {
  10527. return nil, err
  10528. }
  10529. return ret, nil
  10530. // {
  10531. // "description": "Creates variant data by asynchronously importing the provided information.\n\nThe variants for import will be merged with any existing variant that\nmatches its reference sequence, start, end, reference bases, and\nalternative bases. If no such variant exists, a new one will be created.\n\nWhen variants are merged, the call information from the new variant\nis added to the existing variant, and Variant info fields are merged\nas specified in\ninfoMergeConfig.\nAs a special case, for single-sample VCF files, QUAL and FILTER fields will\nbe moved to the call level; these are sometimes interpreted in a\ncall-specific context.\nImported VCF headers are appended to the metadata already in a variant set.",
  10532. // "flatPath": "v1/variants:import",
  10533. // "httpMethod": "POST",
  10534. // "id": "genomics.variants.import",
  10535. // "parameterOrder": [],
  10536. // "parameters": {},
  10537. // "path": "v1/variants:import",
  10538. // "request": {
  10539. // "$ref": "ImportVariantsRequest"
  10540. // },
  10541. // "response": {
  10542. // "$ref": "Operation"
  10543. // },
  10544. // "scopes": [
  10545. // "https://www.googleapis.com/auth/cloud-platform",
  10546. // "https://www.googleapis.com/auth/devstorage.read_write",
  10547. // "https://www.googleapis.com/auth/genomics"
  10548. // ]
  10549. // }
  10550. }
  10551. // method id "genomics.variants.merge":
  10552. type VariantsMergeCall struct {
  10553. s *Service
  10554. mergevariantsrequest *MergeVariantsRequest
  10555. urlParams_ gensupport.URLParams
  10556. ctx_ context.Context
  10557. header_ http.Header
  10558. }
  10559. // Merge: Merges the given variants with existing variants.
  10560. //
  10561. // Each variant will be
  10562. // merged with an existing variant that matches its reference
  10563. // sequence,
  10564. // start, end, reference bases, and alternative bases. If no such
  10565. // variant
  10566. // exists, a new one will be created.
  10567. //
  10568. // When variants are merged, the call information from the new
  10569. // variant
  10570. // is added to the existing variant. Variant info fields are merged
  10571. // as
  10572. // specified in the
  10573. // infoMergeConfig
  10574. // field of the MergeVariantsRequest.
  10575. //
  10576. // Please exercise caution when using this method! It is easy to
  10577. // introduce
  10578. // mistakes in existing variants and difficult to back out of them.
  10579. // For
  10580. // example,
  10581. // suppose you were trying to merge a new variant with an existing one
  10582. // and
  10583. // both
  10584. // variants contain calls that belong to callsets with the same callset
  10585. // ID.
  10586. //
  10587. // // Existing variant - irrelevant fields trimmed for clarity
  10588. // {
  10589. // "variantSetId": "10473108253681171589",
  10590. // "referenceName": "1",
  10591. // "start": "10582",
  10592. // "referenceBases": "G",
  10593. // "alternateBases": [
  10594. // "A"
  10595. // ],
  10596. // "calls": [
  10597. // {
  10598. // "callSetId": "10473108253681171589-0",
  10599. // "callSetName": "CALLSET0",
  10600. // "genotype": [
  10601. // 0,
  10602. // 1
  10603. // ],
  10604. // }
  10605. // ]
  10606. // }
  10607. //
  10608. // // New variant with conflicting call information
  10609. // {
  10610. // "variantSetId": "10473108253681171589",
  10611. // "referenceName": "1",
  10612. // "start": "10582",
  10613. // "referenceBases": "G",
  10614. // "alternateBases": [
  10615. // "A"
  10616. // ],
  10617. // "calls": [
  10618. // {
  10619. // "callSetId": "10473108253681171589-0",
  10620. // "callSetName": "CALLSET0",
  10621. // "genotype": [
  10622. // 1,
  10623. // 1
  10624. // ],
  10625. // }
  10626. // ]
  10627. // }
  10628. //
  10629. // The resulting merged variant would overwrite the existing calls with
  10630. // those
  10631. // from the new variant:
  10632. //
  10633. // {
  10634. // "variantSetId": "10473108253681171589",
  10635. // "referenceName": "1",
  10636. // "start": "10582",
  10637. // "referenceBases": "G",
  10638. // "alternateBases": [
  10639. // "A"
  10640. // ],
  10641. // "calls": [
  10642. // {
  10643. // "callSetId": "10473108253681171589-0",
  10644. // "callSetName": "CALLSET0",
  10645. // "genotype": [
  10646. // 1,
  10647. // 1
  10648. // ],
  10649. // }
  10650. // ]
  10651. // }
  10652. //
  10653. // This may be the desired outcome, but it is up to the user to
  10654. // determine if
  10655. // if that is indeed the case.
  10656. func (r *VariantsService) Merge(mergevariantsrequest *MergeVariantsRequest) *VariantsMergeCall {
  10657. c := &VariantsMergeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10658. c.mergevariantsrequest = mergevariantsrequest
  10659. return c
  10660. }
  10661. // Fields allows partial responses to be retrieved. See
  10662. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10663. // for more information.
  10664. func (c *VariantsMergeCall) Fields(s ...googleapi.Field) *VariantsMergeCall {
  10665. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10666. return c
  10667. }
  10668. // Context sets the context to be used in this call's Do method. Any
  10669. // pending HTTP request will be aborted if the provided context is
  10670. // canceled.
  10671. func (c *VariantsMergeCall) Context(ctx context.Context) *VariantsMergeCall {
  10672. c.ctx_ = ctx
  10673. return c
  10674. }
  10675. // Header returns an http.Header that can be modified by the caller to
  10676. // add HTTP headers to the request.
  10677. func (c *VariantsMergeCall) Header() http.Header {
  10678. if c.header_ == nil {
  10679. c.header_ = make(http.Header)
  10680. }
  10681. return c.header_
  10682. }
  10683. func (c *VariantsMergeCall) doRequest(alt string) (*http.Response, error) {
  10684. reqHeaders := make(http.Header)
  10685. for k, v := range c.header_ {
  10686. reqHeaders[k] = v
  10687. }
  10688. reqHeaders.Set("User-Agent", c.s.userAgent())
  10689. var body io.Reader = nil
  10690. body, err := googleapi.WithoutDataWrapper.JSONReader(c.mergevariantsrequest)
  10691. if err != nil {
  10692. return nil, err
  10693. }
  10694. reqHeaders.Set("Content-Type", "application/json")
  10695. c.urlParams_.Set("alt", alt)
  10696. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants:merge")
  10697. urls += "?" + c.urlParams_.Encode()
  10698. req, _ := http.NewRequest("POST", urls, body)
  10699. req.Header = reqHeaders
  10700. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10701. }
  10702. // Do executes the "genomics.variants.merge" call.
  10703. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  10704. // code is an error. Response headers are in either
  10705. // *Empty.ServerResponse.Header or (if a response was returned at all)
  10706. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10707. // check whether the returned error was because http.StatusNotModified
  10708. // was returned.
  10709. func (c *VariantsMergeCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  10710. gensupport.SetOptions(c.urlParams_, opts...)
  10711. res, err := c.doRequest("json")
  10712. if res != nil && res.StatusCode == http.StatusNotModified {
  10713. if res.Body != nil {
  10714. res.Body.Close()
  10715. }
  10716. return nil, &googleapi.Error{
  10717. Code: res.StatusCode,
  10718. Header: res.Header,
  10719. }
  10720. }
  10721. if err != nil {
  10722. return nil, err
  10723. }
  10724. defer googleapi.CloseBody(res)
  10725. if err := googleapi.CheckResponse(res); err != nil {
  10726. return nil, err
  10727. }
  10728. ret := &Empty{
  10729. ServerResponse: googleapi.ServerResponse{
  10730. Header: res.Header,
  10731. HTTPStatusCode: res.StatusCode,
  10732. },
  10733. }
  10734. target := &ret
  10735. if err := gensupport.DecodeResponse(target, res); err != nil {
  10736. return nil, err
  10737. }
  10738. return ret, nil
  10739. // {
  10740. // "description": "Merges the given variants with existing variants.\n\nEach variant will be\nmerged with an existing variant that matches its reference sequence,\nstart, end, reference bases, and alternative bases. If no such variant\nexists, a new one will be created.\n\nWhen variants are merged, the call information from the new variant\nis added to the existing variant. Variant info fields are merged as\nspecified in the\ninfoMergeConfig\nfield of the MergeVariantsRequest.\n\nPlease exercise caution when using this method! It is easy to introduce\nmistakes in existing variants and difficult to back out of them. For\nexample,\nsuppose you were trying to merge a new variant with an existing one and\nboth\nvariants contain calls that belong to callsets with the same callset ID.\n\n // Existing variant - irrelevant fields trimmed for clarity\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 0,\n 1\n ],\n }\n ]\n }\n\n // New variant with conflicting call information\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThe resulting merged variant would overwrite the existing calls with those\nfrom the new variant:\n\n {\n \"variantSetId\": \"10473108253681171589\",\n \"referenceName\": \"1\",\n \"start\": \"10582\",\n \"referenceBases\": \"G\",\n \"alternateBases\": [\n \"A\"\n ],\n \"calls\": [\n {\n \"callSetId\": \"10473108253681171589-0\",\n \"callSetName\": \"CALLSET0\",\n \"genotype\": [\n 1,\n 1\n ],\n }\n ]\n }\n\nThis may be the desired outcome, but it is up to the user to determine if\nif that is indeed the case.",
  10741. // "flatPath": "v1/variants:merge",
  10742. // "httpMethod": "POST",
  10743. // "id": "genomics.variants.merge",
  10744. // "parameterOrder": [],
  10745. // "parameters": {},
  10746. // "path": "v1/variants:merge",
  10747. // "request": {
  10748. // "$ref": "MergeVariantsRequest"
  10749. // },
  10750. // "response": {
  10751. // "$ref": "Empty"
  10752. // },
  10753. // "scopes": [
  10754. // "https://www.googleapis.com/auth/cloud-platform",
  10755. // "https://www.googleapis.com/auth/genomics"
  10756. // ]
  10757. // }
  10758. }
  10759. // method id "genomics.variants.patch":
  10760. type VariantsPatchCall struct {
  10761. s *Service
  10762. variantId string
  10763. variant *Variant
  10764. urlParams_ gensupport.URLParams
  10765. ctx_ context.Context
  10766. header_ http.Header
  10767. }
  10768. // Patch: Updates a variant.
  10769. //
  10770. // This method supports patch semantics. Returns the modified variant
  10771. // without
  10772. // its calls.
  10773. func (r *VariantsService) Patch(variantId string, variant *Variant) *VariantsPatchCall {
  10774. c := &VariantsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10775. c.variantId = variantId
  10776. c.variant = variant
  10777. return c
  10778. }
  10779. // UpdateMask sets the optional parameter "updateMask": An optional mask
  10780. // specifying which fields to update. At this time, mutable
  10781. // fields are names and
  10782. // info. Acceptable values are "names" and
  10783. // "info". If unspecified, all mutable fields will be updated.
  10784. func (c *VariantsPatchCall) UpdateMask(updateMask string) *VariantsPatchCall {
  10785. c.urlParams_.Set("updateMask", updateMask)
  10786. return c
  10787. }
  10788. // Fields allows partial responses to be retrieved. See
  10789. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10790. // for more information.
  10791. func (c *VariantsPatchCall) Fields(s ...googleapi.Field) *VariantsPatchCall {
  10792. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10793. return c
  10794. }
  10795. // Context sets the context to be used in this call's Do method. Any
  10796. // pending HTTP request will be aborted if the provided context is
  10797. // canceled.
  10798. func (c *VariantsPatchCall) Context(ctx context.Context) *VariantsPatchCall {
  10799. c.ctx_ = ctx
  10800. return c
  10801. }
  10802. // Header returns an http.Header that can be modified by the caller to
  10803. // add HTTP headers to the request.
  10804. func (c *VariantsPatchCall) Header() http.Header {
  10805. if c.header_ == nil {
  10806. c.header_ = make(http.Header)
  10807. }
  10808. return c.header_
  10809. }
  10810. func (c *VariantsPatchCall) doRequest(alt string) (*http.Response, error) {
  10811. reqHeaders := make(http.Header)
  10812. for k, v := range c.header_ {
  10813. reqHeaders[k] = v
  10814. }
  10815. reqHeaders.Set("User-Agent", c.s.userAgent())
  10816. var body io.Reader = nil
  10817. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variant)
  10818. if err != nil {
  10819. return nil, err
  10820. }
  10821. reqHeaders.Set("Content-Type", "application/json")
  10822. c.urlParams_.Set("alt", alt)
  10823. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/{variantId}")
  10824. urls += "?" + c.urlParams_.Encode()
  10825. req, _ := http.NewRequest("PATCH", urls, body)
  10826. req.Header = reqHeaders
  10827. googleapi.Expand(req.URL, map[string]string{
  10828. "variantId": c.variantId,
  10829. })
  10830. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10831. }
  10832. // Do executes the "genomics.variants.patch" call.
  10833. // Exactly one of *Variant or error will be non-nil. Any non-2xx status
  10834. // code is an error. Response headers are in either
  10835. // *Variant.ServerResponse.Header or (if a response was returned at all)
  10836. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  10837. // check whether the returned error was because http.StatusNotModified
  10838. // was returned.
  10839. func (c *VariantsPatchCall) Do(opts ...googleapi.CallOption) (*Variant, error) {
  10840. gensupport.SetOptions(c.urlParams_, opts...)
  10841. res, err := c.doRequest("json")
  10842. if res != nil && res.StatusCode == http.StatusNotModified {
  10843. if res.Body != nil {
  10844. res.Body.Close()
  10845. }
  10846. return nil, &googleapi.Error{
  10847. Code: res.StatusCode,
  10848. Header: res.Header,
  10849. }
  10850. }
  10851. if err != nil {
  10852. return nil, err
  10853. }
  10854. defer googleapi.CloseBody(res)
  10855. if err := googleapi.CheckResponse(res); err != nil {
  10856. return nil, err
  10857. }
  10858. ret := &Variant{
  10859. ServerResponse: googleapi.ServerResponse{
  10860. Header: res.Header,
  10861. HTTPStatusCode: res.StatusCode,
  10862. },
  10863. }
  10864. target := &ret
  10865. if err := gensupport.DecodeResponse(target, res); err != nil {
  10866. return nil, err
  10867. }
  10868. return ret, nil
  10869. // {
  10870. // "description": "Updates a variant.\n\nThis method supports patch semantics. Returns the modified variant without\nits calls.",
  10871. // "flatPath": "v1/variants/{variantId}",
  10872. // "httpMethod": "PATCH",
  10873. // "id": "genomics.variants.patch",
  10874. // "parameterOrder": [
  10875. // "variantId"
  10876. // ],
  10877. // "parameters": {
  10878. // "updateMask": {
  10879. // "description": "An optional mask specifying which fields to update. At this time, mutable\nfields are names and\ninfo. Acceptable values are \"names\" and\n\"info\". If unspecified, all mutable fields will be updated.",
  10880. // "format": "google-fieldmask",
  10881. // "location": "query",
  10882. // "type": "string"
  10883. // },
  10884. // "variantId": {
  10885. // "description": "The ID of the variant to be updated.",
  10886. // "location": "path",
  10887. // "required": true,
  10888. // "type": "string"
  10889. // }
  10890. // },
  10891. // "path": "v1/variants/{variantId}",
  10892. // "request": {
  10893. // "$ref": "Variant"
  10894. // },
  10895. // "response": {
  10896. // "$ref": "Variant"
  10897. // },
  10898. // "scopes": [
  10899. // "https://www.googleapis.com/auth/cloud-platform",
  10900. // "https://www.googleapis.com/auth/genomics"
  10901. // ]
  10902. // }
  10903. }
  10904. // method id "genomics.variants.search":
  10905. type VariantsSearchCall struct {
  10906. s *Service
  10907. searchvariantsrequest *SearchVariantsRequest
  10908. urlParams_ gensupport.URLParams
  10909. ctx_ context.Context
  10910. header_ http.Header
  10911. }
  10912. // Search: Gets a list of variants matching the
  10913. // criteria.
  10914. //
  10915. // Implements
  10916. // [GlobalAllianceApi.searchVariants](https://githu
  10917. // b.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods
  10918. // .avdl#L126).
  10919. func (r *VariantsService) Search(searchvariantsrequest *SearchVariantsRequest) *VariantsSearchCall {
  10920. c := &VariantsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10921. c.searchvariantsrequest = searchvariantsrequest
  10922. return c
  10923. }
  10924. // Fields allows partial responses to be retrieved. See
  10925. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10926. // for more information.
  10927. func (c *VariantsSearchCall) Fields(s ...googleapi.Field) *VariantsSearchCall {
  10928. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10929. return c
  10930. }
  10931. // Context sets the context to be used in this call's Do method. Any
  10932. // pending HTTP request will be aborted if the provided context is
  10933. // canceled.
  10934. func (c *VariantsSearchCall) Context(ctx context.Context) *VariantsSearchCall {
  10935. c.ctx_ = ctx
  10936. return c
  10937. }
  10938. // Header returns an http.Header that can be modified by the caller to
  10939. // add HTTP headers to the request.
  10940. func (c *VariantsSearchCall) Header() http.Header {
  10941. if c.header_ == nil {
  10942. c.header_ = make(http.Header)
  10943. }
  10944. return c.header_
  10945. }
  10946. func (c *VariantsSearchCall) doRequest(alt string) (*http.Response, error) {
  10947. reqHeaders := make(http.Header)
  10948. for k, v := range c.header_ {
  10949. reqHeaders[k] = v
  10950. }
  10951. reqHeaders.Set("User-Agent", c.s.userAgent())
  10952. var body io.Reader = nil
  10953. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsrequest)
  10954. if err != nil {
  10955. return nil, err
  10956. }
  10957. reqHeaders.Set("Content-Type", "application/json")
  10958. c.urlParams_.Set("alt", alt)
  10959. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variants/search")
  10960. urls += "?" + c.urlParams_.Encode()
  10961. req, _ := http.NewRequest("POST", urls, body)
  10962. req.Header = reqHeaders
  10963. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10964. }
  10965. // Do executes the "genomics.variants.search" call.
  10966. // Exactly one of *SearchVariantsResponse or error will be non-nil. Any
  10967. // non-2xx status code is an error. Response headers are in either
  10968. // *SearchVariantsResponse.ServerResponse.Header or (if a response was
  10969. // returned at all) in error.(*googleapi.Error).Header. Use
  10970. // googleapi.IsNotModified to check whether the returned error was
  10971. // because http.StatusNotModified was returned.
  10972. func (c *VariantsSearchCall) Do(opts ...googleapi.CallOption) (*SearchVariantsResponse, error) {
  10973. gensupport.SetOptions(c.urlParams_, opts...)
  10974. res, err := c.doRequest("json")
  10975. if res != nil && res.StatusCode == http.StatusNotModified {
  10976. if res.Body != nil {
  10977. res.Body.Close()
  10978. }
  10979. return nil, &googleapi.Error{
  10980. Code: res.StatusCode,
  10981. Header: res.Header,
  10982. }
  10983. }
  10984. if err != nil {
  10985. return nil, err
  10986. }
  10987. defer googleapi.CloseBody(res)
  10988. if err := googleapi.CheckResponse(res); err != nil {
  10989. return nil, err
  10990. }
  10991. ret := &SearchVariantsResponse{
  10992. ServerResponse: googleapi.ServerResponse{
  10993. Header: res.Header,
  10994. HTTPStatusCode: res.StatusCode,
  10995. },
  10996. }
  10997. target := &ret
  10998. if err := gensupport.DecodeResponse(target, res); err != nil {
  10999. return nil, err
  11000. }
  11001. return ret, nil
  11002. // {
  11003. // "description": "Gets a list of variants matching the criteria.\n\nImplements\n[GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126).",
  11004. // "flatPath": "v1/variants/search",
  11005. // "httpMethod": "POST",
  11006. // "id": "genomics.variants.search",
  11007. // "parameterOrder": [],
  11008. // "parameters": {},
  11009. // "path": "v1/variants/search",
  11010. // "request": {
  11011. // "$ref": "SearchVariantsRequest"
  11012. // },
  11013. // "response": {
  11014. // "$ref": "SearchVariantsResponse"
  11015. // },
  11016. // "scopes": [
  11017. // "https://www.googleapis.com/auth/cloud-platform",
  11018. // "https://www.googleapis.com/auth/genomics",
  11019. // "https://www.googleapis.com/auth/genomics.readonly"
  11020. // ]
  11021. // }
  11022. }
  11023. // Pages invokes f for each page of results.
  11024. // A non-nil error returned from f will halt the iteration.
  11025. // The provided context supersedes any context provided to the Context method.
  11026. func (c *VariantsSearchCall) Pages(ctx context.Context, f func(*SearchVariantsResponse) error) error {
  11027. c.ctx_ = ctx
  11028. defer func(pt string) { c.searchvariantsrequest.PageToken = pt }(c.searchvariantsrequest.PageToken) // reset paging to original point
  11029. for {
  11030. x, err := c.Do()
  11031. if err != nil {
  11032. return err
  11033. }
  11034. if err := f(x); err != nil {
  11035. return err
  11036. }
  11037. if x.NextPageToken == "" {
  11038. return nil
  11039. }
  11040. c.searchvariantsrequest.PageToken = x.NextPageToken
  11041. }
  11042. }
  11043. // method id "genomics.variantsets.create":
  11044. type VariantsetsCreateCall struct {
  11045. s *Service
  11046. variantset *VariantSet
  11047. urlParams_ gensupport.URLParams
  11048. ctx_ context.Context
  11049. header_ http.Header
  11050. }
  11051. // Create: Creates a new variant set.
  11052. //
  11053. // The provided variant set must have a valid `datasetId` set - all
  11054. // other
  11055. // fields are optional. Note that the `id` field will be ignored, as
  11056. // this is
  11057. // assigned by the server.
  11058. func (r *VariantsetsService) Create(variantset *VariantSet) *VariantsetsCreateCall {
  11059. c := &VariantsetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11060. c.variantset = variantset
  11061. return c
  11062. }
  11063. // Fields allows partial responses to be retrieved. See
  11064. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11065. // for more information.
  11066. func (c *VariantsetsCreateCall) Fields(s ...googleapi.Field) *VariantsetsCreateCall {
  11067. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11068. return c
  11069. }
  11070. // Context sets the context to be used in this call's Do method. Any
  11071. // pending HTTP request will be aborted if the provided context is
  11072. // canceled.
  11073. func (c *VariantsetsCreateCall) Context(ctx context.Context) *VariantsetsCreateCall {
  11074. c.ctx_ = ctx
  11075. return c
  11076. }
  11077. // Header returns an http.Header that can be modified by the caller to
  11078. // add HTTP headers to the request.
  11079. func (c *VariantsetsCreateCall) Header() http.Header {
  11080. if c.header_ == nil {
  11081. c.header_ = make(http.Header)
  11082. }
  11083. return c.header_
  11084. }
  11085. func (c *VariantsetsCreateCall) doRequest(alt string) (*http.Response, error) {
  11086. reqHeaders := make(http.Header)
  11087. for k, v := range c.header_ {
  11088. reqHeaders[k] = v
  11089. }
  11090. reqHeaders.Set("User-Agent", c.s.userAgent())
  11091. var body io.Reader = nil
  11092. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
  11093. if err != nil {
  11094. return nil, err
  11095. }
  11096. reqHeaders.Set("Content-Type", "application/json")
  11097. c.urlParams_.Set("alt", alt)
  11098. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets")
  11099. urls += "?" + c.urlParams_.Encode()
  11100. req, _ := http.NewRequest("POST", urls, body)
  11101. req.Header = reqHeaders
  11102. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11103. }
  11104. // Do executes the "genomics.variantsets.create" call.
  11105. // Exactly one of *VariantSet or error will be non-nil. Any non-2xx
  11106. // status code is an error. Response headers are in either
  11107. // *VariantSet.ServerResponse.Header or (if a response was returned at
  11108. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11109. // to check whether the returned error was because
  11110. // http.StatusNotModified was returned.
  11111. func (c *VariantsetsCreateCall) Do(opts ...googleapi.CallOption) (*VariantSet, error) {
  11112. gensupport.SetOptions(c.urlParams_, opts...)
  11113. res, err := c.doRequest("json")
  11114. if res != nil && res.StatusCode == http.StatusNotModified {
  11115. if res.Body != nil {
  11116. res.Body.Close()
  11117. }
  11118. return nil, &googleapi.Error{
  11119. Code: res.StatusCode,
  11120. Header: res.Header,
  11121. }
  11122. }
  11123. if err != nil {
  11124. return nil, err
  11125. }
  11126. defer googleapi.CloseBody(res)
  11127. if err := googleapi.CheckResponse(res); err != nil {
  11128. return nil, err
  11129. }
  11130. ret := &VariantSet{
  11131. ServerResponse: googleapi.ServerResponse{
  11132. Header: res.Header,
  11133. HTTPStatusCode: res.StatusCode,
  11134. },
  11135. }
  11136. target := &ret
  11137. if err := gensupport.DecodeResponse(target, res); err != nil {
  11138. return nil, err
  11139. }
  11140. return ret, nil
  11141. // {
  11142. // "description": "Creates a new variant set.\n\nThe provided variant set must have a valid `datasetId` set - all other\nfields are optional. Note that the `id` field will be ignored, as this is\nassigned by the server.",
  11143. // "flatPath": "v1/variantsets",
  11144. // "httpMethod": "POST",
  11145. // "id": "genomics.variantsets.create",
  11146. // "parameterOrder": [],
  11147. // "parameters": {},
  11148. // "path": "v1/variantsets",
  11149. // "request": {
  11150. // "$ref": "VariantSet"
  11151. // },
  11152. // "response": {
  11153. // "$ref": "VariantSet"
  11154. // },
  11155. // "scopes": [
  11156. // "https://www.googleapis.com/auth/cloud-platform",
  11157. // "https://www.googleapis.com/auth/genomics"
  11158. // ]
  11159. // }
  11160. }
  11161. // method id "genomics.variantsets.delete":
  11162. type VariantsetsDeleteCall struct {
  11163. s *Service
  11164. variantSetId string
  11165. urlParams_ gensupport.URLParams
  11166. ctx_ context.Context
  11167. header_ http.Header
  11168. }
  11169. // Delete: Deletes a variant set including all variants, call sets, and
  11170. // calls within.
  11171. // This is not reversible.
  11172. func (r *VariantsetsService) Delete(variantSetId string) *VariantsetsDeleteCall {
  11173. c := &VariantsetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11174. c.variantSetId = variantSetId
  11175. return c
  11176. }
  11177. // Fields allows partial responses to be retrieved. See
  11178. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11179. // for more information.
  11180. func (c *VariantsetsDeleteCall) Fields(s ...googleapi.Field) *VariantsetsDeleteCall {
  11181. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11182. return c
  11183. }
  11184. // Context sets the context to be used in this call's Do method. Any
  11185. // pending HTTP request will be aborted if the provided context is
  11186. // canceled.
  11187. func (c *VariantsetsDeleteCall) Context(ctx context.Context) *VariantsetsDeleteCall {
  11188. c.ctx_ = ctx
  11189. return c
  11190. }
  11191. // Header returns an http.Header that can be modified by the caller to
  11192. // add HTTP headers to the request.
  11193. func (c *VariantsetsDeleteCall) Header() http.Header {
  11194. if c.header_ == nil {
  11195. c.header_ = make(http.Header)
  11196. }
  11197. return c.header_
  11198. }
  11199. func (c *VariantsetsDeleteCall) doRequest(alt string) (*http.Response, error) {
  11200. reqHeaders := make(http.Header)
  11201. for k, v := range c.header_ {
  11202. reqHeaders[k] = v
  11203. }
  11204. reqHeaders.Set("User-Agent", c.s.userAgent())
  11205. var body io.Reader = nil
  11206. c.urlParams_.Set("alt", alt)
  11207. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}")
  11208. urls += "?" + c.urlParams_.Encode()
  11209. req, _ := http.NewRequest("DELETE", urls, body)
  11210. req.Header = reqHeaders
  11211. googleapi.Expand(req.URL, map[string]string{
  11212. "variantSetId": c.variantSetId,
  11213. })
  11214. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11215. }
  11216. // Do executes the "genomics.variantsets.delete" call.
  11217. // Exactly one of *Empty or error will be non-nil. Any non-2xx status
  11218. // code is an error. Response headers are in either
  11219. // *Empty.ServerResponse.Header or (if a response was returned at all)
  11220. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  11221. // check whether the returned error was because http.StatusNotModified
  11222. // was returned.
  11223. func (c *VariantsetsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
  11224. gensupport.SetOptions(c.urlParams_, opts...)
  11225. res, err := c.doRequest("json")
  11226. if res != nil && res.StatusCode == http.StatusNotModified {
  11227. if res.Body != nil {
  11228. res.Body.Close()
  11229. }
  11230. return nil, &googleapi.Error{
  11231. Code: res.StatusCode,
  11232. Header: res.Header,
  11233. }
  11234. }
  11235. if err != nil {
  11236. return nil, err
  11237. }
  11238. defer googleapi.CloseBody(res)
  11239. if err := googleapi.CheckResponse(res); err != nil {
  11240. return nil, err
  11241. }
  11242. ret := &Empty{
  11243. ServerResponse: googleapi.ServerResponse{
  11244. Header: res.Header,
  11245. HTTPStatusCode: res.StatusCode,
  11246. },
  11247. }
  11248. target := &ret
  11249. if err := gensupport.DecodeResponse(target, res); err != nil {
  11250. return nil, err
  11251. }
  11252. return ret, nil
  11253. // {
  11254. // "description": "Deletes a variant set including all variants, call sets, and calls within.\nThis is not reversible.",
  11255. // "flatPath": "v1/variantsets/{variantSetId}",
  11256. // "httpMethod": "DELETE",
  11257. // "id": "genomics.variantsets.delete",
  11258. // "parameterOrder": [
  11259. // "variantSetId"
  11260. // ],
  11261. // "parameters": {
  11262. // "variantSetId": {
  11263. // "description": "The ID of the variant set to be deleted.",
  11264. // "location": "path",
  11265. // "required": true,
  11266. // "type": "string"
  11267. // }
  11268. // },
  11269. // "path": "v1/variantsets/{variantSetId}",
  11270. // "response": {
  11271. // "$ref": "Empty"
  11272. // },
  11273. // "scopes": [
  11274. // "https://www.googleapis.com/auth/cloud-platform",
  11275. // "https://www.googleapis.com/auth/genomics"
  11276. // ]
  11277. // }
  11278. }
  11279. // method id "genomics.variantsets.export":
  11280. type VariantsetsExportCall struct {
  11281. s *Service
  11282. variantSetId string
  11283. exportvariantsetrequest *ExportVariantSetRequest
  11284. urlParams_ gensupport.URLParams
  11285. ctx_ context.Context
  11286. header_ http.Header
  11287. }
  11288. // Export: Exports variant set data to an external destination.
  11289. func (r *VariantsetsService) Export(variantSetId string, exportvariantsetrequest *ExportVariantSetRequest) *VariantsetsExportCall {
  11290. c := &VariantsetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11291. c.variantSetId = variantSetId
  11292. c.exportvariantsetrequest = exportvariantsetrequest
  11293. return c
  11294. }
  11295. // Fields allows partial responses to be retrieved. See
  11296. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11297. // for more information.
  11298. func (c *VariantsetsExportCall) Fields(s ...googleapi.Field) *VariantsetsExportCall {
  11299. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11300. return c
  11301. }
  11302. // Context sets the context to be used in this call's Do method. Any
  11303. // pending HTTP request will be aborted if the provided context is
  11304. // canceled.
  11305. func (c *VariantsetsExportCall) Context(ctx context.Context) *VariantsetsExportCall {
  11306. c.ctx_ = ctx
  11307. return c
  11308. }
  11309. // Header returns an http.Header that can be modified by the caller to
  11310. // add HTTP headers to the request.
  11311. func (c *VariantsetsExportCall) Header() http.Header {
  11312. if c.header_ == nil {
  11313. c.header_ = make(http.Header)
  11314. }
  11315. return c.header_
  11316. }
  11317. func (c *VariantsetsExportCall) doRequest(alt string) (*http.Response, error) {
  11318. reqHeaders := make(http.Header)
  11319. for k, v := range c.header_ {
  11320. reqHeaders[k] = v
  11321. }
  11322. reqHeaders.Set("User-Agent", c.s.userAgent())
  11323. var body io.Reader = nil
  11324. body, err := googleapi.WithoutDataWrapper.JSONReader(c.exportvariantsetrequest)
  11325. if err != nil {
  11326. return nil, err
  11327. }
  11328. reqHeaders.Set("Content-Type", "application/json")
  11329. c.urlParams_.Set("alt", alt)
  11330. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}:export")
  11331. urls += "?" + c.urlParams_.Encode()
  11332. req, _ := http.NewRequest("POST", urls, body)
  11333. req.Header = reqHeaders
  11334. googleapi.Expand(req.URL, map[string]string{
  11335. "variantSetId": c.variantSetId,
  11336. })
  11337. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11338. }
  11339. // Do executes the "genomics.variantsets.export" call.
  11340. // Exactly one of *Operation or error will be non-nil. Any non-2xx
  11341. // status code is an error. Response headers are in either
  11342. // *Operation.ServerResponse.Header or (if a response was returned at
  11343. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11344. // to check whether the returned error was because
  11345. // http.StatusNotModified was returned.
  11346. func (c *VariantsetsExportCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
  11347. gensupport.SetOptions(c.urlParams_, opts...)
  11348. res, err := c.doRequest("json")
  11349. if res != nil && res.StatusCode == http.StatusNotModified {
  11350. if res.Body != nil {
  11351. res.Body.Close()
  11352. }
  11353. return nil, &googleapi.Error{
  11354. Code: res.StatusCode,
  11355. Header: res.Header,
  11356. }
  11357. }
  11358. if err != nil {
  11359. return nil, err
  11360. }
  11361. defer googleapi.CloseBody(res)
  11362. if err := googleapi.CheckResponse(res); err != nil {
  11363. return nil, err
  11364. }
  11365. ret := &Operation{
  11366. ServerResponse: googleapi.ServerResponse{
  11367. Header: res.Header,
  11368. HTTPStatusCode: res.StatusCode,
  11369. },
  11370. }
  11371. target := &ret
  11372. if err := gensupport.DecodeResponse(target, res); err != nil {
  11373. return nil, err
  11374. }
  11375. return ret, nil
  11376. // {
  11377. // "description": "Exports variant set data to an external destination.",
  11378. // "flatPath": "v1/variantsets/{variantSetId}:export",
  11379. // "httpMethod": "POST",
  11380. // "id": "genomics.variantsets.export",
  11381. // "parameterOrder": [
  11382. // "variantSetId"
  11383. // ],
  11384. // "parameters": {
  11385. // "variantSetId": {
  11386. // "description": "Required. The ID of the variant set that contains variant data which\nshould be exported. The caller must have READ access to this variant set.",
  11387. // "location": "path",
  11388. // "required": true,
  11389. // "type": "string"
  11390. // }
  11391. // },
  11392. // "path": "v1/variantsets/{variantSetId}:export",
  11393. // "request": {
  11394. // "$ref": "ExportVariantSetRequest"
  11395. // },
  11396. // "response": {
  11397. // "$ref": "Operation"
  11398. // },
  11399. // "scopes": [
  11400. // "https://www.googleapis.com/auth/bigquery",
  11401. // "https://www.googleapis.com/auth/cloud-platform",
  11402. // "https://www.googleapis.com/auth/genomics"
  11403. // ]
  11404. // }
  11405. }
  11406. // method id "genomics.variantsets.get":
  11407. type VariantsetsGetCall struct {
  11408. s *Service
  11409. variantSetId string
  11410. urlParams_ gensupport.URLParams
  11411. ifNoneMatch_ string
  11412. ctx_ context.Context
  11413. header_ http.Header
  11414. }
  11415. // Get: Gets a variant set by ID.
  11416. func (r *VariantsetsService) Get(variantSetId string) *VariantsetsGetCall {
  11417. c := &VariantsetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11418. c.variantSetId = variantSetId
  11419. return c
  11420. }
  11421. // Fields allows partial responses to be retrieved. See
  11422. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11423. // for more information.
  11424. func (c *VariantsetsGetCall) Fields(s ...googleapi.Field) *VariantsetsGetCall {
  11425. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11426. return c
  11427. }
  11428. // IfNoneMatch sets the optional parameter which makes the operation
  11429. // fail if the object's ETag matches the given value. This is useful for
  11430. // getting updates only after the object has changed since the last
  11431. // request. Use googleapi.IsNotModified to check whether the response
  11432. // error from Do is the result of In-None-Match.
  11433. func (c *VariantsetsGetCall) IfNoneMatch(entityTag string) *VariantsetsGetCall {
  11434. c.ifNoneMatch_ = entityTag
  11435. return c
  11436. }
  11437. // Context sets the context to be used in this call's Do method. Any
  11438. // pending HTTP request will be aborted if the provided context is
  11439. // canceled.
  11440. func (c *VariantsetsGetCall) Context(ctx context.Context) *VariantsetsGetCall {
  11441. c.ctx_ = ctx
  11442. return c
  11443. }
  11444. // Header returns an http.Header that can be modified by the caller to
  11445. // add HTTP headers to the request.
  11446. func (c *VariantsetsGetCall) Header() http.Header {
  11447. if c.header_ == nil {
  11448. c.header_ = make(http.Header)
  11449. }
  11450. return c.header_
  11451. }
  11452. func (c *VariantsetsGetCall) doRequest(alt string) (*http.Response, error) {
  11453. reqHeaders := make(http.Header)
  11454. for k, v := range c.header_ {
  11455. reqHeaders[k] = v
  11456. }
  11457. reqHeaders.Set("User-Agent", c.s.userAgent())
  11458. if c.ifNoneMatch_ != "" {
  11459. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11460. }
  11461. var body io.Reader = nil
  11462. c.urlParams_.Set("alt", alt)
  11463. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}")
  11464. urls += "?" + c.urlParams_.Encode()
  11465. req, _ := http.NewRequest("GET", urls, body)
  11466. req.Header = reqHeaders
  11467. googleapi.Expand(req.URL, map[string]string{
  11468. "variantSetId": c.variantSetId,
  11469. })
  11470. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11471. }
  11472. // Do executes the "genomics.variantsets.get" call.
  11473. // Exactly one of *VariantSet or error will be non-nil. Any non-2xx
  11474. // status code is an error. Response headers are in either
  11475. // *VariantSet.ServerResponse.Header or (if a response was returned at
  11476. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11477. // to check whether the returned error was because
  11478. // http.StatusNotModified was returned.
  11479. func (c *VariantsetsGetCall) Do(opts ...googleapi.CallOption) (*VariantSet, error) {
  11480. gensupport.SetOptions(c.urlParams_, opts...)
  11481. res, err := c.doRequest("json")
  11482. if res != nil && res.StatusCode == http.StatusNotModified {
  11483. if res.Body != nil {
  11484. res.Body.Close()
  11485. }
  11486. return nil, &googleapi.Error{
  11487. Code: res.StatusCode,
  11488. Header: res.Header,
  11489. }
  11490. }
  11491. if err != nil {
  11492. return nil, err
  11493. }
  11494. defer googleapi.CloseBody(res)
  11495. if err := googleapi.CheckResponse(res); err != nil {
  11496. return nil, err
  11497. }
  11498. ret := &VariantSet{
  11499. ServerResponse: googleapi.ServerResponse{
  11500. Header: res.Header,
  11501. HTTPStatusCode: res.StatusCode,
  11502. },
  11503. }
  11504. target := &ret
  11505. if err := gensupport.DecodeResponse(target, res); err != nil {
  11506. return nil, err
  11507. }
  11508. return ret, nil
  11509. // {
  11510. // "description": "Gets a variant set by ID.",
  11511. // "flatPath": "v1/variantsets/{variantSetId}",
  11512. // "httpMethod": "GET",
  11513. // "id": "genomics.variantsets.get",
  11514. // "parameterOrder": [
  11515. // "variantSetId"
  11516. // ],
  11517. // "parameters": {
  11518. // "variantSetId": {
  11519. // "description": "Required. The ID of the variant set.",
  11520. // "location": "path",
  11521. // "required": true,
  11522. // "type": "string"
  11523. // }
  11524. // },
  11525. // "path": "v1/variantsets/{variantSetId}",
  11526. // "response": {
  11527. // "$ref": "VariantSet"
  11528. // },
  11529. // "scopes": [
  11530. // "https://www.googleapis.com/auth/cloud-platform",
  11531. // "https://www.googleapis.com/auth/genomics",
  11532. // "https://www.googleapis.com/auth/genomics.readonly"
  11533. // ]
  11534. // }
  11535. }
  11536. // method id "genomics.variantsets.patch":
  11537. type VariantsetsPatchCall struct {
  11538. s *Service
  11539. variantSetId string
  11540. variantset *VariantSet
  11541. urlParams_ gensupport.URLParams
  11542. ctx_ context.Context
  11543. header_ http.Header
  11544. }
  11545. // Patch: Updates a variant set using patch semantics.
  11546. func (r *VariantsetsService) Patch(variantSetId string, variantset *VariantSet) *VariantsetsPatchCall {
  11547. c := &VariantsetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11548. c.variantSetId = variantSetId
  11549. c.variantset = variantset
  11550. return c
  11551. }
  11552. // UpdateMask sets the optional parameter "updateMask": An optional mask
  11553. // specifying which fields to update. Supported fields:
  11554. //
  11555. // * metadata.
  11556. // * name.
  11557. // * description.
  11558. //
  11559. // Leaving `updateMask` unset is equivalent to specifying all
  11560. // mutable
  11561. // fields.
  11562. func (c *VariantsetsPatchCall) UpdateMask(updateMask string) *VariantsetsPatchCall {
  11563. c.urlParams_.Set("updateMask", updateMask)
  11564. return c
  11565. }
  11566. // Fields allows partial responses to be retrieved. See
  11567. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11568. // for more information.
  11569. func (c *VariantsetsPatchCall) Fields(s ...googleapi.Field) *VariantsetsPatchCall {
  11570. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11571. return c
  11572. }
  11573. // Context sets the context to be used in this call's Do method. Any
  11574. // pending HTTP request will be aborted if the provided context is
  11575. // canceled.
  11576. func (c *VariantsetsPatchCall) Context(ctx context.Context) *VariantsetsPatchCall {
  11577. c.ctx_ = ctx
  11578. return c
  11579. }
  11580. // Header returns an http.Header that can be modified by the caller to
  11581. // add HTTP headers to the request.
  11582. func (c *VariantsetsPatchCall) Header() http.Header {
  11583. if c.header_ == nil {
  11584. c.header_ = make(http.Header)
  11585. }
  11586. return c.header_
  11587. }
  11588. func (c *VariantsetsPatchCall) doRequest(alt string) (*http.Response, error) {
  11589. reqHeaders := make(http.Header)
  11590. for k, v := range c.header_ {
  11591. reqHeaders[k] = v
  11592. }
  11593. reqHeaders.Set("User-Agent", c.s.userAgent())
  11594. var body io.Reader = nil
  11595. body, err := googleapi.WithoutDataWrapper.JSONReader(c.variantset)
  11596. if err != nil {
  11597. return nil, err
  11598. }
  11599. reqHeaders.Set("Content-Type", "application/json")
  11600. c.urlParams_.Set("alt", alt)
  11601. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/{variantSetId}")
  11602. urls += "?" + c.urlParams_.Encode()
  11603. req, _ := http.NewRequest("PATCH", urls, body)
  11604. req.Header = reqHeaders
  11605. googleapi.Expand(req.URL, map[string]string{
  11606. "variantSetId": c.variantSetId,
  11607. })
  11608. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11609. }
  11610. // Do executes the "genomics.variantsets.patch" call.
  11611. // Exactly one of *VariantSet or error will be non-nil. Any non-2xx
  11612. // status code is an error. Response headers are in either
  11613. // *VariantSet.ServerResponse.Header or (if a response was returned at
  11614. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11615. // to check whether the returned error was because
  11616. // http.StatusNotModified was returned.
  11617. func (c *VariantsetsPatchCall) Do(opts ...googleapi.CallOption) (*VariantSet, error) {
  11618. gensupport.SetOptions(c.urlParams_, opts...)
  11619. res, err := c.doRequest("json")
  11620. if res != nil && res.StatusCode == http.StatusNotModified {
  11621. if res.Body != nil {
  11622. res.Body.Close()
  11623. }
  11624. return nil, &googleapi.Error{
  11625. Code: res.StatusCode,
  11626. Header: res.Header,
  11627. }
  11628. }
  11629. if err != nil {
  11630. return nil, err
  11631. }
  11632. defer googleapi.CloseBody(res)
  11633. if err := googleapi.CheckResponse(res); err != nil {
  11634. return nil, err
  11635. }
  11636. ret := &VariantSet{
  11637. ServerResponse: googleapi.ServerResponse{
  11638. Header: res.Header,
  11639. HTTPStatusCode: res.StatusCode,
  11640. },
  11641. }
  11642. target := &ret
  11643. if err := gensupport.DecodeResponse(target, res); err != nil {
  11644. return nil, err
  11645. }
  11646. return ret, nil
  11647. // {
  11648. // "description": "Updates a variant set using patch semantics.",
  11649. // "flatPath": "v1/variantsets/{variantSetId}",
  11650. // "httpMethod": "PATCH",
  11651. // "id": "genomics.variantsets.patch",
  11652. // "parameterOrder": [
  11653. // "variantSetId"
  11654. // ],
  11655. // "parameters": {
  11656. // "updateMask": {
  11657. // "description": "An optional mask specifying which fields to update. Supported fields:\n\n* metadata.\n* name.\n* description.\n\nLeaving `updateMask` unset is equivalent to specifying all mutable\nfields.",
  11658. // "format": "google-fieldmask",
  11659. // "location": "query",
  11660. // "type": "string"
  11661. // },
  11662. // "variantSetId": {
  11663. // "description": "The ID of the variant to be updated (must already exist).",
  11664. // "location": "path",
  11665. // "required": true,
  11666. // "type": "string"
  11667. // }
  11668. // },
  11669. // "path": "v1/variantsets/{variantSetId}",
  11670. // "request": {
  11671. // "$ref": "VariantSet"
  11672. // },
  11673. // "response": {
  11674. // "$ref": "VariantSet"
  11675. // },
  11676. // "scopes": [
  11677. // "https://www.googleapis.com/auth/cloud-platform",
  11678. // "https://www.googleapis.com/auth/genomics"
  11679. // ]
  11680. // }
  11681. }
  11682. // method id "genomics.variantsets.search":
  11683. type VariantsetsSearchCall struct {
  11684. s *Service
  11685. searchvariantsetsrequest *SearchVariantSetsRequest
  11686. urlParams_ gensupport.URLParams
  11687. ctx_ context.Context
  11688. header_ http.Header
  11689. }
  11690. // Search: Returns a list of all variant sets matching search
  11691. // criteria.
  11692. //
  11693. // Implements
  11694. // [GlobalAllianceApi.searchVariantSets](https://gi
  11695. // thub.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmeth
  11696. // ods.avdl#L49).
  11697. func (r *VariantsetsService) Search(searchvariantsetsrequest *SearchVariantSetsRequest) *VariantsetsSearchCall {
  11698. c := &VariantsetsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11699. c.searchvariantsetsrequest = searchvariantsetsrequest
  11700. return c
  11701. }
  11702. // Fields allows partial responses to be retrieved. See
  11703. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11704. // for more information.
  11705. func (c *VariantsetsSearchCall) Fields(s ...googleapi.Field) *VariantsetsSearchCall {
  11706. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11707. return c
  11708. }
  11709. // Context sets the context to be used in this call's Do method. Any
  11710. // pending HTTP request will be aborted if the provided context is
  11711. // canceled.
  11712. func (c *VariantsetsSearchCall) Context(ctx context.Context) *VariantsetsSearchCall {
  11713. c.ctx_ = ctx
  11714. return c
  11715. }
  11716. // Header returns an http.Header that can be modified by the caller to
  11717. // add HTTP headers to the request.
  11718. func (c *VariantsetsSearchCall) Header() http.Header {
  11719. if c.header_ == nil {
  11720. c.header_ = make(http.Header)
  11721. }
  11722. return c.header_
  11723. }
  11724. func (c *VariantsetsSearchCall) doRequest(alt string) (*http.Response, error) {
  11725. reqHeaders := make(http.Header)
  11726. for k, v := range c.header_ {
  11727. reqHeaders[k] = v
  11728. }
  11729. reqHeaders.Set("User-Agent", c.s.userAgent())
  11730. var body io.Reader = nil
  11731. body, err := googleapi.WithoutDataWrapper.JSONReader(c.searchvariantsetsrequest)
  11732. if err != nil {
  11733. return nil, err
  11734. }
  11735. reqHeaders.Set("Content-Type", "application/json")
  11736. c.urlParams_.Set("alt", alt)
  11737. urls := googleapi.ResolveRelative(c.s.BasePath, "v1/variantsets/search")
  11738. urls += "?" + c.urlParams_.Encode()
  11739. req, _ := http.NewRequest("POST", urls, body)
  11740. req.Header = reqHeaders
  11741. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11742. }
  11743. // Do executes the "genomics.variantsets.search" call.
  11744. // Exactly one of *SearchVariantSetsResponse or error will be non-nil.
  11745. // Any non-2xx status code is an error. Response headers are in either
  11746. // *SearchVariantSetsResponse.ServerResponse.Header or (if a response
  11747. // was returned at all) in error.(*googleapi.Error).Header. Use
  11748. // googleapi.IsNotModified to check whether the returned error was
  11749. // because http.StatusNotModified was returned.
  11750. func (c *VariantsetsSearchCall) Do(opts ...googleapi.CallOption) (*SearchVariantSetsResponse, error) {
  11751. gensupport.SetOptions(c.urlParams_, opts...)
  11752. res, err := c.doRequest("json")
  11753. if res != nil && res.StatusCode == http.StatusNotModified {
  11754. if res.Body != nil {
  11755. res.Body.Close()
  11756. }
  11757. return nil, &googleapi.Error{
  11758. Code: res.StatusCode,
  11759. Header: res.Header,
  11760. }
  11761. }
  11762. if err != nil {
  11763. return nil, err
  11764. }
  11765. defer googleapi.CloseBody(res)
  11766. if err := googleapi.CheckResponse(res); err != nil {
  11767. return nil, err
  11768. }
  11769. ret := &SearchVariantSetsResponse{
  11770. ServerResponse: googleapi.ServerResponse{
  11771. Header: res.Header,
  11772. HTTPStatusCode: res.StatusCode,
  11773. },
  11774. }
  11775. target := &ret
  11776. if err := gensupport.DecodeResponse(target, res); err != nil {
  11777. return nil, err
  11778. }
  11779. return ret, nil
  11780. // {
  11781. // "description": "Returns a list of all variant sets matching search criteria.\n\nImplements\n[GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49).",
  11782. // "flatPath": "v1/variantsets/search",
  11783. // "httpMethod": "POST",
  11784. // "id": "genomics.variantsets.search",
  11785. // "parameterOrder": [],
  11786. // "parameters": {},
  11787. // "path": "v1/variantsets/search",
  11788. // "request": {
  11789. // "$ref": "SearchVariantSetsRequest"
  11790. // },
  11791. // "response": {
  11792. // "$ref": "SearchVariantSetsResponse"
  11793. // },
  11794. // "scopes": [
  11795. // "https://www.googleapis.com/auth/cloud-platform",
  11796. // "https://www.googleapis.com/auth/genomics",
  11797. // "https://www.googleapis.com/auth/genomics.readonly"
  11798. // ]
  11799. // }
  11800. }
  11801. // Pages invokes f for each page of results.
  11802. // A non-nil error returned from f will halt the iteration.
  11803. // The provided context supersedes any context provided to the Context method.
  11804. func (c *VariantsetsSearchCall) Pages(ctx context.Context, f func(*SearchVariantSetsResponse) error) error {
  11805. c.ctx_ = ctx
  11806. defer func(pt string) { c.searchvariantsetsrequest.PageToken = pt }(c.searchvariantsetsrequest.PageToken) // reset paging to original point
  11807. for {
  11808. x, err := c.Do()
  11809. if err != nil {
  11810. return err
  11811. }
  11812. if err := f(x); err != nil {
  11813. return err
  11814. }
  11815. if x.NextPageToken == "" {
  11816. return nil
  11817. }
  11818. c.searchvariantsetsrequest.PageToken = x.NextPageToken
  11819. }
  11820. }