Skip to main content

basaltic/services/
storage.rs

1//! Generated API methods; do not edit.
2#![allow(unused_imports)]
3use crate::models::storage as m;
4use crate::transport::{Core, Operation, Payload, QueryEncoding};
5use crate::{BinaryRequest, Client, EmptyRequest, PagedRequest, Request, WebSocketRequest};
6const ENDPOINT: &str = "https://storage.{region}.basaltic.sh";
7static OP_0: Operation = Operation {
8    id: "abortMultipartUpload",
9    method: "DELETE",
10    path: "/v1/buckets/{bucket}/multipart-uploads/{upload_id}",
11    authenticated: true,
12    required_query: &[],
13    required_headers: &[],
14    content_type: "",
15    accept: "application/json",
16    query_encoding: &[],
17};
18static OP_1: Operation = Operation {
19    id: "completeMultipartUpload",
20    method: "POST",
21    path: "/v1/buckets/{bucket}/multipart-uploads/{upload_id}/complete",
22    authenticated: true,
23    required_query: &[],
24    required_headers: &[],
25    content_type: "application/json",
26    accept: "application/json",
27    query_encoding: &[],
28};
29static OP_2: Operation = Operation {
30    id: "createBucket",
31    method: "POST",
32    path: "/v1/buckets",
33    authenticated: true,
34    required_query: &[],
35    required_headers: &[],
36    content_type: "application/json",
37    accept: "application/json",
38    query_encoding: &[],
39};
40static OP_3: Operation = Operation {
41    id: "createSnapshot",
42    method: "POST",
43    path: "/v1/snapshots",
44    authenticated: true,
45    required_query: &[],
46    required_headers: &[],
47    content_type: "application/json",
48    accept: "application/json",
49    query_encoding: &[],
50};
51static OP_4: Operation = Operation {
52    id: "createSnapshotPolicy",
53    method: "POST",
54    path: "/v1/volumes/{volume_id}/snapshot-policies",
55    authenticated: true,
56    required_query: &[],
57    required_headers: &[],
58    content_type: "application/json",
59    accept: "application/json",
60    query_encoding: &[],
61};
62static OP_5: Operation = Operation {
63    id: "createVolume",
64    method: "POST",
65    path: "/v1/volumes",
66    authenticated: true,
67    required_query: &[],
68    required_headers: &[],
69    content_type: "application/json",
70    accept: "application/json",
71    query_encoding: &[],
72};
73static OP_6: Operation = Operation {
74    id: "deleteBucket",
75    method: "DELETE",
76    path: "/v1/buckets/{bucket}",
77    authenticated: true,
78    required_query: &[],
79    required_headers: &[],
80    content_type: "",
81    accept: "application/json",
82    query_encoding: &[],
83};
84static OP_7: Operation = Operation {
85    id: "deleteBucketCORS",
86    method: "DELETE",
87    path: "/v1/buckets/{bucket}/cors",
88    authenticated: true,
89    required_query: &[],
90    required_headers: &[],
91    content_type: "",
92    accept: "application/json",
93    query_encoding: &[],
94};
95static OP_8: Operation = Operation {
96    id: "deleteBucketEncryption",
97    method: "DELETE",
98    path: "/v1/buckets/{bucket}/encryption",
99    authenticated: true,
100    required_query: &[],
101    required_headers: &[],
102    content_type: "",
103    accept: "application/json",
104    query_encoding: &[],
105};
106static OP_9: Operation = Operation {
107    id: "deleteBucketLifecycle",
108    method: "DELETE",
109    path: "/v1/buckets/{bucket}/lifecycle",
110    authenticated: true,
111    required_query: &[],
112    required_headers: &["If-Match"],
113    content_type: "",
114    accept: "application/json",
115    query_encoding: &[],
116};
117static OP_10: Operation = Operation {
118    id: "deleteBucketObjectLock",
119    method: "DELETE",
120    path: "/v1/buckets/{bucket}/object-lock",
121    authenticated: true,
122    required_query: &[],
123    required_headers: &[],
124    content_type: "",
125    accept: "application/json",
126    query_encoding: &[],
127};
128static OP_11: Operation = Operation {
129    id: "deleteBucketPolicy",
130    method: "DELETE",
131    path: "/v1/buckets/{bucket}/policy",
132    authenticated: true,
133    required_query: &[],
134    required_headers: &[],
135    content_type: "",
136    accept: "application/json",
137    query_encoding: &[],
138};
139static OP_12: Operation = Operation {
140    id: "deleteBucketTagging",
141    method: "DELETE",
142    path: "/v1/buckets/{bucket}/tagging",
143    authenticated: true,
144    required_query: &[],
145    required_headers: &[],
146    content_type: "",
147    accept: "application/json",
148    query_encoding: &[],
149};
150static OP_13: Operation = Operation {
151    id: "deleteObject",
152    method: "DELETE",
153    path: "/v1/buckets/{bucket}/objects/{key}",
154    authenticated: true,
155    required_query: &[],
156    required_headers: &[],
157    content_type: "",
158    accept: "application/json",
159    query_encoding: &[],
160};
161static OP_14: Operation = Operation {
162    id: "deleteSnapshot",
163    method: "DELETE",
164    path: "/v1/snapshots/{snapshot_id}",
165    authenticated: true,
166    required_query: &[],
167    required_headers: &[],
168    content_type: "",
169    accept: "application/json",
170    query_encoding: &[],
171};
172static OP_15: Operation = Operation {
173    id: "deleteSnapshotPolicy",
174    method: "DELETE",
175    path: "/v1/volumes/{volume_id}/snapshot-policies/{policy_id}",
176    authenticated: true,
177    required_query: &[],
178    required_headers: &[],
179    content_type: "",
180    accept: "application/json",
181    query_encoding: &[],
182};
183static OP_16: Operation = Operation {
184    id: "deleteVolume",
185    method: "DELETE",
186    path: "/v1/volumes/{volume_id}",
187    authenticated: true,
188    required_query: &[],
189    required_headers: &[],
190    content_type: "",
191    accept: "application/json",
192    query_encoding: &[],
193};
194static OP_17: Operation = Operation {
195    id: "extendVolume",
196    method: "POST",
197    path: "/v1/volumes/{volume_id}/extend",
198    authenticated: true,
199    required_query: &[],
200    required_headers: &[],
201    content_type: "application/json",
202    accept: "application/json",
203    query_encoding: &[],
204};
205static OP_18: Operation = Operation {
206    id: "getBucketCORS",
207    method: "GET",
208    path: "/v1/buckets/{bucket}/cors",
209    authenticated: true,
210    required_query: &[],
211    required_headers: &[],
212    content_type: "",
213    accept: "application/json",
214    query_encoding: &[],
215};
216static OP_19: Operation = Operation {
217    id: "getBucketEncryption",
218    method: "GET",
219    path: "/v1/buckets/{bucket}/encryption",
220    authenticated: true,
221    required_query: &[],
222    required_headers: &[],
223    content_type: "",
224    accept: "application/json",
225    query_encoding: &[],
226};
227static OP_20: Operation = Operation {
228    id: "getBucketLifecycle",
229    method: "GET",
230    path: "/v1/buckets/{bucket}/lifecycle",
231    authenticated: true,
232    required_query: &[],
233    required_headers: &[],
234    content_type: "",
235    accept: "application/json",
236    query_encoding: &[],
237};
238static OP_21: Operation = Operation {
239    id: "getBucketObjectLock",
240    method: "GET",
241    path: "/v1/buckets/{bucket}/object-lock",
242    authenticated: true,
243    required_query: &[],
244    required_headers: &[],
245    content_type: "",
246    accept: "application/json",
247    query_encoding: &[],
248};
249static OP_22: Operation = Operation {
250    id: "getBucketPolicy",
251    method: "GET",
252    path: "/v1/buckets/{bucket}/policy",
253    authenticated: true,
254    required_query: &[],
255    required_headers: &[],
256    content_type: "",
257    accept: "application/json",
258    query_encoding: &[],
259};
260static OP_23: Operation = Operation {
261    id: "getBucketTagging",
262    method: "GET",
263    path: "/v1/buckets/{bucket}/tagging",
264    authenticated: true,
265    required_query: &[],
266    required_headers: &[],
267    content_type: "",
268    accept: "application/json",
269    query_encoding: &[],
270};
271static OP_24: Operation = Operation {
272    id: "getBucketVersioning",
273    method: "GET",
274    path: "/v1/buckets/{bucket}/versioning",
275    authenticated: true,
276    required_query: &[],
277    required_headers: &[],
278    content_type: "",
279    accept: "application/json",
280    query_encoding: &[],
281};
282static OP_25: Operation = Operation {
283    id: "getObject",
284    method: "GET",
285    path: "/v1/buckets/{bucket}/objects/{key}",
286    authenticated: true,
287    required_query: &[],
288    required_headers: &[],
289    content_type: "",
290    accept: "*/*",
291    query_encoding: &[],
292};
293static OP_26: Operation = Operation {
294    id: "getSnapshot",
295    method: "GET",
296    path: "/v1/snapshots/{snapshot_id}",
297    authenticated: true,
298    required_query: &[],
299    required_headers: &[],
300    content_type: "",
301    accept: "application/json",
302    query_encoding: &[],
303};
304static OP_27: Operation = Operation {
305    id: "getSnapshotPolicy",
306    method: "GET",
307    path: "/v1/volumes/{volume_id}/snapshot-policies/{policy_id}",
308    authenticated: true,
309    required_query: &[],
310    required_headers: &[],
311    content_type: "",
312    accept: "application/json",
313    query_encoding: &[],
314};
315static OP_28: Operation = Operation {
316    id: "getVolume",
317    method: "GET",
318    path: "/v1/volumes/{volume_id}",
319    authenticated: true,
320    required_query: &[],
321    required_headers: &[],
322    content_type: "",
323    accept: "application/json",
324    query_encoding: &[],
325};
326static OP_29: Operation = Operation {
327    id: "headBucket",
328    method: "HEAD",
329    path: "/v1/buckets/{bucket}",
330    authenticated: true,
331    required_query: &[],
332    required_headers: &[],
333    content_type: "",
334    accept: "*/*",
335    query_encoding: &[],
336};
337static OP_30: Operation = Operation {
338    id: "headObject",
339    method: "HEAD",
340    path: "/v1/buckets/{bucket}/objects/{key}",
341    authenticated: true,
342    required_query: &[],
343    required_headers: &[],
344    content_type: "",
345    accept: "*/*",
346    query_encoding: &[],
347};
348static OP_31: Operation = Operation {
349    id: "initiateMultipartUpload",
350    method: "POST",
351    path: "/v1/buckets/{bucket}/multipart-uploads",
352    authenticated: true,
353    required_query: &[],
354    required_headers: &[],
355    content_type: "application/json",
356    accept: "application/json",
357    query_encoding: &[],
358};
359static OP_32: Operation = Operation {
360    id: "listBuckets",
361    method: "GET",
362    path: "/v1/buckets",
363    authenticated: true,
364    required_query: &[],
365    required_headers: &[],
366    content_type: "",
367    accept: "application/json",
368    query_encoding: &[
369        QueryEncoding {
370            name: "limit",
371            style: "form",
372            explode: true,
373        },
374        QueryEncoding {
375            name: "marker",
376            style: "form",
377            explode: true,
378        },
379        QueryEncoding {
380            name: "name",
381            style: "form",
382            explode: true,
383        },
384        QueryEncoding {
385            name: "crn",
386            style: "form",
387            explode: true,
388        },
389    ],
390};
391static OP_33: Operation = Operation {
392    id: "listMultipartUploads",
393    method: "GET",
394    path: "/v1/buckets/{bucket}/multipart-uploads",
395    authenticated: true,
396    required_query: &[],
397    required_headers: &[],
398    content_type: "",
399    accept: "application/json",
400    query_encoding: &[
401        QueryEncoding {
402            name: "prefix",
403            style: "form",
404            explode: true,
405        },
406        QueryEncoding {
407            name: "max_uploads",
408            style: "form",
409            explode: true,
410        },
411    ],
412};
413static OP_34: Operation = Operation {
414    id: "listObjectVersions",
415    method: "GET",
416    path: "/v1/buckets/{bucket}/object-versions",
417    authenticated: true,
418    required_query: &[],
419    required_headers: &[],
420    content_type: "",
421    accept: "application/json",
422    query_encoding: &[
423        QueryEncoding {
424            name: "prefix",
425            style: "form",
426            explode: true,
427        },
428        QueryEncoding {
429            name: "key_marker",
430            style: "form",
431            explode: true,
432        },
433        QueryEncoding {
434            name: "version_id_marker",
435            style: "form",
436            explode: true,
437        },
438        QueryEncoding {
439            name: "max_keys",
440            style: "form",
441            explode: true,
442        },
443    ],
444};
445static OP_35: Operation = Operation {
446    id: "listObjects",
447    method: "GET",
448    path: "/v1/buckets/{bucket}/objects",
449    authenticated: true,
450    required_query: &[],
451    required_headers: &[],
452    content_type: "",
453    accept: "application/json",
454    query_encoding: &[
455        QueryEncoding {
456            name: "prefix",
457            style: "form",
458            explode: true,
459        },
460        QueryEncoding {
461            name: "delimiter",
462            style: "form",
463            explode: true,
464        },
465        QueryEncoding {
466            name: "marker",
467            style: "form",
468            explode: true,
469        },
470        QueryEncoding {
471            name: "max_keys",
472            style: "form",
473            explode: true,
474        },
475    ],
476};
477static OP_36: Operation = Operation {
478    id: "listParts",
479    method: "GET",
480    path: "/v1/buckets/{bucket}/multipart-uploads/{upload_id}/parts",
481    authenticated: true,
482    required_query: &[],
483    required_headers: &[],
484    content_type: "",
485    accept: "application/json",
486    query_encoding: &[],
487};
488static OP_37: Operation = Operation {
489    id: "listSnapshotPolicies",
490    method: "GET",
491    path: "/v1/volumes/{volume_id}/snapshot-policies",
492    authenticated: true,
493    required_query: &[],
494    required_headers: &[],
495    content_type: "",
496    accept: "application/json",
497    query_encoding: &[
498        QueryEncoding {
499            name: "limit",
500            style: "form",
501            explode: true,
502        },
503        QueryEncoding {
504            name: "marker",
505            style: "form",
506            explode: true,
507        },
508        QueryEncoding {
509            name: "enabled",
510            style: "form",
511            explode: true,
512        },
513        QueryEncoding {
514            name: "name",
515            style: "form",
516            explode: true,
517        },
518        QueryEncoding {
519            name: "crn",
520            style: "form",
521            explode: true,
522        },
523    ],
524};
525static OP_38: Operation = Operation {
526    id: "listSnapshots",
527    method: "GET",
528    path: "/v1/snapshots",
529    authenticated: true,
530    required_query: &[],
531    required_headers: &[],
532    content_type: "",
533    accept: "application/json",
534    query_encoding: &[
535        QueryEncoding {
536            name: "limit",
537            style: "form",
538            explode: true,
539        },
540        QueryEncoding {
541            name: "marker",
542            style: "form",
543            explode: true,
544        },
545        QueryEncoding {
546            name: "volume",
547            style: "form",
548            explode: true,
549        },
550        QueryEncoding {
551            name: "name",
552            style: "form",
553            explode: true,
554        },
555        QueryEncoding {
556            name: "status",
557            style: "form",
558            explode: true,
559        },
560        QueryEncoding {
561            name: "crn",
562            style: "form",
563            explode: true,
564        },
565        QueryEncoding {
566            name: "snapshot_policy",
567            style: "form",
568            explode: true,
569        },
570    ],
571};
572static OP_39: Operation = Operation {
573    id: "listVolumeTypes",
574    method: "GET",
575    path: "/v1/volume-types",
576    authenticated: true,
577    required_query: &[],
578    required_headers: &[],
579    content_type: "",
580    accept: "application/json",
581    query_encoding: &[
582        QueryEncoding {
583            name: "name",
584            style: "form",
585            explode: true,
586        },
587        QueryEncoding {
588            name: "crn",
589            style: "form",
590            explode: true,
591        },
592    ],
593};
594static OP_40: Operation = Operation {
595    id: "listVolumes",
596    method: "GET",
597    path: "/v1/volumes",
598    authenticated: true,
599    required_query: &[],
600    required_headers: &[],
601    content_type: "",
602    accept: "application/json",
603    query_encoding: &[
604        QueryEncoding {
605            name: "limit",
606            style: "form",
607            explode: true,
608        },
609        QueryEncoding {
610            name: "marker",
611            style: "form",
612            explode: true,
613        },
614        QueryEncoding {
615            name: "name",
616            style: "form",
617            explode: true,
618        },
619        QueryEncoding {
620            name: "status",
621            style: "form",
622            explode: true,
623        },
624        QueryEncoding {
625            name: "crn",
626            style: "form",
627            explode: true,
628        },
629    ],
630};
631static OP_41: Operation = Operation {
632    id: "putBucketCORS",
633    method: "PUT",
634    path: "/v1/buckets/{bucket}/cors",
635    authenticated: true,
636    required_query: &[],
637    required_headers: &[],
638    content_type: "application/json",
639    accept: "application/json",
640    query_encoding: &[],
641};
642static OP_42: Operation = Operation {
643    id: "putBucketDeletionProtection",
644    method: "PUT",
645    path: "/v1/buckets/{bucket}/deletion-protection",
646    authenticated: true,
647    required_query: &[],
648    required_headers: &[],
649    content_type: "application/json",
650    accept: "application/json",
651    query_encoding: &[],
652};
653static OP_43: Operation = Operation {
654    id: "putBucketEncryption",
655    method: "PUT",
656    path: "/v1/buckets/{bucket}/encryption",
657    authenticated: true,
658    required_query: &[],
659    required_headers: &[],
660    content_type: "application/json",
661    accept: "application/json",
662    query_encoding: &[],
663};
664static OP_44: Operation = Operation {
665    id: "putBucketLifecycle",
666    method: "PUT",
667    path: "/v1/buckets/{bucket}/lifecycle",
668    authenticated: true,
669    required_query: &[],
670    required_headers: &["If-Match"],
671    content_type: "application/json",
672    accept: "application/json",
673    query_encoding: &[],
674};
675static OP_45: Operation = Operation {
676    id: "putBucketObjectLock",
677    method: "PUT",
678    path: "/v1/buckets/{bucket}/object-lock",
679    authenticated: true,
680    required_query: &[],
681    required_headers: &[],
682    content_type: "application/json",
683    accept: "application/json",
684    query_encoding: &[],
685};
686static OP_46: Operation = Operation {
687    id: "putBucketPolicy",
688    method: "PUT",
689    path: "/v1/buckets/{bucket}/policy",
690    authenticated: true,
691    required_query: &[],
692    required_headers: &[],
693    content_type: "application/json",
694    accept: "application/json",
695    query_encoding: &[],
696};
697static OP_47: Operation = Operation {
698    id: "putBucketTagging",
699    method: "PUT",
700    path: "/v1/buckets/{bucket}/tagging",
701    authenticated: true,
702    required_query: &[],
703    required_headers: &[],
704    content_type: "application/json",
705    accept: "application/json",
706    query_encoding: &[],
707};
708static OP_48: Operation = Operation {
709    id: "putBucketVersioning",
710    method: "PUT",
711    path: "/v1/buckets/{bucket}/versioning",
712    authenticated: true,
713    required_query: &[],
714    required_headers: &[],
715    content_type: "application/json",
716    accept: "application/json",
717    query_encoding: &[],
718};
719static OP_49: Operation = Operation {
720    id: "putObject",
721    method: "PUT",
722    path: "/v1/buckets/{bucket}/objects/{key}",
723    authenticated: true,
724    required_query: &[],
725    required_headers: &[],
726    content_type: "application/octet-stream",
727    accept: "application/json",
728    query_encoding: &[],
729};
730static OP_50: Operation = Operation {
731    id: "restoreBucket",
732    method: "POST",
733    path: "/v1/buckets/{bucket}/restore",
734    authenticated: true,
735    required_query: &[],
736    required_headers: &[],
737    content_type: "",
738    accept: "application/json",
739    query_encoding: &[],
740};
741static OP_51: Operation = Operation {
742    id: "updateSnapshot",
743    method: "PATCH",
744    path: "/v1/snapshots/{snapshot_id}",
745    authenticated: true,
746    required_query: &[],
747    required_headers: &[],
748    content_type: "application/json",
749    accept: "application/json",
750    query_encoding: &[],
751};
752static OP_52: Operation = Operation {
753    id: "updateSnapshotPolicy",
754    method: "PATCH",
755    path: "/v1/volumes/{volume_id}/snapshot-policies/{policy_id}",
756    authenticated: true,
757    required_query: &[],
758    required_headers: &[],
759    content_type: "application/json",
760    accept: "application/json",
761    query_encoding: &[],
762};
763static OP_53: Operation = Operation {
764    id: "updateVolume",
765    method: "PATCH",
766    path: "/v1/volumes/{volume_id}",
767    authenticated: true,
768    required_query: &[],
769    required_headers: &[],
770    content_type: "application/json",
771    accept: "application/json",
772    query_encoding: &[],
773};
774static OP_54: Operation = Operation {
775    id: "updateVolumePerformance",
776    method: "POST",
777    path: "/v1/volumes/{volume_id}/performance",
778    authenticated: true,
779    required_query: &[],
780    required_headers: &[],
781    content_type: "application/json",
782    accept: "application/json",
783    query_encoding: &[],
784};
785static OP_55: Operation = Operation {
786    id: "uploadPart",
787    method: "PUT",
788    path: "/v1/buckets/{bucket}/multipart-uploads/{upload_id}/parts/{part_number}",
789    authenticated: true,
790    required_query: &[],
791    required_headers: &[],
792    content_type: "application/octet-stream",
793    accept: "application/json",
794    query_encoding: &[],
795};
796#[derive(Clone, Debug)]
797pub struct StorageService {
798    pub(crate) client: Client,
799}
800impl StorageService {
801    /// Abort a multipart upload
802    pub fn abort_multipart_upload(&self, bucket: &str, upload_id: &str) -> EmptyRequest {
803        EmptyRequest::new(Core::new(
804            self.client.clone(),
805            "storage",
806            ENDPOINT,
807            &OP_0,
808            &[("bucket", bucket), ("upload_id", upload_id)],
809            Ok(Payload::Empty),
810            Ok(serde_json::json!({})),
811        ))
812    }
813    /// Complete a multipart upload
814    pub fn complete_multipart_upload(
815        &self,
816        bucket: &str,
817        upload_id: &str,
818        body: &m::CompleteMultipartUploadBody,
819    ) -> Request<m::CompleteMultipartUploadResponse> {
820        Request::new(Core::new(
821            self.client.clone(),
822            "storage",
823            ENDPOINT,
824            &OP_1,
825            &[("bucket", bucket), ("upload_id", upload_id)],
826            Payload::json(body),
827            Ok(serde_json::json!({})),
828        ))
829    }
830    /// Create bucket
831    pub fn create_bucket(&self, body: &m::CreateBucketBody) -> Request<m::CreateBucketResponse> {
832        Request::new(Core::new(
833            self.client.clone(),
834            "storage",
835            ENDPOINT,
836            &OP_2,
837            &[],
838            Payload::json(body),
839            Ok(serde_json::json!({})),
840        ))
841    }
842    /// Create snapshot
843    pub fn create_snapshot(
844        &self,
845        body: &m::CreateSnapshotBody,
846    ) -> Request<m::CreateSnapshotResponse> {
847        Request::new(Core::new(
848            self.client.clone(),
849            "storage",
850            ENDPOINT,
851            &OP_3,
852            &[],
853            Payload::json(body),
854            Ok(serde_json::json!({})),
855        ))
856    }
857    /// Create snapshot policy
858    pub fn create_snapshot_policy(
859        &self,
860        volume_id: &str,
861        body: &m::CreateSnapshotPolicyBody,
862    ) -> Request<m::CreateSnapshotPolicyResponse> {
863        Request::new(Core::new(
864            self.client.clone(),
865            "storage",
866            ENDPOINT,
867            &OP_4,
868            &[("volume_id", volume_id)],
869            Payload::json(body),
870            Ok(serde_json::json!({})),
871        ))
872    }
873    /// Create volume
874    pub fn create_volume(&self, body: &m::CreateVolumeBody) -> Request<m::CreateVolumeResponse> {
875        Request::new(Core::new(
876            self.client.clone(),
877            "storage",
878            ENDPOINT,
879            &OP_5,
880            &[],
881            Payload::json(body),
882            Ok(serde_json::json!({})),
883        ))
884    }
885    /// Delete bucket
886    pub fn delete_bucket(&self, bucket: &str) -> Request<m::DeleteBucketResponse> {
887        Request::new(Core::new(
888            self.client.clone(),
889            "storage",
890            ENDPOINT,
891            &OP_6,
892            &[("bucket", bucket)],
893            Ok(Payload::Empty),
894            Ok(serde_json::json!({})),
895        ))
896    }
897    /// Delete bucket CORS configuration
898    pub fn delete_bucket_cors(&self, bucket: &str) -> EmptyRequest {
899        EmptyRequest::new(Core::new(
900            self.client.clone(),
901            "storage",
902            ENDPOINT,
903            &OP_7,
904            &[("bucket", bucket)],
905            Ok(Payload::Empty),
906            Ok(serde_json::json!({})),
907        ))
908    }
909    /// Delete bucket encryption configuration
910    pub fn delete_bucket_encryption(&self, bucket: &str) -> EmptyRequest {
911        EmptyRequest::new(Core::new(
912            self.client.clone(),
913            "storage",
914            ENDPOINT,
915            &OP_8,
916            &[("bucket", bucket)],
917            Ok(Payload::Empty),
918            Ok(serde_json::json!({})),
919        ))
920    }
921    /// Delete bucket lifecycle configuration
922    pub fn delete_bucket_lifecycle(&self, bucket: &str) -> EmptyRequest {
923        EmptyRequest::new(Core::new(
924            self.client.clone(),
925            "storage",
926            ENDPOINT,
927            &OP_9,
928            &[("bucket", bucket)],
929            Ok(Payload::Empty),
930            Ok(serde_json::json!({})),
931        ))
932    }
933    /// Delete bucket object-lock configuration
934    pub fn delete_bucket_object_lock(&self, bucket: &str) -> EmptyRequest {
935        EmptyRequest::new(Core::new(
936            self.client.clone(),
937            "storage",
938            ENDPOINT,
939            &OP_10,
940            &[("bucket", bucket)],
941            Ok(Payload::Empty),
942            Ok(serde_json::json!({})),
943        ))
944    }
945    /// Delete bucket policy
946    pub fn delete_bucket_policy(&self, bucket: &str) -> EmptyRequest {
947        EmptyRequest::new(Core::new(
948            self.client.clone(),
949            "storage",
950            ENDPOINT,
951            &OP_11,
952            &[("bucket", bucket)],
953            Ok(Payload::Empty),
954            Ok(serde_json::json!({})),
955        ))
956    }
957    /// Delete bucket tag set
958    pub fn delete_bucket_tagging(&self, bucket: &str) -> EmptyRequest {
959        EmptyRequest::new(Core::new(
960            self.client.clone(),
961            "storage",
962            ENDPOINT,
963            &OP_12,
964            &[("bucket", bucket)],
965            Ok(Payload::Empty),
966            Ok(serde_json::json!({})),
967        ))
968    }
969    /// Delete object
970    pub fn delete_object(&self, bucket: &str, key: &str) -> EmptyRequest {
971        EmptyRequest::new(Core::new(
972            self.client.clone(),
973            "storage",
974            ENDPOINT,
975            &OP_13,
976            &[("bucket", bucket), ("key", key)],
977            Ok(Payload::Empty),
978            Ok(serde_json::json!({})),
979        ))
980    }
981    /// Delete snapshot
982    pub fn delete_snapshot(&self, snapshot_id: &str) -> EmptyRequest {
983        EmptyRequest::new(Core::new(
984            self.client.clone(),
985            "storage",
986            ENDPOINT,
987            &OP_14,
988            &[("snapshot_id", snapshot_id)],
989            Ok(Payload::Empty),
990            Ok(serde_json::json!({})),
991        ))
992    }
993    /// Delete snapshot policy
994    pub fn delete_snapshot_policy(&self, volume_id: &str, policy_id: &str) -> EmptyRequest {
995        EmptyRequest::new(Core::new(
996            self.client.clone(),
997            "storage",
998            ENDPOINT,
999            &OP_15,
1000            &[("volume_id", volume_id), ("policy_id", policy_id)],
1001            Ok(Payload::Empty),
1002            Ok(serde_json::json!({})),
1003        ))
1004    }
1005    /// Delete volume
1006    pub fn delete_volume(&self, volume_id: &str) -> EmptyRequest {
1007        EmptyRequest::new(Core::new(
1008            self.client.clone(),
1009            "storage",
1010            ENDPOINT,
1011            &OP_16,
1012            &[("volume_id", volume_id)],
1013            Ok(Payload::Empty),
1014            Ok(serde_json::json!({})),
1015        ))
1016    }
1017    /// Extend volume
1018    pub fn extend_volume(
1019        &self,
1020        volume_id: &str,
1021        body: &m::ExtendVolumeBody,
1022    ) -> Request<m::ExtendVolumeResponse> {
1023        Request::new(Core::new(
1024            self.client.clone(),
1025            "storage",
1026            ENDPOINT,
1027            &OP_17,
1028            &[("volume_id", volume_id)],
1029            Payload::json(body),
1030            Ok(serde_json::json!({})),
1031        ))
1032    }
1033    /// Get bucket CORS configuration
1034    pub fn get_bucket_cors(&self, bucket: &str) -> Request<m::GetBucketCORSResponse> {
1035        Request::new(Core::new(
1036            self.client.clone(),
1037            "storage",
1038            ENDPOINT,
1039            &OP_18,
1040            &[("bucket", bucket)],
1041            Ok(Payload::Empty),
1042            Ok(serde_json::json!({})),
1043        ))
1044    }
1045    /// Get bucket encryption configuration
1046    pub fn get_bucket_encryption(&self, bucket: &str) -> Request<m::GetBucketEncryptionResponse> {
1047        Request::new(Core::new(
1048            self.client.clone(),
1049            "storage",
1050            ENDPOINT,
1051            &OP_19,
1052            &[("bucket", bucket)],
1053            Ok(Payload::Empty),
1054            Ok(serde_json::json!({})),
1055        ))
1056    }
1057    /// Get bucket lifecycle configuration
1058    pub fn get_bucket_lifecycle(&self, bucket: &str) -> Request<m::GetBucketLifecycleResponse> {
1059        Request::new(Core::new(
1060            self.client.clone(),
1061            "storage",
1062            ENDPOINT,
1063            &OP_20,
1064            &[("bucket", bucket)],
1065            Ok(Payload::Empty),
1066            Ok(serde_json::json!({})),
1067        ))
1068    }
1069    /// Get bucket object-lock configuration
1070    pub fn get_bucket_object_lock(&self, bucket: &str) -> Request<m::GetBucketObjectLockResponse> {
1071        Request::new(Core::new(
1072            self.client.clone(),
1073            "storage",
1074            ENDPOINT,
1075            &OP_21,
1076            &[("bucket", bucket)],
1077            Ok(Payload::Empty),
1078            Ok(serde_json::json!({})),
1079        ))
1080    }
1081    /// Get bucket policy
1082    pub fn get_bucket_policy(&self, bucket: &str) -> Request<m::GetBucketPolicyResponse> {
1083        Request::new(Core::new(
1084            self.client.clone(),
1085            "storage",
1086            ENDPOINT,
1087            &OP_22,
1088            &[("bucket", bucket)],
1089            Ok(Payload::Empty),
1090            Ok(serde_json::json!({})),
1091        ))
1092    }
1093    /// Get bucket tag set
1094    pub fn get_bucket_tagging(&self, bucket: &str) -> Request<m::GetBucketTaggingResponse> {
1095        Request::new(Core::new(
1096            self.client.clone(),
1097            "storage",
1098            ENDPOINT,
1099            &OP_23,
1100            &[("bucket", bucket)],
1101            Ok(Payload::Empty),
1102            Ok(serde_json::json!({})),
1103        ))
1104    }
1105    /// Get bucket versioning state
1106    pub fn get_bucket_versioning(&self, bucket: &str) -> Request<m::GetBucketVersioningResponse> {
1107        Request::new(Core::new(
1108            self.client.clone(),
1109            "storage",
1110            ENDPOINT,
1111            &OP_24,
1112            &[("bucket", bucket)],
1113            Ok(Payload::Empty),
1114            Ok(serde_json::json!({})),
1115        ))
1116    }
1117    /// Download object
1118    pub fn get_object(&self, bucket: &str, key: &str) -> BinaryRequest {
1119        BinaryRequest::new(Core::new(
1120            self.client.clone(),
1121            "storage",
1122            ENDPOINT,
1123            &OP_25,
1124            &[("bucket", bucket), ("key", key)],
1125            Ok(Payload::Empty),
1126            Ok(serde_json::json!({})),
1127        ))
1128    }
1129    /// Get snapshot
1130    pub fn get_snapshot(&self, snapshot_id: &str) -> Request<m::GetSnapshotResponse> {
1131        Request::new(Core::new(
1132            self.client.clone(),
1133            "storage",
1134            ENDPOINT,
1135            &OP_26,
1136            &[("snapshot_id", snapshot_id)],
1137            Ok(Payload::Empty),
1138            Ok(serde_json::json!({})),
1139        ))
1140    }
1141    /// Resolve one resource by UUID, CRN, or an unambiguous name.
1142    pub fn get_snapshot_by_reference(
1143        &self,
1144        reference: &str,
1145        scope: &m::GetSnapshotScope,
1146    ) -> Request<m::GetSnapshotResource> {
1147        let (core, extract) = crate::request::reference_core(
1148            Core::new(
1149                self.client.clone(),
1150                "storage",
1151                ENDPOINT,
1152                &OP_26,
1153                &[("snapshot_id", reference)],
1154                Ok(Payload::Empty),
1155                Ok(serde_json::json!({})),
1156            ),
1157            Core::new(
1158                self.client.clone(),
1159                "storage",
1160                ENDPOINT,
1161                &OP_38,
1162                &[],
1163                Ok(Payload::Empty),
1164                serde_json::to_value(scope).map_err(crate::Error::from),
1165            ),
1166            reference,
1167            true,
1168            Some("snapshot"),
1169            "snapshots",
1170        );
1171        Request::reference(core, extract)
1172    }
1173    /// Get snapshot policy
1174    pub fn get_snapshot_policy(
1175        &self,
1176        volume_id: &str,
1177        policy_id: &str,
1178    ) -> Request<m::GetSnapshotPolicyResponse> {
1179        Request::new(Core::new(
1180            self.client.clone(),
1181            "storage",
1182            ENDPOINT,
1183            &OP_27,
1184            &[("volume_id", volume_id), ("policy_id", policy_id)],
1185            Ok(Payload::Empty),
1186            Ok(serde_json::json!({})),
1187        ))
1188    }
1189    /// Resolve one resource by UUID, CRN, or an unambiguous name.
1190    pub fn get_snapshot_policy_by_reference(
1191        &self,
1192        volume_id: &str,
1193        reference: &str,
1194        scope: &m::GetSnapshotPolicyScope,
1195    ) -> Request<m::GetSnapshotPolicyResource> {
1196        let (core, extract) = crate::request::reference_core(
1197            Core::new(
1198                self.client.clone(),
1199                "storage",
1200                ENDPOINT,
1201                &OP_27,
1202                &[("volume_id", volume_id), ("policy_id", reference)],
1203                Ok(Payload::Empty),
1204                Ok(serde_json::json!({})),
1205            ),
1206            Core::new(
1207                self.client.clone(),
1208                "storage",
1209                ENDPOINT,
1210                &OP_37,
1211                &[("volume_id", volume_id)],
1212                Ok(Payload::Empty),
1213                serde_json::to_value(scope).map_err(crate::Error::from),
1214            ),
1215            reference,
1216            true,
1217            Some("snapshot_policy"),
1218            "snapshot_policies",
1219        );
1220        Request::reference(core, extract)
1221    }
1222    /// Get volume
1223    pub fn get_volume(&self, volume_id: &str) -> Request<m::GetVolumeResponse> {
1224        Request::new(Core::new(
1225            self.client.clone(),
1226            "storage",
1227            ENDPOINT,
1228            &OP_28,
1229            &[("volume_id", volume_id)],
1230            Ok(Payload::Empty),
1231            Ok(serde_json::json!({})),
1232        ))
1233    }
1234    /// Resolve one resource by UUID, CRN, or an unambiguous name.
1235    pub fn get_volume_by_reference(
1236        &self,
1237        reference: &str,
1238        scope: &m::GetVolumeScope,
1239    ) -> Request<m::GetVolumeResource> {
1240        let (core, extract) = crate::request::reference_core(
1241            Core::new(
1242                self.client.clone(),
1243                "storage",
1244                ENDPOINT,
1245                &OP_28,
1246                &[("volume_id", reference)],
1247                Ok(Payload::Empty),
1248                Ok(serde_json::json!({})),
1249            ),
1250            Core::new(
1251                self.client.clone(),
1252                "storage",
1253                ENDPOINT,
1254                &OP_40,
1255                &[],
1256                Ok(Payload::Empty),
1257                serde_json::to_value(scope).map_err(crate::Error::from),
1258            ),
1259            reference,
1260            true,
1261            Some("volume"),
1262            "volumes",
1263        );
1264        Request::reference(core, extract)
1265    }
1266    /// Head bucket
1267    pub fn head_bucket(&self, bucket: &str) -> BinaryRequest {
1268        BinaryRequest::new(Core::new(
1269            self.client.clone(),
1270            "storage",
1271            ENDPOINT,
1272            &OP_29,
1273            &[("bucket", bucket)],
1274            Ok(Payload::Empty),
1275            Ok(serde_json::json!({})),
1276        ))
1277    }
1278    /// Head object
1279    pub fn head_object(&self, bucket: &str, key: &str) -> BinaryRequest {
1280        BinaryRequest::new(Core::new(
1281            self.client.clone(),
1282            "storage",
1283            ENDPOINT,
1284            &OP_30,
1285            &[("bucket", bucket), ("key", key)],
1286            Ok(Payload::Empty),
1287            Ok(serde_json::json!({})),
1288        ))
1289    }
1290    /// Initiate a multipart upload
1291    pub fn initiate_multipart_upload(
1292        &self,
1293        bucket: &str,
1294        body: &m::InitiateMultipartUploadBody,
1295    ) -> Request<m::InitiateMultipartUploadResponse> {
1296        Request::new(Core::new(
1297            self.client.clone(),
1298            "storage",
1299            ENDPOINT,
1300            &OP_31,
1301            &[("bucket", bucket)],
1302            Payload::json(body),
1303            Ok(serde_json::json!({})),
1304        ))
1305    }
1306    /// List buckets
1307    pub fn list_buckets(
1308        &self,
1309        query: &m::ListBucketsQuery,
1310    ) -> PagedRequest<m::ListBucketsResponse, m::ListBucketsItem> {
1311        PagedRequest::new(
1312            Core::new(
1313                self.client.clone(),
1314                "storage",
1315                ENDPOINT,
1316                &OP_32,
1317                &[],
1318                Ok(Payload::Empty),
1319                serde_json::to_value(query).map_err(crate::Error::from),
1320            ),
1321            "buckets",
1322        )
1323    }
1324    /// List in-flight multipart uploads
1325    pub fn list_multipart_uploads(
1326        &self,
1327        bucket: &str,
1328        query: &m::ListMultipartUploadsQuery,
1329    ) -> PagedRequest<m::ListMultipartUploadsResponse, m::ListMultipartUploadsItem> {
1330        PagedRequest::new(
1331            Core::new(
1332                self.client.clone(),
1333                "storage",
1334                ENDPOINT,
1335                &OP_33,
1336                &[("bucket", bucket)],
1337                Ok(Payload::Empty),
1338                serde_json::to_value(query).map_err(crate::Error::from),
1339            ),
1340            "uploads",
1341        )
1342    }
1343    /// List object versions
1344    pub fn list_object_versions(
1345        &self,
1346        bucket: &str,
1347        query: &m::ListObjectVersionsQuery,
1348    ) -> PagedRequest<m::ListObjectVersionsResponse, m::ListObjectVersionsItem> {
1349        PagedRequest::new(
1350            Core::new(
1351                self.client.clone(),
1352                "storage",
1353                ENDPOINT,
1354                &OP_34,
1355                &[("bucket", bucket)],
1356                Ok(Payload::Empty),
1357                serde_json::to_value(query).map_err(crate::Error::from),
1358            ),
1359            "versions",
1360        )
1361    }
1362    /// List objects
1363    pub fn list_objects(
1364        &self,
1365        bucket: &str,
1366        query: &m::ListObjectsQuery,
1367    ) -> Request<m::ListObjectsResponse> {
1368        Request::new(Core::new(
1369            self.client.clone(),
1370            "storage",
1371            ENDPOINT,
1372            &OP_35,
1373            &[("bucket", bucket)],
1374            Ok(Payload::Empty),
1375            serde_json::to_value(query).map_err(crate::Error::from),
1376        ))
1377    }
1378    /// List uploaded parts
1379    pub fn list_parts(
1380        &self,
1381        bucket: &str,
1382        upload_id: &str,
1383    ) -> PagedRequest<m::ListPartsResponse, m::ListPartsItem> {
1384        PagedRequest::new(
1385            Core::new(
1386                self.client.clone(),
1387                "storage",
1388                ENDPOINT,
1389                &OP_36,
1390                &[("bucket", bucket), ("upload_id", upload_id)],
1391                Ok(Payload::Empty),
1392                Ok(serde_json::json!({})),
1393            ),
1394            "parts",
1395        )
1396    }
1397    /// List snapshot policies
1398    pub fn list_snapshot_policies(
1399        &self,
1400        volume_id: &str,
1401        query: &m::ListSnapshotPoliciesQuery,
1402    ) -> PagedRequest<m::ListSnapshotPoliciesResponse, m::ListSnapshotPoliciesItem> {
1403        PagedRequest::new(
1404            Core::new(
1405                self.client.clone(),
1406                "storage",
1407                ENDPOINT,
1408                &OP_37,
1409                &[("volume_id", volume_id)],
1410                Ok(Payload::Empty),
1411                serde_json::to_value(query).map_err(crate::Error::from),
1412            ),
1413            "snapshot_policies",
1414        )
1415    }
1416    /// List snapshots
1417    pub fn list_snapshots(
1418        &self,
1419        query: &m::ListSnapshotsQuery,
1420    ) -> PagedRequest<m::ListSnapshotsResponse, m::ListSnapshotsItem> {
1421        PagedRequest::new(
1422            Core::new(
1423                self.client.clone(),
1424                "storage",
1425                ENDPOINT,
1426                &OP_38,
1427                &[],
1428                Ok(Payload::Empty),
1429                serde_json::to_value(query).map_err(crate::Error::from),
1430            ),
1431            "snapshots",
1432        )
1433    }
1434    /// List volume types
1435    pub fn list_volume_types(
1436        &self,
1437        query: &m::ListVolumeTypesQuery,
1438    ) -> PagedRequest<m::ListVolumeTypesResponse, m::ListVolumeTypesItem> {
1439        PagedRequest::new(
1440            Core::new(
1441                self.client.clone(),
1442                "storage",
1443                ENDPOINT,
1444                &OP_39,
1445                &[],
1446                Ok(Payload::Empty),
1447                serde_json::to_value(query).map_err(crate::Error::from),
1448            ),
1449            "volume_types",
1450        )
1451    }
1452    /// List volumes
1453    pub fn list_volumes(
1454        &self,
1455        query: &m::ListVolumesQuery,
1456    ) -> PagedRequest<m::ListVolumesResponse, m::ListVolumesItem> {
1457        PagedRequest::new(
1458            Core::new(
1459                self.client.clone(),
1460                "storage",
1461                ENDPOINT,
1462                &OP_40,
1463                &[],
1464                Ok(Payload::Empty),
1465                serde_json::to_value(query).map_err(crate::Error::from),
1466            ),
1467            "volumes",
1468        )
1469    }
1470    /// Put bucket CORS configuration
1471    pub fn put_bucket_cors(&self, bucket: &str, body: &m::PutBucketCORSBody) -> EmptyRequest {
1472        EmptyRequest::new(Core::new(
1473            self.client.clone(),
1474            "storage",
1475            ENDPOINT,
1476            &OP_41,
1477            &[("bucket", bucket)],
1478            Payload::json(body),
1479            Ok(serde_json::json!({})),
1480        ))
1481    }
1482    /// Set bucket deletion protection
1483    pub fn put_bucket_deletion_protection(
1484        &self,
1485        bucket: &str,
1486        body: &m::PutBucketDeletionProtectionBody,
1487    ) -> EmptyRequest {
1488        EmptyRequest::new(Core::new(
1489            self.client.clone(),
1490            "storage",
1491            ENDPOINT,
1492            &OP_42,
1493            &[("bucket", bucket)],
1494            Payload::json(body),
1495            Ok(serde_json::json!({})),
1496        ))
1497    }
1498    /// Put bucket encryption configuration
1499    pub fn put_bucket_encryption(
1500        &self,
1501        bucket: &str,
1502        body: &m::PutBucketEncryptionBody,
1503    ) -> EmptyRequest {
1504        EmptyRequest::new(Core::new(
1505            self.client.clone(),
1506            "storage",
1507            ENDPOINT,
1508            &OP_43,
1509            &[("bucket", bucket)],
1510            Payload::json(body),
1511            Ok(serde_json::json!({})),
1512        ))
1513    }
1514    /// Put bucket lifecycle configuration
1515    pub fn put_bucket_lifecycle(
1516        &self,
1517        bucket: &str,
1518        body: &m::PutBucketLifecycleBody,
1519    ) -> EmptyRequest {
1520        EmptyRequest::new(Core::new(
1521            self.client.clone(),
1522            "storage",
1523            ENDPOINT,
1524            &OP_44,
1525            &[("bucket", bucket)],
1526            Payload::json(body),
1527            Ok(serde_json::json!({})),
1528        ))
1529    }
1530    /// Put bucket object-lock configuration
1531    pub fn put_bucket_object_lock(
1532        &self,
1533        bucket: &str,
1534        body: &m::PutBucketObjectLockBody,
1535    ) -> EmptyRequest {
1536        EmptyRequest::new(Core::new(
1537            self.client.clone(),
1538            "storage",
1539            ENDPOINT,
1540            &OP_45,
1541            &[("bucket", bucket)],
1542            Payload::json(body),
1543            Ok(serde_json::json!({})),
1544        ))
1545    }
1546    /// Put bucket policy
1547    pub fn put_bucket_policy(&self, bucket: &str, body: &m::PutBucketPolicyBody) -> EmptyRequest {
1548        EmptyRequest::new(Core::new(
1549            self.client.clone(),
1550            "storage",
1551            ENDPOINT,
1552            &OP_46,
1553            &[("bucket", bucket)],
1554            Payload::json(body),
1555            Ok(serde_json::json!({})),
1556        ))
1557    }
1558    /// Put bucket tag set
1559    pub fn put_bucket_tagging(&self, bucket: &str, body: &m::PutBucketTaggingBody) -> EmptyRequest {
1560        EmptyRequest::new(Core::new(
1561            self.client.clone(),
1562            "storage",
1563            ENDPOINT,
1564            &OP_47,
1565            &[("bucket", bucket)],
1566            Payload::json(body),
1567            Ok(serde_json::json!({})),
1568        ))
1569    }
1570    /// Set bucket versioning state
1571    pub fn put_bucket_versioning(
1572        &self,
1573        bucket: &str,
1574        body: &m::PutBucketVersioningBody,
1575    ) -> EmptyRequest {
1576        EmptyRequest::new(Core::new(
1577            self.client.clone(),
1578            "storage",
1579            ENDPOINT,
1580            &OP_48,
1581            &[("bucket", bucket)],
1582            Payload::json(body),
1583            Ok(serde_json::json!({})),
1584        ))
1585    }
1586    /// Upload object
1587    pub fn put_object(
1588        &self,
1589        bucket: &str,
1590        key: &str,
1591        body: reqwest::Body,
1592    ) -> Request<m::PutObjectResponse> {
1593        Request::new(Core::new(
1594            self.client.clone(),
1595            "storage",
1596            ENDPOINT,
1597            &OP_49,
1598            &[("bucket", bucket), ("key", key)],
1599            Ok(Payload::binary(body)),
1600            Ok(serde_json::json!({})),
1601        ))
1602    }
1603    /// Restore a bucket pending deletion
1604    pub fn restore_bucket(&self, bucket: &str) -> EmptyRequest {
1605        EmptyRequest::new(Core::new(
1606            self.client.clone(),
1607            "storage",
1608            ENDPOINT,
1609            &OP_50,
1610            &[("bucket", bucket)],
1611            Ok(Payload::Empty),
1612            Ok(serde_json::json!({})),
1613        ))
1614    }
1615    /// Update snapshot metadata
1616    pub fn update_snapshot(
1617        &self,
1618        snapshot_id: &str,
1619        body: &m::UpdateSnapshotBody,
1620    ) -> Request<m::UpdateSnapshotResponse> {
1621        Request::new(Core::new(
1622            self.client.clone(),
1623            "storage",
1624            ENDPOINT,
1625            &OP_51,
1626            &[("snapshot_id", snapshot_id)],
1627            Payload::json(body),
1628            Ok(serde_json::json!({})),
1629        ))
1630    }
1631    /// Update snapshot policy
1632    pub fn update_snapshot_policy(
1633        &self,
1634        volume_id: &str,
1635        policy_id: &str,
1636        body: &m::UpdateSnapshotPolicyBody,
1637    ) -> Request<m::UpdateSnapshotPolicyResponse> {
1638        Request::new(Core::new(
1639            self.client.clone(),
1640            "storage",
1641            ENDPOINT,
1642            &OP_52,
1643            &[("volume_id", volume_id), ("policy_id", policy_id)],
1644            Payload::json(body),
1645            Ok(serde_json::json!({})),
1646        ))
1647    }
1648    /// Update volume metadata
1649    pub fn update_volume(
1650        &self,
1651        volume_id: &str,
1652        body: &m::UpdateVolumeBody,
1653    ) -> Request<m::UpdateVolumeResponse> {
1654        Request::new(Core::new(
1655            self.client.clone(),
1656            "storage",
1657            ENDPOINT,
1658            &OP_53,
1659            &[("volume_id", volume_id)],
1660            Payload::json(body),
1661            Ok(serde_json::json!({})),
1662        ))
1663    }
1664    /// Update provisioned performance
1665    pub fn update_volume_performance(
1666        &self,
1667        volume_id: &str,
1668        body: &m::UpdateVolumePerformanceBody,
1669    ) -> Request<m::UpdateVolumePerformanceResponse> {
1670        Request::new(Core::new(
1671            self.client.clone(),
1672            "storage",
1673            ENDPOINT,
1674            &OP_54,
1675            &[("volume_id", volume_id)],
1676            Payload::json(body),
1677            Ok(serde_json::json!({})),
1678        ))
1679    }
1680    /// Upload a part
1681    pub fn upload_part(
1682        &self,
1683        bucket: &str,
1684        upload_id: &str,
1685        part_number: &str,
1686        body: reqwest::Body,
1687    ) -> Request<m::UploadPartResponse> {
1688        Request::new(Core::new(
1689            self.client.clone(),
1690            "storage",
1691            ENDPOINT,
1692            &OP_55,
1693            &[
1694                ("bucket", bucket),
1695                ("upload_id", upload_id),
1696                ("part_number", part_number),
1697            ],
1698            Ok(Payload::binary(body)),
1699            Ok(serde_json::json!({})),
1700        ))
1701    }
1702}