#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnnotationSet {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub reference_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub source_uri: ::prost::alloc::string::String,
#[prost(enumeration = "AnnotationType", tag = "6")]
pub r#type: i32,
#[prost(map = "string, message", tag = "17")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Annotation {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub annotation_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub reference_id: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "6")]
pub start: i64,
#[prost(int64, tag = "7")]
pub end: i64,
#[prost(bool, tag = "8")]
pub reverse_strand: bool,
#[prost(enumeration = "AnnotationType", tag = "9")]
pub r#type: i32,
#[prost(map = "string, message", tag = "12")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
#[prost(oneof = "annotation::Value", tags = "10, 11")]
pub value: ::core::option::Option<annotation::Value>,
}
pub mod annotation {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Value {
#[prost(message, tag = "10")]
Variant(super::VariantAnnotation),
#[prost(message, tag = "11")]
Transcript(super::Transcript),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantAnnotation {
#[prost(enumeration = "variant_annotation::Type", tag = "1")]
pub r#type: i32,
#[prost(enumeration = "variant_annotation::Effect", tag = "2")]
pub effect: i32,
#[prost(string, tag = "3")]
pub alternate_bases: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub gene_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub transcript_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "6")]
pub conditions: ::prost::alloc::vec::Vec<variant_annotation::ClinicalCondition>,
#[prost(enumeration = "variant_annotation::ClinicalSignificance", tag = "7")]
pub clinical_significance: i32,
}
pub mod variant_annotation {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClinicalCondition {
#[prost(string, repeated, tag = "1")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub external_ids: ::prost::alloc::vec::Vec<super::ExternalId>,
#[prost(string, tag = "3")]
pub concept_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub omim_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Other = 1,
Insertion = 2,
Deletion = 3,
Substitution = 4,
Snp = 5,
Structural = 6,
Cnv = 7,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Effect {
Unspecified = 0,
Other = 1,
Frameshift = 2,
FramePreservingIndel = 3,
SynonymousSnp = 4,
NonsynonymousSnp = 5,
StopGain = 6,
StopLoss = 7,
SpliceSiteDisruption = 8,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ClinicalSignificance {
Unspecified = 0,
Other = 1,
Uncertain = 2,
Benign = 3,
LikelyBenign = 4,
LikelyPathogenic = 5,
Pathogenic = 6,
DrugResponse = 7,
Histocompatibility = 8,
ConfersSensitivity = 9,
RiskFactor = 10,
Association = 11,
Protective = 12,
MultipleReported = 13,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Transcript {
#[prost(string, tag = "1")]
pub gene_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub exons: ::prost::alloc::vec::Vec<transcript::Exon>,
#[prost(message, optional, tag = "3")]
pub coding_sequence: ::core::option::Option<transcript::CodingSequence>,
}
pub mod transcript {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Exon {
#[prost(int64, tag = "1")]
pub start: i64,
#[prost(int64, tag = "2")]
pub end: i64,
#[prost(message, optional, tag = "3")]
pub frame: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CodingSequence {
#[prost(int64, tag = "1")]
pub start: i64,
#[prost(int64, tag = "2")]
pub end: i64,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExternalId {
#[prost(string, tag = "1")]
pub source_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAnnotationSetRequest {
#[prost(message, optional, tag = "1")]
pub annotation_set: ::core::option::Option<AnnotationSet>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAnnotationSetRequest {
#[prost(string, tag = "1")]
pub annotation_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAnnotationSetRequest {
#[prost(string, tag = "1")]
pub annotation_set_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub annotation_set: ::core::option::Option<AnnotationSet>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAnnotationSetRequest {
#[prost(string, tag = "1")]
pub annotation_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationSetsRequest {
#[prost(string, repeated, tag = "1")]
pub dataset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub reference_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "AnnotationType", repeated, tag = "4")]
pub types: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "5")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "6")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationSetsResponse {
#[prost(message, repeated, tag = "1")]
pub annotation_sets: ::prost::alloc::vec::Vec<AnnotationSet>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAnnotationRequest {
#[prost(message, optional, tag = "1")]
pub annotation: ::core::option::Option<Annotation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateAnnotationsRequest {
#[prost(message, repeated, tag = "1")]
pub annotations: ::prost::alloc::vec::Vec<Annotation>,
#[prost(string, tag = "2")]
pub request_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCreateAnnotationsResponse {
#[prost(message, repeated, tag = "1")]
pub entries: ::prost::alloc::vec::Vec<batch_create_annotations_response::Entry>,
}
pub mod batch_create_annotations_response {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entry {
#[prost(message, optional, tag = "1")]
pub status: ::core::option::Option<super::super::super::rpc::Status>,
#[prost(message, optional, tag = "2")]
pub annotation: ::core::option::Option<super::Annotation>,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAnnotationRequest {
#[prost(string, tag = "1")]
pub annotation_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAnnotationRequest {
#[prost(string, tag = "1")]
pub annotation_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub annotation: ::core::option::Option<Annotation>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteAnnotationRequest {
#[prost(string, tag = "1")]
pub annotation_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationsRequest {
#[prost(string, repeated, tag = "1")]
pub annotation_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "4")]
pub start: i64,
#[prost(int64, tag = "5")]
pub end: i64,
#[prost(string, tag = "6")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "7")]
pub page_size: i32,
#[prost(oneof = "search_annotations_request::Reference", tags = "2, 3")]
pub reference: ::core::option::Option<search_annotations_request::Reference>,
}
pub mod search_annotations_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Reference {
#[prost(string, tag = "2")]
ReferenceId(::prost::alloc::string::String),
#[prost(string, tag = "3")]
ReferenceName(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAnnotationsResponse {
#[prost(message, repeated, tag = "1")]
pub annotations: ::prost::alloc::vec::Vec<Annotation>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AnnotationType {
Unspecified = 0,
Generic = 1,
Variant = 2,
Gene = 3,
Transcript = 4,
}
#[doc = r" Generated client implementations."]
pub mod annotation_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " This service provides storage and positional retrieval of genomic"]
#[doc = " reference annotations, including variant annotations."]
#[derive(Debug, Clone)]
pub struct AnnotationServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> AnnotationServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AnnotationServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
AnnotationServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Creates a new annotation set. Caller must have WRITE permission for the"]
#[doc = " associated dataset."]
#[doc = ""]
#[doc = " The following fields are required:"]
#[doc = ""]
#[doc = " * [datasetId][google.genomics.v1.AnnotationSet.dataset_id]"]
#[doc = " * [referenceSetId][google.genomics.v1.AnnotationSet.reference_set_id]"]
#[doc = ""]
#[doc = " All other fields may be optionally specified, unless documented as being"]
#[doc = " server-generated (for example, the `id` field)."]
pub async fn create_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::CreateAnnotationSetRequest>,
) -> Result<tonic::Response<super::AnnotationSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/CreateAnnotationSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets an annotation set. Caller must have READ permission for"]
#[doc = " the associated dataset."]
pub async fn get_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::GetAnnotationSetRequest>,
) -> Result<tonic::Response<super::AnnotationSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/GetAnnotationSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates an annotation set. The update must respect all mutability"]
#[doc = " restrictions and other invariants described on the annotation set resource."]
#[doc = " Caller must have WRITE permission for the associated dataset."]
pub async fn update_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateAnnotationSetRequest>,
) -> Result<tonic::Response<super::AnnotationSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/UpdateAnnotationSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes an annotation set. Caller must have WRITE permission"]
#[doc = " for the associated annotation set."]
pub async fn delete_annotation_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAnnotationSetRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/DeleteAnnotationSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Searches for annotation sets that match the given criteria. Annotation sets"]
#[doc = " are returned in an unspecified order. This order is consistent, such that"]
#[doc = " two queries for the same content (regardless of page size) yield annotation"]
#[doc = " sets in the same order across their respective streams of paginated"]
#[doc = " responses. Caller must have READ permission for the queried datasets."]
pub async fn search_annotation_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchAnnotationSetsRequest>,
) -> Result<tonic::Response<super::SearchAnnotationSetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/SearchAnnotationSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new annotation. Caller must have WRITE permission"]
#[doc = " for the associated annotation set."]
#[doc = ""]
#[doc = " The following fields are required:"]
#[doc = ""]
#[doc = " * [annotationSetId][google.genomics.v1.Annotation.annotation_set_id]"]
#[doc = " * [referenceName][google.genomics.v1.Annotation.reference_name] or"]
#[doc = " [referenceId][google.genomics.v1.Annotation.reference_id]"]
#[doc = ""]
#[doc = " ### Transcripts"]
#[doc = ""]
#[doc = " For annotations of type TRANSCRIPT, the following fields of"]
#[doc = " [transcript][google.genomics.v1.Annotation.transcript] must be provided:"]
#[doc = ""]
#[doc = " * [exons.start][google.genomics.v1.Transcript.Exon.start]"]
#[doc = " * [exons.end][google.genomics.v1.Transcript.Exon.end]"]
#[doc = ""]
#[doc = " All other fields may be optionally specified, unless documented as being"]
#[doc = " server-generated (for example, the `id` field). The annotated"]
#[doc = " range must be no longer than 100Mbp (mega base pairs). See the"]
#[doc = " [Annotation resource][google.genomics.v1.Annotation]"]
#[doc = " for additional restrictions on each field."]
pub async fn create_annotation(
&mut self,
request: impl tonic::IntoRequest<super::CreateAnnotationRequest>,
) -> Result<tonic::Response<super::Annotation>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/CreateAnnotation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates one or more new annotations atomically. All annotations must"]
#[doc = " belong to the same annotation set. Caller must have WRITE"]
#[doc = " permission for this annotation set. For optimal performance, batch"]
#[doc = " positionally adjacent annotations together."]
#[doc = ""]
#[doc = " If the request has a systemic issue, such as an attempt to write to"]
#[doc = " an inaccessible annotation set, the entire RPC will fail accordingly. For"]
#[doc = " lesser data issues, when possible an error will be isolated to the"]
#[doc = " corresponding batch entry in the response; the remaining well formed"]
#[doc = " annotations will be created normally."]
#[doc = ""]
#[doc = " For details on the requirements for each individual annotation resource,"]
#[doc = " see"]
#[doc = " [CreateAnnotation][google.genomics.v1.AnnotationServiceV1.CreateAnnotation]."]
pub async fn batch_create_annotations(
&mut self,
request: impl tonic::IntoRequest<super::BatchCreateAnnotationsRequest>,
) -> Result<tonic::Response<super::BatchCreateAnnotationsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/BatchCreateAnnotations",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets an annotation. Caller must have READ permission"]
#[doc = " for the associated annotation set."]
pub async fn get_annotation(
&mut self,
request: impl tonic::IntoRequest<super::GetAnnotationRequest>,
) -> Result<tonic::Response<super::Annotation>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/GetAnnotation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates an annotation. Caller must have"]
#[doc = " WRITE permission for the associated dataset."]
pub async fn update_annotation(
&mut self,
request: impl tonic::IntoRequest<super::UpdateAnnotationRequest>,
) -> Result<tonic::Response<super::Annotation>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/UpdateAnnotation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes an annotation. Caller must have WRITE permission for"]
#[doc = " the associated annotation set."]
pub async fn delete_annotation(
&mut self,
request: impl tonic::IntoRequest<super::DeleteAnnotationRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/DeleteAnnotation",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Searches for annotations that match the given criteria. Results are"]
#[doc = " ordered by genomic coordinate (by reference sequence, then position)."]
#[doc = " Annotations with equivalent genomic coordinates are returned in an"]
#[doc = " unspecified order. This order is consistent, such that two queries for the"]
#[doc = " same content (regardless of page size) yield annotations in the same order"]
#[doc = " across their respective streams of paginated responses. Caller must have"]
#[doc = " READ permission for the queried annotation sets."]
pub async fn search_annotations(
&mut self,
request: impl tonic::IntoRequest<super::SearchAnnotationsRequest>,
) -> Result<tonic::Response<super::SearchAnnotationsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.AnnotationServiceV1/SearchAnnotations",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CigarUnit {
#[prost(enumeration = "cigar_unit::Operation", tag = "1")]
pub operation: i32,
#[prost(int64, tag = "2")]
pub operation_length: i64,
#[prost(string, tag = "3")]
pub reference_sequence: ::prost::alloc::string::String,
}
pub mod cigar_unit {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Operation {
Unspecified = 0,
AlignmentMatch = 1,
Insert = 2,
Delete = 3,
Skip = 4,
ClipSoft = 5,
ClipHard = 6,
Pad = 7,
SequenceMatch = 8,
SequenceMismatch = 9,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dataset {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatasetsRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub page_size: i32,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDatasetsResponse {
#[prost(message, repeated, tag = "1")]
pub datasets: ::prost::alloc::vec::Vec<Dataset>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDatasetRequest {
#[prost(message, optional, tag = "1")]
pub dataset: ::core::option::Option<Dataset>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDatasetRequest {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub dataset: ::core::option::Option<Dataset>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatasetRequest {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UndeleteDatasetRequest {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDatasetRequest {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod dataset_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " This service manages datasets, which are collections of genomic data."]
#[derive(Debug, Clone)]
pub struct DatasetServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> DatasetServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DatasetServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
DatasetServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Lists datasets within a project."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn list_datasets(
&mut self,
request: impl tonic::IntoRequest<super::ListDatasetsRequest>,
) -> Result<tonic::Response<super::ListDatasetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/ListDatasets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new dataset."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn create_dataset(
&mut self,
request: impl tonic::IntoRequest<super::CreateDatasetRequest>,
) -> Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/CreateDataset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a dataset by ID."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn get_dataset(
&mut self,
request: impl tonic::IntoRequest<super::GetDatasetRequest>,
) -> Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/GetDataset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a dataset."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " This method supports patch semantics."]
pub async fn update_dataset(
&mut self,
request: impl tonic::IntoRequest<super::UpdateDatasetRequest>,
) -> Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/UpdateDataset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a dataset and all of its contents (all read group sets,"]
#[doc = " reference sets, variant sets, call sets, annotation sets, etc.)"]
#[doc = " This is reversible (up to one week after the deletion) via"]
#[doc = " the"]
#[doc = " [datasets.undelete][google.genomics.v1.DatasetServiceV1.UndeleteDataset]"]
#[doc = " operation."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn delete_dataset(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDatasetRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/DeleteDataset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Undeletes a dataset by restoring a dataset which was deleted via this API."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " This operation is only possible for a week after the deletion occurred."]
pub async fn undelete_dataset(
&mut self,
request: impl tonic::IntoRequest<super::UndeleteDatasetRequest>,
) -> Result<tonic::Response<super::Dataset>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/UndeleteDataset",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Sets the access control policy on the specified dataset. Replaces any"]
#[doc = " existing policy."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " See <a href=\"/iam/docs/managing-policies#setting_a_policy\">Setting a"]
#[doc = " Policy</a> for more information."]
pub async fn set_iam_policy(
&mut self,
request: impl tonic::IntoRequest<super::super::super::iam::v1::SetIamPolicyRequest>,
) -> Result<tonic::Response<super::super::super::iam::v1::Policy>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/SetIamPolicy",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets the access control policy for the dataset. This is empty if the"]
#[doc = " policy or resource does not exist."]
#[doc = ""]
#[doc = " See <a href=\"/iam/docs/managing-policies#getting_a_policy\">Getting a"]
#[doc = " Policy</a> for more information."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn get_iam_policy(
&mut self,
request: impl tonic::IntoRequest<super::super::super::iam::v1::GetIamPolicyRequest>,
) -> Result<tonic::Response<super::super::super::iam::v1::Policy>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/GetIamPolicy",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns permissions that a caller has on the specified resource."]
#[doc = " See <a href=\"/iam/docs/managing-policies#testing_permissions\">Testing"]
#[doc = " Permissions</a> for more information."]
#[doc = ""]
#[doc = " For the definitions of datasets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn test_iam_permissions(
&mut self,
request: impl tonic::IntoRequest<super::super::super::iam::v1::TestIamPermissionsRequest>,
) -> Result<
tonic::Response<super::super::super::iam::v1::TestIamPermissionsResponse>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.DatasetServiceV1/TestIamPermissions",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationMetadata {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub create_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "3")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "4")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "5")]
pub request: ::core::option::Option<::prost_types::Any>,
#[prost(message, repeated, tag = "6")]
pub events: ::prost::alloc::vec::Vec<OperationEvent>,
#[prost(string, tag = "7")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub runtime_metadata: ::core::option::Option<::prost_types::Any>,
#[prost(map = "string, string", tag = "9")]
pub labels:
::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationEvent {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Position {
#[prost(string, tag = "1")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub position: i64,
#[prost(bool, tag = "3")]
pub reverse_strand: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Range {
#[prost(string, tag = "1")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub start: i64,
#[prost(int64, tag = "3")]
pub end: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LinearAlignment {
#[prost(message, optional, tag = "1")]
pub position: ::core::option::Option<Position>,
#[prost(int32, tag = "2")]
pub mapping_quality: i32,
#[prost(message, repeated, tag = "3")]
pub cigar: ::prost::alloc::vec::Vec<CigarUnit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Read {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub read_group_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub read_group_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub fragment_name: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub proper_placement: bool,
#[prost(bool, tag = "6")]
pub duplicate_fragment: bool,
#[prost(int32, tag = "7")]
pub fragment_length: i32,
#[prost(int32, tag = "8")]
pub read_number: i32,
#[prost(int32, tag = "9")]
pub number_reads: i32,
#[prost(bool, tag = "10")]
pub failed_vendor_quality_checks: bool,
#[prost(message, optional, tag = "11")]
pub alignment: ::core::option::Option<LinearAlignment>,
#[prost(bool, tag = "12")]
pub secondary_alignment: bool,
#[prost(bool, tag = "13")]
pub supplementary_alignment: bool,
#[prost(string, tag = "14")]
pub aligned_sequence: ::prost::alloc::string::String,
#[prost(int32, repeated, tag = "15")]
pub aligned_quality: ::prost::alloc::vec::Vec<i32>,
#[prost(message, optional, tag = "16")]
pub next_mate_position: ::core::option::Option<Position>,
#[prost(map = "string, message", tag = "17")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadGroup {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub sample_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub experiment: ::core::option::Option<read_group::Experiment>,
#[prost(int32, tag = "7")]
pub predicted_insert_size: i32,
#[prost(message, repeated, tag = "10")]
pub programs: ::prost::alloc::vec::Vec<read_group::Program>,
#[prost(string, tag = "11")]
pub reference_set_id: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "12")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
}
pub mod read_group {
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Experiment {
#[prost(string, tag = "1")]
pub library_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub platform_unit: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub sequencing_center: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub instrument_model: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Program {
#[prost(string, tag = "1")]
pub command_line: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub prev_program_id: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub version: ::prost::alloc::string::String,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadGroupSet {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub reference_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub filename: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "6")]
pub read_groups: ::prost::alloc::vec::Vec<ReadGroup>,
#[prost(map = "string, message", tag = "7")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadGroupSetsRequest {
#[prost(string, repeated, tag = "1")]
pub dataset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadGroupSetsResponse {
#[prost(message, repeated, tag = "1")]
pub read_group_sets: ::prost::alloc::vec::Vec<ReadGroupSet>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportReadGroupSetsRequest {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub reference_set_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "import_read_group_sets_request::PartitionStrategy", tag = "5")]
pub partition_strategy: i32,
}
pub mod import_read_group_sets_request {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PartitionStrategy {
Unspecified = 0,
PerFilePerSample = 1,
MergeAll = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportReadGroupSetsResponse {
#[prost(string, repeated, tag = "1")]
pub read_group_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportReadGroupSetRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub export_uri: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub read_group_set_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub reference_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateReadGroupSetRequest {
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub read_group_set: ::core::option::Option<ReadGroupSet>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteReadGroupSetRequest {
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReadGroupSetRequest {
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCoverageBucketsRequest {
#[prost(string, tag = "1")]
pub read_group_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub start: i64,
#[prost(int64, tag = "5")]
pub end: i64,
#[prost(int64, tag = "6")]
pub target_bucket_width: i64,
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "8")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CoverageBucket {
#[prost(message, optional, tag = "1")]
pub range: ::core::option::Option<Range>,
#[prost(float, tag = "2")]
pub mean_coverage: f32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListCoverageBucketsResponse {
#[prost(int64, tag = "1")]
pub bucket_width: i64,
#[prost(message, repeated, tag = "2")]
pub coverage_buckets: ::prost::alloc::vec::Vec<CoverageBucket>,
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadsRequest {
#[prost(string, repeated, tag = "1")]
pub read_group_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub read_group_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "7")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "8")]
pub start: i64,
#[prost(int64, tag = "9")]
pub end: i64,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReadsResponse {
#[prost(message, repeated, tag = "1")]
pub alignments: ::prost::alloc::vec::Vec<Read>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamReadsRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub read_group_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub start: i64,
#[prost(int64, tag = "5")]
pub end: i64,
#[prost(int32, tag = "6")]
pub shard: i32,
#[prost(int32, tag = "7")]
pub total_shards: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamReadsResponse {
#[prost(message, repeated, tag = "1")]
pub alignments: ::prost::alloc::vec::Vec<Read>,
}
#[doc = r" Generated client implementations."]
pub mod streaming_read_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct StreamingReadServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> StreamingReadServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StreamingReadServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
StreamingReadServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns a stream of all the reads matching the search request, ordered"]
#[doc = " by reference name, position, and ID."]
pub async fn stream_reads(
&mut self,
request: impl tonic::IntoRequest<super::StreamReadsRequest>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::StreamReadsResponse>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.StreamingReadService/StreamReads",
);
self.inner.server_streaming(request.into_request(), path, codec).await
}
}
}
#[doc = r" Generated client implementations."]
pub mod read_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[doc = " The Readstore. A data store for DNA sequencing Reads."]
#[derive(Debug, Clone)]
pub struct ReadServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ReadServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ReadServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ReadServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Creates read group sets by asynchronously importing the provided"]
#[doc = " information."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " The caller must have WRITE permissions to the dataset."]
#[doc = ""]
#[doc = " ## Notes on [BAM](https://samtools.github.io/hts-specs/SAMv1.pdf) import"]
#[doc = ""]
#[doc = " - Tags will be converted to strings - tag types are not preserved"]
#[doc = " - Comments (`@CO`) in the input file header will not be preserved"]
#[doc = " - Original header order of references (`@SQ`) will not be preserved"]
#[doc = " - Any reverse stranded unmapped reads will be reverse complemented, and"]
#[doc = " their qualities (also the \"BQ\" and \"OQ\" tags, if any) will be reversed"]
#[doc = " - Unmapped reads will be stripped of positional information (reference name"]
#[doc = " and position)"]
pub async fn import_read_group_sets(
&mut self,
request: impl tonic::IntoRequest<super::ImportReadGroupSetsRequest>,
) -> Result<tonic::Response<super::super::super::longrunning::Operation>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/ImportReadGroupSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Exports a read group set to a BAM file in Google Cloud Storage."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Note that currently there may be some differences between exported BAM"]
#[doc = " files and the original BAM file at the time of import. See"]
#[doc = " [ImportReadGroupSets][google.genomics.v1.ReadServiceV1.ImportReadGroupSets]"]
#[doc = " for caveats."]
pub async fn export_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::ExportReadGroupSetRequest>,
) -> Result<tonic::Response<super::super::super::longrunning::Operation>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/ExportReadGroupSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Searches for read group sets matching the criteria."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.searchReadGroupSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L135)."]
pub async fn search_read_group_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchReadGroupSetsRequest>,
) -> Result<tonic::Response<super::SearchReadGroupSetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/SearchReadGroupSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a read group set."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " This method supports patch semantics."]
pub async fn update_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateReadGroupSetRequest>,
) -> Result<tonic::Response<super::ReadGroupSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/UpdateReadGroupSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a read group set."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn delete_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteReadGroupSetRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/DeleteReadGroupSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a read group set by ID."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn get_read_group_set(
&mut self,
request: impl tonic::IntoRequest<super::GetReadGroupSetRequest>,
) -> Result<tonic::Response<super::ReadGroupSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/GetReadGroupSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists fixed width coverage buckets for a read group set, each of which"]
#[doc = " correspond to a range of a reference sequence. Each bucket summarizes"]
#[doc = " coverage information across its corresponding genomic range."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Coverage is defined as the number of reads which are aligned to a given"]
#[doc = " base in the reference sequence. Coverage buckets are available at several"]
#[doc = " precomputed bucket widths, enabling retrieval of various coverage 'zoom"]
#[doc = " levels'. The caller must have READ permissions for the target read group"]
#[doc = " set."]
pub async fn list_coverage_buckets(
&mut self,
request: impl tonic::IntoRequest<super::ListCoverageBucketsRequest>,
) -> Result<tonic::Response<super::ListCoverageBucketsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/ListCoverageBuckets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a list of reads for one or more read group sets."]
#[doc = ""]
#[doc = " For the definitions of read group sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Reads search operates over a genomic coordinate space of reference sequence"]
#[doc = " & position defined over the reference sequences to which the requested"]
#[doc = " read group sets are aligned."]
#[doc = ""]
#[doc = " If a target positional range is specified, search returns all reads whose"]
#[doc = " alignment to the reference genome overlap the range. A query which"]
#[doc = " specifies only read group set IDs yields all reads in those read group"]
#[doc = " sets, including unmapped reads."]
#[doc = ""]
#[doc = " All reads returned (including reads on subsequent pages) are ordered by"]
#[doc = " genomic coordinate (by reference sequence, then position). Reads with"]
#[doc = " equivalent genomic coordinates are returned in an unspecified order. This"]
#[doc = " order is consistent, such that two queries for the same content (regardless"]
#[doc = " of page size) yield reads in the same order across their respective streams"]
#[doc = " of paginated responses."]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.searchReads](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/readmethods.avdl#L85)."]
pub async fn search_reads(
&mut self,
request: impl tonic::IntoRequest<super::SearchReadsRequest>,
) -> Result<tonic::Response<super::SearchReadsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReadServiceV1/SearchReads",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Reference {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub length: i64,
#[prost(string, tag = "3")]
pub md5checksum: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub source_uri: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "6")]
pub source_accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, tag = "7")]
pub ncbi_taxon_id: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReferenceSet {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub reference_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub md5checksum: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub ncbi_taxon_id: i32,
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub assembly_id: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub source_uri: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "8")]
pub source_accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferenceSetsRequest {
#[prost(string, repeated, tag = "1")]
pub md5checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub assembly_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "5")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferenceSetsResponse {
#[prost(message, repeated, tag = "1")]
pub reference_sets: ::prost::alloc::vec::Vec<ReferenceSet>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReferenceSetRequest {
#[prost(string, tag = "1")]
pub reference_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferencesRequest {
#[prost(string, repeated, tag = "1")]
pub md5checksums: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub accessions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub reference_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "5")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchReferencesResponse {
#[prost(message, repeated, tag = "1")]
pub references: ::prost::alloc::vec::Vec<Reference>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReferenceRequest {
#[prost(string, tag = "1")]
pub reference_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasesRequest {
#[prost(string, tag = "1")]
pub reference_id: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub start: i64,
#[prost(int64, tag = "3")]
pub end: i64,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "5")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListBasesResponse {
#[prost(int64, tag = "1")]
pub offset: i64,
#[prost(string, tag = "2")]
pub sequence: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
#[doc = r" Generated client implementations."]
pub mod reference_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct ReferenceServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> ReferenceServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ReferenceServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
ReferenceServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Searches for reference sets which match the given criteria."]
#[doc = ""]
#[doc = " For the definitions of references and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.searchReferenceSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L71)"]
pub async fn search_reference_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchReferenceSetsRequest>,
) -> Result<tonic::Response<super::SearchReferenceSetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/SearchReferenceSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a reference set."]
#[doc = ""]
#[doc = " For the definitions of references and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.getReferenceSet](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L83)."]
pub async fn get_reference_set(
&mut self,
request: impl tonic::IntoRequest<super::GetReferenceSetRequest>,
) -> Result<tonic::Response<super::ReferenceSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/GetReferenceSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Searches for references which match the given criteria."]
#[doc = ""]
#[doc = " For the definitions of references and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.searchReferences](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L146)."]
pub async fn search_references(
&mut self,
request: impl tonic::IntoRequest<super::SearchReferencesRequest>,
) -> Result<tonic::Response<super::SearchReferencesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/SearchReferences",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a reference."]
#[doc = ""]
#[doc = " For the definitions of references and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.getReference](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L158)."]
pub async fn get_reference(
&mut self,
request: impl tonic::IntoRequest<super::GetReferenceRequest>,
) -> Result<tonic::Response<super::Reference>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/GetReference",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Lists the bases in a reference, optionally restricted to a range."]
#[doc = ""]
#[doc = " For the definitions of references and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.getReferenceBases](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/referencemethods.avdl#L221)."]
pub async fn list_bases(
&mut self,
request: impl tonic::IntoRequest<super::ListBasesRequest>,
) -> Result<tonic::Response<super::ListBasesResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.ReferenceServiceV1/ListBases",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantSetMetadata {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub value: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub id: ::prost::alloc::string::String,
#[prost(enumeration = "variant_set_metadata::Type", tag = "5")]
pub r#type: i32,
#[prost(string, tag = "8")]
pub number: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, message", tag = "3")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
}
pub mod variant_set_metadata {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
Integer = 1,
Float = 2,
Flag = 3,
Character = 4,
String = 5,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantSet {
#[prost(string, tag = "1")]
pub dataset_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub reference_set_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub reference_bounds: ::prost::alloc::vec::Vec<ReferenceBound>,
#[prost(message, repeated, tag = "4")]
pub metadata: ::prost::alloc::vec::Vec<VariantSetMetadata>,
#[prost(string, tag = "7")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub description: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Variant {
#[prost(string, tag = "15")]
pub variant_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "12")]
pub created: i64,
#[prost(string, tag = "14")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "16")]
pub start: i64,
#[prost(int64, tag = "13")]
pub end: i64,
#[prost(string, tag = "6")]
pub reference_bases: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "7")]
pub alternate_bases: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(double, tag = "8")]
pub quality: f64,
#[prost(string, repeated, tag = "9")]
pub filter: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, message", tag = "10")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
#[prost(message, repeated, tag = "11")]
pub calls: ::prost::alloc::vec::Vec<VariantCall>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VariantCall {
#[prost(string, tag = "8")]
pub call_set_id: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub call_set_name: ::prost::alloc::string::String,
#[prost(int32, repeated, tag = "7")]
pub genotype: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "5")]
pub phaseset: ::prost::alloc::string::String,
#[prost(double, repeated, tag = "6")]
pub genotype_likelihood: ::prost::alloc::vec::Vec<f64>,
#[prost(map = "string, message", tag = "2")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CallSet {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub sample_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "6")]
pub variant_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int64, tag = "5")]
pub created: i64,
#[prost(map = "string, message", tag = "4")]
pub info: ::std::collections::HashMap<::prost::alloc::string::String, ::prost_types::ListValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReferenceBound {
#[prost(string, tag = "1")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub upper_bound: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportVariantsRequest {
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub source_uris: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "import_variants_request::Format", tag = "3")]
pub format: i32,
#[prost(bool, tag = "5")]
pub normalize_reference_names: bool,
#[prost(map = "string, enumeration(InfoMergeOperation)", tag = "6")]
pub info_merge_config: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
}
pub mod import_variants_request {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Format {
Unspecified = 0,
Vcf = 1,
CompleteGenomics = 2,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ImportVariantsResponse {
#[prost(string, repeated, tag = "1")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVariantSetRequest {
#[prost(message, optional, tag = "1")]
pub variant_set: ::core::option::Option<VariantSet>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportVariantSetRequest {
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub project_id: ::prost::alloc::string::String,
#[prost(enumeration = "export_variant_set_request::Format", tag = "4")]
pub format: i32,
#[prost(string, tag = "5")]
pub bigquery_dataset: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub bigquery_table: ::prost::alloc::string::String,
}
pub mod export_variant_set_request {
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Format {
Unspecified = 0,
Bigquery = 1,
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVariantSetRequest {
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantSetsRequest {
#[prost(string, repeated, tag = "1")]
pub dataset_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantSetsResponse {
#[prost(message, repeated, tag = "1")]
pub variant_sets: ::prost::alloc::vec::Vec<VariantSet>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVariantSetRequest {
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVariantSetRequest {
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub variant_set: ::core::option::Option<VariantSet>,
#[prost(message, optional, tag = "5")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantsRequest {
#[prost(string, repeated, tag = "1")]
pub variant_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub variant_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "5")]
pub start: i64,
#[prost(int64, tag = "6")]
pub end: i64,
#[prost(string, tag = "7")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "8")]
pub page_size: i32,
#[prost(int32, tag = "9")]
pub max_calls: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchVariantsResponse {
#[prost(message, repeated, tag = "1")]
pub variants: ::prost::alloc::vec::Vec<Variant>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVariantRequest {
#[prost(message, optional, tag = "1")]
pub variant: ::core::option::Option<Variant>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVariantRequest {
#[prost(string, tag = "1")]
pub variant_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub variant: ::core::option::Option<Variant>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVariantRequest {
#[prost(string, tag = "1")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVariantRequest {
#[prost(string, tag = "1")]
pub variant_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MergeVariantsRequest {
#[prost(string, tag = "1")]
pub variant_set_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub variants: ::prost::alloc::vec::Vec<Variant>,
#[prost(map = "string, enumeration(InfoMergeOperation)", tag = "3")]
pub info_merge_config: ::std::collections::HashMap<::prost::alloc::string::String, i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchCallSetsRequest {
#[prost(string, repeated, tag = "1")]
pub variant_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub page_size: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchCallSetsResponse {
#[prost(message, repeated, tag = "1")]
pub call_sets: ::prost::alloc::vec::Vec<CallSet>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateCallSetRequest {
#[prost(message, optional, tag = "1")]
pub call_set: ::core::option::Option<CallSet>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateCallSetRequest {
#[prost(string, tag = "1")]
pub call_set_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub call_set: ::core::option::Option<CallSet>,
#[prost(message, optional, tag = "3")]
pub update_mask: ::core::option::Option<::prost_types::FieldMask>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteCallSetRequest {
#[prost(string, tag = "1")]
pub call_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetCallSetRequest {
#[prost(string, tag = "1")]
pub call_set_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamVariantsRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub variant_set_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub call_set_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub reference_name: ::prost::alloc::string::String,
#[prost(int64, tag = "5")]
pub start: i64,
#[prost(int64, tag = "6")]
pub end: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamVariantsResponse {
#[prost(message, repeated, tag = "1")]
pub variants: ::prost::alloc::vec::Vec<Variant>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum InfoMergeOperation {
Unspecified = 0,
IgnoreNew = 1,
MoveToCalls = 2,
}
#[doc = r" Generated client implementations."]
pub mod streaming_variant_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct StreamingVariantServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> StreamingVariantServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StreamingVariantServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
StreamingVariantServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Returns a stream of all the variants matching the search request, ordered"]
#[doc = " by reference name, position, and ID."]
pub async fn stream_variants(
&mut self,
request: impl tonic::IntoRequest<super::StreamVariantsRequest>,
) -> Result<
tonic::Response<tonic::codec::Streaming<super::StreamVariantsResponse>>,
tonic::Status,
> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.StreamingVariantService/StreamVariants",
);
self.inner.server_streaming(request.into_request(), path, codec).await
}
}
}
#[doc = r" Generated client implementations."]
pub mod variant_service_v1_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
#[derive(Debug, Clone)]
pub struct VariantServiceV1Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> VariantServiceV1Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::ResponseBody: Body + Send + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> VariantServiceV1Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<http::Request<tonic::body::BoxBody>>>::Error:
Into<StdError> + Send + Sync,
{
VariantServiceV1Client::new(InterceptedService::new(inner, interceptor))
}
#[doc = r" Compress requests with `gzip`."]
#[doc = r""]
#[doc = r" This requires the server to support it otherwise it might respond with an"]
#[doc = r" error."]
pub fn send_gzip(mut self) -> Self {
self.inner = self.inner.send_gzip();
self
}
#[doc = r" Enable decompressing responses with `gzip`."]
pub fn accept_gzip(mut self) -> Self {
self.inner = self.inner.accept_gzip();
self
}
#[doc = " Creates variant data by asynchronously importing the provided information."]
#[doc = ""]
#[doc = " For the definitions of variant sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " The variants for import will be merged with any existing variant that"]
#[doc = " matches its reference sequence, start, end, reference bases, and"]
#[doc = " alternative bases. If no such variant exists, a new one will be created."]
#[doc = ""]
#[doc = " When variants are merged, the call information from the new variant"]
#[doc = " is added to the existing variant, and Variant info fields are merged"]
#[doc = " as specified in"]
#[doc = " [infoMergeConfig][google.genomics.v1.ImportVariantsRequest.info_merge_config]."]
#[doc = " As a special case, for single-sample VCF files, QUAL and FILTER fields will"]
#[doc = " be moved to the call level; these are sometimes interpreted in a"]
#[doc = " call-specific context."]
#[doc = " Imported VCF headers are appended to the metadata already in a variant set."]
pub async fn import_variants(
&mut self,
request: impl tonic::IntoRequest<super::ImportVariantsRequest>,
) -> Result<tonic::Response<super::super::super::longrunning::Operation>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/ImportVariants",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new variant set."]
#[doc = ""]
#[doc = " For the definitions of variant sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " The provided variant set must have a valid `datasetId` set - all other"]
#[doc = " fields are optional. Note that the `id` field will be ignored, as this is"]
#[doc = " assigned by the server."]
pub async fn create_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::CreateVariantSetRequest>,
) -> Result<tonic::Response<super::VariantSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/CreateVariantSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Exports variant set data to an external destination."]
#[doc = ""]
#[doc = " For the definitions of variant sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn export_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::ExportVariantSetRequest>,
) -> Result<tonic::Response<super::super::super::longrunning::Operation>, tonic::Status>
{
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/ExportVariantSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a variant set by ID."]
#[doc = ""]
#[doc = " For the definitions of variant sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn get_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::GetVariantSetRequest>,
) -> Result<tonic::Response<super::VariantSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/GetVariantSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Returns a list of all variant sets matching search criteria."]
#[doc = ""]
#[doc = " For the definitions of variant sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.searchVariantSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L49)."]
pub async fn search_variant_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchVariantSetsRequest>,
) -> Result<tonic::Response<super::SearchVariantSetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/SearchVariantSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a variant set including all variants, call sets, and calls within."]
#[doc = " This is not reversible."]
#[doc = ""]
#[doc = " For the definitions of variant sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn delete_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteVariantSetRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/DeleteVariantSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a variant set using patch semantics."]
#[doc = ""]
#[doc = " For the definitions of variant sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn update_variant_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateVariantSetRequest>,
) -> Result<tonic::Response<super::VariantSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/UpdateVariantSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a list of variants matching the criteria."]
#[doc = ""]
#[doc = " For the definitions of variants and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.searchVariants](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L126)."]
pub async fn search_variants(
&mut self,
request: impl tonic::IntoRequest<super::SearchVariantsRequest>,
) -> Result<tonic::Response<super::SearchVariantsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/SearchVariants",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new variant."]
#[doc = ""]
#[doc = " For the definitions of variants and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn create_variant(
&mut self,
request: impl tonic::IntoRequest<super::CreateVariantRequest>,
) -> Result<tonic::Response<super::Variant>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/CreateVariant",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a variant."]
#[doc = ""]
#[doc = " For the definitions of variants and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " This method supports patch semantics. Returns the modified variant without"]
#[doc = " its calls."]
pub async fn update_variant(
&mut self,
request: impl tonic::IntoRequest<super::UpdateVariantRequest>,
) -> Result<tonic::Response<super::Variant>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/UpdateVariant",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a variant."]
#[doc = ""]
#[doc = " For the definitions of variants and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn delete_variant(
&mut self,
request: impl tonic::IntoRequest<super::DeleteVariantRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/DeleteVariant",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a variant by ID."]
#[doc = ""]
#[doc = " For the definitions of variants and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn get_variant(
&mut self,
request: impl tonic::IntoRequest<super::GetVariantRequest>,
) -> Result<tonic::Response<super::Variant>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/GetVariant",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Merges the given variants with existing variants."]
#[doc = ""]
#[doc = " For the definitions of variants and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Each variant will be"]
#[doc = " merged with an existing variant that matches its reference sequence,"]
#[doc = " start, end, reference bases, and alternative bases. If no such variant"]
#[doc = " exists, a new one will be created."]
#[doc = ""]
#[doc = " When variants are merged, the call information from the new variant"]
#[doc = " is added to the existing variant. Variant info fields are merged as"]
#[doc = " specified in the"]
#[doc = " [infoMergeConfig][google.genomics.v1.MergeVariantsRequest.info_merge_config]"]
#[doc = " field of the MergeVariantsRequest."]
#[doc = ""]
#[doc = " Please exercise caution when using this method! It is easy to introduce"]
#[doc = " mistakes in existing variants and difficult to back out of them. For"]
#[doc = " example,"]
#[doc = " suppose you were trying to merge a new variant with an existing one and"]
#[doc = " both"]
#[doc = " variants contain calls that belong to callsets with the same callset ID."]
#[doc = ""]
#[doc = " // Existing variant - irrelevant fields trimmed for clarity"]
#[doc = " {"]
#[doc = " \"variantSetId\": \"10473108253681171589\","]
#[doc = " \"referenceName\": \"1\","]
#[doc = " \"start\": \"10582\","]
#[doc = " \"referenceBases\": \"G\","]
#[doc = " \"alternateBases\": ["]
#[doc = " \"A\""]
#[doc = " ],"]
#[doc = " \"calls\": ["]
#[doc = " {"]
#[doc = " \"callSetId\": \"10473108253681171589-0\","]
#[doc = " \"callSetName\": \"CALLSET0\","]
#[doc = " \"genotype\": ["]
#[doc = " 0,"]
#[doc = " 1"]
#[doc = " ],"]
#[doc = " }"]
#[doc = " ]"]
#[doc = " }"]
#[doc = ""]
#[doc = " // New variant with conflicting call information"]
#[doc = " {"]
#[doc = " \"variantSetId\": \"10473108253681171589\","]
#[doc = " \"referenceName\": \"1\","]
#[doc = " \"start\": \"10582\","]
#[doc = " \"referenceBases\": \"G\","]
#[doc = " \"alternateBases\": ["]
#[doc = " \"A\""]
#[doc = " ],"]
#[doc = " \"calls\": ["]
#[doc = " {"]
#[doc = " \"callSetId\": \"10473108253681171589-0\","]
#[doc = " \"callSetName\": \"CALLSET0\","]
#[doc = " \"genotype\": ["]
#[doc = " 1,"]
#[doc = " 1"]
#[doc = " ],"]
#[doc = " }"]
#[doc = " ]"]
#[doc = " }"]
#[doc = ""]
#[doc = " The resulting merged variant would overwrite the existing calls with those"]
#[doc = " from the new variant:"]
#[doc = ""]
#[doc = " {"]
#[doc = " \"variantSetId\": \"10473108253681171589\","]
#[doc = " \"referenceName\": \"1\","]
#[doc = " \"start\": \"10582\","]
#[doc = " \"referenceBases\": \"G\","]
#[doc = " \"alternateBases\": ["]
#[doc = " \"A\""]
#[doc = " ],"]
#[doc = " \"calls\": ["]
#[doc = " {"]
#[doc = " \"callSetId\": \"10473108253681171589-0\","]
#[doc = " \"callSetName\": \"CALLSET0\","]
#[doc = " \"genotype\": ["]
#[doc = " 1,"]
#[doc = " 1"]
#[doc = " ],"]
#[doc = " }"]
#[doc = " ]"]
#[doc = " }"]
#[doc = ""]
#[doc = " This may be the desired outcome, but it is up to the user to determine if"]
#[doc = " if that is indeed the case."]
pub async fn merge_variants(
&mut self,
request: impl tonic::IntoRequest<super::MergeVariantsRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/MergeVariants",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a list of call sets matching the criteria."]
#[doc = ""]
#[doc = " For the definitions of call sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " Implements"]
#[doc = " [GlobalAllianceApi.searchCallSets](https://github.com/ga4gh/schemas/blob/v0.5.1/src/main/resources/avro/variantmethods.avdl#L178)."]
pub async fn search_call_sets(
&mut self,
request: impl tonic::IntoRequest<super::SearchCallSetsRequest>,
) -> Result<tonic::Response<super::SearchCallSetsResponse>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/SearchCallSets",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Creates a new call set."]
#[doc = ""]
#[doc = " For the definitions of call sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn create_call_set(
&mut self,
request: impl tonic::IntoRequest<super::CreateCallSetRequest>,
) -> Result<tonic::Response<super::CallSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/CreateCallSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Updates a call set."]
#[doc = ""]
#[doc = " For the definitions of call sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
#[doc = ""]
#[doc = " This method supports patch semantics."]
pub async fn update_call_set(
&mut self,
request: impl tonic::IntoRequest<super::UpdateCallSetRequest>,
) -> Result<tonic::Response<super::CallSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/UpdateCallSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Deletes a call set."]
#[doc = ""]
#[doc = " For the definitions of call sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn delete_call_set(
&mut self,
request: impl tonic::IntoRequest<super::DeleteCallSetRequest>,
) -> Result<tonic::Response<()>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/DeleteCallSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
#[doc = " Gets a call set by ID."]
#[doc = ""]
#[doc = " For the definitions of call sets and other genomics resources, see"]
#[doc = " [Fundamentals of Google"]
#[doc = " Genomics](https://cloud.google.com/genomics/fundamentals-of-google-genomics)"]
pub async fn get_call_set(
&mut self,
request: impl tonic::IntoRequest<super::GetCallSetRequest>,
) -> Result<tonic::Response<super::CallSet>, tonic::Status> {
self.inner.ready().await.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/google.genomics.v1.VariantServiceV1/GetCallSet",
);
self.inner.unary(request.into_request(), path, codec).await
}
}
}