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 = "DriveSource", tag = "6")]
22    pub source: i32,
23    #[prost(enumeration = "DriveMutability", tag = "7")]
24    pub content_mutability: i32,
25}
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct VirtualDrive {
28    #[prost(string, tag = "1")]
29    pub drive_rid: ::prost::alloc::string::String,
30    #[prost(message, optional, tag = "2")]
31    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
32    #[prost(message, optional, tag = "3")]
33    pub status: ::core::option::Option<VirtualDriveStatus>,
34}
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct VirtualDriveDetails {
37    #[prost(string, tag = "1")]
38    pub drive_rid: ::prost::alloc::string::String,
39    #[prost(message, optional, tag = "2")]
40    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
41}
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct VirtualDriveStatus {
44    #[prost(enumeration = "VirtualDriveState", tag = "1")]
45    pub state: i32,
46    #[prost(message, optional, tag = "2")]
47    pub last_successful_check_time: ::core::option::Option<
48        super::super::super::google::protobuf::Timestamp,
49    >,
50    #[prost(string, tag = "3")]
51    pub message: ::prost::alloc::string::String,
52}
53#[derive(Clone, PartialEq, ::prost::Message)]
54pub struct VirtualDriveConnectionDetails {
55    #[prost(oneof = "virtual_drive_connection_details::Details", tags = "1, 2")]
56    pub details: ::core::option::Option<virtual_drive_connection_details::Details>,
57}
58/// Nested message and enum types in `VirtualDriveConnectionDetails`.
59pub mod virtual_drive_connection_details {
60    #[derive(Clone, PartialEq, ::prost::Oneof)]
61    pub enum Details {
62        #[prost(message, tag = "1")]
63        S3(super::S3VirtualDriveConnectionDetails),
64        #[prost(message, tag = "2")]
65        GoogleDrive(super::GoogleDriveVirtualDriveConnectionDetails),
66    }
67}
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct S3VirtualDriveConnectionDetails {
70    #[prost(string, tag = "1")]
71    pub bucket: ::prost::alloc::string::String,
72    #[prost(string, tag = "2")]
73    pub prefix: ::prost::alloc::string::String,
74    #[prost(string, tag = "3")]
75    pub credentials_secret_rid: ::prost::alloc::string::String,
76    #[prost(string, tag = "4")]
77    pub endpoint: ::prost::alloc::string::String,
78}
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct GoogleDriveVirtualDriveConnectionDetails {
81    #[prost(string, tag = "1")]
82    pub folder_id: ::prost::alloc::string::String,
83    #[prost(string, tag = "2")]
84    pub credentials_secret_rid: ::prost::alloc::string::String,
85}
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct LogicalPath {
88    #[prost(string, tag = "1")]
89    pub path: ::prost::alloc::string::String,
90}
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct LogicalFile {
93    #[prost(message, optional, tag = "1")]
94    pub identity: ::core::option::Option<LogicalFileIdentity>,
95    #[prost(message, optional, tag = "2")]
96    pub path: ::core::option::Option<LogicalPath>,
97    #[prost(enumeration = "FileState", tag = "3")]
98    pub state: i32,
99    #[prost(message, optional, tag = "4")]
100    pub created: ::core::option::Option<Attribution>,
101    #[prost(uint64, tag = "5")]
102    pub size_bytes: u64,
103    #[prost(message, optional, tag = "6")]
104    pub observed: ::core::option::Option<Attribution>,
105    #[prost(message, optional, tag = "7")]
106    pub current_revision: ::core::option::Option<FileRevisionRef>,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct LogicalFileIdentity {
110    #[prost(oneof = "logical_file_identity::Identity", tags = "1, 2")]
111    pub identity: ::core::option::Option<logical_file_identity::Identity>,
112}
113/// Nested message and enum types in `LogicalFileIdentity`.
114pub mod logical_file_identity {
115    #[derive(Clone, PartialEq, ::prost::Oneof)]
116    pub enum Identity {
117        #[prost(message, tag = "1")]
118        Managed(super::ManagedFileIdentity),
119        #[prost(message, tag = "2")]
120        Virtual(super::VirtualFileIdentity),
121    }
122}
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct ManagedFileIdentity {
125    #[prost(string, tag = "1")]
126    pub file_rid: ::prost::alloc::string::String,
127}
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct VirtualFileIdentity {
130    #[prost(oneof = "virtual_file_identity::Kind", tags = "1, 2")]
131    pub kind: ::core::option::Option<virtual_file_identity::Kind>,
132}
133/// Nested message and enum types in `VirtualFileIdentity`.
134pub mod virtual_file_identity {
135    #[derive(Clone, PartialEq, ::prost::Oneof)]
136    pub enum Kind {
137        #[prost(message, tag = "1")]
138        S3(super::S3FileIdentity),
139        #[prost(message, tag = "2")]
140        GoogleDrive(super::GoogleDriveFileIdentity),
141    }
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct S3FileIdentity {
145    #[prost(string, tag = "1")]
146    pub drive_rid: ::prost::alloc::string::String,
147    #[prost(string, tag = "2")]
148    pub path: ::prost::alloc::string::String,
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct GoogleDriveFileIdentity {
152    #[prost(string, tag = "1")]
153    pub drive_rid: ::prost::alloc::string::String,
154    #[prost(string, tag = "2")]
155    pub file_id: ::prost::alloc::string::String,
156}
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct FileRevisionRef {
159    #[prost(oneof = "file_revision_ref::Reference", tags = "1, 2")]
160    pub reference: ::core::option::Option<file_revision_ref::Reference>,
161}
162/// Nested message and enum types in `FileRevisionRef`.
163pub mod file_revision_ref {
164    #[derive(Clone, PartialEq, ::prost::Oneof)]
165    pub enum Reference {
166        #[prost(message, tag = "1")]
167        Managed(super::ManagedFileRevisionRef),
168        #[prost(message, tag = "2")]
169        Virtual(super::VirtualFileRevisionRef),
170    }
171}
172#[derive(Clone, PartialEq, ::prost::Message)]
173pub struct ManagedFileRevisionRef {
174    #[prost(string, tag = "1")]
175    pub file_revision_rid: ::prost::alloc::string::String,
176}
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct VirtualFileRevisionRef {
179    #[prost(oneof = "virtual_file_revision_ref::Kind", tags = "1, 2")]
180    pub kind: ::core::option::Option<virtual_file_revision_ref::Kind>,
181}
182/// Nested message and enum types in `VirtualFileRevisionRef`.
183pub mod virtual_file_revision_ref {
184    #[derive(Clone, PartialEq, ::prost::Oneof)]
185    pub enum Kind {
186        #[prost(message, tag = "1")]
187        S3(super::S3FileRevisionRef),
188        #[prost(message, tag = "2")]
189        GoogleDrive(super::GoogleDriveFileRevisionRef),
190    }
191}
192#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct S3FileRevisionRef {
194    #[prost(string, tag = "1")]
195    pub drive_rid: ::prost::alloc::string::String,
196    #[prost(string, tag = "2")]
197    pub path: ::prost::alloc::string::String,
198    #[prost(string, tag = "3")]
199    pub etag: ::prost::alloc::string::String,
200}
201#[derive(Clone, PartialEq, ::prost::Message)]
202pub struct GoogleDriveFileRevisionRef {
203    #[prost(string, tag = "1")]
204    pub drive_rid: ::prost::alloc::string::String,
205    #[prost(string, tag = "2")]
206    pub file_id: ::prost::alloc::string::String,
207    #[prost(string, tag = "3")]
208    pub version: ::prost::alloc::string::String,
209}
210#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct ManagedFileRevision {
212    #[prost(string, tag = "1")]
213    pub file_revision_rid: ::prost::alloc::string::String,
214    #[prost(string, tag = "2")]
215    pub file_rid: ::prost::alloc::string::String,
216    #[prost(message, optional, tag = "3")]
217    pub path: ::core::option::Option<LogicalPath>,
218    #[prost(uint64, tag = "4")]
219    pub size_bytes: u64,
220    #[prost(message, optional, tag = "5")]
221    pub created: ::core::option::Option<Attribution>,
222    #[prost(enumeration = "FileState", tag = "6")]
223    pub state: i32,
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct VirtualFileRevision {
227    #[prost(string, tag = "1")]
228    pub file_revision_rid: ::prost::alloc::string::String,
229    #[prost(message, optional, tag = "2")]
230    pub file_identity: ::core::option::Option<VirtualFileIdentity>,
231    #[prost(message, optional, tag = "3")]
232    pub path: ::core::option::Option<LogicalPath>,
233    #[prost(uint64, tag = "4")]
234    pub size_bytes: u64,
235    #[prost(message, optional, tag = "5")]
236    pub observed: ::core::option::Option<Attribution>,
237}
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct Directory {
240    #[prost(message, optional, tag = "1")]
241    pub path: ::core::option::Option<LogicalPath>,
242}
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct FileEntry {
245    #[prost(oneof = "file_entry::Entry", tags = "1, 2")]
246    pub entry: ::core::option::Option<file_entry::Entry>,
247}
248/// Nested message and enum types in `FileEntry`.
249pub mod file_entry {
250    #[derive(Clone, PartialEq, ::prost::Oneof)]
251    pub enum Entry {
252        #[prost(message, tag = "1")]
253        File(super::LogicalFile),
254        #[prost(message, tag = "2")]
255        Directory(super::Directory),
256    }
257}
258#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
259#[repr(i32)]
260pub enum DriveState {
261    Unspecified = 0,
262    Active = 1,
263    Archived = 2,
264}
265impl DriveState {
266    /// String value of the enum field names used in the ProtoBuf definition.
267    ///
268    /// The values are not transformed in any way and thus are considered stable
269    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
270    pub fn as_str_name(&self) -> &'static str {
271        match self {
272            Self::Unspecified => "DRIVE_STATE_UNSPECIFIED",
273            Self::Active => "DRIVE_STATE_ACTIVE",
274            Self::Archived => "DRIVE_STATE_ARCHIVED",
275        }
276    }
277    /// Creates an enum from field names used in the ProtoBuf definition.
278    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
279        match value {
280            "DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
281            "DRIVE_STATE_ACTIVE" => Some(Self::Active),
282            "DRIVE_STATE_ARCHIVED" => Some(Self::Archived),
283            _ => None,
284        }
285    }
286}
287#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
288#[repr(i32)]
289pub enum DriveSource {
290    Unspecified = 0,
291    Nominal = 1,
292    S3 = 2,
293    GoogleDrive = 3,
294}
295impl DriveSource {
296    /// String value of the enum field names used in the ProtoBuf definition.
297    ///
298    /// The values are not transformed in any way and thus are considered stable
299    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
300    pub fn as_str_name(&self) -> &'static str {
301        match self {
302            Self::Unspecified => "DRIVE_SOURCE_UNSPECIFIED",
303            Self::Nominal => "DRIVE_SOURCE_NOMINAL",
304            Self::S3 => "DRIVE_SOURCE_S3",
305            Self::GoogleDrive => "DRIVE_SOURCE_GOOGLE_DRIVE",
306        }
307    }
308    /// Creates an enum from field names used in the ProtoBuf definition.
309    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
310        match value {
311            "DRIVE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
312            "DRIVE_SOURCE_NOMINAL" => Some(Self::Nominal),
313            "DRIVE_SOURCE_S3" => Some(Self::S3),
314            "DRIVE_SOURCE_GOOGLE_DRIVE" => Some(Self::GoogleDrive),
315            _ => None,
316        }
317    }
318}
319#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
320#[repr(i32)]
321pub enum DriveMutability {
322    Unspecified = 0,
323    Writable = 1,
324    ReadOnly = 2,
325}
326impl DriveMutability {
327    /// String value of the enum field names used in the ProtoBuf definition.
328    ///
329    /// The values are not transformed in any way and thus are considered stable
330    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
331    pub fn as_str_name(&self) -> &'static str {
332        match self {
333            Self::Unspecified => "DRIVE_MUTABILITY_UNSPECIFIED",
334            Self::Writable => "DRIVE_MUTABILITY_WRITABLE",
335            Self::ReadOnly => "DRIVE_MUTABILITY_READ_ONLY",
336        }
337    }
338    /// Creates an enum from field names used in the ProtoBuf definition.
339    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
340        match value {
341            "DRIVE_MUTABILITY_UNSPECIFIED" => Some(Self::Unspecified),
342            "DRIVE_MUTABILITY_WRITABLE" => Some(Self::Writable),
343            "DRIVE_MUTABILITY_READ_ONLY" => Some(Self::ReadOnly),
344            _ => None,
345        }
346    }
347}
348#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
349#[repr(i32)]
350pub enum VirtualDriveState {
351    Unspecified = 0,
352    Active = 1,
353    AuthError = 2,
354    Unreachable = 3,
355    InvalidConfiguration = 4,
356}
357impl VirtualDriveState {
358    /// String value of the enum field names used in the ProtoBuf definition.
359    ///
360    /// The values are not transformed in any way and thus are considered stable
361    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
362    pub fn as_str_name(&self) -> &'static str {
363        match self {
364            Self::Unspecified => "VIRTUAL_DRIVE_STATE_UNSPECIFIED",
365            Self::Active => "VIRTUAL_DRIVE_STATE_ACTIVE",
366            Self::AuthError => "VIRTUAL_DRIVE_STATE_AUTH_ERROR",
367            Self::Unreachable => "VIRTUAL_DRIVE_STATE_UNREACHABLE",
368            Self::InvalidConfiguration => "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION",
369        }
370    }
371    /// Creates an enum from field names used in the ProtoBuf definition.
372    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
373        match value {
374            "VIRTUAL_DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
375            "VIRTUAL_DRIVE_STATE_ACTIVE" => Some(Self::Active),
376            "VIRTUAL_DRIVE_STATE_AUTH_ERROR" => Some(Self::AuthError),
377            "VIRTUAL_DRIVE_STATE_UNREACHABLE" => Some(Self::Unreachable),
378            "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION" => {
379                Some(Self::InvalidConfiguration)
380            }
381            _ => None,
382        }
383    }
384}
385#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
386#[repr(i32)]
387pub enum FileState {
388    Unspecified = 0,
389    Active = 1,
390    Removed = 2,
391}
392impl FileState {
393    /// String value of the enum field names used in the ProtoBuf definition.
394    ///
395    /// The values are not transformed in any way and thus are considered stable
396    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
397    pub fn as_str_name(&self) -> &'static str {
398        match self {
399            Self::Unspecified => "FILE_STATE_UNSPECIFIED",
400            Self::Active => "FILE_STATE_ACTIVE",
401            Self::Removed => "FILE_STATE_REMOVED",
402        }
403    }
404    /// Creates an enum from field names used in the ProtoBuf definition.
405    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
406        match value {
407            "FILE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
408            "FILE_STATE_ACTIVE" => Some(Self::Active),
409            "FILE_STATE_REMOVED" => Some(Self::Removed),
410            _ => None,
411        }
412    }
413}
414#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
415#[repr(i32)]
416pub enum FileStoreError {
417    Unspecified = 0,
418    DriveNotFound = 1,
419    FileNotFound = 2,
420    FileRevisionNotFound = 3,
421    PathAlreadyExists = 4,
422    InvalidLogicalPath = 5,
423    PermissionDenied = 6,
424    RevisionPreconditionFailed = 7,
425    VirtualDriveNotFound = 8,
426    InvalidVirtualDriveConfiguration = 9,
427    ReadOnlyDrive = 10,
428    FileHistoryNotAvailable = 11,
429    UpstreamUnavailable = 12,
430    RevisionBytesReclaimed = 13,
431    UpstreamFileNotFound = 14,
432    DriveIdAlreadyExists = 15,
433    VirtualDriveCredentialsNotFound = 16,
434    VirtualDriveCredentialsInvalid = 17,
435    VirtualDriveCredentialsRejected = 18,
436    MaterializationFailed = 19,
437    IngestRuleNotFound = 20,
438    UploadedObjectNotFound = 21,
439    InvalidObjectKey = 22,
440    InvalidUpstreamState = 23,
441}
442impl FileStoreError {
443    /// String value of the enum field names used in the ProtoBuf definition.
444    ///
445    /// The values are not transformed in any way and thus are considered stable
446    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
447    pub fn as_str_name(&self) -> &'static str {
448        match self {
449            Self::Unspecified => "FILE_STORE_ERROR_UNSPECIFIED",
450            Self::DriveNotFound => "FILE_STORE_ERROR_DRIVE_NOT_FOUND",
451            Self::FileNotFound => "FILE_STORE_ERROR_FILE_NOT_FOUND",
452            Self::FileRevisionNotFound => "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND",
453            Self::PathAlreadyExists => "FILE_STORE_ERROR_PATH_ALREADY_EXISTS",
454            Self::InvalidLogicalPath => "FILE_STORE_ERROR_INVALID_LOGICAL_PATH",
455            Self::PermissionDenied => "FILE_STORE_ERROR_PERMISSION_DENIED",
456            Self::RevisionPreconditionFailed => {
457                "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED"
458            }
459            Self::VirtualDriveNotFound => "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND",
460            Self::InvalidVirtualDriveConfiguration => {
461                "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION"
462            }
463            Self::ReadOnlyDrive => "FILE_STORE_ERROR_READ_ONLY_DRIVE",
464            Self::FileHistoryNotAvailable => {
465                "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE"
466            }
467            Self::UpstreamUnavailable => "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE",
468            Self::RevisionBytesReclaimed => "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED",
469            Self::UpstreamFileNotFound => "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND",
470            Self::DriveIdAlreadyExists => "FILE_STORE_ERROR_DRIVE_ID_ALREADY_EXISTS",
471            Self::VirtualDriveCredentialsNotFound => {
472                "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_NOT_FOUND"
473            }
474            Self::VirtualDriveCredentialsInvalid => {
475                "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_INVALID"
476            }
477            Self::VirtualDriveCredentialsRejected => {
478                "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_REJECTED"
479            }
480            Self::MaterializationFailed => "FILE_STORE_ERROR_MATERIALIZATION_FAILED",
481            Self::IngestRuleNotFound => "FILE_STORE_ERROR_INGEST_RULE_NOT_FOUND",
482            Self::UploadedObjectNotFound => "FILE_STORE_ERROR_UPLOADED_OBJECT_NOT_FOUND",
483            Self::InvalidObjectKey => "FILE_STORE_ERROR_INVALID_OBJECT_KEY",
484            Self::InvalidUpstreamState => "FILE_STORE_ERROR_INVALID_UPSTREAM_STATE",
485        }
486    }
487    /// Creates an enum from field names used in the ProtoBuf definition.
488    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
489        match value {
490            "FILE_STORE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
491            "FILE_STORE_ERROR_DRIVE_NOT_FOUND" => Some(Self::DriveNotFound),
492            "FILE_STORE_ERROR_FILE_NOT_FOUND" => Some(Self::FileNotFound),
493            "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND" => {
494                Some(Self::FileRevisionNotFound)
495            }
496            "FILE_STORE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
497            "FILE_STORE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
498            "FILE_STORE_ERROR_PERMISSION_DENIED" => Some(Self::PermissionDenied),
499            "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED" => {
500                Some(Self::RevisionPreconditionFailed)
501            }
502            "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND" => {
503                Some(Self::VirtualDriveNotFound)
504            }
505            "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION" => {
506                Some(Self::InvalidVirtualDriveConfiguration)
507            }
508            "FILE_STORE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
509            "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE" => {
510                Some(Self::FileHistoryNotAvailable)
511            }
512            "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE" => Some(Self::UpstreamUnavailable),
513            "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED" => {
514                Some(Self::RevisionBytesReclaimed)
515            }
516            "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND" => {
517                Some(Self::UpstreamFileNotFound)
518            }
519            "FILE_STORE_ERROR_DRIVE_ID_ALREADY_EXISTS" => {
520                Some(Self::DriveIdAlreadyExists)
521            }
522            "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_NOT_FOUND" => {
523                Some(Self::VirtualDriveCredentialsNotFound)
524            }
525            "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_INVALID" => {
526                Some(Self::VirtualDriveCredentialsInvalid)
527            }
528            "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_REJECTED" => {
529                Some(Self::VirtualDriveCredentialsRejected)
530            }
531            "FILE_STORE_ERROR_MATERIALIZATION_FAILED" => {
532                Some(Self::MaterializationFailed)
533            }
534            "FILE_STORE_ERROR_INGEST_RULE_NOT_FOUND" => Some(Self::IngestRuleNotFound),
535            "FILE_STORE_ERROR_UPLOADED_OBJECT_NOT_FOUND" => {
536                Some(Self::UploadedObjectNotFound)
537            }
538            "FILE_STORE_ERROR_INVALID_OBJECT_KEY" => Some(Self::InvalidObjectKey),
539            "FILE_STORE_ERROR_INVALID_UPSTREAM_STATE" => Some(Self::InvalidUpstreamState),
540            _ => None,
541        }
542    }
543}
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct CreateDriveRequest {
546    #[prost(string, tag = "1")]
547    pub workspace_rid: ::prost::alloc::string::String,
548    #[prost(string, tag = "2")]
549    pub id: ::prost::alloc::string::String,
550}
551#[derive(Clone, PartialEq, ::prost::Message)]
552pub struct CreateDriveResponse {
553    #[prost(message, optional, tag = "1")]
554    pub drive: ::core::option::Option<Drive>,
555}
556#[derive(Clone, PartialEq, ::prost::Message)]
557pub struct CreateVirtualDriveRequest {
558    #[prost(string, tag = "1")]
559    pub workspace_rid: ::prost::alloc::string::String,
560    #[prost(string, tag = "2")]
561    pub id: ::prost::alloc::string::String,
562    #[prost(message, optional, tag = "3")]
563    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
564}
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct CreateVirtualDriveResponse {
567    #[prost(message, optional, tag = "1")]
568    pub drive: ::core::option::Option<Drive>,
569    #[prost(message, optional, tag = "2")]
570    pub virtual_drive: ::core::option::Option<VirtualDrive>,
571}
572#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct GetDriveRequest {
574    #[prost(string, tag = "1")]
575    pub drive_rid: ::prost::alloc::string::String,
576}
577#[derive(Clone, PartialEq, ::prost::Message)]
578pub struct GetDriveResponse {
579    #[prost(message, optional, tag = "1")]
580    pub drive: ::core::option::Option<Drive>,
581}
582#[derive(Clone, PartialEq, ::prost::Message)]
583pub struct GetVirtualDriveDetailsRequest {
584    #[prost(string, tag = "1")]
585    pub drive_rid: ::prost::alloc::string::String,
586}
587#[derive(Clone, PartialEq, ::prost::Message)]
588pub struct GetVirtualDriveDetailsResponse {
589    #[prost(message, optional, tag = "1")]
590    pub drive: ::core::option::Option<Drive>,
591    #[prost(message, optional, tag = "2")]
592    pub virtual_drive_details: ::core::option::Option<VirtualDriveDetails>,
593}
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct GetVirtualDriveStatusRequest {
596    #[prost(string, tag = "1")]
597    pub drive_rid: ::prost::alloc::string::String,
598}
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct GetVirtualDriveStatusResponse {
601    #[prost(message, optional, tag = "1")]
602    pub status: ::core::option::Option<VirtualDriveStatus>,
603}
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct GetDriveByIdRequest {
606    #[prost(string, tag = "1")]
607    pub workspace_rid: ::prost::alloc::string::String,
608    #[prost(string, tag = "2")]
609    pub id: ::prost::alloc::string::String,
610}
611#[derive(Clone, PartialEq, ::prost::Message)]
612pub struct GetDriveByIdResponse {
613    #[prost(message, optional, tag = "1")]
614    pub drive: ::core::option::Option<Drive>,
615}
616#[derive(Clone, PartialEq, ::prost::Message)]
617pub struct GetVirtualDriveDetailsByIdRequest {
618    #[prost(string, tag = "1")]
619    pub workspace_rid: ::prost::alloc::string::String,
620    #[prost(string, tag = "2")]
621    pub id: ::prost::alloc::string::String,
622}
623#[derive(Clone, PartialEq, ::prost::Message)]
624pub struct GetVirtualDriveDetailsByIdResponse {
625    #[prost(message, optional, tag = "1")]
626    pub drive: ::core::option::Option<Drive>,
627    #[prost(message, optional, tag = "2")]
628    pub virtual_drive_details: ::core::option::Option<VirtualDriveDetails>,
629}
630#[derive(Clone, PartialEq, ::prost::Message)]
631pub struct GetVirtualDriveStatusByIdRequest {
632    #[prost(string, tag = "1")]
633    pub workspace_rid: ::prost::alloc::string::String,
634    #[prost(string, tag = "2")]
635    pub id: ::prost::alloc::string::String,
636}
637#[derive(Clone, PartialEq, ::prost::Message)]
638pub struct GetVirtualDriveStatusByIdResponse {
639    #[prost(message, optional, tag = "1")]
640    pub status: ::core::option::Option<VirtualDriveStatus>,
641}
642#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct ListDrivesRequest {
644    #[prost(string, tag = "1")]
645    pub workspace_rid: ::prost::alloc::string::String,
646    #[prost(bool, tag = "2")]
647    pub include_archived: bool,
648    #[prost(int32, optional, tag = "3")]
649    pub page_size: ::core::option::Option<i32>,
650    #[prost(string, optional, tag = "4")]
651    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
652}
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct ListDrivesResponse {
655    #[prost(message, repeated, tag = "1")]
656    pub drives: ::prost::alloc::vec::Vec<Drive>,
657    #[prost(string, optional, tag = "2")]
658    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
659}
660#[derive(Clone, PartialEq, ::prost::Message)]
661pub struct UpdateVirtualDriveRequest {
662    #[prost(string, tag = "1")]
663    pub drive_rid: ::prost::alloc::string::String,
664    #[prost(message, optional, tag = "2")]
665    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
666}
667#[derive(Clone, PartialEq, ::prost::Message)]
668pub struct UpdateVirtualDriveResponse {
669    #[prost(message, optional, tag = "1")]
670    pub drive: ::core::option::Option<Drive>,
671    #[prost(message, optional, tag = "2")]
672    pub virtual_drive: ::core::option::Option<VirtualDrive>,
673}
674#[derive(Clone, PartialEq, ::prost::Message)]
675pub struct UpdateDriveDetailsRequest {
676    #[prost(string, tag = "1")]
677    pub drive_rid: ::prost::alloc::string::String,
678    #[prost(string, optional, tag = "2")]
679    pub id: ::core::option::Option<::prost::alloc::string::String>,
680}
681#[derive(Clone, PartialEq, ::prost::Message)]
682pub struct UpdateDriveDetailsResponse {
683    #[prost(message, optional, tag = "1")]
684    pub drive: ::core::option::Option<Drive>,
685}
686#[derive(Clone, PartialEq, ::prost::Message)]
687pub struct ArchiveDriveRequest {
688    #[prost(string, tag = "1")]
689    pub drive_rid: ::prost::alloc::string::String,
690}
691#[derive(Clone, PartialEq, ::prost::Message)]
692pub struct ArchiveDriveResponse {
693    #[prost(message, optional, tag = "1")]
694    pub drive: ::core::option::Option<Drive>,
695}
696#[derive(Clone, PartialEq, ::prost::Message)]
697pub struct UnarchiveDriveRequest {
698    #[prost(string, tag = "1")]
699    pub drive_rid: ::prost::alloc::string::String,
700}
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct UnarchiveDriveResponse {
703    #[prost(message, optional, tag = "1")]
704    pub drive: ::core::option::Option<Drive>,
705}
706/// Generated client implementations.
707pub mod drives_service_client {
708    #![allow(
709        unused_variables,
710        dead_code,
711        missing_docs,
712        clippy::wildcard_imports,
713        clippy::let_unit_value,
714    )]
715    use tonic::codegen::*;
716    use tonic::codegen::http::Uri;
717    #[derive(Debug, Clone)]
718    pub struct DrivesServiceClient<T> {
719        inner: tonic::client::Grpc<T>,
720    }
721    impl DrivesServiceClient<tonic::transport::Channel> {
722        /// Attempt to create a new client by connecting to a given endpoint.
723        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
724        where
725            D: TryInto<tonic::transport::Endpoint>,
726            D::Error: Into<StdError>,
727        {
728            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
729            Ok(Self::new(conn))
730        }
731    }
732    impl<T> DrivesServiceClient<T>
733    where
734        T: tonic::client::GrpcService<tonic::body::Body>,
735        T::Error: Into<StdError>,
736        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
737        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
738    {
739        pub fn new(inner: T) -> Self {
740            let inner = tonic::client::Grpc::new(inner);
741            Self { inner }
742        }
743        pub fn with_origin(inner: T, origin: Uri) -> Self {
744            let inner = tonic::client::Grpc::with_origin(inner, origin);
745            Self { inner }
746        }
747        pub fn with_interceptor<F>(
748            inner: T,
749            interceptor: F,
750        ) -> DrivesServiceClient<InterceptedService<T, F>>
751        where
752            F: tonic::service::Interceptor,
753            T::ResponseBody: Default,
754            T: tonic::codegen::Service<
755                http::Request<tonic::body::Body>,
756                Response = http::Response<
757                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
758                >,
759            >,
760            <T as tonic::codegen::Service<
761                http::Request<tonic::body::Body>,
762            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
763        {
764            DrivesServiceClient::new(InterceptedService::new(inner, interceptor))
765        }
766        /// Compress requests with the given encoding.
767        ///
768        /// This requires the server to support it otherwise it might respond with an
769        /// error.
770        #[must_use]
771        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
772            self.inner = self.inner.send_compressed(encoding);
773            self
774        }
775        /// Enable decompressing responses.
776        #[must_use]
777        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
778            self.inner = self.inner.accept_compressed(encoding);
779            self
780        }
781        /// Limits the maximum size of a decoded message.
782        ///
783        /// Default: `4MB`
784        #[must_use]
785        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
786            self.inner = self.inner.max_decoding_message_size(limit);
787            self
788        }
789        /// Limits the maximum size of an encoded message.
790        ///
791        /// Default: `usize::MAX`
792        #[must_use]
793        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
794            self.inner = self.inner.max_encoding_message_size(limit);
795            self
796        }
797        pub async fn create_drive(
798            &mut self,
799            request: impl tonic::IntoRequest<super::CreateDriveRequest>,
800        ) -> std::result::Result<
801            tonic::Response<super::CreateDriveResponse>,
802            tonic::Status,
803        > {
804            self.inner
805                .ready()
806                .await
807                .map_err(|e| {
808                    tonic::Status::unknown(
809                        format!("Service was not ready: {}", e.into()),
810                    )
811                })?;
812            let codec = tonic::codec::ProstCodec::default();
813            let path = http::uri::PathAndQuery::from_static(
814                "/nominal.file_store.v1.DrivesService/CreateDrive",
815            );
816            let mut req = request.into_request();
817            req.extensions_mut()
818                .insert(
819                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "CreateDrive"),
820                );
821            self.inner.unary(req, path, codec).await
822        }
823        pub async fn create_virtual_drive(
824            &mut self,
825            request: impl tonic::IntoRequest<super::CreateVirtualDriveRequest>,
826        ) -> std::result::Result<
827            tonic::Response<super::CreateVirtualDriveResponse>,
828            tonic::Status,
829        > {
830            self.inner
831                .ready()
832                .await
833                .map_err(|e| {
834                    tonic::Status::unknown(
835                        format!("Service was not ready: {}", e.into()),
836                    )
837                })?;
838            let codec = tonic::codec::ProstCodec::default();
839            let path = http::uri::PathAndQuery::from_static(
840                "/nominal.file_store.v1.DrivesService/CreateVirtualDrive",
841            );
842            let mut req = request.into_request();
843            req.extensions_mut()
844                .insert(
845                    GrpcMethod::new(
846                        "nominal.file_store.v1.DrivesService",
847                        "CreateVirtualDrive",
848                    ),
849                );
850            self.inner.unary(req, path, codec).await
851        }
852        pub async fn get_drive(
853            &mut self,
854            request: impl tonic::IntoRequest<super::GetDriveRequest>,
855        ) -> std::result::Result<
856            tonic::Response<super::GetDriveResponse>,
857            tonic::Status,
858        > {
859            self.inner
860                .ready()
861                .await
862                .map_err(|e| {
863                    tonic::Status::unknown(
864                        format!("Service was not ready: {}", e.into()),
865                    )
866                })?;
867            let codec = tonic::codec::ProstCodec::default();
868            let path = http::uri::PathAndQuery::from_static(
869                "/nominal.file_store.v1.DrivesService/GetDrive",
870            );
871            let mut req = request.into_request();
872            req.extensions_mut()
873                .insert(
874                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "GetDrive"),
875                );
876            self.inner.unary(req, path, codec).await
877        }
878        pub async fn get_virtual_drive_details(
879            &mut self,
880            request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsRequest>,
881        ) -> std::result::Result<
882            tonic::Response<super::GetVirtualDriveDetailsResponse>,
883            tonic::Status,
884        > {
885            self.inner
886                .ready()
887                .await
888                .map_err(|e| {
889                    tonic::Status::unknown(
890                        format!("Service was not ready: {}", e.into()),
891                    )
892                })?;
893            let codec = tonic::codec::ProstCodec::default();
894            let path = http::uri::PathAndQuery::from_static(
895                "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetails",
896            );
897            let mut req = request.into_request();
898            req.extensions_mut()
899                .insert(
900                    GrpcMethod::new(
901                        "nominal.file_store.v1.DrivesService",
902                        "GetVirtualDriveDetails",
903                    ),
904                );
905            self.inner.unary(req, path, codec).await
906        }
907        pub async fn get_virtual_drive_status(
908            &mut self,
909            request: impl tonic::IntoRequest<super::GetVirtualDriveStatusRequest>,
910        ) -> std::result::Result<
911            tonic::Response<super::GetVirtualDriveStatusResponse>,
912            tonic::Status,
913        > {
914            self.inner
915                .ready()
916                .await
917                .map_err(|e| {
918                    tonic::Status::unknown(
919                        format!("Service was not ready: {}", e.into()),
920                    )
921                })?;
922            let codec = tonic::codec::ProstCodec::default();
923            let path = http::uri::PathAndQuery::from_static(
924                "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatus",
925            );
926            let mut req = request.into_request();
927            req.extensions_mut()
928                .insert(
929                    GrpcMethod::new(
930                        "nominal.file_store.v1.DrivesService",
931                        "GetVirtualDriveStatus",
932                    ),
933                );
934            self.inner.unary(req, path, codec).await
935        }
936        pub async fn get_drive_by_id(
937            &mut self,
938            request: impl tonic::IntoRequest<super::GetDriveByIdRequest>,
939        ) -> std::result::Result<
940            tonic::Response<super::GetDriveByIdResponse>,
941            tonic::Status,
942        > {
943            self.inner
944                .ready()
945                .await
946                .map_err(|e| {
947                    tonic::Status::unknown(
948                        format!("Service was not ready: {}", e.into()),
949                    )
950                })?;
951            let codec = tonic::codec::ProstCodec::default();
952            let path = http::uri::PathAndQuery::from_static(
953                "/nominal.file_store.v1.DrivesService/GetDriveById",
954            );
955            let mut req = request.into_request();
956            req.extensions_mut()
957                .insert(
958                    GrpcMethod::new(
959                        "nominal.file_store.v1.DrivesService",
960                        "GetDriveById",
961                    ),
962                );
963            self.inner.unary(req, path, codec).await
964        }
965        pub async fn get_virtual_drive_details_by_id(
966            &mut self,
967            request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsByIdRequest>,
968        ) -> std::result::Result<
969            tonic::Response<super::GetVirtualDriveDetailsByIdResponse>,
970            tonic::Status,
971        > {
972            self.inner
973                .ready()
974                .await
975                .map_err(|e| {
976                    tonic::Status::unknown(
977                        format!("Service was not ready: {}", e.into()),
978                    )
979                })?;
980            let codec = tonic::codec::ProstCodec::default();
981            let path = http::uri::PathAndQuery::from_static(
982                "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetailsById",
983            );
984            let mut req = request.into_request();
985            req.extensions_mut()
986                .insert(
987                    GrpcMethod::new(
988                        "nominal.file_store.v1.DrivesService",
989                        "GetVirtualDriveDetailsById",
990                    ),
991                );
992            self.inner.unary(req, path, codec).await
993        }
994        pub async fn get_virtual_drive_status_by_id(
995            &mut self,
996            request: impl tonic::IntoRequest<super::GetVirtualDriveStatusByIdRequest>,
997        ) -> std::result::Result<
998            tonic::Response<super::GetVirtualDriveStatusByIdResponse>,
999            tonic::Status,
1000        > {
1001            self.inner
1002                .ready()
1003                .await
1004                .map_err(|e| {
1005                    tonic::Status::unknown(
1006                        format!("Service was not ready: {}", e.into()),
1007                    )
1008                })?;
1009            let codec = tonic::codec::ProstCodec::default();
1010            let path = http::uri::PathAndQuery::from_static(
1011                "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatusById",
1012            );
1013            let mut req = request.into_request();
1014            req.extensions_mut()
1015                .insert(
1016                    GrpcMethod::new(
1017                        "nominal.file_store.v1.DrivesService",
1018                        "GetVirtualDriveStatusById",
1019                    ),
1020                );
1021            self.inner.unary(req, path, codec).await
1022        }
1023        pub async fn list_drives(
1024            &mut self,
1025            request: impl tonic::IntoRequest<super::ListDrivesRequest>,
1026        ) -> std::result::Result<
1027            tonic::Response<super::ListDrivesResponse>,
1028            tonic::Status,
1029        > {
1030            self.inner
1031                .ready()
1032                .await
1033                .map_err(|e| {
1034                    tonic::Status::unknown(
1035                        format!("Service was not ready: {}", e.into()),
1036                    )
1037                })?;
1038            let codec = tonic::codec::ProstCodec::default();
1039            let path = http::uri::PathAndQuery::from_static(
1040                "/nominal.file_store.v1.DrivesService/ListDrives",
1041            );
1042            let mut req = request.into_request();
1043            req.extensions_mut()
1044                .insert(
1045                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "ListDrives"),
1046                );
1047            self.inner.unary(req, path, codec).await
1048        }
1049        pub async fn update_virtual_drive(
1050            &mut self,
1051            request: impl tonic::IntoRequest<super::UpdateVirtualDriveRequest>,
1052        ) -> std::result::Result<
1053            tonic::Response<super::UpdateVirtualDriveResponse>,
1054            tonic::Status,
1055        > {
1056            self.inner
1057                .ready()
1058                .await
1059                .map_err(|e| {
1060                    tonic::Status::unknown(
1061                        format!("Service was not ready: {}", e.into()),
1062                    )
1063                })?;
1064            let codec = tonic::codec::ProstCodec::default();
1065            let path = http::uri::PathAndQuery::from_static(
1066                "/nominal.file_store.v1.DrivesService/UpdateVirtualDrive",
1067            );
1068            let mut req = request.into_request();
1069            req.extensions_mut()
1070                .insert(
1071                    GrpcMethod::new(
1072                        "nominal.file_store.v1.DrivesService",
1073                        "UpdateVirtualDrive",
1074                    ),
1075                );
1076            self.inner.unary(req, path, codec).await
1077        }
1078        pub async fn update_drive_details(
1079            &mut self,
1080            request: impl tonic::IntoRequest<super::UpdateDriveDetailsRequest>,
1081        ) -> std::result::Result<
1082            tonic::Response<super::UpdateDriveDetailsResponse>,
1083            tonic::Status,
1084        > {
1085            self.inner
1086                .ready()
1087                .await
1088                .map_err(|e| {
1089                    tonic::Status::unknown(
1090                        format!("Service was not ready: {}", e.into()),
1091                    )
1092                })?;
1093            let codec = tonic::codec::ProstCodec::default();
1094            let path = http::uri::PathAndQuery::from_static(
1095                "/nominal.file_store.v1.DrivesService/UpdateDriveDetails",
1096            );
1097            let mut req = request.into_request();
1098            req.extensions_mut()
1099                .insert(
1100                    GrpcMethod::new(
1101                        "nominal.file_store.v1.DrivesService",
1102                        "UpdateDriveDetails",
1103                    ),
1104                );
1105            self.inner.unary(req, path, codec).await
1106        }
1107        pub async fn archive_drive(
1108            &mut self,
1109            request: impl tonic::IntoRequest<super::ArchiveDriveRequest>,
1110        ) -> std::result::Result<
1111            tonic::Response<super::ArchiveDriveResponse>,
1112            tonic::Status,
1113        > {
1114            self.inner
1115                .ready()
1116                .await
1117                .map_err(|e| {
1118                    tonic::Status::unknown(
1119                        format!("Service was not ready: {}", e.into()),
1120                    )
1121                })?;
1122            let codec = tonic::codec::ProstCodec::default();
1123            let path = http::uri::PathAndQuery::from_static(
1124                "/nominal.file_store.v1.DrivesService/ArchiveDrive",
1125            );
1126            let mut req = request.into_request();
1127            req.extensions_mut()
1128                .insert(
1129                    GrpcMethod::new(
1130                        "nominal.file_store.v1.DrivesService",
1131                        "ArchiveDrive",
1132                    ),
1133                );
1134            self.inner.unary(req, path, codec).await
1135        }
1136        pub async fn unarchive_drive(
1137            &mut self,
1138            request: impl tonic::IntoRequest<super::UnarchiveDriveRequest>,
1139        ) -> std::result::Result<
1140            tonic::Response<super::UnarchiveDriveResponse>,
1141            tonic::Status,
1142        > {
1143            self.inner
1144                .ready()
1145                .await
1146                .map_err(|e| {
1147                    tonic::Status::unknown(
1148                        format!("Service was not ready: {}", e.into()),
1149                    )
1150                })?;
1151            let codec = tonic::codec::ProstCodec::default();
1152            let path = http::uri::PathAndQuery::from_static(
1153                "/nominal.file_store.v1.DrivesService/UnarchiveDrive",
1154            );
1155            let mut req = request.into_request();
1156            req.extensions_mut()
1157                .insert(
1158                    GrpcMethod::new(
1159                        "nominal.file_store.v1.DrivesService",
1160                        "UnarchiveDrive",
1161                    ),
1162                );
1163            self.inner.unary(req, path, codec).await
1164        }
1165    }
1166}
1167#[derive(Clone, PartialEq, ::prost::Message)]
1168pub struct UploadedObjectRef {
1169    #[prost(string, tag = "1")]
1170    pub object_key: ::prost::alloc::string::String,
1171}
1172#[derive(Clone, PartialEq, ::prost::Message)]
1173pub struct PathTarget {
1174    #[prost(message, optional, tag = "1")]
1175    pub path: ::core::option::Option<LogicalPath>,
1176}
1177#[derive(Clone, PartialEq, ::prost::Message)]
1178pub struct Destination {
1179    #[prost(oneof = "destination::Target", tags = "1, 2")]
1180    pub target: ::core::option::Option<destination::Target>,
1181}
1182/// Nested message and enum types in `Destination`.
1183pub mod destination {
1184    #[derive(Clone, PartialEq, ::prost::Oneof)]
1185    pub enum Target {
1186        #[prost(message, tag = "1")]
1187        Path(super::PathTarget),
1188        #[prost(string, tag = "2")]
1189        FileRevisionRid(::prost::alloc::string::String),
1190    }
1191}
1192#[derive(Clone, PartialEq, ::prost::Message)]
1193pub struct PutFile {
1194    #[prost(message, optional, tag = "1")]
1195    pub object: ::core::option::Option<UploadedObjectRef>,
1196    #[prost(uint64, tag = "2")]
1197    pub size_bytes: u64,
1198    #[prost(message, optional, tag = "3")]
1199    pub destination: ::core::option::Option<Destination>,
1200}
1201#[derive(Clone, PartialEq, ::prost::Message)]
1202pub struct MoveFile {
1203    #[prost(string, tag = "1")]
1204    pub source_revision_rid: ::prost::alloc::string::String,
1205    #[prost(message, optional, tag = "2")]
1206    pub destination: ::core::option::Option<Destination>,
1207}
1208#[derive(Clone, PartialEq, ::prost::Message)]
1209pub struct RemoveFile {
1210    #[prost(string, tag = "1")]
1211    pub revision_rid: ::prost::alloc::string::String,
1212}
1213#[derive(Clone, PartialEq, ::prost::Message)]
1214pub struct RestoreFile {
1215    #[prost(string, tag = "1")]
1216    pub restore_revision_rid: ::prost::alloc::string::String,
1217    #[prost(message, optional, tag = "2")]
1218    pub destination: ::core::option::Option<Destination>,
1219}
1220#[derive(Clone, PartialEq, ::prost::Message)]
1221pub struct FileChange {
1222    #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4")]
1223    pub change: ::core::option::Option<file_change::Change>,
1224}
1225/// Nested message and enum types in `FileChange`.
1226pub mod file_change {
1227    #[derive(Clone, PartialEq, ::prost::Oneof)]
1228    pub enum Change {
1229        #[prost(message, tag = "1")]
1230        Put(super::PutFile),
1231        #[prost(message, tag = "2")]
1232        Move(super::MoveFile),
1233        #[prost(message, tag = "3")]
1234        Remove(super::RemoveFile),
1235        #[prost(message, tag = "4")]
1236        Restore(super::RestoreFile),
1237    }
1238}
1239#[derive(Clone, PartialEq, ::prost::Message)]
1240pub struct GetFileRequest {
1241    #[prost(string, tag = "1")]
1242    pub drive_rid: ::prost::alloc::string::String,
1243    #[prost(message, optional, tag = "2")]
1244    pub path: ::core::option::Option<LogicalPath>,
1245    #[prost(bool, tag = "3")]
1246    pub include_removed: bool,
1247}
1248#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct GetFileResponse {
1250    #[prost(message, optional, tag = "1")]
1251    pub file: ::core::option::Option<LogicalFile>,
1252}
1253#[derive(Clone, PartialEq, ::prost::Message)]
1254pub struct ResolveFileRevisionRequest {
1255    #[prost(message, optional, tag = "2")]
1256    pub source_ref: ::core::option::Option<FileRevisionRef>,
1257}
1258#[derive(Clone, PartialEq, ::prost::Message)]
1259pub struct ResolveFileRevisionResponse {
1260    #[prost(string, tag = "1")]
1261    pub file_revision_rid: ::prost::alloc::string::String,
1262}
1263#[derive(Clone, PartialEq, ::prost::Message)]
1264pub struct ListFilesRequest {
1265    #[prost(string, tag = "1")]
1266    pub drive_rid: ::prost::alloc::string::String,
1267    #[prost(message, optional, tag = "2")]
1268    pub parent_path: ::core::option::Option<LogicalPath>,
1269    #[prost(bool, tag = "3")]
1270    pub include_removed: bool,
1271    #[prost(int32, optional, tag = "4")]
1272    pub page_size: ::core::option::Option<i32>,
1273    #[prost(string, optional, tag = "5")]
1274    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1275}
1276#[derive(Clone, PartialEq, ::prost::Message)]
1277pub struct ListFilesResponse {
1278    #[prost(message, repeated, tag = "1")]
1279    pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1280    #[prost(string, optional, tag = "2")]
1281    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1282}
1283#[derive(Clone, PartialEq, ::prost::Message)]
1284pub struct ApplyFileChangesRequest {
1285    #[prost(string, tag = "1")]
1286    pub drive_rid: ::prost::alloc::string::String,
1287    #[prost(message, repeated, tag = "2")]
1288    pub changes: ::prost::alloc::vec::Vec<FileChange>,
1289}
1290#[derive(Clone, PartialEq, ::prost::Message)]
1291pub struct ApplyFileChangesResponse {
1292    #[prost(message, repeated, tag = "1")]
1293    pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1294}
1295#[derive(Clone, PartialEq, ::prost::Message)]
1296pub struct FileChangeSuccess {
1297    #[prost(message, optional, tag = "1")]
1298    pub file: ::core::option::Option<LogicalFile>,
1299    #[prost(message, optional, tag = "2")]
1300    pub file_revision: ::core::option::Option<ManagedFileRevision>,
1301}
1302#[derive(Clone, PartialEq, ::prost::Message)]
1303pub struct FileChangeFailure {
1304    #[prost(enumeration = "FileStoreError", tag = "1")]
1305    pub code: i32,
1306    #[prost(string, tag = "2")]
1307    pub message: ::prost::alloc::string::String,
1308}
1309#[derive(Clone, PartialEq, ::prost::Message)]
1310pub struct FileChangeResult {
1311    #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1312    pub result: ::core::option::Option<file_change_result::Result>,
1313}
1314/// Nested message and enum types in `FileChangeResult`.
1315pub mod file_change_result {
1316    #[derive(Clone, PartialEq, ::prost::Oneof)]
1317    pub enum Result {
1318        #[prost(message, tag = "1")]
1319        Success(super::FileChangeSuccess),
1320        #[prost(message, tag = "2")]
1321        Failure(super::FileChangeFailure),
1322    }
1323}
1324#[derive(Clone, PartialEq, ::prost::Message)]
1325pub struct ListFileRevisionsRequest {
1326    #[prost(string, tag = "1")]
1327    pub drive_rid: ::prost::alloc::string::String,
1328    #[prost(string, tag = "2")]
1329    pub file_rid: ::prost::alloc::string::String,
1330    #[prost(int32, optional, tag = "3")]
1331    pub page_size: ::core::option::Option<i32>,
1332    #[prost(string, optional, tag = "4")]
1333    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1334}
1335#[derive(Clone, PartialEq, ::prost::Message)]
1336pub struct ListFileRevisionsResponse {
1337    #[prost(message, repeated, tag = "1")]
1338    pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1339    #[prost(string, optional, tag = "2")]
1340    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1341}
1342#[derive(Clone, PartialEq, ::prost::Message)]
1343pub struct PurgeFileRequest {
1344    #[prost(string, tag = "1")]
1345    pub file_revision_rid: ::prost::alloc::string::String,
1346}
1347#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1348pub struct PurgeFileResponse {}
1349/// Generated client implementations.
1350pub mod files_service_client {
1351    #![allow(
1352        unused_variables,
1353        dead_code,
1354        missing_docs,
1355        clippy::wildcard_imports,
1356        clippy::let_unit_value,
1357    )]
1358    use tonic::codegen::*;
1359    use tonic::codegen::http::Uri;
1360    #[derive(Debug, Clone)]
1361    pub struct FilesServiceClient<T> {
1362        inner: tonic::client::Grpc<T>,
1363    }
1364    impl FilesServiceClient<tonic::transport::Channel> {
1365        /// Attempt to create a new client by connecting to a given endpoint.
1366        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1367        where
1368            D: TryInto<tonic::transport::Endpoint>,
1369            D::Error: Into<StdError>,
1370        {
1371            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1372            Ok(Self::new(conn))
1373        }
1374    }
1375    impl<T> FilesServiceClient<T>
1376    where
1377        T: tonic::client::GrpcService<tonic::body::Body>,
1378        T::Error: Into<StdError>,
1379        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1380        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1381    {
1382        pub fn new(inner: T) -> Self {
1383            let inner = tonic::client::Grpc::new(inner);
1384            Self { inner }
1385        }
1386        pub fn with_origin(inner: T, origin: Uri) -> Self {
1387            let inner = tonic::client::Grpc::with_origin(inner, origin);
1388            Self { inner }
1389        }
1390        pub fn with_interceptor<F>(
1391            inner: T,
1392            interceptor: F,
1393        ) -> FilesServiceClient<InterceptedService<T, F>>
1394        where
1395            F: tonic::service::Interceptor,
1396            T::ResponseBody: Default,
1397            T: tonic::codegen::Service<
1398                http::Request<tonic::body::Body>,
1399                Response = http::Response<
1400                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1401                >,
1402            >,
1403            <T as tonic::codegen::Service<
1404                http::Request<tonic::body::Body>,
1405            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1406        {
1407            FilesServiceClient::new(InterceptedService::new(inner, interceptor))
1408        }
1409        /// Compress requests with the given encoding.
1410        ///
1411        /// This requires the server to support it otherwise it might respond with an
1412        /// error.
1413        #[must_use]
1414        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1415            self.inner = self.inner.send_compressed(encoding);
1416            self
1417        }
1418        /// Enable decompressing responses.
1419        #[must_use]
1420        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1421            self.inner = self.inner.accept_compressed(encoding);
1422            self
1423        }
1424        /// Limits the maximum size of a decoded message.
1425        ///
1426        /// Default: `4MB`
1427        #[must_use]
1428        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1429            self.inner = self.inner.max_decoding_message_size(limit);
1430            self
1431        }
1432        /// Limits the maximum size of an encoded message.
1433        ///
1434        /// Default: `usize::MAX`
1435        #[must_use]
1436        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1437            self.inner = self.inner.max_encoding_message_size(limit);
1438            self
1439        }
1440        pub async fn get_file(
1441            &mut self,
1442            request: impl tonic::IntoRequest<super::GetFileRequest>,
1443        ) -> std::result::Result<
1444            tonic::Response<super::GetFileResponse>,
1445            tonic::Status,
1446        > {
1447            self.inner
1448                .ready()
1449                .await
1450                .map_err(|e| {
1451                    tonic::Status::unknown(
1452                        format!("Service was not ready: {}", e.into()),
1453                    )
1454                })?;
1455            let codec = tonic::codec::ProstCodec::default();
1456            let path = http::uri::PathAndQuery::from_static(
1457                "/nominal.file_store.v1.FilesService/GetFile",
1458            );
1459            let mut req = request.into_request();
1460            req.extensions_mut()
1461                .insert(
1462                    GrpcMethod::new("nominal.file_store.v1.FilesService", "GetFile"),
1463                );
1464            self.inner.unary(req, path, codec).await
1465        }
1466        pub async fn resolve_file_revision(
1467            &mut self,
1468            request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
1469        ) -> std::result::Result<
1470            tonic::Response<super::ResolveFileRevisionResponse>,
1471            tonic::Status,
1472        > {
1473            self.inner
1474                .ready()
1475                .await
1476                .map_err(|e| {
1477                    tonic::Status::unknown(
1478                        format!("Service was not ready: {}", e.into()),
1479                    )
1480                })?;
1481            let codec = tonic::codec::ProstCodec::default();
1482            let path = http::uri::PathAndQuery::from_static(
1483                "/nominal.file_store.v1.FilesService/ResolveFileRevision",
1484            );
1485            let mut req = request.into_request();
1486            req.extensions_mut()
1487                .insert(
1488                    GrpcMethod::new(
1489                        "nominal.file_store.v1.FilesService",
1490                        "ResolveFileRevision",
1491                    ),
1492                );
1493            self.inner.unary(req, path, codec).await
1494        }
1495        pub async fn list_files(
1496            &mut self,
1497            request: impl tonic::IntoRequest<super::ListFilesRequest>,
1498        ) -> std::result::Result<
1499            tonic::Response<super::ListFilesResponse>,
1500            tonic::Status,
1501        > {
1502            self.inner
1503                .ready()
1504                .await
1505                .map_err(|e| {
1506                    tonic::Status::unknown(
1507                        format!("Service was not ready: {}", e.into()),
1508                    )
1509                })?;
1510            let codec = tonic::codec::ProstCodec::default();
1511            let path = http::uri::PathAndQuery::from_static(
1512                "/nominal.file_store.v1.FilesService/ListFiles",
1513            );
1514            let mut req = request.into_request();
1515            req.extensions_mut()
1516                .insert(
1517                    GrpcMethod::new("nominal.file_store.v1.FilesService", "ListFiles"),
1518                );
1519            self.inner.unary(req, path, codec).await
1520        }
1521        pub async fn apply_file_changes(
1522            &mut self,
1523            request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
1524        ) -> std::result::Result<
1525            tonic::Response<super::ApplyFileChangesResponse>,
1526            tonic::Status,
1527        > {
1528            self.inner
1529                .ready()
1530                .await
1531                .map_err(|e| {
1532                    tonic::Status::unknown(
1533                        format!("Service was not ready: {}", e.into()),
1534                    )
1535                })?;
1536            let codec = tonic::codec::ProstCodec::default();
1537            let path = http::uri::PathAndQuery::from_static(
1538                "/nominal.file_store.v1.FilesService/ApplyFileChanges",
1539            );
1540            let mut req = request.into_request();
1541            req.extensions_mut()
1542                .insert(
1543                    GrpcMethod::new(
1544                        "nominal.file_store.v1.FilesService",
1545                        "ApplyFileChanges",
1546                    ),
1547                );
1548            self.inner.unary(req, path, codec).await
1549        }
1550        pub async fn list_file_revisions(
1551            &mut self,
1552            request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
1553        ) -> std::result::Result<
1554            tonic::Response<super::ListFileRevisionsResponse>,
1555            tonic::Status,
1556        > {
1557            self.inner
1558                .ready()
1559                .await
1560                .map_err(|e| {
1561                    tonic::Status::unknown(
1562                        format!("Service was not ready: {}", e.into()),
1563                    )
1564                })?;
1565            let codec = tonic::codec::ProstCodec::default();
1566            let path = http::uri::PathAndQuery::from_static(
1567                "/nominal.file_store.v1.FilesService/ListFileRevisions",
1568            );
1569            let mut req = request.into_request();
1570            req.extensions_mut()
1571                .insert(
1572                    GrpcMethod::new(
1573                        "nominal.file_store.v1.FilesService",
1574                        "ListFileRevisions",
1575                    ),
1576                );
1577            self.inner.unary(req, path, codec).await
1578        }
1579        pub async fn purge_file(
1580            &mut self,
1581            request: impl tonic::IntoRequest<super::PurgeFileRequest>,
1582        ) -> std::result::Result<
1583            tonic::Response<super::PurgeFileResponse>,
1584            tonic::Status,
1585        > {
1586            self.inner
1587                .ready()
1588                .await
1589                .map_err(|e| {
1590                    tonic::Status::unknown(
1591                        format!("Service was not ready: {}", e.into()),
1592                    )
1593                })?;
1594            let codec = tonic::codec::ProstCodec::default();
1595            let path = http::uri::PathAndQuery::from_static(
1596                "/nominal.file_store.v1.FilesService/PurgeFile",
1597            );
1598            let mut req = request.into_request();
1599            req.extensions_mut()
1600                .insert(
1601                    GrpcMethod::new("nominal.file_store.v1.FilesService", "PurgeFile"),
1602                );
1603            self.inner.unary(req, path, codec).await
1604        }
1605    }
1606}
1607#[derive(Clone, PartialEq, ::prost::Message)]
1608pub struct CreateIngestRuleRequest {
1609    #[prost(string, tag = "1")]
1610    pub drive_rid: ::prost::alloc::string::String,
1611    #[prost(message, optional, tag = "2")]
1612    pub matcher: ::core::option::Option<FileMatcher>,
1613    #[prost(message, optional, tag = "3")]
1614    pub triggers: ::core::option::Option<IngestTriggers>,
1615    #[prost(enumeration = "BackfillMode", tag = "4")]
1616    pub backfill_mode: i32,
1617}
1618#[derive(Clone, PartialEq, ::prost::Message)]
1619pub struct CreateIngestRuleResponse {
1620    #[prost(message, optional, tag = "1")]
1621    pub rule: ::core::option::Option<IngestRule>,
1622}
1623#[derive(Clone, PartialEq, ::prost::Message)]
1624pub struct ListIngestRulesRequest {
1625    #[prost(string, tag = "1")]
1626    pub drive_rid: ::prost::alloc::string::String,
1627    #[prost(bool, tag = "2")]
1628    pub include_archived: bool,
1629    #[prost(int32, optional, tag = "3")]
1630    pub page_size: ::core::option::Option<i32>,
1631    #[prost(string, optional, tag = "4")]
1632    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1633}
1634#[derive(Clone, PartialEq, ::prost::Message)]
1635pub struct ListIngestRulesResponse {
1636    #[prost(message, repeated, tag = "1")]
1637    pub rules: ::prost::alloc::vec::Vec<IngestRule>,
1638    #[prost(string, optional, tag = "2")]
1639    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1640}
1641#[derive(Clone, PartialEq, ::prost::Message)]
1642pub struct GetIngestRuleRequest {
1643    #[prost(string, tag = "1")]
1644    pub rule_rid: ::prost::alloc::string::String,
1645}
1646#[derive(Clone, PartialEq, ::prost::Message)]
1647pub struct GetIngestRuleResponse {
1648    #[prost(message, optional, tag = "1")]
1649    pub rule: ::core::option::Option<IngestRule>,
1650}
1651#[derive(Clone, PartialEq, ::prost::Message)]
1652pub struct UpdateIngestRuleRequest {
1653    #[prost(string, tag = "1")]
1654    pub rule_rid: ::prost::alloc::string::String,
1655    #[prost(message, optional, tag = "2")]
1656    pub matcher: ::core::option::Option<FileMatcher>,
1657    #[prost(message, optional, tag = "3")]
1658    pub triggers: ::core::option::Option<IngestTriggers>,
1659}
1660#[derive(Clone, PartialEq, ::prost::Message)]
1661pub struct UpdateIngestRuleResponse {
1662    #[prost(message, optional, tag = "1")]
1663    pub rule: ::core::option::Option<IngestRule>,
1664}
1665#[derive(Clone, PartialEq, ::prost::Message)]
1666pub struct ArchiveIngestRuleRequest {
1667    #[prost(string, tag = "1")]
1668    pub rule_rid: ::prost::alloc::string::String,
1669}
1670#[derive(Clone, PartialEq, ::prost::Message)]
1671pub struct ArchiveIngestRuleResponse {
1672    #[prost(message, optional, tag = "1")]
1673    pub rule: ::core::option::Option<IngestRule>,
1674}
1675#[derive(Clone, PartialEq, ::prost::Message)]
1676pub struct UnarchiveIngestRuleRequest {
1677    #[prost(string, tag = "1")]
1678    pub rule_rid: ::prost::alloc::string::String,
1679    #[prost(enumeration = "BackfillMode", tag = "2")]
1680    pub backfill_mode: i32,
1681}
1682#[derive(Clone, PartialEq, ::prost::Message)]
1683pub struct UnarchiveIngestRuleResponse {
1684    #[prost(message, optional, tag = "1")]
1685    pub rule: ::core::option::Option<IngestRule>,
1686}
1687#[derive(Clone, PartialEq, ::prost::Message)]
1688pub struct IngestRule {
1689    #[prost(string, tag = "1")]
1690    pub rule_rid: ::prost::alloc::string::String,
1691    #[prost(string, tag = "2")]
1692    pub drive_rid: ::prost::alloc::string::String,
1693    #[prost(message, optional, tag = "3")]
1694    pub matcher: ::core::option::Option<FileMatcher>,
1695    #[prost(message, optional, tag = "4")]
1696    pub triggers: ::core::option::Option<IngestTriggers>,
1697    #[prost(message, optional, tag = "5")]
1698    pub created: ::core::option::Option<Attribution>,
1699    #[prost(enumeration = "IngestRuleState", tag = "6")]
1700    pub state: i32,
1701    #[prost(message, optional, tag = "7")]
1702    pub archived: ::core::option::Option<Attribution>,
1703    #[prost(message, optional, tag = "8")]
1704    pub updated: ::core::option::Option<Attribution>,
1705}
1706#[derive(Clone, PartialEq, ::prost::Message)]
1707pub struct FileMatcher {
1708    #[prost(oneof = "file_matcher::Matcher", tags = "1")]
1709    pub matcher: ::core::option::Option<file_matcher::Matcher>,
1710}
1711/// Nested message and enum types in `FileMatcher`.
1712pub mod file_matcher {
1713    #[derive(Clone, PartialEq, ::prost::Oneof)]
1714    pub enum Matcher {
1715        #[prost(message, tag = "1")]
1716        Path(super::PathMatcher),
1717    }
1718}
1719#[derive(Clone, PartialEq, ::prost::Message)]
1720pub struct PathMatcher {
1721    #[prost(message, optional, tag = "1")]
1722    pub glob: ::core::option::Option<GlobPattern>,
1723}
1724#[derive(Clone, PartialEq, ::prost::Message)]
1725pub struct GlobPattern {
1726    #[prost(message, optional, tag = "1")]
1727    pub first: ::core::option::Option<PatternSegment>,
1728    #[prost(message, repeated, tag = "2")]
1729    pub rest: ::prost::alloc::vec::Vec<JoinedSegment>,
1730}
1731#[derive(Clone, PartialEq, ::prost::Message)]
1732pub struct JoinedSegment {
1733    #[prost(enumeration = "SegmentDelimiter", tag = "1")]
1734    pub delimiter: i32,
1735    #[prost(message, optional, tag = "2")]
1736    pub segment: ::core::option::Option<PatternSegment>,
1737}
1738#[derive(Clone, PartialEq, ::prost::Message)]
1739pub struct PatternSegment {
1740    #[prost(oneof = "pattern_segment::Kind", tags = "1, 2, 3")]
1741    pub kind: ::core::option::Option<pattern_segment::Kind>,
1742}
1743/// Nested message and enum types in `PatternSegment`.
1744pub mod pattern_segment {
1745    #[derive(Clone, PartialEq, ::prost::Oneof)]
1746    pub enum Kind {
1747        #[prost(message, tag = "1")]
1748        Wildcard(super::Wildcard),
1749        #[prost(message, tag = "2")]
1750        Globstar(super::Globstar),
1751        #[prost(string, tag = "3")]
1752        Literal(::prost::alloc::string::String),
1753    }
1754}
1755#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1756pub struct Wildcard {}
1757#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1758pub struct Globstar {}
1759#[derive(Clone, PartialEq, ::prost::Message)]
1760pub struct IngestTriggers {
1761    #[prost(message, optional, tag = "1")]
1762    pub new_match: ::core::option::Option<IngestTarget>,
1763}
1764#[derive(Clone, PartialEq, ::prost::Message)]
1765pub struct IngestTarget {
1766    #[prost(oneof = "ingest_target::Target", tags = "1, 2")]
1767    pub target: ::core::option::Option<ingest_target::Target>,
1768}
1769/// Nested message and enum types in `IngestTarget`.
1770pub mod ingest_target {
1771    #[derive(Clone, PartialEq, ::prost::Oneof)]
1772    pub enum Target {
1773        #[prost(message, tag = "1")]
1774        NewDataset(super::NewDatasetTarget),
1775        #[prost(message, tag = "2")]
1776        ExistingDataset(super::ExistingDatasetTarget),
1777    }
1778}
1779#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1780pub struct NewDatasetTarget {}
1781#[derive(Clone, PartialEq, ::prost::Message)]
1782pub struct ExistingDatasetTarget {
1783    #[prost(string, tag = "1")]
1784    pub dataset_rid: ::prost::alloc::string::String,
1785}
1786#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1787#[repr(i32)]
1788pub enum BackfillMode {
1789    Unspecified = 0,
1790    NewFilesOnly = 1,
1791    BackfillExisting = 2,
1792}
1793impl BackfillMode {
1794    /// String value of the enum field names used in the ProtoBuf definition.
1795    ///
1796    /// The values are not transformed in any way and thus are considered stable
1797    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1798    pub fn as_str_name(&self) -> &'static str {
1799        match self {
1800            Self::Unspecified => "BACKFILL_MODE_UNSPECIFIED",
1801            Self::NewFilesOnly => "BACKFILL_MODE_NEW_FILES_ONLY",
1802            Self::BackfillExisting => "BACKFILL_MODE_BACKFILL_EXISTING",
1803        }
1804    }
1805    /// Creates an enum from field names used in the ProtoBuf definition.
1806    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1807        match value {
1808            "BACKFILL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1809            "BACKFILL_MODE_NEW_FILES_ONLY" => Some(Self::NewFilesOnly),
1810            "BACKFILL_MODE_BACKFILL_EXISTING" => Some(Self::BackfillExisting),
1811            _ => None,
1812        }
1813    }
1814}
1815#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1816#[repr(i32)]
1817pub enum IngestRuleState {
1818    Unspecified = 0,
1819    Active = 1,
1820    Archived = 2,
1821}
1822impl IngestRuleState {
1823    /// String value of the enum field names used in the ProtoBuf definition.
1824    ///
1825    /// The values are not transformed in any way and thus are considered stable
1826    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1827    pub fn as_str_name(&self) -> &'static str {
1828        match self {
1829            Self::Unspecified => "INGEST_RULE_STATE_UNSPECIFIED",
1830            Self::Active => "INGEST_RULE_STATE_ACTIVE",
1831            Self::Archived => "INGEST_RULE_STATE_ARCHIVED",
1832        }
1833    }
1834    /// Creates an enum from field names used in the ProtoBuf definition.
1835    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1836        match value {
1837            "INGEST_RULE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1838            "INGEST_RULE_STATE_ACTIVE" => Some(Self::Active),
1839            "INGEST_RULE_STATE_ARCHIVED" => Some(Self::Archived),
1840            _ => None,
1841        }
1842    }
1843}
1844#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1845#[repr(i32)]
1846pub enum SegmentDelimiter {
1847    Unspecified = 0,
1848    PathSeparator = 1,
1849    Concat = 2,
1850}
1851impl SegmentDelimiter {
1852    /// String value of the enum field names used in the ProtoBuf definition.
1853    ///
1854    /// The values are not transformed in any way and thus are considered stable
1855    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1856    pub fn as_str_name(&self) -> &'static str {
1857        match self {
1858            Self::Unspecified => "SEGMENT_DELIMITER_UNSPECIFIED",
1859            Self::PathSeparator => "SEGMENT_DELIMITER_PATH_SEPARATOR",
1860            Self::Concat => "SEGMENT_DELIMITER_CONCAT",
1861        }
1862    }
1863    /// Creates an enum from field names used in the ProtoBuf definition.
1864    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1865        match value {
1866            "SEGMENT_DELIMITER_UNSPECIFIED" => Some(Self::Unspecified),
1867            "SEGMENT_DELIMITER_PATH_SEPARATOR" => Some(Self::PathSeparator),
1868            "SEGMENT_DELIMITER_CONCAT" => Some(Self::Concat),
1869            _ => None,
1870        }
1871    }
1872}
1873/// Generated client implementations.
1874pub mod internal_ingest_rules_service_client {
1875    #![allow(
1876        unused_variables,
1877        dead_code,
1878        missing_docs,
1879        clippy::wildcard_imports,
1880        clippy::let_unit_value,
1881    )]
1882    use tonic::codegen::*;
1883    use tonic::codegen::http::Uri;
1884    #[derive(Debug, Clone)]
1885    pub struct InternalIngestRulesServiceClient<T> {
1886        inner: tonic::client::Grpc<T>,
1887    }
1888    impl InternalIngestRulesServiceClient<tonic::transport::Channel> {
1889        /// Attempt to create a new client by connecting to a given endpoint.
1890        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1891        where
1892            D: TryInto<tonic::transport::Endpoint>,
1893            D::Error: Into<StdError>,
1894        {
1895            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1896            Ok(Self::new(conn))
1897        }
1898    }
1899    impl<T> InternalIngestRulesServiceClient<T>
1900    where
1901        T: tonic::client::GrpcService<tonic::body::Body>,
1902        T::Error: Into<StdError>,
1903        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1904        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1905    {
1906        pub fn new(inner: T) -> Self {
1907            let inner = tonic::client::Grpc::new(inner);
1908            Self { inner }
1909        }
1910        pub fn with_origin(inner: T, origin: Uri) -> Self {
1911            let inner = tonic::client::Grpc::with_origin(inner, origin);
1912            Self { inner }
1913        }
1914        pub fn with_interceptor<F>(
1915            inner: T,
1916            interceptor: F,
1917        ) -> InternalIngestRulesServiceClient<InterceptedService<T, F>>
1918        where
1919            F: tonic::service::Interceptor,
1920            T::ResponseBody: Default,
1921            T: tonic::codegen::Service<
1922                http::Request<tonic::body::Body>,
1923                Response = http::Response<
1924                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1925                >,
1926            >,
1927            <T as tonic::codegen::Service<
1928                http::Request<tonic::body::Body>,
1929            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1930        {
1931            InternalIngestRulesServiceClient::new(
1932                InterceptedService::new(inner, interceptor),
1933            )
1934        }
1935        /// Compress requests with the given encoding.
1936        ///
1937        /// This requires the server to support it otherwise it might respond with an
1938        /// error.
1939        #[must_use]
1940        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1941            self.inner = self.inner.send_compressed(encoding);
1942            self
1943        }
1944        /// Enable decompressing responses.
1945        #[must_use]
1946        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1947            self.inner = self.inner.accept_compressed(encoding);
1948            self
1949        }
1950        /// Limits the maximum size of a decoded message.
1951        ///
1952        /// Default: `4MB`
1953        #[must_use]
1954        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1955            self.inner = self.inner.max_decoding_message_size(limit);
1956            self
1957        }
1958        /// Limits the maximum size of an encoded message.
1959        ///
1960        /// Default: `usize::MAX`
1961        #[must_use]
1962        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1963            self.inner = self.inner.max_encoding_message_size(limit);
1964            self
1965        }
1966        pub async fn create_ingest_rule(
1967            &mut self,
1968            request: impl tonic::IntoRequest<super::CreateIngestRuleRequest>,
1969        ) -> std::result::Result<
1970            tonic::Response<super::CreateIngestRuleResponse>,
1971            tonic::Status,
1972        > {
1973            self.inner
1974                .ready()
1975                .await
1976                .map_err(|e| {
1977                    tonic::Status::unknown(
1978                        format!("Service was not ready: {}", e.into()),
1979                    )
1980                })?;
1981            let codec = tonic::codec::ProstCodec::default();
1982            let path = http::uri::PathAndQuery::from_static(
1983                "/nominal.file_store.v1.InternalIngestRulesService/CreateIngestRule",
1984            );
1985            let mut req = request.into_request();
1986            req.extensions_mut()
1987                .insert(
1988                    GrpcMethod::new(
1989                        "nominal.file_store.v1.InternalIngestRulesService",
1990                        "CreateIngestRule",
1991                    ),
1992                );
1993            self.inner.unary(req, path, codec).await
1994        }
1995        pub async fn list_ingest_rules(
1996            &mut self,
1997            request: impl tonic::IntoRequest<super::ListIngestRulesRequest>,
1998        ) -> std::result::Result<
1999            tonic::Response<super::ListIngestRulesResponse>,
2000            tonic::Status,
2001        > {
2002            self.inner
2003                .ready()
2004                .await
2005                .map_err(|e| {
2006                    tonic::Status::unknown(
2007                        format!("Service was not ready: {}", e.into()),
2008                    )
2009                })?;
2010            let codec = tonic::codec::ProstCodec::default();
2011            let path = http::uri::PathAndQuery::from_static(
2012                "/nominal.file_store.v1.InternalIngestRulesService/ListIngestRules",
2013            );
2014            let mut req = request.into_request();
2015            req.extensions_mut()
2016                .insert(
2017                    GrpcMethod::new(
2018                        "nominal.file_store.v1.InternalIngestRulesService",
2019                        "ListIngestRules",
2020                    ),
2021                );
2022            self.inner.unary(req, path, codec).await
2023        }
2024        pub async fn get_ingest_rule(
2025            &mut self,
2026            request: impl tonic::IntoRequest<super::GetIngestRuleRequest>,
2027        ) -> std::result::Result<
2028            tonic::Response<super::GetIngestRuleResponse>,
2029            tonic::Status,
2030        > {
2031            self.inner
2032                .ready()
2033                .await
2034                .map_err(|e| {
2035                    tonic::Status::unknown(
2036                        format!("Service was not ready: {}", e.into()),
2037                    )
2038                })?;
2039            let codec = tonic::codec::ProstCodec::default();
2040            let path = http::uri::PathAndQuery::from_static(
2041                "/nominal.file_store.v1.InternalIngestRulesService/GetIngestRule",
2042            );
2043            let mut req = request.into_request();
2044            req.extensions_mut()
2045                .insert(
2046                    GrpcMethod::new(
2047                        "nominal.file_store.v1.InternalIngestRulesService",
2048                        "GetIngestRule",
2049                    ),
2050                );
2051            self.inner.unary(req, path, codec).await
2052        }
2053        pub async fn update_ingest_rule(
2054            &mut self,
2055            request: impl tonic::IntoRequest<super::UpdateIngestRuleRequest>,
2056        ) -> std::result::Result<
2057            tonic::Response<super::UpdateIngestRuleResponse>,
2058            tonic::Status,
2059        > {
2060            self.inner
2061                .ready()
2062                .await
2063                .map_err(|e| {
2064                    tonic::Status::unknown(
2065                        format!("Service was not ready: {}", e.into()),
2066                    )
2067                })?;
2068            let codec = tonic::codec::ProstCodec::default();
2069            let path = http::uri::PathAndQuery::from_static(
2070                "/nominal.file_store.v1.InternalIngestRulesService/UpdateIngestRule",
2071            );
2072            let mut req = request.into_request();
2073            req.extensions_mut()
2074                .insert(
2075                    GrpcMethod::new(
2076                        "nominal.file_store.v1.InternalIngestRulesService",
2077                        "UpdateIngestRule",
2078                    ),
2079                );
2080            self.inner.unary(req, path, codec).await
2081        }
2082        pub async fn archive_ingest_rule(
2083            &mut self,
2084            request: impl tonic::IntoRequest<super::ArchiveIngestRuleRequest>,
2085        ) -> std::result::Result<
2086            tonic::Response<super::ArchiveIngestRuleResponse>,
2087            tonic::Status,
2088        > {
2089            self.inner
2090                .ready()
2091                .await
2092                .map_err(|e| {
2093                    tonic::Status::unknown(
2094                        format!("Service was not ready: {}", e.into()),
2095                    )
2096                })?;
2097            let codec = tonic::codec::ProstCodec::default();
2098            let path = http::uri::PathAndQuery::from_static(
2099                "/nominal.file_store.v1.InternalIngestRulesService/ArchiveIngestRule",
2100            );
2101            let mut req = request.into_request();
2102            req.extensions_mut()
2103                .insert(
2104                    GrpcMethod::new(
2105                        "nominal.file_store.v1.InternalIngestRulesService",
2106                        "ArchiveIngestRule",
2107                    ),
2108                );
2109            self.inner.unary(req, path, codec).await
2110        }
2111        pub async fn unarchive_ingest_rule(
2112            &mut self,
2113            request: impl tonic::IntoRequest<super::UnarchiveIngestRuleRequest>,
2114        ) -> std::result::Result<
2115            tonic::Response<super::UnarchiveIngestRuleResponse>,
2116            tonic::Status,
2117        > {
2118            self.inner
2119                .ready()
2120                .await
2121                .map_err(|e| {
2122                    tonic::Status::unknown(
2123                        format!("Service was not ready: {}", e.into()),
2124                    )
2125                })?;
2126            let codec = tonic::codec::ProstCodec::default();
2127            let path = http::uri::PathAndQuery::from_static(
2128                "/nominal.file_store.v1.InternalIngestRulesService/UnarchiveIngestRule",
2129            );
2130            let mut req = request.into_request();
2131            req.extensions_mut()
2132                .insert(
2133                    GrpcMethod::new(
2134                        "nominal.file_store.v1.InternalIngestRulesService",
2135                        "UnarchiveIngestRule",
2136                    ),
2137                );
2138            self.inner.unary(req, path, codec).await
2139        }
2140    }
2141}