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 parent_path: ::core::option::Option<LogicalPath>,
1112 #[prost(bool, tag = "3")]
1113 pub include_removed: bool,
1114 #[prost(int32, optional, tag = "4")]
1115 pub page_size: ::core::option::Option<i32>,
1116 #[prost(string, optional, tag = "5")]
1117 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1118}
1119#[derive(Clone, PartialEq, ::prost::Message)]
1120pub struct ListFilesResponse {
1121 #[prost(message, repeated, tag = "1")]
1122 pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1123 #[prost(string, optional, tag = "2")]
1124 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1125}
1126#[derive(Clone, PartialEq, ::prost::Message)]
1127pub struct ApplyFileChangesRequest {
1128 #[prost(string, tag = "1")]
1129 pub drive_rid: ::prost::alloc::string::String,
1130 #[prost(message, repeated, tag = "2")]
1131 pub changes: ::prost::alloc::vec::Vec<FileChange>,
1132}
1133#[derive(Clone, PartialEq, ::prost::Message)]
1134pub struct ApplyFileChangesResponse {
1135 #[prost(message, repeated, tag = "1")]
1136 pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1137}
1138#[derive(Clone, PartialEq, ::prost::Message)]
1139pub struct FileChangeSuccess {
1140 #[prost(message, optional, tag = "1")]
1141 pub file: ::core::option::Option<LogicalFile>,
1142 #[prost(message, optional, tag = "2")]
1143 pub file_revision: ::core::option::Option<ManagedFileRevision>,
1144}
1145#[derive(Clone, PartialEq, ::prost::Message)]
1146pub struct FileChangeFailure {
1147 #[prost(enumeration = "FileStoreError", tag = "1")]
1148 pub code: i32,
1149 #[prost(string, tag = "2")]
1150 pub message: ::prost::alloc::string::String,
1151}
1152#[derive(Clone, PartialEq, ::prost::Message)]
1153pub struct FileChangeResult {
1154 #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1155 pub result: ::core::option::Option<file_change_result::Result>,
1156}
1157pub mod file_change_result {
1159 #[derive(Clone, PartialEq, ::prost::Oneof)]
1160 pub enum Result {
1161 #[prost(message, tag = "1")]
1162 Success(super::FileChangeSuccess),
1163 #[prost(message, tag = "2")]
1164 Failure(super::FileChangeFailure),
1165 }
1166}
1167#[derive(Clone, PartialEq, ::prost::Message)]
1168pub struct ListFileRevisionsRequest {
1169 #[prost(string, tag = "1")]
1170 pub drive_rid: ::prost::alloc::string::String,
1171 #[prost(string, tag = "2")]
1172 pub file_rid: ::prost::alloc::string::String,
1173 #[prost(int32, optional, tag = "3")]
1174 pub page_size: ::core::option::Option<i32>,
1175 #[prost(string, optional, tag = "4")]
1176 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1177}
1178#[derive(Clone, PartialEq, ::prost::Message)]
1179pub struct ListFileRevisionsResponse {
1180 #[prost(message, repeated, tag = "1")]
1181 pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1182 #[prost(string, optional, tag = "2")]
1183 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1184}
1185#[derive(Clone, PartialEq, ::prost::Message)]
1186pub struct PurgeFileRequest {
1187 #[prost(string, tag = "1")]
1188 pub file_revision_rid: ::prost::alloc::string::String,
1189}
1190#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1191pub struct PurgeFileResponse {}
1192pub mod internal_files_service_client {
1194 #![allow(
1195 unused_variables,
1196 dead_code,
1197 missing_docs,
1198 clippy::wildcard_imports,
1199 clippy::let_unit_value,
1200 )]
1201 use tonic::codegen::*;
1202 use tonic::codegen::http::Uri;
1203 #[derive(Debug, Clone)]
1204 pub struct InternalFilesServiceClient<T> {
1205 inner: tonic::client::Grpc<T>,
1206 }
1207 impl InternalFilesServiceClient<tonic::transport::Channel> {
1208 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1210 where
1211 D: TryInto<tonic::transport::Endpoint>,
1212 D::Error: Into<StdError>,
1213 {
1214 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1215 Ok(Self::new(conn))
1216 }
1217 }
1218 impl<T> InternalFilesServiceClient<T>
1219 where
1220 T: tonic::client::GrpcService<tonic::body::Body>,
1221 T::Error: Into<StdError>,
1222 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1223 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1224 {
1225 pub fn new(inner: T) -> Self {
1226 let inner = tonic::client::Grpc::new(inner);
1227 Self { inner }
1228 }
1229 pub fn with_origin(inner: T, origin: Uri) -> Self {
1230 let inner = tonic::client::Grpc::with_origin(inner, origin);
1231 Self { inner }
1232 }
1233 pub fn with_interceptor<F>(
1234 inner: T,
1235 interceptor: F,
1236 ) -> InternalFilesServiceClient<InterceptedService<T, F>>
1237 where
1238 F: tonic::service::Interceptor,
1239 T::ResponseBody: Default,
1240 T: tonic::codegen::Service<
1241 http::Request<tonic::body::Body>,
1242 Response = http::Response<
1243 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1244 >,
1245 >,
1246 <T as tonic::codegen::Service<
1247 http::Request<tonic::body::Body>,
1248 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1249 {
1250 InternalFilesServiceClient::new(InterceptedService::new(inner, interceptor))
1251 }
1252 #[must_use]
1257 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1258 self.inner = self.inner.send_compressed(encoding);
1259 self
1260 }
1261 #[must_use]
1263 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1264 self.inner = self.inner.accept_compressed(encoding);
1265 self
1266 }
1267 #[must_use]
1271 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1272 self.inner = self.inner.max_decoding_message_size(limit);
1273 self
1274 }
1275 #[must_use]
1279 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1280 self.inner = self.inner.max_encoding_message_size(limit);
1281 self
1282 }
1283 pub async fn get_file(
1284 &mut self,
1285 request: impl tonic::IntoRequest<super::GetFileRequest>,
1286 ) -> std::result::Result<
1287 tonic::Response<super::GetFileResponse>,
1288 tonic::Status,
1289 > {
1290 self.inner
1291 .ready()
1292 .await
1293 .map_err(|e| {
1294 tonic::Status::unknown(
1295 format!("Service was not ready: {}", e.into()),
1296 )
1297 })?;
1298 let codec = tonic::codec::ProstCodec::default();
1299 let path = http::uri::PathAndQuery::from_static(
1300 "/nominal.file_store.v1.InternalFilesService/GetFile",
1301 );
1302 let mut req = request.into_request();
1303 req.extensions_mut()
1304 .insert(
1305 GrpcMethod::new(
1306 "nominal.file_store.v1.InternalFilesService",
1307 "GetFile",
1308 ),
1309 );
1310 self.inner.unary(req, path, codec).await
1311 }
1312 pub async fn resolve_file_revision(
1313 &mut self,
1314 request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
1315 ) -> std::result::Result<
1316 tonic::Response<super::ResolveFileRevisionResponse>,
1317 tonic::Status,
1318 > {
1319 self.inner
1320 .ready()
1321 .await
1322 .map_err(|e| {
1323 tonic::Status::unknown(
1324 format!("Service was not ready: {}", e.into()),
1325 )
1326 })?;
1327 let codec = tonic::codec::ProstCodec::default();
1328 let path = http::uri::PathAndQuery::from_static(
1329 "/nominal.file_store.v1.InternalFilesService/ResolveFileRevision",
1330 );
1331 let mut req = request.into_request();
1332 req.extensions_mut()
1333 .insert(
1334 GrpcMethod::new(
1335 "nominal.file_store.v1.InternalFilesService",
1336 "ResolveFileRevision",
1337 ),
1338 );
1339 self.inner.unary(req, path, codec).await
1340 }
1341 pub async fn list_files(
1342 &mut self,
1343 request: impl tonic::IntoRequest<super::ListFilesRequest>,
1344 ) -> std::result::Result<
1345 tonic::Response<super::ListFilesResponse>,
1346 tonic::Status,
1347 > {
1348 self.inner
1349 .ready()
1350 .await
1351 .map_err(|e| {
1352 tonic::Status::unknown(
1353 format!("Service was not ready: {}", e.into()),
1354 )
1355 })?;
1356 let codec = tonic::codec::ProstCodec::default();
1357 let path = http::uri::PathAndQuery::from_static(
1358 "/nominal.file_store.v1.InternalFilesService/ListFiles",
1359 );
1360 let mut req = request.into_request();
1361 req.extensions_mut()
1362 .insert(
1363 GrpcMethod::new(
1364 "nominal.file_store.v1.InternalFilesService",
1365 "ListFiles",
1366 ),
1367 );
1368 self.inner.unary(req, path, codec).await
1369 }
1370 pub async fn apply_file_changes(
1371 &mut self,
1372 request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
1373 ) -> std::result::Result<
1374 tonic::Response<super::ApplyFileChangesResponse>,
1375 tonic::Status,
1376 > {
1377 self.inner
1378 .ready()
1379 .await
1380 .map_err(|e| {
1381 tonic::Status::unknown(
1382 format!("Service was not ready: {}", e.into()),
1383 )
1384 })?;
1385 let codec = tonic::codec::ProstCodec::default();
1386 let path = http::uri::PathAndQuery::from_static(
1387 "/nominal.file_store.v1.InternalFilesService/ApplyFileChanges",
1388 );
1389 let mut req = request.into_request();
1390 req.extensions_mut()
1391 .insert(
1392 GrpcMethod::new(
1393 "nominal.file_store.v1.InternalFilesService",
1394 "ApplyFileChanges",
1395 ),
1396 );
1397 self.inner.unary(req, path, codec).await
1398 }
1399 pub async fn list_file_revisions(
1400 &mut self,
1401 request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
1402 ) -> std::result::Result<
1403 tonic::Response<super::ListFileRevisionsResponse>,
1404 tonic::Status,
1405 > {
1406 self.inner
1407 .ready()
1408 .await
1409 .map_err(|e| {
1410 tonic::Status::unknown(
1411 format!("Service was not ready: {}", e.into()),
1412 )
1413 })?;
1414 let codec = tonic::codec::ProstCodec::default();
1415 let path = http::uri::PathAndQuery::from_static(
1416 "/nominal.file_store.v1.InternalFilesService/ListFileRevisions",
1417 );
1418 let mut req = request.into_request();
1419 req.extensions_mut()
1420 .insert(
1421 GrpcMethod::new(
1422 "nominal.file_store.v1.InternalFilesService",
1423 "ListFileRevisions",
1424 ),
1425 );
1426 self.inner.unary(req, path, codec).await
1427 }
1428 pub async fn purge_file(
1429 &mut self,
1430 request: impl tonic::IntoRequest<super::PurgeFileRequest>,
1431 ) -> std::result::Result<
1432 tonic::Response<super::PurgeFileResponse>,
1433 tonic::Status,
1434 > {
1435 self.inner
1436 .ready()
1437 .await
1438 .map_err(|e| {
1439 tonic::Status::unknown(
1440 format!("Service was not ready: {}", e.into()),
1441 )
1442 })?;
1443 let codec = tonic::codec::ProstCodec::default();
1444 let path = http::uri::PathAndQuery::from_static(
1445 "/nominal.file_store.v1.InternalFilesService/PurgeFile",
1446 );
1447 let mut req = request.into_request();
1448 req.extensions_mut()
1449 .insert(
1450 GrpcMethod::new(
1451 "nominal.file_store.v1.InternalFilesService",
1452 "PurgeFile",
1453 ),
1454 );
1455 self.inner.unary(req, path, codec).await
1456 }
1457 }
1458}