// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GitSource {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub r#ref: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag = "3")]
    pub rev: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, tag = "4")]
    pub submodules: bool,
    #[prost(string, optional, tag = "5")]
    pub dir: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SourcesManifest {
    #[prost(oneof = "sources_manifest::Source", tags = "1")]
    pub source: ::core::option::Option<sources_manifest::Source>,
}
/// Nested message and enum types in `SourcesManifest`.
pub mod sources_manifest {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Source {
        #[prost(message, tag = "1")]
        Git(super::GitSource),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppManifest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub sources: ::core::option::Option<SourcesManifest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppDefinition {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub workspace_rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub manifest: ::core::option::Option<AppManifest>,
    #[prost(string, tag = "4")]
    pub bundle_url: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub bundle_sha256: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub created_by_user_rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub created_at: ::core::option::Option<
        super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(message, optional, tag = "8")]
    pub updated_at: ::core::option::Option<
        super::super::super::google::protobuf::Timestamp,
    >,
    #[prost(bool, tag = "9")]
    pub is_archived: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAppRequest {
    #[prost(string, tag = "1")]
    pub workspace_rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub manifest: ::core::option::Option<AppManifest>,
    #[prost(string, tag = "3")]
    pub bundle_upload_path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAppResponse {
    #[prost(message, optional, tag = "1")]
    pub app: ::core::option::Option<AppDefinition>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAppRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAppResponse {
    #[prost(message, optional, tag = "1")]
    pub app: ::core::option::Option<AppDefinition>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAppRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub manifest: ::core::option::Option<AppManifest>,
    #[prost(string, optional, tag = "3")]
    pub bundle_upload_path: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAppResponse {
    #[prost(message, optional, tag = "1")]
    pub app: ::core::option::Option<AppDefinition>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveAppRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ArchiveAppResponse {
    #[prost(message, optional, tag = "1")]
    pub app: ::core::option::Option<AppDefinition>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnarchiveAppRequest {
    #[prost(string, tag = "1")]
    pub rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnarchiveAppResponse {
    #[prost(message, optional, tag = "1")]
    pub app: ::core::option::Option<AppDefinition>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAppsRequest {
    #[prost(string, tag = "1")]
    pub workspace_rid: ::prost::alloc::string::String,
    #[prost(string, optional, tag = "2")]
    pub name_contains: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(bool, optional, tag = "5")]
    pub include_archived: ::core::option::Option<bool>,
    #[prost(int32, optional, tag = "3")]
    pub page_size: ::core::option::Option<i32>,
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchAppsResponse {
    #[prost(message, repeated, tag = "1")]
    pub apps: ::prost::alloc::vec::Vec<AppDefinition>,
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod labs_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 LabsServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl LabsServiceClient<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> LabsServiceClient<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,
        ) -> LabsServiceClient<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,
        {
            LabsServiceClient::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_app(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateAppRequest>,
        ) -> std::result::Result<
            tonic::Response<super::CreateAppResponse>,
            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.labs.v1.LabsService/CreateApp",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "CreateApp"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn get_app(
            &mut self,
            request: impl tonic::IntoRequest<super::GetAppRequest>,
        ) -> std::result::Result<tonic::Response<super::GetAppResponse>, 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.labs.v1.LabsService/GetApp",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "GetApp"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn update_app(
            &mut self,
            request: impl tonic::IntoRequest<super::UpdateAppRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UpdateAppResponse>,
            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.labs.v1.LabsService/UpdateApp",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "UpdateApp"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn archive_app(
            &mut self,
            request: impl tonic::IntoRequest<super::ArchiveAppRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ArchiveAppResponse>,
            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.labs.v1.LabsService/ArchiveApp",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "ArchiveApp"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn unarchive_app(
            &mut self,
            request: impl tonic::IntoRequest<super::UnarchiveAppRequest>,
        ) -> std::result::Result<
            tonic::Response<super::UnarchiveAppResponse>,
            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.labs.v1.LabsService/UnarchiveApp",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "UnarchiveApp"));
            self.inner.unary(req, path, codec).await
        }
        pub async fn search_apps(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchAppsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchAppsResponse>,
            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.labs.v1.LabsService/SearchApps",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("nominal.labs.v1.LabsService", "SearchApps"));
            self.inner.unary(req, path, codec).await
        }
    }
}
