// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileSuffix {
    #[prost(string, tag = "1")]
    pub suffix: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileFilter {
    #[prost(oneof = "file_filter::Filter", tags = "1")]
    pub filter: ::core::option::Option<file_filter::Filter>,
}
/// Nested message and enum types in `FileFilter`.
pub mod file_filter {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Filter {
        #[prost(message, tag = "1")]
        Suffix(super::FileSuffix),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileExtractionInput {
    #[prost(string, tag = "1")]
    pub environment_variable: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, repeated, tag = "4")]
    pub file_filters: ::prost::alloc::vec::Vec<FileFilter>,
    #[prost(bool, optional, tag = "5")]
    pub required: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FileExtractionParameter {
    #[prost(string, tag = "1")]
    pub environment_variable: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag = "4")]
    pub required: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TimestampMetadata {
    #[prost(string, tag = "1")]
    pub series_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub timestamp_type: ::core::option::Option<super::super::types::time::TimestampType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ContainerImage {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub tag: ::prost::alloc::string::String,
    #[prost(int64, optional, tag = "4")]
    pub size_bytes: ::core::option::Option<i64>,
    #[prost(enumeration = "ContainerImageStatus", tag = "5")]
    pub status: i32,
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<
        super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(string, tag = "7")]
    pub extractor_rid: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "8")]
    pub inputs: ::prost::alloc::vec::Vec<FileExtractionInput>,
    #[prost(message, repeated, tag = "9")]
    pub parameters: ::prost::alloc::vec::Vec<FileExtractionParameter>,
    #[prost(enumeration = "FileOutputFormat", tag = "10")]
    pub file_output_format: i32,
    #[prost(message, optional, tag = "11")]
    pub default_timestamp_metadata: ::core::option::Option<TimestampMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateImageRequest {
    #[prost(string, tag = "1")]
    pub workspace_rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub tag: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub object_path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateImageResponse {
    #[prost(message, optional, tag = "1")]
    pub image: ::core::option::Option<ContainerImage>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetImageRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub workspace_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetImageResponse {
    #[prost(message, optional, tag = "1")]
    pub image: ::core::option::Option<ContainerImage>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteImageRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub workspace_rid: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteImageResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NameFilter {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TagFilter {
    #[prost(string, tag = "1")]
    pub tag: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StatusFilter {
    #[prost(enumeration = "ContainerImageStatus", tag = "1")]
    pub status: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AndFilter {
    #[prost(message, repeated, tag = "1")]
    pub clauses: ::prost::alloc::vec::Vec<SearchFilter>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchFilter {
    #[prost(oneof = "search_filter::Filter", tags = "1, 2, 3, 4")]
    pub filter: ::core::option::Option<search_filter::Filter>,
}
/// Nested message and enum types in `SearchFilter`.
pub mod search_filter {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Filter {
        #[prost(message, tag = "1")]
        Name(super::NameFilter),
        #[prost(message, tag = "2")]
        Tag(super::TagFilter),
        #[prost(message, tag = "3")]
        Status(super::StatusFilter),
        #[prost(message, tag = "4")]
        And(super::AndFilter),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchImagesRequest {
    #[prost(string, tag = "1")]
    pub workspace_rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub filter: ::core::option::Option<SearchFilter>,
    #[prost(int32, optional, tag = "3")]
    pub page_size: ::core::option::Option<i32>,
    #[prost(string, optional, tag = "4")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchImagesResponse {
    #[prost(message, repeated, tag = "1")]
    pub images: ::prost::alloc::vec::Vec<ContainerImage>,
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContainerImageStatus {
    Unspecified = 0,
    Pending = 1,
    Ready = 2,
    Failed = 3,
}
impl ContainerImageStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "CONTAINER_IMAGE_STATUS_UNSPECIFIED",
            Self::Pending => "CONTAINER_IMAGE_STATUS_PENDING",
            Self::Ready => "CONTAINER_IMAGE_STATUS_READY",
            Self::Failed => "CONTAINER_IMAGE_STATUS_FAILED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONTAINER_IMAGE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "CONTAINER_IMAGE_STATUS_PENDING" => Some(Self::Pending),
            "CONTAINER_IMAGE_STATUS_READY" => Some(Self::Ready),
            "CONTAINER_IMAGE_STATUS_FAILED" => Some(Self::Failed),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FileOutputFormat {
    Unspecified = 0,
    Parquet = 1,
    Csv = 2,
    ParquetTar = 3,
    AvroStream = 4,
    JsonL = 5,
    Manifest = 6,
}
impl FileOutputFormat {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "FILE_OUTPUT_FORMAT_UNSPECIFIED",
            Self::Parquet => "FILE_OUTPUT_FORMAT_PARQUET",
            Self::Csv => "FILE_OUTPUT_FORMAT_CSV",
            Self::ParquetTar => "FILE_OUTPUT_FORMAT_PARQUET_TAR",
            Self::AvroStream => "FILE_OUTPUT_FORMAT_AVRO_STREAM",
            Self::JsonL => "FILE_OUTPUT_FORMAT_JSON_L",
            Self::Manifest => "FILE_OUTPUT_FORMAT_MANIFEST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FILE_OUTPUT_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
            "FILE_OUTPUT_FORMAT_PARQUET" => Some(Self::Parquet),
            "FILE_OUTPUT_FORMAT_CSV" => Some(Self::Csv),
            "FILE_OUTPUT_FORMAT_PARQUET_TAR" => Some(Self::ParquetTar),
            "FILE_OUTPUT_FORMAT_AVRO_STREAM" => Some(Self::AvroStream),
            "FILE_OUTPUT_FORMAT_JSON_L" => Some(Self::JsonL),
            "FILE_OUTPUT_FORMAT_MANIFEST" => Some(Self::Manifest),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod registry_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 RegistryServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl RegistryServiceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        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> RegistryServiceClient<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,
        ) -> RegistryServiceClient<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,
        {
            RegistryServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[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_image(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateImageRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateImageResponse>,
            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.registry.v1.RegistryService/CreateImage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("nominal.registry.v1.RegistryService", "CreateImage"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn get_image(
            &mut self,
            request: impl tonic::IntoRequest<super::GetImageRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GetImageResponse>,
            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.registry.v1.RegistryService/GetImage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("nominal.registry.v1.RegistryService", "GetImage"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn delete_image(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteImageRequest>,
        ) -> std::result::Result<
            tonic::Response<super::DeleteImageResponse>,
            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.registry.v1.RegistryService/DeleteImage",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new("nominal.registry.v1.RegistryService", "DeleteImage"),
                );
            self.inner.unary(req, path, codec).await
        }
        pub async fn search_images(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchImagesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchImagesResponse>,
            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.registry.v1.RegistryService/SearchImages",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "nominal.registry.v1.RegistryService",
                        "SearchImages",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
