#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IngestJob {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub dataset_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub source: ::core::option::Option<IngestJobSource>,
#[prost(enumeration = "IngestJobStatus", tag = "5")]
pub status: i32,
#[prost(enumeration = "IngestJobType", tag = "6")]
pub r#type: i32,
#[prost(string, tag = "7")]
pub created_by: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub org_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "9")]
pub origins: ::core::option::Option<IngestJobOrigins>,
#[prost(message, optional, tag = "10")]
pub create_time: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "11")]
pub start_time: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "12")]
pub end_time: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(int32, tag = "13")]
pub produced_file_count: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IngestJobOrigins {
#[prost(string, repeated, tag = "1")]
pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "2")]
pub truncated: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IngestJobSource {
#[prost(oneof = "ingest_job_source::Kind", tags = "1")]
pub kind: ::core::option::Option<ingest_job_source::Kind>,
}
pub mod ingest_job_source {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "1")]
Replay(super::ReplayIngestJobSource),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReplayIngestJobSource {
#[prost(string, tag = "1")]
pub ingest_job_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIngestJobRequest {
#[prost(message, optional, tag = "1")]
pub ingest_job: ::core::option::Option<IngestJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateIngestJobResponse {
#[prost(message, optional, tag = "1")]
pub ingest_job: ::core::option::Option<IngestJob>,
#[prost(string, optional, tag = "2")]
pub dataset_file_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIngestJobRequest {
#[prost(string, tag = "1")]
pub ingest_job_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIngestJobResponse {
#[prost(message, optional, tag = "1")]
pub ingest_job: ::core::option::Option<IngestJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelIngestJobRequest {
#[prost(string, tag = "1")]
pub ingest_job_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelIngestJobResponse {
#[prost(message, optional, tag = "1")]
pub ingest_job: ::core::option::Option<IngestJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCancelIngestJobsRequest {
#[prost(string, repeated, tag = "1")]
pub ingest_job_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchCancelIngestJobsResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<CancelIngestJobResult>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelIngestJobResult {
#[prost(string, tag = "1")]
pub ingest_job_rid: ::prost::alloc::string::String,
#[prost(oneof = "cancel_ingest_job_result::Outcome", tags = "2, 3")]
pub outcome: ::core::option::Option<cancel_ingest_job_result::Outcome>,
}
pub mod cancel_ingest_job_result {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Outcome {
#[prost(message, tag = "2")]
IngestJob(super::IngestJob),
#[prost(message, tag = "3")]
Failure(super::CancelIngestJobFailure),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelIngestJobFailure {
#[prost(enumeration = "CancelIngestJobFailureReason", tag = "1")]
pub reason: i32,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IngestJobError {
Unspecified = 0,
InvalidSourceRid = 1,
InvalidRid = 3,
UnrepresentableStoredTimestamp = 4,
NotCancellable = 5,
}
impl IngestJobError {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INGEST_JOB_ERROR_UNSPECIFIED",
Self::InvalidSourceRid => "INGEST_JOB_ERROR_INVALID_SOURCE_RID",
Self::InvalidRid => "INGEST_JOB_ERROR_INVALID_RID",
Self::UnrepresentableStoredTimestamp => {
"INGEST_JOB_ERROR_UNREPRESENTABLE_STORED_TIMESTAMP"
}
Self::NotCancellable => "INGEST_JOB_ERROR_NOT_CANCELLABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGEST_JOB_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
"INGEST_JOB_ERROR_INVALID_SOURCE_RID" => Some(Self::InvalidSourceRid),
"INGEST_JOB_ERROR_INVALID_RID" => Some(Self::InvalidRid),
"INGEST_JOB_ERROR_UNREPRESENTABLE_STORED_TIMESTAMP" => {
Some(Self::UnrepresentableStoredTimestamp)
}
"INGEST_JOB_ERROR_NOT_CANCELLABLE" => Some(Self::NotCancellable),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IngestJobStatus {
Unspecified = 0,
Submitted = 1,
Queued = 2,
InProgress = 3,
Completed = 4,
Failed = 5,
Cancelled = 6,
DeletionInProgress = 7,
Deleted = 8,
}
impl IngestJobStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INGEST_JOB_STATUS_UNSPECIFIED",
Self::Submitted => "INGEST_JOB_STATUS_SUBMITTED",
Self::Queued => "INGEST_JOB_STATUS_QUEUED",
Self::InProgress => "INGEST_JOB_STATUS_IN_PROGRESS",
Self::Completed => "INGEST_JOB_STATUS_COMPLETED",
Self::Failed => "INGEST_JOB_STATUS_FAILED",
Self::Cancelled => "INGEST_JOB_STATUS_CANCELLED",
Self::DeletionInProgress => "INGEST_JOB_STATUS_DELETION_IN_PROGRESS",
Self::Deleted => "INGEST_JOB_STATUS_DELETED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGEST_JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"INGEST_JOB_STATUS_SUBMITTED" => Some(Self::Submitted),
"INGEST_JOB_STATUS_QUEUED" => Some(Self::Queued),
"INGEST_JOB_STATUS_IN_PROGRESS" => Some(Self::InProgress),
"INGEST_JOB_STATUS_COMPLETED" => Some(Self::Completed),
"INGEST_JOB_STATUS_FAILED" => Some(Self::Failed),
"INGEST_JOB_STATUS_CANCELLED" => Some(Self::Cancelled),
"INGEST_JOB_STATUS_DELETION_IN_PROGRESS" => Some(Self::DeletionInProgress),
"INGEST_JOB_STATUS_DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IngestJobType {
Unspecified = 0,
Tabular = 1,
Mcap = 2,
Dataflash = 3,
JournalJson = 4,
Containerized = 5,
Video = 6,
AvroStream = 7,
PointCloud = 8,
Multi = 9,
}
impl IngestJobType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INGEST_JOB_TYPE_UNSPECIFIED",
Self::Tabular => "INGEST_JOB_TYPE_TABULAR",
Self::Mcap => "INGEST_JOB_TYPE_MCAP",
Self::Dataflash => "INGEST_JOB_TYPE_DATAFLASH",
Self::JournalJson => "INGEST_JOB_TYPE_JOURNAL_JSON",
Self::Containerized => "INGEST_JOB_TYPE_CONTAINERIZED",
Self::Video => "INGEST_JOB_TYPE_VIDEO",
Self::AvroStream => "INGEST_JOB_TYPE_AVRO_STREAM",
Self::PointCloud => "INGEST_JOB_TYPE_POINT_CLOUD",
Self::Multi => "INGEST_JOB_TYPE_MULTI",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGEST_JOB_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"INGEST_JOB_TYPE_TABULAR" => Some(Self::Tabular),
"INGEST_JOB_TYPE_MCAP" => Some(Self::Mcap),
"INGEST_JOB_TYPE_DATAFLASH" => Some(Self::Dataflash),
"INGEST_JOB_TYPE_JOURNAL_JSON" => Some(Self::JournalJson),
"INGEST_JOB_TYPE_CONTAINERIZED" => Some(Self::Containerized),
"INGEST_JOB_TYPE_VIDEO" => Some(Self::Video),
"INGEST_JOB_TYPE_AVRO_STREAM" => Some(Self::AvroStream),
"INGEST_JOB_TYPE_POINT_CLOUD" => Some(Self::PointCloud),
"INGEST_JOB_TYPE_MULTI" => Some(Self::Multi),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CancelIngestJobFailureReason {
Unspecified = 0,
NotFound = 1,
NotCancellable = 2,
}
impl CancelIngestJobFailureReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CANCEL_INGEST_JOB_FAILURE_REASON_UNSPECIFIED",
Self::NotFound => "CANCEL_INGEST_JOB_FAILURE_REASON_NOT_FOUND",
Self::NotCancellable => "CANCEL_INGEST_JOB_FAILURE_REASON_NOT_CANCELLABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CANCEL_INGEST_JOB_FAILURE_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"CANCEL_INGEST_JOB_FAILURE_REASON_NOT_FOUND" => Some(Self::NotFound),
"CANCEL_INGEST_JOB_FAILURE_REASON_NOT_CANCELLABLE" => {
Some(Self::NotCancellable)
}
_ => None,
}
}
}
pub mod ingest_job_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct IngestJobServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl IngestJobServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> IngestJobServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
) -> IngestJobServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
IngestJobServiceClient::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 get_ingest_job(
&mut self,
request: impl tonic::IntoRequest<super::GetIngestJobRequest>,
) -> std::result::Result<
tonic::Response<super::GetIngestJobResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ingestjobs.v1.IngestJobService/GetIngestJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestjobs.v1.IngestJobService",
"GetIngestJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_ingest_job(
&mut self,
request: impl tonic::IntoRequest<super::CreateIngestJobRequest>,
) -> std::result::Result<
tonic::Response<super::CreateIngestJobResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ingestjobs.v1.IngestJobService/CreateIngestJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestjobs.v1.IngestJobService",
"CreateIngestJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn cancel_ingest_job(
&mut self,
request: impl tonic::IntoRequest<super::CancelIngestJobRequest>,
) -> std::result::Result<
tonic::Response<super::CancelIngestJobResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ingestjobs.v1.IngestJobService/CancelIngestJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestjobs.v1.IngestJobService",
"CancelIngestJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_cancel_ingest_jobs(
&mut self,
request: impl tonic::IntoRequest<super::BatchCancelIngestJobsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchCancelIngestJobsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ingestjobs.v1.IngestJobService/BatchCancelIngestJobs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestjobs.v1.IngestJobService",
"BatchCancelIngestJobs",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IngestTransform {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub ingest_job_rid: ::prost::alloc::string::String,
#[prost(enumeration = "IngestTransformType", tag = "3")]
pub r#type: i32,
#[prost(enumeration = "IngestTransformStatus", tag = "4")]
pub status: i32,
#[prost(message, optional, tag = "5")]
pub create_time: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "6")]
pub update_time: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(string, optional, tag = "7")]
pub error_message: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub finish_time: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(string, optional, tag = "9")]
pub containerized_extractor_rid: ::core::option::Option<
::prost::alloc::string::String,
>,
#[prost(message, repeated, tag = "10")]
pub sources: ::prost::alloc::vec::Vec<super::super::ingest::v2::IngestSource>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIngestTransformRequest {
#[prost(string, tag = "1")]
pub ingest_transform_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetIngestTransformResponse {
#[prost(message, optional, tag = "1")]
pub ingest_transform: ::core::option::Option<IngestTransform>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIngestTransformsRequest {
#[prost(string, tag = "1")]
pub ingest_job_rid: ::prost::alloc::string::String,
#[prost(int32, optional, tag = "2")]
pub page_size: ::core::option::Option<i32>,
#[prost(
enumeration = "IngestTransformStatus",
repeated,
packed = "false",
tag = "3"
)]
pub statuses: ::prost::alloc::vec::Vec<i32>,
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIngestTransformsResponse {
#[prost(message, repeated, tag = "1")]
pub ingest_transforms: ::prost::alloc::vec::Vec<IngestTransform>,
#[prost(string, tag = "2")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIngestTransformSourceDownloadUrlsRequest {
#[prost(string, tag = "1")]
pub ingest_transform_rid: ::prost::alloc::string::String,
#[prost(int32, optional, tag = "2")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, tag = "3")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListIngestTransformSourceDownloadUrlsResponse {
#[prost(message, repeated, tag = "1")]
pub download_urls: ::prost::alloc::vec::Vec<super::super::uploads::v1::DownloadUrl>,
#[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 IngestTransformError {
Unspecified = 0,
InvalidRid = 1,
InvalidPageToken = 2,
InvalidStatus = 3,
UnrepresentableStoredTimestamp = 4,
}
impl IngestTransformError {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INGEST_TRANSFORM_ERROR_UNSPECIFIED",
Self::InvalidRid => "INGEST_TRANSFORM_ERROR_INVALID_RID",
Self::InvalidPageToken => "INGEST_TRANSFORM_ERROR_INVALID_PAGE_TOKEN",
Self::InvalidStatus => "INGEST_TRANSFORM_ERROR_INVALID_STATUS",
Self::UnrepresentableStoredTimestamp => {
"INGEST_TRANSFORM_ERROR_UNREPRESENTABLE_STORED_TIMESTAMP"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGEST_TRANSFORM_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
"INGEST_TRANSFORM_ERROR_INVALID_RID" => Some(Self::InvalidRid),
"INGEST_TRANSFORM_ERROR_INVALID_PAGE_TOKEN" => Some(Self::InvalidPageToken),
"INGEST_TRANSFORM_ERROR_INVALID_STATUS" => Some(Self::InvalidStatus),
"INGEST_TRANSFORM_ERROR_UNREPRESENTABLE_STORED_TIMESTAMP" => {
Some(Self::UnrepresentableStoredTimestamp)
}
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IngestTransformStatus {
Unspecified = 0,
Queued = 1,
InProgress = 2,
Completed = 3,
Failed = 4,
}
impl IngestTransformStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INGEST_TRANSFORM_STATUS_UNSPECIFIED",
Self::Queued => "INGEST_TRANSFORM_STATUS_QUEUED",
Self::InProgress => "INGEST_TRANSFORM_STATUS_IN_PROGRESS",
Self::Completed => "INGEST_TRANSFORM_STATUS_COMPLETED",
Self::Failed => "INGEST_TRANSFORM_STATUS_FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGEST_TRANSFORM_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"INGEST_TRANSFORM_STATUS_QUEUED" => Some(Self::Queued),
"INGEST_TRANSFORM_STATUS_IN_PROGRESS" => Some(Self::InProgress),
"INGEST_TRANSFORM_STATUS_COMPLETED" => Some(Self::Completed),
"INGEST_TRANSFORM_STATUS_FAILED" => Some(Self::Failed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IngestTransformType {
Unspecified = 0,
Containerized = 1,
Mcap = 2,
Dataflash = 3,
ParquetArchive = 4,
FileCopy = 5,
}
impl IngestTransformType {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INGEST_TRANSFORM_TYPE_UNSPECIFIED",
Self::Containerized => "INGEST_TRANSFORM_TYPE_CONTAINERIZED",
Self::Mcap => "INGEST_TRANSFORM_TYPE_MCAP",
Self::Dataflash => "INGEST_TRANSFORM_TYPE_DATAFLASH",
Self::ParquetArchive => "INGEST_TRANSFORM_TYPE_PARQUET_ARCHIVE",
Self::FileCopy => "INGEST_TRANSFORM_TYPE_FILE_COPY",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGEST_TRANSFORM_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"INGEST_TRANSFORM_TYPE_CONTAINERIZED" => Some(Self::Containerized),
"INGEST_TRANSFORM_TYPE_MCAP" => Some(Self::Mcap),
"INGEST_TRANSFORM_TYPE_DATAFLASH" => Some(Self::Dataflash),
"INGEST_TRANSFORM_TYPE_PARQUET_ARCHIVE" => Some(Self::ParquetArchive),
"INGEST_TRANSFORM_TYPE_FILE_COPY" => Some(Self::FileCopy),
_ => None,
}
}
}
pub mod ingest_transform_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct IngestTransformServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl IngestTransformServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> IngestTransformServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
) -> IngestTransformServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
IngestTransformServiceClient::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 list_ingest_transform_source_download_urls(
&mut self,
request: impl tonic::IntoRequest<
super::ListIngestTransformSourceDownloadUrlsRequest,
>,
) -> std::result::Result<
tonic::Response<super::ListIngestTransformSourceDownloadUrlsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ingestjobs.v1.IngestTransformService/ListIngestTransformSourceDownloadUrls",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestjobs.v1.IngestTransformService",
"ListIngestTransformSourceDownloadUrls",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_ingest_transform(
&mut self,
request: impl tonic::IntoRequest<super::GetIngestTransformRequest>,
) -> std::result::Result<
tonic::Response<super::GetIngestTransformResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ingestjobs.v1.IngestTransformService/GetIngestTransform",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestjobs.v1.IngestTransformService",
"GetIngestTransform",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_ingest_transforms(
&mut self,
request: impl tonic::IntoRequest<super::ListIngestTransformsRequest>,
) -> std::result::Result<
tonic::Response<super::ListIngestTransformsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.ingestjobs.v1.IngestTransformService/ListIngestTransforms",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestjobs.v1.IngestTransformService",
"ListIngestTransforms",
),
);
self.inner.unary(req, path, codec).await
}
}
}