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    #[prost(string, optional, tag = "8")]
26    pub description: ::core::option::Option<::prost::alloc::string::String>,
27}
28#[derive(Clone, PartialEq, ::prost::Message)]
29pub struct VirtualDrive {
30    #[prost(string, tag = "1")]
31    pub drive_rid: ::prost::alloc::string::String,
32    #[prost(message, optional, tag = "2")]
33    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
34    #[prost(message, optional, tag = "3")]
35    pub status: ::core::option::Option<VirtualDriveStatus>,
36}
37#[derive(Clone, PartialEq, ::prost::Message)]
38pub struct VirtualDriveDetails {
39    #[prost(string, tag = "1")]
40    pub drive_rid: ::prost::alloc::string::String,
41    #[prost(message, optional, tag = "2")]
42    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
43}
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct VirtualDriveStatus {
46    #[prost(enumeration = "VirtualDriveState", tag = "1")]
47    pub state: i32,
48    #[prost(message, optional, tag = "2")]
49    pub last_successful_check_time: ::core::option::Option<
50        super::super::super::google::protobuf::Timestamp,
51    >,
52    #[prost(string, tag = "3")]
53    pub message: ::prost::alloc::string::String,
54}
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct VirtualDriveConnectionDetails {
57    #[prost(oneof = "virtual_drive_connection_details::Details", tags = "1, 2, 3")]
58    pub details: ::core::option::Option<virtual_drive_connection_details::Details>,
59}
60/// Nested message and enum types in `VirtualDriveConnectionDetails`.
61pub mod virtual_drive_connection_details {
62    #[derive(Clone, PartialEq, ::prost::Oneof)]
63    pub enum Details {
64        #[prost(message, tag = "1")]
65        S3(super::S3VirtualDriveConnectionDetails),
66        #[prost(message, tag = "2")]
67        GoogleDrive(super::GoogleDriveVirtualDriveConnectionDetails),
68        #[prost(message, tag = "3")]
69        Gcs(super::GcsVirtualDriveConnectionDetails),
70    }
71}
72#[derive(Clone, PartialEq, ::prost::Message)]
73pub struct S3VirtualDriveConnectionDetails {
74    #[prost(string, tag = "1")]
75    pub bucket: ::prost::alloc::string::String,
76    #[prost(string, tag = "2")]
77    pub prefix: ::prost::alloc::string::String,
78    #[prost(string, tag = "3")]
79    pub credentials_secret_rid: ::prost::alloc::string::String,
80    #[prost(string, tag = "4")]
81    pub endpoint: ::prost::alloc::string::String,
82    #[prost(string, optional, tag = "5")]
83    pub region: ::core::option::Option<::prost::alloc::string::String>,
84    #[prost(message, optional, tag = "6")]
85    pub assume_role: ::core::option::Option<S3AssumeRoleCredentials>,
86}
87#[derive(Clone, PartialEq, ::prost::Message)]
88pub struct S3AssumeRoleCredentials {
89    #[prost(string, tag = "1")]
90    pub role_arn: ::prost::alloc::string::String,
91    #[prost(string, tag = "2")]
92    pub external_id: ::prost::alloc::string::String,
93}
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct GoogleDriveVirtualDriveConnectionDetails {
96    #[prost(string, tag = "1")]
97    pub folder_id: ::prost::alloc::string::String,
98    #[prost(string, tag = "2")]
99    pub credentials_secret_rid: ::prost::alloc::string::String,
100}
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct GcsVirtualDriveConnectionDetails {
103    #[prost(string, tag = "1")]
104    pub bucket: ::prost::alloc::string::String,
105    #[prost(string, tag = "2")]
106    pub prefix: ::prost::alloc::string::String,
107    #[prost(string, tag = "3")]
108    pub credentials_secret_rid: ::prost::alloc::string::String,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct LogicalPath {
112    #[prost(string, tag = "1")]
113    pub path: ::prost::alloc::string::String,
114}
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct LogicalFile {
117    #[prost(message, optional, tag = "1")]
118    pub identity: ::core::option::Option<LogicalFileIdentity>,
119    #[prost(message, optional, tag = "2")]
120    pub path: ::core::option::Option<LogicalPath>,
121    #[prost(enumeration = "FileState", tag = "3")]
122    pub state: i32,
123    #[prost(message, optional, tag = "4")]
124    pub created: ::core::option::Option<Attribution>,
125    #[prost(uint64, tag = "5")]
126    pub size_bytes: u64,
127    #[prost(message, optional, tag = "6")]
128    pub observed: ::core::option::Option<Attribution>,
129    #[prost(message, optional, tag = "7")]
130    pub current_revision: ::core::option::Option<FileRevisionRef>,
131    #[prost(enumeration = "DownloadAvailability", tag = "8")]
132    pub download_availability: i32,
133}
134#[derive(Clone, PartialEq, ::prost::Message)]
135pub struct LogicalFileIdentity {
136    #[prost(oneof = "logical_file_identity::Identity", tags = "1, 2")]
137    pub identity: ::core::option::Option<logical_file_identity::Identity>,
138}
139/// Nested message and enum types in `LogicalFileIdentity`.
140pub mod logical_file_identity {
141    #[derive(Clone, PartialEq, ::prost::Oneof)]
142    pub enum Identity {
143        #[prost(message, tag = "1")]
144        Managed(super::ManagedFileIdentity),
145        #[prost(message, tag = "2")]
146        Virtual(super::VirtualFileIdentity),
147    }
148}
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct ManagedFileIdentity {
151    #[prost(string, tag = "1")]
152    pub file_rid: ::prost::alloc::string::String,
153}
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct VirtualFileIdentity {
156    #[prost(oneof = "virtual_file_identity::Kind", tags = "1, 2, 3")]
157    pub kind: ::core::option::Option<virtual_file_identity::Kind>,
158}
159/// Nested message and enum types in `VirtualFileIdentity`.
160pub mod virtual_file_identity {
161    #[derive(Clone, PartialEq, ::prost::Oneof)]
162    pub enum Kind {
163        #[prost(message, tag = "1")]
164        S3(super::S3FileIdentity),
165        #[prost(message, tag = "2")]
166        GoogleDrive(super::GoogleDriveFileIdentity),
167        #[prost(message, tag = "3")]
168        Gcs(super::GcsFileIdentity),
169    }
170}
171#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct S3FileIdentity {
173    #[prost(string, tag = "1")]
174    pub drive_rid: ::prost::alloc::string::String,
175    #[prost(string, tag = "2")]
176    pub path: ::prost::alloc::string::String,
177}
178#[derive(Clone, PartialEq, ::prost::Message)]
179pub struct GoogleDriveFileIdentity {
180    #[prost(string, tag = "1")]
181    pub drive_rid: ::prost::alloc::string::String,
182    #[prost(string, tag = "2")]
183    pub file_id: ::prost::alloc::string::String,
184}
185#[derive(Clone, PartialEq, ::prost::Message)]
186pub struct GcsFileIdentity {
187    #[prost(string, tag = "1")]
188    pub drive_rid: ::prost::alloc::string::String,
189    #[prost(string, tag = "2")]
190    pub path: ::prost::alloc::string::String,
191}
192#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct FileRevisionAction {
194    #[prost(oneof = "file_revision_action::Kind", tags = "1, 2, 3, 4")]
195    pub kind: ::core::option::Option<file_revision_action::Kind>,
196}
197/// Nested message and enum types in `FileRevisionAction`.
198pub mod file_revision_action {
199    #[derive(Clone, PartialEq, ::prost::Oneof)]
200    pub enum Kind {
201        #[prost(message, tag = "1")]
202        Put(super::FilePut),
203        #[prost(message, tag = "2")]
204        Moved(super::FileMoved),
205        #[prost(message, tag = "3")]
206        Removed(super::FileRemoved),
207        #[prost(message, tag = "4")]
208        Restored(super::FileRestored),
209    }
210}
211#[derive(Clone, Copy, PartialEq, ::prost::Message)]
212pub struct FilePut {}
213#[derive(Clone, PartialEq, ::prost::Message)]
214pub struct FileMoved {
215    #[prost(string, optional, tag = "1")]
216    pub source_revision_rid: ::core::option::Option<::prost::alloc::string::String>,
217}
218#[derive(Clone, PartialEq, ::prost::Message)]
219pub struct FileRemoved {
220    #[prost(string, optional, tag = "1")]
221    pub removed_revision_rid: ::core::option::Option<::prost::alloc::string::String>,
222}
223#[derive(Clone, PartialEq, ::prost::Message)]
224pub struct FileRestored {
225    #[prost(string, optional, tag = "1")]
226    pub restored_from_revision_rid: ::core::option::Option<
227        ::prost::alloc::string::String,
228    >,
229}
230#[derive(Clone, PartialEq, ::prost::Message)]
231pub struct FileRevisionRef {
232    #[prost(oneof = "file_revision_ref::Reference", tags = "1, 2")]
233    pub reference: ::core::option::Option<file_revision_ref::Reference>,
234}
235/// Nested message and enum types in `FileRevisionRef`.
236pub mod file_revision_ref {
237    #[derive(Clone, PartialEq, ::prost::Oneof)]
238    pub enum Reference {
239        #[prost(message, tag = "1")]
240        Managed(super::ManagedFileRevisionRef),
241        #[prost(message, tag = "2")]
242        Virtual(super::VirtualFileRevisionRef),
243    }
244}
245#[derive(Clone, PartialEq, ::prost::Message)]
246pub struct ManagedFileRevisionRef {
247    #[prost(string, tag = "1")]
248    pub file_revision_rid: ::prost::alloc::string::String,
249}
250#[derive(Clone, PartialEq, ::prost::Message)]
251pub struct VirtualFileRevisionRef {
252    #[prost(oneof = "virtual_file_revision_ref::Kind", tags = "1, 2, 3")]
253    pub kind: ::core::option::Option<virtual_file_revision_ref::Kind>,
254}
255/// Nested message and enum types in `VirtualFileRevisionRef`.
256pub mod virtual_file_revision_ref {
257    #[derive(Clone, PartialEq, ::prost::Oneof)]
258    pub enum Kind {
259        #[prost(message, tag = "1")]
260        S3(super::S3FileRevisionRef),
261        #[prost(message, tag = "2")]
262        GoogleDrive(super::GoogleDriveFileRevisionRef),
263        #[prost(message, tag = "3")]
264        Gcs(super::GcsFileRevisionRef),
265    }
266}
267#[derive(Clone, PartialEq, ::prost::Message)]
268pub struct S3FileRevisionRef {
269    #[prost(string, tag = "1")]
270    pub drive_rid: ::prost::alloc::string::String,
271    #[prost(string, tag = "2")]
272    pub path: ::prost::alloc::string::String,
273    #[prost(string, tag = "3")]
274    pub etag: ::prost::alloc::string::String,
275}
276#[derive(Clone, PartialEq, ::prost::Message)]
277pub struct GoogleDriveFileRevisionRef {
278    #[prost(string, tag = "1")]
279    pub drive_rid: ::prost::alloc::string::String,
280    #[prost(string, tag = "2")]
281    pub file_id: ::prost::alloc::string::String,
282    #[prost(string, tag = "3")]
283    pub revision_id: ::prost::alloc::string::String,
284}
285#[derive(Clone, PartialEq, ::prost::Message)]
286pub struct GcsFileRevisionRef {
287    #[prost(string, tag = "1")]
288    pub drive_rid: ::prost::alloc::string::String,
289    #[prost(string, tag = "2")]
290    pub path: ::prost::alloc::string::String,
291    #[prost(string, tag = "3")]
292    pub generation: ::prost::alloc::string::String,
293}
294#[derive(Clone, PartialEq, ::prost::Message)]
295pub struct ManagedFileRevision {
296    #[prost(message, optional, tag = "9")]
297    pub r#ref: ::core::option::Option<FileRevisionRef>,
298    #[prost(message, optional, tag = "10")]
299    pub identity: ::core::option::Option<LogicalFileIdentity>,
300    #[deprecated]
301    #[prost(string, tag = "1")]
302    pub file_revision_rid: ::prost::alloc::string::String,
303    #[deprecated]
304    #[prost(string, tag = "2")]
305    pub file_rid: ::prost::alloc::string::String,
306    #[prost(message, optional, tag = "3")]
307    pub path: ::core::option::Option<LogicalPath>,
308    #[prost(uint64, tag = "4")]
309    pub size_bytes: u64,
310    #[prost(message, optional, tag = "5")]
311    pub created: ::core::option::Option<Attribution>,
312    #[prost(enumeration = "FileState", tag = "6")]
313    pub state: i32,
314    #[prost(enumeration = "DownloadAvailability", tag = "7")]
315    pub download_availability: i32,
316    #[prost(message, optional, tag = "8")]
317    pub action: ::core::option::Option<FileRevisionAction>,
318}
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct VirtualFileRevision {
321    #[prost(string, tag = "1")]
322    pub file_revision_rid: ::prost::alloc::string::String,
323    #[prost(message, optional, tag = "2")]
324    pub file_identity: ::core::option::Option<VirtualFileIdentity>,
325    #[prost(message, optional, tag = "3")]
326    pub path: ::core::option::Option<LogicalPath>,
327    #[prost(uint64, tag = "4")]
328    pub size_bytes: u64,
329    #[prost(message, optional, tag = "5")]
330    pub observed: ::core::option::Option<Attribution>,
331    #[prost(enumeration = "DownloadAvailability", tag = "6")]
332    pub download_availability: i32,
333}
334#[derive(Clone, PartialEq, ::prost::Message)]
335pub struct FileRevision {
336    #[prost(message, optional, tag = "9")]
337    pub r#ref: ::core::option::Option<FileRevisionRef>,
338    #[prost(message, optional, tag = "10")]
339    pub identity: ::core::option::Option<LogicalFileIdentity>,
340    #[prost(message, optional, tag = "3")]
341    pub path: ::core::option::Option<LogicalPath>,
342    #[prost(uint64, tag = "4")]
343    pub size_bytes: u64,
344    #[prost(message, optional, tag = "5")]
345    pub observed: ::core::option::Option<Attribution>,
346    #[prost(enumeration = "FileState", tag = "6")]
347    pub state: i32,
348    #[prost(enumeration = "DownloadAvailability", tag = "7")]
349    pub download_availability: i32,
350    #[prost(message, optional, tag = "8")]
351    pub action: ::core::option::Option<FileRevisionAction>,
352}
353#[derive(Clone, PartialEq, ::prost::Message)]
354pub struct Directory {
355    #[prost(message, optional, tag = "1")]
356    pub path: ::core::option::Option<LogicalPath>,
357}
358#[derive(Clone, PartialEq, ::prost::Message)]
359pub struct FileEntry {
360    #[prost(oneof = "file_entry::Entry", tags = "1, 2")]
361    pub entry: ::core::option::Option<file_entry::Entry>,
362}
363/// Nested message and enum types in `FileEntry`.
364pub mod file_entry {
365    #[derive(Clone, PartialEq, ::prost::Oneof)]
366    pub enum Entry {
367        #[prost(message, tag = "1")]
368        File(super::LogicalFile),
369        #[prost(message, tag = "2")]
370        Directory(super::Directory),
371    }
372}
373#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
374#[repr(i32)]
375pub enum DriveState {
376    Unspecified = 0,
377    Active = 1,
378    Archived = 2,
379}
380impl DriveState {
381    /// String value of the enum field names used in the ProtoBuf definition.
382    ///
383    /// The values are not transformed in any way and thus are considered stable
384    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
385    pub fn as_str_name(&self) -> &'static str {
386        match self {
387            Self::Unspecified => "DRIVE_STATE_UNSPECIFIED",
388            Self::Active => "DRIVE_STATE_ACTIVE",
389            Self::Archived => "DRIVE_STATE_ARCHIVED",
390        }
391    }
392    /// Creates an enum from field names used in the ProtoBuf definition.
393    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
394        match value {
395            "DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
396            "DRIVE_STATE_ACTIVE" => Some(Self::Active),
397            "DRIVE_STATE_ARCHIVED" => Some(Self::Archived),
398            _ => None,
399        }
400    }
401}
402#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
403#[repr(i32)]
404pub enum DriveSource {
405    Unspecified = 0,
406    Nominal = 1,
407    S3 = 2,
408    GoogleDrive = 3,
409    Gcs = 4,
410}
411impl DriveSource {
412    /// String value of the enum field names used in the ProtoBuf definition.
413    ///
414    /// The values are not transformed in any way and thus are considered stable
415    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
416    pub fn as_str_name(&self) -> &'static str {
417        match self {
418            Self::Unspecified => "DRIVE_SOURCE_UNSPECIFIED",
419            Self::Nominal => "DRIVE_SOURCE_NOMINAL",
420            Self::S3 => "DRIVE_SOURCE_S3",
421            Self::GoogleDrive => "DRIVE_SOURCE_GOOGLE_DRIVE",
422            Self::Gcs => "DRIVE_SOURCE_GCS",
423        }
424    }
425    /// Creates an enum from field names used in the ProtoBuf definition.
426    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
427        match value {
428            "DRIVE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
429            "DRIVE_SOURCE_NOMINAL" => Some(Self::Nominal),
430            "DRIVE_SOURCE_S3" => Some(Self::S3),
431            "DRIVE_SOURCE_GOOGLE_DRIVE" => Some(Self::GoogleDrive),
432            "DRIVE_SOURCE_GCS" => Some(Self::Gcs),
433            _ => None,
434        }
435    }
436}
437#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
438#[repr(i32)]
439pub enum DriveMutability {
440    Unspecified = 0,
441    Writable = 1,
442    ReadOnly = 2,
443}
444impl DriveMutability {
445    /// String value of the enum field names used in the ProtoBuf definition.
446    ///
447    /// The values are not transformed in any way and thus are considered stable
448    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
449    pub fn as_str_name(&self) -> &'static str {
450        match self {
451            Self::Unspecified => "DRIVE_MUTABILITY_UNSPECIFIED",
452            Self::Writable => "DRIVE_MUTABILITY_WRITABLE",
453            Self::ReadOnly => "DRIVE_MUTABILITY_READ_ONLY",
454        }
455    }
456    /// Creates an enum from field names used in the ProtoBuf definition.
457    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
458        match value {
459            "DRIVE_MUTABILITY_UNSPECIFIED" => Some(Self::Unspecified),
460            "DRIVE_MUTABILITY_WRITABLE" => Some(Self::Writable),
461            "DRIVE_MUTABILITY_READ_ONLY" => Some(Self::ReadOnly),
462            _ => None,
463        }
464    }
465}
466#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
467#[repr(i32)]
468pub enum VirtualDriveState {
469    Unspecified = 0,
470    Active = 1,
471    AuthError = 2,
472    Unreachable = 3,
473    InvalidConfiguration = 4,
474}
475impl VirtualDriveState {
476    /// String value of the enum field names used in the ProtoBuf definition.
477    ///
478    /// The values are not transformed in any way and thus are considered stable
479    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
480    pub fn as_str_name(&self) -> &'static str {
481        match self {
482            Self::Unspecified => "VIRTUAL_DRIVE_STATE_UNSPECIFIED",
483            Self::Active => "VIRTUAL_DRIVE_STATE_ACTIVE",
484            Self::AuthError => "VIRTUAL_DRIVE_STATE_AUTH_ERROR",
485            Self::Unreachable => "VIRTUAL_DRIVE_STATE_UNREACHABLE",
486            Self::InvalidConfiguration => "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION",
487        }
488    }
489    /// Creates an enum from field names used in the ProtoBuf definition.
490    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
491        match value {
492            "VIRTUAL_DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
493            "VIRTUAL_DRIVE_STATE_ACTIVE" => Some(Self::Active),
494            "VIRTUAL_DRIVE_STATE_AUTH_ERROR" => Some(Self::AuthError),
495            "VIRTUAL_DRIVE_STATE_UNREACHABLE" => Some(Self::Unreachable),
496            "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION" => {
497                Some(Self::InvalidConfiguration)
498            }
499            _ => None,
500        }
501    }
502}
503#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
504#[repr(i32)]
505pub enum FileState {
506    Unspecified = 0,
507    Active = 1,
508    Removed = 2,
509}
510impl FileState {
511    /// String value of the enum field names used in the ProtoBuf definition.
512    ///
513    /// The values are not transformed in any way and thus are considered stable
514    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
515    pub fn as_str_name(&self) -> &'static str {
516        match self {
517            Self::Unspecified => "FILE_STATE_UNSPECIFIED",
518            Self::Active => "FILE_STATE_ACTIVE",
519            Self::Removed => "FILE_STATE_REMOVED",
520        }
521    }
522    /// Creates an enum from field names used in the ProtoBuf definition.
523    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
524        match value {
525            "FILE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
526            "FILE_STATE_ACTIVE" => Some(Self::Active),
527            "FILE_STATE_REMOVED" => Some(Self::Removed),
528            _ => None,
529        }
530    }
531}
532#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
533#[repr(i32)]
534pub enum DownloadAvailability {
535    Unspecified = 0,
536    Available = 1,
537    BytesReclaimed = 2,
538    NoContent = 3,
539}
540impl DownloadAvailability {
541    /// String value of the enum field names used in the ProtoBuf definition.
542    ///
543    /// The values are not transformed in any way and thus are considered stable
544    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
545    pub fn as_str_name(&self) -> &'static str {
546        match self {
547            Self::Unspecified => "DOWNLOAD_AVAILABILITY_UNSPECIFIED",
548            Self::Available => "DOWNLOAD_AVAILABILITY_AVAILABLE",
549            Self::BytesReclaimed => "DOWNLOAD_AVAILABILITY_BYTES_RECLAIMED",
550            Self::NoContent => "DOWNLOAD_AVAILABILITY_NO_CONTENT",
551        }
552    }
553    /// Creates an enum from field names used in the ProtoBuf definition.
554    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
555        match value {
556            "DOWNLOAD_AVAILABILITY_UNSPECIFIED" => Some(Self::Unspecified),
557            "DOWNLOAD_AVAILABILITY_AVAILABLE" => Some(Self::Available),
558            "DOWNLOAD_AVAILABILITY_BYTES_RECLAIMED" => Some(Self::BytesReclaimed),
559            "DOWNLOAD_AVAILABILITY_NO_CONTENT" => Some(Self::NoContent),
560            _ => None,
561        }
562    }
563}
564#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
565#[repr(i32)]
566pub enum FileStoreCommonError {
567    Unspecified = 0,
568    DriveNotFound = 1,
569    FileNotFound = 2,
570    FileRevisionNotFound = 3,
571    PermissionDenied = 4,
572}
573impl FileStoreCommonError {
574    /// String value of the enum field names used in the ProtoBuf definition.
575    ///
576    /// The values are not transformed in any way and thus are considered stable
577    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
578    pub fn as_str_name(&self) -> &'static str {
579        match self {
580            Self::Unspecified => "FILE_STORE_COMMON_ERROR_UNSPECIFIED",
581            Self::DriveNotFound => "FILE_STORE_COMMON_ERROR_DRIVE_NOT_FOUND",
582            Self::FileNotFound => "FILE_STORE_COMMON_ERROR_FILE_NOT_FOUND",
583            Self::FileRevisionNotFound => {
584                "FILE_STORE_COMMON_ERROR_FILE_REVISION_NOT_FOUND"
585            }
586            Self::PermissionDenied => "FILE_STORE_COMMON_ERROR_PERMISSION_DENIED",
587        }
588    }
589    /// Creates an enum from field names used in the ProtoBuf definition.
590    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
591        match value {
592            "FILE_STORE_COMMON_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
593            "FILE_STORE_COMMON_ERROR_DRIVE_NOT_FOUND" => Some(Self::DriveNotFound),
594            "FILE_STORE_COMMON_ERROR_FILE_NOT_FOUND" => Some(Self::FileNotFound),
595            "FILE_STORE_COMMON_ERROR_FILE_REVISION_NOT_FOUND" => {
596                Some(Self::FileRevisionNotFound)
597            }
598            "FILE_STORE_COMMON_ERROR_PERMISSION_DENIED" => Some(Self::PermissionDenied),
599            _ => None,
600        }
601    }
602}
603#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
604#[repr(i32)]
605pub enum VirtualDriveUpstreamError {
606    Unspecified = 0,
607    CredentialsNotFound = 1,
608    CredentialsInvalid = 2,
609    CredentialsRejected = 3,
610    UpstreamUnavailable = 4,
611    UpstreamFileNotFound = 5,
612    InvalidUpstreamState = 6,
613}
614impl VirtualDriveUpstreamError {
615    /// String value of the enum field names used in the ProtoBuf definition.
616    ///
617    /// The values are not transformed in any way and thus are considered stable
618    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
619    pub fn as_str_name(&self) -> &'static str {
620        match self {
621            Self::Unspecified => "VIRTUAL_DRIVE_UPSTREAM_ERROR_UNSPECIFIED",
622            Self::CredentialsNotFound => {
623                "VIRTUAL_DRIVE_UPSTREAM_ERROR_CREDENTIALS_NOT_FOUND"
624            }
625            Self::CredentialsInvalid => {
626                "VIRTUAL_DRIVE_UPSTREAM_ERROR_CREDENTIALS_INVALID"
627            }
628            Self::CredentialsRejected => {
629                "VIRTUAL_DRIVE_UPSTREAM_ERROR_CREDENTIALS_REJECTED"
630            }
631            Self::UpstreamUnavailable => {
632                "VIRTUAL_DRIVE_UPSTREAM_ERROR_UPSTREAM_UNAVAILABLE"
633            }
634            Self::UpstreamFileNotFound => {
635                "VIRTUAL_DRIVE_UPSTREAM_ERROR_UPSTREAM_FILE_NOT_FOUND"
636            }
637            Self::InvalidUpstreamState => {
638                "VIRTUAL_DRIVE_UPSTREAM_ERROR_INVALID_UPSTREAM_STATE"
639            }
640        }
641    }
642    /// Creates an enum from field names used in the ProtoBuf definition.
643    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
644        match value {
645            "VIRTUAL_DRIVE_UPSTREAM_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
646            "VIRTUAL_DRIVE_UPSTREAM_ERROR_CREDENTIALS_NOT_FOUND" => {
647                Some(Self::CredentialsNotFound)
648            }
649            "VIRTUAL_DRIVE_UPSTREAM_ERROR_CREDENTIALS_INVALID" => {
650                Some(Self::CredentialsInvalid)
651            }
652            "VIRTUAL_DRIVE_UPSTREAM_ERROR_CREDENTIALS_REJECTED" => {
653                Some(Self::CredentialsRejected)
654            }
655            "VIRTUAL_DRIVE_UPSTREAM_ERROR_UPSTREAM_UNAVAILABLE" => {
656                Some(Self::UpstreamUnavailable)
657            }
658            "VIRTUAL_DRIVE_UPSTREAM_ERROR_UPSTREAM_FILE_NOT_FOUND" => {
659                Some(Self::UpstreamFileNotFound)
660            }
661            "VIRTUAL_DRIVE_UPSTREAM_ERROR_INVALID_UPSTREAM_STATE" => {
662                Some(Self::InvalidUpstreamState)
663            }
664            _ => None,
665        }
666    }
667}
668#[derive(Clone, PartialEq, ::prost::Message)]
669pub struct CreateDriveRequest {
670    #[prost(string, tag = "1")]
671    pub workspace_rid: ::prost::alloc::string::String,
672    #[prost(string, tag = "2")]
673    pub id: ::prost::alloc::string::String,
674    #[prost(string, optional, tag = "3")]
675    pub description: ::core::option::Option<::prost::alloc::string::String>,
676}
677#[derive(Clone, PartialEq, ::prost::Message)]
678pub struct CreateDriveResponse {
679    #[prost(message, optional, tag = "1")]
680    pub drive: ::core::option::Option<Drive>,
681}
682#[derive(Clone, PartialEq, ::prost::Message)]
683pub struct CreateVirtualDriveRequest {
684    #[prost(string, tag = "1")]
685    pub workspace_rid: ::prost::alloc::string::String,
686    #[prost(string, tag = "2")]
687    pub id: ::prost::alloc::string::String,
688    #[prost(message, optional, tag = "3")]
689    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
690    #[prost(string, optional, tag = "4")]
691    pub description: ::core::option::Option<::prost::alloc::string::String>,
692}
693#[derive(Clone, PartialEq, ::prost::Message)]
694pub struct CreateVirtualDriveResponse {
695    #[prost(message, optional, tag = "1")]
696    pub drive: ::core::option::Option<Drive>,
697    #[prost(message, optional, tag = "2")]
698    pub virtual_drive: ::core::option::Option<VirtualDrive>,
699}
700#[derive(Clone, PartialEq, ::prost::Message)]
701pub struct GetDriveRequest {
702    #[prost(string, tag = "1")]
703    pub drive_rid: ::prost::alloc::string::String,
704}
705#[derive(Clone, PartialEq, ::prost::Message)]
706pub struct GetDriveResponse {
707    #[prost(message, optional, tag = "1")]
708    pub drive: ::core::option::Option<Drive>,
709}
710#[derive(Clone, PartialEq, ::prost::Message)]
711pub struct GetVirtualDriveDetailsRequest {
712    #[prost(string, tag = "1")]
713    pub drive_rid: ::prost::alloc::string::String,
714}
715#[derive(Clone, PartialEq, ::prost::Message)]
716pub struct GetVirtualDriveDetailsResponse {
717    #[prost(message, optional, tag = "1")]
718    pub drive: ::core::option::Option<Drive>,
719    #[prost(message, optional, tag = "2")]
720    pub virtual_drive_details: ::core::option::Option<VirtualDriveDetails>,
721}
722#[derive(Clone, PartialEq, ::prost::Message)]
723pub struct GetVirtualDriveStatusRequest {
724    #[prost(string, tag = "1")]
725    pub drive_rid: ::prost::alloc::string::String,
726}
727#[derive(Clone, PartialEq, ::prost::Message)]
728pub struct GetVirtualDriveStatusResponse {
729    #[prost(message, optional, tag = "1")]
730    pub status: ::core::option::Option<VirtualDriveStatus>,
731}
732#[derive(Clone, PartialEq, ::prost::Message)]
733pub struct GetDriveByIdRequest {
734    #[prost(string, tag = "1")]
735    pub workspace_rid: ::prost::alloc::string::String,
736    #[prost(string, tag = "2")]
737    pub id: ::prost::alloc::string::String,
738}
739#[derive(Clone, PartialEq, ::prost::Message)]
740pub struct GetDriveByIdResponse {
741    #[prost(message, optional, tag = "1")]
742    pub drive: ::core::option::Option<Drive>,
743}
744#[derive(Clone, PartialEq, ::prost::Message)]
745pub struct GetVirtualDriveDetailsByIdRequest {
746    #[prost(string, tag = "1")]
747    pub workspace_rid: ::prost::alloc::string::String,
748    #[prost(string, tag = "2")]
749    pub id: ::prost::alloc::string::String,
750}
751#[derive(Clone, PartialEq, ::prost::Message)]
752pub struct GetVirtualDriveDetailsByIdResponse {
753    #[prost(message, optional, tag = "1")]
754    pub drive: ::core::option::Option<Drive>,
755    #[prost(message, optional, tag = "2")]
756    pub virtual_drive_details: ::core::option::Option<VirtualDriveDetails>,
757}
758#[derive(Clone, PartialEq, ::prost::Message)]
759pub struct GetVirtualDriveStatusByIdRequest {
760    #[prost(string, tag = "1")]
761    pub workspace_rid: ::prost::alloc::string::String,
762    #[prost(string, tag = "2")]
763    pub id: ::prost::alloc::string::String,
764}
765#[derive(Clone, PartialEq, ::prost::Message)]
766pub struct GetVirtualDriveStatusByIdResponse {
767    #[prost(message, optional, tag = "1")]
768    pub status: ::core::option::Option<VirtualDriveStatus>,
769}
770#[derive(Clone, PartialEq, ::prost::Message)]
771pub struct ListDrivesRequest {
772    #[prost(string, tag = "1")]
773    pub workspace_rid: ::prost::alloc::string::String,
774    #[prost(bool, tag = "2")]
775    pub include_archived: bool,
776    #[prost(int32, optional, tag = "3")]
777    pub page_size: ::core::option::Option<i32>,
778    #[prost(string, optional, tag = "4")]
779    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
780}
781#[derive(Clone, PartialEq, ::prost::Message)]
782pub struct ListDrivesResponse {
783    #[prost(message, repeated, tag = "1")]
784    pub drives: ::prost::alloc::vec::Vec<Drive>,
785    #[prost(string, optional, tag = "2")]
786    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
787}
788#[derive(Clone, PartialEq, ::prost::Message)]
789pub struct UpdateVirtualDriveRequest {
790    #[prost(string, tag = "1")]
791    pub drive_rid: ::prost::alloc::string::String,
792    #[prost(message, optional, tag = "2")]
793    pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
794}
795#[derive(Clone, PartialEq, ::prost::Message)]
796pub struct UpdateVirtualDriveResponse {
797    #[prost(message, optional, tag = "1")]
798    pub drive: ::core::option::Option<Drive>,
799    #[prost(message, optional, tag = "2")]
800    pub virtual_drive: ::core::option::Option<VirtualDrive>,
801}
802#[derive(Clone, PartialEq, ::prost::Message)]
803pub struct UpdateDriveDetailsRequest {
804    #[prost(string, tag = "1")]
805    pub drive_rid: ::prost::alloc::string::String,
806    #[prost(string, optional, tag = "2")]
807    pub id: ::core::option::Option<::prost::alloc::string::String>,
808    #[prost(string, optional, tag = "3")]
809    pub description: ::core::option::Option<::prost::alloc::string::String>,
810}
811#[derive(Clone, PartialEq, ::prost::Message)]
812pub struct UpdateDriveDetailsResponse {
813    #[prost(message, optional, tag = "1")]
814    pub drive: ::core::option::Option<Drive>,
815}
816#[derive(Clone, PartialEq, ::prost::Message)]
817pub struct ArchiveDriveRequest {
818    #[prost(string, tag = "1")]
819    pub drive_rid: ::prost::alloc::string::String,
820}
821#[derive(Clone, PartialEq, ::prost::Message)]
822pub struct ArchiveDriveResponse {
823    #[prost(message, optional, tag = "1")]
824    pub drive: ::core::option::Option<Drive>,
825}
826#[derive(Clone, PartialEq, ::prost::Message)]
827pub struct UnarchiveDriveRequest {
828    #[prost(string, tag = "1")]
829    pub drive_rid: ::prost::alloc::string::String,
830}
831#[derive(Clone, PartialEq, ::prost::Message)]
832pub struct UnarchiveDriveResponse {
833    #[prost(message, optional, tag = "1")]
834    pub drive: ::core::option::Option<Drive>,
835}
836#[derive(Clone, PartialEq, ::prost::Message)]
837pub struct NotifyVirtualDriveFilesRequest {
838    #[prost(string, tag = "1")]
839    pub drive_rid: ::prost::alloc::string::String,
840    #[prost(message, repeated, tag = "2")]
841    pub objects: ::prost::alloc::vec::Vec<NotifiedObject>,
842}
843#[derive(Clone, PartialEq, ::prost::Message)]
844pub struct NotifiedObject {
845    #[prost(string, tag = "1")]
846    pub bucket: ::prost::alloc::string::String,
847    #[prost(string, tag = "2")]
848    pub key: ::prost::alloc::string::String,
849    #[prost(string, tag = "3")]
850    pub etag: ::prost::alloc::string::String,
851    #[prost(map = "string, string", tag = "4")]
852    pub tags: ::std::collections::HashMap<
853        ::prost::alloc::string::String,
854        ::prost::alloc::string::String,
855    >,
856}
857#[derive(Clone, PartialEq, ::prost::Message)]
858pub struct NotifyVirtualDriveFilesResponse {
859    #[prost(int32, tag = "1")]
860    pub enqueued: i32,
861    #[prost(int32, tag = "2")]
862    pub skipped: i32,
863    #[prost(int32, tag = "3")]
864    pub malformed: i32,
865    #[prost(message, repeated, tag = "4")]
866    pub skipped_by_reason: ::prost::alloc::vec::Vec<SkippedCount>,
867}
868#[derive(Clone, Copy, PartialEq, ::prost::Message)]
869pub struct SkippedCount {
870    #[prost(enumeration = "NotifySkipReason", tag = "1")]
871    pub reason: i32,
872    #[prost(int32, tag = "2")]
873    pub count: i32,
874}
875#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
876#[repr(i32)]
877pub enum NotifySkipReason {
878    Unspecified = 0,
879    WrongBucket = 1,
880    OutsidePrefix = 2,
881    FolderMarker = 3,
882    InvalidPath = 4,
883    NotFound = 5,
884    Unreadable = 6,
885}
886impl NotifySkipReason {
887    /// String value of the enum field names used in the ProtoBuf definition.
888    ///
889    /// The values are not transformed in any way and thus are considered stable
890    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
891    pub fn as_str_name(&self) -> &'static str {
892        match self {
893            Self::Unspecified => "NOTIFY_SKIP_REASON_UNSPECIFIED",
894            Self::WrongBucket => "NOTIFY_SKIP_REASON_WRONG_BUCKET",
895            Self::OutsidePrefix => "NOTIFY_SKIP_REASON_OUTSIDE_PREFIX",
896            Self::FolderMarker => "NOTIFY_SKIP_REASON_FOLDER_MARKER",
897            Self::InvalidPath => "NOTIFY_SKIP_REASON_INVALID_PATH",
898            Self::NotFound => "NOTIFY_SKIP_REASON_NOT_FOUND",
899            Self::Unreadable => "NOTIFY_SKIP_REASON_UNREADABLE",
900        }
901    }
902    /// Creates an enum from field names used in the ProtoBuf definition.
903    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
904        match value {
905            "NOTIFY_SKIP_REASON_UNSPECIFIED" => Some(Self::Unspecified),
906            "NOTIFY_SKIP_REASON_WRONG_BUCKET" => Some(Self::WrongBucket),
907            "NOTIFY_SKIP_REASON_OUTSIDE_PREFIX" => Some(Self::OutsidePrefix),
908            "NOTIFY_SKIP_REASON_FOLDER_MARKER" => Some(Self::FolderMarker),
909            "NOTIFY_SKIP_REASON_INVALID_PATH" => Some(Self::InvalidPath),
910            "NOTIFY_SKIP_REASON_NOT_FOUND" => Some(Self::NotFound),
911            "NOTIFY_SKIP_REASON_UNREADABLE" => Some(Self::Unreadable),
912            _ => None,
913        }
914    }
915}
916#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
917#[repr(i32)]
918pub enum DriveAdminError {
919    Unspecified = 0,
920    DriveIdAlreadyExists = 1,
921    VirtualDriveNotFound = 2,
922    InvalidVirtualDriveConfiguration = 3,
923}
924impl DriveAdminError {
925    /// String value of the enum field names used in the ProtoBuf definition.
926    ///
927    /// The values are not transformed in any way and thus are considered stable
928    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
929    pub fn as_str_name(&self) -> &'static str {
930        match self {
931            Self::Unspecified => "DRIVE_ADMIN_ERROR_UNSPECIFIED",
932            Self::DriveIdAlreadyExists => "DRIVE_ADMIN_ERROR_DRIVE_ID_ALREADY_EXISTS",
933            Self::VirtualDriveNotFound => "DRIVE_ADMIN_ERROR_VIRTUAL_DRIVE_NOT_FOUND",
934            Self::InvalidVirtualDriveConfiguration => {
935                "DRIVE_ADMIN_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION"
936            }
937        }
938    }
939    /// Creates an enum from field names used in the ProtoBuf definition.
940    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
941        match value {
942            "DRIVE_ADMIN_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
943            "DRIVE_ADMIN_ERROR_DRIVE_ID_ALREADY_EXISTS" => {
944                Some(Self::DriveIdAlreadyExists)
945            }
946            "DRIVE_ADMIN_ERROR_VIRTUAL_DRIVE_NOT_FOUND" => {
947                Some(Self::VirtualDriveNotFound)
948            }
949            "DRIVE_ADMIN_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION" => {
950                Some(Self::InvalidVirtualDriveConfiguration)
951            }
952            _ => None,
953        }
954    }
955}
956/// Generated client implementations.
957pub mod drives_service_client {
958    #![allow(
959        unused_variables,
960        dead_code,
961        missing_docs,
962        clippy::wildcard_imports,
963        clippy::let_unit_value,
964    )]
965    use tonic::codegen::*;
966    use tonic::codegen::http::Uri;
967    #[derive(Debug, Clone)]
968    pub struct DrivesServiceClient<T> {
969        inner: tonic::client::Grpc<T>,
970    }
971    impl DrivesServiceClient<tonic::transport::Channel> {
972        /// Attempt to create a new client by connecting to a given endpoint.
973        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
974        where
975            D: TryInto<tonic::transport::Endpoint>,
976            D::Error: Into<StdError>,
977        {
978            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
979            Ok(Self::new(conn))
980        }
981    }
982    impl<T> DrivesServiceClient<T>
983    where
984        T: tonic::client::GrpcService<tonic::body::Body>,
985        T::Error: Into<StdError>,
986        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
987        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
988    {
989        pub fn new(inner: T) -> Self {
990            let inner = tonic::client::Grpc::new(inner);
991            Self { inner }
992        }
993        pub fn with_origin(inner: T, origin: Uri) -> Self {
994            let inner = tonic::client::Grpc::with_origin(inner, origin);
995            Self { inner }
996        }
997        pub fn with_interceptor<F>(
998            inner: T,
999            interceptor: F,
1000        ) -> DrivesServiceClient<InterceptedService<T, F>>
1001        where
1002            F: tonic::service::Interceptor,
1003            T::ResponseBody: Default,
1004            T: tonic::codegen::Service<
1005                http::Request<tonic::body::Body>,
1006                Response = http::Response<
1007                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1008                >,
1009            >,
1010            <T as tonic::codegen::Service<
1011                http::Request<tonic::body::Body>,
1012            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1013        {
1014            DrivesServiceClient::new(InterceptedService::new(inner, interceptor))
1015        }
1016        /// Compress requests with the given encoding.
1017        ///
1018        /// This requires the server to support it otherwise it might respond with an
1019        /// error.
1020        #[must_use]
1021        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1022            self.inner = self.inner.send_compressed(encoding);
1023            self
1024        }
1025        /// Enable decompressing responses.
1026        #[must_use]
1027        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1028            self.inner = self.inner.accept_compressed(encoding);
1029            self
1030        }
1031        /// Limits the maximum size of a decoded message.
1032        ///
1033        /// Default: `4MB`
1034        #[must_use]
1035        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1036            self.inner = self.inner.max_decoding_message_size(limit);
1037            self
1038        }
1039        /// Limits the maximum size of an encoded message.
1040        ///
1041        /// Default: `usize::MAX`
1042        #[must_use]
1043        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1044            self.inner = self.inner.max_encoding_message_size(limit);
1045            self
1046        }
1047        pub async fn create_drive(
1048            &mut self,
1049            request: impl tonic::IntoRequest<super::CreateDriveRequest>,
1050        ) -> std::result::Result<
1051            tonic::Response<super::CreateDriveResponse>,
1052            tonic::Status,
1053        > {
1054            self.inner
1055                .ready()
1056                .await
1057                .map_err(|e| {
1058                    tonic::Status::unknown(
1059                        format!("Service was not ready: {}", e.into()),
1060                    )
1061                })?;
1062            let codec = tonic::codec::ProstCodec::default();
1063            let path = http::uri::PathAndQuery::from_static(
1064                "/nominal.file_store.v1.DrivesService/CreateDrive",
1065            );
1066            let mut req = request.into_request();
1067            req.extensions_mut()
1068                .insert(
1069                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "CreateDrive"),
1070                );
1071            self.inner.unary(req, path, codec).await
1072        }
1073        pub async fn create_virtual_drive(
1074            &mut self,
1075            request: impl tonic::IntoRequest<super::CreateVirtualDriveRequest>,
1076        ) -> std::result::Result<
1077            tonic::Response<super::CreateVirtualDriveResponse>,
1078            tonic::Status,
1079        > {
1080            self.inner
1081                .ready()
1082                .await
1083                .map_err(|e| {
1084                    tonic::Status::unknown(
1085                        format!("Service was not ready: {}", e.into()),
1086                    )
1087                })?;
1088            let codec = tonic::codec::ProstCodec::default();
1089            let path = http::uri::PathAndQuery::from_static(
1090                "/nominal.file_store.v1.DrivesService/CreateVirtualDrive",
1091            );
1092            let mut req = request.into_request();
1093            req.extensions_mut()
1094                .insert(
1095                    GrpcMethod::new(
1096                        "nominal.file_store.v1.DrivesService",
1097                        "CreateVirtualDrive",
1098                    ),
1099                );
1100            self.inner.unary(req, path, codec).await
1101        }
1102        pub async fn get_drive(
1103            &mut self,
1104            request: impl tonic::IntoRequest<super::GetDriveRequest>,
1105        ) -> std::result::Result<
1106            tonic::Response<super::GetDriveResponse>,
1107            tonic::Status,
1108        > {
1109            self.inner
1110                .ready()
1111                .await
1112                .map_err(|e| {
1113                    tonic::Status::unknown(
1114                        format!("Service was not ready: {}", e.into()),
1115                    )
1116                })?;
1117            let codec = tonic::codec::ProstCodec::default();
1118            let path = http::uri::PathAndQuery::from_static(
1119                "/nominal.file_store.v1.DrivesService/GetDrive",
1120            );
1121            let mut req = request.into_request();
1122            req.extensions_mut()
1123                .insert(
1124                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "GetDrive"),
1125                );
1126            self.inner.unary(req, path, codec).await
1127        }
1128        pub async fn get_virtual_drive_details(
1129            &mut self,
1130            request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsRequest>,
1131        ) -> std::result::Result<
1132            tonic::Response<super::GetVirtualDriveDetailsResponse>,
1133            tonic::Status,
1134        > {
1135            self.inner
1136                .ready()
1137                .await
1138                .map_err(|e| {
1139                    tonic::Status::unknown(
1140                        format!("Service was not ready: {}", e.into()),
1141                    )
1142                })?;
1143            let codec = tonic::codec::ProstCodec::default();
1144            let path = http::uri::PathAndQuery::from_static(
1145                "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetails",
1146            );
1147            let mut req = request.into_request();
1148            req.extensions_mut()
1149                .insert(
1150                    GrpcMethod::new(
1151                        "nominal.file_store.v1.DrivesService",
1152                        "GetVirtualDriveDetails",
1153                    ),
1154                );
1155            self.inner.unary(req, path, codec).await
1156        }
1157        pub async fn get_virtual_drive_status(
1158            &mut self,
1159            request: impl tonic::IntoRequest<super::GetVirtualDriveStatusRequest>,
1160        ) -> std::result::Result<
1161            tonic::Response<super::GetVirtualDriveStatusResponse>,
1162            tonic::Status,
1163        > {
1164            self.inner
1165                .ready()
1166                .await
1167                .map_err(|e| {
1168                    tonic::Status::unknown(
1169                        format!("Service was not ready: {}", e.into()),
1170                    )
1171                })?;
1172            let codec = tonic::codec::ProstCodec::default();
1173            let path = http::uri::PathAndQuery::from_static(
1174                "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatus",
1175            );
1176            let mut req = request.into_request();
1177            req.extensions_mut()
1178                .insert(
1179                    GrpcMethod::new(
1180                        "nominal.file_store.v1.DrivesService",
1181                        "GetVirtualDriveStatus",
1182                    ),
1183                );
1184            self.inner.unary(req, path, codec).await
1185        }
1186        pub async fn get_drive_by_id(
1187            &mut self,
1188            request: impl tonic::IntoRequest<super::GetDriveByIdRequest>,
1189        ) -> std::result::Result<
1190            tonic::Response<super::GetDriveByIdResponse>,
1191            tonic::Status,
1192        > {
1193            self.inner
1194                .ready()
1195                .await
1196                .map_err(|e| {
1197                    tonic::Status::unknown(
1198                        format!("Service was not ready: {}", e.into()),
1199                    )
1200                })?;
1201            let codec = tonic::codec::ProstCodec::default();
1202            let path = http::uri::PathAndQuery::from_static(
1203                "/nominal.file_store.v1.DrivesService/GetDriveById",
1204            );
1205            let mut req = request.into_request();
1206            req.extensions_mut()
1207                .insert(
1208                    GrpcMethod::new(
1209                        "nominal.file_store.v1.DrivesService",
1210                        "GetDriveById",
1211                    ),
1212                );
1213            self.inner.unary(req, path, codec).await
1214        }
1215        pub async fn get_virtual_drive_details_by_id(
1216            &mut self,
1217            request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsByIdRequest>,
1218        ) -> std::result::Result<
1219            tonic::Response<super::GetVirtualDriveDetailsByIdResponse>,
1220            tonic::Status,
1221        > {
1222            self.inner
1223                .ready()
1224                .await
1225                .map_err(|e| {
1226                    tonic::Status::unknown(
1227                        format!("Service was not ready: {}", e.into()),
1228                    )
1229                })?;
1230            let codec = tonic::codec::ProstCodec::default();
1231            let path = http::uri::PathAndQuery::from_static(
1232                "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetailsById",
1233            );
1234            let mut req = request.into_request();
1235            req.extensions_mut()
1236                .insert(
1237                    GrpcMethod::new(
1238                        "nominal.file_store.v1.DrivesService",
1239                        "GetVirtualDriveDetailsById",
1240                    ),
1241                );
1242            self.inner.unary(req, path, codec).await
1243        }
1244        pub async fn get_virtual_drive_status_by_id(
1245            &mut self,
1246            request: impl tonic::IntoRequest<super::GetVirtualDriveStatusByIdRequest>,
1247        ) -> std::result::Result<
1248            tonic::Response<super::GetVirtualDriveStatusByIdResponse>,
1249            tonic::Status,
1250        > {
1251            self.inner
1252                .ready()
1253                .await
1254                .map_err(|e| {
1255                    tonic::Status::unknown(
1256                        format!("Service was not ready: {}", e.into()),
1257                    )
1258                })?;
1259            let codec = tonic::codec::ProstCodec::default();
1260            let path = http::uri::PathAndQuery::from_static(
1261                "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatusById",
1262            );
1263            let mut req = request.into_request();
1264            req.extensions_mut()
1265                .insert(
1266                    GrpcMethod::new(
1267                        "nominal.file_store.v1.DrivesService",
1268                        "GetVirtualDriveStatusById",
1269                    ),
1270                );
1271            self.inner.unary(req, path, codec).await
1272        }
1273        pub async fn list_drives(
1274            &mut self,
1275            request: impl tonic::IntoRequest<super::ListDrivesRequest>,
1276        ) -> std::result::Result<
1277            tonic::Response<super::ListDrivesResponse>,
1278            tonic::Status,
1279        > {
1280            self.inner
1281                .ready()
1282                .await
1283                .map_err(|e| {
1284                    tonic::Status::unknown(
1285                        format!("Service was not ready: {}", e.into()),
1286                    )
1287                })?;
1288            let codec = tonic::codec::ProstCodec::default();
1289            let path = http::uri::PathAndQuery::from_static(
1290                "/nominal.file_store.v1.DrivesService/ListDrives",
1291            );
1292            let mut req = request.into_request();
1293            req.extensions_mut()
1294                .insert(
1295                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "ListDrives"),
1296                );
1297            self.inner.unary(req, path, codec).await
1298        }
1299        pub async fn update_virtual_drive(
1300            &mut self,
1301            request: impl tonic::IntoRequest<super::UpdateVirtualDriveRequest>,
1302        ) -> std::result::Result<
1303            tonic::Response<super::UpdateVirtualDriveResponse>,
1304            tonic::Status,
1305        > {
1306            self.inner
1307                .ready()
1308                .await
1309                .map_err(|e| {
1310                    tonic::Status::unknown(
1311                        format!("Service was not ready: {}", e.into()),
1312                    )
1313                })?;
1314            let codec = tonic::codec::ProstCodec::default();
1315            let path = http::uri::PathAndQuery::from_static(
1316                "/nominal.file_store.v1.DrivesService/UpdateVirtualDrive",
1317            );
1318            let mut req = request.into_request();
1319            req.extensions_mut()
1320                .insert(
1321                    GrpcMethod::new(
1322                        "nominal.file_store.v1.DrivesService",
1323                        "UpdateVirtualDrive",
1324                    ),
1325                );
1326            self.inner.unary(req, path, codec).await
1327        }
1328        pub async fn update_drive_details(
1329            &mut self,
1330            request: impl tonic::IntoRequest<super::UpdateDriveDetailsRequest>,
1331        ) -> std::result::Result<
1332            tonic::Response<super::UpdateDriveDetailsResponse>,
1333            tonic::Status,
1334        > {
1335            self.inner
1336                .ready()
1337                .await
1338                .map_err(|e| {
1339                    tonic::Status::unknown(
1340                        format!("Service was not ready: {}", e.into()),
1341                    )
1342                })?;
1343            let codec = tonic::codec::ProstCodec::default();
1344            let path = http::uri::PathAndQuery::from_static(
1345                "/nominal.file_store.v1.DrivesService/UpdateDriveDetails",
1346            );
1347            let mut req = request.into_request();
1348            req.extensions_mut()
1349                .insert(
1350                    GrpcMethod::new(
1351                        "nominal.file_store.v1.DrivesService",
1352                        "UpdateDriveDetails",
1353                    ),
1354                );
1355            self.inner.unary(req, path, codec).await
1356        }
1357        pub async fn archive_drive(
1358            &mut self,
1359            request: impl tonic::IntoRequest<super::ArchiveDriveRequest>,
1360        ) -> std::result::Result<
1361            tonic::Response<super::ArchiveDriveResponse>,
1362            tonic::Status,
1363        > {
1364            self.inner
1365                .ready()
1366                .await
1367                .map_err(|e| {
1368                    tonic::Status::unknown(
1369                        format!("Service was not ready: {}", e.into()),
1370                    )
1371                })?;
1372            let codec = tonic::codec::ProstCodec::default();
1373            let path = http::uri::PathAndQuery::from_static(
1374                "/nominal.file_store.v1.DrivesService/ArchiveDrive",
1375            );
1376            let mut req = request.into_request();
1377            req.extensions_mut()
1378                .insert(
1379                    GrpcMethod::new(
1380                        "nominal.file_store.v1.DrivesService",
1381                        "ArchiveDrive",
1382                    ),
1383                );
1384            self.inner.unary(req, path, codec).await
1385        }
1386        pub async fn unarchive_drive(
1387            &mut self,
1388            request: impl tonic::IntoRequest<super::UnarchiveDriveRequest>,
1389        ) -> std::result::Result<
1390            tonic::Response<super::UnarchiveDriveResponse>,
1391            tonic::Status,
1392        > {
1393            self.inner
1394                .ready()
1395                .await
1396                .map_err(|e| {
1397                    tonic::Status::unknown(
1398                        format!("Service was not ready: {}", e.into()),
1399                    )
1400                })?;
1401            let codec = tonic::codec::ProstCodec::default();
1402            let path = http::uri::PathAndQuery::from_static(
1403                "/nominal.file_store.v1.DrivesService/UnarchiveDrive",
1404            );
1405            let mut req = request.into_request();
1406            req.extensions_mut()
1407                .insert(
1408                    GrpcMethod::new(
1409                        "nominal.file_store.v1.DrivesService",
1410                        "UnarchiveDrive",
1411                    ),
1412                );
1413            self.inner.unary(req, path, codec).await
1414        }
1415        pub async fn notify_virtual_drive_files(
1416            &mut self,
1417            request: impl tonic::IntoRequest<super::NotifyVirtualDriveFilesRequest>,
1418        ) -> std::result::Result<
1419            tonic::Response<super::NotifyVirtualDriveFilesResponse>,
1420            tonic::Status,
1421        > {
1422            self.inner
1423                .ready()
1424                .await
1425                .map_err(|e| {
1426                    tonic::Status::unknown(
1427                        format!("Service was not ready: {}", e.into()),
1428                    )
1429                })?;
1430            let codec = tonic::codec::ProstCodec::default();
1431            let path = http::uri::PathAndQuery::from_static(
1432                "/nominal.file_store.v1.DrivesService/NotifyVirtualDriveFiles",
1433            );
1434            let mut req = request.into_request();
1435            req.extensions_mut()
1436                .insert(
1437                    GrpcMethod::new(
1438                        "nominal.file_store.v1.DrivesService",
1439                        "NotifyVirtualDriveFiles",
1440                    ),
1441                );
1442            self.inner.unary(req, path, codec).await
1443        }
1444    }
1445}
1446#[derive(Clone, PartialEq, ::prost::Message)]
1447pub struct GetFileRevisionTextDiffPreviewRequest {
1448    #[prost(string, optional, tag = "1")]
1449    pub from_revision_rid: ::core::option::Option<::prost::alloc::string::String>,
1450    #[prost(string, tag = "2")]
1451    pub to_revision_rid: ::prost::alloc::string::String,
1452    #[prost(int32, optional, tag = "3")]
1453    pub page_size: ::core::option::Option<i32>,
1454    #[prost(string, optional, tag = "4")]
1455    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1456}
1457#[derive(Clone, PartialEq, ::prost::Message)]
1458pub struct GetFileRevisionTextDiffPreviewResponse {
1459    #[prost(message, repeated, tag = "1")]
1460    pub changes: ::prost::alloc::vec::Vec<DiffChange>,
1461    #[prost(string, optional, tag = "2")]
1462    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1463    #[prost(uint32, tag = "3")]
1464    pub total_change_count: u32,
1465    #[prost(uint32, tag = "4")]
1466    pub total_added_lines: u32,
1467    #[prost(uint32, tag = "5")]
1468    pub total_removed_lines: u32,
1469    #[prost(string, tag = "6")]
1470    pub from_revision_rid: ::prost::alloc::string::String,
1471}
1472#[derive(Clone, PartialEq, ::prost::Message)]
1473pub struct DiffChange {
1474    #[prost(message, repeated, tag = "1")]
1475    pub context_before: ::prost::alloc::vec::Vec<ContextLine>,
1476    #[prost(message, repeated, tag = "2")]
1477    pub removed: ::prost::alloc::vec::Vec<RemovedLine>,
1478    #[prost(message, repeated, tag = "3")]
1479    pub added: ::prost::alloc::vec::Vec<AddedLine>,
1480    #[prost(message, repeated, tag = "4")]
1481    pub context_after: ::prost::alloc::vec::Vec<ContextLine>,
1482}
1483#[derive(Clone, PartialEq, ::prost::Message)]
1484pub struct ContextLine {
1485    #[prost(uint32, tag = "1")]
1486    pub from_line: u32,
1487    #[prost(uint32, tag = "2")]
1488    pub to_line: u32,
1489    #[prost(string, tag = "3")]
1490    pub text: ::prost::alloc::string::String,
1491    #[prost(bool, tag = "4")]
1492    pub text_truncated: bool,
1493}
1494#[derive(Clone, PartialEq, ::prost::Message)]
1495pub struct RemovedLine {
1496    #[prost(uint32, tag = "1")]
1497    pub from_line: u32,
1498    #[prost(string, tag = "2")]
1499    pub text: ::prost::alloc::string::String,
1500    #[prost(bool, tag = "3")]
1501    pub text_truncated: bool,
1502}
1503#[derive(Clone, PartialEq, ::prost::Message)]
1504pub struct AddedLine {
1505    #[prost(uint32, tag = "1")]
1506    pub to_line: u32,
1507    #[prost(string, tag = "2")]
1508    pub text: ::prost::alloc::string::String,
1509    #[prost(bool, tag = "3")]
1510    pub text_truncated: bool,
1511}
1512#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1513#[repr(i32)]
1514pub enum TextDiffError {
1515    Unspecified = 0,
1516    RevisionContentNotText = 1,
1517    RevisionTooLarge = 2,
1518    PageTokenStale = 3,
1519    NoPrecedingRevision = 4,
1520}
1521impl TextDiffError {
1522    /// String value of the enum field names used in the ProtoBuf definition.
1523    ///
1524    /// The values are not transformed in any way and thus are considered stable
1525    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1526    pub fn as_str_name(&self) -> &'static str {
1527        match self {
1528            Self::Unspecified => "TEXT_DIFF_ERROR_UNSPECIFIED",
1529            Self::RevisionContentNotText => "TEXT_DIFF_ERROR_REVISION_CONTENT_NOT_TEXT",
1530            Self::RevisionTooLarge => "TEXT_DIFF_ERROR_REVISION_TOO_LARGE",
1531            Self::PageTokenStale => "TEXT_DIFF_ERROR_PAGE_TOKEN_STALE",
1532            Self::NoPrecedingRevision => "TEXT_DIFF_ERROR_NO_PRECEDING_REVISION",
1533        }
1534    }
1535    /// Creates an enum from field names used in the ProtoBuf definition.
1536    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1537        match value {
1538            "TEXT_DIFF_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1539            "TEXT_DIFF_ERROR_REVISION_CONTENT_NOT_TEXT" => {
1540                Some(Self::RevisionContentNotText)
1541            }
1542            "TEXT_DIFF_ERROR_REVISION_TOO_LARGE" => Some(Self::RevisionTooLarge),
1543            "TEXT_DIFF_ERROR_PAGE_TOKEN_STALE" => Some(Self::PageTokenStale),
1544            "TEXT_DIFF_ERROR_NO_PRECEDING_REVISION" => Some(Self::NoPrecedingRevision),
1545            _ => None,
1546        }
1547    }
1548}
1549/// Generated client implementations.
1550pub mod file_content_service_client {
1551    #![allow(
1552        unused_variables,
1553        dead_code,
1554        missing_docs,
1555        clippy::wildcard_imports,
1556        clippy::let_unit_value,
1557    )]
1558    use tonic::codegen::*;
1559    use tonic::codegen::http::Uri;
1560    #[derive(Debug, Clone)]
1561    pub struct FileContentServiceClient<T> {
1562        inner: tonic::client::Grpc<T>,
1563    }
1564    impl FileContentServiceClient<tonic::transport::Channel> {
1565        /// Attempt to create a new client by connecting to a given endpoint.
1566        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1567        where
1568            D: TryInto<tonic::transport::Endpoint>,
1569            D::Error: Into<StdError>,
1570        {
1571            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1572            Ok(Self::new(conn))
1573        }
1574    }
1575    impl<T> FileContentServiceClient<T>
1576    where
1577        T: tonic::client::GrpcService<tonic::body::Body>,
1578        T::Error: Into<StdError>,
1579        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1580        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1581    {
1582        pub fn new(inner: T) -> Self {
1583            let inner = tonic::client::Grpc::new(inner);
1584            Self { inner }
1585        }
1586        pub fn with_origin(inner: T, origin: Uri) -> Self {
1587            let inner = tonic::client::Grpc::with_origin(inner, origin);
1588            Self { inner }
1589        }
1590        pub fn with_interceptor<F>(
1591            inner: T,
1592            interceptor: F,
1593        ) -> FileContentServiceClient<InterceptedService<T, F>>
1594        where
1595            F: tonic::service::Interceptor,
1596            T::ResponseBody: Default,
1597            T: tonic::codegen::Service<
1598                http::Request<tonic::body::Body>,
1599                Response = http::Response<
1600                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1601                >,
1602            >,
1603            <T as tonic::codegen::Service<
1604                http::Request<tonic::body::Body>,
1605            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1606        {
1607            FileContentServiceClient::new(InterceptedService::new(inner, interceptor))
1608        }
1609        /// Compress requests with the given encoding.
1610        ///
1611        /// This requires the server to support it otherwise it might respond with an
1612        /// error.
1613        #[must_use]
1614        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1615            self.inner = self.inner.send_compressed(encoding);
1616            self
1617        }
1618        /// Enable decompressing responses.
1619        #[must_use]
1620        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1621            self.inner = self.inner.accept_compressed(encoding);
1622            self
1623        }
1624        /// Limits the maximum size of a decoded message.
1625        ///
1626        /// Default: `4MB`
1627        #[must_use]
1628        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1629            self.inner = self.inner.max_decoding_message_size(limit);
1630            self
1631        }
1632        /// Limits the maximum size of an encoded message.
1633        ///
1634        /// Default: `usize::MAX`
1635        #[must_use]
1636        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1637            self.inner = self.inner.max_encoding_message_size(limit);
1638            self
1639        }
1640        pub async fn get_file_revision_text_diff_preview(
1641            &mut self,
1642            request: impl tonic::IntoRequest<
1643                super::GetFileRevisionTextDiffPreviewRequest,
1644            >,
1645        ) -> std::result::Result<
1646            tonic::Response<super::GetFileRevisionTextDiffPreviewResponse>,
1647            tonic::Status,
1648        > {
1649            self.inner
1650                .ready()
1651                .await
1652                .map_err(|e| {
1653                    tonic::Status::unknown(
1654                        format!("Service was not ready: {}", e.into()),
1655                    )
1656                })?;
1657            let codec = tonic::codec::ProstCodec::default();
1658            let path = http::uri::PathAndQuery::from_static(
1659                "/nominal.file_store.v1.FileContentService/GetFileRevisionTextDiffPreview",
1660            );
1661            let mut req = request.into_request();
1662            req.extensions_mut()
1663                .insert(
1664                    GrpcMethod::new(
1665                        "nominal.file_store.v1.FileContentService",
1666                        "GetFileRevisionTextDiffPreview",
1667                    ),
1668                );
1669            self.inner.unary(req, path, codec).await
1670        }
1671    }
1672}
1673#[derive(Clone, PartialEq, ::prost::Message)]
1674pub struct UploadedObjectRef {
1675    #[prost(string, tag = "1")]
1676    pub object_key: ::prost::alloc::string::String,
1677}
1678#[derive(Clone, PartialEq, ::prost::Message)]
1679pub struct PathTarget {
1680    #[prost(message, optional, tag = "1")]
1681    pub path: ::core::option::Option<LogicalPath>,
1682}
1683#[derive(Clone, PartialEq, ::prost::Message)]
1684pub struct Destination {
1685    #[prost(oneof = "destination::Target", tags = "1, 2")]
1686    pub target: ::core::option::Option<destination::Target>,
1687}
1688/// Nested message and enum types in `Destination`.
1689pub mod destination {
1690    #[derive(Clone, PartialEq, ::prost::Oneof)]
1691    pub enum Target {
1692        #[prost(message, tag = "1")]
1693        Path(super::PathTarget),
1694        #[prost(string, tag = "2")]
1695        FileRevisionRid(::prost::alloc::string::String),
1696    }
1697}
1698#[derive(Clone, PartialEq, ::prost::Message)]
1699pub struct PutFile {
1700    #[prost(message, optional, tag = "1")]
1701    pub object: ::core::option::Option<UploadedObjectRef>,
1702    #[prost(uint64, tag = "2")]
1703    pub size_bytes: u64,
1704    #[prost(message, optional, tag = "3")]
1705    pub destination: ::core::option::Option<Destination>,
1706}
1707#[derive(Clone, PartialEq, ::prost::Message)]
1708pub struct MoveFile {
1709    #[prost(string, tag = "1")]
1710    pub source_revision_rid: ::prost::alloc::string::String,
1711    #[prost(message, optional, tag = "2")]
1712    pub destination: ::core::option::Option<Destination>,
1713}
1714#[derive(Clone, PartialEq, ::prost::Message)]
1715pub struct RemoveFile {
1716    #[prost(string, tag = "1")]
1717    pub revision_rid: ::prost::alloc::string::String,
1718}
1719#[derive(Clone, PartialEq, ::prost::Message)]
1720pub struct RestoreFile {
1721    #[prost(string, tag = "1")]
1722    pub restore_revision_rid: ::prost::alloc::string::String,
1723    #[prost(message, optional, tag = "2")]
1724    pub destination: ::core::option::Option<Destination>,
1725}
1726#[derive(Clone, PartialEq, ::prost::Message)]
1727pub struct MoveDirectory {
1728    #[prost(message, optional, tag = "1")]
1729    pub from: ::core::option::Option<LogicalPath>,
1730    #[prost(message, optional, tag = "2")]
1731    pub to: ::core::option::Option<LogicalPath>,
1732}
1733#[derive(Clone, PartialEq, ::prost::Message)]
1734pub struct FileChange {
1735    #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4, 5")]
1736    pub change: ::core::option::Option<file_change::Change>,
1737}
1738/// Nested message and enum types in `FileChange`.
1739pub mod file_change {
1740    #[derive(Clone, PartialEq, ::prost::Oneof)]
1741    pub enum Change {
1742        #[prost(message, tag = "1")]
1743        Put(super::PutFile),
1744        #[prost(message, tag = "2")]
1745        Move(super::MoveFile),
1746        #[prost(message, tag = "3")]
1747        Remove(super::RemoveFile),
1748        #[prost(message, tag = "4")]
1749        Restore(super::RestoreFile),
1750        #[prost(message, tag = "5")]
1751        MoveDirectory(super::MoveDirectory),
1752    }
1753}
1754#[derive(Clone, PartialEq, ::prost::Message)]
1755pub struct GetFileRequest {
1756    #[prost(string, tag = "1")]
1757    pub drive_rid: ::prost::alloc::string::String,
1758    #[prost(message, optional, tag = "2")]
1759    pub path: ::core::option::Option<LogicalPath>,
1760    #[prost(bool, tag = "3")]
1761    pub include_removed: bool,
1762}
1763#[derive(Clone, PartialEq, ::prost::Message)]
1764pub struct GetFileByIdentityRequest {
1765    #[prost(message, optional, tag = "1")]
1766    pub identity: ::core::option::Option<LogicalFileIdentity>,
1767}
1768#[derive(Clone, PartialEq, ::prost::Message)]
1769pub struct GetFileResponse {
1770    #[prost(message, optional, tag = "1")]
1771    pub file: ::core::option::Option<LogicalFile>,
1772    #[prost(string, tag = "2")]
1773    pub drive_rid: ::prost::alloc::string::String,
1774}
1775#[derive(Clone, PartialEq, ::prost::Message)]
1776pub struct GetFileByIdentityResponse {
1777    #[prost(message, optional, tag = "1")]
1778    pub file: ::core::option::Option<LogicalFile>,
1779    #[prost(string, tag = "2")]
1780    pub drive_rid: ::prost::alloc::string::String,
1781}
1782#[derive(Clone, PartialEq, ::prost::Message)]
1783pub struct ResolveFileRevisionRequest {
1784    #[prost(message, optional, tag = "2")]
1785    pub source_ref: ::core::option::Option<FileRevisionRef>,
1786}
1787#[derive(Clone, PartialEq, ::prost::Message)]
1788pub struct ResolveFileRevisionResponse {
1789    #[prost(string, tag = "1")]
1790    pub file_revision_rid: ::prost::alloc::string::String,
1791    #[prost(string, tag = "2")]
1792    pub drive_rid: ::prost::alloc::string::String,
1793    #[prost(message, optional, tag = "3")]
1794    pub file_revision: ::core::option::Option<FileRevision>,
1795}
1796#[derive(Clone, PartialEq, ::prost::Message)]
1797pub struct ListFilesRequest {
1798    #[prost(string, tag = "1")]
1799    pub drive_rid: ::prost::alloc::string::String,
1800    #[prost(message, optional, tag = "2")]
1801    pub parent_path: ::core::option::Option<LogicalPath>,
1802    #[prost(bool, tag = "3")]
1803    pub include_removed: bool,
1804    #[prost(int32, optional, tag = "4")]
1805    pub page_size: ::core::option::Option<i32>,
1806    #[prost(string, optional, tag = "5")]
1807    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1808}
1809#[derive(Clone, PartialEq, ::prost::Message)]
1810pub struct ListFilesResponse {
1811    #[prost(message, repeated, tag = "1")]
1812    pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1813    #[prost(string, optional, tag = "2")]
1814    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1815}
1816#[derive(Clone, PartialEq, ::prost::Message)]
1817pub struct ApplyFileChangesRequest {
1818    #[prost(string, tag = "1")]
1819    pub drive_rid: ::prost::alloc::string::String,
1820    #[prost(message, repeated, tag = "2")]
1821    pub changes: ::prost::alloc::vec::Vec<FileChange>,
1822}
1823#[derive(Clone, PartialEq, ::prost::Message)]
1824pub struct ApplyFileChangesResponse {
1825    #[prost(message, repeated, tag = "1")]
1826    pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1827}
1828#[derive(Clone, PartialEq, ::prost::Message)]
1829pub struct FileChangeSuccess {
1830    #[prost(message, optional, tag = "1")]
1831    pub file: ::core::option::Option<LogicalFile>,
1832    #[prost(message, optional, tag = "2")]
1833    pub file_revision: ::core::option::Option<ManagedFileRevision>,
1834}
1835#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1836pub struct MoveDirectorySuccess {}
1837#[derive(Clone, PartialEq, ::prost::Message)]
1838pub struct FileChangeFailure {
1839    #[prost(string, tag = "2")]
1840    pub message: ::prost::alloc::string::String,
1841    #[prost(oneof = "file_change_failure::Error", tags = "3, 4")]
1842    pub error: ::core::option::Option<file_change_failure::Error>,
1843}
1844/// Nested message and enum types in `FileChangeFailure`.
1845pub mod file_change_failure {
1846    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1847    pub enum Error {
1848        #[prost(enumeration = "super::FileStoreCommonError", tag = "3")]
1849        Common(i32),
1850        #[prost(enumeration = "super::FileChangeError", tag = "4")]
1851        Change(i32),
1852    }
1853}
1854#[derive(Clone, PartialEq, ::prost::Message)]
1855pub struct FileChangeResult {
1856    #[prost(oneof = "file_change_result::Result", tags = "1, 2, 3")]
1857    pub result: ::core::option::Option<file_change_result::Result>,
1858}
1859/// Nested message and enum types in `FileChangeResult`.
1860pub mod file_change_result {
1861    #[derive(Clone, PartialEq, ::prost::Oneof)]
1862    pub enum Result {
1863        #[prost(message, tag = "1")]
1864        Success(super::FileChangeSuccess),
1865        #[prost(message, tag = "2")]
1866        Failure(super::FileChangeFailure),
1867        #[prost(message, tag = "3")]
1868        DirectoryMoved(super::MoveDirectorySuccess),
1869    }
1870}
1871#[derive(Clone, PartialEq, ::prost::Message)]
1872pub struct ListFileRevisionsRequest {
1873    #[prost(string, tag = "1")]
1874    pub drive_rid: ::prost::alloc::string::String,
1875    #[prost(string, tag = "2")]
1876    pub file_rid: ::prost::alloc::string::String,
1877    #[prost(int32, optional, tag = "3")]
1878    pub page_size: ::core::option::Option<i32>,
1879    #[prost(string, optional, tag = "4")]
1880    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1881}
1882#[derive(Clone, PartialEq, ::prost::Message)]
1883pub struct ListFileRevisionsResponse {
1884    #[prost(message, repeated, tag = "1")]
1885    pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1886    #[prost(string, optional, tag = "2")]
1887    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1888}
1889#[derive(Clone, PartialEq, ::prost::Message)]
1890pub struct PurgeFileRequest {
1891    #[prost(string, tag = "1")]
1892    pub file_revision_rid: ::prost::alloc::string::String,
1893}
1894#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1895pub struct PurgeFileResponse {}
1896#[derive(Clone, PartialEq, ::prost::Message)]
1897pub struct GetDownloadUrlRequest {
1898    #[prost(string, tag = "1")]
1899    pub file_revision_rid: ::prost::alloc::string::String,
1900}
1901#[derive(Clone, PartialEq, ::prost::Message)]
1902pub struct GetDownloadUrlResponse {
1903    #[prost(string, tag = "1")]
1904    pub url: ::prost::alloc::string::String,
1905}
1906#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1907#[repr(i32)]
1908pub enum RevisionReadError {
1909    Unspecified = 0,
1910    BytesReclaimed = 1,
1911    MaterializationFailed = 2,
1912}
1913impl RevisionReadError {
1914    /// String value of the enum field names used in the ProtoBuf definition.
1915    ///
1916    /// The values are not transformed in any way and thus are considered stable
1917    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1918    pub fn as_str_name(&self) -> &'static str {
1919        match self {
1920            Self::Unspecified => "REVISION_READ_ERROR_UNSPECIFIED",
1921            Self::BytesReclaimed => "REVISION_READ_ERROR_BYTES_RECLAIMED",
1922            Self::MaterializationFailed => "REVISION_READ_ERROR_MATERIALIZATION_FAILED",
1923        }
1924    }
1925    /// Creates an enum from field names used in the ProtoBuf definition.
1926    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1927        match value {
1928            "REVISION_READ_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1929            "REVISION_READ_ERROR_BYTES_RECLAIMED" => Some(Self::BytesReclaimed),
1930            "REVISION_READ_ERROR_MATERIALIZATION_FAILED" => {
1931                Some(Self::MaterializationFailed)
1932            }
1933            _ => None,
1934        }
1935    }
1936}
1937#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1938#[repr(i32)]
1939pub enum FileChangeError {
1940    Unspecified = 0,
1941    PathAlreadyExists = 1,
1942    InvalidLogicalPath = 2,
1943    RevisionPreconditionFailed = 3,
1944    ReadOnlyDrive = 4,
1945    UploadedObjectNotFound = 5,
1946    DirectoryMoveLimitExceeded = 6,
1947}
1948impl FileChangeError {
1949    /// String value of the enum field names used in the ProtoBuf definition.
1950    ///
1951    /// The values are not transformed in any way and thus are considered stable
1952    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1953    pub fn as_str_name(&self) -> &'static str {
1954        match self {
1955            Self::Unspecified => "FILE_CHANGE_ERROR_UNSPECIFIED",
1956            Self::PathAlreadyExists => "FILE_CHANGE_ERROR_PATH_ALREADY_EXISTS",
1957            Self::InvalidLogicalPath => "FILE_CHANGE_ERROR_INVALID_LOGICAL_PATH",
1958            Self::RevisionPreconditionFailed => {
1959                "FILE_CHANGE_ERROR_REVISION_PRECONDITION_FAILED"
1960            }
1961            Self::ReadOnlyDrive => "FILE_CHANGE_ERROR_READ_ONLY_DRIVE",
1962            Self::UploadedObjectNotFound => "FILE_CHANGE_ERROR_UPLOADED_OBJECT_NOT_FOUND",
1963            Self::DirectoryMoveLimitExceeded => {
1964                "FILE_CHANGE_ERROR_DIRECTORY_MOVE_LIMIT_EXCEEDED"
1965            }
1966        }
1967    }
1968    /// Creates an enum from field names used in the ProtoBuf definition.
1969    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1970        match value {
1971            "FILE_CHANGE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1972            "FILE_CHANGE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
1973            "FILE_CHANGE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
1974            "FILE_CHANGE_ERROR_REVISION_PRECONDITION_FAILED" => {
1975                Some(Self::RevisionPreconditionFailed)
1976            }
1977            "FILE_CHANGE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
1978            "FILE_CHANGE_ERROR_UPLOADED_OBJECT_NOT_FOUND" => {
1979                Some(Self::UploadedObjectNotFound)
1980            }
1981            "FILE_CHANGE_ERROR_DIRECTORY_MOVE_LIMIT_EXCEEDED" => {
1982                Some(Self::DirectoryMoveLimitExceeded)
1983            }
1984            _ => None,
1985        }
1986    }
1987}
1988/// Generated client implementations.
1989pub mod files_service_client {
1990    #![allow(
1991        unused_variables,
1992        dead_code,
1993        missing_docs,
1994        clippy::wildcard_imports,
1995        clippy::let_unit_value,
1996    )]
1997    use tonic::codegen::*;
1998    use tonic::codegen::http::Uri;
1999    #[derive(Debug, Clone)]
2000    pub struct FilesServiceClient<T> {
2001        inner: tonic::client::Grpc<T>,
2002    }
2003    impl FilesServiceClient<tonic::transport::Channel> {
2004        /// Attempt to create a new client by connecting to a given endpoint.
2005        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2006        where
2007            D: TryInto<tonic::transport::Endpoint>,
2008            D::Error: Into<StdError>,
2009        {
2010            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2011            Ok(Self::new(conn))
2012        }
2013    }
2014    impl<T> FilesServiceClient<T>
2015    where
2016        T: tonic::client::GrpcService<tonic::body::Body>,
2017        T::Error: Into<StdError>,
2018        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2019        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2020    {
2021        pub fn new(inner: T) -> Self {
2022            let inner = tonic::client::Grpc::new(inner);
2023            Self { inner }
2024        }
2025        pub fn with_origin(inner: T, origin: Uri) -> Self {
2026            let inner = tonic::client::Grpc::with_origin(inner, origin);
2027            Self { inner }
2028        }
2029        pub fn with_interceptor<F>(
2030            inner: T,
2031            interceptor: F,
2032        ) -> FilesServiceClient<InterceptedService<T, F>>
2033        where
2034            F: tonic::service::Interceptor,
2035            T::ResponseBody: Default,
2036            T: tonic::codegen::Service<
2037                http::Request<tonic::body::Body>,
2038                Response = http::Response<
2039                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2040                >,
2041            >,
2042            <T as tonic::codegen::Service<
2043                http::Request<tonic::body::Body>,
2044            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2045        {
2046            FilesServiceClient::new(InterceptedService::new(inner, interceptor))
2047        }
2048        /// Compress requests with the given encoding.
2049        ///
2050        /// This requires the server to support it otherwise it might respond with an
2051        /// error.
2052        #[must_use]
2053        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2054            self.inner = self.inner.send_compressed(encoding);
2055            self
2056        }
2057        /// Enable decompressing responses.
2058        #[must_use]
2059        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2060            self.inner = self.inner.accept_compressed(encoding);
2061            self
2062        }
2063        /// Limits the maximum size of a decoded message.
2064        ///
2065        /// Default: `4MB`
2066        #[must_use]
2067        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2068            self.inner = self.inner.max_decoding_message_size(limit);
2069            self
2070        }
2071        /// Limits the maximum size of an encoded message.
2072        ///
2073        /// Default: `usize::MAX`
2074        #[must_use]
2075        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2076            self.inner = self.inner.max_encoding_message_size(limit);
2077            self
2078        }
2079        pub async fn get_file(
2080            &mut self,
2081            request: impl tonic::IntoRequest<super::GetFileRequest>,
2082        ) -> std::result::Result<
2083            tonic::Response<super::GetFileResponse>,
2084            tonic::Status,
2085        > {
2086            self.inner
2087                .ready()
2088                .await
2089                .map_err(|e| {
2090                    tonic::Status::unknown(
2091                        format!("Service was not ready: {}", e.into()),
2092                    )
2093                })?;
2094            let codec = tonic::codec::ProstCodec::default();
2095            let path = http::uri::PathAndQuery::from_static(
2096                "/nominal.file_store.v1.FilesService/GetFile",
2097            );
2098            let mut req = request.into_request();
2099            req.extensions_mut()
2100                .insert(
2101                    GrpcMethod::new("nominal.file_store.v1.FilesService", "GetFile"),
2102                );
2103            self.inner.unary(req, path, codec).await
2104        }
2105        pub async fn get_file_by_identity(
2106            &mut self,
2107            request: impl tonic::IntoRequest<super::GetFileByIdentityRequest>,
2108        ) -> std::result::Result<
2109            tonic::Response<super::GetFileByIdentityResponse>,
2110            tonic::Status,
2111        > {
2112            self.inner
2113                .ready()
2114                .await
2115                .map_err(|e| {
2116                    tonic::Status::unknown(
2117                        format!("Service was not ready: {}", e.into()),
2118                    )
2119                })?;
2120            let codec = tonic::codec::ProstCodec::default();
2121            let path = http::uri::PathAndQuery::from_static(
2122                "/nominal.file_store.v1.FilesService/GetFileByIdentity",
2123            );
2124            let mut req = request.into_request();
2125            req.extensions_mut()
2126                .insert(
2127                    GrpcMethod::new(
2128                        "nominal.file_store.v1.FilesService",
2129                        "GetFileByIdentity",
2130                    ),
2131                );
2132            self.inner.unary(req, path, codec).await
2133        }
2134        pub async fn resolve_file_revision(
2135            &mut self,
2136            request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
2137        ) -> std::result::Result<
2138            tonic::Response<super::ResolveFileRevisionResponse>,
2139            tonic::Status,
2140        > {
2141            self.inner
2142                .ready()
2143                .await
2144                .map_err(|e| {
2145                    tonic::Status::unknown(
2146                        format!("Service was not ready: {}", e.into()),
2147                    )
2148                })?;
2149            let codec = tonic::codec::ProstCodec::default();
2150            let path = http::uri::PathAndQuery::from_static(
2151                "/nominal.file_store.v1.FilesService/ResolveFileRevision",
2152            );
2153            let mut req = request.into_request();
2154            req.extensions_mut()
2155                .insert(
2156                    GrpcMethod::new(
2157                        "nominal.file_store.v1.FilesService",
2158                        "ResolveFileRevision",
2159                    ),
2160                );
2161            self.inner.unary(req, path, codec).await
2162        }
2163        pub async fn list_files(
2164            &mut self,
2165            request: impl tonic::IntoRequest<super::ListFilesRequest>,
2166        ) -> std::result::Result<
2167            tonic::Response<super::ListFilesResponse>,
2168            tonic::Status,
2169        > {
2170            self.inner
2171                .ready()
2172                .await
2173                .map_err(|e| {
2174                    tonic::Status::unknown(
2175                        format!("Service was not ready: {}", e.into()),
2176                    )
2177                })?;
2178            let codec = tonic::codec::ProstCodec::default();
2179            let path = http::uri::PathAndQuery::from_static(
2180                "/nominal.file_store.v1.FilesService/ListFiles",
2181            );
2182            let mut req = request.into_request();
2183            req.extensions_mut()
2184                .insert(
2185                    GrpcMethod::new("nominal.file_store.v1.FilesService", "ListFiles"),
2186                );
2187            self.inner.unary(req, path, codec).await
2188        }
2189        pub async fn apply_file_changes(
2190            &mut self,
2191            request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
2192        ) -> std::result::Result<
2193            tonic::Response<super::ApplyFileChangesResponse>,
2194            tonic::Status,
2195        > {
2196            self.inner
2197                .ready()
2198                .await
2199                .map_err(|e| {
2200                    tonic::Status::unknown(
2201                        format!("Service was not ready: {}", e.into()),
2202                    )
2203                })?;
2204            let codec = tonic::codec::ProstCodec::default();
2205            let path = http::uri::PathAndQuery::from_static(
2206                "/nominal.file_store.v1.FilesService/ApplyFileChanges",
2207            );
2208            let mut req = request.into_request();
2209            req.extensions_mut()
2210                .insert(
2211                    GrpcMethod::new(
2212                        "nominal.file_store.v1.FilesService",
2213                        "ApplyFileChanges",
2214                    ),
2215                );
2216            self.inner.unary(req, path, codec).await
2217        }
2218        pub async fn list_file_revisions(
2219            &mut self,
2220            request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
2221        ) -> std::result::Result<
2222            tonic::Response<super::ListFileRevisionsResponse>,
2223            tonic::Status,
2224        > {
2225            self.inner
2226                .ready()
2227                .await
2228                .map_err(|e| {
2229                    tonic::Status::unknown(
2230                        format!("Service was not ready: {}", e.into()),
2231                    )
2232                })?;
2233            let codec = tonic::codec::ProstCodec::default();
2234            let path = http::uri::PathAndQuery::from_static(
2235                "/nominal.file_store.v1.FilesService/ListFileRevisions",
2236            );
2237            let mut req = request.into_request();
2238            req.extensions_mut()
2239                .insert(
2240                    GrpcMethod::new(
2241                        "nominal.file_store.v1.FilesService",
2242                        "ListFileRevisions",
2243                    ),
2244                );
2245            self.inner.unary(req, path, codec).await
2246        }
2247        pub async fn purge_file(
2248            &mut self,
2249            request: impl tonic::IntoRequest<super::PurgeFileRequest>,
2250        ) -> std::result::Result<
2251            tonic::Response<super::PurgeFileResponse>,
2252            tonic::Status,
2253        > {
2254            self.inner
2255                .ready()
2256                .await
2257                .map_err(|e| {
2258                    tonic::Status::unknown(
2259                        format!("Service was not ready: {}", e.into()),
2260                    )
2261                })?;
2262            let codec = tonic::codec::ProstCodec::default();
2263            let path = http::uri::PathAndQuery::from_static(
2264                "/nominal.file_store.v1.FilesService/PurgeFile",
2265            );
2266            let mut req = request.into_request();
2267            req.extensions_mut()
2268                .insert(
2269                    GrpcMethod::new("nominal.file_store.v1.FilesService", "PurgeFile"),
2270                );
2271            self.inner.unary(req, path, codec).await
2272        }
2273        pub async fn get_download_url(
2274            &mut self,
2275            request: impl tonic::IntoRequest<super::GetDownloadUrlRequest>,
2276        ) -> std::result::Result<
2277            tonic::Response<super::GetDownloadUrlResponse>,
2278            tonic::Status,
2279        > {
2280            self.inner
2281                .ready()
2282                .await
2283                .map_err(|e| {
2284                    tonic::Status::unknown(
2285                        format!("Service was not ready: {}", e.into()),
2286                    )
2287                })?;
2288            let codec = tonic::codec::ProstCodec::default();
2289            let path = http::uri::PathAndQuery::from_static(
2290                "/nominal.file_store.v1.FilesService/GetDownloadUrl",
2291            );
2292            let mut req = request.into_request();
2293            req.extensions_mut()
2294                .insert(
2295                    GrpcMethod::new(
2296                        "nominal.file_store.v1.FilesService",
2297                        "GetDownloadUrl",
2298                    ),
2299                );
2300            self.inner.unary(req, path, codec).await
2301        }
2302    }
2303}
2304#[derive(Clone, PartialEq, ::prost::Message)]
2305pub struct CreateIngestRuleRequest {
2306    #[prost(string, tag = "1")]
2307    pub drive_rid: ::prost::alloc::string::String,
2308    #[prost(message, optional, tag = "2")]
2309    pub matcher: ::core::option::Option<FileMatcher>,
2310    #[prost(message, optional, tag = "3")]
2311    pub triggers: ::core::option::Option<IngestTriggers>,
2312    #[prost(enumeration = "BackfillMode", tag = "4")]
2313    pub backfill_mode: i32,
2314}
2315#[derive(Clone, PartialEq, ::prost::Message)]
2316pub struct CreateIngestRuleResponse {
2317    #[prost(message, optional, tag = "1")]
2318    pub rule: ::core::option::Option<IngestRule>,
2319}
2320#[derive(Clone, PartialEq, ::prost::Message)]
2321pub struct ListIngestRulesRequest {
2322    #[prost(string, tag = "1")]
2323    pub drive_rid: ::prost::alloc::string::String,
2324    #[prost(bool, tag = "2")]
2325    pub include_archived: bool,
2326    #[prost(int32, optional, tag = "3")]
2327    pub page_size: ::core::option::Option<i32>,
2328    #[prost(string, optional, tag = "4")]
2329    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
2330}
2331#[derive(Clone, PartialEq, ::prost::Message)]
2332pub struct ListIngestRulesResponse {
2333    #[prost(message, repeated, tag = "1")]
2334    pub rules: ::prost::alloc::vec::Vec<IngestRule>,
2335    #[prost(string, optional, tag = "2")]
2336    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
2337}
2338#[derive(Clone, PartialEq, ::prost::Message)]
2339pub struct GetIngestRuleRequest {
2340    #[prost(string, tag = "1")]
2341    pub rule_rid: ::prost::alloc::string::String,
2342}
2343#[derive(Clone, PartialEq, ::prost::Message)]
2344pub struct GetIngestRuleResponse {
2345    #[prost(message, optional, tag = "1")]
2346    pub rule: ::core::option::Option<IngestRule>,
2347}
2348#[derive(Clone, PartialEq, ::prost::Message)]
2349pub struct UpdateIngestRuleRequest {
2350    #[prost(string, tag = "1")]
2351    pub rule_rid: ::prost::alloc::string::String,
2352    #[prost(message, optional, tag = "2")]
2353    pub matcher: ::core::option::Option<FileMatcher>,
2354    #[prost(message, optional, tag = "3")]
2355    pub triggers: ::core::option::Option<IngestTriggers>,
2356}
2357#[derive(Clone, PartialEq, ::prost::Message)]
2358pub struct UpdateIngestRuleResponse {
2359    #[prost(message, optional, tag = "1")]
2360    pub rule: ::core::option::Option<IngestRule>,
2361}
2362#[derive(Clone, PartialEq, ::prost::Message)]
2363pub struct ArchiveIngestRuleRequest {
2364    #[prost(string, tag = "1")]
2365    pub rule_rid: ::prost::alloc::string::String,
2366}
2367#[derive(Clone, PartialEq, ::prost::Message)]
2368pub struct ArchiveIngestRuleResponse {
2369    #[prost(message, optional, tag = "1")]
2370    pub rule: ::core::option::Option<IngestRule>,
2371}
2372#[derive(Clone, PartialEq, ::prost::Message)]
2373pub struct UnarchiveIngestRuleRequest {
2374    #[prost(string, tag = "1")]
2375    pub rule_rid: ::prost::alloc::string::String,
2376    #[prost(enumeration = "BackfillMode", tag = "2")]
2377    pub backfill_mode: i32,
2378}
2379#[derive(Clone, PartialEq, ::prost::Message)]
2380pub struct UnarchiveIngestRuleResponse {
2381    #[prost(message, optional, tag = "1")]
2382    pub rule: ::core::option::Option<IngestRule>,
2383}
2384#[derive(Clone, PartialEq, ::prost::Message)]
2385pub struct IngestRule {
2386    #[prost(string, tag = "1")]
2387    pub rule_rid: ::prost::alloc::string::String,
2388    #[prost(string, tag = "2")]
2389    pub drive_rid: ::prost::alloc::string::String,
2390    #[prost(message, optional, tag = "3")]
2391    pub matcher: ::core::option::Option<FileMatcher>,
2392    #[prost(message, optional, tag = "4")]
2393    pub triggers: ::core::option::Option<IngestTriggers>,
2394    #[prost(message, optional, tag = "5")]
2395    pub created: ::core::option::Option<Attribution>,
2396    #[prost(enumeration = "IngestRuleState", tag = "6")]
2397    pub state: i32,
2398    #[prost(message, optional, tag = "7")]
2399    pub archived: ::core::option::Option<Attribution>,
2400    #[prost(message, optional, tag = "8")]
2401    pub updated: ::core::option::Option<Attribution>,
2402}
2403#[derive(Clone, PartialEq, ::prost::Message)]
2404pub struct FileMatcher {
2405    #[prost(oneof = "file_matcher::Matcher", tags = "1")]
2406    pub matcher: ::core::option::Option<file_matcher::Matcher>,
2407}
2408/// Nested message and enum types in `FileMatcher`.
2409pub mod file_matcher {
2410    #[derive(Clone, PartialEq, ::prost::Oneof)]
2411    pub enum Matcher {
2412        #[prost(message, tag = "1")]
2413        Path(super::PathMatcher),
2414    }
2415}
2416#[derive(Clone, PartialEq, ::prost::Message)]
2417pub struct PathMatcher {
2418    #[prost(message, optional, tag = "1")]
2419    pub pattern: ::core::option::Option<PathPattern>,
2420    #[prost(message, optional, tag = "2")]
2421    pub format: ::core::option::Option<FormatConfig>,
2422}
2423#[derive(Clone, PartialEq, ::prost::Message)]
2424pub struct FormatConfig {
2425    #[prost(oneof = "format_config::Format", tags = "1, 2, 3, 4, 6, 5")]
2426    pub format: ::core::option::Option<format_config::Format>,
2427}
2428/// Nested message and enum types in `FormatConfig`.
2429pub mod format_config {
2430    #[derive(Clone, PartialEq, ::prost::Oneof)]
2431    pub enum Format {
2432        #[prost(message, tag = "1")]
2433        Csv(super::CsvIngestConfig),
2434        #[prost(message, tag = "2")]
2435        Parquet(super::ParquetIngestConfig),
2436        #[prost(message, tag = "3")]
2437        Dataflash(super::DataflashIngestConfig),
2438        #[prost(message, tag = "4")]
2439        Containerized(super::ContainerizedIngestConfig),
2440        #[prost(message, tag = "6")]
2441        McapVideo(super::McapVideoRegistrationConfig),
2442        #[prost(message, tag = "5")]
2443        Mcap(super::McapIngestConfig),
2444    }
2445}
2446#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2447pub struct McapVideoRegistrationConfig {}
2448#[derive(Clone, PartialEq, ::prost::Message)]
2449pub struct ContainerizedIngestConfig {
2450    #[prost(string, tag = "1")]
2451    pub extractor_rid: ::prost::alloc::string::String,
2452    #[prost(map = "string, string", tag = "2")]
2453    pub arguments: ::std::collections::HashMap<
2454        ::prost::alloc::string::String,
2455        ::prost::alloc::string::String,
2456    >,
2457    #[prost(message, optional, tag = "3")]
2458    pub timestamp: ::core::option::Option<TimestampConfig>,
2459}
2460#[derive(Clone, PartialEq, ::prost::Message)]
2461pub struct CsvIngestConfig {
2462    #[prost(message, optional, tag = "1")]
2463    pub timestamp: ::core::option::Option<TimestampConfig>,
2464    #[prost(string, optional, tag = "2")]
2465    pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
2466}
2467#[derive(Clone, PartialEq, ::prost::Message)]
2468pub struct ParquetIngestConfig {
2469    #[prost(message, optional, tag = "1")]
2470    pub timestamp: ::core::option::Option<TimestampConfig>,
2471    #[prost(string, optional, tag = "2")]
2472    pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
2473}
2474#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2475pub struct DataflashIngestConfig {}
2476#[derive(Clone, PartialEq, ::prost::Message)]
2477pub struct McapIngestConfig {
2478    #[prost(message, optional, tag = "1")]
2479    pub channels: ::core::option::Option<McapChannelSelection>,
2480    #[prost(bool, tag = "2")]
2481    pub ignore_invalid_topics: bool,
2482    #[prost(bool, tag = "4")]
2483    pub register_video: bool,
2484}
2485#[derive(Clone, PartialEq, ::prost::Message)]
2486pub struct McapChannelSelection {
2487    #[prost(oneof = "mcap_channel_selection::Selection", tags = "1, 2")]
2488    pub selection: ::core::option::Option<mcap_channel_selection::Selection>,
2489}
2490/// Nested message and enum types in `McapChannelSelection`.
2491pub mod mcap_channel_selection {
2492    #[derive(Clone, PartialEq, ::prost::Oneof)]
2493    pub enum Selection {
2494        #[prost(message, tag = "1")]
2495        IncludeTopics(super::McapTopicNames),
2496        #[prost(message, tag = "2")]
2497        ExcludeTopics(super::McapTopicNames),
2498    }
2499}
2500#[derive(Clone, PartialEq, ::prost::Message)]
2501pub struct McapTopicNames {
2502    #[prost(string, repeated, tag = "1")]
2503    pub topics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2504}
2505#[derive(Clone, PartialEq, ::prost::Message)]
2506pub struct TimestampConfig {
2507    #[prost(oneof = "timestamp_config::Kind", tags = "1")]
2508    pub kind: ::core::option::Option<timestamp_config::Kind>,
2509}
2510/// Nested message and enum types in `TimestampConfig`.
2511pub mod timestamp_config {
2512    #[derive(Clone, PartialEq, ::prost::Oneof)]
2513    pub enum Kind {
2514        #[prost(message, tag = "1")]
2515        Single(super::TimestampCandidate),
2516    }
2517}
2518#[derive(Clone, PartialEq, ::prost::Message)]
2519pub struct TimestampCandidate {
2520    #[prost(string, tag = "1")]
2521    pub column: ::prost::alloc::string::String,
2522    #[prost(message, optional, tag = "2")]
2523    pub r#type: ::core::option::Option<super::super::types::time::AbsoluteTimestamp>,
2524}
2525#[derive(Clone, PartialEq, ::prost::Message)]
2526pub struct PathPattern {
2527    #[prost(message, optional, tag = "1")]
2528    pub first: ::core::option::Option<PatternSegment>,
2529    #[prost(message, repeated, tag = "2")]
2530    pub rest: ::prost::alloc::vec::Vec<JoinedSegment>,
2531}
2532#[derive(Clone, PartialEq, ::prost::Message)]
2533pub struct JoinedSegment {
2534    #[prost(enumeration = "SegmentDelimiter", tag = "1")]
2535    pub delimiter: i32,
2536    #[prost(message, optional, tag = "2")]
2537    pub segment: ::core::option::Option<PatternSegment>,
2538}
2539#[derive(Clone, PartialEq, ::prost::Message)]
2540pub struct PatternSegment {
2541    #[prost(oneof = "pattern_segment::Kind", tags = "1, 2, 3")]
2542    pub kind: ::core::option::Option<pattern_segment::Kind>,
2543}
2544/// Nested message and enum types in `PatternSegment`.
2545pub mod pattern_segment {
2546    #[derive(Clone, PartialEq, ::prost::Oneof)]
2547    pub enum Kind {
2548        #[prost(message, tag = "1")]
2549        ShallowWildcard(super::ShallowWildcard),
2550        #[prost(message, tag = "2")]
2551        DeepWildcard(super::DeepWildcard),
2552        #[prost(string, tag = "3")]
2553        Literal(::prost::alloc::string::String),
2554    }
2555}
2556#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2557pub struct ShallowWildcard {}
2558#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2559pub struct DeepWildcard {}
2560#[derive(Clone, PartialEq, ::prost::Message)]
2561pub struct IngestTriggers {
2562    #[prost(message, optional, tag = "1")]
2563    pub new_match: ::core::option::Option<IngestTarget>,
2564}
2565#[derive(Clone, PartialEq, ::prost::Message)]
2566pub struct IngestTarget {
2567    #[prost(oneof = "ingest_target::Target", tags = "1, 2")]
2568    pub target: ::core::option::Option<ingest_target::Target>,
2569}
2570/// Nested message and enum types in `IngestTarget`.
2571pub mod ingest_target {
2572    #[derive(Clone, PartialEq, ::prost::Oneof)]
2573    pub enum Target {
2574        #[prost(message, tag = "1")]
2575        NewDataset(super::NewDatasetTarget),
2576        #[prost(message, tag = "2")]
2577        ExistingDataset(super::ExistingDatasetTarget),
2578    }
2579}
2580#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2581pub struct NewDatasetTarget {}
2582#[derive(Clone, PartialEq, ::prost::Message)]
2583pub struct ExistingDatasetTarget {
2584    #[prost(string, tag = "1")]
2585    pub dataset_rid: ::prost::alloc::string::String,
2586}
2587#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2588#[repr(i32)]
2589pub enum BackfillMode {
2590    Unspecified = 0,
2591    NewFilesOnly = 1,
2592    BackfillExisting = 2,
2593}
2594impl BackfillMode {
2595    /// String value of the enum field names used in the ProtoBuf definition.
2596    ///
2597    /// The values are not transformed in any way and thus are considered stable
2598    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2599    pub fn as_str_name(&self) -> &'static str {
2600        match self {
2601            Self::Unspecified => "BACKFILL_MODE_UNSPECIFIED",
2602            Self::NewFilesOnly => "BACKFILL_MODE_NEW_FILES_ONLY",
2603            Self::BackfillExisting => "BACKFILL_MODE_BACKFILL_EXISTING",
2604        }
2605    }
2606    /// Creates an enum from field names used in the ProtoBuf definition.
2607    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2608        match value {
2609            "BACKFILL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2610            "BACKFILL_MODE_NEW_FILES_ONLY" => Some(Self::NewFilesOnly),
2611            "BACKFILL_MODE_BACKFILL_EXISTING" => Some(Self::BackfillExisting),
2612            _ => None,
2613        }
2614    }
2615}
2616#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2617#[repr(i32)]
2618pub enum IngestRuleState {
2619    Unspecified = 0,
2620    Active = 1,
2621    Archived = 2,
2622}
2623impl IngestRuleState {
2624    /// String value of the enum field names used in the ProtoBuf definition.
2625    ///
2626    /// The values are not transformed in any way and thus are considered stable
2627    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2628    pub fn as_str_name(&self) -> &'static str {
2629        match self {
2630            Self::Unspecified => "INGEST_RULE_STATE_UNSPECIFIED",
2631            Self::Active => "INGEST_RULE_STATE_ACTIVE",
2632            Self::Archived => "INGEST_RULE_STATE_ARCHIVED",
2633        }
2634    }
2635    /// Creates an enum from field names used in the ProtoBuf definition.
2636    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2637        match value {
2638            "INGEST_RULE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
2639            "INGEST_RULE_STATE_ACTIVE" => Some(Self::Active),
2640            "INGEST_RULE_STATE_ARCHIVED" => Some(Self::Archived),
2641            _ => None,
2642        }
2643    }
2644}
2645#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2646#[repr(i32)]
2647pub enum SegmentDelimiter {
2648    Unspecified = 0,
2649    PathSeparator = 1,
2650    Concat = 2,
2651}
2652impl SegmentDelimiter {
2653    /// String value of the enum field names used in the ProtoBuf definition.
2654    ///
2655    /// The values are not transformed in any way and thus are considered stable
2656    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2657    pub fn as_str_name(&self) -> &'static str {
2658        match self {
2659            Self::Unspecified => "SEGMENT_DELIMITER_UNSPECIFIED",
2660            Self::PathSeparator => "SEGMENT_DELIMITER_PATH_SEPARATOR",
2661            Self::Concat => "SEGMENT_DELIMITER_CONCAT",
2662        }
2663    }
2664    /// Creates an enum from field names used in the ProtoBuf definition.
2665    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2666        match value {
2667            "SEGMENT_DELIMITER_UNSPECIFIED" => Some(Self::Unspecified),
2668            "SEGMENT_DELIMITER_PATH_SEPARATOR" => Some(Self::PathSeparator),
2669            "SEGMENT_DELIMITER_CONCAT" => Some(Self::Concat),
2670            _ => None,
2671        }
2672    }
2673}
2674#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2675#[repr(i32)]
2676pub enum IngestRulesError {
2677    Unspecified = 0,
2678    RuleNotFound = 1,
2679}
2680impl IngestRulesError {
2681    /// String value of the enum field names used in the ProtoBuf definition.
2682    ///
2683    /// The values are not transformed in any way and thus are considered stable
2684    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2685    pub fn as_str_name(&self) -> &'static str {
2686        match self {
2687            Self::Unspecified => "INGEST_RULES_ERROR_UNSPECIFIED",
2688            Self::RuleNotFound => "INGEST_RULES_ERROR_RULE_NOT_FOUND",
2689        }
2690    }
2691    /// Creates an enum from field names used in the ProtoBuf definition.
2692    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2693        match value {
2694            "INGEST_RULES_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
2695            "INGEST_RULES_ERROR_RULE_NOT_FOUND" => Some(Self::RuleNotFound),
2696            _ => None,
2697        }
2698    }
2699}
2700/// Generated client implementations.
2701pub mod internal_ingest_rules_service_client {
2702    #![allow(
2703        unused_variables,
2704        dead_code,
2705        missing_docs,
2706        clippy::wildcard_imports,
2707        clippy::let_unit_value,
2708    )]
2709    use tonic::codegen::*;
2710    use tonic::codegen::http::Uri;
2711    #[derive(Debug, Clone)]
2712    pub struct InternalIngestRulesServiceClient<T> {
2713        inner: tonic::client::Grpc<T>,
2714    }
2715    impl InternalIngestRulesServiceClient<tonic::transport::Channel> {
2716        /// Attempt to create a new client by connecting to a given endpoint.
2717        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2718        where
2719            D: TryInto<tonic::transport::Endpoint>,
2720            D::Error: Into<StdError>,
2721        {
2722            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2723            Ok(Self::new(conn))
2724        }
2725    }
2726    impl<T> InternalIngestRulesServiceClient<T>
2727    where
2728        T: tonic::client::GrpcService<tonic::body::Body>,
2729        T::Error: Into<StdError>,
2730        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2731        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2732    {
2733        pub fn new(inner: T) -> Self {
2734            let inner = tonic::client::Grpc::new(inner);
2735            Self { inner }
2736        }
2737        pub fn with_origin(inner: T, origin: Uri) -> Self {
2738            let inner = tonic::client::Grpc::with_origin(inner, origin);
2739            Self { inner }
2740        }
2741        pub fn with_interceptor<F>(
2742            inner: T,
2743            interceptor: F,
2744        ) -> InternalIngestRulesServiceClient<InterceptedService<T, F>>
2745        where
2746            F: tonic::service::Interceptor,
2747            T::ResponseBody: Default,
2748            T: tonic::codegen::Service<
2749                http::Request<tonic::body::Body>,
2750                Response = http::Response<
2751                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2752                >,
2753            >,
2754            <T as tonic::codegen::Service<
2755                http::Request<tonic::body::Body>,
2756            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2757        {
2758            InternalIngestRulesServiceClient::new(
2759                InterceptedService::new(inner, interceptor),
2760            )
2761        }
2762        /// Compress requests with the given encoding.
2763        ///
2764        /// This requires the server to support it otherwise it might respond with an
2765        /// error.
2766        #[must_use]
2767        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2768            self.inner = self.inner.send_compressed(encoding);
2769            self
2770        }
2771        /// Enable decompressing responses.
2772        #[must_use]
2773        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2774            self.inner = self.inner.accept_compressed(encoding);
2775            self
2776        }
2777        /// Limits the maximum size of a decoded message.
2778        ///
2779        /// Default: `4MB`
2780        #[must_use]
2781        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2782            self.inner = self.inner.max_decoding_message_size(limit);
2783            self
2784        }
2785        /// Limits the maximum size of an encoded message.
2786        ///
2787        /// Default: `usize::MAX`
2788        #[must_use]
2789        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2790            self.inner = self.inner.max_encoding_message_size(limit);
2791            self
2792        }
2793        pub async fn create_ingest_rule(
2794            &mut self,
2795            request: impl tonic::IntoRequest<super::CreateIngestRuleRequest>,
2796        ) -> std::result::Result<
2797            tonic::Response<super::CreateIngestRuleResponse>,
2798            tonic::Status,
2799        > {
2800            self.inner
2801                .ready()
2802                .await
2803                .map_err(|e| {
2804                    tonic::Status::unknown(
2805                        format!("Service was not ready: {}", e.into()),
2806                    )
2807                })?;
2808            let codec = tonic::codec::ProstCodec::default();
2809            let path = http::uri::PathAndQuery::from_static(
2810                "/nominal.file_store.v1.InternalIngestRulesService/CreateIngestRule",
2811            );
2812            let mut req = request.into_request();
2813            req.extensions_mut()
2814                .insert(
2815                    GrpcMethod::new(
2816                        "nominal.file_store.v1.InternalIngestRulesService",
2817                        "CreateIngestRule",
2818                    ),
2819                );
2820            self.inner.unary(req, path, codec).await
2821        }
2822        pub async fn list_ingest_rules(
2823            &mut self,
2824            request: impl tonic::IntoRequest<super::ListIngestRulesRequest>,
2825        ) -> std::result::Result<
2826            tonic::Response<super::ListIngestRulesResponse>,
2827            tonic::Status,
2828        > {
2829            self.inner
2830                .ready()
2831                .await
2832                .map_err(|e| {
2833                    tonic::Status::unknown(
2834                        format!("Service was not ready: {}", e.into()),
2835                    )
2836                })?;
2837            let codec = tonic::codec::ProstCodec::default();
2838            let path = http::uri::PathAndQuery::from_static(
2839                "/nominal.file_store.v1.InternalIngestRulesService/ListIngestRules",
2840            );
2841            let mut req = request.into_request();
2842            req.extensions_mut()
2843                .insert(
2844                    GrpcMethod::new(
2845                        "nominal.file_store.v1.InternalIngestRulesService",
2846                        "ListIngestRules",
2847                    ),
2848                );
2849            self.inner.unary(req, path, codec).await
2850        }
2851        pub async fn get_ingest_rule(
2852            &mut self,
2853            request: impl tonic::IntoRequest<super::GetIngestRuleRequest>,
2854        ) -> std::result::Result<
2855            tonic::Response<super::GetIngestRuleResponse>,
2856            tonic::Status,
2857        > {
2858            self.inner
2859                .ready()
2860                .await
2861                .map_err(|e| {
2862                    tonic::Status::unknown(
2863                        format!("Service was not ready: {}", e.into()),
2864                    )
2865                })?;
2866            let codec = tonic::codec::ProstCodec::default();
2867            let path = http::uri::PathAndQuery::from_static(
2868                "/nominal.file_store.v1.InternalIngestRulesService/GetIngestRule",
2869            );
2870            let mut req = request.into_request();
2871            req.extensions_mut()
2872                .insert(
2873                    GrpcMethod::new(
2874                        "nominal.file_store.v1.InternalIngestRulesService",
2875                        "GetIngestRule",
2876                    ),
2877                );
2878            self.inner.unary(req, path, codec).await
2879        }
2880        pub async fn update_ingest_rule(
2881            &mut self,
2882            request: impl tonic::IntoRequest<super::UpdateIngestRuleRequest>,
2883        ) -> std::result::Result<
2884            tonic::Response<super::UpdateIngestRuleResponse>,
2885            tonic::Status,
2886        > {
2887            self.inner
2888                .ready()
2889                .await
2890                .map_err(|e| {
2891                    tonic::Status::unknown(
2892                        format!("Service was not ready: {}", e.into()),
2893                    )
2894                })?;
2895            let codec = tonic::codec::ProstCodec::default();
2896            let path = http::uri::PathAndQuery::from_static(
2897                "/nominal.file_store.v1.InternalIngestRulesService/UpdateIngestRule",
2898            );
2899            let mut req = request.into_request();
2900            req.extensions_mut()
2901                .insert(
2902                    GrpcMethod::new(
2903                        "nominal.file_store.v1.InternalIngestRulesService",
2904                        "UpdateIngestRule",
2905                    ),
2906                );
2907            self.inner.unary(req, path, codec).await
2908        }
2909        pub async fn archive_ingest_rule(
2910            &mut self,
2911            request: impl tonic::IntoRequest<super::ArchiveIngestRuleRequest>,
2912        ) -> std::result::Result<
2913            tonic::Response<super::ArchiveIngestRuleResponse>,
2914            tonic::Status,
2915        > {
2916            self.inner
2917                .ready()
2918                .await
2919                .map_err(|e| {
2920                    tonic::Status::unknown(
2921                        format!("Service was not ready: {}", e.into()),
2922                    )
2923                })?;
2924            let codec = tonic::codec::ProstCodec::default();
2925            let path = http::uri::PathAndQuery::from_static(
2926                "/nominal.file_store.v1.InternalIngestRulesService/ArchiveIngestRule",
2927            );
2928            let mut req = request.into_request();
2929            req.extensions_mut()
2930                .insert(
2931                    GrpcMethod::new(
2932                        "nominal.file_store.v1.InternalIngestRulesService",
2933                        "ArchiveIngestRule",
2934                    ),
2935                );
2936            self.inner.unary(req, path, codec).await
2937        }
2938        pub async fn unarchive_ingest_rule(
2939            &mut self,
2940            request: impl tonic::IntoRequest<super::UnarchiveIngestRuleRequest>,
2941        ) -> std::result::Result<
2942            tonic::Response<super::UnarchiveIngestRuleResponse>,
2943            tonic::Status,
2944        > {
2945            self.inner
2946                .ready()
2947                .await
2948                .map_err(|e| {
2949                    tonic::Status::unknown(
2950                        format!("Service was not ready: {}", e.into()),
2951                    )
2952                })?;
2953            let codec = tonic::codec::ProstCodec::default();
2954            let path = http::uri::PathAndQuery::from_static(
2955                "/nominal.file_store.v1.InternalIngestRulesService/UnarchiveIngestRule",
2956            );
2957            let mut req = request.into_request();
2958            req.extensions_mut()
2959                .insert(
2960                    GrpcMethod::new(
2961                        "nominal.file_store.v1.InternalIngestRulesService",
2962                        "UnarchiveIngestRule",
2963                    ),
2964                );
2965            self.inner.unary(req, path, codec).await
2966        }
2967    }
2968}