Skip to main content

nominal_api_proto/proto/
nominal.file_store.v1.rs

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