1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Attribution {
4 #[prost(message, optional, tag = "1")]
5 pub time: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
6 #[prost(string, tag = "2")]
7 pub user_rid: ::prost::alloc::string::String,
8}
9#[derive(Clone, PartialEq, ::prost::Message)]
10pub struct Drive {
11 #[prost(string, tag = "1")]
12 pub rid: ::prost::alloc::string::String,
13 #[prost(string, tag = "2")]
14 pub workspace_rid: ::prost::alloc::string::String,
15 #[prost(string, tag = "3")]
16 pub id: ::prost::alloc::string::String,
17 #[prost(enumeration = "DriveState", tag = "4")]
18 pub state: i32,
19 #[prost(message, optional, tag = "5")]
20 pub created: ::core::option::Option<Attribution>,
21 #[prost(enumeration = "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 DriveIdAlreadyExists = 15,
390}
391impl FileStoreError {
392 pub fn as_str_name(&self) -> &'static str {
397 match self {
398 Self::Unspecified => "FILE_STORE_ERROR_UNSPECIFIED",
399 Self::DriveNotFound => "FILE_STORE_ERROR_DRIVE_NOT_FOUND",
400 Self::FileNotFound => "FILE_STORE_ERROR_FILE_NOT_FOUND",
401 Self::FileRevisionNotFound => "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND",
402 Self::PathAlreadyExists => "FILE_STORE_ERROR_PATH_ALREADY_EXISTS",
403 Self::InvalidLogicalPath => "FILE_STORE_ERROR_INVALID_LOGICAL_PATH",
404 Self::PermissionDenied => "FILE_STORE_ERROR_PERMISSION_DENIED",
405 Self::RevisionPreconditionFailed => {
406 "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED"
407 }
408 Self::VirtualDriveNotFound => "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND",
409 Self::InvalidVirtualDriveConfiguration => {
410 "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION"
411 }
412 Self::ReadOnlyDrive => "FILE_STORE_ERROR_READ_ONLY_DRIVE",
413 Self::FileHistoryNotAvailable => {
414 "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE"
415 }
416 Self::UpstreamUnavailable => "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE",
417 Self::RevisionBytesReclaimed => "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED",
418 Self::UpstreamFileNotFound => "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND",
419 Self::DriveIdAlreadyExists => "FILE_STORE_ERROR_DRIVE_ID_ALREADY_EXISTS",
420 }
421 }
422 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
424 match value {
425 "FILE_STORE_ERROR_UNSPECIFIED" => Some(Self::Unspecified),
426 "FILE_STORE_ERROR_DRIVE_NOT_FOUND" => Some(Self::DriveNotFound),
427 "FILE_STORE_ERROR_FILE_NOT_FOUND" => Some(Self::FileNotFound),
428 "FILE_STORE_ERROR_FILE_REVISION_NOT_FOUND" => {
429 Some(Self::FileRevisionNotFound)
430 }
431 "FILE_STORE_ERROR_PATH_ALREADY_EXISTS" => Some(Self::PathAlreadyExists),
432 "FILE_STORE_ERROR_INVALID_LOGICAL_PATH" => Some(Self::InvalidLogicalPath),
433 "FILE_STORE_ERROR_PERMISSION_DENIED" => Some(Self::PermissionDenied),
434 "FILE_STORE_ERROR_REVISION_PRECONDITION_FAILED" => {
435 Some(Self::RevisionPreconditionFailed)
436 }
437 "FILE_STORE_ERROR_VIRTUAL_DRIVE_NOT_FOUND" => {
438 Some(Self::VirtualDriveNotFound)
439 }
440 "FILE_STORE_ERROR_INVALID_VIRTUAL_DRIVE_CONFIGURATION" => {
441 Some(Self::InvalidVirtualDriveConfiguration)
442 }
443 "FILE_STORE_ERROR_READ_ONLY_DRIVE" => Some(Self::ReadOnlyDrive),
444 "FILE_STORE_ERROR_FILE_HISTORY_NOT_AVAILABLE" => {
445 Some(Self::FileHistoryNotAvailable)
446 }
447 "FILE_STORE_ERROR_UPSTREAM_UNAVAILABLE" => Some(Self::UpstreamUnavailable),
448 "FILE_STORE_ERROR_REVISION_BYTES_RECLAIMED" => {
449 Some(Self::RevisionBytesReclaimed)
450 }
451 "FILE_STORE_ERROR_UPSTREAM_FILE_NOT_FOUND" => {
452 Some(Self::UpstreamFileNotFound)
453 }
454 "FILE_STORE_ERROR_DRIVE_ID_ALREADY_EXISTS" => {
455 Some(Self::DriveIdAlreadyExists)
456 }
457 _ => None,
458 }
459 }
460}
461#[derive(Clone, PartialEq, ::prost::Message)]
462pub struct CreateDriveRequest {
463 #[prost(string, tag = "1")]
464 pub workspace_rid: ::prost::alloc::string::String,
465 #[prost(string, tag = "2")]
466 pub id: ::prost::alloc::string::String,
467}
468#[derive(Clone, PartialEq, ::prost::Message)]
469pub struct CreateDriveResponse {
470 #[prost(message, optional, tag = "1")]
471 pub drive: ::core::option::Option<Drive>,
472}
473#[derive(Clone, PartialEq, ::prost::Message)]
474pub struct CreateVirtualDriveRequest {
475 #[prost(string, tag = "1")]
476 pub workspace_rid: ::prost::alloc::string::String,
477 #[prost(string, tag = "2")]
478 pub id: ::prost::alloc::string::String,
479 #[prost(message, optional, tag = "3")]
480 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
481}
482#[derive(Clone, PartialEq, ::prost::Message)]
483pub struct CreateVirtualDriveResponse {
484 #[prost(message, optional, tag = "1")]
485 pub drive: ::core::option::Option<Drive>,
486 #[prost(message, optional, tag = "2")]
487 pub virtual_drive: ::core::option::Option<VirtualDrive>,
488}
489#[derive(Clone, PartialEq, ::prost::Message)]
490pub struct GetDriveRequest {
491 #[prost(string, tag = "1")]
492 pub drive_rid: ::prost::alloc::string::String,
493}
494#[derive(Clone, PartialEq, ::prost::Message)]
495pub struct GetDriveResponse {
496 #[prost(message, optional, tag = "1")]
497 pub drive: ::core::option::Option<Drive>,
498}
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct GetVirtualDriveRequest {
501 #[prost(string, tag = "1")]
502 pub drive_rid: ::prost::alloc::string::String,
503}
504#[derive(Clone, PartialEq, ::prost::Message)]
505pub struct GetVirtualDriveResponse {
506 #[prost(message, optional, tag = "1")]
507 pub drive: ::core::option::Option<Drive>,
508 #[prost(message, optional, tag = "2")]
509 pub virtual_drive: ::core::option::Option<VirtualDrive>,
510}
511#[derive(Clone, PartialEq, ::prost::Message)]
512pub struct GetDriveByIdRequest {
513 #[prost(string, tag = "1")]
514 pub workspace_rid: ::prost::alloc::string::String,
515 #[prost(string, tag = "2")]
516 pub id: ::prost::alloc::string::String,
517}
518#[derive(Clone, PartialEq, ::prost::Message)]
519pub struct GetDriveByIdResponse {
520 #[prost(message, optional, tag = "1")]
521 pub drive: ::core::option::Option<Drive>,
522}
523#[derive(Clone, PartialEq, ::prost::Message)]
524pub struct GetVirtualDriveByIdRequest {
525 #[prost(string, tag = "1")]
526 pub workspace_rid: ::prost::alloc::string::String,
527 #[prost(string, tag = "2")]
528 pub id: ::prost::alloc::string::String,
529}
530#[derive(Clone, PartialEq, ::prost::Message)]
531pub struct GetVirtualDriveByIdResponse {
532 #[prost(message, optional, tag = "1")]
533 pub drive: ::core::option::Option<Drive>,
534 #[prost(message, optional, tag = "2")]
535 pub virtual_drive: ::core::option::Option<VirtualDrive>,
536}
537#[derive(Clone, PartialEq, ::prost::Message)]
538pub struct ListDrivesRequest {
539 #[prost(string, tag = "1")]
540 pub workspace_rid: ::prost::alloc::string::String,
541 #[prost(bool, tag = "2")]
542 pub include_archived: bool,
543 #[prost(int32, optional, tag = "3")]
544 pub page_size: ::core::option::Option<i32>,
545 #[prost(string, optional, tag = "4")]
546 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
547}
548#[derive(Clone, PartialEq, ::prost::Message)]
549pub struct ListDrivesResponse {
550 #[prost(message, repeated, tag = "1")]
551 pub drives: ::prost::alloc::vec::Vec<Drive>,
552 #[prost(string, optional, tag = "2")]
553 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
554}
555#[derive(Clone, PartialEq, ::prost::Message)]
556pub struct UpdateVirtualDriveRequest {
557 #[prost(string, tag = "1")]
558 pub drive_rid: ::prost::alloc::string::String,
559 #[prost(message, optional, tag = "2")]
560 pub connection_details: ::core::option::Option<VirtualDriveConnectionDetails>,
561}
562#[derive(Clone, PartialEq, ::prost::Message)]
563pub struct UpdateVirtualDriveResponse {
564 #[prost(message, optional, tag = "1")]
565 pub drive: ::core::option::Option<Drive>,
566 #[prost(message, optional, tag = "2")]
567 pub virtual_drive: ::core::option::Option<VirtualDrive>,
568}
569#[derive(Clone, PartialEq, ::prost::Message)]
570pub struct UpdateDriveDetailsRequest {
571 #[prost(string, tag = "1")]
572 pub drive_rid: ::prost::alloc::string::String,
573 #[prost(string, optional, tag = "2")]
574 pub id: ::core::option::Option<::prost::alloc::string::String>,
575}
576#[derive(Clone, PartialEq, ::prost::Message)]
577pub struct UpdateDriveDetailsResponse {
578 #[prost(message, optional, tag = "1")]
579 pub drive: ::core::option::Option<Drive>,
580}
581#[derive(Clone, PartialEq, ::prost::Message)]
582pub struct ArchiveDriveRequest {
583 #[prost(string, tag = "1")]
584 pub drive_rid: ::prost::alloc::string::String,
585}
586#[derive(Clone, PartialEq, ::prost::Message)]
587pub struct ArchiveDriveResponse {
588 #[prost(message, optional, tag = "1")]
589 pub drive: ::core::option::Option<Drive>,
590}
591#[derive(Clone, PartialEq, ::prost::Message)]
592pub struct UnarchiveDriveRequest {
593 #[prost(string, tag = "1")]
594 pub drive_rid: ::prost::alloc::string::String,
595}
596#[derive(Clone, PartialEq, ::prost::Message)]
597pub struct UnarchiveDriveResponse {
598 #[prost(message, optional, tag = "1")]
599 pub drive: ::core::option::Option<Drive>,
600}
601pub mod internal_drives_service_client {
603 #![allow(
604 unused_variables,
605 dead_code,
606 missing_docs,
607 clippy::wildcard_imports,
608 clippy::let_unit_value,
609 )]
610 use tonic::codegen::*;
611 use tonic::codegen::http::Uri;
612 #[derive(Debug, Clone)]
613 pub struct InternalDrivesServiceClient<T> {
614 inner: tonic::client::Grpc<T>,
615 }
616 impl InternalDrivesServiceClient<tonic::transport::Channel> {
617 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
619 where
620 D: TryInto<tonic::transport::Endpoint>,
621 D::Error: Into<StdError>,
622 {
623 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
624 Ok(Self::new(conn))
625 }
626 }
627 impl<T> InternalDrivesServiceClient<T>
628 where
629 T: tonic::client::GrpcService<tonic::body::Body>,
630 T::Error: Into<StdError>,
631 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
632 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
633 {
634 pub fn new(inner: T) -> Self {
635 let inner = tonic::client::Grpc::new(inner);
636 Self { inner }
637 }
638 pub fn with_origin(inner: T, origin: Uri) -> Self {
639 let inner = tonic::client::Grpc::with_origin(inner, origin);
640 Self { inner }
641 }
642 pub fn with_interceptor<F>(
643 inner: T,
644 interceptor: F,
645 ) -> InternalDrivesServiceClient<InterceptedService<T, F>>
646 where
647 F: tonic::service::Interceptor,
648 T::ResponseBody: Default,
649 T: tonic::codegen::Service<
650 http::Request<tonic::body::Body>,
651 Response = http::Response<
652 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
653 >,
654 >,
655 <T as tonic::codegen::Service<
656 http::Request<tonic::body::Body>,
657 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
658 {
659 InternalDrivesServiceClient::new(InterceptedService::new(inner, interceptor))
660 }
661 #[must_use]
666 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
667 self.inner = self.inner.send_compressed(encoding);
668 self
669 }
670 #[must_use]
672 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
673 self.inner = self.inner.accept_compressed(encoding);
674 self
675 }
676 #[must_use]
680 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
681 self.inner = self.inner.max_decoding_message_size(limit);
682 self
683 }
684 #[must_use]
688 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
689 self.inner = self.inner.max_encoding_message_size(limit);
690 self
691 }
692 pub async fn create_drive(
693 &mut self,
694 request: impl tonic::IntoRequest<super::CreateDriveRequest>,
695 ) -> std::result::Result<
696 tonic::Response<super::CreateDriveResponse>,
697 tonic::Status,
698 > {
699 self.inner
700 .ready()
701 .await
702 .map_err(|e| {
703 tonic::Status::unknown(
704 format!("Service was not ready: {}", e.into()),
705 )
706 })?;
707 let codec = tonic::codec::ProstCodec::default();
708 let path = http::uri::PathAndQuery::from_static(
709 "/nominal.file_store.v1.InternalDrivesService/CreateDrive",
710 );
711 let mut req = request.into_request();
712 req.extensions_mut()
713 .insert(
714 GrpcMethod::new(
715 "nominal.file_store.v1.InternalDrivesService",
716 "CreateDrive",
717 ),
718 );
719 self.inner.unary(req, path, codec).await
720 }
721 pub async fn create_virtual_drive(
722 &mut self,
723 request: impl tonic::IntoRequest<super::CreateVirtualDriveRequest>,
724 ) -> std::result::Result<
725 tonic::Response<super::CreateVirtualDriveResponse>,
726 tonic::Status,
727 > {
728 self.inner
729 .ready()
730 .await
731 .map_err(|e| {
732 tonic::Status::unknown(
733 format!("Service was not ready: {}", e.into()),
734 )
735 })?;
736 let codec = tonic::codec::ProstCodec::default();
737 let path = http::uri::PathAndQuery::from_static(
738 "/nominal.file_store.v1.InternalDrivesService/CreateVirtualDrive",
739 );
740 let mut req = request.into_request();
741 req.extensions_mut()
742 .insert(
743 GrpcMethod::new(
744 "nominal.file_store.v1.InternalDrivesService",
745 "CreateVirtualDrive",
746 ),
747 );
748 self.inner.unary(req, path, codec).await
749 }
750 pub async fn get_drive(
751 &mut self,
752 request: impl tonic::IntoRequest<super::GetDriveRequest>,
753 ) -> std::result::Result<
754 tonic::Response<super::GetDriveResponse>,
755 tonic::Status,
756 > {
757 self.inner
758 .ready()
759 .await
760 .map_err(|e| {
761 tonic::Status::unknown(
762 format!("Service was not ready: {}", e.into()),
763 )
764 })?;
765 let codec = tonic::codec::ProstCodec::default();
766 let path = http::uri::PathAndQuery::from_static(
767 "/nominal.file_store.v1.InternalDrivesService/GetDrive",
768 );
769 let mut req = request.into_request();
770 req.extensions_mut()
771 .insert(
772 GrpcMethod::new(
773 "nominal.file_store.v1.InternalDrivesService",
774 "GetDrive",
775 ),
776 );
777 self.inner.unary(req, path, codec).await
778 }
779 pub async fn get_virtual_drive(
780 &mut self,
781 request: impl tonic::IntoRequest<super::GetVirtualDriveRequest>,
782 ) -> std::result::Result<
783 tonic::Response<super::GetVirtualDriveResponse>,
784 tonic::Status,
785 > {
786 self.inner
787 .ready()
788 .await
789 .map_err(|e| {
790 tonic::Status::unknown(
791 format!("Service was not ready: {}", e.into()),
792 )
793 })?;
794 let codec = tonic::codec::ProstCodec::default();
795 let path = http::uri::PathAndQuery::from_static(
796 "/nominal.file_store.v1.InternalDrivesService/GetVirtualDrive",
797 );
798 let mut req = request.into_request();
799 req.extensions_mut()
800 .insert(
801 GrpcMethod::new(
802 "nominal.file_store.v1.InternalDrivesService",
803 "GetVirtualDrive",
804 ),
805 );
806 self.inner.unary(req, path, codec).await
807 }
808 pub async fn get_drive_by_id(
809 &mut self,
810 request: impl tonic::IntoRequest<super::GetDriveByIdRequest>,
811 ) -> std::result::Result<
812 tonic::Response<super::GetDriveByIdResponse>,
813 tonic::Status,
814 > {
815 self.inner
816 .ready()
817 .await
818 .map_err(|e| {
819 tonic::Status::unknown(
820 format!("Service was not ready: {}", e.into()),
821 )
822 })?;
823 let codec = tonic::codec::ProstCodec::default();
824 let path = http::uri::PathAndQuery::from_static(
825 "/nominal.file_store.v1.InternalDrivesService/GetDriveById",
826 );
827 let mut req = request.into_request();
828 req.extensions_mut()
829 .insert(
830 GrpcMethod::new(
831 "nominal.file_store.v1.InternalDrivesService",
832 "GetDriveById",
833 ),
834 );
835 self.inner.unary(req, path, codec).await
836 }
837 pub async fn get_virtual_drive_by_id(
838 &mut self,
839 request: impl tonic::IntoRequest<super::GetVirtualDriveByIdRequest>,
840 ) -> std::result::Result<
841 tonic::Response<super::GetVirtualDriveByIdResponse>,
842 tonic::Status,
843 > {
844 self.inner
845 .ready()
846 .await
847 .map_err(|e| {
848 tonic::Status::unknown(
849 format!("Service was not ready: {}", e.into()),
850 )
851 })?;
852 let codec = tonic::codec::ProstCodec::default();
853 let path = http::uri::PathAndQuery::from_static(
854 "/nominal.file_store.v1.InternalDrivesService/GetVirtualDriveById",
855 );
856 let mut req = request.into_request();
857 req.extensions_mut()
858 .insert(
859 GrpcMethod::new(
860 "nominal.file_store.v1.InternalDrivesService",
861 "GetVirtualDriveById",
862 ),
863 );
864 self.inner.unary(req, path, codec).await
865 }
866 pub async fn list_drives(
867 &mut self,
868 request: impl tonic::IntoRequest<super::ListDrivesRequest>,
869 ) -> std::result::Result<
870 tonic::Response<super::ListDrivesResponse>,
871 tonic::Status,
872 > {
873 self.inner
874 .ready()
875 .await
876 .map_err(|e| {
877 tonic::Status::unknown(
878 format!("Service was not ready: {}", e.into()),
879 )
880 })?;
881 let codec = tonic::codec::ProstCodec::default();
882 let path = http::uri::PathAndQuery::from_static(
883 "/nominal.file_store.v1.InternalDrivesService/ListDrives",
884 );
885 let mut req = request.into_request();
886 req.extensions_mut()
887 .insert(
888 GrpcMethod::new(
889 "nominal.file_store.v1.InternalDrivesService",
890 "ListDrives",
891 ),
892 );
893 self.inner.unary(req, path, codec).await
894 }
895 pub async fn update_virtual_drive(
896 &mut self,
897 request: impl tonic::IntoRequest<super::UpdateVirtualDriveRequest>,
898 ) -> std::result::Result<
899 tonic::Response<super::UpdateVirtualDriveResponse>,
900 tonic::Status,
901 > {
902 self.inner
903 .ready()
904 .await
905 .map_err(|e| {
906 tonic::Status::unknown(
907 format!("Service was not ready: {}", e.into()),
908 )
909 })?;
910 let codec = tonic::codec::ProstCodec::default();
911 let path = http::uri::PathAndQuery::from_static(
912 "/nominal.file_store.v1.InternalDrivesService/UpdateVirtualDrive",
913 );
914 let mut req = request.into_request();
915 req.extensions_mut()
916 .insert(
917 GrpcMethod::new(
918 "nominal.file_store.v1.InternalDrivesService",
919 "UpdateVirtualDrive",
920 ),
921 );
922 self.inner.unary(req, path, codec).await
923 }
924 pub async fn update_drive_details(
925 &mut self,
926 request: impl tonic::IntoRequest<super::UpdateDriveDetailsRequest>,
927 ) -> std::result::Result<
928 tonic::Response<super::UpdateDriveDetailsResponse>,
929 tonic::Status,
930 > {
931 self.inner
932 .ready()
933 .await
934 .map_err(|e| {
935 tonic::Status::unknown(
936 format!("Service was not ready: {}", e.into()),
937 )
938 })?;
939 let codec = tonic::codec::ProstCodec::default();
940 let path = http::uri::PathAndQuery::from_static(
941 "/nominal.file_store.v1.InternalDrivesService/UpdateDriveDetails",
942 );
943 let mut req = request.into_request();
944 req.extensions_mut()
945 .insert(
946 GrpcMethod::new(
947 "nominal.file_store.v1.InternalDrivesService",
948 "UpdateDriveDetails",
949 ),
950 );
951 self.inner.unary(req, path, codec).await
952 }
953 pub async fn archive_drive(
954 &mut self,
955 request: impl tonic::IntoRequest<super::ArchiveDriveRequest>,
956 ) -> std::result::Result<
957 tonic::Response<super::ArchiveDriveResponse>,
958 tonic::Status,
959 > {
960 self.inner
961 .ready()
962 .await
963 .map_err(|e| {
964 tonic::Status::unknown(
965 format!("Service was not ready: {}", e.into()),
966 )
967 })?;
968 let codec = tonic::codec::ProstCodec::default();
969 let path = http::uri::PathAndQuery::from_static(
970 "/nominal.file_store.v1.InternalDrivesService/ArchiveDrive",
971 );
972 let mut req = request.into_request();
973 req.extensions_mut()
974 .insert(
975 GrpcMethod::new(
976 "nominal.file_store.v1.InternalDrivesService",
977 "ArchiveDrive",
978 ),
979 );
980 self.inner.unary(req, path, codec).await
981 }
982 pub async fn unarchive_drive(
983 &mut self,
984 request: impl tonic::IntoRequest<super::UnarchiveDriveRequest>,
985 ) -> std::result::Result<
986 tonic::Response<super::UnarchiveDriveResponse>,
987 tonic::Status,
988 > {
989 self.inner
990 .ready()
991 .await
992 .map_err(|e| {
993 tonic::Status::unknown(
994 format!("Service was not ready: {}", e.into()),
995 )
996 })?;
997 let codec = tonic::codec::ProstCodec::default();
998 let path = http::uri::PathAndQuery::from_static(
999 "/nominal.file_store.v1.InternalDrivesService/UnarchiveDrive",
1000 );
1001 let mut req = request.into_request();
1002 req.extensions_mut()
1003 .insert(
1004 GrpcMethod::new(
1005 "nominal.file_store.v1.InternalDrivesService",
1006 "UnarchiveDrive",
1007 ),
1008 );
1009 self.inner.unary(req, path, codec).await
1010 }
1011 }
1012}
1013#[derive(Clone, PartialEq, ::prost::Message)]
1014pub struct UploadedObjectRef {
1015 #[prost(string, tag = "1")]
1016 pub s3_path: ::prost::alloc::string::String,
1017}
1018#[derive(Clone, PartialEq, ::prost::Message)]
1019pub struct PathTarget {
1020 #[prost(message, optional, tag = "1")]
1021 pub path: ::core::option::Option<LogicalPath>,
1022}
1023#[derive(Clone, PartialEq, ::prost::Message)]
1024pub struct Destination {
1025 #[prost(oneof = "destination::Target", tags = "1, 2")]
1026 pub target: ::core::option::Option<destination::Target>,
1027}
1028pub mod destination {
1030 #[derive(Clone, PartialEq, ::prost::Oneof)]
1031 pub enum Target {
1032 #[prost(message, tag = "1")]
1033 Path(super::PathTarget),
1034 #[prost(string, tag = "2")]
1035 FileRevisionRid(::prost::alloc::string::String),
1036 }
1037}
1038#[derive(Clone, PartialEq, ::prost::Message)]
1039pub struct PutFile {
1040 #[prost(message, optional, tag = "1")]
1041 pub object: ::core::option::Option<UploadedObjectRef>,
1042 #[prost(uint64, tag = "2")]
1043 pub size_bytes: u64,
1044 #[prost(message, optional, tag = "3")]
1045 pub destination: ::core::option::Option<Destination>,
1046}
1047#[derive(Clone, PartialEq, ::prost::Message)]
1048pub struct MoveFile {
1049 #[prost(string, tag = "1")]
1050 pub source_revision_rid: ::prost::alloc::string::String,
1051 #[prost(message, optional, tag = "2")]
1052 pub destination: ::core::option::Option<Destination>,
1053}
1054#[derive(Clone, PartialEq, ::prost::Message)]
1055pub struct RemoveFile {
1056 #[prost(string, tag = "1")]
1057 pub revision_rid: ::prost::alloc::string::String,
1058}
1059#[derive(Clone, PartialEq, ::prost::Message)]
1060pub struct RestoreFile {
1061 #[prost(string, tag = "1")]
1062 pub restore_revision_rid: ::prost::alloc::string::String,
1063 #[prost(message, optional, tag = "2")]
1064 pub destination: ::core::option::Option<Destination>,
1065}
1066#[derive(Clone, PartialEq, ::prost::Message)]
1067pub struct FileChange {
1068 #[prost(oneof = "file_change::Change", tags = "1, 2, 3, 4")]
1069 pub change: ::core::option::Option<file_change::Change>,
1070}
1071pub mod file_change {
1073 #[derive(Clone, PartialEq, ::prost::Oneof)]
1074 pub enum Change {
1075 #[prost(message, tag = "1")]
1076 Put(super::PutFile),
1077 #[prost(message, tag = "2")]
1078 Move(super::MoveFile),
1079 #[prost(message, tag = "3")]
1080 Remove(super::RemoveFile),
1081 #[prost(message, tag = "4")]
1082 Restore(super::RestoreFile),
1083 }
1084}
1085#[derive(Clone, PartialEq, ::prost::Message)]
1086pub struct GetFileRequest {
1087 #[prost(string, tag = "1")]
1088 pub drive_rid: ::prost::alloc::string::String,
1089 #[prost(message, optional, tag = "2")]
1090 pub path: ::core::option::Option<LogicalPath>,
1091 #[prost(bool, tag = "3")]
1092 pub include_removed: bool,
1093}
1094#[derive(Clone, PartialEq, ::prost::Message)]
1095pub struct GetFileResponse {
1096 #[prost(message, optional, tag = "1")]
1097 pub file: ::core::option::Option<LogicalFile>,
1098}
1099#[derive(Clone, PartialEq, ::prost::Message)]
1100pub struct ResolveFileRevisionRequest {
1101 #[prost(string, tag = "1")]
1102 pub drive_rid: ::prost::alloc::string::String,
1103 #[prost(message, optional, tag = "2")]
1104 pub source_ref: ::core::option::Option<FileRevisionRef>,
1105}
1106#[derive(Clone, PartialEq, ::prost::Message)]
1107pub struct ResolveFileRevisionResponse {
1108 #[prost(string, tag = "1")]
1109 pub file_revision_rid: ::prost::alloc::string::String,
1110}
1111#[derive(Clone, PartialEq, ::prost::Message)]
1112pub struct ListFilesRequest {
1113 #[prost(string, tag = "1")]
1114 pub drive_rid: ::prost::alloc::string::String,
1115 #[prost(message, optional, tag = "2")]
1116 pub parent_path: ::core::option::Option<LogicalPath>,
1117 #[prost(bool, tag = "3")]
1118 pub include_removed: bool,
1119 #[prost(int32, optional, tag = "4")]
1120 pub page_size: ::core::option::Option<i32>,
1121 #[prost(string, optional, tag = "5")]
1122 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1123}
1124#[derive(Clone, PartialEq, ::prost::Message)]
1125pub struct ListFilesResponse {
1126 #[prost(message, repeated, tag = "1")]
1127 pub entries: ::prost::alloc::vec::Vec<FileEntry>,
1128 #[prost(string, optional, tag = "2")]
1129 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1130}
1131#[derive(Clone, PartialEq, ::prost::Message)]
1132pub struct ApplyFileChangesRequest {
1133 #[prost(string, tag = "1")]
1134 pub drive_rid: ::prost::alloc::string::String,
1135 #[prost(message, repeated, tag = "2")]
1136 pub changes: ::prost::alloc::vec::Vec<FileChange>,
1137}
1138#[derive(Clone, PartialEq, ::prost::Message)]
1139pub struct ApplyFileChangesResponse {
1140 #[prost(message, repeated, tag = "1")]
1141 pub results: ::prost::alloc::vec::Vec<FileChangeResult>,
1142}
1143#[derive(Clone, PartialEq, ::prost::Message)]
1144pub struct FileChangeSuccess {
1145 #[prost(message, optional, tag = "1")]
1146 pub file: ::core::option::Option<LogicalFile>,
1147 #[prost(message, optional, tag = "2")]
1148 pub file_revision: ::core::option::Option<ManagedFileRevision>,
1149}
1150#[derive(Clone, PartialEq, ::prost::Message)]
1151pub struct FileChangeFailure {
1152 #[prost(enumeration = "FileStoreError", tag = "1")]
1153 pub code: i32,
1154 #[prost(string, tag = "2")]
1155 pub message: ::prost::alloc::string::String,
1156}
1157#[derive(Clone, PartialEq, ::prost::Message)]
1158pub struct FileChangeResult {
1159 #[prost(oneof = "file_change_result::Result", tags = "1, 2")]
1160 pub result: ::core::option::Option<file_change_result::Result>,
1161}
1162pub mod file_change_result {
1164 #[derive(Clone, PartialEq, ::prost::Oneof)]
1165 pub enum Result {
1166 #[prost(message, tag = "1")]
1167 Success(super::FileChangeSuccess),
1168 #[prost(message, tag = "2")]
1169 Failure(super::FileChangeFailure),
1170 }
1171}
1172#[derive(Clone, PartialEq, ::prost::Message)]
1173pub struct ListFileRevisionsRequest {
1174 #[prost(string, tag = "1")]
1175 pub drive_rid: ::prost::alloc::string::String,
1176 #[prost(string, tag = "2")]
1177 pub file_rid: ::prost::alloc::string::String,
1178 #[prost(int32, optional, tag = "3")]
1179 pub page_size: ::core::option::Option<i32>,
1180 #[prost(string, optional, tag = "4")]
1181 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
1182}
1183#[derive(Clone, PartialEq, ::prost::Message)]
1184pub struct ListFileRevisionsResponse {
1185 #[prost(message, repeated, tag = "1")]
1186 pub file_revisions: ::prost::alloc::vec::Vec<ManagedFileRevision>,
1187 #[prost(string, optional, tag = "2")]
1188 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
1189}
1190#[derive(Clone, PartialEq, ::prost::Message)]
1191pub struct PurgeFileRequest {
1192 #[prost(string, tag = "1")]
1193 pub file_revision_rid: ::prost::alloc::string::String,
1194}
1195#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1196pub struct PurgeFileResponse {}
1197pub mod internal_files_service_client {
1199 #![allow(
1200 unused_variables,
1201 dead_code,
1202 missing_docs,
1203 clippy::wildcard_imports,
1204 clippy::let_unit_value,
1205 )]
1206 use tonic::codegen::*;
1207 use tonic::codegen::http::Uri;
1208 #[derive(Debug, Clone)]
1209 pub struct InternalFilesServiceClient<T> {
1210 inner: tonic::client::Grpc<T>,
1211 }
1212 impl InternalFilesServiceClient<tonic::transport::Channel> {
1213 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1215 where
1216 D: TryInto<tonic::transport::Endpoint>,
1217 D::Error: Into<StdError>,
1218 {
1219 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1220 Ok(Self::new(conn))
1221 }
1222 }
1223 impl<T> InternalFilesServiceClient<T>
1224 where
1225 T: tonic::client::GrpcService<tonic::body::Body>,
1226 T::Error: Into<StdError>,
1227 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1228 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1229 {
1230 pub fn new(inner: T) -> Self {
1231 let inner = tonic::client::Grpc::new(inner);
1232 Self { inner }
1233 }
1234 pub fn with_origin(inner: T, origin: Uri) -> Self {
1235 let inner = tonic::client::Grpc::with_origin(inner, origin);
1236 Self { inner }
1237 }
1238 pub fn with_interceptor<F>(
1239 inner: T,
1240 interceptor: F,
1241 ) -> InternalFilesServiceClient<InterceptedService<T, F>>
1242 where
1243 F: tonic::service::Interceptor,
1244 T::ResponseBody: Default,
1245 T: tonic::codegen::Service<
1246 http::Request<tonic::body::Body>,
1247 Response = http::Response<
1248 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1249 >,
1250 >,
1251 <T as tonic::codegen::Service<
1252 http::Request<tonic::body::Body>,
1253 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1254 {
1255 InternalFilesServiceClient::new(InterceptedService::new(inner, interceptor))
1256 }
1257 #[must_use]
1262 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1263 self.inner = self.inner.send_compressed(encoding);
1264 self
1265 }
1266 #[must_use]
1268 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1269 self.inner = self.inner.accept_compressed(encoding);
1270 self
1271 }
1272 #[must_use]
1276 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1277 self.inner = self.inner.max_decoding_message_size(limit);
1278 self
1279 }
1280 #[must_use]
1284 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1285 self.inner = self.inner.max_encoding_message_size(limit);
1286 self
1287 }
1288 pub async fn get_file(
1289 &mut self,
1290 request: impl tonic::IntoRequest<super::GetFileRequest>,
1291 ) -> std::result::Result<
1292 tonic::Response<super::GetFileResponse>,
1293 tonic::Status,
1294 > {
1295 self.inner
1296 .ready()
1297 .await
1298 .map_err(|e| {
1299 tonic::Status::unknown(
1300 format!("Service was not ready: {}", e.into()),
1301 )
1302 })?;
1303 let codec = tonic::codec::ProstCodec::default();
1304 let path = http::uri::PathAndQuery::from_static(
1305 "/nominal.file_store.v1.InternalFilesService/GetFile",
1306 );
1307 let mut req = request.into_request();
1308 req.extensions_mut()
1309 .insert(
1310 GrpcMethod::new(
1311 "nominal.file_store.v1.InternalFilesService",
1312 "GetFile",
1313 ),
1314 );
1315 self.inner.unary(req, path, codec).await
1316 }
1317 pub async fn resolve_file_revision(
1318 &mut self,
1319 request: impl tonic::IntoRequest<super::ResolveFileRevisionRequest>,
1320 ) -> std::result::Result<
1321 tonic::Response<super::ResolveFileRevisionResponse>,
1322 tonic::Status,
1323 > {
1324 self.inner
1325 .ready()
1326 .await
1327 .map_err(|e| {
1328 tonic::Status::unknown(
1329 format!("Service was not ready: {}", e.into()),
1330 )
1331 })?;
1332 let codec = tonic::codec::ProstCodec::default();
1333 let path = http::uri::PathAndQuery::from_static(
1334 "/nominal.file_store.v1.InternalFilesService/ResolveFileRevision",
1335 );
1336 let mut req = request.into_request();
1337 req.extensions_mut()
1338 .insert(
1339 GrpcMethod::new(
1340 "nominal.file_store.v1.InternalFilesService",
1341 "ResolveFileRevision",
1342 ),
1343 );
1344 self.inner.unary(req, path, codec).await
1345 }
1346 pub async fn list_files(
1347 &mut self,
1348 request: impl tonic::IntoRequest<super::ListFilesRequest>,
1349 ) -> std::result::Result<
1350 tonic::Response<super::ListFilesResponse>,
1351 tonic::Status,
1352 > {
1353 self.inner
1354 .ready()
1355 .await
1356 .map_err(|e| {
1357 tonic::Status::unknown(
1358 format!("Service was not ready: {}", e.into()),
1359 )
1360 })?;
1361 let codec = tonic::codec::ProstCodec::default();
1362 let path = http::uri::PathAndQuery::from_static(
1363 "/nominal.file_store.v1.InternalFilesService/ListFiles",
1364 );
1365 let mut req = request.into_request();
1366 req.extensions_mut()
1367 .insert(
1368 GrpcMethod::new(
1369 "nominal.file_store.v1.InternalFilesService",
1370 "ListFiles",
1371 ),
1372 );
1373 self.inner.unary(req, path, codec).await
1374 }
1375 pub async fn apply_file_changes(
1376 &mut self,
1377 request: impl tonic::IntoRequest<super::ApplyFileChangesRequest>,
1378 ) -> std::result::Result<
1379 tonic::Response<super::ApplyFileChangesResponse>,
1380 tonic::Status,
1381 > {
1382 self.inner
1383 .ready()
1384 .await
1385 .map_err(|e| {
1386 tonic::Status::unknown(
1387 format!("Service was not ready: {}", e.into()),
1388 )
1389 })?;
1390 let codec = tonic::codec::ProstCodec::default();
1391 let path = http::uri::PathAndQuery::from_static(
1392 "/nominal.file_store.v1.InternalFilesService/ApplyFileChanges",
1393 );
1394 let mut req = request.into_request();
1395 req.extensions_mut()
1396 .insert(
1397 GrpcMethod::new(
1398 "nominal.file_store.v1.InternalFilesService",
1399 "ApplyFileChanges",
1400 ),
1401 );
1402 self.inner.unary(req, path, codec).await
1403 }
1404 pub async fn list_file_revisions(
1405 &mut self,
1406 request: impl tonic::IntoRequest<super::ListFileRevisionsRequest>,
1407 ) -> std::result::Result<
1408 tonic::Response<super::ListFileRevisionsResponse>,
1409 tonic::Status,
1410 > {
1411 self.inner
1412 .ready()
1413 .await
1414 .map_err(|e| {
1415 tonic::Status::unknown(
1416 format!("Service was not ready: {}", e.into()),
1417 )
1418 })?;
1419 let codec = tonic::codec::ProstCodec::default();
1420 let path = http::uri::PathAndQuery::from_static(
1421 "/nominal.file_store.v1.InternalFilesService/ListFileRevisions",
1422 );
1423 let mut req = request.into_request();
1424 req.extensions_mut()
1425 .insert(
1426 GrpcMethod::new(
1427 "nominal.file_store.v1.InternalFilesService",
1428 "ListFileRevisions",
1429 ),
1430 );
1431 self.inner.unary(req, path, codec).await
1432 }
1433 pub async fn purge_file(
1434 &mut self,
1435 request: impl tonic::IntoRequest<super::PurgeFileRequest>,
1436 ) -> std::result::Result<
1437 tonic::Response<super::PurgeFileResponse>,
1438 tonic::Status,
1439 > {
1440 self.inner
1441 .ready()
1442 .await
1443 .map_err(|e| {
1444 tonic::Status::unknown(
1445 format!("Service was not ready: {}", e.into()),
1446 )
1447 })?;
1448 let codec = tonic::codec::ProstCodec::default();
1449 let path = http::uri::PathAndQuery::from_static(
1450 "/nominal.file_store.v1.InternalFilesService/PurgeFile",
1451 );
1452 let mut req = request.into_request();
1453 req.extensions_mut()
1454 .insert(
1455 GrpcMethod::new(
1456 "nominal.file_store.v1.InternalFilesService",
1457 "PurgeFile",
1458 ),
1459 );
1460 self.inner.unary(req, path, codec).await
1461 }
1462 }
1463}