#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteDatasetFileRequest {
#[prost(string, tag = "1")]
pub dataset_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub file_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteDatasetFileResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReingestDatasetsRequest {
#[prost(string, repeated, tag = "1")]
pub source_dataset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, message", tag = "4")]
pub source_options: ::std::collections::HashMap<
::prost::alloc::string::String,
ReingestSourceOptions,
>,
#[prost(oneof = "reingest_datasets_request::Target", tags = "2, 3")]
pub target: ::core::option::Option<reingest_datasets_request::Target>,
}
pub mod reingest_datasets_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Target {
#[prost(string, tag = "2")]
ExistingDatasetRid(::prost::alloc::string::String),
#[prost(message, tag = "3")]
NewDataset(super::NewReingestTarget),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NewReingestTarget {
#[prost(string, optional, tag = "1")]
pub name: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "3")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "4")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub workspace_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub channel_prefix_tree_delimiter: ::core::option::Option<
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "7")]
pub marking_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReingestSourceOptions {
#[prost(message, optional, tag = "1")]
pub timestamp_metadata: ::core::option::Option<
super::super::ingest::v2::TimestampMetadata,
>,
#[prost(string, optional, tag = "2")]
pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "3")]
pub channel_name_overrides: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, string", tag = "4")]
pub tag_columns: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(map = "string, string", tag = "5")]
pub additional_file_tags: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReingestDatasetsResponse {
#[prost(message, repeated, tag = "1")]
pub files: ::prost::alloc::vec::Vec<ReingestedDatasetFile>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReingestedDatasetFile {
#[prost(string, tag = "1")]
pub source_dataset_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub source_dataset_file_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub dataset_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "4")]
pub dataset_file_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub ingest_job_rid: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum IngestManagementError {
Unspecified = 0,
InvalidRequest = 1,
}
impl IngestManagementError {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "INGEST_MANAGEMENT_ERROR_UNSPECIFIED",
Self::InvalidRequest => "INGEST_MANAGEMENT_ERROR_INVALID_REQUEST",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"INGEST_MANAGEMENT_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
"INGEST_MANAGEMENT_ERROR_INVALID_REQUEST" => Some(Self::InvalidRequest),
_ => None,
}
}
}
pub mod ingest_management_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 IngestManagementServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl IngestManagementServiceClient<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> IngestManagementServiceClient<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,
) -> IngestManagementServiceClient<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,
{
IngestManagementServiceClient::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 delete_dataset_file(
&mut self,
request: impl tonic::IntoRequest<super::DeleteDatasetFileRequest>,
) -> std::result::Result<
tonic::Response<super::DeleteDatasetFileResponse>,
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.ingestmanagement.v1.IngestManagementService/DeleteDatasetFile",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestmanagement.v1.IngestManagementService",
"DeleteDatasetFile",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn reingest_datasets(
&mut self,
request: impl tonic::IntoRequest<super::ReingestDatasetsRequest>,
) -> std::result::Result<
tonic::Response<super::ReingestDatasetsResponse>,
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.ingestmanagement.v1.IngestManagementService/ReingestDatasets",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ingestmanagement.v1.IngestManagementService",
"ReingestDatasets",
),
);
self.inner.unary(req, path, codec).await
}
}
}