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}
852#[derive(Clone, PartialEq, ::prost::Message)]
853pub struct NotifyVirtualDriveFilesResponse {
854    #[prost(int32, tag = "1")]
855    pub enqueued: i32,
856    #[prost(int32, tag = "2")]
857    pub skipped: i32,
858    #[prost(int32, tag = "3")]
859    pub malformed: i32,
860    #[prost(message, repeated, tag = "4")]
861    pub skipped_by_reason: ::prost::alloc::vec::Vec<SkippedCount>,
862}
863#[derive(Clone, Copy, PartialEq, ::prost::Message)]
864pub struct SkippedCount {
865    #[prost(enumeration = "NotifySkipReason", tag = "1")]
866    pub reason: i32,
867    #[prost(int32, tag = "2")]
868    pub count: i32,
869}
870#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
871#[repr(i32)]
872pub enum NotifySkipReason {
873    Unspecified = 0,
874    WrongBucket = 1,
875    OutsidePrefix = 2,
876    FolderMarker = 3,
877    InvalidPath = 4,
878    NotFound = 5,
879    Unreadable = 6,
880}
881impl NotifySkipReason {
882    /// String value of the enum field names used in the ProtoBuf definition.
883    ///
884    /// The values are not transformed in any way and thus are considered stable
885    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
886    pub fn as_str_name(&self) -> &'static str {
887        match self {
888            Self::Unspecified => "NOTIFY_SKIP_REASON_UNSPECIFIED",
889            Self::WrongBucket => "NOTIFY_SKIP_REASON_WRONG_BUCKET",
890            Self::OutsidePrefix => "NOTIFY_SKIP_REASON_OUTSIDE_PREFIX",
891            Self::FolderMarker => "NOTIFY_SKIP_REASON_FOLDER_MARKER",
892            Self::InvalidPath => "NOTIFY_SKIP_REASON_INVALID_PATH",
893            Self::NotFound => "NOTIFY_SKIP_REASON_NOT_FOUND",
894            Self::Unreadable => "NOTIFY_SKIP_REASON_UNREADABLE",
895        }
896    }
897    /// Creates an enum from field names used in the ProtoBuf definition.
898    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
899        match value {
900            "NOTIFY_SKIP_REASON_UNSPECIFIED" => Some(Self::Unspecified),
901            "NOTIFY_SKIP_REASON_WRONG_BUCKET" => Some(Self::WrongBucket),
902            "NOTIFY_SKIP_REASON_OUTSIDE_PREFIX" => Some(Self::OutsidePrefix),
903            "NOTIFY_SKIP_REASON_FOLDER_MARKER" => Some(Self::FolderMarker),
904            "NOTIFY_SKIP_REASON_INVALID_PATH" => Some(Self::InvalidPath),
905            "NOTIFY_SKIP_REASON_NOT_FOUND" => Some(Self::NotFound),
906            "NOTIFY_SKIP_REASON_UNREADABLE" => Some(Self::Unreadable),
907            _ => None,
908        }
909    }
910}
911#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
912#[repr(i32)]
913pub enum DriveAdminError {
914    Unspecified = 0,
915    DriveIdAlreadyExists = 1,
916    VirtualDriveNotFound = 2,
917    InvalidVirtualDriveConfiguration = 3,
918}
919impl DriveAdminError {
920    /// String value of the enum field names used in the ProtoBuf definition.
921    ///
922    /// The values are not transformed in any way and thus are considered stable
923    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
924    pub fn as_str_name(&self) -> &'static str {
925        match self {
926            Self::Unspecified => "DRIVE_ADMIN_ERROR_UNSPECIFIED",
927            Self::DriveIdAlreadyExists => "DRIVE_ADMIN_ERROR_DRIVE_ID_ALREADY_EXISTS",
928            Self::VirtualDriveNotFound => "DRIVE_ADMIN_ERROR_VIRTUAL_DRIVE_NOT_FOUND",
929            Self::InvalidVirtualDriveConfiguration => {
930                "DRIVE_ADMIN_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION"
931            }
932        }
933    }
934    /// Creates an enum from field names used in the ProtoBuf definition.
935    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
936        match value {
937            "DRIVE_ADMIN_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
938            "DRIVE_ADMIN_ERROR_DRIVE_ID_ALREADY_EXISTS" => {
939                Some(Self::DriveIdAlreadyExists)
940            }
941            "DRIVE_ADMIN_ERROR_VIRTUAL_DRIVE_NOT_FOUND" => {
942                Some(Self::VirtualDriveNotFound)
943            }
944            "DRIVE_ADMIN_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION" => {
945                Some(Self::InvalidVirtualDriveConfiguration)
946            }
947            _ => None,
948        }
949    }
950}
951/// Generated client implementations.
952pub mod drives_service_client {
953    #![allow(
954        unused_variables,
955        dead_code,
956        missing_docs,
957        clippy::wildcard_imports,
958        clippy::let_unit_value,
959    )]
960    use tonic::codegen::*;
961    use tonic::codegen::http::Uri;
962    #[derive(Debug, Clone)]
963    pub struct DrivesServiceClient<T> {
964        inner: tonic::client::Grpc<T>,
965    }
966    impl DrivesServiceClient<tonic::transport::Channel> {
967        /// Attempt to create a new client by connecting to a given endpoint.
968        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
969        where
970            D: TryInto<tonic::transport::Endpoint>,
971            D::Error: Into<StdError>,
972        {
973            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
974            Ok(Self::new(conn))
975        }
976    }
977    impl<T> DrivesServiceClient<T>
978    where
979        T: tonic::client::GrpcService<tonic::body::Body>,
980        T::Error: Into<StdError>,
981        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
982        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
983    {
984        pub fn new(inner: T) -> Self {
985            let inner = tonic::client::Grpc::new(inner);
986            Self { inner }
987        }
988        pub fn with_origin(inner: T, origin: Uri) -> Self {
989            let inner = tonic::client::Grpc::with_origin(inner, origin);
990            Self { inner }
991        }
992        pub fn with_interceptor<F>(
993            inner: T,
994            interceptor: F,
995        ) -> DrivesServiceClient<InterceptedService<T, F>>
996        where
997            F: tonic::service::Interceptor,
998            T::ResponseBody: Default,
999            T: tonic::codegen::Service<
1000                http::Request<tonic::body::Body>,
1001                Response = http::Response<
1002                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1003                >,
1004            >,
1005            <T as tonic::codegen::Service<
1006                http::Request<tonic::body::Body>,
1007            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1008        {
1009            DrivesServiceClient::new(InterceptedService::new(inner, interceptor))
1010        }
1011        /// Compress requests with the given encoding.
1012        ///
1013        /// This requires the server to support it otherwise it might respond with an
1014        /// error.
1015        #[must_use]
1016        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1017            self.inner = self.inner.send_compressed(encoding);
1018            self
1019        }
1020        /// Enable decompressing responses.
1021        #[must_use]
1022        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1023            self.inner = self.inner.accept_compressed(encoding);
1024            self
1025        }
1026        /// Limits the maximum size of a decoded message.
1027        ///
1028        /// Default: `4MB`
1029        #[must_use]
1030        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1031            self.inner = self.inner.max_decoding_message_size(limit);
1032            self
1033        }
1034        /// Limits the maximum size of an encoded message.
1035        ///
1036        /// Default: `usize::MAX`
1037        #[must_use]
1038        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1039            self.inner = self.inner.max_encoding_message_size(limit);
1040            self
1041        }
1042        pub async fn create_drive(
1043            &mut self,
1044            request: impl tonic::IntoRequest<super::CreateDriveRequest>,
1045        ) -> std::result::Result<
1046            tonic::Response<super::CreateDriveResponse>,
1047            tonic::Status,
1048        > {
1049            self.inner
1050                .ready()
1051                .await
1052                .map_err(|e| {
1053                    tonic::Status::unknown(
1054                        format!("Service was not ready: {}", e.into()),
1055                    )
1056                })?;
1057            let codec = tonic::codec::ProstCodec::default();
1058            let path = http::uri::PathAndQuery::from_static(
1059                "/nominal.file_store.v1.DrivesService/CreateDrive",
1060            );
1061            let mut req = request.into_request();
1062            req.extensions_mut()
1063                .insert(
1064                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "CreateDrive"),
1065                );
1066            self.inner.unary(req, path, codec).await
1067        }
1068        pub async fn create_virtual_drive(
1069            &mut self,
1070            request: impl tonic::IntoRequest<super::CreateVirtualDriveRequest>,
1071        ) -> std::result::Result<
1072            tonic::Response<super::CreateVirtualDriveResponse>,
1073            tonic::Status,
1074        > {
1075            self.inner
1076                .ready()
1077                .await
1078                .map_err(|e| {
1079                    tonic::Status::unknown(
1080                        format!("Service was not ready: {}", e.into()),
1081                    )
1082                })?;
1083            let codec = tonic::codec::ProstCodec::default();
1084            let path = http::uri::PathAndQuery::from_static(
1085                "/nominal.file_store.v1.DrivesService/CreateVirtualDrive",
1086            );
1087            let mut req = request.into_request();
1088            req.extensions_mut()
1089                .insert(
1090                    GrpcMethod::new(
1091                        "nominal.file_store.v1.DrivesService",
1092                        "CreateVirtualDrive",
1093                    ),
1094                );
1095            self.inner.unary(req, path, codec).await
1096        }
1097        pub async fn get_drive(
1098            &mut self,
1099            request: impl tonic::IntoRequest<super::GetDriveRequest>,
1100        ) -> std::result::Result<
1101            tonic::Response<super::GetDriveResponse>,
1102            tonic::Status,
1103        > {
1104            self.inner
1105                .ready()
1106                .await
1107                .map_err(|e| {
1108                    tonic::Status::unknown(
1109                        format!("Service was not ready: {}", e.into()),
1110                    )
1111                })?;
1112            let codec = tonic::codec::ProstCodec::default();
1113            let path = http::uri::PathAndQuery::from_static(
1114                "/nominal.file_store.v1.DrivesService/GetDrive",
1115            );
1116            let mut req = request.into_request();
1117            req.extensions_mut()
1118                .insert(
1119                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "GetDrive"),
1120                );
1121            self.inner.unary(req, path, codec).await
1122        }
1123        pub async fn get_virtual_drive_details(
1124            &mut self,
1125            request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsRequest>,
1126        ) -> std::result::Result<
1127            tonic::Response<super::GetVirtualDriveDetailsResponse>,
1128            tonic::Status,
1129        > {
1130            self.inner
1131                .ready()
1132                .await
1133                .map_err(|e| {
1134                    tonic::Status::unknown(
1135                        format!("Service was not ready: {}", e.into()),
1136                    )
1137                })?;
1138            let codec = tonic::codec::ProstCodec::default();
1139            let path = http::uri::PathAndQuery::from_static(
1140                "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetails",
1141            );
1142            let mut req = request.into_request();
1143            req.extensions_mut()
1144                .insert(
1145                    GrpcMethod::new(
1146                        "nominal.file_store.v1.DrivesService",
1147                        "GetVirtualDriveDetails",
1148                    ),
1149                );
1150            self.inner.unary(req, path, codec).await
1151        }
1152        pub async fn get_virtual_drive_status(
1153            &mut self,
1154            request: impl tonic::IntoRequest<super::GetVirtualDriveStatusRequest>,
1155        ) -> std::result::Result<
1156            tonic::Response<super::GetVirtualDriveStatusResponse>,
1157            tonic::Status,
1158        > {
1159            self.inner
1160                .ready()
1161                .await
1162                .map_err(|e| {
1163                    tonic::Status::unknown(
1164                        format!("Service was not ready: {}", e.into()),
1165                    )
1166                })?;
1167            let codec = tonic::codec::ProstCodec::default();
1168            let path = http::uri::PathAndQuery::from_static(
1169                "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatus",
1170            );
1171            let mut req = request.into_request();
1172            req.extensions_mut()
1173                .insert(
1174                    GrpcMethod::new(
1175                        "nominal.file_store.v1.DrivesService",
1176                        "GetVirtualDriveStatus",
1177                    ),
1178                );
1179            self.inner.unary(req, path, codec).await
1180        }
1181        pub async fn get_drive_by_id(
1182            &mut self,
1183            request: impl tonic::IntoRequest<super::GetDriveByIdRequest>,
1184        ) -> std::result::Result<
1185            tonic::Response<super::GetDriveByIdResponse>,
1186            tonic::Status,
1187        > {
1188            self.inner
1189                .ready()
1190                .await
1191                .map_err(|e| {
1192                    tonic::Status::unknown(
1193                        format!("Service was not ready: {}", e.into()),
1194                    )
1195                })?;
1196            let codec = tonic::codec::ProstCodec::default();
1197            let path = http::uri::PathAndQuery::from_static(
1198                "/nominal.file_store.v1.DrivesService/GetDriveById",
1199            );
1200            let mut req = request.into_request();
1201            req.extensions_mut()
1202                .insert(
1203                    GrpcMethod::new(
1204                        "nominal.file_store.v1.DrivesService",
1205                        "GetDriveById",
1206                    ),
1207                );
1208            self.inner.unary(req, path, codec).await
1209        }
1210        pub async fn get_virtual_drive_details_by_id(
1211            &mut self,
1212            request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsByIdRequest>,
1213        ) -> std::result::Result<
1214            tonic::Response<super::GetVirtualDriveDetailsByIdResponse>,
1215            tonic::Status,
1216        > {
1217            self.inner
1218                .ready()
1219                .await
1220                .map_err(|e| {
1221                    tonic::Status::unknown(
1222                        format!("Service was not ready: {}", e.into()),
1223                    )
1224                })?;
1225            let codec = tonic::codec::ProstCodec::default();
1226            let path = http::uri::PathAndQuery::from_static(
1227                "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetailsById",
1228            );
1229            let mut req = request.into_request();
1230            req.extensions_mut()
1231                .insert(
1232                    GrpcMethod::new(
1233                        "nominal.file_store.v1.DrivesService",
1234                        "GetVirtualDriveDetailsById",
1235                    ),
1236                );
1237            self.inner.unary(req, path, codec).await
1238        }
1239        pub async fn get_virtual_drive_status_by_id(
1240            &mut self,
1241            request: impl tonic::IntoRequest<super::GetVirtualDriveStatusByIdRequest>,
1242        ) -> std::result::Result<
1243            tonic::Response<super::GetVirtualDriveStatusByIdResponse>,
1244            tonic::Status,
1245        > {
1246            self.inner
1247                .ready()
1248                .await
1249                .map_err(|e| {
1250                    tonic::Status::unknown(
1251                        format!("Service was not ready: {}", e.into()),
1252                    )
1253                })?;
1254            let codec = tonic::codec::ProstCodec::default();
1255            let path = http::uri::PathAndQuery::from_static(
1256                "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatusById",
1257            );
1258            let mut req = request.into_request();
1259            req.extensions_mut()
1260                .insert(
1261                    GrpcMethod::new(
1262                        "nominal.file_store.v1.DrivesService",
1263                        "GetVirtualDriveStatusById",
1264                    ),
1265                );
1266            self.inner.unary(req, path, codec).await
1267        }
1268        pub async fn list_drives(
1269            &mut self,
1270            request: impl tonic::IntoRequest<super::ListDrivesRequest>,
1271        ) -> std::result::Result<
1272            tonic::Response<super::ListDrivesResponse>,
1273            tonic::Status,
1274        > {
1275            self.inner
1276                .ready()
1277                .await
1278                .map_err(|e| {
1279                    tonic::Status::unknown(
1280                        format!("Service was not ready: {}", e.into()),
1281                    )
1282                })?;
1283            let codec = tonic::codec::ProstCodec::default();
1284            let path = http::uri::PathAndQuery::from_static(
1285                "/nominal.file_store.v1.DrivesService/ListDrives",
1286            );
1287            let mut req = request.into_request();
1288            req.extensions_mut()
1289                .insert(
1290                    GrpcMethod::new("nominal.file_store.v1.DrivesService", "ListDrives"),
1291                );
1292            self.inner.unary(req, path, codec).await
1293        }
1294        pub async fn update_virtual_drive(
1295            &mut self,
1296            request: impl tonic::IntoRequest<super::UpdateVirtualDriveRequest>,
1297        ) -> std::result::Result<
1298            tonic::Response<super::UpdateVirtualDriveResponse>,
1299            tonic::Status,
1300        > {
1301            self.inner
1302                .ready()
1303                .await
1304                .map_err(|e| {
1305                    tonic::Status::unknown(
1306                        format!("Service was not ready: {}", e.into()),
1307                    )
1308                })?;
1309            let codec = tonic::codec::ProstCodec::default();
1310            let path = http::uri::PathAndQuery::from_static(
1311                "/nominal.file_store.v1.DrivesService/UpdateVirtualDrive",
1312            );
1313            let mut req = request.into_request();
1314            req.extensions_mut()
1315                .insert(
1316                    GrpcMethod::new(
1317                        "nominal.file_store.v1.DrivesService",
1318                        "UpdateVirtualDrive",
1319                    ),
1320                );
1321            self.inner.unary(req, path, codec).await
1322        }
1323        pub async fn update_drive_details(
1324            &mut self,
1325            request: impl tonic::IntoRequest<super::UpdateDriveDetailsRequest>,
1326        ) -> std::result::Result<
1327            tonic::Response<super::UpdateDriveDetailsResponse>,
1328            tonic::Status,
1329        > {
1330            self.inner
1331                .ready()
1332                .await
1333                .map_err(|e| {
1334                    tonic::Status::unknown(
1335                        format!("Service was not ready: {}", e.into()),
1336                    )
1337                })?;
1338            let codec = tonic::codec::ProstCodec::default();
1339            let path = http::uri::PathAndQuery::from_static(
1340                "/nominal.file_store.v1.DrivesService/UpdateDriveDetails",
1341            );
1342            let mut req = request.into_request();
1343            req.extensions_mut()
1344                .insert(
1345                    GrpcMethod::new(
1346                        "nominal.file_store.v1.DrivesService",
1347                        "UpdateDriveDetails",
1348                    ),
1349                );
1350            self.inner.unary(req, path, codec).await
1351        }
1352        pub async fn archive_drive(
1353            &mut self,
1354            request: impl tonic::IntoRequest<super::ArchiveDriveRequest>,
1355        ) -> std::result::Result<
1356            tonic::Response<super::ArchiveDriveResponse>,
1357            tonic::Status,
1358        > {
1359            self.inner
1360                .ready()
1361                .await
1362                .map_err(|e| {
1363                    tonic::Status::unknown(
1364                        format!("Service was not ready: {}", e.into()),
1365                    )
1366                })?;
1367            let codec = tonic::codec::ProstCodec::default();
1368            let path = http::uri::PathAndQuery::from_static(
1369                "/nominal.file_store.v1.DrivesService/ArchiveDrive",
1370            );
1371            let mut req = request.into_request();
1372            req.extensions_mut()
1373                .insert(
1374                    GrpcMethod::new(
1375                        "nominal.file_store.v1.DrivesService",
1376                        "ArchiveDrive",
1377                    ),
1378                );
1379            self.inner.unary(req, path, codec).await
1380        }
1381        pub async fn unarchive_drive(
1382            &mut self,
1383            request: impl tonic::IntoRequest<super::UnarchiveDriveRequest>,
1384        ) -> std::result::Result<
1385            tonic::Response<super::UnarchiveDriveResponse>,
1386            tonic::Status,
1387        > {
1388            self.inner
1389                .ready()
1390                .await
1391                .map_err(|e| {
1392                    tonic::Status::unknown(
1393                        format!("Service was not ready: {}", e.into()),
1394                    )
1395                })?;
1396            let codec = tonic::codec::ProstCodec::default();
1397            let path = http::uri::PathAndQuery::from_static(
1398                "/nominal.file_store.v1.DrivesService/UnarchiveDrive",
1399            );
1400            let mut req = request.into_request();
1401            req.extensions_mut()
1402                .insert(
1403                    GrpcMethod::new(
1404                        "nominal.file_store.v1.DrivesService",
1405                        "UnarchiveDrive",
1406                    ),
1407                );
1408            self.inner.unary(req, path, codec).await
1409        }
1410        pub async fn notify_virtual_drive_files(
1411            &mut self,
1412            request: impl tonic::IntoRequest<super::NotifyVirtualDriveFilesRequest>,
1413        ) -> std::result::Result<
1414            tonic::Response<super::NotifyVirtualDriveFilesResponse>,
1415            tonic::Status,
1416        > {
1417            self.inner
1418                .ready()
1419                .await
1420                .map_err(|e| {
1421                    tonic::Status::unknown(
1422                        format!("Service was not ready: {}", e.into()),
1423                    )
1424                })?;
1425            let codec = tonic::codec::ProstCodec::default();
1426            let path = http::uri::PathAndQuery::from_static(
1427                "/nominal.file_store.v1.DrivesService/NotifyVirtualDriveFiles",
1428            );
1429            let mut req = request.into_request();
1430            req.extensions_mut()
1431                .insert(
1432                    GrpcMethod::new(
1433                        "nominal.file_store.v1.DrivesService",
1434                        "NotifyVirtualDriveFiles",
1435                    ),
1436                );
1437            self.inner.unary(req, path, codec).await
1438        }
1439    }
1440}
1441#[derive(Clone, PartialEq, ::prost::Message)]
1442pub struct GetFileRevisionTextDiffPreviewRequest {
1443    #[prost(string, optional, tag = "1")]
1444    pub from_revision_rid: ::core::option::Option<::prost::alloc::string::String>,
1445    #[prost(string, tag = "2")]
1446    pub to_revision_rid: ::prost::alloc::string::String,
1447    #[prost(int32, optional, tag = "3")]
1448    pub page_size: ::core::option::Option<i32>,
1449    #[prost(string, optional, tag = "4")]
1450    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1451}
1452#[derive(Clone, PartialEq, ::prost::Message)]
1453pub struct GetFileRevisionTextDiffPreviewResponse {
1454    #[prost(message, repeated, tag = "1")]
1455    pub changes: ::prost::alloc::vec::Vec<DiffChange>,
1456    #[prost(string, optional, tag = "2")]
1457    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1458    #[prost(uint32, tag = "3")]
1459    pub total_change_count: u32,
1460    #[prost(uint32, tag = "4")]
1461    pub total_added_lines: u32,
1462    #[prost(uint32, tag = "5")]
1463    pub total_removed_lines: u32,
1464    #[prost(string, tag = "6")]
1465    pub from_revision_rid: ::prost::alloc::string::String,
1466}
1467#[derive(Clone, PartialEq, ::prost::Message)]
1468pub struct DiffChange {
1469    #[prost(message, repeated, tag = "1")]
1470    pub context_before: ::prost::alloc::vec::Vec<ContextLine>,
1471    #[prost(message, repeated, tag = "2")]
1472    pub removed: ::prost::alloc::vec::Vec<RemovedLine>,
1473    #[prost(message, repeated, tag = "3")]
1474    pub added: ::prost::alloc::vec::Vec<AddedLine>,
1475    #[prost(message, repeated, tag = "4")]
1476    pub context_after: ::prost::alloc::vec::Vec<ContextLine>,
1477}
1478#[derive(Clone, PartialEq, ::prost::Message)]
1479pub struct ContextLine {
1480    #[prost(uint32, tag = "1")]
1481    pub from_line: u32,
1482    #[prost(uint32, tag = "2")]
1483    pub to_line: u32,
1484    #[prost(string, tag = "3")]
1485    pub text: ::prost::alloc::string::String,
1486    #[prost(bool, tag = "4")]
1487    pub text_truncated: bool,
1488}
1489#[derive(Clone, PartialEq, ::prost::Message)]
1490pub struct RemovedLine {
1491    #[prost(uint32, tag = "1")]
1492    pub from_line: u32,
1493    #[prost(string, tag = "2")]
1494    pub text: ::prost::alloc::string::String,
1495    #[prost(bool, tag = "3")]
1496    pub text_truncated: bool,
1497}
1498#[derive(Clone, PartialEq, ::prost::Message)]
1499pub struct AddedLine {
1500    #[prost(uint32, tag = "1")]
1501    pub to_line: u32,
1502    #[prost(string, tag = "2")]
1503    pub text: ::prost::alloc::string::String,
1504    #[prost(bool, tag = "3")]
1505    pub text_truncated: bool,
1506}
1507#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1508#[repr(i32)]
1509pub enum TextDiffError {
1510    Unspecified = 0,
1511    RevisionContentNotText = 1,
1512    RevisionTooLarge = 2,
1513    PageTokenStale = 3,
1514    NoPrecedingRevision = 4,
1515}
1516impl TextDiffError {
1517    /// String value of the enum field names used in the ProtoBuf definition.
1518    ///
1519    /// The values are not transformed in any way and thus are considered stable
1520    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1521    pub fn as_str_name(&self) -> &'static str {
1522        match self {
1523            Self::Unspecified => "TEXT_DIFF_ERROR_UNSPECIFIED",
1524            Self::RevisionContentNotText => "TEXT_DIFF_ERROR_REVISION_CONTENT_NOT_TEXT",
1525            Self::RevisionTooLarge => "TEXT_DIFF_ERROR_REVISION_TOO_LARGE",
1526            Self::PageTokenStale => "TEXT_DIFF_ERROR_PAGE_TOKEN_STALE",
1527            Self::NoPrecedingRevision => "TEXT_DIFF_ERROR_NO_PRECEDING_REVISION",
1528        }
1529    }
1530    /// Creates an enum from field names used in the ProtoBuf definition.
1531    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1532        match value {
1533            "TEXT_DIFF_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1534            "TEXT_DIFF_ERROR_REVISION_CONTENT_NOT_TEXT" => {
1535                Some(Self::RevisionContentNotText)
1536            }
1537            "TEXT_DIFF_ERROR_REVISION_TOO_LARGE" => Some(Self::RevisionTooLarge),
1538            "TEXT_DIFF_ERROR_PAGE_TOKEN_STALE" => Some(Self::PageTokenStale),
1539            "TEXT_DIFF_ERROR_NO_PRECEDING_REVISION" => Some(Self::NoPrecedingRevision),
1540            _ => None,
1541        }
1542    }
1543}
1544/// Generated client implementations.
1545pub mod file_content_service_client {
1546    #![allow(
1547        unused_variables,
1548        dead_code,
1549        missing_docs,
1550        clippy::wildcard_imports,
1551        clippy::let_unit_value,
1552    )]
1553    use tonic::codegen::*;
1554    use tonic::codegen::http::Uri;
1555    #[derive(Debug, Clone)]
1556    pub struct FileContentServiceClient<T> {
1557        inner: tonic::client::Grpc<T>,
1558    }
1559    impl FileContentServiceClient<tonic::transport::Channel> {
1560        /// Attempt to create a new client by connecting to a given endpoint.
1561        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1562        where
1563            D: TryInto<tonic::transport::Endpoint>,
1564            D::Error: Into<StdError>,
1565        {
1566            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1567            Ok(Self::new(conn))
1568        }
1569    }
1570    impl<T> FileContentServiceClient<T>
1571    where
1572        T: tonic::client::GrpcService<tonic::body::Body>,
1573        T::Error: Into<StdError>,
1574        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1575        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1576    {
1577        pub fn new(inner: T) -> Self {
1578            let inner = tonic::client::Grpc::new(inner);
1579            Self { inner }
1580        }
1581        pub fn with_origin(inner: T, origin: Uri) -> Self {
1582            let inner = tonic::client::Grpc::with_origin(inner, origin);
1583            Self { inner }
1584        }
1585        pub fn with_interceptor<F>(
1586            inner: T,
1587            interceptor: F,
1588        ) -> FileContentServiceClient<InterceptedService<T, F>>
1589        where
1590            F: tonic::service::Interceptor,
1591            T::ResponseBody: Default,
1592            T: tonic::codegen::Service<
1593                http::Request<tonic::body::Body>,
1594                Response = http::Response<
1595                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1596                >,
1597            >,
1598            <T as tonic::codegen::Service<
1599                http::Request<tonic::body::Body>,
1600            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1601        {
1602            FileContentServiceClient::new(InterceptedService::new(inner, interceptor))
1603        }
1604        /// Compress requests with the given encoding.
1605        ///
1606        /// This requires the server to support it otherwise it might respond with an
1607        /// error.
1608        #[must_use]
1609        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1610            self.inner = self.inner.send_compressed(encoding);
1611            self
1612        }
1613        /// Enable decompressing responses.
1614        #[must_use]
1615        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1616            self.inner = self.inner.accept_compressed(encoding);
1617            self
1618        }
1619        /// Limits the maximum size of a decoded message.
1620        ///
1621        /// Default: `4MB`
1622        #[must_use]
1623        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1624            self.inner = self.inner.max_decoding_message_size(limit);
1625            self
1626        }
1627        /// Limits the maximum size of an encoded message.
1628        ///
1629        /// Default: `usize::MAX`
1630        #[must_use]
1631        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1632            self.inner = self.inner.max_encoding_message_size(limit);
1633            self
1634        }
1635        pub async fn get_file_revision_text_diff_preview(
1636            &mut self,
1637            request: impl tonic::IntoRequest<
1638                super::GetFileRevisionTextDiffPreviewRequest,
1639            >,
1640        ) -> std::result::Result<
1641            tonic::Response<super::GetFileRevisionTextDiffPreviewResponse>,
1642            tonic::Status,
1643        > {
1644            self.inner
1645                .ready()
1646                .await
1647                .map_err(|e| {
1648                    tonic::Status::unknown(
1649                        format!("Service was not ready: {}", e.into()),
1650                    )
1651                })?;
1652            let codec = tonic::codec::ProstCodec::default();
1653            let path = http::uri::PathAndQuery::from_static(
1654                "/nominal.file_store.v1.FileContentService/GetFileRevisionTextDiffPreview",
1655            );
1656            let mut req = request.into_request();
1657            req.extensions_mut()
1658                .insert(
1659                    GrpcMethod::new(
1660                        "nominal.file_store.v1.FileContentService",
1661                        "GetFileRevisionTextDiffPreview",
1662                    ),
1663                );
1664            self.inner.unary(req, path, codec).await
1665        }
1666    }
1667}
1668#[derive(Clone, PartialEq, ::prost::Message)]
1669pub struct UploadedObjectRef {
1670    #[prost(string, tag = "1")]
1671    pub object_key: ::prost::alloc::string::String,
1672}
1673#[derive(Clone, PartialEq, ::prost::Message)]
1674pub struct PathTarget {
1675    #[prost(message, optional, tag = "1")]
1676    pub path: ::core::option::Option<LogicalPath>,
1677}
1678#[derive(Clone, PartialEq, ::prost::Message)]
1679pub struct Destination {
1680    #[prost(oneof = "destination::Target", tags = "1, 2")]
1681    pub target: ::core::option::Option<destination::Target>,
1682}
1683/// Nested message and enum types in `Destination`.
1684pub mod destination {
1685    #[derive(Clone, PartialEq, ::prost::Oneof)]
1686    pub enum Target {
1687        #[prost(message, tag = "1")]
1688        Path(super::PathTarget),
1689        #[prost(string, tag = "2")]
1690        FileRevisionRid(::prost::alloc::string::String),
1691    }
1692}
1693#[derive(Clone, PartialEq, ::prost::Message)]
1694pub struct PutFile {
1695    #[prost(message, optional, tag = "1")]
1696    pub object: ::core::option::Option<UploadedObjectRef>,
1697    #[prost(uint64, tag = "2")]
1698    pub size_bytes: u64,
1699    #[prost(message, optional, tag = "3")]
1700    pub destination: ::core::option::Option<Destination>,
1701}
1702#[derive(Clone, PartialEq, ::prost::Message)]
1703pub struct MoveFile {
1704    #[prost(string, tag = "1")]
1705    pub source_revision_rid: ::prost::alloc::string::String,
1706    #[prost(message, optional, tag = "2")]
1707    pub destination: ::core::option::Option<Destination>,
1708}
1709#[derive(Clone, PartialEq, ::prost::Message)]
1710pub struct RemoveFile {
1711    #[prost(string, tag = "1")]
1712    pub revision_rid: ::prost::alloc::string::String,
1713}
1714#[derive(Clone, PartialEq, ::prost::Message)]
1715pub struct RestoreFile {
1716    #[prost(string, tag = "1")]
1717    pub restore_revision_rid: ::prost::alloc::string::String,
1718    #[prost(message, optional, tag = "2")]
1719    pub destination: ::core::option::Option<Destination>,
1720}
1721#[derive(Clone, PartialEq, ::prost::Message)]
1722pub struct MoveDirectory {
1723    #[prost(message, optional, tag = "1")]
1724    pub from: ::core::option::Option<LogicalPath>,
1725    #[prost(message, optional, tag = "2")]
1726    pub to: ::core::option::Option<LogicalPath>,
1727}
1728#[derive(Clone, PartialEq, ::prost::Message)]
1729pub struct FileChange {
1730    #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4, 5")]
1731    pub change: ::core::option::Option<file_change::Change>,
1732}
1733/// Nested message and enum types in `FileChange`.
1734pub mod file_change {
1735    #[derive(Clone, PartialEq, ::prost::Oneof)]
1736    pub enum Change {
1737        #[prost(message, tag = "1")]
1738        Put(super::PutFile),
1739        #[prost(message, tag = "2")]
1740        Move(super::MoveFile),
1741        #[prost(message, tag = "3")]
1742        Remove(super::RemoveFile),
1743        #[prost(message, tag = "4")]
1744        Restore(super::RestoreFile),
1745        #[prost(message, tag = "5")]
1746        MoveDirectory(super::MoveDirectory),
1747    }
1748}
1749#[derive(Clone, PartialEq, ::prost::Message)]
1750pub struct GetFileRequest {
1751    #[prost(string, tag = "1")]
1752    pub drive_rid: ::prost::alloc::string::String,
1753    #[prost(message, optional, tag = "2")]
1754    pub path: ::core::option::Option<LogicalPath>,
1755    #[prost(bool, tag = "3")]
1756    pub include_removed: bool,
1757}
1758#[derive(Clone, PartialEq, ::prost::Message)]
1759pub struct GetFileByIdentityRequest {
1760    #[prost(message, optional, tag = "1")]
1761    pub identity: ::core::option::Option<LogicalFileIdentity>,
1762}
1763#[derive(Clone, PartialEq, ::prost::Message)]
1764pub struct GetFileResponse {
1765    #[prost(message, optional, tag = "1")]
1766    pub file: ::core::option::Option<LogicalFile>,
1767    #[prost(string, tag = "2")]
1768    pub drive_rid: ::prost::alloc::string::String,
1769}
1770#[derive(Clone, PartialEq, ::prost::Message)]
1771pub struct GetFileByIdentityResponse {
1772    #[prost(message, optional, tag = "1")]
1773    pub file: ::core::option::Option<LogicalFile>,
1774    #[prost(string, tag = "2")]
1775    pub drive_rid: ::prost::alloc::string::String,
1776}
1777#[derive(Clone, PartialEq, ::prost::Message)]
1778pub struct ResolveFileRevisionRequest {
1779    #[prost(message, optional, tag = "2")]
1780    pub source_ref: ::core::option::Option<FileRevisionRef>,
1781}
1782#[derive(Clone, PartialEq, ::prost::Message)]
1783pub struct ResolveFileRevisionResponse {
1784    #[prost(string, tag = "1")]
1785    pub file_revision_rid: ::prost::alloc::string::String,
1786    #[prost(string, tag = "2")]
1787    pub drive_rid: ::prost::alloc::string::String,
1788    #[prost(message, optional, tag = "3")]
1789    pub file_revision: ::core::option::Option<FileRevision>,
1790}
1791#[derive(Clone, PartialEq, ::prost::Message)]
1792pub struct ListFilesRequest {
1793    #[prost(string, tag = "1")]
1794    pub drive_rid: ::prost::alloc::string::String,
1795    #[prost(message, optional, tag = "2")]
1796    pub parent_path: ::core::option::Option<LogicalPath>,
1797    #[prost(bool, tag = "3")]
1798    pub include_removed: bool,
1799    #[prost(int32, optional, tag = "4")]
1800    pub page_size: ::core::option::Option<i32>,
1801    #[prost(string, optional, tag = "5")]
1802    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1803}
1804#[derive(Clone, PartialEq, ::prost::Message)]
1805pub struct ListFilesResponse {
1806    #[prost(message, repeated, tag = "1")]
1807    pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1808    #[prost(string, optional, tag = "2")]
1809    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1810}
1811#[derive(Clone, PartialEq, ::prost::Message)]
1812pub struct ApplyFileChangesRequest {
1813    #[prost(string, tag = "1")]
1814    pub drive_rid: ::prost::alloc::string::String,
1815    #[prost(message, repeated, tag = "2")]
1816    pub changes: ::prost::alloc::vec::Vec<FileChange>,
1817}
1818#[derive(Clone, PartialEq, ::prost::Message)]
1819pub struct ApplyFileChangesResponse {
1820    #[prost(message, repeated, tag = "1")]
1821    pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1822}
1823#[derive(Clone, PartialEq, ::prost::Message)]
1824pub struct FileChangeSuccess {
1825    #[prost(message, optional, tag = "1")]
1826    pub file: ::core::option::Option<LogicalFile>,
1827    #[prost(message, optional, tag = "2")]
1828    pub file_revision: ::core::option::Option<ManagedFileRevision>,
1829}
1830#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1831pub struct MoveDirectorySuccess {}
1832#[derive(Clone, PartialEq, ::prost::Message)]
1833pub struct FileChangeFailure {
1834    #[prost(string, tag = "2")]
1835    pub message: ::prost::alloc::string::String,
1836    #[prost(oneof = "file_change_failure::Error", tags = "3, 4")]
1837    pub error: ::core::option::Option<file_change_failure::Error>,
1838}
1839/// Nested message and enum types in `FileChangeFailure`.
1840pub mod file_change_failure {
1841    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1842    pub enum Error {
1843        #[prost(enumeration = "super::FileStoreCommonError", tag = "3")]
1844        Common(i32),
1845        #[prost(enumeration = "super::FileChangeError", tag = "4")]
1846        Change(i32),
1847    }
1848}
1849#[derive(Clone, PartialEq, ::prost::Message)]
1850pub struct FileChangeResult {
1851    #[prost(oneof = "file_change_result::Result", tags = "1, 2, 3")]
1852    pub result: ::core::option::Option<file_change_result::Result>,
1853}
1854/// Nested message and enum types in `FileChangeResult`.
1855pub mod file_change_result {
1856    #[derive(Clone, PartialEq, ::prost::Oneof)]
1857    pub enum Result {
1858        #[prost(message, tag = "1")]
1859        Success(super::FileChangeSuccess),
1860        #[prost(message, tag = "2")]
1861        Failure(super::FileChangeFailure),
1862        #[prost(message, tag = "3")]
1863        DirectoryMoved(super::MoveDirectorySuccess),
1864    }
1865}
1866#[derive(Clone, PartialEq, ::prost::Message)]
1867pub struct ListFileRevisionsRequest {
1868    #[prost(string, tag = "1")]
1869    pub drive_rid: ::prost::alloc::string::String,
1870    #[prost(string, tag = "2")]
1871    pub file_rid: ::prost::alloc::string::String,
1872    #[prost(int32, optional, tag = "3")]
1873    pub page_size: ::core::option::Option<i32>,
1874    #[prost(string, optional, tag = "4")]
1875    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1876}
1877#[derive(Clone, PartialEq, ::prost::Message)]
1878pub struct ListFileRevisionsResponse {
1879    #[prost(message, repeated, tag = "1")]
1880    pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1881    #[prost(string, optional, tag = "2")]
1882    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1883}
1884#[derive(Clone, PartialEq, ::prost::Message)]
1885pub struct PurgeFileRequest {
1886    #[prost(string, tag = "1")]
1887    pub file_revision_rid: ::prost::alloc::string::String,
1888}
1889#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1890pub struct PurgeFileResponse {}
1891#[derive(Clone, PartialEq, ::prost::Message)]
1892pub struct GetDownloadUrlRequest {
1893    #[prost(string, tag = "1")]
1894    pub file_revision_rid: ::prost::alloc::string::String,
1895}
1896#[derive(Clone, PartialEq, ::prost::Message)]
1897pub struct GetDownloadUrlResponse {
1898    #[prost(string, tag = "1")]
1899    pub url: ::prost::alloc::string::String,
1900}
1901#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1902#[repr(i32)]
1903pub enum RevisionReadError {
1904    Unspecified = 0,
1905    BytesReclaimed = 1,
1906    MaterializationFailed = 2,
1907}
1908impl RevisionReadError {
1909    /// String value of the enum field names used in the ProtoBuf definition.
1910    ///
1911    /// The values are not transformed in any way and thus are considered stable
1912    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1913    pub fn as_str_name(&self) -> &'static str {
1914        match self {
1915            Self::Unspecified => "REVISION_READ_ERROR_UNSPECIFIED",
1916            Self::BytesReclaimed => "REVISION_READ_ERROR_BYTES_RECLAIMED",
1917            Self::MaterializationFailed => "REVISION_READ_ERROR_MATERIALIZATION_FAILED",
1918        }
1919    }
1920    /// Creates an enum from field names used in the ProtoBuf definition.
1921    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1922        match value {
1923            "REVISION_READ_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1924            "REVISION_READ_ERROR_BYTES_RECLAIMED" => Some(Self::BytesReclaimed),
1925            "REVISION_READ_ERROR_MATERIALIZATION_FAILED" => {
1926                Some(Self::MaterializationFailed)
1927            }
1928            _ => None,
1929        }
1930    }
1931}
1932#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1933#[repr(i32)]
1934pub enum FileChangeError {
1935    Unspecified = 0,
1936    PathAlreadyExists = 1,
1937    InvalidLogicalPath = 2,
1938    RevisionPreconditionFailed = 3,
1939    ReadOnlyDrive = 4,
1940    UploadedObjectNotFound = 5,
1941    DirectoryMoveLimitExceeded = 6,
1942}
1943impl FileChangeError {
1944    /// String value of the enum field names used in the ProtoBuf definition.
1945    ///
1946    /// The values are not transformed in any way and thus are considered stable
1947    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1948    pub fn as_str_name(&self) -> &'static str {
1949        match self {
1950            Self::Unspecified => "FILE_CHANGE_ERROR_UNSPECIFIED",
1951            Self::PathAlreadyExists => "FILE_CHANGE_ERROR_PATH_ALREADY_EXISTS",
1952            Self::InvalidLogicalPath => "FILE_CHANGE_ERROR_INVALID_LOGICAL_PATH",
1953            Self::RevisionPreconditionFailed => {
1954                "FILE_CHANGE_ERROR_REVISION_PRECONDITION_FAILED"
1955            }
1956            Self::ReadOnlyDrive => "FILE_CHANGE_ERROR_READ_ONLY_DRIVE",
1957            Self::UploadedObjectNotFound => "FILE_CHANGE_ERROR_UPLOADED_OBJECT_NOT_FOUND",
1958            Self::DirectoryMoveLimitExceeded => {
1959                "FILE_CHANGE_ERROR_DIRECTORY_MOVE_LIMIT_EXCEEDED"
1960            }
1961        }
1962    }
1963    /// Creates an enum from field names used in the ProtoBuf definition.
1964    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1965        match value {
1966            "FILE_CHANGE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1967            "FILE_CHANGE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
1968            "FILE_CHANGE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
1969            "FILE_CHANGE_ERROR_REVISION_PRECONDITION_FAILED" => {
1970                Some(Self::RevisionPreconditionFailed)
1971            }
1972            "FILE_CHANGE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
1973            "FILE_CHANGE_ERROR_UPLOADED_OBJECT_NOT_FOUND" => {
1974                Some(Self::UploadedObjectNotFound)
1975            }
1976            "FILE_CHANGE_ERROR_DIRECTORY_MOVE_LIMIT_EXCEEDED" => {
1977                Some(Self::DirectoryMoveLimitExceeded)
1978            }
1979            _ => None,
1980        }
1981    }
1982}
1983/// Generated client implementations.
1984pub mod files_service_client {
1985    #![allow(
1986        unused_variables,
1987        dead_code,
1988        missing_docs,
1989        clippy::wildcard_imports,
1990        clippy::let_unit_value,
1991    )]
1992    use tonic::codegen::*;
1993    use tonic::codegen::http::Uri;
1994    #[derive(Debug, Clone)]
1995    pub struct FilesServiceClient<T> {
1996        inner: tonic::client::Grpc<T>,
1997    }
1998    impl FilesServiceClient<tonic::transport::Channel> {
1999        /// Attempt to create a new client by connecting to a given endpoint.
2000        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2001        where
2002            D: TryInto<tonic::transport::Endpoint>,
2003            D::Error: Into<StdError>,
2004        {
2005            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2006            Ok(Self::new(conn))
2007        }
2008    }
2009    impl<T> FilesServiceClient<T>
2010    where
2011        T: tonic::client::GrpcService<tonic::body::Body>,
2012        T::Error: Into<StdError>,
2013        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2014        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2015    {
2016        pub fn new(inner: T) -> Self {
2017            let inner = tonic::client::Grpc::new(inner);
2018            Self { inner }
2019        }
2020        pub fn with_origin(inner: T, origin: Uri) -> Self {
2021            let inner = tonic::client::Grpc::with_origin(inner, origin);
2022            Self { inner }
2023        }
2024        pub fn with_interceptor<F>(
2025            inner: T,
2026            interceptor: F,
2027        ) -> FilesServiceClient<InterceptedService<T, F>>
2028        where
2029            F: tonic::service::Interceptor,
2030            T::ResponseBody: Default,
2031            T: tonic::codegen::Service<
2032                http::Request<tonic::body::Body>,
2033                Response = http::Response<
2034                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2035                >,
2036            >,
2037            <T as tonic::codegen::Service<
2038                http::Request<tonic::body::Body>,
2039            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2040        {
2041            FilesServiceClient::new(InterceptedService::new(inner, interceptor))
2042        }
2043        /// Compress requests with the given encoding.
2044        ///
2045        /// This requires the server to support it otherwise it might respond with an
2046        /// error.
2047        #[must_use]
2048        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2049            self.inner = self.inner.send_compressed(encoding);
2050            self
2051        }
2052        /// Enable decompressing responses.
2053        #[must_use]
2054        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2055            self.inner = self.inner.accept_compressed(encoding);
2056            self
2057        }
2058        /// Limits the maximum size of a decoded message.
2059        ///
2060        /// Default: `4MB`
2061        #[must_use]
2062        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2063            self.inner = self.inner.max_decoding_message_size(limit);
2064            self
2065        }
2066        /// Limits the maximum size of an encoded message.
2067        ///
2068        /// Default: `usize::MAX`
2069        #[must_use]
2070        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2071            self.inner = self.inner.max_encoding_message_size(limit);
2072            self
2073        }
2074        pub async fn get_file(
2075            &mut self,
2076            request: impl tonic::IntoRequest<super::GetFileRequest>,
2077        ) -> std::result::Result<
2078            tonic::Response<super::GetFileResponse>,
2079            tonic::Status,
2080        > {
2081            self.inner
2082                .ready()
2083                .await
2084                .map_err(|e| {
2085                    tonic::Status::unknown(
2086                        format!("Service was not ready: {}", e.into()),
2087                    )
2088                })?;
2089            let codec = tonic::codec::ProstCodec::default();
2090            let path = http::uri::PathAndQuery::from_static(
2091                "/nominal.file_store.v1.FilesService/GetFile",
2092            );
2093            let mut req = request.into_request();
2094            req.extensions_mut()
2095                .insert(
2096                    GrpcMethod::new("nominal.file_store.v1.FilesService", "GetFile"),
2097                );
2098            self.inner.unary(req, path, codec).await
2099        }
2100        pub async fn get_file_by_identity(
2101            &mut self,
2102            request: impl tonic::IntoRequest<super::GetFileByIdentityRequest>,
2103        ) -> std::result::Result<
2104            tonic::Response<super::GetFileByIdentityResponse>,
2105            tonic::Status,
2106        > {
2107            self.inner
2108                .ready()
2109                .await
2110                .map_err(|e| {
2111                    tonic::Status::unknown(
2112                        format!("Service was not ready: {}", e.into()),
2113                    )
2114                })?;
2115            let codec = tonic::codec::ProstCodec::default();
2116            let path = http::uri::PathAndQuery::from_static(
2117                "/nominal.file_store.v1.FilesService/GetFileByIdentity",
2118            );
2119            let mut req = request.into_request();
2120            req.extensions_mut()
2121                .insert(
2122                    GrpcMethod::new(
2123                        "nominal.file_store.v1.FilesService",
2124                        "GetFileByIdentity",
2125                    ),
2126                );
2127            self.inner.unary(req, path, codec).await
2128        }
2129        pub async fn resolve_file_revision(
2130            &mut self,
2131            request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
2132        ) -> std::result::Result<
2133            tonic::Response<super::ResolveFileRevisionResponse>,
2134            tonic::Status,
2135        > {
2136            self.inner
2137                .ready()
2138                .await
2139                .map_err(|e| {
2140                    tonic::Status::unknown(
2141                        format!("Service was not ready: {}", e.into()),
2142                    )
2143                })?;
2144            let codec = tonic::codec::ProstCodec::default();
2145            let path = http::uri::PathAndQuery::from_static(
2146                "/nominal.file_store.v1.FilesService/ResolveFileRevision",
2147            );
2148            let mut req = request.into_request();
2149            req.extensions_mut()
2150                .insert(
2151                    GrpcMethod::new(
2152                        "nominal.file_store.v1.FilesService",
2153                        "ResolveFileRevision",
2154                    ),
2155                );
2156            self.inner.unary(req, path, codec).await
2157        }
2158        pub async fn list_files(
2159            &mut self,
2160            request: impl tonic::IntoRequest<super::ListFilesRequest>,
2161        ) -> std::result::Result<
2162            tonic::Response<super::ListFilesResponse>,
2163            tonic::Status,
2164        > {
2165            self.inner
2166                .ready()
2167                .await
2168                .map_err(|e| {
2169                    tonic::Status::unknown(
2170                        format!("Service was not ready: {}", e.into()),
2171                    )
2172                })?;
2173            let codec = tonic::codec::ProstCodec::default();
2174            let path = http::uri::PathAndQuery::from_static(
2175                "/nominal.file_store.v1.FilesService/ListFiles",
2176            );
2177            let mut req = request.into_request();
2178            req.extensions_mut()
2179                .insert(
2180                    GrpcMethod::new("nominal.file_store.v1.FilesService", "ListFiles"),
2181                );
2182            self.inner.unary(req, path, codec).await
2183        }
2184        pub async fn apply_file_changes(
2185            &mut self,
2186            request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
2187        ) -> std::result::Result<
2188            tonic::Response<super::ApplyFileChangesResponse>,
2189            tonic::Status,
2190        > {
2191            self.inner
2192                .ready()
2193                .await
2194                .map_err(|e| {
2195                    tonic::Status::unknown(
2196                        format!("Service was not ready: {}", e.into()),
2197                    )
2198                })?;
2199            let codec = tonic::codec::ProstCodec::default();
2200            let path = http::uri::PathAndQuery::from_static(
2201                "/nominal.file_store.v1.FilesService/ApplyFileChanges",
2202            );
2203            let mut req = request.into_request();
2204            req.extensions_mut()
2205                .insert(
2206                    GrpcMethod::new(
2207                        "nominal.file_store.v1.FilesService",
2208                        "ApplyFileChanges",
2209                    ),
2210                );
2211            self.inner.unary(req, path, codec).await
2212        }
2213        pub async fn list_file_revisions(
2214            &mut self,
2215            request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
2216        ) -> std::result::Result<
2217            tonic::Response<super::ListFileRevisionsResponse>,
2218            tonic::Status,
2219        > {
2220            self.inner
2221                .ready()
2222                .await
2223                .map_err(|e| {
2224                    tonic::Status::unknown(
2225                        format!("Service was not ready: {}", e.into()),
2226                    )
2227                })?;
2228            let codec = tonic::codec::ProstCodec::default();
2229            let path = http::uri::PathAndQuery::from_static(
2230                "/nominal.file_store.v1.FilesService/ListFileRevisions",
2231            );
2232            let mut req = request.into_request();
2233            req.extensions_mut()
2234                .insert(
2235                    GrpcMethod::new(
2236                        "nominal.file_store.v1.FilesService",
2237                        "ListFileRevisions",
2238                    ),
2239                );
2240            self.inner.unary(req, path, codec).await
2241        }
2242        pub async fn purge_file(
2243            &mut self,
2244            request: impl tonic::IntoRequest<super::PurgeFileRequest>,
2245        ) -> std::result::Result<
2246            tonic::Response<super::PurgeFileResponse>,
2247            tonic::Status,
2248        > {
2249            self.inner
2250                .ready()
2251                .await
2252                .map_err(|e| {
2253                    tonic::Status::unknown(
2254                        format!("Service was not ready: {}", e.into()),
2255                    )
2256                })?;
2257            let codec = tonic::codec::ProstCodec::default();
2258            let path = http::uri::PathAndQuery::from_static(
2259                "/nominal.file_store.v1.FilesService/PurgeFile",
2260            );
2261            let mut req = request.into_request();
2262            req.extensions_mut()
2263                .insert(
2264                    GrpcMethod::new("nominal.file_store.v1.FilesService", "PurgeFile"),
2265                );
2266            self.inner.unary(req, path, codec).await
2267        }
2268        pub async fn get_download_url(
2269            &mut self,
2270            request: impl tonic::IntoRequest<super::GetDownloadUrlRequest>,
2271        ) -> std::result::Result<
2272            tonic::Response<super::GetDownloadUrlResponse>,
2273            tonic::Status,
2274        > {
2275            self.inner
2276                .ready()
2277                .await
2278                .map_err(|e| {
2279                    tonic::Status::unknown(
2280                        format!("Service was not ready: {}", e.into()),
2281                    )
2282                })?;
2283            let codec = tonic::codec::ProstCodec::default();
2284            let path = http::uri::PathAndQuery::from_static(
2285                "/nominal.file_store.v1.FilesService/GetDownloadUrl",
2286            );
2287            let mut req = request.into_request();
2288            req.extensions_mut()
2289                .insert(
2290                    GrpcMethod::new(
2291                        "nominal.file_store.v1.FilesService",
2292                        "GetDownloadUrl",
2293                    ),
2294                );
2295            self.inner.unary(req, path, codec).await
2296        }
2297    }
2298}
2299#[derive(Clone, PartialEq, ::prost::Message)]
2300pub struct CreateIngestRuleRequest {
2301    #[prost(string, tag = "1")]
2302    pub drive_rid: ::prost::alloc::string::String,
2303    #[prost(message, optional, tag = "2")]
2304    pub matcher: ::core::option::Option<FileMatcher>,
2305    #[prost(message, optional, tag = "3")]
2306    pub triggers: ::core::option::Option<IngestTriggers>,
2307    #[prost(enumeration = "BackfillMode", tag = "4")]
2308    pub backfill_mode: i32,
2309}
2310#[derive(Clone, PartialEq, ::prost::Message)]
2311pub struct CreateIngestRuleResponse {
2312    #[prost(message, optional, tag = "1")]
2313    pub rule: ::core::option::Option<IngestRule>,
2314}
2315#[derive(Clone, PartialEq, ::prost::Message)]
2316pub struct ListIngestRulesRequest {
2317    #[prost(string, tag = "1")]
2318    pub drive_rid: ::prost::alloc::string::String,
2319    #[prost(bool, tag = "2")]
2320    pub include_archived: bool,
2321    #[prost(int32, optional, tag = "3")]
2322    pub page_size: ::core::option::Option<i32>,
2323    #[prost(string, optional, tag = "4")]
2324    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
2325}
2326#[derive(Clone, PartialEq, ::prost::Message)]
2327pub struct ListIngestRulesResponse {
2328    #[prost(message, repeated, tag = "1")]
2329    pub rules: ::prost::alloc::vec::Vec<IngestRule>,
2330    #[prost(string, optional, tag = "2")]
2331    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
2332}
2333#[derive(Clone, PartialEq, ::prost::Message)]
2334pub struct GetIngestRuleRequest {
2335    #[prost(string, tag = "1")]
2336    pub rule_rid: ::prost::alloc::string::String,
2337}
2338#[derive(Clone, PartialEq, ::prost::Message)]
2339pub struct GetIngestRuleResponse {
2340    #[prost(message, optional, tag = "1")]
2341    pub rule: ::core::option::Option<IngestRule>,
2342}
2343#[derive(Clone, PartialEq, ::prost::Message)]
2344pub struct UpdateIngestRuleRequest {
2345    #[prost(string, tag = "1")]
2346    pub rule_rid: ::prost::alloc::string::String,
2347    #[prost(message, optional, tag = "2")]
2348    pub matcher: ::core::option::Option<FileMatcher>,
2349    #[prost(message, optional, tag = "3")]
2350    pub triggers: ::core::option::Option<IngestTriggers>,
2351}
2352#[derive(Clone, PartialEq, ::prost::Message)]
2353pub struct UpdateIngestRuleResponse {
2354    #[prost(message, optional, tag = "1")]
2355    pub rule: ::core::option::Option<IngestRule>,
2356}
2357#[derive(Clone, PartialEq, ::prost::Message)]
2358pub struct ArchiveIngestRuleRequest {
2359    #[prost(string, tag = "1")]
2360    pub rule_rid: ::prost::alloc::string::String,
2361}
2362#[derive(Clone, PartialEq, ::prost::Message)]
2363pub struct ArchiveIngestRuleResponse {
2364    #[prost(message, optional, tag = "1")]
2365    pub rule: ::core::option::Option<IngestRule>,
2366}
2367#[derive(Clone, PartialEq, ::prost::Message)]
2368pub struct UnarchiveIngestRuleRequest {
2369    #[prost(string, tag = "1")]
2370    pub rule_rid: ::prost::alloc::string::String,
2371    #[prost(enumeration = "BackfillMode", tag = "2")]
2372    pub backfill_mode: i32,
2373}
2374#[derive(Clone, PartialEq, ::prost::Message)]
2375pub struct UnarchiveIngestRuleResponse {
2376    #[prost(message, optional, tag = "1")]
2377    pub rule: ::core::option::Option<IngestRule>,
2378}
2379#[derive(Clone, PartialEq, ::prost::Message)]
2380pub struct IngestRule {
2381    #[prost(string, tag = "1")]
2382    pub rule_rid: ::prost::alloc::string::String,
2383    #[prost(string, tag = "2")]
2384    pub drive_rid: ::prost::alloc::string::String,
2385    #[prost(message, optional, tag = "3")]
2386    pub matcher: ::core::option::Option<FileMatcher>,
2387    #[prost(message, optional, tag = "4")]
2388    pub triggers: ::core::option::Option<IngestTriggers>,
2389    #[prost(message, optional, tag = "5")]
2390    pub created: ::core::option::Option<Attribution>,
2391    #[prost(enumeration = "IngestRuleState", tag = "6")]
2392    pub state: i32,
2393    #[prost(message, optional, tag = "7")]
2394    pub archived: ::core::option::Option<Attribution>,
2395    #[prost(message, optional, tag = "8")]
2396    pub updated: ::core::option::Option<Attribution>,
2397}
2398#[derive(Clone, PartialEq, ::prost::Message)]
2399pub struct FileMatcher {
2400    #[prost(oneof = "file_matcher::Matcher", tags = "1")]
2401    pub matcher: ::core::option::Option<file_matcher::Matcher>,
2402}
2403/// Nested message and enum types in `FileMatcher`.
2404pub mod file_matcher {
2405    #[derive(Clone, PartialEq, ::prost::Oneof)]
2406    pub enum Matcher {
2407        #[prost(message, tag = "1")]
2408        Path(super::PathMatcher),
2409    }
2410}
2411#[derive(Clone, PartialEq, ::prost::Message)]
2412pub struct PathMatcher {
2413    #[prost(message, optional, tag = "1")]
2414    pub pattern: ::core::option::Option<PathPattern>,
2415    #[prost(message, optional, tag = "2")]
2416    pub format: ::core::option::Option<FormatConfig>,
2417}
2418#[derive(Clone, PartialEq, ::prost::Message)]
2419pub struct FormatConfig {
2420    #[prost(oneof = "format_config::Format", tags = "1, 2, 3, 4, 6, 5")]
2421    pub format: ::core::option::Option<format_config::Format>,
2422}
2423/// Nested message and enum types in `FormatConfig`.
2424pub mod format_config {
2425    #[derive(Clone, PartialEq, ::prost::Oneof)]
2426    pub enum Format {
2427        #[prost(message, tag = "1")]
2428        Csv(super::CsvIngestConfig),
2429        #[prost(message, tag = "2")]
2430        Parquet(super::ParquetIngestConfig),
2431        #[prost(message, tag = "3")]
2432        Dataflash(super::DataflashIngestConfig),
2433        #[prost(message, tag = "4")]
2434        Containerized(super::ContainerizedIngestConfig),
2435        #[prost(message, tag = "6")]
2436        McapVideo(super::McapVideoRegistrationConfig),
2437        #[prost(message, tag = "5")]
2438        Mcap(super::McapIngestConfig),
2439    }
2440}
2441#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2442pub struct McapVideoRegistrationConfig {}
2443#[derive(Clone, PartialEq, ::prost::Message)]
2444pub struct ContainerizedIngestConfig {
2445    #[prost(string, tag = "1")]
2446    pub extractor_rid: ::prost::alloc::string::String,
2447    #[prost(map = "string, string", tag = "2")]
2448    pub arguments: ::std::collections::HashMap<
2449        ::prost::alloc::string::String,
2450        ::prost::alloc::string::String,
2451    >,
2452    #[prost(message, optional, tag = "3")]
2453    pub timestamp: ::core::option::Option<TimestampConfig>,
2454}
2455#[derive(Clone, PartialEq, ::prost::Message)]
2456pub struct CsvIngestConfig {
2457    #[prost(message, optional, tag = "1")]
2458    pub timestamp: ::core::option::Option<TimestampConfig>,
2459    #[prost(string, optional, tag = "2")]
2460    pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
2461}
2462#[derive(Clone, PartialEq, ::prost::Message)]
2463pub struct ParquetIngestConfig {
2464    #[prost(message, optional, tag = "1")]
2465    pub timestamp: ::core::option::Option<TimestampConfig>,
2466    #[prost(string, optional, tag = "2")]
2467    pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
2468}
2469#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2470pub struct DataflashIngestConfig {}
2471#[derive(Clone, PartialEq, ::prost::Message)]
2472pub struct McapIngestConfig {
2473    #[prost(message, optional, tag = "1")]
2474    pub channels: ::core::option::Option<McapChannelSelection>,
2475    #[prost(bool, tag = "2")]
2476    pub ignore_invalid_topics: bool,
2477}
2478#[derive(Clone, PartialEq, ::prost::Message)]
2479pub struct McapChannelSelection {
2480    #[prost(oneof = "mcap_channel_selection::Selection", tags = "1, 2")]
2481    pub selection: ::core::option::Option<mcap_channel_selection::Selection>,
2482}
2483/// Nested message and enum types in `McapChannelSelection`.
2484pub mod mcap_channel_selection {
2485    #[derive(Clone, PartialEq, ::prost::Oneof)]
2486    pub enum Selection {
2487        #[prost(message, tag = "1")]
2488        IncludeTopics(super::McapTopicNames),
2489        #[prost(message, tag = "2")]
2490        ExcludeTopics(super::McapTopicNames),
2491    }
2492}
2493#[derive(Clone, PartialEq, ::prost::Message)]
2494pub struct McapTopicNames {
2495    #[prost(string, repeated, tag = "1")]
2496    pub topics: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
2497}
2498#[derive(Clone, PartialEq, ::prost::Message)]
2499pub struct TimestampConfig {
2500    #[prost(oneof = "timestamp_config::Kind", tags = "1")]
2501    pub kind: ::core::option::Option<timestamp_config::Kind>,
2502}
2503/// Nested message and enum types in `TimestampConfig`.
2504pub mod timestamp_config {
2505    #[derive(Clone, PartialEq, ::prost::Oneof)]
2506    pub enum Kind {
2507        #[prost(message, tag = "1")]
2508        Single(super::TimestampCandidate),
2509    }
2510}
2511#[derive(Clone, PartialEq, ::prost::Message)]
2512pub struct TimestampCandidate {
2513    #[prost(string, tag = "1")]
2514    pub column: ::prost::alloc::string::String,
2515    #[prost(message, optional, tag = "2")]
2516    pub r#type: ::core::option::Option<super::super::types::time::AbsoluteTimestamp>,
2517}
2518#[derive(Clone, PartialEq, ::prost::Message)]
2519pub struct PathPattern {
2520    #[prost(message, optional, tag = "1")]
2521    pub first: ::core::option::Option<PatternSegment>,
2522    #[prost(message, repeated, tag = "2")]
2523    pub rest: ::prost::alloc::vec::Vec<JoinedSegment>,
2524}
2525#[derive(Clone, PartialEq, ::prost::Message)]
2526pub struct JoinedSegment {
2527    #[prost(enumeration = "SegmentDelimiter", tag = "1")]
2528    pub delimiter: i32,
2529    #[prost(message, optional, tag = "2")]
2530    pub segment: ::core::option::Option<PatternSegment>,
2531}
2532#[derive(Clone, PartialEq, ::prost::Message)]
2533pub struct PatternSegment {
2534    #[prost(oneof = "pattern_segment::Kind", tags = "1, 2, 3")]
2535    pub kind: ::core::option::Option<pattern_segment::Kind>,
2536}
2537/// Nested message and enum types in `PatternSegment`.
2538pub mod pattern_segment {
2539    #[derive(Clone, PartialEq, ::prost::Oneof)]
2540    pub enum Kind {
2541        #[prost(message, tag = "1")]
2542        ShallowWildcard(super::ShallowWildcard),
2543        #[prost(message, tag = "2")]
2544        DeepWildcard(super::DeepWildcard),
2545        #[prost(string, tag = "3")]
2546        Literal(::prost::alloc::string::String),
2547    }
2548}
2549#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2550pub struct ShallowWildcard {}
2551#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2552pub struct DeepWildcard {}
2553#[derive(Clone, PartialEq, ::prost::Message)]
2554pub struct IngestTriggers {
2555    #[prost(message, optional, tag = "1")]
2556    pub new_match: ::core::option::Option<IngestTarget>,
2557}
2558#[derive(Clone, PartialEq, ::prost::Message)]
2559pub struct IngestTarget {
2560    #[prost(oneof = "ingest_target::Target", tags = "1, 2")]
2561    pub target: ::core::option::Option<ingest_target::Target>,
2562}
2563/// Nested message and enum types in `IngestTarget`.
2564pub mod ingest_target {
2565    #[derive(Clone, PartialEq, ::prost::Oneof)]
2566    pub enum Target {
2567        #[prost(message, tag = "1")]
2568        NewDataset(super::NewDatasetTarget),
2569        #[prost(message, tag = "2")]
2570        ExistingDataset(super::ExistingDatasetTarget),
2571    }
2572}
2573#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2574pub struct NewDatasetTarget {}
2575#[derive(Clone, PartialEq, ::prost::Message)]
2576pub struct ExistingDatasetTarget {
2577    #[prost(string, tag = "1")]
2578    pub dataset_rid: ::prost::alloc::string::String,
2579}
2580#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2581#[repr(i32)]
2582pub enum BackfillMode {
2583    Unspecified = 0,
2584    NewFilesOnly = 1,
2585    BackfillExisting = 2,
2586}
2587impl BackfillMode {
2588    /// String value of the enum field names used in the ProtoBuf definition.
2589    ///
2590    /// The values are not transformed in any way and thus are considered stable
2591    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2592    pub fn as_str_name(&self) -> &'static str {
2593        match self {
2594            Self::Unspecified => "BACKFILL_MODE_UNSPECIFIED",
2595            Self::NewFilesOnly => "BACKFILL_MODE_NEW_FILES_ONLY",
2596            Self::BackfillExisting => "BACKFILL_MODE_BACKFILL_EXISTING",
2597        }
2598    }
2599    /// Creates an enum from field names used in the ProtoBuf definition.
2600    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2601        match value {
2602            "BACKFILL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2603            "BACKFILL_MODE_NEW_FILES_ONLY" => Some(Self::NewFilesOnly),
2604            "BACKFILL_MODE_BACKFILL_EXISTING" => Some(Self::BackfillExisting),
2605            _ => None,
2606        }
2607    }
2608}
2609#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2610#[repr(i32)]
2611pub enum IngestRuleState {
2612    Unspecified = 0,
2613    Active = 1,
2614    Archived = 2,
2615}
2616impl IngestRuleState {
2617    /// String value of the enum field names used in the ProtoBuf definition.
2618    ///
2619    /// The values are not transformed in any way and thus are considered stable
2620    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2621    pub fn as_str_name(&self) -> &'static str {
2622        match self {
2623            Self::Unspecified => "INGEST_RULE_STATE_UNSPECIFIED",
2624            Self::Active => "INGEST_RULE_STATE_ACTIVE",
2625            Self::Archived => "INGEST_RULE_STATE_ARCHIVED",
2626        }
2627    }
2628    /// Creates an enum from field names used in the ProtoBuf definition.
2629    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2630        match value {
2631            "INGEST_RULE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
2632            "INGEST_RULE_STATE_ACTIVE" => Some(Self::Active),
2633            "INGEST_RULE_STATE_ARCHIVED" => Some(Self::Archived),
2634            _ => None,
2635        }
2636    }
2637}
2638#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2639#[repr(i32)]
2640pub enum SegmentDelimiter {
2641    Unspecified = 0,
2642    PathSeparator = 1,
2643    Concat = 2,
2644}
2645impl SegmentDelimiter {
2646    /// String value of the enum field names used in the ProtoBuf definition.
2647    ///
2648    /// The values are not transformed in any way and thus are considered stable
2649    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2650    pub fn as_str_name(&self) -> &'static str {
2651        match self {
2652            Self::Unspecified => "SEGMENT_DELIMITER_UNSPECIFIED",
2653            Self::PathSeparator => "SEGMENT_DELIMITER_PATH_SEPARATOR",
2654            Self::Concat => "SEGMENT_DELIMITER_CONCAT",
2655        }
2656    }
2657    /// Creates an enum from field names used in the ProtoBuf definition.
2658    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2659        match value {
2660            "SEGMENT_DELIMITER_UNSPECIFIED" => Some(Self::Unspecified),
2661            "SEGMENT_DELIMITER_PATH_SEPARATOR" => Some(Self::PathSeparator),
2662            "SEGMENT_DELIMITER_CONCAT" => Some(Self::Concat),
2663            _ => None,
2664        }
2665    }
2666}
2667#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2668#[repr(i32)]
2669pub enum IngestRulesError {
2670    Unspecified = 0,
2671    RuleNotFound = 1,
2672}
2673impl IngestRulesError {
2674    /// String value of the enum field names used in the ProtoBuf definition.
2675    ///
2676    /// The values are not transformed in any way and thus are considered stable
2677    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
2678    pub fn as_str_name(&self) -> &'static str {
2679        match self {
2680            Self::Unspecified => "INGEST_RULES_ERROR_UNSPECIFIED",
2681            Self::RuleNotFound => "INGEST_RULES_ERROR_RULE_NOT_FOUND",
2682        }
2683    }
2684    /// Creates an enum from field names used in the ProtoBuf definition.
2685    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2686        match value {
2687            "INGEST_RULES_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
2688            "INGEST_RULES_ERROR_RULE_NOT_FOUND" => Some(Self::RuleNotFound),
2689            _ => None,
2690        }
2691    }
2692}
2693/// Generated client implementations.
2694pub mod internal_ingest_rules_service_client {
2695    #![allow(
2696        unused_variables,
2697        dead_code,
2698        missing_docs,
2699        clippy::wildcard_imports,
2700        clippy::let_unit_value,
2701    )]
2702    use tonic::codegen::*;
2703    use tonic::codegen::http::Uri;
2704    #[derive(Debug, Clone)]
2705    pub struct InternalIngestRulesServiceClient<T> {
2706        inner: tonic::client::Grpc<T>,
2707    }
2708    impl InternalIngestRulesServiceClient<tonic::transport::Channel> {
2709        /// Attempt to create a new client by connecting to a given endpoint.
2710        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2711        where
2712            D: TryInto<tonic::transport::Endpoint>,
2713            D::Error: Into<StdError>,
2714        {
2715            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2716            Ok(Self::new(conn))
2717        }
2718    }
2719    impl<T> InternalIngestRulesServiceClient<T>
2720    where
2721        T: tonic::client::GrpcService<tonic::body::Body>,
2722        T::Error: Into<StdError>,
2723        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2724        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2725    {
2726        pub fn new(inner: T) -> Self {
2727            let inner = tonic::client::Grpc::new(inner);
2728            Self { inner }
2729        }
2730        pub fn with_origin(inner: T, origin: Uri) -> Self {
2731            let inner = tonic::client::Grpc::with_origin(inner, origin);
2732            Self { inner }
2733        }
2734        pub fn with_interceptor<F>(
2735            inner: T,
2736            interceptor: F,
2737        ) -> InternalIngestRulesServiceClient<InterceptedService<T, F>>
2738        where
2739            F: tonic::service::Interceptor,
2740            T::ResponseBody: Default,
2741            T: tonic::codegen::Service<
2742                http::Request<tonic::body::Body>,
2743                Response = http::Response<
2744                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2745                >,
2746            >,
2747            <T as tonic::codegen::Service<
2748                http::Request<tonic::body::Body>,
2749            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2750        {
2751            InternalIngestRulesServiceClient::new(
2752                InterceptedService::new(inner, interceptor),
2753            )
2754        }
2755        /// Compress requests with the given encoding.
2756        ///
2757        /// This requires the server to support it otherwise it might respond with an
2758        /// error.
2759        #[must_use]
2760        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2761            self.inner = self.inner.send_compressed(encoding);
2762            self
2763        }
2764        /// Enable decompressing responses.
2765        #[must_use]
2766        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2767            self.inner = self.inner.accept_compressed(encoding);
2768            self
2769        }
2770        /// Limits the maximum size of a decoded message.
2771        ///
2772        /// Default: `4MB`
2773        #[must_use]
2774        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2775            self.inner = self.inner.max_decoding_message_size(limit);
2776            self
2777        }
2778        /// Limits the maximum size of an encoded message.
2779        ///
2780        /// Default: `usize::MAX`
2781        #[must_use]
2782        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2783            self.inner = self.inner.max_encoding_message_size(limit);
2784            self
2785        }
2786        pub async fn create_ingest_rule(
2787            &mut self,
2788            request: impl tonic::IntoRequest<super::CreateIngestRuleRequest>,
2789        ) -> std::result::Result<
2790            tonic::Response<super::CreateIngestRuleResponse>,
2791            tonic::Status,
2792        > {
2793            self.inner
2794                .ready()
2795                .await
2796                .map_err(|e| {
2797                    tonic::Status::unknown(
2798                        format!("Service was not ready: {}", e.into()),
2799                    )
2800                })?;
2801            let codec = tonic::codec::ProstCodec::default();
2802            let path = http::uri::PathAndQuery::from_static(
2803                "/nominal.file_store.v1.InternalIngestRulesService/CreateIngestRule",
2804            );
2805            let mut req = request.into_request();
2806            req.extensions_mut()
2807                .insert(
2808                    GrpcMethod::new(
2809                        "nominal.file_store.v1.InternalIngestRulesService",
2810                        "CreateIngestRule",
2811                    ),
2812                );
2813            self.inner.unary(req, path, codec).await
2814        }
2815        pub async fn list_ingest_rules(
2816            &mut self,
2817            request: impl tonic::IntoRequest<super::ListIngestRulesRequest>,
2818        ) -> std::result::Result<
2819            tonic::Response<super::ListIngestRulesResponse>,
2820            tonic::Status,
2821        > {
2822            self.inner
2823                .ready()
2824                .await
2825                .map_err(|e| {
2826                    tonic::Status::unknown(
2827                        format!("Service was not ready: {}", e.into()),
2828                    )
2829                })?;
2830            let codec = tonic::codec::ProstCodec::default();
2831            let path = http::uri::PathAndQuery::from_static(
2832                "/nominal.file_store.v1.InternalIngestRulesService/ListIngestRules",
2833            );
2834            let mut req = request.into_request();
2835            req.extensions_mut()
2836                .insert(
2837                    GrpcMethod::new(
2838                        "nominal.file_store.v1.InternalIngestRulesService",
2839                        "ListIngestRules",
2840                    ),
2841                );
2842            self.inner.unary(req, path, codec).await
2843        }
2844        pub async fn get_ingest_rule(
2845            &mut self,
2846            request: impl tonic::IntoRequest<super::GetIngestRuleRequest>,
2847        ) -> std::result::Result<
2848            tonic::Response<super::GetIngestRuleResponse>,
2849            tonic::Status,
2850        > {
2851            self.inner
2852                .ready()
2853                .await
2854                .map_err(|e| {
2855                    tonic::Status::unknown(
2856                        format!("Service was not ready: {}", e.into()),
2857                    )
2858                })?;
2859            let codec = tonic::codec::ProstCodec::default();
2860            let path = http::uri::PathAndQuery::from_static(
2861                "/nominal.file_store.v1.InternalIngestRulesService/GetIngestRule",
2862            );
2863            let mut req = request.into_request();
2864            req.extensions_mut()
2865                .insert(
2866                    GrpcMethod::new(
2867                        "nominal.file_store.v1.InternalIngestRulesService",
2868                        "GetIngestRule",
2869                    ),
2870                );
2871            self.inner.unary(req, path, codec).await
2872        }
2873        pub async fn update_ingest_rule(
2874            &mut self,
2875            request: impl tonic::IntoRequest<super::UpdateIngestRuleRequest>,
2876        ) -> std::result::Result<
2877            tonic::Response<super::UpdateIngestRuleResponse>,
2878            tonic::Status,
2879        > {
2880            self.inner
2881                .ready()
2882                .await
2883                .map_err(|e| {
2884                    tonic::Status::unknown(
2885                        format!("Service was not ready: {}", e.into()),
2886                    )
2887                })?;
2888            let codec = tonic::codec::ProstCodec::default();
2889            let path = http::uri::PathAndQuery::from_static(
2890                "/nominal.file_store.v1.InternalIngestRulesService/UpdateIngestRule",
2891            );
2892            let mut req = request.into_request();
2893            req.extensions_mut()
2894                .insert(
2895                    GrpcMethod::new(
2896                        "nominal.file_store.v1.InternalIngestRulesService",
2897                        "UpdateIngestRule",
2898                    ),
2899                );
2900            self.inner.unary(req, path, codec).await
2901        }
2902        pub async fn archive_ingest_rule(
2903            &mut self,
2904            request: impl tonic::IntoRequest<super::ArchiveIngestRuleRequest>,
2905        ) -> std::result::Result<
2906            tonic::Response<super::ArchiveIngestRuleResponse>,
2907            tonic::Status,
2908        > {
2909            self.inner
2910                .ready()
2911                .await
2912                .map_err(|e| {
2913                    tonic::Status::unknown(
2914                        format!("Service was not ready: {}", e.into()),
2915                    )
2916                })?;
2917            let codec = tonic::codec::ProstCodec::default();
2918            let path = http::uri::PathAndQuery::from_static(
2919                "/nominal.file_store.v1.InternalIngestRulesService/ArchiveIngestRule",
2920            );
2921            let mut req = request.into_request();
2922            req.extensions_mut()
2923                .insert(
2924                    GrpcMethod::new(
2925                        "nominal.file_store.v1.InternalIngestRulesService",
2926                        "ArchiveIngestRule",
2927                    ),
2928                );
2929            self.inner.unary(req, path, codec).await
2930        }
2931        pub async fn unarchive_ingest_rule(
2932            &mut self,
2933            request: impl tonic::IntoRequest<super::UnarchiveIngestRuleRequest>,
2934        ) -> std::result::Result<
2935            tonic::Response<super::UnarchiveIngestRuleResponse>,
2936            tonic::Status,
2937        > {
2938            self.inner
2939                .ready()
2940                .await
2941                .map_err(|e| {
2942                    tonic::Status::unknown(
2943                        format!("Service was not ready: {}", e.into()),
2944                    )
2945                })?;
2946            let codec = tonic::codec::ProstCodec::default();
2947            let path = http::uri::PathAndQuery::from_static(
2948                "/nominal.file_store.v1.InternalIngestRulesService/UnarchiveIngestRule",
2949            );
2950            let mut req = request.into_request();
2951            req.extensions_mut()
2952                .insert(
2953                    GrpcMethod::new(
2954                        "nominal.file_store.v1.InternalIngestRulesService",
2955                        "UnarchiveIngestRule",
2956                    ),
2957                );
2958            self.inner.unary(req, path, codec).await
2959        }
2960    }
2961}