#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ComputeEngine {
#[prost(string, tag = "1")]
pub instance_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub zone: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub machine_type: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub disk_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeMetadata {
#[prost(message, optional, tag = "1")]
pub compute_engine: ::core::option::Option<ComputeEngine>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Pipeline {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "8")]
pub input_parameters: ::prost::alloc::vec::Vec<PipelineParameter>,
#[prost(message, repeated, tag = "9")]
pub output_parameters: ::prost::alloc::vec::Vec<PipelineParameter>,
#[prost(message, optional, tag = "6")]
pub resources: ::core::option::Option<PipelineResources>,
#[prost(string, tag = "7")]
pub pipeline_id: ::prost::alloc::string::String,
#[prost(oneof = "pipeline::Executor", tags = "5")]
pub executor: ::core::option::Option<pipeline::Executor>,
}
pub mod pipeline {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Executor {
#[prost(message, tag = "5")]
Docker(super::DockerExecutor),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePipelineRequest {
#[prost(message, optional, tag = "1")]
pub pipeline: ::core::option::Option<Pipeline>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunPipelineArgs {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(btree_map = "string, string", tag = "2")]
pub inputs: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(btree_map = "string, string", tag = "3")]
pub outputs: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "4")]
pub service_account: ::core::option::Option<ServiceAccount>,
#[prost(string, tag = "5")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub resources: ::core::option::Option<PipelineResources>,
#[prost(message, optional, tag = "7")]
pub logging: ::core::option::Option<LoggingOptions>,
#[prost(message, optional, tag = "8")]
pub keep_vm_alive_on_failure_duration: ::core::option::Option<
::prost_types::Duration,
>,
#[prost(btree_map = "string, string", tag = "9")]
pub labels: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunPipelineRequest {
#[prost(message, optional, tag = "3")]
pub pipeline_args: ::core::option::Option<RunPipelineArgs>,
#[prost(oneof = "run_pipeline_request::Pipeline", tags = "1, 2")]
pub pipeline: ::core::option::Option<run_pipeline_request::Pipeline>,
}
pub mod run_pipeline_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Pipeline {
#[prost(string, tag = "1")]
PipelineId(::prost::alloc::string::String),
#[prost(message, tag = "2")]
EphemeralPipeline(super::Pipeline),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPipelineRequest {
#[prost(string, tag = "1")]
pub pipeline_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPipelinesRequest {
#[prost(string, tag = "1")]
pub project_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name_prefix: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub page_size: i32,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPipelinesResponse {
#[prost(message, repeated, tag = "1")]
pub pipelines: ::prost::alloc::vec::Vec<Pipeline>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePipelineRequest {
#[prost(string, tag = "1")]
pub pipeline_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetControllerConfigRequest {
#[prost(string, tag = "1")]
pub operation_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "2")]
pub validation_token: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ControllerConfig {
#[prost(string, tag = "1")]
pub image: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cmd: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub gcs_log_path: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub machine_type: ::prost::alloc::string::String,
#[prost(btree_map = "string, string", tag = "5")]
pub vars: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(btree_map = "string, string", tag = "6")]
pub disks: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(btree_map = "string, message", tag = "7")]
pub gcs_sources: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
controller_config::RepeatedString,
>,
#[prost(btree_map = "string, message", tag = "8")]
pub gcs_sinks: ::prost::alloc::collections::BTreeMap<
::prost::alloc::string::String,
controller_config::RepeatedString,
>,
}
pub mod controller_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RepeatedString {
#[prost(string, repeated, tag = "1")]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampEvent {
#[prost(string, tag = "1")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetOperationStatusRequest {
#[prost(string, tag = "1")]
pub operation_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub timestamp_events: ::prost::alloc::vec::Vec<TimestampEvent>,
#[prost(enumeration = "super::super::rpc::Code", tag = "3")]
pub error_code: i32,
#[prost(string, tag = "4")]
pub error_message: ::prost::alloc::string::String,
#[prost(uint64, tag = "5")]
pub validation_token: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServiceAccount {
#[prost(string, tag = "1")]
pub email: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoggingOptions {
#[prost(string, tag = "1")]
pub gcs_path: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PipelineResources {
#[prost(int32, tag = "1")]
pub minimum_cpu_cores: i32,
#[prost(bool, tag = "2")]
pub preemptible: bool,
#[prost(double, tag = "3")]
pub minimum_ram_gb: f64,
#[prost(message, repeated, tag = "4")]
pub disks: ::prost::alloc::vec::Vec<pipeline_resources::Disk>,
#[prost(string, repeated, tag = "5")]
pub zones: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, tag = "6")]
pub boot_disk_size_gb: i32,
#[prost(bool, tag = "7")]
pub no_address: bool,
}
pub mod pipeline_resources {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Disk {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "disk::Type", tag = "2")]
pub r#type: i32,
#[prost(int32, tag = "3")]
pub size_gb: i32,
#[prost(string, tag = "4")]
pub source: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub auto_delete: bool,
#[prost(string, tag = "8")]
pub mount_point: ::prost::alloc::string::String,
}
pub mod disk {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
Unspecified = 0,
PersistentHdd = 1,
PersistentSsd = 2,
LocalSsd = 3,
}
impl Type {
pub fn as_str_name(&self) -> &'static str {
match self {
Type::Unspecified => "TYPE_UNSPECIFIED",
Type::PersistentHdd => "PERSISTENT_HDD",
Type::PersistentSsd => "PERSISTENT_SSD",
Type::LocalSsd => "LOCAL_SSD",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"PERSISTENT_HDD" => Some(Self::PersistentHdd),
"PERSISTENT_SSD" => Some(Self::PersistentSsd),
"LOCAL_SSD" => Some(Self::LocalSsd),
_ => None,
}
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PipelineParameter {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub default_value: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub local_copy: ::core::option::Option<pipeline_parameter::LocalCopy>,
}
pub mod pipeline_parameter {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LocalCopy {
#[prost(string, tag = "1")]
pub path: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub disk: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DockerExecutor {
#[prost(string, tag = "1")]
pub image_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub cmd: ::prost::alloc::string::String,
}
pub mod pipelines_v1_alpha2_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct PipelinesV1Alpha2Client<T> {
inner: tonic::client::Grpc<T>,
}
impl<T> PipelinesV1Alpha2Client<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<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_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> PipelinesV1Alpha2Client<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
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,
{
PipelinesV1Alpha2Client::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_pipeline(
&mut self,
request: impl tonic::IntoRequest<super::CreatePipelineRequest>,
) -> std::result::Result<tonic::Response<super::Pipeline>, 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.v1alpha2.PipelinesV1Alpha2/CreatePipeline",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1alpha2.PipelinesV1Alpha2",
"CreatePipeline",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn run_pipeline(
&mut self,
request: impl tonic::IntoRequest<super::RunPipelineRequest>,
) -> std::result::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.v1alpha2.PipelinesV1Alpha2/RunPipeline",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1alpha2.PipelinesV1Alpha2",
"RunPipeline",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_pipeline(
&mut self,
request: impl tonic::IntoRequest<super::GetPipelineRequest>,
) -> std::result::Result<tonic::Response<super::Pipeline>, 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.v1alpha2.PipelinesV1Alpha2/GetPipeline",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1alpha2.PipelinesV1Alpha2",
"GetPipeline",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_pipelines(
&mut self,
request: impl tonic::IntoRequest<super::ListPipelinesRequest>,
) -> std::result::Result<
tonic::Response<super::ListPipelinesResponse>,
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.v1alpha2.PipelinesV1Alpha2/ListPipelines",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1alpha2.PipelinesV1Alpha2",
"ListPipelines",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete_pipeline(
&mut self,
request: impl tonic::IntoRequest<super::DeletePipelineRequest>,
) -> std::result::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.v1alpha2.PipelinesV1Alpha2/DeletePipeline",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1alpha2.PipelinesV1Alpha2",
"DeletePipeline",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_controller_config(
&mut self,
request: impl tonic::IntoRequest<super::GetControllerConfigRequest>,
) -> std::result::Result<
tonic::Response<super::ControllerConfig>,
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.v1alpha2.PipelinesV1Alpha2/GetControllerConfig",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1alpha2.PipelinesV1Alpha2",
"GetControllerConfig",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_operation_status(
&mut self,
request: impl tonic::IntoRequest<super::SetOperationStatusRequest>,
) -> std::result::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.v1alpha2.PipelinesV1Alpha2/SetOperationStatus",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"google.genomics.v1alpha2.PipelinesV1Alpha2",
"SetOperationStatus",
),
);
self.inner.unary(req, path, codec).await
}
}
}