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