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