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