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