1#[derive(serde::Deserialize, serde::Serialize)]
4#[allow(clippy::derive_partial_eq_without_eq)]
5#[derive(Clone, PartialEq, ::prost::Message)]
6pub struct InitMessage {
7 #[prost(string, tag = "1")]
8 pub dataproxy_id: ::prost::alloc::string::String,
9 #[prost(string, repeated, tag = "2")]
10 pub object_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
11}
12#[derive(serde::Deserialize, serde::Serialize)]
13#[allow(clippy::derive_partial_eq_without_eq)]
14#[derive(Clone, PartialEq, ::prost::Message)]
15pub struct InfoAckMessage {
16 #[prost(string, tag = "1")]
17 pub object_id: ::prost::alloc::string::String,
18}
19#[derive(serde::Deserialize, serde::Serialize)]
20#[allow(clippy::derive_partial_eq_without_eq)]
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct ChunkAckMessage {
23 #[prost(string, tag = "1")]
24 pub object_id: ::prost::alloc::string::String,
25 #[prost(int64, tag = "2")]
26 pub chunk_idx: i64,
27}
28#[derive(serde::Deserialize, serde::Serialize)]
29#[allow(clippy::derive_partial_eq_without_eq)]
30#[derive(Clone, PartialEq, ::prost::Message)]
31pub struct RetryChunkMessage {
32 #[prost(string, tag = "1")]
33 pub object_id: ::prost::alloc::string::String,
34 #[prost(int64, tag = "2")]
35 pub chunk_idx: i64,
36}
37#[derive(serde::Deserialize, serde::Serialize)]
38#[allow(clippy::derive_partial_eq_without_eq)]
39#[derive(Clone, PartialEq, ::prost::Message)]
40pub struct Empty {}
41#[derive(serde::Deserialize, serde::Serialize)]
42#[allow(clippy::derive_partial_eq_without_eq)]
43#[derive(Clone, PartialEq, ::prost::Message)]
44pub struct ErrorMessage {
45 #[prost(oneof = "error_message::Error", tags = "1, 2, 3")]
46 pub error: ::core::option::Option<error_message::Error>,
47}
48pub mod error_message {
50 #[derive(serde::Deserialize, serde::Serialize)]
51 #[allow(clippy::derive_partial_eq_without_eq)]
52 #[derive(Clone, PartialEq, ::prost::Oneof)]
53 pub enum Error {
54 #[prost(message, tag = "1")]
55 RetryChunk(super::RetryChunkMessage),
56 #[prost(message, tag = "2")]
57 Abort(super::Empty),
58 #[prost(string, tag = "3")]
59 RetryObjectId(::prost::alloc::string::String),
60 }
61}
62#[derive(serde::Deserialize, serde::Serialize)]
63#[allow(clippy::derive_partial_eq_without_eq)]
64#[derive(Clone, PartialEq, ::prost::Message)]
65pub struct PullReplicationRequest {
66 #[prost(oneof = "pull_replication_request::Message", tags = "1, 2, 3, 4, 5")]
67 pub message: ::core::option::Option<pull_replication_request::Message>,
68}
69pub mod pull_replication_request {
71 #[derive(serde::Deserialize, serde::Serialize)]
72 #[allow(clippy::derive_partial_eq_without_eq)]
73 #[derive(Clone, PartialEq, ::prost::Oneof)]
74 pub enum Message {
75 #[prost(message, tag = "1")]
76 InitMessage(super::InitMessage),
77 #[prost(message, tag = "2")]
78 InfoAckMessage(super::InfoAckMessage),
79 #[prost(message, tag = "3")]
80 ChunkAckMessage(super::ChunkAckMessage),
81 #[prost(message, tag = "4")]
82 ErrorMessage(super::ErrorMessage),
83 #[prost(message, tag = "5")]
84 FinishMessage(super::Empty),
85 }
86}
87#[derive(serde::Deserialize, serde::Serialize)]
88#[allow(clippy::derive_partial_eq_without_eq)]
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct Handshake {}
91#[derive(serde::Deserialize, serde::Serialize)]
93#[allow(clippy::derive_partial_eq_without_eq)]
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct Skip {
96 #[prost(string, tag = "1")]
97 pub object_id: ::prost::alloc::string::String,
98}
99#[derive(serde::Deserialize, serde::Serialize)]
100#[allow(clippy::derive_partial_eq_without_eq)]
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct ObjectInfo {
103 #[prost(string, tag = "1")]
104 pub object_id: ::prost::alloc::string::String,
105 #[prost(int64, tag = "2")]
107 pub chunks: i64,
108 #[prost(int64, tag = "3")]
109 pub raw_size: i64,
110 #[prost(int64, tag = "4")]
111 pub compressed_size: i64,
112 #[prost(string, optional, tag = "5")]
114 pub extra: ::core::option::Option<::prost::alloc::string::String>,
115}
116#[derive(serde::Deserialize, serde::Serialize)]
117#[allow(clippy::derive_partial_eq_without_eq)]
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct Chunk {
120 #[prost(string, tag = "1")]
121 pub object_id: ::prost::alloc::string::String,
122 #[prost(int64, tag = "2")]
123 pub chunk_idx: i64,
124 #[prost(bytes = "vec", tag = "3")]
125 pub data: ::prost::alloc::vec::Vec<u8>,
126 #[prost(string, tag = "4")]
127 pub checksum: ::prost::alloc::string::String,
128}
129#[derive(serde::Deserialize, serde::Serialize)]
130#[allow(clippy::derive_partial_eq_without_eq)]
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct PullReplicationResponse {
133 #[prost(oneof = "pull_replication_response::Message", tags = "5, 1, 2, 3, 4")]
134 pub message: ::core::option::Option<pull_replication_response::Message>,
135}
136pub mod pull_replication_response {
138 #[derive(serde::Deserialize, serde::Serialize)]
139 #[allow(clippy::derive_partial_eq_without_eq)]
140 #[derive(Clone, PartialEq, ::prost::Oneof)]
141 pub enum Message {
142 #[prost(message, tag = "5")]
143 Handshake(super::Handshake),
144 #[prost(message, tag = "1")]
145 ObjectInfo(super::ObjectInfo),
146 #[prost(message, tag = "2")]
148 Chunk(super::Chunk),
149 #[prost(message, tag = "3")]
150 FinishMessage(super::Empty),
151 #[prost(message, tag = "4")]
152 Skip(super::Skip),
153 }
154}
155#[derive(serde::Deserialize, serde::Serialize)]
156#[allow(clippy::derive_partial_eq_without_eq)]
157#[derive(Clone, PartialEq, ::prost::Message)]
158pub struct DataInfo {
159 #[prost(string, tag = "1")]
160 pub object_id: ::prost::alloc::string::String,
161 #[prost(string, tag = "2")]
162 pub download_url: ::prost::alloc::string::String,
163 #[prost(string, tag = "3")]
164 pub encryption_key: ::prost::alloc::string::String,
165 #[prost(bool, tag = "4")]
166 pub is_compressed: bool,
167}
168#[derive(serde::Deserialize, serde::Serialize)]
169#[allow(clippy::derive_partial_eq_without_eq)]
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct DataInfos {
172 #[prost(message, repeated, tag = "1")]
173 pub data_info: ::prost::alloc::vec::Vec<DataInfo>,
174}
175#[derive(serde::Deserialize, serde::Serialize)]
176#[allow(clippy::derive_partial_eq_without_eq)]
177#[derive(Clone, PartialEq, ::prost::Message)]
178pub struct PushReplicationRequest {
179 #[prost(message, optional, tag = "1")]
180 pub data_infos: ::core::option::Option<DataInfos>,
181}
182#[derive(serde::Deserialize, serde::Serialize)]
183#[allow(clippy::derive_partial_eq_without_eq)]
184#[derive(Clone, PartialEq, ::prost::Message)]
185pub struct PushReplicationResponse {
186 #[prost(bool, tag = "1")]
187 pub ack: bool,
188}
189#[derive(serde::Deserialize, serde::Serialize)]
190#[allow(clippy::derive_partial_eq_without_eq)]
191#[derive(Clone, PartialEq, ::prost::Message)]
192pub struct GetCredentialsRequest {}
193#[derive(serde::Deserialize, serde::Serialize)]
194#[allow(clippy::derive_partial_eq_without_eq)]
195#[derive(Clone, PartialEq, ::prost::Message)]
196pub struct GetCredentialsResponse {
197 #[prost(string, tag = "1")]
198 pub access_key: ::prost::alloc::string::String,
199 #[prost(string, tag = "2")]
200 pub secret_key: ::prost::alloc::string::String,
201}
202#[derive(serde::Deserialize, serde::Serialize)]
203#[allow(clippy::derive_partial_eq_without_eq)]
204#[derive(Clone, PartialEq, ::prost::Message)]
205pub struct CreateOrUpdateCredentialsRequest {}
206#[derive(serde::Deserialize, serde::Serialize)]
207#[allow(clippy::derive_partial_eq_without_eq)]
208#[derive(Clone, PartialEq, ::prost::Message)]
209pub struct CreateOrUpdateCredentialsResponse {
210 #[prost(string, tag = "1")]
211 pub access_key: ::prost::alloc::string::String,
212 #[prost(string, tag = "2")]
213 pub secret_key: ::prost::alloc::string::String,
214}
215#[derive(serde::Deserialize, serde::Serialize)]
216#[allow(clippy::derive_partial_eq_without_eq)]
217#[derive(Clone, PartialEq, ::prost::Message)]
218pub struct RevokeCredentialsRequest {}
219#[derive(serde::Deserialize, serde::Serialize)]
220#[allow(clippy::derive_partial_eq_without_eq)]
221#[derive(Clone, PartialEq, ::prost::Message)]
222pub struct RevokeCredentialsResponse {}
223#[derive(serde::Deserialize, serde::Serialize)]
224#[allow(clippy::derive_partial_eq_without_eq)]
225#[derive(Clone, PartialEq, ::prost::Message)]
226pub struct S3Path {
227 #[prost(string, tag = "1")]
228 pub bucket: ::prost::alloc::string::String,
229 #[prost(string, tag = "2")]
230 pub key: ::prost::alloc::string::String,
231}
232#[derive(serde::Deserialize, serde::Serialize)]
233#[allow(clippy::derive_partial_eq_without_eq)]
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct PushReplicaRequest {
236 #[prost(string, tag = "3")]
237 pub target_endpoint_id: ::prost::alloc::string::String,
238 #[prost(oneof = "push_replica_request::Resource", tags = "1, 2")]
239 pub resource: ::core::option::Option<push_replica_request::Resource>,
240}
241pub mod push_replica_request {
243 #[derive(serde::Deserialize, serde::Serialize)]
244 #[allow(clippy::derive_partial_eq_without_eq)]
245 #[derive(Clone, PartialEq, ::prost::Oneof)]
246 pub enum Resource {
247 #[prost(string, tag = "1")]
248 ResourceId(::prost::alloc::string::String),
249 #[prost(message, tag = "2")]
250 S3Path(super::S3Path),
251 }
252}
253#[derive(serde::Deserialize, serde::Serialize)]
254#[allow(clippy::derive_partial_eq_without_eq)]
255#[derive(Clone, PartialEq, ::prost::Message)]
256pub struct PushReplicaResponse {
257 #[prost(string, tag = "1")]
258 pub replication_id: ::prost::alloc::string::String,
259}
260#[derive(serde::Deserialize, serde::Serialize)]
261#[allow(clippy::derive_partial_eq_without_eq)]
262#[derive(Clone, PartialEq, ::prost::Message)]
263pub struct PullReplicaRequest {
264 #[prost(oneof = "pull_replica_request::Resource", tags = "1, 2")]
265 pub resource: ::core::option::Option<pull_replica_request::Resource>,
266}
267pub mod pull_replica_request {
269 #[derive(serde::Deserialize, serde::Serialize)]
270 #[allow(clippy::derive_partial_eq_without_eq)]
271 #[derive(Clone, PartialEq, ::prost::Oneof)]
272 pub enum Resource {
273 #[prost(string, tag = "1")]
274 ResourceId(::prost::alloc::string::String),
275 #[prost(message, tag = "2")]
276 S3Path(super::S3Path),
277 }
278}
279#[derive(serde::Deserialize, serde::Serialize)]
280#[allow(clippy::derive_partial_eq_without_eq)]
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct PullReplicaResponse {
283 #[prost(string, tag = "1")]
285 pub replication_id: ::prost::alloc::string::String,
286}
287#[derive(serde::Deserialize, serde::Serialize)]
288#[allow(clippy::derive_partial_eq_without_eq)]
289#[derive(Clone, PartialEq, ::prost::Message)]
290pub struct ReplicationStatusRequest {
291 #[prost(string, tag = "1")]
293 pub replication_id: ::prost::alloc::string::String,
294}
295#[derive(serde::Deserialize, serde::Serialize)]
296#[allow(clippy::derive_partial_eq_without_eq)]
297#[derive(Clone, PartialEq, ::prost::Message)]
298pub struct ReplicationStatusResponse {
299 #[prost(enumeration = "ReplicationStatus", tag = "1")]
300 pub status: i32,
301 #[prost(string, tag = "2")]
302 pub message: ::prost::alloc::string::String,
303}
304#[derive(serde::Deserialize, serde::Serialize)]
305#[allow(clippy::derive_partial_eq_without_eq)]
306#[derive(Clone, PartialEq, ::prost::Message)]
307pub struct ObjectLocation {
308 #[prost(string, tag = "1")]
309 pub bucket: ::prost::alloc::string::String,
310 #[prost(string, tag = "2")]
311 pub key: ::prost::alloc::string::String,
312 #[prost(string, tag = "3")]
313 pub upload_id: ::prost::alloc::string::String,
314 #[prost(string, tag = "4")]
315 pub content_length: ::prost::alloc::string::String,
316}
317#[derive(serde::Deserialize, serde::Serialize)]
318#[allow(clippy::derive_partial_eq_without_eq)]
319#[derive(Clone, PartialEq, ::prost::Message)]
320pub struct PutObjectRequest {
321 #[prost(message, optional, tag = "1")]
322 pub location: ::core::option::Option<ObjectLocation>,
323 #[prost(bytes = "vec", tag = "2")]
324 pub data: ::prost::alloc::vec::Vec<u8>,
325}
326#[derive(serde::Deserialize, serde::Serialize)]
327#[allow(clippy::derive_partial_eq_without_eq)]
328#[derive(Clone, PartialEq, ::prost::Message)]
329pub struct PutObjectResponse {}
330#[derive(serde::Deserialize, serde::Serialize)]
331#[allow(clippy::derive_partial_eq_without_eq)]
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct GetObjectRequest {
334 #[prost(message, optional, tag = "1")]
335 pub location: ::core::option::Option<ObjectLocation>,
336}
337#[derive(serde::Deserialize, serde::Serialize)]
338#[allow(clippy::derive_partial_eq_without_eq)]
339#[derive(Clone, PartialEq, ::prost::Message)]
340pub struct GetObjectResponse {
341 #[prost(bytes = "vec", tag = "1")]
342 pub data: ::prost::alloc::vec::Vec<u8>,
343}
344#[derive(serde::Deserialize, serde::Serialize)]
345#[allow(clippy::derive_partial_eq_without_eq)]
346#[derive(Clone, PartialEq, ::prost::Message)]
347pub struct HeadObjectRequest {
348 #[prost(message, optional, tag = "1")]
349 pub location: ::core::option::Option<ObjectLocation>,
350}
351#[derive(serde::Deserialize, serde::Serialize)]
352#[allow(clippy::derive_partial_eq_without_eq)]
353#[derive(Clone, PartialEq, ::prost::Message)]
354pub struct HeadObjectResponse {
355 #[prost(string, tag = "1")]
356 pub content_length: ::prost::alloc::string::String,
357 #[prost(bool, tag = "2")]
358 pub exists: bool,
359}
360#[derive(serde::Deserialize, serde::Serialize)]
361#[allow(clippy::derive_partial_eq_without_eq)]
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct InitMultiPartUploadRequest {
364 #[prost(message, optional, tag = "1")]
365 pub location: ::core::option::Option<ObjectLocation>,
366}
367#[derive(serde::Deserialize, serde::Serialize)]
368#[allow(clippy::derive_partial_eq_without_eq)]
369#[derive(Clone, PartialEq, ::prost::Message)]
370pub struct InitMultiPartUploadResponse {
371 #[prost(string, tag = "1")]
372 pub upload_id: ::prost::alloc::string::String,
373}
374#[derive(serde::Deserialize, serde::Serialize)]
375#[allow(clippy::derive_partial_eq_without_eq)]
376#[derive(Clone, PartialEq, ::prost::Message)]
377pub struct UploadPartRequest {
378 #[prost(message, optional, tag = "1")]
379 pub location: ::core::option::Option<ObjectLocation>,
380 #[prost(int32, tag = "3")]
381 pub part_number: i32,
382 #[prost(bytes = "vec", tag = "4")]
383 pub data: ::prost::alloc::vec::Vec<u8>,
384}
385#[derive(serde::Deserialize, serde::Serialize)]
386#[allow(clippy::derive_partial_eq_without_eq)]
387#[derive(Clone, PartialEq, ::prost::Message)]
388pub struct UploadPartResponse {
389 #[prost(string, tag = "1")]
390 pub etag: ::prost::alloc::string::String,
391}
392#[derive(serde::Deserialize, serde::Serialize)]
393#[allow(clippy::derive_partial_eq_without_eq)]
394#[derive(Clone, PartialEq, ::prost::Message)]
395pub struct CompletedPart {
396 #[prost(int32, tag = "1")]
397 pub part_number: i32,
398 #[prost(string, tag = "2")]
399 pub etag: ::prost::alloc::string::String,
400}
401#[derive(serde::Deserialize, serde::Serialize)]
402#[allow(clippy::derive_partial_eq_without_eq)]
403#[derive(Clone, PartialEq, ::prost::Message)]
404pub struct CompleteMultiPartUploadRequest {
405 #[prost(message, optional, tag = "1")]
406 pub location: ::core::option::Option<ObjectLocation>,
407 #[prost(message, repeated, tag = "2")]
408 pub completed_parts: ::prost::alloc::vec::Vec<CompletedPart>,
409}
410#[derive(serde::Deserialize, serde::Serialize)]
411#[allow(clippy::derive_partial_eq_without_eq)]
412#[derive(Clone, PartialEq, ::prost::Message)]
413pub struct CompleteMultiPartUploadResponse {}
414#[derive(serde::Deserialize, serde::Serialize)]
415#[allow(clippy::derive_partial_eq_without_eq)]
416#[derive(Clone, PartialEq, ::prost::Message)]
417pub struct CreateBucketRequest {
418 #[prost(string, tag = "1")]
419 pub bucket: ::prost::alloc::string::String,
420}
421#[derive(serde::Deserialize, serde::Serialize)]
422#[allow(clippy::derive_partial_eq_without_eq)]
423#[derive(Clone, PartialEq, ::prost::Message)]
424pub struct CreateBucketResponse {}
425#[derive(serde::Deserialize, serde::Serialize)]
426#[allow(clippy::derive_partial_eq_without_eq)]
427#[derive(Clone, PartialEq, ::prost::Message)]
428pub struct DeleteBucketRequest {
429 #[prost(string, tag = "1")]
430 pub bucket: ::prost::alloc::string::String,
431}
432#[derive(serde::Deserialize, serde::Serialize)]
433#[allow(clippy::derive_partial_eq_without_eq)]
434#[derive(Clone, PartialEq, ::prost::Message)]
435pub struct DeleteBucketResponse {}
436#[derive(serde::Deserialize, serde::Serialize)]
437#[allow(clippy::derive_partial_eq_without_eq)]
438#[derive(Clone, PartialEq, ::prost::Message)]
439pub struct DeleteObjectRequest {
440 #[prost(message, optional, tag = "1")]
441 pub location: ::core::option::Option<ObjectLocation>,
442}
443#[derive(serde::Deserialize, serde::Serialize)]
444#[allow(clippy::derive_partial_eq_without_eq)]
445#[derive(Clone, PartialEq, ::prost::Message)]
446pub struct DeleteObjectResponse {}
447#[derive(serde::Deserialize, serde::Serialize)]
448#[allow(clippy::derive_partial_eq_without_eq)]
449#[derive(Clone, PartialEq, ::prost::Message)]
450pub struct InitLocationRequest {
451 #[prost(string, tag = "1")]
452 pub object_name: ::prost::alloc::string::String,
453 #[prost(int64, tag = "2")]
454 pub size: i64,
455 #[prost(bool, tag = "3")]
456 pub is_temporary: bool,
457}
458#[derive(serde::Deserialize, serde::Serialize)]
459#[allow(clippy::derive_partial_eq_without_eq)]
460#[derive(Clone, PartialEq, ::prost::Message)]
461pub struct InitLocationResponse {
462 #[prost(message, optional, tag = "1")]
463 pub location: ::core::option::Option<ObjectLocation>,
464}
465#[derive(serde::Deserialize, serde::Serialize)]
466#[allow(clippy::derive_partial_eq_without_eq)]
467#[derive(Clone, PartialEq, ::prost::Message)]
468pub struct IngestResource {
469 #[prost(string, tag = "1")]
471 pub name: ::prost::alloc::string::String,
472 #[prost(string, tag = "2")]
474 pub title: ::prost::alloc::string::String,
475 #[prost(string, tag = "3")]
477 pub description: ::prost::alloc::string::String,
478 #[prost(message, repeated, tag = "4")]
480 pub authors: ::prost::alloc::vec::Vec<
481 super::super::super::storage::models::v2::Author,
482 >,
483 #[prost(message, repeated, tag = "5")]
485 pub key_values: ::prost::alloc::vec::Vec<
486 super::super::super::storage::models::v2::KeyValue,
487 >,
488 #[prost(message, repeated, tag = "6")]
490 pub relations: ::prost::alloc::vec::Vec<
491 super::super::super::storage::models::v2::Relation,
492 >,
493 #[prost(
495 enumeration = "super::super::super::storage::models::v2::DataClass",
496 tag = "7"
497 )]
498 pub data_class: i32,
499 #[prost(message, repeated, tag = "8")]
501 pub hashes: ::prost::alloc::vec::Vec<super::super::super::storage::models::v2::Hash>,
502 #[prost(string, tag = "9")]
503 pub metadata_license_tag: ::prost::alloc::string::String,
504 #[prost(string, tag = "10")]
505 pub data_license_tag: ::prost::alloc::string::String,
506}
507#[derive(serde::Deserialize, serde::Serialize)]
508#[allow(clippy::derive_partial_eq_without_eq)]
509#[derive(Clone, PartialEq, ::prost::Message)]
510pub struct IngestExistingObjectRequest {
511 #[prost(string, tag = "1")]
512 pub project_id: ::prost::alloc::string::String,
513 #[prost(message, optional, tag = "6")]
514 pub object: ::core::option::Option<IngestResource>,
515 #[prost(string, tag = "7")]
517 pub path: ::prost::alloc::string::String,
518 #[prost(oneof = "ingest_existing_object_request::Collection", tags = "2, 3")]
519 pub collection: ::core::option::Option<ingest_existing_object_request::Collection>,
520 #[prost(oneof = "ingest_existing_object_request::Dataset", tags = "4, 5")]
521 pub dataset: ::core::option::Option<ingest_existing_object_request::Dataset>,
522}
523pub mod ingest_existing_object_request {
525 #[derive(serde::Deserialize, serde::Serialize)]
526 #[allow(clippy::derive_partial_eq_without_eq)]
527 #[derive(Clone, PartialEq, ::prost::Oneof)]
528 pub enum Collection {
529 #[prost(string, tag = "2")]
530 CollectionId(::prost::alloc::string::String),
531 #[prost(message, tag = "3")]
532 CollectionResource(super::IngestResource),
533 }
534 #[derive(serde::Deserialize, serde::Serialize)]
535 #[allow(clippy::derive_partial_eq_without_eq)]
536 #[derive(Clone, PartialEq, ::prost::Oneof)]
537 pub enum Dataset {
538 #[prost(string, tag = "4")]
539 DatasetId(::prost::alloc::string::String),
540 #[prost(message, tag = "5")]
541 DatasetResource(super::IngestResource),
542 }
543}
544#[derive(serde::Deserialize, serde::Serialize)]
545#[allow(clippy::derive_partial_eq_without_eq)]
546#[derive(Clone, PartialEq, ::prost::Message)]
547pub struct IngestExistingObjectResponse {
548 #[prost(string, tag = "1")]
549 pub object_id: ::prost::alloc::string::String,
550}
551#[derive(serde::Deserialize, serde::Serialize)]
552#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
553#[repr(i32)]
554pub enum ReplicationStatus {
555 Unspecified = 0,
556 Pending = 1,
557 Running = 2,
558 Finished = 3,
559 Error = 4,
560}
561impl ReplicationStatus {
562 pub fn as_str_name(&self) -> &'static str {
567 match self {
568 ReplicationStatus::Unspecified => "REPLICATION_STATUS_UNSPECIFIED",
569 ReplicationStatus::Pending => "REPLICATION_STATUS_PENDING",
570 ReplicationStatus::Running => "REPLICATION_STATUS_RUNNING",
571 ReplicationStatus::Finished => "REPLICATION_STATUS_FINISHED",
572 ReplicationStatus::Error => "REPLICATION_STATUS_ERROR",
573 }
574 }
575 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
577 match value {
578 "REPLICATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
579 "REPLICATION_STATUS_PENDING" => Some(Self::Pending),
580 "REPLICATION_STATUS_RUNNING" => Some(Self::Running),
581 "REPLICATION_STATUS_FINISHED" => Some(Self::Finished),
582 "REPLICATION_STATUS_ERROR" => Some(Self::Error),
583 _ => None,
584 }
585 }
586}
587pub mod dataproxy_replication_service_client {
589 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
590 use tonic::codegen::*;
591 use tonic::codegen::http::Uri;
592 #[derive(Debug, Clone)]
598 pub struct DataproxyReplicationServiceClient<T> {
599 inner: tonic::client::Grpc<T>,
600 }
601 impl DataproxyReplicationServiceClient<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> DataproxyReplicationServiceClient<T>
613 where
614 T: tonic::client::GrpcService<tonic::body::BoxBody>,
615 T::Error: Into<StdError>,
616 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
617 <T::ResponseBody as Body>::Error: Into<StdError> + 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 ) -> DataproxyReplicationServiceClient<InterceptedService<T, F>>
631 where
632 F: tonic::service::Interceptor,
633 T::ResponseBody: Default,
634 T: tonic::codegen::Service<
635 http::Request<tonic::body::BoxBody>,
636 Response = http::Response<
637 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
638 >,
639 >,
640 <T as tonic::codegen::Service<
641 http::Request<tonic::body::BoxBody>,
642 >>::Error: Into<StdError> + Send + Sync,
643 {
644 DataproxyReplicationServiceClient::new(
645 InterceptedService::new(inner, interceptor),
646 )
647 }
648 #[must_use]
653 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
654 self.inner = self.inner.send_compressed(encoding);
655 self
656 }
657 #[must_use]
659 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
660 self.inner = self.inner.accept_compressed(encoding);
661 self
662 }
663 #[must_use]
667 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
668 self.inner = self.inner.max_decoding_message_size(limit);
669 self
670 }
671 #[must_use]
675 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
676 self.inner = self.inner.max_encoding_message_size(limit);
677 self
678 }
679 pub async fn pull_replication(
685 &mut self,
686 request: impl tonic::IntoStreamingRequest<
687 Message = super::PullReplicationRequest,
688 >,
689 ) -> std::result::Result<
690 tonic::Response<tonic::codec::Streaming<super::PullReplicationResponse>>,
691 tonic::Status,
692 > {
693 self.inner
694 .ready()
695 .await
696 .map_err(|e| {
697 tonic::Status::new(
698 tonic::Code::Unknown,
699 format!("Service was not ready: {}", e.into()),
700 )
701 })?;
702 let codec = tonic::codec::ProstCodec::default();
703 let path = http::uri::PathAndQuery::from_static(
704 "/aruna.api.dataproxy.services.v2.DataproxyReplicationService/PullReplication",
705 );
706 let mut req = request.into_streaming_request();
707 req.extensions_mut()
708 .insert(
709 GrpcMethod::new(
710 "aruna.api.dataproxy.services.v2.DataproxyReplicationService",
711 "PullReplication",
712 ),
713 );
714 self.inner.streaming(req, path, codec).await
715 }
716 pub async fn push_replication(
722 &mut self,
723 request: impl tonic::IntoRequest<super::PushReplicationRequest>,
724 ) -> std::result::Result<
725 tonic::Response<super::PushReplicationResponse>,
726 tonic::Status,
727 > {
728 self.inner
729 .ready()
730 .await
731 .map_err(|e| {
732 tonic::Status::new(
733 tonic::Code::Unknown,
734 format!("Service was not ready: {}", e.into()),
735 )
736 })?;
737 let codec = tonic::codec::ProstCodec::default();
738 let path = http::uri::PathAndQuery::from_static(
739 "/aruna.api.dataproxy.services.v2.DataproxyReplicationService/PushReplication",
740 );
741 let mut req = request.into_request();
742 req.extensions_mut()
743 .insert(
744 GrpcMethod::new(
745 "aruna.api.dataproxy.services.v2.DataproxyReplicationService",
746 "PushReplication",
747 ),
748 );
749 self.inner.unary(req, path, codec).await
750 }
751 }
752}
753pub mod dataproxy_backend_service_client {
755 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
756 use tonic::codegen::*;
757 use tonic::codegen::http::Uri;
758 #[derive(Debug, Clone)]
759 pub struct DataproxyBackendServiceClient<T> {
760 inner: tonic::client::Grpc<T>,
761 }
762 impl DataproxyBackendServiceClient<tonic::transport::Channel> {
763 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
765 where
766 D: TryInto<tonic::transport::Endpoint>,
767 D::Error: Into<StdError>,
768 {
769 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
770 Ok(Self::new(conn))
771 }
772 }
773 impl<T> DataproxyBackendServiceClient<T>
774 where
775 T: tonic::client::GrpcService<tonic::body::BoxBody>,
776 T::Error: Into<StdError>,
777 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
778 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
779 {
780 pub fn new(inner: T) -> Self {
781 let inner = tonic::client::Grpc::new(inner);
782 Self { inner }
783 }
784 pub fn with_origin(inner: T, origin: Uri) -> Self {
785 let inner = tonic::client::Grpc::with_origin(inner, origin);
786 Self { inner }
787 }
788 pub fn with_interceptor<F>(
789 inner: T,
790 interceptor: F,
791 ) -> DataproxyBackendServiceClient<InterceptedService<T, F>>
792 where
793 F: tonic::service::Interceptor,
794 T::ResponseBody: Default,
795 T: tonic::codegen::Service<
796 http::Request<tonic::body::BoxBody>,
797 Response = http::Response<
798 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
799 >,
800 >,
801 <T as tonic::codegen::Service<
802 http::Request<tonic::body::BoxBody>,
803 >>::Error: Into<StdError> + Send + Sync,
804 {
805 DataproxyBackendServiceClient::new(
806 InterceptedService::new(inner, interceptor),
807 )
808 }
809 #[must_use]
814 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
815 self.inner = self.inner.send_compressed(encoding);
816 self
817 }
818 #[must_use]
820 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
821 self.inner = self.inner.accept_compressed(encoding);
822 self
823 }
824 #[must_use]
828 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
829 self.inner = self.inner.max_decoding_message_size(limit);
830 self
831 }
832 #[must_use]
836 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
837 self.inner = self.inner.max_encoding_message_size(limit);
838 self
839 }
840 pub async fn put_object(
841 &mut self,
842 request: impl tonic::IntoStreamingRequest<Message = super::PutObjectRequest>,
843 ) -> std::result::Result<
844 tonic::Response<super::PutObjectResponse>,
845 tonic::Status,
846 > {
847 self.inner
848 .ready()
849 .await
850 .map_err(|e| {
851 tonic::Status::new(
852 tonic::Code::Unknown,
853 format!("Service was not ready: {}", e.into()),
854 )
855 })?;
856 let codec = tonic::codec::ProstCodec::default();
857 let path = http::uri::PathAndQuery::from_static(
858 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/PutObject",
859 );
860 let mut req = request.into_streaming_request();
861 req.extensions_mut()
862 .insert(
863 GrpcMethod::new(
864 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
865 "PutObject",
866 ),
867 );
868 self.inner.client_streaming(req, path, codec).await
869 }
870 pub async fn get_object(
871 &mut self,
872 request: impl tonic::IntoRequest<super::GetObjectRequest>,
873 ) -> std::result::Result<
874 tonic::Response<tonic::codec::Streaming<super::GetObjectResponse>>,
875 tonic::Status,
876 > {
877 self.inner
878 .ready()
879 .await
880 .map_err(|e| {
881 tonic::Status::new(
882 tonic::Code::Unknown,
883 format!("Service was not ready: {}", e.into()),
884 )
885 })?;
886 let codec = tonic::codec::ProstCodec::default();
887 let path = http::uri::PathAndQuery::from_static(
888 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/GetObject",
889 );
890 let mut req = request.into_request();
891 req.extensions_mut()
892 .insert(
893 GrpcMethod::new(
894 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
895 "GetObject",
896 ),
897 );
898 self.inner.server_streaming(req, path, codec).await
899 }
900 pub async fn head_object(
901 &mut self,
902 request: impl tonic::IntoRequest<super::HeadObjectRequest>,
903 ) -> std::result::Result<
904 tonic::Response<super::HeadObjectResponse>,
905 tonic::Status,
906 > {
907 self.inner
908 .ready()
909 .await
910 .map_err(|e| {
911 tonic::Status::new(
912 tonic::Code::Unknown,
913 format!("Service was not ready: {}", e.into()),
914 )
915 })?;
916 let codec = tonic::codec::ProstCodec::default();
917 let path = http::uri::PathAndQuery::from_static(
918 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/HeadObject",
919 );
920 let mut req = request.into_request();
921 req.extensions_mut()
922 .insert(
923 GrpcMethod::new(
924 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
925 "HeadObject",
926 ),
927 );
928 self.inner.unary(req, path, codec).await
929 }
930 pub async fn init_multi_part_upload(
931 &mut self,
932 request: impl tonic::IntoRequest<super::InitMultiPartUploadRequest>,
933 ) -> std::result::Result<
934 tonic::Response<super::InitMultiPartUploadResponse>,
935 tonic::Status,
936 > {
937 self.inner
938 .ready()
939 .await
940 .map_err(|e| {
941 tonic::Status::new(
942 tonic::Code::Unknown,
943 format!("Service was not ready: {}", e.into()),
944 )
945 })?;
946 let codec = tonic::codec::ProstCodec::default();
947 let path = http::uri::PathAndQuery::from_static(
948 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/InitMultiPartUpload",
949 );
950 let mut req = request.into_request();
951 req.extensions_mut()
952 .insert(
953 GrpcMethod::new(
954 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
955 "InitMultiPartUpload",
956 ),
957 );
958 self.inner.unary(req, path, codec).await
959 }
960 pub async fn upload_part(
961 &mut self,
962 request: impl tonic::IntoStreamingRequest<Message = super::UploadPartRequest>,
963 ) -> std::result::Result<
964 tonic::Response<super::UploadPartResponse>,
965 tonic::Status,
966 > {
967 self.inner
968 .ready()
969 .await
970 .map_err(|e| {
971 tonic::Status::new(
972 tonic::Code::Unknown,
973 format!("Service was not ready: {}", e.into()),
974 )
975 })?;
976 let codec = tonic::codec::ProstCodec::default();
977 let path = http::uri::PathAndQuery::from_static(
978 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/UploadPart",
979 );
980 let mut req = request.into_streaming_request();
981 req.extensions_mut()
982 .insert(
983 GrpcMethod::new(
984 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
985 "UploadPart",
986 ),
987 );
988 self.inner.client_streaming(req, path, codec).await
989 }
990 pub async fn complete_multi_part_upload(
991 &mut self,
992 request: impl tonic::IntoRequest<super::CompleteMultiPartUploadRequest>,
993 ) -> std::result::Result<
994 tonic::Response<super::CompleteMultiPartUploadResponse>,
995 tonic::Status,
996 > {
997 self.inner
998 .ready()
999 .await
1000 .map_err(|e| {
1001 tonic::Status::new(
1002 tonic::Code::Unknown,
1003 format!("Service was not ready: {}", e.into()),
1004 )
1005 })?;
1006 let codec = tonic::codec::ProstCodec::default();
1007 let path = http::uri::PathAndQuery::from_static(
1008 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/CompleteMultiPartUpload",
1009 );
1010 let mut req = request.into_request();
1011 req.extensions_mut()
1012 .insert(
1013 GrpcMethod::new(
1014 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
1015 "CompleteMultiPartUpload",
1016 ),
1017 );
1018 self.inner.unary(req, path, codec).await
1019 }
1020 pub async fn create_bucket(
1021 &mut self,
1022 request: impl tonic::IntoRequest<super::CreateBucketRequest>,
1023 ) -> std::result::Result<
1024 tonic::Response<super::CreateBucketResponse>,
1025 tonic::Status,
1026 > {
1027 self.inner
1028 .ready()
1029 .await
1030 .map_err(|e| {
1031 tonic::Status::new(
1032 tonic::Code::Unknown,
1033 format!("Service was not ready: {}", e.into()),
1034 )
1035 })?;
1036 let codec = tonic::codec::ProstCodec::default();
1037 let path = http::uri::PathAndQuery::from_static(
1038 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/CreateBucket",
1039 );
1040 let mut req = request.into_request();
1041 req.extensions_mut()
1042 .insert(
1043 GrpcMethod::new(
1044 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
1045 "CreateBucket",
1046 ),
1047 );
1048 self.inner.unary(req, path, codec).await
1049 }
1050 pub async fn delete_bucket(
1051 &mut self,
1052 request: impl tonic::IntoRequest<super::DeleteBucketRequest>,
1053 ) -> std::result::Result<
1054 tonic::Response<super::DeleteBucketResponse>,
1055 tonic::Status,
1056 > {
1057 self.inner
1058 .ready()
1059 .await
1060 .map_err(|e| {
1061 tonic::Status::new(
1062 tonic::Code::Unknown,
1063 format!("Service was not ready: {}", e.into()),
1064 )
1065 })?;
1066 let codec = tonic::codec::ProstCodec::default();
1067 let path = http::uri::PathAndQuery::from_static(
1068 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/DeleteBucket",
1069 );
1070 let mut req = request.into_request();
1071 req.extensions_mut()
1072 .insert(
1073 GrpcMethod::new(
1074 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
1075 "DeleteBucket",
1076 ),
1077 );
1078 self.inner.unary(req, path, codec).await
1079 }
1080 pub async fn delete_object(
1081 &mut self,
1082 request: impl tonic::IntoRequest<super::DeleteObjectRequest>,
1083 ) -> std::result::Result<
1084 tonic::Response<super::DeleteObjectResponse>,
1085 tonic::Status,
1086 > {
1087 self.inner
1088 .ready()
1089 .await
1090 .map_err(|e| {
1091 tonic::Status::new(
1092 tonic::Code::Unknown,
1093 format!("Service was not ready: {}", e.into()),
1094 )
1095 })?;
1096 let codec = tonic::codec::ProstCodec::default();
1097 let path = http::uri::PathAndQuery::from_static(
1098 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/DeleteObject",
1099 );
1100 let mut req = request.into_request();
1101 req.extensions_mut()
1102 .insert(
1103 GrpcMethod::new(
1104 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
1105 "DeleteObject",
1106 ),
1107 );
1108 self.inner.unary(req, path, codec).await
1109 }
1110 pub async fn init_location(
1111 &mut self,
1112 request: impl tonic::IntoRequest<super::InitLocationRequest>,
1113 ) -> std::result::Result<
1114 tonic::Response<super::InitLocationResponse>,
1115 tonic::Status,
1116 > {
1117 self.inner
1118 .ready()
1119 .await
1120 .map_err(|e| {
1121 tonic::Status::new(
1122 tonic::Code::Unknown,
1123 format!("Service was not ready: {}", e.into()),
1124 )
1125 })?;
1126 let codec = tonic::codec::ProstCodec::default();
1127 let path = http::uri::PathAndQuery::from_static(
1128 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/InitLocation",
1129 );
1130 let mut req = request.into_request();
1131 req.extensions_mut()
1132 .insert(
1133 GrpcMethod::new(
1134 "aruna.api.dataproxy.services.v2.DataproxyBackendService",
1135 "InitLocation",
1136 ),
1137 );
1138 self.inner.unary(req, path, codec).await
1139 }
1140 }
1141}
1142pub mod dataproxy_user_service_client {
1144 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1145 use tonic::codegen::*;
1146 use tonic::codegen::http::Uri;
1147 #[derive(Debug, Clone)]
1148 pub struct DataproxyUserServiceClient<T> {
1149 inner: tonic::client::Grpc<T>,
1150 }
1151 impl DataproxyUserServiceClient<tonic::transport::Channel> {
1152 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1154 where
1155 D: TryInto<tonic::transport::Endpoint>,
1156 D::Error: Into<StdError>,
1157 {
1158 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1159 Ok(Self::new(conn))
1160 }
1161 }
1162 impl<T> DataproxyUserServiceClient<T>
1163 where
1164 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1165 T::Error: Into<StdError>,
1166 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1167 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1168 {
1169 pub fn new(inner: T) -> Self {
1170 let inner = tonic::client::Grpc::new(inner);
1171 Self { inner }
1172 }
1173 pub fn with_origin(inner: T, origin: Uri) -> Self {
1174 let inner = tonic::client::Grpc::with_origin(inner, origin);
1175 Self { inner }
1176 }
1177 pub fn with_interceptor<F>(
1178 inner: T,
1179 interceptor: F,
1180 ) -> DataproxyUserServiceClient<InterceptedService<T, F>>
1181 where
1182 F: tonic::service::Interceptor,
1183 T::ResponseBody: Default,
1184 T: tonic::codegen::Service<
1185 http::Request<tonic::body::BoxBody>,
1186 Response = http::Response<
1187 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1188 >,
1189 >,
1190 <T as tonic::codegen::Service<
1191 http::Request<tonic::body::BoxBody>,
1192 >>::Error: Into<StdError> + Send + Sync,
1193 {
1194 DataproxyUserServiceClient::new(InterceptedService::new(inner, interceptor))
1195 }
1196 #[must_use]
1201 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1202 self.inner = self.inner.send_compressed(encoding);
1203 self
1204 }
1205 #[must_use]
1207 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1208 self.inner = self.inner.accept_compressed(encoding);
1209 self
1210 }
1211 #[must_use]
1215 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1216 self.inner = self.inner.max_decoding_message_size(limit);
1217 self
1218 }
1219 #[must_use]
1223 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1224 self.inner = self.inner.max_encoding_message_size(limit);
1225 self
1226 }
1227 pub async fn get_credentials(
1234 &mut self,
1235 request: impl tonic::IntoRequest<super::GetCredentialsRequest>,
1236 ) -> std::result::Result<
1237 tonic::Response<super::GetCredentialsResponse>,
1238 tonic::Status,
1239 > {
1240 self.inner
1241 .ready()
1242 .await
1243 .map_err(|e| {
1244 tonic::Status::new(
1245 tonic::Code::Unknown,
1246 format!("Service was not ready: {}", e.into()),
1247 )
1248 })?;
1249 let codec = tonic::codec::ProstCodec::default();
1250 let path = http::uri::PathAndQuery::from_static(
1251 "/aruna.api.dataproxy.services.v2.DataproxyUserService/GetCredentials",
1252 );
1253 let mut req = request.into_request();
1254 req.extensions_mut()
1255 .insert(
1256 GrpcMethod::new(
1257 "aruna.api.dataproxy.services.v2.DataproxyUserService",
1258 "GetCredentials",
1259 ),
1260 );
1261 self.inner.unary(req, path, codec).await
1262 }
1263 pub async fn create_or_update_credentials(
1270 &mut self,
1271 request: impl tonic::IntoRequest<super::CreateOrUpdateCredentialsRequest>,
1272 ) -> std::result::Result<
1273 tonic::Response<super::CreateOrUpdateCredentialsResponse>,
1274 tonic::Status,
1275 > {
1276 self.inner
1277 .ready()
1278 .await
1279 .map_err(|e| {
1280 tonic::Status::new(
1281 tonic::Code::Unknown,
1282 format!("Service was not ready: {}", e.into()),
1283 )
1284 })?;
1285 let codec = tonic::codec::ProstCodec::default();
1286 let path = http::uri::PathAndQuery::from_static(
1287 "/aruna.api.dataproxy.services.v2.DataproxyUserService/CreateOrUpdateCredentials",
1288 );
1289 let mut req = request.into_request();
1290 req.extensions_mut()
1291 .insert(
1292 GrpcMethod::new(
1293 "aruna.api.dataproxy.services.v2.DataproxyUserService",
1294 "CreateOrUpdateCredentials",
1295 ),
1296 );
1297 self.inner.unary(req, path, codec).await
1298 }
1299 pub async fn revoke_credentials(
1306 &mut self,
1307 request: impl tonic::IntoRequest<super::RevokeCredentialsRequest>,
1308 ) -> std::result::Result<
1309 tonic::Response<super::RevokeCredentialsResponse>,
1310 tonic::Status,
1311 > {
1312 self.inner
1313 .ready()
1314 .await
1315 .map_err(|e| {
1316 tonic::Status::new(
1317 tonic::Code::Unknown,
1318 format!("Service was not ready: {}", e.into()),
1319 )
1320 })?;
1321 let codec = tonic::codec::ProstCodec::default();
1322 let path = http::uri::PathAndQuery::from_static(
1323 "/aruna.api.dataproxy.services.v2.DataproxyUserService/RevokeCredentials",
1324 );
1325 let mut req = request.into_request();
1326 req.extensions_mut()
1327 .insert(
1328 GrpcMethod::new(
1329 "aruna.api.dataproxy.services.v2.DataproxyUserService",
1330 "RevokeCredentials",
1331 ),
1332 );
1333 self.inner.unary(req, path, codec).await
1334 }
1335 pub async fn push_replica(
1341 &mut self,
1342 request: impl tonic::IntoRequest<super::PushReplicaRequest>,
1343 ) -> std::result::Result<
1344 tonic::Response<super::PushReplicaResponse>,
1345 tonic::Status,
1346 > {
1347 self.inner
1348 .ready()
1349 .await
1350 .map_err(|e| {
1351 tonic::Status::new(
1352 tonic::Code::Unknown,
1353 format!("Service was not ready: {}", e.into()),
1354 )
1355 })?;
1356 let codec = tonic::codec::ProstCodec::default();
1357 let path = http::uri::PathAndQuery::from_static(
1358 "/aruna.api.dataproxy.services.v2.DataproxyUserService/PushReplica",
1359 );
1360 let mut req = request.into_request();
1361 req.extensions_mut()
1362 .insert(
1363 GrpcMethod::new(
1364 "aruna.api.dataproxy.services.v2.DataproxyUserService",
1365 "PushReplica",
1366 ),
1367 );
1368 self.inner.unary(req, path, codec).await
1369 }
1370 pub async fn pull_replica(
1376 &mut self,
1377 request: impl tonic::IntoRequest<super::PullReplicaRequest>,
1378 ) -> std::result::Result<
1379 tonic::Response<super::PullReplicaResponse>,
1380 tonic::Status,
1381 > {
1382 self.inner
1383 .ready()
1384 .await
1385 .map_err(|e| {
1386 tonic::Status::new(
1387 tonic::Code::Unknown,
1388 format!("Service was not ready: {}", e.into()),
1389 )
1390 })?;
1391 let codec = tonic::codec::ProstCodec::default();
1392 let path = http::uri::PathAndQuery::from_static(
1393 "/aruna.api.dataproxy.services.v2.DataproxyUserService/PullReplica",
1394 );
1395 let mut req = request.into_request();
1396 req.extensions_mut()
1397 .insert(
1398 GrpcMethod::new(
1399 "aruna.api.dataproxy.services.v2.DataproxyUserService",
1400 "PullReplica",
1401 ),
1402 );
1403 self.inner.unary(req, path, codec).await
1404 }
1405 pub async fn replication_status(
1411 &mut self,
1412 request: impl tonic::IntoRequest<super::ReplicationStatusRequest>,
1413 ) -> std::result::Result<
1414 tonic::Response<super::ReplicationStatusResponse>,
1415 tonic::Status,
1416 > {
1417 self.inner
1418 .ready()
1419 .await
1420 .map_err(|e| {
1421 tonic::Status::new(
1422 tonic::Code::Unknown,
1423 format!("Service was not ready: {}", e.into()),
1424 )
1425 })?;
1426 let codec = tonic::codec::ProstCodec::default();
1427 let path = http::uri::PathAndQuery::from_static(
1428 "/aruna.api.dataproxy.services.v2.DataproxyUserService/ReplicationStatus",
1429 );
1430 let mut req = request.into_request();
1431 req.extensions_mut()
1432 .insert(
1433 GrpcMethod::new(
1434 "aruna.api.dataproxy.services.v2.DataproxyUserService",
1435 "ReplicationStatus",
1436 ),
1437 );
1438 self.inner.unary(req, path, codec).await
1439 }
1440 }
1441}
1442pub mod dataproxy_ingestion_service_client {
1444 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1445 use tonic::codegen::*;
1446 use tonic::codegen::http::Uri;
1447 #[derive(Debug, Clone)]
1448 pub struct DataproxyIngestionServiceClient<T> {
1449 inner: tonic::client::Grpc<T>,
1450 }
1451 impl DataproxyIngestionServiceClient<tonic::transport::Channel> {
1452 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1454 where
1455 D: TryInto<tonic::transport::Endpoint>,
1456 D::Error: Into<StdError>,
1457 {
1458 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1459 Ok(Self::new(conn))
1460 }
1461 }
1462 impl<T> DataproxyIngestionServiceClient<T>
1463 where
1464 T: tonic::client::GrpcService<tonic::body::BoxBody>,
1465 T::Error: Into<StdError>,
1466 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
1467 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
1468 {
1469 pub fn new(inner: T) -> Self {
1470 let inner = tonic::client::Grpc::new(inner);
1471 Self { inner }
1472 }
1473 pub fn with_origin(inner: T, origin: Uri) -> Self {
1474 let inner = tonic::client::Grpc::with_origin(inner, origin);
1475 Self { inner }
1476 }
1477 pub fn with_interceptor<F>(
1478 inner: T,
1479 interceptor: F,
1480 ) -> DataproxyIngestionServiceClient<InterceptedService<T, F>>
1481 where
1482 F: tonic::service::Interceptor,
1483 T::ResponseBody: Default,
1484 T: tonic::codegen::Service<
1485 http::Request<tonic::body::BoxBody>,
1486 Response = http::Response<
1487 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
1488 >,
1489 >,
1490 <T as tonic::codegen::Service<
1491 http::Request<tonic::body::BoxBody>,
1492 >>::Error: Into<StdError> + Send + Sync,
1493 {
1494 DataproxyIngestionServiceClient::new(
1495 InterceptedService::new(inner, interceptor),
1496 )
1497 }
1498 #[must_use]
1503 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1504 self.inner = self.inner.send_compressed(encoding);
1505 self
1506 }
1507 #[must_use]
1509 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1510 self.inner = self.inner.accept_compressed(encoding);
1511 self
1512 }
1513 #[must_use]
1517 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1518 self.inner = self.inner.max_decoding_message_size(limit);
1519 self
1520 }
1521 #[must_use]
1525 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1526 self.inner = self.inner.max_encoding_message_size(limit);
1527 self
1528 }
1529 pub async fn ingest_existing_object(
1535 &mut self,
1536 request: impl tonic::IntoRequest<super::IngestExistingObjectRequest>,
1537 ) -> std::result::Result<
1538 tonic::Response<super::IngestExistingObjectResponse>,
1539 tonic::Status,
1540 > {
1541 self.inner
1542 .ready()
1543 .await
1544 .map_err(|e| {
1545 tonic::Status::new(
1546 tonic::Code::Unknown,
1547 format!("Service was not ready: {}", e.into()),
1548 )
1549 })?;
1550 let codec = tonic::codec::ProstCodec::default();
1551 let path = http::uri::PathAndQuery::from_static(
1552 "/aruna.api.dataproxy.services.v2.DataproxyIngestionService/IngestExistingObject",
1553 );
1554 let mut req = request.into_request();
1555 req.extensions_mut()
1556 .insert(
1557 GrpcMethod::new(
1558 "aruna.api.dataproxy.services.v2.DataproxyIngestionService",
1559 "IngestExistingObject",
1560 ),
1561 );
1562 self.inner.unary(req, path, codec).await
1563 }
1564 }
1565}
1566pub mod dataproxy_replication_service_server {
1568 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1569 use tonic::codegen::*;
1570 #[async_trait]
1572 pub trait DataproxyReplicationService: Send + Sync + 'static {
1573 type PullReplicationStream: tonic::codegen::tokio_stream::Stream<
1575 Item = std::result::Result<super::PullReplicationResponse, tonic::Status>,
1576 >
1577 + Send
1578 + 'static;
1579 async fn pull_replication(
1585 &self,
1586 request: tonic::Request<tonic::Streaming<super::PullReplicationRequest>>,
1587 ) -> std::result::Result<
1588 tonic::Response<Self::PullReplicationStream>,
1589 tonic::Status,
1590 >;
1591 async fn push_replication(
1597 &self,
1598 request: tonic::Request<super::PushReplicationRequest>,
1599 ) -> std::result::Result<
1600 tonic::Response<super::PushReplicationResponse>,
1601 tonic::Status,
1602 >;
1603 }
1604 #[derive(Debug)]
1610 pub struct DataproxyReplicationServiceServer<T: DataproxyReplicationService> {
1611 inner: _Inner<T>,
1612 accept_compression_encodings: EnabledCompressionEncodings,
1613 send_compression_encodings: EnabledCompressionEncodings,
1614 max_decoding_message_size: Option<usize>,
1615 max_encoding_message_size: Option<usize>,
1616 }
1617 struct _Inner<T>(Arc<T>);
1618 impl<T: DataproxyReplicationService> DataproxyReplicationServiceServer<T> {
1619 pub fn new(inner: T) -> Self {
1620 Self::from_arc(Arc::new(inner))
1621 }
1622 pub fn from_arc(inner: Arc<T>) -> Self {
1623 let inner = _Inner(inner);
1624 Self {
1625 inner,
1626 accept_compression_encodings: Default::default(),
1627 send_compression_encodings: Default::default(),
1628 max_decoding_message_size: None,
1629 max_encoding_message_size: None,
1630 }
1631 }
1632 pub fn with_interceptor<F>(
1633 inner: T,
1634 interceptor: F,
1635 ) -> InterceptedService<Self, F>
1636 where
1637 F: tonic::service::Interceptor,
1638 {
1639 InterceptedService::new(Self::new(inner), interceptor)
1640 }
1641 #[must_use]
1643 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1644 self.accept_compression_encodings.enable(encoding);
1645 self
1646 }
1647 #[must_use]
1649 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1650 self.send_compression_encodings.enable(encoding);
1651 self
1652 }
1653 #[must_use]
1657 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1658 self.max_decoding_message_size = Some(limit);
1659 self
1660 }
1661 #[must_use]
1665 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1666 self.max_encoding_message_size = Some(limit);
1667 self
1668 }
1669 }
1670 impl<T, B> tonic::codegen::Service<http::Request<B>>
1671 for DataproxyReplicationServiceServer<T>
1672 where
1673 T: DataproxyReplicationService,
1674 B: Body + Send + 'static,
1675 B::Error: Into<StdError> + Send + 'static,
1676 {
1677 type Response = http::Response<tonic::body::BoxBody>;
1678 type Error = std::convert::Infallible;
1679 type Future = BoxFuture<Self::Response, Self::Error>;
1680 fn poll_ready(
1681 &mut self,
1682 _cx: &mut Context<'_>,
1683 ) -> Poll<std::result::Result<(), Self::Error>> {
1684 Poll::Ready(Ok(()))
1685 }
1686 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1687 let inner = self.inner.clone();
1688 match req.uri().path() {
1689 "/aruna.api.dataproxy.services.v2.DataproxyReplicationService/PullReplication" => {
1690 #[allow(non_camel_case_types)]
1691 struct PullReplicationSvc<T: DataproxyReplicationService>(
1692 pub Arc<T>,
1693 );
1694 impl<
1695 T: DataproxyReplicationService,
1696 > tonic::server::StreamingService<super::PullReplicationRequest>
1697 for PullReplicationSvc<T> {
1698 type Response = super::PullReplicationResponse;
1699 type ResponseStream = T::PullReplicationStream;
1700 type Future = BoxFuture<
1701 tonic::Response<Self::ResponseStream>,
1702 tonic::Status,
1703 >;
1704 fn call(
1705 &mut self,
1706 request: tonic::Request<
1707 tonic::Streaming<super::PullReplicationRequest>,
1708 >,
1709 ) -> Self::Future {
1710 let inner = Arc::clone(&self.0);
1711 let fut = async move {
1712 <T as DataproxyReplicationService>::pull_replication(
1713 &inner,
1714 request,
1715 )
1716 .await
1717 };
1718 Box::pin(fut)
1719 }
1720 }
1721 let accept_compression_encodings = self.accept_compression_encodings;
1722 let send_compression_encodings = self.send_compression_encodings;
1723 let max_decoding_message_size = self.max_decoding_message_size;
1724 let max_encoding_message_size = self.max_encoding_message_size;
1725 let inner = self.inner.clone();
1726 let fut = async move {
1727 let inner = inner.0;
1728 let method = PullReplicationSvc(inner);
1729 let codec = tonic::codec::ProstCodec::default();
1730 let mut grpc = tonic::server::Grpc::new(codec)
1731 .apply_compression_config(
1732 accept_compression_encodings,
1733 send_compression_encodings,
1734 )
1735 .apply_max_message_size_config(
1736 max_decoding_message_size,
1737 max_encoding_message_size,
1738 );
1739 let res = grpc.streaming(method, req).await;
1740 Ok(res)
1741 };
1742 Box::pin(fut)
1743 }
1744 "/aruna.api.dataproxy.services.v2.DataproxyReplicationService/PushReplication" => {
1745 #[allow(non_camel_case_types)]
1746 struct PushReplicationSvc<T: DataproxyReplicationService>(
1747 pub Arc<T>,
1748 );
1749 impl<
1750 T: DataproxyReplicationService,
1751 > tonic::server::UnaryService<super::PushReplicationRequest>
1752 for PushReplicationSvc<T> {
1753 type Response = super::PushReplicationResponse;
1754 type Future = BoxFuture<
1755 tonic::Response<Self::Response>,
1756 tonic::Status,
1757 >;
1758 fn call(
1759 &mut self,
1760 request: tonic::Request<super::PushReplicationRequest>,
1761 ) -> Self::Future {
1762 let inner = Arc::clone(&self.0);
1763 let fut = async move {
1764 <T as DataproxyReplicationService>::push_replication(
1765 &inner,
1766 request,
1767 )
1768 .await
1769 };
1770 Box::pin(fut)
1771 }
1772 }
1773 let accept_compression_encodings = self.accept_compression_encodings;
1774 let send_compression_encodings = self.send_compression_encodings;
1775 let max_decoding_message_size = self.max_decoding_message_size;
1776 let max_encoding_message_size = self.max_encoding_message_size;
1777 let inner = self.inner.clone();
1778 let fut = async move {
1779 let inner = inner.0;
1780 let method = PushReplicationSvc(inner);
1781 let codec = tonic::codec::ProstCodec::default();
1782 let mut grpc = tonic::server::Grpc::new(codec)
1783 .apply_compression_config(
1784 accept_compression_encodings,
1785 send_compression_encodings,
1786 )
1787 .apply_max_message_size_config(
1788 max_decoding_message_size,
1789 max_encoding_message_size,
1790 );
1791 let res = grpc.unary(method, req).await;
1792 Ok(res)
1793 };
1794 Box::pin(fut)
1795 }
1796 _ => {
1797 Box::pin(async move {
1798 Ok(
1799 http::Response::builder()
1800 .status(200)
1801 .header("grpc-status", "12")
1802 .header("content-type", "application/grpc")
1803 .body(empty_body())
1804 .unwrap(),
1805 )
1806 })
1807 }
1808 }
1809 }
1810 }
1811 impl<T: DataproxyReplicationService> Clone for DataproxyReplicationServiceServer<T> {
1812 fn clone(&self) -> Self {
1813 let inner = self.inner.clone();
1814 Self {
1815 inner,
1816 accept_compression_encodings: self.accept_compression_encodings,
1817 send_compression_encodings: self.send_compression_encodings,
1818 max_decoding_message_size: self.max_decoding_message_size,
1819 max_encoding_message_size: self.max_encoding_message_size,
1820 }
1821 }
1822 }
1823 impl<T: DataproxyReplicationService> Clone for _Inner<T> {
1824 fn clone(&self) -> Self {
1825 Self(Arc::clone(&self.0))
1826 }
1827 }
1828 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
1829 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1830 write!(f, "{:?}", self.0)
1831 }
1832 }
1833 impl<T: DataproxyReplicationService> tonic::server::NamedService
1834 for DataproxyReplicationServiceServer<T> {
1835 const NAME: &'static str = "aruna.api.dataproxy.services.v2.DataproxyReplicationService";
1836 }
1837}
1838pub mod dataproxy_backend_service_server {
1840 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
1841 use tonic::codegen::*;
1842 #[async_trait]
1844 pub trait DataproxyBackendService: Send + Sync + 'static {
1845 async fn put_object(
1846 &self,
1847 request: tonic::Request<tonic::Streaming<super::PutObjectRequest>>,
1848 ) -> std::result::Result<
1849 tonic::Response<super::PutObjectResponse>,
1850 tonic::Status,
1851 >;
1852 type GetObjectStream: tonic::codegen::tokio_stream::Stream<
1854 Item = std::result::Result<super::GetObjectResponse, tonic::Status>,
1855 >
1856 + Send
1857 + 'static;
1858 async fn get_object(
1859 &self,
1860 request: tonic::Request<super::GetObjectRequest>,
1861 ) -> std::result::Result<tonic::Response<Self::GetObjectStream>, tonic::Status>;
1862 async fn head_object(
1863 &self,
1864 request: tonic::Request<super::HeadObjectRequest>,
1865 ) -> std::result::Result<
1866 tonic::Response<super::HeadObjectResponse>,
1867 tonic::Status,
1868 >;
1869 async fn init_multi_part_upload(
1870 &self,
1871 request: tonic::Request<super::InitMultiPartUploadRequest>,
1872 ) -> std::result::Result<
1873 tonic::Response<super::InitMultiPartUploadResponse>,
1874 tonic::Status,
1875 >;
1876 async fn upload_part(
1877 &self,
1878 request: tonic::Request<tonic::Streaming<super::UploadPartRequest>>,
1879 ) -> std::result::Result<
1880 tonic::Response<super::UploadPartResponse>,
1881 tonic::Status,
1882 >;
1883 async fn complete_multi_part_upload(
1884 &self,
1885 request: tonic::Request<super::CompleteMultiPartUploadRequest>,
1886 ) -> std::result::Result<
1887 tonic::Response<super::CompleteMultiPartUploadResponse>,
1888 tonic::Status,
1889 >;
1890 async fn create_bucket(
1891 &self,
1892 request: tonic::Request<super::CreateBucketRequest>,
1893 ) -> std::result::Result<
1894 tonic::Response<super::CreateBucketResponse>,
1895 tonic::Status,
1896 >;
1897 async fn delete_bucket(
1898 &self,
1899 request: tonic::Request<super::DeleteBucketRequest>,
1900 ) -> std::result::Result<
1901 tonic::Response<super::DeleteBucketResponse>,
1902 tonic::Status,
1903 >;
1904 async fn delete_object(
1905 &self,
1906 request: tonic::Request<super::DeleteObjectRequest>,
1907 ) -> std::result::Result<
1908 tonic::Response<super::DeleteObjectResponse>,
1909 tonic::Status,
1910 >;
1911 async fn init_location(
1912 &self,
1913 request: tonic::Request<super::InitLocationRequest>,
1914 ) -> std::result::Result<
1915 tonic::Response<super::InitLocationResponse>,
1916 tonic::Status,
1917 >;
1918 }
1919 #[derive(Debug)]
1920 pub struct DataproxyBackendServiceServer<T: DataproxyBackendService> {
1921 inner: _Inner<T>,
1922 accept_compression_encodings: EnabledCompressionEncodings,
1923 send_compression_encodings: EnabledCompressionEncodings,
1924 max_decoding_message_size: Option<usize>,
1925 max_encoding_message_size: Option<usize>,
1926 }
1927 struct _Inner<T>(Arc<T>);
1928 impl<T: DataproxyBackendService> DataproxyBackendServiceServer<T> {
1929 pub fn new(inner: T) -> Self {
1930 Self::from_arc(Arc::new(inner))
1931 }
1932 pub fn from_arc(inner: Arc<T>) -> Self {
1933 let inner = _Inner(inner);
1934 Self {
1935 inner,
1936 accept_compression_encodings: Default::default(),
1937 send_compression_encodings: Default::default(),
1938 max_decoding_message_size: None,
1939 max_encoding_message_size: None,
1940 }
1941 }
1942 pub fn with_interceptor<F>(
1943 inner: T,
1944 interceptor: F,
1945 ) -> InterceptedService<Self, F>
1946 where
1947 F: tonic::service::Interceptor,
1948 {
1949 InterceptedService::new(Self::new(inner), interceptor)
1950 }
1951 #[must_use]
1953 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1954 self.accept_compression_encodings.enable(encoding);
1955 self
1956 }
1957 #[must_use]
1959 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1960 self.send_compression_encodings.enable(encoding);
1961 self
1962 }
1963 #[must_use]
1967 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1968 self.max_decoding_message_size = Some(limit);
1969 self
1970 }
1971 #[must_use]
1975 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1976 self.max_encoding_message_size = Some(limit);
1977 self
1978 }
1979 }
1980 impl<T, B> tonic::codegen::Service<http::Request<B>>
1981 for DataproxyBackendServiceServer<T>
1982 where
1983 T: DataproxyBackendService,
1984 B: Body + Send + 'static,
1985 B::Error: Into<StdError> + Send + 'static,
1986 {
1987 type Response = http::Response<tonic::body::BoxBody>;
1988 type Error = std::convert::Infallible;
1989 type Future = BoxFuture<Self::Response, Self::Error>;
1990 fn poll_ready(
1991 &mut self,
1992 _cx: &mut Context<'_>,
1993 ) -> Poll<std::result::Result<(), Self::Error>> {
1994 Poll::Ready(Ok(()))
1995 }
1996 fn call(&mut self, req: http::Request<B>) -> Self::Future {
1997 let inner = self.inner.clone();
1998 match req.uri().path() {
1999 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/PutObject" => {
2000 #[allow(non_camel_case_types)]
2001 struct PutObjectSvc<T: DataproxyBackendService>(pub Arc<T>);
2002 impl<
2003 T: DataproxyBackendService,
2004 > tonic::server::ClientStreamingService<super::PutObjectRequest>
2005 for PutObjectSvc<T> {
2006 type Response = super::PutObjectResponse;
2007 type Future = BoxFuture<
2008 tonic::Response<Self::Response>,
2009 tonic::Status,
2010 >;
2011 fn call(
2012 &mut self,
2013 request: tonic::Request<
2014 tonic::Streaming<super::PutObjectRequest>,
2015 >,
2016 ) -> Self::Future {
2017 let inner = Arc::clone(&self.0);
2018 let fut = async move {
2019 <T as DataproxyBackendService>::put_object(&inner, request)
2020 .await
2021 };
2022 Box::pin(fut)
2023 }
2024 }
2025 let accept_compression_encodings = self.accept_compression_encodings;
2026 let send_compression_encodings = self.send_compression_encodings;
2027 let max_decoding_message_size = self.max_decoding_message_size;
2028 let max_encoding_message_size = self.max_encoding_message_size;
2029 let inner = self.inner.clone();
2030 let fut = async move {
2031 let inner = inner.0;
2032 let method = PutObjectSvc(inner);
2033 let codec = tonic::codec::ProstCodec::default();
2034 let mut grpc = tonic::server::Grpc::new(codec)
2035 .apply_compression_config(
2036 accept_compression_encodings,
2037 send_compression_encodings,
2038 )
2039 .apply_max_message_size_config(
2040 max_decoding_message_size,
2041 max_encoding_message_size,
2042 );
2043 let res = grpc.client_streaming(method, req).await;
2044 Ok(res)
2045 };
2046 Box::pin(fut)
2047 }
2048 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/GetObject" => {
2049 #[allow(non_camel_case_types)]
2050 struct GetObjectSvc<T: DataproxyBackendService>(pub Arc<T>);
2051 impl<
2052 T: DataproxyBackendService,
2053 > tonic::server::ServerStreamingService<super::GetObjectRequest>
2054 for GetObjectSvc<T> {
2055 type Response = super::GetObjectResponse;
2056 type ResponseStream = T::GetObjectStream;
2057 type Future = BoxFuture<
2058 tonic::Response<Self::ResponseStream>,
2059 tonic::Status,
2060 >;
2061 fn call(
2062 &mut self,
2063 request: tonic::Request<super::GetObjectRequest>,
2064 ) -> Self::Future {
2065 let inner = Arc::clone(&self.0);
2066 let fut = async move {
2067 <T as DataproxyBackendService>::get_object(&inner, request)
2068 .await
2069 };
2070 Box::pin(fut)
2071 }
2072 }
2073 let accept_compression_encodings = self.accept_compression_encodings;
2074 let send_compression_encodings = self.send_compression_encodings;
2075 let max_decoding_message_size = self.max_decoding_message_size;
2076 let max_encoding_message_size = self.max_encoding_message_size;
2077 let inner = self.inner.clone();
2078 let fut = async move {
2079 let inner = inner.0;
2080 let method = GetObjectSvc(inner);
2081 let codec = tonic::codec::ProstCodec::default();
2082 let mut grpc = tonic::server::Grpc::new(codec)
2083 .apply_compression_config(
2084 accept_compression_encodings,
2085 send_compression_encodings,
2086 )
2087 .apply_max_message_size_config(
2088 max_decoding_message_size,
2089 max_encoding_message_size,
2090 );
2091 let res = grpc.server_streaming(method, req).await;
2092 Ok(res)
2093 };
2094 Box::pin(fut)
2095 }
2096 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/HeadObject" => {
2097 #[allow(non_camel_case_types)]
2098 struct HeadObjectSvc<T: DataproxyBackendService>(pub Arc<T>);
2099 impl<
2100 T: DataproxyBackendService,
2101 > tonic::server::UnaryService<super::HeadObjectRequest>
2102 for HeadObjectSvc<T> {
2103 type Response = super::HeadObjectResponse;
2104 type Future = BoxFuture<
2105 tonic::Response<Self::Response>,
2106 tonic::Status,
2107 >;
2108 fn call(
2109 &mut self,
2110 request: tonic::Request<super::HeadObjectRequest>,
2111 ) -> Self::Future {
2112 let inner = Arc::clone(&self.0);
2113 let fut = async move {
2114 <T as DataproxyBackendService>::head_object(&inner, request)
2115 .await
2116 };
2117 Box::pin(fut)
2118 }
2119 }
2120 let accept_compression_encodings = self.accept_compression_encodings;
2121 let send_compression_encodings = self.send_compression_encodings;
2122 let max_decoding_message_size = self.max_decoding_message_size;
2123 let max_encoding_message_size = self.max_encoding_message_size;
2124 let inner = self.inner.clone();
2125 let fut = async move {
2126 let inner = inner.0;
2127 let method = HeadObjectSvc(inner);
2128 let codec = tonic::codec::ProstCodec::default();
2129 let mut grpc = tonic::server::Grpc::new(codec)
2130 .apply_compression_config(
2131 accept_compression_encodings,
2132 send_compression_encodings,
2133 )
2134 .apply_max_message_size_config(
2135 max_decoding_message_size,
2136 max_encoding_message_size,
2137 );
2138 let res = grpc.unary(method, req).await;
2139 Ok(res)
2140 };
2141 Box::pin(fut)
2142 }
2143 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/InitMultiPartUpload" => {
2144 #[allow(non_camel_case_types)]
2145 struct InitMultiPartUploadSvc<T: DataproxyBackendService>(
2146 pub Arc<T>,
2147 );
2148 impl<
2149 T: DataproxyBackendService,
2150 > tonic::server::UnaryService<super::InitMultiPartUploadRequest>
2151 for InitMultiPartUploadSvc<T> {
2152 type Response = super::InitMultiPartUploadResponse;
2153 type Future = BoxFuture<
2154 tonic::Response<Self::Response>,
2155 tonic::Status,
2156 >;
2157 fn call(
2158 &mut self,
2159 request: tonic::Request<super::InitMultiPartUploadRequest>,
2160 ) -> Self::Future {
2161 let inner = Arc::clone(&self.0);
2162 let fut = async move {
2163 <T as DataproxyBackendService>::init_multi_part_upload(
2164 &inner,
2165 request,
2166 )
2167 .await
2168 };
2169 Box::pin(fut)
2170 }
2171 }
2172 let accept_compression_encodings = self.accept_compression_encodings;
2173 let send_compression_encodings = self.send_compression_encodings;
2174 let max_decoding_message_size = self.max_decoding_message_size;
2175 let max_encoding_message_size = self.max_encoding_message_size;
2176 let inner = self.inner.clone();
2177 let fut = async move {
2178 let inner = inner.0;
2179 let method = InitMultiPartUploadSvc(inner);
2180 let codec = tonic::codec::ProstCodec::default();
2181 let mut grpc = tonic::server::Grpc::new(codec)
2182 .apply_compression_config(
2183 accept_compression_encodings,
2184 send_compression_encodings,
2185 )
2186 .apply_max_message_size_config(
2187 max_decoding_message_size,
2188 max_encoding_message_size,
2189 );
2190 let res = grpc.unary(method, req).await;
2191 Ok(res)
2192 };
2193 Box::pin(fut)
2194 }
2195 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/UploadPart" => {
2196 #[allow(non_camel_case_types)]
2197 struct UploadPartSvc<T: DataproxyBackendService>(pub Arc<T>);
2198 impl<
2199 T: DataproxyBackendService,
2200 > tonic::server::ClientStreamingService<super::UploadPartRequest>
2201 for UploadPartSvc<T> {
2202 type Response = super::UploadPartResponse;
2203 type Future = BoxFuture<
2204 tonic::Response<Self::Response>,
2205 tonic::Status,
2206 >;
2207 fn call(
2208 &mut self,
2209 request: tonic::Request<
2210 tonic::Streaming<super::UploadPartRequest>,
2211 >,
2212 ) -> Self::Future {
2213 let inner = Arc::clone(&self.0);
2214 let fut = async move {
2215 <T as DataproxyBackendService>::upload_part(&inner, request)
2216 .await
2217 };
2218 Box::pin(fut)
2219 }
2220 }
2221 let accept_compression_encodings = self.accept_compression_encodings;
2222 let send_compression_encodings = self.send_compression_encodings;
2223 let max_decoding_message_size = self.max_decoding_message_size;
2224 let max_encoding_message_size = self.max_encoding_message_size;
2225 let inner = self.inner.clone();
2226 let fut = async move {
2227 let inner = inner.0;
2228 let method = UploadPartSvc(inner);
2229 let codec = tonic::codec::ProstCodec::default();
2230 let mut grpc = tonic::server::Grpc::new(codec)
2231 .apply_compression_config(
2232 accept_compression_encodings,
2233 send_compression_encodings,
2234 )
2235 .apply_max_message_size_config(
2236 max_decoding_message_size,
2237 max_encoding_message_size,
2238 );
2239 let res = grpc.client_streaming(method, req).await;
2240 Ok(res)
2241 };
2242 Box::pin(fut)
2243 }
2244 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/CompleteMultiPartUpload" => {
2245 #[allow(non_camel_case_types)]
2246 struct CompleteMultiPartUploadSvc<T: DataproxyBackendService>(
2247 pub Arc<T>,
2248 );
2249 impl<
2250 T: DataproxyBackendService,
2251 > tonic::server::UnaryService<super::CompleteMultiPartUploadRequest>
2252 for CompleteMultiPartUploadSvc<T> {
2253 type Response = super::CompleteMultiPartUploadResponse;
2254 type Future = BoxFuture<
2255 tonic::Response<Self::Response>,
2256 tonic::Status,
2257 >;
2258 fn call(
2259 &mut self,
2260 request: tonic::Request<
2261 super::CompleteMultiPartUploadRequest,
2262 >,
2263 ) -> Self::Future {
2264 let inner = Arc::clone(&self.0);
2265 let fut = async move {
2266 <T as DataproxyBackendService>::complete_multi_part_upload(
2267 &inner,
2268 request,
2269 )
2270 .await
2271 };
2272 Box::pin(fut)
2273 }
2274 }
2275 let accept_compression_encodings = self.accept_compression_encodings;
2276 let send_compression_encodings = self.send_compression_encodings;
2277 let max_decoding_message_size = self.max_decoding_message_size;
2278 let max_encoding_message_size = self.max_encoding_message_size;
2279 let inner = self.inner.clone();
2280 let fut = async move {
2281 let inner = inner.0;
2282 let method = CompleteMultiPartUploadSvc(inner);
2283 let codec = tonic::codec::ProstCodec::default();
2284 let mut grpc = tonic::server::Grpc::new(codec)
2285 .apply_compression_config(
2286 accept_compression_encodings,
2287 send_compression_encodings,
2288 )
2289 .apply_max_message_size_config(
2290 max_decoding_message_size,
2291 max_encoding_message_size,
2292 );
2293 let res = grpc.unary(method, req).await;
2294 Ok(res)
2295 };
2296 Box::pin(fut)
2297 }
2298 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/CreateBucket" => {
2299 #[allow(non_camel_case_types)]
2300 struct CreateBucketSvc<T: DataproxyBackendService>(pub Arc<T>);
2301 impl<
2302 T: DataproxyBackendService,
2303 > tonic::server::UnaryService<super::CreateBucketRequest>
2304 for CreateBucketSvc<T> {
2305 type Response = super::CreateBucketResponse;
2306 type Future = BoxFuture<
2307 tonic::Response<Self::Response>,
2308 tonic::Status,
2309 >;
2310 fn call(
2311 &mut self,
2312 request: tonic::Request<super::CreateBucketRequest>,
2313 ) -> Self::Future {
2314 let inner = Arc::clone(&self.0);
2315 let fut = async move {
2316 <T as DataproxyBackendService>::create_bucket(
2317 &inner,
2318 request,
2319 )
2320 .await
2321 };
2322 Box::pin(fut)
2323 }
2324 }
2325 let accept_compression_encodings = self.accept_compression_encodings;
2326 let send_compression_encodings = self.send_compression_encodings;
2327 let max_decoding_message_size = self.max_decoding_message_size;
2328 let max_encoding_message_size = self.max_encoding_message_size;
2329 let inner = self.inner.clone();
2330 let fut = async move {
2331 let inner = inner.0;
2332 let method = CreateBucketSvc(inner);
2333 let codec = tonic::codec::ProstCodec::default();
2334 let mut grpc = tonic::server::Grpc::new(codec)
2335 .apply_compression_config(
2336 accept_compression_encodings,
2337 send_compression_encodings,
2338 )
2339 .apply_max_message_size_config(
2340 max_decoding_message_size,
2341 max_encoding_message_size,
2342 );
2343 let res = grpc.unary(method, req).await;
2344 Ok(res)
2345 };
2346 Box::pin(fut)
2347 }
2348 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/DeleteBucket" => {
2349 #[allow(non_camel_case_types)]
2350 struct DeleteBucketSvc<T: DataproxyBackendService>(pub Arc<T>);
2351 impl<
2352 T: DataproxyBackendService,
2353 > tonic::server::UnaryService<super::DeleteBucketRequest>
2354 for DeleteBucketSvc<T> {
2355 type Response = super::DeleteBucketResponse;
2356 type Future = BoxFuture<
2357 tonic::Response<Self::Response>,
2358 tonic::Status,
2359 >;
2360 fn call(
2361 &mut self,
2362 request: tonic::Request<super::DeleteBucketRequest>,
2363 ) -> Self::Future {
2364 let inner = Arc::clone(&self.0);
2365 let fut = async move {
2366 <T as DataproxyBackendService>::delete_bucket(
2367 &inner,
2368 request,
2369 )
2370 .await
2371 };
2372 Box::pin(fut)
2373 }
2374 }
2375 let accept_compression_encodings = self.accept_compression_encodings;
2376 let send_compression_encodings = self.send_compression_encodings;
2377 let max_decoding_message_size = self.max_decoding_message_size;
2378 let max_encoding_message_size = self.max_encoding_message_size;
2379 let inner = self.inner.clone();
2380 let fut = async move {
2381 let inner = inner.0;
2382 let method = DeleteBucketSvc(inner);
2383 let codec = tonic::codec::ProstCodec::default();
2384 let mut grpc = tonic::server::Grpc::new(codec)
2385 .apply_compression_config(
2386 accept_compression_encodings,
2387 send_compression_encodings,
2388 )
2389 .apply_max_message_size_config(
2390 max_decoding_message_size,
2391 max_encoding_message_size,
2392 );
2393 let res = grpc.unary(method, req).await;
2394 Ok(res)
2395 };
2396 Box::pin(fut)
2397 }
2398 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/DeleteObject" => {
2399 #[allow(non_camel_case_types)]
2400 struct DeleteObjectSvc<T: DataproxyBackendService>(pub Arc<T>);
2401 impl<
2402 T: DataproxyBackendService,
2403 > tonic::server::UnaryService<super::DeleteObjectRequest>
2404 for DeleteObjectSvc<T> {
2405 type Response = super::DeleteObjectResponse;
2406 type Future = BoxFuture<
2407 tonic::Response<Self::Response>,
2408 tonic::Status,
2409 >;
2410 fn call(
2411 &mut self,
2412 request: tonic::Request<super::DeleteObjectRequest>,
2413 ) -> Self::Future {
2414 let inner = Arc::clone(&self.0);
2415 let fut = async move {
2416 <T as DataproxyBackendService>::delete_object(
2417 &inner,
2418 request,
2419 )
2420 .await
2421 };
2422 Box::pin(fut)
2423 }
2424 }
2425 let accept_compression_encodings = self.accept_compression_encodings;
2426 let send_compression_encodings = self.send_compression_encodings;
2427 let max_decoding_message_size = self.max_decoding_message_size;
2428 let max_encoding_message_size = self.max_encoding_message_size;
2429 let inner = self.inner.clone();
2430 let fut = async move {
2431 let inner = inner.0;
2432 let method = DeleteObjectSvc(inner);
2433 let codec = tonic::codec::ProstCodec::default();
2434 let mut grpc = tonic::server::Grpc::new(codec)
2435 .apply_compression_config(
2436 accept_compression_encodings,
2437 send_compression_encodings,
2438 )
2439 .apply_max_message_size_config(
2440 max_decoding_message_size,
2441 max_encoding_message_size,
2442 );
2443 let res = grpc.unary(method, req).await;
2444 Ok(res)
2445 };
2446 Box::pin(fut)
2447 }
2448 "/aruna.api.dataproxy.services.v2.DataproxyBackendService/InitLocation" => {
2449 #[allow(non_camel_case_types)]
2450 struct InitLocationSvc<T: DataproxyBackendService>(pub Arc<T>);
2451 impl<
2452 T: DataproxyBackendService,
2453 > tonic::server::UnaryService<super::InitLocationRequest>
2454 for InitLocationSvc<T> {
2455 type Response = super::InitLocationResponse;
2456 type Future = BoxFuture<
2457 tonic::Response<Self::Response>,
2458 tonic::Status,
2459 >;
2460 fn call(
2461 &mut self,
2462 request: tonic::Request<super::InitLocationRequest>,
2463 ) -> Self::Future {
2464 let inner = Arc::clone(&self.0);
2465 let fut = async move {
2466 <T as DataproxyBackendService>::init_location(
2467 &inner,
2468 request,
2469 )
2470 .await
2471 };
2472 Box::pin(fut)
2473 }
2474 }
2475 let accept_compression_encodings = self.accept_compression_encodings;
2476 let send_compression_encodings = self.send_compression_encodings;
2477 let max_decoding_message_size = self.max_decoding_message_size;
2478 let max_encoding_message_size = self.max_encoding_message_size;
2479 let inner = self.inner.clone();
2480 let fut = async move {
2481 let inner = inner.0;
2482 let method = InitLocationSvc(inner);
2483 let codec = tonic::codec::ProstCodec::default();
2484 let mut grpc = tonic::server::Grpc::new(codec)
2485 .apply_compression_config(
2486 accept_compression_encodings,
2487 send_compression_encodings,
2488 )
2489 .apply_max_message_size_config(
2490 max_decoding_message_size,
2491 max_encoding_message_size,
2492 );
2493 let res = grpc.unary(method, req).await;
2494 Ok(res)
2495 };
2496 Box::pin(fut)
2497 }
2498 _ => {
2499 Box::pin(async move {
2500 Ok(
2501 http::Response::builder()
2502 .status(200)
2503 .header("grpc-status", "12")
2504 .header("content-type", "application/grpc")
2505 .body(empty_body())
2506 .unwrap(),
2507 )
2508 })
2509 }
2510 }
2511 }
2512 }
2513 impl<T: DataproxyBackendService> Clone for DataproxyBackendServiceServer<T> {
2514 fn clone(&self) -> Self {
2515 let inner = self.inner.clone();
2516 Self {
2517 inner,
2518 accept_compression_encodings: self.accept_compression_encodings,
2519 send_compression_encodings: self.send_compression_encodings,
2520 max_decoding_message_size: self.max_decoding_message_size,
2521 max_encoding_message_size: self.max_encoding_message_size,
2522 }
2523 }
2524 }
2525 impl<T: DataproxyBackendService> Clone for _Inner<T> {
2526 fn clone(&self) -> Self {
2527 Self(Arc::clone(&self.0))
2528 }
2529 }
2530 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
2531 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
2532 write!(f, "{:?}", self.0)
2533 }
2534 }
2535 impl<T: DataproxyBackendService> tonic::server::NamedService
2536 for DataproxyBackendServiceServer<T> {
2537 const NAME: &'static str = "aruna.api.dataproxy.services.v2.DataproxyBackendService";
2538 }
2539}
2540pub mod dataproxy_user_service_server {
2542 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
2543 use tonic::codegen::*;
2544 #[async_trait]
2546 pub trait DataproxyUserService: Send + Sync + 'static {
2547 async fn get_credentials(
2554 &self,
2555 request: tonic::Request<super::GetCredentialsRequest>,
2556 ) -> std::result::Result<
2557 tonic::Response<super::GetCredentialsResponse>,
2558 tonic::Status,
2559 >;
2560 async fn create_or_update_credentials(
2567 &self,
2568 request: tonic::Request<super::CreateOrUpdateCredentialsRequest>,
2569 ) -> std::result::Result<
2570 tonic::Response<super::CreateOrUpdateCredentialsResponse>,
2571 tonic::Status,
2572 >;
2573 async fn revoke_credentials(
2580 &self,
2581 request: tonic::Request<super::RevokeCredentialsRequest>,
2582 ) -> std::result::Result<
2583 tonic::Response<super::RevokeCredentialsResponse>,
2584 tonic::Status,
2585 >;
2586 async fn push_replica(
2592 &self,
2593 request: tonic::Request<super::PushReplicaRequest>,
2594 ) -> std::result::Result<
2595 tonic::Response<super::PushReplicaResponse>,
2596 tonic::Status,
2597 >;
2598 async fn pull_replica(
2604 &self,
2605 request: tonic::Request<super::PullReplicaRequest>,
2606 ) -> std::result::Result<
2607 tonic::Response<super::PullReplicaResponse>,
2608 tonic::Status,
2609 >;
2610 async fn replication_status(
2616 &self,
2617 request: tonic::Request<super::ReplicationStatusRequest>,
2618 ) -> std::result::Result<
2619 tonic::Response<super::ReplicationStatusResponse>,
2620 tonic::Status,
2621 >;
2622 }
2623 #[derive(Debug)]
2624 pub struct DataproxyUserServiceServer<T: DataproxyUserService> {
2625 inner: _Inner<T>,
2626 accept_compression_encodings: EnabledCompressionEncodings,
2627 send_compression_encodings: EnabledCompressionEncodings,
2628 max_decoding_message_size: Option<usize>,
2629 max_encoding_message_size: Option<usize>,
2630 }
2631 struct _Inner<T>(Arc<T>);
2632 impl<T: DataproxyUserService> DataproxyUserServiceServer<T> {
2633 pub fn new(inner: T) -> Self {
2634 Self::from_arc(Arc::new(inner))
2635 }
2636 pub fn from_arc(inner: Arc<T>) -> Self {
2637 let inner = _Inner(inner);
2638 Self {
2639 inner,
2640 accept_compression_encodings: Default::default(),
2641 send_compression_encodings: Default::default(),
2642 max_decoding_message_size: None,
2643 max_encoding_message_size: None,
2644 }
2645 }
2646 pub fn with_interceptor<F>(
2647 inner: T,
2648 interceptor: F,
2649 ) -> InterceptedService<Self, F>
2650 where
2651 F: tonic::service::Interceptor,
2652 {
2653 InterceptedService::new(Self::new(inner), interceptor)
2654 }
2655 #[must_use]
2657 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
2658 self.accept_compression_encodings.enable(encoding);
2659 self
2660 }
2661 #[must_use]
2663 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
2664 self.send_compression_encodings.enable(encoding);
2665 self
2666 }
2667 #[must_use]
2671 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
2672 self.max_decoding_message_size = Some(limit);
2673 self
2674 }
2675 #[must_use]
2679 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
2680 self.max_encoding_message_size = Some(limit);
2681 self
2682 }
2683 }
2684 impl<T, B> tonic::codegen::Service<http::Request<B>>
2685 for DataproxyUserServiceServer<T>
2686 where
2687 T: DataproxyUserService,
2688 B: Body + Send + 'static,
2689 B::Error: Into<StdError> + Send + 'static,
2690 {
2691 type Response = http::Response<tonic::body::BoxBody>;
2692 type Error = std::convert::Infallible;
2693 type Future = BoxFuture<Self::Response, Self::Error>;
2694 fn poll_ready(
2695 &mut self,
2696 _cx: &mut Context<'_>,
2697 ) -> Poll<std::result::Result<(), Self::Error>> {
2698 Poll::Ready(Ok(()))
2699 }
2700 fn call(&mut self, req: http::Request<B>) -> Self::Future {
2701 let inner = self.inner.clone();
2702 match req.uri().path() {
2703 "/aruna.api.dataproxy.services.v2.DataproxyUserService/GetCredentials" => {
2704 #[allow(non_camel_case_types)]
2705 struct GetCredentialsSvc<T: DataproxyUserService>(pub Arc<T>);
2706 impl<
2707 T: DataproxyUserService,
2708 > tonic::server::UnaryService<super::GetCredentialsRequest>
2709 for GetCredentialsSvc<T> {
2710 type Response = super::GetCredentialsResponse;
2711 type Future = BoxFuture<
2712 tonic::Response<Self::Response>,
2713 tonic::Status,
2714 >;
2715 fn call(
2716 &mut self,
2717 request: tonic::Request<super::GetCredentialsRequest>,
2718 ) -> Self::Future {
2719 let inner = Arc::clone(&self.0);
2720 let fut = async move {
2721 <T as DataproxyUserService>::get_credentials(
2722 &inner,
2723 request,
2724 )
2725 .await
2726 };
2727 Box::pin(fut)
2728 }
2729 }
2730 let accept_compression_encodings = self.accept_compression_encodings;
2731 let send_compression_encodings = self.send_compression_encodings;
2732 let max_decoding_message_size = self.max_decoding_message_size;
2733 let max_encoding_message_size = self.max_encoding_message_size;
2734 let inner = self.inner.clone();
2735 let fut = async move {
2736 let inner = inner.0;
2737 let method = GetCredentialsSvc(inner);
2738 let codec = tonic::codec::ProstCodec::default();
2739 let mut grpc = tonic::server::Grpc::new(codec)
2740 .apply_compression_config(
2741 accept_compression_encodings,
2742 send_compression_encodings,
2743 )
2744 .apply_max_message_size_config(
2745 max_decoding_message_size,
2746 max_encoding_message_size,
2747 );
2748 let res = grpc.unary(method, req).await;
2749 Ok(res)
2750 };
2751 Box::pin(fut)
2752 }
2753 "/aruna.api.dataproxy.services.v2.DataproxyUserService/CreateOrUpdateCredentials" => {
2754 #[allow(non_camel_case_types)]
2755 struct CreateOrUpdateCredentialsSvc<T: DataproxyUserService>(
2756 pub Arc<T>,
2757 );
2758 impl<
2759 T: DataproxyUserService,
2760 > tonic::server::UnaryService<
2761 super::CreateOrUpdateCredentialsRequest,
2762 > for CreateOrUpdateCredentialsSvc<T> {
2763 type Response = super::CreateOrUpdateCredentialsResponse;
2764 type Future = BoxFuture<
2765 tonic::Response<Self::Response>,
2766 tonic::Status,
2767 >;
2768 fn call(
2769 &mut self,
2770 request: tonic::Request<
2771 super::CreateOrUpdateCredentialsRequest,
2772 >,
2773 ) -> Self::Future {
2774 let inner = Arc::clone(&self.0);
2775 let fut = async move {
2776 <T as DataproxyUserService>::create_or_update_credentials(
2777 &inner,
2778 request,
2779 )
2780 .await
2781 };
2782 Box::pin(fut)
2783 }
2784 }
2785 let accept_compression_encodings = self.accept_compression_encodings;
2786 let send_compression_encodings = self.send_compression_encodings;
2787 let max_decoding_message_size = self.max_decoding_message_size;
2788 let max_encoding_message_size = self.max_encoding_message_size;
2789 let inner = self.inner.clone();
2790 let fut = async move {
2791 let inner = inner.0;
2792 let method = CreateOrUpdateCredentialsSvc(inner);
2793 let codec = tonic::codec::ProstCodec::default();
2794 let mut grpc = tonic::server::Grpc::new(codec)
2795 .apply_compression_config(
2796 accept_compression_encodings,
2797 send_compression_encodings,
2798 )
2799 .apply_max_message_size_config(
2800 max_decoding_message_size,
2801 max_encoding_message_size,
2802 );
2803 let res = grpc.unary(method, req).await;
2804 Ok(res)
2805 };
2806 Box::pin(fut)
2807 }
2808 "/aruna.api.dataproxy.services.v2.DataproxyUserService/RevokeCredentials" => {
2809 #[allow(non_camel_case_types)]
2810 struct RevokeCredentialsSvc<T: DataproxyUserService>(pub Arc<T>);
2811 impl<
2812 T: DataproxyUserService,
2813 > tonic::server::UnaryService<super::RevokeCredentialsRequest>
2814 for RevokeCredentialsSvc<T> {
2815 type Response = super::RevokeCredentialsResponse;
2816 type Future = BoxFuture<
2817 tonic::Response<Self::Response>,
2818 tonic::Status,
2819 >;
2820 fn call(
2821 &mut self,
2822 request: tonic::Request<super::RevokeCredentialsRequest>,
2823 ) -> Self::Future {
2824 let inner = Arc::clone(&self.0);
2825 let fut = async move {
2826 <T as DataproxyUserService>::revoke_credentials(
2827 &inner,
2828 request,
2829 )
2830 .await
2831 };
2832 Box::pin(fut)
2833 }
2834 }
2835 let accept_compression_encodings = self.accept_compression_encodings;
2836 let send_compression_encodings = self.send_compression_encodings;
2837 let max_decoding_message_size = self.max_decoding_message_size;
2838 let max_encoding_message_size = self.max_encoding_message_size;
2839 let inner = self.inner.clone();
2840 let fut = async move {
2841 let inner = inner.0;
2842 let method = RevokeCredentialsSvc(inner);
2843 let codec = tonic::codec::ProstCodec::default();
2844 let mut grpc = tonic::server::Grpc::new(codec)
2845 .apply_compression_config(
2846 accept_compression_encodings,
2847 send_compression_encodings,
2848 )
2849 .apply_max_message_size_config(
2850 max_decoding_message_size,
2851 max_encoding_message_size,
2852 );
2853 let res = grpc.unary(method, req).await;
2854 Ok(res)
2855 };
2856 Box::pin(fut)
2857 }
2858 "/aruna.api.dataproxy.services.v2.DataproxyUserService/PushReplica" => {
2859 #[allow(non_camel_case_types)]
2860 struct PushReplicaSvc<T: DataproxyUserService>(pub Arc<T>);
2861 impl<
2862 T: DataproxyUserService,
2863 > tonic::server::UnaryService<super::PushReplicaRequest>
2864 for PushReplicaSvc<T> {
2865 type Response = super::PushReplicaResponse;
2866 type Future = BoxFuture<
2867 tonic::Response<Self::Response>,
2868 tonic::Status,
2869 >;
2870 fn call(
2871 &mut self,
2872 request: tonic::Request<super::PushReplicaRequest>,
2873 ) -> Self::Future {
2874 let inner = Arc::clone(&self.0);
2875 let fut = async move {
2876 <T as DataproxyUserService>::push_replica(&inner, request)
2877 .await
2878 };
2879 Box::pin(fut)
2880 }
2881 }
2882 let accept_compression_encodings = self.accept_compression_encodings;
2883 let send_compression_encodings = self.send_compression_encodings;
2884 let max_decoding_message_size = self.max_decoding_message_size;
2885 let max_encoding_message_size = self.max_encoding_message_size;
2886 let inner = self.inner.clone();
2887 let fut = async move {
2888 let inner = inner.0;
2889 let method = PushReplicaSvc(inner);
2890 let codec = tonic::codec::ProstCodec::default();
2891 let mut grpc = tonic::server::Grpc::new(codec)
2892 .apply_compression_config(
2893 accept_compression_encodings,
2894 send_compression_encodings,
2895 )
2896 .apply_max_message_size_config(
2897 max_decoding_message_size,
2898 max_encoding_message_size,
2899 );
2900 let res = grpc.unary(method, req).await;
2901 Ok(res)
2902 };
2903 Box::pin(fut)
2904 }
2905 "/aruna.api.dataproxy.services.v2.DataproxyUserService/PullReplica" => {
2906 #[allow(non_camel_case_types)]
2907 struct PullReplicaSvc<T: DataproxyUserService>(pub Arc<T>);
2908 impl<
2909 T: DataproxyUserService,
2910 > tonic::server::UnaryService<super::PullReplicaRequest>
2911 for PullReplicaSvc<T> {
2912 type Response = super::PullReplicaResponse;
2913 type Future = BoxFuture<
2914 tonic::Response<Self::Response>,
2915 tonic::Status,
2916 >;
2917 fn call(
2918 &mut self,
2919 request: tonic::Request<super::PullReplicaRequest>,
2920 ) -> Self::Future {
2921 let inner = Arc::clone(&self.0);
2922 let fut = async move {
2923 <T as DataproxyUserService>::pull_replica(&inner, request)
2924 .await
2925 };
2926 Box::pin(fut)
2927 }
2928 }
2929 let accept_compression_encodings = self.accept_compression_encodings;
2930 let send_compression_encodings = self.send_compression_encodings;
2931 let max_decoding_message_size = self.max_decoding_message_size;
2932 let max_encoding_message_size = self.max_encoding_message_size;
2933 let inner = self.inner.clone();
2934 let fut = async move {
2935 let inner = inner.0;
2936 let method = PullReplicaSvc(inner);
2937 let codec = tonic::codec::ProstCodec::default();
2938 let mut grpc = tonic::server::Grpc::new(codec)
2939 .apply_compression_config(
2940 accept_compression_encodings,
2941 send_compression_encodings,
2942 )
2943 .apply_max_message_size_config(
2944 max_decoding_message_size,
2945 max_encoding_message_size,
2946 );
2947 let res = grpc.unary(method, req).await;
2948 Ok(res)
2949 };
2950 Box::pin(fut)
2951 }
2952 "/aruna.api.dataproxy.services.v2.DataproxyUserService/ReplicationStatus" => {
2953 #[allow(non_camel_case_types)]
2954 struct ReplicationStatusSvc<T: DataproxyUserService>(pub Arc<T>);
2955 impl<
2956 T: DataproxyUserService,
2957 > tonic::server::UnaryService<super::ReplicationStatusRequest>
2958 for ReplicationStatusSvc<T> {
2959 type Response = super::ReplicationStatusResponse;
2960 type Future = BoxFuture<
2961 tonic::Response<Self::Response>,
2962 tonic::Status,
2963 >;
2964 fn call(
2965 &mut self,
2966 request: tonic::Request<super::ReplicationStatusRequest>,
2967 ) -> Self::Future {
2968 let inner = Arc::clone(&self.0);
2969 let fut = async move {
2970 <T as DataproxyUserService>::replication_status(
2971 &inner,
2972 request,
2973 )
2974 .await
2975 };
2976 Box::pin(fut)
2977 }
2978 }
2979 let accept_compression_encodings = self.accept_compression_encodings;
2980 let send_compression_encodings = self.send_compression_encodings;
2981 let max_decoding_message_size = self.max_decoding_message_size;
2982 let max_encoding_message_size = self.max_encoding_message_size;
2983 let inner = self.inner.clone();
2984 let fut = async move {
2985 let inner = inner.0;
2986 let method = ReplicationStatusSvc(inner);
2987 let codec = tonic::codec::ProstCodec::default();
2988 let mut grpc = tonic::server::Grpc::new(codec)
2989 .apply_compression_config(
2990 accept_compression_encodings,
2991 send_compression_encodings,
2992 )
2993 .apply_max_message_size_config(
2994 max_decoding_message_size,
2995 max_encoding_message_size,
2996 );
2997 let res = grpc.unary(method, req).await;
2998 Ok(res)
2999 };
3000 Box::pin(fut)
3001 }
3002 _ => {
3003 Box::pin(async move {
3004 Ok(
3005 http::Response::builder()
3006 .status(200)
3007 .header("grpc-status", "12")
3008 .header("content-type", "application/grpc")
3009 .body(empty_body())
3010 .unwrap(),
3011 )
3012 })
3013 }
3014 }
3015 }
3016 }
3017 impl<T: DataproxyUserService> Clone for DataproxyUserServiceServer<T> {
3018 fn clone(&self) -> Self {
3019 let inner = self.inner.clone();
3020 Self {
3021 inner,
3022 accept_compression_encodings: self.accept_compression_encodings,
3023 send_compression_encodings: self.send_compression_encodings,
3024 max_decoding_message_size: self.max_decoding_message_size,
3025 max_encoding_message_size: self.max_encoding_message_size,
3026 }
3027 }
3028 }
3029 impl<T: DataproxyUserService> Clone for _Inner<T> {
3030 fn clone(&self) -> Self {
3031 Self(Arc::clone(&self.0))
3032 }
3033 }
3034 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
3035 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3036 write!(f, "{:?}", self.0)
3037 }
3038 }
3039 impl<T: DataproxyUserService> tonic::server::NamedService
3040 for DataproxyUserServiceServer<T> {
3041 const NAME: &'static str = "aruna.api.dataproxy.services.v2.DataproxyUserService";
3042 }
3043}
3044pub mod dataproxy_ingestion_service_server {
3046 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
3047 use tonic::codegen::*;
3048 #[async_trait]
3050 pub trait DataproxyIngestionService: Send + Sync + 'static {
3051 async fn ingest_existing_object(
3057 &self,
3058 request: tonic::Request<super::IngestExistingObjectRequest>,
3059 ) -> std::result::Result<
3060 tonic::Response<super::IngestExistingObjectResponse>,
3061 tonic::Status,
3062 >;
3063 }
3064 #[derive(Debug)]
3065 pub struct DataproxyIngestionServiceServer<T: DataproxyIngestionService> {
3066 inner: _Inner<T>,
3067 accept_compression_encodings: EnabledCompressionEncodings,
3068 send_compression_encodings: EnabledCompressionEncodings,
3069 max_decoding_message_size: Option<usize>,
3070 max_encoding_message_size: Option<usize>,
3071 }
3072 struct _Inner<T>(Arc<T>);
3073 impl<T: DataproxyIngestionService> DataproxyIngestionServiceServer<T> {
3074 pub fn new(inner: T) -> Self {
3075 Self::from_arc(Arc::new(inner))
3076 }
3077 pub fn from_arc(inner: Arc<T>) -> Self {
3078 let inner = _Inner(inner);
3079 Self {
3080 inner,
3081 accept_compression_encodings: Default::default(),
3082 send_compression_encodings: Default::default(),
3083 max_decoding_message_size: None,
3084 max_encoding_message_size: None,
3085 }
3086 }
3087 pub fn with_interceptor<F>(
3088 inner: T,
3089 interceptor: F,
3090 ) -> InterceptedService<Self, F>
3091 where
3092 F: tonic::service::Interceptor,
3093 {
3094 InterceptedService::new(Self::new(inner), interceptor)
3095 }
3096 #[must_use]
3098 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3099 self.accept_compression_encodings.enable(encoding);
3100 self
3101 }
3102 #[must_use]
3104 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3105 self.send_compression_encodings.enable(encoding);
3106 self
3107 }
3108 #[must_use]
3112 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3113 self.max_decoding_message_size = Some(limit);
3114 self
3115 }
3116 #[must_use]
3120 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3121 self.max_encoding_message_size = Some(limit);
3122 self
3123 }
3124 }
3125 impl<T, B> tonic::codegen::Service<http::Request<B>>
3126 for DataproxyIngestionServiceServer<T>
3127 where
3128 T: DataproxyIngestionService,
3129 B: Body + Send + 'static,
3130 B::Error: Into<StdError> + Send + 'static,
3131 {
3132 type Response = http::Response<tonic::body::BoxBody>;
3133 type Error = std::convert::Infallible;
3134 type Future = BoxFuture<Self::Response, Self::Error>;
3135 fn poll_ready(
3136 &mut self,
3137 _cx: &mut Context<'_>,
3138 ) -> Poll<std::result::Result<(), Self::Error>> {
3139 Poll::Ready(Ok(()))
3140 }
3141 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3142 let inner = self.inner.clone();
3143 match req.uri().path() {
3144 "/aruna.api.dataproxy.services.v2.DataproxyIngestionService/IngestExistingObject" => {
3145 #[allow(non_camel_case_types)]
3146 struct IngestExistingObjectSvc<T: DataproxyIngestionService>(
3147 pub Arc<T>,
3148 );
3149 impl<
3150 T: DataproxyIngestionService,
3151 > tonic::server::UnaryService<super::IngestExistingObjectRequest>
3152 for IngestExistingObjectSvc<T> {
3153 type Response = super::IngestExistingObjectResponse;
3154 type Future = BoxFuture<
3155 tonic::Response<Self::Response>,
3156 tonic::Status,
3157 >;
3158 fn call(
3159 &mut self,
3160 request: tonic::Request<super::IngestExistingObjectRequest>,
3161 ) -> Self::Future {
3162 let inner = Arc::clone(&self.0);
3163 let fut = async move {
3164 <T as DataproxyIngestionService>::ingest_existing_object(
3165 &inner,
3166 request,
3167 )
3168 .await
3169 };
3170 Box::pin(fut)
3171 }
3172 }
3173 let accept_compression_encodings = self.accept_compression_encodings;
3174 let send_compression_encodings = self.send_compression_encodings;
3175 let max_decoding_message_size = self.max_decoding_message_size;
3176 let max_encoding_message_size = self.max_encoding_message_size;
3177 let inner = self.inner.clone();
3178 let fut = async move {
3179 let inner = inner.0;
3180 let method = IngestExistingObjectSvc(inner);
3181 let codec = tonic::codec::ProstCodec::default();
3182 let mut grpc = tonic::server::Grpc::new(codec)
3183 .apply_compression_config(
3184 accept_compression_encodings,
3185 send_compression_encodings,
3186 )
3187 .apply_max_message_size_config(
3188 max_decoding_message_size,
3189 max_encoding_message_size,
3190 );
3191 let res = grpc.unary(method, req).await;
3192 Ok(res)
3193 };
3194 Box::pin(fut)
3195 }
3196 _ => {
3197 Box::pin(async move {
3198 Ok(
3199 http::Response::builder()
3200 .status(200)
3201 .header("grpc-status", "12")
3202 .header("content-type", "application/grpc")
3203 .body(empty_body())
3204 .unwrap(),
3205 )
3206 })
3207 }
3208 }
3209 }
3210 }
3211 impl<T: DataproxyIngestionService> Clone for DataproxyIngestionServiceServer<T> {
3212 fn clone(&self) -> Self {
3213 let inner = self.inner.clone();
3214 Self {
3215 inner,
3216 accept_compression_encodings: self.accept_compression_encodings,
3217 send_compression_encodings: self.send_compression_encodings,
3218 max_decoding_message_size: self.max_decoding_message_size,
3219 max_encoding_message_size: self.max_encoding_message_size,
3220 }
3221 }
3222 }
3223 impl<T: DataproxyIngestionService> Clone for _Inner<T> {
3224 fn clone(&self) -> Self {
3225 Self(Arc::clone(&self.0))
3226 }
3227 }
3228 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
3229 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3230 write!(f, "{:?}", self.0)
3231 }
3232 }
3233 impl<T: DataproxyIngestionService> tonic::server::NamedService
3234 for DataproxyIngestionServiceServer<T> {
3235 const NAME: &'static str = "aruna.api.dataproxy.services.v2.DataproxyIngestionService";
3236 }
3237}
3238#[derive(serde::Deserialize, serde::Serialize)]
3239#[allow(clippy::derive_partial_eq_without_eq)]
3240#[derive(Clone, PartialEq, ::prost::Message)]
3241pub struct CreateBundleRequest {
3242 #[prost(string, repeated, tag = "1")]
3243 pub resource_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
3244 #[prost(string, tag = "2")]
3246 pub filename: ::prost::alloc::string::String,
3247 #[prost(message, optional, tag = "3")]
3249 pub expires_at: ::core::option::Option<::prost_wkt_types::Timestamp>,
3250 #[prost(bool, tag = "4")]
3252 pub once: bool,
3253}
3254#[derive(serde::Deserialize, serde::Serialize)]
3255#[allow(clippy::derive_partial_eq_without_eq)]
3256#[derive(Clone, PartialEq, ::prost::Message)]
3257pub struct CreateBundleResponse {
3258 #[prost(string, tag = "1")]
3259 pub bundle_id: ::prost::alloc::string::String,
3260 #[prost(string, tag = "2")]
3261 pub bundle_url: ::prost::alloc::string::String,
3262}
3263#[derive(serde::Deserialize, serde::Serialize)]
3264#[allow(clippy::derive_partial_eq_without_eq)]
3265#[derive(Clone, PartialEq, ::prost::Message)]
3266pub struct DeleteBundleRequest {
3267 #[prost(string, tag = "1")]
3268 pub bundle_id: ::prost::alloc::string::String,
3269}
3270#[derive(serde::Deserialize, serde::Serialize)]
3271#[allow(clippy::derive_partial_eq_without_eq)]
3272#[derive(Clone, PartialEq, ::prost::Message)]
3273pub struct DeleteBundleResponse {}
3274pub mod bundler_service_client {
3276 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
3277 use tonic::codegen::*;
3278 use tonic::codegen::http::Uri;
3279 #[derive(Debug, Clone)]
3285 pub struct BundlerServiceClient<T> {
3286 inner: tonic::client::Grpc<T>,
3287 }
3288 impl BundlerServiceClient<tonic::transport::Channel> {
3289 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
3291 where
3292 D: TryInto<tonic::transport::Endpoint>,
3293 D::Error: Into<StdError>,
3294 {
3295 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
3296 Ok(Self::new(conn))
3297 }
3298 }
3299 impl<T> BundlerServiceClient<T>
3300 where
3301 T: tonic::client::GrpcService<tonic::body::BoxBody>,
3302 T::Error: Into<StdError>,
3303 T::ResponseBody: Body<Data = Bytes> + Send + 'static,
3304 <T::ResponseBody as Body>::Error: Into<StdError> + Send,
3305 {
3306 pub fn new(inner: T) -> Self {
3307 let inner = tonic::client::Grpc::new(inner);
3308 Self { inner }
3309 }
3310 pub fn with_origin(inner: T, origin: Uri) -> Self {
3311 let inner = tonic::client::Grpc::with_origin(inner, origin);
3312 Self { inner }
3313 }
3314 pub fn with_interceptor<F>(
3315 inner: T,
3316 interceptor: F,
3317 ) -> BundlerServiceClient<InterceptedService<T, F>>
3318 where
3319 F: tonic::service::Interceptor,
3320 T::ResponseBody: Default,
3321 T: tonic::codegen::Service<
3322 http::Request<tonic::body::BoxBody>,
3323 Response = http::Response<
3324 <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
3325 >,
3326 >,
3327 <T as tonic::codegen::Service<
3328 http::Request<tonic::body::BoxBody>,
3329 >>::Error: Into<StdError> + Send + Sync,
3330 {
3331 BundlerServiceClient::new(InterceptedService::new(inner, interceptor))
3332 }
3333 #[must_use]
3338 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3339 self.inner = self.inner.send_compressed(encoding);
3340 self
3341 }
3342 #[must_use]
3344 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3345 self.inner = self.inner.accept_compressed(encoding);
3346 self
3347 }
3348 #[must_use]
3352 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3353 self.inner = self.inner.max_decoding_message_size(limit);
3354 self
3355 }
3356 #[must_use]
3360 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3361 self.inner = self.inner.max_encoding_message_size(limit);
3362 self
3363 }
3364 pub async fn create_bundle(
3370 &mut self,
3371 request: impl tonic::IntoRequest<super::CreateBundleRequest>,
3372 ) -> std::result::Result<
3373 tonic::Response<super::CreateBundleResponse>,
3374 tonic::Status,
3375 > {
3376 self.inner
3377 .ready()
3378 .await
3379 .map_err(|e| {
3380 tonic::Status::new(
3381 tonic::Code::Unknown,
3382 format!("Service was not ready: {}", e.into()),
3383 )
3384 })?;
3385 let codec = tonic::codec::ProstCodec::default();
3386 let path = http::uri::PathAndQuery::from_static(
3387 "/aruna.api.dataproxy.services.v2.BundlerService/CreateBundle",
3388 );
3389 let mut req = request.into_request();
3390 req.extensions_mut()
3391 .insert(
3392 GrpcMethod::new(
3393 "aruna.api.dataproxy.services.v2.BundlerService",
3394 "CreateBundle",
3395 ),
3396 );
3397 self.inner.unary(req, path, codec).await
3398 }
3399 pub async fn delete_bundle(
3405 &mut self,
3406 request: impl tonic::IntoRequest<super::DeleteBundleRequest>,
3407 ) -> std::result::Result<
3408 tonic::Response<super::DeleteBundleResponse>,
3409 tonic::Status,
3410 > {
3411 self.inner
3412 .ready()
3413 .await
3414 .map_err(|e| {
3415 tonic::Status::new(
3416 tonic::Code::Unknown,
3417 format!("Service was not ready: {}", e.into()),
3418 )
3419 })?;
3420 let codec = tonic::codec::ProstCodec::default();
3421 let path = http::uri::PathAndQuery::from_static(
3422 "/aruna.api.dataproxy.services.v2.BundlerService/DeleteBundle",
3423 );
3424 let mut req = request.into_request();
3425 req.extensions_mut()
3426 .insert(
3427 GrpcMethod::new(
3428 "aruna.api.dataproxy.services.v2.BundlerService",
3429 "DeleteBundle",
3430 ),
3431 );
3432 self.inner.unary(req, path, codec).await
3433 }
3434 }
3435}
3436pub mod bundler_service_server {
3438 #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
3439 use tonic::codegen::*;
3440 #[async_trait]
3442 pub trait BundlerService: Send + Sync + 'static {
3443 async fn create_bundle(
3449 &self,
3450 request: tonic::Request<super::CreateBundleRequest>,
3451 ) -> std::result::Result<
3452 tonic::Response<super::CreateBundleResponse>,
3453 tonic::Status,
3454 >;
3455 async fn delete_bundle(
3461 &self,
3462 request: tonic::Request<super::DeleteBundleRequest>,
3463 ) -> std::result::Result<
3464 tonic::Response<super::DeleteBundleResponse>,
3465 tonic::Status,
3466 >;
3467 }
3468 #[derive(Debug)]
3474 pub struct BundlerServiceServer<T: BundlerService> {
3475 inner: _Inner<T>,
3476 accept_compression_encodings: EnabledCompressionEncodings,
3477 send_compression_encodings: EnabledCompressionEncodings,
3478 max_decoding_message_size: Option<usize>,
3479 max_encoding_message_size: Option<usize>,
3480 }
3481 struct _Inner<T>(Arc<T>);
3482 impl<T: BundlerService> BundlerServiceServer<T> {
3483 pub fn new(inner: T) -> Self {
3484 Self::from_arc(Arc::new(inner))
3485 }
3486 pub fn from_arc(inner: Arc<T>) -> Self {
3487 let inner = _Inner(inner);
3488 Self {
3489 inner,
3490 accept_compression_encodings: Default::default(),
3491 send_compression_encodings: Default::default(),
3492 max_decoding_message_size: None,
3493 max_encoding_message_size: None,
3494 }
3495 }
3496 pub fn with_interceptor<F>(
3497 inner: T,
3498 interceptor: F,
3499 ) -> InterceptedService<Self, F>
3500 where
3501 F: tonic::service::Interceptor,
3502 {
3503 InterceptedService::new(Self::new(inner), interceptor)
3504 }
3505 #[must_use]
3507 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
3508 self.accept_compression_encodings.enable(encoding);
3509 self
3510 }
3511 #[must_use]
3513 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
3514 self.send_compression_encodings.enable(encoding);
3515 self
3516 }
3517 #[must_use]
3521 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
3522 self.max_decoding_message_size = Some(limit);
3523 self
3524 }
3525 #[must_use]
3529 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
3530 self.max_encoding_message_size = Some(limit);
3531 self
3532 }
3533 }
3534 impl<T, B> tonic::codegen::Service<http::Request<B>> for BundlerServiceServer<T>
3535 where
3536 T: BundlerService,
3537 B: Body + Send + 'static,
3538 B::Error: Into<StdError> + Send + 'static,
3539 {
3540 type Response = http::Response<tonic::body::BoxBody>;
3541 type Error = std::convert::Infallible;
3542 type Future = BoxFuture<Self::Response, Self::Error>;
3543 fn poll_ready(
3544 &mut self,
3545 _cx: &mut Context<'_>,
3546 ) -> Poll<std::result::Result<(), Self::Error>> {
3547 Poll::Ready(Ok(()))
3548 }
3549 fn call(&mut self, req: http::Request<B>) -> Self::Future {
3550 let inner = self.inner.clone();
3551 match req.uri().path() {
3552 "/aruna.api.dataproxy.services.v2.BundlerService/CreateBundle" => {
3553 #[allow(non_camel_case_types)]
3554 struct CreateBundleSvc<T: BundlerService>(pub Arc<T>);
3555 impl<
3556 T: BundlerService,
3557 > tonic::server::UnaryService<super::CreateBundleRequest>
3558 for CreateBundleSvc<T> {
3559 type Response = super::CreateBundleResponse;
3560 type Future = BoxFuture<
3561 tonic::Response<Self::Response>,
3562 tonic::Status,
3563 >;
3564 fn call(
3565 &mut self,
3566 request: tonic::Request<super::CreateBundleRequest>,
3567 ) -> Self::Future {
3568 let inner = Arc::clone(&self.0);
3569 let fut = async move {
3570 <T as BundlerService>::create_bundle(&inner, request).await
3571 };
3572 Box::pin(fut)
3573 }
3574 }
3575 let accept_compression_encodings = self.accept_compression_encodings;
3576 let send_compression_encodings = self.send_compression_encodings;
3577 let max_decoding_message_size = self.max_decoding_message_size;
3578 let max_encoding_message_size = self.max_encoding_message_size;
3579 let inner = self.inner.clone();
3580 let fut = async move {
3581 let inner = inner.0;
3582 let method = CreateBundleSvc(inner);
3583 let codec = tonic::codec::ProstCodec::default();
3584 let mut grpc = tonic::server::Grpc::new(codec)
3585 .apply_compression_config(
3586 accept_compression_encodings,
3587 send_compression_encodings,
3588 )
3589 .apply_max_message_size_config(
3590 max_decoding_message_size,
3591 max_encoding_message_size,
3592 );
3593 let res = grpc.unary(method, req).await;
3594 Ok(res)
3595 };
3596 Box::pin(fut)
3597 }
3598 "/aruna.api.dataproxy.services.v2.BundlerService/DeleteBundle" => {
3599 #[allow(non_camel_case_types)]
3600 struct DeleteBundleSvc<T: BundlerService>(pub Arc<T>);
3601 impl<
3602 T: BundlerService,
3603 > tonic::server::UnaryService<super::DeleteBundleRequest>
3604 for DeleteBundleSvc<T> {
3605 type Response = super::DeleteBundleResponse;
3606 type Future = BoxFuture<
3607 tonic::Response<Self::Response>,
3608 tonic::Status,
3609 >;
3610 fn call(
3611 &mut self,
3612 request: tonic::Request<super::DeleteBundleRequest>,
3613 ) -> Self::Future {
3614 let inner = Arc::clone(&self.0);
3615 let fut = async move {
3616 <T as BundlerService>::delete_bundle(&inner, request).await
3617 };
3618 Box::pin(fut)
3619 }
3620 }
3621 let accept_compression_encodings = self.accept_compression_encodings;
3622 let send_compression_encodings = self.send_compression_encodings;
3623 let max_decoding_message_size = self.max_decoding_message_size;
3624 let max_encoding_message_size = self.max_encoding_message_size;
3625 let inner = self.inner.clone();
3626 let fut = async move {
3627 let inner = inner.0;
3628 let method = DeleteBundleSvc(inner);
3629 let codec = tonic::codec::ProstCodec::default();
3630 let mut grpc = tonic::server::Grpc::new(codec)
3631 .apply_compression_config(
3632 accept_compression_encodings,
3633 send_compression_encodings,
3634 )
3635 .apply_max_message_size_config(
3636 max_decoding_message_size,
3637 max_encoding_message_size,
3638 );
3639 let res = grpc.unary(method, req).await;
3640 Ok(res)
3641 };
3642 Box::pin(fut)
3643 }
3644 _ => {
3645 Box::pin(async move {
3646 Ok(
3647 http::Response::builder()
3648 .status(200)
3649 .header("grpc-status", "12")
3650 .header("content-type", "application/grpc")
3651 .body(empty_body())
3652 .unwrap(),
3653 )
3654 })
3655 }
3656 }
3657 }
3658 }
3659 impl<T: BundlerService> Clone for BundlerServiceServer<T> {
3660 fn clone(&self) -> Self {
3661 let inner = self.inner.clone();
3662 Self {
3663 inner,
3664 accept_compression_encodings: self.accept_compression_encodings,
3665 send_compression_encodings: self.send_compression_encodings,
3666 max_decoding_message_size: self.max_decoding_message_size,
3667 max_encoding_message_size: self.max_encoding_message_size,
3668 }
3669 }
3670 }
3671 impl<T: BundlerService> Clone for _Inner<T> {
3672 fn clone(&self) -> Self {
3673 Self(Arc::clone(&self.0))
3674 }
3675 }
3676 impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
3677 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3678 write!(f, "{:?}", self.0)
3679 }
3680 }
3681 impl<T: BundlerService> tonic::server::NamedService for BundlerServiceServer<T> {
3682 const NAME: &'static str = "aruna.api.dataproxy.services.v2.BundlerService";
3683 }
3684}