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 name: ::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 = "DriveKind", tag = "6")]
22 pub kind: i32,
23}
24#[derive(Clone, PartialEq, ::prost::Message)]
25pub struct VirtualDrive {
26 #[prost(string, tag = "1")]
27 pub drive_rid: ::prost::alloc::string::String,
28 #[prost(message, optional, tag = "2")]
29 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
30 #[prost(message, optional, tag = "3")]
31 pub status: ::core::option::Option<VirtualDriveStatus>,
32}
33#[derive(Clone, PartialEq, ::prost::Message)]
34pub struct VirtualDriveStatus {
35 #[prost(enumeration = "VirtualDriveState", tag = "1")]
36 pub state: i32,
37 #[prost(message, optional, tag = "2")]
38 pub last_successful_check_time: ::core::option::Option<
39 super::super::super::google::protobuf::Timestamp,
40 >,
41 #[prost(string, tag = "3")]
42 pub message: ::prost::alloc::string::String,
43}
44#[derive(Clone, PartialEq, ::prost::Message)]
45pub struct VirtualDriveConnectionDetails {
46 #[prost(oneof = "virtual_drive_connection_details::Details", tags = "1, 2")]
47 pub details: ::core::option::Option<virtual_drive_connection_details::Details>,
48}
49pub mod virtual_drive_connection_details {
51 #[derive(Clone, PartialEq, ::prost::Oneof)]
52 pub enum Details {
53 #[prost(message, tag = "1")]
54 S3(super::S3VirtualDriveConnectionDetails),
55 #[prost(message, tag = "2")]
56 GoogleDrive(super::GoogleDriveVirtualDriveConnectionDetails),
57 }
58}
59#[derive(Clone, PartialEq, ::prost::Message)]
60pub struct S3VirtualDriveConnectionDetails {
61 #[prost(string, tag = "1")]
62 pub bucket: ::prost::alloc::string::String,
63 #[prost(string, tag = "2")]
64 pub prefix: ::prost::alloc::string::String,
65 #[prost(string, tag = "3")]
66 pub credentials_secret_rid: ::prost::alloc::string::String,
67}
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct GoogleDriveVirtualDriveConnectionDetails {
70 #[prost(string, tag = "1")]
71 pub folder_id: ::prost::alloc::string::String,
72 #[prost(string, tag = "2")]
73 pub credentials_secret_rid: ::prost::alloc::string::String,
74}
75#[derive(Clone, PartialEq, ::prost::Message)]
76pub struct LogicalPath {
77 #[prost(string, tag = "1")]
78 pub path: ::prost::alloc::string::String,
79}
80#[derive(Clone, PartialEq, ::prost::Message)]
81pub struct LogicalFile {
82 #[prost(message, optional, tag = "1")]
83 pub identity: ::core::option::Option<LogicalFileIdentity>,
84 #[prost(message, optional, tag = "2")]
85 pub path: ::core::option::Option<LogicalPath>,
86 #[prost(enumeration = "FileState", tag = "3")]
87 pub state: i32,
88 #[prost(message, optional, tag = "4")]
89 pub created: ::core::option::Option<Attribution>,
90 #[prost(uint64, tag = "5")]
91 pub size_bytes: u64,
92 #[prost(message, optional, tag = "6")]
93 pub observed: ::core::option::Option<Attribution>,
94 #[prost(message, optional, tag = "7")]
95 pub current_revision: ::core::option::Option<FileRevisionRef>,
96}
97#[derive(Clone, PartialEq, ::prost::Message)]
98pub struct LogicalFileIdentity {
99 #[prost(oneof = "logical_file_identity::Identity", tags = "1, 2")]
100 pub identity: ::core::option::Option<logical_file_identity::Identity>,
101}
102pub mod logical_file_identity {
104 #[derive(Clone, PartialEq, ::prost::Oneof)]
105 pub enum Identity {
106 #[prost(message, tag = "1")]
107 Managed(super::ManagedFileIdentity),
108 #[prost(message, tag = "2")]
109 Virtual(super::VirtualFileIdentity),
110 }
111}
112#[derive(Clone, PartialEq, ::prost::Message)]
113pub struct ManagedFileIdentity {
114 #[prost(string, tag = "1")]
115 pub file_rid: ::prost::alloc::string::String,
116}
117#[derive(Clone, PartialEq, ::prost::Message)]
118pub struct VirtualFileIdentity {
119 #[prost(oneof = "virtual_file_identity::Kind", tags = "1, 2")]
120 pub kind: ::core::option::Option<virtual_file_identity::Kind>,
121}
122pub mod virtual_file_identity {
124 #[derive(Clone, PartialEq, ::prost::Oneof)]
125 pub enum Kind {
126 #[prost(message, tag = "1")]
127 S3(super::S3FileIdentity),
128 #[prost(message, tag = "2")]
129 GoogleDrive(super::GoogleDriveFileIdentity),
130 }
131}
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct S3FileIdentity {
134 #[prost(string, tag = "1")]
135 pub drive_rid: ::prost::alloc::string::String,
136 #[prost(string, tag = "2")]
137 pub path: ::prost::alloc::string::String,
138}
139#[derive(Clone, PartialEq, ::prost::Message)]
140pub struct GoogleDriveFileIdentity {
141 #[prost(string, tag = "1")]
142 pub file_id: ::prost::alloc::string::String,
143}
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct FileRevisionRef {
146 #[prost(oneof = "file_revision_ref::Reference", tags = "1, 2")]
147 pub reference: ::core::option::Option<file_revision_ref::Reference>,
148}
149pub mod file_revision_ref {
151 #[derive(Clone, PartialEq, ::prost::Oneof)]
152 pub enum Reference {
153 #[prost(message, tag = "1")]
154 Managed(super::ManagedFileRevisionRef),
155 #[prost(message, tag = "2")]
156 Virtual(super::VirtualFileRevisionRef),
157 }
158}
159#[derive(Clone, PartialEq, ::prost::Message)]
160pub struct ManagedFileRevisionRef {
161 #[prost(string, tag = "1")]
162 pub file_revision_rid: ::prost::alloc::string::String,
163}
164#[derive(Clone, PartialEq, ::prost::Message)]
165pub struct VirtualFileRevisionRef {
166 #[prost(oneof = "virtual_file_revision_ref::Kind", tags = "1, 2")]
167 pub kind: ::core::option::Option<virtual_file_revision_ref::Kind>,
168}
169pub mod virtual_file_revision_ref {
171 #[derive(Clone, PartialEq, ::prost::Oneof)]
172 pub enum Kind {
173 #[prost(message, tag = "1")]
174 S3(super::S3FileRevisionRef),
175 #[prost(message, tag = "2")]
176 GoogleDrive(super::GoogleDriveFileRevisionRef),
177 }
178}
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct S3FileRevisionRef {
181 #[prost(string, tag = "1")]
182 pub drive_rid: ::prost::alloc::string::String,
183 #[prost(string, tag = "2")]
184 pub path: ::prost::alloc::string::String,
185 #[prost(string, tag = "3")]
186 pub etag: ::prost::alloc::string::String,
187 #[prost(string, tag = "4")]
188 pub version_id: ::prost::alloc::string::String,
189}
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct GoogleDriveFileRevisionRef {
192 #[prost(string, tag = "1")]
193 pub drive_rid: ::prost::alloc::string::String,
194 #[prost(string, tag = "2")]
195 pub file_id: ::prost::alloc::string::String,
196 #[prost(string, tag = "3")]
197 pub version: ::prost::alloc::string::String,
198}
199#[derive(Clone, PartialEq, ::prost::Message)]
200pub struct ManagedFileRevision {
201 #[prost(string, tag = "1")]
202 pub file_revision_rid: ::prost::alloc::string::String,
203 #[prost(string, tag = "2")]
204 pub file_rid: ::prost::alloc::string::String,
205 #[prost(message, optional, tag = "3")]
206 pub path: ::core::option::Option<LogicalPath>,
207 #[prost(uint32, tag = "4")]
208 pub revision_number: u32,
209 #[prost(uint64, tag = "5")]
210 pub size_bytes: u64,
211 #[prost(message, optional, tag = "6")]
212 pub created: ::core::option::Option<Attribution>,
213}
214#[derive(Clone, PartialEq, ::prost::Message)]
215pub struct VirtualFileRevision {
216 #[prost(string, tag = "1")]
217 pub file_revision_rid: ::prost::alloc::string::String,
218 #[prost(message, optional, tag = "2")]
219 pub file_identity: ::core::option::Option<VirtualFileIdentity>,
220 #[prost(message, optional, tag = "3")]
221 pub path: ::core::option::Option<LogicalPath>,
222 #[prost(uint64, tag = "4")]
223 pub size_bytes: u64,
224 #[prost(message, optional, tag = "5")]
225 pub observed: ::core::option::Option<Attribution>,
226}
227#[derive(Clone, PartialEq, ::prost::Message)]
228pub struct Directory {
229 #[prost(message, optional, tag = "1")]
230 pub path: ::core::option::Option<LogicalPath>,
231}
232#[derive(Clone, PartialEq, ::prost::Message)]
233pub struct FileEntry {
234 #[prost(oneof = "file_entry::Entry", tags = "1, 2")]
235 pub entry: ::core::option::Option<file_entry::Entry>,
236}
237pub mod file_entry {
239 #[derive(Clone, PartialEq, ::prost::Oneof)]
240 pub enum Entry {
241 #[prost(message, tag = "1")]
242 File(super::LogicalFile),
243 #[prost(message, tag = "2")]
244 Directory(super::Directory),
245 }
246}
247#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
248#[repr(i32)]
249pub enum DriveState {
250 Unspecified = 0,
251 Active = 1,
252 Archived = 2,
253}
254impl DriveState {
255 pub fn as_str_name(&self) -> &'static str {
260 match self {
261 Self::Unspecified => "DRIVE_STATE_UNSPECIFIED",
262 Self::Active => "DRIVE_STATE_ACTIVE",
263 Self::Archived => "DRIVE_STATE_ARCHIVED",
264 }
265 }
266 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
268 match value {
269 "DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
270 "DRIVE_STATE_ACTIVE" => Some(Self::Active),
271 "DRIVE_STATE_ARCHIVED" => Some(Self::Archived),
272 _ => None,
273 }
274 }
275}
276#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
277#[repr(i32)]
278pub enum DriveKind {
279 Unspecified = 0,
280 Managed = 1,
281 Virtual = 2,
282}
283impl DriveKind {
284 pub fn as_str_name(&self) -> &'static str {
289 match self {
290 Self::Unspecified => "DRIVE_KIND_UNSPECIFIED",
291 Self::Managed => "DRIVE_KIND_MANAGED",
292 Self::Virtual => "DRIVE_KIND_VIRTUAL",
293 }
294 }
295 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
297 match value {
298 "DRIVE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
299 "DRIVE_KIND_MANAGED" => Some(Self::Managed),
300 "DRIVE_KIND_VIRTUAL" => Some(Self::Virtual),
301 _ => None,
302 }
303 }
304}
305#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
306#[repr(i32)]
307pub enum VirtualDriveState {
308 Unspecified = 0,
309 Active = 1,
310 AuthError = 2,
311 Unreachable = 3,
312 InvalidConfiguration = 4,
313}
314impl VirtualDriveState {
315 pub fn as_str_name(&self) -> &'static str {
320 match self {
321 Self::Unspecified => "VIRTUAL_DRIVE_STATE_UNSPECIFIED",
322 Self::Active => "VIRTUAL_DRIVE_STATE_ACTIVE",
323 Self::AuthError => "VIRTUAL_DRIVE_STATE_AUTH_ERROR",
324 Self::Unreachable => "VIRTUAL_DRIVE_STATE_UNREACHABLE",
325 Self::InvalidConfiguration => "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION",
326 }
327 }
328 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
330 match value {
331 "VIRTUAL_DRIVE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
332 "VIRTUAL_DRIVE_STATE_ACTIVE" => Some(Self::Active),
333 "VIRTUAL_DRIVE_STATE_AUTH_ERROR" => Some(Self::AuthError),
334 "VIRTUAL_DRIVE_STATE_UNREACHABLE" => Some(Self::Unreachable),
335 "VIRTUAL_DRIVE_STATE_INVALID_CONFIGURATION" => {
336 Some(Self::InvalidConfiguration)
337 }
338 _ => None,
339 }
340 }
341}
342#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
343#[repr(i32)]
344pub enum FileState {
345 Unspecified = 0,
346 Active = 1,
347 Removed = 2,
348}
349impl FileState {
350 pub fn as_str_name(&self) -> &'static str {
355 match self {
356 Self::Unspecified => "FILE_STATE_UNSPECIFIED",
357 Self::Active => "FILE_STATE_ACTIVE",
358 Self::Removed => "FILE_STATE_REMOVED",
359 }
360 }
361 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
363 match value {
364 "FILE_STATE_UNSPECIFIED" => Some(Self::Unspecified),
365 "FILE_STATE_ACTIVE" => Some(Self::Active),
366 "FILE_STATE_REMOVED" => Some(Self::Removed),
367 _ => None,
368 }
369 }
370}
371#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
372#[repr(i32)]
373pub enum FileStoreError {
374 Unspecified = 0,
375 DriveNotFound = 1,
376 FileNotFound = 2,
377 FileRevisionNotFound = 3,
378 PathAlreadyExists = 4,
379 InvalidLogicalPath = 5,
380 PermissionDenied = 6,
381 RevisionPreconditionFailed = 7,
382 VirtualDriveNotFound = 8,
383 InvalidVirtualDriveConfiguration = 9,
384 ReadOnlyDrive = 10,
385 FileHistoryNotAvailable = 11,
386 UpstreamUnavailable = 12,
387 RevisionBytesReclaimed = 13,
388 UpstreamFileNotFound = 14,
389}
390impl FileStoreError {
391 pub fn as_str_name(&self) -> &'static str {
396 match self {
397 Self::Unspecified => "FILE_STORE_ERROR_UNSPECIFIED",
398 Self::DriveNotFound => "FILE_STORE_ERROR_DRIVE_NOT_FOUND",
399 Self::FileNotFound => "FILE_STORE_ERROR_FILE_NOT_FOUND",
400 Self::FileRevisionNotFound => "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND",
401 Self::PathAlreadyExists => "FILE_STORE_ERROR_PATH_ALREADY_EXISTS",
402 Self::InvalidLogicalPath => "FILE_STORE_ERROR_INVALID_LOGICAL_PATH",
403 Self::PermissionDenied => "FILE_STORE_ERROR_PERMISSION_DENIED",
404 Self::RevisionPreconditionFailed => {
405 "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED"
406 }
407 Self::VirtualDriveNotFound => "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND",
408 Self::InvalidVirtualDriveConfiguration => {
409 "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION"
410 }
411 Self::ReadOnlyDrive => "FILE_STORE_ERROR_READ_ONLY_DRIVE",
412 Self::FileHistoryNotAvailable => {
413 "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE"
414 }
415 Self::UpstreamUnavailable => "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE",
416 Self::RevisionBytesReclaimed => "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED",
417 Self::UpstreamFileNotFound => "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND",
418 }
419 }
420 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
422 match value {
423 "FILE_STORE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
424 "FILE_STORE_ERROR_DRIVE_NOT_FOUND" => Some(Self::DriveNotFound),
425 "FILE_STORE_ERROR_FILE_NOT_FOUND" => Some(Self::FileNotFound),
426 "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND" => {
427 Some(Self::FileRevisionNotFound)
428 }
429 "FILE_STORE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
430 "FILE_STORE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
431 "FILE_STORE_ERROR_PERMISSION_DENIED" => Some(Self::PermissionDenied),
432 "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED" => {
433 Some(Self::RevisionPreconditionFailed)
434 }
435 "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND" => {
436 Some(Self::VirtualDriveNotFound)
437 }
438 "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION" => {
439 Some(Self::InvalidVirtualDriveConfiguration)
440 }
441 "FILE_STORE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
442 "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE" => {
443 Some(Self::FileHistoryNotAvailable)
444 }
445 "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE" => Some(Self::UpstreamUnavailable),
446 "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED" => {
447 Some(Self::RevisionBytesReclaimed)
448 }
449 "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND" => {
450 Some(Self::UpstreamFileNotFound)
451 }
452 _ => None,
453 }
454 }
455}
456#[derive(Clone, PartialEq, ::prost::Message)]
457pub struct CreateDriveRequest {
458 #[prost(string, tag = "1")]
459 pub workspace_rid: ::prost::alloc::string::String,
460 #[prost(string, tag = "2")]
461 pub name: ::prost::alloc::string::String,
462}
463#[derive(Clone, PartialEq, ::prost::Message)]
464pub struct CreateDriveResponse {
465 #[prost(message, optional, tag = "1")]
466 pub drive: ::core::option::Option<Drive>,
467}
468#[derive(Clone, PartialEq, ::prost::Message)]
469pub struct CreateVirtualDriveRequest {
470 #[prost(string, tag = "1")]
471 pub workspace_rid: ::prost::alloc::string::String,
472 #[prost(string, tag = "2")]
473 pub name: ::prost::alloc::string::String,
474 #[prost(message, optional, tag = "3")]
475 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
476}
477#[derive(Clone, PartialEq, ::prost::Message)]
478pub struct CreateVirtualDriveResponse {
479 #[prost(message, optional, tag = "1")]
480 pub drive: ::core::option::Option<Drive>,
481 #[prost(message, optional, tag = "2")]
482 pub virtual_drive: ::core::option::Option<VirtualDrive>,
483}
484#[derive(Clone, PartialEq, ::prost::Message)]
485pub struct GetDriveRequest {
486 #[prost(string, tag = "1")]
487 pub drive_rid: ::prost::alloc::string::String,
488}
489#[derive(Clone, PartialEq, ::prost::Message)]
490pub struct GetDriveResponse {
491 #[prost(message, optional, tag = "1")]
492 pub drive: ::core::option::Option<Drive>,
493}
494#[derive(Clone, PartialEq, ::prost::Message)]
495pub struct GetVirtualDriveRequest {
496 #[prost(string, tag = "1")]
497 pub drive_rid: ::prost::alloc::string::String,
498}
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct GetVirtualDriveResponse {
501 #[prost(message, optional, tag = "1")]
502 pub drive: ::core::option::Option<Drive>,
503 #[prost(message, optional, tag = "2")]
504 pub virtual_drive: ::core::option::Option<VirtualDrive>,
505}
506#[derive(Clone, PartialEq, ::prost::Message)]
507pub struct GetDriveByNameRequest {
508 #[prost(string, tag = "1")]
509 pub workspace_rid: ::prost::alloc::string::String,
510 #[prost(string, tag = "2")]
511 pub name: ::prost::alloc::string::String,
512}
513#[derive(Clone, PartialEq, ::prost::Message)]
514pub struct GetDriveByNameResponse {
515 #[prost(message, optional, tag = "1")]
516 pub drive: ::core::option::Option<Drive>,
517}
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct GetVirtualDriveByNameRequest {
520 #[prost(string, tag = "1")]
521 pub workspace_rid: ::prost::alloc::string::String,
522 #[prost(string, tag = "2")]
523 pub name: ::prost::alloc::string::String,
524}
525#[derive(Clone, PartialEq, ::prost::Message)]
526pub struct GetVirtualDriveByNameResponse {
527 #[prost(message, optional, tag = "1")]
528 pub drive: ::core::option::Option<Drive>,
529 #[prost(message, optional, tag = "2")]
530 pub virtual_drive: ::core::option::Option<VirtualDrive>,
531}
532#[derive(Clone, PartialEq, ::prost::Message)]
533pub struct ListDrivesRequest {
534 #[prost(string, tag = "1")]
535 pub workspace_rid: ::prost::alloc::string::String,
536 #[prost(bool, tag = "2")]
537 pub include_archived: bool,
538 #[prost(int32, optional, tag = "3")]
539 pub page_size: ::core::option::Option<i32>,
540 #[prost(string, optional, tag = "4")]
541 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
542}
543#[derive(Clone, PartialEq, ::prost::Message)]
544pub struct ListDrivesResponse {
545 #[prost(message, repeated, tag = "1")]
546 pub drives: ::prost::alloc::vec::Vec<Drive>,
547 #[prost(string, optional, tag = "2")]
548 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
549}
550#[derive(Clone, PartialEq, ::prost::Message)]
551pub struct UpdateVirtualDriveRequest {
552 #[prost(string, tag = "1")]
553 pub drive_rid: ::prost::alloc::string::String,
554 #[prost(message, optional, tag = "2")]
555 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
556}
557#[derive(Clone, PartialEq, ::prost::Message)]
558pub struct UpdateVirtualDriveResponse {
559 #[prost(message, optional, tag = "1")]
560 pub drive: ::core::option::Option<Drive>,
561 #[prost(message, optional, tag = "2")]
562 pub virtual_drive: ::core::option::Option<VirtualDrive>,
563}
564#[derive(Clone, PartialEq, ::prost::Message)]
565pub struct RenameDriveRequest {
566 #[prost(string, tag = "1")]
567 pub drive_rid: ::prost::alloc::string::String,
568 #[prost(string, tag = "2")]
569 pub name: ::prost::alloc::string::String,
570}
571#[derive(Clone, PartialEq, ::prost::Message)]
572pub struct RenameDriveResponse {
573 #[prost(message, optional, tag = "1")]
574 pub drive: ::core::option::Option<Drive>,
575}
576#[derive(Clone, PartialEq, ::prost::Message)]
577pub struct ArchiveDriveRequest {
578 #[prost(string, tag = "1")]
579 pub drive_rid: ::prost::alloc::string::String,
580}
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct ArchiveDriveResponse {
583 #[prost(message, optional, tag = "1")]
584 pub drive: ::core::option::Option<Drive>,
585}
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct UnarchiveDriveRequest {
588 #[prost(string, tag = "1")]
589 pub drive_rid: ::prost::alloc::string::String,
590}
591#[derive(Clone, PartialEq, ::prost::Message)]
592pub struct UnarchiveDriveResponse {
593 #[prost(message, optional, tag = "1")]
594 pub drive: ::core::option::Option<Drive>,
595}
596pub mod internal_drives_service_client {
598 #![allow(
599 unused_variables,
600 dead_code,
601 missing_docs,
602 clippy::wildcard_imports,
603 clippy::let_unit_value,
604 )]
605 use tonic::codegen::*;
606 use tonic::codegen::http::Uri;
607 #[derive(Debug, Clone)]
608 pub struct InternalDrivesServiceClient<T> {
609 inner: tonic::client::Grpc<T>,
610 }
611 impl InternalDrivesServiceClient<tonic::transport::Channel> {
612 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
614 where
615 D: TryInto<tonic::transport::Endpoint>,
616 D::Error: Into<StdError>,
617 {
618 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
619 Ok(Self::new(conn))
620 }
621 }
622 impl<T> InternalDrivesServiceClient<T>
623 where
624 T: tonic::client::GrpcService<tonic::body::Body>,
625 T::Error: Into<StdError>,
626 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
627 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
628 {
629 pub fn new(inner: T) -> Self {
630 let inner = tonic::client::Grpc::new(inner);
631 Self { inner }
632 }
633 pub fn with_origin(inner: T, origin: Uri) -> Self {
634 let inner = tonic::client::Grpc::with_origin(inner, origin);
635 Self { inner }
636 }
637 pub fn with_interceptor<F>(
638 inner: T,
639 interceptor: F,
640 ) -> InternalDrivesServiceClient<InterceptedService<T, F>>
641 where
642 F: tonic::service::Interceptor,
643 T::ResponseBody: Default,
644 T: tonic::codegen::Service<
645 http::Request<tonic::body::Body>,
646 Response = http::Response<
647 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
648 >,
649 >,
650 <T as tonic::codegen::Service<
651 http::Request<tonic::body::Body>,
652 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
653 {
654 InternalDrivesServiceClient::new(InterceptedService::new(inner, interceptor))
655 }
656 #[must_use]
661 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
662 self.inner = self.inner.send_compressed(encoding);
663 self
664 }
665 #[must_use]
667 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
668 self.inner = self.inner.accept_compressed(encoding);
669 self
670 }
671 #[must_use]
675 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
676 self.inner = self.inner.max_decoding_message_size(limit);
677 self
678 }
679 #[must_use]
683 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
684 self.inner = self.inner.max_encoding_message_size(limit);
685 self
686 }
687 pub async fn create_drive(
688 &mut self,
689 request: impl tonic::IntoRequest<super::CreateDriveRequest>,
690 ) -> std::result::Result<
691 tonic::Response<super::CreateDriveResponse>,
692 tonic::Status,
693 > {
694 self.inner
695 .ready()
696 .await
697 .map_err(|e| {
698 tonic::Status::unknown(
699 format!("Service was not ready: {}", e.into()),
700 )
701 })?;
702 let codec = tonic::codec::ProstCodec::default();
703 let path = http::uri::PathAndQuery::from_static(
704 "/nominal.file_store.v1.InternalDrivesService/CreateDrive",
705 );
706 let mut req = request.into_request();
707 req.extensions_mut()
708 .insert(
709 GrpcMethod::new(
710 "nominal.file_store.v1.InternalDrivesService",
711 "CreateDrive",
712 ),
713 );
714 self.inner.unary(req, path, codec).await
715 }
716 pub async fn create_virtual_drive(
717 &mut self,
718 request: impl tonic::IntoRequest<super::CreateVirtualDriveRequest>,
719 ) -> std::result::Result<
720 tonic::Response<super::CreateVirtualDriveResponse>,
721 tonic::Status,
722 > {
723 self.inner
724 .ready()
725 .await
726 .map_err(|e| {
727 tonic::Status::unknown(
728 format!("Service was not ready: {}", e.into()),
729 )
730 })?;
731 let codec = tonic::codec::ProstCodec::default();
732 let path = http::uri::PathAndQuery::from_static(
733 "/nominal.file_store.v1.InternalDrivesService/CreateVirtualDrive",
734 );
735 let mut req = request.into_request();
736 req.extensions_mut()
737 .insert(
738 GrpcMethod::new(
739 "nominal.file_store.v1.InternalDrivesService",
740 "CreateVirtualDrive",
741 ),
742 );
743 self.inner.unary(req, path, codec).await
744 }
745 pub async fn get_drive(
746 &mut self,
747 request: impl tonic::IntoRequest<super::GetDriveRequest>,
748 ) -> std::result::Result<
749 tonic::Response<super::GetDriveResponse>,
750 tonic::Status,
751 > {
752 self.inner
753 .ready()
754 .await
755 .map_err(|e| {
756 tonic::Status::unknown(
757 format!("Service was not ready: {}", e.into()),
758 )
759 })?;
760 let codec = tonic::codec::ProstCodec::default();
761 let path = http::uri::PathAndQuery::from_static(
762 "/nominal.file_store.v1.InternalDrivesService/GetDrive",
763 );
764 let mut req = request.into_request();
765 req.extensions_mut()
766 .insert(
767 GrpcMethod::new(
768 "nominal.file_store.v1.InternalDrivesService",
769 "GetDrive",
770 ),
771 );
772 self.inner.unary(req, path, codec).await
773 }
774 pub async fn get_virtual_drive(
775 &mut self,
776 request: impl tonic::IntoRequest<super::GetVirtualDriveRequest>,
777 ) -> std::result::Result<
778 tonic::Response<super::GetVirtualDriveResponse>,
779 tonic::Status,
780 > {
781 self.inner
782 .ready()
783 .await
784 .map_err(|e| {
785 tonic::Status::unknown(
786 format!("Service was not ready: {}", e.into()),
787 )
788 })?;
789 let codec = tonic::codec::ProstCodec::default();
790 let path = http::uri::PathAndQuery::from_static(
791 "/nominal.file_store.v1.InternalDrivesService/GetVirtualDrive",
792 );
793 let mut req = request.into_request();
794 req.extensions_mut()
795 .insert(
796 GrpcMethod::new(
797 "nominal.file_store.v1.InternalDrivesService",
798 "GetVirtualDrive",
799 ),
800 );
801 self.inner.unary(req, path, codec).await
802 }
803 pub async fn get_drive_by_name(
804 &mut self,
805 request: impl tonic::IntoRequest<super::GetDriveByNameRequest>,
806 ) -> std::result::Result<
807 tonic::Response<super::GetDriveByNameResponse>,
808 tonic::Status,
809 > {
810 self.inner
811 .ready()
812 .await
813 .map_err(|e| {
814 tonic::Status::unknown(
815 format!("Service was not ready: {}", e.into()),
816 )
817 })?;
818 let codec = tonic::codec::ProstCodec::default();
819 let path = http::uri::PathAndQuery::from_static(
820 "/nominal.file_store.v1.InternalDrivesService/GetDriveByName",
821 );
822 let mut req = request.into_request();
823 req.extensions_mut()
824 .insert(
825 GrpcMethod::new(
826 "nominal.file_store.v1.InternalDrivesService",
827 "GetDriveByName",
828 ),
829 );
830 self.inner.unary(req, path, codec).await
831 }
832 pub async fn get_virtual_drive_by_name(
833 &mut self,
834 request: impl tonic::IntoRequest<super::GetVirtualDriveByNameRequest>,
835 ) -> std::result::Result<
836 tonic::Response<super::GetVirtualDriveByNameResponse>,
837 tonic::Status,
838 > {
839 self.inner
840 .ready()
841 .await
842 .map_err(|e| {
843 tonic::Status::unknown(
844 format!("Service was not ready: {}", e.into()),
845 )
846 })?;
847 let codec = tonic::codec::ProstCodec::default();
848 let path = http::uri::PathAndQuery::from_static(
849 "/nominal.file_store.v1.InternalDrivesService/GetVirtualDriveByName",
850 );
851 let mut req = request.into_request();
852 req.extensions_mut()
853 .insert(
854 GrpcMethod::new(
855 "nominal.file_store.v1.InternalDrivesService",
856 "GetVirtualDriveByName",
857 ),
858 );
859 self.inner.unary(req, path, codec).await
860 }
861 pub async fn list_drives(
862 &mut self,
863 request: impl tonic::IntoRequest<super::ListDrivesRequest>,
864 ) -> std::result::Result<
865 tonic::Response<super::ListDrivesResponse>,
866 tonic::Status,
867 > {
868 self.inner
869 .ready()
870 .await
871 .map_err(|e| {
872 tonic::Status::unknown(
873 format!("Service was not ready: {}", e.into()),
874 )
875 })?;
876 let codec = tonic::codec::ProstCodec::default();
877 let path = http::uri::PathAndQuery::from_static(
878 "/nominal.file_store.v1.InternalDrivesService/ListDrives",
879 );
880 let mut req = request.into_request();
881 req.extensions_mut()
882 .insert(
883 GrpcMethod::new(
884 "nominal.file_store.v1.InternalDrivesService",
885 "ListDrives",
886 ),
887 );
888 self.inner.unary(req, path, codec).await
889 }
890 pub async fn update_virtual_drive(
891 &mut self,
892 request: impl tonic::IntoRequest<super::UpdateVirtualDriveRequest>,
893 ) -> std::result::Result<
894 tonic::Response<super::UpdateVirtualDriveResponse>,
895 tonic::Status,
896 > {
897 self.inner
898 .ready()
899 .await
900 .map_err(|e| {
901 tonic::Status::unknown(
902 format!("Service was not ready: {}", e.into()),
903 )
904 })?;
905 let codec = tonic::codec::ProstCodec::default();
906 let path = http::uri::PathAndQuery::from_static(
907 "/nominal.file_store.v1.InternalDrivesService/UpdateVirtualDrive",
908 );
909 let mut req = request.into_request();
910 req.extensions_mut()
911 .insert(
912 GrpcMethod::new(
913 "nominal.file_store.v1.InternalDrivesService",
914 "UpdateVirtualDrive",
915 ),
916 );
917 self.inner.unary(req, path, codec).await
918 }
919 pub async fn rename_drive(
920 &mut self,
921 request: impl tonic::IntoRequest<super::RenameDriveRequest>,
922 ) -> std::result::Result<
923 tonic::Response<super::RenameDriveResponse>,
924 tonic::Status,
925 > {
926 self.inner
927 .ready()
928 .await
929 .map_err(|e| {
930 tonic::Status::unknown(
931 format!("Service was not ready: {}", e.into()),
932 )
933 })?;
934 let codec = tonic::codec::ProstCodec::default();
935 let path = http::uri::PathAndQuery::from_static(
936 "/nominal.file_store.v1.InternalDrivesService/RenameDrive",
937 );
938 let mut req = request.into_request();
939 req.extensions_mut()
940 .insert(
941 GrpcMethod::new(
942 "nominal.file_store.v1.InternalDrivesService",
943 "RenameDrive",
944 ),
945 );
946 self.inner.unary(req, path, codec).await
947 }
948 pub async fn archive_drive(
949 &mut self,
950 request: impl tonic::IntoRequest<super::ArchiveDriveRequest>,
951 ) -> std::result::Result<
952 tonic::Response<super::ArchiveDriveResponse>,
953 tonic::Status,
954 > {
955 self.inner
956 .ready()
957 .await
958 .map_err(|e| {
959 tonic::Status::unknown(
960 format!("Service was not ready: {}", e.into()),
961 )
962 })?;
963 let codec = tonic::codec::ProstCodec::default();
964 let path = http::uri::PathAndQuery::from_static(
965 "/nominal.file_store.v1.InternalDrivesService/ArchiveDrive",
966 );
967 let mut req = request.into_request();
968 req.extensions_mut()
969 .insert(
970 GrpcMethod::new(
971 "nominal.file_store.v1.InternalDrivesService",
972 "ArchiveDrive",
973 ),
974 );
975 self.inner.unary(req, path, codec).await
976 }
977 pub async fn unarchive_drive(
978 &mut self,
979 request: impl tonic::IntoRequest<super::UnarchiveDriveRequest>,
980 ) -> std::result::Result<
981 tonic::Response<super::UnarchiveDriveResponse>,
982 tonic::Status,
983 > {
984 self.inner
985 .ready()
986 .await
987 .map_err(|e| {
988 tonic::Status::unknown(
989 format!("Service was not ready: {}", e.into()),
990 )
991 })?;
992 let codec = tonic::codec::ProstCodec::default();
993 let path = http::uri::PathAndQuery::from_static(
994 "/nominal.file_store.v1.InternalDrivesService/UnarchiveDrive",
995 );
996 let mut req = request.into_request();
997 req.extensions_mut()
998 .insert(
999 GrpcMethod::new(
1000 "nominal.file_store.v1.InternalDrivesService",
1001 "UnarchiveDrive",
1002 ),
1003 );
1004 self.inner.unary(req, path, codec).await
1005 }
1006 }
1007}
1008#[derive(Clone, PartialEq, ::prost::Message)]
1009pub struct UploadedObjectRef {
1010 #[prost(string, tag = "1")]
1011 pub s3_path: ::prost::alloc::string::String,
1012}
1013#[derive(Clone, PartialEq, ::prost::Message)]
1014pub struct PathTarget {
1015 #[prost(message, optional, tag = "1")]
1016 pub path: ::core::option::Option<LogicalPath>,
1017}
1018#[derive(Clone, PartialEq, ::prost::Message)]
1019pub struct Destination {
1020 #[prost(oneof = "destination::Target", tags = "1, 2")]
1021 pub target: ::core::option::Option<destination::Target>,
1022}
1023pub mod destination {
1025 #[derive(Clone, PartialEq, ::prost::Oneof)]
1026 pub enum Target {
1027 #[prost(message, tag = "1")]
1028 Path(super::PathTarget),
1029 #[prost(string, tag = "2")]
1030 FileRevisionRid(::prost::alloc::string::String),
1031 }
1032}
1033#[derive(Clone, PartialEq, ::prost::Message)]
1034pub struct PutFile {
1035 #[prost(message, optional, tag = "1")]
1036 pub object: ::core::option::Option<UploadedObjectRef>,
1037 #[prost(uint64, tag = "2")]
1038 pub size_bytes: u64,
1039 #[prost(message, optional, tag = "3")]
1040 pub destination: ::core::option::Option<Destination>,
1041}
1042#[derive(Clone, PartialEq, ::prost::Message)]
1043pub struct MoveFile {
1044 #[prost(string, tag = "1")]
1045 pub source_revision_rid: ::prost::alloc::string::String,
1046 #[prost(message, optional, tag = "2")]
1047 pub destination: ::core::option::Option<Destination>,
1048}
1049#[derive(Clone, PartialEq, ::prost::Message)]
1050pub struct RemoveFile {
1051 #[prost(string, tag = "1")]
1052 pub revision_rid: ::prost::alloc::string::String,
1053}
1054#[derive(Clone, PartialEq, ::prost::Message)]
1055pub struct RestoreFile {
1056 #[prost(string, tag = "1")]
1057 pub restore_revision_rid: ::prost::alloc::string::String,
1058 #[prost(message, optional, tag = "2")]
1059 pub destination: ::core::option::Option<Destination>,
1060}
1061#[derive(Clone, PartialEq, ::prost::Message)]
1062pub struct FileChange {
1063 #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4")]
1064 pub change: ::core::option::Option<file_change::Change>,
1065}
1066pub mod file_change {
1068 #[derive(Clone, PartialEq, ::prost::Oneof)]
1069 pub enum Change {
1070 #[prost(message, tag = "1")]
1071 Put(super::PutFile),
1072 #[prost(message, tag = "2")]
1073 Move(super::MoveFile),
1074 #[prost(message, tag = "3")]
1075 Remove(super::RemoveFile),
1076 #[prost(message, tag = "4")]
1077 Restore(super::RestoreFile),
1078 }
1079}
1080#[derive(Clone, PartialEq, ::prost::Message)]
1081pub struct GetFileRequest {
1082 #[prost(string, tag = "1")]
1083 pub drive_rid: ::prost::alloc::string::String,
1084 #[prost(message, optional, tag = "2")]
1085 pub path: ::core::option::Option<LogicalPath>,
1086 #[prost(bool, tag = "3")]
1087 pub include_removed: bool,
1088}
1089#[derive(Clone, PartialEq, ::prost::Message)]
1090pub struct GetFileResponse {
1091 #[prost(message, optional, tag = "1")]
1092 pub file: ::core::option::Option<LogicalFile>,
1093}
1094#[derive(Clone, PartialEq, ::prost::Message)]
1095pub struct ResolveFileRevisionRequest {
1096 #[prost(string, tag = "1")]
1097 pub drive_rid: ::prost::alloc::string::String,
1098 #[prost(message, optional, tag = "2")]
1099 pub source_ref: ::core::option::Option<FileRevisionRef>,
1100}
1101#[derive(Clone, PartialEq, ::prost::Message)]
1102pub struct ResolveFileRevisionResponse {
1103 #[prost(string, tag = "1")]
1104 pub file_revision_rid: ::prost::alloc::string::String,
1105}
1106#[derive(Clone, PartialEq, ::prost::Message)]
1107pub struct ListFilesRequest {
1108 #[prost(string, tag = "1")]
1109 pub drive_rid: ::prost::alloc::string::String,
1110 #[prost(message, optional, tag = "2")]
1111 pub path_prefix: ::core::option::Option<LogicalPath>,
1112 #[prost(bool, tag = "3")]
1113 pub recursive: bool,
1114 #[prost(bool, tag = "4")]
1115 pub include_removed: bool,
1116 #[prost(int32, optional, tag = "5")]
1117 pub page_size: ::core::option::Option<i32>,
1118 #[prost(string, optional, tag = "6")]
1119 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1120}
1121#[derive(Clone, PartialEq, ::prost::Message)]
1122pub struct ListFilesResponse {
1123 #[prost(message, repeated, tag = "1")]
1124 pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1125 #[prost(string, optional, tag = "2")]
1126 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1127}
1128#[derive(Clone, PartialEq, ::prost::Message)]
1129pub struct ApplyFileChangesRequest {
1130 #[prost(string, tag = "1")]
1131 pub drive_rid: ::prost::alloc::string::String,
1132 #[prost(message, repeated, tag = "2")]
1133 pub changes: ::prost::alloc::vec::Vec<FileChange>,
1134}
1135#[derive(Clone, PartialEq, ::prost::Message)]
1136pub struct ApplyFileChangesResponse {
1137 #[prost(message, repeated, tag = "1")]
1138 pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1139}
1140#[derive(Clone, PartialEq, ::prost::Message)]
1141pub struct FileChangeSuccess {
1142 #[prost(message, optional, tag = "1")]
1143 pub file: ::core::option::Option<LogicalFile>,
1144 #[prost(message, optional, tag = "2")]
1145 pub file_revision: ::core::option::Option<ManagedFileRevision>,
1146}
1147#[derive(Clone, PartialEq, ::prost::Message)]
1148pub struct FileChangeFailure {
1149 #[prost(enumeration = "FileStoreError", tag = "1")]
1150 pub code: i32,
1151 #[prost(string, tag = "2")]
1152 pub message: ::prost::alloc::string::String,
1153}
1154#[derive(Clone, PartialEq, ::prost::Message)]
1155pub struct FileChangeResult {
1156 #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1157 pub result: ::core::option::Option<file_change_result::Result>,
1158}
1159pub mod file_change_result {
1161 #[derive(Clone, PartialEq, ::prost::Oneof)]
1162 pub enum Result {
1163 #[prost(message, tag = "1")]
1164 Success(super::FileChangeSuccess),
1165 #[prost(message, tag = "2")]
1166 Failure(super::FileChangeFailure),
1167 }
1168}
1169#[derive(Clone, PartialEq, ::prost::Message)]
1170pub struct ListFileRevisionsRequest {
1171 #[prost(string, tag = "1")]
1172 pub drive_rid: ::prost::alloc::string::String,
1173 #[prost(string, tag = "2")]
1174 pub file_rid: ::prost::alloc::string::String,
1175 #[prost(int32, optional, tag = "3")]
1176 pub page_size: ::core::option::Option<i32>,
1177 #[prost(string, optional, tag = "4")]
1178 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1179}
1180#[derive(Clone, PartialEq, ::prost::Message)]
1181pub struct ListFileRevisionsResponse {
1182 #[prost(message, repeated, tag = "1")]
1183 pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1184 #[prost(string, optional, tag = "2")]
1185 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1186}
1187#[derive(Clone, PartialEq, ::prost::Message)]
1188pub struct PurgeFileRequest {
1189 #[prost(string, tag = "1")]
1190 pub file_revision_rid: ::prost::alloc::string::String,
1191}
1192#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1193pub struct PurgeFileResponse {}
1194pub mod internal_files_service_client {
1196 #![allow(
1197 unused_variables,
1198 dead_code,
1199 missing_docs,
1200 clippy::wildcard_imports,
1201 clippy::let_unit_value,
1202 )]
1203 use tonic::codegen::*;
1204 use tonic::codegen::http::Uri;
1205 #[derive(Debug, Clone)]
1206 pub struct InternalFilesServiceClient<T> {
1207 inner: tonic::client::Grpc<T>,
1208 }
1209 impl InternalFilesServiceClient<tonic::transport::Channel> {
1210 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1212 where
1213 D: TryInto<tonic::transport::Endpoint>,
1214 D::Error: Into<StdError>,
1215 {
1216 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1217 Ok(Self::new(conn))
1218 }
1219 }
1220 impl<T> InternalFilesServiceClient<T>
1221 where
1222 T: tonic::client::GrpcService<tonic::body::Body>,
1223 T::Error: Into<StdError>,
1224 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1225 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1226 {
1227 pub fn new(inner: T) -> Self {
1228 let inner = tonic::client::Grpc::new(inner);
1229 Self { inner }
1230 }
1231 pub fn with_origin(inner: T, origin: Uri) -> Self {
1232 let inner = tonic::client::Grpc::with_origin(inner, origin);
1233 Self { inner }
1234 }
1235 pub fn with_interceptor<F>(
1236 inner: T,
1237 interceptor: F,
1238 ) -> InternalFilesServiceClient<InterceptedService<T, F>>
1239 where
1240 F: tonic::service::Interceptor,
1241 T::ResponseBody: Default,
1242 T: tonic::codegen::Service<
1243 http::Request<tonic::body::Body>,
1244 Response = http::Response<
1245 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1246 >,
1247 >,
1248 <T as tonic::codegen::Service<
1249 http::Request<tonic::body::Body>,
1250 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1251 {
1252 InternalFilesServiceClient::new(InterceptedService::new(inner, interceptor))
1253 }
1254 #[must_use]
1259 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1260 self.inner = self.inner.send_compressed(encoding);
1261 self
1262 }
1263 #[must_use]
1265 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1266 self.inner = self.inner.accept_compressed(encoding);
1267 self
1268 }
1269 #[must_use]
1273 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1274 self.inner = self.inner.max_decoding_message_size(limit);
1275 self
1276 }
1277 #[must_use]
1281 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1282 self.inner = self.inner.max_encoding_message_size(limit);
1283 self
1284 }
1285 pub async fn get_file(
1286 &mut self,
1287 request: impl tonic::IntoRequest<super::GetFileRequest>,
1288 ) -> std::result::Result<
1289 tonic::Response<super::GetFileResponse>,
1290 tonic::Status,
1291 > {
1292 self.inner
1293 .ready()
1294 .await
1295 .map_err(|e| {
1296 tonic::Status::unknown(
1297 format!("Service was not ready: {}", e.into()),
1298 )
1299 })?;
1300 let codec = tonic::codec::ProstCodec::default();
1301 let path = http::uri::PathAndQuery::from_static(
1302 "/nominal.file_store.v1.InternalFilesService/GetFile",
1303 );
1304 let mut req = request.into_request();
1305 req.extensions_mut()
1306 .insert(
1307 GrpcMethod::new(
1308 "nominal.file_store.v1.InternalFilesService",
1309 "GetFile",
1310 ),
1311 );
1312 self.inner.unary(req, path, codec).await
1313 }
1314 pub async fn resolve_file_revision(
1315 &mut self,
1316 request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
1317 ) -> std::result::Result<
1318 tonic::Response<super::ResolveFileRevisionResponse>,
1319 tonic::Status,
1320 > {
1321 self.inner
1322 .ready()
1323 .await
1324 .map_err(|e| {
1325 tonic::Status::unknown(
1326 format!("Service was not ready: {}", e.into()),
1327 )
1328 })?;
1329 let codec = tonic::codec::ProstCodec::default();
1330 let path = http::uri::PathAndQuery::from_static(
1331 "/nominal.file_store.v1.InternalFilesService/ResolveFileRevision",
1332 );
1333 let mut req = request.into_request();
1334 req.extensions_mut()
1335 .insert(
1336 GrpcMethod::new(
1337 "nominal.file_store.v1.InternalFilesService",
1338 "ResolveFileRevision",
1339 ),
1340 );
1341 self.inner.unary(req, path, codec).await
1342 }
1343 pub async fn list_files(
1344 &mut self,
1345 request: impl tonic::IntoRequest<super::ListFilesRequest>,
1346 ) -> std::result::Result<
1347 tonic::Response<super::ListFilesResponse>,
1348 tonic::Status,
1349 > {
1350 self.inner
1351 .ready()
1352 .await
1353 .map_err(|e| {
1354 tonic::Status::unknown(
1355 format!("Service was not ready: {}", e.into()),
1356 )
1357 })?;
1358 let codec = tonic::codec::ProstCodec::default();
1359 let path = http::uri::PathAndQuery::from_static(
1360 "/nominal.file_store.v1.InternalFilesService/ListFiles",
1361 );
1362 let mut req = request.into_request();
1363 req.extensions_mut()
1364 .insert(
1365 GrpcMethod::new(
1366 "nominal.file_store.v1.InternalFilesService",
1367 "ListFiles",
1368 ),
1369 );
1370 self.inner.unary(req, path, codec).await
1371 }
1372 pub async fn apply_file_changes(
1373 &mut self,
1374 request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
1375 ) -> std::result::Result<
1376 tonic::Response<super::ApplyFileChangesResponse>,
1377 tonic::Status,
1378 > {
1379 self.inner
1380 .ready()
1381 .await
1382 .map_err(|e| {
1383 tonic::Status::unknown(
1384 format!("Service was not ready: {}", e.into()),
1385 )
1386 })?;
1387 let codec = tonic::codec::ProstCodec::default();
1388 let path = http::uri::PathAndQuery::from_static(
1389 "/nominal.file_store.v1.InternalFilesService/ApplyFileChanges",
1390 );
1391 let mut req = request.into_request();
1392 req.extensions_mut()
1393 .insert(
1394 GrpcMethod::new(
1395 "nominal.file_store.v1.InternalFilesService",
1396 "ApplyFileChanges",
1397 ),
1398 );
1399 self.inner.unary(req, path, codec).await
1400 }
1401 pub async fn list_file_revisions(
1402 &mut self,
1403 request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
1404 ) -> std::result::Result<
1405 tonic::Response<super::ListFileRevisionsResponse>,
1406 tonic::Status,
1407 > {
1408 self.inner
1409 .ready()
1410 .await
1411 .map_err(|e| {
1412 tonic::Status::unknown(
1413 format!("Service was not ready: {}", e.into()),
1414 )
1415 })?;
1416 let codec = tonic::codec::ProstCodec::default();
1417 let path = http::uri::PathAndQuery::from_static(
1418 "/nominal.file_store.v1.InternalFilesService/ListFileRevisions",
1419 );
1420 let mut req = request.into_request();
1421 req.extensions_mut()
1422 .insert(
1423 GrpcMethod::new(
1424 "nominal.file_store.v1.InternalFilesService",
1425 "ListFileRevisions",
1426 ),
1427 );
1428 self.inner.unary(req, path, codec).await
1429 }
1430 pub async fn purge_file(
1431 &mut self,
1432 request: impl tonic::IntoRequest<super::PurgeFileRequest>,
1433 ) -> std::result::Result<
1434 tonic::Response<super::PurgeFileResponse>,
1435 tonic::Status,
1436 > {
1437 self.inner
1438 .ready()
1439 .await
1440 .map_err(|e| {
1441 tonic::Status::unknown(
1442 format!("Service was not ready: {}", e.into()),
1443 )
1444 })?;
1445 let codec = tonic::codec::ProstCodec::default();
1446 let path = http::uri::PathAndQuery::from_static(
1447 "/nominal.file_store.v1.InternalFilesService/PurgeFile",
1448 );
1449 let mut req = request.into_request();
1450 req.extensions_mut()
1451 .insert(
1452 GrpcMethod::new(
1453 "nominal.file_store.v1.InternalFilesService",
1454 "PurgeFile",
1455 ),
1456 );
1457 self.inner.unary(req, path, codec).await
1458 }
1459 }
1460}