Skip to main content

nominal_api_proto/proto/
nominal.system_datasets.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct SystemDatasets {
4    #[prost(string, optional, tag = "1")]
5    pub usage_dataset_rid: ::core::option::Option<::prost::alloc::string::String>,
6    #[prost(string, optional, tag = "2")]
7    pub log_dataset_rid: ::core::option::Option<::prost::alloc::string::String>,
8    #[prost(string, optional, tag = "3")]
9    pub ingest_error_log_dataset_rid: ::core::option::Option<
10        ::prost::alloc::string::String,
11    >,
12}
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct GetSystemDatasetsRequest {
15    #[prost(string, tag = "1")]
16    pub workspace_rid: ::prost::alloc::string::String,
17}
18#[derive(Clone, PartialEq, ::prost::Message)]
19pub struct GetSystemDatasetsResponse {
20    #[prost(message, optional, tag = "1")]
21    pub system_datasets: ::core::option::Option<SystemDatasets>,
22}
23/// Generated client implementations.
24pub mod system_datasets_service_client {
25    #![allow(
26        unused_variables,
27        dead_code,
28        missing_docs,
29        clippy::wildcard_imports,
30        clippy::let_unit_value,
31    )]
32    use tonic::codegen::*;
33    use tonic::codegen::http::Uri;
34    #[derive(Debug, Clone)]
35    pub struct SystemDatasetsServiceClient<T> {
36        inner: tonic::client::Grpc<T>,
37    }
38    impl SystemDatasetsServiceClient<tonic::transport::Channel> {
39        /// Attempt to create a new client by connecting to a given endpoint.
40        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
41        where
42            D: TryInto<tonic::transport::Endpoint>,
43            D::Error: Into<StdError>,
44        {
45            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
46            Ok(Self::new(conn))
47        }
48    }
49    impl<T> SystemDatasetsServiceClient<T>
50    where
51        T: tonic::client::GrpcService<tonic::body::Body>,
52        T::Error: Into<StdError>,
53        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
54        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
55    {
56        pub fn new(inner: T) -> Self {
57            let inner = tonic::client::Grpc::new(inner);
58            Self { inner }
59        }
60        pub fn with_origin(inner: T, origin: Uri) -> Self {
61            let inner = tonic::client::Grpc::with_origin(inner, origin);
62            Self { inner }
63        }
64        pub fn with_interceptor<F>(
65            inner: T,
66            interceptor: F,
67        ) -> SystemDatasetsServiceClient<InterceptedService<T, F>>
68        where
69            F: tonic::service::Interceptor,
70            T::ResponseBody: Default,
71            T: tonic::codegen::Service<
72                http::Request<tonic::body::Body>,
73                Response = http::Response<
74                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
75                >,
76            >,
77            <T as tonic::codegen::Service<
78                http::Request<tonic::body::Body>,
79            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
80        {
81            SystemDatasetsServiceClient::new(InterceptedService::new(inner, interceptor))
82        }
83        /// Compress requests with the given encoding.
84        ///
85        /// This requires the server to support it otherwise it might respond with an
86        /// error.
87        #[must_use]
88        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
89            self.inner = self.inner.send_compressed(encoding);
90            self
91        }
92        /// Enable decompressing responses.
93        #[must_use]
94        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
95            self.inner = self.inner.accept_compressed(encoding);
96            self
97        }
98        /// Limits the maximum size of a decoded message.
99        ///
100        /// Default: `4MB`
101        #[must_use]
102        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
103            self.inner = self.inner.max_decoding_message_size(limit);
104            self
105        }
106        /// Limits the maximum size of an encoded message.
107        ///
108        /// Default: `usize::MAX`
109        #[must_use]
110        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
111            self.inner = self.inner.max_encoding_message_size(limit);
112            self
113        }
114        pub async fn get_system_datasets(
115            &mut self,
116            request: impl tonic::IntoRequest<super::GetSystemDatasetsRequest>,
117        ) -> std::result::Result<
118            tonic::Response<super::GetSystemDatasetsResponse>,
119            tonic::Status,
120        > {
121            self.inner
122                .ready()
123                .await
124                .map_err(|e| {
125                    tonic::Status::unknown(
126                        format!("Service was not ready: {}", e.into()),
127                    )
128                })?;
129            let codec = tonic::codec::ProstCodec::default();
130            let path = http::uri::PathAndQuery::from_static(
131                "/nominal.system_datasets.v1.SystemDatasetsService/GetSystemDatasets",
132            );
133            let mut req = request.into_request();
134            req.extensions_mut()
135                .insert(
136                    GrpcMethod::new(
137                        "nominal.system_datasets.v1.SystemDatasetsService",
138                        "GetSystemDatasets",
139                    ),
140                );
141            self.inner.unary(req, path, codec).await
142        }
143    }
144}