Skip to main content

nominal_api_proto/proto/
nominal.file_store.v1.rs

1// This file is @generated by prost-build.
2#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Attribution {
4    #[prost(message, optional, tag = "1")]
5    pub time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
6    #[prost(string, tag = "2")]
7    pub user_rid: ::prost::alloc::string::String,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct Drive {
11    #[prost(string, tag = "1")]
12    pub rid: ::prost::alloc::string::String,
13    #[prost(string, tag = "2")]
14    pub workspace_rid: ::prost::alloc::string::String,
15    #[prost(string, tag = "3")]
16    pub name: ::prost::alloc::string::String,
17    #[prost(enumeration = "DriveState", tag = "4")]
18    pub state: i32,
19    #[prost(message, optional, tag = "5")]
20    pub created: ::core::option::Option<Attribution>,
21    #[prost(enumeration = "DriveKind", tag = "6")]
22    pub kind: i32,
23}
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct VirtualDrive {
26    #[prost(string, tag = "1")]
27    pub drive_rid: ::prost::alloc::string::String,
28    #[prost(message, optional, tag = "2")]
29    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
30    #[prost(message, optional, tag = "3")]
31    pub status: ::core::option::Option<VirtualDriveStatus>,
32}
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct VirtualDriveStatus {
35    #[prost(enumeration = "VirtualDriveState", tag = "1")]
36    pub state: i32,
37    #[prost(message, optional, tag = "2")]
38    pub last_successful_check_time: ::core::option::Option<
39        super::super::super::google::protobuf::Timestamp,
40    >,
41    #[prost(string, tag = "3")]
42    pub message: ::prost::alloc::string::String,
43}
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct VirtualDriveConnectionDetails {
46    #[prost(oneof = "virtual_drive_connection_details::Details", tags = "1")]
47    pub details: ::core::option::Option<virtual_drive_connection_details::Details>,
48}
49/// Nested message and enum types in `VirtualDriveConnectionDetails`.
50pub mod virtual_drive_connection_details {
51    #[derive(Clone, PartialEq, ::prost::Oneof)]
52    pub enum Details {
53        #[prost(message, tag = "1")]
54        S3(super::S3VirtualDriveConnectionDetails),
55    }
56}
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct S3VirtualDriveConnectionDetails {
59    #[prost(string, tag = "1")]
60    pub bucket: ::prost::alloc::string::String,
61    #[prost(string, tag = "2")]
62    pub prefix: ::prost::alloc::string::String,
63    #[prost(string, tag = "3")]
64    pub credentials_secret_rid: ::prost::alloc::string::String,
65}
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct LogicalPath {
68    #[prost(string, tag = "1")]
69    pub path: ::prost::alloc::string::String,
70}
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct File {
73    #[prost(message, optional, tag = "1")]
74    pub path: ::core::option::Option<LogicalPath>,
75    #[prost(enumeration = "FileState", tag = "2")]
76    pub state: i32,
77    #[prost(message, optional, tag = "4")]
78    pub created: ::core::option::Option<Attribution>,
79    #[prost(oneof = "file::CurrentRevision", tags = "3, 5")]
80    pub current_revision: ::core::option::Option<file::CurrentRevision>,
81}
82/// Nested message and enum types in `File`.
83pub mod file {
84    #[derive(Clone, PartialEq, ::prost::Oneof)]
85    pub enum CurrentRevision {
86        #[prost(message, tag = "3")]
87        ManagedRevision(super::FileRevision),
88        #[prost(message, tag = "5")]
89        VirtualRevision(super::VirtualFileRevision),
90    }
91}
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct FileRevision {
94    #[prost(string, tag = "1")]
95    pub file_revision_rid: ::prost::alloc::string::String,
96    #[prost(string, tag = "2")]
97    pub file_rid: ::prost::alloc::string::String,
98    #[prost(message, optional, tag = "3")]
99    pub path: ::core::option::Option<LogicalPath>,
100    #[prost(uint32, tag = "4")]
101    pub revision_number: u32,
102    #[prost(uint64, tag = "5")]
103    pub size_bytes: u64,
104    #[prost(message, optional, tag = "6")]
105    pub created: ::core::option::Option<Attribution>,
106}
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct VirtualFileRevision {
109    #[prost(message, optional, tag = "1")]
110    pub path: ::core::option::Option<LogicalPath>,
111    #[prost(uint64, tag = "2")]
112    pub size_bytes: u64,
113    #[prost(message, optional, tag = "3")]
114    pub fingerprint: ::core::option::Option<VirtualFileFingerprint>,
115    #[prost(message, optional, tag = "4")]
116    pub observed: ::core::option::Option<Attribution>,
117}
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct VirtualFileFingerprint {
120    #[prost(oneof = "virtual_file_fingerprint::Fingerprint", tags = "1")]
121    pub fingerprint: ::core::option::Option<virtual_file_fingerprint::Fingerprint>,
122}
123/// Nested message and enum types in `VirtualFileFingerprint`.
124pub mod virtual_file_fingerprint {
125    #[derive(Clone, PartialEq, ::prost::Oneof)]
126    pub enum Fingerprint {
127        #[prost(message, tag = "1")]
128        S3(super::S3VirtualFileFingerprint),
129    }
130}
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct S3VirtualFileFingerprint {
133    #[prost(string, tag = "1")]
134    pub fingerprint: ::prost::alloc::string::String,
135}
136#[derive(Clone, PartialEq, ::prost::Message)]
137pub struct Directory {
138    #[prost(message, optional, tag = "1")]
139    pub path: ::core::option::Option<LogicalPath>,
140}
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct FileEntry {
143    #[prost(oneof = "file_entry::Entry", tags = "1, 2")]
144    pub entry: ::core::option::Option<file_entry::Entry>,
145}
146/// Nested message and enum types in `FileEntry`.
147pub mod file_entry {
148    #[derive(Clone, PartialEq, ::prost::Oneof)]
149    pub enum Entry {
150        #[prost(message, tag = "1")]
151        File(super::File),
152        #[prost(message, tag = "2")]
153        Directory(super::Directory),
154    }
155}
156#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
157#[repr(i32)]
158pub enum DriveState {
159    Unspecified = 0,
160    Active = 1,
161    Archived = 2,
162}
163impl DriveState {
164    /// String value of the enum field names used in the ProtoBuf definition.
165    ///
166    /// The values are not transformed in any way and thus are considered stable
167    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
168    pub fn as_str_name(&self) -> &'static str {
169        match self {
170            Self::Unspecified => "DRIVE_STATE_UNSPECIFIED",
171            Self::Active => "DRIVE_STATE_ACTIVE",
172            Self::Archived => "DRIVE_STATE_ARCHIVED",
173        }
174    }
175    /// Creates an enum from field names used in the ProtoBuf definition.
176    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
177        match value {
178            "DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
179            "DRIVE_STATE_ACTIVE" => Some(Self::Active),
180            "DRIVE_STATE_ARCHIVED" => Some(Self::Archived),
181            _ => None,
182        }
183    }
184}
185#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
186#[repr(i32)]
187pub enum DriveKind {
188    Unspecified = 0,
189    Managed = 1,
190    Virtual = 2,
191}
192impl DriveKind {
193    /// String value of the enum field names used in the ProtoBuf definition.
194    ///
195    /// The values are not transformed in any way and thus are considered stable
196    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
197    pub fn as_str_name(&self) -> &'static str {
198        match self {
199            Self::Unspecified => "DRIVE_KIND_UNSPECIFIED",
200            Self::Managed => "DRIVE_KIND_MANAGED",
201            Self::Virtual => "DRIVE_KIND_VIRTUAL",
202        }
203    }
204    /// Creates an enum from field names used in the ProtoBuf definition.
205    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
206        match value {
207            "DRIVE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
208            "DRIVE_KIND_MANAGED" => Some(Self::Managed),
209            "DRIVE_KIND_VIRTUAL" => Some(Self::Virtual),
210            _ => None,
211        }
212    }
213}
214#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
215#[repr(i32)]
216pub enum VirtualDriveState {
217    Unspecified = 0,
218    Active = 1,
219    AuthError = 2,
220    Unreachable = 3,
221    InvalidConfiguration = 4,
222}
223impl VirtualDriveState {
224    /// String value of the enum field names used in the ProtoBuf definition.
225    ///
226    /// The values are not transformed in any way and thus are considered stable
227    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
228    pub fn as_str_name(&self) -> &'static str {
229        match self {
230            Self::Unspecified => "VIRTUAL_DRIVE_STATE_UNSPECIFIED",
231            Self::Active => "VIRTUAL_DRIVE_STATE_ACTIVE",
232            Self::AuthError => "VIRTUAL_DRIVE_STATE_AUTH_ERROR",
233            Self::Unreachable => "VIRTUAL_DRIVE_STATE_UNREACHABLE",
234            Self::InvalidConfiguration => "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION",
235        }
236    }
237    /// Creates an enum from field names used in the ProtoBuf definition.
238    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
239        match value {
240            "VIRTUAL_DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
241            "VIRTUAL_DRIVE_STATE_ACTIVE" => Some(Self::Active),
242            "VIRTUAL_DRIVE_STATE_AUTH_ERROR" => Some(Self::AuthError),
243            "VIRTUAL_DRIVE_STATE_UNREACHABLE" => Some(Self::Unreachable),
244            "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION" => {
245                Some(Self::InvalidConfiguration)
246            }
247            _ => None,
248        }
249    }
250}
251#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
252#[repr(i32)]
253pub enum FileState {
254    Unspecified = 0,
255    Active = 1,
256    Removed = 2,
257}
258impl FileState {
259    /// String value of the enum field names used in the ProtoBuf definition.
260    ///
261    /// The values are not transformed in any way and thus are considered stable
262    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
263    pub fn as_str_name(&self) -> &'static str {
264        match self {
265            Self::Unspecified => "FILE_STATE_UNSPECIFIED",
266            Self::Active => "FILE_STATE_ACTIVE",
267            Self::Removed => "FILE_STATE_REMOVED",
268        }
269    }
270    /// Creates an enum from field names used in the ProtoBuf definition.
271    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
272        match value {
273            "FILE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
274            "FILE_STATE_ACTIVE" => Some(Self::Active),
275            "FILE_STATE_REMOVED" => Some(Self::Removed),
276            _ => None,
277        }
278    }
279}
280#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
281#[repr(i32)]
282pub enum FileStoreError {
283    Unspecified = 0,
284    DriveNotFound = 1,
285    FileNotFound = 2,
286    FileRevisionNotFound = 3,
287    PathAlreadyExists = 4,
288    InvalidLogicalPath = 5,
289    PermissionDenied = 6,
290    RevisionPreconditionFailed = 7,
291    VirtualDriveNotFound = 8,
292    InvalidVirtualDriveConfiguration = 9,
293    ReadOnlyDrive = 10,
294    FileHistoryNotAvailable = 11,
295    UpstreamUnavailable = 12,
296}
297impl FileStoreError {
298    /// String value of the enum field names used in the ProtoBuf definition.
299    ///
300    /// The values are not transformed in any way and thus are considered stable
301    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
302    pub fn as_str_name(&self) -> &'static str {
303        match self {
304            Self::Unspecified => "FILE_STORE_ERROR_UNSPECIFIED",
305            Self::DriveNotFound => "FILE_STORE_ERROR_DRIVE_NOT_FOUND",
306            Self::FileNotFound => "FILE_STORE_ERROR_FILE_NOT_FOUND",
307            Self::FileRevisionNotFound => "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND",
308            Self::PathAlreadyExists => "FILE_STORE_ERROR_PATH_ALREADY_EXISTS",
309            Self::InvalidLogicalPath => "FILE_STORE_ERROR_INVALID_LOGICAL_PATH",
310            Self::PermissionDenied => "FILE_STORE_ERROR_PERMISSION_DENIED",
311            Self::RevisionPreconditionFailed => {
312                "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED"
313            }
314            Self::VirtualDriveNotFound => "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND",
315            Self::InvalidVirtualDriveConfiguration => {
316                "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION"
317            }
318            Self::ReadOnlyDrive => "FILE_STORE_ERROR_READ_ONLY_DRIVE",
319            Self::FileHistoryNotAvailable => {
320                "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE"
321            }
322            Self::UpstreamUnavailable => "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE",
323        }
324    }
325    /// Creates an enum from field names used in the ProtoBuf definition.
326    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
327        match value {
328            "FILE_STORE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
329            "FILE_STORE_ERROR_DRIVE_NOT_FOUND" => Some(Self::DriveNotFound),
330            "FILE_STORE_ERROR_FILE_NOT_FOUND" => Some(Self::FileNotFound),
331            "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND" => {
332                Some(Self::FileRevisionNotFound)
333            }
334            "FILE_STORE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
335            "FILE_STORE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
336            "FILE_STORE_ERROR_PERMISSION_DENIED" => Some(Self::PermissionDenied),
337            "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED" => {
338                Some(Self::RevisionPreconditionFailed)
339            }
340            "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND" => {
341                Some(Self::VirtualDriveNotFound)
342            }
343            "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION" => {
344                Some(Self::InvalidVirtualDriveConfiguration)
345            }
346            "FILE_STORE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
347            "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE" => {
348                Some(Self::FileHistoryNotAvailable)
349            }
350            "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE" => Some(Self::UpstreamUnavailable),
351            _ => None,
352        }
353    }
354}
355#[derive(Clone, PartialEq, ::prost::Message)]
356pub struct CreateDriveRequest {
357    #[prost(string, tag = "1")]
358    pub workspace_rid: ::prost::alloc::string::String,
359    #[prost(string, tag = "2")]
360    pub name: ::prost::alloc::string::String,
361}
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct CreateDriveResponse {
364    #[prost(message, optional, tag = "1")]
365    pub drive: ::core::option::Option<Drive>,
366}
367#[derive(Clone, PartialEq, ::prost::Message)]
368pub struct CreateVirtualDriveRequest {
369    #[prost(string, tag = "1")]
370    pub workspace_rid: ::prost::alloc::string::String,
371    #[prost(string, tag = "2")]
372    pub name: ::prost::alloc::string::String,
373    #[prost(message, optional, tag = "3")]
374    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
375}
376#[derive(Clone, PartialEq, ::prost::Message)]
377pub struct CreateVirtualDriveResponse {
378    #[prost(message, optional, tag = "1")]
379    pub drive: ::core::option::Option<Drive>,
380    #[prost(message, optional, tag = "2")]
381    pub virtual_drive: ::core::option::Option<VirtualDrive>,
382}
383#[derive(Clone, PartialEq, ::prost::Message)]
384pub struct GetDriveRequest {
385    #[prost(string, tag = "1")]
386    pub drive_rid: ::prost::alloc::string::String,
387}
388#[derive(Clone, PartialEq, ::prost::Message)]
389pub struct GetDriveResponse {
390    #[prost(message, optional, tag = "1")]
391    pub drive: ::core::option::Option<Drive>,
392}
393#[derive(Clone, PartialEq, ::prost::Message)]
394pub struct GetVirtualDriveRequest {
395    #[prost(string, tag = "1")]
396    pub drive_rid: ::prost::alloc::string::String,
397}
398#[derive(Clone, PartialEq, ::prost::Message)]
399pub struct GetVirtualDriveResponse {
400    #[prost(message, optional, tag = "1")]
401    pub drive: ::core::option::Option<Drive>,
402    #[prost(message, optional, tag = "2")]
403    pub virtual_drive: ::core::option::Option<VirtualDrive>,
404}
405#[derive(Clone, PartialEq, ::prost::Message)]
406pub struct GetDriveByNameRequest {
407    #[prost(string, tag = "1")]
408    pub workspace_rid: ::prost::alloc::string::String,
409    #[prost(string, tag = "2")]
410    pub name: ::prost::alloc::string::String,
411}
412#[derive(Clone, PartialEq, ::prost::Message)]
413pub struct GetDriveByNameResponse {
414    #[prost(message, optional, tag = "1")]
415    pub drive: ::core::option::Option<Drive>,
416}
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct GetVirtualDriveByNameRequest {
419    #[prost(string, tag = "1")]
420    pub workspace_rid: ::prost::alloc::string::String,
421    #[prost(string, tag = "2")]
422    pub name: ::prost::alloc::string::String,
423}
424#[derive(Clone, PartialEq, ::prost::Message)]
425pub struct GetVirtualDriveByNameResponse {
426    #[prost(message, optional, tag = "1")]
427    pub drive: ::core::option::Option<Drive>,
428    #[prost(message, optional, tag = "2")]
429    pub virtual_drive: ::core::option::Option<VirtualDrive>,
430}
431#[derive(Clone, PartialEq, ::prost::Message)]
432pub struct ListDrivesRequest {
433    #[prost(string, tag = "1")]
434    pub workspace_rid: ::prost::alloc::string::String,
435    #[prost(bool, tag = "2")]
436    pub include_archived: bool,
437    #[prost(int32, optional, tag = "3")]
438    pub page_size: ::core::option::Option<i32>,
439    #[prost(string, optional, tag = "4")]
440    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
441}
442#[derive(Clone, PartialEq, ::prost::Message)]
443pub struct ListDrivesResponse {
444    #[prost(message, repeated, tag = "1")]
445    pub drives: ::prost::alloc::vec::Vec<Drive>,
446    #[prost(string, optional, tag = "2")]
447    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
448}
449#[derive(Clone, PartialEq, ::prost::Message)]
450pub struct UpdateVirtualDriveRequest {
451    #[prost(string, tag = "1")]
452    pub drive_rid: ::prost::alloc::string::String,
453    #[prost(message, optional, tag = "2")]
454    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
455}
456#[derive(Clone, PartialEq, ::prost::Message)]
457pub struct UpdateVirtualDriveResponse {
458    #[prost(message, optional, tag = "1")]
459    pub drive: ::core::option::Option<Drive>,
460    #[prost(message, optional, tag = "2")]
461    pub virtual_drive: ::core::option::Option<VirtualDrive>,
462}
463#[derive(Clone, PartialEq, ::prost::Message)]
464pub struct RenameDriveRequest {
465    #[prost(string, tag = "1")]
466    pub drive_rid: ::prost::alloc::string::String,
467    #[prost(string, tag = "2")]
468    pub name: ::prost::alloc::string::String,
469}
470#[derive(Clone, PartialEq, ::prost::Message)]
471pub struct RenameDriveResponse {
472    #[prost(message, optional, tag = "1")]
473    pub drive: ::core::option::Option<Drive>,
474}
475#[derive(Clone, PartialEq, ::prost::Message)]
476pub struct ArchiveDriveRequest {
477    #[prost(string, tag = "1")]
478    pub drive_rid: ::prost::alloc::string::String,
479}
480#[derive(Clone, PartialEq, ::prost::Message)]
481pub struct ArchiveDriveResponse {
482    #[prost(message, optional, tag = "1")]
483    pub drive: ::core::option::Option<Drive>,
484}
485#[derive(Clone, PartialEq, ::prost::Message)]
486pub struct UnarchiveDriveRequest {
487    #[prost(string, tag = "1")]
488    pub drive_rid: ::prost::alloc::string::String,
489}
490#[derive(Clone, PartialEq, ::prost::Message)]
491pub struct UnarchiveDriveResponse {
492    #[prost(message, optional, tag = "1")]
493    pub drive: ::core::option::Option<Drive>,
494}
495/// Generated client implementations.
496pub mod internal_drives_service_client {
497    #![allow(
498        unused_variables,
499        dead_code,
500        missing_docs,
501        clippy::wildcard_imports,
502        clippy::let_unit_value,
503    )]
504    use tonic::codegen::*;
505    use tonic::codegen::http::Uri;
506    #[derive(Debug, Clone)]
507    pub struct InternalDrivesServiceClient<T> {
508        inner: tonic::client::Grpc<T>,
509    }
510    impl InternalDrivesServiceClient<tonic::transport::Channel> {
511        /// Attempt to create a new client by connecting to a given endpoint.
512        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
513        where
514            D: TryInto<tonic::transport::Endpoint>,
515            D::Error: Into<StdError>,
516        {
517            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
518            Ok(Self::new(conn))
519        }
520    }
521    impl<T> InternalDrivesServiceClient<T>
522    where
523        T: tonic::client::GrpcService<tonic::body::Body>,
524        T::Error: Into<StdError>,
525        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
526        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
527    {
528        pub fn new(inner: T) -> Self {
529            let inner = tonic::client::Grpc::new(inner);
530            Self { inner }
531        }
532        pub fn with_origin(inner: T, origin: Uri) -> Self {
533            let inner = tonic::client::Grpc::with_origin(inner, origin);
534            Self { inner }
535        }
536        pub fn with_interceptor<F>(
537            inner: T,
538            interceptor: F,
539        ) -> InternalDrivesServiceClient<InterceptedService<T, F>>
540        where
541            F: tonic::service::Interceptor,
542            T::ResponseBody: Default,
543            T: tonic::codegen::Service<
544                http::Request<tonic::body::Body>,
545                Response = http::Response<
546                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
547                >,
548            >,
549            <T as tonic::codegen::Service<
550                http::Request<tonic::body::Body>,
551            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
552        {
553            InternalDrivesServiceClient::new(InterceptedService::new(inner, interceptor))
554        }
555        /// Compress requests with the given encoding.
556        ///
557        /// This requires the server to support it otherwise it might respond with an
558        /// error.
559        #[must_use]
560        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
561            self.inner = self.inner.send_compressed(encoding);
562            self
563        }
564        /// Enable decompressing responses.
565        #[must_use]
566        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
567            self.inner = self.inner.accept_compressed(encoding);
568            self
569        }
570        /// Limits the maximum size of a decoded message.
571        ///
572        /// Default: `4MB`
573        #[must_use]
574        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
575            self.inner = self.inner.max_decoding_message_size(limit);
576            self
577        }
578        /// Limits the maximum size of an encoded message.
579        ///
580        /// Default: `usize::MAX`
581        #[must_use]
582        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
583            self.inner = self.inner.max_encoding_message_size(limit);
584            self
585        }
586        pub async fn create_drive(
587            &mut self,
588            request: impl tonic::IntoRequest<super::CreateDriveRequest>,
589        ) -> std::result::Result<
590            tonic::Response<super::CreateDriveResponse>,
591            tonic::Status,
592        > {
593            self.inner
594                .ready()
595                .await
596                .map_err(|e| {
597                    tonic::Status::unknown(
598                        format!("Service was not ready: {}", e.into()),
599                    )
600                })?;
601            let codec = tonic::codec::ProstCodec::default();
602            let path = http::uri::PathAndQuery::from_static(
603                "/nominal.file_store.v1.InternalDrivesService/CreateDrive",
604            );
605            let mut req = request.into_request();
606            req.extensions_mut()
607                .insert(
608                    GrpcMethod::new(
609                        "nominal.file_store.v1.InternalDrivesService",
610                        "CreateDrive",
611                    ),
612                );
613            self.inner.unary(req, path, codec).await
614        }
615        pub async fn create_virtual_drive(
616            &mut self,
617            request: impl tonic::IntoRequest<super::CreateVirtualDriveRequest>,
618        ) -> std::result::Result<
619            tonic::Response<super::CreateVirtualDriveResponse>,
620            tonic::Status,
621        > {
622            self.inner
623                .ready()
624                .await
625                .map_err(|e| {
626                    tonic::Status::unknown(
627                        format!("Service was not ready: {}", e.into()),
628                    )
629                })?;
630            let codec = tonic::codec::ProstCodec::default();
631            let path = http::uri::PathAndQuery::from_static(
632                "/nominal.file_store.v1.InternalDrivesService/CreateVirtualDrive",
633            );
634            let mut req = request.into_request();
635            req.extensions_mut()
636                .insert(
637                    GrpcMethod::new(
638                        "nominal.file_store.v1.InternalDrivesService",
639                        "CreateVirtualDrive",
640                    ),
641                );
642            self.inner.unary(req, path, codec).await
643        }
644        pub async fn get_drive(
645            &mut self,
646            request: impl tonic::IntoRequest<super::GetDriveRequest>,
647        ) -> std::result::Result<
648            tonic::Response<super::GetDriveResponse>,
649            tonic::Status,
650        > {
651            self.inner
652                .ready()
653                .await
654                .map_err(|e| {
655                    tonic::Status::unknown(
656                        format!("Service was not ready: {}", e.into()),
657                    )
658                })?;
659            let codec = tonic::codec::ProstCodec::default();
660            let path = http::uri::PathAndQuery::from_static(
661                "/nominal.file_store.v1.InternalDrivesService/GetDrive",
662            );
663            let mut req = request.into_request();
664            req.extensions_mut()
665                .insert(
666                    GrpcMethod::new(
667                        "nominal.file_store.v1.InternalDrivesService",
668                        "GetDrive",
669                    ),
670                );
671            self.inner.unary(req, path, codec).await
672        }
673        pub async fn get_virtual_drive(
674            &mut self,
675            request: impl tonic::IntoRequest<super::GetVirtualDriveRequest>,
676        ) -> std::result::Result<
677            tonic::Response<super::GetVirtualDriveResponse>,
678            tonic::Status,
679        > {
680            self.inner
681                .ready()
682                .await
683                .map_err(|e| {
684                    tonic::Status::unknown(
685                        format!("Service was not ready: {}", e.into()),
686                    )
687                })?;
688            let codec = tonic::codec::ProstCodec::default();
689            let path = http::uri::PathAndQuery::from_static(
690                "/nominal.file_store.v1.InternalDrivesService/GetVirtualDrive",
691            );
692            let mut req = request.into_request();
693            req.extensions_mut()
694                .insert(
695                    GrpcMethod::new(
696                        "nominal.file_store.v1.InternalDrivesService",
697                        "GetVirtualDrive",
698                    ),
699                );
700            self.inner.unary(req, path, codec).await
701        }
702        pub async fn get_drive_by_name(
703            &mut self,
704            request: impl tonic::IntoRequest<super::GetDriveByNameRequest>,
705        ) -> std::result::Result<
706            tonic::Response<super::GetDriveByNameResponse>,
707            tonic::Status,
708        > {
709            self.inner
710                .ready()
711                .await
712                .map_err(|e| {
713                    tonic::Status::unknown(
714                        format!("Service was not ready: {}", e.into()),
715                    )
716                })?;
717            let codec = tonic::codec::ProstCodec::default();
718            let path = http::uri::PathAndQuery::from_static(
719                "/nominal.file_store.v1.InternalDrivesService/GetDriveByName",
720            );
721            let mut req = request.into_request();
722            req.extensions_mut()
723                .insert(
724                    GrpcMethod::new(
725                        "nominal.file_store.v1.InternalDrivesService",
726                        "GetDriveByName",
727                    ),
728                );
729            self.inner.unary(req, path, codec).await
730        }
731        pub async fn get_virtual_drive_by_name(
732            &mut self,
733            request: impl tonic::IntoRequest<super::GetVirtualDriveByNameRequest>,
734        ) -> std::result::Result<
735            tonic::Response<super::GetVirtualDriveByNameResponse>,
736            tonic::Status,
737        > {
738            self.inner
739                .ready()
740                .await
741                .map_err(|e| {
742                    tonic::Status::unknown(
743                        format!("Service was not ready: {}", e.into()),
744                    )
745                })?;
746            let codec = tonic::codec::ProstCodec::default();
747            let path = http::uri::PathAndQuery::from_static(
748                "/nominal.file_store.v1.InternalDrivesService/GetVirtualDriveByName",
749            );
750            let mut req = request.into_request();
751            req.extensions_mut()
752                .insert(
753                    GrpcMethod::new(
754                        "nominal.file_store.v1.InternalDrivesService",
755                        "GetVirtualDriveByName",
756                    ),
757                );
758            self.inner.unary(req, path, codec).await
759        }
760        pub async fn list_drives(
761            &mut self,
762            request: impl tonic::IntoRequest<super::ListDrivesRequest>,
763        ) -> std::result::Result<
764            tonic::Response<super::ListDrivesResponse>,
765            tonic::Status,
766        > {
767            self.inner
768                .ready()
769                .await
770                .map_err(|e| {
771                    tonic::Status::unknown(
772                        format!("Service was not ready: {}", e.into()),
773                    )
774                })?;
775            let codec = tonic::codec::ProstCodec::default();
776            let path = http::uri::PathAndQuery::from_static(
777                "/nominal.file_store.v1.InternalDrivesService/ListDrives",
778            );
779            let mut req = request.into_request();
780            req.extensions_mut()
781                .insert(
782                    GrpcMethod::new(
783                        "nominal.file_store.v1.InternalDrivesService",
784                        "ListDrives",
785                    ),
786                );
787            self.inner.unary(req, path, codec).await
788        }
789        pub async fn update_virtual_drive(
790            &mut self,
791            request: impl tonic::IntoRequest<super::UpdateVirtualDriveRequest>,
792        ) -> std::result::Result<
793            tonic::Response<super::UpdateVirtualDriveResponse>,
794            tonic::Status,
795        > {
796            self.inner
797                .ready()
798                .await
799                .map_err(|e| {
800                    tonic::Status::unknown(
801                        format!("Service was not ready: {}", e.into()),
802                    )
803                })?;
804            let codec = tonic::codec::ProstCodec::default();
805            let path = http::uri::PathAndQuery::from_static(
806                "/nominal.file_store.v1.InternalDrivesService/UpdateVirtualDrive",
807            );
808            let mut req = request.into_request();
809            req.extensions_mut()
810                .insert(
811                    GrpcMethod::new(
812                        "nominal.file_store.v1.InternalDrivesService",
813                        "UpdateVirtualDrive",
814                    ),
815                );
816            self.inner.unary(req, path, codec).await
817        }
818        pub async fn rename_drive(
819            &mut self,
820            request: impl tonic::IntoRequest<super::RenameDriveRequest>,
821        ) -> std::result::Result<
822            tonic::Response<super::RenameDriveResponse>,
823            tonic::Status,
824        > {
825            self.inner
826                .ready()
827                .await
828                .map_err(|e| {
829                    tonic::Status::unknown(
830                        format!("Service was not ready: {}", e.into()),
831                    )
832                })?;
833            let codec = tonic::codec::ProstCodec::default();
834            let path = http::uri::PathAndQuery::from_static(
835                "/nominal.file_store.v1.InternalDrivesService/RenameDrive",
836            );
837            let mut req = request.into_request();
838            req.extensions_mut()
839                .insert(
840                    GrpcMethod::new(
841                        "nominal.file_store.v1.InternalDrivesService",
842                        "RenameDrive",
843                    ),
844                );
845            self.inner.unary(req, path, codec).await
846        }
847        pub async fn archive_drive(
848            &mut self,
849            request: impl tonic::IntoRequest<super::ArchiveDriveRequest>,
850        ) -> std::result::Result<
851            tonic::Response<super::ArchiveDriveResponse>,
852            tonic::Status,
853        > {
854            self.inner
855                .ready()
856                .await
857                .map_err(|e| {
858                    tonic::Status::unknown(
859                        format!("Service was not ready: {}", e.into()),
860                    )
861                })?;
862            let codec = tonic::codec::ProstCodec::default();
863            let path = http::uri::PathAndQuery::from_static(
864                "/nominal.file_store.v1.InternalDrivesService/ArchiveDrive",
865            );
866            let mut req = request.into_request();
867            req.extensions_mut()
868                .insert(
869                    GrpcMethod::new(
870                        "nominal.file_store.v1.InternalDrivesService",
871                        "ArchiveDrive",
872                    ),
873                );
874            self.inner.unary(req, path, codec).await
875        }
876        pub async fn unarchive_drive(
877            &mut self,
878            request: impl tonic::IntoRequest<super::UnarchiveDriveRequest>,
879        ) -> std::result::Result<
880            tonic::Response<super::UnarchiveDriveResponse>,
881            tonic::Status,
882        > {
883            self.inner
884                .ready()
885                .await
886                .map_err(|e| {
887                    tonic::Status::unknown(
888                        format!("Service was not ready: {}", e.into()),
889                    )
890                })?;
891            let codec = tonic::codec::ProstCodec::default();
892            let path = http::uri::PathAndQuery::from_static(
893                "/nominal.file_store.v1.InternalDrivesService/UnarchiveDrive",
894            );
895            let mut req = request.into_request();
896            req.extensions_mut()
897                .insert(
898                    GrpcMethod::new(
899                        "nominal.file_store.v1.InternalDrivesService",
900                        "UnarchiveDrive",
901                    ),
902                );
903            self.inner.unary(req, path, codec).await
904        }
905    }
906}
907#[derive(Clone, PartialEq, ::prost::Message)]
908pub struct UploadedObjectRef {
909    #[prost(string, tag = "1")]
910    pub s3_path: ::prost::alloc::string::String,
911}
912#[derive(Clone, PartialEq, ::prost::Message)]
913pub struct PutFile {
914    #[prost(message, optional, tag = "1")]
915    pub path: ::core::option::Option<LogicalPath>,
916    #[prost(message, optional, tag = "2")]
917    pub object: ::core::option::Option<UploadedObjectRef>,
918    #[prost(uint64, tag = "3")]
919    pub size_bytes: u64,
920    #[prost(enumeration = "FileConflictPolicy", tag = "4")]
921    pub conflict_policy: i32,
922    #[prost(string, tag = "5")]
923    pub expected_revision_rid: ::prost::alloc::string::String,
924}
925#[derive(Clone, PartialEq, ::prost::Message)]
926pub struct MoveFile {
927    #[prost(message, optional, tag = "1")]
928    pub source_path: ::core::option::Option<LogicalPath>,
929    #[prost(message, optional, tag = "2")]
930    pub destination_path: ::core::option::Option<LogicalPath>,
931    #[prost(enumeration = "FileConflictPolicy", tag = "3")]
932    pub conflict_policy: i32,
933    #[prost(string, tag = "4")]
934    pub expected_source_revision_rid: ::prost::alloc::string::String,
935    #[prost(string, tag = "5")]
936    pub expected_destination_revision_rid: ::prost::alloc::string::String,
937}
938#[derive(Clone, PartialEq, ::prost::Message)]
939pub struct RemoveFile {
940    #[prost(message, optional, tag = "1")]
941    pub path: ::core::option::Option<LogicalPath>,
942    #[prost(string, tag = "2")]
943    pub expected_revision_rid: ::prost::alloc::string::String,
944}
945#[derive(Clone, PartialEq, ::prost::Message)]
946pub struct RestoreFile {
947    #[prost(string, tag = "1")]
948    pub file_revision_rid: ::prost::alloc::string::String,
949    #[prost(message, optional, tag = "2")]
950    pub destination_path: ::core::option::Option<LogicalPath>,
951    #[prost(enumeration = "FileConflictPolicy", tag = "3")]
952    pub conflict_policy: i32,
953    #[prost(string, tag = "4")]
954    pub expected_destination_revision_rid: ::prost::alloc::string::String,
955}
956#[derive(Clone, PartialEq, ::prost::Message)]
957pub struct FileChange {
958    #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4")]
959    pub change: ::core::option::Option<file_change::Change>,
960}
961/// Nested message and enum types in `FileChange`.
962pub mod file_change {
963    #[derive(Clone, PartialEq, ::prost::Oneof)]
964    pub enum Change {
965        #[prost(message, tag = "1")]
966        Put(super::PutFile),
967        #[prost(message, tag = "2")]
968        Move(super::MoveFile),
969        #[prost(message, tag = "3")]
970        Remove(super::RemoveFile),
971        #[prost(message, tag = "4")]
972        Restore(super::RestoreFile),
973    }
974}
975#[derive(Clone, PartialEq, ::prost::Message)]
976pub struct GetFileRequest {
977    #[prost(string, tag = "1")]
978    pub drive_rid: ::prost::alloc::string::String,
979    #[prost(message, optional, tag = "2")]
980    pub path: ::core::option::Option<LogicalPath>,
981    #[prost(bool, tag = "3")]
982    pub include_removed: bool,
983}
984#[derive(Clone, PartialEq, ::prost::Message)]
985pub struct GetFileResponse {
986    #[prost(message, optional, tag = "1")]
987    pub file: ::core::option::Option<File>,
988}
989#[derive(Clone, PartialEq, ::prost::Message)]
990pub struct ListFilesRequest {
991    #[prost(string, tag = "1")]
992    pub drive_rid: ::prost::alloc::string::String,
993    #[prost(message, optional, tag = "2")]
994    pub path_prefix: ::core::option::Option<LogicalPath>,
995    #[prost(bool, tag = "3")]
996    pub recursive: bool,
997    #[prost(bool, tag = "4")]
998    pub include_removed: bool,
999    #[prost(int32, optional, tag = "5")]
1000    pub page_size: ::core::option::Option<i32>,
1001    #[prost(string, optional, tag = "6")]
1002    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1003}
1004#[derive(Clone, PartialEq, ::prost::Message)]
1005pub struct ListFilesResponse {
1006    #[prost(message, repeated, tag = "1")]
1007    pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1008    #[prost(string, optional, tag = "2")]
1009    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1010}
1011#[derive(Clone, PartialEq, ::prost::Message)]
1012pub struct ApplyFileChangesRequest {
1013    #[prost(string, tag = "1")]
1014    pub drive_rid: ::prost::alloc::string::String,
1015    #[prost(message, repeated, tag = "2")]
1016    pub changes: ::prost::alloc::vec::Vec<FileChange>,
1017}
1018#[derive(Clone, PartialEq, ::prost::Message)]
1019pub struct ApplyFileChangesResponse {
1020    #[prost(message, repeated, tag = "1")]
1021    pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1022}
1023#[derive(Clone, PartialEq, ::prost::Message)]
1024pub struct FileChangeSuccess {
1025    #[prost(message, optional, tag = "1")]
1026    pub file: ::core::option::Option<File>,
1027    #[prost(message, optional, tag = "2")]
1028    pub file_revision: ::core::option::Option<FileRevision>,
1029}
1030#[derive(Clone, PartialEq, ::prost::Message)]
1031pub struct FileChangeFailure {
1032    #[prost(enumeration = "FileStoreError", tag = "1")]
1033    pub code: i32,
1034    #[prost(string, tag = "2")]
1035    pub message: ::prost::alloc::string::String,
1036}
1037#[derive(Clone, PartialEq, ::prost::Message)]
1038pub struct FileChangeResult {
1039    #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1040    pub result: ::core::option::Option<file_change_result::Result>,
1041}
1042/// Nested message and enum types in `FileChangeResult`.
1043pub mod file_change_result {
1044    #[derive(Clone, PartialEq, ::prost::Oneof)]
1045    pub enum Result {
1046        #[prost(message, tag = "1")]
1047        Success(super::FileChangeSuccess),
1048        #[prost(message, tag = "2")]
1049        Failure(super::FileChangeFailure),
1050    }
1051}
1052#[derive(Clone, PartialEq, ::prost::Message)]
1053pub struct ListFileRevisionsRequest {
1054    #[prost(string, tag = "1")]
1055    pub drive_rid: ::prost::alloc::string::String,
1056    #[prost(string, tag = "2")]
1057    pub file_rid: ::prost::alloc::string::String,
1058    #[prost(int32, optional, tag = "3")]
1059    pub page_size: ::core::option::Option<i32>,
1060    #[prost(string, optional, tag = "4")]
1061    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1062}
1063#[derive(Clone, PartialEq, ::prost::Message)]
1064pub struct ListFileRevisionsResponse {
1065    #[prost(message, repeated, tag = "1")]
1066    pub file_revisions: ::prost::alloc::vec::Vec<FileRevision>,
1067    #[prost(string, optional, tag = "2")]
1068    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1069}
1070#[derive(Clone, PartialEq, ::prost::Message)]
1071pub struct PurgeFileRequest {
1072    #[prost(string, tag = "1")]
1073    pub file_revision_rid: ::prost::alloc::string::String,
1074}
1075#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1076pub struct PurgeFileResponse {}
1077#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1078#[repr(i32)]
1079pub enum FileConflictPolicy {
1080    Unspecified = 0,
1081    FailIfExists = 1,
1082    ReplaceIfExists = 2,
1083}
1084impl FileConflictPolicy {
1085    /// String value of the enum field names used in the ProtoBuf definition.
1086    ///
1087    /// The values are not transformed in any way and thus are considered stable
1088    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1089    pub fn as_str_name(&self) -> &'static str {
1090        match self {
1091            Self::Unspecified => "FILE_CONFLICT_POLICY_UNSPECIFIED",
1092            Self::FailIfExists => "FILE_CONFLICT_POLICY_FAIL_IF_EXISTS",
1093            Self::ReplaceIfExists => "FILE_CONFLICT_POLICY_REPLACE_IF_EXISTS",
1094        }
1095    }
1096    /// Creates an enum from field names used in the ProtoBuf definition.
1097    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1098        match value {
1099            "FILE_CONFLICT_POLICY_UNSPECIFIED" => Some(Self::Unspecified),
1100            "FILE_CONFLICT_POLICY_FAIL_IF_EXISTS" => Some(Self::FailIfExists),
1101            "FILE_CONFLICT_POLICY_REPLACE_IF_EXISTS" => Some(Self::ReplaceIfExists),
1102            _ => None,
1103        }
1104    }
1105}
1106/// Generated client implementations.
1107pub mod internal_files_service_client {
1108    #![allow(
1109        unused_variables,
1110        dead_code,
1111        missing_docs,
1112        clippy::wildcard_imports,
1113        clippy::let_unit_value,
1114    )]
1115    use tonic::codegen::*;
1116    use tonic::codegen::http::Uri;
1117    #[derive(Debug, Clone)]
1118    pub struct InternalFilesServiceClient<T> {
1119        inner: tonic::client::Grpc<T>,
1120    }
1121    impl InternalFilesServiceClient<tonic::transport::Channel> {
1122        /// Attempt to create a new client by connecting to a given endpoint.
1123        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1124        where
1125            D: TryInto<tonic::transport::Endpoint>,
1126            D::Error: Into<StdError>,
1127        {
1128            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1129            Ok(Self::new(conn))
1130        }
1131    }
1132    impl<T> InternalFilesServiceClient<T>
1133    where
1134        T: tonic::client::GrpcService<tonic::body::Body>,
1135        T::Error: Into<StdError>,
1136        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1137        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1138    {
1139        pub fn new(inner: T) -> Self {
1140            let inner = tonic::client::Grpc::new(inner);
1141            Self { inner }
1142        }
1143        pub fn with_origin(inner: T, origin: Uri) -> Self {
1144            let inner = tonic::client::Grpc::with_origin(inner, origin);
1145            Self { inner }
1146        }
1147        pub fn with_interceptor<F>(
1148            inner: T,
1149            interceptor: F,
1150        ) -> InternalFilesServiceClient<InterceptedService<T, F>>
1151        where
1152            F: tonic::service::Interceptor,
1153            T::ResponseBody: Default,
1154            T: tonic::codegen::Service<
1155                http::Request<tonic::body::Body>,
1156                Response = http::Response<
1157                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1158                >,
1159            >,
1160            <T as tonic::codegen::Service<
1161                http::Request<tonic::body::Body>,
1162            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1163        {
1164            InternalFilesServiceClient::new(InterceptedService::new(inner, interceptor))
1165        }
1166        /// Compress requests with the given encoding.
1167        ///
1168        /// This requires the server to support it otherwise it might respond with an
1169        /// error.
1170        #[must_use]
1171        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1172            self.inner = self.inner.send_compressed(encoding);
1173            self
1174        }
1175        /// Enable decompressing responses.
1176        #[must_use]
1177        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1178            self.inner = self.inner.accept_compressed(encoding);
1179            self
1180        }
1181        /// Limits the maximum size of a decoded message.
1182        ///
1183        /// Default: `4MB`
1184        #[must_use]
1185        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1186            self.inner = self.inner.max_decoding_message_size(limit);
1187            self
1188        }
1189        /// Limits the maximum size of an encoded message.
1190        ///
1191        /// Default: `usize::MAX`
1192        #[must_use]
1193        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1194            self.inner = self.inner.max_encoding_message_size(limit);
1195            self
1196        }
1197        pub async fn get_file(
1198            &mut self,
1199            request: impl tonic::IntoRequest<super::GetFileRequest>,
1200        ) -> std::result::Result<
1201            tonic::Response<super::GetFileResponse>,
1202            tonic::Status,
1203        > {
1204            self.inner
1205                .ready()
1206                .await
1207                .map_err(|e| {
1208                    tonic::Status::unknown(
1209                        format!("Service was not ready: {}", e.into()),
1210                    )
1211                })?;
1212            let codec = tonic::codec::ProstCodec::default();
1213            let path = http::uri::PathAndQuery::from_static(
1214                "/nominal.file_store.v1.InternalFilesService/GetFile",
1215            );
1216            let mut req = request.into_request();
1217            req.extensions_mut()
1218                .insert(
1219                    GrpcMethod::new(
1220                        "nominal.file_store.v1.InternalFilesService",
1221                        "GetFile",
1222                    ),
1223                );
1224            self.inner.unary(req, path, codec).await
1225        }
1226        pub async fn list_files(
1227            &mut self,
1228            request: impl tonic::IntoRequest<super::ListFilesRequest>,
1229        ) -> std::result::Result<
1230            tonic::Response<super::ListFilesResponse>,
1231            tonic::Status,
1232        > {
1233            self.inner
1234                .ready()
1235                .await
1236                .map_err(|e| {
1237                    tonic::Status::unknown(
1238                        format!("Service was not ready: {}", e.into()),
1239                    )
1240                })?;
1241            let codec = tonic::codec::ProstCodec::default();
1242            let path = http::uri::PathAndQuery::from_static(
1243                "/nominal.file_store.v1.InternalFilesService/ListFiles",
1244            );
1245            let mut req = request.into_request();
1246            req.extensions_mut()
1247                .insert(
1248                    GrpcMethod::new(
1249                        "nominal.file_store.v1.InternalFilesService",
1250                        "ListFiles",
1251                    ),
1252                );
1253            self.inner.unary(req, path, codec).await
1254        }
1255        pub async fn apply_file_changes(
1256            &mut self,
1257            request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
1258        ) -> std::result::Result<
1259            tonic::Response<super::ApplyFileChangesResponse>,
1260            tonic::Status,
1261        > {
1262            self.inner
1263                .ready()
1264                .await
1265                .map_err(|e| {
1266                    tonic::Status::unknown(
1267                        format!("Service was not ready: {}", e.into()),
1268                    )
1269                })?;
1270            let codec = tonic::codec::ProstCodec::default();
1271            let path = http::uri::PathAndQuery::from_static(
1272                "/nominal.file_store.v1.InternalFilesService/ApplyFileChanges",
1273            );
1274            let mut req = request.into_request();
1275            req.extensions_mut()
1276                .insert(
1277                    GrpcMethod::new(
1278                        "nominal.file_store.v1.InternalFilesService",
1279                        "ApplyFileChanges",
1280                    ),
1281                );
1282            self.inner.unary(req, path, codec).await
1283        }
1284        pub async fn list_file_revisions(
1285            &mut self,
1286            request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
1287        ) -> std::result::Result<
1288            tonic::Response<super::ListFileRevisionsResponse>,
1289            tonic::Status,
1290        > {
1291            self.inner
1292                .ready()
1293                .await
1294                .map_err(|e| {
1295                    tonic::Status::unknown(
1296                        format!("Service was not ready: {}", e.into()),
1297                    )
1298                })?;
1299            let codec = tonic::codec::ProstCodec::default();
1300            let path = http::uri::PathAndQuery::from_static(
1301                "/nominal.file_store.v1.InternalFilesService/ListFileRevisions",
1302            );
1303            let mut req = request.into_request();
1304            req.extensions_mut()
1305                .insert(
1306                    GrpcMethod::new(
1307                        "nominal.file_store.v1.InternalFilesService",
1308                        "ListFileRevisions",
1309                    ),
1310                );
1311            self.inner.unary(req, path, codec).await
1312        }
1313        pub async fn purge_file(
1314            &mut self,
1315            request: impl tonic::IntoRequest<super::PurgeFileRequest>,
1316        ) -> std::result::Result<
1317            tonic::Response<super::PurgeFileResponse>,
1318            tonic::Status,
1319        > {
1320            self.inner
1321                .ready()
1322                .await
1323                .map_err(|e| {
1324                    tonic::Status::unknown(
1325                        format!("Service was not ready: {}", e.into()),
1326                    )
1327                })?;
1328            let codec = tonic::codec::ProstCodec::default();
1329            let path = http::uri::PathAndQuery::from_static(
1330                "/nominal.file_store.v1.InternalFilesService/PurgeFile",
1331            );
1332            let mut req = request.into_request();
1333            req.extensions_mut()
1334                .insert(
1335                    GrpcMethod::new(
1336                        "nominal.file_store.v1.InternalFilesService",
1337                        "PurgeFile",
1338                    ),
1339                );
1340            self.inner.unary(req, path, codec).await
1341        }
1342    }
1343}