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