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 GetFileResponse {
1284    #[prost(message, optional, tag = "1")]
1285    pub file: ::core::option::Option<LogicalFile>,
1286}
1287#[derive(Clone, PartialEq, ::prost::Message)]
1288pub struct ResolveFileRevisionRequest {
1289    #[prost(message, optional, tag = "2")]
1290    pub source_ref: ::core::option::Option<FileRevisionRef>,
1291}
1292#[derive(Clone, PartialEq, ::prost::Message)]
1293pub struct ResolveFileRevisionResponse {
1294    #[prost(string, tag = "1")]
1295    pub file_revision_rid: ::prost::alloc::string::String,
1296}
1297#[derive(Clone, PartialEq, ::prost::Message)]
1298pub struct ListFilesRequest {
1299    #[prost(string, tag = "1")]
1300    pub drive_rid: ::prost::alloc::string::String,
1301    #[prost(message, optional, tag = "2")]
1302    pub parent_path: ::core::option::Option<LogicalPath>,
1303    #[prost(bool, tag = "3")]
1304    pub include_removed: bool,
1305    #[prost(int32, optional, tag = "4")]
1306    pub page_size: ::core::option::Option<i32>,
1307    #[prost(string, optional, tag = "5")]
1308    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1309}
1310#[derive(Clone, PartialEq, ::prost::Message)]
1311pub struct ListFilesResponse {
1312    #[prost(message, repeated, tag = "1")]
1313    pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1314    #[prost(string, optional, tag = "2")]
1315    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1316}
1317#[derive(Clone, PartialEq, ::prost::Message)]
1318pub struct ApplyFileChangesRequest {
1319    #[prost(string, tag = "1")]
1320    pub drive_rid: ::prost::alloc::string::String,
1321    #[prost(message, repeated, tag = "2")]
1322    pub changes: ::prost::alloc::vec::Vec<FileChange>,
1323}
1324#[derive(Clone, PartialEq, ::prost::Message)]
1325pub struct ApplyFileChangesResponse {
1326    #[prost(message, repeated, tag = "1")]
1327    pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1328}
1329#[derive(Clone, PartialEq, ::prost::Message)]
1330pub struct FileChangeSuccess {
1331    #[prost(message, optional, tag = "1")]
1332    pub file: ::core::option::Option<LogicalFile>,
1333    #[prost(message, optional, tag = "2")]
1334    pub file_revision: ::core::option::Option<ManagedFileRevision>,
1335}
1336#[derive(Clone, PartialEq, ::prost::Message)]
1337pub struct FileChangeFailure {
1338    #[prost(enumeration = "FileStoreError", tag = "1")]
1339    pub code: i32,
1340    #[prost(string, tag = "2")]
1341    pub message: ::prost::alloc::string::String,
1342}
1343#[derive(Clone, PartialEq, ::prost::Message)]
1344pub struct FileChangeResult {
1345    #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1346    pub result: ::core::option::Option<file_change_result::Result>,
1347}
1348/// Nested message and enum types in `FileChangeResult`.
1349pub mod file_change_result {
1350    #[derive(Clone, PartialEq, ::prost::Oneof)]
1351    pub enum Result {
1352        #[prost(message, tag = "1")]
1353        Success(super::FileChangeSuccess),
1354        #[prost(message, tag = "2")]
1355        Failure(super::FileChangeFailure),
1356    }
1357}
1358#[derive(Clone, PartialEq, ::prost::Message)]
1359pub struct ListFileRevisionsRequest {
1360    #[prost(string, tag = "1")]
1361    pub drive_rid: ::prost::alloc::string::String,
1362    #[prost(string, tag = "2")]
1363    pub file_rid: ::prost::alloc::string::String,
1364    #[prost(int32, optional, tag = "3")]
1365    pub page_size: ::core::option::Option<i32>,
1366    #[prost(string, optional, tag = "4")]
1367    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1368}
1369#[derive(Clone, PartialEq, ::prost::Message)]
1370pub struct ListFileRevisionsResponse {
1371    #[prost(message, repeated, tag = "1")]
1372    pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1373    #[prost(string, optional, tag = "2")]
1374    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1375}
1376#[derive(Clone, PartialEq, ::prost::Message)]
1377pub struct PurgeFileRequest {
1378    #[prost(string, tag = "1")]
1379    pub file_revision_rid: ::prost::alloc::string::String,
1380}
1381#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1382pub struct PurgeFileResponse {}
1383#[derive(Clone, PartialEq, ::prost::Message)]
1384pub struct GetDownloadUrlRequest {
1385    #[prost(string, tag = "1")]
1386    pub file_revision_rid: ::prost::alloc::string::String,
1387}
1388#[derive(Clone, PartialEq, ::prost::Message)]
1389pub struct GetDownloadUrlResponse {
1390    #[prost(string, tag = "1")]
1391    pub url: ::prost::alloc::string::String,
1392}
1393/// Generated client implementations.
1394pub mod files_service_client {
1395    #![allow(
1396        unused_variables,
1397        dead_code,
1398        missing_docs,
1399        clippy::wildcard_imports,
1400        clippy::let_unit_value,
1401    )]
1402    use tonic::codegen::*;
1403    use tonic::codegen::http::Uri;
1404    #[derive(Debug, Clone)]
1405    pub struct FilesServiceClient<T> {
1406        inner: tonic::client::Grpc<T>,
1407    }
1408    impl FilesServiceClient<tonic::transport::Channel> {
1409        /// Attempt to create a new client by connecting to a given endpoint.
1410        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1411        where
1412            D: TryInto<tonic::transport::Endpoint>,
1413            D::Error: Into<StdError>,
1414        {
1415            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1416            Ok(Self::new(conn))
1417        }
1418    }
1419    impl<T> FilesServiceClient<T>
1420    where
1421        T: tonic::client::GrpcService<tonic::body::Body>,
1422        T::Error: Into<StdError>,
1423        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1424        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1425    {
1426        pub fn new(inner: T) -> Self {
1427            let inner = tonic::client::Grpc::new(inner);
1428            Self { inner }
1429        }
1430        pub fn with_origin(inner: T, origin: Uri) -> Self {
1431            let inner = tonic::client::Grpc::with_origin(inner, origin);
1432            Self { inner }
1433        }
1434        pub fn with_interceptor<F>(
1435            inner: T,
1436            interceptor: F,
1437        ) -> FilesServiceClient<InterceptedService<T, F>>
1438        where
1439            F: tonic::service::Interceptor,
1440            T::ResponseBody: Default,
1441            T: tonic::codegen::Service<
1442                http::Request<tonic::body::Body>,
1443                Response = http::Response<
1444                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1445                >,
1446            >,
1447            <T as tonic::codegen::Service<
1448                http::Request<tonic::body::Body>,
1449            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1450        {
1451            FilesServiceClient::new(InterceptedService::new(inner, interceptor))
1452        }
1453        /// Compress requests with the given encoding.
1454        ///
1455        /// This requires the server to support it otherwise it might respond with an
1456        /// error.
1457        #[must_use]
1458        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1459            self.inner = self.inner.send_compressed(encoding);
1460            self
1461        }
1462        /// Enable decompressing responses.
1463        #[must_use]
1464        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1465            self.inner = self.inner.accept_compressed(encoding);
1466            self
1467        }
1468        /// Limits the maximum size of a decoded message.
1469        ///
1470        /// Default: `4MB`
1471        #[must_use]
1472        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1473            self.inner = self.inner.max_decoding_message_size(limit);
1474            self
1475        }
1476        /// Limits the maximum size of an encoded message.
1477        ///
1478        /// Default: `usize::MAX`
1479        #[must_use]
1480        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1481            self.inner = self.inner.max_encoding_message_size(limit);
1482            self
1483        }
1484        pub async fn get_file(
1485            &mut self,
1486            request: impl tonic::IntoRequest<super::GetFileRequest>,
1487        ) -> std::result::Result<
1488            tonic::Response<super::GetFileResponse>,
1489            tonic::Status,
1490        > {
1491            self.inner
1492                .ready()
1493                .await
1494                .map_err(|e| {
1495                    tonic::Status::unknown(
1496                        format!("Service was not ready: {}", e.into()),
1497                    )
1498                })?;
1499            let codec = tonic::codec::ProstCodec::default();
1500            let path = http::uri::PathAndQuery::from_static(
1501                "/nominal.file_store.v1.FilesService/GetFile",
1502            );
1503            let mut req = request.into_request();
1504            req.extensions_mut()
1505                .insert(
1506                    GrpcMethod::new("nominal.file_store.v1.FilesService", "GetFile"),
1507                );
1508            self.inner.unary(req, path, codec).await
1509        }
1510        pub async fn resolve_file_revision(
1511            &mut self,
1512            request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
1513        ) -> std::result::Result<
1514            tonic::Response<super::ResolveFileRevisionResponse>,
1515            tonic::Status,
1516        > {
1517            self.inner
1518                .ready()
1519                .await
1520                .map_err(|e| {
1521                    tonic::Status::unknown(
1522                        format!("Service was not ready: {}", e.into()),
1523                    )
1524                })?;
1525            let codec = tonic::codec::ProstCodec::default();
1526            let path = http::uri::PathAndQuery::from_static(
1527                "/nominal.file_store.v1.FilesService/ResolveFileRevision",
1528            );
1529            let mut req = request.into_request();
1530            req.extensions_mut()
1531                .insert(
1532                    GrpcMethod::new(
1533                        "nominal.file_store.v1.FilesService",
1534                        "ResolveFileRevision",
1535                    ),
1536                );
1537            self.inner.unary(req, path, codec).await
1538        }
1539        pub async fn list_files(
1540            &mut self,
1541            request: impl tonic::IntoRequest<super::ListFilesRequest>,
1542        ) -> std::result::Result<
1543            tonic::Response<super::ListFilesResponse>,
1544            tonic::Status,
1545        > {
1546            self.inner
1547                .ready()
1548                .await
1549                .map_err(|e| {
1550                    tonic::Status::unknown(
1551                        format!("Service was not ready: {}", e.into()),
1552                    )
1553                })?;
1554            let codec = tonic::codec::ProstCodec::default();
1555            let path = http::uri::PathAndQuery::from_static(
1556                "/nominal.file_store.v1.FilesService/ListFiles",
1557            );
1558            let mut req = request.into_request();
1559            req.extensions_mut()
1560                .insert(
1561                    GrpcMethod::new("nominal.file_store.v1.FilesService", "ListFiles"),
1562                );
1563            self.inner.unary(req, path, codec).await
1564        }
1565        pub async fn apply_file_changes(
1566            &mut self,
1567            request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
1568        ) -> std::result::Result<
1569            tonic::Response<super::ApplyFileChangesResponse>,
1570            tonic::Status,
1571        > {
1572            self.inner
1573                .ready()
1574                .await
1575                .map_err(|e| {
1576                    tonic::Status::unknown(
1577                        format!("Service was not ready: {}", e.into()),
1578                    )
1579                })?;
1580            let codec = tonic::codec::ProstCodec::default();
1581            let path = http::uri::PathAndQuery::from_static(
1582                "/nominal.file_store.v1.FilesService/ApplyFileChanges",
1583            );
1584            let mut req = request.into_request();
1585            req.extensions_mut()
1586                .insert(
1587                    GrpcMethod::new(
1588                        "nominal.file_store.v1.FilesService",
1589                        "ApplyFileChanges",
1590                    ),
1591                );
1592            self.inner.unary(req, path, codec).await
1593        }
1594        pub async fn list_file_revisions(
1595            &mut self,
1596            request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
1597        ) -> std::result::Result<
1598            tonic::Response<super::ListFileRevisionsResponse>,
1599            tonic::Status,
1600        > {
1601            self.inner
1602                .ready()
1603                .await
1604                .map_err(|e| {
1605                    tonic::Status::unknown(
1606                        format!("Service was not ready: {}", e.into()),
1607                    )
1608                })?;
1609            let codec = tonic::codec::ProstCodec::default();
1610            let path = http::uri::PathAndQuery::from_static(
1611                "/nominal.file_store.v1.FilesService/ListFileRevisions",
1612            );
1613            let mut req = request.into_request();
1614            req.extensions_mut()
1615                .insert(
1616                    GrpcMethod::new(
1617                        "nominal.file_store.v1.FilesService",
1618                        "ListFileRevisions",
1619                    ),
1620                );
1621            self.inner.unary(req, path, codec).await
1622        }
1623        pub async fn purge_file(
1624            &mut self,
1625            request: impl tonic::IntoRequest<super::PurgeFileRequest>,
1626        ) -> std::result::Result<
1627            tonic::Response<super::PurgeFileResponse>,
1628            tonic::Status,
1629        > {
1630            self.inner
1631                .ready()
1632                .await
1633                .map_err(|e| {
1634                    tonic::Status::unknown(
1635                        format!("Service was not ready: {}", e.into()),
1636                    )
1637                })?;
1638            let codec = tonic::codec::ProstCodec::default();
1639            let path = http::uri::PathAndQuery::from_static(
1640                "/nominal.file_store.v1.FilesService/PurgeFile",
1641            );
1642            let mut req = request.into_request();
1643            req.extensions_mut()
1644                .insert(
1645                    GrpcMethod::new("nominal.file_store.v1.FilesService", "PurgeFile"),
1646                );
1647            self.inner.unary(req, path, codec).await
1648        }
1649        pub async fn get_download_url(
1650            &mut self,
1651            request: impl tonic::IntoRequest<super::GetDownloadUrlRequest>,
1652        ) -> std::result::Result<
1653            tonic::Response<super::GetDownloadUrlResponse>,
1654            tonic::Status,
1655        > {
1656            self.inner
1657                .ready()
1658                .await
1659                .map_err(|e| {
1660                    tonic::Status::unknown(
1661                        format!("Service was not ready: {}", e.into()),
1662                    )
1663                })?;
1664            let codec = tonic::codec::ProstCodec::default();
1665            let path = http::uri::PathAndQuery::from_static(
1666                "/nominal.file_store.v1.FilesService/GetDownloadUrl",
1667            );
1668            let mut req = request.into_request();
1669            req.extensions_mut()
1670                .insert(
1671                    GrpcMethod::new(
1672                        "nominal.file_store.v1.FilesService",
1673                        "GetDownloadUrl",
1674                    ),
1675                );
1676            self.inner.unary(req, path, codec).await
1677        }
1678    }
1679}
1680#[derive(Clone, PartialEq, ::prost::Message)]
1681pub struct CreateIngestRuleRequest {
1682    #[prost(string, tag = "1")]
1683    pub drive_rid: ::prost::alloc::string::String,
1684    #[prost(message, optional, tag = "2")]
1685    pub matcher: ::core::option::Option<FileMatcher>,
1686    #[prost(message, optional, tag = "3")]
1687    pub triggers: ::core::option::Option<IngestTriggers>,
1688    #[prost(enumeration = "BackfillMode", tag = "4")]
1689    pub backfill_mode: i32,
1690}
1691#[derive(Clone, PartialEq, ::prost::Message)]
1692pub struct CreateIngestRuleResponse {
1693    #[prost(message, optional, tag = "1")]
1694    pub rule: ::core::option::Option<IngestRule>,
1695}
1696#[derive(Clone, PartialEq, ::prost::Message)]
1697pub struct ListIngestRulesRequest {
1698    #[prost(string, tag = "1")]
1699    pub drive_rid: ::prost::alloc::string::String,
1700    #[prost(bool, tag = "2")]
1701    pub include_archived: bool,
1702    #[prost(int32, optional, tag = "3")]
1703    pub page_size: ::core::option::Option<i32>,
1704    #[prost(string, optional, tag = "4")]
1705    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1706}
1707#[derive(Clone, PartialEq, ::prost::Message)]
1708pub struct ListIngestRulesResponse {
1709    #[prost(message, repeated, tag = "1")]
1710    pub rules: ::prost::alloc::vec::Vec<IngestRule>,
1711    #[prost(string, optional, tag = "2")]
1712    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1713}
1714#[derive(Clone, PartialEq, ::prost::Message)]
1715pub struct GetIngestRuleRequest {
1716    #[prost(string, tag = "1")]
1717    pub rule_rid: ::prost::alloc::string::String,
1718}
1719#[derive(Clone, PartialEq, ::prost::Message)]
1720pub struct GetIngestRuleResponse {
1721    #[prost(message, optional, tag = "1")]
1722    pub rule: ::core::option::Option<IngestRule>,
1723}
1724#[derive(Clone, PartialEq, ::prost::Message)]
1725pub struct UpdateIngestRuleRequest {
1726    #[prost(string, tag = "1")]
1727    pub rule_rid: ::prost::alloc::string::String,
1728    #[prost(message, optional, tag = "2")]
1729    pub matcher: ::core::option::Option<FileMatcher>,
1730    #[prost(message, optional, tag = "3")]
1731    pub triggers: ::core::option::Option<IngestTriggers>,
1732}
1733#[derive(Clone, PartialEq, ::prost::Message)]
1734pub struct UpdateIngestRuleResponse {
1735    #[prost(message, optional, tag = "1")]
1736    pub rule: ::core::option::Option<IngestRule>,
1737}
1738#[derive(Clone, PartialEq, ::prost::Message)]
1739pub struct ArchiveIngestRuleRequest {
1740    #[prost(string, tag = "1")]
1741    pub rule_rid: ::prost::alloc::string::String,
1742}
1743#[derive(Clone, PartialEq, ::prost::Message)]
1744pub struct ArchiveIngestRuleResponse {
1745    #[prost(message, optional, tag = "1")]
1746    pub rule: ::core::option::Option<IngestRule>,
1747}
1748#[derive(Clone, PartialEq, ::prost::Message)]
1749pub struct UnarchiveIngestRuleRequest {
1750    #[prost(string, tag = "1")]
1751    pub rule_rid: ::prost::alloc::string::String,
1752    #[prost(enumeration = "BackfillMode", tag = "2")]
1753    pub backfill_mode: i32,
1754}
1755#[derive(Clone, PartialEq, ::prost::Message)]
1756pub struct UnarchiveIngestRuleResponse {
1757    #[prost(message, optional, tag = "1")]
1758    pub rule: ::core::option::Option<IngestRule>,
1759}
1760#[derive(Clone, PartialEq, ::prost::Message)]
1761pub struct IngestRule {
1762    #[prost(string, tag = "1")]
1763    pub rule_rid: ::prost::alloc::string::String,
1764    #[prost(string, tag = "2")]
1765    pub drive_rid: ::prost::alloc::string::String,
1766    #[prost(message, optional, tag = "3")]
1767    pub matcher: ::core::option::Option<FileMatcher>,
1768    #[prost(message, optional, tag = "4")]
1769    pub triggers: ::core::option::Option<IngestTriggers>,
1770    #[prost(message, optional, tag = "5")]
1771    pub created: ::core::option::Option<Attribution>,
1772    #[prost(enumeration = "IngestRuleState", tag = "6")]
1773    pub state: i32,
1774    #[prost(message, optional, tag = "7")]
1775    pub archived: ::core::option::Option<Attribution>,
1776    #[prost(message, optional, tag = "8")]
1777    pub updated: ::core::option::Option<Attribution>,
1778}
1779#[derive(Clone, PartialEq, ::prost::Message)]
1780pub struct FileMatcher {
1781    #[prost(oneof = "file_matcher::Matcher", tags = "1")]
1782    pub matcher: ::core::option::Option<file_matcher::Matcher>,
1783}
1784/// Nested message and enum types in `FileMatcher`.
1785pub mod file_matcher {
1786    #[derive(Clone, PartialEq, ::prost::Oneof)]
1787    pub enum Matcher {
1788        #[prost(message, tag = "1")]
1789        Path(super::PathMatcher),
1790    }
1791}
1792#[derive(Clone, PartialEq, ::prost::Message)]
1793pub struct PathMatcher {
1794    #[prost(message, optional, tag = "1")]
1795    pub pattern: ::core::option::Option<PathPattern>,
1796    #[prost(message, optional, tag = "2")]
1797    pub format: ::core::option::Option<FormatConfig>,
1798}
1799#[derive(Clone, PartialEq, ::prost::Message)]
1800pub struct FormatConfig {
1801    #[prost(oneof = "format_config::Format", tags = "1, 2")]
1802    pub format: ::core::option::Option<format_config::Format>,
1803}
1804/// Nested message and enum types in `FormatConfig`.
1805pub mod format_config {
1806    #[derive(Clone, PartialEq, ::prost::Oneof)]
1807    pub enum Format {
1808        #[prost(message, tag = "1")]
1809        Csv(super::CsvIngestConfig),
1810        #[prost(message, tag = "2")]
1811        Parquet(super::ParquetIngestConfig),
1812    }
1813}
1814#[derive(Clone, PartialEq, ::prost::Message)]
1815pub struct CsvIngestConfig {
1816    #[prost(message, optional, tag = "1")]
1817    pub timestamp: ::core::option::Option<TimestampConfig>,
1818    #[prost(string, optional, tag = "2")]
1819    pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
1820}
1821#[derive(Clone, PartialEq, ::prost::Message)]
1822pub struct ParquetIngestConfig {
1823    #[prost(message, optional, tag = "1")]
1824    pub timestamp: ::core::option::Option<TimestampConfig>,
1825    #[prost(string, optional, tag = "2")]
1826    pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
1827}
1828#[derive(Clone, PartialEq, ::prost::Message)]
1829pub struct TimestampConfig {
1830    #[prost(oneof = "timestamp_config::Kind", tags = "1")]
1831    pub kind: ::core::option::Option<timestamp_config::Kind>,
1832}
1833/// Nested message and enum types in `TimestampConfig`.
1834pub mod timestamp_config {
1835    #[derive(Clone, PartialEq, ::prost::Oneof)]
1836    pub enum Kind {
1837        #[prost(message, tag = "1")]
1838        Single(super::TimestampCandidate),
1839    }
1840}
1841#[derive(Clone, PartialEq, ::prost::Message)]
1842pub struct TimestampCandidate {
1843    #[prost(string, tag = "1")]
1844    pub column: ::prost::alloc::string::String,
1845    #[prost(message, optional, tag = "2")]
1846    pub r#type: ::core::option::Option<super::super::types::time::AbsoluteTimestamp>,
1847}
1848#[derive(Clone, PartialEq, ::prost::Message)]
1849pub struct PathPattern {
1850    #[prost(message, optional, tag = "1")]
1851    pub first: ::core::option::Option<PatternSegment>,
1852    #[prost(message, repeated, tag = "2")]
1853    pub rest: ::prost::alloc::vec::Vec<JoinedSegment>,
1854}
1855#[derive(Clone, PartialEq, ::prost::Message)]
1856pub struct JoinedSegment {
1857    #[prost(enumeration = "SegmentDelimiter", tag = "1")]
1858    pub delimiter: i32,
1859    #[prost(message, optional, tag = "2")]
1860    pub segment: ::core::option::Option<PatternSegment>,
1861}
1862#[derive(Clone, PartialEq, ::prost::Message)]
1863pub struct PatternSegment {
1864    #[prost(oneof = "pattern_segment::Kind", tags = "1, 2, 3")]
1865    pub kind: ::core::option::Option<pattern_segment::Kind>,
1866}
1867/// Nested message and enum types in `PatternSegment`.
1868pub mod pattern_segment {
1869    #[derive(Clone, PartialEq, ::prost::Oneof)]
1870    pub enum Kind {
1871        #[prost(message, tag = "1")]
1872        ShallowWildcard(super::ShallowWildcard),
1873        #[prost(message, tag = "2")]
1874        DeepWildcard(super::DeepWildcard),
1875        #[prost(string, tag = "3")]
1876        Literal(::prost::alloc::string::String),
1877    }
1878}
1879#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1880pub struct ShallowWildcard {}
1881#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1882pub struct DeepWildcard {}
1883#[derive(Clone, PartialEq, ::prost::Message)]
1884pub struct IngestTriggers {
1885    #[prost(message, optional, tag = "1")]
1886    pub new_match: ::core::option::Option<IngestTarget>,
1887}
1888#[derive(Clone, PartialEq, ::prost::Message)]
1889pub struct IngestTarget {
1890    #[prost(oneof = "ingest_target::Target", tags = "1, 2")]
1891    pub target: ::core::option::Option<ingest_target::Target>,
1892}
1893/// Nested message and enum types in `IngestTarget`.
1894pub mod ingest_target {
1895    #[derive(Clone, PartialEq, ::prost::Oneof)]
1896    pub enum Target {
1897        #[prost(message, tag = "1")]
1898        NewDataset(super::NewDatasetTarget),
1899        #[prost(message, tag = "2")]
1900        ExistingDataset(super::ExistingDatasetTarget),
1901    }
1902}
1903#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1904pub struct NewDatasetTarget {}
1905#[derive(Clone, PartialEq, ::prost::Message)]
1906pub struct ExistingDatasetTarget {
1907    #[prost(string, tag = "1")]
1908    pub dataset_rid: ::prost::alloc::string::String,
1909}
1910#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1911#[repr(i32)]
1912pub enum BackfillMode {
1913    Unspecified = 0,
1914    NewFilesOnly = 1,
1915    BackfillExisting = 2,
1916}
1917impl BackfillMode {
1918    /// String value of the enum field names used in the ProtoBuf definition.
1919    ///
1920    /// The values are not transformed in any way and thus are considered stable
1921    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1922    pub fn as_str_name(&self) -> &'static str {
1923        match self {
1924            Self::Unspecified => "BACKFILL_MODE_UNSPECIFIED",
1925            Self::NewFilesOnly => "BACKFILL_MODE_NEW_FILES_ONLY",
1926            Self::BackfillExisting => "BACKFILL_MODE_BACKFILL_EXISTING",
1927        }
1928    }
1929    /// Creates an enum from field names used in the ProtoBuf definition.
1930    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1931        match value {
1932            "BACKFILL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1933            "BACKFILL_MODE_NEW_FILES_ONLY" => Some(Self::NewFilesOnly),
1934            "BACKFILL_MODE_BACKFILL_EXISTING" => Some(Self::BackfillExisting),
1935            _ => None,
1936        }
1937    }
1938}
1939#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1940#[repr(i32)]
1941pub enum IngestRuleState {
1942    Unspecified = 0,
1943    Active = 1,
1944    Archived = 2,
1945}
1946impl IngestRuleState {
1947    /// String value of the enum field names used in the ProtoBuf definition.
1948    ///
1949    /// The values are not transformed in any way and thus are considered stable
1950    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1951    pub fn as_str_name(&self) -> &'static str {
1952        match self {
1953            Self::Unspecified => "INGEST_RULE_STATE_UNSPECIFIED",
1954            Self::Active => "INGEST_RULE_STATE_ACTIVE",
1955            Self::Archived => "INGEST_RULE_STATE_ARCHIVED",
1956        }
1957    }
1958    /// Creates an enum from field names used in the ProtoBuf definition.
1959    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1960        match value {
1961            "INGEST_RULE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1962            "INGEST_RULE_STATE_ACTIVE" => Some(Self::Active),
1963            "INGEST_RULE_STATE_ARCHIVED" => Some(Self::Archived),
1964            _ => None,
1965        }
1966    }
1967}
1968#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1969#[repr(i32)]
1970pub enum SegmentDelimiter {
1971    Unspecified = 0,
1972    PathSeparator = 1,
1973    Concat = 2,
1974}
1975impl SegmentDelimiter {
1976    /// String value of the enum field names used in the ProtoBuf definition.
1977    ///
1978    /// The values are not transformed in any way and thus are considered stable
1979    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1980    pub fn as_str_name(&self) -> &'static str {
1981        match self {
1982            Self::Unspecified => "SEGMENT_DELIMITER_UNSPECIFIED",
1983            Self::PathSeparator => "SEGMENT_DELIMITER_PATH_SEPARATOR",
1984            Self::Concat => "SEGMENT_DELIMITER_CONCAT",
1985        }
1986    }
1987    /// Creates an enum from field names used in the ProtoBuf definition.
1988    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1989        match value {
1990            "SEGMENT_DELIMITER_UNSPECIFIED" => Some(Self::Unspecified),
1991            "SEGMENT_DELIMITER_PATH_SEPARATOR" => Some(Self::PathSeparator),
1992            "SEGMENT_DELIMITER_CONCAT" => Some(Self::Concat),
1993            _ => None,
1994        }
1995    }
1996}
1997/// Generated client implementations.
1998pub mod internal_ingest_rules_service_client {
1999    #![allow(
2000        unused_variables,
2001        dead_code,
2002        missing_docs,
2003        clippy::wildcard_imports,
2004        clippy::let_unit_value,
2005    )]
2006    use tonic::codegen::*;
2007    use tonic::codegen::http::Uri;
2008    #[derive(Debug, Clone)]
2009    pub struct InternalIngestRulesServiceClient<T> {
2010        inner: tonic::client::Grpc<T>,
2011    }
2012    impl InternalIngestRulesServiceClient<tonic::transport::Channel> {
2013        /// Attempt to create a new client by connecting to a given endpoint.
2014        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2015        where
2016            D: TryInto<tonic::transport::Endpoint>,
2017            D::Error: Into<StdError>,
2018        {
2019            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2020            Ok(Self::new(conn))
2021        }
2022    }
2023    impl<T> InternalIngestRulesServiceClient<T>
2024    where
2025        T: tonic::client::GrpcService<tonic::body::Body>,
2026        T::Error: Into<StdError>,
2027        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2028        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2029    {
2030        pub fn new(inner: T) -> Self {
2031            let inner = tonic::client::Grpc::new(inner);
2032            Self { inner }
2033        }
2034        pub fn with_origin(inner: T, origin: Uri) -> Self {
2035            let inner = tonic::client::Grpc::with_origin(inner, origin);
2036            Self { inner }
2037        }
2038        pub fn with_interceptor<F>(
2039            inner: T,
2040            interceptor: F,
2041        ) -> InternalIngestRulesServiceClient<InterceptedService<T, F>>
2042        where
2043            F: tonic::service::Interceptor,
2044            T::ResponseBody: Default,
2045            T: tonic::codegen::Service<
2046                http::Request<tonic::body::Body>,
2047                Response = http::Response<
2048                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2049                >,
2050            >,
2051            <T as tonic::codegen::Service<
2052                http::Request<tonic::body::Body>,
2053            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2054        {
2055            InternalIngestRulesServiceClient::new(
2056                InterceptedService::new(inner, interceptor),
2057            )
2058        }
2059        /// Compress requests with the given encoding.
2060        ///
2061        /// This requires the server to support it otherwise it might respond with an
2062        /// error.
2063        #[must_use]
2064        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2065            self.inner = self.inner.send_compressed(encoding);
2066            self
2067        }
2068        /// Enable decompressing responses.
2069        #[must_use]
2070        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2071            self.inner = self.inner.accept_compressed(encoding);
2072            self
2073        }
2074        /// Limits the maximum size of a decoded message.
2075        ///
2076        /// Default: `4MB`
2077        #[must_use]
2078        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2079            self.inner = self.inner.max_decoding_message_size(limit);
2080            self
2081        }
2082        /// Limits the maximum size of an encoded message.
2083        ///
2084        /// Default: `usize::MAX`
2085        #[must_use]
2086        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2087            self.inner = self.inner.max_encoding_message_size(limit);
2088            self
2089        }
2090        pub async fn create_ingest_rule(
2091            &mut self,
2092            request: impl tonic::IntoRequest<super::CreateIngestRuleRequest>,
2093        ) -> std::result::Result<
2094            tonic::Response<super::CreateIngestRuleResponse>,
2095            tonic::Status,
2096        > {
2097            self.inner
2098                .ready()
2099                .await
2100                .map_err(|e| {
2101                    tonic::Status::unknown(
2102                        format!("Service was not ready: {}", e.into()),
2103                    )
2104                })?;
2105            let codec = tonic::codec::ProstCodec::default();
2106            let path = http::uri::PathAndQuery::from_static(
2107                "/nominal.file_store.v1.InternalIngestRulesService/CreateIngestRule",
2108            );
2109            let mut req = request.into_request();
2110            req.extensions_mut()
2111                .insert(
2112                    GrpcMethod::new(
2113                        "nominal.file_store.v1.InternalIngestRulesService",
2114                        "CreateIngestRule",
2115                    ),
2116                );
2117            self.inner.unary(req, path, codec).await
2118        }
2119        pub async fn list_ingest_rules(
2120            &mut self,
2121            request: impl tonic::IntoRequest<super::ListIngestRulesRequest>,
2122        ) -> std::result::Result<
2123            tonic::Response<super::ListIngestRulesResponse>,
2124            tonic::Status,
2125        > {
2126            self.inner
2127                .ready()
2128                .await
2129                .map_err(|e| {
2130                    tonic::Status::unknown(
2131                        format!("Service was not ready: {}", e.into()),
2132                    )
2133                })?;
2134            let codec = tonic::codec::ProstCodec::default();
2135            let path = http::uri::PathAndQuery::from_static(
2136                "/nominal.file_store.v1.InternalIngestRulesService/ListIngestRules",
2137            );
2138            let mut req = request.into_request();
2139            req.extensions_mut()
2140                .insert(
2141                    GrpcMethod::new(
2142                        "nominal.file_store.v1.InternalIngestRulesService",
2143                        "ListIngestRules",
2144                    ),
2145                );
2146            self.inner.unary(req, path, codec).await
2147        }
2148        pub async fn get_ingest_rule(
2149            &mut self,
2150            request: impl tonic::IntoRequest<super::GetIngestRuleRequest>,
2151        ) -> std::result::Result<
2152            tonic::Response<super::GetIngestRuleResponse>,
2153            tonic::Status,
2154        > {
2155            self.inner
2156                .ready()
2157                .await
2158                .map_err(|e| {
2159                    tonic::Status::unknown(
2160                        format!("Service was not ready: {}", e.into()),
2161                    )
2162                })?;
2163            let codec = tonic::codec::ProstCodec::default();
2164            let path = http::uri::PathAndQuery::from_static(
2165                "/nominal.file_store.v1.InternalIngestRulesService/GetIngestRule",
2166            );
2167            let mut req = request.into_request();
2168            req.extensions_mut()
2169                .insert(
2170                    GrpcMethod::new(
2171                        "nominal.file_store.v1.InternalIngestRulesService",
2172                        "GetIngestRule",
2173                    ),
2174                );
2175            self.inner.unary(req, path, codec).await
2176        }
2177        pub async fn update_ingest_rule(
2178            &mut self,
2179            request: impl tonic::IntoRequest<super::UpdateIngestRuleRequest>,
2180        ) -> std::result::Result<
2181            tonic::Response<super::UpdateIngestRuleResponse>,
2182            tonic::Status,
2183        > {
2184            self.inner
2185                .ready()
2186                .await
2187                .map_err(|e| {
2188                    tonic::Status::unknown(
2189                        format!("Service was not ready: {}", e.into()),
2190                    )
2191                })?;
2192            let codec = tonic::codec::ProstCodec::default();
2193            let path = http::uri::PathAndQuery::from_static(
2194                "/nominal.file_store.v1.InternalIngestRulesService/UpdateIngestRule",
2195            );
2196            let mut req = request.into_request();
2197            req.extensions_mut()
2198                .insert(
2199                    GrpcMethod::new(
2200                        "nominal.file_store.v1.InternalIngestRulesService",
2201                        "UpdateIngestRule",
2202                    ),
2203                );
2204            self.inner.unary(req, path, codec).await
2205        }
2206        pub async fn archive_ingest_rule(
2207            &mut self,
2208            request: impl tonic::IntoRequest<super::ArchiveIngestRuleRequest>,
2209        ) -> std::result::Result<
2210            tonic::Response<super::ArchiveIngestRuleResponse>,
2211            tonic::Status,
2212        > {
2213            self.inner
2214                .ready()
2215                .await
2216                .map_err(|e| {
2217                    tonic::Status::unknown(
2218                        format!("Service was not ready: {}", e.into()),
2219                    )
2220                })?;
2221            let codec = tonic::codec::ProstCodec::default();
2222            let path = http::uri::PathAndQuery::from_static(
2223                "/nominal.file_store.v1.InternalIngestRulesService/ArchiveIngestRule",
2224            );
2225            let mut req = request.into_request();
2226            req.extensions_mut()
2227                .insert(
2228                    GrpcMethod::new(
2229                        "nominal.file_store.v1.InternalIngestRulesService",
2230                        "ArchiveIngestRule",
2231                    ),
2232                );
2233            self.inner.unary(req, path, codec).await
2234        }
2235        pub async fn unarchive_ingest_rule(
2236            &mut self,
2237            request: impl tonic::IntoRequest<super::UnarchiveIngestRuleRequest>,
2238        ) -> std::result::Result<
2239            tonic::Response<super::UnarchiveIngestRuleResponse>,
2240            tonic::Status,
2241        > {
2242            self.inner
2243                .ready()
2244                .await
2245                .map_err(|e| {
2246                    tonic::Status::unknown(
2247                        format!("Service was not ready: {}", e.into()),
2248                    )
2249                })?;
2250            let codec = tonic::codec::ProstCodec::default();
2251            let path = http::uri::PathAndQuery::from_static(
2252                "/nominal.file_store.v1.InternalIngestRulesService/UnarchiveIngestRule",
2253            );
2254            let mut req = request.into_request();
2255            req.extensions_mut()
2256                .insert(
2257                    GrpcMethod::new(
2258                        "nominal.file_store.v1.InternalIngestRulesService",
2259                        "UnarchiveIngestRule",
2260                    ),
2261                );
2262            self.inner.unary(req, path, codec).await
2263        }
2264    }
2265}