Skip to main content

nominal_api_proto/proto/
nominal.sandbox.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct AddDemoWorkbooksRequest {
4    #[prost(string, repeated, tag = "1")]
5    pub notebook_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
6    #[prost(bool, optional, tag = "2")]
7    pub archive_on_label_conflict: ::core::option::Option<bool>,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct GetDemoWorkbooksResponse {
11    #[prost(string, repeated, tag = "1")]
12    pub notebook_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
13}
14#[derive(Clone, PartialEq, ::prost::Message)]
15pub struct SetDemoWorkbooksRequest {
16    #[prost(string, repeated, tag = "1")]
17    pub notebook_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
18}
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct GetDemoWorkbooksRequest {
21    #[prost(string, tag = "1")]
22    pub workspace_rid: ::prost::alloc::string::String,
23}
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct SetDemoWorkbooksRequestWrapper {
26    #[prost(string, tag = "1")]
27    pub workspace_rid: ::prost::alloc::string::String,
28    #[prost(message, optional, tag = "2")]
29    pub request: ::core::option::Option<SetDemoWorkbooksRequest>,
30}
31#[derive(Clone, Copy, PartialEq, ::prost::Message)]
32pub struct SetDemoWorkbooksResponse {}
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct AddDemoWorkbooksRequestWrapper {
35    #[prost(string, tag = "1")]
36    pub workspace_rid: ::prost::alloc::string::String,
37    #[prost(message, optional, tag = "2")]
38    pub request: ::core::option::Option<AddDemoWorkbooksRequest>,
39}
40#[derive(Clone, Copy, PartialEq, ::prost::Message)]
41pub struct AddDemoWorkbooksResponse {}
42/// Generated client implementations.
43pub mod sandbox_workspace_service_client {
44    #![allow(
45        unused_variables,
46        dead_code,
47        missing_docs,
48        clippy::wildcard_imports,
49        clippy::let_unit_value,
50    )]
51    use tonic::codegen::*;
52    use tonic::codegen::http::Uri;
53    #[derive(Debug, Clone)]
54    pub struct SandboxWorkspaceServiceClient<T> {
55        inner: tonic::client::Grpc<T>,
56    }
57    impl SandboxWorkspaceServiceClient<tonic::transport::Channel> {
58        /// Attempt to create a new client by connecting to a given endpoint.
59        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
60        where
61            D: TryInto<tonic::transport::Endpoint>,
62            D::Error: Into<StdError>,
63        {
64            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
65            Ok(Self::new(conn))
66        }
67    }
68    impl<T> SandboxWorkspaceServiceClient<T>
69    where
70        T: tonic::client::GrpcService<tonic::body::Body>,
71        T::Error: Into<StdError>,
72        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
73        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
74    {
75        pub fn new(inner: T) -> Self {
76            let inner = tonic::client::Grpc::new(inner);
77            Self { inner }
78        }
79        pub fn with_origin(inner: T, origin: Uri) -> Self {
80            let inner = tonic::client::Grpc::with_origin(inner, origin);
81            Self { inner }
82        }
83        pub fn with_interceptor<F>(
84            inner: T,
85            interceptor: F,
86        ) -> SandboxWorkspaceServiceClient<InterceptedService<T, F>>
87        where
88            F: tonic::service::Interceptor,
89            T::ResponseBody: Default,
90            T: tonic::codegen::Service<
91                http::Request<tonic::body::Body>,
92                Response = http::Response<
93                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
94                >,
95            >,
96            <T as tonic::codegen::Service<
97                http::Request<tonic::body::Body>,
98            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
99        {
100            SandboxWorkspaceServiceClient::new(
101                InterceptedService::new(inner, interceptor),
102            )
103        }
104        /// Compress requests with the given encoding.
105        ///
106        /// This requires the server to support it otherwise it might respond with an
107        /// error.
108        #[must_use]
109        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
110            self.inner = self.inner.send_compressed(encoding);
111            self
112        }
113        /// Enable decompressing responses.
114        #[must_use]
115        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
116            self.inner = self.inner.accept_compressed(encoding);
117            self
118        }
119        /// Limits the maximum size of a decoded message.
120        ///
121        /// Default: `4MB`
122        #[must_use]
123        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
124            self.inner = self.inner.max_decoding_message_size(limit);
125            self
126        }
127        /// Limits the maximum size of an encoded message.
128        ///
129        /// Default: `usize::MAX`
130        #[must_use]
131        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
132            self.inner = self.inner.max_encoding_message_size(limit);
133            self
134        }
135        pub async fn get_demo_workbooks(
136            &mut self,
137            request: impl tonic::IntoRequest<super::GetDemoWorkbooksRequest>,
138        ) -> std::result::Result<
139            tonic::Response<super::GetDemoWorkbooksResponse>,
140            tonic::Status,
141        > {
142            self.inner
143                .ready()
144                .await
145                .map_err(|e| {
146                    tonic::Status::unknown(
147                        format!("Service was not ready: {}", e.into()),
148                    )
149                })?;
150            let codec = tonic::codec::ProstCodec::default();
151            let path = http::uri::PathAndQuery::from_static(
152                "/nominal.sandbox.v1.SandboxWorkspaceService/GetDemoWorkbooks",
153            );
154            let mut req = request.into_request();
155            req.extensions_mut()
156                .insert(
157                    GrpcMethod::new(
158                        "nominal.sandbox.v1.SandboxWorkspaceService",
159                        "GetDemoWorkbooks",
160                    ),
161                );
162            self.inner.unary(req, path, codec).await
163        }
164        pub async fn set_demo_workbooks(
165            &mut self,
166            request: impl tonic::IntoRequest<super::SetDemoWorkbooksRequestWrapper>,
167        ) -> std::result::Result<
168            tonic::Response<super::SetDemoWorkbooksResponse>,
169            tonic::Status,
170        > {
171            self.inner
172                .ready()
173                .await
174                .map_err(|e| {
175                    tonic::Status::unknown(
176                        format!("Service was not ready: {}", e.into()),
177                    )
178                })?;
179            let codec = tonic::codec::ProstCodec::default();
180            let path = http::uri::PathAndQuery::from_static(
181                "/nominal.sandbox.v1.SandboxWorkspaceService/SetDemoWorkbooks",
182            );
183            let mut req = request.into_request();
184            req.extensions_mut()
185                .insert(
186                    GrpcMethod::new(
187                        "nominal.sandbox.v1.SandboxWorkspaceService",
188                        "SetDemoWorkbooks",
189                    ),
190                );
191            self.inner.unary(req, path, codec).await
192        }
193        pub async fn add_demo_workbooks(
194            &mut self,
195            request: impl tonic::IntoRequest<super::AddDemoWorkbooksRequestWrapper>,
196        ) -> std::result::Result<
197            tonic::Response<super::AddDemoWorkbooksResponse>,
198            tonic::Status,
199        > {
200            self.inner
201                .ready()
202                .await
203                .map_err(|e| {
204                    tonic::Status::unknown(
205                        format!("Service was not ready: {}", e.into()),
206                    )
207                })?;
208            let codec = tonic::codec::ProstCodec::default();
209            let path = http::uri::PathAndQuery::from_static(
210                "/nominal.sandbox.v1.SandboxWorkspaceService/AddDemoWorkbooks",
211            );
212            let mut req = request.into_request();
213            req.extensions_mut()
214                .insert(
215                    GrpcMethod::new(
216                        "nominal.sandbox.v1.SandboxWorkspaceService",
217                        "AddDemoWorkbooks",
218                    ),
219                );
220            self.inner.unary(req, path, codec).await
221        }
222    }
223}