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