Skip to main content

nominal_api_proto/proto/
nominal.authorization.resources.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct ResourceAccessDecision {
4    #[prost(string, tag = "1")]
5    pub resource_rid: ::prost::alloc::string::String,
6    #[prost(bool, tag = "2")]
7    pub is_authorized: bool,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct ResourceWorkspace {
11    #[prost(string, tag = "1")]
12    pub resource_rid: ::prost::alloc::string::String,
13    #[prost(string, tag = "2")]
14    pub workspace_rid: ::prost::alloc::string::String,
15}
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct BatchCheckResourceAccessRequest {
18    #[prost(string, repeated, tag = "1")]
19    pub resource_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
20}
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct BatchCheckResourceAccessResponse {
23    #[prost(message, repeated, tag = "1")]
24    pub decisions: ::prost::alloc::vec::Vec<ResourceAccessDecision>,
25}
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct BatchGetResourceWorkspacesRequest {
28    #[prost(string, repeated, tag = "1")]
29    pub resource_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct BatchGetResourceWorkspacesResponse {
33    #[prost(message, repeated, tag = "1")]
34    pub resource_workspaces: ::prost::alloc::vec::Vec<ResourceWorkspace>,
35}
36#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
37#[repr(i32)]
38pub enum ResourceAccessError {
39    Unspecified = 0,
40    InvalidResourceRid = 1,
41    InvalidWorkspaceRid = 2,
42}
43impl ResourceAccessError {
44    /// String value of the enum field names used in the ProtoBuf definition.
45    ///
46    /// The values are not transformed in any way and thus are considered stable
47    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
48    pub fn as_str_name(&self) -> &'static str {
49        match self {
50            Self::Unspecified => "RESOURCE_ACCESS_ERROR_UNSPECIFIED",
51            Self::InvalidResourceRid => "RESOURCE_ACCESS_ERROR_INVALID_RESOURCE_RID",
52            Self::InvalidWorkspaceRid => "RESOURCE_ACCESS_ERROR_INVALID_WORKSPACE_RID",
53        }
54    }
55    /// Creates an enum from field names used in the ProtoBuf definition.
56    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
57        match value {
58            "RESOURCE_ACCESS_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
59            "RESOURCE_ACCESS_ERROR_INVALID_RESOURCE_RID" => {
60                Some(Self::InvalidResourceRid)
61            }
62            "RESOURCE_ACCESS_ERROR_INVALID_WORKSPACE_RID" => {
63                Some(Self::InvalidWorkspaceRid)
64            }
65            _ => None,
66        }
67    }
68}
69/// Generated client implementations.
70pub mod resource_access_service_client {
71    #![allow(
72        unused_variables,
73        dead_code,
74        missing_docs,
75        clippy::wildcard_imports,
76        clippy::let_unit_value,
77    )]
78    use tonic::codegen::*;
79    use tonic::codegen::http::Uri;
80    #[derive(Debug, Clone)]
81    pub struct ResourceAccessServiceClient<T> {
82        inner: tonic::client::Grpc<T>,
83    }
84    impl ResourceAccessServiceClient<tonic::transport::Channel> {
85        /// Attempt to create a new client by connecting to a given endpoint.
86        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
87        where
88            D: TryInto<tonic::transport::Endpoint>,
89            D::Error: Into<StdError>,
90        {
91            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
92            Ok(Self::new(conn))
93        }
94    }
95    impl<T> ResourceAccessServiceClient<T>
96    where
97        T: tonic::client::GrpcService<tonic::body::Body>,
98        T::Error: Into<StdError>,
99        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
100        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
101    {
102        pub fn new(inner: T) -> Self {
103            let inner = tonic::client::Grpc::new(inner);
104            Self { inner }
105        }
106        pub fn with_origin(inner: T, origin: Uri) -> Self {
107            let inner = tonic::client::Grpc::with_origin(inner, origin);
108            Self { inner }
109        }
110        pub fn with_interceptor<F>(
111            inner: T,
112            interceptor: F,
113        ) -> ResourceAccessServiceClient<InterceptedService<T, F>>
114        where
115            F: tonic::service::Interceptor,
116            T::ResponseBody: Default,
117            T: tonic::codegen::Service<
118                http::Request<tonic::body::Body>,
119                Response = http::Response<
120                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
121                >,
122            >,
123            <T as tonic::codegen::Service<
124                http::Request<tonic::body::Body>,
125            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
126        {
127            ResourceAccessServiceClient::new(InterceptedService::new(inner, interceptor))
128        }
129        /// Compress requests with the given encoding.
130        ///
131        /// This requires the server to support it otherwise it might respond with an
132        /// error.
133        #[must_use]
134        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
135            self.inner = self.inner.send_compressed(encoding);
136            self
137        }
138        /// Enable decompressing responses.
139        #[must_use]
140        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
141            self.inner = self.inner.accept_compressed(encoding);
142            self
143        }
144        /// Limits the maximum size of a decoded message.
145        ///
146        /// Default: `4MB`
147        #[must_use]
148        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
149            self.inner = self.inner.max_decoding_message_size(limit);
150            self
151        }
152        /// Limits the maximum size of an encoded message.
153        ///
154        /// Default: `usize::MAX`
155        #[must_use]
156        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
157            self.inner = self.inner.max_encoding_message_size(limit);
158            self
159        }
160        pub async fn batch_check_resource_access(
161            &mut self,
162            request: impl tonic::IntoRequest<super::BatchCheckResourceAccessRequest>,
163        ) -> std::result::Result<
164            tonic::Response<super::BatchCheckResourceAccessResponse>,
165            tonic::Status,
166        > {
167            self.inner
168                .ready()
169                .await
170                .map_err(|e| {
171                    tonic::Status::unknown(
172                        format!("Service was not ready: {}", e.into()),
173                    )
174                })?;
175            let codec = tonic::codec::ProstCodec::default();
176            let path = http::uri::PathAndQuery::from_static(
177                "/nominal.authorization.resources.v1.ResourceAccessService/BatchCheckResourceAccess",
178            );
179            let mut req = request.into_request();
180            req.extensions_mut()
181                .insert(
182                    GrpcMethod::new(
183                        "nominal.authorization.resources.v1.ResourceAccessService",
184                        "BatchCheckResourceAccess",
185                    ),
186                );
187            self.inner.unary(req, path, codec).await
188        }
189        pub async fn batch_get_resource_workspaces(
190            &mut self,
191            request: impl tonic::IntoRequest<super::BatchGetResourceWorkspacesRequest>,
192        ) -> std::result::Result<
193            tonic::Response<super::BatchGetResourceWorkspacesResponse>,
194            tonic::Status,
195        > {
196            self.inner
197                .ready()
198                .await
199                .map_err(|e| {
200                    tonic::Status::unknown(
201                        format!("Service was not ready: {}", e.into()),
202                    )
203                })?;
204            let codec = tonic::codec::ProstCodec::default();
205            let path = http::uri::PathAndQuery::from_static(
206                "/nominal.authorization.resources.v1.ResourceAccessService/BatchGetResourceWorkspaces",
207            );
208            let mut req = request.into_request();
209            req.extensions_mut()
210                .insert(
211                    GrpcMethod::new(
212                        "nominal.authorization.resources.v1.ResourceAccessService",
213                        "BatchGetResourceWorkspaces",
214                    ),
215                );
216            self.inner.unary(req, path, codec).await
217        }
218    }
219}
220#[derive(Clone, PartialEq, ::prost::Message)]
221pub struct ResourceShareKey {
222    #[prost(string, tag = "1")]
223    pub resource_rid: ::prost::alloc::string::String,
224    #[prost(enumeration = "ResourceShareRole", tag = "2")]
225    pub role: i32,
226}
227#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct ResourceShare {
229    #[prost(message, optional, tag = "1")]
230    pub key: ::core::option::Option<ResourceShareKey>,
231    #[prost(message, repeated, tag = "2")]
232    pub subjects: ::prost::alloc::vec::Vec<resource_share::ShareSubject>,
233    #[prost(message, optional, tag = "3")]
234    pub related_grants: ::core::option::Option<resource_share::RelatedResourceGrants>,
235    #[prost(string, tag = "4")]
236    pub last_updated_by: ::prost::alloc::string::String,
237    #[prost(message, optional, tag = "5")]
238    pub last_updated_at: ::core::option::Option<
239        super::super::super::super::google::protobuf::Timestamp,
240    >,
241}
242/// Nested message and enum types in `ResourceShare`.
243pub mod resource_share {
244    #[derive(Clone, PartialEq, ::prost::Message)]
245    pub struct ShareSubject {
246        #[prost(oneof = "share_subject::Subject", tags = "1")]
247        pub subject: ::core::option::Option<share_subject::Subject>,
248    }
249    /// Nested message and enum types in `ShareSubject`.
250    pub mod share_subject {
251        #[derive(Clone, PartialEq, ::prost::Oneof)]
252        pub enum Subject {
253            #[prost(string, tag = "1")]
254            UserRid(::prost::alloc::string::String),
255        }
256    }
257    #[derive(Clone, PartialEq, ::prost::Message)]
258    pub struct RelatedResourceGrants {
259        #[prost(message, repeated, tag = "1")]
260        pub run_grants: ::prost::alloc::vec::Vec<super::RunGrant>,
261        #[prost(message, repeated, tag = "2")]
262        pub asset_grants: ::prost::alloc::vec::Vec<super::AssetGrant>,
263        #[prost(message, repeated, tag = "3")]
264        pub datasource_grants: ::prost::alloc::vec::Vec<super::DatasourceGrant>,
265    }
266}
267#[derive(Clone, PartialEq, ::prost::Message)]
268pub struct RunGrant {
269    #[prost(string, tag = "1")]
270    pub rid: ::prost::alloc::string::String,
271}
272#[derive(Clone, PartialEq, ::prost::Message)]
273pub struct AssetGrant {
274    #[prost(string, tag = "1")]
275    pub rid: ::prost::alloc::string::String,
276}
277#[derive(Clone, PartialEq, ::prost::Message)]
278pub struct DatasourceGrant {
279    #[prost(string, tag = "1")]
280    pub rid: ::prost::alloc::string::String,
281}
282#[derive(Clone, PartialEq, ::prost::Message)]
283pub struct CreateResourceShareRequest {
284    #[prost(message, optional, tag = "1")]
285    pub resource_share: ::core::option::Option<ResourceShare>,
286}
287#[derive(Clone, PartialEq, ::prost::Message)]
288pub struct CreateResourceShareResponse {
289    #[prost(message, optional, tag = "1")]
290    pub resource_share: ::core::option::Option<ResourceShare>,
291}
292#[derive(Clone, PartialEq, ::prost::Message)]
293pub struct BatchGetResourceSharesRequest {
294    #[prost(message, repeated, tag = "1")]
295    pub keys: ::prost::alloc::vec::Vec<ResourceShareKey>,
296}
297#[derive(Clone, PartialEq, ::prost::Message)]
298pub struct BatchGetResourceSharesResponse {
299    #[prost(message, repeated, tag = "1")]
300    pub resource_shares: ::prost::alloc::vec::Vec<ResourceShare>,
301}
302#[derive(Clone, PartialEq, ::prost::Message)]
303pub struct ListResourceSharesRequest {
304    #[prost(string, tag = "1")]
305    pub resource_rid: ::prost::alloc::string::String,
306    #[prost(int32, tag = "2")]
307    pub page_size: i32,
308    #[prost(string, tag = "3")]
309    pub page_token: ::prost::alloc::string::String,
310}
311#[derive(Clone, PartialEq, ::prost::Message)]
312pub struct ListResourceSharesResponse {
313    #[prost(message, repeated, tag = "1")]
314    pub resource_shares: ::prost::alloc::vec::Vec<ResourceShare>,
315    #[prost(string, tag = "2")]
316    pub next_page_token: ::prost::alloc::string::String,
317}
318#[derive(Clone, PartialEq, ::prost::Message)]
319pub struct DeleteResourceShareRequest {
320    #[prost(message, optional, tag = "1")]
321    pub key: ::core::option::Option<ResourceShareKey>,
322}
323#[derive(Clone, Copy, PartialEq, ::prost::Message)]
324pub struct DeleteResourceShareResponse {}
325#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
326#[repr(i32)]
327pub enum ResourceShareRole {
328    Unspecified = 0,
329    Viewer = 1,
330}
331impl ResourceShareRole {
332    /// String value of the enum field names used in the ProtoBuf definition.
333    ///
334    /// The values are not transformed in any way and thus are considered stable
335    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
336    pub fn as_str_name(&self) -> &'static str {
337        match self {
338            Self::Unspecified => "RESOURCE_SHARE_ROLE_UNSPECIFIED",
339            Self::Viewer => "RESOURCE_SHARE_ROLE_VIEWER",
340        }
341    }
342    /// Creates an enum from field names used in the ProtoBuf definition.
343    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
344        match value {
345            "RESOURCE_SHARE_ROLE_UNSPECIFIED" => Some(Self::Unspecified),
346            "RESOURCE_SHARE_ROLE_VIEWER" => Some(Self::Viewer),
347            _ => None,
348        }
349    }
350}
351/// Generated client implementations.
352pub mod resource_share_service_client {
353    #![allow(
354        unused_variables,
355        dead_code,
356        missing_docs,
357        clippy::wildcard_imports,
358        clippy::let_unit_value,
359    )]
360    use tonic::codegen::*;
361    use tonic::codegen::http::Uri;
362    #[derive(Debug, Clone)]
363    pub struct ResourceShareServiceClient<T> {
364        inner: tonic::client::Grpc<T>,
365    }
366    impl ResourceShareServiceClient<tonic::transport::Channel> {
367        /// Attempt to create a new client by connecting to a given endpoint.
368        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
369        where
370            D: TryInto<tonic::transport::Endpoint>,
371            D::Error: Into<StdError>,
372        {
373            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
374            Ok(Self::new(conn))
375        }
376    }
377    impl<T> ResourceShareServiceClient<T>
378    where
379        T: tonic::client::GrpcService<tonic::body::Body>,
380        T::Error: Into<StdError>,
381        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
382        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
383    {
384        pub fn new(inner: T) -> Self {
385            let inner = tonic::client::Grpc::new(inner);
386            Self { inner }
387        }
388        pub fn with_origin(inner: T, origin: Uri) -> Self {
389            let inner = tonic::client::Grpc::with_origin(inner, origin);
390            Self { inner }
391        }
392        pub fn with_interceptor<F>(
393            inner: T,
394            interceptor: F,
395        ) -> ResourceShareServiceClient<InterceptedService<T, F>>
396        where
397            F: tonic::service::Interceptor,
398            T::ResponseBody: Default,
399            T: tonic::codegen::Service<
400                http::Request<tonic::body::Body>,
401                Response = http::Response<
402                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
403                >,
404            >,
405            <T as tonic::codegen::Service<
406                http::Request<tonic::body::Body>,
407            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
408        {
409            ResourceShareServiceClient::new(InterceptedService::new(inner, interceptor))
410        }
411        /// Compress requests with the given encoding.
412        ///
413        /// This requires the server to support it otherwise it might respond with an
414        /// error.
415        #[must_use]
416        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
417            self.inner = self.inner.send_compressed(encoding);
418            self
419        }
420        /// Enable decompressing responses.
421        #[must_use]
422        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
423            self.inner = self.inner.accept_compressed(encoding);
424            self
425        }
426        /// Limits the maximum size of a decoded message.
427        ///
428        /// Default: `4MB`
429        #[must_use]
430        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
431            self.inner = self.inner.max_decoding_message_size(limit);
432            self
433        }
434        /// Limits the maximum size of an encoded message.
435        ///
436        /// Default: `usize::MAX`
437        #[must_use]
438        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
439            self.inner = self.inner.max_encoding_message_size(limit);
440            self
441        }
442        pub async fn create_resource_share(
443            &mut self,
444            request: impl tonic::IntoRequest<super::CreateResourceShareRequest>,
445        ) -> std::result::Result<
446            tonic::Response<super::CreateResourceShareResponse>,
447            tonic::Status,
448        > {
449            self.inner
450                .ready()
451                .await
452                .map_err(|e| {
453                    tonic::Status::unknown(
454                        format!("Service was not ready: {}", e.into()),
455                    )
456                })?;
457            let codec = tonic::codec::ProstCodec::default();
458            let path = http::uri::PathAndQuery::from_static(
459                "/nominal.authorization.resources.v1.ResourceShareService/CreateResourceShare",
460            );
461            let mut req = request.into_request();
462            req.extensions_mut()
463                .insert(
464                    GrpcMethod::new(
465                        "nominal.authorization.resources.v1.ResourceShareService",
466                        "CreateResourceShare",
467                    ),
468                );
469            self.inner.unary(req, path, codec).await
470        }
471        pub async fn batch_get_resource_shares(
472            &mut self,
473            request: impl tonic::IntoRequest<super::BatchGetResourceSharesRequest>,
474        ) -> std::result::Result<
475            tonic::Response<super::BatchGetResourceSharesResponse>,
476            tonic::Status,
477        > {
478            self.inner
479                .ready()
480                .await
481                .map_err(|e| {
482                    tonic::Status::unknown(
483                        format!("Service was not ready: {}", e.into()),
484                    )
485                })?;
486            let codec = tonic::codec::ProstCodec::default();
487            let path = http::uri::PathAndQuery::from_static(
488                "/nominal.authorization.resources.v1.ResourceShareService/BatchGetResourceShares",
489            );
490            let mut req = request.into_request();
491            req.extensions_mut()
492                .insert(
493                    GrpcMethod::new(
494                        "nominal.authorization.resources.v1.ResourceShareService",
495                        "BatchGetResourceShares",
496                    ),
497                );
498            self.inner.unary(req, path, codec).await
499        }
500        pub async fn list_resource_shares(
501            &mut self,
502            request: impl tonic::IntoRequest<super::ListResourceSharesRequest>,
503        ) -> std::result::Result<
504            tonic::Response<super::ListResourceSharesResponse>,
505            tonic::Status,
506        > {
507            self.inner
508                .ready()
509                .await
510                .map_err(|e| {
511                    tonic::Status::unknown(
512                        format!("Service was not ready: {}", e.into()),
513                    )
514                })?;
515            let codec = tonic::codec::ProstCodec::default();
516            let path = http::uri::PathAndQuery::from_static(
517                "/nominal.authorization.resources.v1.ResourceShareService/ListResourceShares",
518            );
519            let mut req = request.into_request();
520            req.extensions_mut()
521                .insert(
522                    GrpcMethod::new(
523                        "nominal.authorization.resources.v1.ResourceShareService",
524                        "ListResourceShares",
525                    ),
526                );
527            self.inner.unary(req, path, codec).await
528        }
529        pub async fn delete_resource_share(
530            &mut self,
531            request: impl tonic::IntoRequest<super::DeleteResourceShareRequest>,
532        ) -> std::result::Result<
533            tonic::Response<super::DeleteResourceShareResponse>,
534            tonic::Status,
535        > {
536            self.inner
537                .ready()
538                .await
539                .map_err(|e| {
540                    tonic::Status::unknown(
541                        format!("Service was not ready: {}", e.into()),
542                    )
543                })?;
544            let codec = tonic::codec::ProstCodec::default();
545            let path = http::uri::PathAndQuery::from_static(
546                "/nominal.authorization.resources.v1.ResourceShareService/DeleteResourceShare",
547            );
548            let mut req = request.into_request();
549            req.extensions_mut()
550                .insert(
551                    GrpcMethod::new(
552                        "nominal.authorization.resources.v1.ResourceShareService",
553                        "DeleteResourceShare",
554                    ),
555                );
556            self.inner.unary(req, path, codec).await
557        }
558    }
559}
560#[derive(Clone, PartialEq, ::prost::Message)]
561pub struct BatchCreateResourceWorkspacesRequest {
562    #[prost(string, tag = "1")]
563    pub workspace_rid: ::prost::alloc::string::String,
564    #[prost(message, repeated, tag = "2")]
565    pub resource_workspaces: ::prost::alloc::vec::Vec<ResourceWorkspace>,
566}
567#[derive(Clone, PartialEq, ::prost::Message)]
568pub struct BatchCreateResourceWorkspacesResponse {
569    #[prost(message, repeated, tag = "1")]
570    pub resource_workspaces: ::prost::alloc::vec::Vec<ResourceWorkspace>,
571}
572/// Generated client implementations.
573pub mod resource_workspace_service_client {
574    #![allow(
575        unused_variables,
576        dead_code,
577        missing_docs,
578        clippy::wildcard_imports,
579        clippy::let_unit_value,
580    )]
581    use tonic::codegen::*;
582    use tonic::codegen::http::Uri;
583    #[derive(Debug, Clone)]
584    pub struct ResourceWorkspaceServiceClient<T> {
585        inner: tonic::client::Grpc<T>,
586    }
587    impl ResourceWorkspaceServiceClient<tonic::transport::Channel> {
588        /// Attempt to create a new client by connecting to a given endpoint.
589        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
590        where
591            D: TryInto<tonic::transport::Endpoint>,
592            D::Error: Into<StdError>,
593        {
594            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
595            Ok(Self::new(conn))
596        }
597    }
598    impl<T> ResourceWorkspaceServiceClient<T>
599    where
600        T: tonic::client::GrpcService<tonic::body::Body>,
601        T::Error: Into<StdError>,
602        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
603        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
604    {
605        pub fn new(inner: T) -> Self {
606            let inner = tonic::client::Grpc::new(inner);
607            Self { inner }
608        }
609        pub fn with_origin(inner: T, origin: Uri) -> Self {
610            let inner = tonic::client::Grpc::with_origin(inner, origin);
611            Self { inner }
612        }
613        pub fn with_interceptor<F>(
614            inner: T,
615            interceptor: F,
616        ) -> ResourceWorkspaceServiceClient<InterceptedService<T, F>>
617        where
618            F: tonic::service::Interceptor,
619            T::ResponseBody: Default,
620            T: tonic::codegen::Service<
621                http::Request<tonic::body::Body>,
622                Response = http::Response<
623                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
624                >,
625            >,
626            <T as tonic::codegen::Service<
627                http::Request<tonic::body::Body>,
628            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
629        {
630            ResourceWorkspaceServiceClient::new(
631                InterceptedService::new(inner, interceptor),
632            )
633        }
634        /// Compress requests with the given encoding.
635        ///
636        /// This requires the server to support it otherwise it might respond with an
637        /// error.
638        #[must_use]
639        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
640            self.inner = self.inner.send_compressed(encoding);
641            self
642        }
643        /// Enable decompressing responses.
644        #[must_use]
645        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
646            self.inner = self.inner.accept_compressed(encoding);
647            self
648        }
649        /// Limits the maximum size of a decoded message.
650        ///
651        /// Default: `4MB`
652        #[must_use]
653        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
654            self.inner = self.inner.max_decoding_message_size(limit);
655            self
656        }
657        /// Limits the maximum size of an encoded message.
658        ///
659        /// Default: `usize::MAX`
660        #[must_use]
661        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
662            self.inner = self.inner.max_encoding_message_size(limit);
663            self
664        }
665        pub async fn batch_create_resource_workspaces(
666            &mut self,
667            request: impl tonic::IntoRequest<super::BatchCreateResourceWorkspacesRequest>,
668        ) -> std::result::Result<
669            tonic::Response<super::BatchCreateResourceWorkspacesResponse>,
670            tonic::Status,
671        > {
672            self.inner
673                .ready()
674                .await
675                .map_err(|e| {
676                    tonic::Status::unknown(
677                        format!("Service was not ready: {}", e.into()),
678                    )
679                })?;
680            let codec = tonic::codec::ProstCodec::default();
681            let path = http::uri::PathAndQuery::from_static(
682                "/nominal.authorization.resources.v1.ResourceWorkspaceService/BatchCreateResourceWorkspaces",
683            );
684            let mut req = request.into_request();
685            req.extensions_mut()
686                .insert(
687                    GrpcMethod::new(
688                        "nominal.authorization.resources.v1.ResourceWorkspaceService",
689                        "BatchCreateResourceWorkspaces",
690                    ),
691                );
692            self.inner.unary(req, path, codec).await
693        }
694    }
695}