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}
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct VirtualDrive {
28 #[prost(string, tag = "1")]
29 pub drive_rid: ::prost::alloc::string::String,
30 #[prost(message, optional, tag = "2")]
31 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
32 #[prost(message, optional, tag = "3")]
33 pub status: ::core::option::Option<VirtualDriveStatus>,
34}
35#[derive(Clone, PartialEq, ::prost::Message)]
36pub struct VirtualDriveDetails {
37 #[prost(string, tag = "1")]
38 pub drive_rid: ::prost::alloc::string::String,
39 #[prost(message, optional, tag = "2")]
40 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
41}
42#[derive(Clone, PartialEq, ::prost::Message)]
43pub struct VirtualDriveStatus {
44 #[prost(enumeration = "VirtualDriveState", tag = "1")]
45 pub state: i32,
46 #[prost(message, optional, tag = "2")]
47 pub last_successful_check_time: ::core::option::Option<
48 super::super::super::google::protobuf::Timestamp,
49 >,
50 #[prost(string, tag = "3")]
51 pub message: ::prost::alloc::string::String,
52}
53#[derive(Clone, PartialEq, ::prost::Message)]
54pub struct VirtualDriveConnectionDetails {
55 #[prost(oneof = "virtual_drive_connection_details::Details", tags = "1, 2")]
56 pub details: ::core::option::Option<virtual_drive_connection_details::Details>,
57}
58pub mod virtual_drive_connection_details {
60 #[derive(Clone, PartialEq, ::prost::Oneof)]
61 pub enum Details {
62 #[prost(message, tag = "1")]
63 S3(super::S3VirtualDriveConnectionDetails),
64 #[prost(message, tag = "2")]
65 GoogleDrive(super::GoogleDriveVirtualDriveConnectionDetails),
66 }
67}
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct S3VirtualDriveConnectionDetails {
70 #[prost(string, tag = "1")]
71 pub bucket: ::prost::alloc::string::String,
72 #[prost(string, tag = "2")]
73 pub prefix: ::prost::alloc::string::String,
74 #[prost(string, tag = "3")]
75 pub credentials_secret_rid: ::prost::alloc::string::String,
76 #[prost(string, tag = "4")]
77 pub endpoint: ::prost::alloc::string::String,
78}
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct GoogleDriveVirtualDriveConnectionDetails {
81 #[prost(string, tag = "1")]
82 pub folder_id: ::prost::alloc::string::String,
83 #[prost(string, tag = "2")]
84 pub credentials_secret_rid: ::prost::alloc::string::String,
85}
86#[derive(Clone, PartialEq, ::prost::Message)]
87pub struct LogicalPath {
88 #[prost(string, tag = "1")]
89 pub path: ::prost::alloc::string::String,
90}
91#[derive(Clone, PartialEq, ::prost::Message)]
92pub struct LogicalFile {
93 #[prost(message, optional, tag = "1")]
94 pub identity: ::core::option::Option<LogicalFileIdentity>,
95 #[prost(message, optional, tag = "2")]
96 pub path: ::core::option::Option<LogicalPath>,
97 #[prost(enumeration = "FileState", tag = "3")]
98 pub state: i32,
99 #[prost(message, optional, tag = "4")]
100 pub created: ::core::option::Option<Attribution>,
101 #[prost(uint64, tag = "5")]
102 pub size_bytes: u64,
103 #[prost(message, optional, tag = "6")]
104 pub observed: ::core::option::Option<Attribution>,
105 #[prost(message, optional, tag = "7")]
106 pub current_revision: ::core::option::Option<FileRevisionRef>,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct LogicalFileIdentity {
110 #[prost(oneof = "logical_file_identity::Identity", tags = "1, 2")]
111 pub identity: ::core::option::Option<logical_file_identity::Identity>,
112}
113pub mod logical_file_identity {
115 #[derive(Clone, PartialEq, ::prost::Oneof)]
116 pub enum Identity {
117 #[prost(message, tag = "1")]
118 Managed(super::ManagedFileIdentity),
119 #[prost(message, tag = "2")]
120 Virtual(super::VirtualFileIdentity),
121 }
122}
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct ManagedFileIdentity {
125 #[prost(string, tag = "1")]
126 pub file_rid: ::prost::alloc::string::String,
127}
128#[derive(Clone, PartialEq, ::prost::Message)]
129pub struct VirtualFileIdentity {
130 #[prost(oneof = "virtual_file_identity::Kind", tags = "1, 2")]
131 pub kind: ::core::option::Option<virtual_file_identity::Kind>,
132}
133pub mod virtual_file_identity {
135 #[derive(Clone, PartialEq, ::prost::Oneof)]
136 pub enum Kind {
137 #[prost(message, tag = "1")]
138 S3(super::S3FileIdentity),
139 #[prost(message, tag = "2")]
140 GoogleDrive(super::GoogleDriveFileIdentity),
141 }
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct S3FileIdentity {
145 #[prost(string, tag = "1")]
146 pub drive_rid: ::prost::alloc::string::String,
147 #[prost(string, tag = "2")]
148 pub path: ::prost::alloc::string::String,
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct GoogleDriveFileIdentity {
152 #[prost(string, tag = "1")]
153 pub drive_rid: ::prost::alloc::string::String,
154 #[prost(string, tag = "2")]
155 pub file_id: ::prost::alloc::string::String,
156}
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct FileRevisionRef {
159 #[prost(oneof = "file_revision_ref::Reference", tags = "1, 2")]
160 pub reference: ::core::option::Option<file_revision_ref::Reference>,
161}
162pub mod file_revision_ref {
164 #[derive(Clone, PartialEq, ::prost::Oneof)]
165 pub enum Reference {
166 #[prost(message, tag = "1")]
167 Managed(super::ManagedFileRevisionRef),
168 #[prost(message, tag = "2")]
169 Virtual(super::VirtualFileRevisionRef),
170 }
171}
172#[derive(Clone, PartialEq, ::prost::Message)]
173pub struct ManagedFileRevisionRef {
174 #[prost(string, tag = "1")]
175 pub file_revision_rid: ::prost::alloc::string::String,
176}
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct VirtualFileRevisionRef {
179 #[prost(oneof = "virtual_file_revision_ref::Kind", tags = "1, 2")]
180 pub kind: ::core::option::Option<virtual_file_revision_ref::Kind>,
181}
182pub mod virtual_file_revision_ref {
184 #[derive(Clone, PartialEq, ::prost::Oneof)]
185 pub enum Kind {
186 #[prost(message, tag = "1")]
187 S3(super::S3FileRevisionRef),
188 #[prost(message, tag = "2")]
189 GoogleDrive(super::GoogleDriveFileRevisionRef),
190 }
191}
192#[derive(Clone, PartialEq, ::prost::Message)]
193pub struct S3FileRevisionRef {
194 #[prost(string, tag = "1")]
195 pub drive_rid: ::prost::alloc::string::String,
196 #[prost(string, tag = "2")]
197 pub path: ::prost::alloc::string::String,
198 #[prost(string, tag = "3")]
199 pub etag: ::prost::alloc::string::String,
200}
201#[derive(Clone, PartialEq, ::prost::Message)]
202pub struct GoogleDriveFileRevisionRef {
203 #[prost(string, tag = "1")]
204 pub drive_rid: ::prost::alloc::string::String,
205 #[prost(string, tag = "2")]
206 pub file_id: ::prost::alloc::string::String,
207 #[prost(string, tag = "3")]
208 pub version: ::prost::alloc::string::String,
209}
210#[derive(Clone, PartialEq, ::prost::Message)]
211pub struct ManagedFileRevision {
212 #[prost(string, tag = "1")]
213 pub file_revision_rid: ::prost::alloc::string::String,
214 #[prost(string, tag = "2")]
215 pub file_rid: ::prost::alloc::string::String,
216 #[prost(message, optional, tag = "3")]
217 pub path: ::core::option::Option<LogicalPath>,
218 #[prost(uint64, tag = "4")]
219 pub size_bytes: u64,
220 #[prost(message, optional, tag = "5")]
221 pub created: ::core::option::Option<Attribution>,
222 #[prost(enumeration = "FileState", tag = "6")]
223 pub state: i32,
224}
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct VirtualFileRevision {
227 #[prost(string, tag = "1")]
228 pub file_revision_rid: ::prost::alloc::string::String,
229 #[prost(message, optional, tag = "2")]
230 pub file_identity: ::core::option::Option<VirtualFileIdentity>,
231 #[prost(message, optional, tag = "3")]
232 pub path: ::core::option::Option<LogicalPath>,
233 #[prost(uint64, tag = "4")]
234 pub size_bytes: u64,
235 #[prost(message, optional, tag = "5")]
236 pub observed: ::core::option::Option<Attribution>,
237}
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct Directory {
240 #[prost(message, optional, tag = "1")]
241 pub path: ::core::option::Option<LogicalPath>,
242}
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct FileEntry {
245 #[prost(oneof = "file_entry::Entry", tags = "1, 2")]
246 pub entry: ::core::option::Option<file_entry::Entry>,
247}
248pub mod file_entry {
250 #[derive(Clone, PartialEq, ::prost::Oneof)]
251 pub enum Entry {
252 #[prost(message, tag = "1")]
253 File(super::LogicalFile),
254 #[prost(message, tag = "2")]
255 Directory(super::Directory),
256 }
257}
258#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
259#[repr(i32)]
260pub enum DriveState {
261 Unspecified = 0,
262 Active = 1,
263 Archived = 2,
264}
265impl DriveState {
266 pub fn as_str_name(&self) -> &'static str {
271 match self {
272 Self::Unspecified => "DRIVE_STATE_UNSPECIFIED",
273 Self::Active => "DRIVE_STATE_ACTIVE",
274 Self::Archived => "DRIVE_STATE_ARCHIVED",
275 }
276 }
277 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
279 match value {
280 "DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
281 "DRIVE_STATE_ACTIVE" => Some(Self::Active),
282 "DRIVE_STATE_ARCHIVED" => Some(Self::Archived),
283 _ => None,
284 }
285 }
286}
287#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
288#[repr(i32)]
289pub enum DriveSource {
290 Unspecified = 0,
291 Nominal = 1,
292 S3 = 2,
293 GoogleDrive = 3,
294}
295impl DriveSource {
296 pub fn as_str_name(&self) -> &'static str {
301 match self {
302 Self::Unspecified => "DRIVE_SOURCE_UNSPECIFIED",
303 Self::Nominal => "DRIVE_SOURCE_NOMINAL",
304 Self::S3 => "DRIVE_SOURCE_S3",
305 Self::GoogleDrive => "DRIVE_SOURCE_GOOGLE_DRIVE",
306 }
307 }
308 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
310 match value {
311 "DRIVE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
312 "DRIVE_SOURCE_NOMINAL" => Some(Self::Nominal),
313 "DRIVE_SOURCE_S3" => Some(Self::S3),
314 "DRIVE_SOURCE_GOOGLE_DRIVE" => Some(Self::GoogleDrive),
315 _ => None,
316 }
317 }
318}
319#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
320#[repr(i32)]
321pub enum DriveMutability {
322 Unspecified = 0,
323 Writable = 1,
324 ReadOnly = 2,
325}
326impl DriveMutability {
327 pub fn as_str_name(&self) -> &'static str {
332 match self {
333 Self::Unspecified => "DRIVE_MUTABILITY_UNSPECIFIED",
334 Self::Writable => "DRIVE_MUTABILITY_WRITABLE",
335 Self::ReadOnly => "DRIVE_MUTABILITY_READ_ONLY",
336 }
337 }
338 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
340 match value {
341 "DRIVE_MUTABILITY_UNSPECIFIED" => Some(Self::Unspecified),
342 "DRIVE_MUTABILITY_WRITABLE" => Some(Self::Writable),
343 "DRIVE_MUTABILITY_READ_ONLY" => Some(Self::ReadOnly),
344 _ => None,
345 }
346 }
347}
348#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
349#[repr(i32)]
350pub enum VirtualDriveState {
351 Unspecified = 0,
352 Active = 1,
353 AuthError = 2,
354 Unreachable = 3,
355 InvalidConfiguration = 4,
356}
357impl VirtualDriveState {
358 pub fn as_str_name(&self) -> &'static str {
363 match self {
364 Self::Unspecified => "VIRTUAL_DRIVE_STATE_UNSPECIFIED",
365 Self::Active => "VIRTUAL_DRIVE_STATE_ACTIVE",
366 Self::AuthError => "VIRTUAL_DRIVE_STATE_AUTH_ERROR",
367 Self::Unreachable => "VIRTUAL_DRIVE_STATE_UNREACHABLE",
368 Self::InvalidConfiguration => "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION",
369 }
370 }
371 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
373 match value {
374 "VIRTUAL_DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
375 "VIRTUAL_DRIVE_STATE_ACTIVE" => Some(Self::Active),
376 "VIRTUAL_DRIVE_STATE_AUTH_ERROR" => Some(Self::AuthError),
377 "VIRTUAL_DRIVE_STATE_UNREACHABLE" => Some(Self::Unreachable),
378 "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION" => {
379 Some(Self::InvalidConfiguration)
380 }
381 _ => None,
382 }
383 }
384}
385#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
386#[repr(i32)]
387pub enum FileState {
388 Unspecified = 0,
389 Active = 1,
390 Removed = 2,
391}
392impl FileState {
393 pub fn as_str_name(&self) -> &'static str {
398 match self {
399 Self::Unspecified => "FILE_STATE_UNSPECIFIED",
400 Self::Active => "FILE_STATE_ACTIVE",
401 Self::Removed => "FILE_STATE_REMOVED",
402 }
403 }
404 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
406 match value {
407 "FILE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
408 "FILE_STATE_ACTIVE" => Some(Self::Active),
409 "FILE_STATE_REMOVED" => Some(Self::Removed),
410 _ => None,
411 }
412 }
413}
414#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
415#[repr(i32)]
416pub enum FileStoreError {
417 Unspecified = 0,
418 DriveNotFound = 1,
419 FileNotFound = 2,
420 FileRevisionNotFound = 3,
421 PathAlreadyExists = 4,
422 InvalidLogicalPath = 5,
423 PermissionDenied = 6,
424 RevisionPreconditionFailed = 7,
425 VirtualDriveNotFound = 8,
426 InvalidVirtualDriveConfiguration = 9,
427 ReadOnlyDrive = 10,
428 FileHistoryNotAvailable = 11,
429 UpstreamUnavailable = 12,
430 RevisionBytesReclaimed = 13,
431 UpstreamFileNotFound = 14,
432 DriveIdAlreadyExists = 15,
433 VirtualDriveCredentialsNotFound = 16,
434 VirtualDriveCredentialsInvalid = 17,
435 VirtualDriveCredentialsRejected = 18,
436 MaterializationFailed = 19,
437 IngestRuleNotFound = 20,
438 UploadedObjectNotFound = 21,
439 InvalidObjectKey = 22,
440 InvalidUpstreamState = 23,
441}
442impl FileStoreError {
443 pub fn as_str_name(&self) -> &'static str {
448 match self {
449 Self::Unspecified => "FILE_STORE_ERROR_UNSPECIFIED",
450 Self::DriveNotFound => "FILE_STORE_ERROR_DRIVE_NOT_FOUND",
451 Self::FileNotFound => "FILE_STORE_ERROR_FILE_NOT_FOUND",
452 Self::FileRevisionNotFound => "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND",
453 Self::PathAlreadyExists => "FILE_STORE_ERROR_PATH_ALREADY_EXISTS",
454 Self::InvalidLogicalPath => "FILE_STORE_ERROR_INVALID_LOGICAL_PATH",
455 Self::PermissionDenied => "FILE_STORE_ERROR_PERMISSION_DENIED",
456 Self::RevisionPreconditionFailed => {
457 "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED"
458 }
459 Self::VirtualDriveNotFound => "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND",
460 Self::InvalidVirtualDriveConfiguration => {
461 "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION"
462 }
463 Self::ReadOnlyDrive => "FILE_STORE_ERROR_READ_ONLY_DRIVE",
464 Self::FileHistoryNotAvailable => {
465 "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE"
466 }
467 Self::UpstreamUnavailable => "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE",
468 Self::RevisionBytesReclaimed => "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED",
469 Self::UpstreamFileNotFound => "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND",
470 Self::DriveIdAlreadyExists => "FILE_STORE_ERROR_DRIVE_ID_ALREADY_EXISTS",
471 Self::VirtualDriveCredentialsNotFound => {
472 "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_NOT_FOUND"
473 }
474 Self::VirtualDriveCredentialsInvalid => {
475 "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_INVALID"
476 }
477 Self::VirtualDriveCredentialsRejected => {
478 "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_REJECTED"
479 }
480 Self::MaterializationFailed => "FILE_STORE_ERROR_MATERIALIZATION_FAILED",
481 Self::IngestRuleNotFound => "FILE_STORE_ERROR_INGEST_RULE_NOT_FOUND",
482 Self::UploadedObjectNotFound => "FILE_STORE_ERROR_UPLOADED_OBJECT_NOT_FOUND",
483 Self::InvalidObjectKey => "FILE_STORE_ERROR_INVALID_OBJECT_KEY",
484 Self::InvalidUpstreamState => "FILE_STORE_ERROR_INVALID_UPSTREAM_STATE",
485 }
486 }
487 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
489 match value {
490 "FILE_STORE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
491 "FILE_STORE_ERROR_DRIVE_NOT_FOUND" => Some(Self::DriveNotFound),
492 "FILE_STORE_ERROR_FILE_NOT_FOUND" => Some(Self::FileNotFound),
493 "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND" => {
494 Some(Self::FileRevisionNotFound)
495 }
496 "FILE_STORE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
497 "FILE_STORE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
498 "FILE_STORE_ERROR_PERMISSION_DENIED" => Some(Self::PermissionDenied),
499 "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED" => {
500 Some(Self::RevisionPreconditionFailed)
501 }
502 "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND" => {
503 Some(Self::VirtualDriveNotFound)
504 }
505 "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION" => {
506 Some(Self::InvalidVirtualDriveConfiguration)
507 }
508 "FILE_STORE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
509 "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE" => {
510 Some(Self::FileHistoryNotAvailable)
511 }
512 "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE" => Some(Self::UpstreamUnavailable),
513 "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED" => {
514 Some(Self::RevisionBytesReclaimed)
515 }
516 "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND" => {
517 Some(Self::UpstreamFileNotFound)
518 }
519 "FILE_STORE_ERROR_DRIVE_ID_ALREADY_EXISTS" => {
520 Some(Self::DriveIdAlreadyExists)
521 }
522 "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_NOT_FOUND" => {
523 Some(Self::VirtualDriveCredentialsNotFound)
524 }
525 "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_INVALID" => {
526 Some(Self::VirtualDriveCredentialsInvalid)
527 }
528 "FILE_STORE_ERROR_VIRTUAL_DRIVE_CREDENTIALS_REJECTED" => {
529 Some(Self::VirtualDriveCredentialsRejected)
530 }
531 "FILE_STORE_ERROR_MATERIALIZATION_FAILED" => {
532 Some(Self::MaterializationFailed)
533 }
534 "FILE_STORE_ERROR_INGEST_RULE_NOT_FOUND" => Some(Self::IngestRuleNotFound),
535 "FILE_STORE_ERROR_UPLOADED_OBJECT_NOT_FOUND" => {
536 Some(Self::UploadedObjectNotFound)
537 }
538 "FILE_STORE_ERROR_INVALID_OBJECT_KEY" => Some(Self::InvalidObjectKey),
539 "FILE_STORE_ERROR_INVALID_UPSTREAM_STATE" => Some(Self::InvalidUpstreamState),
540 _ => None,
541 }
542 }
543}
544#[derive(Clone, PartialEq, ::prost::Message)]
545pub struct CreateDriveRequest {
546 #[prost(string, tag = "1")]
547 pub workspace_rid: ::prost::alloc::string::String,
548 #[prost(string, tag = "2")]
549 pub id: ::prost::alloc::string::String,
550}
551#[derive(Clone, PartialEq, ::prost::Message)]
552pub struct CreateDriveResponse {
553 #[prost(message, optional, tag = "1")]
554 pub drive: ::core::option::Option<Drive>,
555}
556#[derive(Clone, PartialEq, ::prost::Message)]
557pub struct CreateVirtualDriveRequest {
558 #[prost(string, tag = "1")]
559 pub workspace_rid: ::prost::alloc::string::String,
560 #[prost(string, tag = "2")]
561 pub id: ::prost::alloc::string::String,
562 #[prost(message, optional, tag = "3")]
563 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
564}
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct CreateVirtualDriveResponse {
567 #[prost(message, optional, tag = "1")]
568 pub drive: ::core::option::Option<Drive>,
569 #[prost(message, optional, tag = "2")]
570 pub virtual_drive: ::core::option::Option<VirtualDrive>,
571}
572#[derive(Clone, PartialEq, ::prost::Message)]
573pub struct GetDriveRequest {
574 #[prost(string, tag = "1")]
575 pub drive_rid: ::prost::alloc::string::String,
576}
577#[derive(Clone, PartialEq, ::prost::Message)]
578pub struct GetDriveResponse {
579 #[prost(message, optional, tag = "1")]
580 pub drive: ::core::option::Option<Drive>,
581}
582#[derive(Clone, PartialEq, ::prost::Message)]
583pub struct GetVirtualDriveDetailsRequest {
584 #[prost(string, tag = "1")]
585 pub drive_rid: ::prost::alloc::string::String,
586}
587#[derive(Clone, PartialEq, ::prost::Message)]
588pub struct GetVirtualDriveDetailsResponse {
589 #[prost(message, optional, tag = "1")]
590 pub drive: ::core::option::Option<Drive>,
591 #[prost(message, optional, tag = "2")]
592 pub virtual_drive_details: ::core::option::Option<VirtualDriveDetails>,
593}
594#[derive(Clone, PartialEq, ::prost::Message)]
595pub struct GetVirtualDriveStatusRequest {
596 #[prost(string, tag = "1")]
597 pub drive_rid: ::prost::alloc::string::String,
598}
599#[derive(Clone, PartialEq, ::prost::Message)]
600pub struct GetVirtualDriveStatusResponse {
601 #[prost(message, optional, tag = "1")]
602 pub status: ::core::option::Option<VirtualDriveStatus>,
603}
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct GetDriveByIdRequest {
606 #[prost(string, tag = "1")]
607 pub workspace_rid: ::prost::alloc::string::String,
608 #[prost(string, tag = "2")]
609 pub id: ::prost::alloc::string::String,
610}
611#[derive(Clone, PartialEq, ::prost::Message)]
612pub struct GetDriveByIdResponse {
613 #[prost(message, optional, tag = "1")]
614 pub drive: ::core::option::Option<Drive>,
615}
616#[derive(Clone, PartialEq, ::prost::Message)]
617pub struct GetVirtualDriveDetailsByIdRequest {
618 #[prost(string, tag = "1")]
619 pub workspace_rid: ::prost::alloc::string::String,
620 #[prost(string, tag = "2")]
621 pub id: ::prost::alloc::string::String,
622}
623#[derive(Clone, PartialEq, ::prost::Message)]
624pub struct GetVirtualDriveDetailsByIdResponse {
625 #[prost(message, optional, tag = "1")]
626 pub drive: ::core::option::Option<Drive>,
627 #[prost(message, optional, tag = "2")]
628 pub virtual_drive_details: ::core::option::Option<VirtualDriveDetails>,
629}
630#[derive(Clone, PartialEq, ::prost::Message)]
631pub struct GetVirtualDriveStatusByIdRequest {
632 #[prost(string, tag = "1")]
633 pub workspace_rid: ::prost::alloc::string::String,
634 #[prost(string, tag = "2")]
635 pub id: ::prost::alloc::string::String,
636}
637#[derive(Clone, PartialEq, ::prost::Message)]
638pub struct GetVirtualDriveStatusByIdResponse {
639 #[prost(message, optional, tag = "1")]
640 pub status: ::core::option::Option<VirtualDriveStatus>,
641}
642#[derive(Clone, PartialEq, ::prost::Message)]
643pub struct ListDrivesRequest {
644 #[prost(string, tag = "1")]
645 pub workspace_rid: ::prost::alloc::string::String,
646 #[prost(bool, tag = "2")]
647 pub include_archived: bool,
648 #[prost(int32, optional, tag = "3")]
649 pub page_size: ::core::option::Option<i32>,
650 #[prost(string, optional, tag = "4")]
651 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
652}
653#[derive(Clone, PartialEq, ::prost::Message)]
654pub struct ListDrivesResponse {
655 #[prost(message, repeated, tag = "1")]
656 pub drives: ::prost::alloc::vec::Vec<Drive>,
657 #[prost(string, optional, tag = "2")]
658 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
659}
660#[derive(Clone, PartialEq, ::prost::Message)]
661pub struct UpdateVirtualDriveRequest {
662 #[prost(string, tag = "1")]
663 pub drive_rid: ::prost::alloc::string::String,
664 #[prost(message, optional, tag = "2")]
665 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
666}
667#[derive(Clone, PartialEq, ::prost::Message)]
668pub struct UpdateVirtualDriveResponse {
669 #[prost(message, optional, tag = "1")]
670 pub drive: ::core::option::Option<Drive>,
671 #[prost(message, optional, tag = "2")]
672 pub virtual_drive: ::core::option::Option<VirtualDrive>,
673}
674#[derive(Clone, PartialEq, ::prost::Message)]
675pub struct UpdateDriveDetailsRequest {
676 #[prost(string, tag = "1")]
677 pub drive_rid: ::prost::alloc::string::String,
678 #[prost(string, optional, tag = "2")]
679 pub id: ::core::option::Option<::prost::alloc::string::String>,
680}
681#[derive(Clone, PartialEq, ::prost::Message)]
682pub struct UpdateDriveDetailsResponse {
683 #[prost(message, optional, tag = "1")]
684 pub drive: ::core::option::Option<Drive>,
685}
686#[derive(Clone, PartialEq, ::prost::Message)]
687pub struct ArchiveDriveRequest {
688 #[prost(string, tag = "1")]
689 pub drive_rid: ::prost::alloc::string::String,
690}
691#[derive(Clone, PartialEq, ::prost::Message)]
692pub struct ArchiveDriveResponse {
693 #[prost(message, optional, tag = "1")]
694 pub drive: ::core::option::Option<Drive>,
695}
696#[derive(Clone, PartialEq, ::prost::Message)]
697pub struct UnarchiveDriveRequest {
698 #[prost(string, tag = "1")]
699 pub drive_rid: ::prost::alloc::string::String,
700}
701#[derive(Clone, PartialEq, ::prost::Message)]
702pub struct UnarchiveDriveResponse {
703 #[prost(message, optional, tag = "1")]
704 pub drive: ::core::option::Option<Drive>,
705}
706pub mod drives_service_client {
708 #![allow(
709 unused_variables,
710 dead_code,
711 missing_docs,
712 clippy::wildcard_imports,
713 clippy::let_unit_value,
714 )]
715 use tonic::codegen::*;
716 use tonic::codegen::http::Uri;
717 #[derive(Debug, Clone)]
718 pub struct DrivesServiceClient<T> {
719 inner: tonic::client::Grpc<T>,
720 }
721 impl DrivesServiceClient<tonic::transport::Channel> {
722 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
724 where
725 D: TryInto<tonic::transport::Endpoint>,
726 D::Error: Into<StdError>,
727 {
728 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
729 Ok(Self::new(conn))
730 }
731 }
732 impl<T> DrivesServiceClient<T>
733 where
734 T: tonic::client::GrpcService<tonic::body::Body>,
735 T::Error: Into<StdError>,
736 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
737 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
738 {
739 pub fn new(inner: T) -> Self {
740 let inner = tonic::client::Grpc::new(inner);
741 Self { inner }
742 }
743 pub fn with_origin(inner: T, origin: Uri) -> Self {
744 let inner = tonic::client::Grpc::with_origin(inner, origin);
745 Self { inner }
746 }
747 pub fn with_interceptor<F>(
748 inner: T,
749 interceptor: F,
750 ) -> DrivesServiceClient<InterceptedService<T, F>>
751 where
752 F: tonic::service::Interceptor,
753 T::ResponseBody: Default,
754 T: tonic::codegen::Service<
755 http::Request<tonic::body::Body>,
756 Response = http::Response<
757 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
758 >,
759 >,
760 <T as tonic::codegen::Service<
761 http::Request<tonic::body::Body>,
762 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
763 {
764 DrivesServiceClient::new(InterceptedService::new(inner, interceptor))
765 }
766 #[must_use]
771 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
772 self.inner = self.inner.send_compressed(encoding);
773 self
774 }
775 #[must_use]
777 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
778 self.inner = self.inner.accept_compressed(encoding);
779 self
780 }
781 #[must_use]
785 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
786 self.inner = self.inner.max_decoding_message_size(limit);
787 self
788 }
789 #[must_use]
793 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
794 self.inner = self.inner.max_encoding_message_size(limit);
795 self
796 }
797 pub async fn create_drive(
798 &mut self,
799 request: impl tonic::IntoRequest<super::CreateDriveRequest>,
800 ) -> std::result::Result<
801 tonic::Response<super::CreateDriveResponse>,
802 tonic::Status,
803 > {
804 self.inner
805 .ready()
806 .await
807 .map_err(|e| {
808 tonic::Status::unknown(
809 format!("Service was not ready: {}", e.into()),
810 )
811 })?;
812 let codec = tonic::codec::ProstCodec::default();
813 let path = http::uri::PathAndQuery::from_static(
814 "/nominal.file_store.v1.DrivesService/CreateDrive",
815 );
816 let mut req = request.into_request();
817 req.extensions_mut()
818 .insert(
819 GrpcMethod::new("nominal.file_store.v1.DrivesService", "CreateDrive"),
820 );
821 self.inner.unary(req, path, codec).await
822 }
823 pub async fn create_virtual_drive(
824 &mut self,
825 request: impl tonic::IntoRequest<super::CreateVirtualDriveRequest>,
826 ) -> std::result::Result<
827 tonic::Response<super::CreateVirtualDriveResponse>,
828 tonic::Status,
829 > {
830 self.inner
831 .ready()
832 .await
833 .map_err(|e| {
834 tonic::Status::unknown(
835 format!("Service was not ready: {}", e.into()),
836 )
837 })?;
838 let codec = tonic::codec::ProstCodec::default();
839 let path = http::uri::PathAndQuery::from_static(
840 "/nominal.file_store.v1.DrivesService/CreateVirtualDrive",
841 );
842 let mut req = request.into_request();
843 req.extensions_mut()
844 .insert(
845 GrpcMethod::new(
846 "nominal.file_store.v1.DrivesService",
847 "CreateVirtualDrive",
848 ),
849 );
850 self.inner.unary(req, path, codec).await
851 }
852 pub async fn get_drive(
853 &mut self,
854 request: impl tonic::IntoRequest<super::GetDriveRequest>,
855 ) -> std::result::Result<
856 tonic::Response<super::GetDriveResponse>,
857 tonic::Status,
858 > {
859 self.inner
860 .ready()
861 .await
862 .map_err(|e| {
863 tonic::Status::unknown(
864 format!("Service was not ready: {}", e.into()),
865 )
866 })?;
867 let codec = tonic::codec::ProstCodec::default();
868 let path = http::uri::PathAndQuery::from_static(
869 "/nominal.file_store.v1.DrivesService/GetDrive",
870 );
871 let mut req = request.into_request();
872 req.extensions_mut()
873 .insert(
874 GrpcMethod::new("nominal.file_store.v1.DrivesService", "GetDrive"),
875 );
876 self.inner.unary(req, path, codec).await
877 }
878 pub async fn get_virtual_drive_details(
879 &mut self,
880 request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsRequest>,
881 ) -> std::result::Result<
882 tonic::Response<super::GetVirtualDriveDetailsResponse>,
883 tonic::Status,
884 > {
885 self.inner
886 .ready()
887 .await
888 .map_err(|e| {
889 tonic::Status::unknown(
890 format!("Service was not ready: {}", e.into()),
891 )
892 })?;
893 let codec = tonic::codec::ProstCodec::default();
894 let path = http::uri::PathAndQuery::from_static(
895 "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetails",
896 );
897 let mut req = request.into_request();
898 req.extensions_mut()
899 .insert(
900 GrpcMethod::new(
901 "nominal.file_store.v1.DrivesService",
902 "GetVirtualDriveDetails",
903 ),
904 );
905 self.inner.unary(req, path, codec).await
906 }
907 pub async fn get_virtual_drive_status(
908 &mut self,
909 request: impl tonic::IntoRequest<super::GetVirtualDriveStatusRequest>,
910 ) -> std::result::Result<
911 tonic::Response<super::GetVirtualDriveStatusResponse>,
912 tonic::Status,
913 > {
914 self.inner
915 .ready()
916 .await
917 .map_err(|e| {
918 tonic::Status::unknown(
919 format!("Service was not ready: {}", e.into()),
920 )
921 })?;
922 let codec = tonic::codec::ProstCodec::default();
923 let path = http::uri::PathAndQuery::from_static(
924 "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatus",
925 );
926 let mut req = request.into_request();
927 req.extensions_mut()
928 .insert(
929 GrpcMethod::new(
930 "nominal.file_store.v1.DrivesService",
931 "GetVirtualDriveStatus",
932 ),
933 );
934 self.inner.unary(req, path, codec).await
935 }
936 pub async fn get_drive_by_id(
937 &mut self,
938 request: impl tonic::IntoRequest<super::GetDriveByIdRequest>,
939 ) -> std::result::Result<
940 tonic::Response<super::GetDriveByIdResponse>,
941 tonic::Status,
942 > {
943 self.inner
944 .ready()
945 .await
946 .map_err(|e| {
947 tonic::Status::unknown(
948 format!("Service was not ready: {}", e.into()),
949 )
950 })?;
951 let codec = tonic::codec::ProstCodec::default();
952 let path = http::uri::PathAndQuery::from_static(
953 "/nominal.file_store.v1.DrivesService/GetDriveById",
954 );
955 let mut req = request.into_request();
956 req.extensions_mut()
957 .insert(
958 GrpcMethod::new(
959 "nominal.file_store.v1.DrivesService",
960 "GetDriveById",
961 ),
962 );
963 self.inner.unary(req, path, codec).await
964 }
965 pub async fn get_virtual_drive_details_by_id(
966 &mut self,
967 request: impl tonic::IntoRequest<super::GetVirtualDriveDetailsByIdRequest>,
968 ) -> std::result::Result<
969 tonic::Response<super::GetVirtualDriveDetailsByIdResponse>,
970 tonic::Status,
971 > {
972 self.inner
973 .ready()
974 .await
975 .map_err(|e| {
976 tonic::Status::unknown(
977 format!("Service was not ready: {}", e.into()),
978 )
979 })?;
980 let codec = tonic::codec::ProstCodec::default();
981 let path = http::uri::PathAndQuery::from_static(
982 "/nominal.file_store.v1.DrivesService/GetVirtualDriveDetailsById",
983 );
984 let mut req = request.into_request();
985 req.extensions_mut()
986 .insert(
987 GrpcMethod::new(
988 "nominal.file_store.v1.DrivesService",
989 "GetVirtualDriveDetailsById",
990 ),
991 );
992 self.inner.unary(req, path, codec).await
993 }
994 pub async fn get_virtual_drive_status_by_id(
995 &mut self,
996 request: impl tonic::IntoRequest<super::GetVirtualDriveStatusByIdRequest>,
997 ) -> std::result::Result<
998 tonic::Response<super::GetVirtualDriveStatusByIdResponse>,
999 tonic::Status,
1000 > {
1001 self.inner
1002 .ready()
1003 .await
1004 .map_err(|e| {
1005 tonic::Status::unknown(
1006 format!("Service was not ready: {}", e.into()),
1007 )
1008 })?;
1009 let codec = tonic::codec::ProstCodec::default();
1010 let path = http::uri::PathAndQuery::from_static(
1011 "/nominal.file_store.v1.DrivesService/GetVirtualDriveStatusById",
1012 );
1013 let mut req = request.into_request();
1014 req.extensions_mut()
1015 .insert(
1016 GrpcMethod::new(
1017 "nominal.file_store.v1.DrivesService",
1018 "GetVirtualDriveStatusById",
1019 ),
1020 );
1021 self.inner.unary(req, path, codec).await
1022 }
1023 pub async fn list_drives(
1024 &mut self,
1025 request: impl tonic::IntoRequest<super::ListDrivesRequest>,
1026 ) -> std::result::Result<
1027 tonic::Response<super::ListDrivesResponse>,
1028 tonic::Status,
1029 > {
1030 self.inner
1031 .ready()
1032 .await
1033 .map_err(|e| {
1034 tonic::Status::unknown(
1035 format!("Service was not ready: {}", e.into()),
1036 )
1037 })?;
1038 let codec = tonic::codec::ProstCodec::default();
1039 let path = http::uri::PathAndQuery::from_static(
1040 "/nominal.file_store.v1.DrivesService/ListDrives",
1041 );
1042 let mut req = request.into_request();
1043 req.extensions_mut()
1044 .insert(
1045 GrpcMethod::new("nominal.file_store.v1.DrivesService", "ListDrives"),
1046 );
1047 self.inner.unary(req, path, codec).await
1048 }
1049 pub async fn update_virtual_drive(
1050 &mut self,
1051 request: impl tonic::IntoRequest<super::UpdateVirtualDriveRequest>,
1052 ) -> std::result::Result<
1053 tonic::Response<super::UpdateVirtualDriveResponse>,
1054 tonic::Status,
1055 > {
1056 self.inner
1057 .ready()
1058 .await
1059 .map_err(|e| {
1060 tonic::Status::unknown(
1061 format!("Service was not ready: {}", e.into()),
1062 )
1063 })?;
1064 let codec = tonic::codec::ProstCodec::default();
1065 let path = http::uri::PathAndQuery::from_static(
1066 "/nominal.file_store.v1.DrivesService/UpdateVirtualDrive",
1067 );
1068 let mut req = request.into_request();
1069 req.extensions_mut()
1070 .insert(
1071 GrpcMethod::new(
1072 "nominal.file_store.v1.DrivesService",
1073 "UpdateVirtualDrive",
1074 ),
1075 );
1076 self.inner.unary(req, path, codec).await
1077 }
1078 pub async fn update_drive_details(
1079 &mut self,
1080 request: impl tonic::IntoRequest<super::UpdateDriveDetailsRequest>,
1081 ) -> std::result::Result<
1082 tonic::Response<super::UpdateDriveDetailsResponse>,
1083 tonic::Status,
1084 > {
1085 self.inner
1086 .ready()
1087 .await
1088 .map_err(|e| {
1089 tonic::Status::unknown(
1090 format!("Service was not ready: {}", e.into()),
1091 )
1092 })?;
1093 let codec = tonic::codec::ProstCodec::default();
1094 let path = http::uri::PathAndQuery::from_static(
1095 "/nominal.file_store.v1.DrivesService/UpdateDriveDetails",
1096 );
1097 let mut req = request.into_request();
1098 req.extensions_mut()
1099 .insert(
1100 GrpcMethod::new(
1101 "nominal.file_store.v1.DrivesService",
1102 "UpdateDriveDetails",
1103 ),
1104 );
1105 self.inner.unary(req, path, codec).await
1106 }
1107 pub async fn archive_drive(
1108 &mut self,
1109 request: impl tonic::IntoRequest<super::ArchiveDriveRequest>,
1110 ) -> std::result::Result<
1111 tonic::Response<super::ArchiveDriveResponse>,
1112 tonic::Status,
1113 > {
1114 self.inner
1115 .ready()
1116 .await
1117 .map_err(|e| {
1118 tonic::Status::unknown(
1119 format!("Service was not ready: {}", e.into()),
1120 )
1121 })?;
1122 let codec = tonic::codec::ProstCodec::default();
1123 let path = http::uri::PathAndQuery::from_static(
1124 "/nominal.file_store.v1.DrivesService/ArchiveDrive",
1125 );
1126 let mut req = request.into_request();
1127 req.extensions_mut()
1128 .insert(
1129 GrpcMethod::new(
1130 "nominal.file_store.v1.DrivesService",
1131 "ArchiveDrive",
1132 ),
1133 );
1134 self.inner.unary(req, path, codec).await
1135 }
1136 pub async fn unarchive_drive(
1137 &mut self,
1138 request: impl tonic::IntoRequest<super::UnarchiveDriveRequest>,
1139 ) -> std::result::Result<
1140 tonic::Response<super::UnarchiveDriveResponse>,
1141 tonic::Status,
1142 > {
1143 self.inner
1144 .ready()
1145 .await
1146 .map_err(|e| {
1147 tonic::Status::unknown(
1148 format!("Service was not ready: {}", e.into()),
1149 )
1150 })?;
1151 let codec = tonic::codec::ProstCodec::default();
1152 let path = http::uri::PathAndQuery::from_static(
1153 "/nominal.file_store.v1.DrivesService/UnarchiveDrive",
1154 );
1155 let mut req = request.into_request();
1156 req.extensions_mut()
1157 .insert(
1158 GrpcMethod::new(
1159 "nominal.file_store.v1.DrivesService",
1160 "UnarchiveDrive",
1161 ),
1162 );
1163 self.inner.unary(req, path, codec).await
1164 }
1165 }
1166}
1167#[derive(Clone, PartialEq, ::prost::Message)]
1168pub struct UploadedObjectRef {
1169 #[prost(string, tag = "1")]
1170 pub object_key: ::prost::alloc::string::String,
1171}
1172#[derive(Clone, PartialEq, ::prost::Message)]
1173pub struct PathTarget {
1174 #[prost(message, optional, tag = "1")]
1175 pub path: ::core::option::Option<LogicalPath>,
1176}
1177#[derive(Clone, PartialEq, ::prost::Message)]
1178pub struct Destination {
1179 #[prost(oneof = "destination::Target", tags = "1, 2")]
1180 pub target: ::core::option::Option<destination::Target>,
1181}
1182pub mod destination {
1184 #[derive(Clone, PartialEq, ::prost::Oneof)]
1185 pub enum Target {
1186 #[prost(message, tag = "1")]
1187 Path(super::PathTarget),
1188 #[prost(string, tag = "2")]
1189 FileRevisionRid(::prost::alloc::string::String),
1190 }
1191}
1192#[derive(Clone, PartialEq, ::prost::Message)]
1193pub struct PutFile {
1194 #[prost(message, optional, tag = "1")]
1195 pub object: ::core::option::Option<UploadedObjectRef>,
1196 #[prost(uint64, tag = "2")]
1197 pub size_bytes: u64,
1198 #[prost(message, optional, tag = "3")]
1199 pub destination: ::core::option::Option<Destination>,
1200}
1201#[derive(Clone, PartialEq, ::prost::Message)]
1202pub struct MoveFile {
1203 #[prost(string, tag = "1")]
1204 pub source_revision_rid: ::prost::alloc::string::String,
1205 #[prost(message, optional, tag = "2")]
1206 pub destination: ::core::option::Option<Destination>,
1207}
1208#[derive(Clone, PartialEq, ::prost::Message)]
1209pub struct RemoveFile {
1210 #[prost(string, tag = "1")]
1211 pub revision_rid: ::prost::alloc::string::String,
1212}
1213#[derive(Clone, PartialEq, ::prost::Message)]
1214pub struct RestoreFile {
1215 #[prost(string, tag = "1")]
1216 pub restore_revision_rid: ::prost::alloc::string::String,
1217 #[prost(message, optional, tag = "2")]
1218 pub destination: ::core::option::Option<Destination>,
1219}
1220#[derive(Clone, PartialEq, ::prost::Message)]
1221pub struct FileChange {
1222 #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4")]
1223 pub change: ::core::option::Option<file_change::Change>,
1224}
1225pub mod file_change {
1227 #[derive(Clone, PartialEq, ::prost::Oneof)]
1228 pub enum Change {
1229 #[prost(message, tag = "1")]
1230 Put(super::PutFile),
1231 #[prost(message, tag = "2")]
1232 Move(super::MoveFile),
1233 #[prost(message, tag = "3")]
1234 Remove(super::RemoveFile),
1235 #[prost(message, tag = "4")]
1236 Restore(super::RestoreFile),
1237 }
1238}
1239#[derive(Clone, PartialEq, ::prost::Message)]
1240pub struct GetFileRequest {
1241 #[prost(string, tag = "1")]
1242 pub drive_rid: ::prost::alloc::string::String,
1243 #[prost(message, optional, tag = "2")]
1244 pub path: ::core::option::Option<LogicalPath>,
1245 #[prost(bool, tag = "3")]
1246 pub include_removed: bool,
1247}
1248#[derive(Clone, PartialEq, ::prost::Message)]
1249pub struct GetFileResponse {
1250 #[prost(message, optional, tag = "1")]
1251 pub file: ::core::option::Option<LogicalFile>,
1252}
1253#[derive(Clone, PartialEq, ::prost::Message)]
1254pub struct ResolveFileRevisionRequest {
1255 #[prost(message, optional, tag = "2")]
1256 pub source_ref: ::core::option::Option<FileRevisionRef>,
1257}
1258#[derive(Clone, PartialEq, ::prost::Message)]
1259pub struct ResolveFileRevisionResponse {
1260 #[prost(string, tag = "1")]
1261 pub file_revision_rid: ::prost::alloc::string::String,
1262}
1263#[derive(Clone, PartialEq, ::prost::Message)]
1264pub struct ListFilesRequest {
1265 #[prost(string, tag = "1")]
1266 pub drive_rid: ::prost::alloc::string::String,
1267 #[prost(message, optional, tag = "2")]
1268 pub parent_path: ::core::option::Option<LogicalPath>,
1269 #[prost(bool, tag = "3")]
1270 pub include_removed: bool,
1271 #[prost(int32, optional, tag = "4")]
1272 pub page_size: ::core::option::Option<i32>,
1273 #[prost(string, optional, tag = "5")]
1274 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1275}
1276#[derive(Clone, PartialEq, ::prost::Message)]
1277pub struct ListFilesResponse {
1278 #[prost(message, repeated, tag = "1")]
1279 pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1280 #[prost(string, optional, tag = "2")]
1281 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1282}
1283#[derive(Clone, PartialEq, ::prost::Message)]
1284pub struct ApplyFileChangesRequest {
1285 #[prost(string, tag = "1")]
1286 pub drive_rid: ::prost::alloc::string::String,
1287 #[prost(message, repeated, tag = "2")]
1288 pub changes: ::prost::alloc::vec::Vec<FileChange>,
1289}
1290#[derive(Clone, PartialEq, ::prost::Message)]
1291pub struct ApplyFileChangesResponse {
1292 #[prost(message, repeated, tag = "1")]
1293 pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1294}
1295#[derive(Clone, PartialEq, ::prost::Message)]
1296pub struct FileChangeSuccess {
1297 #[prost(message, optional, tag = "1")]
1298 pub file: ::core::option::Option<LogicalFile>,
1299 #[prost(message, optional, tag = "2")]
1300 pub file_revision: ::core::option::Option<ManagedFileRevision>,
1301}
1302#[derive(Clone, PartialEq, ::prost::Message)]
1303pub struct FileChangeFailure {
1304 #[prost(enumeration = "FileStoreError", tag = "1")]
1305 pub code: i32,
1306 #[prost(string, tag = "2")]
1307 pub message: ::prost::alloc::string::String,
1308}
1309#[derive(Clone, PartialEq, ::prost::Message)]
1310pub struct FileChangeResult {
1311 #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1312 pub result: ::core::option::Option<file_change_result::Result>,
1313}
1314pub mod file_change_result {
1316 #[derive(Clone, PartialEq, ::prost::Oneof)]
1317 pub enum Result {
1318 #[prost(message, tag = "1")]
1319 Success(super::FileChangeSuccess),
1320 #[prost(message, tag = "2")]
1321 Failure(super::FileChangeFailure),
1322 }
1323}
1324#[derive(Clone, PartialEq, ::prost::Message)]
1325pub struct ListFileRevisionsRequest {
1326 #[prost(string, tag = "1")]
1327 pub drive_rid: ::prost::alloc::string::String,
1328 #[prost(string, tag = "2")]
1329 pub file_rid: ::prost::alloc::string::String,
1330 #[prost(int32, optional, tag = "3")]
1331 pub page_size: ::core::option::Option<i32>,
1332 #[prost(string, optional, tag = "4")]
1333 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1334}
1335#[derive(Clone, PartialEq, ::prost::Message)]
1336pub struct ListFileRevisionsResponse {
1337 #[prost(message, repeated, tag = "1")]
1338 pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1339 #[prost(string, optional, tag = "2")]
1340 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1341}
1342#[derive(Clone, PartialEq, ::prost::Message)]
1343pub struct PurgeFileRequest {
1344 #[prost(string, tag = "1")]
1345 pub file_revision_rid: ::prost::alloc::string::String,
1346}
1347#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1348pub struct PurgeFileResponse {}
1349#[derive(Clone, PartialEq, ::prost::Message)]
1350pub struct GetDownloadUrlRequest {
1351 #[prost(string, tag = "1")]
1352 pub file_revision_rid: ::prost::alloc::string::String,
1353}
1354#[derive(Clone, PartialEq, ::prost::Message)]
1355pub struct GetDownloadUrlResponse {
1356 #[prost(string, tag = "1")]
1357 pub url: ::prost::alloc::string::String,
1358}
1359pub mod files_service_client {
1361 #![allow(
1362 unused_variables,
1363 dead_code,
1364 missing_docs,
1365 clippy::wildcard_imports,
1366 clippy::let_unit_value,
1367 )]
1368 use tonic::codegen::*;
1369 use tonic::codegen::http::Uri;
1370 #[derive(Debug, Clone)]
1371 pub struct FilesServiceClient<T> {
1372 inner: tonic::client::Grpc<T>,
1373 }
1374 impl FilesServiceClient<tonic::transport::Channel> {
1375 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1377 where
1378 D: TryInto<tonic::transport::Endpoint>,
1379 D::Error: Into<StdError>,
1380 {
1381 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1382 Ok(Self::new(conn))
1383 }
1384 }
1385 impl<T> FilesServiceClient<T>
1386 where
1387 T: tonic::client::GrpcService<tonic::body::Body>,
1388 T::Error: Into<StdError>,
1389 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1390 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1391 {
1392 pub fn new(inner: T) -> Self {
1393 let inner = tonic::client::Grpc::new(inner);
1394 Self { inner }
1395 }
1396 pub fn with_origin(inner: T, origin: Uri) -> Self {
1397 let inner = tonic::client::Grpc::with_origin(inner, origin);
1398 Self { inner }
1399 }
1400 pub fn with_interceptor<F>(
1401 inner: T,
1402 interceptor: F,
1403 ) -> FilesServiceClient<InterceptedService<T, F>>
1404 where
1405 F: tonic::service::Interceptor,
1406 T::ResponseBody: Default,
1407 T: tonic::codegen::Service<
1408 http::Request<tonic::body::Body>,
1409 Response = http::Response<
1410 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1411 >,
1412 >,
1413 <T as tonic::codegen::Service<
1414 http::Request<tonic::body::Body>,
1415 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1416 {
1417 FilesServiceClient::new(InterceptedService::new(inner, interceptor))
1418 }
1419 #[must_use]
1424 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1425 self.inner = self.inner.send_compressed(encoding);
1426 self
1427 }
1428 #[must_use]
1430 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1431 self.inner = self.inner.accept_compressed(encoding);
1432 self
1433 }
1434 #[must_use]
1438 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1439 self.inner = self.inner.max_decoding_message_size(limit);
1440 self
1441 }
1442 #[must_use]
1446 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1447 self.inner = self.inner.max_encoding_message_size(limit);
1448 self
1449 }
1450 pub async fn get_file(
1451 &mut self,
1452 request: impl tonic::IntoRequest<super::GetFileRequest>,
1453 ) -> std::result::Result<
1454 tonic::Response<super::GetFileResponse>,
1455 tonic::Status,
1456 > {
1457 self.inner
1458 .ready()
1459 .await
1460 .map_err(|e| {
1461 tonic::Status::unknown(
1462 format!("Service was not ready: {}", e.into()),
1463 )
1464 })?;
1465 let codec = tonic::codec::ProstCodec::default();
1466 let path = http::uri::PathAndQuery::from_static(
1467 "/nominal.file_store.v1.FilesService/GetFile",
1468 );
1469 let mut req = request.into_request();
1470 req.extensions_mut()
1471 .insert(
1472 GrpcMethod::new("nominal.file_store.v1.FilesService", "GetFile"),
1473 );
1474 self.inner.unary(req, path, codec).await
1475 }
1476 pub async fn resolve_file_revision(
1477 &mut self,
1478 request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
1479 ) -> std::result::Result<
1480 tonic::Response<super::ResolveFileRevisionResponse>,
1481 tonic::Status,
1482 > {
1483 self.inner
1484 .ready()
1485 .await
1486 .map_err(|e| {
1487 tonic::Status::unknown(
1488 format!("Service was not ready: {}", e.into()),
1489 )
1490 })?;
1491 let codec = tonic::codec::ProstCodec::default();
1492 let path = http::uri::PathAndQuery::from_static(
1493 "/nominal.file_store.v1.FilesService/ResolveFileRevision",
1494 );
1495 let mut req = request.into_request();
1496 req.extensions_mut()
1497 .insert(
1498 GrpcMethod::new(
1499 "nominal.file_store.v1.FilesService",
1500 "ResolveFileRevision",
1501 ),
1502 );
1503 self.inner.unary(req, path, codec).await
1504 }
1505 pub async fn list_files(
1506 &mut self,
1507 request: impl tonic::IntoRequest<super::ListFilesRequest>,
1508 ) -> std::result::Result<
1509 tonic::Response<super::ListFilesResponse>,
1510 tonic::Status,
1511 > {
1512 self.inner
1513 .ready()
1514 .await
1515 .map_err(|e| {
1516 tonic::Status::unknown(
1517 format!("Service was not ready: {}", e.into()),
1518 )
1519 })?;
1520 let codec = tonic::codec::ProstCodec::default();
1521 let path = http::uri::PathAndQuery::from_static(
1522 "/nominal.file_store.v1.FilesService/ListFiles",
1523 );
1524 let mut req = request.into_request();
1525 req.extensions_mut()
1526 .insert(
1527 GrpcMethod::new("nominal.file_store.v1.FilesService", "ListFiles"),
1528 );
1529 self.inner.unary(req, path, codec).await
1530 }
1531 pub async fn apply_file_changes(
1532 &mut self,
1533 request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
1534 ) -> std::result::Result<
1535 tonic::Response<super::ApplyFileChangesResponse>,
1536 tonic::Status,
1537 > {
1538 self.inner
1539 .ready()
1540 .await
1541 .map_err(|e| {
1542 tonic::Status::unknown(
1543 format!("Service was not ready: {}", e.into()),
1544 )
1545 })?;
1546 let codec = tonic::codec::ProstCodec::default();
1547 let path = http::uri::PathAndQuery::from_static(
1548 "/nominal.file_store.v1.FilesService/ApplyFileChanges",
1549 );
1550 let mut req = request.into_request();
1551 req.extensions_mut()
1552 .insert(
1553 GrpcMethod::new(
1554 "nominal.file_store.v1.FilesService",
1555 "ApplyFileChanges",
1556 ),
1557 );
1558 self.inner.unary(req, path, codec).await
1559 }
1560 pub async fn list_file_revisions(
1561 &mut self,
1562 request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
1563 ) -> std::result::Result<
1564 tonic::Response<super::ListFileRevisionsResponse>,
1565 tonic::Status,
1566 > {
1567 self.inner
1568 .ready()
1569 .await
1570 .map_err(|e| {
1571 tonic::Status::unknown(
1572 format!("Service was not ready: {}", e.into()),
1573 )
1574 })?;
1575 let codec = tonic::codec::ProstCodec::default();
1576 let path = http::uri::PathAndQuery::from_static(
1577 "/nominal.file_store.v1.FilesService/ListFileRevisions",
1578 );
1579 let mut req = request.into_request();
1580 req.extensions_mut()
1581 .insert(
1582 GrpcMethod::new(
1583 "nominal.file_store.v1.FilesService",
1584 "ListFileRevisions",
1585 ),
1586 );
1587 self.inner.unary(req, path, codec).await
1588 }
1589 pub async fn purge_file(
1590 &mut self,
1591 request: impl tonic::IntoRequest<super::PurgeFileRequest>,
1592 ) -> std::result::Result<
1593 tonic::Response<super::PurgeFileResponse>,
1594 tonic::Status,
1595 > {
1596 self.inner
1597 .ready()
1598 .await
1599 .map_err(|e| {
1600 tonic::Status::unknown(
1601 format!("Service was not ready: {}", e.into()),
1602 )
1603 })?;
1604 let codec = tonic::codec::ProstCodec::default();
1605 let path = http::uri::PathAndQuery::from_static(
1606 "/nominal.file_store.v1.FilesService/PurgeFile",
1607 );
1608 let mut req = request.into_request();
1609 req.extensions_mut()
1610 .insert(
1611 GrpcMethod::new("nominal.file_store.v1.FilesService", "PurgeFile"),
1612 );
1613 self.inner.unary(req, path, codec).await
1614 }
1615 pub async fn get_download_url(
1616 &mut self,
1617 request: impl tonic::IntoRequest<super::GetDownloadUrlRequest>,
1618 ) -> std::result::Result<
1619 tonic::Response<super::GetDownloadUrlResponse>,
1620 tonic::Status,
1621 > {
1622 self.inner
1623 .ready()
1624 .await
1625 .map_err(|e| {
1626 tonic::Status::unknown(
1627 format!("Service was not ready: {}", e.into()),
1628 )
1629 })?;
1630 let codec = tonic::codec::ProstCodec::default();
1631 let path = http::uri::PathAndQuery::from_static(
1632 "/nominal.file_store.v1.FilesService/GetDownloadUrl",
1633 );
1634 let mut req = request.into_request();
1635 req.extensions_mut()
1636 .insert(
1637 GrpcMethod::new(
1638 "nominal.file_store.v1.FilesService",
1639 "GetDownloadUrl",
1640 ),
1641 );
1642 self.inner.unary(req, path, codec).await
1643 }
1644 }
1645}
1646#[derive(Clone, PartialEq, ::prost::Message)]
1647pub struct CreateIngestRuleRequest {
1648 #[prost(string, tag = "1")]
1649 pub drive_rid: ::prost::alloc::string::String,
1650 #[prost(message, optional, tag = "2")]
1651 pub matcher: ::core::option::Option<FileMatcher>,
1652 #[prost(message, optional, tag = "3")]
1653 pub triggers: ::core::option::Option<IngestTriggers>,
1654 #[prost(enumeration = "BackfillMode", tag = "4")]
1655 pub backfill_mode: i32,
1656}
1657#[derive(Clone, PartialEq, ::prost::Message)]
1658pub struct CreateIngestRuleResponse {
1659 #[prost(message, optional, tag = "1")]
1660 pub rule: ::core::option::Option<IngestRule>,
1661}
1662#[derive(Clone, PartialEq, ::prost::Message)]
1663pub struct ListIngestRulesRequest {
1664 #[prost(string, tag = "1")]
1665 pub drive_rid: ::prost::alloc::string::String,
1666 #[prost(bool, tag = "2")]
1667 pub include_archived: bool,
1668 #[prost(int32, optional, tag = "3")]
1669 pub page_size: ::core::option::Option<i32>,
1670 #[prost(string, optional, tag = "4")]
1671 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1672}
1673#[derive(Clone, PartialEq, ::prost::Message)]
1674pub struct ListIngestRulesResponse {
1675 #[prost(message, repeated, tag = "1")]
1676 pub rules: ::prost::alloc::vec::Vec<IngestRule>,
1677 #[prost(string, optional, tag = "2")]
1678 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1679}
1680#[derive(Clone, PartialEq, ::prost::Message)]
1681pub struct GetIngestRuleRequest {
1682 #[prost(string, tag = "1")]
1683 pub rule_rid: ::prost::alloc::string::String,
1684}
1685#[derive(Clone, PartialEq, ::prost::Message)]
1686pub struct GetIngestRuleResponse {
1687 #[prost(message, optional, tag = "1")]
1688 pub rule: ::core::option::Option<IngestRule>,
1689}
1690#[derive(Clone, PartialEq, ::prost::Message)]
1691pub struct UpdateIngestRuleRequest {
1692 #[prost(string, tag = "1")]
1693 pub rule_rid: ::prost::alloc::string::String,
1694 #[prost(message, optional, tag = "2")]
1695 pub matcher: ::core::option::Option<FileMatcher>,
1696 #[prost(message, optional, tag = "3")]
1697 pub triggers: ::core::option::Option<IngestTriggers>,
1698}
1699#[derive(Clone, PartialEq, ::prost::Message)]
1700pub struct UpdateIngestRuleResponse {
1701 #[prost(message, optional, tag = "1")]
1702 pub rule: ::core::option::Option<IngestRule>,
1703}
1704#[derive(Clone, PartialEq, ::prost::Message)]
1705pub struct ArchiveIngestRuleRequest {
1706 #[prost(string, tag = "1")]
1707 pub rule_rid: ::prost::alloc::string::String,
1708}
1709#[derive(Clone, PartialEq, ::prost::Message)]
1710pub struct ArchiveIngestRuleResponse {
1711 #[prost(message, optional, tag = "1")]
1712 pub rule: ::core::option::Option<IngestRule>,
1713}
1714#[derive(Clone, PartialEq, ::prost::Message)]
1715pub struct UnarchiveIngestRuleRequest {
1716 #[prost(string, tag = "1")]
1717 pub rule_rid: ::prost::alloc::string::String,
1718 #[prost(enumeration = "BackfillMode", tag = "2")]
1719 pub backfill_mode: i32,
1720}
1721#[derive(Clone, PartialEq, ::prost::Message)]
1722pub struct UnarchiveIngestRuleResponse {
1723 #[prost(message, optional, tag = "1")]
1724 pub rule: ::core::option::Option<IngestRule>,
1725}
1726#[derive(Clone, PartialEq, ::prost::Message)]
1727pub struct IngestRule {
1728 #[prost(string, tag = "1")]
1729 pub rule_rid: ::prost::alloc::string::String,
1730 #[prost(string, tag = "2")]
1731 pub drive_rid: ::prost::alloc::string::String,
1732 #[prost(message, optional, tag = "3")]
1733 pub matcher: ::core::option::Option<FileMatcher>,
1734 #[prost(message, optional, tag = "4")]
1735 pub triggers: ::core::option::Option<IngestTriggers>,
1736 #[prost(message, optional, tag = "5")]
1737 pub created: ::core::option::Option<Attribution>,
1738 #[prost(enumeration = "IngestRuleState", tag = "6")]
1739 pub state: i32,
1740 #[prost(message, optional, tag = "7")]
1741 pub archived: ::core::option::Option<Attribution>,
1742 #[prost(message, optional, tag = "8")]
1743 pub updated: ::core::option::Option<Attribution>,
1744}
1745#[derive(Clone, PartialEq, ::prost::Message)]
1746pub struct FileMatcher {
1747 #[prost(oneof = "file_matcher::Matcher", tags = "1")]
1748 pub matcher: ::core::option::Option<file_matcher::Matcher>,
1749}
1750pub mod file_matcher {
1752 #[derive(Clone, PartialEq, ::prost::Oneof)]
1753 pub enum Matcher {
1754 #[prost(message, tag = "1")]
1755 Path(super::PathMatcher),
1756 }
1757}
1758#[derive(Clone, PartialEq, ::prost::Message)]
1759pub struct PathMatcher {
1760 #[prost(message, optional, tag = "1")]
1761 pub pattern: ::core::option::Option<PathPattern>,
1762 #[prost(message, optional, tag = "2")]
1763 pub format: ::core::option::Option<FormatConfig>,
1764}
1765#[derive(Clone, PartialEq, ::prost::Message)]
1766pub struct FormatConfig {
1767 #[prost(oneof = "format_config::Format", tags = "1, 2")]
1768 pub format: ::core::option::Option<format_config::Format>,
1769}
1770pub mod format_config {
1772 #[derive(Clone, PartialEq, ::prost::Oneof)]
1773 pub enum Format {
1774 #[prost(message, tag = "1")]
1775 Csv(super::CsvIngestConfig),
1776 #[prost(message, tag = "2")]
1777 Parquet(super::ParquetIngestConfig),
1778 }
1779}
1780#[derive(Clone, PartialEq, ::prost::Message)]
1781pub struct CsvIngestConfig {
1782 #[prost(message, optional, tag = "1")]
1783 pub timestamp: ::core::option::Option<TimestampConfig>,
1784 #[prost(string, optional, tag = "2")]
1785 pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
1786}
1787#[derive(Clone, PartialEq, ::prost::Message)]
1788pub struct ParquetIngestConfig {
1789 #[prost(message, optional, tag = "1")]
1790 pub timestamp: ::core::option::Option<TimestampConfig>,
1791 #[prost(string, optional, tag = "2")]
1792 pub channel_prefix: ::core::option::Option<::prost::alloc::string::String>,
1793}
1794#[derive(Clone, PartialEq, ::prost::Message)]
1795pub struct TimestampConfig {
1796 #[prost(oneof = "timestamp_config::Kind", tags = "1")]
1797 pub kind: ::core::option::Option<timestamp_config::Kind>,
1798}
1799pub mod timestamp_config {
1801 #[derive(Clone, PartialEq, ::prost::Oneof)]
1802 pub enum Kind {
1803 #[prost(message, tag = "1")]
1804 Single(super::TimestampCandidate),
1805 }
1806}
1807#[derive(Clone, PartialEq, ::prost::Message)]
1808pub struct TimestampCandidate {
1809 #[prost(string, tag = "1")]
1810 pub column: ::prost::alloc::string::String,
1811 #[prost(message, optional, tag = "2")]
1812 pub r#type: ::core::option::Option<super::super::types::time::AbsoluteTimestamp>,
1813}
1814#[derive(Clone, PartialEq, ::prost::Message)]
1815pub struct PathPattern {
1816 #[prost(message, optional, tag = "1")]
1817 pub first: ::core::option::Option<PatternSegment>,
1818 #[prost(message, repeated, tag = "2")]
1819 pub rest: ::prost::alloc::vec::Vec<JoinedSegment>,
1820}
1821#[derive(Clone, PartialEq, ::prost::Message)]
1822pub struct JoinedSegment {
1823 #[prost(enumeration = "SegmentDelimiter", tag = "1")]
1824 pub delimiter: i32,
1825 #[prost(message, optional, tag = "2")]
1826 pub segment: ::core::option::Option<PatternSegment>,
1827}
1828#[derive(Clone, PartialEq, ::prost::Message)]
1829pub struct PatternSegment {
1830 #[prost(oneof = "pattern_segment::Kind", tags = "1, 2, 3")]
1831 pub kind: ::core::option::Option<pattern_segment::Kind>,
1832}
1833pub mod pattern_segment {
1835 #[derive(Clone, PartialEq, ::prost::Oneof)]
1836 pub enum Kind {
1837 #[prost(message, tag = "1")]
1838 ShallowWildcard(super::ShallowWildcard),
1839 #[prost(message, tag = "2")]
1840 DeepWildcard(super::DeepWildcard),
1841 #[prost(string, tag = "3")]
1842 Literal(::prost::alloc::string::String),
1843 }
1844}
1845#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1846pub struct ShallowWildcard {}
1847#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1848pub struct DeepWildcard {}
1849#[derive(Clone, PartialEq, ::prost::Message)]
1850pub struct IngestTriggers {
1851 #[prost(message, optional, tag = "1")]
1852 pub new_match: ::core::option::Option<IngestTarget>,
1853}
1854#[derive(Clone, PartialEq, ::prost::Message)]
1855pub struct IngestTarget {
1856 #[prost(oneof = "ingest_target::Target", tags = "1, 2")]
1857 pub target: ::core::option::Option<ingest_target::Target>,
1858}
1859pub mod ingest_target {
1861 #[derive(Clone, PartialEq, ::prost::Oneof)]
1862 pub enum Target {
1863 #[prost(message, tag = "1")]
1864 NewDataset(super::NewDatasetTarget),
1865 #[prost(message, tag = "2")]
1866 ExistingDataset(super::ExistingDatasetTarget),
1867 }
1868}
1869#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1870pub struct NewDatasetTarget {}
1871#[derive(Clone, PartialEq, ::prost::Message)]
1872pub struct ExistingDatasetTarget {
1873 #[prost(string, tag = "1")]
1874 pub dataset_rid: ::prost::alloc::string::String,
1875}
1876#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1877#[repr(i32)]
1878pub enum BackfillMode {
1879 Unspecified = 0,
1880 NewFilesOnly = 1,
1881 BackfillExisting = 2,
1882}
1883impl BackfillMode {
1884 pub fn as_str_name(&self) -> &'static str {
1889 match self {
1890 Self::Unspecified => "BACKFILL_MODE_UNSPECIFIED",
1891 Self::NewFilesOnly => "BACKFILL_MODE_NEW_FILES_ONLY",
1892 Self::BackfillExisting => "BACKFILL_MODE_BACKFILL_EXISTING",
1893 }
1894 }
1895 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1897 match value {
1898 "BACKFILL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1899 "BACKFILL_MODE_NEW_FILES_ONLY" => Some(Self::NewFilesOnly),
1900 "BACKFILL_MODE_BACKFILL_EXISTING" => Some(Self::BackfillExisting),
1901 _ => None,
1902 }
1903 }
1904}
1905#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1906#[repr(i32)]
1907pub enum IngestRuleState {
1908 Unspecified = 0,
1909 Active = 1,
1910 Archived = 2,
1911}
1912impl IngestRuleState {
1913 pub fn as_str_name(&self) -> &'static str {
1918 match self {
1919 Self::Unspecified => "INGEST_RULE_STATE_UNSPECIFIED",
1920 Self::Active => "INGEST_RULE_STATE_ACTIVE",
1921 Self::Archived => "INGEST_RULE_STATE_ARCHIVED",
1922 }
1923 }
1924 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1926 match value {
1927 "INGEST_RULE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1928 "INGEST_RULE_STATE_ACTIVE" => Some(Self::Active),
1929 "INGEST_RULE_STATE_ARCHIVED" => Some(Self::Archived),
1930 _ => None,
1931 }
1932 }
1933}
1934#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1935#[repr(i32)]
1936pub enum SegmentDelimiter {
1937 Unspecified = 0,
1938 PathSeparator = 1,
1939 Concat = 2,
1940}
1941impl SegmentDelimiter {
1942 pub fn as_str_name(&self) -> &'static str {
1947 match self {
1948 Self::Unspecified => "SEGMENT_DELIMITER_UNSPECIFIED",
1949 Self::PathSeparator => "SEGMENT_DELIMITER_PATH_SEPARATOR",
1950 Self::Concat => "SEGMENT_DELIMITER_CONCAT",
1951 }
1952 }
1953 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1955 match value {
1956 "SEGMENT_DELIMITER_UNSPECIFIED" => Some(Self::Unspecified),
1957 "SEGMENT_DELIMITER_PATH_SEPARATOR" => Some(Self::PathSeparator),
1958 "SEGMENT_DELIMITER_CONCAT" => Some(Self::Concat),
1959 _ => None,
1960 }
1961 }
1962}
1963pub mod internal_ingest_rules_service_client {
1965 #![allow(
1966 unused_variables,
1967 dead_code,
1968 missing_docs,
1969 clippy::wildcard_imports,
1970 clippy::let_unit_value,
1971 )]
1972 use tonic::codegen::*;
1973 use tonic::codegen::http::Uri;
1974 #[derive(Debug, Clone)]
1975 pub struct InternalIngestRulesServiceClient<T> {
1976 inner: tonic::client::Grpc<T>,
1977 }
1978 impl InternalIngestRulesServiceClient<tonic::transport::Channel> {
1979 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1981 where
1982 D: TryInto<tonic::transport::Endpoint>,
1983 D::Error: Into<StdError>,
1984 {
1985 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1986 Ok(Self::new(conn))
1987 }
1988 }
1989 impl<T> InternalIngestRulesServiceClient<T>
1990 where
1991 T: tonic::client::GrpcService<tonic::body::Body>,
1992 T::Error: Into<StdError>,
1993 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1994 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1995 {
1996 pub fn new(inner: T) -> Self {
1997 let inner = tonic::client::Grpc::new(inner);
1998 Self { inner }
1999 }
2000 pub fn with_origin(inner: T, origin: Uri) -> Self {
2001 let inner = tonic::client::Grpc::with_origin(inner, origin);
2002 Self { inner }
2003 }
2004 pub fn with_interceptor<F>(
2005 inner: T,
2006 interceptor: F,
2007 ) -> InternalIngestRulesServiceClient<InterceptedService<T, F>>
2008 where
2009 F: tonic::service::Interceptor,
2010 T::ResponseBody: Default,
2011 T: tonic::codegen::Service<
2012 http::Request<tonic::body::Body>,
2013 Response = http::Response<
2014 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
2015 >,
2016 >,
2017 <T as tonic::codegen::Service<
2018 http::Request<tonic::body::Body>,
2019 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
2020 {
2021 InternalIngestRulesServiceClient::new(
2022 InterceptedService::new(inner, interceptor),
2023 )
2024 }
2025 #[must_use]
2030 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2031 self.inner = self.inner.send_compressed(encoding);
2032 self
2033 }
2034 #[must_use]
2036 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2037 self.inner = self.inner.accept_compressed(encoding);
2038 self
2039 }
2040 #[must_use]
2044 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2045 self.inner = self.inner.max_decoding_message_size(limit);
2046 self
2047 }
2048 #[must_use]
2052 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2053 self.inner = self.inner.max_encoding_message_size(limit);
2054 self
2055 }
2056 pub async fn create_ingest_rule(
2057 &mut self,
2058 request: impl tonic::IntoRequest<super::CreateIngestRuleRequest>,
2059 ) -> std::result::Result<
2060 tonic::Response<super::CreateIngestRuleResponse>,
2061 tonic::Status,
2062 > {
2063 self.inner
2064 .ready()
2065 .await
2066 .map_err(|e| {
2067 tonic::Status::unknown(
2068 format!("Service was not ready: {}", e.into()),
2069 )
2070 })?;
2071 let codec = tonic::codec::ProstCodec::default();
2072 let path = http::uri::PathAndQuery::from_static(
2073 "/nominal.file_store.v1.InternalIngestRulesService/CreateIngestRule",
2074 );
2075 let mut req = request.into_request();
2076 req.extensions_mut()
2077 .insert(
2078 GrpcMethod::new(
2079 "nominal.file_store.v1.InternalIngestRulesService",
2080 "CreateIngestRule",
2081 ),
2082 );
2083 self.inner.unary(req, path, codec).await
2084 }
2085 pub async fn list_ingest_rules(
2086 &mut self,
2087 request: impl tonic::IntoRequest<super::ListIngestRulesRequest>,
2088 ) -> std::result::Result<
2089 tonic::Response<super::ListIngestRulesResponse>,
2090 tonic::Status,
2091 > {
2092 self.inner
2093 .ready()
2094 .await
2095 .map_err(|e| {
2096 tonic::Status::unknown(
2097 format!("Service was not ready: {}", e.into()),
2098 )
2099 })?;
2100 let codec = tonic::codec::ProstCodec::default();
2101 let path = http::uri::PathAndQuery::from_static(
2102 "/nominal.file_store.v1.InternalIngestRulesService/ListIngestRules",
2103 );
2104 let mut req = request.into_request();
2105 req.extensions_mut()
2106 .insert(
2107 GrpcMethod::new(
2108 "nominal.file_store.v1.InternalIngestRulesService",
2109 "ListIngestRules",
2110 ),
2111 );
2112 self.inner.unary(req, path, codec).await
2113 }
2114 pub async fn get_ingest_rule(
2115 &mut self,
2116 request: impl tonic::IntoRequest<super::GetIngestRuleRequest>,
2117 ) -> std::result::Result<
2118 tonic::Response<super::GetIngestRuleResponse>,
2119 tonic::Status,
2120 > {
2121 self.inner
2122 .ready()
2123 .await
2124 .map_err(|e| {
2125 tonic::Status::unknown(
2126 format!("Service was not ready: {}", e.into()),
2127 )
2128 })?;
2129 let codec = tonic::codec::ProstCodec::default();
2130 let path = http::uri::PathAndQuery::from_static(
2131 "/nominal.file_store.v1.InternalIngestRulesService/GetIngestRule",
2132 );
2133 let mut req = request.into_request();
2134 req.extensions_mut()
2135 .insert(
2136 GrpcMethod::new(
2137 "nominal.file_store.v1.InternalIngestRulesService",
2138 "GetIngestRule",
2139 ),
2140 );
2141 self.inner.unary(req, path, codec).await
2142 }
2143 pub async fn update_ingest_rule(
2144 &mut self,
2145 request: impl tonic::IntoRequest<super::UpdateIngestRuleRequest>,
2146 ) -> std::result::Result<
2147 tonic::Response<super::UpdateIngestRuleResponse>,
2148 tonic::Status,
2149 > {
2150 self.inner
2151 .ready()
2152 .await
2153 .map_err(|e| {
2154 tonic::Status::unknown(
2155 format!("Service was not ready: {}", e.into()),
2156 )
2157 })?;
2158 let codec = tonic::codec::ProstCodec::default();
2159 let path = http::uri::PathAndQuery::from_static(
2160 "/nominal.file_store.v1.InternalIngestRulesService/UpdateIngestRule",
2161 );
2162 let mut req = request.into_request();
2163 req.extensions_mut()
2164 .insert(
2165 GrpcMethod::new(
2166 "nominal.file_store.v1.InternalIngestRulesService",
2167 "UpdateIngestRule",
2168 ),
2169 );
2170 self.inner.unary(req, path, codec).await
2171 }
2172 pub async fn archive_ingest_rule(
2173 &mut self,
2174 request: impl tonic::IntoRequest<super::ArchiveIngestRuleRequest>,
2175 ) -> std::result::Result<
2176 tonic::Response<super::ArchiveIngestRuleResponse>,
2177 tonic::Status,
2178 > {
2179 self.inner
2180 .ready()
2181 .await
2182 .map_err(|e| {
2183 tonic::Status::unknown(
2184 format!("Service was not ready: {}", e.into()),
2185 )
2186 })?;
2187 let codec = tonic::codec::ProstCodec::default();
2188 let path = http::uri::PathAndQuery::from_static(
2189 "/nominal.file_store.v1.InternalIngestRulesService/ArchiveIngestRule",
2190 );
2191 let mut req = request.into_request();
2192 req.extensions_mut()
2193 .insert(
2194 GrpcMethod::new(
2195 "nominal.file_store.v1.InternalIngestRulesService",
2196 "ArchiveIngestRule",
2197 ),
2198 );
2199 self.inner.unary(req, path, codec).await
2200 }
2201 pub async fn unarchive_ingest_rule(
2202 &mut self,
2203 request: impl tonic::IntoRequest<super::UnarchiveIngestRuleRequest>,
2204 ) -> std::result::Result<
2205 tonic::Response<super::UnarchiveIngestRuleResponse>,
2206 tonic::Status,
2207 > {
2208 self.inner
2209 .ready()
2210 .await
2211 .map_err(|e| {
2212 tonic::Status::unknown(
2213 format!("Service was not ready: {}", e.into()),
2214 )
2215 })?;
2216 let codec = tonic::codec::ProstCodec::default();
2217 let path = http::uri::PathAndQuery::from_static(
2218 "/nominal.file_store.v1.InternalIngestRulesService/UnarchiveIngestRule",
2219 );
2220 let mut req = request.into_request();
2221 req.extensions_mut()
2222 .insert(
2223 GrpcMethod::new(
2224 "nominal.file_store.v1.InternalIngestRulesService",
2225 "UnarchiveIngestRule",
2226 ),
2227 );
2228 self.inner.unary(req, path, codec).await
2229 }
2230 }
2231}