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