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 FileChange {
1583 #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4")]
1584 pub change: ::core::option::Option<file_change::Change>,
1585}
1586pub mod file_change {
1588 #[derive(Clone, PartialEq, ::prost::Oneof)]
1589 pub enum Change {
1590 #[prost(message, tag = "1")]
1591 Put(super::PutFile),
1592 #[prost(message, tag = "2")]
1593 Move(super::MoveFile),
1594 #[prost(message, tag = "3")]
1595 Remove(super::RemoveFile),
1596 #[prost(message, tag = "4")]
1597 Restore(super::RestoreFile),
1598 }
1599}
1600#[derive(Clone, PartialEq, ::prost::Message)]
1601pub struct GetFileRequest {
1602 #[prost(string, tag = "1")]
1603 pub drive_rid: ::prost::alloc::string::String,
1604 #[prost(message, optional, tag = "2")]
1605 pub path: ::core::option::Option<LogicalPath>,
1606 #[prost(bool, tag = "3")]
1607 pub include_removed: bool,
1608}
1609#[derive(Clone, PartialEq, ::prost::Message)]
1610pub struct GetFileByIdentityRequest {
1611 #[prost(message, optional, tag = "1")]
1612 pub identity: ::core::option::Option<LogicalFileIdentity>,
1613}
1614#[derive(Clone, PartialEq, ::prost::Message)]
1615pub struct GetFileResponse {
1616 #[prost(message, optional, tag = "1")]
1617 pub file: ::core::option::Option<LogicalFile>,
1618 #[prost(string, tag = "2")]
1619 pub drive_rid: ::prost::alloc::string::String,
1620}
1621#[derive(Clone, PartialEq, ::prost::Message)]
1622pub struct GetFileByIdentityResponse {
1623 #[prost(message, optional, tag = "1")]
1624 pub file: ::core::option::Option<LogicalFile>,
1625 #[prost(string, tag = "2")]
1626 pub drive_rid: ::prost::alloc::string::String,
1627}
1628#[derive(Clone, PartialEq, ::prost::Message)]
1629pub struct ResolveFileRevisionRequest {
1630 #[prost(message, optional, tag = "2")]
1631 pub source_ref: ::core::option::Option<FileRevisionRef>,
1632}
1633#[derive(Clone, PartialEq, ::prost::Message)]
1634pub struct ResolveFileRevisionResponse {
1635 #[prost(string, tag = "1")]
1636 pub file_revision_rid: ::prost::alloc::string::String,
1637}
1638#[derive(Clone, PartialEq, ::prost::Message)]
1639pub struct ListFilesRequest {
1640 #[prost(string, tag = "1")]
1641 pub drive_rid: ::prost::alloc::string::String,
1642 #[prost(message, optional, tag = "2")]
1643 pub parent_path: ::core::option::Option<LogicalPath>,
1644 #[prost(bool, tag = "3")]
1645 pub include_removed: bool,
1646 #[prost(int32, optional, tag = "4")]
1647 pub page_size: ::core::option::Option<i32>,
1648 #[prost(string, optional, tag = "5")]
1649 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1650}
1651#[derive(Clone, PartialEq, ::prost::Message)]
1652pub struct ListFilesResponse {
1653 #[prost(message, repeated, tag = "1")]
1654 pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1655 #[prost(string, optional, tag = "2")]
1656 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1657}
1658#[derive(Clone, PartialEq, ::prost::Message)]
1659pub struct ApplyFileChangesRequest {
1660 #[prost(string, tag = "1")]
1661 pub drive_rid: ::prost::alloc::string::String,
1662 #[prost(message, repeated, tag = "2")]
1663 pub changes: ::prost::alloc::vec::Vec<FileChange>,
1664}
1665#[derive(Clone, PartialEq, ::prost::Message)]
1666pub struct ApplyFileChangesResponse {
1667 #[prost(message, repeated, tag = "1")]
1668 pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1669}
1670#[derive(Clone, PartialEq, ::prost::Message)]
1671pub struct FileChangeSuccess {
1672 #[prost(message, optional, tag = "1")]
1673 pub file: ::core::option::Option<LogicalFile>,
1674 #[prost(message, optional, tag = "2")]
1675 pub file_revision: ::core::option::Option<ManagedFileRevision>,
1676}
1677#[derive(Clone, PartialEq, ::prost::Message)]
1678pub struct FileChangeFailure {
1679 #[prost(string, tag = "2")]
1680 pub message: ::prost::alloc::string::String,
1681 #[prost(oneof = "file_change_failure::Error", tags = "3, 4")]
1682 pub error: ::core::option::Option<file_change_failure::Error>,
1683}
1684pub mod file_change_failure {
1686 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
1687 pub enum Error {
1688 #[prost(enumeration = "super::FileStoreCommonError", tag = "3")]
1689 Common(i32),
1690 #[prost(enumeration = "super::FileChangeError", tag = "4")]
1691 Change(i32),
1692 }
1693}
1694#[derive(Clone, PartialEq, ::prost::Message)]
1695pub struct FileChangeResult {
1696 #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1697 pub result: ::core::option::Option<file_change_result::Result>,
1698}
1699pub mod file_change_result {
1701 #[derive(Clone, PartialEq, ::prost::Oneof)]
1702 pub enum Result {
1703 #[prost(message, tag = "1")]
1704 Success(super::FileChangeSuccess),
1705 #[prost(message, tag = "2")]
1706 Failure(super::FileChangeFailure),
1707 }
1708}
1709#[derive(Clone, PartialEq, ::prost::Message)]
1710pub struct ListFileRevisionsRequest {
1711 #[prost(string, tag = "1")]
1712 pub drive_rid: ::prost::alloc::string::String,
1713 #[prost(string, tag = "2")]
1714 pub file_rid: ::prost::alloc::string::String,
1715 #[prost(int32, optional, tag = "3")]
1716 pub page_size: ::core::option::Option<i32>,
1717 #[prost(string, optional, tag = "4")]
1718 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1719}
1720#[derive(Clone, PartialEq, ::prost::Message)]
1721pub struct ListFileRevisionsResponse {
1722 #[prost(message, repeated, tag = "1")]
1723 pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1724 #[prost(string, optional, tag = "2")]
1725 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1726}
1727#[derive(Clone, PartialEq, ::prost::Message)]
1728pub struct PurgeFileRequest {
1729 #[prost(string, tag = "1")]
1730 pub file_revision_rid: ::prost::alloc::string::String,
1731}
1732#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1733pub struct PurgeFileResponse {}
1734#[derive(Clone, PartialEq, ::prost::Message)]
1735pub struct GetDownloadUrlRequest {
1736 #[prost(string, tag = "1")]
1737 pub file_revision_rid: ::prost::alloc::string::String,
1738}
1739#[derive(Clone, PartialEq, ::prost::Message)]
1740pub struct GetDownloadUrlResponse {
1741 #[prost(string, tag = "1")]
1742 pub url: ::prost::alloc::string::String,
1743}
1744#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1745#[repr(i32)]
1746pub enum RevisionReadError {
1747 Unspecified = 0,
1748 BytesReclaimed = 1,
1749 MaterializationFailed = 2,
1750}
1751impl RevisionReadError {
1752 pub fn as_str_name(&self) -> &'static str {
1757 match self {
1758 Self::Unspecified => "REVISION_READ_ERROR_UNSPECIFIED",
1759 Self::BytesReclaimed => "REVISION_READ_ERROR_BYTES_RECLAIMED",
1760 Self::MaterializationFailed => "REVISION_READ_ERROR_MATERIALIZATION_FAILED",
1761 }
1762 }
1763 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1765 match value {
1766 "REVISION_READ_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1767 "REVISION_READ_ERROR_BYTES_RECLAIMED" => Some(Self::BytesReclaimed),
1768 "REVISION_READ_ERROR_MATERIALIZATION_FAILED" => {
1769 Some(Self::MaterializationFailed)
1770 }
1771 _ => None,
1772 }
1773 }
1774}
1775#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1776#[repr(i32)]
1777pub enum FileChangeError {
1778 Unspecified = 0,
1779 PathAlreadyExists = 1,
1780 InvalidLogicalPath = 2,
1781 RevisionPreconditionFailed = 3,
1782 ReadOnlyDrive = 4,
1783 UploadedObjectNotFound = 5,
1784}
1785impl FileChangeError {
1786 pub fn as_str_name(&self) -> &'static str {
1791 match self {
1792 Self::Unspecified => "FILE_CHANGE_ERROR_UNSPECIFIED",
1793 Self::PathAlreadyExists => "FILE_CHANGE_ERROR_PATH_ALREADY_EXISTS",
1794 Self::InvalidLogicalPath => "FILE_CHANGE_ERROR_INVALID_LOGICAL_PATH",
1795 Self::RevisionPreconditionFailed => {
1796 "FILE_CHANGE_ERROR_REVISION_PRECONDITION_FAILED"
1797 }
1798 Self::ReadOnlyDrive => "FILE_CHANGE_ERROR_READ_ONLY_DRIVE",
1799 Self::UploadedObjectNotFound => "FILE_CHANGE_ERROR_UPLOADED_OBJECT_NOT_FOUND",
1800 }
1801 }
1802 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1804 match value {
1805 "FILE_CHANGE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
1806 "FILE_CHANGE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
1807 "FILE_CHANGE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
1808 "FILE_CHANGE_ERROR_REVISION_PRECONDITION_FAILED" => {
1809 Some(Self::RevisionPreconditionFailed)
1810 }
1811 "FILE_CHANGE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
1812 "FILE_CHANGE_ERROR_UPLOADED_OBJECT_NOT_FOUND" => {
1813 Some(Self::UploadedObjectNotFound)
1814 }
1815 _ => None,
1816 }
1817 }
1818}
1819pub mod files_service_client {
1821 #![allow(
1822 unused_variables,
1823 dead_code,
1824 missing_docs,
1825 clippy::wildcard_imports,
1826 clippy::let_unit_value,
1827 )]
1828 use tonic::codegen::*;
1829 use tonic::codegen::http::Uri;
1830 #[derive(Debug, Clone)]
1831 pub struct FilesServiceClient<T> {
1832 inner: tonic::client::Grpc<T>,
1833 }
1834 impl FilesServiceClient<tonic::transport::Channel> {
1835 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1837 where
1838 D: TryInto<tonic::transport::Endpoint>,
1839 D::Error: Into<StdError>,
1840 {
1841 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1842 Ok(Self::new(conn))
1843 }
1844 }
1845 impl<T> FilesServiceClient<T>
1846 where
1847 T: tonic::client::GrpcService<tonic::body::Body>,
1848 T::Error: Into<StdError>,
1849 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1850 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1851 {
1852 pub fn new(inner: T) -> Self {
1853 let inner = tonic::client::Grpc::new(inner);
1854 Self { inner }
1855 }
1856 pub fn with_origin(inner: T, origin: Uri) -> Self {
1857 let inner = tonic::client::Grpc::with_origin(inner, origin);
1858 Self { inner }
1859 }
1860 pub fn with_interceptor<F>(
1861 inner: T,
1862 interceptor: F,
1863 ) -> FilesServiceClient<InterceptedService<T, F>>
1864 where
1865 F: tonic::service::Interceptor,
1866 T::ResponseBody: Default,
1867 T: tonic::codegen::Service<
1868 http::Request<tonic::body::Body>,
1869 Response = http::Response<
1870 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1871 >,
1872 >,
1873 <T as tonic::codegen::Service<
1874 http::Request<tonic::body::Body>,
1875 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1876 {
1877 FilesServiceClient::new(InterceptedService::new(inner, interceptor))
1878 }
1879 #[must_use]
1884 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1885 self.inner = self.inner.send_compressed(encoding);
1886 self
1887 }
1888 #[must_use]
1890 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1891 self.inner = self.inner.accept_compressed(encoding);
1892 self
1893 }
1894 #[must_use]
1898 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1899 self.inner = self.inner.max_decoding_message_size(limit);
1900 self
1901 }
1902 #[must_use]
1906 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1907 self.inner = self.inner.max_encoding_message_size(limit);
1908 self
1909 }
1910 pub async fn get_file(
1911 &mut self,
1912 request: impl tonic::IntoRequest<super::GetFileRequest>,
1913 ) -> std::result::Result<
1914 tonic::Response<super::GetFileResponse>,
1915 tonic::Status,
1916 > {
1917 self.inner
1918 .ready()
1919 .await
1920 .map_err(|e| {
1921 tonic::Status::unknown(
1922 format!("Service was not ready: {}", e.into()),
1923 )
1924 })?;
1925 let codec = tonic::codec::ProstCodec::default();
1926 let path = http::uri::PathAndQuery::from_static(
1927 "/nominal.file_store.v1.FilesService/GetFile",
1928 );
1929 let mut req = request.into_request();
1930 req.extensions_mut()
1931 .insert(
1932 GrpcMethod::new("nominal.file_store.v1.FilesService", "GetFile"),
1933 );
1934 self.inner.unary(req, path, codec).await
1935 }
1936 pub async fn get_file_by_identity(
1937 &mut self,
1938 request: impl tonic::IntoRequest<super::GetFileByIdentityRequest>,
1939 ) -> std::result::Result<
1940 tonic::Response<super::GetFileByIdentityResponse>,
1941 tonic::Status,
1942 > {
1943 self.inner
1944 .ready()
1945 .await
1946 .map_err(|e| {
1947 tonic::Status::unknown(
1948 format!("Service was not ready: {}", e.into()),
1949 )
1950 })?;
1951 let codec = tonic::codec::ProstCodec::default();
1952 let path = http::uri::PathAndQuery::from_static(
1953 "/nominal.file_store.v1.FilesService/GetFileByIdentity",
1954 );
1955 let mut req = request.into_request();
1956 req.extensions_mut()
1957 .insert(
1958 GrpcMethod::new(
1959 "nominal.file_store.v1.FilesService",
1960 "GetFileByIdentity",
1961 ),
1962 );
1963 self.inner.unary(req, path, codec).await
1964 }
1965 pub async fn resolve_file_revision(
1966 &mut self,
1967 request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
1968 ) -> std::result::Result<
1969 tonic::Response<super::ResolveFileRevisionResponse>,
1970 tonic::Status,
1971 > {
1972 self.inner
1973 .ready()
1974 .await
1975 .map_err(|e| {
1976 tonic::Status::unknown(
1977 format!("Service was not ready: {}", e.into()),
1978 )
1979 })?;
1980 let codec = tonic::codec::ProstCodec::default();
1981 let path = http::uri::PathAndQuery::from_static(
1982 "/nominal.file_store.v1.FilesService/ResolveFileRevision",
1983 );
1984 let mut req = request.into_request();
1985 req.extensions_mut()
1986 .insert(
1987 GrpcMethod::new(
1988 "nominal.file_store.v1.FilesService",
1989 "ResolveFileRevision",
1990 ),
1991 );
1992 self.inner.unary(req, path, codec).await
1993 }
1994 pub async fn list_files(
1995 &mut self,
1996 request: impl tonic::IntoRequest<super::ListFilesRequest>,
1997 ) -> std::result::Result<
1998 tonic::Response<super::ListFilesResponse>,
1999 tonic::Status,
2000 > {
2001 self.inner
2002 .ready()
2003 .await
2004 .map_err(|e| {
2005 tonic::Status::unknown(
2006 format!("Service was not ready: {}", e.into()),
2007 )
2008 })?;
2009 let codec = tonic::codec::ProstCodec::default();
2010 let path = http::uri::PathAndQuery::from_static(
2011 "/nominal.file_store.v1.FilesService/ListFiles",
2012 );
2013 let mut req = request.into_request();
2014 req.extensions_mut()
2015 .insert(
2016 GrpcMethod::new("nominal.file_store.v1.FilesService", "ListFiles"),
2017 );
2018 self.inner.unary(req, path, codec).await
2019 }
2020 pub async fn apply_file_changes(
2021 &mut self,
2022 request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
2023 ) -> std::result::Result<
2024 tonic::Response<super::ApplyFileChangesResponse>,
2025 tonic::Status,
2026 > {
2027 self.inner
2028 .ready()
2029 .await
2030 .map_err(|e| {
2031 tonic::Status::unknown(
2032 format!("Service was not ready: {}", e.into()),
2033 )
2034 })?;
2035 let codec = tonic::codec::ProstCodec::default();
2036 let path = http::uri::PathAndQuery::from_static(
2037 "/nominal.file_store.v1.FilesService/ApplyFileChanges",
2038 );
2039 let mut req = request.into_request();
2040 req.extensions_mut()
2041 .insert(
2042 GrpcMethod::new(
2043 "nominal.file_store.v1.FilesService",
2044 "ApplyFileChanges",
2045 ),
2046 );
2047 self.inner.unary(req, path, codec).await
2048 }
2049 pub async fn list_file_revisions(
2050 &mut self,
2051 request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
2052 ) -> std::result::Result<
2053 tonic::Response<super::ListFileRevisionsResponse>,
2054 tonic::Status,
2055 > {
2056 self.inner
2057 .ready()
2058 .await
2059 .map_err(|e| {
2060 tonic::Status::unknown(
2061 format!("Service was not ready: {}", e.into()),
2062 )
2063 })?;
2064 let codec = tonic::codec::ProstCodec::default();
2065 let path = http::uri::PathAndQuery::from_static(
2066 "/nominal.file_store.v1.FilesService/ListFileRevisions",
2067 );
2068 let mut req = request.into_request();
2069 req.extensions_mut()
2070 .insert(
2071 GrpcMethod::new(
2072 "nominal.file_store.v1.FilesService",
2073 "ListFileRevisions",
2074 ),
2075 );
2076 self.inner.unary(req, path, codec).await
2077 }
2078 pub async fn purge_file(
2079 &mut self,
2080 request: impl tonic::IntoRequest<super::PurgeFileRequest>,
2081 ) -> std::result::Result<
2082 tonic::Response<super::PurgeFileResponse>,
2083 tonic::Status,
2084 > {
2085 self.inner
2086 .ready()
2087 .await
2088 .map_err(|e| {
2089 tonic::Status::unknown(
2090 format!("Service was not ready: {}", e.into()),
2091 )
2092 })?;
2093 let codec = tonic::codec::ProstCodec::default();
2094 let path = http::uri::PathAndQuery::from_static(
2095 "/nominal.file_store.v1.FilesService/PurgeFile",
2096 );
2097 let mut req = request.into_request();
2098 req.extensions_mut()
2099 .insert(
2100 GrpcMethod::new("nominal.file_store.v1.FilesService", "PurgeFile"),
2101 );
2102 self.inner.unary(req, path, codec).await
2103 }
2104 pub async fn get_download_url(
2105 &mut self,
2106 request: impl tonic::IntoRequest<super::GetDownloadUrlRequest>,
2107 ) -> std::result::Result<
2108 tonic::Response<super::GetDownloadUrlResponse>,
2109 tonic::Status,
2110 > {
2111 self.inner
2112 .ready()
2113 .await
2114 .map_err(|e| {
2115 tonic::Status::unknown(
2116 format!("Service was not ready: {}", e.into()),
2117 )
2118 })?;
2119 let codec = tonic::codec::ProstCodec::default();
2120 let path = http::uri::PathAndQuery::from_static(
2121 "/nominal.file_store.v1.FilesService/GetDownloadUrl",
2122 );
2123 let mut req = request.into_request();
2124 req.extensions_mut()
2125 .insert(
2126 GrpcMethod::new(
2127 "nominal.file_store.v1.FilesService",
2128 "GetDownloadUrl",
2129 ),
2130 );
2131 self.inner.unary(req, path, codec).await
2132 }
2133 }
2134}
2135#[derive(Clone, PartialEq, ::prost::Message)]
2136pub struct CreateIngestRuleRequest {
2137 #[prost(string, tag = "1")]
2138 pub drive_rid: ::prost::alloc::string::String,
2139 #[prost(message, optional, tag = "2")]
2140 pub matcher: ::core::option::Option<FileMatcher>,
2141 #[prost(message, optional, tag = "3")]
2142 pub triggers: ::core::option::Option<IngestTriggers>,
2143 #[prost(enumeration = "BackfillMode", tag = "4")]
2144 pub backfill_mode: i32,
2145}
2146#[derive(Clone, PartialEq, ::prost::Message)]
2147pub struct CreateIngestRuleResponse {
2148 #[prost(message, optional, tag = "1")]
2149 pub rule: ::core::option::Option<IngestRule>,
2150}
2151#[derive(Clone, PartialEq, ::prost::Message)]
2152pub struct ListIngestRulesRequest {
2153 #[prost(string, tag = "1")]
2154 pub drive_rid: ::prost::alloc::string::String,
2155 #[prost(bool, tag = "2")]
2156 pub include_archived: bool,
2157 #[prost(int32, optional, tag = "3")]
2158 pub page_size: ::core::option::Option<i32>,
2159 #[prost(string, optional, tag = "4")]
2160 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
2161}
2162#[derive(Clone, PartialEq, ::prost::Message)]
2163pub struct ListIngestRulesResponse {
2164 #[prost(message, repeated, tag = "1")]
2165 pub rules: ::prost::alloc::vec::Vec<IngestRule>,
2166 #[prost(string, optional, tag = "2")]
2167 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
2168}
2169#[derive(Clone, PartialEq, ::prost::Message)]
2170pub struct GetIngestRuleRequest {
2171 #[prost(string, tag = "1")]
2172 pub rule_rid: ::prost::alloc::string::String,
2173}
2174#[derive(Clone, PartialEq, ::prost::Message)]
2175pub struct GetIngestRuleResponse {
2176 #[prost(message, optional, tag = "1")]
2177 pub rule: ::core::option::Option<IngestRule>,
2178}
2179#[derive(Clone, PartialEq, ::prost::Message)]
2180pub struct UpdateIngestRuleRequest {
2181 #[prost(string, tag = "1")]
2182 pub rule_rid: ::prost::alloc::string::String,
2183 #[prost(message, optional, tag = "2")]
2184 pub matcher: ::core::option::Option<FileMatcher>,
2185 #[prost(message, optional, tag = "3")]
2186 pub triggers: ::core::option::Option<IngestTriggers>,
2187}
2188#[derive(Clone, PartialEq, ::prost::Message)]
2189pub struct UpdateIngestRuleResponse {
2190 #[prost(message, optional, tag = "1")]
2191 pub rule: ::core::option::Option<IngestRule>,
2192}
2193#[derive(Clone, PartialEq, ::prost::Message)]
2194pub struct ArchiveIngestRuleRequest {
2195 #[prost(string, tag = "1")]
2196 pub rule_rid: ::prost::alloc::string::String,
2197}
2198#[derive(Clone, PartialEq, ::prost::Message)]
2199pub struct ArchiveIngestRuleResponse {
2200 #[prost(message, optional, tag = "1")]
2201 pub rule: ::core::option::Option<IngestRule>,
2202}
2203#[derive(Clone, PartialEq, ::prost::Message)]
2204pub struct UnarchiveIngestRuleRequest {
2205 #[prost(string, tag = "1")]
2206 pub rule_rid: ::prost::alloc::string::String,
2207 #[prost(enumeration = "BackfillMode", tag = "2")]
2208 pub backfill_mode: i32,
2209}
2210#[derive(Clone, PartialEq, ::prost::Message)]
2211pub struct UnarchiveIngestRuleResponse {
2212 #[prost(message, optional, tag = "1")]
2213 pub rule: ::core::option::Option<IngestRule>,
2214}
2215#[derive(Clone, PartialEq, ::prost::Message)]
2216pub struct IngestRule {
2217 #[prost(string, tag = "1")]
2218 pub rule_rid: ::prost::alloc::string::String,
2219 #[prost(string, tag = "2")]
2220 pub drive_rid: ::prost::alloc::string::String,
2221 #[prost(message, optional, tag = "3")]
2222 pub matcher: ::core::option::Option<FileMatcher>,
2223 #[prost(message, optional, tag = "4")]
2224 pub triggers: ::core::option::Option<IngestTriggers>,
2225 #[prost(message, optional, tag = "5")]
2226 pub created: ::core::option::Option<Attribution>,
2227 #[prost(enumeration = "IngestRuleState", tag = "6")]
2228 pub state: i32,
2229 #[prost(message, optional, tag = "7")]
2230 pub archived: ::core::option::Option<Attribution>,
2231 #[prost(message, optional, tag = "8")]
2232 pub updated: ::core::option::Option<Attribution>,
2233}
2234#[derive(Clone, PartialEq, ::prost::Message)]
2235pub struct FileMatcher {
2236 #[prost(oneof = "file_matcher::Matcher", tags = "1")]
2237 pub matcher: ::core::option::Option<file_matcher::Matcher>,
2238}
2239pub mod file_matcher {
2241 #[derive(Clone, PartialEq, ::prost::Oneof)]
2242 pub enum Matcher {
2243 #[prost(message, tag = "1")]
2244 Path(super::PathMatcher),
2245 }
2246}
2247#[derive(Clone, PartialEq, ::prost::Message)]
2248pub struct PathMatcher {
2249 #[prost(message, optional, tag = "1")]
2250 pub pattern: ::core::option::Option<PathPattern>,
2251 #[prost(message, optional, tag = "2")]
2252 pub format: ::core::option::Option<FormatConfig>,
2253}
2254#[derive(Clone, PartialEq, ::prost::Message)]
2255pub struct FormatConfig {
2256 #[prost(oneof = "format_config::Format", tags = "1, 2, 3")]
2257 pub format: ::core::option::Option<format_config::Format>,
2258}
2259pub mod format_config {
2261 #[derive(Clone, PartialEq, ::prost::Oneof)]
2262 pub enum Format {
2263 #[prost(message, tag = "1")]
2264 Csv(super::CsvIngestConfig),
2265 #[prost(message, tag = "2")]
2266 Parquet(super::ParquetIngestConfig),
2267 #[prost(message, tag = "3")]
2268 Dataflash(super::DataflashIngestConfig),
2269 }
2270}
2271#[derive(Clone, PartialEq, ::prost::Message)]
2272pub struct CsvIngestConfig {
2273 #[prost(message, optional, tag = "1")]
2274 pub timestamp: ::core::option::Option<TimestampConfig>,
2275 #[prost(string, optional, tag = "2")]
2276 pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
2277}
2278#[derive(Clone, PartialEq, ::prost::Message)]
2279pub struct ParquetIngestConfig {
2280 #[prost(message, optional, tag = "1")]
2281 pub timestamp: ::core::option::Option<TimestampConfig>,
2282 #[prost(string, optional, tag = "2")]
2283 pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
2284}
2285#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2286pub struct DataflashIngestConfig {}
2287#[derive(Clone, PartialEq, ::prost::Message)]
2288pub struct TimestampConfig {
2289 #[prost(oneof = "timestamp_config::Kind", tags = "1")]
2290 pub kind: ::core::option::Option<timestamp_config::Kind>,
2291}
2292pub mod timestamp_config {
2294 #[derive(Clone, PartialEq, ::prost::Oneof)]
2295 pub enum Kind {
2296 #[prost(message, tag = "1")]
2297 Single(super::TimestampCandidate),
2298 }
2299}
2300#[derive(Clone, PartialEq, ::prost::Message)]
2301pub struct TimestampCandidate {
2302 #[prost(string, tag = "1")]
2303 pub column: ::prost::alloc::string::String,
2304 #[prost(message, optional, tag = "2")]
2305 pub r#type: ::core::option::Option<super::super::types::time::AbsoluteTimestamp>,
2306}
2307#[derive(Clone, PartialEq, ::prost::Message)]
2308pub struct PathPattern {
2309 #[prost(message, optional, tag = "1")]
2310 pub first: ::core::option::Option<PatternSegment>,
2311 #[prost(message, repeated, tag = "2")]
2312 pub rest: ::prost::alloc::vec::Vec<JoinedSegment>,
2313}
2314#[derive(Clone, PartialEq, ::prost::Message)]
2315pub struct JoinedSegment {
2316 #[prost(enumeration = "SegmentDelimiter", tag = "1")]
2317 pub delimiter: i32,
2318 #[prost(message, optional, tag = "2")]
2319 pub segment: ::core::option::Option<PatternSegment>,
2320}
2321#[derive(Clone, PartialEq, ::prost::Message)]
2322pub struct PatternSegment {
2323 #[prost(oneof = "pattern_segment::Kind", tags = "1, 2, 3")]
2324 pub kind: ::core::option::Option<pattern_segment::Kind>,
2325}
2326pub mod pattern_segment {
2328 #[derive(Clone, PartialEq, ::prost::Oneof)]
2329 pub enum Kind {
2330 #[prost(message, tag = "1")]
2331 ShallowWildcard(super::ShallowWildcard),
2332 #[prost(message, tag = "2")]
2333 DeepWildcard(super::DeepWildcard),
2334 #[prost(string, tag = "3")]
2335 Literal(::prost::alloc::string::String),
2336 }
2337}
2338#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2339pub struct ShallowWildcard {}
2340#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2341pub struct DeepWildcard {}
2342#[derive(Clone, PartialEq, ::prost::Message)]
2343pub struct IngestTriggers {
2344 #[prost(message, optional, tag = "1")]
2345 pub new_match: ::core::option::Option<IngestTarget>,
2346}
2347#[derive(Clone, PartialEq, ::prost::Message)]
2348pub struct IngestTarget {
2349 #[prost(oneof = "ingest_target::Target", tags = "1, 2")]
2350 pub target: ::core::option::Option<ingest_target::Target>,
2351}
2352pub mod ingest_target {
2354 #[derive(Clone, PartialEq, ::prost::Oneof)]
2355 pub enum Target {
2356 #[prost(message, tag = "1")]
2357 NewDataset(super::NewDatasetTarget),
2358 #[prost(message, tag = "2")]
2359 ExistingDataset(super::ExistingDatasetTarget),
2360 }
2361}
2362#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2363pub struct NewDatasetTarget {}
2364#[derive(Clone, PartialEq, ::prost::Message)]
2365pub struct ExistingDatasetTarget {
2366 #[prost(string, tag = "1")]
2367 pub dataset_rid: ::prost::alloc::string::String,
2368}
2369#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2370#[repr(i32)]
2371pub enum BackfillMode {
2372 Unspecified = 0,
2373 NewFilesOnly = 1,
2374 BackfillExisting = 2,
2375}
2376impl BackfillMode {
2377 pub fn as_str_name(&self) -> &'static str {
2382 match self {
2383 Self::Unspecified => "BACKFILL_MODE_UNSPECIFIED",
2384 Self::NewFilesOnly => "BACKFILL_MODE_NEW_FILES_ONLY",
2385 Self::BackfillExisting => "BACKFILL_MODE_BACKFILL_EXISTING",
2386 }
2387 }
2388 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2390 match value {
2391 "BACKFILL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
2392 "BACKFILL_MODE_NEW_FILES_ONLY" => Some(Self::NewFilesOnly),
2393 "BACKFILL_MODE_BACKFILL_EXISTING" => Some(Self::BackfillExisting),
2394 _ => None,
2395 }
2396 }
2397}
2398#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2399#[repr(i32)]
2400pub enum IngestRuleState {
2401 Unspecified = 0,
2402 Active = 1,
2403 Archived = 2,
2404}
2405impl IngestRuleState {
2406 pub fn as_str_name(&self) -> &'static str {
2411 match self {
2412 Self::Unspecified => "INGEST_RULE_STATE_UNSPECIFIED",
2413 Self::Active => "INGEST_RULE_STATE_ACTIVE",
2414 Self::Archived => "INGEST_RULE_STATE_ARCHIVED",
2415 }
2416 }
2417 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2419 match value {
2420 "INGEST_RULE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
2421 "INGEST_RULE_STATE_ACTIVE" => Some(Self::Active),
2422 "INGEST_RULE_STATE_ARCHIVED" => Some(Self::Archived),
2423 _ => None,
2424 }
2425 }
2426}
2427#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2428#[repr(i32)]
2429pub enum SegmentDelimiter {
2430 Unspecified = 0,
2431 PathSeparator = 1,
2432 Concat = 2,
2433}
2434impl SegmentDelimiter {
2435 pub fn as_str_name(&self) -> &'static str {
2440 match self {
2441 Self::Unspecified => "SEGMENT_DELIMITER_UNSPECIFIED",
2442 Self::PathSeparator => "SEGMENT_DELIMITER_PATH_SEPARATOR",
2443 Self::Concat => "SEGMENT_DELIMITER_CONCAT",
2444 }
2445 }
2446 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2448 match value {
2449 "SEGMENT_DELIMITER_UNSPECIFIED" => Some(Self::Unspecified),
2450 "SEGMENT_DELIMITER_PATH_SEPARATOR" => Some(Self::PathSeparator),
2451 "SEGMENT_DELIMITER_CONCAT" => Some(Self::Concat),
2452 _ => None,
2453 }
2454 }
2455}
2456#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
2457#[repr(i32)]
2458pub enum IngestRulesError {
2459 Unspecified = 0,
2460 RuleNotFound = 1,
2461}
2462impl IngestRulesError {
2463 pub fn as_str_name(&self) -> &'static str {
2468 match self {
2469 Self::Unspecified => "INGEST_RULES_ERROR_UNSPECIFIED",
2470 Self::RuleNotFound => "INGEST_RULES_ERROR_RULE_NOT_FOUND",
2471 }
2472 }
2473 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
2475 match value {
2476 "INGEST_RULES_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
2477 "INGEST_RULES_ERROR_RULE_NOT_FOUND" => Some(Self::RuleNotFound),
2478 _ => None,
2479 }
2480 }
2481}
2482pub mod internal_ingest_rules_service_client {
2484 #![allow(
2485 unused_variables,
2486 dead_code,
2487 missing_docs,
2488 clippy::wildcard_imports,
2489 clippy::let_unit_value,
2490 )]
2491 use tonic::codegen::*;
2492 use tonic::codegen::http::Uri;
2493 #[derive(Debug, Clone)]
2494 pub struct InternalIngestRulesServiceClient<T> {
2495 inner: tonic::client::Grpc<T>,
2496 }
2497 impl InternalIngestRulesServiceClient<tonic::transport::Channel> {
2498 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
2500 where
2501 D: TryInto<tonic::transport::Endpoint>,
2502 D::Error: Into<StdError>,
2503 {
2504 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
2505 Ok(Self::new(conn))
2506 }
2507 }
2508 impl<T> InternalIngestRulesServiceClient<T>
2509 where
2510 T: tonic::client::GrpcService<tonic::body::Body>,
2511 T::Error: Into<StdError>,
2512 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
2513 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2514 {
2515 pub fn new(inner: T) -> Self {
2516 let inner = tonic::client::Grpc::new(inner);
2517 Self { inner }
2518 }
2519 pub fn with_origin(inner: T, origin: Uri) -> Self {
2520 let inner = tonic::client::Grpc::with_origin(inner, origin);
2521 Self { inner }
2522 }
2523 pub fn with_interceptor<F>(
2524 inner: T,
2525 interceptor: F,
2526 ) -> InternalIngestRulesServiceClient<InterceptedService<T, F>>
2527 where
2528 F: tonic::service::Interceptor,
2529 T::ResponseBody: Default,
2530 T: tonic::codegen::Service<
2531 http::Request<tonic::body::Body>,
2532 Response = http::Response<
2533 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2534 >,
2535 >,
2536 <T as tonic::codegen::Service<
2537 http::Request<tonic::body::Body>,
2538 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2539 {
2540 InternalIngestRulesServiceClient::new(
2541 InterceptedService::new(inner, interceptor),
2542 )
2543 }
2544 #[must_use]
2549 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2550 self.inner = self.inner.send_compressed(encoding);
2551 self
2552 }
2553 #[must_use]
2555 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2556 self.inner = self.inner.accept_compressed(encoding);
2557 self
2558 }
2559 #[must_use]
2563 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2564 self.inner = self.inner.max_decoding_message_size(limit);
2565 self
2566 }
2567 #[must_use]
2571 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2572 self.inner = self.inner.max_encoding_message_size(limit);
2573 self
2574 }
2575 pub async fn create_ingest_rule(
2576 &mut self,
2577 request: impl tonic::IntoRequest<super::CreateIngestRuleRequest>,
2578 ) -> std::result::Result<
2579 tonic::Response<super::CreateIngestRuleResponse>,
2580 tonic::Status,
2581 > {
2582 self.inner
2583 .ready()
2584 .await
2585 .map_err(|e| {
2586 tonic::Status::unknown(
2587 format!("Service was not ready: {}", e.into()),
2588 )
2589 })?;
2590 let codec = tonic::codec::ProstCodec::default();
2591 let path = http::uri::PathAndQuery::from_static(
2592 "/nominal.file_store.v1.InternalIngestRulesService/CreateIngestRule",
2593 );
2594 let mut req = request.into_request();
2595 req.extensions_mut()
2596 .insert(
2597 GrpcMethod::new(
2598 "nominal.file_store.v1.InternalIngestRulesService",
2599 "CreateIngestRule",
2600 ),
2601 );
2602 self.inner.unary(req, path, codec).await
2603 }
2604 pub async fn list_ingest_rules(
2605 &mut self,
2606 request: impl tonic::IntoRequest<super::ListIngestRulesRequest>,
2607 ) -> std::result::Result<
2608 tonic::Response<super::ListIngestRulesResponse>,
2609 tonic::Status,
2610 > {
2611 self.inner
2612 .ready()
2613 .await
2614 .map_err(|e| {
2615 tonic::Status::unknown(
2616 format!("Service was not ready: {}", e.into()),
2617 )
2618 })?;
2619 let codec = tonic::codec::ProstCodec::default();
2620 let path = http::uri::PathAndQuery::from_static(
2621 "/nominal.file_store.v1.InternalIngestRulesService/ListIngestRules",
2622 );
2623 let mut req = request.into_request();
2624 req.extensions_mut()
2625 .insert(
2626 GrpcMethod::new(
2627 "nominal.file_store.v1.InternalIngestRulesService",
2628 "ListIngestRules",
2629 ),
2630 );
2631 self.inner.unary(req, path, codec).await
2632 }
2633 pub async fn get_ingest_rule(
2634 &mut self,
2635 request: impl tonic::IntoRequest<super::GetIngestRuleRequest>,
2636 ) -> std::result::Result<
2637 tonic::Response<super::GetIngestRuleResponse>,
2638 tonic::Status,
2639 > {
2640 self.inner
2641 .ready()
2642 .await
2643 .map_err(|e| {
2644 tonic::Status::unknown(
2645 format!("Service was not ready: {}", e.into()),
2646 )
2647 })?;
2648 let codec = tonic::codec::ProstCodec::default();
2649 let path = http::uri::PathAndQuery::from_static(
2650 "/nominal.file_store.v1.InternalIngestRulesService/GetIngestRule",
2651 );
2652 let mut req = request.into_request();
2653 req.extensions_mut()
2654 .insert(
2655 GrpcMethod::new(
2656 "nominal.file_store.v1.InternalIngestRulesService",
2657 "GetIngestRule",
2658 ),
2659 );
2660 self.inner.unary(req, path, codec).await
2661 }
2662 pub async fn update_ingest_rule(
2663 &mut self,
2664 request: impl tonic::IntoRequest<super::UpdateIngestRuleRequest>,
2665 ) -> std::result::Result<
2666 tonic::Response<super::UpdateIngestRuleResponse>,
2667 tonic::Status,
2668 > {
2669 self.inner
2670 .ready()
2671 .await
2672 .map_err(|e| {
2673 tonic::Status::unknown(
2674 format!("Service was not ready: {}", e.into()),
2675 )
2676 })?;
2677 let codec = tonic::codec::ProstCodec::default();
2678 let path = http::uri::PathAndQuery::from_static(
2679 "/nominal.file_store.v1.InternalIngestRulesService/UpdateIngestRule",
2680 );
2681 let mut req = request.into_request();
2682 req.extensions_mut()
2683 .insert(
2684 GrpcMethod::new(
2685 "nominal.file_store.v1.InternalIngestRulesService",
2686 "UpdateIngestRule",
2687 ),
2688 );
2689 self.inner.unary(req, path, codec).await
2690 }
2691 pub async fn archive_ingest_rule(
2692 &mut self,
2693 request: impl tonic::IntoRequest<super::ArchiveIngestRuleRequest>,
2694 ) -> std::result::Result<
2695 tonic::Response<super::ArchiveIngestRuleResponse>,
2696 tonic::Status,
2697 > {
2698 self.inner
2699 .ready()
2700 .await
2701 .map_err(|e| {
2702 tonic::Status::unknown(
2703 format!("Service was not ready: {}", e.into()),
2704 )
2705 })?;
2706 let codec = tonic::codec::ProstCodec::default();
2707 let path = http::uri::PathAndQuery::from_static(
2708 "/nominal.file_store.v1.InternalIngestRulesService/ArchiveIngestRule",
2709 );
2710 let mut req = request.into_request();
2711 req.extensions_mut()
2712 .insert(
2713 GrpcMethod::new(
2714 "nominal.file_store.v1.InternalIngestRulesService",
2715 "ArchiveIngestRule",
2716 ),
2717 );
2718 self.inner.unary(req, path, codec).await
2719 }
2720 pub async fn unarchive_ingest_rule(
2721 &mut self,
2722 request: impl tonic::IntoRequest<super::UnarchiveIngestRuleRequest>,
2723 ) -> std::result::Result<
2724 tonic::Response<super::UnarchiveIngestRuleResponse>,
2725 tonic::Status,
2726 > {
2727 self.inner
2728 .ready()
2729 .await
2730 .map_err(|e| {
2731 tonic::Status::unknown(
2732 format!("Service was not ready: {}", e.into()),
2733 )
2734 })?;
2735 let codec = tonic::codec::ProstCodec::default();
2736 let path = http::uri::PathAndQuery::from_static(
2737 "/nominal.file_store.v1.InternalIngestRulesService/UnarchiveIngestRule",
2738 );
2739 let mut req = request.into_request();
2740 req.extensions_mut()
2741 .insert(
2742 GrpcMethod::new(
2743 "nominal.file_store.v1.InternalIngestRulesService",
2744 "UnarchiveIngestRule",
2745 ),
2746 );
2747 self.inner.unary(req, path, codec).await
2748 }
2749 }
2750}