Skip to main content

basaltic/models/
storage.rs

1//! Generated typed wire models. Unknown string enum values are retained.
2#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
3pub struct CompleteMultipartUploadRequestInput {
4    /// Every part the assembled object is made of, in ascending part_number order. Each etag must match the one that part's upload returned.
5    #[serde(rename = "parts")]
6    pub parts: Vec<CompleteMultipartUploadRequestInputPartsItem>,
7}
8impl CompleteMultipartUploadRequestInput {
9    /// Set the required fields; optional fields start omitted.
10    #[allow(clippy::too_many_arguments)]
11    pub fn new(parts: Vec<CompleteMultipartUploadRequestInputPartsItem>) -> Self {
12        Self { parts }
13    }
14}
15
16#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
17pub struct CompleteMultipartUploadRequestInputPartsItem {
18    #[serde(rename = "part_number")]
19    pub part_number: i64,
20
21    #[serde(rename = "etag")]
22    pub etag: String,
23}
24impl CompleteMultipartUploadRequestInputPartsItem {
25    /// Set the required fields; optional fields start omitted.
26    #[allow(clippy::too_many_arguments)]
27    pub fn new(part_number: i64, etag: String) -> Self {
28        Self { part_number, etag }
29    }
30}
31
32pub type CompleteMultipartUploadBody = CompleteMultipartUploadRequestInput;
33
34#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
35pub struct CompleteMultipartUploadResponse2 {
36    #[serde(rename = "etag")]
37    pub etag: String,
38
39    #[serde(rename = "size")]
40    pub size: i64,
41
42    #[serde(
43        rename = "version_id",
44        default,
45        skip_serializing_if = "Option::is_none"
46    )]
47    pub version_id: Option<String>,
48
49    #[serde(
50        rename = "storage_class",
51        default,
52        skip_serializing_if = "Option::is_none"
53    )]
54    pub storage_class: Option<String>,
55}
56
57pub type CompleteMultipartUploadResponse = CompleteMultipartUploadResponse2;
58
59#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
60pub struct CreateBucketRequestInput {
61    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
62    #[serde(rename = "name")]
63    pub name: String,
64    /// When true, enables S3 Object Lock on the bucket at creation time and turns versioning on. Object Lock cannot be enabled later.
65    #[serde(
66        rename = "object_lock_enabled",
67        default,
68        skip_serializing_if = "Option::is_none"
69    )]
70    pub object_lock_enabled: Option<bool>,
71}
72impl CreateBucketRequestInput {
73    /// Set the required fields; optional fields start omitted.
74    #[allow(clippy::too_many_arguments)]
75    pub fn new(name: String) -> Self {
76        Self {
77            name,
78            object_lock_enabled: None,
79        }
80    }
81}
82
83pub type CreateBucketBody = CreateBucketRequestInput;
84
85#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
86pub struct BucketResponse {
87    #[serde(rename = "bucket", default, skip_serializing_if = "Option::is_none")]
88    pub bucket: Option<Bucket>,
89}
90
91#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
92pub struct Bucket {
93    #[serde(rename = "id")]
94    pub id: String,
95    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
96    #[serde(rename = "name")]
97    pub name: String,
98
99    #[serde(rename = "crn")]
100    pub crn: String,
101
102    #[serde(rename = "acl")]
103    pub acl: String,
104    /// Versioning state. `suspended` means versioning was on and was turned off — existing versions are kept, new writes stop creating them — which is distinct from `disabled`, a bucket that never had it enabled. The S3-compatible endpoint spells the same states `Enabled` / `Suspended` in its XML, and reports `disabled` by omitting the element.
105    #[serde(rename = "versioning")]
106    pub versioning: BucketVersioning,
107    /// When true, DeleteBucket schedules deletion instead of removing the bucket immediately. Default false deliberately preserves S3 immediate deletion.
108    #[serde(rename = "deletion_protection")]
109    pub deletion_protection: bool,
110    /// Configured recovery window in whole days (default 7). New writes require 1–30; disabled historical buckets can retain legacy out-of-range values.
111    #[serde(rename = "recovery_window_days")]
112    pub recovery_window_days: i64,
113    /// When deletion was requested; null when not pending or for historical windows.
114    #[serde(rename = "deleted_at")]
115    pub deleted_at: crate::Nullable<String>,
116    /// Purge deadline, present while deletion is pending. Restore before this time to cancel.
117    #[serde(
118        rename = "scheduled_purge_at",
119        default,
120        skip_serializing_if = "Option::is_none"
121    )]
122    pub scheduled_purge_at: Option<String>,
123
124    #[serde(rename = "created_at")]
125    pub created_at: String,
126}
127
128#[derive(Clone, Debug, PartialEq, Eq)]
129pub enum BucketVersioning {
130    Disabled,
131    Enabled,
132    Suspended,
133    Unknown(String),
134}
135impl BucketVersioning {
136    pub fn as_str(&self) -> &str {
137        match self {
138            Self::Disabled => "disabled",
139            Self::Enabled => "enabled",
140            Self::Suspended => "suspended",
141            Self::Unknown(value) => value,
142        }
143    }
144}
145impl serde::Serialize for BucketVersioning {
146    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
147        serializer.serialize_str(self.as_str())
148    }
149}
150impl<'de> serde::Deserialize<'de> for BucketVersioning {
151    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
152        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
153        Ok(match value.as_str() {
154            "disabled" => Self::Disabled,
155            "enabled" => Self::Enabled,
156            "suspended" => Self::Suspended,
157            _ => Self::Unknown(value),
158        })
159    }
160}
161
162pub type CreateBucketResponse = BucketResponse;
163
164#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
165pub struct SnapshotCreateRequestInput {
166    /// Account-owned volume UUID, CRN, or exact name.
167    #[serde(rename = "volume")]
168    pub volume: String,
169    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
170    #[serde(rename = "name")]
171    pub name: String,
172
173    #[serde(
174        rename = "description",
175        default,
176        skip_serializing_if = "Option::is_none"
177    )]
178    pub description: Option<String>,
179
180    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
181    pub tags: Option<TagsInput>,
182}
183impl SnapshotCreateRequestInput {
184    /// Set the required fields; optional fields start omitted.
185    #[allow(clippy::too_many_arguments)]
186    pub fn new(volume: String, name: String) -> Self {
187        Self {
188            volume,
189            name,
190            description: None,
191            tags: None,
192        }
193    }
194}
195
196pub type TagsInput = std::collections::BTreeMap<String, String>;
197
198pub type CreateSnapshotBody = SnapshotCreateRequestInput;
199
200#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
201pub struct SnapshotResponse {
202    #[serde(rename = "snapshot")]
203    pub snapshot: Snapshot,
204}
205
206#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
207pub struct Snapshot {
208    #[serde(rename = "id")]
209    pub id: String,
210    /// Cloud Resource Name (name-based, region-scoped).
211    #[serde(rename = "crn")]
212    pub crn: String,
213
214    #[serde(rename = "volume")]
215    pub volume: ResourceRef,
216    /// The schedule that created this snapshot. Absent for manual snapshots, which are never reaped by schedule retention.
217    #[serde(
218        rename = "snapshot_policy",
219        default,
220        skip_serializing_if = "Option::is_none"
221    )]
222    pub snapshot_policy: Option<ResourceRef>,
223    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
224    #[serde(rename = "name")]
225    pub name: String,
226
227    #[serde(
228        rename = "description",
229        default,
230        skip_serializing_if = "Option::is_none"
231    )]
232    pub description: Option<String>,
233
234    #[serde(rename = "tags")]
235    pub tags: Tags,
236    /// Measured retained logical bytes attributed to this snapshot, before replication and compression. Shared extents are counted once across the volume's snapshot chain. Attribution can move when another snapshot is deleted. Null when usage is unknown or stale; zero is a measured empty attribution.
237    #[serde(rename = "size_bytes")]
238    pub size_bytes: crate::Nullable<i64>,
239    /// Minimum restore volume capacity, frozen when this snapshot was created. Independent of consumed storage and later source-volume expansion.
240    #[serde(rename = "restore_size_bytes")]
241    pub restore_size_bytes: i64,
242    /// Freshness of size_bytes. Unknown or stale measurements are never substituted with provisioned capacity.
243    #[serde(rename = "usage_state")]
244    pub usage_state: SnapshotUsageState,
245    /// Time of the last observation. Null before the first observation.
246    #[serde(rename = "usage_measured_at")]
247    pub usage_measured_at: crate::Nullable<String>,
248
249    #[serde(rename = "status")]
250    pub status: SnapshotStatus,
251    /// Active faults, newest first. Empty when healthy. Status is error if and only if an active error-severity fault exists. Resolved history is retained internally.
252    #[serde(rename = "faults")]
253    pub faults: Vec<Fault>,
254
255    #[serde(rename = "created_at")]
256    pub created_at: String,
257
258    #[serde(rename = "updated_at")]
259    pub updated_at: String,
260}
261
262#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
263pub struct ResourceRef {
264    #[serde(rename = "id")]
265    pub id: String,
266
267    #[serde(rename = "crn")]
268    pub crn: String,
269    /// Display label at response time — the resource's name where it has one, otherwise its human label (an invoice number, an account display name). Absent when the target is gone. Not a lookup key.
270    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
271    pub name: Option<String>,
272}
273
274pub type Tags = std::collections::BTreeMap<String, String>;
275
276#[derive(Clone, Debug, PartialEq, Eq)]
277pub enum SnapshotUsageState {
278    Unknown1,
279    Stale,
280    Measured,
281    Unknown(String),
282}
283impl SnapshotUsageState {
284    pub fn as_str(&self) -> &str {
285        match self {
286            Self::Unknown1 => "unknown",
287            Self::Stale => "stale",
288            Self::Measured => "measured",
289            Self::Unknown(value) => value,
290        }
291    }
292}
293impl serde::Serialize for SnapshotUsageState {
294    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
295        serializer.serialize_str(self.as_str())
296    }
297}
298impl<'de> serde::Deserialize<'de> for SnapshotUsageState {
299    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
300        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
301        Ok(match value.as_str() {
302            "unknown" => Self::Unknown1,
303            "stale" => Self::Stale,
304            "measured" => Self::Measured,
305            _ => Self::Unknown(value),
306        })
307    }
308}
309
310#[derive(Clone, Debug, PartialEq, Eq)]
311pub enum SnapshotStatus {
312    Creating,
313    Available,
314    Deleting,
315    Error,
316    Unknown(String),
317}
318impl SnapshotStatus {
319    pub fn as_str(&self) -> &str {
320        match self {
321            Self::Creating => "creating",
322            Self::Available => "available",
323            Self::Deleting => "deleting",
324            Self::Error => "error",
325            Self::Unknown(value) => value,
326        }
327    }
328}
329impl serde::Serialize for SnapshotStatus {
330    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
331        serializer.serialize_str(self.as_str())
332    }
333}
334impl<'de> serde::Deserialize<'de> for SnapshotStatus {
335    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
336        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
337        Ok(match value.as_str() {
338            "creating" => Self::Creating,
339            "available" => Self::Available,
340            "deleting" => Self::Deleting,
341            "error" => Self::Error,
342            _ => Self::Unknown(value),
343        })
344    }
345}
346
347#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
348pub struct Fault {
349    /// Stable machine-readable code owned by the reporting operation.
350    #[serde(rename = "code")]
351    pub code: String,
352
353    #[serde(rename = "severity")]
354    pub severity: FaultSeverity,
355
356    #[serde(rename = "message")]
357    pub message: String,
358    /// Structured context; legacy strings are preserved in legacy_text.
359    #[serde(rename = "details")]
360    pub details: crate::Nullable<std::collections::BTreeMap<String, serde_json::Value>>,
361    /// First observation in this active occurrence series.
362    #[serde(rename = "first_at")]
363    pub first_at: String,
364    /// Latest observation in this active occurrence series.
365    #[serde(rename = "last_at")]
366    pub last_at: String,
367
368    #[serde(rename = "occurrences")]
369    pub occurrences: i64,
370}
371
372#[derive(Clone, Debug, PartialEq, Eq)]
373pub enum FaultSeverity {
374    Error,
375    Warning,
376    Unknown(String),
377}
378impl FaultSeverity {
379    pub fn as_str(&self) -> &str {
380        match self {
381            Self::Error => "error",
382            Self::Warning => "warning",
383            Self::Unknown(value) => value,
384        }
385    }
386}
387impl serde::Serialize for FaultSeverity {
388    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
389        serializer.serialize_str(self.as_str())
390    }
391}
392impl<'de> serde::Deserialize<'de> for FaultSeverity {
393    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
394        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
395        Ok(match value.as_str() {
396            "error" => Self::Error,
397            "warning" => Self::Warning,
398            _ => Self::Unknown(value),
399        })
400    }
401}
402
403pub type CreateSnapshotResponse = SnapshotResponse;
404
405#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
406pub struct SnapshotPolicyCreateRequestInput {
407    /// Unique within the volume — it names the policy in its CRN. Scheduled snapshots are named `<policy>-<UTC timestamp>`. Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
408    #[serde(rename = "name")]
409    pub name: String,
410
411    #[serde(
412        rename = "description",
413        default,
414        skip_serializing_if = "Option::is_none"
415    )]
416    pub description: Option<String>,
417
418    #[serde(rename = "interval_minutes")]
419    pub interval_minutes: SnapshotIntervalMinutesInput,
420
421    #[serde(rename = "retention_count")]
422    pub retention_count: SnapshotRetentionCountInput,
423
424    #[serde(
425        rename = "retention_days",
426        default,
427        skip_serializing_if = "Option::is_none"
428    )]
429    pub retention_days: Option<SnapshotRetentionDaysInput>,
430    /// Defaults to true. Set false to attach a paused schedule. Pausing stops the whole policy — no snapshots are taken and none are deleted, because a paused schedule that kept reaping would delete history while you were looking at it.
431    #[serde(rename = "enabled", default, skip_serializing_if = "Option::is_none")]
432    pub enabled: Option<bool>,
433
434    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
435    pub tags: Option<TagsInput>,
436}
437impl SnapshotPolicyCreateRequestInput {
438    /// Set the required fields; optional fields start omitted.
439    #[allow(clippy::too_many_arguments)]
440    pub fn new(
441        name: String,
442        interval_minutes: SnapshotIntervalMinutesInput,
443        retention_count: SnapshotRetentionCountInput,
444    ) -> Self {
445        Self {
446            name,
447            description: None,
448            interval_minutes,
449            retention_count,
450            retention_days: None,
451            enabled: None,
452            tags: None,
453        }
454    }
455}
456
457pub type SnapshotIntervalMinutesInput = i64;
458
459pub type SnapshotRetentionCountInput = i64;
460
461pub type SnapshotRetentionDaysInput = i64;
462
463pub type CreateSnapshotPolicyBody = SnapshotPolicyCreateRequestInput;
464
465#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
466pub struct SnapshotPolicyResponse {
467    #[serde(rename = "snapshot_policy")]
468    pub snapshot_policy: SnapshotPolicy,
469}
470
471#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
472pub struct SnapshotPolicy {
473    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
474    pub id: Option<String>,
475    /// Cloud Resource Name (name-based, region-scoped).
476    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
477    pub crn: Option<String>,
478    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
479    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
480    pub name: Option<String>,
481
482    #[serde(
483        rename = "description",
484        default,
485        skip_serializing_if = "Option::is_none"
486    )]
487    pub description: Option<String>,
488    /// Disabling pauses the whole policy — no scheduled snapshots and no retention. A paused schedule that kept reaping would delete history while you were looking at it.
489    #[serde(rename = "enabled", default, skip_serializing_if = "Option::is_none")]
490    pub enabled: Option<bool>,
491
492    #[serde(
493        rename = "interval_minutes",
494        default,
495        skip_serializing_if = "Option::is_none"
496    )]
497    pub interval_minutes: Option<SnapshotIntervalMinutes>,
498
499    #[serde(
500        rename = "retention_count",
501        default,
502        skip_serializing_if = "Option::is_none"
503    )]
504    pub retention_count: Option<SnapshotRetentionCount>,
505
506    #[serde(
507        rename = "retention_days",
508        default,
509        skip_serializing_if = "Option::is_none"
510    )]
511    pub retention_days: Option<SnapshotRetentionDays>,
512    /// When the next snapshot is due. Re-stamped to `now + interval_minutes` each time the policy fires — never to `previous + interval` — so a window missed while the region was busy costs one snapshot, not one per window missed.
513    #[serde(
514        rename = "next_run_at",
515        default,
516        skip_serializing_if = "Option::is_none"
517    )]
518    pub next_run_at: Option<String>,
519    /// When the policy last fired. Absent until the first fire.
520    #[serde(
521        rename = "last_run_at",
522        default,
523        skip_serializing_if = "Option::is_none"
524    )]
525    pub last_run_at: Option<String>,
526    /// Active warning faults, newest first; empty when healthy. Policies have no error status and faults never change enabled. Execution and retention recover independently; resolved history is retained internally.
527    #[serde(rename = "faults")]
528    pub faults: Vec<Fault>,
529
530    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
531    pub tags: Option<Tags>,
532
533    #[serde(
534        rename = "created_at",
535        default,
536        skip_serializing_if = "Option::is_none"
537    )]
538    pub created_at: Option<String>,
539
540    #[serde(
541        rename = "updated_at",
542        default,
543        skip_serializing_if = "Option::is_none"
544    )]
545    pub updated_at: Option<String>,
546}
547
548pub type SnapshotIntervalMinutes = i64;
549
550pub type SnapshotRetentionCount = i64;
551
552pub type SnapshotRetentionDays = i64;
553
554pub type CreateSnapshotPolicyResponse = SnapshotPolicyResponse;
555
556#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
557pub struct VolumeCreateRequestInput {
558    #[serde(
559        rename = "performance",
560        default,
561        skip_serializing_if = "Option::is_none"
562    )]
563    pub performance: Option<VolumePerformanceRequestInput>,
564    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
565    #[serde(rename = "name")]
566    pub name: String,
567
568    #[serde(
569        rename = "description",
570        default,
571        skip_serializing_if = "Option::is_none"
572    )]
573    pub description: Option<String>,
574
575    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
576    pub tags: Option<TagsInput>,
577
578    #[serde(rename = "volume_type")]
579    pub volume_type: CreatableVolumeTypeNameInput,
580
581    #[serde(rename = "size_gb")]
582    pub size_gb: i64,
583    /// Architecture used for source_image name resolution. A full image CRN pins its own architecture.
584    #[serde(
585        rename = "architecture",
586        default,
587        skip_serializing_if = "Option::is_none"
588    )]
589    pub architecture: Option<String>,
590    /// Image UUID, name, name:version, or full CRN image/&lt;name&gt;/architecture/&lt;arch&gt;/version/&lt;version&gt;. Names resolve in the caller account first, then tagged platform catalog images, using architecture (default amd64). Mutually exclusive with source_snapshot. Image tags are not accepted.
591    #[serde(
592        rename = "source_image",
593        default,
594        skip_serializing_if = "Option::is_none"
595    )]
596    pub source_image: Option<String>,
597    /// Clone from an available account-owned snapshot UUID or nested CRN volume/&lt;volume-name&gt;/snapshot/&lt;snapshot-name&gt;. Bare snapshot names are rejected because this request has no fixed source volume. Mutually exclusive with source_image; size_gb must be at least the snapshot's frozen size.
598    #[serde(
599        rename = "source_snapshot",
600        default,
601        skip_serializing_if = "Option::is_none"
602    )]
603    pub source_snapshot: Option<String>,
604
605    #[serde(rename = "bootable", default, skip_serializing_if = "Option::is_none")]
606    pub bootable: Option<bool>,
607}
608impl VolumeCreateRequestInput {
609    /// Set the required fields; optional fields start omitted.
610    #[allow(clippy::too_many_arguments)]
611    pub fn new(name: String, volume_type: CreatableVolumeTypeNameInput, size_gb: i64) -> Self {
612        Self {
613            performance: None,
614            name,
615            description: None,
616            tags: None,
617            volume_type,
618            size_gb,
619            architecture: None,
620            source_image: None,
621            source_snapshot: None,
622            bootable: None,
623        }
624    }
625}
626
627#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
628pub struct VolumePerformanceRequestInput {
629    #[serde(rename = "iops", default, skip_serializing_if = "Option::is_none")]
630    pub iops: Option<i64>,
631
632    #[serde(
633        rename = "throughput_mib_s",
634        default,
635        skip_serializing_if = "Option::is_none"
636    )]
637    pub throughput_mib_s: Option<f64>,
638}
639
640#[derive(Clone, Debug, PartialEq, Eq)]
641pub enum CreatableVolumeTypeNameInput {
642    Ssd,
643    Nvme,
644    Unknown(String),
645}
646impl CreatableVolumeTypeNameInput {
647    pub fn as_str(&self) -> &str {
648        match self {
649            Self::Ssd => "ssd",
650            Self::Nvme => "nvme",
651            Self::Unknown(value) => value,
652        }
653    }
654}
655impl serde::Serialize for CreatableVolumeTypeNameInput {
656    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
657        serializer.serialize_str(self.as_str())
658    }
659}
660impl<'de> serde::Deserialize<'de> for CreatableVolumeTypeNameInput {
661    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
662        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
663        Ok(match value.as_str() {
664            "ssd" => Self::Ssd,
665            "nvme" => Self::Nvme,
666            _ => Self::Unknown(value),
667        })
668    }
669}
670
671pub type CreateVolumeBody = VolumeCreateRequestInput;
672
673#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
674pub struct VolumeResponse {
675    #[serde(rename = "volume")]
676    pub volume: Volume,
677}
678
679#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
680pub struct Volume {
681    #[serde(rename = "id")]
682    pub id: String,
683    /// Cloud Resource Name (name-based, region-scoped).
684    #[serde(rename = "crn")]
685    pub crn: String,
686    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
687    #[serde(rename = "name")]
688    pub name: String,
689
690    #[serde(
691        rename = "description",
692        default,
693        skip_serializing_if = "Option::is_none"
694    )]
695    pub description: Option<String>,
696
697    #[serde(rename = "tags")]
698    pub tags: Tags,
699
700    #[serde(rename = "volume_type")]
701    pub volume_type: VolumeTypeName,
702
703    #[serde(rename = "size_gb")]
704    pub size_gb: i64,
705
706    #[serde(rename = "performance")]
707    pub performance: VolumePerformance,
708
709    #[serde(rename = "included_io_limits")]
710    pub included_io_limits: IncludedIOLimits,
711
712    #[serde(rename = "status")]
713    pub status: VolumeStatus,
714    /// Set at create time when the volume is provisioned from a bootable image. Immutable after creation.
715    #[serde(rename = "bootable")]
716    pub bootable: bool,
717    /// Active faults, newest first. Empty when healthy. Status is error if and only if an active error-severity fault exists. Resolved history is retained internally.
718    #[serde(rename = "faults")]
719    pub faults: Vec<Fault>,
720
721    #[serde(rename = "created_at")]
722    pub created_at: String,
723
724    #[serde(rename = "updated_at")]
725    pub updated_at: String,
726    /// Source image identity, or null when this volume was not created from an image.
727    #[serde(rename = "source_image")]
728    pub source_image: VolumeSourceImage,
729    /// Source snapshot identity, or null when not created from a snapshot.
730    #[serde(rename = "source_snapshot")]
731    pub source_snapshot: VolumeSourceSnapshot,
732}
733
734#[derive(Clone, Debug, PartialEq, Eq)]
735pub enum VolumeTypeName {
736    Hdd,
737    Ssd,
738    Nvme,
739    Unknown(String),
740}
741impl VolumeTypeName {
742    pub fn as_str(&self) -> &str {
743        match self {
744            Self::Hdd => "hdd",
745            Self::Ssd => "ssd",
746            Self::Nvme => "nvme",
747            Self::Unknown(value) => value,
748        }
749    }
750}
751impl serde::Serialize for VolumeTypeName {
752    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
753        serializer.serialize_str(self.as_str())
754    }
755}
756impl<'de> serde::Deserialize<'de> for VolumeTypeName {
757    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
758        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
759        Ok(match value.as_str() {
760            "hdd" => Self::Hdd,
761            "ssd" => Self::Ssd,
762            "nvme" => Self::Nvme,
763            _ => Self::Unknown(value),
764        })
765    }
766}
767
768#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
769pub struct VolumePerformance {
770    #[serde(rename = "requested")]
771    pub requested: IncludedIOLimits,
772
773    #[serde(rename = "applied")]
774    pub applied: IncludedIOLimits,
775}
776
777#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
778pub struct IncludedIOLimits {
779    #[serde(rename = "iops")]
780    pub iops: i64,
781
782    #[serde(rename = "bytes_per_sec")]
783    pub bytes_per_sec: i64,
784    /// Always zero for SSD and NVMe volumes; IOPS bursting is disabled.
785    #[serde(rename = "burst_iops")]
786    pub burst_iops: i64,
787    /// Always zero for SSD and NVMe volumes; throughput bursting is disabled.
788    #[serde(rename = "burst_bytes_per_sec")]
789    pub burst_bytes_per_sec: i64,
790    /// Always zero for SSD and NVMe volumes; no burst duration applies.
791    #[serde(rename = "burst_seconds")]
792    pub burst_seconds: i64,
793}
794
795#[derive(Clone, Debug, PartialEq, Eq)]
796pub enum VolumeStatus {
797    Creating,
798    Available,
799    InUse,
800    Extending,
801    Updating,
802    Deleting,
803    Error,
804    Unknown(String),
805}
806impl VolumeStatus {
807    pub fn as_str(&self) -> &str {
808        match self {
809            Self::Creating => "creating",
810            Self::Available => "available",
811            Self::InUse => "in_use",
812            Self::Extending => "extending",
813            Self::Updating => "updating",
814            Self::Deleting => "deleting",
815            Self::Error => "error",
816            Self::Unknown(value) => value,
817        }
818    }
819}
820impl serde::Serialize for VolumeStatus {
821    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
822        serializer.serialize_str(self.as_str())
823    }
824}
825impl<'de> serde::Deserialize<'de> for VolumeStatus {
826    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
827        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
828        Ok(match value.as_str() {
829            "creating" => Self::Creating,
830            "available" => Self::Available,
831            "in_use" => Self::InUse,
832            "extending" => Self::Extending,
833            "updating" => Self::Updating,
834            "deleting" => Self::Deleting,
835            "error" => Self::Error,
836            _ => Self::Unknown(value),
837        })
838    }
839}
840
841#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
842#[serde(untagged)]
843pub enum VolumeSourceImage {
844    Variant1(Box<ResourceRef>),
845    Variant2(Box<crate::Nullable<serde_json::Value>>),
846}
847
848#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
849#[serde(untagged)]
850pub enum VolumeSourceSnapshot {
851    Variant1(Box<ResourceRef>),
852    Variant2(Box<crate::Nullable<serde_json::Value>>),
853}
854
855pub type CreateVolumeResponse = VolumeResponse;
856
857#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
858pub struct DeleteBucketResultVariant1 {
859    #[serde(rename = "scheduled_purge_at")]
860    pub scheduled_purge_at: String,
861}
862
863#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
864#[serde(untagged)]
865pub enum DeleteBucketResult {
866    Variant1(Box<DeleteBucketResultVariant1>),
867    Variant2(Box<std::collections::BTreeMap<String, serde_json::Value>>),
868}
869
870pub type DeleteBucketResponse = DeleteBucketResult;
871
872#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
873pub struct VolumeExtendRequestInput {
874    /// New size in GB. Must be strictly greater than the current size.
875    #[serde(rename = "new_size_gb")]
876    pub new_size_gb: i64,
877}
878impl VolumeExtendRequestInput {
879    /// Set the required fields; optional fields start omitted.
880    #[allow(clippy::too_many_arguments)]
881    pub fn new(new_size_gb: i64) -> Self {
882        Self { new_size_gb }
883    }
884}
885
886pub type ExtendVolumeBody = VolumeExtendRequestInput;
887
888pub type ExtendVolumeResponse = VolumeResponse;
889
890#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
891pub struct BucketCORSResponse {
892    #[serde(rename = "cors_rules")]
893    pub cors_rules: Vec<CORSRule>,
894}
895
896#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
897pub struct CORSRule {
898    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
899    pub id: Option<String>,
900
901    #[serde(rename = "allowed_origins")]
902    pub allowed_origins: Vec<String>,
903
904    #[serde(rename = "allowed_methods")]
905    pub allowed_methods: Vec<CORSRuleAllowedMethodsItem>,
906
907    #[serde(
908        rename = "allowed_headers",
909        default,
910        skip_serializing_if = "Option::is_none"
911    )]
912    pub allowed_headers: Option<Vec<String>>,
913
914    #[serde(
915        rename = "expose_headers",
916        default,
917        skip_serializing_if = "Option::is_none"
918    )]
919    pub expose_headers: Option<Vec<String>>,
920
921    #[serde(
922        rename = "max_age_seconds",
923        default,
924        skip_serializing_if = "Option::is_none"
925    )]
926    pub max_age_seconds: Option<i64>,
927}
928
929#[derive(Clone, Debug, PartialEq, Eq)]
930pub enum CORSRuleAllowedMethodsItem {
931    GET,
932    PUT,
933    POST,
934    DELETE,
935    HEAD,
936    Unknown(String),
937}
938impl CORSRuleAllowedMethodsItem {
939    pub fn as_str(&self) -> &str {
940        match self {
941            Self::GET => "GET",
942            Self::PUT => "PUT",
943            Self::POST => "POST",
944            Self::DELETE => "DELETE",
945            Self::HEAD => "HEAD",
946            Self::Unknown(value) => value,
947        }
948    }
949}
950impl serde::Serialize for CORSRuleAllowedMethodsItem {
951    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
952        serializer.serialize_str(self.as_str())
953    }
954}
955impl<'de> serde::Deserialize<'de> for CORSRuleAllowedMethodsItem {
956    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
957        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
958        Ok(match value.as_str() {
959            "GET" => Self::GET,
960            "PUT" => Self::PUT,
961            "POST" => Self::POST,
962            "DELETE" => Self::DELETE,
963            "HEAD" => Self::HEAD,
964            _ => Self::Unknown(value),
965        })
966    }
967}
968
969pub type GetBucketCORSResponse = BucketCORSResponse;
970
971#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
972pub struct BucketEncryptionResponse {
973    #[serde(rename = "encryption_rules")]
974    pub encryption_rules: Vec<EncryptionRule>,
975}
976
977#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
978pub struct EncryptionRule {
979    #[serde(rename = "default", default, skip_serializing_if = "Option::is_none")]
980    pub default: Option<EncryptionRuleDefault>,
981
982    #[serde(
983        rename = "bucket_key_enabled",
984        default,
985        skip_serializing_if = "Option::is_none"
986    )]
987    pub bucket_key_enabled: Option<bool>,
988}
989
990#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
991pub struct EncryptionRuleDefault {
992    #[serde(rename = "sse_algorithm")]
993    pub sse_algorithm: String,
994    /// Accepted but unused S3 placeholder. Only AES256 is supported; this is not a KMS resource reference.
995    #[serde(
996        rename = "kms_master_key_id",
997        default,
998        skip_serializing_if = "Option::is_none"
999    )]
1000    pub kms_master_key_id: Option<String>,
1001}
1002
1003pub type GetBucketEncryptionResponse = BucketEncryptionResponse;
1004
1005#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1006pub struct BucketLifecycleResponse {
1007    /// Opaque configuration revision. Supply this value in double quotes as If-Match on PUT or DELETE. The empty configuration has revision none.
1008    #[serde(rename = "revision")]
1009    pub revision: String,
1010
1011    #[serde(rename = "lifecycle_rules")]
1012    pub lifecycle_rules: Vec<LifecycleRule>,
1013}
1014
1015#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1016pub struct LifecycleRule {
1017    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
1018    pub id: Option<String>,
1019    /// `disabled` keeps the rule in the configuration but skips it during evaluation. The S3-compatible endpoint spells the same states `Enabled` / `Disabled` in its XML.
1020    #[serde(rename = "status")]
1021    pub status: LifecycleRuleStatus,
1022
1023    #[serde(rename = "filter", default, skip_serializing_if = "Option::is_none")]
1024    pub filter: Option<LifecycleRuleFilter>,
1025    /// Move matching objects to another storage class once they are old enough. The object keeps its identity — same key, same version id, same last-modified — and only its bytes move between pools, so pairing a transition with an expiration works: the expiry clock is not restarted by the move. Exactly one of `days` or `date`. When the rule also has an `expiration`, the transition must come strictly first, otherwise the object would be deleted before it ever moved and the rule is rejected. Only one transition per rule: the platform serves two classes, so a second has nowhere to go. The S3-compatible endpoint accepts a single-element `<Transition>` list and rejects longer ones rather than silently applying the first.
1026    #[serde(
1027        rename = "transition",
1028        default,
1029        skip_serializing_if = "Option::is_none"
1030    )]
1031    pub transition: Option<LifecycleRuleTransition>,
1032
1033    #[serde(
1034        rename = "expiration",
1035        default,
1036        skip_serializing_if = "Option::is_none"
1037    )]
1038    pub expiration: Option<LifecycleRuleExpiration>,
1039
1040    #[serde(
1041        rename = "noncurrent_version_expiration",
1042        default,
1043        skip_serializing_if = "Option::is_none"
1044    )]
1045    pub noncurrent_version_expiration: Option<LifecycleRuleNoncurrentVersionExpiration>,
1046
1047    #[serde(
1048        rename = "abort_incomplete_multipart_upload",
1049        default,
1050        skip_serializing_if = "Option::is_none"
1051    )]
1052    pub abort_incomplete_multipart_upload: Option<LifecycleRuleAbortIncompleteMultipartUpload>,
1053}
1054
1055#[derive(Clone, Debug, PartialEq, Eq)]
1056pub enum LifecycleRuleStatus {
1057    Enabled,
1058    Disabled,
1059    Unknown(String),
1060}
1061impl LifecycleRuleStatus {
1062    pub fn as_str(&self) -> &str {
1063        match self {
1064            Self::Enabled => "enabled",
1065            Self::Disabled => "disabled",
1066            Self::Unknown(value) => value,
1067        }
1068    }
1069}
1070impl serde::Serialize for LifecycleRuleStatus {
1071    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1072        serializer.serialize_str(self.as_str())
1073    }
1074}
1075impl<'de> serde::Deserialize<'de> for LifecycleRuleStatus {
1076    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1077        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1078        Ok(match value.as_str() {
1079            "enabled" => Self::Enabled,
1080            "disabled" => Self::Disabled,
1081            _ => Self::Unknown(value),
1082        })
1083    }
1084}
1085
1086#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1087pub struct LifecycleRuleFilter {
1088    #[serde(rename = "prefix", default, skip_serializing_if = "Option::is_none")]
1089    pub prefix: Option<String>,
1090}
1091
1092#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1093pub struct LifecycleRuleTransition {
1094    /// Days after the object's last-modified time.
1095    #[serde(rename = "days", default, skip_serializing_if = "Option::is_none")]
1096    pub days: Option<i64>,
1097    /// Absolute cut-off; fires on the next sweep after this instant.
1098    #[serde(rename = "date", default, skip_serializing_if = "Option::is_none")]
1099    pub date: Option<String>,
1100    /// Destination class. Keeps the S3 standard's casing rather than the platform's lowercase convention, because the class vocabulary is S3's. Unsupported values are rejected — a transition to a class that does not exist would silently never run.
1101    #[serde(rename = "storage_class")]
1102    pub storage_class: LifecycleRuleTransitionStorageClass,
1103}
1104
1105#[derive(Clone, Debug, PartialEq, Eq)]
1106pub enum LifecycleRuleTransitionStorageClass {
1107    STANDARD,
1108    COLD,
1109    Unknown(String),
1110}
1111impl LifecycleRuleTransitionStorageClass {
1112    pub fn as_str(&self) -> &str {
1113        match self {
1114            Self::STANDARD => "STANDARD",
1115            Self::COLD => "COLD",
1116            Self::Unknown(value) => value,
1117        }
1118    }
1119}
1120impl serde::Serialize for LifecycleRuleTransitionStorageClass {
1121    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1122        serializer.serialize_str(self.as_str())
1123    }
1124}
1125impl<'de> serde::Deserialize<'de> for LifecycleRuleTransitionStorageClass {
1126    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1127        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1128        Ok(match value.as_str() {
1129            "STANDARD" => Self::STANDARD,
1130            "COLD" => Self::COLD,
1131            _ => Self::Unknown(value),
1132        })
1133    }
1134}
1135
1136#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1137pub struct LifecycleRuleExpiration {
1138    #[serde(rename = "days", default, skip_serializing_if = "Option::is_none")]
1139    pub days: Option<i64>,
1140
1141    #[serde(rename = "date", default, skip_serializing_if = "Option::is_none")]
1142    pub date: Option<String>,
1143}
1144
1145#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1146pub struct LifecycleRuleNoncurrentVersionExpiration {
1147    #[serde(
1148        rename = "noncurrent_days",
1149        default,
1150        skip_serializing_if = "Option::is_none"
1151    )]
1152    pub noncurrent_days: Option<i64>,
1153
1154    #[serde(
1155        rename = "newer_noncurrent_versions",
1156        default,
1157        skip_serializing_if = "Option::is_none"
1158    )]
1159    pub newer_noncurrent_versions: Option<i64>,
1160}
1161
1162#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1163pub struct LifecycleRuleAbortIncompleteMultipartUpload {
1164    #[serde(
1165        rename = "days_after_initiation",
1166        default,
1167        skip_serializing_if = "Option::is_none"
1168    )]
1169    pub days_after_initiation: Option<i64>,
1170}
1171
1172pub type GetBucketLifecycleResponse = BucketLifecycleResponse;
1173
1174pub type BucketObjectLockResponse = ObjectLockConfig;
1175
1176#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1177pub struct ObjectLockConfig {
1178    #[serde(
1179        rename = "object_lock_enabled",
1180        default,
1181        skip_serializing_if = "Option::is_none"
1182    )]
1183    pub object_lock_enabled: Option<String>,
1184
1185    #[serde(
1186        rename = "object_lock_rule",
1187        default,
1188        skip_serializing_if = "Option::is_none"
1189    )]
1190    pub object_lock_rule: Option<ObjectLockConfigObjectLockRule>,
1191}
1192
1193#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1194pub struct ObjectLockConfigObjectLockRule {
1195    #[serde(
1196        rename = "default_retention",
1197        default,
1198        skip_serializing_if = "Option::is_none"
1199    )]
1200    pub default_retention: Option<ObjectLockConfigObjectLockRuleDefaultRetention>,
1201}
1202
1203#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1204pub struct ObjectLockConfigObjectLockRuleDefaultRetention {
1205    #[serde(rename = "mode", default, skip_serializing_if = "Option::is_none")]
1206    pub mode: Option<ObjectLockConfigObjectLockRuleDefaultRetentionMode>,
1207
1208    #[serde(rename = "days", default, skip_serializing_if = "Option::is_none")]
1209    pub days: Option<i64>,
1210
1211    #[serde(rename = "years", default, skip_serializing_if = "Option::is_none")]
1212    pub years: Option<i64>,
1213}
1214
1215#[derive(Clone, Debug, PartialEq, Eq)]
1216pub enum ObjectLockConfigObjectLockRuleDefaultRetentionMode {
1217    GOVERNANCE,
1218    COMPLIANCE,
1219    Unknown(String),
1220}
1221impl ObjectLockConfigObjectLockRuleDefaultRetentionMode {
1222    pub fn as_str(&self) -> &str {
1223        match self {
1224            Self::GOVERNANCE => "GOVERNANCE",
1225            Self::COMPLIANCE => "COMPLIANCE",
1226            Self::Unknown(value) => value,
1227        }
1228    }
1229}
1230impl serde::Serialize for ObjectLockConfigObjectLockRuleDefaultRetentionMode {
1231    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1232        serializer.serialize_str(self.as_str())
1233    }
1234}
1235impl<'de> serde::Deserialize<'de> for ObjectLockConfigObjectLockRuleDefaultRetentionMode {
1236    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1237        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1238        Ok(match value.as_str() {
1239            "GOVERNANCE" => Self::GOVERNANCE,
1240            "COMPLIANCE" => Self::COMPLIANCE,
1241            _ => Self::Unknown(value),
1242        })
1243    }
1244}
1245
1246pub type GetBucketObjectLockResponse = BucketObjectLockResponse;
1247
1248#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1249pub struct BucketPolicyResponse {
1250    #[serde(rename = "document", default, skip_serializing_if = "Option::is_none")]
1251    pub document: Option<BucketPolicy>,
1252}
1253
1254pub type BucketPolicy = std::collections::BTreeMap<String, serde_json::Value>;
1255
1256pub type GetBucketPolicyResponse = BucketPolicyResponse;
1257
1258#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1259pub struct BucketTaggingResponse {
1260    #[serde(rename = "tags")]
1261    pub tags: TagSet,
1262}
1263
1264pub type TagSet = std::collections::BTreeMap<String, String>;
1265
1266pub type GetBucketTaggingResponse = BucketTaggingResponse;
1267
1268#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1269pub struct BucketVersioningResponse {
1270    #[serde(rename = "status")]
1271    pub status: BucketVersioningResponseStatus,
1272}
1273
1274#[derive(Clone, Debug, PartialEq, Eq)]
1275pub enum BucketVersioningResponseStatus {
1276    Disabled,
1277    Enabled,
1278    Suspended,
1279    Unknown(String),
1280}
1281impl BucketVersioningResponseStatus {
1282    pub fn as_str(&self) -> &str {
1283        match self {
1284            Self::Disabled => "disabled",
1285            Self::Enabled => "enabled",
1286            Self::Suspended => "suspended",
1287            Self::Unknown(value) => value,
1288        }
1289    }
1290}
1291impl serde::Serialize for BucketVersioningResponseStatus {
1292    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1293        serializer.serialize_str(self.as_str())
1294    }
1295}
1296impl<'de> serde::Deserialize<'de> for BucketVersioningResponseStatus {
1297    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1298        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1299        Ok(match value.as_str() {
1300            "disabled" => Self::Disabled,
1301            "enabled" => Self::Enabled,
1302            "suspended" => Self::Suspended,
1303            _ => Self::Unknown(value),
1304        })
1305    }
1306}
1307
1308pub type GetBucketVersioningResponse = BucketVersioningResponse;
1309
1310pub type GetSnapshotResponse = SnapshotResponse;
1311
1312pub type GetSnapshotResource = Snapshot;
1313
1314#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1315pub struct GetSnapshotScope {
1316    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1317    pub limit: Option<i64>,
1318
1319    #[serde(rename = "volume", default, skip_serializing_if = "Option::is_none")]
1320    pub volume: Option<String>,
1321
1322    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
1323    pub status: Option<SnapshotStatusInput>,
1324
1325    #[serde(
1326        rename = "snapshot_policy",
1327        default,
1328        skip_serializing_if = "Option::is_none"
1329    )]
1330    pub snapshot_policy: Option<String>,
1331}
1332
1333#[derive(Clone, Debug, PartialEq, Eq)]
1334pub enum SnapshotStatusInput {
1335    Creating,
1336    Available,
1337    Deleting,
1338    Error,
1339    Unknown(String),
1340}
1341impl SnapshotStatusInput {
1342    pub fn as_str(&self) -> &str {
1343        match self {
1344            Self::Creating => "creating",
1345            Self::Available => "available",
1346            Self::Deleting => "deleting",
1347            Self::Error => "error",
1348            Self::Unknown(value) => value,
1349        }
1350    }
1351}
1352impl serde::Serialize for SnapshotStatusInput {
1353    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1354        serializer.serialize_str(self.as_str())
1355    }
1356}
1357impl<'de> serde::Deserialize<'de> for SnapshotStatusInput {
1358    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1359        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1360        Ok(match value.as_str() {
1361            "creating" => Self::Creating,
1362            "available" => Self::Available,
1363            "deleting" => Self::Deleting,
1364            "error" => Self::Error,
1365            _ => Self::Unknown(value),
1366        })
1367    }
1368}
1369
1370pub type GetSnapshotPolicyResponse = SnapshotPolicyResponse;
1371
1372pub type GetSnapshotPolicyResource = SnapshotPolicy;
1373
1374#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1375pub struct GetSnapshotPolicyScope {
1376    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1377    pub limit: Option<i64>,
1378
1379    #[serde(rename = "enabled", default, skip_serializing_if = "Option::is_none")]
1380    pub enabled: Option<bool>,
1381}
1382
1383pub type GetVolumeResponse = VolumeResponse;
1384
1385pub type GetVolumeResource = Volume;
1386
1387#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1388pub struct GetVolumeScope {
1389    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1390    pub limit: Option<i64>,
1391
1392    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
1393    pub status: Option<VolumeStatusInput>,
1394}
1395
1396#[derive(Clone, Debug, PartialEq, Eq)]
1397pub enum VolumeStatusInput {
1398    Creating,
1399    Available,
1400    InUse,
1401    Extending,
1402    Updating,
1403    Deleting,
1404    Error,
1405    Unknown(String),
1406}
1407impl VolumeStatusInput {
1408    pub fn as_str(&self) -> &str {
1409        match self {
1410            Self::Creating => "creating",
1411            Self::Available => "available",
1412            Self::InUse => "in_use",
1413            Self::Extending => "extending",
1414            Self::Updating => "updating",
1415            Self::Deleting => "deleting",
1416            Self::Error => "error",
1417            Self::Unknown(value) => value,
1418        }
1419    }
1420}
1421impl serde::Serialize for VolumeStatusInput {
1422    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
1423        serializer.serialize_str(self.as_str())
1424    }
1425}
1426impl<'de> serde::Deserialize<'de> for VolumeStatusInput {
1427    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
1428        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
1429        Ok(match value.as_str() {
1430            "creating" => Self::Creating,
1431            "available" => Self::Available,
1432            "in_use" => Self::InUse,
1433            "extending" => Self::Extending,
1434            "updating" => Self::Updating,
1435            "deleting" => Self::Deleting,
1436            "error" => Self::Error,
1437            _ => Self::Unknown(value),
1438        })
1439    }
1440}
1441
1442#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1443pub struct InitiateMultipartUploadRequestInput {
1444    #[serde(rename = "key")]
1445    pub key: String,
1446
1447    #[serde(
1448        rename = "content_type",
1449        default,
1450        skip_serializing_if = "Option::is_none"
1451    )]
1452    pub content_type: Option<String>,
1453
1454    #[serde(
1455        rename = "storage_class",
1456        default,
1457        skip_serializing_if = "Option::is_none"
1458    )]
1459    pub storage_class: Option<String>,
1460
1461    #[serde(rename = "metadata", default, skip_serializing_if = "Option::is_none")]
1462    pub metadata: Option<std::collections::BTreeMap<String, String>>,
1463}
1464impl InitiateMultipartUploadRequestInput {
1465    /// Set the required fields; optional fields start omitted.
1466    #[allow(clippy::too_many_arguments)]
1467    pub fn new(key: String) -> Self {
1468        Self {
1469            key,
1470            content_type: None,
1471            storage_class: None,
1472            metadata: None,
1473        }
1474    }
1475}
1476
1477pub type InitiateMultipartUploadBody = InitiateMultipartUploadRequestInput;
1478
1479#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1480pub struct MultipartUploadResponse {
1481    #[serde(rename = "upload")]
1482    pub upload: MultipartUpload,
1483}
1484
1485#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1486pub struct MultipartUpload {
1487    #[serde(rename = "upload_id")]
1488    pub upload_id: String,
1489
1490    #[serde(rename = "bucket")]
1491    pub bucket: String,
1492
1493    #[serde(rename = "key")]
1494    pub key: String,
1495
1496    #[serde(
1497        rename = "content_type",
1498        default,
1499        skip_serializing_if = "Option::is_none"
1500    )]
1501    pub content_type: Option<String>,
1502
1503    #[serde(
1504        rename = "storage_class",
1505        default,
1506        skip_serializing_if = "Option::is_none"
1507    )]
1508    pub storage_class: Option<String>,
1509
1510    #[serde(rename = "metadata", default, skip_serializing_if = "Option::is_none")]
1511    pub metadata: Option<std::collections::BTreeMap<String, String>>,
1512
1513    #[serde(rename = "created_at")]
1514    pub created_at: String,
1515}
1516
1517pub type InitiateMultipartUploadResponse = MultipartUploadResponse;
1518
1519#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1520pub struct ListBucketsParameters {
1521    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1522    pub limit: Option<i64>,
1523
1524    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1525    pub marker: Option<String>,
1526
1527    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1528    pub name: Option<String>,
1529
1530    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1531    pub crn: Option<String>,
1532}
1533
1534pub type ListBucketsQuery = ListBucketsParameters;
1535
1536#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1537pub struct BucketListResponse {
1538    #[serde(rename = "buckets", default, skip_serializing_if = "Option::is_none")]
1539    pub buckets: Option<Vec<Bucket>>,
1540
1541    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
1542    pub meta: Option<PaginationMeta>,
1543}
1544
1545#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1546pub struct PaginationMeta {
1547    /// Total number of items
1548    #[serde(rename = "total", default, skip_serializing_if = "Option::is_none")]
1549    pub total: Option<i64>,
1550    /// Number of items per page
1551    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1552    pub limit: Option<i64>,
1553    /// Opaque cursor for the next page. Pass it back as the `marker` query parameter; treat it as a token, not a value to parse.
1554    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1555    pub marker: Option<String>,
1556    /// Whether there are more items
1557    #[serde(rename = "has_more", default, skip_serializing_if = "Option::is_none")]
1558    pub has_more: Option<bool>,
1559}
1560
1561pub type ListBucketsResponse = BucketListResponse;
1562
1563pub type ListBucketsItem = Bucket;
1564
1565#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1566pub struct ListMultipartUploadsParameters {
1567    #[serde(rename = "prefix", default, skip_serializing_if = "Option::is_none")]
1568    pub prefix: Option<String>,
1569
1570    #[serde(
1571        rename = "max_uploads",
1572        default,
1573        skip_serializing_if = "Option::is_none"
1574    )]
1575    pub max_uploads: Option<i64>,
1576}
1577
1578pub type ListMultipartUploadsQuery = ListMultipartUploadsParameters;
1579
1580#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1581pub struct ListMultipartUploadsResponse2 {
1582    #[serde(rename = "uploads")]
1583    pub uploads: Vec<MultipartUpload>,
1584}
1585
1586pub type ListMultipartUploadsResponse = ListMultipartUploadsResponse2;
1587
1588pub type ListMultipartUploadsItem = MultipartUpload;
1589
1590#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1591pub struct ListObjectVersionsParameters {
1592    #[serde(rename = "prefix", default, skip_serializing_if = "Option::is_none")]
1593    pub prefix: Option<String>,
1594
1595    #[serde(
1596        rename = "key_marker",
1597        default,
1598        skip_serializing_if = "Option::is_none"
1599    )]
1600    pub key_marker: Option<String>,
1601
1602    #[serde(
1603        rename = "version_id_marker",
1604        default,
1605        skip_serializing_if = "Option::is_none"
1606    )]
1607    pub version_id_marker: Option<String>,
1608
1609    #[serde(rename = "max_keys", default, skip_serializing_if = "Option::is_none")]
1610    pub max_keys: Option<i64>,
1611}
1612
1613pub type ListObjectVersionsQuery = ListObjectVersionsParameters;
1614
1615#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1616pub struct ListObjectVersionsResponse2 {
1617    #[serde(rename = "versions")]
1618    pub versions: Vec<ObjectVersion>,
1619
1620    #[serde(rename = "is_truncated")]
1621    pub is_truncated: bool,
1622
1623    #[serde(
1624        rename = "next_key_marker",
1625        default,
1626        skip_serializing_if = "Option::is_none"
1627    )]
1628    pub next_key_marker: Option<String>,
1629
1630    #[serde(
1631        rename = "next_version_id_marker",
1632        default,
1633        skip_serializing_if = "Option::is_none"
1634    )]
1635    pub next_version_id_marker: Option<String>,
1636}
1637
1638#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1639pub struct ObjectVersion {
1640    #[serde(rename = "key")]
1641    pub key: String,
1642
1643    #[serde(rename = "version_id")]
1644    pub version_id: String,
1645
1646    #[serde(rename = "size")]
1647    pub size: i64,
1648
1649    #[serde(rename = "etag")]
1650    pub etag: String,
1651
1652    #[serde(
1653        rename = "content_type",
1654        default,
1655        skip_serializing_if = "Option::is_none"
1656    )]
1657    pub content_type: Option<String>,
1658
1659    #[serde(
1660        rename = "storage_class",
1661        default,
1662        skip_serializing_if = "Option::is_none"
1663    )]
1664    pub storage_class: Option<String>,
1665
1666    #[serde(rename = "last_modified")]
1667    pub last_modified: String,
1668
1669    #[serde(rename = "is_latest")]
1670    pub is_latest: bool,
1671
1672    #[serde(rename = "is_delete_marker")]
1673    pub is_delete_marker: bool,
1674}
1675
1676pub type ListObjectVersionsResponse = ListObjectVersionsResponse2;
1677
1678pub type ListObjectVersionsItem = ObjectVersion;
1679
1680#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1681pub struct ListObjectsParameters {
1682    #[serde(rename = "prefix", default, skip_serializing_if = "Option::is_none")]
1683    pub prefix: Option<String>,
1684
1685    #[serde(rename = "delimiter", default, skip_serializing_if = "Option::is_none")]
1686    pub delimiter: Option<String>,
1687
1688    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1689    pub marker: Option<String>,
1690
1691    #[serde(rename = "max_keys", default, skip_serializing_if = "Option::is_none")]
1692    pub max_keys: Option<i64>,
1693}
1694
1695pub type ListObjectsQuery = ListObjectsParameters;
1696
1697#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1698pub struct ObjectListResponse {
1699    #[serde(rename = "objects", default, skip_serializing_if = "Option::is_none")]
1700    pub objects: Option<Vec<ObjectEntry>>,
1701
1702    #[serde(
1703        rename = "common_prefixes",
1704        default,
1705        skip_serializing_if = "Option::is_none"
1706    )]
1707    pub common_prefixes: Option<Vec<String>>,
1708
1709    #[serde(
1710        rename = "is_truncated",
1711        default,
1712        skip_serializing_if = "Option::is_none"
1713    )]
1714    pub is_truncated: Option<bool>,
1715
1716    #[serde(rename = "meta", default, skip_serializing_if = "Option::is_none")]
1717    pub meta: Option<PaginationMeta>,
1718}
1719
1720#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1721pub struct ObjectEntry {
1722    #[serde(rename = "key")]
1723    pub key: String,
1724
1725    #[serde(rename = "size")]
1726    pub size: i64,
1727
1728    #[serde(rename = "etag")]
1729    pub etag: String,
1730
1731    #[serde(
1732        rename = "content_type",
1733        default,
1734        skip_serializing_if = "Option::is_none"
1735    )]
1736    pub content_type: Option<String>,
1737
1738    #[serde(rename = "last_modified")]
1739    pub last_modified: String,
1740}
1741
1742pub type ListObjectsResponse = ObjectListResponse;
1743
1744#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1745pub struct ListPartsResponse2 {
1746    #[serde(rename = "upload")]
1747    pub upload: MultipartUpload,
1748
1749    #[serde(rename = "parts")]
1750    pub parts: Vec<MultipartPart>,
1751}
1752
1753#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1754pub struct MultipartPart {
1755    #[serde(rename = "part_number")]
1756    pub part_number: i64,
1757
1758    #[serde(rename = "size")]
1759    pub size: i64,
1760
1761    #[serde(rename = "etag")]
1762    pub etag: String,
1763}
1764
1765pub type ListPartsResponse = ListPartsResponse2;
1766
1767pub type ListPartsItem = MultipartPart;
1768
1769#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1770pub struct ListSnapshotPoliciesParameters {
1771    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1772    pub limit: Option<i64>,
1773
1774    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1775    pub marker: Option<String>,
1776
1777    #[serde(rename = "enabled", default, skip_serializing_if = "Option::is_none")]
1778    pub enabled: Option<bool>,
1779
1780    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1781    pub name: Option<String>,
1782
1783    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1784    pub crn: Option<String>,
1785}
1786
1787pub type ListSnapshotPoliciesQuery = ListSnapshotPoliciesParameters;
1788
1789#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1790pub struct SnapshotPolicyListResponse {
1791    #[serde(rename = "snapshot_policies")]
1792    pub snapshot_policies: Vec<SnapshotPolicy>,
1793
1794    #[serde(rename = "meta")]
1795    pub meta: PaginationMeta,
1796}
1797
1798pub type ListSnapshotPoliciesResponse = SnapshotPolicyListResponse;
1799
1800pub type ListSnapshotPoliciesItem = SnapshotPolicy;
1801
1802#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1803pub struct ListSnapshotsParameters {
1804    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1805    pub limit: Option<i64>,
1806
1807    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1808    pub marker: Option<String>,
1809
1810    #[serde(rename = "volume", default, skip_serializing_if = "Option::is_none")]
1811    pub volume: Option<String>,
1812
1813    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1814    pub name: Option<String>,
1815
1816    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
1817    pub status: Option<SnapshotStatusInput>,
1818
1819    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1820    pub crn: Option<String>,
1821
1822    #[serde(
1823        rename = "snapshot_policy",
1824        default,
1825        skip_serializing_if = "Option::is_none"
1826    )]
1827    pub snapshot_policy: Option<String>,
1828}
1829
1830pub type ListSnapshotsQuery = ListSnapshotsParameters;
1831
1832#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1833pub struct SnapshotListResponse {
1834    #[serde(rename = "snapshots")]
1835    pub snapshots: Vec<Snapshot>,
1836
1837    #[serde(rename = "meta")]
1838    pub meta: PaginationMeta,
1839}
1840
1841pub type ListSnapshotsResponse = SnapshotListResponse;
1842
1843pub type ListSnapshotsItem = Snapshot;
1844
1845#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1846pub struct ListVolumeTypesParameters {
1847    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1848    pub name: Option<String>,
1849
1850    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1851    pub crn: Option<String>,
1852}
1853
1854pub type ListVolumeTypesQuery = ListVolumeTypesParameters;
1855
1856#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1857pub struct VolumeTypeListResponse {
1858    #[serde(
1859        rename = "volume_types",
1860        default,
1861        skip_serializing_if = "Option::is_none"
1862    )]
1863    pub volume_types: Option<Vec<VolumeType>>,
1864}
1865
1866#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1867pub struct VolumeType {
1868    #[serde(
1869        rename = "included_iops",
1870        default,
1871        skip_serializing_if = "Option::is_none"
1872    )]
1873    pub included_iops: Option<i64>,
1874
1875    #[serde(
1876        rename = "included_throughput_mib_s",
1877        default,
1878        skip_serializing_if = "Option::is_none"
1879    )]
1880    pub included_throughput_mib_s: Option<i64>,
1881
1882    #[serde(rename = "max_iops", default, skip_serializing_if = "Option::is_none")]
1883    pub max_iops: Option<i64>,
1884
1885    #[serde(
1886        rename = "max_throughput_mib_s",
1887        default,
1888        skip_serializing_if = "Option::is_none"
1889    )]
1890    pub max_throughput_mib_s: Option<i64>,
1891    /// Regional platform catalog identity, using the immutable type token.
1892    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1893    pub crn: Option<String>,
1894    /// The type token (matches `volume_type` on a Volume).
1895    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
1896    pub id: Option<String>,
1897    /// Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
1898    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1899    pub name: Option<String>,
1900
1901    #[serde(
1902        rename = "description",
1903        default,
1904        skip_serializing_if = "Option::is_none"
1905    )]
1906    pub description: Option<String>,
1907}
1908
1909pub type ListVolumeTypesResponse = VolumeTypeListResponse;
1910
1911pub type ListVolumeTypesItem = VolumeType;
1912
1913#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
1914pub struct ListVolumesParameters {
1915    #[serde(rename = "limit", default, skip_serializing_if = "Option::is_none")]
1916    pub limit: Option<i64>,
1917
1918    #[serde(rename = "marker", default, skip_serializing_if = "Option::is_none")]
1919    pub marker: Option<String>,
1920
1921    #[serde(rename = "name", default, skip_serializing_if = "Option::is_none")]
1922    pub name: Option<String>,
1923
1924    #[serde(rename = "status", default, skip_serializing_if = "Option::is_none")]
1925    pub status: Option<VolumeStatusInput>,
1926
1927    #[serde(rename = "crn", default, skip_serializing_if = "Option::is_none")]
1928    pub crn: Option<String>,
1929}
1930
1931pub type ListVolumesQuery = ListVolumesParameters;
1932
1933#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1934pub struct VolumeListResponse {
1935    #[serde(rename = "volumes")]
1936    pub volumes: Vec<Volume>,
1937
1938    #[serde(rename = "meta")]
1939    pub meta: PaginationMeta,
1940}
1941
1942pub type ListVolumesResponse = VolumeListResponse;
1943
1944pub type ListVolumesItem = Volume;
1945
1946#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1947pub struct PutBucketCORSRequestInput {
1948    #[serde(rename = "cors_rules")]
1949    pub cors_rules: Vec<CORSRuleInput>,
1950}
1951impl PutBucketCORSRequestInput {
1952    /// Set the required fields; optional fields start omitted.
1953    #[allow(clippy::too_many_arguments)]
1954    pub fn new(cors_rules: Vec<CORSRuleInput>) -> Self {
1955        Self { cors_rules }
1956    }
1957}
1958
1959#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
1960pub struct CORSRuleInput {
1961    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
1962    pub id: Option<String>,
1963
1964    #[serde(rename = "allowed_origins")]
1965    pub allowed_origins: Vec<String>,
1966
1967    #[serde(rename = "allowed_methods")]
1968    pub allowed_methods: Vec<CORSRuleInputAllowedMethodsItem>,
1969
1970    #[serde(
1971        rename = "allowed_headers",
1972        default,
1973        skip_serializing_if = "Option::is_none"
1974    )]
1975    pub allowed_headers: Option<Vec<String>>,
1976
1977    #[serde(
1978        rename = "expose_headers",
1979        default,
1980        skip_serializing_if = "Option::is_none"
1981    )]
1982    pub expose_headers: Option<Vec<String>>,
1983
1984    #[serde(
1985        rename = "max_age_seconds",
1986        default,
1987        skip_serializing_if = "Option::is_none"
1988    )]
1989    pub max_age_seconds: Option<i64>,
1990}
1991impl CORSRuleInput {
1992    /// Set the required fields; optional fields start omitted.
1993    #[allow(clippy::too_many_arguments)]
1994    pub fn new(
1995        allowed_origins: Vec<String>,
1996        allowed_methods: Vec<CORSRuleInputAllowedMethodsItem>,
1997    ) -> Self {
1998        Self {
1999            id: None,
2000            allowed_origins,
2001            allowed_methods,
2002            allowed_headers: None,
2003            expose_headers: None,
2004            max_age_seconds: None,
2005        }
2006    }
2007}
2008
2009#[derive(Clone, Debug, PartialEq, Eq)]
2010pub enum CORSRuleInputAllowedMethodsItem {
2011    GET,
2012    PUT,
2013    POST,
2014    DELETE,
2015    HEAD,
2016    Unknown(String),
2017}
2018impl CORSRuleInputAllowedMethodsItem {
2019    pub fn as_str(&self) -> &str {
2020        match self {
2021            Self::GET => "GET",
2022            Self::PUT => "PUT",
2023            Self::POST => "POST",
2024            Self::DELETE => "DELETE",
2025            Self::HEAD => "HEAD",
2026            Self::Unknown(value) => value,
2027        }
2028    }
2029}
2030impl serde::Serialize for CORSRuleInputAllowedMethodsItem {
2031    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2032        serializer.serialize_str(self.as_str())
2033    }
2034}
2035impl<'de> serde::Deserialize<'de> for CORSRuleInputAllowedMethodsItem {
2036    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2037        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2038        Ok(match value.as_str() {
2039            "GET" => Self::GET,
2040            "PUT" => Self::PUT,
2041            "POST" => Self::POST,
2042            "DELETE" => Self::DELETE,
2043            "HEAD" => Self::HEAD,
2044            _ => Self::Unknown(value),
2045        })
2046    }
2047}
2048
2049pub type PutBucketCORSBody = PutBucketCORSRequestInput;
2050
2051#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2052pub struct PutBucketDeletionProtectionRequestInput {
2053    /// When true, DeleteBucket schedules deletion instead of removing immediately.
2054    #[serde(rename = "enabled")]
2055    pub enabled: bool,
2056    /// Whole days; omitted defaults to 7. Explicit values outside 1–30 return 400 even when disabling protection.
2057    #[serde(
2058        rename = "recovery_window_days",
2059        default,
2060        skip_serializing_if = "Option::is_none"
2061    )]
2062    pub recovery_window_days: Option<i64>,
2063}
2064impl PutBucketDeletionProtectionRequestInput {
2065    /// Set the required fields; optional fields start omitted.
2066    #[allow(clippy::too_many_arguments)]
2067    pub fn new(enabled: bool) -> Self {
2068        Self {
2069            enabled,
2070            recovery_window_days: None,
2071        }
2072    }
2073}
2074
2075pub type PutBucketDeletionProtectionBody = PutBucketDeletionProtectionRequestInput;
2076
2077#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2078pub struct PutBucketEncryptionRequestInput {
2079    #[serde(rename = "encryption_rules")]
2080    pub encryption_rules: Vec<EncryptionRuleInput>,
2081}
2082impl PutBucketEncryptionRequestInput {
2083    /// Set the required fields; optional fields start omitted.
2084    #[allow(clippy::too_many_arguments)]
2085    pub fn new(encryption_rules: Vec<EncryptionRuleInput>) -> Self {
2086        Self { encryption_rules }
2087    }
2088}
2089
2090#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2091pub struct EncryptionRuleInput {
2092    #[serde(rename = "default", default, skip_serializing_if = "Option::is_none")]
2093    pub default: Option<EncryptionRuleInputDefault>,
2094
2095    #[serde(
2096        rename = "bucket_key_enabled",
2097        default,
2098        skip_serializing_if = "Option::is_none"
2099    )]
2100    pub bucket_key_enabled: Option<bool>,
2101}
2102
2103#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2104pub struct EncryptionRuleInputDefault {
2105    #[serde(rename = "sse_algorithm")]
2106    pub sse_algorithm: String,
2107    /// Accepted but unused S3 placeholder. Only AES256 is supported; this is not a KMS resource reference.
2108    #[serde(
2109        rename = "kms_master_key_id",
2110        default,
2111        skip_serializing_if = "Option::is_none"
2112    )]
2113    pub kms_master_key_id: Option<String>,
2114}
2115impl EncryptionRuleInputDefault {
2116    /// Set the required fields; optional fields start omitted.
2117    #[allow(clippy::too_many_arguments)]
2118    pub fn new(sse_algorithm: String) -> Self {
2119        Self {
2120            sse_algorithm,
2121            kms_master_key_id: None,
2122        }
2123    }
2124}
2125
2126pub type PutBucketEncryptionBody = PutBucketEncryptionRequestInput;
2127
2128#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2129pub struct PutBucketLifecycleRequestInput {
2130    #[serde(rename = "lifecycle_rules")]
2131    pub lifecycle_rules: Vec<LifecycleRuleInput>,
2132}
2133impl PutBucketLifecycleRequestInput {
2134    /// Set the required fields; optional fields start omitted.
2135    #[allow(clippy::too_many_arguments)]
2136    pub fn new(lifecycle_rules: Vec<LifecycleRuleInput>) -> Self {
2137        Self { lifecycle_rules }
2138    }
2139}
2140
2141#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2142pub struct LifecycleRuleInput {
2143    #[serde(rename = "id", default, skip_serializing_if = "Option::is_none")]
2144    pub id: Option<String>,
2145    /// `disabled` keeps the rule in the configuration but skips it during evaluation. The S3-compatible endpoint spells the same states `Enabled` / `Disabled` in its XML.
2146    #[serde(rename = "status")]
2147    pub status: LifecycleRuleInputStatus,
2148
2149    #[serde(rename = "filter", default, skip_serializing_if = "Option::is_none")]
2150    pub filter: Option<LifecycleRuleInputFilter>,
2151    /// Move matching objects to another storage class once they are old enough. The object keeps its identity — same key, same version id, same last-modified — and only its bytes move between pools, so pairing a transition with an expiration works: the expiry clock is not restarted by the move. Exactly one of `days` or `date`. When the rule also has an `expiration`, the transition must come strictly first, otherwise the object would be deleted before it ever moved and the rule is rejected. Only one transition per rule: the platform serves two classes, so a second has nowhere to go. The S3-compatible endpoint accepts a single-element `<Transition>` list and rejects longer ones rather than silently applying the first.
2152    #[serde(
2153        rename = "transition",
2154        default,
2155        skip_serializing_if = "Option::is_none"
2156    )]
2157    pub transition: Option<LifecycleRuleInputTransition>,
2158
2159    #[serde(
2160        rename = "expiration",
2161        default,
2162        skip_serializing_if = "Option::is_none"
2163    )]
2164    pub expiration: Option<LifecycleRuleInputExpiration>,
2165
2166    #[serde(
2167        rename = "noncurrent_version_expiration",
2168        default,
2169        skip_serializing_if = "Option::is_none"
2170    )]
2171    pub noncurrent_version_expiration: Option<LifecycleRuleInputNoncurrentVersionExpiration>,
2172
2173    #[serde(
2174        rename = "abort_incomplete_multipart_upload",
2175        default,
2176        skip_serializing_if = "Option::is_none"
2177    )]
2178    pub abort_incomplete_multipart_upload: Option<LifecycleRuleInputAbortIncompleteMultipartUpload>,
2179}
2180impl LifecycleRuleInput {
2181    /// Set the required fields; optional fields start omitted.
2182    #[allow(clippy::too_many_arguments)]
2183    pub fn new(status: LifecycleRuleInputStatus) -> Self {
2184        Self {
2185            id: None,
2186            status,
2187            filter: None,
2188            transition: None,
2189            expiration: None,
2190            noncurrent_version_expiration: None,
2191            abort_incomplete_multipart_upload: None,
2192        }
2193    }
2194}
2195
2196#[derive(Clone, Debug, PartialEq, Eq)]
2197pub enum LifecycleRuleInputStatus {
2198    Enabled,
2199    Disabled,
2200    Unknown(String),
2201}
2202impl LifecycleRuleInputStatus {
2203    pub fn as_str(&self) -> &str {
2204        match self {
2205            Self::Enabled => "enabled",
2206            Self::Disabled => "disabled",
2207            Self::Unknown(value) => value,
2208        }
2209    }
2210}
2211impl serde::Serialize for LifecycleRuleInputStatus {
2212    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2213        serializer.serialize_str(self.as_str())
2214    }
2215}
2216impl<'de> serde::Deserialize<'de> for LifecycleRuleInputStatus {
2217    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2218        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2219        Ok(match value.as_str() {
2220            "enabled" => Self::Enabled,
2221            "disabled" => Self::Disabled,
2222            _ => Self::Unknown(value),
2223        })
2224    }
2225}
2226
2227#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2228pub struct LifecycleRuleInputFilter {
2229    #[serde(rename = "prefix", default, skip_serializing_if = "Option::is_none")]
2230    pub prefix: Option<String>,
2231}
2232
2233#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2234pub struct LifecycleRuleInputTransition {
2235    /// Days after the object's last-modified time.
2236    #[serde(rename = "days", default, skip_serializing_if = "Option::is_none")]
2237    pub days: Option<i64>,
2238    /// Absolute cut-off; fires on the next sweep after this instant.
2239    #[serde(rename = "date", default, skip_serializing_if = "Option::is_none")]
2240    pub date: Option<String>,
2241    /// Destination class. Keeps the S3 standard's casing rather than the platform's lowercase convention, because the class vocabulary is S3's. Unsupported values are rejected — a transition to a class that does not exist would silently never run.
2242    #[serde(rename = "storage_class")]
2243    pub storage_class: LifecycleRuleInputTransitionStorageClass,
2244}
2245impl LifecycleRuleInputTransition {
2246    /// Set the required fields; optional fields start omitted.
2247    #[allow(clippy::too_many_arguments)]
2248    pub fn new(storage_class: LifecycleRuleInputTransitionStorageClass) -> Self {
2249        Self {
2250            days: None,
2251            date: None,
2252            storage_class,
2253        }
2254    }
2255}
2256
2257#[derive(Clone, Debug, PartialEq, Eq)]
2258pub enum LifecycleRuleInputTransitionStorageClass {
2259    STANDARD,
2260    COLD,
2261    Unknown(String),
2262}
2263impl LifecycleRuleInputTransitionStorageClass {
2264    pub fn as_str(&self) -> &str {
2265        match self {
2266            Self::STANDARD => "STANDARD",
2267            Self::COLD => "COLD",
2268            Self::Unknown(value) => value,
2269        }
2270    }
2271}
2272impl serde::Serialize for LifecycleRuleInputTransitionStorageClass {
2273    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2274        serializer.serialize_str(self.as_str())
2275    }
2276}
2277impl<'de> serde::Deserialize<'de> for LifecycleRuleInputTransitionStorageClass {
2278    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2279        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2280        Ok(match value.as_str() {
2281            "STANDARD" => Self::STANDARD,
2282            "COLD" => Self::COLD,
2283            _ => Self::Unknown(value),
2284        })
2285    }
2286}
2287
2288#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2289pub struct LifecycleRuleInputExpiration {
2290    #[serde(rename = "days", default, skip_serializing_if = "Option::is_none")]
2291    pub days: Option<i64>,
2292
2293    #[serde(rename = "date", default, skip_serializing_if = "Option::is_none")]
2294    pub date: Option<String>,
2295}
2296
2297#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2298pub struct LifecycleRuleInputNoncurrentVersionExpiration {
2299    #[serde(
2300        rename = "noncurrent_days",
2301        default,
2302        skip_serializing_if = "Option::is_none"
2303    )]
2304    pub noncurrent_days: Option<i64>,
2305
2306    #[serde(
2307        rename = "newer_noncurrent_versions",
2308        default,
2309        skip_serializing_if = "Option::is_none"
2310    )]
2311    pub newer_noncurrent_versions: Option<i64>,
2312}
2313
2314#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2315pub struct LifecycleRuleInputAbortIncompleteMultipartUpload {
2316    #[serde(
2317        rename = "days_after_initiation",
2318        default,
2319        skip_serializing_if = "Option::is_none"
2320    )]
2321    pub days_after_initiation: Option<i64>,
2322}
2323
2324pub type PutBucketLifecycleBody = PutBucketLifecycleRequestInput;
2325
2326pub type PutBucketObjectLockRequestInput = ObjectLockConfigInput;
2327
2328#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2329pub struct ObjectLockConfigInput {
2330    #[serde(
2331        rename = "object_lock_enabled",
2332        default,
2333        skip_serializing_if = "Option::is_none"
2334    )]
2335    pub object_lock_enabled: Option<String>,
2336
2337    #[serde(
2338        rename = "object_lock_rule",
2339        default,
2340        skip_serializing_if = "Option::is_none"
2341    )]
2342    pub object_lock_rule: Option<ObjectLockConfigInputObjectLockRule>,
2343}
2344
2345#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2346pub struct ObjectLockConfigInputObjectLockRule {
2347    #[serde(
2348        rename = "default_retention",
2349        default,
2350        skip_serializing_if = "Option::is_none"
2351    )]
2352    pub default_retention: Option<ObjectLockConfigInputObjectLockRuleDefaultRetention>,
2353}
2354
2355#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2356pub struct ObjectLockConfigInputObjectLockRuleDefaultRetention {
2357    #[serde(rename = "mode", default, skip_serializing_if = "Option::is_none")]
2358    pub mode: Option<ObjectLockConfigInputObjectLockRuleDefaultRetentionMode>,
2359
2360    #[serde(rename = "days", default, skip_serializing_if = "Option::is_none")]
2361    pub days: Option<i64>,
2362
2363    #[serde(rename = "years", default, skip_serializing_if = "Option::is_none")]
2364    pub years: Option<i64>,
2365}
2366
2367#[derive(Clone, Debug, PartialEq, Eq)]
2368pub enum ObjectLockConfigInputObjectLockRuleDefaultRetentionMode {
2369    GOVERNANCE,
2370    COMPLIANCE,
2371    Unknown(String),
2372}
2373impl ObjectLockConfigInputObjectLockRuleDefaultRetentionMode {
2374    pub fn as_str(&self) -> &str {
2375        match self {
2376            Self::GOVERNANCE => "GOVERNANCE",
2377            Self::COMPLIANCE => "COMPLIANCE",
2378            Self::Unknown(value) => value,
2379        }
2380    }
2381}
2382impl serde::Serialize for ObjectLockConfigInputObjectLockRuleDefaultRetentionMode {
2383    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2384        serializer.serialize_str(self.as_str())
2385    }
2386}
2387impl<'de> serde::Deserialize<'de> for ObjectLockConfigInputObjectLockRuleDefaultRetentionMode {
2388    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2389        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2390        Ok(match value.as_str() {
2391            "GOVERNANCE" => Self::GOVERNANCE,
2392            "COMPLIANCE" => Self::COMPLIANCE,
2393            _ => Self::Unknown(value),
2394        })
2395    }
2396}
2397
2398pub type PutBucketObjectLockBody = PutBucketObjectLockRequestInput;
2399
2400#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2401pub struct PutBucketPolicyRequestInput {
2402    #[serde(rename = "document")]
2403    pub document: BucketPolicyInput,
2404}
2405impl PutBucketPolicyRequestInput {
2406    /// Set the required fields; optional fields start omitted.
2407    #[allow(clippy::too_many_arguments)]
2408    pub fn new(document: BucketPolicyInput) -> Self {
2409        Self { document }
2410    }
2411}
2412
2413pub type BucketPolicyInput = std::collections::BTreeMap<String, serde_json::Value>;
2414
2415pub type PutBucketPolicyBody = PutBucketPolicyRequestInput;
2416
2417#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2418pub struct PutBucketTaggingRequestInput {
2419    #[serde(rename = "tags")]
2420    pub tags: TagSetInput,
2421}
2422impl PutBucketTaggingRequestInput {
2423    /// Set the required fields; optional fields start omitted.
2424    #[allow(clippy::too_many_arguments)]
2425    pub fn new(tags: TagSetInput) -> Self {
2426        Self { tags }
2427    }
2428}
2429
2430pub type TagSetInput = std::collections::BTreeMap<String, String>;
2431
2432pub type PutBucketTaggingBody = PutBucketTaggingRequestInput;
2433
2434#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2435pub struct PutBucketVersioningRequestInput {
2436    #[serde(rename = "status")]
2437    pub status: PutBucketVersioningRequestInputStatus,
2438}
2439impl PutBucketVersioningRequestInput {
2440    /// Set the required fields; optional fields start omitted.
2441    #[allow(clippy::too_many_arguments)]
2442    pub fn new(status: PutBucketVersioningRequestInputStatus) -> Self {
2443        Self { status }
2444    }
2445}
2446
2447#[derive(Clone, Debug, PartialEq, Eq)]
2448pub enum PutBucketVersioningRequestInputStatus {
2449    Enabled,
2450    Suspended,
2451    Unknown(String),
2452}
2453impl PutBucketVersioningRequestInputStatus {
2454    pub fn as_str(&self) -> &str {
2455        match self {
2456            Self::Enabled => "enabled",
2457            Self::Suspended => "suspended",
2458            Self::Unknown(value) => value,
2459        }
2460    }
2461}
2462impl serde::Serialize for PutBucketVersioningRequestInputStatus {
2463    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
2464        serializer.serialize_str(self.as_str())
2465    }
2466}
2467impl<'de> serde::Deserialize<'de> for PutBucketVersioningRequestInputStatus {
2468    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
2469        let value = <String as serde::Deserialize>::deserialize(deserializer)?;
2470        Ok(match value.as_str() {
2471            "enabled" => Self::Enabled,
2472            "suspended" => Self::Suspended,
2473            _ => Self::Unknown(value),
2474        })
2475    }
2476}
2477
2478pub type PutBucketVersioningBody = PutBucketVersioningRequestInput;
2479
2480#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2481pub struct PutObjectResponse2 {
2482    #[serde(rename = "key")]
2483    pub key: String,
2484
2485    #[serde(rename = "etag")]
2486    pub etag: String,
2487
2488    #[serde(rename = "size")]
2489    pub size: i64,
2490}
2491
2492#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2493#[serde(untagged)]
2494pub enum PutObjectResult {
2495    Variant1(Box<PutObjectResponse2>),
2496    Variant2(Box<std::collections::BTreeMap<String, serde_json::Value>>),
2497}
2498
2499pub type PutObjectResponse = PutObjectResult;
2500
2501#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2502pub struct SnapshotUpdateRequestInput {
2503    #[serde(
2504        rename = "description",
2505        default,
2506        skip_serializing_if = "Option::is_none"
2507    )]
2508    pub description: Option<String>,
2509
2510    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
2511    pub tags: Option<TagsInput>,
2512}
2513
2514pub type UpdateSnapshotBody = SnapshotUpdateRequestInput;
2515
2516pub type UpdateSnapshotResponse = SnapshotResponse;
2517
2518#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2519pub struct SnapshotPolicyUpdateRequestInput {
2520    #[serde(
2521        rename = "description",
2522        default,
2523        skip_serializing_if = "Option::is_none"
2524    )]
2525    pub description: Option<String>,
2526    /// false pauses the policy, true resumes it. Pausing stops the whole policy — no snapshots are taken and none are deleted, so a paused schedule cannot lose you history. Resuming applies the retention window again on the next run, so anything sitting outside it by then — because you lowered `retention_count` while paused, say — is reaped on that run.
2527    #[serde(rename = "enabled", default, skip_serializing_if = "Option::is_none")]
2528    pub enabled: Option<bool>,
2529
2530    #[serde(
2531        rename = "interval_minutes",
2532        default,
2533        skip_serializing_if = "Option::is_none"
2534    )]
2535    pub interval_minutes: Option<SnapshotIntervalMinutesInput>,
2536
2537    #[serde(
2538        rename = "retention_count",
2539        default,
2540        skip_serializing_if = "Option::is_none"
2541    )]
2542    pub retention_count: Option<SnapshotRetentionCountInput>,
2543
2544    #[serde(
2545        rename = "retention_days",
2546        default,
2547        skip_serializing_if = "Option::is_none"
2548    )]
2549    pub retention_days: Option<SnapshotRetentionDaysInput>,
2550
2551    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
2552    pub tags: Option<TagsInput>,
2553}
2554
2555pub type UpdateSnapshotPolicyBody = SnapshotPolicyUpdateRequestInput;
2556
2557pub type UpdateSnapshotPolicyResponse = SnapshotPolicyResponse;
2558
2559#[derive(Clone, Debug, serde::Serialize, serde::Deserialize, Default)]
2560pub struct VolumeUpdateRequestInput {
2561    #[serde(
2562        rename = "description",
2563        default,
2564        skip_serializing_if = "Option::is_none"
2565    )]
2566    pub description: Option<String>,
2567
2568    #[serde(rename = "tags", default, skip_serializing_if = "Option::is_none")]
2569    pub tags: Option<TagsInput>,
2570}
2571
2572pub type UpdateVolumeBody = VolumeUpdateRequestInput;
2573
2574pub type UpdateVolumeResponse = VolumeResponse;
2575
2576pub type UpdateVolumePerformanceBody = VolumePerformanceRequestInput;
2577
2578pub type UpdateVolumePerformanceResponse = VolumeResponse;
2579
2580#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)]
2581pub struct UploadPartResponse2 {
2582    #[serde(rename = "part_number")]
2583    pub part_number: i64,
2584
2585    #[serde(rename = "etag")]
2586    pub etag: String,
2587
2588    #[serde(rename = "size")]
2589    pub size: i64,
2590}
2591
2592pub type UploadPartResponse = UploadPartResponse2;