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