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