Skip to main content

unikraft_cloud_platform/
lib.rs

1#[allow(unused_imports)]
2use progenitor_client::{encode_path, RequestBuilderExt};
3#[allow(unused_imports)]
4pub use progenitor_client::{ByteStream, Error, ResponseValue};
5/// Types used as operation parameters and responses.
6#[allow(clippy::all)]
7pub mod types {
8    /// Error types.
9    pub mod error {
10        /// Error from a `TryFrom` or `FromStr` implementation.
11        pub struct ConversionError(::std::borrow::Cow<'static, str>);
12        impl ::std::error::Error for ConversionError {}
13        impl ::std::fmt::Display for ConversionError {
14            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
15                ::std::fmt::Display::fmt(&self.0, f)
16            }
17        }
18
19        impl ::std::fmt::Debug for ConversionError {
20            fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
21                ::std::fmt::Debug::fmt(&self.0, f)
22            }
23        }
24
25        impl From<&'static str> for ConversionError {
26            fn from(value: &'static str) -> Self {
27                Self(value.into())
28            }
29        }
30
31        impl From<String> for ConversionError {
32            fn from(value: String) -> Self {
33                Self(value.into())
34            }
35        }
36    }
37
38    ///`AttachVolumeByUuidRequestBody`
39    ///
40    /// <details><summary>JSON schema</summary>
41    ///
42    /// ```json
43    ///{
44    ///  "type": "object",
45    ///  "allOf": [
46    ///    {
47    ///      "type": "object",
48    ///      "properties": {
49    ///        "at": {
50    ///          "description": "Path of the mountpoint.\n\nThe path must be
51    /// absolute, not contain `.` and `..` components, and not\ncontain colons
52    /// (`:`). The path must point to an empty directory. If the\ndirectory does
53    /// not exist, it is created.",
54    ///          "examples": [
55    ///            "/mnt/my-volume"
56    ///          ],
57    ///          "type": "string",
58    ///          "format": "regex",
59    ///          "pattern": "^/(?!.*\\.\\./|.*\\.$|.*/\\.$)[^:]*$"
60    ///        },
61    ///        "attach_to": {
62    ///          "description": "UUID or name of the instance to attach the
63    /// volume to.",
64    ///          "allOf": [
65    ///            {
66    ///              "$ref": "#/components/schemas/BodyInstanceID"
67    ///            }
68    ///          ]
69    ///        }
70    ///      }
71    ///    },
72    ///    {
73    ///      "oneOf": [
74    ///        {
75    ///          "title": "readonly",
76    ///          "type": "object",
77    ///          "properties": {
78    ///            "readonly": {
79    ///              "description": "Whether the volume should be mounted
80    /// read-only.",
81    ///              "examples": [
82    ///                false
83    ///              ],
84    ///              "type": "boolean"
85    ///            }
86    ///          }
87    ///        }
88    ///      ]
89    ///    }
90    ///  ],
91    ///  "required": [
92    ///    "at",
93    ///    "attach_to"
94    ///  ]
95    ///}
96    /// ```
97    /// </details>
98    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
99    pub struct AttachVolumeByUuidRequestBody {
100        ///Path of the mountpoint.
101        ///
102        ///The path must be absolute, not contain `.` and `..` components, and
103        /// not contain colons (`:`). The path must point to an empty
104        /// directory. If the directory does not exist, it is created.
105        pub at: ::std::string::String,
106        ///UUID or name of the instance to attach the volume to.
107        pub attach_to: BodyInstanceId,
108        ///Whether the volume should be mounted read-only.
109        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
110        pub readonly: ::std::option::Option<bool>,
111    }
112
113    impl ::std::convert::From<&AttachVolumeByUuidRequestBody> for AttachVolumeByUuidRequestBody {
114        fn from(value: &AttachVolumeByUuidRequestBody) -> Self {
115            value.clone()
116        }
117    }
118
119    ///The request message for attaching one or more volume(s) to instances by
120    ///their UUID(s) or name(s).
121    ///
122    /// <details><summary>JSON schema</summary>
123    ///
124    /// ```json
125    ///{
126    ///  "description": "The request message for attaching one or more volume(s)
127    /// to instances by\ntheir UUID(s) or name(s).",
128    ///  "type": "object",
129    ///  "required": [
130    ///    "at",
131    ///    "attach_to"
132    ///  ],
133    ///  "properties": {
134    ///    "at": {
135    ///      "description": "Path of the mountpoint.\n\nThe path must be
136    /// absolute, not contain `.` and `..` components, and not\ncontain colons
137    /// (`:`). The path must point to an empty directory. If the\ndirectory does
138    /// not exist, it is created.",
139    ///      "examples": [
140    ///        "/mnt/my-volume"
141    ///      ],
142    ///      "type": "string",
143    ///      "format": "regex",
144    ///      "pattern": "^/(?!.*\\.\\./|.*\\.$|.*/\\.$)[^:]*$"
145    ///    },
146    ///    "attach_to": {
147    ///      "description": "UUID or name of the instance to attach the volume
148    /// to.",
149    ///      "allOf": [
150    ///        {
151    ///          "$ref": "#/components/schemas/AttachVolumesRequestInstanceID"
152    ///        }
153    ///      ]
154    ///    },
155    ///    "name": {
156    ///      "description": "The name of the volume to attach. Mutually exclusive with UUID.\nExactly one of uuid or name must be provided.",
157    ///      "examples": [
158    ///        "funky-vol-g7gum5cj"
159    ///      ],
160    ///      "type": "string"
161    ///    },
162    ///    "readonly": {
163    ///      "description": "Whether the volume should be mounted read-only.",
164    ///      "examples": [
165    ///        false
166    ///      ],
167    ///      "type": "boolean"
168    ///    },
169    ///    "uuid": {
170    ///      "description": "The UUID of the volume to attach. Mutually exclusive with name.\nExactly one of uuid or name must be provided.",
171    ///      "examples": [
172    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
173    ///      ],
174    ///      "type": "string",
175    ///      "format": "uuid"
176    ///    }
177    ///  }
178    ///}
179    /// ```
180    /// </details>
181    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
182    pub struct AttachVolumesRequest {
183        ///Path of the mountpoint.
184        ///
185        ///The path must be absolute, not contain `.` and `..` components, and
186        /// not contain colons (`:`). The path must point to an empty
187        /// directory. If the directory does not exist, it is created.
188        pub at: ::std::string::String,
189        ///UUID or name of the instance to attach the volume to.
190        pub attach_to: AttachVolumesRequestInstanceId,
191        ///The name of the volume to attach. Mutually exclusive with UUID.
192        ///Exactly one of uuid or name must be provided.
193        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
194        pub name: ::std::option::Option<::std::string::String>,
195        ///Whether the volume should be mounted read-only.
196        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
197        pub readonly: ::std::option::Option<bool>,
198        ///The UUID of the volume to attach. Mutually exclusive with name.
199        ///Exactly one of uuid or name must be provided.
200        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
201        pub uuid: ::std::option::Option<::uuid::Uuid>,
202    }
203
204    impl ::std::convert::From<&AttachVolumesRequest> for AttachVolumesRequest {
205        fn from(value: &AttachVolumesRequest) -> Self {
206            value.clone()
207        }
208    }
209
210    ///Reference to the instance to attach the volume to.
211    ///
212    /// <details><summary>JSON schema</summary>
213    ///
214    /// ```json
215    ///{
216    ///  "description": "Reference to the instance to attach the volume to.",
217    ///  "type": "object",
218    ///  "allOf": [
219    ///    {
220    ///      "type": "object",
221    ///      "properties": {
222    ///        "uuid": {
223    ///          "description": "The UUID of the instance that the volume is
224    /// attached to.",
225    ///          "examples": [
226    ///            "c1d2e3f4-5678-90ab-cdef-1234567890ab"
227    ///          ],
228    ///          "type": "string",
229    ///          "format": "uuid"
230    ///        }
231    ///      }
232    ///    },
233    ///    {
234    ///      "oneOf": [
235    ///        {
236    ///          "title": "name",
237    ///          "type": "object",
238    ///          "properties": {
239    ///            "name": {
240    ///              "description": "The name of the instance that the volume is
241    /// attached to.",
242    ///              "examples": [
243    ///                "funky-town-g7gum5cj"
244    ///              ],
245    ///              "type": "string"
246    ///            }
247    ///          }
248    ///        }
249    ///      ]
250    ///    }
251    ///  ]
252    ///}
253    /// ```
254    /// </details>
255    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
256    pub struct AttachVolumesRequestInstanceId {
257        ///The name of the instance that the volume is attached to.
258        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
259        pub name: ::std::option::Option<::std::string::String>,
260        ///The UUID of the instance that the volume is attached to.
261        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
262        pub uuid: ::std::option::Option<::uuid::Uuid>,
263    }
264
265    impl ::std::convert::From<&AttachVolumesRequestInstanceId> for AttachVolumesRequestInstanceId {
266        fn from(value: &AttachVolumesRequestInstanceId) -> Self {
267            value.clone()
268        }
269    }
270
271    impl ::std::default::Default for AttachVolumesRequestInstanceId {
272        fn default() -> Self {
273            Self {
274                name: Default::default(),
275                uuid: Default::default(),
276            }
277        }
278    }
279
280    ///The response message for attaching one or more volume(s) given their
281    ///UUID(s) or name(s).
282    ///
283    /// <details><summary>JSON schema</summary>
284    ///
285    /// ```json
286    ///{
287    ///  "description": "The response message for attaching one or more
288    /// volume(s) given their\nUUID(s) or name(s).",
289    ///  "type": "object",
290    ///  "allOf": [
291    ///    {
292    ///      "type": "object",
293    ///      "properties": {
294    ///        "data": {
295    ///          "description": "The response data for this request.",
296    ///          "allOf": [
297    ///            {
298    ///              "$ref": "#/components/schemas/AttachVolumesResponseData"
299    ///            }
300    ///          ]
301    ///        },
302    ///        "errors": {
303    ///          "description": "A list of errors which may have occurred during
304    /// the request.",
305    ///          "type": "array",
306    ///          "items": {
307    ///            "$ref": "#/components/schemas/ResponseError"
308    ///          }
309    ///        },
310    ///        "op_time_us": {
311    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
312    ///          "examples": [
313    ///            46
314    ///          ],
315    ///          "type": "integer",
316    ///          "format": "uint64"
317    ///        },
318    ///        "status": {
319    ///          "description": "The status of the response.",
320    ///          "allOf": [
321    ///            {
322    ///              "$ref": "#/components/schemas/ResponseStatus"
323    ///            }
324    ///          ]
325    ///        }
326    ///      }
327    ///    },
328    ///    {
329    ///      "oneOf": [
330    ///        {
331    ///          "title": "message",
332    ///          "type": "object",
333    ///          "properties": {
334    ///            "message": {
335    ///              "description": "An optional message providing additional
336    /// information about the status.\nThis field is useful when the status is
337    /// not `success`.",
338    ///              "examples": [
339    ///                "Failed to perform all operations"
340    ///              ],
341    ///              "type": "string"
342    ///            }
343    ///          }
344    ///        }
345    ///      ]
346    ///    }
347    ///  ]
348    ///}
349    /// ```
350    /// </details>
351    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
352    pub struct AttachVolumesResponse {
353        ///The response data for this request.
354        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
355        pub data: ::std::option::Option<AttachVolumesResponseData>,
356        ///A list of errors which may have occurred during the request.
357        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
358        pub errors: ::std::vec::Vec<ResponseError>,
359        ///An optional message providing additional information about the
360        /// status. This field is useful when the status is not
361        /// `success`.
362        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
363        pub message: ::std::option::Option<::std::string::String>,
364        ///The operation time in microseconds.  This is the time it took to
365        /// process the request and generate the response.
366        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
367        pub op_time_us: ::std::option::Option<u64>,
368        ///The status of the response.
369        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
370        pub status: ::std::option::Option<ResponseStatus>,
371    }
372
373    impl ::std::convert::From<&AttachVolumesResponse> for AttachVolumesResponse {
374        fn from(value: &AttachVolumesResponse) -> Self {
375            value.clone()
376        }
377    }
378
379    impl ::std::default::Default for AttachVolumesResponse {
380        fn default() -> Self {
381            Self {
382                data: Default::default(),
383                errors: Default::default(),
384                message: Default::default(),
385                op_time_us: Default::default(),
386                status: Default::default(),
387            }
388        }
389    }
390
391    ///`AttachVolumesResponseAttachedVolume`
392    ///
393    /// <details><summary>JSON schema</summary>
394    ///
395    /// ```json
396    ///{
397    ///  "type": "object",
398    ///  "properties": {
399    ///    "error": {
400    ///      "description": "An optional error code providing additional
401    /// information about the status.\nThis field is useful when the status is
402    /// not `success`.",
403    ///      "examples": [
404    ///        8
405    ///      ],
406    ///      "type": "integer",
407    ///      "format": "int32"
408    ///    },
409    ///    "message": {
410    ///      "description": "An optional message providing additional
411    /// information about the status.\nThis field is useful when the status is
412    /// not `success`.",
413    ///      "examples": [
414    ///        "No volume with name 'funky-town-g756b5d'"
415    ///      ],
416    ///      "type": "string"
417    ///    },
418    ///    "name": {
419    ///      "description": "The name of the volume that was attached.",
420    ///      "examples": [
421    ///        "funky-vol-g7gum5cj"
422    ///      ],
423    ///      "type": "string"
424    ///    },
425    ///    "status": {
426    ///      "description": "The status of the response.",
427    ///      "allOf": [
428    ///        {
429    ///          "$ref": "#/components/schemas/ResponseStatus"
430    ///        }
431    ///      ]
432    ///    },
433    ///    "uuid": {
434    ///      "description": "The UUID of the volume that was attached.",
435    ///      "examples": [
436    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
437    ///      ],
438    ///      "type": "string",
439    ///      "format": "uuid"
440    ///    }
441    ///  }
442    ///}
443    /// ```
444    /// </details>
445    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
446    pub struct AttachVolumesResponseAttachedVolume {
447        ///An optional error code providing additional information about the
448        /// status. This field is useful when the status is not
449        /// `success`.
450        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
451        pub error: ::std::option::Option<i32>,
452        ///An optional message providing additional information about the
453        /// status. This field is useful when the status is not
454        /// `success`.
455        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
456        pub message: ::std::option::Option<::std::string::String>,
457        ///The name of the volume that was attached.
458        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
459        pub name: ::std::option::Option<::std::string::String>,
460        ///The status of the response.
461        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
462        pub status: ::std::option::Option<ResponseStatus>,
463        ///The UUID of the volume that was attached.
464        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
465        pub uuid: ::std::option::Option<::uuid::Uuid>,
466    }
467
468    impl ::std::convert::From<&AttachVolumesResponseAttachedVolume>
469        for AttachVolumesResponseAttachedVolume
470    {
471        fn from(value: &AttachVolumesResponseAttachedVolume) -> Self {
472            value.clone()
473        }
474    }
475
476    impl ::std::default::Default for AttachVolumesResponseAttachedVolume {
477        fn default() -> Self {
478            Self {
479                error: Default::default(),
480                message: Default::default(),
481                name: Default::default(),
482                status: Default::default(),
483                uuid: Default::default(),
484            }
485        }
486    }
487
488    ///`AttachVolumesResponseData`
489    ///
490    /// <details><summary>JSON schema</summary>
491    ///
492    /// ```json
493    ///{
494    ///  "type": "object",
495    ///  "properties": {
496    ///    "volumes": {
497    ///      "description": "The volume(s) which were attached by the request.",
498    ///      "type": "array",
499    ///      "items": {
500    ///        "$ref":
501    /// "#/components/schemas/AttachVolumesResponseAttachedVolume"
502    ///      }
503    ///    }
504    ///  }
505    ///}
506    /// ```
507    /// </details>
508    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
509    pub struct AttachVolumesResponseData {
510        ///The volume(s) which were attached by the request.
511        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
512        pub volumes: ::std::vec::Vec<AttachVolumesResponseAttachedVolume>,
513    }
514
515    impl ::std::convert::From<&AttachVolumesResponseData> for AttachVolumesResponseData {
516        fn from(value: &AttachVolumesResponseData) -> Self {
517            value.clone()
518        }
519    }
520
521    impl ::std::default::Default for AttachVolumesResponseData {
522        fn default() -> Self {
523            Self {
524                volumes: Default::default(),
525            }
526        }
527    }
528
529    ///AutoscalePolicy defines the autoscale policy for a service.
530    ///Right now it contains fields from both the `ondemand` and `step`
531    /// policies. They are marked both as optional, so only one of them
532    /// should be set at a time. This is a current limitation of the API
533    /// design.
534    ///
535    /// <details><summary>JSON schema</summary>
536    ///
537    /// ```json
538    ///{
539    ///  "description": "AutoscalePolicy defines the autoscale policy for a
540    /// service.\nRight now it contains fields from both the `ondemand` and
541    /// `step` policies.\nThey are marked both as optional, so only one of them
542    /// should be set at a\ntime. This is a current limitation of the API
543    /// design.",
544    ///  "type": "object",
545    ///  "properties": {
546    ///    "adjustment_type": {
547    ///      "description": "The type of adjustment to be made in the step
548    /// policy.",
549    ///      "type": "string",
550    ///      "format": "enum",
551    ///      "enum": [
552    ///        "change",
553    ///        "exact",
554    ///        "percentage"
555    ///      ]
556    ///    },
557    ///    "enabled": {
558    ///      "description": "If the policy is enabled.",
559    ///      "examples": [
560    ///        true
561    ///      ],
562    ///      "type": "boolean"
563    ///    },
564    ///    "metric": {
565    ///      "description": "Metric to use for the step policy.",
566    ///      "type": "string",
567    ///      "format": "enum",
568    ///      "enum": [
569    ///        "cpu"
570    ///      ]
571    ///    },
572    ///    "name": {
573    ///      "description": "The name of the policy.",
574    ///      "examples": [
575    ///        "funky-policy"
576    ///      ],
577    ///      "type": "string"
578    ///    },
579    ///    "steps": {
580    ///      "description": "The steps for the step policy.\nEach step defines
581    /// an adjustment value and optional bounds.",
582    ///      "type": "array",
583    ///      "items": {
584    ///        "$ref": "#/components/schemas/AutoscalePolicyStep"
585    ///      }
586    ///    }
587    ///  }
588    ///}
589    /// ```
590    /// </details>
591    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
592    pub struct AutoscalePolicy {
593        ///The type of adjustment to be made in the step policy.
594        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
595        pub adjustment_type: ::std::option::Option<AutoscalePolicyAdjustmentType>,
596        ///If the policy is enabled.
597        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
598        pub enabled: ::std::option::Option<bool>,
599        ///Metric to use for the step policy.
600        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
601        pub metric: ::std::option::Option<AutoscalePolicyMetric>,
602        ///The name of the policy.
603        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
604        pub name: ::std::option::Option<::std::string::String>,
605        ///The steps for the step policy.
606        ///Each step defines an adjustment value and optional bounds.
607        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
608        pub steps: ::std::vec::Vec<AutoscalePolicyStep>,
609    }
610
611    impl ::std::convert::From<&AutoscalePolicy> for AutoscalePolicy {
612        fn from(value: &AutoscalePolicy) -> Self {
613            value.clone()
614        }
615    }
616
617    impl ::std::default::Default for AutoscalePolicy {
618        fn default() -> Self {
619            Self {
620                adjustment_type: Default::default(),
621                enabled: Default::default(),
622                metric: Default::default(),
623                name: Default::default(),
624                steps: Default::default(),
625            }
626        }
627    }
628
629    ///The type of adjustment to be made in the step policy.
630    ///
631    /// <details><summary>JSON schema</summary>
632    ///
633    /// ```json
634    ///{
635    ///  "description": "The type of adjustment to be made in the step policy.",
636    ///  "type": "string",
637    ///  "format": "enum",
638    ///  "enum": [
639    ///    "change",
640    ///    "exact",
641    ///    "percentage"
642    ///  ]
643    ///}
644    /// ```
645    /// </details>
646    #[derive(
647        :: serde :: Deserialize,
648        :: serde :: Serialize,
649        Clone,
650        Copy,
651        Debug,
652        Eq,
653        Hash,
654        Ord,
655        PartialEq,
656        PartialOrd,
657    )]
658    pub enum AutoscalePolicyAdjustmentType {
659        #[serde(rename = "change")]
660        Change,
661        #[serde(rename = "exact")]
662        Exact,
663        #[serde(rename = "percentage")]
664        Percentage,
665    }
666
667    impl ::std::convert::From<&Self> for AutoscalePolicyAdjustmentType {
668        fn from(value: &AutoscalePolicyAdjustmentType) -> Self {
669            value.clone()
670        }
671    }
672
673    impl ::std::fmt::Display for AutoscalePolicyAdjustmentType {
674        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
675            match *self {
676                Self::Change => write!(f, "change"),
677                Self::Exact => write!(f, "exact"),
678                Self::Percentage => write!(f, "percentage"),
679            }
680        }
681    }
682
683    impl ::std::str::FromStr for AutoscalePolicyAdjustmentType {
684        type Err = self::error::ConversionError;
685        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
686            match value {
687                "change" => Ok(Self::Change),
688                "exact" => Ok(Self::Exact),
689                "percentage" => Ok(Self::Percentage),
690                _ => Err("invalid value".into()),
691            }
692        }
693    }
694
695    impl ::std::convert::TryFrom<&str> for AutoscalePolicyAdjustmentType {
696        type Error = self::error::ConversionError;
697        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
698            value.parse()
699        }
700    }
701
702    impl ::std::convert::TryFrom<&::std::string::String> for AutoscalePolicyAdjustmentType {
703        type Error = self::error::ConversionError;
704        fn try_from(
705            value: &::std::string::String,
706        ) -> ::std::result::Result<Self, self::error::ConversionError> {
707            value.parse()
708        }
709    }
710
711    impl ::std::convert::TryFrom<::std::string::String> for AutoscalePolicyAdjustmentType {
712        type Error = self::error::ConversionError;
713        fn try_from(
714            value: ::std::string::String,
715        ) -> ::std::result::Result<Self, self::error::ConversionError> {
716            value.parse()
717        }
718    }
719
720    ///Metric to use for the step policy.
721    ///
722    /// <details><summary>JSON schema</summary>
723    ///
724    /// ```json
725    ///{
726    ///  "description": "Metric to use for the step policy.",
727    ///  "type": "string",
728    ///  "format": "enum",
729    ///  "enum": [
730    ///    "cpu"
731    ///  ]
732    ///}
733    /// ```
734    /// </details>
735    #[derive(
736        :: serde :: Deserialize,
737        :: serde :: Serialize,
738        Clone,
739        Copy,
740        Debug,
741        Eq,
742        Hash,
743        Ord,
744        PartialEq,
745        PartialOrd,
746    )]
747    pub enum AutoscalePolicyMetric {
748        #[serde(rename = "cpu")]
749        Cpu,
750    }
751
752    impl ::std::convert::From<&Self> for AutoscalePolicyMetric {
753        fn from(value: &AutoscalePolicyMetric) -> Self {
754            value.clone()
755        }
756    }
757
758    impl ::std::fmt::Display for AutoscalePolicyMetric {
759        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
760            match *self {
761                Self::Cpu => write!(f, "cpu"),
762            }
763        }
764    }
765
766    impl ::std::str::FromStr for AutoscalePolicyMetric {
767        type Err = self::error::ConversionError;
768        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
769            match value {
770                "cpu" => Ok(Self::Cpu),
771                _ => Err("invalid value".into()),
772            }
773        }
774    }
775
776    impl ::std::convert::TryFrom<&str> for AutoscalePolicyMetric {
777        type Error = self::error::ConversionError;
778        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
779            value.parse()
780        }
781    }
782
783    impl ::std::convert::TryFrom<&::std::string::String> for AutoscalePolicyMetric {
784        type Error = self::error::ConversionError;
785        fn try_from(
786            value: &::std::string::String,
787        ) -> ::std::result::Result<Self, self::error::ConversionError> {
788            value.parse()
789        }
790    }
791
792    impl ::std::convert::TryFrom<::std::string::String> for AutoscalePolicyMetric {
793        type Error = self::error::ConversionError;
794        fn try_from(
795            value: ::std::string::String,
796        ) -> ::std::result::Result<Self, self::error::ConversionError> {
797            value.parse()
798        }
799    }
800
801    ///`AutoscalePolicyStep`
802    ///
803    /// <details><summary>JSON schema</summary>
804    ///
805    /// ```json
806    ///{
807    ///  "type": "object",
808    ///  "properties": {
809    ///    "adjustment": {
810    ///      "description": "The adjustment value for the step.",
811    ///      "examples": [
812    ///        50
813    ///      ],
814    ///      "type": "integer",
815    ///      "format": "int64"
816    ///    },
817    ///    "lower_bound": {
818    ///      "description": "Lower bound for the step.",
819    ///      "examples": [
820    ///        10
821    ///      ],
822    ///      "type": "integer",
823    ///      "format": "int64"
824    ///    },
825    ///    "upper_bound": {
826    ///      "description": "Upper bound for the step.",
827    ///      "examples": [
828    ///        500
829    ///      ],
830    ///      "type": "integer",
831    ///      "format": "int64"
832    ///    }
833    ///  }
834    ///}
835    /// ```
836    /// </details>
837    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
838    pub struct AutoscalePolicyStep {
839        ///The adjustment value for the step.
840        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
841        pub adjustment: ::std::option::Option<i64>,
842        ///Lower bound for the step.
843        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
844        pub lower_bound: ::std::option::Option<i64>,
845        ///Upper bound for the step.
846        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
847        pub upper_bound: ::std::option::Option<i64>,
848    }
849
850    impl ::std::convert::From<&AutoscalePolicyStep> for AutoscalePolicyStep {
851        fn from(value: &AutoscalePolicyStep) -> Self {
852            value.clone()
853        }
854    }
855
856    impl ::std::default::Default for AutoscalePolicyStep {
857        fn default() -> Self {
858            Self {
859                adjustment: Default::default(),
860                lower_bound: Default::default(),
861                upper_bound: Default::default(),
862            }
863        }
864    }
865
866    ///Reference to the instance to detach the volume from.
867    ///
868    /// <details><summary>JSON schema</summary>
869    ///
870    /// ```json
871    ///{
872    ///  "description": "Reference to the instance to detach the volume from.",
873    ///  "type": "object",
874    ///  "allOf": [
875    ///    {
876    ///      "type": "object",
877    ///      "properties": {
878    ///        "uuid": {
879    ///          "description": "The UUID of the instance that the volume is
880    /// detached from.",
881    ///          "examples": [
882    ///            "c1d2e3f4-5678-90ab-cdef-1234567890ab"
883    ///          ],
884    ///          "type": "string",
885    ///          "format": "uuid"
886    ///        }
887    ///      }
888    ///    },
889    ///    {
890    ///      "oneOf": [
891    ///        {
892    ///          "title": "name",
893    ///          "type": "object",
894    ///          "properties": {
895    ///            "name": {
896    ///              "description": "The name of the instance that the volume is
897    /// detached from.",
898    ///              "examples": [
899    ///                "funky-town-g7gum5cj"
900    ///              ],
901    ///              "type": "string"
902    ///            }
903    ///          }
904    ///        }
905    ///      ]
906    ///    }
907    ///  ]
908    ///}
909    /// ```
910    /// </details>
911    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
912    pub struct BodyInstanceId {
913        ///The name of the instance that the volume is detached from.
914        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
915        pub name: ::std::option::Option<::std::string::String>,
916        ///The UUID of the instance that the volume is detached from.
917        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
918        pub uuid: ::std::option::Option<::uuid::Uuid>,
919    }
920
921    impl ::std::convert::From<&BodyInstanceId> for BodyInstanceId {
922        fn from(value: &BodyInstanceId) -> Self {
923            value.clone()
924        }
925    }
926
927    impl ::std::default::Default for BodyInstanceId {
928        fn default() -> Self {
929            Self {
930                name: Default::default(),
931                uuid: Default::default(),
932            }
933        }
934    }
935
936    ///`Certificate`
937    ///
938    /// <details><summary>JSON schema</summary>
939    ///
940    /// ```json
941    ///{
942    ///  "type": "object",
943    ///  "properties": {
944    ///    "common_name": {
945    ///      "description": "The common name (CN) field from the certificate's
946    /// subject.\n\nThis is typically the primary domain name that the
947    /// certificate is issued\nfor. It represents the main identity that the
948    /// certificate validates.",
949    ///      "examples": [
950    ///        "my-common-name"
951    ///      ],
952    ///      "type": "string"
953    ///    },
954    ///    "created_at": {
955    ///      "description": "The time the certificate was created.",
956    ///      "examples": [
957    ///        "2023-10-01T12:00:00Z"
958    ///      ],
959    ///      "type": "string",
960    ///      "format": "date-time"
961    ///    },
962    ///    "error": {
963    ///      "description": "An optional error code providing additional
964    /// information about the status.\nThis field is only set when this message
965    /// object is used as a response\nmessage, and is useful when the status is
966    /// not `success`.",
967    ///      "examples": [
968    ///        8
969    ///      ],
970    ///      "type": "integer",
971    ///      "format": "int32"
972    ///    },
973    ///    "issuer": {
974    ///      "description": "The complete issuer distinguished name (DN) of the
975    /// certificate.\n\nThis identifies the Certificate Authority (CA) that
976    /// issued the certificate.\nIt contains information about the CA including
977    /// its common name, organization,\nand country.",
978    ///      "examples": [
979    ///        "CN=R10,O=Let's Encrypt,C=US"
980    ///      ],
981    ///      "type": "string"
982    ///    },
983    ///    "message": {
984    ///      "description": "An optional message providing additional
985    /// information about the status.\nThis field is only set when this message
986    /// object is used as a response\nmessage, and is useful when the status is
987    /// not `success`.",
988    ///      "examples": [
989    ///        "No certificate with name 'funky-town-g756b5d'"
990    ///      ],
991    ///      "type": "string"
992    ///    },
993    ///    "name": {
994    ///      "description": "The name of the certificate.\n\nThis is a
995    /// human-readable name that can be used to identify the certificate.\nThe
996    /// name must be unique within the context of your account.  The name
997    /// can\nalso be used to identify the certificate in API calls.",
998    ///      "examples": [
999    ///        "funky-certificate"
1000    ///      ],
1001    ///      "type": "string"
1002    ///    },
1003    ///    "not_after": {
1004    ///      "description": "The date and time when the certificate
1005    /// expires.\n\nThe certificate should not be trusted after this date. This
1006    /// timestamp\nmarks the end of the certificate's validity period.
1007    /// Certificates should\nbe renewed before this date to maintain service
1008    /// availability.",
1009    ///      "examples": [
1010    ///        "2023-10-01T12:00:00Z"
1011    ///      ],
1012    ///      "type": "string",
1013    ///      "format": "date-time"
1014    ///    },
1015    ///    "not_before": {
1016    ///      "description": "The date and time when the certificate becomes valid.\n\nThe certificate should not be trusted before this date. This timestamp\nmarks the beginning of the certificate's validity period.",
1017    ///      "examples": [
1018    ///        "2023-10-01T12:00:00Z"
1019    ///      ],
1020    ///      "type": "string",
1021    ///      "format": "date-time"
1022    ///    },
1023    ///    "serial_number": {
1024    ///      "description": "The unique serial number assigned to the
1025    /// certificate by the issuing CA.\n\nThis is a unique identifier within the
1026    /// scope of the issuing CA that can be\nused to identify and track the
1027    /// certificate. Serial numbers are typically\nrepresented as hexadecimal
1028    /// strings.",
1029    ///      "examples": [
1030    ///        "123456789ABCDEF123456789ABCDEF123456"
1031    ///      ],
1032    ///      "type": "string"
1033    ///    },
1034    ///    "state": {
1035    ///      "description": "The current state of the certificate.\n\nThis
1036    /// indicates whether the certificate is pending issuance, valid and\nready
1037    /// for use, or in an error state. See CertificateState enum for\ndetailed
1038    /// state descriptions.",
1039    ///      "type": "string",
1040    ///      "format": "enum",
1041    ///      "enum": [
1042    ///        "pending",
1043    ///        "valid",
1044    ///        "error"
1045    ///      ]
1046    ///    },
1047    ///    "status": {
1048    ///      "description": "An optional field representing the status of the
1049    /// request.  This field is\nonly set when this message object is used as a
1050    /// response message.",
1051    ///      "allOf": [
1052    ///        {
1053    ///          "$ref": "#/components/schemas/ResponseStatus"
1054    ///        }
1055    ///      ]
1056    ///    },
1057    ///    "subject": {
1058    ///      "description": "The complete subject distinguished name (DN) of the
1059    /// certificate.\n\nThis contains the full subject information from the
1060    /// certificate, including\nthe common name, organization, organizational
1061    /// unit, locality, state, and\ncountry. The subject identifies the entity
1062    /// that the certificate is issued to.",
1063    ///      "examples": [
1064    ///        "example.com"
1065    ///      ],
1066    ///      "type": "string"
1067    ///    },
1068    ///    "uuid": {
1069    ///      "description": "The UUID of the certificate.\n\nThis is a unique
1070    /// identifier for the certificate that is generated when the\ncertificate
1071    /// is created.  The UUID is used to reference the certificate in\nAPI calls
1072    /// and can be used to identify the certificate in all API calls
1073    /// that\nrequire an identifier.",
1074    ///      "examples": [
1075    ///        "123e4567-e89b-12d3-a456-426614174000"
1076    ///      ],
1077    ///      "type": "string",
1078    ///      "format": "uuid"
1079    ///    }
1080    ///  }
1081    ///}
1082    /// ```
1083    /// </details>
1084    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1085    pub struct Certificate {
1086        ///The common name (CN) field from the certificate's subject.
1087        ///
1088        ///This is typically the primary domain name that the certificate is
1089        /// issued for. It represents the main identity that the
1090        /// certificate validates.
1091        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1092        pub common_name: ::std::option::Option<::std::string::String>,
1093        ///The time the certificate was created.
1094        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1095        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1096        ///An optional error code providing additional information about the
1097        /// status. This field is only set when this message object is
1098        /// used as a response message, and is useful when the status is
1099        /// not `success`.
1100        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1101        pub error: ::std::option::Option<i32>,
1102        ///The complete issuer distinguished name (DN) of the certificate.
1103        ///
1104        ///This identifies the Certificate Authority (CA) that issued the
1105        /// certificate. It contains information about the CA including
1106        /// its common name, organization, and country.
1107        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1108        pub issuer: ::std::option::Option<::std::string::String>,
1109        ///An optional message providing additional information about the
1110        /// status. This field is only set when this message object is
1111        /// used as a response message, and is useful when the status is
1112        /// not `success`.
1113        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1114        pub message: ::std::option::Option<::std::string::String>,
1115        ///The name of the certificate.
1116        ///
1117        ///This is a human-readable name that can be used to identify the
1118        /// certificate. The name must be unique within the context of
1119        /// your account.  The name can also be used to identify the
1120        /// certificate in API calls.
1121        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1122        pub name: ::std::option::Option<::std::string::String>,
1123        ///The date and time when the certificate expires.
1124        ///
1125        ///The certificate should not be trusted after this date. This
1126        /// timestamp marks the end of the certificate's validity
1127        /// period. Certificates should be renewed before this date to
1128        /// maintain service availability.
1129        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1130        pub not_after: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1131        ///The date and time when the certificate becomes valid.
1132        ///
1133        ///The certificate should not be trusted before this date. This
1134        /// timestamp marks the beginning of the certificate's validity
1135        /// period.
1136        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1137        pub not_before: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
1138        ///The unique serial number assigned to the certificate by the issuing
1139        /// CA.
1140        ///
1141        ///This is a unique identifier within the scope of the issuing CA that
1142        /// can be used to identify and track the certificate. Serial
1143        /// numbers are typically represented as hexadecimal strings.
1144        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1145        pub serial_number: ::std::option::Option<::std::string::String>,
1146        ///The current state of the certificate.
1147        ///
1148        ///This indicates whether the certificate is pending issuance, valid
1149        /// and ready for use, or in an error state. See
1150        /// CertificateState enum for detailed state descriptions.
1151        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1152        pub state: ::std::option::Option<CertificateState>,
1153        ///An optional field representing the status of the request.  This
1154        /// field is only set when this message object is used as a
1155        /// response message.
1156        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1157        pub status: ::std::option::Option<ResponseStatus>,
1158        ///The complete subject distinguished name (DN) of the certificate.
1159        ///
1160        ///This contains the full subject information from the certificate,
1161        /// including the common name, organization, organizational
1162        /// unit, locality, state, and country. The subject identifies
1163        /// the entity that the certificate is issued to.
1164        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1165        pub subject: ::std::option::Option<::std::string::String>,
1166        ///The UUID of the certificate.
1167        ///
1168        ///This is a unique identifier for the certificate that is generated
1169        /// when the certificate is created.  The UUID is used to
1170        /// reference the certificate in API calls and can be used to
1171        /// identify the certificate in all API calls that require an
1172        /// identifier.
1173        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1174        pub uuid: ::std::option::Option<::uuid::Uuid>,
1175    }
1176
1177    impl ::std::convert::From<&Certificate> for Certificate {
1178        fn from(value: &Certificate) -> Self {
1179            value.clone()
1180        }
1181    }
1182
1183    impl ::std::default::Default for Certificate {
1184        fn default() -> Self {
1185            Self {
1186                common_name: Default::default(),
1187                created_at: Default::default(),
1188                error: Default::default(),
1189                issuer: Default::default(),
1190                message: Default::default(),
1191                name: Default::default(),
1192                not_after: Default::default(),
1193                not_before: Default::default(),
1194                serial_number: Default::default(),
1195                state: Default::default(),
1196                status: Default::default(),
1197                subject: Default::default(),
1198                uuid: Default::default(),
1199            }
1200        }
1201    }
1202
1203    ///The current state of the certificate.
1204    ///
1205    ///This indicates whether the certificate is pending issuance, valid and
1206    ///ready for use, or in an error state. See CertificateState enum for
1207    ///detailed state descriptions.
1208    ///
1209    /// <details><summary>JSON schema</summary>
1210    ///
1211    /// ```json
1212    ///{
1213    ///  "description": "The current state of the certificate.\n\nThis indicates
1214    /// whether the certificate is pending issuance, valid and\nready for use,
1215    /// or in an error state. See CertificateState enum for\ndetailed state
1216    /// descriptions.",
1217    ///  "type": "string",
1218    ///  "format": "enum",
1219    ///  "enum": [
1220    ///    "pending",
1221    ///    "valid",
1222    ///    "error"
1223    ///  ]
1224    ///}
1225    /// ```
1226    /// </details>
1227    #[derive(
1228        :: serde :: Deserialize,
1229        :: serde :: Serialize,
1230        Clone,
1231        Copy,
1232        Debug,
1233        Eq,
1234        Hash,
1235        Ord,
1236        PartialEq,
1237        PartialOrd,
1238    )]
1239    pub enum CertificateState {
1240        #[serde(rename = "pending")]
1241        Pending,
1242        #[serde(rename = "valid")]
1243        Valid,
1244        #[serde(rename = "error")]
1245        Error,
1246    }
1247
1248    impl ::std::convert::From<&Self> for CertificateState {
1249        fn from(value: &CertificateState) -> Self {
1250            value.clone()
1251        }
1252    }
1253
1254    impl ::std::fmt::Display for CertificateState {
1255        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1256            match *self {
1257                Self::Pending => write!(f, "pending"),
1258                Self::Valid => write!(f, "valid"),
1259                Self::Error => write!(f, "error"),
1260            }
1261        }
1262    }
1263
1264    impl ::std::str::FromStr for CertificateState {
1265        type Err = self::error::ConversionError;
1266        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1267            match value {
1268                "pending" => Ok(Self::Pending),
1269                "valid" => Ok(Self::Valid),
1270                "error" => Ok(Self::Error),
1271                _ => Err("invalid value".into()),
1272            }
1273        }
1274    }
1275
1276    impl ::std::convert::TryFrom<&str> for CertificateState {
1277        type Error = self::error::ConversionError;
1278        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1279            value.parse()
1280        }
1281    }
1282
1283    impl ::std::convert::TryFrom<&::std::string::String> for CertificateState {
1284        type Error = self::error::ConversionError;
1285        fn try_from(
1286            value: &::std::string::String,
1287        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1288            value.parse()
1289        }
1290    }
1291
1292    impl ::std::convert::TryFrom<::std::string::String> for CertificateState {
1293        type Error = self::error::ConversionError;
1294        fn try_from(
1295            value: ::std::string::String,
1296        ) -> ::std::result::Result<Self, self::error::ConversionError> {
1297            value.parse()
1298        }
1299    }
1300
1301    ///`ConfigurationInstanceCreateArgs`
1302    ///
1303    /// <details><summary>JSON schema</summary>
1304    ///
1305    /// ```json
1306    ///{
1307    ///  "oneOf": [
1308    ///    {
1309    ///      "title": "roms",
1310    ///      "type": "object",
1311    ///      "properties": {
1312    ///        "roms": {
1313    ///          "description": "The ROM to use for the autoscale
1314    /// configuration.",
1315    ///          "allOf": [
1316    ///            {
1317    ///              "$ref":
1318    /// "#/components/schemas/InstanceCreateArgsInstanceCreateRequestRoms"
1319    ///            }
1320    ///          ]
1321    ///        }
1322    ///      }
1323    ///    },
1324    ///    {
1325    ///      "title": "template",
1326    ///      "type": "object",
1327    ///      "properties": {
1328    ///        "template": {
1329    ///          "description": "The template to use for the autoscale
1330    /// configuration.",
1331    ///          "allOf": [
1332    ///            {
1333    ///              "$ref": "#/components/schemas/NameOrUUID"
1334    ///            }
1335    ///          ]
1336    ///        }
1337    ///      }
1338    ///    }
1339    ///  ]
1340    ///}
1341    /// ```
1342    /// </details>
1343    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1344    #[serde(untagged)]
1345    pub enum ConfigurationInstanceCreateArgs {
1346        Roms {
1347            ///The ROM to use for the autoscale configuration.
1348            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1349            roms: ::std::option::Option<InstanceCreateArgsInstanceCreateRequestRoms>,
1350        },
1351        Template {
1352            ///The template to use for the autoscale configuration.
1353            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1354            template: ::std::option::Option<NameOrUuid>,
1355        },
1356    }
1357
1358    impl ::std::convert::From<&Self> for ConfigurationInstanceCreateArgs {
1359        fn from(value: &ConfigurationInstanceCreateArgs) -> Self {
1360            value.clone()
1361        }
1362    }
1363
1364    ///The request message to create an autoscale configuration for a service
1365    /// group based on its UUID.
1366    ///
1367    /// <details><summary>JSON schema</summary>
1368    ///
1369    /// ```json
1370    ///{
1371    ///  "description": "The request message to create an autoscale
1372    /// configuration for a service group\nbased on its UUID.",
1373    ///  "type": "object",
1374    ///  "properties": {
1375    ///    "cooldown_time_ms": {
1376    ///      "description": "The cooldown time in milliseconds for the autoscale
1377    /// configuration.",
1378    ///      "type": "integer",
1379    ///      "format": "int64"
1380    ///    },
1381    ///    "create_args": {
1382    ///      "description": "The arguments to use when creating the autoscale
1383    /// configuration.",
1384    ///      "allOf": [
1385    ///        {
1386    ///          "$ref":
1387    /// "#/components/schemas/
1388    /// CreateAutoscaleConfigurationByServiceGroupUUIDRequestInstanceCreateArgs"
1389    ///        }
1390    ///      ]
1391    ///    },
1392    ///    "max_size": {
1393    ///      "description": "The maximum number of instances to keep running.",
1394    ///      "type": "integer",
1395    ///      "format": "int64"
1396    ///    },
1397    ///    "min_size": {
1398    ///      "description": "The minimum number of instances to keep running.",
1399    ///      "type": "integer",
1400    ///      "format": "int64"
1401    ///    },
1402    ///    "policies": {
1403    ///      "description": "The policies to apply to the autoscale
1404    /// configuration.",
1405    ///      "type": "array",
1406    ///      "items": {
1407    ///        "$ref": "#/components/schemas/AutoscalePolicy"
1408    ///      }
1409    ///    },
1410    ///    "uuid": {
1411    ///      "description": "The UUID of the service to create a configuration
1412    /// for.\nMutually exclusive with name.",
1413    ///      "type": "string",
1414    ///      "format": "uuid"
1415    ///    },
1416    ///    "warmup_time_ms": {
1417    ///      "description": "The warmup time in milliseconds for new
1418    /// instances.",
1419    ///      "type": "integer",
1420    ///      "format": "int64"
1421    ///    }
1422    ///  }
1423    ///}
1424    /// ```
1425    /// </details>
1426    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1427    pub struct CreateAutoscaleConfigurationByServiceGroupUuidRequest {
1428        ///The cooldown time in milliseconds for the autoscale configuration.
1429        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1430        pub cooldown_time_ms: ::std::option::Option<i64>,
1431        ///The arguments to use when creating the autoscale configuration.
1432        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1433        pub create_args: ::std::option::Option<
1434            CreateAutoscaleConfigurationByServiceGroupUuidRequestInstanceCreateArgs,
1435        >,
1436        ///The maximum number of instances to keep running.
1437        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1438        pub max_size: ::std::option::Option<i64>,
1439        ///The minimum number of instances to keep running.
1440        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1441        pub min_size: ::std::option::Option<i64>,
1442        ///The policies to apply to the autoscale configuration.
1443        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1444        pub policies: ::std::vec::Vec<AutoscalePolicy>,
1445        ///The UUID of the service to create a configuration for.
1446        ///Mutually exclusive with name.
1447        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1448        pub uuid: ::std::option::Option<::uuid::Uuid>,
1449        ///The warmup time in milliseconds for new instances.
1450        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1451        pub warmup_time_ms: ::std::option::Option<i64>,
1452    }
1453
1454    impl ::std::convert::From<&CreateAutoscaleConfigurationByServiceGroupUuidRequest>
1455        for CreateAutoscaleConfigurationByServiceGroupUuidRequest
1456    {
1457        fn from(value: &CreateAutoscaleConfigurationByServiceGroupUuidRequest) -> Self {
1458            value.clone()
1459        }
1460    }
1461
1462    impl ::std::default::Default for CreateAutoscaleConfigurationByServiceGroupUuidRequest {
1463        fn default() -> Self {
1464            Self {
1465                cooldown_time_ms: Default::default(),
1466                create_args: Default::default(),
1467                max_size: Default::default(),
1468                min_size: Default::default(),
1469                policies: Default::default(),
1470                uuid: Default::default(),
1471                warmup_time_ms: Default::default(),
1472            }
1473        }
1474    }
1475
1476    ///`CreateAutoscaleConfigurationByServiceGroupUuidRequestInstanceCreateArgs`
1477    ///
1478    /// <details><summary>JSON schema</summary>
1479    ///
1480    /// ```json
1481    ///{
1482    ///  "oneOf": [
1483    ///    {
1484    ///      "title": "roms",
1485    ///      "type": "object",
1486    ///      "properties": {
1487    ///        "roms": {
1488    ///          "description": "The ROM to use for the autoscale
1489    /// configuration.",
1490    ///          "allOf": [
1491    ///            {
1492    ///              "$ref":
1493    /// "#/components/schemas/InstanceCreateArgsInstanceCreateRequestRoms"
1494    ///            }
1495    ///          ]
1496    ///        }
1497    ///      }
1498    ///    },
1499    ///    {
1500    ///      "title": "template",
1501    ///      "type": "object",
1502    ///      "properties": {
1503    ///        "template": {
1504    ///          "description": "The template to use for the autoscale
1505    /// configuration.",
1506    ///          "allOf": [
1507    ///            {
1508    ///              "$ref": "#/components/schemas/NameOrUUID"
1509    ///            }
1510    ///          ]
1511    ///        }
1512    ///      }
1513    ///    }
1514    ///  ]
1515    ///}
1516    /// ```
1517    /// </details>
1518    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1519    #[serde(untagged)]
1520    pub enum CreateAutoscaleConfigurationByServiceGroupUuidRequestInstanceCreateArgs {
1521        Roms {
1522            ///The ROM to use for the autoscale configuration.
1523            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1524            roms: ::std::option::Option<InstanceCreateArgsInstanceCreateRequestRoms>,
1525        },
1526        Template {
1527            ///The template to use for the autoscale configuration.
1528            #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1529            template: ::std::option::Option<NameOrUuid>,
1530        },
1531    }
1532
1533    impl ::std::convert::From<&Self>
1534        for CreateAutoscaleConfigurationByServiceGroupUuidRequestInstanceCreateArgs
1535    {
1536        fn from(
1537            value: &CreateAutoscaleConfigurationByServiceGroupUuidRequestInstanceCreateArgs,
1538        ) -> Self {
1539            value.clone()
1540        }
1541    }
1542
1543    ///The request message to create an autoscale configuration policy for a
1544    ///service.
1545    ///
1546    /// <details><summary>JSON schema</summary>
1547    ///
1548    /// ```json
1549    ///{
1550    ///  "description": "The request message to create an autoscale
1551    /// configuration policy for a\nservice.",
1552    ///  "type": "object",
1553    ///  "required": [
1554    ///    "name",
1555    ///    "type"
1556    ///  ],
1557    ///  "properties": {
1558    ///    "name": {
1559    ///      "description": "The Name of the service to add a policy to.",
1560    ///      "examples": [
1561    ///        "funky-service"
1562    ///      ],
1563    ///      "type": "string"
1564    ///    },
1565    ///    "type": {
1566    ///      "description": "The policy type to add to the autoscale
1567    /// configuration.",
1568    ///      "allOf": [
1569    ///        {
1570    ///          "$ref": "#/components/schemas/AutoscalePolicy"
1571    ///        }
1572    ///      ]
1573    ///    }
1574    ///  }
1575    ///}
1576    /// ```
1577    /// </details>
1578    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1579    pub struct CreateAutoscaleConfigurationPolicyRequest {
1580        ///The Name of the service to add a policy to.
1581        pub name: ::std::string::String,
1582        ///The policy type to add to the autoscale configuration.
1583        #[serde(rename = "type")]
1584        pub type_: AutoscalePolicy,
1585    }
1586
1587    impl ::std::convert::From<&CreateAutoscaleConfigurationPolicyRequest>
1588        for CreateAutoscaleConfigurationPolicyRequest
1589    {
1590        fn from(value: &CreateAutoscaleConfigurationPolicyRequest) -> Self {
1591            value.clone()
1592        }
1593    }
1594
1595    ///`CreateAutoscaleConfigurationPolicyResponse`
1596    ///
1597    /// <details><summary>JSON schema</summary>
1598    ///
1599    /// ```json
1600    ///{
1601    ///  "type": "object",
1602    ///  "allOf": [
1603    ///    {
1604    ///      "type": "object",
1605    ///      "properties": {
1606    ///        "data": {
1607    ///          "description": "The response data for this request.",
1608    ///          "allOf": [
1609    ///            {
1610    ///              "$ref":
1611    /// "#/components/schemas/CreateAutoscaleConfigurationPolicyResponseData"
1612    ///            }
1613    ///          ]
1614    ///        },
1615    ///        "errors": {
1616    ///          "description": "A list of errors which may have occurred during
1617    /// the request.",
1618    ///          "type": "array",
1619    ///          "items": {
1620    ///            "$ref": "#/components/schemas/ResponseError"
1621    ///          }
1622    ///        },
1623    ///        "op_time_us": {
1624    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
1625    ///          "examples": [
1626    ///            32
1627    ///          ],
1628    ///          "type": "integer",
1629    ///          "format": "uint64"
1630    ///        },
1631    ///        "status": {
1632    ///          "description": "The status of the response.",
1633    ///          "allOf": [
1634    ///            {
1635    ///              "$ref": "#/components/schemas/ResponseStatus"
1636    ///            }
1637    ///          ]
1638    ///        }
1639    ///      }
1640    ///    },
1641    ///    {
1642    ///      "oneOf": [
1643    ///        {
1644    ///          "title": "message",
1645    ///          "type": "object",
1646    ///          "properties": {
1647    ///            "message": {
1648    ///              "description": "An optional message providing additional
1649    /// information about the status.\nThis field is useful when the status is
1650    /// not `success`.",
1651    ///              "examples": [
1652    ///                "Failed to perform all operations"
1653    ///              ],
1654    ///              "type": "string"
1655    ///            }
1656    ///          }
1657    ///        }
1658    ///      ]
1659    ///    }
1660    ///  ]
1661    ///}
1662    /// ```
1663    /// </details>
1664    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1665    pub struct CreateAutoscaleConfigurationPolicyResponse {
1666        ///The response data for this request.
1667        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1668        pub data: ::std::option::Option<CreateAutoscaleConfigurationPolicyResponseData>,
1669        ///A list of errors which may have occurred during the request.
1670        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1671        pub errors: ::std::vec::Vec<ResponseError>,
1672        ///An optional message providing additional information about the
1673        /// status. This field is useful when the status is not
1674        /// `success`.
1675        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1676        pub message: ::std::option::Option<::std::string::String>,
1677        ///The operation time in microseconds.  This is the time it took to
1678        /// process the request and generate the response.
1679        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1680        pub op_time_us: ::std::option::Option<u64>,
1681        ///The status of the response.
1682        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1683        pub status: ::std::option::Option<ResponseStatus>,
1684    }
1685
1686    impl ::std::convert::From<&CreateAutoscaleConfigurationPolicyResponse>
1687        for CreateAutoscaleConfigurationPolicyResponse
1688    {
1689        fn from(value: &CreateAutoscaleConfigurationPolicyResponse) -> Self {
1690            value.clone()
1691        }
1692    }
1693
1694    impl ::std::default::Default for CreateAutoscaleConfigurationPolicyResponse {
1695        fn default() -> Self {
1696            Self {
1697                data: Default::default(),
1698                errors: Default::default(),
1699                message: Default::default(),
1700                op_time_us: Default::default(),
1701                status: Default::default(),
1702            }
1703        }
1704    }
1705
1706    ///`CreateAutoscaleConfigurationPolicyResponseData`
1707    ///
1708    /// <details><summary>JSON schema</summary>
1709    ///
1710    /// ```json
1711    ///{
1712    ///  "type": "object",
1713    ///  "properties": {
1714    ///    "policies": {
1715    ///      "description": "The policies which were added by the request.",
1716    ///      "type": "array",
1717    ///      "items": {
1718    ///        "$ref":
1719    /// "#/components/schemas/CreateAutoscaleConfigurationPolicyResponsePolicy"
1720    ///      }
1721    ///    }
1722    ///  }
1723    ///}
1724    /// ```
1725    /// </details>
1726    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1727    pub struct CreateAutoscaleConfigurationPolicyResponseData {
1728        ///The policies which were added by the request.
1729        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1730        pub policies: ::std::vec::Vec<CreateAutoscaleConfigurationPolicyResponsePolicy>,
1731    }
1732
1733    impl ::std::convert::From<&CreateAutoscaleConfigurationPolicyResponseData>
1734        for CreateAutoscaleConfigurationPolicyResponseData
1735    {
1736        fn from(value: &CreateAutoscaleConfigurationPolicyResponseData) -> Self {
1737            value.clone()
1738        }
1739    }
1740
1741    impl ::std::default::Default for CreateAutoscaleConfigurationPolicyResponseData {
1742        fn default() -> Self {
1743            Self {
1744                policies: Default::default(),
1745            }
1746        }
1747    }
1748
1749    ///`CreateAutoscaleConfigurationPolicyResponsePolicy`
1750    ///
1751    /// <details><summary>JSON schema</summary>
1752    ///
1753    /// ```json
1754    ///{
1755    ///  "type": "object",
1756    ///  "properties": {
1757    ///    "error": {
1758    ///      "description": "An optional error code providing additional
1759    /// information about the status.\nThis field is useful when the status is
1760    /// not `success`.",
1761    ///      "examples": [
1762    ///        8
1763    ///      ],
1764    ///      "type": "integer",
1765    ///      "format": "int32"
1766    ///    },
1767    ///    "message": {
1768    ///      "description": "An optional message providing additional
1769    /// information about the status.\nThis field is useful when the status is
1770    /// not `success`.",
1771    ///      "examples": [
1772    ///        "No service with name 'funky-town-g756b5d'"
1773    ///      ],
1774    ///      "type": "string"
1775    ///    },
1776    ///    "name": {
1777    ///      "description": "The name of the service of the added policy.",
1778    ///      "examples": [
1779    ///        "funky-policy"
1780    ///      ],
1781    ///      "type": "string"
1782    ///    },
1783    ///    "status": {
1784    ///      "description": "The status of the response.",
1785    ///      "allOf": [
1786    ///        {
1787    ///          "$ref": "#/components/schemas/ResponseStatus"
1788    ///        }
1789    ///      ]
1790    ///    },
1791    ///    "uuid": {
1792    ///      "description": "The UUID of the service of the added policy.",
1793    ///      "examples": [
1794    ///        "123e4567-e89b-12d3-a456-426614174000"
1795    ///      ],
1796    ///      "type": "string",
1797    ///      "format": "uuid"
1798    ///    }
1799    ///  }
1800    ///}
1801    /// ```
1802    /// </details>
1803    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1804    pub struct CreateAutoscaleConfigurationPolicyResponsePolicy {
1805        ///An optional error code providing additional information about the
1806        /// status. This field is useful when the status is not
1807        /// `success`.
1808        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1809        pub error: ::std::option::Option<i32>,
1810        ///An optional message providing additional information about the
1811        /// status. This field is useful when the status is not
1812        /// `success`.
1813        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1814        pub message: ::std::option::Option<::std::string::String>,
1815        ///The name of the service of the added policy.
1816        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1817        pub name: ::std::option::Option<::std::string::String>,
1818        ///The status of the response.
1819        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1820        pub status: ::std::option::Option<ResponseStatus>,
1821        ///The UUID of the service of the added policy.
1822        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1823        pub uuid: ::std::option::Option<::uuid::Uuid>,
1824    }
1825
1826    impl ::std::convert::From<&CreateAutoscaleConfigurationPolicyResponsePolicy>
1827        for CreateAutoscaleConfigurationPolicyResponsePolicy
1828    {
1829        fn from(value: &CreateAutoscaleConfigurationPolicyResponsePolicy) -> Self {
1830            value.clone()
1831        }
1832    }
1833
1834    impl ::std::default::Default for CreateAutoscaleConfigurationPolicyResponsePolicy {
1835        fn default() -> Self {
1836            Self {
1837                error: Default::default(),
1838                message: Default::default(),
1839                name: Default::default(),
1840                status: Default::default(),
1841                uuid: Default::default(),
1842            }
1843        }
1844    }
1845
1846    ///`CreateAutoscaleConfigurationsRequestConfiguration`
1847    ///
1848    /// <details><summary>JSON schema</summary>
1849    ///
1850    /// ```json
1851    ///{
1852    ///  "type": "object",
1853    ///  "properties": {
1854    ///    "cooldown_time_ms": {
1855    ///      "description": "The cooldown time in milliseconds for the autoscale
1856    /// configuration.",
1857    ///      "examples": [
1858    ///        100
1859    ///      ],
1860    ///      "type": "integer",
1861    ///      "format": "int64"
1862    ///    },
1863    ///    "create_args": {
1864    ///      "description": "The arguments to use when creating the autoscale
1865    /// configuration.",
1866    ///      "allOf": [
1867    ///        {
1868    ///          "$ref": "#/components/schemas/ConfigurationInstanceCreateArgs"
1869    ///        }
1870    ///      ]
1871    ///    },
1872    ///    "max_size": {
1873    ///      "description": "The maximum number of instances to keep running.",
1874    ///      "examples": [
1875    ///        12
1876    ///      ],
1877    ///      "type": "integer",
1878    ///      "format": "int64"
1879    ///    },
1880    ///    "min_size": {
1881    ///      "description": "The minimum number of instances to keep running.",
1882    ///      "examples": [
1883    ///        2
1884    ///      ],
1885    ///      "type": "integer",
1886    ///      "format": "int64"
1887    ///    },
1888    ///    "name": {
1889    ///      "description": "The name of the service to create a configuration
1890    /// for.\nMutually exclusive with UUID.",
1891    ///      "examples": [
1892    ///        "funky-service"
1893    ///      ],
1894    ///      "type": "string"
1895    ///    },
1896    ///    "policies": {
1897    ///      "description": "The policies to apply to the autoscale
1898    /// configuration.",
1899    ///      "type": "array",
1900    ///      "items": {
1901    ///        "$ref": "#/components/schemas/AutoscalePolicy"
1902    ///      }
1903    ///    },
1904    ///    "uuid": {
1905    ///      "description": "The UUID of the service to create a configuration
1906    /// for.\nMutually exclusive with name.",
1907    ///      "examples": [
1908    ///        "123e4567-e89b-12d3-a456-426614174000"
1909    ///      ],
1910    ///      "type": "string",
1911    ///      "format": "uuid"
1912    ///    },
1913    ///    "warmup_time_ms": {
1914    ///      "description": "The warmup time in milliseconds for new
1915    /// instances.",
1916    ///      "examples": [
1917    ///        100
1918    ///      ],
1919    ///      "type": "integer",
1920    ///      "format": "int64"
1921    ///    }
1922    ///  }
1923    ///}
1924    /// ```
1925    /// </details>
1926    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
1927    pub struct CreateAutoscaleConfigurationsRequestConfiguration {
1928        ///The cooldown time in milliseconds for the autoscale configuration.
1929        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1930        pub cooldown_time_ms: ::std::option::Option<i64>,
1931        ///The arguments to use when creating the autoscale configuration.
1932        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1933        pub create_args: ::std::option::Option<ConfigurationInstanceCreateArgs>,
1934        ///The maximum number of instances to keep running.
1935        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1936        pub max_size: ::std::option::Option<i64>,
1937        ///The minimum number of instances to keep running.
1938        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1939        pub min_size: ::std::option::Option<i64>,
1940        ///The name of the service to create a configuration for.
1941        ///Mutually exclusive with UUID.
1942        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1943        pub name: ::std::option::Option<::std::string::String>,
1944        ///The policies to apply to the autoscale configuration.
1945        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1946        pub policies: ::std::vec::Vec<AutoscalePolicy>,
1947        ///The UUID of the service to create a configuration for.
1948        ///Mutually exclusive with name.
1949        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1950        pub uuid: ::std::option::Option<::uuid::Uuid>,
1951        ///The warmup time in milliseconds for new instances.
1952        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
1953        pub warmup_time_ms: ::std::option::Option<i64>,
1954    }
1955
1956    impl ::std::convert::From<&CreateAutoscaleConfigurationsRequestConfiguration>
1957        for CreateAutoscaleConfigurationsRequestConfiguration
1958    {
1959        fn from(value: &CreateAutoscaleConfigurationsRequestConfiguration) -> Self {
1960            value.clone()
1961        }
1962    }
1963
1964    impl ::std::default::Default for CreateAutoscaleConfigurationsRequestConfiguration {
1965        fn default() -> Self {
1966            Self {
1967                cooldown_time_ms: Default::default(),
1968                create_args: Default::default(),
1969                max_size: Default::default(),
1970                min_size: Default::default(),
1971                name: Default::default(),
1972                policies: Default::default(),
1973                uuid: Default::default(),
1974                warmup_time_ms: Default::default(),
1975            }
1976        }
1977    }
1978
1979    ///The response to a CreateAutoscaleConfigurationRequest.
1980    ///
1981    /// <details><summary>JSON schema</summary>
1982    ///
1983    /// ```json
1984    ///{
1985    ///  "description": "The response to a
1986    /// CreateAutoscaleConfigurationRequest.",
1987    ///  "type": "object",
1988    ///  "allOf": [
1989    ///    {
1990    ///      "type": "object",
1991    ///      "properties": {
1992    ///        "data": {
1993    ///          "description": "The response data for this request.",
1994    ///          "allOf": [
1995    ///            {
1996    ///              "$ref":
1997    /// "#/components/schemas/CreateAutoscaleConfigurationsResponseData"
1998    ///            }
1999    ///          ]
2000    ///        },
2001    ///        "errors": {
2002    ///          "description": "A list of errors which may have occurred during
2003    /// the request.",
2004    ///          "type": "array",
2005    ///          "items": {
2006    ///            "$ref": "#/components/schemas/ResponseError"
2007    ///          }
2008    ///        },
2009    ///        "op_time_us": {
2010    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
2011    ///          "examples": [
2012    ///            34
2013    ///          ],
2014    ///          "type": "integer",
2015    ///          "format": "uint64"
2016    ///        },
2017    ///        "status": {
2018    ///          "description": "The status of the response.",
2019    ///          "allOf": [
2020    ///            {
2021    ///              "$ref": "#/components/schemas/ResponseStatus"
2022    ///            }
2023    ///          ]
2024    ///        }
2025    ///      }
2026    ///    },
2027    ///    {
2028    ///      "oneOf": [
2029    ///        {
2030    ///          "title": "message",
2031    ///          "type": "object",
2032    ///          "properties": {
2033    ///            "message": {
2034    ///              "description": "An optional message providing additional
2035    /// information about the status.\nThis field is useful when the status is
2036    /// not `success`.",
2037    ///              "examples": [
2038    ///                "Failed to perform all operations"
2039    ///              ],
2040    ///              "type": "string"
2041    ///            }
2042    ///          }
2043    ///        }
2044    ///      ]
2045    ///    }
2046    ///  ]
2047    ///}
2048    /// ```
2049    /// </details>
2050    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2051    pub struct CreateAutoscaleConfigurationsResponse {
2052        ///The response data for this request.
2053        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2054        pub data: ::std::option::Option<CreateAutoscaleConfigurationsResponseData>,
2055        ///A list of errors which may have occurred during the request.
2056        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2057        pub errors: ::std::vec::Vec<ResponseError>,
2058        ///An optional message providing additional information about the
2059        /// status. This field is useful when the status is not
2060        /// `success`.
2061        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2062        pub message: ::std::option::Option<::std::string::String>,
2063        ///The operation time in microseconds.  This is the time it took to
2064        /// process the request and generate the response.
2065        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2066        pub op_time_us: ::std::option::Option<u64>,
2067        ///The status of the response.
2068        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2069        pub status: ::std::option::Option<ResponseStatus>,
2070    }
2071
2072    impl ::std::convert::From<&CreateAutoscaleConfigurationsResponse>
2073        for CreateAutoscaleConfigurationsResponse
2074    {
2075        fn from(value: &CreateAutoscaleConfigurationsResponse) -> Self {
2076            value.clone()
2077        }
2078    }
2079
2080    impl ::std::default::Default for CreateAutoscaleConfigurationsResponse {
2081        fn default() -> Self {
2082            Self {
2083                data: Default::default(),
2084                errors: Default::default(),
2085                message: Default::default(),
2086                op_time_us: Default::default(),
2087                status: Default::default(),
2088            }
2089        }
2090    }
2091
2092    ///`CreateAutoscaleConfigurationsResponseConfigurationsResponse`
2093    ///
2094    /// <details><summary>JSON schema</summary>
2095    ///
2096    /// ```json
2097    ///{
2098    ///  "type": "object",
2099    ///  "properties": {
2100    ///    "error": {
2101    ///      "description": "An optional error code providing additional
2102    /// information about the status.\nThis field is useful when the status is
2103    /// not `success`.",
2104    ///      "examples": [
2105    ///        8
2106    ///      ],
2107    ///      "type": "integer",
2108    ///      "format": "int32"
2109    ///    },
2110    ///    "message": {
2111    ///      "description": "An optional message providing additional
2112    /// information about the status.\nThis field is useful when the status is
2113    /// not `success`.",
2114    ///      "examples": [
2115    ///        "No service with name 'funky-town-g756b5d'"
2116    ///      ],
2117    ///      "type": "string"
2118    ///    },
2119    ///    "name": {
2120    ///      "description": "The name of the service where the configuration was
2121    /// created.",
2122    ///      "examples": [
2123    ///        "funky-instance-template"
2124    ///      ],
2125    ///      "type": "string"
2126    ///    },
2127    ///    "status": {
2128    ///      "description": "The status of the response.",
2129    ///      "allOf": [
2130    ///        {
2131    ///          "$ref": "#/components/schemas/ResponseStatus"
2132    ///        }
2133    ///      ]
2134    ///    },
2135    ///    "uuid": {
2136    ///      "description": "The UUID of the service where the configuration was
2137    /// created.",
2138    ///      "examples": [
2139    ///        "123e4567-e89b-12d3-a456-426614174000"
2140    ///      ],
2141    ///      "type": "string",
2142    ///      "format": "uuid"
2143    ///    }
2144    ///  }
2145    ///}
2146    /// ```
2147    /// </details>
2148    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2149    pub struct CreateAutoscaleConfigurationsResponseConfigurationsResponse {
2150        ///An optional error code providing additional information about the
2151        /// status. This field is useful when the status is not
2152        /// `success`.
2153        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2154        pub error: ::std::option::Option<i32>,
2155        ///An optional message providing additional information about the
2156        /// status. This field is useful when the status is not
2157        /// `success`.
2158        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2159        pub message: ::std::option::Option<::std::string::String>,
2160        ///The name of the service where the configuration was created.
2161        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2162        pub name: ::std::option::Option<::std::string::String>,
2163        ///The status of the response.
2164        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2165        pub status: ::std::option::Option<ResponseStatus>,
2166        ///The UUID of the service where the configuration was created.
2167        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2168        pub uuid: ::std::option::Option<::uuid::Uuid>,
2169    }
2170
2171    impl ::std::convert::From<&CreateAutoscaleConfigurationsResponseConfigurationsResponse>
2172        for CreateAutoscaleConfigurationsResponseConfigurationsResponse
2173    {
2174        fn from(value: &CreateAutoscaleConfigurationsResponseConfigurationsResponse) -> Self {
2175            value.clone()
2176        }
2177    }
2178
2179    impl ::std::default::Default for CreateAutoscaleConfigurationsResponseConfigurationsResponse {
2180        fn default() -> Self {
2181            Self {
2182                error: Default::default(),
2183                message: Default::default(),
2184                name: Default::default(),
2185                status: Default::default(),
2186                uuid: Default::default(),
2187            }
2188        }
2189    }
2190
2191    ///`CreateAutoscaleConfigurationsResponseData`
2192    ///
2193    /// <details><summary>JSON schema</summary>
2194    ///
2195    /// ```json
2196    ///{
2197    ///  "type": "object",
2198    ///  "properties": {
2199    ///    "service_groups": {
2200    ///      "description": "The configuration(s) which were created by the
2201    /// request.",
2202    ///      "type": "array",
2203    ///      "items": {
2204    ///        "$ref":
2205    /// "#/components/schemas/
2206    /// CreateAutoscaleConfigurationsResponseConfigurationsResponse"
2207    ///      }
2208    ///    }
2209    ///  }
2210    ///}
2211    /// ```
2212    /// </details>
2213    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2214    pub struct CreateAutoscaleConfigurationsResponseData {
2215        ///The configuration(s) which were created by the request.
2216        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2217        pub service_groups:
2218            ::std::vec::Vec<CreateAutoscaleConfigurationsResponseConfigurationsResponse>,
2219    }
2220
2221    impl ::std::convert::From<&CreateAutoscaleConfigurationsResponseData>
2222        for CreateAutoscaleConfigurationsResponseData
2223    {
2224        fn from(value: &CreateAutoscaleConfigurationsResponseData) -> Self {
2225            value.clone()
2226        }
2227    }
2228
2229    impl ::std::default::Default for CreateAutoscaleConfigurationsResponseData {
2230        fn default() -> Self {
2231            Self {
2232                service_groups: Default::default(),
2233            }
2234        }
2235    }
2236
2237    ///The request message for creating/uploading a new certificate.
2238    ///
2239    /// <details><summary>JSON schema</summary>
2240    ///
2241    /// ```json
2242    ///{
2243    ///  "description": "The request message for creating/uploading a new
2244    /// certificate.",
2245    ///  "type": "object",
2246    ///  "allOf": [
2247    ///    {
2248    ///      "type": "object",
2249    ///      "properties": {
2250    ///        "chain": {
2251    ///          "description": "The chain of the certificate.",
2252    ///          "examples": [
2253    ///            "-----BEGIN CERTIFICATE-----
2254    /// MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDQ... -----END
2255    /// CERTIFICATE-----"
2256    ///          ],
2257    ///          "type": "string"
2258    ///        },
2259    ///        "cn": {
2260    ///          "description": "The common name (CN) of the certificate.",
2261    ///          "examples": [
2262    ///            "funky-town.com"
2263    ///          ],
2264    ///          "type": "string"
2265    ///        },
2266    ///        "pkey": {
2267    ///          "description": "The private key of the certificate.",
2268    ///          "examples": [
2269    ///            "-----BEGIN PRIVATE KEY-----
2270    /// MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDQ... -----END PRIVATE
2271    /// KEY-----"
2272    ///          ],
2273    ///          "type": "string"
2274    ///        }
2275    ///      }
2276    ///    },
2277    ///    {
2278    ///      "oneOf": [
2279    ///        {
2280    ///          "title": "name",
2281    ///          "type": "object",
2282    ///          "properties": {
2283    ///            "name": {
2284    ///              "description": "The name of the certificate.\n\nThis is a
2285    /// human-readable name that can be used to identify the certificate.\nThe
2286    /// name must be unique within the context of your account.  If no name
2287    /// is\nspecified, a random name is generated for you.  The name can also be
2288    /// used\nto identify the certificate in API calls.",
2289    ///              "examples": [
2290    ///                "funky-certificate"
2291    ///              ],
2292    ///              "type": "string"
2293    ///            }
2294    ///          }
2295    ///        }
2296    ///      ]
2297    ///    }
2298    ///  ],
2299    ///  "required": [
2300    ///    "chain",
2301    ///    "cn",
2302    ///    "pkey"
2303    ///  ]
2304    ///}
2305    /// ```
2306    /// </details>
2307    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2308    pub struct CreateCertificateRequest {
2309        ///The chain of the certificate.
2310        pub chain: ::std::string::String,
2311        ///The common name (CN) of the certificate.
2312        pub cn: ::std::string::String,
2313        ///The name of the certificate.
2314        ///
2315        ///This is a human-readable name that can be used to identify the
2316        /// certificate. The name must be unique within the context of
2317        /// your account.  If no name is specified, a random name is
2318        /// generated for you.  The name can also be used to identify
2319        /// the certificate in API calls.
2320        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2321        pub name: ::std::option::Option<::std::string::String>,
2322        ///The private key of the certificate.
2323        pub pkey: ::std::string::String,
2324    }
2325
2326    impl ::std::convert::From<&CreateCertificateRequest> for CreateCertificateRequest {
2327        fn from(value: &CreateCertificateRequest) -> Self {
2328            value.clone()
2329        }
2330    }
2331
2332    ///The response message for creating of a certificate.
2333    ///
2334    /// <details><summary>JSON schema</summary>
2335    ///
2336    /// ```json
2337    ///{
2338    ///  "description": "The response message for creating of a certificate.",
2339    ///  "type": "object",
2340    ///  "properties": {
2341    ///    "data": {
2342    ///      "description": "The response data for this request.",
2343    ///      "allOf": [
2344    ///        {
2345    ///          "$ref": "#/components/schemas/CreateCertificateResponseData"
2346    ///        }
2347    ///      ]
2348    ///    },
2349    ///    "errors": {
2350    ///      "description": "A list of errors which may have occurred during the
2351    /// request.",
2352    ///      "type": "array",
2353    ///      "items": {
2354    ///        "$ref": "#/components/schemas/ResponseError"
2355    ///      }
2356    ///    },
2357    ///    "message": {
2358    ///      "description": "An optional message providing additional
2359    /// information about the status.\nThis field is useful when the status is
2360    /// not `success`.",
2361    ///      "examples": [
2362    ///        "Failed to perform all operations"
2363    ///      ],
2364    ///      "type": "string"
2365    ///    },
2366    ///    "op_time_us": {
2367    ///      "description": "The operation time in microseconds.  This is the
2368    /// time it took to process\nthe request and generate the response.",
2369    ///      "examples": [
2370    ///        32
2371    ///      ],
2372    ///      "type": "integer",
2373    ///      "format": "uint64"
2374    ///    },
2375    ///    "status": {
2376    ///      "description": "The status of the response.",
2377    ///      "allOf": [
2378    ///        {
2379    ///          "$ref": "#/components/schemas/ResponseStatus"
2380    ///        }
2381    ///      ]
2382    ///    }
2383    ///  }
2384    ///}
2385    /// ```
2386    /// </details>
2387    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2388    pub struct CreateCertificateResponse {
2389        ///The response data for this request.
2390        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2391        pub data: ::std::option::Option<CreateCertificateResponseData>,
2392        ///A list of errors which may have occurred during the request.
2393        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2394        pub errors: ::std::vec::Vec<ResponseError>,
2395        ///An optional message providing additional information about the
2396        /// status. This field is useful when the status is not
2397        /// `success`.
2398        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2399        pub message: ::std::option::Option<::std::string::String>,
2400        ///The operation time in microseconds.  This is the time it took to
2401        /// process the request and generate the response.
2402        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2403        pub op_time_us: ::std::option::Option<u64>,
2404        ///The status of the response.
2405        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2406        pub status: ::std::option::Option<ResponseStatus>,
2407    }
2408
2409    impl ::std::convert::From<&CreateCertificateResponse> for CreateCertificateResponse {
2410        fn from(value: &CreateCertificateResponse) -> Self {
2411            value.clone()
2412        }
2413    }
2414
2415    impl ::std::default::Default for CreateCertificateResponse {
2416        fn default() -> Self {
2417            Self {
2418                data: Default::default(),
2419                errors: Default::default(),
2420                message: Default::default(),
2421                op_time_us: Default::default(),
2422                status: Default::default(),
2423            }
2424        }
2425    }
2426
2427    ///`CreateCertificateResponseData`
2428    ///
2429    /// <details><summary>JSON schema</summary>
2430    ///
2431    /// ```json
2432    ///{
2433    ///  "type": "object",
2434    ///  "properties": {
2435    ///    "certificates": {
2436    ///      "description": "The certificate which was created by this
2437    /// request.\n\nNote: only one certificate can be specified in the request,
2438    /// so this\nwill always contain a single entry.",
2439    ///      "type": "array",
2440    ///      "items": {
2441    ///        "$ref": "#/components/schemas/Certificate"
2442    ///      }
2443    ///    }
2444    ///  }
2445    ///}
2446    /// ```
2447    /// </details>
2448    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2449    pub struct CreateCertificateResponseData {
2450        ///The certificate which was created by this request.
2451        ///
2452        ///Note: only one certificate can be specified in the request, so this
2453        ///will always contain a single entry.
2454        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2455        pub certificates: ::std::vec::Vec<Certificate>,
2456    }
2457
2458    impl ::std::convert::From<&CreateCertificateResponseData> for CreateCertificateResponseData {
2459        fn from(value: &CreateCertificateResponseData) -> Self {
2460            value.clone()
2461        }
2462    }
2463
2464    impl ::std::default::Default for CreateCertificateResponseData {
2465        fn default() -> Self {
2466            Self {
2467                certificates: Default::default(),
2468            }
2469        }
2470    }
2471
2472    ///The request message for creating a new instance.
2473    ///
2474    /// <details><summary>JSON schema</summary>
2475    ///
2476    /// ```json
2477    ///{
2478    ///  "description": "The request message for creating a new instance.",
2479    ///  "type": "object",
2480    ///  "required": [
2481    ///    "image"
2482    ///  ],
2483    ///  "properties": {
2484    ///    "args": {
2485    ///      "description": "(Optional).  The arguments to pass to the instance
2486    /// when it starts.",
2487    ///      "examples": [
2488    ///        "--port=8080 --debug"
2489    ///      ],
2490    ///      "type": "array",
2491    ///      "items": {
2492    ///        "type": "string"
2493    ///      }
2494    ///    },
2495    ///    "autostart": {
2496    ///      "description": "Whether the instance should start automatically on
2497    /// creation.",
2498    ///      "examples": [
2499    ///        true
2500    ///      ],
2501    ///      "type": "boolean"
2502    ///    },
2503    ///    "env": {
2504    ///      "description": "(Optional).  Environment variables to set for the
2505    /// instance.",
2506    ///      "examples": [
2507    ///        {
2508    ///          "ENV_VAR1": "value1",
2509    ///          "ENV_VAR2": "value2"
2510    ///        }
2511    ///      ],
2512    ///      "type": "object",
2513    ///      "additionalProperties": {
2514    ///        "type": "string"
2515    ///      }
2516    ///    },
2517    ///    "features": {
2518    ///      "description": "Features to enable for the instance.  Features are
2519    /// specific\nconfigurations or capabilities that can be enabled for the
2520    /// instance.",
2521    ///      "type": "array",
2522    ///      "items": {
2523    ///        "type": "string",
2524    ///        "format": "enum",
2525    ///        "enum": [
2526    ///          "delete_on_stop"
2527    ///        ]
2528    ///      }
2529    ///    },
2530    ///    "image": {
2531    ///      "description": "The image to use for the instance.",
2532    ///      "examples": [
2533    ///        "nginx:latest"
2534    ///      ],
2535    ///      "type": "string"
2536    ///    },
2537    ///    "memory_mb": {
2538    ///      "description": "(Optional).  Memory in MB to allocate for the
2539    /// instance.  Default is 128.",
2540    ///      "examples": [
2541    ///        256
2542    ///      ],
2543    ///      "type": "integer",
2544    ///      "format": "int64"
2545    ///    },
2546    ///    "name": {
2547    ///      "description": "(Optional).  The name of the instance.\n\nIf not provided, a random name will be generated.  The name must be unique.",
2548    ///      "examples": [
2549    ///        "funky-town-g756b5d"
2550    ///      ],
2551    ///      "type": "string"
2552    ///    },
2553    ///    "replicas": {
2554    ///      "description": "Number of replicas for the instance.",
2555    ///      "examples": [
2556    ///        5
2557    ///      ],
2558    ///      "type": "integer",
2559    ///      "format": "int64"
2560    ///    },
2561    ///    "restart_policy": {
2562    ///      "description": "Restart policy for the instance.  This defines how
2563    /// the instance should\nbehave when it stops or crashes.",
2564    ///      "type": "string",
2565    ///      "format": "enum",
2566    ///      "enum": [
2567    ///        "never",
2568    ///        "always",
2569    ///        "on_failure"
2570    ///      ]
2571    ///    },
2572    ///    "scale_to_zero": {
2573    ///      "description": "Scale-to-zero configuration for the instance.",
2574    ///      "allOf": [
2575    ///        {
2576    ///          "$ref": "#/components/schemas/InstanceScaleToZero"
2577    ///        }
2578    ///      ]
2579    ///    },
2580    ///    "service_group": {
2581    ///      "description": "(Optional).  The service group configuration when
2582    /// creating an instance.\n\nWhen creating an instance, either a previously
2583    /// created (persistent) service\ngroup can be referenced (either through
2584    /// its name or UUID), or a new\n(ephemeral) service group can be created
2585    /// for the instance by specifying the\nlist of services it should expose
2586    /// and optionally the domains it should use.",
2587    ///      "allOf": [
2588    ///        {
2589    ///          "$ref":
2590    /// "#/components/schemas/CreateInstanceRequestServiceGroup"
2591    ///        }
2592    ///      ]
2593    ///    },
2594    ///    "vcpus": {
2595    ///      "description": "Number of vCPUs to allocate for the instance.",
2596    ///      "examples": [
2597    ///        1
2598    ///      ],
2599    ///      "type": "integer",
2600    ///      "format": "int32"
2601    ///    },
2602    ///    "volumes": {
2603    ///      "description": "Volumes to attach to the instance.\n\nThis list can
2604    /// contain both existing and new volumes to create as part of\nthe instance
2605    /// creation.  Existing volumes can be referenced by their name or\nUUID.
2606    /// New volumes can be created by specifying a name, size in MiB, and\nmount
2607    /// point in the instance.  The mount point is the directory in
2608    /// the\ninstance where the volume will be mounted.",
2609    ///      "type": "array",
2610    ///      "items": {
2611    ///        "$ref": "#/components/schemas/CreateInstanceRequestVolume"
2612    ///      }
2613    ///    },
2614    ///    "wait_timeout_ms": {
2615    ///      "description": "Timeout to wait for all new instances to reach
2616    /// running state in\nmilliseconds.  If you autostart your new instance, you
2617    /// can wait for it to\nfinish starting with a blocking API call if you
2618    /// specify a wait timeout\ngreater than zero.  No wait performed for a
2619    /// value of 0.",
2620    ///      "examples": [
2621    ///        2000
2622    ///      ],
2623    ///      "type": "integer",
2624    ///      "format": "int64"
2625    ///    }
2626    ///  }
2627    ///}
2628    /// ```
2629    /// </details>
2630    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2631    pub struct CreateInstanceRequest {
2632        ///(Optional).  The arguments to pass to the instance when it starts.
2633        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2634        pub args: ::std::vec::Vec<::std::string::String>,
2635        ///Whether the instance should start automatically on creation.
2636        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2637        pub autostart: ::std::option::Option<bool>,
2638        ///(Optional).  Environment variables to set for the instance.
2639        #[serde(
2640            default,
2641            skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
2642        )]
2643        pub env: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
2644        ///Features to enable for the instance.  Features are specific
2645        ///configurations or capabilities that can be enabled for the instance.
2646        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2647        pub features: ::std::vec::Vec<CreateInstanceRequestFeaturesItem>,
2648        ///The image to use for the instance.
2649        pub image: ::std::string::String,
2650        ///(Optional).  Memory in MB to allocate for the instance.  Default is
2651        /// 128.
2652        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2653        pub memory_mb: ::std::option::Option<i64>,
2654        ///(Optional).  The name of the instance.
2655        ///
2656        ///If not provided, a random name will be generated.  The name must be
2657        /// unique.
2658        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2659        pub name: ::std::option::Option<::std::string::String>,
2660        ///Number of replicas for the instance.
2661        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2662        pub replicas: ::std::option::Option<i64>,
2663        ///Restart policy for the instance.  This defines how the instance
2664        /// should behave when it stops or crashes.
2665        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2666        pub restart_policy: ::std::option::Option<CreateInstanceRequestRestartPolicy>,
2667        ///Scale-to-zero configuration for the instance.
2668        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2669        pub scale_to_zero: ::std::option::Option<InstanceScaleToZero>,
2670        ///(Optional).  The service group configuration when creating an
2671        /// instance.
2672        ///
2673        ///When creating an instance, either a previously created (persistent)
2674        /// service group can be referenced (either through its name or
2675        /// UUID), or a new (ephemeral) service group can be created for
2676        /// the instance by specifying the list of services it should
2677        /// expose and optionally the domains it should use.
2678        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2679        pub service_group: ::std::option::Option<CreateInstanceRequestServiceGroup>,
2680        ///Number of vCPUs to allocate for the instance.
2681        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2682        pub vcpus: ::std::option::Option<i32>,
2683        ///Volumes to attach to the instance.
2684        ///
2685        ///This list can contain both existing and new volumes to create as
2686        /// part of the instance creation.  Existing volumes can be
2687        /// referenced by their name or UUID.  New volumes can be
2688        /// created by specifying a name, size in MiB, and mount point
2689        /// in the instance.  The mount point is the directory in the
2690        /// instance where the volume will be mounted.
2691        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2692        pub volumes: ::std::vec::Vec<CreateInstanceRequestVolume>,
2693        ///Timeout to wait for all new instances to reach running state in
2694        ///milliseconds.  If you autostart your new instance, you can wait for
2695        /// it to finish starting with a blocking API call if you
2696        /// specify a wait timeout greater than zero.  No wait performed
2697        /// for a value of 0.
2698        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2699        pub wait_timeout_ms: ::std::option::Option<i64>,
2700    }
2701
2702    impl ::std::convert::From<&CreateInstanceRequest> for CreateInstanceRequest {
2703        fn from(value: &CreateInstanceRequest) -> Self {
2704            value.clone()
2705        }
2706    }
2707
2708    ///The domain configuration for the service group.
2709    ///
2710    ///A domain defines a publicly accessible domain name for the instance.  If
2711    ///the domain name ends with a period `.`, it must be a valid Fully
2712    /// Qualified Domain Name (FQDN), otherwise it will become a subdomain
2713    /// of the target metro.  The domain can be associated with an existing
2714    /// certificate by specifying the certificate's name or UUID.  If no
2715    /// certificate is specified and a FQDN is provided, Unikraft Cloud will
2716    /// automatically generate a new certificate for the domain based on
2717    /// Let's Encrypt and seek to accomplish a DNS-01 challenge.
2718    ///
2719    /// <details><summary>JSON schema</summary>
2720    ///
2721    /// ```json
2722    ///{
2723    ///  "description": "The domain configuration for the service group.\n\nA
2724    /// domain defines a publicly accessible domain name for the instance.
2725    /// If\nthe domain name ends with a period `.`, it must be a valid Fully
2726    /// Qualified\nDomain Name (FQDN), otherwise it will become a subdomain of
2727    /// the target\nmetro.  The domain can be associated with an existing
2728    /// certificate by\nspecifying the certificate's name or UUID.  If no
2729    /// certificate is specified\nand a FQDN is provided, Unikraft Cloud will
2730    /// automatically generate a new\ncertificate for the domain based on Let's
2731    /// Encrypt and seek to accomplish a\nDNS-01 challenge.",
2732    ///  "type": "object",
2733    ///  "allOf": [
2734    ///    {
2735    ///      "type": "object",
2736    ///      "properties": {
2737    ///        "name": {
2738    ///          "description": "Publicly accessible domain name.\n\nIf this name ends in a period `.` it must be a valid Full Qualified\nDomain Name (FQDN), e.g. `example.com.`; otherwise it will become a\nsubdomain of the target metro, e.g. `example` becomes\n`example.fra0.unikraft.app`.",
2739    ///          "examples": [
2740    ///            "funky-town-g756b5d.fra0.unikraft.app."
2741    ///          ],
2742    ///          "type": "string"
2743    ///        }
2744    ///      }
2745    ///    },
2746    ///    {
2747    ///      "oneOf": [
2748    ///        {
2749    ///          "title": "certificate",
2750    ///          "type": "object",
2751    ///          "properties": {
2752    ///            "certificate": {
2753    ///              "description": "A reference to an existing certificate
2754    /// which can be used for the\nspecified domain.  If unspecified, Unikraft
2755    /// Cloud will\nautomatically generate a new certificate for the domain
2756    /// based on Let's\nEncrypt and seek to accomplish a DNS-01 challenge.",
2757    ///              "allOf": [
2758    ///                {
2759    ///                  "$ref": "#/components/schemas/NameOrUUID"
2760    ///                }
2761    ///              ]
2762    ///            }
2763    ///          }
2764    ///        }
2765    ///      ]
2766    ///    }
2767    ///  ],
2768    ///  "required": [
2769    ///    "name"
2770    ///  ]
2771    ///}
2772    /// ```
2773    /// </details>
2774    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
2775    pub struct CreateInstanceRequestDomain {
2776        ///A reference to an existing certificate which can be used for the
2777        ///specified domain.  If unspecified, Unikraft Cloud will
2778        ///automatically generate a new certificate for the domain based on
2779        /// Let's Encrypt and seek to accomplish a DNS-01 challenge.
2780        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
2781        pub certificate: ::std::option::Option<NameOrUuid>,
2782        ///Publicly accessible domain name.
2783        ///
2784        ///If this name ends in a period `.` it must be a valid Full Qualified
2785        ///Domain Name (FQDN), e.g. `example.com.`; otherwise it will become a
2786        ///subdomain of the target metro, e.g. `example` becomes
2787        ///`example.fra0.unikraft.app`.
2788        pub name: ::std::string::String,
2789    }
2790
2791    impl ::std::convert::From<&CreateInstanceRequestDomain> for CreateInstanceRequestDomain {
2792        fn from(value: &CreateInstanceRequestDomain) -> Self {
2793            value.clone()
2794        }
2795    }
2796
2797    ///`CreateInstanceRequestFeaturesItem`
2798    ///
2799    /// <details><summary>JSON schema</summary>
2800    ///
2801    /// ```json
2802    ///{
2803    ///  "type": "string",
2804    ///  "format": "enum",
2805    ///  "enum": [
2806    ///    "delete_on_stop"
2807    ///  ]
2808    ///}
2809    /// ```
2810    /// </details>
2811    #[derive(
2812        :: serde :: Deserialize,
2813        :: serde :: Serialize,
2814        Clone,
2815        Copy,
2816        Debug,
2817        Eq,
2818        Hash,
2819        Ord,
2820        PartialEq,
2821        PartialOrd,
2822    )]
2823    pub enum CreateInstanceRequestFeaturesItem {
2824        #[serde(rename = "delete_on_stop")]
2825        DeleteOnStop,
2826    }
2827
2828    impl ::std::convert::From<&Self> for CreateInstanceRequestFeaturesItem {
2829        fn from(value: &CreateInstanceRequestFeaturesItem) -> Self {
2830            value.clone()
2831        }
2832    }
2833
2834    impl ::std::fmt::Display for CreateInstanceRequestFeaturesItem {
2835        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2836            match *self {
2837                Self::DeleteOnStop => write!(f, "delete_on_stop"),
2838            }
2839        }
2840    }
2841
2842    impl ::std::str::FromStr for CreateInstanceRequestFeaturesItem {
2843        type Err = self::error::ConversionError;
2844        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2845            match value {
2846                "delete_on_stop" => Ok(Self::DeleteOnStop),
2847                _ => Err("invalid value".into()),
2848            }
2849        }
2850    }
2851
2852    impl ::std::convert::TryFrom<&str> for CreateInstanceRequestFeaturesItem {
2853        type Error = self::error::ConversionError;
2854        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2855            value.parse()
2856        }
2857    }
2858
2859    impl ::std::convert::TryFrom<&::std::string::String> for CreateInstanceRequestFeaturesItem {
2860        type Error = self::error::ConversionError;
2861        fn try_from(
2862            value: &::std::string::String,
2863        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2864            value.parse()
2865        }
2866    }
2867
2868    impl ::std::convert::TryFrom<::std::string::String> for CreateInstanceRequestFeaturesItem {
2869        type Error = self::error::ConversionError;
2870        fn try_from(
2871            value: ::std::string::String,
2872        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2873            value.parse()
2874        }
2875    }
2876
2877    ///Restart policy for the instance.  This defines how the instance should
2878    ///behave when it stops or crashes.
2879    ///
2880    /// <details><summary>JSON schema</summary>
2881    ///
2882    /// ```json
2883    ///{
2884    ///  "description": "Restart policy for the instance.  This defines how the
2885    /// instance should\nbehave when it stops or crashes.",
2886    ///  "type": "string",
2887    ///  "format": "enum",
2888    ///  "enum": [
2889    ///    "never",
2890    ///    "always",
2891    ///    "on_failure"
2892    ///  ]
2893    ///}
2894    /// ```
2895    /// </details>
2896    #[derive(
2897        :: serde :: Deserialize,
2898        :: serde :: Serialize,
2899        Clone,
2900        Copy,
2901        Debug,
2902        Eq,
2903        Hash,
2904        Ord,
2905        PartialEq,
2906        PartialOrd,
2907    )]
2908    pub enum CreateInstanceRequestRestartPolicy {
2909        #[serde(rename = "never")]
2910        Never,
2911        #[serde(rename = "always")]
2912        Always,
2913        #[serde(rename = "on_failure")]
2914        OnFailure,
2915    }
2916
2917    impl ::std::convert::From<&Self> for CreateInstanceRequestRestartPolicy {
2918        fn from(value: &CreateInstanceRequestRestartPolicy) -> Self {
2919            value.clone()
2920        }
2921    }
2922
2923    impl ::std::fmt::Display for CreateInstanceRequestRestartPolicy {
2924        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2925            match *self {
2926                Self::Never => write!(f, "never"),
2927                Self::Always => write!(f, "always"),
2928                Self::OnFailure => write!(f, "on_failure"),
2929            }
2930        }
2931    }
2932
2933    impl ::std::str::FromStr for CreateInstanceRequestRestartPolicy {
2934        type Err = self::error::ConversionError;
2935        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2936            match value {
2937                "never" => Ok(Self::Never),
2938                "always" => Ok(Self::Always),
2939                "on_failure" => Ok(Self::OnFailure),
2940                _ => Err("invalid value".into()),
2941            }
2942        }
2943    }
2944
2945    impl ::std::convert::TryFrom<&str> for CreateInstanceRequestRestartPolicy {
2946        type Error = self::error::ConversionError;
2947        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2948            value.parse()
2949        }
2950    }
2951
2952    impl ::std::convert::TryFrom<&::std::string::String> for CreateInstanceRequestRestartPolicy {
2953        type Error = self::error::ConversionError;
2954        fn try_from(
2955            value: &::std::string::String,
2956        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2957            value.parse()
2958        }
2959    }
2960
2961    impl ::std::convert::TryFrom<::std::string::String> for CreateInstanceRequestRestartPolicy {
2962        type Error = self::error::ConversionError;
2963        fn try_from(
2964            value: ::std::string::String,
2965        ) -> ::std::result::Result<Self, self::error::ConversionError> {
2966            value.parse()
2967        }
2968    }
2969
2970    ///The service group configuration when creating an instance.
2971    ///
2972    ///If no existing (persistent) service group is specified via its
2973    /// identifier, a new (ephemeral) service group can be created by
2974    /// specifying the services it should expose.  A service defines the
2975    /// configuration settings of an exposed port by the instance.  A
2976    /// service is a combination of a public port, an internal port, and a
2977    /// set of handlers that define how the service will handle incoming
2978    /// connections.
2979    ///
2980    /// <details><summary>JSON schema</summary>
2981    ///
2982    /// ```json
2983    ///{
2984    ///  "description": "The service group configuration when creating an
2985    /// instance.\n\nIf no existing (persistent) service group is specified via
2986    /// its identifier,\na new (ephemeral) service group can be created by
2987    /// specifying the services\nit should expose.  A service defines the
2988    /// configuration settings of an\nexposed port by the instance.  A service
2989    /// is a combination of a public port,\nan internal port, and a set of
2990    /// handlers that define how the service will\nhandle incoming
2991    /// connections.",
2992    ///  "type": "object",
2993    ///  "allOf": [
2994    ///    {
2995    ///      "type": "object",
2996    ///      "properties": {
2997    ///        "domains": {
2998    ///          "description": "Similarly, if no existing (persistent) service
2999    /// group is specified via its\nidentifier, a new (ephemeral) service group
3000    /// can be created.  In addition\nto the services it must expose, you can
3001    /// specify which domains it should\nuse too.",
3002    ///          "type": "array",
3003    ///          "items": {
3004    ///            "$ref": "#/components/schemas/CreateInstanceRequestDomain"
3005    ///          }
3006    ///        },
3007    ///        "services": {
3008    ///          "description": "If no existing service identifier is provided,
3009    /// one or more new\n(ephemeral, non-persistent) service(s) can be created
3010    /// with the following\ndefinitions.",
3011    ///          "type": "array",
3012    ///          "items": {
3013    ///            "$ref": "#/components/schemas/Service"
3014    ///          }
3015    ///        }
3016    ///      }
3017    ///    },
3018    ///    {
3019    ///      "oneOf": [
3020    ///        {
3021    ///          "title": "uuid",
3022    ///          "type": "object",
3023    ///          "required": [
3024    ///            "uuid"
3025    ///          ],
3026    ///          "properties": {
3027    ///            "uuid": {
3028    ///              "description": "(Optional).  Reference an existing
3029    /// (persistent) service group by its\nUUID.  Mutually exclusive with
3030    /// name.",
3031    ///              "examples": [
3032    ///                "123e4567-e89b-12d3-a456-426614174000"
3033    ///              ],
3034    ///              "type": "string",
3035    ///              "format": "uuid"
3036    ///            }
3037    ///          }
3038    ///        },
3039    ///        {
3040    ///          "title": "name",
3041    ///          "type": "object",
3042    ///          "required": [
3043    ///            "name"
3044    ///          ],
3045    ///          "properties": {
3046    ///            "name": {
3047    ///              "description": "(Optional).  Reference an existing
3048    /// (persistent) service group by its\nname.  Mutually exclusive with
3049    /// UUID.",
3050    ///              "examples": [
3051    ///                "funky-service-g756b5d"
3052    ///              ],
3053    ///              "type": "string"
3054    ///            }
3055    ///          }
3056    ///        }
3057    ///      ]
3058    ///    }
3059    ///  ]
3060    ///}
3061    /// ```
3062    /// </details>
3063    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3064    #[serde(untagged)]
3065    pub enum CreateInstanceRequestServiceGroup {
3066        Variant0 {
3067            ///Similarly, if no existing (persistent) service group is
3068            /// specified via its identifier, a new (ephemeral)
3069            /// service group can be created.  In addition
3070            /// to the services it must expose, you can specify which domains it
3071            /// should use too.
3072            #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3073            domains: ::std::vec::Vec<CreateInstanceRequestDomain>,
3074            ///If no existing service identifier is provided, one or more new
3075            ///(ephemeral, non-persistent) service(s) can be created with the
3076            /// following definitions.
3077            #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3078            services: ::std::vec::Vec<Service>,
3079            ///(Optional).  Reference an existing (persistent) service group by
3080            /// its UUID.  Mutually exclusive with name.
3081            uuid: ::uuid::Uuid,
3082        },
3083        Variant1 {
3084            ///Similarly, if no existing (persistent) service group is
3085            /// specified via its identifier, a new (ephemeral)
3086            /// service group can be created.  In addition
3087            /// to the services it must expose, you can specify which domains it
3088            /// should use too.
3089            #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3090            domains: ::std::vec::Vec<CreateInstanceRequestDomain>,
3091            ///(Optional).  Reference an existing (persistent) service group by
3092            /// its name.  Mutually exclusive with UUID.
3093            name: ::std::string::String,
3094            ///If no existing service identifier is provided, one or more new
3095            ///(ephemeral, non-persistent) service(s) can be created with the
3096            /// following definitions.
3097            #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3098            services: ::std::vec::Vec<Service>,
3099        },
3100    }
3101
3102    impl ::std::convert::From<&Self> for CreateInstanceRequestServiceGroup {
3103        fn from(value: &CreateInstanceRequestServiceGroup) -> Self {
3104            value.clone()
3105        }
3106    }
3107
3108    ///A volume defines a storage volume that can be attached to the instance.
3109    ///
3110    /// <details><summary>JSON schema</summary>
3111    ///
3112    /// ```json
3113    ///{
3114    ///  "description": "A volume defines a storage volume that can be attached
3115    /// to the instance.",
3116    ///  "type": "object",
3117    ///  "required": [
3118    ///    "at"
3119    ///  ],
3120    ///  "properties": {
3121    ///    "at": {
3122    ///      "description": "The mount point for the volume in the instance.",
3123    ///      "examples": [
3124    ///        "/mnt/funky-volume"
3125    ///      ],
3126    ///      "type": "string"
3127    ///    },
3128    ///    "name": {
3129    ///      "description": "The name of the volume.\n\nIf this is the only
3130    /// specified field, then it will look up an existing\nvolume by this name.
3131    /// If the volume does not exist, the request will\nfail.  If a new volume
3132    /// is intended to be created, then this field must be\nspecified along with
3133    /// the size in MiB and the mount point in the instance.",
3134    ///      "examples": [
3135    ///        "funky-volume-g756b5d"
3136    ///      ],
3137    ///      "type": "string"
3138    ///    },
3139    ///    "read_only": {
3140    ///      "description": "Whether the volume is read-only.\n\nIf this field
3141    /// is set to true, the volume will be mounted as read-only in\nthe
3142    /// instance.  This field is optional and defaults to false and is
3143    /// only\napplicable when using an existing volume.",
3144    ///      "examples": [
3145    ///        256
3146    ///      ],
3147    ///      "type": "boolean"
3148    ///    },
3149    ///    "size_mb": {
3150    ///      "description": "The size of the volume when creating a new
3151    /// volume.\n\nWhen creating a new volume as part of the instance create
3152    /// request,\nspecify the size of the volume in MiB.",
3153    ///      "examples": [
3154    ///        32
3155    ///      ],
3156    ///      "type": "integer",
3157    ///      "format": "int64"
3158    ///    },
3159    ///    "uuid": {
3160    ///      "description": "The UUID of an existing volume.\n\nIf this is the
3161    /// only specified field, then it will look up an existing\nvolume by this
3162    /// UUID.",
3163    ///      "examples": [
3164    ///        "123e4567-e89b-12d3-a456-426614174000"
3165    ///      ],
3166    ///      "type": "string",
3167    ///      "format": "uuid"
3168    ///    }
3169    ///  }
3170    ///}
3171    /// ```
3172    /// </details>
3173    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3174    pub struct CreateInstanceRequestVolume {
3175        ///The mount point for the volume in the instance.
3176        pub at: ::std::string::String,
3177        ///The name of the volume.
3178        ///
3179        ///If this is the only specified field, then it will look up an
3180        /// existing volume by this name.  If the volume does not exist,
3181        /// the request will fail.  If a new volume is intended to be
3182        /// created, then this field must be specified along with the
3183        /// size in MiB and the mount point in the instance.
3184        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3185        pub name: ::std::option::Option<::std::string::String>,
3186        ///Whether the volume is read-only.
3187        ///
3188        ///If this field is set to true, the volume will be mounted as
3189        /// read-only in the instance.  This field is optional and
3190        /// defaults to false and is only applicable when using an
3191        /// existing volume.
3192        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3193        pub read_only: ::std::option::Option<bool>,
3194        ///The size of the volume when creating a new volume.
3195        ///
3196        ///When creating a new volume as part of the instance create request,
3197        ///specify the size of the volume in MiB.
3198        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3199        pub size_mb: ::std::option::Option<i64>,
3200        ///The UUID of an existing volume.
3201        ///
3202        ///If this is the only specified field, then it will look up an
3203        /// existing volume by this UUID.
3204        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3205        pub uuid: ::std::option::Option<::uuid::Uuid>,
3206    }
3207
3208    impl ::std::convert::From<&CreateInstanceRequestVolume> for CreateInstanceRequestVolume {
3209        fn from(value: &CreateInstanceRequestVolume) -> Self {
3210            value.clone()
3211        }
3212    }
3213
3214    ///The response message for creating a new instance.
3215    ///
3216    /// <details><summary>JSON schema</summary>
3217    ///
3218    /// ```json
3219    ///{
3220    ///  "description": "The response message for creating a new instance.",
3221    ///  "type": "object",
3222    ///  "properties": {
3223    ///    "data": {
3224    ///      "description": "The response data for this request.",
3225    ///      "allOf": [
3226    ///        {
3227    ///          "$ref": "#/components/schemas/CreateInstanceResponseData"
3228    ///        }
3229    ///      ]
3230    ///    },
3231    ///    "errors": {
3232    ///      "description": "A list of errors which may have occurred during the
3233    /// request.",
3234    ///      "type": "array",
3235    ///      "items": {
3236    ///        "$ref": "#/components/schemas/ResponseError"
3237    ///      }
3238    ///    },
3239    ///    "message": {
3240    ///      "description": "An optional message providing additional
3241    /// information about the status.\nThis field is useful when the status is
3242    /// not `success`.",
3243    ///      "examples": [
3244    ///        "Failed to perform all operations"
3245    ///      ],
3246    ///      "type": "string"
3247    ///    },
3248    ///    "op_time_us": {
3249    ///      "description": "The operation time in microseconds.  This is the
3250    /// time it took to process\nthe request and generate the response.",
3251    ///      "examples": [
3252    ///        875
3253    ///      ],
3254    ///      "type": "integer",
3255    ///      "format": "uint64"
3256    ///    },
3257    ///    "status": {
3258    ///      "description": "The status of the response.",
3259    ///      "allOf": [
3260    ///        {
3261    ///          "$ref": "#/components/schemas/ResponseStatus"
3262    ///        }
3263    ///      ]
3264    ///    }
3265    ///  }
3266    ///}
3267    /// ```
3268    /// </details>
3269    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3270    pub struct CreateInstanceResponse {
3271        ///The response data for this request.
3272        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3273        pub data: ::std::option::Option<CreateInstanceResponseData>,
3274        ///A list of errors which may have occurred during the request.
3275        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3276        pub errors: ::std::vec::Vec<ResponseError>,
3277        ///An optional message providing additional information about the
3278        /// status. This field is useful when the status is not
3279        /// `success`.
3280        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3281        pub message: ::std::option::Option<::std::string::String>,
3282        ///The operation time in microseconds.  This is the time it took to
3283        /// process the request and generate the response.
3284        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3285        pub op_time_us: ::std::option::Option<u64>,
3286        ///The status of the response.
3287        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3288        pub status: ::std::option::Option<ResponseStatus>,
3289    }
3290
3291    impl ::std::convert::From<&CreateInstanceResponse> for CreateInstanceResponse {
3292        fn from(value: &CreateInstanceResponse) -> Self {
3293            value.clone()
3294        }
3295    }
3296
3297    impl ::std::default::Default for CreateInstanceResponse {
3298        fn default() -> Self {
3299            Self {
3300                data: Default::default(),
3301                errors: Default::default(),
3302                message: Default::default(),
3303                op_time_us: Default::default(),
3304                status: Default::default(),
3305            }
3306        }
3307    }
3308
3309    ///`CreateInstanceResponseData`
3310    ///
3311    /// <details><summary>JSON schema</summary>
3312    ///
3313    /// ```json
3314    ///{
3315    ///  "type": "object",
3316    ///  "properties": {
3317    ///    "instances": {
3318    ///      "description": "The instance that was created in this request.",
3319    ///      "type": "array",
3320    ///      "items": {
3321    ///        "$ref": "#/components/schemas/Instance"
3322    ///      }
3323    ///    }
3324    ///  }
3325    ///}
3326    /// ```
3327    /// </details>
3328    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3329    pub struct CreateInstanceResponseData {
3330        ///The instance that was created in this request.
3331        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3332        pub instances: ::std::vec::Vec<Instance>,
3333    }
3334
3335    impl ::std::convert::From<&CreateInstanceResponseData> for CreateInstanceResponseData {
3336        fn from(value: &CreateInstanceResponseData) -> Self {
3337            value.clone()
3338        }
3339    }
3340
3341    impl ::std::default::Default for CreateInstanceResponseData {
3342        fn default() -> Self {
3343            Self {
3344                instances: Default::default(),
3345            }
3346        }
3347    }
3348
3349    ///The request message for creating a new service group.
3350    ///
3351    /// <details><summary>JSON schema</summary>
3352    ///
3353    /// ```json
3354    ///{
3355    ///  "description": "The request message for creating a new service group.",
3356    ///  "type": "object",
3357    ///  "properties": {
3358    ///    "domains": {
3359    ///      "description": "Description of domains associated with the service
3360    /// group.",
3361    ///      "type": "array",
3362    ///      "items": {
3363    ///        "$ref": "#/components/schemas/CreateServiceGroupRequestDomain"
3364    ///      }
3365    ///    },
3366    ///    "hard_limit": {
3367    ///      "description": "The hard limit defines the maximum number of
3368    /// concurrent requests that an\ninstance assigned to the this service can
3369    /// handle.\n\nThe load balancer will never assign more requests to a single
3370    /// instance.  In\ncase there are no other instances available, excess
3371    /// requests fail (i.e.,\nthey are blocked and not queued).",
3372    ///      "examples": [
3373    ///        100
3374    ///      ],
3375    ///      "type": "integer",
3376    ///      "format": "uint64"
3377    ///    },
3378    ///    "name": {
3379    ///      "description": "Name of the service group.  This is a
3380    /// human-readable name that can be used\nto identify the service group.
3381    /// The name must be unique within the context\nof your account.  If no name
3382    /// is specified, a random name is generated for\nyou.  The name can also be
3383    /// used to identify the service group in API calls.",
3384    ///      "examples": [
3385    ///        "funky-service-g7gum5cj"
3386    ///      ],
3387    ///      "type": "string"
3388    ///    },
3389    ///    "services": {
3390    ///      "description": "Description of exposed services.",
3391    ///      "type": "array",
3392    ///      "items": {
3393    ///        "$ref": "#/components/schemas/Service"
3394    ///      }
3395    ///    },
3396    ///    "soft_limit": {
3397    ///      "description": "The soft limit is used by the Unikraft Cloud load
3398    /// balancer to decide when\nto wake up another standby instance.\n\nFor
3399    /// example, if the soft limit is set to 5 and the service consists of
3400    /// 2\nstandby instances, one of the instances receives up to 5
3401    /// concurrent\nrequests.  The 6th parallel requests wakes up the second
3402    /// instance.  If\nthere are no more standby instances to wake up, the
3403    /// number of requests\nassigned to each instance will exceed the soft
3404    /// limit.  The load balancer\nmakes sure that when the number of in-flight
3405    /// requests goes down again,\ninstances are put into standby as fast as
3406    /// possible.",
3407    ///      "examples": [
3408    ///        1
3409    ///      ],
3410    ///      "type": "integer",
3411    ///      "format": "uint64"
3412    ///    }
3413    ///  }
3414    ///}
3415    /// ```
3416    /// </details>
3417    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3418    pub struct CreateServiceGroupRequest {
3419        ///Description of domains associated with the service group.
3420        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3421        pub domains: ::std::vec::Vec<CreateServiceGroupRequestDomain>,
3422        ///The hard limit defines the maximum number of concurrent requests
3423        /// that an instance assigned to the this service can handle.
3424        ///
3425        ///The load balancer will never assign more requests to a single
3426        /// instance.  In case there are no other instances available,
3427        /// excess requests fail (i.e., they are blocked and not
3428        /// queued).
3429        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3430        pub hard_limit: ::std::option::Option<u64>,
3431        ///Name of the service group.  This is a human-readable name that can
3432        /// be used to identify the service group.  The name must be
3433        /// unique within the context of your account.  If no name is
3434        /// specified, a random name is generated for you.  The name can
3435        /// also be used to identify the service group in API calls.
3436        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3437        pub name: ::std::option::Option<::std::string::String>,
3438        ///Description of exposed services.
3439        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3440        pub services: ::std::vec::Vec<Service>,
3441        ///The soft limit is used by the Unikraft Cloud load balancer to decide
3442        /// when to wake up another standby instance.
3443        ///
3444        ///For example, if the soft limit is set to 5 and the service consists
3445        /// of 2 standby instances, one of the instances receives up to
3446        /// 5 concurrent requests.  The 6th parallel requests wakes up
3447        /// the second instance.  If there are no more standby instances
3448        /// to wake up, the number of requests assigned to each instance
3449        /// will exceed the soft limit.  The load balancer makes sure
3450        /// that when the number of in-flight requests goes down again,
3451        /// instances are put into standby as fast as possible.
3452        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3453        pub soft_limit: ::std::option::Option<u64>,
3454    }
3455
3456    impl ::std::convert::From<&CreateServiceGroupRequest> for CreateServiceGroupRequest {
3457        fn from(value: &CreateServiceGroupRequest) -> Self {
3458            value.clone()
3459        }
3460    }
3461
3462    impl ::std::default::Default for CreateServiceGroupRequest {
3463        fn default() -> Self {
3464            Self {
3465                domains: Default::default(),
3466                hard_limit: Default::default(),
3467                name: Default::default(),
3468                services: Default::default(),
3469                soft_limit: Default::default(),
3470            }
3471        }
3472    }
3473
3474    ///A domain name
3475    ///
3476    /// <details><summary>JSON schema</summary>
3477    ///
3478    /// ```json
3479    ///{
3480    ///  "description": "A domain name",
3481    ///  "type": "object",
3482    ///  "required": [
3483    ///    "name"
3484    ///  ],
3485    ///  "properties": {
3486    ///    "certificate": {
3487    ///      "description": "Use an existing certificate for the domain.  If
3488    /// this field is\nspecified, the domain must be associated with a valid
3489    /// certificate.",
3490    ///      "allOf": [
3491    ///        {
3492    ///          "$ref": "#/components/schemas/NameOrUUID"
3493    ///        }
3494    ///      ]
3495    ///    },
3496    ///    "name": {
3497    ///      "description": "Publicly accessible domain name.  If this name ends
3498    /// in a period `.` it must\nbe a valid Full Qualified Domain Name (FQDN),
3499    /// otherwise it will become a\nsubdomain of the target metro.",
3500    ///      "examples": [
3501    ///        "example.com."
3502    ///      ],
3503    ///      "type": "string"
3504    ///    }
3505    ///  }
3506    ///}
3507    /// ```
3508    /// </details>
3509    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3510    pub struct CreateServiceGroupRequestDomain {
3511        ///Use an existing certificate for the domain.  If this field is
3512        ///specified, the domain must be associated with a valid certificate.
3513        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3514        pub certificate: ::std::option::Option<NameOrUuid>,
3515        ///Publicly accessible domain name.  If this name ends in a period `.`
3516        /// it must be a valid Full Qualified Domain Name (FQDN),
3517        /// otherwise it will become a subdomain of the target metro.
3518        pub name: ::std::string::String,
3519    }
3520
3521    impl ::std::convert::From<&CreateServiceGroupRequestDomain> for CreateServiceGroupRequestDomain {
3522        fn from(value: &CreateServiceGroupRequestDomain) -> Self {
3523            value.clone()
3524        }
3525    }
3526
3527    ///The response message for creating of a service group.
3528    ///
3529    /// <details><summary>JSON schema</summary>
3530    ///
3531    /// ```json
3532    ///{
3533    ///  "description": "The response message for creating of a service group.",
3534    ///  "type": "object",
3535    ///  "properties": {
3536    ///    "data": {
3537    ///      "description": "The response data for this request.",
3538    ///      "allOf": [
3539    ///        {
3540    ///          "$ref": "#/components/schemas/CreateServiceGroupResponseData"
3541    ///        }
3542    ///      ]
3543    ///    },
3544    ///    "errors": {
3545    ///      "description": "A list of errors which may have occurred during the
3546    /// request.",
3547    ///      "type": "array",
3548    ///      "items": {
3549    ///        "$ref": "#/components/schemas/ResponseError"
3550    ///      }
3551    ///    },
3552    ///    "message": {
3553    ///      "description": "An optional message providing additional
3554    /// information about the status.\nThis field is useful when the status is
3555    /// not `success`.",
3556    ///      "examples": [
3557    ///        "Failed to perform all operations"
3558    ///      ],
3559    ///      "type": "string"
3560    ///    },
3561    ///    "op_time_us": {
3562    ///      "description": "The operation time in microseconds.  This is the
3563    /// time it took to process\nthe request and generate the response.",
3564    ///      "examples": [
3565    ///        46
3566    ///      ],
3567    ///      "type": "integer",
3568    ///      "format": "uint64"
3569    ///    },
3570    ///    "status": {
3571    ///      "description": "The status of the response.",
3572    ///      "allOf": [
3573    ///        {
3574    ///          "$ref": "#/components/schemas/ResponseStatus"
3575    ///        }
3576    ///      ]
3577    ///    }
3578    ///  }
3579    ///}
3580    /// ```
3581    /// </details>
3582    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3583    pub struct CreateServiceGroupResponse {
3584        ///The response data for this request.
3585        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3586        pub data: ::std::option::Option<CreateServiceGroupResponseData>,
3587        ///A list of errors which may have occurred during the request.
3588        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3589        pub errors: ::std::vec::Vec<ResponseError>,
3590        ///An optional message providing additional information about the
3591        /// status. This field is useful when the status is not
3592        /// `success`.
3593        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3594        pub message: ::std::option::Option<::std::string::String>,
3595        ///The operation time in microseconds.  This is the time it took to
3596        /// process the request and generate the response.
3597        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3598        pub op_time_us: ::std::option::Option<u64>,
3599        ///The status of the response.
3600        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3601        pub status: ::std::option::Option<ResponseStatus>,
3602    }
3603
3604    impl ::std::convert::From<&CreateServiceGroupResponse> for CreateServiceGroupResponse {
3605        fn from(value: &CreateServiceGroupResponse) -> Self {
3606            value.clone()
3607        }
3608    }
3609
3610    impl ::std::default::Default for CreateServiceGroupResponse {
3611        fn default() -> Self {
3612            Self {
3613                data: Default::default(),
3614                errors: Default::default(),
3615                message: Default::default(),
3616                op_time_us: Default::default(),
3617                status: Default::default(),
3618            }
3619        }
3620    }
3621
3622    ///`CreateServiceGroupResponseData`
3623    ///
3624    /// <details><summary>JSON schema</summary>
3625    ///
3626    /// ```json
3627    ///{
3628    ///  "type": "object",
3629    ///  "properties": {
3630    ///    "service_groups": {
3631    ///      "description": "The service group which was created by this
3632    /// request.\n\nNote: only one service group can be specified in the
3633    /// request, so this\nwill always contain a single entry.",
3634    ///      "type": "array",
3635    ///      "items": {
3636    ///        "$ref": "#/components/schemas/ServiceGroup"
3637    ///      }
3638    ///    }
3639    ///  }
3640    ///}
3641    /// ```
3642    /// </details>
3643    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3644    pub struct CreateServiceGroupResponseData {
3645        ///The service group which was created by this request.
3646        ///
3647        ///Note: only one service group can be specified in the request, so
3648        /// this will always contain a single entry.
3649        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3650        pub service_groups: ::std::vec::Vec<ServiceGroup>,
3651    }
3652
3653    impl ::std::convert::From<&CreateServiceGroupResponseData> for CreateServiceGroupResponseData {
3654        fn from(value: &CreateServiceGroupResponseData) -> Self {
3655            value.clone()
3656        }
3657    }
3658
3659    impl ::std::default::Default for CreateServiceGroupResponseData {
3660        fn default() -> Self {
3661            Self {
3662                service_groups: Default::default(),
3663            }
3664        }
3665    }
3666
3667    ///The request message for creating a volume.
3668    ///
3669    /// <details><summary>JSON schema</summary>
3670    ///
3671    /// ```json
3672    ///{
3673    ///  "description": "The request message for creating a volume.",
3674    ///  "type": "object",
3675    ///  "allOf": [
3676    ///    {
3677    ///      "type": "object",
3678    ///      "properties": {
3679    ///        "size_mb": {
3680    ///          "description": "The size of the volume in megabytes.",
3681    ///          "examples": [
3682    ///            64
3683    ///          ],
3684    ///          "type": "integer",
3685    ///          "format": "uint64"
3686    ///        }
3687    ///      }
3688    ///    },
3689    ///    {
3690    ///      "oneOf": [
3691    ///        {
3692    ///          "title": "name",
3693    ///          "type": "object",
3694    ///          "properties": {
3695    ///            "name": {
3696    ///              "description": "The name of the volume.\n\nThis is a
3697    /// human-readable name that can be used to identify the volume.\nThe name
3698    /// must be unique within the context of your account.  If no name
3699    /// is\nspecified, a random name of the form `vol-X` is generated for you,
3700    /// where\n`X` is a 5 character long random alphanumeric suffix..  The name
3701    /// can also\nbe used to identify the volume in API calls.",
3702    ///              "examples": [
3703    ///                "funky-vol-t7qumh5j"
3704    ///              ],
3705    ///              "type": "string"
3706    ///            }
3707    ///          }
3708    ///        }
3709    ///      ]
3710    ///    }
3711    ///  ],
3712    ///  "required": [
3713    ///    "size_mb"
3714    ///  ]
3715    ///}
3716    /// ```
3717    /// </details>
3718    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3719    pub struct CreateVolumeRequest {
3720        ///The name of the volume.
3721        ///
3722        ///This is a human-readable name that can be used to identify the
3723        /// volume. The name must be unique within the context of your
3724        /// account.  If no name is specified, a random name of the form
3725        /// `vol-X` is generated for you, where `X` is a 5 character
3726        /// long random alphanumeric suffix..  The name can also be used
3727        /// to identify the volume in API calls.
3728        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3729        pub name: ::std::option::Option<::std::string::String>,
3730        ///The size of the volume in megabytes.
3731        pub size_mb: u64,
3732    }
3733
3734    impl ::std::convert::From<&CreateVolumeRequest> for CreateVolumeRequest {
3735        fn from(value: &CreateVolumeRequest) -> Self {
3736            value.clone()
3737        }
3738    }
3739
3740    ///The response message for creating of a volume.
3741    ///
3742    /// <details><summary>JSON schema</summary>
3743    ///
3744    /// ```json
3745    ///{
3746    ///  "description": "The response message for creating of a volume.",
3747    ///  "type": "object",
3748    ///  "allOf": [
3749    ///    {
3750    ///      "type": "object",
3751    ///      "properties": {
3752    ///        "data": {
3753    ///          "$ref": "#/components/schemas/CreateVolumeResponseData"
3754    ///        },
3755    ///        "errors": {
3756    ///          "description": "A list of errors which may have occurred during
3757    /// the request.",
3758    ///          "type": "array",
3759    ///          "items": {
3760    ///            "$ref": "#/components/schemas/ResponseError"
3761    ///          }
3762    ///        },
3763    ///        "op_time_us": {
3764    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
3765    ///          "examples": [
3766    ///            46
3767    ///          ],
3768    ///          "type": "integer",
3769    ///          "format": "uint64"
3770    ///        },
3771    ///        "status": {
3772    ///          "description": "The status of the response.",
3773    ///          "allOf": [
3774    ///            {
3775    ///              "$ref": "#/components/schemas/ResponseStatus"
3776    ///            }
3777    ///          ]
3778    ///        }
3779    ///      }
3780    ///    },
3781    ///    {
3782    ///      "oneOf": [
3783    ///        {
3784    ///          "title": "message",
3785    ///          "type": "object",
3786    ///          "properties": {
3787    ///            "message": {
3788    ///              "description": "An optional message providing additional
3789    /// information about the status.\nThis field is useful when the status is
3790    /// not `success`.",
3791    ///              "examples": [
3792    ///                "Failed to perform all operations"
3793    ///              ],
3794    ///              "type": "string"
3795    ///            }
3796    ///          }
3797    ///        }
3798    ///      ]
3799    ///    }
3800    ///  ]
3801    ///}
3802    /// ```
3803    /// </details>
3804    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3805    pub struct CreateVolumeResponse {
3806        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3807        pub data: ::std::option::Option<CreateVolumeResponseData>,
3808        ///A list of errors which may have occurred during the request.
3809        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3810        pub errors: ::std::vec::Vec<ResponseError>,
3811        ///An optional message providing additional information about the
3812        /// status. This field is useful when the status is not
3813        /// `success`.
3814        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3815        pub message: ::std::option::Option<::std::string::String>,
3816        ///The operation time in microseconds.  This is the time it took to
3817        /// process the request and generate the response.
3818        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3819        pub op_time_us: ::std::option::Option<u64>,
3820        ///The status of the response.
3821        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3822        pub status: ::std::option::Option<ResponseStatus>,
3823    }
3824
3825    impl ::std::convert::From<&CreateVolumeResponse> for CreateVolumeResponse {
3826        fn from(value: &CreateVolumeResponse) -> Self {
3827            value.clone()
3828        }
3829    }
3830
3831    impl ::std::default::Default for CreateVolumeResponse {
3832        fn default() -> Self {
3833            Self {
3834                data: Default::default(),
3835                errors: Default::default(),
3836                message: Default::default(),
3837                op_time_us: Default::default(),
3838                status: Default::default(),
3839            }
3840        }
3841    }
3842
3843    ///`CreateVolumeResponseData`
3844    ///
3845    /// <details><summary>JSON schema</summary>
3846    ///
3847    /// ```json
3848    ///{
3849    ///  "type": "object",
3850    ///  "properties": {
3851    ///    "volumes": {
3852    ///      "description": "The volume(s) which were created by the request.",
3853    ///      "type": "array",
3854    ///      "items": {
3855    ///        "$ref": "#/components/schemas/CreateVolumeResponseVolume"
3856    ///      }
3857    ///    }
3858    ///  }
3859    ///}
3860    /// ```
3861    /// </details>
3862    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3863    pub struct CreateVolumeResponseData {
3864        ///The volume(s) which were created by the request.
3865        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3866        pub volumes: ::std::vec::Vec<CreateVolumeResponseVolume>,
3867    }
3868
3869    impl ::std::convert::From<&CreateVolumeResponseData> for CreateVolumeResponseData {
3870        fn from(value: &CreateVolumeResponseData) -> Self {
3871            value.clone()
3872        }
3873    }
3874
3875    impl ::std::default::Default for CreateVolumeResponseData {
3876        fn default() -> Self {
3877            Self {
3878                volumes: Default::default(),
3879            }
3880        }
3881    }
3882
3883    ///`CreateVolumeResponseVolume`
3884    ///
3885    /// <details><summary>JSON schema</summary>
3886    ///
3887    /// ```json
3888    ///{
3889    ///  "type": "object",
3890    ///  "properties": {
3891    ///    "error": {
3892    ///      "description": "An optional error code providing additional
3893    /// information about the status.\nThis field is useful when the status is
3894    /// not `success`.",
3895    ///      "examples": [
3896    ///        8
3897    ///      ],
3898    ///      "type": "integer",
3899    ///      "format": "int32"
3900    ///    },
3901    ///    "message": {
3902    ///      "description": "An optional message providing additional
3903    /// information about the status.\nThis field is useful when the status is
3904    /// not `success`.",
3905    ///      "examples": [
3906    ///        "No volume with name 'funky-town-g756b5d'"
3907    ///      ],
3908    ///      "type": "string"
3909    ///    },
3910    ///    "name": {
3911    ///      "description": "The name of the newly created volume.",
3912    ///      "examples": [
3913    ///        "funky-vol-g7gum5cj"
3914    ///      ],
3915    ///      "type": "string"
3916    ///    },
3917    ///    "status": {
3918    ///      "description": "The status of the response.",
3919    ///      "allOf": [
3920    ///        {
3921    ///          "$ref": "#/components/schemas/ResponseStatus"
3922    ///        }
3923    ///      ]
3924    ///    },
3925    ///    "uuid": {
3926    ///      "description": "UUID of the newly created volume.",
3927    ///      "examples": [
3928    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
3929    ///      ],
3930    ///      "type": "string",
3931    ///      "format": "uuid"
3932    ///    }
3933    ///  }
3934    ///}
3935    /// ```
3936    /// </details>
3937    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
3938    pub struct CreateVolumeResponseVolume {
3939        ///An optional error code providing additional information about the
3940        /// status. This field is useful when the status is not
3941        /// `success`.
3942        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3943        pub error: ::std::option::Option<i32>,
3944        ///An optional message providing additional information about the
3945        /// status. This field is useful when the status is not
3946        /// `success`.
3947        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3948        pub message: ::std::option::Option<::std::string::String>,
3949        ///The name of the newly created volume.
3950        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3951        pub name: ::std::option::Option<::std::string::String>,
3952        ///The status of the response.
3953        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3954        pub status: ::std::option::Option<ResponseStatus>,
3955        ///UUID of the newly created volume.
3956        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
3957        pub uuid: ::std::option::Option<::uuid::Uuid>,
3958    }
3959
3960    impl ::std::convert::From<&CreateVolumeResponseVolume> for CreateVolumeResponseVolume {
3961        fn from(value: &CreateVolumeResponseVolume) -> Self {
3962            value.clone()
3963        }
3964    }
3965
3966    impl ::std::default::Default for CreateVolumeResponseVolume {
3967        fn default() -> Self {
3968            Self {
3969                error: Default::default(),
3970                message: Default::default(),
3971                name: Default::default(),
3972                status: Default::default(),
3973                uuid: Default::default(),
3974            }
3975        }
3976    }
3977
3978    ///`DeleteAutoscaleConfigurationPolicyResponse`
3979    ///
3980    /// <details><summary>JSON schema</summary>
3981    ///
3982    /// ```json
3983    ///{
3984    ///  "type": "object",
3985    ///  "allOf": [
3986    ///    {
3987    ///      "type": "object",
3988    ///      "properties": {
3989    ///        "data": {
3990    ///          "description": "The response data for this request.",
3991    ///          "allOf": [
3992    ///            {
3993    ///              "$ref":
3994    /// "#/components/schemas/DeleteAutoscaleConfigurationPolicyResponseData"
3995    ///            }
3996    ///          ]
3997    ///        },
3998    ///        "errors": {
3999    ///          "description": "A list of errors which may have occurred during
4000    /// the request.",
4001    ///          "type": "array",
4002    ///          "items": {
4003    ///            "$ref": "#/components/schemas/ResponseError"
4004    ///          }
4005    ///        },
4006    ///        "op_time_us": {
4007    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
4008    ///          "examples": [
4009    ///            54
4010    ///          ],
4011    ///          "type": "integer",
4012    ///          "format": "uint64"
4013    ///        },
4014    ///        "status": {
4015    ///          "description": "The status of the response.",
4016    ///          "allOf": [
4017    ///            {
4018    ///              "$ref": "#/components/schemas/ResponseStatus"
4019    ///            }
4020    ///          ]
4021    ///        }
4022    ///      }
4023    ///    },
4024    ///    {
4025    ///      "oneOf": [
4026    ///        {
4027    ///          "title": "message",
4028    ///          "type": "object",
4029    ///          "properties": {
4030    ///            "message": {
4031    ///              "description": "An optional message providing additional
4032    /// information about the status.\nThis field is useful when the status is
4033    /// not `success`.",
4034    ///              "examples": [
4035    ///                "Failed to perform all operations"
4036    ///              ],
4037    ///              "type": "string"
4038    ///            }
4039    ///          }
4040    ///        }
4041    ///      ]
4042    ///    }
4043    ///  ]
4044    ///}
4045    /// ```
4046    /// </details>
4047    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4048    pub struct DeleteAutoscaleConfigurationPolicyResponse {
4049        ///The response data for this request.
4050        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4051        pub data: ::std::option::Option<DeleteAutoscaleConfigurationPolicyResponseData>,
4052        ///A list of errors which may have occurred during the request.
4053        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4054        pub errors: ::std::vec::Vec<ResponseError>,
4055        ///An optional message providing additional information about the
4056        /// status. This field is useful when the status is not
4057        /// `success`.
4058        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4059        pub message: ::std::option::Option<::std::string::String>,
4060        ///The operation time in microseconds.  This is the time it took to
4061        /// process the request and generate the response.
4062        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4063        pub op_time_us: ::std::option::Option<u64>,
4064        ///The status of the response.
4065        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4066        pub status: ::std::option::Option<ResponseStatus>,
4067    }
4068
4069    impl ::std::convert::From<&DeleteAutoscaleConfigurationPolicyResponse>
4070        for DeleteAutoscaleConfigurationPolicyResponse
4071    {
4072        fn from(value: &DeleteAutoscaleConfigurationPolicyResponse) -> Self {
4073            value.clone()
4074        }
4075    }
4076
4077    impl ::std::default::Default for DeleteAutoscaleConfigurationPolicyResponse {
4078        fn default() -> Self {
4079            Self {
4080                data: Default::default(),
4081                errors: Default::default(),
4082                message: Default::default(),
4083                op_time_us: Default::default(),
4084                status: Default::default(),
4085            }
4086        }
4087    }
4088
4089    ///`DeleteAutoscaleConfigurationPolicyResponseData`
4090    ///
4091    /// <details><summary>JSON schema</summary>
4092    ///
4093    /// ```json
4094    ///{
4095    ///  "type": "object",
4096    ///  "properties": {
4097    ///    "policies": {
4098    ///      "description": "The policies which were deleted by the request.",
4099    ///      "type": "array",
4100    ///      "items": {
4101    ///        "$ref":
4102    /// "#/components/schemas/
4103    /// DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse"
4104    ///      }
4105    ///    }
4106    ///  }
4107    ///}
4108    /// ```
4109    /// </details>
4110    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4111    pub struct DeleteAutoscaleConfigurationPolicyResponseData {
4112        ///The policies which were deleted by the request.
4113        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4114        pub policies: ::std::vec::Vec<DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse>,
4115    }
4116
4117    impl ::std::convert::From<&DeleteAutoscaleConfigurationPolicyResponseData>
4118        for DeleteAutoscaleConfigurationPolicyResponseData
4119    {
4120        fn from(value: &DeleteAutoscaleConfigurationPolicyResponseData) -> Self {
4121            value.clone()
4122        }
4123    }
4124
4125    impl ::std::default::Default for DeleteAutoscaleConfigurationPolicyResponseData {
4126        fn default() -> Self {
4127            Self {
4128                policies: Default::default(),
4129            }
4130        }
4131    }
4132
4133    ///`DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse`
4134    ///
4135    /// <details><summary>JSON schema</summary>
4136    ///
4137    /// ```json
4138    ///{
4139    ///  "type": "object",
4140    ///  "properties": {
4141    ///    "error": {
4142    ///      "description": "An optional error code providing additional
4143    /// information about the status.\nThis field is useful when the status is
4144    /// not `success`.",
4145    ///      "examples": [
4146    ///        8
4147    ///      ],
4148    ///      "type": "integer",
4149    ///      "format": "int32"
4150    ///    },
4151    ///    "message": {
4152    ///      "description": "An optional message providing additional
4153    /// information about the status.\nThis field is useful when the status is
4154    /// not `success`.",
4155    ///      "examples": [
4156    ///        "No service with name 'funky-town-g756b5d'"
4157    ///      ],
4158    ///      "type": "string"
4159    ///    },
4160    ///    "name": {
4161    ///      "description": "The name of the service of the deleted policy.",
4162    ///      "examples": [
4163    ///        "funky-policy"
4164    ///      ],
4165    ///      "type": "string"
4166    ///    },
4167    ///    "status": {
4168    ///      "description": "The status of the response.",
4169    ///      "allOf": [
4170    ///        {
4171    ///          "$ref": "#/components/schemas/ResponseStatus"
4172    ///        }
4173    ///      ]
4174    ///    }
4175    ///  }
4176    ///}
4177    /// ```
4178    /// </details>
4179    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4180    pub struct DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse {
4181        ///An optional error code providing additional information about the
4182        /// status. This field is useful when the status is not
4183        /// `success`.
4184        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4185        pub error: ::std::option::Option<i32>,
4186        ///An optional message providing additional information about the
4187        /// status. This field is useful when the status is not
4188        /// `success`.
4189        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4190        pub message: ::std::option::Option<::std::string::String>,
4191        ///The name of the service of the deleted policy.
4192        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4193        pub name: ::std::option::Option<::std::string::String>,
4194        ///The status of the response.
4195        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4196        pub status: ::std::option::Option<ResponseStatus>,
4197    }
4198
4199    impl ::std::convert::From<&DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse>
4200        for DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse
4201    {
4202        fn from(value: &DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse) -> Self {
4203            value.clone()
4204        }
4205    }
4206
4207    impl ::std::default::Default for DeleteAutoscaleConfigurationPolicyResponsePoliciesResponse {
4208        fn default() -> Self {
4209            Self {
4210                error: Default::default(),
4211                message: Default::default(),
4212                name: Default::default(),
4213                status: Default::default(),
4214            }
4215        }
4216    }
4217
4218    ///`DeleteAutoscaleConfigurationsResponse`
4219    ///
4220    /// <details><summary>JSON schema</summary>
4221    ///
4222    /// ```json
4223    ///{
4224    ///  "type": "object",
4225    ///  "allOf": [
4226    ///    {
4227    ///      "type": "object",
4228    ///      "properties": {
4229    ///        "data": {
4230    ///          "description": "The response data for this request.",
4231    ///          "allOf": [
4232    ///            {
4233    ///              "$ref":
4234    /// "#/components/schemas/DeleteAutoscaleConfigurationsResponseData"
4235    ///            }
4236    ///          ]
4237    ///        },
4238    ///        "errors": {
4239    ///          "description": "A list of errors which may have occurred during
4240    /// the request.",
4241    ///          "type": "array",
4242    ///          "items": {
4243    ///            "$ref": "#/components/schemas/ResponseError"
4244    ///          }
4245    ///        },
4246    ///        "op_time_us": {
4247    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
4248    ///          "examples": [
4249    ///            60
4250    ///          ],
4251    ///          "type": "integer",
4252    ///          "format": "uint64"
4253    ///        },
4254    ///        "status": {
4255    ///          "description": "The status of the response.",
4256    ///          "allOf": [
4257    ///            {
4258    ///              "$ref": "#/components/schemas/ResponseStatus"
4259    ///            }
4260    ///          ]
4261    ///        }
4262    ///      }
4263    ///    },
4264    ///    {
4265    ///      "oneOf": [
4266    ///        {
4267    ///          "title": "message",
4268    ///          "type": "object",
4269    ///          "properties": {
4270    ///            "message": {
4271    ///              "description": "An optional message providing additional
4272    /// information about the status.\nThis field is useful when the status is
4273    /// not `success`.",
4274    ///              "examples": [
4275    ///                "Failed to perform all operations"
4276    ///              ],
4277    ///              "type": "string"
4278    ///            }
4279    ///          }
4280    ///        }
4281    ///      ]
4282    ///    }
4283    ///  ]
4284    ///}
4285    /// ```
4286    /// </details>
4287    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4288    pub struct DeleteAutoscaleConfigurationsResponse {
4289        ///The response data for this request.
4290        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4291        pub data: ::std::option::Option<DeleteAutoscaleConfigurationsResponseData>,
4292        ///A list of errors which may have occurred during the request.
4293        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4294        pub errors: ::std::vec::Vec<ResponseError>,
4295        ///An optional message providing additional information about the
4296        /// status. This field is useful when the status is not
4297        /// `success`.
4298        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4299        pub message: ::std::option::Option<::std::string::String>,
4300        ///The operation time in microseconds.  This is the time it took to
4301        /// process the request and generate the response.
4302        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4303        pub op_time_us: ::std::option::Option<u64>,
4304        ///The status of the response.
4305        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4306        pub status: ::std::option::Option<ResponseStatus>,
4307    }
4308
4309    impl ::std::convert::From<&DeleteAutoscaleConfigurationsResponse>
4310        for DeleteAutoscaleConfigurationsResponse
4311    {
4312        fn from(value: &DeleteAutoscaleConfigurationsResponse) -> Self {
4313            value.clone()
4314        }
4315    }
4316
4317    impl ::std::default::Default for DeleteAutoscaleConfigurationsResponse {
4318        fn default() -> Self {
4319            Self {
4320                data: Default::default(),
4321                errors: Default::default(),
4322                message: Default::default(),
4323                op_time_us: Default::default(),
4324                status: Default::default(),
4325            }
4326        }
4327    }
4328
4329    ///`DeleteAutoscaleConfigurationsResponseData`
4330    ///
4331    /// <details><summary>JSON schema</summary>
4332    ///
4333    /// ```json
4334    ///{
4335    ///  "type": "object",
4336    ///  "properties": {
4337    ///    "service_groups": {
4338    ///      "description": "The configuration(s) which were deleted by the
4339    /// request.",
4340    ///      "type": "array",
4341    ///      "items": {
4342    ///        "$ref":
4343    /// "#/components/schemas/DeleteAutoscaleConfigurationsResponseServiceGroup"
4344    ///      }
4345    ///    }
4346    ///  }
4347    ///}
4348    /// ```
4349    /// </details>
4350    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4351    pub struct DeleteAutoscaleConfigurationsResponseData {
4352        ///The configuration(s) which were deleted by the request.
4353        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4354        pub service_groups: ::std::vec::Vec<DeleteAutoscaleConfigurationsResponseServiceGroup>,
4355    }
4356
4357    impl ::std::convert::From<&DeleteAutoscaleConfigurationsResponseData>
4358        for DeleteAutoscaleConfigurationsResponseData
4359    {
4360        fn from(value: &DeleteAutoscaleConfigurationsResponseData) -> Self {
4361            value.clone()
4362        }
4363    }
4364
4365    impl ::std::default::Default for DeleteAutoscaleConfigurationsResponseData {
4366        fn default() -> Self {
4367            Self {
4368                service_groups: Default::default(),
4369            }
4370        }
4371    }
4372
4373    ///`DeleteAutoscaleConfigurationsResponseServiceGroup`
4374    ///
4375    /// <details><summary>JSON schema</summary>
4376    ///
4377    /// ```json
4378    ///{
4379    ///  "type": "object",
4380    ///  "properties": {
4381    ///    "error": {
4382    ///      "description": "An optional error code providing additional
4383    /// information about the status.\nThis field is useful when the status is
4384    /// not `success`.",
4385    ///      "examples": [
4386    ///        8
4387    ///      ],
4388    ///      "type": "integer",
4389    ///      "format": "int32"
4390    ///    },
4391    ///    "message": {
4392    ///      "description": "An optional message providing additional
4393    /// information about the status.\nThis field is useful when the status is
4394    /// not `success`.",
4395    ///      "examples": [
4396    ///        "No service with name 'funky-town-g756b5d'"
4397    ///      ],
4398    ///      "type": "string"
4399    ///    },
4400    ///    "name": {
4401    ///      "description": "The name of the service where the configuration was
4402    /// deleted.",
4403    ///      "examples": [
4404    ///        "funky-instance-template"
4405    ///      ],
4406    ///      "type": "string"
4407    ///    },
4408    ///    "status": {
4409    ///      "description": "The status of the response.",
4410    ///      "allOf": [
4411    ///        {
4412    ///          "$ref": "#/components/schemas/ResponseStatus"
4413    ///        }
4414    ///      ]
4415    ///    },
4416    ///    "uuid": {
4417    ///      "description": "The UUID of the service where the configuration was
4418    /// deleted.",
4419    ///      "examples": [
4420    ///        "123e4567-e89b-12d3-a456-426614174000"
4421    ///      ],
4422    ///      "type": "string",
4423    ///      "format": "uuid"
4424    ///    }
4425    ///  }
4426    ///}
4427    /// ```
4428    /// </details>
4429    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4430    pub struct DeleteAutoscaleConfigurationsResponseServiceGroup {
4431        ///An optional error code providing additional information about the
4432        /// status. This field is useful when the status is not
4433        /// `success`.
4434        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4435        pub error: ::std::option::Option<i32>,
4436        ///An optional message providing additional information about the
4437        /// status. This field is useful when the status is not
4438        /// `success`.
4439        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4440        pub message: ::std::option::Option<::std::string::String>,
4441        ///The name of the service where the configuration was deleted.
4442        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4443        pub name: ::std::option::Option<::std::string::String>,
4444        ///The status of the response.
4445        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4446        pub status: ::std::option::Option<ResponseStatus>,
4447        ///The UUID of the service where the configuration was deleted.
4448        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4449        pub uuid: ::std::option::Option<::uuid::Uuid>,
4450    }
4451
4452    impl ::std::convert::From<&DeleteAutoscaleConfigurationsResponseServiceGroup>
4453        for DeleteAutoscaleConfigurationsResponseServiceGroup
4454    {
4455        fn from(value: &DeleteAutoscaleConfigurationsResponseServiceGroup) -> Self {
4456            value.clone()
4457        }
4458    }
4459
4460    impl ::std::default::Default for DeleteAutoscaleConfigurationsResponseServiceGroup {
4461        fn default() -> Self {
4462            Self {
4463                error: Default::default(),
4464                message: Default::default(),
4465                name: Default::default(),
4466                status: Default::default(),
4467                uuid: Default::default(),
4468            }
4469        }
4470    }
4471
4472    ///The response message for deleting of one or more certificate(s) given
4473    /// their UUID(s) or name(s).
4474    ///
4475    /// <details><summary>JSON schema</summary>
4476    ///
4477    /// ```json
4478    ///{
4479    ///  "description": "The response message for deleting of one or more
4480    /// certificate(s) given their\nUUID(s) or name(s).",
4481    ///  "type": "object",
4482    ///  "properties": {
4483    ///    "data": {
4484    ///      "description": "The response data for this request.",
4485    ///      "allOf": [
4486    ///        {
4487    ///          "$ref": "#/components/schemas/DeleteCertificatesResponseData"
4488    ///        }
4489    ///      ]
4490    ///    },
4491    ///    "errors": {
4492    ///      "description": "A list of errors which may have occurred during the
4493    /// request.",
4494    ///      "type": "array",
4495    ///      "items": {
4496    ///        "$ref": "#/components/schemas/ResponseError"
4497    ///      }
4498    ///    },
4499    ///    "message": {
4500    ///      "description": "An optional message providing additional
4501    /// information about the status.\nThis field is useful when the status is
4502    /// not `success`.",
4503    ///      "examples": [
4504    ///        "Failed to perform all operations"
4505    ///      ],
4506    ///      "type": "string"
4507    ///    },
4508    ///    "op_time_us": {
4509    ///      "description": "The operation time in microseconds.  This is the
4510    /// time it took to process\nthe request and generate the response.",
4511    ///      "examples": [
4512    ///        42
4513    ///      ],
4514    ///      "type": "integer",
4515    ///      "format": "uint64"
4516    ///    },
4517    ///    "status": {
4518    ///      "description": "The status of the response.",
4519    ///      "allOf": [
4520    ///        {
4521    ///          "$ref": "#/components/schemas/ResponseStatus"
4522    ///        }
4523    ///      ]
4524    ///    }
4525    ///  }
4526    ///}
4527    /// ```
4528    /// </details>
4529    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4530    pub struct DeleteCertificatesResponse {
4531        ///The response data for this request.
4532        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4533        pub data: ::std::option::Option<DeleteCertificatesResponseData>,
4534        ///A list of errors which may have occurred during the request.
4535        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4536        pub errors: ::std::vec::Vec<ResponseError>,
4537        ///An optional message providing additional information about the
4538        /// status. This field is useful when the status is not
4539        /// `success`.
4540        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4541        pub message: ::std::option::Option<::std::string::String>,
4542        ///The operation time in microseconds.  This is the time it took to
4543        /// process the request and generate the response.
4544        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4545        pub op_time_us: ::std::option::Option<u64>,
4546        ///The status of the response.
4547        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4548        pub status: ::std::option::Option<ResponseStatus>,
4549    }
4550
4551    impl ::std::convert::From<&DeleteCertificatesResponse> for DeleteCertificatesResponse {
4552        fn from(value: &DeleteCertificatesResponse) -> Self {
4553            value.clone()
4554        }
4555    }
4556
4557    impl ::std::default::Default for DeleteCertificatesResponse {
4558        fn default() -> Self {
4559            Self {
4560                data: Default::default(),
4561                errors: Default::default(),
4562                message: Default::default(),
4563                op_time_us: Default::default(),
4564                status: Default::default(),
4565            }
4566        }
4567    }
4568
4569    ///`DeleteCertificatesResponseData`
4570    ///
4571    /// <details><summary>JSON schema</summary>
4572    ///
4573    /// ```json
4574    ///{
4575    ///  "type": "object",
4576    ///  "properties": {
4577    ///    "certificates": {
4578    ///      "description": "The certificate(s) which were deleted by the
4579    /// request.",
4580    ///      "type": "array",
4581    ///      "items": {
4582    ///        "$ref":
4583    /// "#/components/schemas/DeleteCertificatesResponseDeletedCertificate"
4584    ///      }
4585    ///    }
4586    ///  }
4587    ///}
4588    /// ```
4589    /// </details>
4590    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4591    pub struct DeleteCertificatesResponseData {
4592        ///The certificate(s) which were deleted by the request.
4593        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4594        pub certificates: ::std::vec::Vec<DeleteCertificatesResponseDeletedCertificate>,
4595    }
4596
4597    impl ::std::convert::From<&DeleteCertificatesResponseData> for DeleteCertificatesResponseData {
4598        fn from(value: &DeleteCertificatesResponseData) -> Self {
4599            value.clone()
4600        }
4601    }
4602
4603    impl ::std::default::Default for DeleteCertificatesResponseData {
4604        fn default() -> Self {
4605            Self {
4606                certificates: Default::default(),
4607            }
4608        }
4609    }
4610
4611    ///Details of the certificate which was deleted by this request.
4612    ///
4613    /// <details><summary>JSON schema</summary>
4614    ///
4615    /// ```json
4616    ///{
4617    ///  "description": "Details of the certificate which was deleted by this
4618    /// request.",
4619    ///  "type": "object",
4620    ///  "properties": {
4621    ///    "error": {
4622    ///      "description": "An optional error code providing additional
4623    /// information about the status.\nThis field is useful when the status is
4624    /// not `success`.",
4625    ///      "examples": [
4626    ///        8
4627    ///      ],
4628    ///      "type": "integer",
4629    ///      "format": "int32"
4630    ///    },
4631    ///    "message": {
4632    ///      "description": "An optional message providing additional
4633    /// information about the status.\nThis field is useful when the status is
4634    /// not `success`.",
4635    ///      "examples": [
4636    ///        "No certificate with name 'funky-town-g756b5d'"
4637    ///      ],
4638    ///      "type": "string"
4639    ///    },
4640    ///    "name": {
4641    ///      "description": "The name of the certificate which was deleted.",
4642    ///      "examples": [
4643    ///        "funky-certificate"
4644    ///      ],
4645    ///      "type": "string"
4646    ///    },
4647    ///    "status": {
4648    ///      "description": "Indicates whether the delete operation was
4649    /// successful or not for this\ncertificate.",
4650    ///      "allOf": [
4651    ///        {
4652    ///          "$ref": "#/components/schemas/ResponseStatus"
4653    ///        }
4654    ///      ]
4655    ///    },
4656    ///    "uuid": {
4657    ///      "description": "The UUID of the certificate which was deleted.",
4658    ///      "examples": [
4659    ///        "123e4567-e89b-12d3-a456-426614174000"
4660    ///      ],
4661    ///      "type": "string",
4662    ///      "format": "uuid"
4663    ///    }
4664    ///  }
4665    ///}
4666    /// ```
4667    /// </details>
4668    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4669    pub struct DeleteCertificatesResponseDeletedCertificate {
4670        ///An optional error code providing additional information about the
4671        /// status. This field is useful when the status is not
4672        /// `success`.
4673        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4674        pub error: ::std::option::Option<i32>,
4675        ///An optional message providing additional information about the
4676        /// status. This field is useful when the status is not
4677        /// `success`.
4678        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4679        pub message: ::std::option::Option<::std::string::String>,
4680        ///The name of the certificate which was deleted.
4681        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4682        pub name: ::std::option::Option<::std::string::String>,
4683        ///Indicates whether the delete operation was successful or not for
4684        /// this certificate.
4685        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4686        pub status: ::std::option::Option<ResponseStatus>,
4687        ///The UUID of the certificate which was deleted.
4688        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4689        pub uuid: ::std::option::Option<::uuid::Uuid>,
4690    }
4691
4692    impl ::std::convert::From<&DeleteCertificatesResponseDeletedCertificate>
4693        for DeleteCertificatesResponseDeletedCertificate
4694    {
4695        fn from(value: &DeleteCertificatesResponseDeletedCertificate) -> Self {
4696            value.clone()
4697        }
4698    }
4699
4700    impl ::std::default::Default for DeleteCertificatesResponseDeletedCertificate {
4701        fn default() -> Self {
4702            Self {
4703                error: Default::default(),
4704                message: Default::default(),
4705                name: Default::default(),
4706                status: Default::default(),
4707                uuid: Default::default(),
4708            }
4709        }
4710    }
4711
4712    ///The response message for deleting one or more instance(s) given their
4713    /// UUID(s) or name(s).
4714    ///
4715    /// <details><summary>JSON schema</summary>
4716    ///
4717    /// ```json
4718    ///{
4719    ///  "description": "The response message for deleting one or more
4720    /// instance(s) given their UUID(s)\nor name(s).",
4721    ///  "type": "object",
4722    ///  "properties": {
4723    ///    "data": {
4724    ///      "description": "The response data for this request.",
4725    ///      "allOf": [
4726    ///        {
4727    ///          "$ref": "#/components/schemas/DeleteInstancesResponseData"
4728    ///        }
4729    ///      ]
4730    ///    },
4731    ///    "errors": {
4732    ///      "description": "A list of errors which may have occurred during the
4733    /// request.",
4734    ///      "type": "array",
4735    ///      "items": {
4736    ///        "$ref": "#/components/schemas/ResponseError"
4737    ///      }
4738    ///    },
4739    ///    "message": {
4740    ///      "description": "An optional message providing additional
4741    /// information about the status.\nThis field is useful when the status is
4742    /// not `success`.",
4743    ///      "examples": [
4744    ///        "Failed to perform all operations"
4745    ///      ],
4746    ///      "type": "string"
4747    ///    },
4748    ///    "op_time_us": {
4749    ///      "description": "The operation time in microseconds.  This is the
4750    /// time it took to process\nthe request and generate the response.",
4751    ///      "examples": [
4752    ///        221
4753    ///      ],
4754    ///      "type": "integer",
4755    ///      "format": "uint64"
4756    ///    },
4757    ///    "status": {
4758    ///      "description": "The status of the response.",
4759    ///      "allOf": [
4760    ///        {
4761    ///          "$ref": "#/components/schemas/ResponseStatus"
4762    ///        }
4763    ///      ]
4764    ///    }
4765    ///  }
4766    ///}
4767    /// ```
4768    /// </details>
4769    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4770    pub struct DeleteInstancesResponse {
4771        ///The response data for this request.
4772        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4773        pub data: ::std::option::Option<DeleteInstancesResponseData>,
4774        ///A list of errors which may have occurred during the request.
4775        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4776        pub errors: ::std::vec::Vec<ResponseError>,
4777        ///An optional message providing additional information about the
4778        /// status. This field is useful when the status is not
4779        /// `success`.
4780        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4781        pub message: ::std::option::Option<::std::string::String>,
4782        ///The operation time in microseconds.  This is the time it took to
4783        /// process the request and generate the response.
4784        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4785        pub op_time_us: ::std::option::Option<u64>,
4786        ///The status of the response.
4787        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4788        pub status: ::std::option::Option<ResponseStatus>,
4789    }
4790
4791    impl ::std::convert::From<&DeleteInstancesResponse> for DeleteInstancesResponse {
4792        fn from(value: &DeleteInstancesResponse) -> Self {
4793            value.clone()
4794        }
4795    }
4796
4797    impl ::std::default::Default for DeleteInstancesResponse {
4798        fn default() -> Self {
4799            Self {
4800                data: Default::default(),
4801                errors: Default::default(),
4802                message: Default::default(),
4803                op_time_us: Default::default(),
4804                status: Default::default(),
4805            }
4806        }
4807    }
4808
4809    ///`DeleteInstancesResponseData`
4810    ///
4811    /// <details><summary>JSON schema</summary>
4812    ///
4813    /// ```json
4814    ///{
4815    ///  "type": "object",
4816    ///  "properties": {
4817    ///    "instances": {
4818    ///      "description": "The instance(s) which were deleted by the
4819    /// request.",
4820    ///      "type": "array",
4821    ///      "items": {
4822    ///        "$ref":
4823    /// "#/components/schemas/DeleteInstancesResponseDeletedInstance"
4824    ///      }
4825    ///    }
4826    ///  }
4827    ///}
4828    /// ```
4829    /// </details>
4830    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4831    pub struct DeleteInstancesResponseData {
4832        ///The instance(s) which were deleted by the request.
4833        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4834        pub instances: ::std::vec::Vec<DeleteInstancesResponseDeletedInstance>,
4835    }
4836
4837    impl ::std::convert::From<&DeleteInstancesResponseData> for DeleteInstancesResponseData {
4838        fn from(value: &DeleteInstancesResponseData) -> Self {
4839            value.clone()
4840        }
4841    }
4842
4843    impl ::std::default::Default for DeleteInstancesResponseData {
4844        fn default() -> Self {
4845            Self {
4846                instances: Default::default(),
4847            }
4848        }
4849    }
4850
4851    ///Details of the instance which was deleted by this request.
4852    ///
4853    /// <details><summary>JSON schema</summary>
4854    ///
4855    /// ```json
4856    ///{
4857    ///  "description": "Details of the instance which was deleted by this
4858    /// request.",
4859    ///  "type": "object",
4860    ///  "properties": {
4861    ///    "error": {
4862    ///      "description": "An optional error code providing additional
4863    /// information about the status.\nThis field is useful when the status is
4864    /// not `success`.",
4865    ///      "examples": [
4866    ///        8
4867    ///      ],
4868    ///      "type": "integer",
4869    ///      "format": "int32"
4870    ///    },
4871    ///    "message": {
4872    ///      "description": "An optional message providing additional
4873    /// information about the status.\nThis field is useful when the status is
4874    /// not `success`.",
4875    ///      "examples": [
4876    ///        "No instance with name 'funky-town-g756b5d'"
4877    ///      ],
4878    ///      "type": "string"
4879    ///    },
4880    ///    "name": {
4881    ///      "description": "The name of the instance which was deleted.",
4882    ///      "examples": [
4883    ///        "funky-town-g756b5d"
4884    ///      ],
4885    ///      "type": "string"
4886    ///    },
4887    ///    "previous_state": {
4888    ///      "description": "The previous state of the instance before it was
4889    /// deleted.",
4890    ///      "examples": [
4891    ///        "stopped"
4892    ///      ],
4893    ///      "type": "string"
4894    ///    },
4895    ///    "status": {
4896    ///      "description": "Indicates whether the start operation was
4897    /// successful or not for this\ninstance.",
4898    ///      "allOf": [
4899    ///        {
4900    ///          "$ref": "#/components/schemas/ResponseStatus"
4901    ///        }
4902    ///      ]
4903    ///    },
4904    ///    "uuid": {
4905    ///      "description": "The UUID of the instance which was deleted.",
4906    ///      "examples": [
4907    ///        "123e4567-e89b-12d3-a456-426614174000"
4908    ///      ],
4909    ///      "type": "string",
4910    ///      "format": "uuid"
4911    ///    }
4912    ///  }
4913    ///}
4914    /// ```
4915    /// </details>
4916    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4917    pub struct DeleteInstancesResponseDeletedInstance {
4918        ///An optional error code providing additional information about the
4919        /// status. This field is useful when the status is not
4920        /// `success`.
4921        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4922        pub error: ::std::option::Option<i32>,
4923        ///An optional message providing additional information about the
4924        /// status. This field is useful when the status is not
4925        /// `success`.
4926        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4927        pub message: ::std::option::Option<::std::string::String>,
4928        ///The name of the instance which was deleted.
4929        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4930        pub name: ::std::option::Option<::std::string::String>,
4931        ///The previous state of the instance before it was deleted.
4932        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4933        pub previous_state: ::std::option::Option<::std::string::String>,
4934        ///Indicates whether the start operation was successful or not for this
4935        ///instance.
4936        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4937        pub status: ::std::option::Option<ResponseStatus>,
4938        ///The UUID of the instance which was deleted.
4939        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
4940        pub uuid: ::std::option::Option<::uuid::Uuid>,
4941    }
4942
4943    impl ::std::convert::From<&DeleteInstancesResponseDeletedInstance>
4944        for DeleteInstancesResponseDeletedInstance
4945    {
4946        fn from(value: &DeleteInstancesResponseDeletedInstance) -> Self {
4947            value.clone()
4948        }
4949    }
4950
4951    impl ::std::default::Default for DeleteInstancesResponseDeletedInstance {
4952        fn default() -> Self {
4953            Self {
4954                error: Default::default(),
4955                message: Default::default(),
4956                name: Default::default(),
4957                previous_state: Default::default(),
4958                status: Default::default(),
4959                uuid: Default::default(),
4960            }
4961        }
4962    }
4963
4964    ///The request message to delete an autoscale configuration policy by name.
4965    ///
4966    /// <details><summary>JSON schema</summary>
4967    ///
4968    /// ```json
4969    ///{
4970    ///  "description": "The request message to delete an autoscale
4971    /// configuration policy by name.",
4972    ///  "type": "object",
4973    ///  "required": [
4974    ///    "name"
4975    ///  ],
4976    ///  "properties": {
4977    ///    "name": {
4978    ///      "description": "The Name of the policy to delete.",
4979    ///      "examples": [
4980    ///        "funky-policy"
4981    ///      ],
4982    ///      "type": "string"
4983    ///    }
4984    ///  }
4985    ///}
4986    /// ```
4987    /// </details>
4988    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
4989    pub struct DeletePolicyRequest {
4990        ///The Name of the policy to delete.
4991        pub name: ::std::string::String,
4992    }
4993
4994    impl ::std::convert::From<&DeletePolicyRequest> for DeletePolicyRequest {
4995        fn from(value: &DeletePolicyRequest) -> Self {
4996            value.clone()
4997        }
4998    }
4999
5000    ///The response message for deleting of one or more service group(s) given
5001    /// their UUID(s) or name(s).
5002    ///
5003    /// <details><summary>JSON schema</summary>
5004    ///
5005    /// ```json
5006    ///{
5007    ///  "description": "The response message for deleting of one or more
5008    /// service group(s) given their\nUUID(s) or name(s).",
5009    ///  "type": "object",
5010    ///  "properties": {
5011    ///    "data": {
5012    ///      "description": "The response data for this request.",
5013    ///      "allOf": [
5014    ///        {
5015    ///          "$ref": "#/components/schemas/DeleteServiceGroupsResponseData"
5016    ///        }
5017    ///      ]
5018    ///    },
5019    ///    "errors": {
5020    ///      "description": "A list of errors which may have occurred during the
5021    /// request.",
5022    ///      "type": "array",
5023    ///      "items": {
5024    ///        "$ref": "#/components/schemas/ResponseError"
5025    ///      }
5026    ///    },
5027    ///    "message": {
5028    ///      "description": "An optional message providing additional
5029    /// information about the status.\nThis field is useful when the status is
5030    /// not `success`.",
5031    ///      "examples": [
5032    ///        "Failed to perform all operations"
5033    ///      ],
5034    ///      "type": "string"
5035    ///    },
5036    ///    "op_time_us": {
5037    ///      "description": "The operation time in microseconds.  This is the
5038    /// time it took to process\nthe request and generate the response.",
5039    ///      "examples": [
5040    ///        46
5041    ///      ],
5042    ///      "type": "integer",
5043    ///      "format": "uint64"
5044    ///    },
5045    ///    "status": {
5046    ///      "description": "The status of the response.",
5047    ///      "allOf": [
5048    ///        {
5049    ///          "$ref": "#/components/schemas/ResponseStatus"
5050    ///        }
5051    ///      ]
5052    ///    }
5053    ///  }
5054    ///}
5055    /// ```
5056    /// </details>
5057    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5058    pub struct DeleteServiceGroupsResponse {
5059        ///The response data for this request.
5060        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5061        pub data: ::std::option::Option<DeleteServiceGroupsResponseData>,
5062        ///A list of errors which may have occurred during the request.
5063        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5064        pub errors: ::std::vec::Vec<ResponseError>,
5065        ///An optional message providing additional information about the
5066        /// status. This field is useful when the status is not
5067        /// `success`.
5068        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5069        pub message: ::std::option::Option<::std::string::String>,
5070        ///The operation time in microseconds.  This is the time it took to
5071        /// process the request and generate the response.
5072        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5073        pub op_time_us: ::std::option::Option<u64>,
5074        ///The status of the response.
5075        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5076        pub status: ::std::option::Option<ResponseStatus>,
5077    }
5078
5079    impl ::std::convert::From<&DeleteServiceGroupsResponse> for DeleteServiceGroupsResponse {
5080        fn from(value: &DeleteServiceGroupsResponse) -> Self {
5081            value.clone()
5082        }
5083    }
5084
5085    impl ::std::default::Default for DeleteServiceGroupsResponse {
5086        fn default() -> Self {
5087            Self {
5088                data: Default::default(),
5089                errors: Default::default(),
5090                message: Default::default(),
5091                op_time_us: Default::default(),
5092                status: Default::default(),
5093            }
5094        }
5095    }
5096
5097    ///`DeleteServiceGroupsResponseData`
5098    ///
5099    /// <details><summary>JSON schema</summary>
5100    ///
5101    /// ```json
5102    ///{
5103    ///  "type": "object",
5104    ///  "properties": {
5105    ///    "service_groups": {
5106    ///      "description": "The service group(s) which were deleted by the
5107    /// request.",
5108    ///      "type": "array",
5109    ///      "items": {
5110    ///        "$ref":
5111    /// "#/components/schemas/DeleteServiceGroupsResponseDeletedServiceGroup"
5112    ///      }
5113    ///    }
5114    ///  }
5115    ///}
5116    /// ```
5117    /// </details>
5118    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5119    pub struct DeleteServiceGroupsResponseData {
5120        ///The service group(s) which were deleted by the request.
5121        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5122        pub service_groups: ::std::vec::Vec<DeleteServiceGroupsResponseDeletedServiceGroup>,
5123    }
5124
5125    impl ::std::convert::From<&DeleteServiceGroupsResponseData> for DeleteServiceGroupsResponseData {
5126        fn from(value: &DeleteServiceGroupsResponseData) -> Self {
5127            value.clone()
5128        }
5129    }
5130
5131    impl ::std::default::Default for DeleteServiceGroupsResponseData {
5132        fn default() -> Self {
5133            Self {
5134                service_groups: Default::default(),
5135            }
5136        }
5137    }
5138
5139    ///Details of the service group which was deleted by this request.
5140    ///
5141    /// <details><summary>JSON schema</summary>
5142    ///
5143    /// ```json
5144    ///{
5145    ///  "description": "Details of the service group which was deleted by this
5146    /// request.",
5147    ///  "type": "object",
5148    ///  "properties": {
5149    ///    "error": {
5150    ///      "description": "An optional error code providing additional
5151    /// information about the status.\nThis field is only set when this message
5152    /// object is used as a response\nmessage, and is useful when the status is
5153    /// not `success`.",
5154    ///      "examples": [
5155    ///        8
5156    ///      ],
5157    ///      "type": "integer",
5158    ///      "format": "int32"
5159    ///    },
5160    ///    "message": {
5161    ///      "description": "An optional message providing additional
5162    /// information about the status.\nThis field is only set when this message
5163    /// object is used as a response\nmessage, and is useful when the status is
5164    /// not `success`.",
5165    ///      "examples": [
5166    ///        "No service with name 'funky-town-g756b5d'"
5167    ///      ],
5168    ///      "type": "string"
5169    ///    },
5170    ///    "name": {
5171    ///      "description": "The name of the service group which was deleted.",
5172    ///      "examples": [
5173    ///        "funky-service-g7gum5cj"
5174    ///      ],
5175    ///      "type": "string"
5176    ///    },
5177    ///    "status": {
5178    ///      "description": "Indicates whether the delete operation was
5179    /// successful or not for this\nservice group.",
5180    ///      "allOf": [
5181    ///        {
5182    ///          "$ref": "#/components/schemas/ResponseStatus"
5183    ///        }
5184    ///      ]
5185    ///    },
5186    ///    "uuid": {
5187    ///      "description": "The UUID of the service group which was deleted.",
5188    ///      "examples": [
5189    ///        "12345678-90ab-cdef-1234-567890abcdef"
5190    ///      ],
5191    ///      "type": "string",
5192    ///      "format": "uuid"
5193    ///    }
5194    ///  }
5195    ///}
5196    /// ```
5197    /// </details>
5198    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5199    pub struct DeleteServiceGroupsResponseDeletedServiceGroup {
5200        ///An optional error code providing additional information about the
5201        /// status. This field is only set when this message object is
5202        /// used as a response message, and is useful when the status is
5203        /// not `success`.
5204        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5205        pub error: ::std::option::Option<i32>,
5206        ///An optional message providing additional information about the
5207        /// status. This field is only set when this message object is
5208        /// used as a response message, and is useful when the status is
5209        /// not `success`.
5210        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5211        pub message: ::std::option::Option<::std::string::String>,
5212        ///The name of the service group which was deleted.
5213        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5214        pub name: ::std::option::Option<::std::string::String>,
5215        ///Indicates whether the delete operation was successful or not for
5216        /// this service group.
5217        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5218        pub status: ::std::option::Option<ResponseStatus>,
5219        ///The UUID of the service group which was deleted.
5220        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5221        pub uuid: ::std::option::Option<::uuid::Uuid>,
5222    }
5223
5224    impl ::std::convert::From<&DeleteServiceGroupsResponseDeletedServiceGroup>
5225        for DeleteServiceGroupsResponseDeletedServiceGroup
5226    {
5227        fn from(value: &DeleteServiceGroupsResponseDeletedServiceGroup) -> Self {
5228            value.clone()
5229        }
5230    }
5231
5232    impl ::std::default::Default for DeleteServiceGroupsResponseDeletedServiceGroup {
5233        fn default() -> Self {
5234            Self {
5235                error: Default::default(),
5236                message: Default::default(),
5237                name: Default::default(),
5238                status: Default::default(),
5239                uuid: Default::default(),
5240            }
5241        }
5242    }
5243
5244    ///`DeleteVolumesResponse`
5245    ///
5246    /// <details><summary>JSON schema</summary>
5247    ///
5248    /// ```json
5249    ///{
5250    ///  "type": "object",
5251    ///  "allOf": [
5252    ///    {
5253    ///      "type": "object",
5254    ///      "properties": {
5255    ///        "data": {
5256    ///          "description": "The response data for this request.",
5257    ///          "allOf": [
5258    ///            {
5259    ///              "$ref": "#/components/schemas/DeleteVolumesResponseData"
5260    ///            }
5261    ///          ]
5262    ///        },
5263    ///        "errors": {
5264    ///          "description": "A list of errors which may have occurred during
5265    /// the request.",
5266    ///          "type": "array",
5267    ///          "items": {
5268    ///            "$ref": "#/components/schemas/ResponseError"
5269    ///          }
5270    ///        },
5271    ///        "op_time_us": {
5272    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
5273    ///          "examples": [
5274    ///            46
5275    ///          ],
5276    ///          "type": "integer",
5277    ///          "format": "uint64"
5278    ///        },
5279    ///        "status": {
5280    ///          "description": "The status of the response.",
5281    ///          "allOf": [
5282    ///            {
5283    ///              "$ref": "#/components/schemas/ResponseStatus"
5284    ///            }
5285    ///          ]
5286    ///        }
5287    ///      }
5288    ///    },
5289    ///    {
5290    ///      "oneOf": [
5291    ///        {
5292    ///          "title": "message",
5293    ///          "type": "object",
5294    ///          "properties": {
5295    ///            "message": {
5296    ///              "description": "An optional message providing additional
5297    /// information about the status.\nThis field is useful when the status is
5298    /// not `success`.",
5299    ///              "examples": [
5300    ///                "Failed to perform all operations"
5301    ///              ],
5302    ///              "type": "string"
5303    ///            }
5304    ///          }
5305    ///        }
5306    ///      ]
5307    ///    }
5308    ///  ]
5309    ///}
5310    /// ```
5311    /// </details>
5312    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5313    pub struct DeleteVolumesResponse {
5314        ///The response data for this request.
5315        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5316        pub data: ::std::option::Option<DeleteVolumesResponseData>,
5317        ///A list of errors which may have occurred during the request.
5318        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5319        pub errors: ::std::vec::Vec<ResponseError>,
5320        ///An optional message providing additional information about the
5321        /// status. This field is useful when the status is not
5322        /// `success`.
5323        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5324        pub message: ::std::option::Option<::std::string::String>,
5325        ///The operation time in microseconds.  This is the time it took to
5326        /// process the request and generate the response.
5327        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5328        pub op_time_us: ::std::option::Option<u64>,
5329        ///The status of the response.
5330        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5331        pub status: ::std::option::Option<ResponseStatus>,
5332    }
5333
5334    impl ::std::convert::From<&DeleteVolumesResponse> for DeleteVolumesResponse {
5335        fn from(value: &DeleteVolumesResponse) -> Self {
5336            value.clone()
5337        }
5338    }
5339
5340    impl ::std::default::Default for DeleteVolumesResponse {
5341        fn default() -> Self {
5342            Self {
5343                data: Default::default(),
5344                errors: Default::default(),
5345                message: Default::default(),
5346                op_time_us: Default::default(),
5347                status: Default::default(),
5348            }
5349        }
5350    }
5351
5352    ///`DeleteVolumesResponseData`
5353    ///
5354    /// <details><summary>JSON schema</summary>
5355    ///
5356    /// ```json
5357    ///{
5358    ///  "type": "object",
5359    ///  "properties": {
5360    ///    "volumes": {
5361    ///      "description": "The volume(s) which were deleted by the request.",
5362    ///      "type": "array",
5363    ///      "items": {
5364    ///        "$ref": "#/components/schemas/DeleteVolumesResponseDeletedVolume"
5365    ///      }
5366    ///    }
5367    ///  }
5368    ///}
5369    /// ```
5370    /// </details>
5371    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5372    pub struct DeleteVolumesResponseData {
5373        ///The volume(s) which were deleted by the request.
5374        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5375        pub volumes: ::std::vec::Vec<DeleteVolumesResponseDeletedVolume>,
5376    }
5377
5378    impl ::std::convert::From<&DeleteVolumesResponseData> for DeleteVolumesResponseData {
5379        fn from(value: &DeleteVolumesResponseData) -> Self {
5380            value.clone()
5381        }
5382    }
5383
5384    impl ::std::default::Default for DeleteVolumesResponseData {
5385        fn default() -> Self {
5386            Self {
5387                volumes: Default::default(),
5388            }
5389        }
5390    }
5391
5392    ///`DeleteVolumesResponseDeletedVolume`
5393    ///
5394    /// <details><summary>JSON schema</summary>
5395    ///
5396    /// ```json
5397    ///{
5398    ///  "type": "object",
5399    ///  "properties": {
5400    ///    "error": {
5401    ///      "description": "An optional error code providing additional
5402    /// information about the status.\nThis field is useful when the status is
5403    /// not `success`.",
5404    ///      "examples": [
5405    ///        8
5406    ///      ],
5407    ///      "type": "integer",
5408    ///      "format": "int32"
5409    ///    },
5410    ///    "message": {
5411    ///      "description": "An optional message providing additional
5412    /// information about the status.\nThis field is useful when the status is
5413    /// not `success`.",
5414    ///      "examples": [
5415    ///        "No volume with name 'funky-town-g756b5d'"
5416    ///      ],
5417    ///      "type": "string"
5418    ///    },
5419    ///    "name": {
5420    ///      "description": "The name of the volume that was deleted.",
5421    ///      "examples": [
5422    ///        "funky-vol-g7gum5cj"
5423    ///      ],
5424    ///      "type": "string"
5425    ///    },
5426    ///    "status": {
5427    ///      "description": "The status of the response.",
5428    ///      "allOf": [
5429    ///        {
5430    ///          "$ref": "#/components/schemas/ResponseStatus"
5431    ///        }
5432    ///      ]
5433    ///    },
5434    ///    "uuid": {
5435    ///      "description": "The UUID of the volume that was deleted.",
5436    ///      "examples": [
5437    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
5438    ///      ],
5439    ///      "type": "string",
5440    ///      "format": "uuid"
5441    ///    }
5442    ///  }
5443    ///}
5444    /// ```
5445    /// </details>
5446    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5447    pub struct DeleteVolumesResponseDeletedVolume {
5448        ///An optional error code providing additional information about the
5449        /// status. This field is useful when the status is not
5450        /// `success`.
5451        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5452        pub error: ::std::option::Option<i32>,
5453        ///An optional message providing additional information about the
5454        /// status. This field is useful when the status is not
5455        /// `success`.
5456        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5457        pub message: ::std::option::Option<::std::string::String>,
5458        ///The name of the volume that was deleted.
5459        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5460        pub name: ::std::option::Option<::std::string::String>,
5461        ///The status of the response.
5462        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5463        pub status: ::std::option::Option<ResponseStatus>,
5464        ///The UUID of the volume that was deleted.
5465        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5466        pub uuid: ::std::option::Option<::uuid::Uuid>,
5467    }
5468
5469    impl ::std::convert::From<&DeleteVolumesResponseDeletedVolume>
5470        for DeleteVolumesResponseDeletedVolume
5471    {
5472        fn from(value: &DeleteVolumesResponseDeletedVolume) -> Self {
5473            value.clone()
5474        }
5475    }
5476
5477    impl ::std::default::Default for DeleteVolumesResponseDeletedVolume {
5478        fn default() -> Self {
5479            Self {
5480                error: Default::default(),
5481                message: Default::default(),
5482                name: Default::default(),
5483                status: Default::default(),
5484                uuid: Default::default(),
5485            }
5486        }
5487    }
5488
5489    ///`DetachVolumeByUuidRequestBody`
5490    ///
5491    /// <details><summary>JSON schema</summary>
5492    ///
5493    /// ```json
5494    ///{
5495    ///  "type": "object",
5496    ///  "properties": {
5497    ///    "from": {
5498    ///      "description": "UUID or name of the instance to detach the volume
5499    /// from.",
5500    ///      "allOf": [
5501    ///        {
5502    ///          "$ref": "#/components/schemas/BodyInstanceID"
5503    ///        }
5504    ///      ]
5505    ///    }
5506    ///  }
5507    ///}
5508    /// ```
5509    /// </details>
5510    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5511    pub struct DetachVolumeByUuidRequestBody {
5512        ///UUID or name of the instance to detach the volume from.
5513        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5514        pub from: ::std::option::Option<BodyInstanceId>,
5515    }
5516
5517    impl ::std::convert::From<&DetachVolumeByUuidRequestBody> for DetachVolumeByUuidRequestBody {
5518        fn from(value: &DetachVolumeByUuidRequestBody) -> Self {
5519            value.clone()
5520        }
5521    }
5522
5523    impl ::std::default::Default for DetachVolumeByUuidRequestBody {
5524        fn default() -> Self {
5525            Self {
5526                from: Default::default(),
5527            }
5528        }
5529    }
5530
5531    ///The request message for detaching one or more volume(s) from instances
5532    /// by their UUID(s) or name(s).
5533    ///
5534    /// <details><summary>JSON schema</summary>
5535    ///
5536    /// ```json
5537    ///{
5538    ///  "description": "The request message for detaching one or more volume(s)
5539    /// from instances by\ntheir UUID(s) or name(s).",
5540    ///  "type": "object",
5541    ///  "properties": {
5542    ///    "from": {
5543    ///      "description": "UUID or name of the instance to detach the volume
5544    /// from.",
5545    ///      "allOf": [
5546    ///        {
5547    ///          "$ref": "#/components/schemas/DetachVolumesRequestInstanceID"
5548    ///        }
5549    ///      ]
5550    ///    },
5551    ///    "name": {
5552    ///      "description": "The name of the volume to detach. Mutually exclusive with UUID.\nExactly one of uuid or name must be provided.",
5553    ///      "examples": [
5554    ///        "funky-town-g7gum5cj"
5555    ///      ],
5556    ///      "type": "string"
5557    ///    },
5558    ///    "uuid": {
5559    ///      "description": "The UUID of the volume to detach. Mutually exclusive with name.\nExactly one of uuid or name must be provided.",
5560    ///      "examples": [
5561    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
5562    ///      ],
5563    ///      "type": "string",
5564    ///      "format": "uuid"
5565    ///    }
5566    ///  }
5567    ///}
5568    /// ```
5569    /// </details>
5570    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5571    pub struct DetachVolumesRequest {
5572        ///UUID or name of the instance to detach the volume from.
5573        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5574        pub from: ::std::option::Option<DetachVolumesRequestInstanceId>,
5575        ///The name of the volume to detach. Mutually exclusive with UUID.
5576        ///Exactly one of uuid or name must be provided.
5577        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5578        pub name: ::std::option::Option<::std::string::String>,
5579        ///The UUID of the volume to detach. Mutually exclusive with name.
5580        ///Exactly one of uuid or name must be provided.
5581        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5582        pub uuid: ::std::option::Option<::uuid::Uuid>,
5583    }
5584
5585    impl ::std::convert::From<&DetachVolumesRequest> for DetachVolumesRequest {
5586        fn from(value: &DetachVolumesRequest) -> Self {
5587            value.clone()
5588        }
5589    }
5590
5591    impl ::std::default::Default for DetachVolumesRequest {
5592        fn default() -> Self {
5593            Self {
5594                from: Default::default(),
5595                name: Default::default(),
5596                uuid: Default::default(),
5597            }
5598        }
5599    }
5600
5601    ///Reference to the instance to detach the volume from.
5602    ///
5603    /// <details><summary>JSON schema</summary>
5604    ///
5605    /// ```json
5606    ///{
5607    ///  "description": "Reference to the instance to detach the volume from.",
5608    ///  "type": "object",
5609    ///  "allOf": [
5610    ///    {
5611    ///      "type": "object",
5612    ///      "properties": {
5613    ///        "uuid": {
5614    ///          "description": "The UUID of the instance that the volume is
5615    /// detached from.",
5616    ///          "examples": [
5617    ///            "c1d2e3f4-5678-90ab-cdef-1234567890ab"
5618    ///          ],
5619    ///          "type": "string",
5620    ///          "format": "uuid"
5621    ///        }
5622    ///      }
5623    ///    },
5624    ///    {
5625    ///      "oneOf": [
5626    ///        {
5627    ///          "title": "name",
5628    ///          "type": "object",
5629    ///          "properties": {
5630    ///            "name": {
5631    ///              "description": "The name of the instance that the volume is
5632    /// detached from.",
5633    ///              "examples": [
5634    ///                "funky-town-g7gum5cj"
5635    ///              ],
5636    ///              "type": "string"
5637    ///            }
5638    ///          }
5639    ///        }
5640    ///      ]
5641    ///    }
5642    ///  ]
5643    ///}
5644    /// ```
5645    /// </details>
5646    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5647    pub struct DetachVolumesRequestInstanceId {
5648        ///The name of the instance that the volume is detached from.
5649        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5650        pub name: ::std::option::Option<::std::string::String>,
5651        ///The UUID of the instance that the volume is detached from.
5652        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5653        pub uuid: ::std::option::Option<::uuid::Uuid>,
5654    }
5655
5656    impl ::std::convert::From<&DetachVolumesRequestInstanceId> for DetachVolumesRequestInstanceId {
5657        fn from(value: &DetachVolumesRequestInstanceId) -> Self {
5658            value.clone()
5659        }
5660    }
5661
5662    impl ::std::default::Default for DetachVolumesRequestInstanceId {
5663        fn default() -> Self {
5664            Self {
5665                name: Default::default(),
5666                uuid: Default::default(),
5667            }
5668        }
5669    }
5670
5671    ///`DetachVolumesResponse`
5672    ///
5673    /// <details><summary>JSON schema</summary>
5674    ///
5675    /// ```json
5676    ///{
5677    ///  "type": "object",
5678    ///  "allOf": [
5679    ///    {
5680    ///      "type": "object",
5681    ///      "properties": {
5682    ///        "data": {
5683    ///          "description": "The response data for this request.",
5684    ///          "allOf": [
5685    ///            {
5686    ///              "$ref": "#/components/schemas/DetachVolumesResponseData"
5687    ///            }
5688    ///          ]
5689    ///        },
5690    ///        "errors": {
5691    ///          "description": "A list of errors which may have occurred during
5692    /// the request.",
5693    ///          "type": "array",
5694    ///          "items": {
5695    ///            "$ref": "#/components/schemas/ResponseError"
5696    ///          }
5697    ///        },
5698    ///        "op_time_us": {
5699    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
5700    ///          "examples": [
5701    ///            46
5702    ///          ],
5703    ///          "type": "integer",
5704    ///          "format": "uint64"
5705    ///        },
5706    ///        "status": {
5707    ///          "description": "The status of the response.",
5708    ///          "allOf": [
5709    ///            {
5710    ///              "$ref": "#/components/schemas/ResponseStatus"
5711    ///            }
5712    ///          ]
5713    ///        }
5714    ///      }
5715    ///    },
5716    ///    {
5717    ///      "oneOf": [
5718    ///        {
5719    ///          "title": "message",
5720    ///          "type": "object",
5721    ///          "properties": {
5722    ///            "message": {
5723    ///              "description": "An optional message providing additional
5724    /// information about the status.\nThis field is useful when the status is
5725    /// not `success`.",
5726    ///              "examples": [
5727    ///                "Failed to perform all operations"
5728    ///              ],
5729    ///              "type": "string"
5730    ///            }
5731    ///          }
5732    ///        }
5733    ///      ]
5734    ///    }
5735    ///  ]
5736    ///}
5737    /// ```
5738    /// </details>
5739    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5740    pub struct DetachVolumesResponse {
5741        ///The response data for this request.
5742        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5743        pub data: ::std::option::Option<DetachVolumesResponseData>,
5744        ///A list of errors which may have occurred during the request.
5745        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5746        pub errors: ::std::vec::Vec<ResponseError>,
5747        ///An optional message providing additional information about the
5748        /// status. This field is useful when the status is not
5749        /// `success`.
5750        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5751        pub message: ::std::option::Option<::std::string::String>,
5752        ///The operation time in microseconds.  This is the time it took to
5753        /// process the request and generate the response.
5754        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5755        pub op_time_us: ::std::option::Option<u64>,
5756        ///The status of the response.
5757        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5758        pub status: ::std::option::Option<ResponseStatus>,
5759    }
5760
5761    impl ::std::convert::From<&DetachVolumesResponse> for DetachVolumesResponse {
5762        fn from(value: &DetachVolumesResponse) -> Self {
5763            value.clone()
5764        }
5765    }
5766
5767    impl ::std::default::Default for DetachVolumesResponse {
5768        fn default() -> Self {
5769            Self {
5770                data: Default::default(),
5771                errors: Default::default(),
5772                message: Default::default(),
5773                op_time_us: Default::default(),
5774                status: Default::default(),
5775            }
5776        }
5777    }
5778
5779    ///`DetachVolumesResponseData`
5780    ///
5781    /// <details><summary>JSON schema</summary>
5782    ///
5783    /// ```json
5784    ///{
5785    ///  "type": "object",
5786    ///  "properties": {
5787    ///    "volumes": {
5788    ///      "description": "The volume(s) which were detached by the request.",
5789    ///      "type": "array",
5790    ///      "items": {
5791    ///        "$ref":
5792    /// "#/components/schemas/DetachVolumesResponseDetachedVolume"
5793    ///      }
5794    ///    }
5795    ///  }
5796    ///}
5797    /// ```
5798    /// </details>
5799    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5800    pub struct DetachVolumesResponseData {
5801        ///The volume(s) which were detached by the request.
5802        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
5803        pub volumes: ::std::vec::Vec<DetachVolumesResponseDetachedVolume>,
5804    }
5805
5806    impl ::std::convert::From<&DetachVolumesResponseData> for DetachVolumesResponseData {
5807        fn from(value: &DetachVolumesResponseData) -> Self {
5808            value.clone()
5809        }
5810    }
5811
5812    impl ::std::default::Default for DetachVolumesResponseData {
5813        fn default() -> Self {
5814            Self {
5815                volumes: Default::default(),
5816            }
5817        }
5818    }
5819
5820    ///`DetachVolumesResponseDetachedVolume`
5821    ///
5822    /// <details><summary>JSON schema</summary>
5823    ///
5824    /// ```json
5825    ///{
5826    ///  "type": "object",
5827    ///  "properties": {
5828    ///    "error": {
5829    ///      "description": "An optional error code providing additional
5830    /// information about the status.\nThis field is useful when the status is
5831    /// not `success`.",
5832    ///      "examples": [
5833    ///        8
5834    ///      ],
5835    ///      "type": "integer",
5836    ///      "format": "int32"
5837    ///    },
5838    ///    "message": {
5839    ///      "description": "An optional message providing additional
5840    /// information about the status.\nThis field is useful when the status is
5841    /// not `success`.",
5842    ///      "examples": [
5843    ///        "No volume with name 'funky-town-g756b5d'"
5844    ///      ],
5845    ///      "type": "string"
5846    ///    },
5847    ///    "name": {
5848    ///      "description": "The name of the volume that was detached.",
5849    ///      "examples": [
5850    ///        "funky-vol-g7gum5cj"
5851    ///      ],
5852    ///      "type": "string"
5853    ///    },
5854    ///    "status": {
5855    ///      "description": "The status of the response.",
5856    ///      "allOf": [
5857    ///        {
5858    ///          "$ref": "#/components/schemas/ResponseStatus"
5859    ///        }
5860    ///      ]
5861    ///    },
5862    ///    "uuid": {
5863    ///      "description": "The UUID of the volume that was detached.",
5864    ///      "examples": [
5865    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
5866    ///      ],
5867    ///      "type": "string",
5868    ///      "format": "uuid"
5869    ///    }
5870    ///  }
5871    ///}
5872    /// ```
5873    /// </details>
5874    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5875    pub struct DetachVolumesResponseDetachedVolume {
5876        ///An optional error code providing additional information about the
5877        /// status. This field is useful when the status is not
5878        /// `success`.
5879        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5880        pub error: ::std::option::Option<i32>,
5881        ///An optional message providing additional information about the
5882        /// status. This field is useful when the status is not
5883        /// `success`.
5884        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5885        pub message: ::std::option::Option<::std::string::String>,
5886        ///The name of the volume that was detached.
5887        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5888        pub name: ::std::option::Option<::std::string::String>,
5889        ///The status of the response.
5890        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5891        pub status: ::std::option::Option<ResponseStatus>,
5892        ///The UUID of the volume that was detached.
5893        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5894        pub uuid: ::std::option::Option<::uuid::Uuid>,
5895    }
5896
5897    impl ::std::convert::From<&DetachVolumesResponseDetachedVolume>
5898        for DetachVolumesResponseDetachedVolume
5899    {
5900        fn from(value: &DetachVolumesResponseDetachedVolume) -> Self {
5901            value.clone()
5902        }
5903    }
5904
5905    impl ::std::default::Default for DetachVolumesResponseDetachedVolume {
5906        fn default() -> Self {
5907            Self {
5908                error: Default::default(),
5909                message: Default::default(),
5910                name: Default::default(),
5911                status: Default::default(),
5912                uuid: Default::default(),
5913            }
5914        }
5915    }
5916
5917    ///A domain name.
5918    ///
5919    ///Domain names are completely specified with all labels in the hierarchy
5920    /// of the DNS, having no parts omitted.  The domain can be associated
5921    /// with an existing certificate by specifying the certificate's name or
5922    /// UUID.  If no certificate is specified and a FQDN is provided,
5923    /// Unikraft Cloud will automatically generate a new certificate for the
5924    /// domain based on Let's Encrypt and seek to accomplish a DNS-01
5925    /// challenge.
5926    ///
5927    /// <details><summary>JSON schema</summary>
5928    ///
5929    /// ```json
5930    ///{
5931    ///  "description": "A domain name.\n\nDomain names are completely specified
5932    /// with all labels in the hierarchy of the\nDNS, having no parts omitted.
5933    /// The domain can be associated with an existing\ncertificate by specifying
5934    /// the certificate's name or UUID.  If no certificate\nis specified and a
5935    /// FQDN is provided, Unikraft Cloud will automatically\ngenerate a new
5936    /// certificate for the domain based on Let's Encrypt and seek
5937    /// to\naccomplish a DNS-01 challenge.",
5938    ///  "type": "object",
5939    ///  "allOf": [
5940    ///    {
5941    ///      "type": "object",
5942    ///      "properties": {
5943    ///        "fqdn": {
5944    ///          "description": "Publicly accessible domain name.  If this name
5945    /// ends in a period `.` it must\nbe a valid Full Qualified Domain Name
5946    /// (FQDN), otherwise it will become a\nsubdomain of the target metro.",
5947    ///          "examples": [
5948    ///            "example.com."
5949    ///          ],
5950    ///          "type": "string"
5951    ///        }
5952    ///      }
5953    ///    },
5954    ///    {
5955    ///      "oneOf": [
5956    ///        {
5957    ///          "title": "certificate",
5958    ///          "type": "object",
5959    ///          "properties": {
5960    ///            "certificate": {
5961    ///              "description": "Use an existing certificate for the domain.
5962    /// If this field is\nspecified, the domain must be associated with a valid
5963    /// certificate.",
5964    ///              "allOf": [
5965    ///                {
5966    ///                  "$ref": "#/components/schemas/Certificate"
5967    ///                }
5968    ///              ]
5969    ///            }
5970    ///          }
5971    ///        }
5972    ///      ]
5973    ///    }
5974    ///  ]
5975    ///}
5976    /// ```
5977    /// </details>
5978    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
5979    pub struct Domain {
5980        ///Use an existing certificate for the domain.  If this field is
5981        ///specified, the domain must be associated with a valid certificate.
5982        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5983        pub certificate: ::std::option::Option<Certificate>,
5984        ///Publicly accessible domain name.  If this name ends in a period `.`
5985        /// it must be a valid Full Qualified Domain Name (FQDN),
5986        /// otherwise it will become a subdomain of the target metro.
5987        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
5988        pub fqdn: ::std::option::Option<::std::string::String>,
5989    }
5990
5991    impl ::std::convert::From<&Domain> for Domain {
5992        fn from(value: &Domain) -> Self {
5993            value.clone()
5994        }
5995    }
5996
5997    impl ::std::default::Default for Domain {
5998        fn default() -> Self {
5999            Self {
6000                certificate: Default::default(),
6001                fqdn: Default::default(),
6002            }
6003        }
6004    }
6005
6006    ///The request message to get an autoscale configuration policy by name.
6007    ///
6008    /// <details><summary>JSON schema</summary>
6009    ///
6010    /// ```json
6011    ///{
6012    ///  "description": "The request message to get an autoscale configuration
6013    /// policy by name.",
6014    ///  "type": "object",
6015    ///  "required": [
6016    ///    "name"
6017    ///  ],
6018    ///  "properties": {
6019    ///    "name": {
6020    ///      "description": "The Name of the policy to get.",
6021    ///      "examples": [
6022    ///        "funky-policy"
6023    ///      ],
6024    ///      "type": "string"
6025    ///    }
6026    ///  }
6027    ///}
6028    /// ```
6029    /// </details>
6030    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6031    pub struct GetAutoscaleConfigurationPolicyRequest {
6032        ///The Name of the policy to get.
6033        pub name: ::std::string::String,
6034    }
6035
6036    impl ::std::convert::From<&GetAutoscaleConfigurationPolicyRequest>
6037        for GetAutoscaleConfigurationPolicyRequest
6038    {
6039        fn from(value: &GetAutoscaleConfigurationPolicyRequest) -> Self {
6040            value.clone()
6041        }
6042    }
6043
6044    ///`GetAutoscaleConfigurationPolicyResponse`
6045    ///
6046    /// <details><summary>JSON schema</summary>
6047    ///
6048    /// ```json
6049    ///{
6050    ///  "type": "object",
6051    ///  "allOf": [
6052    ///    {
6053    ///      "type": "object",
6054    ///      "properties": {
6055    ///        "data": {
6056    ///          "description": "The response data for this request.",
6057    ///          "allOf": [
6058    ///            {
6059    ///              "$ref":
6060    /// "#/components/schemas/GetAutoscaleConfigurationPolicyResponseData"
6061    ///            }
6062    ///          ]
6063    ///        },
6064    ///        "errors": {
6065    ///          "description": "A list of errors which may have occurred during
6066    /// the request.",
6067    ///          "type": "array",
6068    ///          "items": {
6069    ///            "$ref": "#/components/schemas/ResponseError"
6070    ///          }
6071    ///        },
6072    ///        "op_time_us": {
6073    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
6074    ///          "examples": [
6075    ///            12
6076    ///          ],
6077    ///          "type": "integer",
6078    ///          "format": "uint64"
6079    ///        },
6080    ///        "status": {
6081    ///          "description": "The status of the response.",
6082    ///          "allOf": [
6083    ///            {
6084    ///              "$ref": "#/components/schemas/ResponseStatus"
6085    ///            }
6086    ///          ]
6087    ///        }
6088    ///      }
6089    ///    },
6090    ///    {
6091    ///      "oneOf": [
6092    ///        {
6093    ///          "title": "message",
6094    ///          "type": "object",
6095    ///          "properties": {
6096    ///            "message": {
6097    ///              "description": "An optional message providing additional
6098    /// information about the status.\nThis field is useful when the status is
6099    /// not `success`.",
6100    ///              "examples": [
6101    ///                "Failed to perform all operations"
6102    ///              ],
6103    ///              "type": "string"
6104    ///            }
6105    ///          }
6106    ///        }
6107    ///      ]
6108    ///    }
6109    ///  ]
6110    ///}
6111    /// ```
6112    /// </details>
6113    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6114    pub struct GetAutoscaleConfigurationPolicyResponse {
6115        ///The response data for this request.
6116        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6117        pub data: ::std::option::Option<GetAutoscaleConfigurationPolicyResponseData>,
6118        ///A list of errors which may have occurred during the request.
6119        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6120        pub errors: ::std::vec::Vec<ResponseError>,
6121        ///An optional message providing additional information about the
6122        /// status. This field is useful when the status is not
6123        /// `success`.
6124        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6125        pub message: ::std::option::Option<::std::string::String>,
6126        ///The operation time in microseconds.  This is the time it took to
6127        /// process the request and generate the response.
6128        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6129        pub op_time_us: ::std::option::Option<u64>,
6130        ///The status of the response.
6131        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6132        pub status: ::std::option::Option<ResponseStatus>,
6133    }
6134
6135    impl ::std::convert::From<&GetAutoscaleConfigurationPolicyResponse>
6136        for GetAutoscaleConfigurationPolicyResponse
6137    {
6138        fn from(value: &GetAutoscaleConfigurationPolicyResponse) -> Self {
6139            value.clone()
6140        }
6141    }
6142
6143    impl ::std::default::Default for GetAutoscaleConfigurationPolicyResponse {
6144        fn default() -> Self {
6145            Self {
6146                data: Default::default(),
6147                errors: Default::default(),
6148                message: Default::default(),
6149                op_time_us: Default::default(),
6150                status: Default::default(),
6151            }
6152        }
6153    }
6154
6155    ///`GetAutoscaleConfigurationPolicyResponseData`
6156    ///
6157    /// <details><summary>JSON schema</summary>
6158    ///
6159    /// ```json
6160    ///{
6161    ///  "type": "object",
6162    ///  "properties": {
6163    ///    "policies": {
6164    ///      "description": "The policy which was retrieved by the request.",
6165    ///      "type": "array",
6166    ///      "items": {
6167    ///        "$ref":
6168    /// "#/components/schemas/
6169    /// GetAutoscaleConfigurationPolicyResponsePolicyResponse"
6170    ///      }
6171    ///    }
6172    ///  }
6173    ///}
6174    /// ```
6175    /// </details>
6176    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6177    pub struct GetAutoscaleConfigurationPolicyResponseData {
6178        ///The policy which was retrieved by the request.
6179        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6180        pub policies: ::std::vec::Vec<GetAutoscaleConfigurationPolicyResponsePolicyResponse>,
6181    }
6182
6183    impl ::std::convert::From<&GetAutoscaleConfigurationPolicyResponseData>
6184        for GetAutoscaleConfigurationPolicyResponseData
6185    {
6186        fn from(value: &GetAutoscaleConfigurationPolicyResponseData) -> Self {
6187            value.clone()
6188        }
6189    }
6190
6191    impl ::std::default::Default for GetAutoscaleConfigurationPolicyResponseData {
6192        fn default() -> Self {
6193            Self {
6194                policies: Default::default(),
6195            }
6196        }
6197    }
6198
6199    ///`GetAutoscaleConfigurationPolicyResponsePolicyResponse`
6200    ///
6201    /// <details><summary>JSON schema</summary>
6202    ///
6203    /// ```json
6204    ///{
6205    ///  "type": "object",
6206    ///  "properties": {
6207    ///    "error": {
6208    ///      "description": "An optional error code providing additional
6209    /// information about the status.\nThis field is useful when the status is
6210    /// not `success`.",
6211    ///      "examples": [
6212    ///        8
6213    ///      ],
6214    ///      "type": "integer",
6215    ///      "format": "int32"
6216    ///    },
6217    ///    "message": {
6218    ///      "description": "An optional message providing additional
6219    /// information about the status.\nThis field is useful when the status is
6220    /// not `success`.",
6221    ///      "examples": [
6222    ///        "No service with name 'funky-town-g756b5d'"
6223    ///      ],
6224    ///      "type": "string"
6225    ///    },
6226    ///    "policy": {
6227    ///      "description": "The policy which was retrieved by the request.",
6228    ///      "allOf": [
6229    ///        {
6230    ///          "$ref": "#/components/schemas/AutoscalePolicy"
6231    ///        }
6232    ///      ]
6233    ///    },
6234    ///    "status": {
6235    ///      "description": "The status of the response.",
6236    ///      "allOf": [
6237    ///        {
6238    ///          "$ref": "#/components/schemas/ResponseStatus"
6239    ///        }
6240    ///      ]
6241    ///    }
6242    ///  }
6243    ///}
6244    /// ```
6245    /// </details>
6246    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6247    pub struct GetAutoscaleConfigurationPolicyResponsePolicyResponse {
6248        ///An optional error code providing additional information about the
6249        /// status. This field is useful when the status is not
6250        /// `success`.
6251        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6252        pub error: ::std::option::Option<i32>,
6253        ///An optional message providing additional information about the
6254        /// status. This field is useful when the status is not
6255        /// `success`.
6256        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6257        pub message: ::std::option::Option<::std::string::String>,
6258        ///The policy which was retrieved by the request.
6259        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6260        pub policy: ::std::option::Option<AutoscalePolicy>,
6261        ///The status of the response.
6262        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6263        pub status: ::std::option::Option<ResponseStatus>,
6264    }
6265
6266    impl ::std::convert::From<&GetAutoscaleConfigurationPolicyResponsePolicyResponse>
6267        for GetAutoscaleConfigurationPolicyResponsePolicyResponse
6268    {
6269        fn from(value: &GetAutoscaleConfigurationPolicyResponsePolicyResponse) -> Self {
6270            value.clone()
6271        }
6272    }
6273
6274    impl ::std::default::Default for GetAutoscaleConfigurationPolicyResponsePolicyResponse {
6275        fn default() -> Self {
6276            Self {
6277                error: Default::default(),
6278                message: Default::default(),
6279                policy: Default::default(),
6280                status: Default::default(),
6281            }
6282        }
6283    }
6284
6285    ///The response message for a GetAutoscaleConfigurationsRequest.
6286    ///
6287    /// <details><summary>JSON schema</summary>
6288    ///
6289    /// ```json
6290    ///{
6291    ///  "description": "The response message for a
6292    /// GetAutoscaleConfigurationsRequest.",
6293    ///  "type": "object",
6294    ///  "allOf": [
6295    ///    {
6296    ///      "type": "object",
6297    ///      "properties": {
6298    ///        "data": {
6299    ///          "description": "The response data for this request.",
6300    ///          "allOf": [
6301    ///            {
6302    ///              "$ref":
6303    /// "#/components/schemas/GetAutoscaleConfigurationsResponseData"
6304    ///            }
6305    ///          ]
6306    ///        },
6307    ///        "errors": {
6308    ///          "description": "A list of errors which may have occurred during
6309    /// the request.",
6310    ///          "type": "array",
6311    ///          "items": {
6312    ///            "$ref": "#/components/schemas/ResponseError"
6313    ///          }
6314    ///        },
6315    ///        "op_time_us": {
6316    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
6317    ///          "examples": [
6318    ///            50
6319    ///          ],
6320    ///          "type": "integer",
6321    ///          "format": "uint64"
6322    ///        },
6323    ///        "status": {
6324    ///          "description": "The status of the response.",
6325    ///          "type": "string",
6326    ///          "format": "enum",
6327    ///          "enum": [
6328    ///            "success",
6329    ///            "error",
6330    ///            "unconfigured"
6331    ///          ]
6332    ///        }
6333    ///      }
6334    ///    },
6335    ///    {
6336    ///      "oneOf": [
6337    ///        {
6338    ///          "title": "message",
6339    ///          "type": "object",
6340    ///          "properties": {
6341    ///            "message": {
6342    ///              "description": "An optional message providing additional
6343    /// information about the status.\nThis field is useful when the status is
6344    /// not `success`.",
6345    ///              "examples": [
6346    ///                "Failed to perform all operations"
6347    ///              ],
6348    ///              "type": "string"
6349    ///            }
6350    ///          }
6351    ///        }
6352    ///      ]
6353    ///    }
6354    ///  ]
6355    ///}
6356    /// ```
6357    /// </details>
6358    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6359    pub struct GetAutoscaleConfigurationsResponse {
6360        ///The response data for this request.
6361        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6362        pub data: ::std::option::Option<GetAutoscaleConfigurationsResponseData>,
6363        ///A list of errors which may have occurred during the request.
6364        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6365        pub errors: ::std::vec::Vec<ResponseError>,
6366        ///An optional message providing additional information about the
6367        /// status. This field is useful when the status is not
6368        /// `success`.
6369        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6370        pub message: ::std::option::Option<::std::string::String>,
6371        ///The operation time in microseconds.  This is the time it took to
6372        /// process the request and generate the response.
6373        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6374        pub op_time_us: ::std::option::Option<u64>,
6375        ///The status of the response.
6376        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6377        pub status: ::std::option::Option<GetAutoscaleConfigurationsResponseStatus>,
6378    }
6379
6380    impl ::std::convert::From<&GetAutoscaleConfigurationsResponse>
6381        for GetAutoscaleConfigurationsResponse
6382    {
6383        fn from(value: &GetAutoscaleConfigurationsResponse) -> Self {
6384            value.clone()
6385        }
6386    }
6387
6388    impl ::std::default::Default for GetAutoscaleConfigurationsResponse {
6389        fn default() -> Self {
6390            Self {
6391                data: Default::default(),
6392                errors: Default::default(),
6393                message: Default::default(),
6394                op_time_us: Default::default(),
6395                status: Default::default(),
6396            }
6397        }
6398    }
6399
6400    ///`GetAutoscaleConfigurationsResponseData`
6401    ///
6402    /// <details><summary>JSON schema</summary>
6403    ///
6404    /// ```json
6405    ///{
6406    ///  "type": "object",
6407    ///  "properties": {
6408    ///    "service_groups": {
6409    ///      "description": "The configuration(s) which were retrieved by the
6410    /// request.",
6411    ///      "type": "array",
6412    ///      "items": {
6413    ///        "$ref":
6414    /// "#/components/schemas/GetAutoscaleConfigurationsResponseServiceGroup"
6415    ///      }
6416    ///    }
6417    ///  }
6418    ///}
6419    /// ```
6420    /// </details>
6421    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6422    pub struct GetAutoscaleConfigurationsResponseData {
6423        ///The configuration(s) which were retrieved by the request.
6424        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6425        pub service_groups: ::std::vec::Vec<GetAutoscaleConfigurationsResponseServiceGroup>,
6426    }
6427
6428    impl ::std::convert::From<&GetAutoscaleConfigurationsResponseData>
6429        for GetAutoscaleConfigurationsResponseData
6430    {
6431        fn from(value: &GetAutoscaleConfigurationsResponseData) -> Self {
6432            value.clone()
6433        }
6434    }
6435
6436    impl ::std::default::Default for GetAutoscaleConfigurationsResponseData {
6437        fn default() -> Self {
6438            Self {
6439                service_groups: Default::default(),
6440            }
6441        }
6442    }
6443
6444    ///`GetAutoscaleConfigurationsResponseServiceGroup`
6445    ///
6446    /// <details><summary>JSON schema</summary>
6447    ///
6448    /// ```json
6449    ///{
6450    ///  "type": "object",
6451    ///  "properties": {
6452    ///    "cooldown_time_ms": {
6453    ///      "description": "The cooldown time in seconds for the autoscale
6454    /// configuration.\nOnly if enabled is true.",
6455    ///      "examples": [
6456    ///        3000
6457    ///      ],
6458    ///      "type": "integer",
6459    ///      "format": "int64"
6460    ///    },
6461    ///    "enabled": {
6462    ///      "description": "If the autoscale configuration is enabled.",
6463    ///      "examples": [
6464    ///        true
6465    ///      ],
6466    ///      "type": "boolean"
6467    ///    },
6468    ///    "error": {
6469    ///      "description": "An optional error code providing additional
6470    /// information about the status.\nThis field is useful when the status is
6471    /// not `success`.",
6472    ///      "examples": [
6473    ///        8
6474    ///      ],
6475    ///      "type": "integer",
6476    ///      "format": "int32"
6477    ///    },
6478    ///    "max_size": {
6479    ///      "description": "The maximum number of instances to keep
6480    /// running.\nOnly if enabled is true.",
6481    ///      "examples": [
6482    ///        10
6483    ///      ],
6484    ///      "type": "integer",
6485    ///      "format": "int64"
6486    ///    },
6487    ///    "message": {
6488    ///      "description": "An optional message providing additional
6489    /// information about the status.\nThis field is useful when the status is
6490    /// not `success`.",
6491    ///      "examples": [
6492    ///        "No service with name 'funky-town-g756b5d'"
6493    ///      ],
6494    ///      "type": "string"
6495    ///    },
6496    ///    "min_size": {
6497    ///      "description": "The minimum number of instances to keep
6498    /// running.\nOnly if enabled is true.",
6499    ///      "examples": [
6500    ///        2
6501    ///      ],
6502    ///      "type": "integer",
6503    ///      "format": "int64"
6504    ///    },
6505    ///    "name": {
6506    ///      "description": "The name of the service where the configuration was
6507    /// created.",
6508    ///      "examples": [
6509    ///        "funky-instance-template"
6510    ///      ],
6511    ///      "type": "string"
6512    ///    },
6513    ///    "policies": {
6514    ///      "description": "The policies applied to the autoscale
6515    /// configuration.",
6516    ///      "type": "array",
6517    ///      "items": {
6518    ///        "$ref": "#/components/schemas/AutoscalePolicy"
6519    ///      }
6520    ///    },
6521    ///    "status": {
6522    ///      "description": "The status of the response.",
6523    ///      "allOf": [
6524    ///        {
6525    ///          "$ref": "#/components/schemas/ResponseStatus"
6526    ///        }
6527    ///      ]
6528    ///    },
6529    ///    "template": {
6530    ///      "description": "The instance template used for the autoscale
6531    /// configuration.\nOnly if enabled is true.",
6532    ///      "allOf": [
6533    ///        {
6534    ///          "$ref": "#/components/schemas/ServiceGroupTemplate"
6535    ///        }
6536    ///      ]
6537    ///    },
6538    ///    "uuid": {
6539    ///      "description": "The UUID of the service where the configuration was
6540    /// created.",
6541    ///      "examples": [
6542    ///        "123e4567-e89b-12d3-a456-426614174000"
6543    ///      ],
6544    ///      "type": "string",
6545    ///      "format": "uuid"
6546    ///    },
6547    ///    "warmup_time_ms": {
6548    ///      "description": "The warmup time in seconds for new instances.\nOnly
6549    /// if enabled is true.",
6550    ///      "examples": [
6551    ///        3000
6552    ///      ],
6553    ///      "type": "integer",
6554    ///      "format": "int64"
6555    ///    }
6556    ///  }
6557    ///}
6558    /// ```
6559    /// </details>
6560    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6561    pub struct GetAutoscaleConfigurationsResponseServiceGroup {
6562        ///The cooldown time in seconds for the autoscale configuration.
6563        ///Only if enabled is true.
6564        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6565        pub cooldown_time_ms: ::std::option::Option<i64>,
6566        ///If the autoscale configuration is enabled.
6567        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6568        pub enabled: ::std::option::Option<bool>,
6569        ///An optional error code providing additional information about the
6570        /// status. This field is useful when the status is not
6571        /// `success`.
6572        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6573        pub error: ::std::option::Option<i32>,
6574        ///The maximum number of instances to keep running.
6575        ///Only if enabled is true.
6576        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6577        pub max_size: ::std::option::Option<i64>,
6578        ///An optional message providing additional information about the
6579        /// status. This field is useful when the status is not
6580        /// `success`.
6581        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6582        pub message: ::std::option::Option<::std::string::String>,
6583        ///The minimum number of instances to keep running.
6584        ///Only if enabled is true.
6585        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6586        pub min_size: ::std::option::Option<i64>,
6587        ///The name of the service where the configuration was created.
6588        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6589        pub name: ::std::option::Option<::std::string::String>,
6590        ///The policies applied to the autoscale configuration.
6591        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6592        pub policies: ::std::vec::Vec<AutoscalePolicy>,
6593        ///The status of the response.
6594        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6595        pub status: ::std::option::Option<ResponseStatus>,
6596        ///The instance template used for the autoscale configuration.
6597        ///Only if enabled is true.
6598        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6599        pub template: ::std::option::Option<ServiceGroupTemplate>,
6600        ///The UUID of the service where the configuration was created.
6601        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6602        pub uuid: ::std::option::Option<::uuid::Uuid>,
6603        ///The warmup time in seconds for new instances.
6604        ///Only if enabled is true.
6605        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6606        pub warmup_time_ms: ::std::option::Option<i64>,
6607    }
6608
6609    impl ::std::convert::From<&GetAutoscaleConfigurationsResponseServiceGroup>
6610        for GetAutoscaleConfigurationsResponseServiceGroup
6611    {
6612        fn from(value: &GetAutoscaleConfigurationsResponseServiceGroup) -> Self {
6613            value.clone()
6614        }
6615    }
6616
6617    impl ::std::default::Default for GetAutoscaleConfigurationsResponseServiceGroup {
6618        fn default() -> Self {
6619            Self {
6620                cooldown_time_ms: Default::default(),
6621                enabled: Default::default(),
6622                error: Default::default(),
6623                max_size: Default::default(),
6624                message: Default::default(),
6625                min_size: Default::default(),
6626                name: Default::default(),
6627                policies: Default::default(),
6628                status: Default::default(),
6629                template: Default::default(),
6630                uuid: Default::default(),
6631                warmup_time_ms: Default::default(),
6632            }
6633        }
6634    }
6635
6636    ///The status of the response.
6637    ///
6638    /// <details><summary>JSON schema</summary>
6639    ///
6640    /// ```json
6641    ///{
6642    ///  "description": "The status of the response.",
6643    ///  "type": "string",
6644    ///  "format": "enum",
6645    ///  "enum": [
6646    ///    "success",
6647    ///    "error",
6648    ///    "unconfigured"
6649    ///  ]
6650    ///}
6651    /// ```
6652    /// </details>
6653    #[derive(
6654        :: serde :: Deserialize,
6655        :: serde :: Serialize,
6656        Clone,
6657        Copy,
6658        Debug,
6659        Eq,
6660        Hash,
6661        Ord,
6662        PartialEq,
6663        PartialOrd,
6664    )]
6665    pub enum GetAutoscaleConfigurationsResponseStatus {
6666        #[serde(rename = "success")]
6667        Success,
6668        #[serde(rename = "error")]
6669        Error,
6670        #[serde(rename = "unconfigured")]
6671        Unconfigured,
6672    }
6673
6674    impl ::std::convert::From<&Self> for GetAutoscaleConfigurationsResponseStatus {
6675        fn from(value: &GetAutoscaleConfigurationsResponseStatus) -> Self {
6676            value.clone()
6677        }
6678    }
6679
6680    impl ::std::fmt::Display for GetAutoscaleConfigurationsResponseStatus {
6681        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6682            match *self {
6683                Self::Success => write!(f, "success"),
6684                Self::Error => write!(f, "error"),
6685                Self::Unconfigured => write!(f, "unconfigured"),
6686            }
6687        }
6688    }
6689
6690    impl ::std::str::FromStr for GetAutoscaleConfigurationsResponseStatus {
6691        type Err = self::error::ConversionError;
6692        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6693            match value {
6694                "success" => Ok(Self::Success),
6695                "error" => Ok(Self::Error),
6696                "unconfigured" => Ok(Self::Unconfigured),
6697                _ => Err("invalid value".into()),
6698            }
6699        }
6700    }
6701
6702    impl ::std::convert::TryFrom<&str> for GetAutoscaleConfigurationsResponseStatus {
6703        type Error = self::error::ConversionError;
6704        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6705            value.parse()
6706        }
6707    }
6708
6709    impl ::std::convert::TryFrom<&::std::string::String> for GetAutoscaleConfigurationsResponseStatus {
6710        type Error = self::error::ConversionError;
6711        fn try_from(
6712            value: &::std::string::String,
6713        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6714            value.parse()
6715        }
6716    }
6717
6718    impl ::std::convert::TryFrom<::std::string::String> for GetAutoscaleConfigurationsResponseStatus {
6719        type Error = self::error::ConversionError;
6720        fn try_from(
6721            value: ::std::string::String,
6722        ) -> ::std::result::Result<Self, self::error::ConversionError> {
6723            value.parse()
6724        }
6725    }
6726
6727    ///The response message for getting one or more certificate(s) given their
6728    ///UUID(s) or name(s).
6729    ///
6730    /// <details><summary>JSON schema</summary>
6731    ///
6732    /// ```json
6733    ///{
6734    ///  "description": "The response message for getting one or more
6735    /// certificate(s) given their\nUUID(s) or name(s).",
6736    ///  "type": "object",
6737    ///  "properties": {
6738    ///    "data": {
6739    ///      "description": "The response data for this request.",
6740    ///      "allOf": [
6741    ///        {
6742    ///          "$ref": "#/components/schemas/GetCertificatesResponseData"
6743    ///        }
6744    ///      ]
6745    ///    },
6746    ///    "errors": {
6747    ///      "description": "A list of errors which may have occurred during the
6748    /// request.",
6749    ///      "type": "array",
6750    ///      "items": {
6751    ///        "$ref": "#/components/schemas/ResponseError"
6752    ///      }
6753    ///    },
6754    ///    "message": {
6755    ///      "description": "An optional message providing additional
6756    /// information about the status.\nThis field is useful when the status is
6757    /// not `success`.",
6758    ///      "examples": [
6759    ///        "Failed to perform all operations"
6760    ///      ],
6761    ///      "type": "string"
6762    ///    },
6763    ///    "op_time_us": {
6764    ///      "description": "The operation time in microseconds.  This is the
6765    /// time it took to process\nthe request and generate the response.",
6766    ///      "examples": [
6767    ///        55
6768    ///      ],
6769    ///      "type": "integer",
6770    ///      "format": "uint64"
6771    ///    },
6772    ///    "status": {
6773    ///      "description": "The status of the response.",
6774    ///      "allOf": [
6775    ///        {
6776    ///          "$ref": "#/components/schemas/ResponseStatus"
6777    ///        }
6778    ///      ]
6779    ///    }
6780    ///  }
6781    ///}
6782    /// ```
6783    /// </details>
6784    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6785    pub struct GetCertificatesResponse {
6786        ///The response data for this request.
6787        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6788        pub data: ::std::option::Option<GetCertificatesResponseData>,
6789        ///A list of errors which may have occurred during the request.
6790        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6791        pub errors: ::std::vec::Vec<ResponseError>,
6792        ///An optional message providing additional information about the
6793        /// status. This field is useful when the status is not
6794        /// `success`.
6795        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6796        pub message: ::std::option::Option<::std::string::String>,
6797        ///The operation time in microseconds.  This is the time it took to
6798        /// process the request and generate the response.
6799        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6800        pub op_time_us: ::std::option::Option<u64>,
6801        ///The status of the response.
6802        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6803        pub status: ::std::option::Option<ResponseStatus>,
6804    }
6805
6806    impl ::std::convert::From<&GetCertificatesResponse> for GetCertificatesResponse {
6807        fn from(value: &GetCertificatesResponse) -> Self {
6808            value.clone()
6809        }
6810    }
6811
6812    impl ::std::default::Default for GetCertificatesResponse {
6813        fn default() -> Self {
6814            Self {
6815                data: Default::default(),
6816                errors: Default::default(),
6817                message: Default::default(),
6818                op_time_us: Default::default(),
6819                status: Default::default(),
6820            }
6821        }
6822    }
6823
6824    ///`GetCertificatesResponseData`
6825    ///
6826    /// <details><summary>JSON schema</summary>
6827    ///
6828    /// ```json
6829    ///{
6830    ///  "type": "object",
6831    ///  "properties": {
6832    ///    "certificates": {
6833    ///      "description": "The certificate(s) which were retrieved by the
6834    /// request.",
6835    ///      "type": "array",
6836    ///      "items": {
6837    ///        "$ref": "#/components/schemas/Certificate"
6838    ///      }
6839    ///    }
6840    ///  }
6841    ///}
6842    /// ```
6843    /// </details>
6844    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6845    pub struct GetCertificatesResponseData {
6846        ///The certificate(s) which were retrieved by the request.
6847        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6848        pub certificates: ::std::vec::Vec<Certificate>,
6849    }
6850
6851    impl ::std::convert::From<&GetCertificatesResponseData> for GetCertificatesResponseData {
6852        fn from(value: &GetCertificatesResponseData) -> Self {
6853            value.clone()
6854        }
6855    }
6856
6857    impl ::std::default::Default for GetCertificatesResponseData {
6858        fn default() -> Self {
6859            Self {
6860                certificates: Default::default(),
6861            }
6862        }
6863    }
6864
6865    ///The response message for retrieving a single image.
6866    ///
6867    /// <details><summary>JSON schema</summary>
6868    ///
6869    /// ```json
6870    ///{
6871    ///  "description": "The response message for retrieving a single image.",
6872    ///  "type": "object",
6873    ///  "properties": {
6874    ///    "data": {
6875    ///      "description": "The response data for this request.",
6876    ///      "allOf": [
6877    ///        {
6878    ///          "$ref": "#/components/schemas/GetImageResponseData"
6879    ///        }
6880    ///      ]
6881    ///    },
6882    ///    "errors": {
6883    ///      "description": "A list of errors which may have occurred during the
6884    /// request.",
6885    ///      "type": "array",
6886    ///      "items": {
6887    ///        "$ref": "#/components/schemas/ResponseError"
6888    ///      }
6889    ///    },
6890    ///    "message": {
6891    ///      "description": "An optional message providing additional
6892    /// information about the response.",
6893    ///      "examples": [
6894    ///        "No image with name 'my-image:latest'"
6895    ///      ],
6896    ///      "type": "string"
6897    ///    },
6898    ///    "op_time_us": {
6899    ///      "description": "The operation time in microseconds.  This is the
6900    /// time it took to process\nthe request and generate the response.",
6901    ///      "examples": [
6902    ///        46
6903    ///      ],
6904    ///      "type": "integer",
6905    ///      "format": "uint64"
6906    ///    },
6907    ///    "status": {
6908    ///      "description": "The status of the response.",
6909    ///      "allOf": [
6910    ///        {
6911    ///          "$ref": "#/components/schemas/ResponseStatus"
6912    ///        }
6913    ///      ]
6914    ///    }
6915    ///  }
6916    ///}
6917    /// ```
6918    /// </details>
6919    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6920    pub struct GetImageResponse {
6921        ///The response data for this request.
6922        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6923        pub data: ::std::option::Option<GetImageResponseData>,
6924        ///A list of errors which may have occurred during the request.
6925        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6926        pub errors: ::std::vec::Vec<ResponseError>,
6927        ///An optional message providing additional information about the
6928        /// response.
6929        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6930        pub message: ::std::option::Option<::std::string::String>,
6931        ///The operation time in microseconds.  This is the time it took to
6932        /// process the request and generate the response.
6933        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6934        pub op_time_us: ::std::option::Option<u64>,
6935        ///The status of the response.
6936        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6937        pub status: ::std::option::Option<ResponseStatus>,
6938    }
6939
6940    impl ::std::convert::From<&GetImageResponse> for GetImageResponse {
6941        fn from(value: &GetImageResponse) -> Self {
6942            value.clone()
6943        }
6944    }
6945
6946    impl ::std::default::Default for GetImageResponse {
6947        fn default() -> Self {
6948            Self {
6949                data: Default::default(),
6950                errors: Default::default(),
6951                message: Default::default(),
6952                op_time_us: Default::default(),
6953                status: Default::default(),
6954            }
6955        }
6956    }
6957
6958    ///`GetImageResponseData`
6959    ///
6960    /// <details><summary>JSON schema</summary>
6961    ///
6962    /// ```json
6963    ///{
6964    ///  "type": "object",
6965    ///  "properties": {
6966    ///    "image": {
6967    ///      "description": "The instance that was created in this request.",
6968    ///      "allOf": [
6969    ///        {
6970    ///          "$ref": "#/components/schemas/Image"
6971    ///        }
6972    ///      ]
6973    ///    }
6974    ///  }
6975    ///}
6976    /// ```
6977    /// </details>
6978    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
6979    pub struct GetImageResponseData {
6980        ///The instance that was created in this request.
6981        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
6982        pub image: ::std::option::Option<Image>,
6983    }
6984
6985    impl ::std::convert::From<&GetImageResponseData> for GetImageResponseData {
6986        fn from(value: &GetImageResponseData) -> Self {
6987            value.clone()
6988        }
6989    }
6990
6991    impl ::std::default::Default for GetImageResponseData {
6992        fn default() -> Self {
6993            Self {
6994                image: Default::default(),
6995            }
6996        }
6997    }
6998
6999    ///`GetInstanceLogsByUuidRequestBody`
7000    ///
7001    /// <details><summary>JSON schema</summary>
7002    ///
7003    /// ```json
7004    ///{
7005    ///  "type": "object",
7006    ///  "properties": {
7007    ///    "limit": {
7008    ///      "description": "The amount of bytes to return at most.",
7009    ///      "examples": [
7010    ///        1500
7011    ///      ],
7012    ///      "type": "integer",
7013    ///      "format": "int64"
7014    ///    },
7015    ///    "offset": {
7016    ///      "description": "The byte offset of the log output to receive.  A
7017    /// negative sign makes the\noffset relative to the end of the log.",
7018    ///      "examples": [
7019    ///        56000
7020    ///      ],
7021    ///      "type": "integer",
7022    ///      "format": "uint64"
7023    ///    }
7024    ///  }
7025    ///}
7026    /// ```
7027    /// </details>
7028    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7029    pub struct GetInstanceLogsByUuidRequestBody {
7030        ///The amount of bytes to return at most.
7031        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7032        pub limit: ::std::option::Option<i64>,
7033        ///The byte offset of the log output to receive.  A negative sign makes
7034        /// the offset relative to the end of the log.
7035        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7036        pub offset: ::std::option::Option<u64>,
7037    }
7038
7039    impl ::std::convert::From<&GetInstanceLogsByUuidRequestBody> for GetInstanceLogsByUuidRequestBody {
7040        fn from(value: &GetInstanceLogsByUuidRequestBody) -> Self {
7041            value.clone()
7042        }
7043    }
7044
7045    impl ::std::default::Default for GetInstanceLogsByUuidRequestBody {
7046        fn default() -> Self {
7047            Self {
7048                limit: Default::default(),
7049                offset: Default::default(),
7050            }
7051        }
7052    }
7053
7054    ///The request message for getting the logs of an instance by their UUID or
7055    ///name.
7056    ///
7057    /// <details><summary>JSON schema</summary>
7058    ///
7059    /// ```json
7060    ///{
7061    ///  "description": "The request message for getting the logs of an instance
7062    /// by their UUID or\nname.",
7063    ///  "type": "object",
7064    ///  "required": [
7065    ///    "name",
7066    ///    "uuid"
7067    ///  ],
7068    ///  "properties": {
7069    ///    "limit": {
7070    ///      "description": "The amount of bytes to return at most.",
7071    ///      "examples": [
7072    ///        3000
7073    ///      ],
7074    ///      "type": "integer",
7075    ///      "format": "int64"
7076    ///    },
7077    ///    "name": {
7078    ///      "description": "The name of the instance to retrieve logs for.
7079    /// Mutually exclusive with\nUUID.",
7080    ///      "examples": [
7081    ///        "funky-town-g756b5d"
7082    ///      ],
7083    ///      "type": "string"
7084    ///    },
7085    ///    "offset": {
7086    ///      "description": "The byte offset of the log output to receive.  A
7087    /// negative sign makes the\noffset relative to the end of the log.",
7088    ///      "examples": [
7089    ///        450
7090    ///      ],
7091    ///      "type": "integer",
7092    ///      "format": "uint64"
7093    ///    },
7094    ///    "uuid": {
7095    ///      "description": "The UUID of the instance to retrieve logs for.
7096    /// Mutually exclusive with\nname.",
7097    ///      "examples": [
7098    ///        "123e4567-e89b-12d3-a456-426614174000"
7099    ///      ],
7100    ///      "type": "string",
7101    ///      "format": "uuid"
7102    ///    }
7103    ///  }
7104    ///}
7105    /// ```
7106    /// </details>
7107    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7108    pub struct GetInstanceLogsRequest {
7109        ///The amount of bytes to return at most.
7110        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7111        pub limit: ::std::option::Option<i64>,
7112        ///The name of the instance to retrieve logs for.  Mutually exclusive
7113        /// with UUID.
7114        pub name: ::std::string::String,
7115        ///The byte offset of the log output to receive.  A negative sign makes
7116        /// the offset relative to the end of the log.
7117        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7118        pub offset: ::std::option::Option<u64>,
7119        ///The UUID of the instance to retrieve logs for.  Mutually exclusive
7120        /// with name.
7121        pub uuid: ::uuid::Uuid,
7122    }
7123
7124    impl ::std::convert::From<&GetInstanceLogsRequest> for GetInstanceLogsRequest {
7125        fn from(value: &GetInstanceLogsRequest) -> Self {
7126            value.clone()
7127        }
7128    }
7129
7130    ///The response message for getting the logs of an instance given its
7131    /// UUID(s) or name(s).
7132    ///
7133    /// <details><summary>JSON schema</summary>
7134    ///
7135    /// ```json
7136    ///{
7137    ///  "description": "The response message for getting the logs of an
7138    /// instance given its UUID(s) or\nname(s).",
7139    ///  "type": "object",
7140    ///  "properties": {
7141    ///    "data": {
7142    ///      "description": "The response data for this request.",
7143    ///      "allOf": [
7144    ///        {
7145    ///          "$ref": "#/components/schemas/GetInstanceLogsResponseData"
7146    ///        }
7147    ///      ]
7148    ///    },
7149    ///    "errors": {
7150    ///      "description": "A list of errors which may have occurred during the
7151    /// request.",
7152    ///      "type": "array",
7153    ///      "items": {
7154    ///        "$ref": "#/components/schemas/ResponseError"
7155    ///      }
7156    ///    },
7157    ///    "message": {
7158    ///      "description": "An optional message providing additional
7159    /// information about the status.\nThis field is useful when the status is
7160    /// not `success`.",
7161    ///      "examples": [
7162    ///        "Failed to perform all operations"
7163    ///      ],
7164    ///      "type": "string"
7165    ///    },
7166    ///    "op_time_us": {
7167    ///      "description": "The operation time in microseconds.  This is the
7168    /// time it took to process\nthe request and generate the response.",
7169    ///      "examples": [
7170    ///        47
7171    ///      ],
7172    ///      "type": "integer",
7173    ///      "format": "uint64"
7174    ///    },
7175    ///    "status": {
7176    ///      "description": "The status of the response.",
7177    ///      "allOf": [
7178    ///        {
7179    ///          "$ref": "#/components/schemas/ResponseStatus"
7180    ///        }
7181    ///      ]
7182    ///    }
7183    ///  }
7184    ///}
7185    /// ```
7186    /// </details>
7187    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7188    pub struct GetInstanceLogsResponse {
7189        ///The response data for this request.
7190        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7191        pub data: ::std::option::Option<GetInstanceLogsResponseData>,
7192        ///A list of errors which may have occurred during the request.
7193        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7194        pub errors: ::std::vec::Vec<ResponseError>,
7195        ///An optional message providing additional information about the
7196        /// status. This field is useful when the status is not
7197        /// `success`.
7198        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7199        pub message: ::std::option::Option<::std::string::String>,
7200        ///The operation time in microseconds.  This is the time it took to
7201        /// process the request and generate the response.
7202        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7203        pub op_time_us: ::std::option::Option<u64>,
7204        ///The status of the response.
7205        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7206        pub status: ::std::option::Option<ResponseStatus>,
7207    }
7208
7209    impl ::std::convert::From<&GetInstanceLogsResponse> for GetInstanceLogsResponse {
7210        fn from(value: &GetInstanceLogsResponse) -> Self {
7211            value.clone()
7212        }
7213    }
7214
7215    impl ::std::default::Default for GetInstanceLogsResponse {
7216        fn default() -> Self {
7217            Self {
7218                data: Default::default(),
7219                errors: Default::default(),
7220                message: Default::default(),
7221                op_time_us: Default::default(),
7222                status: Default::default(),
7223            }
7224        }
7225    }
7226
7227    ///`GetInstanceLogsResponseAvailable`
7228    ///
7229    /// <details><summary>JSON schema</summary>
7230    ///
7231    /// ```json
7232    ///{
7233    ///  "type": "object",
7234    ///  "properties": {
7235    ///    "end": {
7236    ///      "description": "The last byte offset that can be retrieved.",
7237    ///      "examples": [
7238    ///        2700
7239    ///      ],
7240    ///      "type": "integer",
7241    ///      "format": "uint64"
7242    ///    },
7243    ///    "start": {
7244    ///      "description": "The first byte offset that can be retrieved.",
7245    ///      "examples": [
7246    ///        250
7247    ///      ],
7248    ///      "type": "integer",
7249    ///      "format": "uint64"
7250    ///    }
7251    ///  }
7252    ///}
7253    /// ```
7254    /// </details>
7255    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7256    pub struct GetInstanceLogsResponseAvailable {
7257        ///The last byte offset that can be retrieved.
7258        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7259        pub end: ::std::option::Option<u64>,
7260        ///The first byte offset that can be retrieved.
7261        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7262        pub start: ::std::option::Option<u64>,
7263    }
7264
7265    impl ::std::convert::From<&GetInstanceLogsResponseAvailable> for GetInstanceLogsResponseAvailable {
7266        fn from(value: &GetInstanceLogsResponseAvailable) -> Self {
7267            value.clone()
7268        }
7269    }
7270
7271    impl ::std::default::Default for GetInstanceLogsResponseAvailable {
7272        fn default() -> Self {
7273            Self {
7274                end: Default::default(),
7275                start: Default::default(),
7276            }
7277        }
7278    }
7279
7280    ///`GetInstanceLogsResponseData`
7281    ///
7282    /// <details><summary>JSON schema</summary>
7283    ///
7284    /// ```json
7285    ///{
7286    ///  "type": "object",
7287    ///  "properties": {
7288    ///    "instances": {
7289    ///      "description": "The instance which this requested waited
7290    /// on.\n\nNote: only one instance can be specified in the request, so this
7291    /// will\nalways contain a single entry.",
7292    ///      "type": "array",
7293    ///      "items": {
7294    ///        "$ref":
7295    /// "#/components/schemas/GetInstanceLogsResponseLoggedInstance"
7296    ///      }
7297    ///    }
7298    ///  }
7299    ///}
7300    /// ```
7301    /// </details>
7302    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7303    pub struct GetInstanceLogsResponseData {
7304        ///The instance which this requested waited on.
7305        ///
7306        ///Note: only one instance can be specified in the request, so this
7307        /// will always contain a single entry.
7308        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7309        pub instances: ::std::vec::Vec<GetInstanceLogsResponseLoggedInstance>,
7310    }
7311
7312    impl ::std::convert::From<&GetInstanceLogsResponseData> for GetInstanceLogsResponseData {
7313        fn from(value: &GetInstanceLogsResponseData) -> Self {
7314            value.clone()
7315        }
7316    }
7317
7318    impl ::std::default::Default for GetInstanceLogsResponseData {
7319        fn default() -> Self {
7320            Self {
7321                instances: Default::default(),
7322            }
7323        }
7324    }
7325
7326    ///`GetInstanceLogsResponseLoggedInstance`
7327    ///
7328    /// <details><summary>JSON schema</summary>
7329    ///
7330    /// ```json
7331    ///{
7332    ///  "type": "object",
7333    ///  "properties": {
7334    ///    "available": {
7335    ///      "description": "Description of the log availability.",
7336    ///      "allOf": [
7337    ///        {
7338    ///          "$ref": "#/components/schemas/GetInstanceLogsResponseAvailable"
7339    ///        }
7340    ///      ]
7341    ///    },
7342    ///    "error": {
7343    ///      "description": "An optional error code providing additional
7344    /// information about the status.\nThis field is useful when the status is
7345    /// not `success`.",
7346    ///      "examples": [
7347    ///        8
7348    ///      ],
7349    ///      "type": "integer",
7350    ///      "format": "int32"
7351    ///    },
7352    ///    "message": {
7353    ///      "description": "An optional message providing additional
7354    /// information about the status.\nThis field is useful when the status is
7355    /// not `success`.",
7356    ///      "examples": [
7357    ///        "No instance with name 'funky-town-g756b5d'"
7358    ///      ],
7359    ///      "type": "string"
7360    ///    },
7361    ///    "name": {
7362    ///      "description": "The name of the instance.",
7363    ///      "examples": [
7364    ///        "funky-town-g756b5d"
7365    ///      ],
7366    ///      "type": "string"
7367    ///    },
7368    ///    "output": {
7369    ///      "description": "Base64 encoded log output of the instance.",
7370    ///      "examples": [
7371    ///        "d2h5LWFyZS15b3UtZGVjb2RpbmctdGhpcw=="
7372    ///      ],
7373    ///      "type": "string"
7374    ///    },
7375    ///    "range": {
7376    ///      "description": "Description of the range that was returned.  Useful
7377    /// for requests with\noffset relative to end.",
7378    ///      "allOf": [
7379    ///        {
7380    ///          "$ref": "#/components/schemas/GetInstanceLogsResponseRange"
7381    ///        }
7382    ///      ]
7383    ///    },
7384    ///    "state": {
7385    ///      "description": "State of the instance when the logs were
7386    /// retrieved.",
7387    ///      "type": "string",
7388    ///      "format": "enum",
7389    ///      "enum": [
7390    ///        "stopped",
7391    ///        "starting",
7392    ///        "running",
7393    ///        "draining",
7394    ///        "stopping",
7395    ///        "standby"
7396    ///      ]
7397    ///    },
7398    ///    "uuid": {
7399    ///      "description": "The UUID of the instance.",
7400    ///      "examples": [
7401    ///        "123e4567-e89b-12d3-a456-426614174000"
7402    ///      ],
7403    ///      "type": "string",
7404    ///      "format": "uuid"
7405    ///    }
7406    ///  }
7407    ///}
7408    /// ```
7409    /// </details>
7410    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7411    pub struct GetInstanceLogsResponseLoggedInstance {
7412        ///Description of the log availability.
7413        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7414        pub available: ::std::option::Option<GetInstanceLogsResponseAvailable>,
7415        ///An optional error code providing additional information about the
7416        /// status. This field is useful when the status is not
7417        /// `success`.
7418        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7419        pub error: ::std::option::Option<i32>,
7420        ///An optional message providing additional information about the
7421        /// status. This field is useful when the status is not
7422        /// `success`.
7423        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7424        pub message: ::std::option::Option<::std::string::String>,
7425        ///The name of the instance.
7426        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7427        pub name: ::std::option::Option<::std::string::String>,
7428        ///Base64 encoded log output of the instance.
7429        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7430        pub output: ::std::option::Option<::std::string::String>,
7431        ///Description of the range that was returned.  Useful for requests
7432        /// with offset relative to end.
7433        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7434        pub range: ::std::option::Option<GetInstanceLogsResponseRange>,
7435        ///State of the instance when the logs were retrieved.
7436        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7437        pub state: ::std::option::Option<GetInstanceLogsResponseLoggedInstanceState>,
7438        ///The UUID of the instance.
7439        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7440        pub uuid: ::std::option::Option<::uuid::Uuid>,
7441    }
7442
7443    impl ::std::convert::From<&GetInstanceLogsResponseLoggedInstance>
7444        for GetInstanceLogsResponseLoggedInstance
7445    {
7446        fn from(value: &GetInstanceLogsResponseLoggedInstance) -> Self {
7447            value.clone()
7448        }
7449    }
7450
7451    impl ::std::default::Default for GetInstanceLogsResponseLoggedInstance {
7452        fn default() -> Self {
7453            Self {
7454                available: Default::default(),
7455                error: Default::default(),
7456                message: Default::default(),
7457                name: Default::default(),
7458                output: Default::default(),
7459                range: Default::default(),
7460                state: Default::default(),
7461                uuid: Default::default(),
7462            }
7463        }
7464    }
7465
7466    ///State of the instance when the logs were retrieved.
7467    ///
7468    /// <details><summary>JSON schema</summary>
7469    ///
7470    /// ```json
7471    ///{
7472    ///  "description": "State of the instance when the logs were retrieved.",
7473    ///  "type": "string",
7474    ///  "format": "enum",
7475    ///  "enum": [
7476    ///    "stopped",
7477    ///    "starting",
7478    ///    "running",
7479    ///    "draining",
7480    ///    "stopping",
7481    ///    "standby"
7482    ///  ]
7483    ///}
7484    /// ```
7485    /// </details>
7486    #[derive(
7487        :: serde :: Deserialize,
7488        :: serde :: Serialize,
7489        Clone,
7490        Copy,
7491        Debug,
7492        Eq,
7493        Hash,
7494        Ord,
7495        PartialEq,
7496        PartialOrd,
7497    )]
7498    pub enum GetInstanceLogsResponseLoggedInstanceState {
7499        #[serde(rename = "stopped")]
7500        Stopped,
7501        #[serde(rename = "starting")]
7502        Starting,
7503        #[serde(rename = "running")]
7504        Running,
7505        #[serde(rename = "draining")]
7506        Draining,
7507        #[serde(rename = "stopping")]
7508        Stopping,
7509        #[serde(rename = "standby")]
7510        Standby,
7511    }
7512
7513    impl ::std::convert::From<&Self> for GetInstanceLogsResponseLoggedInstanceState {
7514        fn from(value: &GetInstanceLogsResponseLoggedInstanceState) -> Self {
7515            value.clone()
7516        }
7517    }
7518
7519    impl ::std::fmt::Display for GetInstanceLogsResponseLoggedInstanceState {
7520        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
7521            match *self {
7522                Self::Stopped => write!(f, "stopped"),
7523                Self::Starting => write!(f, "starting"),
7524                Self::Running => write!(f, "running"),
7525                Self::Draining => write!(f, "draining"),
7526                Self::Stopping => write!(f, "stopping"),
7527                Self::Standby => write!(f, "standby"),
7528            }
7529        }
7530    }
7531
7532    impl ::std::str::FromStr for GetInstanceLogsResponseLoggedInstanceState {
7533        type Err = self::error::ConversionError;
7534        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7535            match value {
7536                "stopped" => Ok(Self::Stopped),
7537                "starting" => Ok(Self::Starting),
7538                "running" => Ok(Self::Running),
7539                "draining" => Ok(Self::Draining),
7540                "stopping" => Ok(Self::Stopping),
7541                "standby" => Ok(Self::Standby),
7542                _ => Err("invalid value".into()),
7543            }
7544        }
7545    }
7546
7547    impl ::std::convert::TryFrom<&str> for GetInstanceLogsResponseLoggedInstanceState {
7548        type Error = self::error::ConversionError;
7549        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
7550            value.parse()
7551        }
7552    }
7553
7554    impl ::std::convert::TryFrom<&::std::string::String>
7555        for GetInstanceLogsResponseLoggedInstanceState
7556    {
7557        type Error = self::error::ConversionError;
7558        fn try_from(
7559            value: &::std::string::String,
7560        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7561            value.parse()
7562        }
7563    }
7564
7565    impl ::std::convert::TryFrom<::std::string::String> for GetInstanceLogsResponseLoggedInstanceState {
7566        type Error = self::error::ConversionError;
7567        fn try_from(
7568            value: ::std::string::String,
7569        ) -> ::std::result::Result<Self, self::error::ConversionError> {
7570            value.parse()
7571        }
7572    }
7573
7574    ///`GetInstanceLogsResponseRange`
7575    ///
7576    /// <details><summary>JSON schema</summary>
7577    ///
7578    /// ```json
7579    ///{
7580    ///  "type": "object",
7581    ///  "properties": {
7582    ///    "end": {
7583    ///      "description": "The last retrieved byte.",
7584    ///      "examples": [
7585    ///        "funky-town-g756b5d"
7586    ///      ],
7587    ///      "type": "integer",
7588    ///      "format": "uint64"
7589    ///    },
7590    ///    "start": {
7591    ///      "description": "The first retrieved byte.",
7592    ///      "examples": [
7593    ///        450
7594    ///      ],
7595    ///      "type": "integer",
7596    ///      "format": "uint64"
7597    ///    }
7598    ///  }
7599    ///}
7600    /// ```
7601    /// </details>
7602    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7603    pub struct GetInstanceLogsResponseRange {
7604        ///The last retrieved byte.
7605        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7606        pub end: ::std::option::Option<u64>,
7607        ///The first retrieved byte.
7608        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7609        pub start: ::std::option::Option<u64>,
7610    }
7611
7612    impl ::std::convert::From<&GetInstanceLogsResponseRange> for GetInstanceLogsResponseRange {
7613        fn from(value: &GetInstanceLogsResponseRange) -> Self {
7614            value.clone()
7615        }
7616    }
7617
7618    impl ::std::default::Default for GetInstanceLogsResponseRange {
7619        fn default() -> Self {
7620            Self {
7621                end: Default::default(),
7622                start: Default::default(),
7623            }
7624        }
7625    }
7626
7627    ///The response message for getting the metrics of one or more instance(s)
7628    ///given their UUID(s) or name(s).
7629    ///
7630    /// <details><summary>JSON schema</summary>
7631    ///
7632    /// ```json
7633    ///{
7634    ///  "description": "The response message for getting the metrics of one or
7635    /// more instance(s)\ngiven their UUID(s) or name(s).",
7636    ///  "type": "object",
7637    ///  "properties": {
7638    ///    "data": {
7639    ///      "description": "The response data for this request.",
7640    ///      "allOf": [
7641    ///        {
7642    ///          "$ref": "#/components/schemas/GetInstanceMetricsResponseData"
7643    ///        }
7644    ///      ]
7645    ///    },
7646    ///    "errors": {
7647    ///      "description": "A list of errors which may have occurred during the
7648    /// request.",
7649    ///      "type": "array",
7650    ///      "items": {
7651    ///        "$ref": "#/components/schemas/ResponseError"
7652    ///      }
7653    ///    },
7654    ///    "message": {
7655    ///      "description": "An optional message providing additional
7656    /// information about the status.\nThis field is useful when the status is
7657    /// not `success`.",
7658    ///      "examples": [
7659    ///        "Failed to perform all operations"
7660    ///      ],
7661    ///      "type": "string"
7662    ///    },
7663    ///    "op_time_us": {
7664    ///      "description": "The operation time in microseconds.  This is the
7665    /// time it took to process\nthe request and generate the response.",
7666    ///      "examples": [
7667    ///        76
7668    ///      ],
7669    ///      "type": "integer",
7670    ///      "format": "uint64"
7671    ///    },
7672    ///    "status": {
7673    ///      "description": "The status of the response.",
7674    ///      "allOf": [
7675    ///        {
7676    ///          "$ref": "#/components/schemas/ResponseStatus"
7677    ///        }
7678    ///      ]
7679    ///    }
7680    ///  }
7681    ///}
7682    /// ```
7683    /// </details>
7684    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7685    pub struct GetInstanceMetricsResponse {
7686        ///The response data for this request.
7687        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7688        pub data: ::std::option::Option<GetInstanceMetricsResponseData>,
7689        ///A list of errors which may have occurred during the request.
7690        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7691        pub errors: ::std::vec::Vec<ResponseError>,
7692        ///An optional message providing additional information about the
7693        /// status. This field is useful when the status is not
7694        /// `success`.
7695        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7696        pub message: ::std::option::Option<::std::string::String>,
7697        ///The operation time in microseconds.  This is the time it took to
7698        /// process the request and generate the response.
7699        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7700        pub op_time_us: ::std::option::Option<u64>,
7701        ///The status of the response.
7702        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7703        pub status: ::std::option::Option<ResponseStatus>,
7704    }
7705
7706    impl ::std::convert::From<&GetInstanceMetricsResponse> for GetInstanceMetricsResponse {
7707        fn from(value: &GetInstanceMetricsResponse) -> Self {
7708            value.clone()
7709        }
7710    }
7711
7712    impl ::std::default::Default for GetInstanceMetricsResponse {
7713        fn default() -> Self {
7714            Self {
7715                data: Default::default(),
7716                errors: Default::default(),
7717                message: Default::default(),
7718                op_time_us: Default::default(),
7719                status: Default::default(),
7720            }
7721        }
7722    }
7723
7724    ///`GetInstanceMetricsResponseData`
7725    ///
7726    /// <details><summary>JSON schema</summary>
7727    ///
7728    /// ```json
7729    ///{
7730    ///  "type": "object",
7731    ///  "properties": {
7732    ///    "instances": {
7733    ///      "description": "The instance which this requested metrics for.
7734    /// Note: only one instance\ncan be specified in the request, so this will
7735    /// always contain a single\nentry.",
7736    ///      "type": "array",
7737    ///      "items": {
7738    ///        "$ref":
7739    /// "#/components/schemas/GetInstanceMetricsResponseInstanceMetrics"
7740    ///      }
7741    ///    }
7742    ///  }
7743    ///}
7744    /// ```
7745    /// </details>
7746    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7747    pub struct GetInstanceMetricsResponseData {
7748        ///The instance which this requested metrics for.  Note: only one
7749        /// instance can be specified in the request, so this will
7750        /// always contain a single entry.
7751        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7752        pub instances: ::std::vec::Vec<GetInstanceMetricsResponseInstanceMetrics>,
7753    }
7754
7755    impl ::std::convert::From<&GetInstanceMetricsResponseData> for GetInstanceMetricsResponseData {
7756        fn from(value: &GetInstanceMetricsResponseData) -> Self {
7757            value.clone()
7758        }
7759    }
7760
7761    impl ::std::default::Default for GetInstanceMetricsResponseData {
7762        fn default() -> Self {
7763            Self {
7764                instances: Default::default(),
7765            }
7766        }
7767    }
7768
7769    ///`GetInstanceMetricsResponseInstanceMetrics`
7770    ///
7771    /// <details><summary>JSON schema</summary>
7772    ///
7773    /// ```json
7774    ///{
7775    ///  "type": "object",
7776    ///  "properties": {
7777    ///    "boot_time_us": {
7778    ///      "description": "The boot time of the instance in microseconds.  We
7779    /// take a pragmatic\napproach is to define the boot time.  We calculate
7780    /// this as the difference\nin time between the moment the virtualization
7781    /// toolstack is invoked to\nrespond to a VM boot request and the moment the
7782    /// OS starts executing user\ncode (i.e., the end of the guest OS boot
7783    /// process).  This is essentially the\ntime that a user would experience in
7784    /// a deployment, minus the application\ninitialization time, which we leave
7785    /// out since it is independent from the\nOS.",
7786    ///      "examples": [
7787    ///        560007005
7788    ///      ],
7789    ///      "type": "integer",
7790    ///      "format": "uint64"
7791    ///    },
7792    ///    "cpu_time_ms": {
7793    ///      "description": "Consumed CPU time in milliseconds.",
7794    ///      "examples": [
7795    ///        560007005
7796    ///      ],
7797    ///      "type": "integer",
7798    ///      "format": "uint64"
7799    ///    },
7800    ///    "error": {
7801    ///      "description": "An optional error code providing additional
7802    /// information about the status.\nThis field is useful when the status is
7803    /// not `success`.",
7804    ///      "examples": [
7805    ///        8
7806    ///      ],
7807    ///      "type": "integer",
7808    ///      "format": "int32"
7809    ///    },
7810    ///    "message": {
7811    ///      "description": "An optional message providing additional
7812    /// information about the status.\nThis field is useful when the status is
7813    /// not `success`.",
7814    ///      "examples": [
7815    ///        "No instance with name 'funky-town-g756b5d'"
7816    ///      ],
7817    ///      "type": "string"
7818    ///    },
7819    ///    "nconns": {
7820    ///      "description": "Number of currently established inbound connections
7821    /// (non-HTTP).",
7822    ///      "examples": [
7823    ///        5
7824    ///      ],
7825    ///      "type": "integer",
7826    ///      "format": "uint64"
7827    ///    },
7828    ///    "net_time_us": {
7829    ///      "description": "This is the time it took for the user-level
7830    /// application to start listening\non a non-localhost port measured in
7831    /// microseconds.  This is the time from\nwhen the instance started until it
7832    /// reasonably ready to start responding to\nnetwork requests.  This is
7833    /// useful for measuring the time it takes for the\ninstance to become
7834    /// operationally ready.",
7835    ///      "examples": [
7836    ///        560007005
7837    ///      ],
7838    ///      "type": "integer",
7839    ///      "format": "uint64"
7840    ///    },
7841    ///    "nqueued": {
7842    ///      "description": "Number of queued inbound connections and HTTP
7843    /// requests.",
7844    ///      "examples": [
7845    ///        5
7846    ///      ],
7847    ///      "type": "integer",
7848    ///      "format": "uint64"
7849    ///    },
7850    ///    "nreqs": {
7851    ///      "description": "Number of in-flight HTTP requests.",
7852    ///      "examples": [
7853    ///        12
7854    ///      ],
7855    ///      "type": "integer",
7856    ///      "format": "uint64"
7857    ///    },
7858    ///    "ntotal": {
7859    ///      "description": "Total number of inbound connections and HTTP
7860    /// requests handled.",
7861    ///      "examples": [
7862    ///        21
7863    ///      ],
7864    ///      "type": "integer",
7865    ///      "format": "uint64"
7866    ///    },
7867    ///    "rss_bytes": {
7868    ///      "description": "Resident set size of the VMM in bytes.\n\nThe resident set size (RSS) specifies the amount of physical memory that\nhas been touched by the instance and is currently reserved for the\ninstance on the Unikraft Cloud server.  The RSS grows until the instance\nhas touched all memory assigned to it via the memory_mb setting and may\nalso exceed this value as supporting services running outside the\ninstance acquire memory.  The RSS is different from the current amount of\nmemory allocated by the application, which is likely to fluctuate over\nthe lifetime of the application.  The RSS is not a cumulative metric.\nWhen the instance is stopped rss goes down to 0.",
7869    ///      "examples": [
7870    ///        5677765543
7871    ///      ],
7872    ///      "type": "integer",
7873    ///      "format": "uint64"
7874    ///    },
7875    ///    "rx_bytes": {
7876    ///      "description": "Total amount of bytes received from network.",
7877    ///      "examples": [
7878    ///        12312353
7879    ///      ],
7880    ///      "type": "integer",
7881    ///      "format": "uint64"
7882    ///    },
7883    ///    "rx_packets": {
7884    ///      "description": "Total count of packets received from network.",
7885    ///      "examples": [
7886    ///        43432
7887    ///      ],
7888    ///      "type": "integer",
7889    ///      "format": "uint64"
7890    ///    },
7891    ///    "tx_bytes": {
7892    ///      "description": "Total amount of bytes transmitted over network.",
7893    ///      "examples": [
7894    ///        6565643
7895    ///      ],
7896    ///      "type": "integer",
7897    ///      "format": "uint64"
7898    ///    },
7899    ///    "tx_packets": {
7900    ///      "description": "Total count of packets transmitted over network.",
7901    ///      "examples": [
7902    ///        54534
7903    ///      ],
7904    ///      "type": "integer",
7905    ///      "format": "uint64"
7906    ///    }
7907    ///  }
7908    ///}
7909    /// ```
7910    /// </details>
7911    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
7912    pub struct GetInstanceMetricsResponseInstanceMetrics {
7913        ///The boot time of the instance in microseconds.  We take a pragmatic
7914        ///approach is to define the boot time.  We calculate this as the
7915        /// difference in time between the moment the virtualization
7916        /// toolstack is invoked to respond to a VM boot request and the
7917        /// moment the OS starts executing user code (i.e., the end of
7918        /// the guest OS boot process).  This is essentially the
7919        /// time that a user would experience in a deployment, minus the
7920        /// application initialization time, which we leave out since it
7921        /// is independent from the OS.
7922        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7923        pub boot_time_us: ::std::option::Option<u64>,
7924        ///Consumed CPU time in milliseconds.
7925        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7926        pub cpu_time_ms: ::std::option::Option<u64>,
7927        ///An optional error code providing additional information about the
7928        /// status. This field is useful when the status is not
7929        /// `success`.
7930        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7931        pub error: ::std::option::Option<i32>,
7932        ///An optional message providing additional information about the
7933        /// status. This field is useful when the status is not
7934        /// `success`.
7935        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7936        pub message: ::std::option::Option<::std::string::String>,
7937        ///Number of currently established inbound connections (non-HTTP).
7938        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7939        pub nconns: ::std::option::Option<u64>,
7940        ///This is the time it took for the user-level application to start
7941        /// listening on a non-localhost port measured in microseconds.
7942        /// This is the time from when the instance started until it
7943        /// reasonably ready to start responding to network requests.
7944        /// This is useful for measuring the time it takes for the
7945        /// instance to become operationally ready.
7946        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7947        pub net_time_us: ::std::option::Option<u64>,
7948        ///Number of queued inbound connections and HTTP requests.
7949        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7950        pub nqueued: ::std::option::Option<u64>,
7951        ///Number of in-flight HTTP requests.
7952        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7953        pub nreqs: ::std::option::Option<u64>,
7954        ///Total number of inbound connections and HTTP requests handled.
7955        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7956        pub ntotal: ::std::option::Option<u64>,
7957        ///Resident set size of the VMM in bytes.
7958        ///
7959        ///The resident set size (RSS) specifies the amount of physical memory
7960        /// that has been touched by the instance and is currently
7961        /// reserved for the instance on the Unikraft Cloud server.  The
7962        /// RSS grows until the instance has touched all memory assigned
7963        /// to it via the memory_mb setting and may also exceed this
7964        /// value as supporting services running outside the
7965        /// instance acquire memory.  The RSS is different from the current
7966        /// amount of memory allocated by the application, which is
7967        /// likely to fluctuate over the lifetime of the application.
7968        /// The RSS is not a cumulative metric. When the instance is
7969        /// stopped rss goes down to 0.
7970        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7971        pub rss_bytes: ::std::option::Option<u64>,
7972        ///Total amount of bytes received from network.
7973        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7974        pub rx_bytes: ::std::option::Option<u64>,
7975        ///Total count of packets received from network.
7976        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7977        pub rx_packets: ::std::option::Option<u64>,
7978        ///Total amount of bytes transmitted over network.
7979        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7980        pub tx_bytes: ::std::option::Option<u64>,
7981        ///Total count of packets transmitted over network.
7982        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
7983        pub tx_packets: ::std::option::Option<u64>,
7984    }
7985
7986    impl ::std::convert::From<&GetInstanceMetricsResponseInstanceMetrics>
7987        for GetInstanceMetricsResponseInstanceMetrics
7988    {
7989        fn from(value: &GetInstanceMetricsResponseInstanceMetrics) -> Self {
7990            value.clone()
7991        }
7992    }
7993
7994    impl ::std::default::Default for GetInstanceMetricsResponseInstanceMetrics {
7995        fn default() -> Self {
7996            Self {
7997                boot_time_us: Default::default(),
7998                cpu_time_ms: Default::default(),
7999                error: Default::default(),
8000                message: Default::default(),
8001                nconns: Default::default(),
8002                net_time_us: Default::default(),
8003                nqueued: Default::default(),
8004                nreqs: Default::default(),
8005                ntotal: Default::default(),
8006                rss_bytes: Default::default(),
8007                rx_bytes: Default::default(),
8008                rx_packets: Default::default(),
8009                tx_bytes: Default::default(),
8010                tx_packets: Default::default(),
8011            }
8012        }
8013    }
8014
8015    ///The response after retrieving an instance by its name or UUID.
8016    ///
8017    /// <details><summary>JSON schema</summary>
8018    ///
8019    /// ```json
8020    ///{
8021    ///  "description": "The response after retrieving an instance by its name
8022    /// or UUID.",
8023    ///  "type": "object",
8024    ///  "properties": {
8025    ///    "data": {
8026    ///      "description": "The response data for this request.",
8027    ///      "allOf": [
8028    ///        {
8029    ///          "$ref": "#/components/schemas/GetInstancesResponseData"
8030    ///        }
8031    ///      ]
8032    ///    },
8033    ///    "errors": {
8034    ///      "description": "A list of errors which may have occurred during the
8035    /// request.",
8036    ///      "type": "array",
8037    ///      "items": {
8038    ///        "$ref": "#/components/schemas/ResponseError"
8039    ///      }
8040    ///    },
8041    ///    "message": {
8042    ///      "description": "An optional message providing additional
8043    /// information about the status.\nThis field is useful when the status is
8044    /// not `success`.",
8045    ///      "examples": [
8046    ///        "Failed to perform all operations"
8047    ///      ],
8048    ///      "type": "string"
8049    ///    },
8050    ///    "op_time_us": {
8051    ///      "description": "The operation time in microseconds.  This is the
8052    /// time it took to process\nthe request and generate the response.",
8053    ///      "examples": [
8054    ///        432
8055    ///      ],
8056    ///      "type": "integer",
8057    ///      "format": "uint64"
8058    ///    },
8059    ///    "status": {
8060    ///      "description": "The status of the response.",
8061    ///      "allOf": [
8062    ///        {
8063    ///          "$ref": "#/components/schemas/ResponseStatus"
8064    ///        }
8065    ///      ]
8066    ///    }
8067    ///  }
8068    ///}
8069    /// ```
8070    /// </details>
8071    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8072    pub struct GetInstancesResponse {
8073        ///The response data for this request.
8074        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8075        pub data: ::std::option::Option<GetInstancesResponseData>,
8076        ///A list of errors which may have occurred during the request.
8077        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8078        pub errors: ::std::vec::Vec<ResponseError>,
8079        ///An optional message providing additional information about the
8080        /// status. This field is useful when the status is not
8081        /// `success`.
8082        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8083        pub message: ::std::option::Option<::std::string::String>,
8084        ///The operation time in microseconds.  This is the time it took to
8085        /// process the request and generate the response.
8086        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8087        pub op_time_us: ::std::option::Option<u64>,
8088        ///The status of the response.
8089        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8090        pub status: ::std::option::Option<ResponseStatus>,
8091    }
8092
8093    impl ::std::convert::From<&GetInstancesResponse> for GetInstancesResponse {
8094        fn from(value: &GetInstancesResponse) -> Self {
8095            value.clone()
8096        }
8097    }
8098
8099    impl ::std::default::Default for GetInstancesResponse {
8100        fn default() -> Self {
8101            Self {
8102                data: Default::default(),
8103                errors: Default::default(),
8104                message: Default::default(),
8105                op_time_us: Default::default(),
8106                status: Default::default(),
8107            }
8108        }
8109    }
8110
8111    ///`GetInstancesResponseData`
8112    ///
8113    /// <details><summary>JSON schema</summary>
8114    ///
8115    /// ```json
8116    ///{
8117    ///  "type": "object",
8118    ///  "properties": {
8119    ///    "instances": {
8120    ///      "description": "The instance(s) that were retrieved by the
8121    /// request.",
8122    ///      "type": "array",
8123    ///      "items": {
8124    ///        "$ref": "#/components/schemas/Instance"
8125    ///      }
8126    ///    }
8127    ///  }
8128    ///}
8129    /// ```
8130    /// </details>
8131    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8132    pub struct GetInstancesResponseData {
8133        ///The instance(s) that were retrieved by the request.
8134        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8135        pub instances: ::std::vec::Vec<Instance>,
8136    }
8137
8138    impl ::std::convert::From<&GetInstancesResponseData> for GetInstancesResponseData {
8139        fn from(value: &GetInstancesResponseData) -> Self {
8140            value.clone()
8141        }
8142    }
8143
8144    impl ::std::default::Default for GetInstancesResponseData {
8145        fn default() -> Self {
8146            Self {
8147                instances: Default::default(),
8148            }
8149        }
8150    }
8151
8152    ///The response message for getting one or more service group(s) given
8153    /// their UUID(s) or name(s).
8154    ///
8155    /// <details><summary>JSON schema</summary>
8156    ///
8157    /// ```json
8158    ///{
8159    ///  "description": "The response message for getting one or more service
8160    /// group(s) given their\nUUID(s) or name(s).",
8161    ///  "type": "object",
8162    ///  "properties": {
8163    ///    "data": {
8164    ///      "description": "The response data for this request.",
8165    ///      "allOf": [
8166    ///        {
8167    ///          "$ref": "#/components/schemas/GetServiceGroupsResponseData"
8168    ///        }
8169    ///      ]
8170    ///    },
8171    ///    "errors": {
8172    ///      "description": "A list of errors which may have occurred during the
8173    /// request.",
8174    ///      "type": "array",
8175    ///      "items": {
8176    ///        "$ref": "#/components/schemas/ResponseError"
8177    ///      }
8178    ///    },
8179    ///    "message": {
8180    ///      "description": "An optional message providing additional
8181    /// information about the status.\nThis field is useful when the status is
8182    /// not `success`.",
8183    ///      "examples": [
8184    ///        "Failed to perform all operations"
8185    ///      ],
8186    ///      "type": "string"
8187    ///    },
8188    ///    "op_time_us": {
8189    ///      "description": "The operation time in microseconds.  This is the
8190    /// time it took to process\nthe request and generate the response.",
8191    ///      "examples": [
8192    ///        46
8193    ///      ],
8194    ///      "type": "integer",
8195    ///      "format": "uint64"
8196    ///    },
8197    ///    "status": {
8198    ///      "description": "The status of the response.",
8199    ///      "allOf": [
8200    ///        {
8201    ///          "$ref": "#/components/schemas/ResponseStatus"
8202    ///        }
8203    ///      ]
8204    ///    }
8205    ///  }
8206    ///}
8207    /// ```
8208    /// </details>
8209    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8210    pub struct GetServiceGroupsResponse {
8211        ///The response data for this request.
8212        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8213        pub data: ::std::option::Option<GetServiceGroupsResponseData>,
8214        ///A list of errors which may have occurred during the request.
8215        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8216        pub errors: ::std::vec::Vec<ResponseError>,
8217        ///An optional message providing additional information about the
8218        /// status. This field is useful when the status is not
8219        /// `success`.
8220        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8221        pub message: ::std::option::Option<::std::string::String>,
8222        ///The operation time in microseconds.  This is the time it took to
8223        /// process the request and generate the response.
8224        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8225        pub op_time_us: ::std::option::Option<u64>,
8226        ///The status of the response.
8227        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8228        pub status: ::std::option::Option<ResponseStatus>,
8229    }
8230
8231    impl ::std::convert::From<&GetServiceGroupsResponse> for GetServiceGroupsResponse {
8232        fn from(value: &GetServiceGroupsResponse) -> Self {
8233            value.clone()
8234        }
8235    }
8236
8237    impl ::std::default::Default for GetServiceGroupsResponse {
8238        fn default() -> Self {
8239            Self {
8240                data: Default::default(),
8241                errors: Default::default(),
8242                message: Default::default(),
8243                op_time_us: Default::default(),
8244                status: Default::default(),
8245            }
8246        }
8247    }
8248
8249    ///`GetServiceGroupsResponseData`
8250    ///
8251    /// <details><summary>JSON schema</summary>
8252    ///
8253    /// ```json
8254    ///{
8255    ///  "type": "object",
8256    ///  "properties": {
8257    ///    "service_groups": {
8258    ///      "description": "The service group(s) which were retrieved by the
8259    /// request.",
8260    ///      "type": "array",
8261    ///      "items": {
8262    ///        "$ref": "#/components/schemas/ServiceGroup"
8263    ///      }
8264    ///    }
8265    ///  }
8266    ///}
8267    /// ```
8268    /// </details>
8269    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8270    pub struct GetServiceGroupsResponseData {
8271        ///The service group(s) which were retrieved by the request.
8272        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8273        pub service_groups: ::std::vec::Vec<ServiceGroup>,
8274    }
8275
8276    impl ::std::convert::From<&GetServiceGroupsResponseData> for GetServiceGroupsResponseData {
8277        fn from(value: &GetServiceGroupsResponseData) -> Self {
8278            value.clone()
8279        }
8280    }
8281
8282    impl ::std::default::Default for GetServiceGroupsResponseData {
8283        fn default() -> Self {
8284            Self {
8285                service_groups: Default::default(),
8286            }
8287        }
8288    }
8289
8290    ///The response message for getting one or more volume(s) given their
8291    ///UUID(s) or name(s).
8292    ///
8293    /// <details><summary>JSON schema</summary>
8294    ///
8295    /// ```json
8296    ///{
8297    ///  "description": "The response message for getting one or more volume(s)
8298    /// given their\nUUID(s) or name(s).",
8299    ///  "type": "object",
8300    ///  "allOf": [
8301    ///    {
8302    ///      "type": "object",
8303    ///      "properties": {
8304    ///        "data": {
8305    ///          "description": "The response data for this request.",
8306    ///          "allOf": [
8307    ///            {
8308    ///              "$ref": "#/components/schemas/GetVolumesResponseData"
8309    ///            }
8310    ///          ]
8311    ///        },
8312    ///        "errors": {
8313    ///          "description": "A list of errors which may have occurred during
8314    /// the request.",
8315    ///          "type": "array",
8316    ///          "items": {
8317    ///            "$ref": "#/components/schemas/ResponseError"
8318    ///          }
8319    ///        },
8320    ///        "op_time_us": {
8321    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
8322    ///          "examples": [
8323    ///            46
8324    ///          ],
8325    ///          "type": "integer",
8326    ///          "format": "uint64"
8327    ///        },
8328    ///        "status": {
8329    ///          "description": "The status of the response.",
8330    ///          "allOf": [
8331    ///            {
8332    ///              "$ref": "#/components/schemas/ResponseStatus"
8333    ///            }
8334    ///          ]
8335    ///        }
8336    ///      }
8337    ///    },
8338    ///    {
8339    ///      "oneOf": [
8340    ///        {
8341    ///          "title": "message",
8342    ///          "type": "object",
8343    ///          "properties": {
8344    ///            "message": {
8345    ///              "description": "An optional message providing additional
8346    /// information about the status.\nThis field is useful when the status is
8347    /// not `success`.",
8348    ///              "examples": [
8349    ///                "Failed to perform all operations"
8350    ///              ],
8351    ///              "type": "string"
8352    ///            }
8353    ///          }
8354    ///        }
8355    ///      ]
8356    ///    }
8357    ///  ]
8358    ///}
8359    /// ```
8360    /// </details>
8361    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8362    pub struct GetVolumesResponse {
8363        ///The response data for this request.
8364        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8365        pub data: ::std::option::Option<GetVolumesResponseData>,
8366        ///A list of errors which may have occurred during the request.
8367        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8368        pub errors: ::std::vec::Vec<ResponseError>,
8369        ///An optional message providing additional information about the
8370        /// status. This field is useful when the status is not
8371        /// `success`.
8372        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8373        pub message: ::std::option::Option<::std::string::String>,
8374        ///The operation time in microseconds.  This is the time it took to
8375        /// process the request and generate the response.
8376        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8377        pub op_time_us: ::std::option::Option<u64>,
8378        ///The status of the response.
8379        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8380        pub status: ::std::option::Option<ResponseStatus>,
8381    }
8382
8383    impl ::std::convert::From<&GetVolumesResponse> for GetVolumesResponse {
8384        fn from(value: &GetVolumesResponse) -> Self {
8385            value.clone()
8386        }
8387    }
8388
8389    impl ::std::default::Default for GetVolumesResponse {
8390        fn default() -> Self {
8391            Self {
8392                data: Default::default(),
8393                errors: Default::default(),
8394                message: Default::default(),
8395                op_time_us: Default::default(),
8396                status: Default::default(),
8397            }
8398        }
8399    }
8400
8401    ///`GetVolumesResponseData`
8402    ///
8403    /// <details><summary>JSON schema</summary>
8404    ///
8405    /// ```json
8406    ///{
8407    ///  "type": "object",
8408    ///  "properties": {
8409    ///    "volumes": {
8410    ///      "description": "The volume(s) which were retrieved by the
8411    /// request.",
8412    ///      "type": "array",
8413    ///      "items": {
8414    ///        "$ref": "#/components/schemas/Volume"
8415    ///      }
8416    ///    }
8417    ///  }
8418    ///}
8419    /// ```
8420    /// </details>
8421    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8422    pub struct GetVolumesResponseData {
8423        ///The volume(s) which were retrieved by the request.
8424        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8425        pub volumes: ::std::vec::Vec<Volume>,
8426    }
8427
8428    impl ::std::convert::From<&GetVolumesResponseData> for GetVolumesResponseData {
8429        fn from(value: &GetVolumesResponseData) -> Self {
8430            value.clone()
8431        }
8432    }
8433
8434    impl ::std::default::Default for GetVolumesResponseData {
8435        fn default() -> Self {
8436            Self {
8437                volumes: Default::default(),
8438            }
8439        }
8440    }
8441
8442    ///Represents a dynamically typed value which can be either null, a number,
8443    /// a string, a boolean, a recursive struct value, or a list of values.
8444    ///
8445    /// <details><summary>JSON schema</summary>
8446    ///
8447    /// ```json
8448    ///{
8449    ///  "description": "Represents a dynamically typed value which can be
8450    /// either null, a number, a string, a boolean, a recursive struct value, or
8451    /// a list of values."
8452    ///}
8453    /// ```
8454    /// </details>
8455    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8456    #[serde(transparent)]
8457    pub struct GoogleProtobufValue(pub ::serde_json::Value);
8458    impl ::std::ops::Deref for GoogleProtobufValue {
8459        type Target = ::serde_json::Value;
8460        fn deref(&self) -> &::serde_json::Value {
8461            &self.0
8462        }
8463    }
8464
8465    impl ::std::convert::From<GoogleProtobufValue> for ::serde_json::Value {
8466        fn from(value: GoogleProtobufValue) -> Self {
8467            value.0
8468        }
8469    }
8470
8471    impl ::std::convert::From<&GoogleProtobufValue> for GoogleProtobufValue {
8472        fn from(value: &GoogleProtobufValue) -> Self {
8473            value.clone()
8474        }
8475    }
8476
8477    impl ::std::convert::From<::serde_json::Value> for GoogleProtobufValue {
8478        fn from(value: ::serde_json::Value) -> Self {
8479            Self(value)
8480        }
8481    }
8482
8483    ///The response message for a health check of the platform.
8484    ///
8485    /// <details><summary>JSON schema</summary>
8486    ///
8487    /// ```json
8488    ///{
8489    ///  "description": "The response message for a health check of the
8490    /// platform.",
8491    ///  "type": "object",
8492    ///  "properties": {
8493    ///    "data": {
8494    ///      "description": "The response data for this request.",
8495    ///      "allOf": [
8496    ///        {
8497    ///          "$ref": "#/components/schemas/HealthzResponseData"
8498    ///        }
8499    ///      ]
8500    ///    },
8501    ///    "errors": {
8502    ///      "description": "A list of errors which may have occurred during the
8503    /// request.",
8504    ///      "type": "array",
8505    ///      "items": {
8506    ///        "$ref": "#/components/schemas/ResponseError"
8507    ///      }
8508    ///    },
8509    ///    "message": {
8510    ///      "description": "An optional message providing additional
8511    /// information about the response.",
8512    ///      "examples": [
8513    ///        "Invalid name 'non-funky-town'"
8514    ///      ],
8515    ///      "type": "string"
8516    ///    },
8517    ///    "op_time_us": {
8518    ///      "description": "The operation time in microseconds.  This is the
8519    /// time it took to process\nthe request and generate the response.",
8520    ///      "examples": [
8521    ///        875
8522    ///      ],
8523    ///      "type": "integer",
8524    ///      "format": "uint64"
8525    ///    },
8526    ///    "status": {
8527    ///      "description": "The status of the response.",
8528    ///      "allOf": [
8529    ///        {
8530    ///          "$ref": "#/components/schemas/ResponseStatus"
8531    ///        }
8532    ///      ]
8533    ///    }
8534    ///  }
8535    ///}
8536    /// ```
8537    /// </details>
8538    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8539    pub struct HealthzResponse {
8540        ///The response data for this request.
8541        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8542        pub data: ::std::option::Option<HealthzResponseData>,
8543        ///A list of errors which may have occurred during the request.
8544        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8545        pub errors: ::std::vec::Vec<ResponseError>,
8546        ///An optional message providing additional information about the
8547        /// response.
8548        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8549        pub message: ::std::option::Option<::std::string::String>,
8550        ///The operation time in microseconds.  This is the time it took to
8551        /// process the request and generate the response.
8552        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8553        pub op_time_us: ::std::option::Option<u64>,
8554        ///The status of the response.
8555        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8556        pub status: ::std::option::Option<ResponseStatus>,
8557    }
8558
8559    impl ::std::convert::From<&HealthzResponse> for HealthzResponse {
8560        fn from(value: &HealthzResponse) -> Self {
8561            value.clone()
8562        }
8563    }
8564
8565    impl ::std::default::Default for HealthzResponse {
8566        fn default() -> Self {
8567            Self {
8568                data: Default::default(),
8569                errors: Default::default(),
8570                message: Default::default(),
8571                op_time_us: Default::default(),
8572                status: Default::default(),
8573            }
8574        }
8575    }
8576
8577    ///For now, no additional data is returned by the health check.
8578    ///
8579    /// <details><summary>JSON schema</summary>
8580    ///
8581    /// ```json
8582    ///{
8583    ///  "description": "For now, no additional data is returned by the health
8584    /// check.",
8585    ///  "type": "object",
8586    ///  "properties": {
8587    ///    "services": {
8588    ///      "type": "object",
8589    ///      "additionalProperties": {
8590    ///        "type": "string"
8591    ///      }
8592    ///    }
8593    ///  }
8594    ///}
8595    /// ```
8596    /// </details>
8597    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8598    pub struct HealthzResponseData {
8599        #[serde(
8600            default,
8601            skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
8602        )]
8603        pub services: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
8604    }
8605
8606    impl ::std::convert::From<&HealthzResponseData> for HealthzResponseData {
8607        fn from(value: &HealthzResponseData) -> Self {
8608            value.clone()
8609        }
8610    }
8611
8612    impl ::std::default::Default for HealthzResponseData {
8613        fn default() -> Self {
8614            Self {
8615                services: Default::default(),
8616            }
8617        }
8618    }
8619
8620    ///`Image`
8621    ///
8622    /// <details><summary>JSON schema</summary>
8623    ///
8624    /// ```json
8625    ///{
8626    ///  "type": "object",
8627    ///  "properties": {
8628    ///    "arch": {
8629    ///      "description": "The architecture of the image.",
8630    ///      "examples": [
8631    ///        "x86_64"
8632    ///      ],
8633    ///      "type": "string"
8634    ///    },
8635    ///    "auxiliary_roms": {
8636    ///      "description": "List of auxiliary ROMs that are used by the
8637    /// image.",
8638    ///      "type": "array",
8639    ///      "items": {
8640    ///        "$ref": "#/components/schemas/Object"
8641    ///      }
8642    ///    },
8643    ///    "cmd": {
8644    ///      "description": "The command to run when the image is started.",
8645    ///      "examples": [
8646    ///        [
8647    ///          "/bin/sh",
8648    ///          "-c"
8649    ///        ]
8650    ///      ],
8651    ///      "type": "array",
8652    ///      "items": {
8653    ///        "type": "string"
8654    ///      }
8655    ///    },
8656    ///    "created_at": {
8657    ///      "description": "When the image was created.",
8658    ///      "examples": [
8659    ///        "2023-10-01T12:00:00Z"
8660    ///      ],
8661    ///      "type": "string",
8662    ///      "format": "date-time"
8663    ///    },
8664    ///    "description": {
8665    ///      "description": "A description of the image.",
8666    ///      "examples": [
8667    ///        "My image description"
8668    ///      ],
8669    ///      "type": "string"
8670    ///    },
8671    ///    "digest": {
8672    ///      "description": "The digest of the image is a unique identifier of
8673    /// the image manifest which\nis a string representation including the
8674    /// hashing algorithm and the hash\nvalue separated by a colon.",
8675    ///      "examples": [
8676    ///        256
8677    ///      ],
8678    ///      "type": "string"
8679    ///    },
8680    ///    "entrypoint": {
8681    ///      "description": "The entrypoint of the image is the command that is
8682    /// run when the image is\nstarted.",
8683    ///      "examples": [
8684    ///        [
8685    ///          "/bin/sh",
8686    ///          "-c"
8687    ///        ]
8688    ///      ],
8689    ///      "type": "array",
8690    ///      "items": {
8691    ///        "type": "string"
8692    ///      }
8693    ///    },
8694    ///    "env": {
8695    ///      "description": "The environment variables to set when the image is
8696    /// started.",
8697    ///      "examples": [
8698    ///        [
8699    ///          "ENV_VAR=value"
8700    ///        ]
8701    ///      ],
8702    ///      "type": "array",
8703    ///      "items": {
8704    ///        "type": "string"
8705    ///      }
8706    ///    },
8707    ///    "kernel": {
8708    ///      "description": "The kernel object is a reference to the kernel that
8709    /// is used by the image.",
8710    ///      "allOf": [
8711    ///        {
8712    ///          "$ref": "#/components/schemas/Object"
8713    ///        }
8714    ///      ]
8715    ///    },
8716    ///    "labels": {
8717    ///      "description": "Labels are key-value pairs.",
8718    ///      "type": "object",
8719    ///      "additionalProperties": {
8720    ///        "type": "string"
8721    ///      }
8722    ///    },
8723    ///    "ports": {
8724    ///      "description": "Documented port mappings for the image.",
8725    ///      "examples": [
8726    ///        [
8727    ///          "8080:80"
8728    ///        ]
8729    ///      ],
8730    ///      "type": "array",
8731    ///      "items": {
8732    ///        "type": "string"
8733    ///      }
8734    ///    },
8735    ///    "tag": {
8736    ///      "description": "The canonical name of the image is known as the
8737    /// \"tag\".",
8738    ///      "examples": [
8739    ///        "my-image:latest"
8740    ///      ],
8741    ///      "type": "string"
8742    ///    },
8743    ///    "volumes": {
8744    ///      "description": "Documented volumes for the image.",
8745    ///      "examples": [
8746    ///        [
8747    ///          "/data"
8748    ///        ]
8749    ///      ],
8750    ///      "type": "array",
8751    ///      "items": {
8752    ///        "type": "string"
8753    ///      }
8754    ///    },
8755    ///    "workdir": {
8756    ///      "description": "The working directory for the image is the
8757    /// directory that is set as the\ncurrent working directory when the image
8758    /// is started.",
8759    ///      "examples": [
8760    ///        "/app"
8761    ///      ],
8762    ///      "type": "string"
8763    ///    }
8764    ///  }
8765    ///}
8766    /// ```
8767    /// </details>
8768    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
8769    pub struct Image {
8770        ///The architecture of the image.
8771        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8772        pub arch: ::std::option::Option<::std::string::String>,
8773        ///List of auxiliary ROMs that are used by the image.
8774        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8775        pub auxiliary_roms: ::std::vec::Vec<Object>,
8776        ///The command to run when the image is started.
8777        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8778        pub cmd: ::std::vec::Vec<::std::string::String>,
8779        ///When the image was created.
8780        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8781        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
8782        ///A description of the image.
8783        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8784        pub description: ::std::option::Option<::std::string::String>,
8785        ///The digest of the image is a unique identifier of the image manifest
8786        /// which is a string representation including the hashing
8787        /// algorithm and the hash value separated by a colon.
8788        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8789        pub digest: ::std::option::Option<::std::string::String>,
8790        ///The entrypoint of the image is the command that is run when the
8791        /// image is started.
8792        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8793        pub entrypoint: ::std::vec::Vec<::std::string::String>,
8794        ///The environment variables to set when the image is started.
8795        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8796        pub env: ::std::vec::Vec<::std::string::String>,
8797        ///The kernel object is a reference to the kernel that is used by the
8798        /// image.
8799        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8800        pub kernel: ::std::option::Option<Object>,
8801        ///Labels are key-value pairs.
8802        #[serde(
8803            default,
8804            skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
8805        )]
8806        pub labels: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
8807        ///Documented port mappings for the image.
8808        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8809        pub ports: ::std::vec::Vec<::std::string::String>,
8810        ///The canonical name of the image is known as the "tag".
8811        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8812        pub tag: ::std::option::Option<::std::string::String>,
8813        ///Documented volumes for the image.
8814        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
8815        pub volumes: ::std::vec::Vec<::std::string::String>,
8816        ///The working directory for the image is the directory that is set as
8817        /// the current working directory when the image is started.
8818        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
8819        pub workdir: ::std::option::Option<::std::string::String>,
8820    }
8821
8822    impl ::std::convert::From<&Image> for Image {
8823        fn from(value: &Image) -> Self {
8824            value.clone()
8825        }
8826    }
8827
8828    impl ::std::default::Default for Image {
8829        fn default() -> Self {
8830            Self {
8831                arch: Default::default(),
8832                auxiliary_roms: Default::default(),
8833                cmd: Default::default(),
8834                created_at: Default::default(),
8835                description: Default::default(),
8836                digest: Default::default(),
8837                entrypoint: Default::default(),
8838                env: Default::default(),
8839                kernel: Default::default(),
8840                labels: Default::default(),
8841                ports: Default::default(),
8842                tag: Default::default(),
8843                volumes: Default::default(),
8844                workdir: Default::default(),
8845            }
8846        }
8847    }
8848
8849    ///An instance is a unikernel virtual machine running an application.
8850    ///
8851    /// <details><summary>JSON schema</summary>
8852    ///
8853    /// ```json
8854    ///{
8855    ///  "description": "An instance is a unikernel virtual machine running an
8856    /// application.",
8857    ///  "type": "object",
8858    ///  "properties": {
8859    ///    "args": {
8860    ///      "description": "The arguments passed to the instance when it was
8861    /// started.  This is a\nlist of command-line arguments that were provided
8862    /// to the instance at\nstartup.  These arguments can be used to configure
8863    /// the behavior of the\ninstance and its applications.",
8864    ///      "examples": [
8865    ///        "--port=8080 --debug"
8866    ///      ],
8867    ///      "type": "array",
8868    ///      "items": {
8869    ///        "type": "string"
8870    ///      }
8871    ///    },
8872    ///    "boot_time_us": {
8873    ///      "description": "The boot time of the instance in microseconds.  We
8874    /// take a pragmatic\napproach is to define the boot time.  We calculate
8875    /// this as the difference\nin time between the moment the virtualization
8876    /// toolstack is invoked to\nrespond to a VM boot request and the moment the
8877    /// OS starts executing user\ncode (i.e., the end of the guest OS boot
8878    /// process).  This is essentially the\ntime that a user would experience in
8879    /// a deployment, minus the application\ninitialization time, which we leave
8880    /// out since it is independent from the\nOS.",
8881    ///      "examples": [
8882    ///        9000
8883    ///      ],
8884    ///      "type": "integer",
8885    ///      "format": "uint64"
8886    ///    },
8887    ///    "created_at": {
8888    ///      "description": "The time the instance was created.",
8889    ///      "examples": [
8890    ///        "2023-10-01T12:00:00Z"
8891    ///      ],
8892    ///      "type": "string",
8893    ///      "format": "date-time"
8894    ///    },
8895    ///    "env": {
8896    ///      "description": "Environment variables set for the instance.",
8897    ///      "examples": [
8898    ///        {
8899    ///          "ENV_VAR": "value"
8900    ///        }
8901    ///      ],
8902    ///      "type": "object",
8903    ///      "additionalProperties": {
8904    ///        "type": "string"
8905    ///      }
8906    ///    },
8907    ///    "error": {
8908    ///      "description": "An optional error code providing additional
8909    /// information about the status.\nThis field is only set when this message
8910    /// object is used as a response\nmessage, and is useful when the status is
8911    /// not `success`.",
8912    ///      "examples": [
8913    ///        8
8914    ///      ],
8915    ///      "type": "integer",
8916    ///      "format": "int32"
8917    ///    },
8918    ///    "exit_code": {
8919    ///      "description": "The application exit code.\n\nThis is the code
8920    /// which the application returns upon leaving its main entry\npoint.  The
8921    /// encoding of the exit code is application specific.  See
8922    /// the\ndocumentation of the application for more details.  Usually, an
8923    /// exit code\nof `0` indicates success / no failure.",
8924    ///      "examples": [
8925    ///        137
8926    ///      ],
8927    ///      "type": "integer",
8928    ///      "format": "uint32"
8929    ///    },
8930    ///    "image": {
8931    ///      "description": "The image used to create the instance.  This is a reference to the\nUnikraft image that was used to create the instance.",
8932    ///      "examples": [
8933    ///        "nginx:latest"
8934    ///      ],
8935    ///      "type": "string"
8936    ///    },
8937    ///    "memory_mb": {
8938    ///      "description": "The amount of memory in megabytes allocated for the
8939    /// instance.  This is the\ntotal amount of memory that is available to the
8940    /// instance for its\noperations.",
8941    ///      "examples": [
8942    ///        1024
8943    ///      ],
8944    ///      "type": "integer",
8945    ///      "format": "uint64"
8946    ///    },
8947    ///    "message": {
8948    ///      "description": "An optional message providing additional
8949    /// information about the status.\nThis field is only set when this message
8950    /// object is used as a response\nmessage, and is useful when the status is
8951    /// not `success`.",
8952    ///      "examples": [
8953    ///        "No instance with name 'funky-town-g756b5d'"
8954    ///      ],
8955    ///      "type": "string"
8956    ///    },
8957    ///    "name": {
8958    ///      "description": "The name of the instance.\n\nThis is a
8959    /// human-readable name that can be used to identify the instance.\nThe name
8960    /// must be unique within the context of your account.  The name can\nalso
8961    /// be used to identify the instance in API calls.",
8962    ///      "examples": [
8963    ///        "funky-town-g756b5d"
8964    ///      ],
8965    ///      "type": "string"
8966    ///    },
8967    ///    "net_time_us": {
8968    ///      "description": "This is the time it took for the user-level
8969    /// application to start listening\non a non-localhost port measured in
8970    /// microseconds.  This is the time from\nwhen the instance started until it
8971    /// reasonably ready to start responding to\nnetwork requests.  This is
8972    /// useful for measuring the time it takes for the\ninstance to become
8973    /// operationally ready.",
8974    ///      "examples": [
8975    ///        11000
8976    ///      ],
8977    ///      "type": "integer",
8978    ///      "format": "uint64"
8979    ///    },
8980    ///    "network_interfaces": {
8981    ///      "description": "The network interfaces of the instance.",
8982    ///      "type": "array",
8983    ///      "items": {
8984    ///        "$ref": "#/components/schemas/InstanceNetworkInterface"
8985    ///      }
8986    ///    },
8987    ///    "private_fqdn": {
8988    ///      "description": "The internal hostname of the instance.  This address can be used privately\nwithin the Unikraft Cloud network to access the instance.  It is not\naccessible from the public Internet.",
8989    ///      "examples": [
8990    ///        "funky-town-g756b5d.internal"
8991    ///      ],
8992    ///      "type": "string"
8993    ///    },
8994    ///    "restart_count": {
8995    ///      "description": "The total number of times the instance has been
8996    /// restarted. This is a counter\nthat increments each time the instance has
8997    /// been restarted. This can be\nuseful for tracking the usage of the
8998    /// instance over time and/or for\ndebugging purposes.",
8999    ///      "examples": [
9000    ///        1
9001    ///      ],
9002    ///      "type": "integer",
9003    ///      "format": "uint64"
9004    ///    },
9005    ///    "restart_policy": {
9006    ///      "description": "The restart configuration for the instance.\n\nWhen
9007    /// an instance stops either because the application exits or the
9008    /// instance\ncrashes, Unikraft Cloud can auto-restart your instance.
9009    /// Auto-restarts are\nperformed according to the restart policy configured
9010    /// for a particular\ninstance.\n\nThe policy can have the following
9011    /// values:\n\n| Policy       | Description
9012    /// |\n|--------------|-------------|\n| `never`      | Never restart the
9013    /// instance (default). |\n| `always`     | Always restart the instance when
9014    /// the stop is initiated from within the instance (i.e., the application
9015    /// exits or the instance crashes). |\n| `on-failure` | Only restart the
9016    /// instance if it crashes. |\n\nWhen an instance stops, the stop reason and
9017    /// the configured restart policy\nare evaluated to decide if a restart
9018    /// should be performed.  Unikraft Cloud\nuses an exponential back-off delay
9019    /// (immediate, 5s, 10s, 20s, 40s, ..., 5m)\nto slow down restarts in tight
9020    /// crash loops.  If an instance runs without\nproblems for 10s the back-off
9021    /// delay is reset and the restart sequence ends.\n\nThe `restart.attempt`
9022    /// attribute reported in counts the number of restarts\nperformed in the
9023    /// current sequence.  The `restart.next_at` field indicates\nwhen the next
9024    /// restart will take place if a back-off delay is in effect.\n\nA manual
9025    /// start or stop of the instance aborts the restart sequence and\nresets
9026    /// the back-off delay.",
9027    ///      "type": "string",
9028    ///      "format": "enum",
9029    ///      "enum": [
9030    ///        "never",
9031    ///        "always",
9032    ///        "on_failure"
9033    ///      ]
9034    ///    },
9035    ///    "scale_to_zero": {
9036    ///      "description": "The scale-to-zero configuration for the
9037    /// instance.\n\nWith conventional cloud platforms you need to keep at least
9038    /// one instance\nrunning at all times to be able to respond to incoming
9039    /// requests. Performing\na just-in-time cold boot is simply too
9040    /// time-consuming and would create a\nresponse latency of multiple seconds.
9041    /// This is not the case with Unikraft\nCloud.  Instances on Unikraft Cloud
9042    /// are able to cold boot within\nmilliseconds, which allows us to perform
9043    /// low-latency scale-to-zero.\n\nTo enable scale-to-zero for an instance it
9044    /// is sufficient to add a\n`scale_to_zero` configuration block.  Unikraft
9045    /// Cloud will then put the\ninstance into standby if there is no traffic to
9046    /// your service within the\nwindow of a cooldown period.  When there is new
9047    /// traffic coming in, it is\nautomatically started again.\n\nIf you have a
9048    /// heavyweight application that takes long to cold boot or has\nbad first
9049    /// request latency (e.g., with JIT compilation) consider to
9050    /// enable\nstateful scale-to-zero.",
9051    ///      "allOf": [
9052    ///        {
9053    ///          "$ref": "#/components/schemas/InstanceScaleToZero"
9054    ///        }
9055    ///      ]
9056    ///    },
9057    ///    "service_group": {
9058    ///      "description": "The service group configuration for the instance.",
9059    ///      "allOf": [
9060    ///        {
9061    ///          "$ref": "#/components/schemas/InstanceInstanceServiceGroup"
9062    ///        }
9063    ///      ]
9064    ///    },
9065    ///    "start_count": {
9066    ///      "description": "The total number of times the instance has been
9067    /// started.  This is a counter\nthat increments each time the instance is
9068    /// started, regardless of whether it\nwas manually stopped or restarted.
9069    /// This can be useful for tracking the\nusage of the instance over time
9070    /// and/or for debugging purposes.",
9071    ///      "examples": [
9072    ///        6
9073    ///      ],
9074    ///      "type": "integer",
9075    ///      "format": "uint64"
9076    ///    },
9077    ///    "started_at": {
9078    ///      "description": "The time the instance was started.  This is the
9079    /// timestamp when the\ninstance was last started.",
9080    ///      "examples": [
9081    ///        "2023-10-01T12:00:00Z"
9082    ///      ],
9083    ///      "type": "string",
9084    ///      "format": "date-time"
9085    ///    },
9086    ///    "state": {
9087    ///      "description": "The state of the instance.  This indicates the
9088    /// current state of the\ninstance, such as whether it is running, stopped,
9089    /// or in an error state.",
9090    ///      "type": "string",
9091    ///      "format": "enum",
9092    ///      "enum": [
9093    ///        "stopped",
9094    ///        "starting",
9095    ///        "running",
9096    ///        "draining",
9097    ///        "stopping",
9098    ///        "standby"
9099    ///      ]
9100    ///    },
9101    ///    "status": {
9102    ///      "description": "An optional field representing the status of the
9103    /// request.  This field is\nonly set when this message object is used as a
9104    /// response message.",
9105    ///      "allOf": [
9106    ///        {
9107    ///          "$ref": "#/components/schemas/ResponseStatus"
9108    ///        }
9109    ///      ]
9110    ///    },
9111    ///    "stop_code": {
9112    ///      "description": "The kernel stop code.\n\nThis value encodes
9113    /// multiple details about the stop irrespective of
9114    /// the\napplication.\n\n```\nMSB
9115    /// LSB\n┌──────────────┬──────────┬──────────┬───────────┬────────┐\n│ 31
9116    /// ────── 24 │ 23 ── 16 │    15    │ 14 ──── 8 │ 7 ── 0
9117    /// │\n├──────────────┼──────────┼──────────┼───────────┼────────┤\n│
9118    /// reserved[^1] │ errno    │ shutdown │ initlevel │ reason
9119    /// │\n└──────────────┴──────────┴──────────┴───────────┴────────┘\n```\n\n-
9120    /// **errno**:     The application errno, using Linux's errno.h values.\n
9121    /// (Optional, can be 0.)\n- **shutdown**:  Whether the shutdown originated
9122    /// from the inittable (0) or\n                 from the termtable (1).\n-
9123    /// **initlevel**: The initlevel at the time of the stop.\n- **reason**:
9124    /// The reason for the stop.  See `StopCodeReason`.\n\n[^1]: Reserved for
9125    /// future use.",
9126    ///      "examples": [
9127    ///        33024
9128    ///      ],
9129    ///      "type": "integer",
9130    ///      "format": "uint32"
9131    ///    },
9132    ///    "stop_reason": {
9133    ///      "description": "The instance stop reason.\n\nProvides reason as to
9134    /// why an instance is stopped or in the process of\nshutting down.  The
9135    /// stop reason is a bitmask that tells you the origin of\nthe
9136    /// shutdown:\n\n| Bit     | 4          | 3          | 2          | 1
9137    /// | 0 (LSB)
9138    /// |\n|---------|------------|------------|------------|------------|--------------|\
9139    /// n| Purpose | [F]orced   | [U]ser     | [P]latform | [A]pp      |
9140    /// [K]ernel     |\n\n- **Forced**:   This was a force stop.  A forced stop
9141    /// does not give the\n                instance a chance to perform a clean
9142    /// shutdown.  Bits 0\n                (Kernel) and 1 (App) can thus never
9143    /// be set for forced\n                shutdowns.  Consequently, there won't
9144    /// be an `exit_code` or\n                `stop_code`.\n- **User**:     Stop
9145    /// initiated by user, e.g. via an API call.\n- **Platform**: Stop initiated
9146    /// by platform, e.g. an autoscale policy.\n- **App**:      The Application
9147    /// exited.  The `exit_code` field will be set.\n- **Kernel**:   The kernel
9148    /// exited.  The `stop_code` field will be set.\n\nFor example, the stop
9149    /// reason will contain the following values in the given\nscenarios:\n\n|
9150    /// Value | Bitmask | Aliases | Scenario
9151    /// |\n|-------|---------|---------|----------|\n| 28    | `11100` | `FUP--`
9152    /// | Forced user-initiated shutdown. |\n| 15    | `01111` | `-UPAK` |
9153    /// Regular user-initiated shutdown. The application and kernel have exited.
9154    /// The exit_code and stop_code indicate if the application and kernel shut
9155    /// down cleanly. |\n| 13    | `01101` | `-UP-K` | The user initiated a
9156    /// shutdown but the application was forcefully killed by the kernel during
9157    /// shutdown. This can be the case if the image does not support a clean
9158    /// application exit or the application crashed after receiving a
9159    /// termination signal. The exit_code won’t be present in this scenario.
9160    /// |\n| 7     | `00111` | `--PAK` | Unikraft Cloud initiated the shutdown,
9161    /// for example, due to scale-to-zero. The application and kernel have
9162    /// exited. The exit_code and stop_code indicate if the application and
9163    /// kernel shut down cleanly. |\n| 3     | `00011` | `---AK` | The
9164    /// application exited. The exit_code and stop_code indicate if the
9165    /// application and kernel shut down cleanly. |\n| 1     | `00001` | `----K`
9166    /// | The instance likely expierenced a fatal crash and the stop_code
9167    /// contains more information about the cause of the crash. |\n| 0     |
9168    /// `00000` | `-----` | The stop reason is unknown. |",
9169    ///      "examples": [
9170    ///        15
9171    ///      ],
9172    ///      "type": "integer",
9173    ///      "format": "uint32"
9174    ///    },
9175    ///    "stopped_at": {
9176    ///      "description": "The time the instance was stopped.  This is the
9177    /// timestamp when the\ninstance was last stopped.  If the instance is
9178    /// currently running, this\nfield will be empty.",
9179    ///      "examples": [
9180    ///        "2023-10-01T12:00:00Z"
9181    ///      ],
9182    ///      "type": "string",
9183    ///      "format": "date-time"
9184    ///    },
9185    ///    "tags": {
9186    ///      "description": "The tags associated with the instance.",
9187    ///      "type": "array",
9188    ///      "items": {
9189    ///        "type": "string"
9190    ///      }
9191    ///    },
9192    ///    "uptime_ms": {
9193    ///      "description": "The total amount of time the instance has been
9194    /// running in milliseconds.",
9195    ///      "examples": [
9196    ///        8954050300
9197    ///      ],
9198    ///      "type": "integer",
9199    ///      "format": "uint64"
9200    ///    },
9201    ///    "uuid": {
9202    ///      "description": "The UUID of the instance.\n\nThis is a unique
9203    /// identifier for the instance that is generated when the\ninstance is
9204    /// created.  The UUID is used to reference the instance in API\ncalls and
9205    /// can be used to identify the instance in all API calls that\nrequire an
9206    /// instance identifier.",
9207    ///      "type": "string",
9208    ///      "format": "uuid"
9209    ///    },
9210    ///    "vcpus": {
9211    ///      "description": "The number of vCPUs allocated for the instance.
9212    /// This is the total\nnumber of virtual CPUs that are available to the
9213    /// instance for its\noperations.",
9214    ///      "examples": [
9215    ///        1
9216    ///      ],
9217    ///      "type": "integer",
9218    ///      "format": "uint32"
9219    ///    },
9220    ///    "vmm_load_time_us": {
9221    ///      "description": "(Developer-only).  The time it took the VMM
9222    /// (Virtual Machine Monitor) to\nload the instance's kernel and initramfs
9223    /// into VM memory measured in\nmicroseconds.  This field is primarily used
9224    /// for debugging and performance\nanalysis purposes.",
9225    ///      "examples": [
9226    ///        4050
9227    ///      ],
9228    ///      "type": "integer",
9229    ///      "format": "uint64"
9230    ///    },
9231    ///    "vmm_ready_time_us": {
9232    ///      "description": "(Developer-only).  The time taken for the VMM
9233    /// (Virtual Machine Monitor) to\nbecome ready to execute the instance
9234    /// measured in microseconds.  This is the\ntime from when the VMM started
9235    /// until it was ready to execute the instance's\ncode.  This field is
9236    /// primarily used for debugging and performance analysis\npurposes.",
9237    ///      "examples": [
9238    ///        400
9239    ///      ],
9240    ///      "type": "integer",
9241    ///      "format": "uint64"
9242    ///    },
9243    ///    "vmm_start_time_us": {
9244    ///      "description": "(Developer-only).  The time taken between the main
9245    /// controller and the\nbeginning of execution of the VMM (Virtual Machine
9246    /// Monitor) measured in\nmicroseconds.  This field is primarily used for
9247    /// debugging and performance\nanalysis purposes.",
9248    ///      "examples": [
9249    ///        70040
9250    ///      ],
9251    ///      "type": "integer",
9252    ///      "format": "uint64"
9253    ///    },
9254    ///    "volumes": {
9255    ///      "description": "The list of volumes attached to the instance.",
9256    ///      "type": "array",
9257    ///      "items": {
9258    ///        "$ref": "#/components/schemas/InstanceInstanceVolume"
9259    ///      }
9260    ///    }
9261    ///  }
9262    ///}
9263    /// ```
9264    /// </details>
9265    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9266    pub struct Instance {
9267        ///The arguments passed to the instance when it was started.  This is a
9268        ///list of command-line arguments that were provided to the instance at
9269        ///startup.  These arguments can be used to configure the behavior of
9270        /// the instance and its applications.
9271        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
9272        pub args: ::std::vec::Vec<::std::string::String>,
9273        ///The boot time of the instance in microseconds.  We take a pragmatic
9274        ///approach is to define the boot time.  We calculate this as the
9275        /// difference in time between the moment the virtualization
9276        /// toolstack is invoked to respond to a VM boot request and the
9277        /// moment the OS starts executing user code (i.e., the end of
9278        /// the guest OS boot process).  This is essentially the
9279        /// time that a user would experience in a deployment, minus the
9280        /// application initialization time, which we leave out since it
9281        /// is independent from the OS.
9282        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9283        pub boot_time_us: ::std::option::Option<u64>,
9284        ///The time the instance was created.
9285        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9286        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
9287        ///Environment variables set for the instance.
9288        #[serde(
9289            default,
9290            skip_serializing_if = ":: std :: collections :: HashMap::is_empty"
9291        )]
9292        pub env: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
9293        ///An optional error code providing additional information about the
9294        /// status. This field is only set when this message object is
9295        /// used as a response message, and is useful when the status is
9296        /// not `success`.
9297        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9298        pub error: ::std::option::Option<i32>,
9299        ///The application exit code.
9300        ///
9301        ///This is the code which the application returns upon leaving its main
9302        /// entry point.  The encoding of the exit code is application
9303        /// specific.  See the documentation of the application for more
9304        /// details.  Usually, an exit code of `0` indicates success /
9305        /// no failure.
9306        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9307        pub exit_code: ::std::option::Option<u32>,
9308        ///The image used to create the instance.  This is a reference to the
9309        ///Unikraft image that was used to create the instance.
9310        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9311        pub image: ::std::option::Option<::std::string::String>,
9312        ///The amount of memory in megabytes allocated for the instance.  This
9313        /// is the total amount of memory that is available to the
9314        /// instance for its operations.
9315        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9316        pub memory_mb: ::std::option::Option<u64>,
9317        ///An optional message providing additional information about the
9318        /// status. This field is only set when this message object is
9319        /// used as a response message, and is useful when the status is
9320        /// not `success`.
9321        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9322        pub message: ::std::option::Option<::std::string::String>,
9323        ///The name of the instance.
9324        ///
9325        ///This is a human-readable name that can be used to identify the
9326        /// instance. The name must be unique within the context of your
9327        /// account.  The name can also be used to identify the instance
9328        /// in API calls.
9329        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9330        pub name: ::std::option::Option<::std::string::String>,
9331        ///This is the time it took for the user-level application to start
9332        /// listening on a non-localhost port measured in microseconds.
9333        /// This is the time from when the instance started until it
9334        /// reasonably ready to start responding to network requests.
9335        /// This is useful for measuring the time it takes for the
9336        /// instance to become operationally ready.
9337        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9338        pub net_time_us: ::std::option::Option<u64>,
9339        ///The network interfaces of the instance.
9340        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
9341        pub network_interfaces: ::std::vec::Vec<InstanceNetworkInterface>,
9342        ///The internal hostname of the instance.  This address can be used
9343        /// privately within the Unikraft Cloud network to access the
9344        /// instance.  It is not accessible from the public Internet.
9345        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9346        pub private_fqdn: ::std::option::Option<::std::string::String>,
9347        ///The total number of times the instance has been restarted. This is a
9348        /// counter that increments each time the instance has been
9349        /// restarted. This can be useful for tracking the usage of the
9350        /// instance over time and/or for debugging purposes.
9351        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9352        pub restart_count: ::std::option::Option<u64>,
9353        ///The restart configuration for the instance.
9354        ///
9355        ///When an instance stops either because the application exits or the
9356        /// instance crashes, Unikraft Cloud can auto-restart your
9357        /// instance.  Auto-restarts are performed according to the
9358        /// restart policy configured for a particular instance.
9359        ///
9360        ///The policy can have the following values:
9361        ///
9362        ///| Policy       | Description |
9363        ///|--------------|-------------|
9364        ///| `never`      | Never restart the instance (default). |
9365        ///| `always`     | Always restart the instance when the stop is initiated from within the instance (i.e., the application exits or the instance crashes). |
9366        ///| `on-failure` | Only restart the instance if it crashes. |
9367        ///
9368        ///When an instance stops, the stop reason and the configured restart
9369        /// policy are evaluated to decide if a restart should be
9370        /// performed.  Unikraft Cloud uses an exponential back-off
9371        /// delay (immediate, 5s, 10s, 20s, 40s, ..., 5m) to slow down
9372        /// restarts in tight crash loops.  If an instance runs without
9373        /// problems for 10s the back-off delay is reset and the restart
9374        /// sequence ends.
9375        ///
9376        ///The `restart.attempt` attribute reported in counts the number of
9377        /// restarts performed in the current sequence.  The
9378        /// `restart.next_at` field indicates when the next restart will
9379        /// take place if a back-off delay is in effect.
9380        ///
9381        ///A manual start or stop of the instance aborts the restart sequence
9382        /// and resets the back-off delay.
9383        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9384        pub restart_policy: ::std::option::Option<InstanceRestartPolicy>,
9385        ///The scale-to-zero configuration for the instance.
9386        ///
9387        ///With conventional cloud platforms you need to keep at least one
9388        /// instance running at all times to be able to respond to
9389        /// incoming requests. Performing a just-in-time cold boot is
9390        /// simply too time-consuming and would create a
9391        /// response latency of multiple seconds.  This is not the case with
9392        /// Unikraft Cloud.  Instances on Unikraft Cloud are able to
9393        /// cold boot within milliseconds, which allows us to perform
9394        /// low-latency scale-to-zero.
9395        ///
9396        ///To enable scale-to-zero for an instance it is sufficient to add a
9397        ///`scale_to_zero` configuration block.  Unikraft Cloud will then put
9398        /// the instance into standby if there is no traffic to your
9399        /// service within the window of a cooldown period.  When there
9400        /// is new traffic coming in, it is automatically started again.
9401        ///
9402        ///If you have a heavyweight application that takes long to cold boot
9403        /// or has bad first request latency (e.g., with JIT
9404        /// compilation) consider to enable stateful scale-to-zero.
9405        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9406        pub scale_to_zero: ::std::option::Option<InstanceScaleToZero>,
9407        ///The service group configuration for the instance.
9408        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9409        pub service_group: ::std::option::Option<InstanceInstanceServiceGroup>,
9410        ///The total number of times the instance has been started.  This is a
9411        /// counter that increments each time the instance is started,
9412        /// regardless of whether it was manually stopped or restarted.
9413        /// This can be useful for tracking the usage of the instance
9414        /// over time and/or for debugging purposes.
9415        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9416        pub start_count: ::std::option::Option<u64>,
9417        ///The time the instance was started.  This is the timestamp when the
9418        ///instance was last started.
9419        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9420        pub started_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
9421        ///The state of the instance.  This indicates the current state of the
9422        ///instance, such as whether it is running, stopped, or in an error
9423        /// state.
9424        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9425        pub state: ::std::option::Option<InstanceState>,
9426        ///An optional field representing the status of the request.  This
9427        /// field is only set when this message object is used as a
9428        /// response message.
9429        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9430        pub status: ::std::option::Option<ResponseStatus>,
9431        ///The kernel stop code.
9432        ///
9433        ///This value encodes multiple details about the stop irrespective of
9434        /// the application.
9435        ///
9436        ///```
9437        /// MSB                                                     LSB
9438        /// ┌──────────────┬──────────┬──────────┬───────────┬────────┐
9439        /// │ 31 ────── 24 │ 23 ── 16 │    15    │ 14 ──── 8 │ 7 ── 0 │
9440        /// ├──────────────┼──────────┼──────────┼───────────┼────────┤
9441        /// │ reserved[^1] │ errno    │ shutdown │ initlevel │ reason │
9442        /// └──────────────┴──────────┴──────────┴───────────┴────────┘
9443        /// ```
9444        ///
9445        /// - **errno**:     The application errno, using Linux's errno.h
9446        ///   values. (Optional, can be 0.)
9447        /// - **shutdown**:  Whether the shutdown originated from the inittable
9448        ///   (0) or from the termtable (1).
9449        /// - **initlevel**: The initlevel at the time of the stop.
9450        /// - **reason**:    The reason for the stop.  See `StopCodeReason`.
9451        ///
9452        ///[^1]: Reserved for future use.
9453        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9454        pub stop_code: ::std::option::Option<u32>,
9455        ///The instance stop reason.
9456        ///
9457        ///Provides reason as to why an instance is stopped or in the process
9458        /// of shutting down.  The stop reason is a bitmask that tells
9459        /// you the origin of the shutdown:
9460        ///
9461        ///| Bit     | 4          | 3          | 2          | 1          | 0 (LSB)      |
9462        ///|---------|------------|------------|------------|------------|--------------|
9463        ///| Purpose | [F]orced   | [U]ser     | [P]latform | [A]pp      | [K]ernel     |
9464        ///
9465        /// - **Forced**:   This was a force stop.  A forced stop does not give
9466        ///   the instance a chance to perform a clean shutdown.  Bits 0
9467        ///   (Kernel) and 1 (App) can thus never be set for forced shutdowns.
9468        ///   Consequently, there won't be an `exit_code` or `stop_code`.
9469        /// - **User**:     Stop initiated by user, e.g. via an API call.
9470        /// - **Platform**: Stop initiated by platform, e.g. an autoscale
9471        ///   policy.
9472        /// - **App**:      The Application exited.  The `exit_code` field will
9473        ///   be set.
9474        /// - **Kernel**:   The kernel exited.  The `stop_code` field will be
9475        ///   set.
9476        ///
9477        ///For example, the stop reason will contain the following values in
9478        /// the given scenarios:
9479        ///
9480        ///| Value | Bitmask | Aliases | Scenario |
9481        ///|-------|---------|---------|----------|
9482        ///| 28    | `11100` | `FUP--` | Forced user-initiated shutdown. |
9483        ///| 15    | `01111` | `-UPAK` | Regular user-initiated shutdown. The application and kernel have exited. The exit_code and stop_code indicate if the application and kernel shut down cleanly. |
9484        ///| 13    | `01101` | `-UP-K` | The user initiated a shutdown but the application was forcefully killed by the kernel during shutdown. This can be the case if the image does not support a clean application exit or the application crashed after receiving a termination signal. The exit_code won’t be present in this scenario. |
9485        ///| 7     | `00111` | `--PAK` | Unikraft Cloud initiated the shutdown, for example, due to scale-to-zero. The application and kernel have exited. The exit_code and stop_code indicate if the application and kernel shut down cleanly. |
9486        ///| 3     | `00011` | `---AK` | The application exited. The exit_code and stop_code indicate if the application and kernel shut down cleanly. |
9487        ///| 1     | `00001` | `----K` | The instance likely expierenced a fatal crash and the stop_code contains more information about the cause of the crash. |
9488        ///| 0     | `00000` | `-----` | The stop reason is unknown. |
9489        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9490        pub stop_reason: ::std::option::Option<u32>,
9491        ///The time the instance was stopped.  This is the timestamp when the
9492        ///instance was last stopped.  If the instance is currently running,
9493        /// this field will be empty.
9494        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9495        pub stopped_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
9496        ///The tags associated with the instance.
9497        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
9498        pub tags: ::std::vec::Vec<::std::string::String>,
9499        ///The total amount of time the instance has been running in
9500        /// milliseconds.
9501        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9502        pub uptime_ms: ::std::option::Option<u64>,
9503        ///The UUID of the instance.
9504        ///
9505        ///This is a unique identifier for the instance that is generated when
9506        /// the instance is created.  The UUID is used to reference the
9507        /// instance in API calls and can be used to identify the
9508        /// instance in all API calls that require an instance
9509        /// identifier.
9510        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9511        pub uuid: ::std::option::Option<::uuid::Uuid>,
9512        ///The number of vCPUs allocated for the instance.  This is the total
9513        ///number of virtual CPUs that are available to the instance for its
9514        ///operations.
9515        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9516        pub vcpus: ::std::option::Option<u32>,
9517        ///(Developer-only).  The time it took the VMM (Virtual Machine
9518        /// Monitor) to load the instance's kernel and initramfs into VM
9519        /// memory measured in microseconds.  This field is primarily
9520        /// used for debugging and performance analysis purposes.
9521        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9522        pub vmm_load_time_us: ::std::option::Option<u64>,
9523        ///(Developer-only).  The time taken for the VMM (Virtual Machine
9524        /// Monitor) to become ready to execute the instance measured in
9525        /// microseconds.  This is the time from when the VMM started
9526        /// until it was ready to execute the instance's code.  This
9527        /// field is primarily used for debugging and performance analysis
9528        /// purposes.
9529        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9530        pub vmm_ready_time_us: ::std::option::Option<u64>,
9531        ///(Developer-only).  The time taken between the main controller and
9532        /// the beginning of execution of the VMM (Virtual Machine
9533        /// Monitor) measured in microseconds.  This field is primarily
9534        /// used for debugging and performance analysis purposes.
9535        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9536        pub vmm_start_time_us: ::std::option::Option<u64>,
9537        ///The list of volumes attached to the instance.
9538        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
9539        pub volumes: ::std::vec::Vec<InstanceInstanceVolume>,
9540    }
9541
9542    impl ::std::convert::From<&Instance> for Instance {
9543        fn from(value: &Instance) -> Self {
9544            value.clone()
9545        }
9546    }
9547
9548    impl ::std::default::Default for Instance {
9549        fn default() -> Self {
9550            Self {
9551                args: Default::default(),
9552                boot_time_us: Default::default(),
9553                created_at: Default::default(),
9554                env: Default::default(),
9555                error: Default::default(),
9556                exit_code: Default::default(),
9557                image: Default::default(),
9558                memory_mb: Default::default(),
9559                message: Default::default(),
9560                name: Default::default(),
9561                net_time_us: Default::default(),
9562                network_interfaces: Default::default(),
9563                private_fqdn: Default::default(),
9564                restart_count: Default::default(),
9565                restart_policy: Default::default(),
9566                scale_to_zero: Default::default(),
9567                service_group: Default::default(),
9568                start_count: Default::default(),
9569                started_at: Default::default(),
9570                state: Default::default(),
9571                status: Default::default(),
9572                stop_code: Default::default(),
9573                stop_reason: Default::default(),
9574                stopped_at: Default::default(),
9575                tags: Default::default(),
9576                uptime_ms: Default::default(),
9577                uuid: Default::default(),
9578                vcpus: Default::default(),
9579                vmm_load_time_us: Default::default(),
9580                vmm_ready_time_us: Default::default(),
9581                vmm_start_time_us: Default::default(),
9582                volumes: Default::default(),
9583            }
9584        }
9585    }
9586
9587    ///`InstanceCreateArgsInstanceCreateRequestRoms`
9588    ///
9589    /// <details><summary>JSON schema</summary>
9590    ///
9591    /// ```json
9592    ///{
9593    ///  "type": "object",
9594    ///  "required": [
9595    ///    "image"
9596    ///  ],
9597    ///  "properties": {
9598    ///    "image": {
9599    ///      "description": "The image of the ROM to use for the autoscale
9600    /// configuration.",
9601    ///      "type": "string"
9602    ///    },
9603    ///    "name": {
9604    ///      "description": "The name of the ROM to use for the autoscale
9605    /// configuration.",
9606    ///      "type": "string"
9607    ///    }
9608    ///  }
9609    ///}
9610    /// ```
9611    /// </details>
9612    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9613    pub struct InstanceCreateArgsInstanceCreateRequestRoms {
9614        ///The image of the ROM to use for the autoscale configuration.
9615        pub image: ::std::string::String,
9616        ///The name of the ROM to use for the autoscale configuration.
9617        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9618        pub name: ::std::option::Option<::std::string::String>,
9619    }
9620
9621    impl ::std::convert::From<&InstanceCreateArgsInstanceCreateRequestRoms>
9622        for InstanceCreateArgsInstanceCreateRequestRoms
9623    {
9624        fn from(value: &InstanceCreateArgsInstanceCreateRequestRoms) -> Self {
9625            value.clone()
9626        }
9627    }
9628
9629    ///The service group configuration for the instance.
9630    ///
9631    ///This is a reference to the service group that the instance is part of.
9632    /// The service group defines the services (e.g. ports, connection
9633    /// handling) that the instance exposes and how they are configured.
9634    ///
9635    /// <details><summary>JSON schema</summary>
9636    ///
9637    /// ```json
9638    ///{
9639    ///  "description": "The service group configuration for the
9640    /// instance.\n\nThis is a reference to the service group that the instance
9641    /// is part of.  The\nservice group defines the services (e.g. ports,
9642    /// connection handling) that\nthe instance exposes and how they are
9643    /// configured.",
9644    ///  "type": "object",
9645    ///  "properties": {
9646    ///    "domains": {
9647    ///      "description": "The domain configuration for the service group.",
9648    ///      "type": "array",
9649    ///      "items": {
9650    ///        "$ref": "#/components/schemas/InstanceServiceGroupInstanceDomain"
9651    ///      }
9652    ///    },
9653    ///    "name": {
9654    ///      "description": "The name of the service group.\n\nThis is a
9655    /// human-readable name that can be used to identify the service\ngroup.
9656    /// The name is unique within the context of your account.  The name\ncan
9657    /// also be used to identify the service group in API calls.",
9658    ///      "examples": [
9659    ///        "funky-service-g756b5d"
9660    ///      ],
9661    ///      "type": "string"
9662    ///    },
9663    ///    "uuid": {
9664    ///      "description": "The UUID of the service group.\n\nThis is a unique
9665    /// identifier for the service group that is generated when\nthe service is
9666    /// created.  The UUID is used to reference the service group\nin API calls
9667    /// and can be used to identify the service in all API calls\nthat require
9668    /// an service identifier.",
9669    ///      "examples": [
9670    ///        "123e4567-e89b-12d3-a456-426614174000"
9671    ///      ],
9672    ///      "type": "string",
9673    ///      "format": "uuid"
9674    ///    }
9675    ///  }
9676    ///}
9677    /// ```
9678    /// </details>
9679    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9680    pub struct InstanceInstanceServiceGroup {
9681        ///The domain configuration for the service group.
9682        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
9683        pub domains: ::std::vec::Vec<InstanceServiceGroupInstanceDomain>,
9684        ///The name of the service group.
9685        ///
9686        ///This is a human-readable name that can be used to identify the
9687        /// service group.  The name is unique within the context of
9688        /// your account.  The name can also be used to identify the
9689        /// service group in API calls.
9690        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9691        pub name: ::std::option::Option<::std::string::String>,
9692        ///The UUID of the service group.
9693        ///
9694        ///This is a unique identifier for the service group that is generated
9695        /// when the service is created.  The UUID is used to reference
9696        /// the service group in API calls and can be used to identify
9697        /// the service in all API calls that require an service
9698        /// identifier.
9699        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9700        pub uuid: ::std::option::Option<::uuid::Uuid>,
9701    }
9702
9703    impl ::std::convert::From<&InstanceInstanceServiceGroup> for InstanceInstanceServiceGroup {
9704        fn from(value: &InstanceInstanceServiceGroup) -> Self {
9705            value.clone()
9706        }
9707    }
9708
9709    impl ::std::default::Default for InstanceInstanceServiceGroup {
9710        fn default() -> Self {
9711            Self {
9712                domains: Default::default(),
9713                name: Default::default(),
9714                uuid: Default::default(),
9715            }
9716        }
9717    }
9718
9719    ///A volume defines a storage which can be attached to the instance.
9720    ///
9721    ///Volumes can be used to store persistent data which should remain
9722    /// available even if the instance is stopped or restarted.
9723    ///
9724    /// <details><summary>JSON schema</summary>
9725    ///
9726    /// ```json
9727    ///{
9728    ///  "description": "A volume defines a storage which can be attached to the
9729    /// instance.\n\nVolumes can be used to store persistent data which should
9730    /// remain available\neven if the instance is stopped or restarted.",
9731    ///  "type": "object",
9732    ///  "properties": {
9733    ///    "at": {
9734    ///      "description": "The mount point of the volume in the instance.
9735    /// This is the directory in\nthe instance where the volume will be
9736    /// mounted.",
9737    ///      "examples": [
9738    ///        "/mnt/funky-volume"
9739    ///      ],
9740    ///      "type": "string"
9741    ///    },
9742    ///    "name": {
9743    ///      "description": "The name of the volume.\n\nThis is a human-readable
9744    /// name that can be used to identify the volume.\nThe name must be unique
9745    /// within the context of your account.  The name can\nalso be used to
9746    /// identify the volume in API calls.",
9747    ///      "examples": [
9748    ///        "funky-volume-g756b5d"
9749    ///      ],
9750    ///      "type": "string"
9751    ///    },
9752    ///    "read_only": {
9753    ///      "description": "Whether the volume is read-only or not.",
9754    ///      "examples": [
9755    ///        true
9756    ///      ],
9757    ///      "type": "boolean"
9758    ///    },
9759    ///    "uuid": {
9760    ///      "description": "The UUID of the volume.\n\nThis is a unique
9761    /// identifier for the volume that is generated when the\nvolume is created.
9762    /// The UUID is used to reference the volume in API calls\nand can be used
9763    /// to identify the volume in all API calls that require a\nvolume
9764    /// identifier.",
9765    ///      "examples": [
9766    ///        "123e4567-e89b-12d3-a456-426614174000"
9767    ///      ],
9768    ///      "type": "string",
9769    ///      "format": "uuid"
9770    ///    }
9771    ///  }
9772    ///}
9773    /// ```
9774    /// </details>
9775    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9776    pub struct InstanceInstanceVolume {
9777        ///The mount point of the volume in the instance.  This is the
9778        /// directory in the instance where the volume will be mounted.
9779        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9780        pub at: ::std::option::Option<::std::string::String>,
9781        ///The name of the volume.
9782        ///
9783        ///This is a human-readable name that can be used to identify the
9784        /// volume. The name must be unique within the context of your
9785        /// account.  The name can also be used to identify the volume
9786        /// in API calls.
9787        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9788        pub name: ::std::option::Option<::std::string::String>,
9789        ///Whether the volume is read-only or not.
9790        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9791        pub read_only: ::std::option::Option<bool>,
9792        ///The UUID of the volume.
9793        ///
9794        ///This is a unique identifier for the volume that is generated when
9795        /// the volume is created.  The UUID is used to reference the
9796        /// volume in API calls and can be used to identify the volume
9797        /// in all API calls that require a volume identifier.
9798        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9799        pub uuid: ::std::option::Option<::uuid::Uuid>,
9800    }
9801
9802    impl ::std::convert::From<&InstanceInstanceVolume> for InstanceInstanceVolume {
9803        fn from(value: &InstanceInstanceVolume) -> Self {
9804            value.clone()
9805        }
9806    }
9807
9808    impl ::std::default::Default for InstanceInstanceVolume {
9809        fn default() -> Self {
9810            Self {
9811                at: Default::default(),
9812                name: Default::default(),
9813                read_only: Default::default(),
9814                uuid: Default::default(),
9815            }
9816        }
9817    }
9818
9819    ///An instance network interface.
9820    ///
9821    /// <details><summary>JSON schema</summary>
9822    ///
9823    /// ```json
9824    ///{
9825    ///  "description": "An instance network interface.",
9826    ///  "type": "object",
9827    ///  "properties": {
9828    ///    "mac": {
9829    ///      "description": "The MAC address of the network interface.",
9830    ///      "examples": [
9831    ///        "12:b0:a0:00:00:3d"
9832    ///      ],
9833    ///      "type": "string"
9834    ///    },
9835    ///    "private_ip": {
9836    ///      "description": "The private IP address of the network interface.
9837    /// This is the internal IP\naddress that is used for communication between
9838    /// instances within the same\nnetwork.",
9839    ///      "examples": [
9840    ///        "10.0.0.61"
9841    ///      ],
9842    ///      "type": "string"
9843    ///    },
9844    ///    "rx_bytes": {
9845    ///      "description": "Amount of bytes received from interface.",
9846    ///      "examples": [
9847    ///        5345
9848    ///      ],
9849    ///      "type": "integer",
9850    ///      "format": "uint64"
9851    ///    },
9852    ///    "rx_packets": {
9853    ///      "description": "Count of packets received from interface",
9854    ///      "examples": [
9855    ///        110
9856    ///      ],
9857    ///      "type": "integer",
9858    ///      "format": "uint64"
9859    ///    },
9860    ///    "tx_bytes": {
9861    ///      "description": "Amount of bytes sent to interface.",
9862    ///      "examples": [
9863    ///        1500
9864    ///      ],
9865    ///      "type": "integer",
9866    ///      "format": "uint64"
9867    ///    },
9868    ///    "tx_packets": {
9869    ///      "description": "Count of packets sent to interface",
9870    ///      "examples": [
9871    ///        12
9872    ///      ],
9873    ///      "type": "integer",
9874    ///      "format": "uint64"
9875    ///    },
9876    ///    "uuid": {
9877    ///      "description": "The UUID of the network interface. This is a unique
9878    /// identifier for the\nnetwork interface that is generated when the
9879    /// instance is created.",
9880    ///      "examples": [
9881    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
9882    ///      ],
9883    ///      "type": "string",
9884    ///      "format": "uuid"
9885    ///    }
9886    ///  }
9887    ///}
9888    /// ```
9889    /// </details>
9890    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
9891    pub struct InstanceNetworkInterface {
9892        ///The MAC address of the network interface.
9893        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9894        pub mac: ::std::option::Option<::std::string::String>,
9895        ///The private IP address of the network interface. This is the
9896        /// internal IP address that is used for communication between
9897        /// instances within the same network.
9898        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9899        pub private_ip: ::std::option::Option<::std::string::String>,
9900        ///Amount of bytes received from interface.
9901        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9902        pub rx_bytes: ::std::option::Option<u64>,
9903        ///Count of packets received from interface
9904        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9905        pub rx_packets: ::std::option::Option<u64>,
9906        ///Amount of bytes sent to interface.
9907        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9908        pub tx_bytes: ::std::option::Option<u64>,
9909        ///Count of packets sent to interface
9910        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9911        pub tx_packets: ::std::option::Option<u64>,
9912        ///The UUID of the network interface. This is a unique identifier for
9913        /// the network interface that is generated when the instance is
9914        /// created.
9915        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
9916        pub uuid: ::std::option::Option<::uuid::Uuid>,
9917    }
9918
9919    impl ::std::convert::From<&InstanceNetworkInterface> for InstanceNetworkInterface {
9920        fn from(value: &InstanceNetworkInterface) -> Self {
9921            value.clone()
9922        }
9923    }
9924
9925    impl ::std::default::Default for InstanceNetworkInterface {
9926        fn default() -> Self {
9927            Self {
9928                mac: Default::default(),
9929                private_ip: Default::default(),
9930                rx_bytes: Default::default(),
9931                rx_packets: Default::default(),
9932                tx_bytes: Default::default(),
9933                tx_packets: Default::default(),
9934                uuid: Default::default(),
9935            }
9936        }
9937    }
9938
9939    ///The restart configuration for the instance.
9940    ///
9941    ///When an instance stops either because the application exits or the
9942    /// instance crashes, Unikraft Cloud can auto-restart your instance.
9943    /// Auto-restarts are performed according to the restart policy
9944    /// configured for a particular instance.
9945    ///
9946    ///The policy can have the following values:
9947    ///
9948    ///| Policy       | Description |
9949    ///|--------------|-------------|
9950    ///| `never`      | Never restart the instance (default). |
9951    ///| `always`     | Always restart the instance when the stop is initiated from within the instance (i.e., the application exits or the instance crashes). |
9952    ///| `on-failure` | Only restart the instance if it crashes. |
9953    ///
9954    ///When an instance stops, the stop reason and the configured restart
9955    /// policy are evaluated to decide if a restart should be performed.
9956    /// Unikraft Cloud uses an exponential back-off delay (immediate, 5s,
9957    /// 10s, 20s, 40s, ..., 5m) to slow down restarts in tight crash loops.
9958    /// If an instance runs without problems for 10s the back-off delay is
9959    /// reset and the restart sequence ends.
9960    ///
9961    ///The `restart.attempt` attribute reported in counts the number of
9962    /// restarts performed in the current sequence.  The `restart.next_at`
9963    /// field indicates when the next restart will take place if a back-off
9964    /// delay is in effect.
9965    ///
9966    ///A manual start or stop of the instance aborts the restart sequence and
9967    ///resets the back-off delay.
9968    ///
9969    /// <details><summary>JSON schema</summary>
9970    ///
9971    /// ```json
9972    ///{
9973    ///  "description": "The restart configuration for the instance.\n\nWhen an
9974    /// instance stops either because the application exits or the
9975    /// instance\ncrashes, Unikraft Cloud can auto-restart your instance.
9976    /// Auto-restarts are\nperformed according to the restart policy configured
9977    /// for a particular\ninstance.\n\nThe policy can have the following
9978    /// values:\n\n| Policy       | Description
9979    /// |\n|--------------|-------------|\n| `never`      | Never restart the
9980    /// instance (default). |\n| `always`     | Always restart the instance when
9981    /// the stop is initiated from within the instance (i.e., the application
9982    /// exits or the instance crashes). |\n| `on-failure` | Only restart the
9983    /// instance if it crashes. |\n\nWhen an instance stops, the stop reason and
9984    /// the configured restart policy\nare evaluated to decide if a restart
9985    /// should be performed.  Unikraft Cloud\nuses an exponential back-off delay
9986    /// (immediate, 5s, 10s, 20s, 40s, ..., 5m)\nto slow down restarts in tight
9987    /// crash loops.  If an instance runs without\nproblems for 10s the back-off
9988    /// delay is reset and the restart sequence ends.\n\nThe `restart.attempt`
9989    /// attribute reported in counts the number of restarts\nperformed in the
9990    /// current sequence.  The `restart.next_at` field indicates\nwhen the next
9991    /// restart will take place if a back-off delay is in effect.\n\nA manual
9992    /// start or stop of the instance aborts the restart sequence and\nresets
9993    /// the back-off delay.",
9994    ///  "type": "string",
9995    ///  "format": "enum",
9996    ///  "enum": [
9997    ///    "never",
9998    ///    "always",
9999    ///    "on_failure"
10000    ///  ]
10001    ///}
10002    /// ```
10003    /// </details>
10004    #[derive(
10005        :: serde :: Deserialize,
10006        :: serde :: Serialize,
10007        Clone,
10008        Copy,
10009        Debug,
10010        Eq,
10011        Hash,
10012        Ord,
10013        PartialEq,
10014        PartialOrd,
10015    )]
10016    pub enum InstanceRestartPolicy {
10017        #[serde(rename = "never")]
10018        Never,
10019        #[serde(rename = "always")]
10020        Always,
10021        #[serde(rename = "on_failure")]
10022        OnFailure,
10023    }
10024
10025    impl ::std::convert::From<&Self> for InstanceRestartPolicy {
10026        fn from(value: &InstanceRestartPolicy) -> Self {
10027            value.clone()
10028        }
10029    }
10030
10031    impl ::std::fmt::Display for InstanceRestartPolicy {
10032        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10033            match *self {
10034                Self::Never => write!(f, "never"),
10035                Self::Always => write!(f, "always"),
10036                Self::OnFailure => write!(f, "on_failure"),
10037            }
10038        }
10039    }
10040
10041    impl ::std::str::FromStr for InstanceRestartPolicy {
10042        type Err = self::error::ConversionError;
10043        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10044            match value {
10045                "never" => Ok(Self::Never),
10046                "always" => Ok(Self::Always),
10047                "on_failure" => Ok(Self::OnFailure),
10048                _ => Err("invalid value".into()),
10049            }
10050        }
10051    }
10052
10053    impl ::std::convert::TryFrom<&str> for InstanceRestartPolicy {
10054        type Error = self::error::ConversionError;
10055        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10056            value.parse()
10057        }
10058    }
10059
10060    impl ::std::convert::TryFrom<&::std::string::String> for InstanceRestartPolicy {
10061        type Error = self::error::ConversionError;
10062        fn try_from(
10063            value: &::std::string::String,
10064        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10065            value.parse()
10066        }
10067    }
10068
10069    impl ::std::convert::TryFrom<::std::string::String> for InstanceRestartPolicy {
10070        type Error = self::error::ConversionError;
10071        fn try_from(
10072            value: ::std::string::String,
10073        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10074            value.parse()
10075        }
10076    }
10077
10078    ///Scale-to-zero defines the configuration for scaling the instance to
10079    /// zero. When an instance is scaled-to-zero it can be either stopped
10080    /// (and fully shutdown) or paused wherein the state of the instance is
10081    /// preserved (e.g., RAM contents) and the instance can be resumed later
10082    /// without losing its state, i.e. "stateful".
10083    ///
10084    /// <details><summary>JSON schema</summary>
10085    ///
10086    /// ```json
10087    ///{
10088    ///  "description": "Scale-to-zero defines the configuration for scaling the
10089    /// instance to zero.\nWhen an instance is scaled-to-zero it can be either
10090    /// stopped (and fully\nshutdown) or paused wherein the state of the
10091    /// instance is preserved (e.g., RAM\ncontents) and the instance can be
10092    /// resumed later without losing its state,\ni.e. \"stateful\".",
10093    ///  "type": "object",
10094    ///  "properties": {
10095    ///    "cooldown_time_ms": {
10096    ///      "description": "The cooldown time in milliseconds before the
10097    /// instance can be scaled to\nzero again.  This is useful to prevent rapid
10098    /// scaling to zero and back up,\nwhich can lead to performance issues or
10099    /// resource exhaustion.",
10100    ///      "examples": [
10101    ///        3000
10102    ///      ],
10103    ///      "type": "integer",
10104    ///      "format": "int32"
10105    ///    },
10106    ///    "enabled": {
10107    ///      "description": "Indicates whether scale-to-zero is enabled for the
10108    /// instance.",
10109    ///      "examples": [
10110    ///        true
10111    ///      ],
10112    ///      "type": "boolean"
10113    ///    },
10114    ///    "policy": {
10115    ///      "description": "The specific policy to use for scaling the instance
10116    /// to zero.",
10117    ///      "type": "string",
10118    ///      "format": "enum",
10119    ///      "enum": [
10120    ///        "on",
10121    ///        "off",
10122    ///        "idle"
10123    ///      ]
10124    ///    },
10125    ///    "stateful": {
10126    ///      "description": "Whether the instance should be stateful when scaled
10127    /// to zero. If set to\ntrue, the instance will retain its state (e.g., RAM
10128    /// contents) when scaled\nto zero.  This is useful for instances that need
10129    /// to maintain their state\nacross scale-to-zero operations.  If set to
10130    /// false, the instance will lose\nits state when scaled to zero, and it
10131    /// will be restarted from scratch when\nscaled back up.",
10132    ///      "examples": [
10133    ///        true
10134    ///      ],
10135    ///      "type": "boolean"
10136    ///    }
10137    ///  }
10138    ///}
10139    /// ```
10140    /// </details>
10141    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10142    pub struct InstanceScaleToZero {
10143        ///The cooldown time in milliseconds before the instance can be scaled
10144        /// to zero again.  This is useful to prevent rapid scaling to
10145        /// zero and back up, which can lead to performance issues or
10146        /// resource exhaustion.
10147        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10148        pub cooldown_time_ms: ::std::option::Option<i32>,
10149        ///Indicates whether scale-to-zero is enabled for the instance.
10150        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10151        pub enabled: ::std::option::Option<bool>,
10152        ///The specific policy to use for scaling the instance to zero.
10153        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10154        pub policy: ::std::option::Option<InstanceScaleToZeroPolicy>,
10155        ///Whether the instance should be stateful when scaled to zero. If set
10156        /// to true, the instance will retain its state (e.g., RAM
10157        /// contents) when scaled to zero.  This is useful for instances
10158        /// that need to maintain their state across scale-to-zero
10159        /// operations.  If set to false, the instance will lose
10160        /// its state when scaled to zero, and it will be restarted from scratch
10161        /// when scaled back up.
10162        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10163        pub stateful: ::std::option::Option<bool>,
10164    }
10165
10166    impl ::std::convert::From<&InstanceScaleToZero> for InstanceScaleToZero {
10167        fn from(value: &InstanceScaleToZero) -> Self {
10168            value.clone()
10169        }
10170    }
10171
10172    impl ::std::default::Default for InstanceScaleToZero {
10173        fn default() -> Self {
10174            Self {
10175                cooldown_time_ms: Default::default(),
10176                enabled: Default::default(),
10177                policy: Default::default(),
10178                stateful: Default::default(),
10179            }
10180        }
10181    }
10182
10183    ///The specific policy to use for scaling the instance to zero.
10184    ///
10185    /// <details><summary>JSON schema</summary>
10186    ///
10187    /// ```json
10188    ///{
10189    ///  "description": "The specific policy to use for scaling the instance to
10190    /// zero.",
10191    ///  "type": "string",
10192    ///  "format": "enum",
10193    ///  "enum": [
10194    ///    "on",
10195    ///    "off",
10196    ///    "idle"
10197    ///  ]
10198    ///}
10199    /// ```
10200    /// </details>
10201    #[derive(
10202        :: serde :: Deserialize,
10203        :: serde :: Serialize,
10204        Clone,
10205        Copy,
10206        Debug,
10207        Eq,
10208        Hash,
10209        Ord,
10210        PartialEq,
10211        PartialOrd,
10212    )]
10213    pub enum InstanceScaleToZeroPolicy {
10214        #[serde(rename = "on")]
10215        On,
10216        #[serde(rename = "off")]
10217        Off,
10218        #[serde(rename = "idle")]
10219        Idle,
10220    }
10221
10222    impl ::std::convert::From<&Self> for InstanceScaleToZeroPolicy {
10223        fn from(value: &InstanceScaleToZeroPolicy) -> Self {
10224            value.clone()
10225        }
10226    }
10227
10228    impl ::std::fmt::Display for InstanceScaleToZeroPolicy {
10229        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10230            match *self {
10231                Self::On => write!(f, "on"),
10232                Self::Off => write!(f, "off"),
10233                Self::Idle => write!(f, "idle"),
10234            }
10235        }
10236    }
10237
10238    impl ::std::str::FromStr for InstanceScaleToZeroPolicy {
10239        type Err = self::error::ConversionError;
10240        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10241            match value {
10242                "on" => Ok(Self::On),
10243                "off" => Ok(Self::Off),
10244                "idle" => Ok(Self::Idle),
10245                _ => Err("invalid value".into()),
10246            }
10247        }
10248    }
10249
10250    impl ::std::convert::TryFrom<&str> for InstanceScaleToZeroPolicy {
10251        type Error = self::error::ConversionError;
10252        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10253            value.parse()
10254        }
10255    }
10256
10257    impl ::std::convert::TryFrom<&::std::string::String> for InstanceScaleToZeroPolicy {
10258        type Error = self::error::ConversionError;
10259        fn try_from(
10260            value: &::std::string::String,
10261        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10262            value.parse()
10263        }
10264    }
10265
10266    impl ::std::convert::TryFrom<::std::string::String> for InstanceScaleToZeroPolicy {
10267        type Error = self::error::ConversionError;
10268        fn try_from(
10269            value: ::std::string::String,
10270        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10271            value.parse()
10272        }
10273    }
10274
10275    ///The domain configuration for the service group.
10276    ///
10277    ///Domain names are completely specified with all labels in the hierarchy
10278    /// of the DNS, having no parts omitted.  The domain can be associated
10279    /// with an existing certificate by specifying the certificate's name or
10280    /// UUID.  If no certificate is specified and a FQDN is provided,
10281    /// Unikraft Cloud will automatically generate a new certificate for the
10282    /// domain based on Let's Encrypt and seek to accomplish a DNS-01
10283    /// challenge.
10284    ///
10285    /// <details><summary>JSON schema</summary>
10286    ///
10287    /// ```json
10288    ///{
10289    ///  "description": "The domain configuration for the service
10290    /// group.\n\nDomain names are completely specified with all labels in the
10291    /// hierarchy of\nthe DNS, having no parts omitted.  The domain can be
10292    /// associated with an\nexisting certificate by specifying the certificate's
10293    /// name or UUID.  If no\ncertificate is specified and a FQDN is provided,
10294    /// Unikraft Cloud will\nautomatically generate a new certificate for the
10295    /// domain based on Let's\nEncrypt and seek to accomplish a DNS-01
10296    /// challenge.",
10297    ///  "type": "object",
10298    ///  "allOf": [
10299    ///    {
10300    ///      "type": "object",
10301    ///      "properties": {
10302    ///        "fqdn": {
10303    ///          "description": "Publicly accessible domain name.\n\nIf this
10304    /// name ends in a period `.` it must be a valid Full Qualified\nDomain Name
10305    /// (FQDN), otherwise it will become a subdomain of the target\nmetro.",
10306    ///          "examples": [
10307    ///            "funky-town-g756b5d.fra0.unikraft.app."
10308    ///          ],
10309    ///          "type": "string"
10310    ///        }
10311    ///      }
10312    ///    },
10313    ///    {
10314    ///      "oneOf": [
10315    ///        {
10316    ///          "title": "certificate",
10317    ///          "type": "object",
10318    ///          "properties": {
10319    ///            "certificate": {
10320    ///              "description": "The certificate associated with the
10321    /// domain.\n\nThe certificate is used to secure the domain with TLS/SSL.
10322    /// If no\ncertificate is specified, Unikraft Cloud will automatically
10323    /// generate a\nnew certificate for the domain based on Let's Encrypt and
10324    /// seek to\naccomplish a DNS-01 challenge.",
10325    ///              "allOf": [
10326    ///                {
10327    ///                  "$ref": "#/components/schemas/NameOrUUID"
10328    ///                }
10329    ///              ]
10330    ///            }
10331    ///          }
10332    ///        }
10333    ///      ]
10334    ///    }
10335    ///  ]
10336    ///}
10337    /// ```
10338    /// </details>
10339    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10340    pub struct InstanceServiceGroupInstanceDomain {
10341        ///The certificate associated with the domain.
10342        ///
10343        ///The certificate is used to secure the domain with TLS/SSL.  If no
10344        ///certificate is specified, Unikraft Cloud will automatically generate
10345        /// a new certificate for the domain based on Let's Encrypt and
10346        /// seek to accomplish a DNS-01 challenge.
10347        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10348        pub certificate: ::std::option::Option<NameOrUuid>,
10349        ///Publicly accessible domain name.
10350        ///
10351        ///If this name ends in a period `.` it must be a valid Full Qualified
10352        ///Domain Name (FQDN), otherwise it will become a subdomain of the
10353        /// target metro.
10354        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10355        pub fqdn: ::std::option::Option<::std::string::String>,
10356    }
10357
10358    impl ::std::convert::From<&InstanceServiceGroupInstanceDomain>
10359        for InstanceServiceGroupInstanceDomain
10360    {
10361        fn from(value: &InstanceServiceGroupInstanceDomain) -> Self {
10362            value.clone()
10363        }
10364    }
10365
10366    impl ::std::default::Default for InstanceServiceGroupInstanceDomain {
10367        fn default() -> Self {
10368            Self {
10369                certificate: Default::default(),
10370                fqdn: Default::default(),
10371            }
10372        }
10373    }
10374
10375    ///The state of the instance.  This indicates the current state of the
10376    ///instance, such as whether it is running, stopped, or in an error state.
10377    ///
10378    /// <details><summary>JSON schema</summary>
10379    ///
10380    /// ```json
10381    ///{
10382    ///  "description": "The state of the instance.  This indicates the current
10383    /// state of the\ninstance, such as whether it is running, stopped, or in an
10384    /// error state.",
10385    ///  "type": "string",
10386    ///  "format": "enum",
10387    ///  "enum": [
10388    ///    "stopped",
10389    ///    "starting",
10390    ///    "running",
10391    ///    "draining",
10392    ///    "stopping",
10393    ///    "standby"
10394    ///  ]
10395    ///}
10396    /// ```
10397    /// </details>
10398    #[derive(
10399        :: serde :: Deserialize,
10400        :: serde :: Serialize,
10401        Clone,
10402        Copy,
10403        Debug,
10404        Eq,
10405        Hash,
10406        Ord,
10407        PartialEq,
10408        PartialOrd,
10409    )]
10410    pub enum InstanceState {
10411        #[serde(rename = "stopped")]
10412        Stopped,
10413        #[serde(rename = "starting")]
10414        Starting,
10415        #[serde(rename = "running")]
10416        Running,
10417        #[serde(rename = "draining")]
10418        Draining,
10419        #[serde(rename = "stopping")]
10420        Stopping,
10421        #[serde(rename = "standby")]
10422        Standby,
10423    }
10424
10425    impl ::std::convert::From<&Self> for InstanceState {
10426        fn from(value: &InstanceState) -> Self {
10427            value.clone()
10428        }
10429    }
10430
10431    impl ::std::fmt::Display for InstanceState {
10432        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
10433            match *self {
10434                Self::Stopped => write!(f, "stopped"),
10435                Self::Starting => write!(f, "starting"),
10436                Self::Running => write!(f, "running"),
10437                Self::Draining => write!(f, "draining"),
10438                Self::Stopping => write!(f, "stopping"),
10439                Self::Standby => write!(f, "standby"),
10440            }
10441        }
10442    }
10443
10444    impl ::std::str::FromStr for InstanceState {
10445        type Err = self::error::ConversionError;
10446        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10447            match value {
10448                "stopped" => Ok(Self::Stopped),
10449                "starting" => Ok(Self::Starting),
10450                "running" => Ok(Self::Running),
10451                "draining" => Ok(Self::Draining),
10452                "stopping" => Ok(Self::Stopping),
10453                "standby" => Ok(Self::Standby),
10454                _ => Err("invalid value".into()),
10455            }
10456        }
10457    }
10458
10459    impl ::std::convert::TryFrom<&str> for InstanceState {
10460        type Error = self::error::ConversionError;
10461        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
10462            value.parse()
10463        }
10464    }
10465
10466    impl ::std::convert::TryFrom<&::std::string::String> for InstanceState {
10467        type Error = self::error::ConversionError;
10468        fn try_from(
10469            value: &::std::string::String,
10470        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10471            value.parse()
10472        }
10473    }
10474
10475    impl ::std::convert::TryFrom<::std::string::String> for InstanceState {
10476        type Error = self::error::ConversionError;
10477        fn try_from(
10478            value: ::std::string::String,
10479        ) -> ::std::result::Result<Self, self::error::ConversionError> {
10480            value.parse()
10481        }
10482    }
10483
10484    ///`NameOrUuid`
10485    ///
10486    /// <details><summary>JSON schema</summary>
10487    ///
10488    /// ```json
10489    ///{
10490    ///  "oneOf": [
10491    ///    {
10492    ///      "title": "uuid",
10493    ///      "type": "object",
10494    ///      "required": [
10495    ///        "uuid"
10496    ///      ],
10497    ///      "properties": {
10498    ///        "uuid": {
10499    ///          "description": "Mutually exclusive with name.",
10500    ///          "examples": [
10501    ///            "123e4567-e89b-12d3-a456-426614174000"
10502    ///          ],
10503    ///          "type": "string",
10504    ///          "format": "uuid"
10505    ///        }
10506    ///      }
10507    ///    },
10508    ///    {
10509    ///      "title": "name",
10510    ///      "type": "object",
10511    ///      "required": [
10512    ///        "name"
10513    ///      ],
10514    ///      "properties": {
10515    ///        "name": {
10516    ///          "description": "Mutually exclusive with UUID.",
10517    ///          "examples": [
10518    ///            "funky-town-g756b5d"
10519    ///          ],
10520    ///          "type": "string"
10521    ///        }
10522    ///      }
10523    ///    }
10524    ///  ]
10525    ///}
10526    /// ```
10527    /// </details>
10528    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10529    pub enum NameOrUuid {
10530        #[serde(rename = "uuid")]
10531        Uuid(::uuid::Uuid),
10532        #[serde(rename = "name")]
10533        Name(::std::string::String),
10534    }
10535
10536    impl ::std::convert::From<&Self> for NameOrUuid {
10537        fn from(value: &NameOrUuid) -> Self {
10538            value.clone()
10539        }
10540    }
10541
10542    impl ::std::convert::From<::uuid::Uuid> for NameOrUuid {
10543        fn from(value: ::uuid::Uuid) -> Self {
10544            Self::Uuid(value)
10545        }
10546    }
10547
10548    ///An object is a single component of an image which is external and can be
10549    ///uniquely identified by its digest.
10550    ///
10551    /// <details><summary>JSON schema</summary>
10552    ///
10553    /// ```json
10554    ///{
10555    ///  "description": "An object is a single component of an image which is
10556    /// external and can be\nuniquely identified by its digest.",
10557    ///  "type": "object",
10558    ///  "properties": {
10559    ///    "digest": {
10560    ///      "description": "The digest is a string representation including the
10561    /// hashing\nalgorithm and the hash value separated by a colon.",
10562    ///      "examples": [
10563    ///        "sha256:
10564    /// 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
10565    ///      ],
10566    ///      "type": "string"
10567    ///    },
10568    ///    "media_type": {
10569    ///      "description": "The media type of the layer is a string that
10570    /// identifies the type of\ncontent that the layer contains.",
10571    ///      "examples": [
10572    ///        "application/vnd.oci.image.layer.v1.tar"
10573    ///      ],
10574    ///      "type": "string"
10575    ///    },
10576    ///    "size": {
10577    ///      "description": "The size of the layer in bytes.",
10578    ///      "examples": [
10579    ///        655
10580    ///      ],
10581    ///      "type": "integer",
10582    ///      "format": "int64"
10583    ///    }
10584    ///  }
10585    ///}
10586    /// ```
10587    /// </details>
10588    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10589    pub struct Object {
10590        ///The digest is a string representation including the hashing
10591        ///algorithm and the hash value separated by a colon.
10592        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10593        pub digest: ::std::option::Option<::std::string::String>,
10594        ///The media type of the layer is a string that identifies the type of
10595        ///content that the layer contains.
10596        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10597        pub media_type: ::std::option::Option<::std::string::String>,
10598        ///The size of the layer in bytes.
10599        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10600        pub size: ::std::option::Option<i64>,
10601    }
10602
10603    impl ::std::convert::From<&Object> for Object {
10604        fn from(value: &Object) -> Self {
10605            value.clone()
10606        }
10607    }
10608
10609    impl ::std::default::Default for Object {
10610        fn default() -> Self {
10611            Self {
10612                digest: Default::default(),
10613                media_type: Default::default(),
10614                size: Default::default(),
10615            }
10616        }
10617    }
10618
10619    ///`Quotas`
10620    ///
10621    /// <details><summary>JSON schema</summary>
10622    ///
10623    /// ```json
10624    ///{
10625    ///  "type": "object",
10626    ///  "properties": {
10627    ///    "error": {
10628    ///      "description": "An optional error code providing additional
10629    /// information about the status.\nThis field is only set when this message
10630    /// object is used as a response\nmessage, and is useful when the status is
10631    /// not `success`.",
10632    ///      "examples": [
10633    ///        8
10634    ///      ],
10635    ///      "type": "integer",
10636    ///      "format": "int32"
10637    ///    },
10638    ///    "hard": {
10639    ///      "description": "Configured quota limits",
10640    ///      "allOf": [
10641    ///        {
10642    ///          "$ref": "#/components/schemas/QuotasStats"
10643    ///        }
10644    ///      ]
10645    ///    },
10646    ///    "limits": {
10647    ///      "description": "Additional limits",
10648    ///      "allOf": [
10649    ///        {
10650    ///          "$ref": "#/components/schemas/QuotasLimits"
10651    ///        }
10652    ///      ]
10653    ///    },
10654    ///    "message": {
10655    ///      "description": "An optional message providing additional
10656    /// information about the status.\nThis field is only set when this message
10657    /// object is used as a response\nmessage, and is useful when the status is
10658    /// not `success`.",
10659    ///      "examples": [
10660    ///        "No user with name 'funky-user'"
10661    ///      ],
10662    ///      "type": "string"
10663    ///    },
10664    ///    "status": {
10665    ///      "description": "An optional field representing the status of the
10666    /// request.  This field is\nonly set when this message object is used as a
10667    /// response message.",
10668    ///      "allOf": [
10669    ///        {
10670    ///          "$ref": "#/components/schemas/ResponseStatus"
10671    ///        }
10672    ///      ]
10673    ///    },
10674    ///    "used": {
10675    ///      "description": "Used quota",
10676    ///      "allOf": [
10677    ///        {
10678    ///          "$ref": "#/components/schemas/QuotasStats"
10679    ///        }
10680    ///      ]
10681    ///    },
10682    ///    "uuid": {
10683    ///      "description": "The UUID of the quota.",
10684    ///      "examples": [
10685    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
10686    ///      ],
10687    ///      "type": "string",
10688    ///      "format": "uuid"
10689    ///    }
10690    ///  }
10691    ///}
10692    /// ```
10693    /// </details>
10694    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10695    pub struct Quotas {
10696        ///An optional error code providing additional information about the
10697        /// status. This field is only set when this message object is
10698        /// used as a response message, and is useful when the status is
10699        /// not `success`.
10700        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10701        pub error: ::std::option::Option<i32>,
10702        ///Configured quota limits
10703        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10704        pub hard: ::std::option::Option<QuotasStats>,
10705        ///Additional limits
10706        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10707        pub limits: ::std::option::Option<QuotasLimits>,
10708        ///An optional message providing additional information about the
10709        /// status. This field is only set when this message object is
10710        /// used as a response message, and is useful when the status is
10711        /// not `success`.
10712        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10713        pub message: ::std::option::Option<::std::string::String>,
10714        ///An optional field representing the status of the request.  This
10715        /// field is only set when this message object is used as a
10716        /// response message.
10717        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10718        pub status: ::std::option::Option<ResponseStatus>,
10719        ///Used quota
10720        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10721        pub used: ::std::option::Option<QuotasStats>,
10722        ///The UUID of the quota.
10723        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10724        pub uuid: ::std::option::Option<::uuid::Uuid>,
10725    }
10726
10727    impl ::std::convert::From<&Quotas> for Quotas {
10728        fn from(value: &Quotas) -> Self {
10729            value.clone()
10730        }
10731    }
10732
10733    impl ::std::default::Default for Quotas {
10734        fn default() -> Self {
10735            Self {
10736                error: Default::default(),
10737                hard: Default::default(),
10738                limits: Default::default(),
10739                message: Default::default(),
10740                status: Default::default(),
10741                used: Default::default(),
10742                uuid: Default::default(),
10743            }
10744        }
10745    }
10746
10747    ///`QuotasLimits`
10748    ///
10749    /// <details><summary>JSON schema</summary>
10750    ///
10751    /// ```json
10752    ///{
10753    ///  "type": "object",
10754    ///  "properties": {
10755    ///    "max_autoscale_size": {
10756    ///      "description": "Maximum size of an autoscale group",
10757    ///      "examples": [
10758    ///        16
10759    ///      ],
10760    ///      "type": "integer",
10761    ///      "format": "int64"
10762    ///    },
10763    ///    "max_memory_mb": {
10764    ///      "description": "Maximum amount of memory assigned to live instances
10765    /// in megabytes",
10766    ///      "examples": [
10767    ///        2048
10768    ///      ],
10769    ///      "type": "integer",
10770    ///      "format": "int64"
10771    ///    },
10772    ///    "max_vcpus": {
10773    ///      "description": "Maximum number of vCPUs",
10774    ///      "examples": [
10775    ///        4
10776    ///      ],
10777    ///      "type": "integer",
10778    ///      "format": "int64"
10779    ///    },
10780    ///    "max_volume_mb": {
10781    ///      "description": "Maximum size of a volume in megabytes",
10782    ///      "examples": [
10783    ///        1024
10784    ///      ],
10785    ///      "type": "integer",
10786    ///      "format": "int64"
10787    ///    },
10788    ///    "min_autoscale_size": {
10789    ///      "description": "Minimum size of an autoscale group",
10790    ///      "examples": [
10791    ///        1
10792    ///      ],
10793    ///      "type": "integer",
10794    ///      "format": "int64"
10795    ///    },
10796    ///    "min_memory_mb": {
10797    ///      "description": "Minimum amount of memory assigned to live instances
10798    /// in megabytes",
10799    ///      "examples": [
10800    ///        16
10801    ///      ],
10802    ///      "type": "integer",
10803    ///      "format": "int64"
10804    ///    },
10805    ///    "min_vcpus": {
10806    ///      "description": "Minimum number of vCPUs",
10807    ///      "examples": [
10808    ///        2
10809    ///      ],
10810    ///      "type": "integer",
10811    ///      "format": "int64"
10812    ///    },
10813    ///    "min_volume_mb": {
10814    ///      "description": "Minimum size of a volume in megabytes",
10815    ///      "examples": [
10816    ///        1
10817    ///      ],
10818    ///      "type": "integer",
10819    ///      "format": "int64"
10820    ///    }
10821    ///  }
10822    ///}
10823    /// ```
10824    /// </details>
10825    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10826    pub struct QuotasLimits {
10827        ///Maximum size of an autoscale group
10828        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10829        pub max_autoscale_size: ::std::option::Option<i64>,
10830        ///Maximum amount of memory assigned to live instances in megabytes
10831        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10832        pub max_memory_mb: ::std::option::Option<i64>,
10833        ///Maximum number of vCPUs
10834        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10835        pub max_vcpus: ::std::option::Option<i64>,
10836        ///Maximum size of a volume in megabytes
10837        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10838        pub max_volume_mb: ::std::option::Option<i64>,
10839        ///Minimum size of an autoscale group
10840        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10841        pub min_autoscale_size: ::std::option::Option<i64>,
10842        ///Minimum amount of memory assigned to live instances in megabytes
10843        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10844        pub min_memory_mb: ::std::option::Option<i64>,
10845        ///Minimum number of vCPUs
10846        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10847        pub min_vcpus: ::std::option::Option<i64>,
10848        ///Minimum size of a volume in megabytes
10849        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10850        pub min_volume_mb: ::std::option::Option<i64>,
10851    }
10852
10853    impl ::std::convert::From<&QuotasLimits> for QuotasLimits {
10854        fn from(value: &QuotasLimits) -> Self {
10855            value.clone()
10856        }
10857    }
10858
10859    impl ::std::default::Default for QuotasLimits {
10860        fn default() -> Self {
10861            Self {
10862                max_autoscale_size: Default::default(),
10863                max_memory_mb: Default::default(),
10864                max_vcpus: Default::default(),
10865                max_volume_mb: Default::default(),
10866                min_autoscale_size: Default::default(),
10867                min_memory_mb: Default::default(),
10868                min_vcpus: Default::default(),
10869                min_volume_mb: Default::default(),
10870            }
10871        }
10872    }
10873
10874    ///The response message for getting the quota of a user given their UUID.
10875    ///
10876    /// <details><summary>JSON schema</summary>
10877    ///
10878    /// ```json
10879    ///{
10880    ///  "description": "The response message for getting the quota of a user
10881    /// given their UUID.",
10882    ///  "type": "object",
10883    ///  "allOf": [
10884    ///    {
10885    ///      "type": "object",
10886    ///      "properties": {
10887    ///        "data": {
10888    ///          "description": "The response data for this request.",
10889    ///          "allOf": [
10890    ///            {
10891    ///              "$ref": "#/components/schemas/QuotasResponseData"
10892    ///            }
10893    ///          ]
10894    ///        },
10895    ///        "errors": {
10896    ///          "description": "A list of errors which may have occurred during
10897    /// the request.",
10898    ///          "type": "array",
10899    ///          "items": {
10900    ///            "$ref": "#/components/schemas/ResponseError"
10901    ///          }
10902    ///        },
10903    ///        "op_time_us": {
10904    ///          "description": "The operation time in microseconds.  This is the time it took to process\nthe request and generate the response.",
10905    ///          "examples": [
10906    ///            46
10907    ///          ],
10908    ///          "type": "integer",
10909    ///          "format": "uint64"
10910    ///        },
10911    ///        "status": {
10912    ///          "description": "The status of the response.",
10913    ///          "allOf": [
10914    ///            {
10915    ///              "$ref": "#/components/schemas/ResponseStatus"
10916    ///            }
10917    ///          ]
10918    ///        }
10919    ///      }
10920    ///    },
10921    ///    {
10922    ///      "oneOf": [
10923    ///        {
10924    ///          "title": "message",
10925    ///          "type": "object",
10926    ///          "properties": {
10927    ///            "message": {
10928    ///              "description": "An optional message providing additional
10929    /// information about the status.\nThis field is useful when the status is
10930    /// not `success`.",
10931    ///              "examples": [
10932    ///                "Failed to perform all operations"
10933    ///              ],
10934    ///              "type": "string"
10935    ///            }
10936    ///          }
10937    ///        }
10938    ///      ]
10939    ///    }
10940    ///  ]
10941    ///}
10942    /// ```
10943    /// </details>
10944    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
10945    pub struct QuotasResponse {
10946        ///The response data for this request.
10947        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10948        pub data: ::std::option::Option<QuotasResponseData>,
10949        ///A list of errors which may have occurred during the request.
10950        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
10951        pub errors: ::std::vec::Vec<ResponseError>,
10952        ///An optional message providing additional information about the
10953        /// status. This field is useful when the status is not
10954        /// `success`.
10955        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10956        pub message: ::std::option::Option<::std::string::String>,
10957        ///The operation time in microseconds.  This is the time it took to
10958        /// process the request and generate the response.
10959        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10960        pub op_time_us: ::std::option::Option<u64>,
10961        ///The status of the response.
10962        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
10963        pub status: ::std::option::Option<ResponseStatus>,
10964    }
10965
10966    impl ::std::convert::From<&QuotasResponse> for QuotasResponse {
10967        fn from(value: &QuotasResponse) -> Self {
10968            value.clone()
10969        }
10970    }
10971
10972    impl ::std::default::Default for QuotasResponse {
10973        fn default() -> Self {
10974            Self {
10975                data: Default::default(),
10976                errors: Default::default(),
10977                message: Default::default(),
10978                op_time_us: Default::default(),
10979                status: Default::default(),
10980            }
10981        }
10982    }
10983
10984    ///`QuotasResponseData`
10985    ///
10986    /// <details><summary>JSON schema</summary>
10987    ///
10988    /// ```json
10989    ///{
10990    ///  "type": "object",
10991    ///  "properties": {
10992    ///    "quotas": {
10993    ///      "description": "The quota(s) which were retrieved by the request.",
10994    ///      "type": "array",
10995    ///      "items": {
10996    ///        "$ref": "#/components/schemas/Quotas"
10997    ///      }
10998    ///    }
10999    ///  }
11000    ///}
11001    /// ```
11002    /// </details>
11003    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11004    pub struct QuotasResponseData {
11005        ///The quota(s) which were retrieved by the request.
11006        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11007        pub quotas: ::std::vec::Vec<Quotas>,
11008    }
11009
11010    impl ::std::convert::From<&QuotasResponseData> for QuotasResponseData {
11011        fn from(value: &QuotasResponseData) -> Self {
11012            value.clone()
11013        }
11014    }
11015
11016    impl ::std::default::Default for QuotasResponseData {
11017        fn default() -> Self {
11018            Self {
11019                quotas: Default::default(),
11020            }
11021        }
11022    }
11023
11024    ///`QuotasStats`
11025    ///
11026    /// <details><summary>JSON schema</summary>
11027    ///
11028    /// ```json
11029    ///{
11030    ///  "type": "object",
11031    ///  "properties": {
11032    ///    "instances": {
11033    ///      "description": "Number of instances",
11034    ///      "examples": [
11035    ///        16
11036    ///      ],
11037    ///      "type": "integer",
11038    ///      "format": "int64"
11039    ///    },
11040    ///    "live_instances": {
11041    ///      "description": "Number of instances that are not in the `stopped`
11042    /// state",
11043    ///      "examples": [
11044    ///        4
11045    ///      ],
11046    ///      "type": "integer",
11047    ///      "format": "int64"
11048    ///    },
11049    ///    "live_memory_mb": {
11050    ///      "description": "Amount of memory assigned to instances that are not
11051    /// in the `stopped`\nstate in megabytes",
11052    ///      "examples": [
11053    ///        2048
11054    ///      ],
11055    ///      "type": "integer",
11056    ///      "format": "int64"
11057    ///    },
11058    ///    "live_vcpus": {
11059    ///      "description": "Number of vCPUs",
11060    ///      "examples": [
11061    ///        4
11062    ///      ],
11063    ///      "type": "integer",
11064    ///      "format": "int64"
11065    ///    },
11066    ///    "service_groups": {
11067    ///      "description": "Number of services",
11068    ///      "examples": [
11069    ///        15
11070    ///      ],
11071    ///      "type": "integer",
11072    ///      "format": "int64"
11073    ///    },
11074    ///    "services": {
11075    ///      "description": "Number of published network ports over all existing
11076    /// services",
11077    ///      "examples": [
11078    ///        30
11079    ///      ],
11080    ///      "type": "integer",
11081    ///      "format": "int64"
11082    ///    },
11083    ///    "total_volume_mb": {
11084    ///      "description": "Total size of all volumes in megabytes",
11085    ///      "examples": [
11086    ///        1024
11087    ///      ],
11088    ///      "type": "integer",
11089    ///      "format": "int64"
11090    ///    },
11091    ///    "volumes": {
11092    ///      "description": "Number of volumes",
11093    ///      "examples": [
11094    ///        2
11095    ///      ],
11096    ///      "type": "integer",
11097    ///      "format": "int64"
11098    ///    }
11099    ///  }
11100    ///}
11101    /// ```
11102    /// </details>
11103    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11104    pub struct QuotasStats {
11105        ///Number of instances
11106        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11107        pub instances: ::std::option::Option<i64>,
11108        ///Number of instances that are not in the `stopped` state
11109        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11110        pub live_instances: ::std::option::Option<i64>,
11111        ///Amount of memory assigned to instances that are not in the `stopped`
11112        ///state in megabytes
11113        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11114        pub live_memory_mb: ::std::option::Option<i64>,
11115        ///Number of vCPUs
11116        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11117        pub live_vcpus: ::std::option::Option<i64>,
11118        ///Number of services
11119        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11120        pub service_groups: ::std::option::Option<i64>,
11121        ///Number of published network ports over all existing services
11122        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11123        pub services: ::std::option::Option<i64>,
11124        ///Total size of all volumes in megabytes
11125        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11126        pub total_volume_mb: ::std::option::Option<i64>,
11127        ///Number of volumes
11128        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11129        pub volumes: ::std::option::Option<i64>,
11130    }
11131
11132    impl ::std::convert::From<&QuotasStats> for QuotasStats {
11133        fn from(value: &QuotasStats) -> Self {
11134            value.clone()
11135        }
11136    }
11137
11138    impl ::std::default::Default for QuotasStats {
11139        fn default() -> Self {
11140            Self {
11141                instances: Default::default(),
11142                live_instances: Default::default(),
11143                live_memory_mb: Default::default(),
11144                live_vcpus: Default::default(),
11145                service_groups: Default::default(),
11146                services: Default::default(),
11147                total_volume_mb: Default::default(),
11148                volumes: Default::default(),
11149            }
11150        }
11151    }
11152
11153    ///The error response message for an API request.
11154    ///
11155    /// <details><summary>JSON schema</summary>
11156    ///
11157    /// ```json
11158    ///{
11159    ///  "description": "The error response message for an API request.",
11160    ///  "type": "object",
11161    ///  "properties": {
11162    ///    "status": {
11163    ///      "description": "The HTTP status code of the error.",
11164    ///      "examples": [
11165    ///        401
11166    ///      ],
11167    ///      "type": "integer",
11168    ///      "format": "uint64"
11169    ///    }
11170    ///  }
11171    ///}
11172    /// ```
11173    /// </details>
11174    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11175    pub struct ResponseError {
11176        ///The HTTP status code of the error.
11177        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11178        pub status: ::std::option::Option<u64>,
11179    }
11180
11181    impl ::std::convert::From<&ResponseError> for ResponseError {
11182        fn from(value: &ResponseError) -> Self {
11183            value.clone()
11184        }
11185    }
11186
11187    impl ::std::default::Default for ResponseError {
11188        fn default() -> Self {
11189            Self {
11190                status: Default::default(),
11191            }
11192        }
11193    }
11194
11195    ///The response status of an API request.
11196    ///
11197    /// <details><summary>JSON schema</summary>
11198    ///
11199    /// ```json
11200    ///{
11201    ///  "description": "The response status of an API request.",
11202    ///  "type": "string",
11203    ///  "format": "enum",
11204    ///  "enum": [
11205    ///    "success",
11206    ///    "error"
11207    ///  ]
11208    ///}
11209    /// ```
11210    /// </details>
11211    #[derive(
11212        :: serde :: Deserialize,
11213        :: serde :: Serialize,
11214        Clone,
11215        Copy,
11216        Debug,
11217        Eq,
11218        Hash,
11219        Ord,
11220        PartialEq,
11221        PartialOrd,
11222    )]
11223    pub enum ResponseStatus {
11224        #[serde(rename = "success")]
11225        Success,
11226        #[serde(rename = "error")]
11227        Error,
11228    }
11229
11230    impl ::std::convert::From<&Self> for ResponseStatus {
11231        fn from(value: &ResponseStatus) -> Self {
11232            value.clone()
11233        }
11234    }
11235
11236    impl ::std::fmt::Display for ResponseStatus {
11237        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11238            match *self {
11239                Self::Success => write!(f, "success"),
11240                Self::Error => write!(f, "error"),
11241            }
11242        }
11243    }
11244
11245    impl ::std::str::FromStr for ResponseStatus {
11246        type Err = self::error::ConversionError;
11247        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11248            match value {
11249                "success" => Ok(Self::Success),
11250                "error" => Ok(Self::Error),
11251                _ => Err("invalid value".into()),
11252            }
11253        }
11254    }
11255
11256    impl ::std::convert::TryFrom<&str> for ResponseStatus {
11257        type Error = self::error::ConversionError;
11258        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11259            value.parse()
11260        }
11261    }
11262
11263    impl ::std::convert::TryFrom<&::std::string::String> for ResponseStatus {
11264        type Error = self::error::ConversionError;
11265        fn try_from(
11266            value: &::std::string::String,
11267        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11268            value.parse()
11269        }
11270    }
11271
11272    impl ::std::convert::TryFrom<::std::string::String> for ResponseStatus {
11273        type Error = self::error::ConversionError;
11274        fn try_from(
11275            value: ::std::string::String,
11276        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11277            value.parse()
11278        }
11279    }
11280
11281    ///A service connects a public-facing port to an internal destination port
11282    /// on which an application instance listens on.  Additional handlers
11283    /// can be defined for each published port in order to define how the
11284    /// service will handle incoming connections and forward traffic from
11285    /// the Internet to your application.  For example, a service can be
11286    /// configured to terminate TLS connections, redirect HTTP traffic, or
11287    /// enable HTTP mode for load balancing.
11288    ///
11289    /// <details><summary>JSON schema</summary>
11290    ///
11291    /// ```json
11292    ///{
11293    ///  "description": "A service connects a public-facing port to an internal
11294    /// destination port on\nwhich an application instance listens on.
11295    /// Additional handlers can be defined\nfor each published port in order to
11296    /// define how the service will handle\nincoming connections and forward
11297    /// traffic from the Internet to your\napplication.  For example, a service
11298    /// can be configured to terminate TLS\nconnections, redirect HTTP traffic,
11299    /// or enable HTTP mode for load balancing.",
11300    ///  "type": "object",
11301    ///  "required": [
11302    ///    "port"
11303    ///  ],
11304    ///  "properties": {
11305    ///    "destination_port": {
11306    ///      "description": "The port number that the instance is listening on.
11307    /// This is the internal\nport which Unikraft Cloud will forward traffic
11308    /// to.",
11309    ///      "examples": [
11310    ///        8080
11311    ///      ],
11312    ///      "type": "integer",
11313    ///      "format": "uint32"
11314    ///    },
11315    ///    "handlers": {
11316    ///      "description": "Connection handlers to use for the service.
11317    /// Handlers define how the\nservice will handle incoming connections and
11318    /// forward traffic from the\nInternet to your application.  For example, a
11319    /// service can be configured\nto terminate TLS connections, redirect HTTP
11320    /// traffic, or enable HTTP mode\nfor load balancing.  You configure the
11321    /// handlers for every published\nservice port individually.",
11322    ///      "type": "array",
11323    ///      "items": {
11324    ///        "type": "string",
11325    ///        "format": "enum",
11326    ///        "enum": [
11327    ///          "tls",
11328    ///          "http",
11329    ///          "redirect"
11330    ///        ]
11331    ///      }
11332    ///    },
11333    ///    "port": {
11334    ///      "description": "This is the public-facing port that the service
11335    /// will be accessible from\non the Internet.",
11336    ///      "examples": [
11337    ///        443
11338    ///      ],
11339    ///      "type": "integer",
11340    ///      "format": "uint32"
11341    ///    }
11342    ///  }
11343    ///}
11344    /// ```
11345    /// </details>
11346    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11347    pub struct Service {
11348        ///The port number that the instance is listening on.  This is the
11349        /// internal port which Unikraft Cloud will forward traffic to.
11350        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11351        pub destination_port: ::std::option::Option<u32>,
11352        ///Connection handlers to use for the service.  Handlers define how the
11353        ///service will handle incoming connections and forward traffic from
11354        /// the Internet to your application.  For example, a service
11355        /// can be configured to terminate TLS connections, redirect
11356        /// HTTP traffic, or enable HTTP mode for load balancing.  You
11357        /// configure the handlers for every published service port
11358        /// individually.
11359        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11360        pub handlers: ::std::vec::Vec<ServiceHandlersItem>,
11361        ///This is the public-facing port that the service will be accessible
11362        /// from on the Internet.
11363        pub port: u32,
11364    }
11365
11366    impl ::std::convert::From<&Service> for Service {
11367        fn from(value: &Service) -> Self {
11368            value.clone()
11369        }
11370    }
11371
11372    ///A service group on Unikraft Cloud is used to describe how your
11373    /// application exposes its functionality to the outside world.  Once
11374    /// defined, assigning an instance to the service will make it
11375    /// accessible from the Internet.
11376    ///
11377    ///An application, running as an instance, may expose one or more ports,
11378    /// e.g. it listens on port 80 because your application exposes a HTTP
11379    /// web service. This, along with a set of additional metadata defines
11380    /// how the "service" is configured and accessed.  For example, a
11381    /// service may be configured to use TLS, or be bound to a specific
11382    /// domain name.
11383    ///
11384    ///When an instance is assigned to a service group, it immediately becomes
11385    ///accessible over the Internet on the exposed public port, using the set
11386    /// DNS name, and is routed to the set destination port.
11387    ///
11388    ///Note: If you do not specify a DNS name when you create a service and you
11389    ///indicate that the application exposes some ports, Unikraft Cloud will
11390    ///generates a random DNS name for you.  Unikraft Cloud also supports
11391    /// custom domains like www.example.com and wildcard domains like
11392    /// *.example.com.
11393    ///
11394    /// <details><summary>JSON schema</summary>
11395    ///
11396    /// ```json
11397    ///{
11398    ///  "description": "A service group on Unikraft Cloud is used to describe
11399    /// how your application\nexposes its functionality to the outside world.
11400    /// Once defined, assigning an\ninstance to the service will make it
11401    /// accessible from the Internet.\n\nAn application, running as an instance,
11402    /// may expose one or more ports, e.g. it\nlistens on port 80 because your
11403    /// application exposes a HTTP web service. This,\nalong with a set of
11404    /// additional metadata defines how the \"service\" is\nconfigured and
11405    /// accessed.  For example, a service may be configured to use\nTLS, or be
11406    /// bound to a specific domain name.\n\nWhen an instance is assigned to a
11407    /// service group, it immediately becomes\naccessible over the Internet on
11408    /// the exposed public port, using the set DNS\nname, and is routed to the
11409    /// set destination port.\n\nNote: If you do not specify a DNS name when you
11410    /// create a service and you\nindicate that the application exposes some
11411    /// ports, Unikraft Cloud will\ngenerates a random DNS name for you.
11412    /// Unikraft Cloud also supports custom\ndomains like www.example.com and
11413    /// wildcard domains like *.example.com.",
11414    ///  "type": "object",
11415    ///  "properties": {
11416    ///    "autoscale": {
11417    ///      "description": "Indicates if the service has autoscale enabled.
11418    /// See the associated\nautoscale documentation for more information about
11419    /// how to set this up.\nAutoscale policies can be set up after the service
11420    /// has been created.",
11421    ///      "examples": [
11422    ///        true
11423    ///      ],
11424    ///      "type": "boolean"
11425    ///    },
11426    ///    "created_at": {
11427    ///      "description": "The time the service was created.",
11428    ///      "examples": [
11429    ///        "2023-10-01T12:00:00Z"
11430    ///      ],
11431    ///      "type": "string",
11432    ///      "format": "date-time"
11433    ///    },
11434    ///    "domains": {
11435    ///      "description": "List of domains associated with the service.
11436    /// Domains are used to access\nthe service over the Internet.",
11437    ///      "type": "array",
11438    ///      "items": {
11439    ///        "$ref": "#/components/schemas/Domain"
11440    ///      }
11441    ///    },
11442    ///    "error": {
11443    ///      "description": "An optional error code providing additional
11444    /// information about the status.\nThis field is only set when this message
11445    /// object is used as a response\nmessage, and is useful when the status is
11446    /// not `success`.",
11447    ///      "examples": [
11448    ///        8
11449    ///      ],
11450    ///      "type": "integer",
11451    ///      "format": "int32"
11452    ///    },
11453    ///    "hard_limit": {
11454    ///      "description": "The hard limit defines the maximum number of
11455    /// concurrent requests that an\ninstance assigned to the this service can
11456    /// handle.  The load balancer will\nnever assign more requests to a single
11457    /// instance.  In case there are no\nother instances available, excess
11458    /// requests fail (i.e., they are blocked and\nnot queued).",
11459    ///      "examples": [
11460    ///        100
11461    ///      ],
11462    ///      "type": "integer",
11463    ///      "format": "uint64"
11464    ///    },
11465    ///    "instances": {
11466    ///      "description": "List of instances assigned to the service.",
11467    ///      "type": "array",
11468    ///      "items": {
11469    ///        "$ref": "#/components/schemas/ServiceGroupInstance"
11470    ///      }
11471    ///    },
11472    ///    "message": {
11473    ///      "description": "An optional message providing additional
11474    /// information about the status.\nThis field is only set when this message
11475    /// object is used as a response\nmessage, and is useful when the status is
11476    /// not `success`.",
11477    ///      "examples": [
11478    ///        "No service with name 'funky-town-g756b5d'"
11479    ///      ],
11480    ///      "type": "string"
11481    ///    },
11482    ///    "name": {
11483    ///      "description": "The name of the service group.\n\nThis is a
11484    /// human-readable name that can be used to identify the service\ngroup. The
11485    /// name must be unique within the context of your account.  The\nname can
11486    /// also be used to identify the service in API calls.",
11487    ///      "examples": [
11488    ///        "funky-service-g7gum5cj"
11489    ///      ],
11490    ///      "type": "string"
11491    ///    },
11492    ///    "persistent": {
11493    ///      "description": "Indicates if the service will stay remain even
11494    /// after the last instance\ndetached.  If this is set to false, the service
11495    /// will be deleted when the\nlast instance detached from it.  If this is
11496    /// set to true, the service will\nremain and can be reused by other
11497    /// instances.  This is useful if you want to\nkeep the service
11498    /// configuration, e.g., the published ports, handlers, and\ndomains, even
11499    /// if there are no instances assigned to it.",
11500    ///      "examples": [
11501    ///        true
11502    ///      ],
11503    ///      "type": "boolean"
11504    ///    },
11505    ///    "services": {
11506    ///      "description": "List of published network ports for this service
11507    /// and the destination port\nto which Unikraft Cloud will forward traffic
11508    /// to.  Additional handlers can\nbe defined for each published port in
11509    /// order to define how the service will\nhandle incoming connections and
11510    /// forward traffic from the Internet to your\napplication.  For example, a
11511    /// service can be configured to terminate TLS\nconnections, redirect HTTP
11512    /// traffic, or enable HTTP mode for load balancing.",
11513    ///      "type": "array",
11514    ///      "items": {
11515    ///        "$ref": "#/components/schemas/Service"
11516    ///      }
11517    ///    },
11518    ///    "soft_limit": {
11519    ///      "description": "The soft limit is used by the Unikraft Cloud load
11520    /// balancer to decide when\nto wake up another standby instance.  For
11521    /// example, if the soft limit is set\nto 5 and the service consists of 2
11522    /// standby instances, one of the instances\nreceives up to 5 concurrent
11523    /// requests.  The 6th parallel requests wakes up\nthe second instance.  If
11524    /// there are no more standby instances to wake up,\nthe number of requests
11525    /// assigned to each instance will exceed the soft\nlimit.  The load
11526    /// balancer makes sure that when the number of in-flight\nrequests goes
11527    /// down again, instances are put into standby as fast as\npossible.",
11528    ///      "examples": [
11529    ///        1
11530    ///      ],
11531    ///      "type": "integer",
11532    ///      "format": "uint64"
11533    ///    },
11534    ///    "status": {
11535    ///      "description": "An optional field representing the status of the
11536    /// request.  This field is\nonly set when this message object is used as a
11537    /// response message.",
11538    ///      "allOf": [
11539    ///        {
11540    ///          "$ref": "#/components/schemas/ResponseStatus"
11541    ///        }
11542    ///      ]
11543    ///    },
11544    ///    "uuid": {
11545    ///      "description": "The UUID of the service group.\n\nThis is a unique
11546    /// identifier for the service group that is generated when\nthe service
11547    /// group is created.  The UUID is used to reference the service in\nAPI
11548    /// calls and can be used to identify the service group in all API
11549    /// calls\nthat require an identifier.",
11550    ///      "examples": [
11551    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
11552    ///      ],
11553    ///      "type": "string",
11554    ///      "format": "uuid"
11555    ///    }
11556    ///  }
11557    ///}
11558    /// ```
11559    /// </details>
11560    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11561    pub struct ServiceGroup {
11562        ///Indicates if the service has autoscale enabled.  See the associated
11563        ///autoscale documentation for more information about how to set this
11564        /// up. Autoscale policies can be set up after the service has
11565        /// been created.
11566        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11567        pub autoscale: ::std::option::Option<bool>,
11568        ///The time the service was created.
11569        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11570        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
11571        ///List of domains associated with the service.  Domains are used to
11572        /// access the service over the Internet.
11573        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11574        pub domains: ::std::vec::Vec<Domain>,
11575        ///An optional error code providing additional information about the
11576        /// status. This field is only set when this message object is
11577        /// used as a response message, and is useful when the status is
11578        /// not `success`.
11579        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11580        pub error: ::std::option::Option<i32>,
11581        ///The hard limit defines the maximum number of concurrent requests
11582        /// that an instance assigned to the this service can handle.
11583        /// The load balancer will never assign more requests to a
11584        /// single instance.  In case there are no other instances
11585        /// available, excess requests fail (i.e., they are blocked and
11586        /// not queued).
11587        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11588        pub hard_limit: ::std::option::Option<u64>,
11589        ///List of instances assigned to the service.
11590        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11591        pub instances: ::std::vec::Vec<ServiceGroupInstance>,
11592        ///An optional message providing additional information about the
11593        /// status. This field is only set when this message object is
11594        /// used as a response message, and is useful when the status is
11595        /// not `success`.
11596        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11597        pub message: ::std::option::Option<::std::string::String>,
11598        ///The name of the service group.
11599        ///
11600        ///This is a human-readable name that can be used to identify the
11601        /// service group. The name must be unique within the context of
11602        /// your account.  The name can also be used to identify the
11603        /// service in API calls.
11604        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11605        pub name: ::std::option::Option<::std::string::String>,
11606        ///Indicates if the service will stay remain even after the last
11607        /// instance detached.  If this is set to false, the service
11608        /// will be deleted when the last instance detached from it.  If
11609        /// this is set to true, the service will remain and can be
11610        /// reused by other instances.  This is useful if you want to
11611        /// keep the service configuration, e.g., the published ports, handlers,
11612        /// and domains, even if there are no instances assigned to it.
11613        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11614        pub persistent: ::std::option::Option<bool>,
11615        ///List of published network ports for this service and the destination
11616        /// port to which Unikraft Cloud will forward traffic to.
11617        /// Additional handlers can be defined for each published port
11618        /// in order to define how the service will handle incoming
11619        /// connections and forward traffic from the Internet to your
11620        /// application.  For example, a service can be configured to terminate
11621        /// TLS connections, redirect HTTP traffic, or enable HTTP mode
11622        /// for load balancing.
11623        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11624        pub services: ::std::vec::Vec<Service>,
11625        ///The soft limit is used by the Unikraft Cloud load balancer to decide
11626        /// when to wake up another standby instance.  For example, if
11627        /// the soft limit is set to 5 and the service consists of 2
11628        /// standby instances, one of the instances receives up to 5
11629        /// concurrent requests.  The 6th parallel requests wakes up the
11630        /// second instance.  If there are no more standby instances to wake up,
11631        /// the number of requests assigned to each instance will exceed the
11632        /// soft limit.  The load balancer makes sure that when the
11633        /// number of in-flight requests goes down again, instances are
11634        /// put into standby as fast as possible.
11635        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11636        pub soft_limit: ::std::option::Option<u64>,
11637        ///An optional field representing the status of the request.  This
11638        /// field is only set when this message object is used as a
11639        /// response message.
11640        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11641        pub status: ::std::option::Option<ResponseStatus>,
11642        ///The UUID of the service group.
11643        ///
11644        ///This is a unique identifier for the service group that is generated
11645        /// when the service group is created.  The UUID is used to
11646        /// reference the service in API calls and can be used to
11647        /// identify the service group in all API calls that require an
11648        /// identifier.
11649        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11650        pub uuid: ::std::option::Option<::uuid::Uuid>,
11651    }
11652
11653    impl ::std::convert::From<&ServiceGroup> for ServiceGroup {
11654        fn from(value: &ServiceGroup) -> Self {
11655            value.clone()
11656        }
11657    }
11658
11659    impl ::std::default::Default for ServiceGroup {
11660        fn default() -> Self {
11661            Self {
11662                autoscale: Default::default(),
11663                created_at: Default::default(),
11664                domains: Default::default(),
11665                error: Default::default(),
11666                hard_limit: Default::default(),
11667                instances: Default::default(),
11668                message: Default::default(),
11669                name: Default::default(),
11670                persistent: Default::default(),
11671                services: Default::default(),
11672                soft_limit: Default::default(),
11673                status: Default::default(),
11674                uuid: Default::default(),
11675            }
11676        }
11677    }
11678
11679    ///`ServiceGroupInstance`
11680    ///
11681    /// <details><summary>JSON schema</summary>
11682    ///
11683    /// ```json
11684    ///{
11685    ///  "type": "object",
11686    ///  "properties": {
11687    ///    "name": {
11688    ///      "description": "The name of the instance.  This is a human-readable
11689    /// name that can be used\nto identify the instance.  The name must be
11690    /// unique within the context of\nyour account.  If no name is specified, a
11691    /// random name is generated for\nyou.  The name can also be used to
11692    /// identify the instance in API calls.",
11693    ///      "examples": [
11694    ///        "funky-vol-g7gum5cj"
11695    ///      ],
11696    ///      "type": "string"
11697    ///    },
11698    ///    "uuid": {
11699    ///      "description": "The UUID of the instance.  This is a unique
11700    /// identifier for the instance\nthat is generated when the instance is
11701    /// created.  The UUID is used to\nreference the instance in API calls and
11702    /// can be used to identify the\ninstance in all API calls that require an
11703    /// instance identifier.",
11704    ///      "examples": [
11705    ///        "12345678-90ab-cdef-1234-567890abcdef"
11706    ///      ],
11707    ///      "type": "string",
11708    ///      "format": "uuid"
11709    ///    }
11710    ///  }
11711    ///}
11712    /// ```
11713    /// </details>
11714    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11715    pub struct ServiceGroupInstance {
11716        ///The name of the instance.  This is a human-readable name that can be
11717        /// used to identify the instance.  The name must be unique
11718        /// within the context of your account.  If no name is
11719        /// specified, a random name is generated for you.  The name can
11720        /// also be used to identify the instance in API calls.
11721        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11722        pub name: ::std::option::Option<::std::string::String>,
11723        ///The UUID of the instance.  This is a unique identifier for the
11724        /// instance that is generated when the instance is created.
11725        /// The UUID is used to reference the instance in API calls and
11726        /// can be used to identify the instance in all API calls that
11727        /// require an instance identifier.
11728        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11729        pub uuid: ::std::option::Option<::uuid::Uuid>,
11730    }
11731
11732    impl ::std::convert::From<&ServiceGroupInstance> for ServiceGroupInstance {
11733        fn from(value: &ServiceGroupInstance) -> Self {
11734            value.clone()
11735        }
11736    }
11737
11738    impl ::std::default::Default for ServiceGroupInstance {
11739        fn default() -> Self {
11740            Self {
11741                name: Default::default(),
11742                uuid: Default::default(),
11743            }
11744        }
11745    }
11746
11747    ///`ServiceGroupTemplate`
11748    ///
11749    /// <details><summary>JSON schema</summary>
11750    ///
11751    /// ```json
11752    ///{
11753    ///  "type": "object",
11754    ///  "properties": {
11755    ///    "name": {
11756    ///      "description": "The name of the template used for the autoscale
11757    /// configuration.",
11758    ///      "examples": [
11759    ///        "funky-instance-template"
11760    ///      ],
11761    ///      "type": "string"
11762    ///    },
11763    ///    "uuid": {
11764    ///      "description": "The UUID of the template used for the autoscale
11765    /// configuration.",
11766    ///      "examples": [
11767    ///        "123e4567-e89b-12d3-a456-426614174000"
11768    ///      ],
11769    ///      "type": "string",
11770    ///      "format": "uuid"
11771    ///    }
11772    ///  }
11773    ///}
11774    /// ```
11775    /// </details>
11776    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11777    pub struct ServiceGroupTemplate {
11778        ///The name of the template used for the autoscale configuration.
11779        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11780        pub name: ::std::option::Option<::std::string::String>,
11781        ///The UUID of the template used for the autoscale configuration.
11782        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11783        pub uuid: ::std::option::Option<::uuid::Uuid>,
11784    }
11785
11786    impl ::std::convert::From<&ServiceGroupTemplate> for ServiceGroupTemplate {
11787        fn from(value: &ServiceGroupTemplate) -> Self {
11788            value.clone()
11789        }
11790    }
11791
11792    impl ::std::default::Default for ServiceGroupTemplate {
11793        fn default() -> Self {
11794            Self {
11795                name: Default::default(),
11796                uuid: Default::default(),
11797            }
11798        }
11799    }
11800
11801    ///`ServiceHandlersItem`
11802    ///
11803    /// <details><summary>JSON schema</summary>
11804    ///
11805    /// ```json
11806    ///{
11807    ///  "type": "string",
11808    ///  "format": "enum",
11809    ///  "enum": [
11810    ///    "tls",
11811    ///    "http",
11812    ///    "redirect"
11813    ///  ]
11814    ///}
11815    /// ```
11816    /// </details>
11817    #[derive(
11818        :: serde :: Deserialize,
11819        :: serde :: Serialize,
11820        Clone,
11821        Copy,
11822        Debug,
11823        Eq,
11824        Hash,
11825        Ord,
11826        PartialEq,
11827        PartialOrd,
11828    )]
11829    pub enum ServiceHandlersItem {
11830        #[serde(rename = "tls")]
11831        Tls,
11832        #[serde(rename = "http")]
11833        Http,
11834        #[serde(rename = "redirect")]
11835        Redirect,
11836    }
11837
11838    impl ::std::convert::From<&Self> for ServiceHandlersItem {
11839        fn from(value: &ServiceHandlersItem) -> Self {
11840            value.clone()
11841        }
11842    }
11843
11844    impl ::std::fmt::Display for ServiceHandlersItem {
11845        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
11846            match *self {
11847                Self::Tls => write!(f, "tls"),
11848                Self::Http => write!(f, "http"),
11849                Self::Redirect => write!(f, "redirect"),
11850            }
11851        }
11852    }
11853
11854    impl ::std::str::FromStr for ServiceHandlersItem {
11855        type Err = self::error::ConversionError;
11856        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11857            match value {
11858                "tls" => Ok(Self::Tls),
11859                "http" => Ok(Self::Http),
11860                "redirect" => Ok(Self::Redirect),
11861                _ => Err("invalid value".into()),
11862            }
11863        }
11864    }
11865
11866    impl ::std::convert::TryFrom<&str> for ServiceHandlersItem {
11867        type Error = self::error::ConversionError;
11868        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
11869            value.parse()
11870        }
11871    }
11872
11873    impl ::std::convert::TryFrom<&::std::string::String> for ServiceHandlersItem {
11874        type Error = self::error::ConversionError;
11875        fn try_from(
11876            value: &::std::string::String,
11877        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11878            value.parse()
11879        }
11880    }
11881
11882    impl ::std::convert::TryFrom<::std::string::String> for ServiceHandlersItem {
11883        type Error = self::error::ConversionError;
11884        fn try_from(
11885            value: ::std::string::String,
11886        ) -> ::std::result::Result<Self, self::error::ConversionError> {
11887            value.parse()
11888        }
11889    }
11890
11891    ///The response message for starting one or more instance(s) given their
11892    /// UUID(s) or name(s).
11893    ///
11894    /// <details><summary>JSON schema</summary>
11895    ///
11896    /// ```json
11897    ///{
11898    ///  "description": "The response message for starting one or more
11899    /// instance(s) given their UUID(s)\nor name(s).",
11900    ///  "type": "object",
11901    ///  "properties": {
11902    ///    "data": {
11903    ///      "description": "The response data for this request.",
11904    ///      "allOf": [
11905    ///        {
11906    ///          "$ref": "#/components/schemas/StartInstanceResponseData"
11907    ///        }
11908    ///      ]
11909    ///    },
11910    ///    "errors": {
11911    ///      "description": "A list of errors which may have occurred during the
11912    /// request.",
11913    ///      "type": "array",
11914    ///      "items": {
11915    ///        "$ref": "#/components/schemas/ResponseError"
11916    ///      }
11917    ///    },
11918    ///    "message": {
11919    ///      "description": "An optional message providing additional
11920    /// information about the status.\nThis field is useful when the status is
11921    /// not `success`.",
11922    ///      "examples": [
11923    ///        "Failed to perform all operations"
11924    ///      ],
11925    ///      "type": "string"
11926    ///    },
11927    ///    "op_time_us": {
11928    ///      "description": "The operation time in microseconds.  This is the
11929    /// time it took to process\nthe request and generate the response.",
11930    ///      "examples": [
11931    ///        256
11932    ///      ],
11933    ///      "type": "integer",
11934    ///      "format": "uint64"
11935    ///    },
11936    ///    "status": {
11937    ///      "description": "The status of the response.",
11938    ///      "allOf": [
11939    ///        {
11940    ///          "$ref": "#/components/schemas/ResponseStatus"
11941    ///        }
11942    ///      ]
11943    ///    }
11944    ///  }
11945    ///}
11946    /// ```
11947    /// </details>
11948    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
11949    pub struct StartInstanceResponse {
11950        ///The response data for this request.
11951        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11952        pub data: ::std::option::Option<StartInstanceResponseData>,
11953        ///A list of errors which may have occurred during the request.
11954        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
11955        pub errors: ::std::vec::Vec<ResponseError>,
11956        ///An optional message providing additional information about the
11957        /// status. This field is useful when the status is not
11958        /// `success`.
11959        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11960        pub message: ::std::option::Option<::std::string::String>,
11961        ///The operation time in microseconds.  This is the time it took to
11962        /// process the request and generate the response.
11963        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11964        pub op_time_us: ::std::option::Option<u64>,
11965        ///The status of the response.
11966        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
11967        pub status: ::std::option::Option<ResponseStatus>,
11968    }
11969
11970    impl ::std::convert::From<&StartInstanceResponse> for StartInstanceResponse {
11971        fn from(value: &StartInstanceResponse) -> Self {
11972            value.clone()
11973        }
11974    }
11975
11976    impl ::std::default::Default for StartInstanceResponse {
11977        fn default() -> Self {
11978            Self {
11979                data: Default::default(),
11980                errors: Default::default(),
11981                message: Default::default(),
11982                op_time_us: Default::default(),
11983                status: Default::default(),
11984            }
11985        }
11986    }
11987
11988    ///`StartInstanceResponseData`
11989    ///
11990    /// <details><summary>JSON schema</summary>
11991    ///
11992    /// ```json
11993    ///{
11994    ///  "type": "object",
11995    ///  "properties": {
11996    ///    "instances": {
11997    ///      "description": "The instance(s) which were started by the
11998    /// request.",
11999    ///      "type": "array",
12000    ///      "items": {
12001    ///        "$ref":
12002    /// "#/components/schemas/StartInstanceResponseStartedInstance"
12003    ///      }
12004    ///    }
12005    ///  }
12006    ///}
12007    /// ```
12008    /// </details>
12009    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12010    pub struct StartInstanceResponseData {
12011        ///The instance(s) which were started by the request.
12012        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
12013        pub instances: ::std::vec::Vec<StartInstanceResponseStartedInstance>,
12014    }
12015
12016    impl ::std::convert::From<&StartInstanceResponseData> for StartInstanceResponseData {
12017        fn from(value: &StartInstanceResponseData) -> Self {
12018            value.clone()
12019        }
12020    }
12021
12022    impl ::std::default::Default for StartInstanceResponseData {
12023        fn default() -> Self {
12024            Self {
12025                instances: Default::default(),
12026            }
12027        }
12028    }
12029
12030    ///`StartInstanceResponseStartedInstance`
12031    ///
12032    /// <details><summary>JSON schema</summary>
12033    ///
12034    /// ```json
12035    ///{
12036    ///  "type": "object",
12037    ///  "properties": {
12038    ///    "error": {
12039    ///      "description": "An optional error code providing additional
12040    /// information about the status.\nThis field is useful when the status is
12041    /// not `success`.",
12042    ///      "examples": [
12043    ///        8
12044    ///      ],
12045    ///      "type": "integer",
12046    ///      "format": "int32"
12047    ///    },
12048    ///    "message": {
12049    ///      "description": "An optional message providing additional
12050    /// information about the status.\nThis field is useful when the status is
12051    /// not `success`.",
12052    ///      "examples": [
12053    ///        "No instance with name 'funky-town-g756b5d'"
12054    ///      ],
12055    ///      "type": "string"
12056    ///    },
12057    ///    "name": {
12058    ///      "description": "The name of the instance which was deleted.",
12059    ///      "examples": [
12060    ///        "funky-town-g756b5d"
12061    ///      ],
12062    ///      "type": "string"
12063    ///    },
12064    ///    "previous_state": {
12065    ///      "description": "The previous state of the instance before it was
12066    /// deleted.",
12067    ///      "examples": [
12068    ///        "stopped"
12069    ///      ],
12070    ///      "type": "string"
12071    ///    },
12072    ///    "state": {
12073    ///      "description": "The current state of the instance after this
12074    /// request.",
12075    ///      "examples": [
12076    ///        "running"
12077    ///      ],
12078    ///      "type": "string"
12079    ///    },
12080    ///    "status": {
12081    ///      "description": "Indicates whether the start operation was
12082    /// successful or not for this\ninstance.",
12083    ///      "allOf": [
12084    ///        {
12085    ///          "$ref": "#/components/schemas/ResponseStatus"
12086    ///        }
12087    ///      ]
12088    ///    },
12089    ///    "uuid": {
12090    ///      "description": "The UUID of the instance which was deleted.",
12091    ///      "examples": [
12092    ///        "123e4567-e89b-12d3-a456-426614174000"
12093    ///      ],
12094    ///      "type": "string",
12095    ///      "format": "uuid"
12096    ///    }
12097    ///  }
12098    ///}
12099    /// ```
12100    /// </details>
12101    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12102    pub struct StartInstanceResponseStartedInstance {
12103        ///An optional error code providing additional information about the
12104        /// status. This field is useful when the status is not
12105        /// `success`.
12106        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12107        pub error: ::std::option::Option<i32>,
12108        ///An optional message providing additional information about the
12109        /// status. This field is useful when the status is not
12110        /// `success`.
12111        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12112        pub message: ::std::option::Option<::std::string::String>,
12113        ///The name of the instance which was deleted.
12114        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12115        pub name: ::std::option::Option<::std::string::String>,
12116        ///The previous state of the instance before it was deleted.
12117        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12118        pub previous_state: ::std::option::Option<::std::string::String>,
12119        ///The current state of the instance after this request.
12120        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12121        pub state: ::std::option::Option<::std::string::String>,
12122        ///Indicates whether the start operation was successful or not for this
12123        ///instance.
12124        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12125        pub status: ::std::option::Option<ResponseStatus>,
12126        ///The UUID of the instance which was deleted.
12127        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12128        pub uuid: ::std::option::Option<::uuid::Uuid>,
12129    }
12130
12131    impl ::std::convert::From<&StartInstanceResponseStartedInstance>
12132        for StartInstanceResponseStartedInstance
12133    {
12134        fn from(value: &StartInstanceResponseStartedInstance) -> Self {
12135            value.clone()
12136        }
12137    }
12138
12139    impl ::std::default::Default for StartInstanceResponseStartedInstance {
12140        fn default() -> Self {
12141            Self {
12142                error: Default::default(),
12143                message: Default::default(),
12144                name: Default::default(),
12145                previous_state: Default::default(),
12146                state: Default::default(),
12147                status: Default::default(),
12148                uuid: Default::default(),
12149            }
12150        }
12151    }
12152
12153    ///The response message for stopping one or more instance(s) given their
12154    /// UUID(s) or name(s).
12155    ///
12156    /// <details><summary>JSON schema</summary>
12157    ///
12158    /// ```json
12159    ///{
12160    ///  "description": "The response message for stopping one or more
12161    /// instance(s) given their UUID(s)\nor name(s).",
12162    ///  "type": "object",
12163    ///  "properties": {
12164    ///    "data": {
12165    ///      "description": "The response data for this request.",
12166    ///      "allOf": [
12167    ///        {
12168    ///          "$ref": "#/components/schemas/StopInstanceResponseData"
12169    ///        }
12170    ///      ]
12171    ///    },
12172    ///    "errors": {
12173    ///      "description": "A list of errors which may have occurred during the
12174    /// request.",
12175    ///      "type": "array",
12176    ///      "items": {
12177    ///        "$ref": "#/components/schemas/ResponseError"
12178    ///      }
12179    ///    },
12180    ///    "message": {
12181    ///      "description": "An optional message providing additional
12182    /// information about the status.\nThis field is useful when the status is
12183    /// not `success`.",
12184    ///      "examples": [
12185    ///        "Failed to perform all operations"
12186    ///      ],
12187    ///      "type": "string"
12188    ///    },
12189    ///    "op_time_us": {
12190    ///      "description": "The operation time in microseconds.  This is the
12191    /// time it took to process\nthe request and generate the response.",
12192    ///      "examples": [
12193    ///        23
12194    ///      ],
12195    ///      "type": "integer",
12196    ///      "format": "uint64"
12197    ///    },
12198    ///    "status": {
12199    ///      "description": "The status of the response.",
12200    ///      "allOf": [
12201    ///        {
12202    ///          "$ref": "#/components/schemas/ResponseStatus"
12203    ///        }
12204    ///      ]
12205    ///    }
12206    ///  }
12207    ///}
12208    /// ```
12209    /// </details>
12210    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12211    pub struct StopInstanceResponse {
12212        ///The response data for this request.
12213        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12214        pub data: ::std::option::Option<StopInstanceResponseData>,
12215        ///A list of errors which may have occurred during the request.
12216        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
12217        pub errors: ::std::vec::Vec<ResponseError>,
12218        ///An optional message providing additional information about the
12219        /// status. This field is useful when the status is not
12220        /// `success`.
12221        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12222        pub message: ::std::option::Option<::std::string::String>,
12223        ///The operation time in microseconds.  This is the time it took to
12224        /// process the request and generate the response.
12225        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12226        pub op_time_us: ::std::option::Option<u64>,
12227        ///The status of the response.
12228        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12229        pub status: ::std::option::Option<ResponseStatus>,
12230    }
12231
12232    impl ::std::convert::From<&StopInstanceResponse> for StopInstanceResponse {
12233        fn from(value: &StopInstanceResponse) -> Self {
12234            value.clone()
12235        }
12236    }
12237
12238    impl ::std::default::Default for StopInstanceResponse {
12239        fn default() -> Self {
12240            Self {
12241                data: Default::default(),
12242                errors: Default::default(),
12243                message: Default::default(),
12244                op_time_us: Default::default(),
12245                status: Default::default(),
12246            }
12247        }
12248    }
12249
12250    ///`StopInstanceResponseData`
12251    ///
12252    /// <details><summary>JSON schema</summary>
12253    ///
12254    /// ```json
12255    ///{
12256    ///  "type": "object",
12257    ///  "properties": {
12258    ///    "instances": {
12259    ///      "description": "The instance(s) which were stopped by the
12260    /// request.",
12261    ///      "type": "array",
12262    ///      "items": {
12263    ///        "$ref":
12264    /// "#/components/schemas/StopInstanceResponseStoppedInstance"
12265    ///      }
12266    ///    }
12267    ///  }
12268    ///}
12269    /// ```
12270    /// </details>
12271    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12272    pub struct StopInstanceResponseData {
12273        ///The instance(s) which were stopped by the request.
12274        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
12275        pub instances: ::std::vec::Vec<StopInstanceResponseStoppedInstance>,
12276    }
12277
12278    impl ::std::convert::From<&StopInstanceResponseData> for StopInstanceResponseData {
12279        fn from(value: &StopInstanceResponseData) -> Self {
12280            value.clone()
12281        }
12282    }
12283
12284    impl ::std::default::Default for StopInstanceResponseData {
12285        fn default() -> Self {
12286            Self {
12287                instances: Default::default(),
12288            }
12289        }
12290    }
12291
12292    ///`StopInstanceResponseStoppedInstance`
12293    ///
12294    /// <details><summary>JSON schema</summary>
12295    ///
12296    /// ```json
12297    ///{
12298    ///  "type": "object",
12299    ///  "properties": {
12300    ///    "error": {
12301    ///      "description": "An optional error code providing additional
12302    /// information about the status.\nThis field is useful when the status is
12303    /// not `success`.",
12304    ///      "examples": [
12305    ///        8
12306    ///      ],
12307    ///      "type": "integer",
12308    ///      "format": "int32"
12309    ///    },
12310    ///    "message": {
12311    ///      "description": "An optional message providing additional
12312    /// information about the status.\nThis field is useful when the status is
12313    /// not `success`.",
12314    ///      "examples": [
12315    ///        "No instance with name 'funky-town-g756b5d'"
12316    ///      ],
12317    ///      "type": "string"
12318    ///    },
12319    ///    "name": {
12320    ///      "description": "The name of the instance.",
12321    ///      "examples": [
12322    ///        "funky-town-g756b5d"
12323    ///      ],
12324    ///      "type": "string"
12325    ///    },
12326    ///    "previous_state": {
12327    ///      "description": "The previous state of the instance before the stop
12328    /// operation was invoked.",
12329    ///      "type": "string",
12330    ///      "format": "enum",
12331    ///      "enum": [
12332    ///        "stopped",
12333    ///        "starting",
12334    ///        "running",
12335    ///        "draining",
12336    ///        "stopping",
12337    ///        "standby"
12338    ///      ]
12339    ///    },
12340    ///    "state": {
12341    ///      "description": "The current state of the instance.",
12342    ///      "type": "string",
12343    ///      "format": "enum",
12344    ///      "enum": [
12345    ///        "stopped",
12346    ///        "starting",
12347    ///        "running",
12348    ///        "draining",
12349    ///        "stopping",
12350    ///        "standby"
12351    ///      ]
12352    ///    },
12353    ///    "uuid": {
12354    ///      "description": "The UUID of the instance.",
12355    ///      "examples": [
12356    ///        "123e4567-e89b-12d3-a456-426614174000"
12357    ///      ],
12358    ///      "type": "string",
12359    ///      "format": "uuid"
12360    ///    }
12361    ///  }
12362    ///}
12363    /// ```
12364    /// </details>
12365    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12366    pub struct StopInstanceResponseStoppedInstance {
12367        ///An optional error code providing additional information about the
12368        /// status. This field is useful when the status is not
12369        /// `success`.
12370        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12371        pub error: ::std::option::Option<i32>,
12372        ///An optional message providing additional information about the
12373        /// status. This field is useful when the status is not
12374        /// `success`.
12375        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12376        pub message: ::std::option::Option<::std::string::String>,
12377        ///The name of the instance.
12378        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12379        pub name: ::std::option::Option<::std::string::String>,
12380        ///The previous state of the instance before the stop operation was
12381        /// invoked.
12382        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12383        pub previous_state: ::std::option::Option<StopInstanceResponseStoppedInstancePreviousState>,
12384        ///The current state of the instance.
12385        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12386        pub state: ::std::option::Option<StopInstanceResponseStoppedInstanceState>,
12387        ///The UUID of the instance.
12388        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12389        pub uuid: ::std::option::Option<::uuid::Uuid>,
12390    }
12391
12392    impl ::std::convert::From<&StopInstanceResponseStoppedInstance>
12393        for StopInstanceResponseStoppedInstance
12394    {
12395        fn from(value: &StopInstanceResponseStoppedInstance) -> Self {
12396            value.clone()
12397        }
12398    }
12399
12400    impl ::std::default::Default for StopInstanceResponseStoppedInstance {
12401        fn default() -> Self {
12402            Self {
12403                error: Default::default(),
12404                message: Default::default(),
12405                name: Default::default(),
12406                previous_state: Default::default(),
12407                state: Default::default(),
12408                uuid: Default::default(),
12409            }
12410        }
12411    }
12412
12413    ///The previous state of the instance before the stop operation was
12414    /// invoked.
12415    ///
12416    /// <details><summary>JSON schema</summary>
12417    ///
12418    /// ```json
12419    ///{
12420    ///  "description": "The previous state of the instance before the stop
12421    /// operation was invoked.",
12422    ///  "type": "string",
12423    ///  "format": "enum",
12424    ///  "enum": [
12425    ///    "stopped",
12426    ///    "starting",
12427    ///    "running",
12428    ///    "draining",
12429    ///    "stopping",
12430    ///    "standby"
12431    ///  ]
12432    ///}
12433    /// ```
12434    /// </details>
12435    #[derive(
12436        :: serde :: Deserialize,
12437        :: serde :: Serialize,
12438        Clone,
12439        Copy,
12440        Debug,
12441        Eq,
12442        Hash,
12443        Ord,
12444        PartialEq,
12445        PartialOrd,
12446    )]
12447    pub enum StopInstanceResponseStoppedInstancePreviousState {
12448        #[serde(rename = "stopped")]
12449        Stopped,
12450        #[serde(rename = "starting")]
12451        Starting,
12452        #[serde(rename = "running")]
12453        Running,
12454        #[serde(rename = "draining")]
12455        Draining,
12456        #[serde(rename = "stopping")]
12457        Stopping,
12458        #[serde(rename = "standby")]
12459        Standby,
12460    }
12461
12462    impl ::std::convert::From<&Self> for StopInstanceResponseStoppedInstancePreviousState {
12463        fn from(value: &StopInstanceResponseStoppedInstancePreviousState) -> Self {
12464            value.clone()
12465        }
12466    }
12467
12468    impl ::std::fmt::Display for StopInstanceResponseStoppedInstancePreviousState {
12469        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12470            match *self {
12471                Self::Stopped => write!(f, "stopped"),
12472                Self::Starting => write!(f, "starting"),
12473                Self::Running => write!(f, "running"),
12474                Self::Draining => write!(f, "draining"),
12475                Self::Stopping => write!(f, "stopping"),
12476                Self::Standby => write!(f, "standby"),
12477            }
12478        }
12479    }
12480
12481    impl ::std::str::FromStr for StopInstanceResponseStoppedInstancePreviousState {
12482        type Err = self::error::ConversionError;
12483        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12484            match value {
12485                "stopped" => Ok(Self::Stopped),
12486                "starting" => Ok(Self::Starting),
12487                "running" => Ok(Self::Running),
12488                "draining" => Ok(Self::Draining),
12489                "stopping" => Ok(Self::Stopping),
12490                "standby" => Ok(Self::Standby),
12491                _ => Err("invalid value".into()),
12492            }
12493        }
12494    }
12495
12496    impl ::std::convert::TryFrom<&str> for StopInstanceResponseStoppedInstancePreviousState {
12497        type Error = self::error::ConversionError;
12498        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12499            value.parse()
12500        }
12501    }
12502
12503    impl ::std::convert::TryFrom<&::std::string::String>
12504        for StopInstanceResponseStoppedInstancePreviousState
12505    {
12506        type Error = self::error::ConversionError;
12507        fn try_from(
12508            value: &::std::string::String,
12509        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12510            value.parse()
12511        }
12512    }
12513
12514    impl ::std::convert::TryFrom<::std::string::String>
12515        for StopInstanceResponseStoppedInstancePreviousState
12516    {
12517        type Error = self::error::ConversionError;
12518        fn try_from(
12519            value: ::std::string::String,
12520        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12521            value.parse()
12522        }
12523    }
12524
12525    ///The current state of the instance.
12526    ///
12527    /// <details><summary>JSON schema</summary>
12528    ///
12529    /// ```json
12530    ///{
12531    ///  "description": "The current state of the instance.",
12532    ///  "type": "string",
12533    ///  "format": "enum",
12534    ///  "enum": [
12535    ///    "stopped",
12536    ///    "starting",
12537    ///    "running",
12538    ///    "draining",
12539    ///    "stopping",
12540    ///    "standby"
12541    ///  ]
12542    ///}
12543    /// ```
12544    /// </details>
12545    #[derive(
12546        :: serde :: Deserialize,
12547        :: serde :: Serialize,
12548        Clone,
12549        Copy,
12550        Debug,
12551        Eq,
12552        Hash,
12553        Ord,
12554        PartialEq,
12555        PartialOrd,
12556    )]
12557    pub enum StopInstanceResponseStoppedInstanceState {
12558        #[serde(rename = "stopped")]
12559        Stopped,
12560        #[serde(rename = "starting")]
12561        Starting,
12562        #[serde(rename = "running")]
12563        Running,
12564        #[serde(rename = "draining")]
12565        Draining,
12566        #[serde(rename = "stopping")]
12567        Stopping,
12568        #[serde(rename = "standby")]
12569        Standby,
12570    }
12571
12572    impl ::std::convert::From<&Self> for StopInstanceResponseStoppedInstanceState {
12573        fn from(value: &StopInstanceResponseStoppedInstanceState) -> Self {
12574            value.clone()
12575        }
12576    }
12577
12578    impl ::std::fmt::Display for StopInstanceResponseStoppedInstanceState {
12579        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12580            match *self {
12581                Self::Stopped => write!(f, "stopped"),
12582                Self::Starting => write!(f, "starting"),
12583                Self::Running => write!(f, "running"),
12584                Self::Draining => write!(f, "draining"),
12585                Self::Stopping => write!(f, "stopping"),
12586                Self::Standby => write!(f, "standby"),
12587            }
12588        }
12589    }
12590
12591    impl ::std::str::FromStr for StopInstanceResponseStoppedInstanceState {
12592        type Err = self::error::ConversionError;
12593        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12594            match value {
12595                "stopped" => Ok(Self::Stopped),
12596                "starting" => Ok(Self::Starting),
12597                "running" => Ok(Self::Running),
12598                "draining" => Ok(Self::Draining),
12599                "stopping" => Ok(Self::Stopping),
12600                "standby" => Ok(Self::Standby),
12601                _ => Err("invalid value".into()),
12602            }
12603        }
12604    }
12605
12606    impl ::std::convert::TryFrom<&str> for StopInstanceResponseStoppedInstanceState {
12607        type Error = self::error::ConversionError;
12608        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12609            value.parse()
12610        }
12611    }
12612
12613    impl ::std::convert::TryFrom<&::std::string::String> for StopInstanceResponseStoppedInstanceState {
12614        type Error = self::error::ConversionError;
12615        fn try_from(
12616            value: &::std::string::String,
12617        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12618            value.parse()
12619        }
12620    }
12621
12622    impl ::std::convert::TryFrom<::std::string::String> for StopInstanceResponseStoppedInstanceState {
12623        type Error = self::error::ConversionError;
12624        fn try_from(
12625            value: ::std::string::String,
12626        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12627            value.parse()
12628        }
12629    }
12630
12631    ///An identifier for the instance(s) to start.
12632    ///
12633    /// <details><summary>JSON schema</summary>
12634    ///
12635    /// ```json
12636    ///{
12637    ///  "description": "An identifier for the instance(s) to start.",
12638    ///  "type": "object",
12639    ///  "required": [
12640    ///    "name",
12641    ///    "uuid"
12642    ///  ],
12643    ///  "properties": {
12644    ///    "drain_timeout_ms": {
12645    ///      "description": "Timeout for draining connections in milliseconds.
12646    /// The instance does not\nreceive new connections in the draining phase.
12647    /// The instance is stopped\nwhen the last connection has been closed or the
12648    /// timeout expired.  The\nmaximum timeout may vary.  Use -1 for the largest
12649    /// possible value.\n\nNote: This endpoint does not block.  Use the wait
12650    /// endpoint for the\ninstance to reach the stopped state.",
12651    ///      "examples": [
12652    ///        250
12653    ///      ],
12654    ///      "type": "integer",
12655    ///      "format": "uint64"
12656    ///    },
12657    ///    "force": {
12658    ///      "description": "Whether to immediately force stop the instance.",
12659    ///      "examples": [
12660    ///        false
12661    ///      ],
12662    ///      "type": "boolean"
12663    ///    },
12664    ///    "name": {
12665    ///      "description": "The name of the instance to stop.  Mutually
12666    /// exclusive with UUID.",
12667    ///      "examples": [
12668    ///        "funky-town-g756b5d"
12669    ///      ],
12670    ///      "type": "string"
12671    ///    },
12672    ///    "uuid": {
12673    ///      "description": "The UUID of the instance to stop.  Mutually
12674    /// exclusive with name.",
12675    ///      "examples": [
12676    ///        "123e4567-e89b-12d3-a456-426614174000"
12677    ///      ],
12678    ///      "type": "string",
12679    ///      "format": "uuid"
12680    ///    }
12681    ///  }
12682    ///}
12683    /// ```
12684    /// </details>
12685    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12686    pub struct StopInstancesRequestId {
12687        ///Timeout for draining connections in milliseconds.  The instance does
12688        /// not receive new connections in the draining phase.  The
12689        /// instance is stopped when the last connection has been closed
12690        /// or the timeout expired.  The maximum timeout may vary.  Use
12691        /// -1 for the largest possible value.
12692        ///
12693        ///Note: This endpoint does not block.  Use the wait endpoint for the
12694        ///instance to reach the stopped state.
12695        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12696        pub drain_timeout_ms: ::std::option::Option<u64>,
12697        ///Whether to immediately force stop the instance.
12698        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12699        pub force: ::std::option::Option<bool>,
12700        ///The name of the instance to stop.  Mutually exclusive with UUID.
12701        pub name: ::std::string::String,
12702        ///The UUID of the instance to stop.  Mutually exclusive with name.
12703        pub uuid: ::uuid::Uuid,
12704    }
12705
12706    impl ::std::convert::From<&StopInstancesRequestId> for StopInstancesRequestId {
12707        fn from(value: &StopInstancesRequestId) -> Self {
12708            value.clone()
12709        }
12710    }
12711
12712    ///`UpdateInstanceByUuidRequestBody`
12713    ///
12714    /// <details><summary>JSON schema</summary>
12715    ///
12716    /// ```json
12717    ///{
12718    ///  "type": "object",
12719    ///  "required": [
12720    ///    "op",
12721    ///    "prop"
12722    ///  ],
12723    ///  "properties": {
12724    ///    "id": {
12725    ///      "description": "(Optional).  A client-provided identifier for
12726    /// tracking this operation in\nthe response.",
12727    ///      "examples": [
12728    ///        "op-1"
12729    ///      ],
12730    ///      "type": "string"
12731    ///    },
12732    ///    "op": {
12733    ///      "description": "The operation to perform on the property.",
12734    ///      "examples": [
12735    ///        "set"
12736    ///      ],
12737    ///      "type": "string",
12738    ///      "format": "enum",
12739    ///      "enum": [
12740    ///        "set",
12741    ///        "add",
12742    ///        "del"
12743    ///      ]
12744    ///    },
12745    ///    "prop": {
12746    ///      "description": "The property to modify.",
12747    ///      "examples": [
12748    ///        "memory_mb"
12749    ///      ],
12750    ///      "type": "string",
12751    ///      "format": "enum",
12752    ///      "enum": [
12753    ///        "image",
12754    ///        "args",
12755    ///        "env",
12756    ///        "memory_mb",
12757    ///        "vcpus",
12758    ///        "scale_to_zero",
12759    ///        "tags",
12760    ///        "delete_lock"
12761    ///      ]
12762    ///    },
12763    ///    "value": {
12764    ///      "description": "The value for the update operation. The type
12765    /// depends on the property and operation:\n- For \"image\": string\n- For
12766    /// \"args\": string or array of strings\n- For \"env\": object (for
12767    /// SET/ADD) or string/array of strings (for DEL)\n- For \"memory_mb\":
12768    /// integer\n- For \"vcpus\": integer\n- For \"scale_to_zero\": object with
12769    /// cooldown_time_ms, policy, and stateful fields\n- For \"tags\": array of
12770    /// strings\n- For \"delete_lock\": boolean",
12771    ///      "allOf": [
12772    ///        {
12773    ///          "$ref": "#/components/schemas/GoogleProtobufValue"
12774    ///        }
12775    ///      ]
12776    ///    }
12777    ///  }
12778    ///}
12779    /// ```
12780    /// </details>
12781    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
12782    pub struct UpdateInstanceByUuidRequestBody {
12783        ///(Optional).  A client-provided identifier for tracking this
12784        /// operation in the response.
12785        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12786        pub id: ::std::option::Option<::std::string::String>,
12787        ///The operation to perform on the property.
12788        pub op: UpdateInstanceByUuidRequestBodyOp,
12789        ///The property to modify.
12790        pub prop: UpdateInstanceByUuidRequestBodyProp,
12791        ///The value for the update operation. The type depends on the property
12792        /// and operation:
12793        /// - For "image": string
12794        /// - For "args": string or array of strings
12795        /// - For "env": object (for SET/ADD) or string/array of strings (for
12796        ///   DEL)
12797        /// - For "memory_mb": integer
12798        /// - For "vcpus": integer
12799        /// - For "scale_to_zero": object with cooldown_time_ms, policy, and
12800        ///   stateful fields
12801        /// - For "tags": array of strings
12802        /// - For "delete_lock": boolean
12803        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
12804        pub value: ::std::option::Option<GoogleProtobufValue>,
12805    }
12806
12807    impl ::std::convert::From<&UpdateInstanceByUuidRequestBody> for UpdateInstanceByUuidRequestBody {
12808        fn from(value: &UpdateInstanceByUuidRequestBody) -> Self {
12809            value.clone()
12810        }
12811    }
12812
12813    ///The operation to perform on the property.
12814    ///
12815    /// <details><summary>JSON schema</summary>
12816    ///
12817    /// ```json
12818    ///{
12819    ///  "description": "The operation to perform on the property.",
12820    ///  "examples": [
12821    ///    "set"
12822    ///  ],
12823    ///  "type": "string",
12824    ///  "format": "enum",
12825    ///  "enum": [
12826    ///    "set",
12827    ///    "add",
12828    ///    "del"
12829    ///  ]
12830    ///}
12831    /// ```
12832    /// </details>
12833    #[derive(
12834        :: serde :: Deserialize,
12835        :: serde :: Serialize,
12836        Clone,
12837        Copy,
12838        Debug,
12839        Eq,
12840        Hash,
12841        Ord,
12842        PartialEq,
12843        PartialOrd,
12844    )]
12845    pub enum UpdateInstanceByUuidRequestBodyOp {
12846        #[serde(rename = "set")]
12847        Set,
12848        #[serde(rename = "add")]
12849        Add,
12850        #[serde(rename = "del")]
12851        Del,
12852    }
12853
12854    impl ::std::convert::From<&Self> for UpdateInstanceByUuidRequestBodyOp {
12855        fn from(value: &UpdateInstanceByUuidRequestBodyOp) -> Self {
12856            value.clone()
12857        }
12858    }
12859
12860    impl ::std::fmt::Display for UpdateInstanceByUuidRequestBodyOp {
12861        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12862            match *self {
12863                Self::Set => write!(f, "set"),
12864                Self::Add => write!(f, "add"),
12865                Self::Del => write!(f, "del"),
12866            }
12867        }
12868    }
12869
12870    impl ::std::str::FromStr for UpdateInstanceByUuidRequestBodyOp {
12871        type Err = self::error::ConversionError;
12872        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12873            match value {
12874                "set" => Ok(Self::Set),
12875                "add" => Ok(Self::Add),
12876                "del" => Ok(Self::Del),
12877                _ => Err("invalid value".into()),
12878            }
12879        }
12880    }
12881
12882    impl ::std::convert::TryFrom<&str> for UpdateInstanceByUuidRequestBodyOp {
12883        type Error = self::error::ConversionError;
12884        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12885            value.parse()
12886        }
12887    }
12888
12889    impl ::std::convert::TryFrom<&::std::string::String> for UpdateInstanceByUuidRequestBodyOp {
12890        type Error = self::error::ConversionError;
12891        fn try_from(
12892            value: &::std::string::String,
12893        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12894            value.parse()
12895        }
12896    }
12897
12898    impl ::std::convert::TryFrom<::std::string::String> for UpdateInstanceByUuidRequestBodyOp {
12899        type Error = self::error::ConversionError;
12900        fn try_from(
12901            value: ::std::string::String,
12902        ) -> ::std::result::Result<Self, self::error::ConversionError> {
12903            value.parse()
12904        }
12905    }
12906
12907    ///The property to modify.
12908    ///
12909    /// <details><summary>JSON schema</summary>
12910    ///
12911    /// ```json
12912    ///{
12913    ///  "description": "The property to modify.",
12914    ///  "examples": [
12915    ///    "memory_mb"
12916    ///  ],
12917    ///  "type": "string",
12918    ///  "format": "enum",
12919    ///  "enum": [
12920    ///    "image",
12921    ///    "args",
12922    ///    "env",
12923    ///    "memory_mb",
12924    ///    "vcpus",
12925    ///    "scale_to_zero",
12926    ///    "tags",
12927    ///    "delete_lock"
12928    ///  ]
12929    ///}
12930    /// ```
12931    /// </details>
12932    #[derive(
12933        :: serde :: Deserialize,
12934        :: serde :: Serialize,
12935        Clone,
12936        Copy,
12937        Debug,
12938        Eq,
12939        Hash,
12940        Ord,
12941        PartialEq,
12942        PartialOrd,
12943    )]
12944    pub enum UpdateInstanceByUuidRequestBodyProp {
12945        #[serde(rename = "image")]
12946        Image,
12947        #[serde(rename = "args")]
12948        Args,
12949        #[serde(rename = "env")]
12950        Env,
12951        #[serde(rename = "memory_mb")]
12952        MemoryMb,
12953        #[serde(rename = "vcpus")]
12954        Vcpus,
12955        #[serde(rename = "scale_to_zero")]
12956        ScaleToZero,
12957        #[serde(rename = "tags")]
12958        Tags,
12959        #[serde(rename = "delete_lock")]
12960        DeleteLock,
12961    }
12962
12963    impl ::std::convert::From<&Self> for UpdateInstanceByUuidRequestBodyProp {
12964        fn from(value: &UpdateInstanceByUuidRequestBodyProp) -> Self {
12965            value.clone()
12966        }
12967    }
12968
12969    impl ::std::fmt::Display for UpdateInstanceByUuidRequestBodyProp {
12970        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
12971            match *self {
12972                Self::Image => write!(f, "image"),
12973                Self::Args => write!(f, "args"),
12974                Self::Env => write!(f, "env"),
12975                Self::MemoryMb => write!(f, "memory_mb"),
12976                Self::Vcpus => write!(f, "vcpus"),
12977                Self::ScaleToZero => write!(f, "scale_to_zero"),
12978                Self::Tags => write!(f, "tags"),
12979                Self::DeleteLock => write!(f, "delete_lock"),
12980            }
12981        }
12982    }
12983
12984    impl ::std::str::FromStr for UpdateInstanceByUuidRequestBodyProp {
12985        type Err = self::error::ConversionError;
12986        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
12987            match value {
12988                "image" => Ok(Self::Image),
12989                "args" => Ok(Self::Args),
12990                "env" => Ok(Self::Env),
12991                "memory_mb" => Ok(Self::MemoryMb),
12992                "vcpus" => Ok(Self::Vcpus),
12993                "scale_to_zero" => Ok(Self::ScaleToZero),
12994                "tags" => Ok(Self::Tags),
12995                "delete_lock" => Ok(Self::DeleteLock),
12996                _ => Err("invalid value".into()),
12997            }
12998        }
12999    }
13000
13001    impl ::std::convert::TryFrom<&str> for UpdateInstanceByUuidRequestBodyProp {
13002        type Error = self::error::ConversionError;
13003        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13004            value.parse()
13005        }
13006    }
13007
13008    impl ::std::convert::TryFrom<&::std::string::String> for UpdateInstanceByUuidRequestBodyProp {
13009        type Error = self::error::ConversionError;
13010        fn try_from(
13011            value: &::std::string::String,
13012        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13013            value.parse()
13014        }
13015    }
13016
13017    impl ::std::convert::TryFrom<::std::string::String> for UpdateInstanceByUuidRequestBodyProp {
13018        type Error = self::error::ConversionError;
13019        fn try_from(
13020            value: ::std::string::String,
13021        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13022            value.parse()
13023        }
13024    }
13025
13026    ///The request message for updating one or more instances.
13027    ///
13028    /// <details><summary>JSON schema</summary>
13029    ///
13030    /// ```json
13031    ///{
13032    ///  "description": "The request message for updating one or more
13033    /// instances.",
13034    ///  "type": "object",
13035    ///  "required": [
13036    ///    "op",
13037    ///    "prop"
13038    ///  ],
13039    ///  "properties": {
13040    ///    "id": {
13041    ///      "description": "(Optional).  A client-provided identifier for
13042    /// tracking this operation in the response.",
13043    ///      "examples": [
13044    ///        "op-1"
13045    ///      ],
13046    ///      "type": "string"
13047    ///    },
13048    ///    "name": {
13049    ///      "description": "The name of the instance to update. Mutually
13050    /// exclusive with UUID.",
13051    ///      "examples": [
13052    ///        "funky-town-g756b5d"
13053    ///      ],
13054    ///      "type": "string"
13055    ///    },
13056    ///    "op": {
13057    ///      "description": "The operation to perform on the property.",
13058    ///      "examples": [
13059    ///        "set"
13060    ///      ],
13061    ///      "type": "string",
13062    ///      "format": "enum",
13063    ///      "enum": [
13064    ///        "set",
13065    ///        "add",
13066    ///        "del"
13067    ///      ]
13068    ///    },
13069    ///    "prop": {
13070    ///      "description": "The property to modify.",
13071    ///      "examples": [
13072    ///        "memory_mb"
13073    ///      ],
13074    ///      "type": "string",
13075    ///      "format": "enum",
13076    ///      "enum": [
13077    ///        "image",
13078    ///        "args",
13079    ///        "env",
13080    ///        "memory_mb",
13081    ///        "vcpus",
13082    ///        "scale_to_zero",
13083    ///        "tags",
13084    ///        "delete_lock"
13085    ///      ]
13086    ///    },
13087    ///    "uuid": {
13088    ///      "description": "The UUID of the instance to update. Mutually
13089    /// exclusive with name.",
13090    ///      "examples": [
13091    ///        "123e4567-e89b-12d3-a456-426614174000"
13092    ///      ],
13093    ///      "type": "string",
13094    ///      "format": "uuid"
13095    ///    },
13096    ///    "value": {
13097    ///      "description": "The value for the update operation. The type
13098    /// depends on the property and operation:\n- For \"image\": string\n- For
13099    /// \"args\": string or array of strings\n- For \"env\": object (for
13100    /// SET/ADD) or string/array of strings (for DEL)\n- For \"memory_mb\":
13101    /// integer\n- For \"vcpus\": integer\n- For \"scale_to_zero\": object with
13102    /// cooldown_time_ms, policy, and stateful fields\n- For \"tags\": array of
13103    /// strings\n- For \"delete_lock\": boolean",
13104    ///      "allOf": [
13105    ///        {
13106    ///          "$ref": "#/components/schemas/GoogleProtobufValue"
13107    ///        }
13108    ///      ]
13109    ///    }
13110    ///  }
13111    ///}
13112    /// ```
13113    /// </details>
13114    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13115    pub struct UpdateInstancesRequest {
13116        ///(Optional).  A client-provided identifier for tracking this
13117        /// operation in the response.
13118        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13119        pub id: ::std::option::Option<::std::string::String>,
13120        ///The name of the instance to update. Mutually exclusive with UUID.
13121        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13122        pub name: ::std::option::Option<::std::string::String>,
13123        ///The operation to perform on the property.
13124        pub op: UpdateInstancesRequestOp,
13125        ///The property to modify.
13126        pub prop: UpdateInstancesRequestProp,
13127        ///The UUID of the instance to update. Mutually exclusive with name.
13128        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13129        pub uuid: ::std::option::Option<::uuid::Uuid>,
13130        ///The value for the update operation. The type depends on the property
13131        /// and operation:
13132        /// - For "image": string
13133        /// - For "args": string or array of strings
13134        /// - For "env": object (for SET/ADD) or string/array of strings (for
13135        ///   DEL)
13136        /// - For "memory_mb": integer
13137        /// - For "vcpus": integer
13138        /// - For "scale_to_zero": object with cooldown_time_ms, policy, and
13139        ///   stateful fields
13140        /// - For "tags": array of strings
13141        /// - For "delete_lock": boolean
13142        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13143        pub value: ::std::option::Option<GoogleProtobufValue>,
13144    }
13145
13146    impl ::std::convert::From<&UpdateInstancesRequest> for UpdateInstancesRequest {
13147        fn from(value: &UpdateInstancesRequest) -> Self {
13148            value.clone()
13149        }
13150    }
13151
13152    ///The operation to perform on the property.
13153    ///
13154    /// <details><summary>JSON schema</summary>
13155    ///
13156    /// ```json
13157    ///{
13158    ///  "description": "The operation to perform on the property.",
13159    ///  "examples": [
13160    ///    "set"
13161    ///  ],
13162    ///  "type": "string",
13163    ///  "format": "enum",
13164    ///  "enum": [
13165    ///    "set",
13166    ///    "add",
13167    ///    "del"
13168    ///  ]
13169    ///}
13170    /// ```
13171    /// </details>
13172    #[derive(
13173        :: serde :: Deserialize,
13174        :: serde :: Serialize,
13175        Clone,
13176        Copy,
13177        Debug,
13178        Eq,
13179        Hash,
13180        Ord,
13181        PartialEq,
13182        PartialOrd,
13183    )]
13184    pub enum UpdateInstancesRequestOp {
13185        #[serde(rename = "set")]
13186        Set,
13187        #[serde(rename = "add")]
13188        Add,
13189        #[serde(rename = "del")]
13190        Del,
13191    }
13192
13193    impl ::std::convert::From<&Self> for UpdateInstancesRequestOp {
13194        fn from(value: &UpdateInstancesRequestOp) -> Self {
13195            value.clone()
13196        }
13197    }
13198
13199    impl ::std::fmt::Display for UpdateInstancesRequestOp {
13200        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13201            match *self {
13202                Self::Set => write!(f, "set"),
13203                Self::Add => write!(f, "add"),
13204                Self::Del => write!(f, "del"),
13205            }
13206        }
13207    }
13208
13209    impl ::std::str::FromStr for UpdateInstancesRequestOp {
13210        type Err = self::error::ConversionError;
13211        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13212            match value {
13213                "set" => Ok(Self::Set),
13214                "add" => Ok(Self::Add),
13215                "del" => Ok(Self::Del),
13216                _ => Err("invalid value".into()),
13217            }
13218        }
13219    }
13220
13221    impl ::std::convert::TryFrom<&str> for UpdateInstancesRequestOp {
13222        type Error = self::error::ConversionError;
13223        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13224            value.parse()
13225        }
13226    }
13227
13228    impl ::std::convert::TryFrom<&::std::string::String> for UpdateInstancesRequestOp {
13229        type Error = self::error::ConversionError;
13230        fn try_from(
13231            value: &::std::string::String,
13232        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13233            value.parse()
13234        }
13235    }
13236
13237    impl ::std::convert::TryFrom<::std::string::String> for UpdateInstancesRequestOp {
13238        type Error = self::error::ConversionError;
13239        fn try_from(
13240            value: ::std::string::String,
13241        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13242            value.parse()
13243        }
13244    }
13245
13246    ///The property to modify.
13247    ///
13248    /// <details><summary>JSON schema</summary>
13249    ///
13250    /// ```json
13251    ///{
13252    ///  "description": "The property to modify.",
13253    ///  "examples": [
13254    ///    "memory_mb"
13255    ///  ],
13256    ///  "type": "string",
13257    ///  "format": "enum",
13258    ///  "enum": [
13259    ///    "image",
13260    ///    "args",
13261    ///    "env",
13262    ///    "memory_mb",
13263    ///    "vcpus",
13264    ///    "scale_to_zero",
13265    ///    "tags",
13266    ///    "delete_lock"
13267    ///  ]
13268    ///}
13269    /// ```
13270    /// </details>
13271    #[derive(
13272        :: serde :: Deserialize,
13273        :: serde :: Serialize,
13274        Clone,
13275        Copy,
13276        Debug,
13277        Eq,
13278        Hash,
13279        Ord,
13280        PartialEq,
13281        PartialOrd,
13282    )]
13283    pub enum UpdateInstancesRequestProp {
13284        #[serde(rename = "image")]
13285        Image,
13286        #[serde(rename = "args")]
13287        Args,
13288        #[serde(rename = "env")]
13289        Env,
13290        #[serde(rename = "memory_mb")]
13291        MemoryMb,
13292        #[serde(rename = "vcpus")]
13293        Vcpus,
13294        #[serde(rename = "scale_to_zero")]
13295        ScaleToZero,
13296        #[serde(rename = "tags")]
13297        Tags,
13298        #[serde(rename = "delete_lock")]
13299        DeleteLock,
13300    }
13301
13302    impl ::std::convert::From<&Self> for UpdateInstancesRequestProp {
13303        fn from(value: &UpdateInstancesRequestProp) -> Self {
13304            value.clone()
13305        }
13306    }
13307
13308    impl ::std::fmt::Display for UpdateInstancesRequestProp {
13309        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13310            match *self {
13311                Self::Image => write!(f, "image"),
13312                Self::Args => write!(f, "args"),
13313                Self::Env => write!(f, "env"),
13314                Self::MemoryMb => write!(f, "memory_mb"),
13315                Self::Vcpus => write!(f, "vcpus"),
13316                Self::ScaleToZero => write!(f, "scale_to_zero"),
13317                Self::Tags => write!(f, "tags"),
13318                Self::DeleteLock => write!(f, "delete_lock"),
13319            }
13320        }
13321    }
13322
13323    impl ::std::str::FromStr for UpdateInstancesRequestProp {
13324        type Err = self::error::ConversionError;
13325        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13326            match value {
13327                "image" => Ok(Self::Image),
13328                "args" => Ok(Self::Args),
13329                "env" => Ok(Self::Env),
13330                "memory_mb" => Ok(Self::MemoryMb),
13331                "vcpus" => Ok(Self::Vcpus),
13332                "scale_to_zero" => Ok(Self::ScaleToZero),
13333                "tags" => Ok(Self::Tags),
13334                "delete_lock" => Ok(Self::DeleteLock),
13335                _ => Err("invalid value".into()),
13336            }
13337        }
13338    }
13339
13340    impl ::std::convert::TryFrom<&str> for UpdateInstancesRequestProp {
13341        type Error = self::error::ConversionError;
13342        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13343            value.parse()
13344        }
13345    }
13346
13347    impl ::std::convert::TryFrom<&::std::string::String> for UpdateInstancesRequestProp {
13348        type Error = self::error::ConversionError;
13349        fn try_from(
13350            value: &::std::string::String,
13351        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13352            value.parse()
13353        }
13354    }
13355
13356    impl ::std::convert::TryFrom<::std::string::String> for UpdateInstancesRequestProp {
13357        type Error = self::error::ConversionError;
13358        fn try_from(
13359            value: ::std::string::String,
13360        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13361            value.parse()
13362        }
13363    }
13364
13365    ///The response message for updating one or more instances.
13366    ///
13367    /// <details><summary>JSON schema</summary>
13368    ///
13369    /// ```json
13370    ///{
13371    ///  "description": "The response message for updating one or more
13372    /// instances.",
13373    ///  "type": "object",
13374    ///  "properties": {
13375    ///    "data": {
13376    ///      "description": "The response data for this request.",
13377    ///      "allOf": [
13378    ///        {
13379    ///          "$ref": "#/components/schemas/UpdateInstancesResponseData"
13380    ///        }
13381    ///      ]
13382    ///    },
13383    ///    "errors": {
13384    ///      "description": "A list of errors which may have occurred during the
13385    /// request.",
13386    ///      "type": "array",
13387    ///      "items": {
13388    ///        "$ref": "#/components/schemas/ResponseError"
13389    ///      }
13390    ///    },
13391    ///    "message": {
13392    ///      "description": "An optional message providing additional
13393    /// information about the status.\nThis field is useful when the status is
13394    /// not `success`.",
13395    ///      "examples": [
13396    ///        "Failed to perform all operations"
13397    ///      ],
13398    ///      "type": "string"
13399    ///    },
13400    ///    "op_time_us": {
13401    ///      "description": "The operation time in microseconds.  This is the
13402    /// time it took to process\nthe request and generate the response.",
13403    ///      "examples": [
13404    ///        76
13405    ///      ],
13406    ///      "type": "integer",
13407    ///      "format": "uint64"
13408    ///    },
13409    ///    "status": {
13410    ///      "description": "The status of the response.",
13411    ///      "allOf": [
13412    ///        {
13413    ///          "$ref": "#/components/schemas/ResponseStatus"
13414    ///        }
13415    ///      ]
13416    ///    }
13417    ///  }
13418    ///}
13419    /// ```
13420    /// </details>
13421    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13422    pub struct UpdateInstancesResponse {
13423        ///The response data for this request.
13424        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13425        pub data: ::std::option::Option<UpdateInstancesResponseData>,
13426        ///A list of errors which may have occurred during the request.
13427        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
13428        pub errors: ::std::vec::Vec<ResponseError>,
13429        ///An optional message providing additional information about the
13430        /// status. This field is useful when the status is not
13431        /// `success`.
13432        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13433        pub message: ::std::option::Option<::std::string::String>,
13434        ///The operation time in microseconds.  This is the time it took to
13435        /// process the request and generate the response.
13436        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13437        pub op_time_us: ::std::option::Option<u64>,
13438        ///The status of the response.
13439        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13440        pub status: ::std::option::Option<ResponseStatus>,
13441    }
13442
13443    impl ::std::convert::From<&UpdateInstancesResponse> for UpdateInstancesResponse {
13444        fn from(value: &UpdateInstancesResponse) -> Self {
13445            value.clone()
13446        }
13447    }
13448
13449    impl ::std::default::Default for UpdateInstancesResponse {
13450        fn default() -> Self {
13451            Self {
13452                data: Default::default(),
13453                errors: Default::default(),
13454                message: Default::default(),
13455                op_time_us: Default::default(),
13456                status: Default::default(),
13457            }
13458        }
13459    }
13460
13461    ///`UpdateInstancesResponseData`
13462    ///
13463    /// <details><summary>JSON schema</summary>
13464    ///
13465    /// ```json
13466    ///{
13467    ///  "type": "object",
13468    ///  "properties": {
13469    ///    "instances": {
13470    ///      "description": "List of instances that were processed during the
13471    /// update operation.",
13472    ///      "type": "array",
13473    ///      "items": {
13474    ///        "$ref":
13475    /// "#/components/schemas/UpdateInstancesResponseUpdatedInstance"
13476    ///      }
13477    ///    }
13478    ///  }
13479    ///}
13480    /// ```
13481    /// </details>
13482    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13483    pub struct UpdateInstancesResponseData {
13484        ///List of instances that were processed during the update operation.
13485        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
13486        pub instances: ::std::vec::Vec<UpdateInstancesResponseUpdatedInstance>,
13487    }
13488
13489    impl ::std::convert::From<&UpdateInstancesResponseData> for UpdateInstancesResponseData {
13490        fn from(value: &UpdateInstancesResponseData) -> Self {
13491            value.clone()
13492        }
13493    }
13494
13495    impl ::std::default::Default for UpdateInstancesResponseData {
13496        fn default() -> Self {
13497            Self {
13498                instances: Default::default(),
13499            }
13500        }
13501    }
13502
13503    ///`UpdateInstancesResponseUpdatedInstance`
13504    ///
13505    /// <details><summary>JSON schema</summary>
13506    ///
13507    /// ```json
13508    ///{
13509    ///  "type": "object",
13510    ///  "properties": {
13511    ///    "error": {
13512    ///      "description": "An optional error code providing additional
13513    /// information about the status.\nThis field is useful when the status is
13514    /// not `success`.",
13515    ///      "examples": [
13516    ///        8
13517    ///      ],
13518    ///      "type": "integer",
13519    ///      "format": "int32"
13520    ///    },
13521    ///    "id": {
13522    ///      "description": "(Optional).  The client-provided ID from the
13523    /// request.",
13524    ///      "examples": [
13525    ///        "op-1"
13526    ///      ],
13527    ///      "type": "string"
13528    ///    },
13529    ///    "message": {
13530    ///      "description": "An optional message providing additional
13531    /// information about the status.\nThis field is useful when the status is
13532    /// not `success`.",
13533    ///      "examples": [
13534    ///        "No instance with name 'funky-town-g756b5d'"
13535    ///      ],
13536    ///      "type": "string"
13537    ///    },
13538    ///    "name": {
13539    ///      "description": "The name of the instance that was updated.",
13540    ///      "examples": [
13541    ///        "funky-town-g756b5d"
13542    ///      ],
13543    ///      "type": "string"
13544    ///    },
13545    ///    "status": {
13546    ///      "description": "The status of this particular instance update
13547    /// operation.",
13548    ///      "examples": [
13549    ///        "success"
13550    ///      ],
13551    ///      "type": "string"
13552    ///    },
13553    ///    "uuid": {
13554    ///      "description": "The UUID of the instance that was updated.",
13555    ///      "examples": [
13556    ///        "123e4567-e89b-12d3-a456-426614174000"
13557    ///      ],
13558    ///      "type": "string",
13559    ///      "format": "uuid"
13560    ///    }
13561    ///  }
13562    ///}
13563    /// ```
13564    /// </details>
13565    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13566    pub struct UpdateInstancesResponseUpdatedInstance {
13567        ///An optional error code providing additional information about the
13568        /// status. This field is useful when the status is not
13569        /// `success`.
13570        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13571        pub error: ::std::option::Option<i32>,
13572        ///(Optional).  The client-provided ID from the request.
13573        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13574        pub id: ::std::option::Option<::std::string::String>,
13575        ///An optional message providing additional information about the
13576        /// status. This field is useful when the status is not
13577        /// `success`.
13578        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13579        pub message: ::std::option::Option<::std::string::String>,
13580        ///The name of the instance that was updated.
13581        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13582        pub name: ::std::option::Option<::std::string::String>,
13583        ///The status of this particular instance update operation.
13584        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13585        pub status: ::std::option::Option<::std::string::String>,
13586        ///The UUID of the instance that was updated.
13587        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13588        pub uuid: ::std::option::Option<::uuid::Uuid>,
13589    }
13590
13591    impl ::std::convert::From<&UpdateInstancesResponseUpdatedInstance>
13592        for UpdateInstancesResponseUpdatedInstance
13593    {
13594        fn from(value: &UpdateInstancesResponseUpdatedInstance) -> Self {
13595            value.clone()
13596        }
13597    }
13598
13599    impl ::std::default::Default for UpdateInstancesResponseUpdatedInstance {
13600        fn default() -> Self {
13601            Self {
13602                error: Default::default(),
13603                id: Default::default(),
13604                message: Default::default(),
13605                name: Default::default(),
13606                status: Default::default(),
13607                uuid: Default::default(),
13608            }
13609        }
13610    }
13611
13612    ///`UpdateServiceGroupByUuidRequestBody`
13613    ///
13614    /// <details><summary>JSON schema</summary>
13615    ///
13616    /// ```json
13617    ///{
13618    ///  "type": "object",
13619    ///  "required": [
13620    ///    "op",
13621    ///    "prop"
13622    ///  ],
13623    ///  "properties": {
13624    ///    "id": {
13625    ///      "description": "(Optional).  A client-provided identifier for
13626    /// tracking this operation in the response.",
13627    ///      "examples": [
13628    ///        "op-1"
13629    ///      ],
13630    ///      "type": "string"
13631    ///    },
13632    ///    "op": {
13633    ///      "description": "The operation to perform.",
13634    ///      "examples": [
13635    ///        "set"
13636    ///      ],
13637    ///      "type": "string",
13638    ///      "format": "enum",
13639    ///      "enum": [
13640    ///        "set",
13641    ///        "add",
13642    ///        "del"
13643    ///      ]
13644    ///    },
13645    ///    "prop": {
13646    ///      "description": "The property to modify.",
13647    ///      "examples": [
13648    ///        "services"
13649    ///      ],
13650    ///      "type": "string",
13651    ///      "format": "enum",
13652    ///      "enum": [
13653    ///        "services",
13654    ///        "domains",
13655    ///        "soft_limit",
13656    ///        "hard_limit"
13657    ///      ]
13658    ///    },
13659    ///    "value": {
13660    ///      "description": "The value for the update operation:\n- For
13661    /// \"services\": array of Service objects\n- For \"domains\": array of
13662    /// Domain objects\n- For \"soft_limit\": integer (1–65535), must be <=
13663    /// \"hard_limit\"\n- For \"hard_limit\": integer (1–65535), must be >=
13664    /// \"soft_limit\"",
13665    ///      "allOf": [
13666    ///        {
13667    ///          "$ref": "#/components/schemas/GoogleProtobufValue"
13668    ///        }
13669    ///      ]
13670    ///    }
13671    ///  }
13672    ///}
13673    /// ```
13674    /// </details>
13675    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13676    pub struct UpdateServiceGroupByUuidRequestBody {
13677        ///(Optional).  A client-provided identifier for tracking this
13678        /// operation in the response.
13679        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13680        pub id: ::std::option::Option<::std::string::String>,
13681        ///The operation to perform.
13682        pub op: UpdateServiceGroupByUuidRequestBodyOp,
13683        ///The property to modify.
13684        pub prop: UpdateServiceGroupByUuidRequestBodyProp,
13685        ///The value for the update operation:
13686        /// - For "services": array of Service objects
13687        /// - For "domains": array of Domain objects
13688        /// - For "soft_limit": integer (1–65535), must be <= "hard_limit"
13689        /// - For "hard_limit": integer (1–65535), must be >= "soft_limit"
13690        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13691        pub value: ::std::option::Option<GoogleProtobufValue>,
13692    }
13693
13694    impl ::std::convert::From<&UpdateServiceGroupByUuidRequestBody>
13695        for UpdateServiceGroupByUuidRequestBody
13696    {
13697        fn from(value: &UpdateServiceGroupByUuidRequestBody) -> Self {
13698            value.clone()
13699        }
13700    }
13701
13702    ///The operation to perform.
13703    ///
13704    /// <details><summary>JSON schema</summary>
13705    ///
13706    /// ```json
13707    ///{
13708    ///  "description": "The operation to perform.",
13709    ///  "examples": [
13710    ///    "set"
13711    ///  ],
13712    ///  "type": "string",
13713    ///  "format": "enum",
13714    ///  "enum": [
13715    ///    "set",
13716    ///    "add",
13717    ///    "del"
13718    ///  ]
13719    ///}
13720    /// ```
13721    /// </details>
13722    #[derive(
13723        :: serde :: Deserialize,
13724        :: serde :: Serialize,
13725        Clone,
13726        Copy,
13727        Debug,
13728        Eq,
13729        Hash,
13730        Ord,
13731        PartialEq,
13732        PartialOrd,
13733    )]
13734    pub enum UpdateServiceGroupByUuidRequestBodyOp {
13735        #[serde(rename = "set")]
13736        Set,
13737        #[serde(rename = "add")]
13738        Add,
13739        #[serde(rename = "del")]
13740        Del,
13741    }
13742
13743    impl ::std::convert::From<&Self> for UpdateServiceGroupByUuidRequestBodyOp {
13744        fn from(value: &UpdateServiceGroupByUuidRequestBodyOp) -> Self {
13745            value.clone()
13746        }
13747    }
13748
13749    impl ::std::fmt::Display for UpdateServiceGroupByUuidRequestBodyOp {
13750        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13751            match *self {
13752                Self::Set => write!(f, "set"),
13753                Self::Add => write!(f, "add"),
13754                Self::Del => write!(f, "del"),
13755            }
13756        }
13757    }
13758
13759    impl ::std::str::FromStr for UpdateServiceGroupByUuidRequestBodyOp {
13760        type Err = self::error::ConversionError;
13761        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13762            match value {
13763                "set" => Ok(Self::Set),
13764                "add" => Ok(Self::Add),
13765                "del" => Ok(Self::Del),
13766                _ => Err("invalid value".into()),
13767            }
13768        }
13769    }
13770
13771    impl ::std::convert::TryFrom<&str> for UpdateServiceGroupByUuidRequestBodyOp {
13772        type Error = self::error::ConversionError;
13773        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13774            value.parse()
13775        }
13776    }
13777
13778    impl ::std::convert::TryFrom<&::std::string::String> for UpdateServiceGroupByUuidRequestBodyOp {
13779        type Error = self::error::ConversionError;
13780        fn try_from(
13781            value: &::std::string::String,
13782        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13783            value.parse()
13784        }
13785    }
13786
13787    impl ::std::convert::TryFrom<::std::string::String> for UpdateServiceGroupByUuidRequestBodyOp {
13788        type Error = self::error::ConversionError;
13789        fn try_from(
13790            value: ::std::string::String,
13791        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13792            value.parse()
13793        }
13794    }
13795
13796    ///The property to modify.
13797    ///
13798    /// <details><summary>JSON schema</summary>
13799    ///
13800    /// ```json
13801    ///{
13802    ///  "description": "The property to modify.",
13803    ///  "examples": [
13804    ///    "services"
13805    ///  ],
13806    ///  "type": "string",
13807    ///  "format": "enum",
13808    ///  "enum": [
13809    ///    "services",
13810    ///    "domains",
13811    ///    "soft_limit",
13812    ///    "hard_limit"
13813    ///  ]
13814    ///}
13815    /// ```
13816    /// </details>
13817    #[derive(
13818        :: serde :: Deserialize,
13819        :: serde :: Serialize,
13820        Clone,
13821        Copy,
13822        Debug,
13823        Eq,
13824        Hash,
13825        Ord,
13826        PartialEq,
13827        PartialOrd,
13828    )]
13829    pub enum UpdateServiceGroupByUuidRequestBodyProp {
13830        #[serde(rename = "services")]
13831        Services,
13832        #[serde(rename = "domains")]
13833        Domains,
13834        #[serde(rename = "soft_limit")]
13835        SoftLimit,
13836        #[serde(rename = "hard_limit")]
13837        HardLimit,
13838    }
13839
13840    impl ::std::convert::From<&Self> for UpdateServiceGroupByUuidRequestBodyProp {
13841        fn from(value: &UpdateServiceGroupByUuidRequestBodyProp) -> Self {
13842            value.clone()
13843        }
13844    }
13845
13846    impl ::std::fmt::Display for UpdateServiceGroupByUuidRequestBodyProp {
13847        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
13848            match *self {
13849                Self::Services => write!(f, "services"),
13850                Self::Domains => write!(f, "domains"),
13851                Self::SoftLimit => write!(f, "soft_limit"),
13852                Self::HardLimit => write!(f, "hard_limit"),
13853            }
13854        }
13855    }
13856
13857    impl ::std::str::FromStr for UpdateServiceGroupByUuidRequestBodyProp {
13858        type Err = self::error::ConversionError;
13859        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13860            match value {
13861                "services" => Ok(Self::Services),
13862                "domains" => Ok(Self::Domains),
13863                "soft_limit" => Ok(Self::SoftLimit),
13864                "hard_limit" => Ok(Self::HardLimit),
13865                _ => Err("invalid value".into()),
13866            }
13867        }
13868    }
13869
13870    impl ::std::convert::TryFrom<&str> for UpdateServiceGroupByUuidRequestBodyProp {
13871        type Error = self::error::ConversionError;
13872        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
13873            value.parse()
13874        }
13875    }
13876
13877    impl ::std::convert::TryFrom<&::std::string::String> for UpdateServiceGroupByUuidRequestBodyProp {
13878        type Error = self::error::ConversionError;
13879        fn try_from(
13880            value: &::std::string::String,
13881        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13882            value.parse()
13883        }
13884    }
13885
13886    impl ::std::convert::TryFrom<::std::string::String> for UpdateServiceGroupByUuidRequestBodyProp {
13887        type Error = self::error::ConversionError;
13888        fn try_from(
13889            value: ::std::string::String,
13890        ) -> ::std::result::Result<Self, self::error::ConversionError> {
13891            value.parse()
13892        }
13893    }
13894
13895    ///A single update operation to be applied to a service group
13896    ///
13897    /// <details><summary>JSON schema</summary>
13898    ///
13899    /// ```json
13900    ///{
13901    ///  "description": "A single update operation to be applied to a service
13902    /// group",
13903    ///  "type": "object",
13904    ///  "required": [
13905    ///    "op",
13906    ///    "prop"
13907    ///  ],
13908    ///  "properties": {
13909    ///    "id": {
13910    ///      "description": "(Optional).  A client-provided identifier for
13911    /// tracking this operation in the response.",
13912    ///      "examples": [
13913    ///        "op-1"
13914    ///      ],
13915    ///      "type": "string"
13916    ///    },
13917    ///    "name": {
13918    ///      "description": "The name of the service group to update.  Mutually
13919    /// exclusive with UUID.",
13920    ///      "examples": [
13921    ///        "funky-town-g756b5d"
13922    ///      ],
13923    ///      "type": "string"
13924    ///    },
13925    ///    "op": {
13926    ///      "description": "The operation to perform.",
13927    ///      "examples": [
13928    ///        "set"
13929    ///      ],
13930    ///      "type": "string",
13931    ///      "format": "enum",
13932    ///      "enum": [
13933    ///        "set",
13934    ///        "add",
13935    ///        "del"
13936    ///      ]
13937    ///    },
13938    ///    "prop": {
13939    ///      "description": "The property to modify.",
13940    ///      "examples": [
13941    ///        "services"
13942    ///      ],
13943    ///      "type": "string",
13944    ///      "format": "enum",
13945    ///      "enum": [
13946    ///        "services",
13947    ///        "domains",
13948    ///        "soft_limit",
13949    ///        "hard_limit"
13950    ///      ]
13951    ///    },
13952    ///    "uuid": {
13953    ///      "description": "The UUID of the service group to update.  Mutually
13954    /// exclusive with name.",
13955    ///      "examples": [
13956    ///        "123e4567-e89b-12d3-a456-426614174000"
13957    ///      ],
13958    ///      "type": "string",
13959    ///      "format": "uuid"
13960    ///    },
13961    ///    "value": {
13962    ///      "description": "The value for the update operation:\n- For
13963    /// \"services\": array of Service objects\n- For \"domains\": array of
13964    /// Domain objects\n- For \"soft_limit\": integer (1–65535), must be <=
13965    /// \"hard_limit\"\n- For \"hard_limit\": integer (1–65535), must be >=
13966    /// \"soft_limit\"",
13967    ///      "allOf": [
13968    ///        {
13969    ///          "$ref": "#/components/schemas/GoogleProtobufValue"
13970    ///        }
13971    ///      ]
13972    ///    }
13973    ///  }
13974    ///}
13975    /// ```
13976    /// </details>
13977    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
13978    pub struct UpdateServiceGroupsRequestItem {
13979        ///(Optional).  A client-provided identifier for tracking this
13980        /// operation in the response.
13981        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13982        pub id: ::std::option::Option<::std::string::String>,
13983        ///The name of the service group to update.  Mutually exclusive with
13984        /// UUID.
13985        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13986        pub name: ::std::option::Option<::std::string::String>,
13987        ///The operation to perform.
13988        pub op: UpdateServiceGroupsRequestItemOp,
13989        ///The property to modify.
13990        pub prop: UpdateServiceGroupsRequestItemProp,
13991        ///The UUID of the service group to update.  Mutually exclusive with
13992        /// name.
13993        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
13994        pub uuid: ::std::option::Option<::uuid::Uuid>,
13995        ///The value for the update operation:
13996        /// - For "services": array of Service objects
13997        /// - For "domains": array of Domain objects
13998        /// - For "soft_limit": integer (1–65535), must be <= "hard_limit"
13999        /// - For "hard_limit": integer (1–65535), must be >= "soft_limit"
14000        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14001        pub value: ::std::option::Option<GoogleProtobufValue>,
14002    }
14003
14004    impl ::std::convert::From<&UpdateServiceGroupsRequestItem> for UpdateServiceGroupsRequestItem {
14005        fn from(value: &UpdateServiceGroupsRequestItem) -> Self {
14006            value.clone()
14007        }
14008    }
14009
14010    ///The operation to perform.
14011    ///
14012    /// <details><summary>JSON schema</summary>
14013    ///
14014    /// ```json
14015    ///{
14016    ///  "description": "The operation to perform.",
14017    ///  "examples": [
14018    ///    "set"
14019    ///  ],
14020    ///  "type": "string",
14021    ///  "format": "enum",
14022    ///  "enum": [
14023    ///    "set",
14024    ///    "add",
14025    ///    "del"
14026    ///  ]
14027    ///}
14028    /// ```
14029    /// </details>
14030    #[derive(
14031        :: serde :: Deserialize,
14032        :: serde :: Serialize,
14033        Clone,
14034        Copy,
14035        Debug,
14036        Eq,
14037        Hash,
14038        Ord,
14039        PartialEq,
14040        PartialOrd,
14041    )]
14042    pub enum UpdateServiceGroupsRequestItemOp {
14043        #[serde(rename = "set")]
14044        Set,
14045        #[serde(rename = "add")]
14046        Add,
14047        #[serde(rename = "del")]
14048        Del,
14049    }
14050
14051    impl ::std::convert::From<&Self> for UpdateServiceGroupsRequestItemOp {
14052        fn from(value: &UpdateServiceGroupsRequestItemOp) -> Self {
14053            value.clone()
14054        }
14055    }
14056
14057    impl ::std::fmt::Display for UpdateServiceGroupsRequestItemOp {
14058        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14059            match *self {
14060                Self::Set => write!(f, "set"),
14061                Self::Add => write!(f, "add"),
14062                Self::Del => write!(f, "del"),
14063            }
14064        }
14065    }
14066
14067    impl ::std::str::FromStr for UpdateServiceGroupsRequestItemOp {
14068        type Err = self::error::ConversionError;
14069        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14070            match value {
14071                "set" => Ok(Self::Set),
14072                "add" => Ok(Self::Add),
14073                "del" => Ok(Self::Del),
14074                _ => Err("invalid value".into()),
14075            }
14076        }
14077    }
14078
14079    impl ::std::convert::TryFrom<&str> for UpdateServiceGroupsRequestItemOp {
14080        type Error = self::error::ConversionError;
14081        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14082            value.parse()
14083        }
14084    }
14085
14086    impl ::std::convert::TryFrom<&::std::string::String> for UpdateServiceGroupsRequestItemOp {
14087        type Error = self::error::ConversionError;
14088        fn try_from(
14089            value: &::std::string::String,
14090        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14091            value.parse()
14092        }
14093    }
14094
14095    impl ::std::convert::TryFrom<::std::string::String> for UpdateServiceGroupsRequestItemOp {
14096        type Error = self::error::ConversionError;
14097        fn try_from(
14098            value: ::std::string::String,
14099        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14100            value.parse()
14101        }
14102    }
14103
14104    ///The property to modify.
14105    ///
14106    /// <details><summary>JSON schema</summary>
14107    ///
14108    /// ```json
14109    ///{
14110    ///  "description": "The property to modify.",
14111    ///  "examples": [
14112    ///    "services"
14113    ///  ],
14114    ///  "type": "string",
14115    ///  "format": "enum",
14116    ///  "enum": [
14117    ///    "services",
14118    ///    "domains",
14119    ///    "soft_limit",
14120    ///    "hard_limit"
14121    ///  ]
14122    ///}
14123    /// ```
14124    /// </details>
14125    #[derive(
14126        :: serde :: Deserialize,
14127        :: serde :: Serialize,
14128        Clone,
14129        Copy,
14130        Debug,
14131        Eq,
14132        Hash,
14133        Ord,
14134        PartialEq,
14135        PartialOrd,
14136    )]
14137    pub enum UpdateServiceGroupsRequestItemProp {
14138        #[serde(rename = "services")]
14139        Services,
14140        #[serde(rename = "domains")]
14141        Domains,
14142        #[serde(rename = "soft_limit")]
14143        SoftLimit,
14144        #[serde(rename = "hard_limit")]
14145        HardLimit,
14146    }
14147
14148    impl ::std::convert::From<&Self> for UpdateServiceGroupsRequestItemProp {
14149        fn from(value: &UpdateServiceGroupsRequestItemProp) -> Self {
14150            value.clone()
14151        }
14152    }
14153
14154    impl ::std::fmt::Display for UpdateServiceGroupsRequestItemProp {
14155        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14156            match *self {
14157                Self::Services => write!(f, "services"),
14158                Self::Domains => write!(f, "domains"),
14159                Self::SoftLimit => write!(f, "soft_limit"),
14160                Self::HardLimit => write!(f, "hard_limit"),
14161            }
14162        }
14163    }
14164
14165    impl ::std::str::FromStr for UpdateServiceGroupsRequestItemProp {
14166        type Err = self::error::ConversionError;
14167        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14168            match value {
14169                "services" => Ok(Self::Services),
14170                "domains" => Ok(Self::Domains),
14171                "soft_limit" => Ok(Self::SoftLimit),
14172                "hard_limit" => Ok(Self::HardLimit),
14173                _ => Err("invalid value".into()),
14174            }
14175        }
14176    }
14177
14178    impl ::std::convert::TryFrom<&str> for UpdateServiceGroupsRequestItemProp {
14179        type Error = self::error::ConversionError;
14180        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14181            value.parse()
14182        }
14183    }
14184
14185    impl ::std::convert::TryFrom<&::std::string::String> for UpdateServiceGroupsRequestItemProp {
14186        type Error = self::error::ConversionError;
14187        fn try_from(
14188            value: &::std::string::String,
14189        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14190            value.parse()
14191        }
14192    }
14193
14194    impl ::std::convert::TryFrom<::std::string::String> for UpdateServiceGroupsRequestItemProp {
14195        type Error = self::error::ConversionError;
14196        fn try_from(
14197            value: ::std::string::String,
14198        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14199            value.parse()
14200        }
14201    }
14202
14203    ///The response message for updating one or more service groups.
14204    ///
14205    /// <details><summary>JSON schema</summary>
14206    ///
14207    /// ```json
14208    ///{
14209    ///  "description": "The response message for updating one or more service
14210    /// groups.",
14211    ///  "type": "object",
14212    ///  "properties": {
14213    ///    "data": {
14214    ///      "description": "The response data for this request.",
14215    ///      "allOf": [
14216    ///        {
14217    ///          "$ref": "#/components/schemas/UpdateServiceGroupsResponseData"
14218    ///        }
14219    ///      ]
14220    ///    },
14221    ///    "errors": {
14222    ///      "description": "A list of errors which may have occurred during the
14223    /// request.",
14224    ///      "type": "array",
14225    ///      "items": {
14226    ///        "$ref": "#/components/schemas/ResponseError"
14227    ///      }
14228    ///    },
14229    ///    "message": {
14230    ///      "description": "An optional message providing additional
14231    /// information about the status.\nThis field is useful when the status is
14232    /// not `success`.",
14233    ///      "examples": [
14234    ///        "Failed to perform all operations"
14235    ///      ],
14236    ///      "type": "string"
14237    ///    },
14238    ///    "op_time_us": {
14239    ///      "description": "The operation time in microseconds.  This is the
14240    /// time it took to process\nthe request and generate the response.",
14241    ///      "examples": [
14242    ///        76
14243    ///      ],
14244    ///      "type": "integer",
14245    ///      "format": "uint64"
14246    ///    },
14247    ///    "status": {
14248    ///      "description": "The status of the response.",
14249    ///      "allOf": [
14250    ///        {
14251    ///          "$ref": "#/components/schemas/ResponseStatus"
14252    ///        }
14253    ///      ]
14254    ///    }
14255    ///  }
14256    ///}
14257    /// ```
14258    /// </details>
14259    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14260    pub struct UpdateServiceGroupsResponse {
14261        ///The response data for this request.
14262        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14263        pub data: ::std::option::Option<UpdateServiceGroupsResponseData>,
14264        ///A list of errors which may have occurred during the request.
14265        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
14266        pub errors: ::std::vec::Vec<ResponseError>,
14267        ///An optional message providing additional information about the
14268        /// status. This field is useful when the status is not
14269        /// `success`.
14270        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14271        pub message: ::std::option::Option<::std::string::String>,
14272        ///The operation time in microseconds.  This is the time it took to
14273        /// process the request and generate the response.
14274        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14275        pub op_time_us: ::std::option::Option<u64>,
14276        ///The status of the response.
14277        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14278        pub status: ::std::option::Option<ResponseStatus>,
14279    }
14280
14281    impl ::std::convert::From<&UpdateServiceGroupsResponse> for UpdateServiceGroupsResponse {
14282        fn from(value: &UpdateServiceGroupsResponse) -> Self {
14283            value.clone()
14284        }
14285    }
14286
14287    impl ::std::default::Default for UpdateServiceGroupsResponse {
14288        fn default() -> Self {
14289            Self {
14290                data: Default::default(),
14291                errors: Default::default(),
14292                message: Default::default(),
14293                op_time_us: Default::default(),
14294                status: Default::default(),
14295            }
14296        }
14297    }
14298
14299    ///`UpdateServiceGroupsResponseData`
14300    ///
14301    /// <details><summary>JSON schema</summary>
14302    ///
14303    /// ```json
14304    ///{
14305    ///  "type": "object",
14306    ///  "properties": {
14307    ///    "service_groups": {
14308    ///      "description": "List of service groups that were processed during
14309    /// the update operation.",
14310    ///      "type": "array",
14311    ///      "items": {
14312    ///        "$ref":
14313    /// "#/components/schemas/UpdateServiceGroupsResponseUpdatedServiceGroup"
14314    ///      }
14315    ///    }
14316    ///  }
14317    ///}
14318    /// ```
14319    /// </details>
14320    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14321    pub struct UpdateServiceGroupsResponseData {
14322        ///List of service groups that were processed during the update
14323        /// operation.
14324        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
14325        pub service_groups: ::std::vec::Vec<UpdateServiceGroupsResponseUpdatedServiceGroup>,
14326    }
14327
14328    impl ::std::convert::From<&UpdateServiceGroupsResponseData> for UpdateServiceGroupsResponseData {
14329        fn from(value: &UpdateServiceGroupsResponseData) -> Self {
14330            value.clone()
14331        }
14332    }
14333
14334    impl ::std::default::Default for UpdateServiceGroupsResponseData {
14335        fn default() -> Self {
14336            Self {
14337                service_groups: Default::default(),
14338            }
14339        }
14340    }
14341
14342    ///`UpdateServiceGroupsResponseUpdatedServiceGroup`
14343    ///
14344    /// <details><summary>JSON schema</summary>
14345    ///
14346    /// ```json
14347    ///{
14348    ///  "type": "object",
14349    ///  "properties": {
14350    ///    "error": {
14351    ///      "description": "An optional error code providing additional
14352    /// information about the status.\nThis field is only set when this message
14353    /// object is used as a response\nmessage, and is useful when the status is
14354    /// not `success`.",
14355    ///      "examples": [
14356    ///        8
14357    ///      ],
14358    ///      "type": "integer",
14359    ///      "format": "int32"
14360    ///    },
14361    ///    "id": {
14362    ///      "description": "(Optional).  The client-provided ID from the
14363    /// request.",
14364    ///      "examples": [
14365    ///        "op-1"
14366    ///      ],
14367    ///      "type": "string"
14368    ///    },
14369    ///    "message": {
14370    ///      "description": "An optional message providing additional
14371    /// information about the status.\nThis field is only set when this message
14372    /// object is used as a response\nmessage, and is useful when the status is
14373    /// not `success`.",
14374    ///      "examples": [
14375    ///        "No service with name 'funky-town-g756b5d'"
14376    ///      ],
14377    ///      "type": "string"
14378    ///    },
14379    ///    "name": {
14380    ///      "description": "The name of the service group that was updated.",
14381    ///      "examples": [
14382    ///        "funky-town-g756b5d"
14383    ///      ],
14384    ///      "type": "string"
14385    ///    },
14386    ///    "status": {
14387    ///      "description": "The status of this particular service group update
14388    /// operation.",
14389    ///      "examples": [
14390    ///        "success"
14391    ///      ],
14392    ///      "type": "string"
14393    ///    },
14394    ///    "uuid": {
14395    ///      "description": "The UUID of the service group that was updated.",
14396    ///      "examples": [
14397    ///        "123e4567-e89b-12d3-a456-426614174000"
14398    ///      ],
14399    ///      "type": "string",
14400    ///      "format": "uuid"
14401    ///    }
14402    ///  }
14403    ///}
14404    /// ```
14405    /// </details>
14406    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14407    pub struct UpdateServiceGroupsResponseUpdatedServiceGroup {
14408        ///An optional error code providing additional information about the
14409        /// status. This field is only set when this message object is
14410        /// used as a response message, and is useful when the status is
14411        /// not `success`.
14412        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14413        pub error: ::std::option::Option<i32>,
14414        ///(Optional).  The client-provided ID from the request.
14415        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14416        pub id: ::std::option::Option<::std::string::String>,
14417        ///An optional message providing additional information about the
14418        /// status. This field is only set when this message object is
14419        /// used as a response message, and is useful when the status is
14420        /// not `success`.
14421        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14422        pub message: ::std::option::Option<::std::string::String>,
14423        ///The name of the service group that was updated.
14424        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14425        pub name: ::std::option::Option<::std::string::String>,
14426        ///The status of this particular service group update operation.
14427        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14428        pub status: ::std::option::Option<::std::string::String>,
14429        ///The UUID of the service group that was updated.
14430        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14431        pub uuid: ::std::option::Option<::uuid::Uuid>,
14432    }
14433
14434    impl ::std::convert::From<&UpdateServiceGroupsResponseUpdatedServiceGroup>
14435        for UpdateServiceGroupsResponseUpdatedServiceGroup
14436    {
14437        fn from(value: &UpdateServiceGroupsResponseUpdatedServiceGroup) -> Self {
14438            value.clone()
14439        }
14440    }
14441
14442    impl ::std::default::Default for UpdateServiceGroupsResponseUpdatedServiceGroup {
14443        fn default() -> Self {
14444            Self {
14445                error: Default::default(),
14446                id: Default::default(),
14447                message: Default::default(),
14448                name: Default::default(),
14449                status: Default::default(),
14450                uuid: Default::default(),
14451            }
14452        }
14453    }
14454
14455    ///`UpdateVolumeByUuidRequestBody`
14456    ///
14457    /// <details><summary>JSON schema</summary>
14458    ///
14459    /// ```json
14460    ///{
14461    ///  "type": "object",
14462    ///  "required": [
14463    ///    "op",
14464    ///    "prop"
14465    ///  ],
14466    ///  "properties": {
14467    ///    "id": {
14468    ///      "description": "(Optional).  A client-provided identifier for
14469    /// tracking this operation in the response.",
14470    ///      "examples": [
14471    ///        "op-1"
14472    ///      ],
14473    ///      "type": "string"
14474    ///    },
14475    ///    "op": {
14476    ///      "description": "The operation to perform.",
14477    ///      "examples": [
14478    ///        "set"
14479    ///      ],
14480    ///      "type": "string",
14481    ///      "format": "enum",
14482    ///      "enum": [
14483    ///        "set",
14484    ///        "add",
14485    ///        "del"
14486    ///      ]
14487    ///    },
14488    ///    "prop": {
14489    ///      "description": "The property to modify.",
14490    ///      "examples": [
14491    ///        "size_mb"
14492    ///      ],
14493    ///      "type": "string",
14494    ///      "format": "enum",
14495    ///      "enum": [
14496    ///        "size_mb",
14497    ///        "tags",
14498    ///        "quota_policy",
14499    ///        "delete_lock"
14500    ///      ]
14501    ///    },
14502    ///    "value": {
14503    ///      "description": "The value for the update operation. The type
14504    /// depends on the property and operation:\n- For \"size_mb\": unsigned
14505    /// integer\n- For \"quota_policy\": \"static\" or \"dynamic\"\n- For
14506    /// \"tags\": array of Strings\n- For \"delete_lock\": boolean",
14507    ///      "allOf": [
14508    ///        {
14509    ///          "$ref": "#/components/schemas/GoogleProtobufValue"
14510    ///        }
14511    ///      ]
14512    ///    }
14513    ///  }
14514    ///}
14515    /// ```
14516    /// </details>
14517    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14518    pub struct UpdateVolumeByUuidRequestBody {
14519        ///(Optional).  A client-provided identifier for tracking this
14520        /// operation in the response.
14521        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14522        pub id: ::std::option::Option<::std::string::String>,
14523        ///The operation to perform.
14524        pub op: UpdateVolumeByUuidRequestBodyOp,
14525        ///The property to modify.
14526        pub prop: UpdateVolumeByUuidRequestBodyProp,
14527        ///The value for the update operation. The type depends on the property
14528        /// and operation:
14529        /// - For "size_mb": unsigned integer
14530        /// - For "quota_policy": "static" or "dynamic"
14531        /// - For "tags": array of Strings
14532        /// - For "delete_lock": boolean
14533        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14534        pub value: ::std::option::Option<GoogleProtobufValue>,
14535    }
14536
14537    impl ::std::convert::From<&UpdateVolumeByUuidRequestBody> for UpdateVolumeByUuidRequestBody {
14538        fn from(value: &UpdateVolumeByUuidRequestBody) -> Self {
14539            value.clone()
14540        }
14541    }
14542
14543    ///The operation to perform.
14544    ///
14545    /// <details><summary>JSON schema</summary>
14546    ///
14547    /// ```json
14548    ///{
14549    ///  "description": "The operation to perform.",
14550    ///  "examples": [
14551    ///    "set"
14552    ///  ],
14553    ///  "type": "string",
14554    ///  "format": "enum",
14555    ///  "enum": [
14556    ///    "set",
14557    ///    "add",
14558    ///    "del"
14559    ///  ]
14560    ///}
14561    /// ```
14562    /// </details>
14563    #[derive(
14564        :: serde :: Deserialize,
14565        :: serde :: Serialize,
14566        Clone,
14567        Copy,
14568        Debug,
14569        Eq,
14570        Hash,
14571        Ord,
14572        PartialEq,
14573        PartialOrd,
14574    )]
14575    pub enum UpdateVolumeByUuidRequestBodyOp {
14576        #[serde(rename = "set")]
14577        Set,
14578        #[serde(rename = "add")]
14579        Add,
14580        #[serde(rename = "del")]
14581        Del,
14582    }
14583
14584    impl ::std::convert::From<&Self> for UpdateVolumeByUuidRequestBodyOp {
14585        fn from(value: &UpdateVolumeByUuidRequestBodyOp) -> Self {
14586            value.clone()
14587        }
14588    }
14589
14590    impl ::std::fmt::Display for UpdateVolumeByUuidRequestBodyOp {
14591        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14592            match *self {
14593                Self::Set => write!(f, "set"),
14594                Self::Add => write!(f, "add"),
14595                Self::Del => write!(f, "del"),
14596            }
14597        }
14598    }
14599
14600    impl ::std::str::FromStr for UpdateVolumeByUuidRequestBodyOp {
14601        type Err = self::error::ConversionError;
14602        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14603            match value {
14604                "set" => Ok(Self::Set),
14605                "add" => Ok(Self::Add),
14606                "del" => Ok(Self::Del),
14607                _ => Err("invalid value".into()),
14608            }
14609        }
14610    }
14611
14612    impl ::std::convert::TryFrom<&str> for UpdateVolumeByUuidRequestBodyOp {
14613        type Error = self::error::ConversionError;
14614        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14615            value.parse()
14616        }
14617    }
14618
14619    impl ::std::convert::TryFrom<&::std::string::String> for UpdateVolumeByUuidRequestBodyOp {
14620        type Error = self::error::ConversionError;
14621        fn try_from(
14622            value: &::std::string::String,
14623        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14624            value.parse()
14625        }
14626    }
14627
14628    impl ::std::convert::TryFrom<::std::string::String> for UpdateVolumeByUuidRequestBodyOp {
14629        type Error = self::error::ConversionError;
14630        fn try_from(
14631            value: ::std::string::String,
14632        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14633            value.parse()
14634        }
14635    }
14636
14637    ///The property to modify.
14638    ///
14639    /// <details><summary>JSON schema</summary>
14640    ///
14641    /// ```json
14642    ///{
14643    ///  "description": "The property to modify.",
14644    ///  "examples": [
14645    ///    "size_mb"
14646    ///  ],
14647    ///  "type": "string",
14648    ///  "format": "enum",
14649    ///  "enum": [
14650    ///    "size_mb",
14651    ///    "tags",
14652    ///    "quota_policy",
14653    ///    "delete_lock"
14654    ///  ]
14655    ///}
14656    /// ```
14657    /// </details>
14658    #[derive(
14659        :: serde :: Deserialize,
14660        :: serde :: Serialize,
14661        Clone,
14662        Copy,
14663        Debug,
14664        Eq,
14665        Hash,
14666        Ord,
14667        PartialEq,
14668        PartialOrd,
14669    )]
14670    pub enum UpdateVolumeByUuidRequestBodyProp {
14671        #[serde(rename = "size_mb")]
14672        SizeMb,
14673        #[serde(rename = "tags")]
14674        Tags,
14675        #[serde(rename = "quota_policy")]
14676        QuotaPolicy,
14677        #[serde(rename = "delete_lock")]
14678        DeleteLock,
14679    }
14680
14681    impl ::std::convert::From<&Self> for UpdateVolumeByUuidRequestBodyProp {
14682        fn from(value: &UpdateVolumeByUuidRequestBodyProp) -> Self {
14683            value.clone()
14684        }
14685    }
14686
14687    impl ::std::fmt::Display for UpdateVolumeByUuidRequestBodyProp {
14688        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14689            match *self {
14690                Self::SizeMb => write!(f, "size_mb"),
14691                Self::Tags => write!(f, "tags"),
14692                Self::QuotaPolicy => write!(f, "quota_policy"),
14693                Self::DeleteLock => write!(f, "delete_lock"),
14694            }
14695        }
14696    }
14697
14698    impl ::std::str::FromStr for UpdateVolumeByUuidRequestBodyProp {
14699        type Err = self::error::ConversionError;
14700        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14701            match value {
14702                "size_mb" => Ok(Self::SizeMb),
14703                "tags" => Ok(Self::Tags),
14704                "quota_policy" => Ok(Self::QuotaPolicy),
14705                "delete_lock" => Ok(Self::DeleteLock),
14706                _ => Err("invalid value".into()),
14707            }
14708        }
14709    }
14710
14711    impl ::std::convert::TryFrom<&str> for UpdateVolumeByUuidRequestBodyProp {
14712        type Error = self::error::ConversionError;
14713        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14714            value.parse()
14715        }
14716    }
14717
14718    impl ::std::convert::TryFrom<&::std::string::String> for UpdateVolumeByUuidRequestBodyProp {
14719        type Error = self::error::ConversionError;
14720        fn try_from(
14721            value: &::std::string::String,
14722        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14723            value.parse()
14724        }
14725    }
14726
14727    impl ::std::convert::TryFrom<::std::string::String> for UpdateVolumeByUuidRequestBodyProp {
14728        type Error = self::error::ConversionError;
14729        fn try_from(
14730            value: ::std::string::String,
14731        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14732            value.parse()
14733        }
14734    }
14735
14736    ///`UpdateVolumesRequestItem`
14737    ///
14738    /// <details><summary>JSON schema</summary>
14739    ///
14740    /// ```json
14741    ///{
14742    ///  "type": "object",
14743    ///  "required": [
14744    ///    "op",
14745    ///    "prop"
14746    ///  ],
14747    ///  "properties": {
14748    ///    "id": {
14749    ///      "description": "(Optional).  A client-provided identifier for
14750    /// tracking this operation in the response.",
14751    ///      "examples": [
14752    ///        "op-1"
14753    ///      ],
14754    ///      "type": "string"
14755    ///    },
14756    ///    "name": {
14757    ///      "description": "The name of the volume to update.  Mutually
14758    /// exclusive with UUID.",
14759    ///      "examples": [
14760    ///        "funky-town-g756b5d"
14761    ///      ],
14762    ///      "type": "string"
14763    ///    },
14764    ///    "op": {
14765    ///      "description": "The operation to perform.",
14766    ///      "examples": [
14767    ///        "set"
14768    ///      ],
14769    ///      "type": "string",
14770    ///      "format": "enum",
14771    ///      "enum": [
14772    ///        "set",
14773    ///        "add",
14774    ///        "del"
14775    ///      ]
14776    ///    },
14777    ///    "prop": {
14778    ///      "description": "The property to modify.",
14779    ///      "examples": [
14780    ///        "size_mb"
14781    ///      ],
14782    ///      "type": "string",
14783    ///      "format": "enum",
14784    ///      "enum": [
14785    ///        "size_mb",
14786    ///        "tags",
14787    ///        "quota_policy",
14788    ///        "delete_lock"
14789    ///      ]
14790    ///    },
14791    ///    "uuid": {
14792    ///      "description": "The UUID of the volume to update.  Mutually
14793    /// exclusive with name.",
14794    ///      "examples": [
14795    ///        "123e4567-e89b-12d3-a456-426614174000"
14796    ///      ],
14797    ///      "type": "string",
14798    ///      "format": "uuid"
14799    ///    },
14800    ///    "value": {
14801    ///      "description": "The value for the update operation. The type
14802    /// depends on the property and operation:\n- For \"size_mb\": unsigned
14803    /// integer\n- For \"quota_policy\": 1 - static reservation, 2 - dynamic
14804    /// reservation\n- For \"tags\": array of Strings\n- For \"delete_lock\":
14805    /// boolean",
14806    ///      "allOf": [
14807    ///        {
14808    ///          "$ref": "#/components/schemas/GoogleProtobufValue"
14809    ///        }
14810    ///      ]
14811    ///    }
14812    ///  }
14813    ///}
14814    /// ```
14815    /// </details>
14816    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
14817    pub struct UpdateVolumesRequestItem {
14818        ///(Optional).  A client-provided identifier for tracking this
14819        /// operation in the response.
14820        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14821        pub id: ::std::option::Option<::std::string::String>,
14822        ///The name of the volume to update.  Mutually exclusive with UUID.
14823        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14824        pub name: ::std::option::Option<::std::string::String>,
14825        ///The operation to perform.
14826        pub op: UpdateVolumesRequestItemOp,
14827        ///The property to modify.
14828        pub prop: UpdateVolumesRequestItemProp,
14829        ///The UUID of the volume to update.  Mutually exclusive with name.
14830        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14831        pub uuid: ::std::option::Option<::uuid::Uuid>,
14832        ///The value for the update operation. The type depends on the property
14833        /// and operation:
14834        /// - For "size_mb": unsigned integer
14835        /// - For "quota_policy": 1 - static reservation, 2 - dynamic
14836        ///   reservation
14837        /// - For "tags": array of Strings
14838        /// - For "delete_lock": boolean
14839        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
14840        pub value: ::std::option::Option<GoogleProtobufValue>,
14841    }
14842
14843    impl ::std::convert::From<&UpdateVolumesRequestItem> for UpdateVolumesRequestItem {
14844        fn from(value: &UpdateVolumesRequestItem) -> Self {
14845            value.clone()
14846        }
14847    }
14848
14849    ///The operation to perform.
14850    ///
14851    /// <details><summary>JSON schema</summary>
14852    ///
14853    /// ```json
14854    ///{
14855    ///  "description": "The operation to perform.",
14856    ///  "examples": [
14857    ///    "set"
14858    ///  ],
14859    ///  "type": "string",
14860    ///  "format": "enum",
14861    ///  "enum": [
14862    ///    "set",
14863    ///    "add",
14864    ///    "del"
14865    ///  ]
14866    ///}
14867    /// ```
14868    /// </details>
14869    #[derive(
14870        :: serde :: Deserialize,
14871        :: serde :: Serialize,
14872        Clone,
14873        Copy,
14874        Debug,
14875        Eq,
14876        Hash,
14877        Ord,
14878        PartialEq,
14879        PartialOrd,
14880    )]
14881    pub enum UpdateVolumesRequestItemOp {
14882        #[serde(rename = "set")]
14883        Set,
14884        #[serde(rename = "add")]
14885        Add,
14886        #[serde(rename = "del")]
14887        Del,
14888    }
14889
14890    impl ::std::convert::From<&Self> for UpdateVolumesRequestItemOp {
14891        fn from(value: &UpdateVolumesRequestItemOp) -> Self {
14892            value.clone()
14893        }
14894    }
14895
14896    impl ::std::fmt::Display for UpdateVolumesRequestItemOp {
14897        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14898            match *self {
14899                Self::Set => write!(f, "set"),
14900                Self::Add => write!(f, "add"),
14901                Self::Del => write!(f, "del"),
14902            }
14903        }
14904    }
14905
14906    impl ::std::str::FromStr for UpdateVolumesRequestItemOp {
14907        type Err = self::error::ConversionError;
14908        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14909            match value {
14910                "set" => Ok(Self::Set),
14911                "add" => Ok(Self::Add),
14912                "del" => Ok(Self::Del),
14913                _ => Err("invalid value".into()),
14914            }
14915        }
14916    }
14917
14918    impl ::std::convert::TryFrom<&str> for UpdateVolumesRequestItemOp {
14919        type Error = self::error::ConversionError;
14920        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
14921            value.parse()
14922        }
14923    }
14924
14925    impl ::std::convert::TryFrom<&::std::string::String> for UpdateVolumesRequestItemOp {
14926        type Error = self::error::ConversionError;
14927        fn try_from(
14928            value: &::std::string::String,
14929        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14930            value.parse()
14931        }
14932    }
14933
14934    impl ::std::convert::TryFrom<::std::string::String> for UpdateVolumesRequestItemOp {
14935        type Error = self::error::ConversionError;
14936        fn try_from(
14937            value: ::std::string::String,
14938        ) -> ::std::result::Result<Self, self::error::ConversionError> {
14939            value.parse()
14940        }
14941    }
14942
14943    ///The property to modify.
14944    ///
14945    /// <details><summary>JSON schema</summary>
14946    ///
14947    /// ```json
14948    ///{
14949    ///  "description": "The property to modify.",
14950    ///  "examples": [
14951    ///    "size_mb"
14952    ///  ],
14953    ///  "type": "string",
14954    ///  "format": "enum",
14955    ///  "enum": [
14956    ///    "size_mb",
14957    ///    "tags",
14958    ///    "quota_policy",
14959    ///    "delete_lock"
14960    ///  ]
14961    ///}
14962    /// ```
14963    /// </details>
14964    #[derive(
14965        :: serde :: Deserialize,
14966        :: serde :: Serialize,
14967        Clone,
14968        Copy,
14969        Debug,
14970        Eq,
14971        Hash,
14972        Ord,
14973        PartialEq,
14974        PartialOrd,
14975    )]
14976    pub enum UpdateVolumesRequestItemProp {
14977        #[serde(rename = "size_mb")]
14978        SizeMb,
14979        #[serde(rename = "tags")]
14980        Tags,
14981        #[serde(rename = "quota_policy")]
14982        QuotaPolicy,
14983        #[serde(rename = "delete_lock")]
14984        DeleteLock,
14985    }
14986
14987    impl ::std::convert::From<&Self> for UpdateVolumesRequestItemProp {
14988        fn from(value: &UpdateVolumesRequestItemProp) -> Self {
14989            value.clone()
14990        }
14991    }
14992
14993    impl ::std::fmt::Display for UpdateVolumesRequestItemProp {
14994        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
14995            match *self {
14996                Self::SizeMb => write!(f, "size_mb"),
14997                Self::Tags => write!(f, "tags"),
14998                Self::QuotaPolicy => write!(f, "quota_policy"),
14999                Self::DeleteLock => write!(f, "delete_lock"),
15000            }
15001        }
15002    }
15003
15004    impl ::std::str::FromStr for UpdateVolumesRequestItemProp {
15005        type Err = self::error::ConversionError;
15006        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15007            match value {
15008                "size_mb" => Ok(Self::SizeMb),
15009                "tags" => Ok(Self::Tags),
15010                "quota_policy" => Ok(Self::QuotaPolicy),
15011                "delete_lock" => Ok(Self::DeleteLock),
15012                _ => Err("invalid value".into()),
15013            }
15014        }
15015    }
15016
15017    impl ::std::convert::TryFrom<&str> for UpdateVolumesRequestItemProp {
15018        type Error = self::error::ConversionError;
15019        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15020            value.parse()
15021        }
15022    }
15023
15024    impl ::std::convert::TryFrom<&::std::string::String> for UpdateVolumesRequestItemProp {
15025        type Error = self::error::ConversionError;
15026        fn try_from(
15027            value: &::std::string::String,
15028        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15029            value.parse()
15030        }
15031    }
15032
15033    impl ::std::convert::TryFrom<::std::string::String> for UpdateVolumesRequestItemProp {
15034        type Error = self::error::ConversionError;
15035        fn try_from(
15036            value: ::std::string::String,
15037        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15038            value.parse()
15039        }
15040    }
15041
15042    ///The response message for updating one or more volume(s).
15043    ///
15044    /// <details><summary>JSON schema</summary>
15045    ///
15046    /// ```json
15047    ///{
15048    ///  "description": "The response message for updating one or more
15049    /// volume(s).",
15050    ///  "type": "object",
15051    ///  "properties": {
15052    ///    "data": {
15053    ///      "description": "The response data for this request.",
15054    ///      "allOf": [
15055    ///        {
15056    ///          "$ref": "#/components/schemas/UpdateVolumesResponseData"
15057    ///        }
15058    ///      ]
15059    ///    },
15060    ///    "errors": {
15061    ///      "description": "A list of errors which may have occurred during the
15062    /// request.",
15063    ///      "type": "array",
15064    ///      "items": {
15065    ///        "$ref": "#/components/schemas/ResponseError"
15066    ///      }
15067    ///    },
15068    ///    "message": {
15069    ///      "description": "An optional message providing additional
15070    /// information about the status.\nThis field is useful when the status is
15071    /// not `success`.",
15072    ///      "examples": [
15073    ///        "Failed to perform all operations"
15074    ///      ],
15075    ///      "type": "string"
15076    ///    },
15077    ///    "op_time_us": {
15078    ///      "description": "The operation time in microseconds.  This is the
15079    /// time it took to process\nthe request and generate the response.",
15080    ///      "examples": [
15081    ///        76
15082    ///      ],
15083    ///      "type": "integer",
15084    ///      "format": "uint64"
15085    ///    },
15086    ///    "status": {
15087    ///      "description": "The status of the response.",
15088    ///      "allOf": [
15089    ///        {
15090    ///          "$ref": "#/components/schemas/ResponseStatus"
15091    ///        }
15092    ///      ]
15093    ///    }
15094    ///  }
15095    ///}
15096    /// ```
15097    /// </details>
15098    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15099    pub struct UpdateVolumesResponse {
15100        ///The response data for this request.
15101        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15102        pub data: ::std::option::Option<UpdateVolumesResponseData>,
15103        ///A list of errors which may have occurred during the request.
15104        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
15105        pub errors: ::std::vec::Vec<ResponseError>,
15106        ///An optional message providing additional information about the
15107        /// status. This field is useful when the status is not
15108        /// `success`.
15109        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15110        pub message: ::std::option::Option<::std::string::String>,
15111        ///The operation time in microseconds.  This is the time it took to
15112        /// process the request and generate the response.
15113        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15114        pub op_time_us: ::std::option::Option<u64>,
15115        ///The status of the response.
15116        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15117        pub status: ::std::option::Option<ResponseStatus>,
15118    }
15119
15120    impl ::std::convert::From<&UpdateVolumesResponse> for UpdateVolumesResponse {
15121        fn from(value: &UpdateVolumesResponse) -> Self {
15122            value.clone()
15123        }
15124    }
15125
15126    impl ::std::default::Default for UpdateVolumesResponse {
15127        fn default() -> Self {
15128            Self {
15129                data: Default::default(),
15130                errors: Default::default(),
15131                message: Default::default(),
15132                op_time_us: Default::default(),
15133                status: Default::default(),
15134            }
15135        }
15136    }
15137
15138    ///`UpdateVolumesResponseData`
15139    ///
15140    /// <details><summary>JSON schema</summary>
15141    ///
15142    /// ```json
15143    ///{
15144    ///  "type": "object",
15145    ///  "properties": {
15146    ///    "volumes": {
15147    ///      "description": "List of volumes that were processed during the
15148    /// update operation.",
15149    ///      "type": "array",
15150    ///      "items": {
15151    ///        "$ref": "#/components/schemas/UpdateVolumesResponseUpdatedVolume"
15152    ///      }
15153    ///    }
15154    ///  }
15155    ///}
15156    /// ```
15157    /// </details>
15158    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15159    pub struct UpdateVolumesResponseData {
15160        ///List of volumes that were processed during the update operation.
15161        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
15162        pub volumes: ::std::vec::Vec<UpdateVolumesResponseUpdatedVolume>,
15163    }
15164
15165    impl ::std::convert::From<&UpdateVolumesResponseData> for UpdateVolumesResponseData {
15166        fn from(value: &UpdateVolumesResponseData) -> Self {
15167            value.clone()
15168        }
15169    }
15170
15171    impl ::std::default::Default for UpdateVolumesResponseData {
15172        fn default() -> Self {
15173            Self {
15174                volumes: Default::default(),
15175            }
15176        }
15177    }
15178
15179    ///`UpdateVolumesResponseUpdatedVolume`
15180    ///
15181    /// <details><summary>JSON schema</summary>
15182    ///
15183    /// ```json
15184    ///{
15185    ///  "type": "object",
15186    ///  "properties": {
15187    ///    "error": {
15188    ///      "description": "An optional error code providing additional
15189    /// information about the status.\nThis field is useful when the status is
15190    /// not `success`.",
15191    ///      "examples": [
15192    ///        8
15193    ///      ],
15194    ///      "type": "integer",
15195    ///      "format": "int32"
15196    ///    },
15197    ///    "id": {
15198    ///      "description": "(Optional).  The client-provided ID from the
15199    /// request.",
15200    ///      "examples": [
15201    ///        "op-1"
15202    ///      ],
15203    ///      "type": "string"
15204    ///    },
15205    ///    "message": {
15206    ///      "description": "An optional message providing additional
15207    /// information about the status.\nThis field is useful when the status is
15208    /// not `success`.",
15209    ///      "examples": [
15210    ///        "No volume with name 'funky-town-g756b5d'"
15211    ///      ],
15212    ///      "type": "string"
15213    ///    },
15214    ///    "name": {
15215    ///      "description": "The name of the service group that was updated.",
15216    ///      "examples": [
15217    ///        "funky-town-g756b5d"
15218    ///      ],
15219    ///      "type": "string"
15220    ///    },
15221    ///    "status": {
15222    ///      "description": "The status of this particular volume update
15223    /// operation.",
15224    ///      "examples": [
15225    ///        "success"
15226    ///      ],
15227    ///      "type": "string"
15228    ///    },
15229    ///    "uuid": {
15230    ///      "description": "The UUID of the volume that was updated.",
15231    ///      "examples": [
15232    ///        "123e4567-e89b-12d3-a456-426614174000"
15233    ///      ],
15234    ///      "type": "string",
15235    ///      "format": "uuid"
15236    ///    }
15237    ///  }
15238    ///}
15239    /// ```
15240    /// </details>
15241    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15242    pub struct UpdateVolumesResponseUpdatedVolume {
15243        ///An optional error code providing additional information about the
15244        /// status. This field is useful when the status is not
15245        /// `success`.
15246        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15247        pub error: ::std::option::Option<i32>,
15248        ///(Optional).  The client-provided ID from the request.
15249        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15250        pub id: ::std::option::Option<::std::string::String>,
15251        ///An optional message providing additional information about the
15252        /// status. This field is useful when the status is not
15253        /// `success`.
15254        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15255        pub message: ::std::option::Option<::std::string::String>,
15256        ///The name of the service group that was updated.
15257        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15258        pub name: ::std::option::Option<::std::string::String>,
15259        ///The status of this particular volume update operation.
15260        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15261        pub status: ::std::option::Option<::std::string::String>,
15262        ///The UUID of the volume that was updated.
15263        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15264        pub uuid: ::std::option::Option<::uuid::Uuid>,
15265    }
15266
15267    impl ::std::convert::From<&UpdateVolumesResponseUpdatedVolume>
15268        for UpdateVolumesResponseUpdatedVolume
15269    {
15270        fn from(value: &UpdateVolumesResponseUpdatedVolume) -> Self {
15271            value.clone()
15272        }
15273    }
15274
15275    impl ::std::default::Default for UpdateVolumesResponseUpdatedVolume {
15276        fn default() -> Self {
15277            Self {
15278                error: Default::default(),
15279                id: Default::default(),
15280                message: Default::default(),
15281                name: Default::default(),
15282                status: Default::default(),
15283                uuid: Default::default(),
15284            }
15285        }
15286    }
15287
15288    ///A volume represents a storage device that can be attached to an
15289    /// instance.
15290    ///
15291    /// <details><summary>JSON schema</summary>
15292    ///
15293    /// ```json
15294    ///{
15295    ///  "description": "A volume represents a storage device that can be
15296    /// attached to an instance.",
15297    ///  "type": "object",
15298    ///  "properties": {
15299    ///    "attached_to": {
15300    ///      "description": "List of instances that this volume is attached
15301    /// to.",
15302    ///      "type": "array",
15303    ///      "items": {
15304    ///        "$ref": "#/components/schemas/VolumeInstanceID"
15305    ///      }
15306    ///    },
15307    ///    "created_at": {
15308    ///      "description": "The time the volume was created.",
15309    ///      "examples": [
15310    ///        "2021-01-01T00:00:00Z"
15311    ///      ],
15312    ///      "type": "string",
15313    ///      "format": "date-time"
15314    ///    },
15315    ///    "error": {
15316    ///      "description": "An optional error code providing additional
15317    /// information about the status.\nThis field is only set when this message
15318    /// object is used as a response\nmessage, and is useful when the status is
15319    /// not `success`.",
15320    ///      "examples": [
15321    ///        8
15322    ///      ],
15323    ///      "type": "integer",
15324    ///      "format": "int32"
15325    ///    },
15326    ///    "message": {
15327    ///      "description": "An optional message providing additional
15328    /// information about the status.\nThis field is only set when this message
15329    /// object is used as a response\nmessage, and is useful when the status is
15330    /// not `success`.",
15331    ///      "examples": [
15332    ///        "No volume with name 'funky-town-g756b5d'"
15333    ///      ],
15334    ///      "type": "string"
15335    ///    },
15336    ///    "mounted_by": {
15337    ///      "description": "List of instances that have this volume mounted.",
15338    ///      "type": "array",
15339    ///      "items": {
15340    ///        "$ref": "#/components/schemas/VolumeVolumeInstanceMount"
15341    ///      }
15342    ///    },
15343    ///    "name": {
15344    ///      "description": "The name of the volume.\n\nThis is a human-readable
15345    /// name that can be used to identify the volume.\nThe name must be unique
15346    /// within the context of your account.  The name can\nalso be used to
15347    /// identify the volume in API calls.",
15348    ///      "examples": [
15349    ///        "funky-town-g7gum5cj"
15350    ///      ],
15351    ///      "type": "string"
15352    ///    },
15353    ///    "persistent": {
15354    ///      "description": "Indicates if the volume will stay alive when the
15355    /// last instance is deleted\nthat this volume is attached to.",
15356    ///      "examples": [
15357    ///        true
15358    ///      ],
15359    ///      "type": "boolean"
15360    ///    },
15361    ///    "size_mb": {
15362    ///      "description": "The size of the volume in megabytes.",
15363    ///      "examples": [
15364    ///        64
15365    ///      ],
15366    ///      "type": "integer",
15367    ///      "format": "uint64"
15368    ///    },
15369    ///    "state": {
15370    ///      "description": "Current state of the volume.",
15371    ///      "type": "string",
15372    ///      "format": "enum",
15373    ///      "enum": [
15374    ///        "uninitialized",
15375    ///        "initializing",
15376    ///        "available",
15377    ///        "idle",
15378    ///        "mounted",
15379    ///        "busy",
15380    ///        "error"
15381    ///      ]
15382    ///    },
15383    ///    "status": {
15384    ///      "description": "An optional field representing the status of the
15385    /// request.  This field is\nonly set when this message object is used as a
15386    /// response message.",
15387    ///      "allOf": [
15388    ///        {
15389    ///          "$ref": "#/components/schemas/ResponseStatus"
15390    ///        }
15391    ///      ]
15392    ///    },
15393    ///    "tags": {
15394    ///      "description": "The tags associated with the volume.",
15395    ///      "type": "array",
15396    ///      "items": {
15397    ///        "type": "string"
15398    ///      }
15399    ///    },
15400    ///    "uuid": {
15401    ///      "description": "The UUID of the volume.\n\nThis is a unique identifier for the volume that is generated when the\nvolume is created.  The UUID is used to reference the volume in\nAPI calls and can be used to identify the volume in all API calls that\nrequire an identifier.",
15402    ///      "examples": [
15403    ///        "c1d2e3f4-5678-90ab-cdef-1234567890ab"
15404    ///      ],
15405    ///      "type": "string",
15406    ///      "format": "uuid"
15407    ///    }
15408    ///  }
15409    ///}
15410    /// ```
15411    /// </details>
15412    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15413    pub struct Volume {
15414        ///List of instances that this volume is attached to.
15415        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
15416        pub attached_to: ::std::vec::Vec<VolumeInstanceId>,
15417        ///The time the volume was created.
15418        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15419        pub created_at: ::std::option::Option<::chrono::DateTime<::chrono::offset::Utc>>,
15420        ///An optional error code providing additional information about the
15421        /// status. This field is only set when this message object is
15422        /// used as a response message, and is useful when the status is
15423        /// not `success`.
15424        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15425        pub error: ::std::option::Option<i32>,
15426        ///An optional message providing additional information about the
15427        /// status. This field is only set when this message object is
15428        /// used as a response message, and is useful when the status is
15429        /// not `success`.
15430        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15431        pub message: ::std::option::Option<::std::string::String>,
15432        ///List of instances that have this volume mounted.
15433        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
15434        pub mounted_by: ::std::vec::Vec<VolumeVolumeInstanceMount>,
15435        ///The name of the volume.
15436        ///
15437        ///This is a human-readable name that can be used to identify the
15438        /// volume. The name must be unique within the context of your
15439        /// account.  The name can also be used to identify the volume
15440        /// in API calls.
15441        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15442        pub name: ::std::option::Option<::std::string::String>,
15443        ///Indicates if the volume will stay alive when the last instance is
15444        /// deleted that this volume is attached to.
15445        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15446        pub persistent: ::std::option::Option<bool>,
15447        ///The size of the volume in megabytes.
15448        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15449        pub size_mb: ::std::option::Option<u64>,
15450        ///Current state of the volume.
15451        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15452        pub state: ::std::option::Option<VolumeState>,
15453        ///An optional field representing the status of the request.  This
15454        /// field is only set when this message object is used as a
15455        /// response message.
15456        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15457        pub status: ::std::option::Option<ResponseStatus>,
15458        ///The tags associated with the volume.
15459        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
15460        pub tags: ::std::vec::Vec<::std::string::String>,
15461        ///The UUID of the volume.
15462        ///
15463        ///This is a unique identifier for the volume that is generated when
15464        /// the volume is created.  The UUID is used to reference the
15465        /// volume in API calls and can be used to identify the volume
15466        /// in all API calls that require an identifier.
15467        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15468        pub uuid: ::std::option::Option<::uuid::Uuid>,
15469    }
15470
15471    impl ::std::convert::From<&Volume> for Volume {
15472        fn from(value: &Volume) -> Self {
15473            value.clone()
15474        }
15475    }
15476
15477    impl ::std::default::Default for Volume {
15478        fn default() -> Self {
15479            Self {
15480                attached_to: Default::default(),
15481                created_at: Default::default(),
15482                error: Default::default(),
15483                message: Default::default(),
15484                mounted_by: Default::default(),
15485                name: Default::default(),
15486                persistent: Default::default(),
15487                size_mb: Default::default(),
15488                state: Default::default(),
15489                status: Default::default(),
15490                tags: Default::default(),
15491                uuid: Default::default(),
15492            }
15493        }
15494    }
15495
15496    ///Reference to the instance to attach the volume to.
15497    ///
15498    /// <details><summary>JSON schema</summary>
15499    ///
15500    /// ```json
15501    ///{
15502    ///  "description": "Reference to the instance to attach the volume to.",
15503    ///  "type": "object",
15504    ///  "allOf": [
15505    ///    {
15506    ///      "type": "object",
15507    ///      "properties": {
15508    ///        "uuid": {
15509    ///          "description": "The UUID of the instance that the volume is
15510    /// attached to.",
15511    ///          "examples": [
15512    ///            "c1d2e3f4-5678-90ab-cdef-1234567890ab"
15513    ///          ],
15514    ///          "type": "string",
15515    ///          "format": "uuid"
15516    ///        }
15517    ///      }
15518    ///    },
15519    ///    {
15520    ///      "oneOf": [
15521    ///        {
15522    ///          "title": "name",
15523    ///          "type": "object",
15524    ///          "properties": {
15525    ///            "name": {
15526    ///              "description": "The name of the instance that the volume is
15527    /// attached to.",
15528    ///              "examples": [
15529    ///                "funky-town-g7gum5cj"
15530    ///              ],
15531    ///              "type": "string"
15532    ///            }
15533    ///          }
15534    ///        }
15535    ///      ]
15536    ///    }
15537    ///  ]
15538    ///}
15539    /// ```
15540    /// </details>
15541    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15542    pub struct VolumeInstanceId {
15543        ///The name of the instance that the volume is attached to.
15544        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15545        pub name: ::std::option::Option<::std::string::String>,
15546        ///The UUID of the instance that the volume is attached to.
15547        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15548        pub uuid: ::std::option::Option<::uuid::Uuid>,
15549    }
15550
15551    impl ::std::convert::From<&VolumeInstanceId> for VolumeInstanceId {
15552        fn from(value: &VolumeInstanceId) -> Self {
15553            value.clone()
15554        }
15555    }
15556
15557    impl ::std::default::Default for VolumeInstanceId {
15558        fn default() -> Self {
15559            Self {
15560                name: Default::default(),
15561                uuid: Default::default(),
15562            }
15563        }
15564    }
15565
15566    ///Current state of the volume.
15567    ///
15568    /// <details><summary>JSON schema</summary>
15569    ///
15570    /// ```json
15571    ///{
15572    ///  "description": "Current state of the volume.",
15573    ///  "type": "string",
15574    ///  "format": "enum",
15575    ///  "enum": [
15576    ///    "uninitialized",
15577    ///    "initializing",
15578    ///    "available",
15579    ///    "idle",
15580    ///    "mounted",
15581    ///    "busy",
15582    ///    "error"
15583    ///  ]
15584    ///}
15585    /// ```
15586    /// </details>
15587    #[derive(
15588        :: serde :: Deserialize,
15589        :: serde :: Serialize,
15590        Clone,
15591        Copy,
15592        Debug,
15593        Eq,
15594        Hash,
15595        Ord,
15596        PartialEq,
15597        PartialOrd,
15598    )]
15599    pub enum VolumeState {
15600        #[serde(rename = "uninitialized")]
15601        Uninitialized,
15602        #[serde(rename = "initializing")]
15603        Initializing,
15604        #[serde(rename = "available")]
15605        Available,
15606        #[serde(rename = "idle")]
15607        Idle,
15608        #[serde(rename = "mounted")]
15609        Mounted,
15610        #[serde(rename = "busy")]
15611        Busy,
15612        #[serde(rename = "error")]
15613        Error,
15614    }
15615
15616    impl ::std::convert::From<&Self> for VolumeState {
15617        fn from(value: &VolumeState) -> Self {
15618            value.clone()
15619        }
15620    }
15621
15622    impl ::std::fmt::Display for VolumeState {
15623        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15624            match *self {
15625                Self::Uninitialized => write!(f, "uninitialized"),
15626                Self::Initializing => write!(f, "initializing"),
15627                Self::Available => write!(f, "available"),
15628                Self::Idle => write!(f, "idle"),
15629                Self::Mounted => write!(f, "mounted"),
15630                Self::Busy => write!(f, "busy"),
15631                Self::Error => write!(f, "error"),
15632            }
15633        }
15634    }
15635
15636    impl ::std::str::FromStr for VolumeState {
15637        type Err = self::error::ConversionError;
15638        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15639            match value {
15640                "uninitialized" => Ok(Self::Uninitialized),
15641                "initializing" => Ok(Self::Initializing),
15642                "available" => Ok(Self::Available),
15643                "idle" => Ok(Self::Idle),
15644                "mounted" => Ok(Self::Mounted),
15645                "busy" => Ok(Self::Busy),
15646                "error" => Ok(Self::Error),
15647                _ => Err("invalid value".into()),
15648            }
15649        }
15650    }
15651
15652    impl ::std::convert::TryFrom<&str> for VolumeState {
15653        type Error = self::error::ConversionError;
15654        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15655            value.parse()
15656        }
15657    }
15658
15659    impl ::std::convert::TryFrom<&::std::string::String> for VolumeState {
15660        type Error = self::error::ConversionError;
15661        fn try_from(
15662            value: &::std::string::String,
15663        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15664            value.parse()
15665        }
15666    }
15667
15668    impl ::std::convert::TryFrom<::std::string::String> for VolumeState {
15669        type Error = self::error::ConversionError;
15670        fn try_from(
15671            value: ::std::string::String,
15672        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15673            value.parse()
15674        }
15675    }
15676
15677    ///`VolumeVolumeInstanceMount`
15678    ///
15679    /// <details><summary>JSON schema</summary>
15680    ///
15681    /// ```json
15682    ///{
15683    ///  "type": "object",
15684    ///  "allOf": [
15685    ///    {
15686    ///      "type": "object",
15687    ///      "properties": {
15688    ///        "read_only": {
15689    ///          "description": "Whether the volume is mounted read-only or
15690    /// read-write.",
15691    ///          "examples": [
15692    ///            true
15693    ///          ],
15694    ///          "type": "boolean"
15695    ///        },
15696    ///        "uuid": {
15697    ///          "description": "The UUID of the instance that the volume is
15698    /// mounted in.",
15699    ///          "examples": [
15700    ///            "funky-town-g7gum5cj"
15701    ///          ],
15702    ///          "type": "string",
15703    ///          "format": "uuid"
15704    ///        }
15705    ///      }
15706    ///    },
15707    ///    {
15708    ///      "oneOf": [
15709    ///        {
15710    ///          "title": "name",
15711    ///          "type": "object",
15712    ///          "properties": {
15713    ///            "name": {
15714    ///              "description": "The name of the instance that the volume is
15715    /// mounted in.",
15716    ///              "examples": [
15717    ///                "funky-town-g7gum5cj"
15718    ///              ],
15719    ///              "type": "string"
15720    ///            }
15721    ///          }
15722    ///        }
15723    ///      ]
15724    ///    }
15725    ///  ]
15726    ///}
15727    /// ```
15728    /// </details>
15729    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15730    pub struct VolumeVolumeInstanceMount {
15731        ///The name of the instance that the volume is mounted in.
15732        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15733        pub name: ::std::option::Option<::std::string::String>,
15734        ///Whether the volume is mounted read-only or read-write.
15735        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15736        pub read_only: ::std::option::Option<bool>,
15737        ///The UUID of the instance that the volume is mounted in.
15738        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15739        pub uuid: ::std::option::Option<::uuid::Uuid>,
15740    }
15741
15742    impl ::std::convert::From<&VolumeVolumeInstanceMount> for VolumeVolumeInstanceMount {
15743        fn from(value: &VolumeVolumeInstanceMount) -> Self {
15744            value.clone()
15745        }
15746    }
15747
15748    impl ::std::default::Default for VolumeVolumeInstanceMount {
15749        fn default() -> Self {
15750            Self {
15751                name: Default::default(),
15752                read_only: Default::default(),
15753                uuid: Default::default(),
15754            }
15755        }
15756    }
15757
15758    ///Wait parameters.
15759    ///
15760    /// <details><summary>JSON schema</summary>
15761    ///
15762    /// ```json
15763    ///{
15764    ///  "description": "Wait parameters.",
15765    ///  "type": "object",
15766    ///  "allOf": [
15767    ///    {
15768    ///      "type": "object",
15769    ///      "properties": {
15770    ///        "state": {
15771    ///          "description": "The desired state to wait for.  Default is
15772    /// `running`.",
15773    ///          "type": "string",
15774    ///          "format": "enum",
15775    ///          "enum": [
15776    ///            "stopped",
15777    ///            "starting",
15778    ///            "running",
15779    ///            "draining",
15780    ///            "stopping",
15781    ///            "standby"
15782    ///          ]
15783    ///        }
15784    ///      }
15785    ///    },
15786    ///    {
15787    ///      "oneOf": [
15788    ///        {
15789    ///          "title": "timeout_ms",
15790    ///          "type": "object",
15791    ///          "properties": {
15792    ///            "timeout_ms": {
15793    ///              "description": "Timeout in milliseconds to wait for the
15794    /// instance to reach the desired\nstate.  If the timeout is reached, the
15795    /// request will fail with an error.\nA value of -1 means to wait
15796    /// indefinitely until the instance reaches the\ndesired state.",
15797    ///              "examples": [
15798    ///                450
15799    ///              ],
15800    ///              "type": "integer",
15801    ///              "format": "int64"
15802    ///            }
15803    ///          }
15804    ///        }
15805    ///      ]
15806    ///    }
15807    ///  ]
15808    ///}
15809    /// ```
15810    /// </details>
15811    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
15812    pub struct WaitInstanceByUuidRequestBody {
15813        ///The desired state to wait for.  Default is `running`.
15814        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15815        pub state: ::std::option::Option<WaitInstanceByUuidRequestBodyState>,
15816        ///Timeout in milliseconds to wait for the instance to reach the
15817        /// desired state.  If the timeout is reached, the request will
15818        /// fail with an error. A value of -1 means to wait indefinitely
15819        /// until the instance reaches the desired state.
15820        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
15821        pub timeout_ms: ::std::option::Option<i64>,
15822    }
15823
15824    impl ::std::convert::From<&WaitInstanceByUuidRequestBody> for WaitInstanceByUuidRequestBody {
15825        fn from(value: &WaitInstanceByUuidRequestBody) -> Self {
15826            value.clone()
15827        }
15828    }
15829
15830    impl ::std::default::Default for WaitInstanceByUuidRequestBody {
15831        fn default() -> Self {
15832            Self {
15833                state: Default::default(),
15834                timeout_ms: Default::default(),
15835            }
15836        }
15837    }
15838
15839    ///The desired state to wait for.  Default is `running`.
15840    ///
15841    /// <details><summary>JSON schema</summary>
15842    ///
15843    /// ```json
15844    ///{
15845    ///  "description": "The desired state to wait for.  Default is `running`.",
15846    ///  "type": "string",
15847    ///  "format": "enum",
15848    ///  "enum": [
15849    ///    "stopped",
15850    ///    "starting",
15851    ///    "running",
15852    ///    "draining",
15853    ///    "stopping",
15854    ///    "standby"
15855    ///  ]
15856    ///}
15857    /// ```
15858    /// </details>
15859    #[derive(
15860        :: serde :: Deserialize,
15861        :: serde :: Serialize,
15862        Clone,
15863        Copy,
15864        Debug,
15865        Eq,
15866        Hash,
15867        Ord,
15868        PartialEq,
15869        PartialOrd,
15870    )]
15871    pub enum WaitInstanceByUuidRequestBodyState {
15872        #[serde(rename = "stopped")]
15873        Stopped,
15874        #[serde(rename = "starting")]
15875        Starting,
15876        #[serde(rename = "running")]
15877        Running,
15878        #[serde(rename = "draining")]
15879        Draining,
15880        #[serde(rename = "stopping")]
15881        Stopping,
15882        #[serde(rename = "standby")]
15883        Standby,
15884    }
15885
15886    impl ::std::convert::From<&Self> for WaitInstanceByUuidRequestBodyState {
15887        fn from(value: &WaitInstanceByUuidRequestBodyState) -> Self {
15888            value.clone()
15889        }
15890    }
15891
15892    impl ::std::fmt::Display for WaitInstanceByUuidRequestBodyState {
15893        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
15894            match *self {
15895                Self::Stopped => write!(f, "stopped"),
15896                Self::Starting => write!(f, "starting"),
15897                Self::Running => write!(f, "running"),
15898                Self::Draining => write!(f, "draining"),
15899                Self::Stopping => write!(f, "stopping"),
15900                Self::Standby => write!(f, "standby"),
15901            }
15902        }
15903    }
15904
15905    impl ::std::str::FromStr for WaitInstanceByUuidRequestBodyState {
15906        type Err = self::error::ConversionError;
15907        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15908            match value {
15909                "stopped" => Ok(Self::Stopped),
15910                "starting" => Ok(Self::Starting),
15911                "running" => Ok(Self::Running),
15912                "draining" => Ok(Self::Draining),
15913                "stopping" => Ok(Self::Stopping),
15914                "standby" => Ok(Self::Standby),
15915                _ => Err("invalid value".into()),
15916            }
15917        }
15918    }
15919
15920    impl ::std::convert::TryFrom<&str> for WaitInstanceByUuidRequestBodyState {
15921        type Error = self::error::ConversionError;
15922        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
15923            value.parse()
15924        }
15925    }
15926
15927    impl ::std::convert::TryFrom<&::std::string::String> for WaitInstanceByUuidRequestBodyState {
15928        type Error = self::error::ConversionError;
15929        fn try_from(
15930            value: &::std::string::String,
15931        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15932            value.parse()
15933        }
15934    }
15935
15936    impl ::std::convert::TryFrom<::std::string::String> for WaitInstanceByUuidRequestBodyState {
15937        type Error = self::error::ConversionError;
15938        fn try_from(
15939            value: ::std::string::String,
15940        ) -> ::std::result::Result<Self, self::error::ConversionError> {
15941            value.parse()
15942        }
15943    }
15944
15945    ///The response message for waiting for one or more instance(s) to reach a
15946    ///certain state given their UUID(s) or name(s).
15947    ///
15948    /// <details><summary>JSON schema</summary>
15949    ///
15950    /// ```json
15951    ///{
15952    ///  "description": "The response message for waiting for one or more instance(s) to reach a\ncertain state given their UUID(s) or name(s).",
15953    ///  "type": "object",
15954    ///  "properties": {
15955    ///    "data": {
15956    ///      "description": "The response data for this request.",
15957    ///      "allOf": [
15958    ///        {
15959    ///          "$ref": "#/components/schemas/WaitInstanceResponseData"
15960    ///        }
15961    ///      ]
15962    ///    },
15963    ///    "errors": {
15964    ///      "description": "A list of errors which may have occurred during the
15965    /// request.",
15966    ///      "type": "array",
15967    ///      "items": {
15968    ///        "$ref": "#/components/schemas/ResponseError"
15969    ///      }
15970    ///    },
15971    ///    "message": {
15972    ///      "description": "An optional message providing additional
15973    /// information about the status.\nThis field is useful when the status is
15974    /// not `success`.",
15975    ///      "examples": [
15976    ///        "Failed to perform all operations"
15977    ///      ],
15978    ///      "type": "string"
15979    ///    },
15980    ///    "op_time_us": {
15981    ///      "description": "The operation time in microseconds.  This is the
15982    /// time it took to process\nthe request and generate the response.",
15983    ///      "examples": [
15984    ///        450
15985    ///      ],
15986    ///      "type": "integer",
15987    ///      "format": "uint64"
15988    ///    },
15989    ///    "status": {
15990    ///      "description": "The status of the response.",
15991    ///      "allOf": [
15992    ///        {
15993    ///          "$ref": "#/components/schemas/ResponseStatus"
15994    ///        }
15995    ///      ]
15996    ///    }
15997    ///  }
15998    ///}
15999    /// ```
16000    /// </details>
16001    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16002    pub struct WaitInstanceResponse {
16003        ///The response data for this request.
16004        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16005        pub data: ::std::option::Option<WaitInstanceResponseData>,
16006        ///A list of errors which may have occurred during the request.
16007        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
16008        pub errors: ::std::vec::Vec<ResponseError>,
16009        ///An optional message providing additional information about the
16010        /// status. This field is useful when the status is not
16011        /// `success`.
16012        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16013        pub message: ::std::option::Option<::std::string::String>,
16014        ///The operation time in microseconds.  This is the time it took to
16015        /// process the request and generate the response.
16016        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16017        pub op_time_us: ::std::option::Option<u64>,
16018        ///The status of the response.
16019        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16020        pub status: ::std::option::Option<ResponseStatus>,
16021    }
16022
16023    impl ::std::convert::From<&WaitInstanceResponse> for WaitInstanceResponse {
16024        fn from(value: &WaitInstanceResponse) -> Self {
16025            value.clone()
16026        }
16027    }
16028
16029    impl ::std::default::Default for WaitInstanceResponse {
16030        fn default() -> Self {
16031            Self {
16032                data: Default::default(),
16033                errors: Default::default(),
16034                message: Default::default(),
16035                op_time_us: Default::default(),
16036                status: Default::default(),
16037            }
16038        }
16039    }
16040
16041    ///`WaitInstanceResponseData`
16042    ///
16043    /// <details><summary>JSON schema</summary>
16044    ///
16045    /// ```json
16046    ///{
16047    ///  "type": "object",
16048    ///  "properties": {
16049    ///    "instances": {
16050    ///      "description": "The instance(s) which this requested waited on.",
16051    ///      "type": "array",
16052    ///      "items": {
16053    ///        "$ref": "#/components/schemas/WaitInstanceResponseWaitedInstance"
16054    ///      }
16055    ///    }
16056    ///  }
16057    ///}
16058    /// ```
16059    /// </details>
16060    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16061    pub struct WaitInstanceResponseData {
16062        ///The instance(s) which this requested waited on.
16063        #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
16064        pub instances: ::std::vec::Vec<WaitInstanceResponseWaitedInstance>,
16065    }
16066
16067    impl ::std::convert::From<&WaitInstanceResponseData> for WaitInstanceResponseData {
16068        fn from(value: &WaitInstanceResponseData) -> Self {
16069            value.clone()
16070        }
16071    }
16072
16073    impl ::std::default::Default for WaitInstanceResponseData {
16074        fn default() -> Self {
16075            Self {
16076                instances: Default::default(),
16077            }
16078        }
16079    }
16080
16081    ///`WaitInstanceResponseWaitedInstance`
16082    ///
16083    /// <details><summary>JSON schema</summary>
16084    ///
16085    /// ```json
16086    ///{
16087    ///  "type": "object",
16088    ///  "properties": {
16089    ///    "error": {
16090    ///      "description": "An optional error code providing additional
16091    /// information about the status.\nThis field is useful when the status is
16092    /// not `success`.",
16093    ///      "examples": [
16094    ///        8
16095    ///      ],
16096    ///      "type": "integer",
16097    ///      "format": "int32"
16098    ///    },
16099    ///    "message": {
16100    ///      "description": "An optional message providing additional
16101    /// information about the status.\nThis field is useful when the status is
16102    /// not `success`.",
16103    ///      "examples": [
16104    ///        "No instance with name 'funky-town-g756b5d'"
16105    ///      ],
16106    ///      "type": "string"
16107    ///    },
16108    ///    "name": {
16109    ///      "description": "The name of the instance.",
16110    ///      "examples": [
16111    ///        "funky-town-g756b5d"
16112    ///      ],
16113    ///      "type": "string"
16114    ///    },
16115    ///    "state": {
16116    ///      "description": "The current state of the instance.",
16117    ///      "type": "string",
16118    ///      "format": "enum",
16119    ///      "enum": [
16120    ///        "stopped",
16121    ///        "starting",
16122    ///        "running",
16123    ///        "draining",
16124    ///        "stopping",
16125    ///        "standby"
16126    ///      ]
16127    ///    },
16128    ///    "uuid": {
16129    ///      "description": "The UUID of the instance.",
16130    ///      "examples": [
16131    ///        "123e4567-e89b-12d3-a456-426614174000"
16132    ///      ],
16133    ///      "type": "string",
16134    ///      "format": "uuid"
16135    ///    }
16136    ///  }
16137    ///}
16138    /// ```
16139    /// </details>
16140    #[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
16141    pub struct WaitInstanceResponseWaitedInstance {
16142        ///An optional error code providing additional information about the
16143        /// status. This field is useful when the status is not
16144        /// `success`.
16145        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16146        pub error: ::std::option::Option<i32>,
16147        ///An optional message providing additional information about the
16148        /// status. This field is useful when the status is not
16149        /// `success`.
16150        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16151        pub message: ::std::option::Option<::std::string::String>,
16152        ///The name of the instance.
16153        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16154        pub name: ::std::option::Option<::std::string::String>,
16155        ///The current state of the instance.
16156        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16157        pub state: ::std::option::Option<WaitInstanceResponseWaitedInstanceState>,
16158        ///The UUID of the instance.
16159        #[serde(default, skip_serializing_if = "::std::option::Option::is_none")]
16160        pub uuid: ::std::option::Option<::uuid::Uuid>,
16161    }
16162
16163    impl ::std::convert::From<&WaitInstanceResponseWaitedInstance>
16164        for WaitInstanceResponseWaitedInstance
16165    {
16166        fn from(value: &WaitInstanceResponseWaitedInstance) -> Self {
16167            value.clone()
16168        }
16169    }
16170
16171    impl ::std::default::Default for WaitInstanceResponseWaitedInstance {
16172        fn default() -> Self {
16173            Self {
16174                error: Default::default(),
16175                message: Default::default(),
16176                name: Default::default(),
16177                state: Default::default(),
16178                uuid: Default::default(),
16179            }
16180        }
16181    }
16182
16183    ///The current state of the instance.
16184    ///
16185    /// <details><summary>JSON schema</summary>
16186    ///
16187    /// ```json
16188    ///{
16189    ///  "description": "The current state of the instance.",
16190    ///  "type": "string",
16191    ///  "format": "enum",
16192    ///  "enum": [
16193    ///    "stopped",
16194    ///    "starting",
16195    ///    "running",
16196    ///    "draining",
16197    ///    "stopping",
16198    ///    "standby"
16199    ///  ]
16200    ///}
16201    /// ```
16202    /// </details>
16203    #[derive(
16204        :: serde :: Deserialize,
16205        :: serde :: Serialize,
16206        Clone,
16207        Copy,
16208        Debug,
16209        Eq,
16210        Hash,
16211        Ord,
16212        PartialEq,
16213        PartialOrd,
16214    )]
16215    pub enum WaitInstanceResponseWaitedInstanceState {
16216        #[serde(rename = "stopped")]
16217        Stopped,
16218        #[serde(rename = "starting")]
16219        Starting,
16220        #[serde(rename = "running")]
16221        Running,
16222        #[serde(rename = "draining")]
16223        Draining,
16224        #[serde(rename = "stopping")]
16225        Stopping,
16226        #[serde(rename = "standby")]
16227        Standby,
16228    }
16229
16230    impl ::std::convert::From<&Self> for WaitInstanceResponseWaitedInstanceState {
16231        fn from(value: &WaitInstanceResponseWaitedInstanceState) -> Self {
16232            value.clone()
16233        }
16234    }
16235
16236    impl ::std::fmt::Display for WaitInstanceResponseWaitedInstanceState {
16237        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16238            match *self {
16239                Self::Stopped => write!(f, "stopped"),
16240                Self::Starting => write!(f, "starting"),
16241                Self::Running => write!(f, "running"),
16242                Self::Draining => write!(f, "draining"),
16243                Self::Stopping => write!(f, "stopping"),
16244                Self::Standby => write!(f, "standby"),
16245            }
16246        }
16247    }
16248
16249    impl ::std::str::FromStr for WaitInstanceResponseWaitedInstanceState {
16250        type Err = self::error::ConversionError;
16251        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16252            match value {
16253                "stopped" => Ok(Self::Stopped),
16254                "starting" => Ok(Self::Starting),
16255                "running" => Ok(Self::Running),
16256                "draining" => Ok(Self::Draining),
16257                "stopping" => Ok(Self::Stopping),
16258                "standby" => Ok(Self::Standby),
16259                _ => Err("invalid value".into()),
16260            }
16261        }
16262    }
16263
16264    impl ::std::convert::TryFrom<&str> for WaitInstanceResponseWaitedInstanceState {
16265        type Error = self::error::ConversionError;
16266        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16267            value.parse()
16268        }
16269    }
16270
16271    impl ::std::convert::TryFrom<&::std::string::String> for WaitInstanceResponseWaitedInstanceState {
16272        type Error = self::error::ConversionError;
16273        fn try_from(
16274            value: &::std::string::String,
16275        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16276            value.parse()
16277        }
16278    }
16279
16280    impl ::std::convert::TryFrom<::std::string::String> for WaitInstanceResponseWaitedInstanceState {
16281        type Error = self::error::ConversionError;
16282        fn try_from(
16283            value: ::std::string::String,
16284        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16285            value.parse()
16286        }
16287    }
16288
16289    ///`WaitInstancesState`
16290    ///
16291    /// <details><summary>JSON schema</summary>
16292    ///
16293    /// ```json
16294    ///{
16295    ///  "type": "string",
16296    ///  "format": "enum",
16297    ///  "enum": [
16298    ///    "stopped",
16299    ///    "starting",
16300    ///    "running",
16301    ///    "draining",
16302    ///    "stopping",
16303    ///    "standby"
16304    ///  ]
16305    ///}
16306    /// ```
16307    /// </details>
16308    #[derive(
16309        :: serde :: Deserialize,
16310        :: serde :: Serialize,
16311        Clone,
16312        Copy,
16313        Debug,
16314        Eq,
16315        Hash,
16316        Ord,
16317        PartialEq,
16318        PartialOrd,
16319    )]
16320    pub enum WaitInstancesState {
16321        #[serde(rename = "stopped")]
16322        Stopped,
16323        #[serde(rename = "starting")]
16324        Starting,
16325        #[serde(rename = "running")]
16326        Running,
16327        #[serde(rename = "draining")]
16328        Draining,
16329        #[serde(rename = "stopping")]
16330        Stopping,
16331        #[serde(rename = "standby")]
16332        Standby,
16333    }
16334
16335    impl ::std::convert::From<&Self> for WaitInstancesState {
16336        fn from(value: &WaitInstancesState) -> Self {
16337            value.clone()
16338        }
16339    }
16340
16341    impl ::std::fmt::Display for WaitInstancesState {
16342        fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
16343            match *self {
16344                Self::Stopped => write!(f, "stopped"),
16345                Self::Starting => write!(f, "starting"),
16346                Self::Running => write!(f, "running"),
16347                Self::Draining => write!(f, "draining"),
16348                Self::Stopping => write!(f, "stopping"),
16349                Self::Standby => write!(f, "standby"),
16350            }
16351        }
16352    }
16353
16354    impl ::std::str::FromStr for WaitInstancesState {
16355        type Err = self::error::ConversionError;
16356        fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16357            match value {
16358                "stopped" => Ok(Self::Stopped),
16359                "starting" => Ok(Self::Starting),
16360                "running" => Ok(Self::Running),
16361                "draining" => Ok(Self::Draining),
16362                "stopping" => Ok(Self::Stopping),
16363                "standby" => Ok(Self::Standby),
16364                _ => Err("invalid value".into()),
16365            }
16366        }
16367    }
16368
16369    impl ::std::convert::TryFrom<&str> for WaitInstancesState {
16370        type Error = self::error::ConversionError;
16371        fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
16372            value.parse()
16373        }
16374    }
16375
16376    impl ::std::convert::TryFrom<&::std::string::String> for WaitInstancesState {
16377        type Error = self::error::ConversionError;
16378        fn try_from(
16379            value: &::std::string::String,
16380        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16381            value.parse()
16382        }
16383    }
16384
16385    impl ::std::convert::TryFrom<::std::string::String> for WaitInstancesState {
16386        type Error = self::error::ConversionError;
16387        fn try_from(
16388            value: ::std::string::String,
16389        ) -> ::std::result::Result<Self, self::error::ConversionError> {
16390            value.parse()
16391        }
16392    }
16393}
16394
16395#[derive(Clone, Debug)]
16396///Client for Unikraft Cloud Platform API
16397///
16398///This specification describes the Unikraft Cloud Platform API, which provides
16399/// mechanisms to interact with Unikraft Cloud metros. It allows you to create,
16400/// manage, and interact with instances running on the platform.
16401///
16402///Version: v1.0.0
16403pub struct Client {
16404    pub(crate) baseurl: String,
16405    pub(crate) client: reqwest::Client,
16406}
16407
16408impl Client {
16409    /// Create a new client.
16410    ///
16411    /// `baseurl` is the base URL provided to the internal
16412    /// `reqwest::Client`, and should include a scheme and hostname,
16413    /// as well as port and a path stem if applicable.
16414    pub fn new(baseurl: &str) -> Self {
16415        #[cfg(not(target_arch = "wasm32"))]
16416        let client = {
16417            let dur = std::time::Duration::from_secs(15);
16418            reqwest::ClientBuilder::new()
16419                .connect_timeout(dur)
16420                .timeout(dur)
16421        };
16422        #[cfg(target_arch = "wasm32")]
16423        let client = reqwest::ClientBuilder::new();
16424        Self::new_with_client(baseurl, client.build().unwrap())
16425    }
16426
16427    /// Construct a new client with an existing `reqwest::Client`,
16428    /// allowing more control over its configuration.
16429    ///
16430    /// `baseurl` is the base URL provided to the internal
16431    /// `reqwest::Client`, and should include a scheme and hostname,
16432    /// as well as port and a path stem if applicable.
16433    pub fn new_with_client(baseurl: &str, client: reqwest::Client) -> Self {
16434        Self {
16435            baseurl: baseurl.to_string(),
16436            client,
16437        }
16438    }
16439
16440    /// Get the base URL to which requests are made.
16441    pub fn baseurl(&self) -> &String {
16442        &self.baseurl
16443    }
16444
16445    /// Get the internal `reqwest::Client` used to make requests.
16446    pub fn client(&self) -> &reqwest::Client {
16447        &self.client
16448    }
16449
16450    /// Get the version of this API.
16451    ///
16452    /// This string is pulled directly from the source OpenAPI
16453    /// document and may be in any format the API selects.
16454    pub fn api_version(&self) -> &'static str {
16455        "v1.0.0"
16456    }
16457}
16458
16459#[allow(clippy::all)]
16460#[allow(elided_named_lifetimes)]
16461impl Client {
16462    ///List Certificates
16463    ///
16464    ///Get one or many certificates with their current status and
16465    /// configuration. It's possible to filter this list by name or UUID.
16466    ///
16467    ///Sends a `GET` request to `/v1/certificates`
16468    ///
16469    ///Arguments:
16470    /// - `details`: Whether to include details about the certificate in the
16471    ///   response.  By
16472    ///default this is set to true, meaning that all information about the
16473    ///certificate will be included in the response.  If set to false, only the
16474    ///basic information about the certificate will be included, such as its
16475    /// name and UUID.
16476    /// - `body`
16477    pub async fn get_certificates<'a>(
16478        &'a self,
16479        details: Option<bool>,
16480        body: &'a ::std::vec::Vec<types::NameOrUuid>,
16481    ) -> Result<ResponseValue<types::GetCertificatesResponse>, Error<types::GetCertificatesResponse>>
16482    {
16483        let url = format!("{}/v1/certificates", self.baseurl,);
16484        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16485        header_map.append(
16486            ::reqwest::header::HeaderName::from_static("api-version"),
16487            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16488        );
16489        #[allow(unused_mut)]
16490        let mut request = self
16491            .client
16492            .get(url)
16493            .header(
16494                ::reqwest::header::ACCEPT,
16495                ::reqwest::header::HeaderValue::from_static("application/json"),
16496            )
16497            .json(&body)
16498            .query(&progenitor_client::QueryParam::new("details", &details))
16499            .headers(header_map)
16500            .build()?;
16501        let result = self.client.execute(request).await;
16502        let response = result?;
16503        match response.status().as_u16() {
16504            200..=299 => ResponseValue::from_response(response).await,
16505            _ => Err(Error::ErrorResponse(
16506                ResponseValue::from_response(response).await?,
16507            )),
16508        }
16509    }
16510
16511    ///Create Certificate
16512    ///
16513    ///Upload a new certificate with the given configuration.
16514    ///
16515    ///Sends a `POST` request to `/v1/certificates`
16516    pub async fn create_certificate<'a>(
16517        &'a self,
16518        body: &'a types::CreateCertificateRequest,
16519    ) -> Result<
16520        ResponseValue<types::CreateCertificateResponse>,
16521        Error<types::CreateCertificateResponse>,
16522    > {
16523        let url = format!("{}/v1/certificates", self.baseurl,);
16524        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16525        header_map.append(
16526            ::reqwest::header::HeaderName::from_static("api-version"),
16527            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16528        );
16529        #[allow(unused_mut)]
16530        let mut request = self
16531            .client
16532            .post(url)
16533            .header(
16534                ::reqwest::header::ACCEPT,
16535                ::reqwest::header::HeaderValue::from_static("application/json"),
16536            )
16537            .json(&body)
16538            .headers(header_map)
16539            .build()?;
16540        let result = self.client.execute(request).await;
16541        let response = result?;
16542        match response.status().as_u16() {
16543            200..=299 => ResponseValue::from_response(response).await,
16544            _ => Err(Error::ErrorResponse(
16545                ResponseValue::from_response(response).await?,
16546            )),
16547        }
16548    }
16549
16550    ///Delete Certificates
16551    ///
16552    ///Delete the specified certificate(s).  After this call the name of the
16553    ///certificate(s) are no longer valid.
16554    ///
16555    ///Sends a `DELETE` request to `/v1/certificates`
16556    pub async fn delete_certificates<'a>(
16557        &'a self,
16558        body: &'a ::std::vec::Vec<types::NameOrUuid>,
16559    ) -> Result<
16560        ResponseValue<types::DeleteCertificatesResponse>,
16561        Error<types::DeleteCertificatesResponse>,
16562    > {
16563        let url = format!("{}/v1/certificates", self.baseurl,);
16564        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16565        header_map.append(
16566            ::reqwest::header::HeaderName::from_static("api-version"),
16567            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16568        );
16569        #[allow(unused_mut)]
16570        let mut request = self
16571            .client
16572            .delete(url)
16573            .header(
16574                ::reqwest::header::ACCEPT,
16575                ::reqwest::header::HeaderValue::from_static("application/json"),
16576            )
16577            .json(&body)
16578            .headers(header_map)
16579            .build()?;
16580        let result = self.client.execute(request).await;
16581        let response = result?;
16582        match response.status().as_u16() {
16583            200..=299 => ResponseValue::from_response(response).await,
16584            _ => Err(Error::ErrorResponse(
16585                ResponseValue::from_response(response).await?,
16586            )),
16587        }
16588    }
16589
16590    ///Get Certificate by UUID
16591    ///
16592    ///Get a specified certificate by its UUID.
16593    ///
16594    ///Sends a `GET` request to `/v1/certificates/{uuid}`
16595    ///
16596    ///Arguments:
16597    /// - `uuid`: The UUID of the certificate.
16598    pub async fn get_certificate_by_uuid<'a>(
16599        &'a self,
16600        uuid: &'a ::uuid::Uuid,
16601    ) -> Result<ResponseValue<types::GetCertificatesResponse>, Error<types::GetCertificatesResponse>>
16602    {
16603        let url = format!(
16604            "{}/v1/certificates/{}",
16605            self.baseurl,
16606            encode_path(&uuid.to_string()),
16607        );
16608        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16609        header_map.append(
16610            ::reqwest::header::HeaderName::from_static("api-version"),
16611            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16612        );
16613        #[allow(unused_mut)]
16614        let mut request = self
16615            .client
16616            .get(url)
16617            .header(
16618                ::reqwest::header::ACCEPT,
16619                ::reqwest::header::HeaderValue::from_static("application/json"),
16620            )
16621            .headers(header_map)
16622            .build()?;
16623        let result = self.client.execute(request).await;
16624        let response = result?;
16625        match response.status().as_u16() {
16626            200..=299 => ResponseValue::from_response(response).await,
16627            _ => Err(Error::ErrorResponse(
16628                ResponseValue::from_response(response).await?,
16629            )),
16630        }
16631    }
16632
16633    ///Delete Certificate by UUID
16634    ///
16635    ///Delete a specified certificate by its UUID.  After this call the UUID of
16636    ///the certificate are no longer valid.
16637    ///
16638    ///Sends a `DELETE` request to `/v1/certificates/{uuid}`
16639    ///
16640    ///Arguments:
16641    /// - `uuid`: The UUID of the certificate to delete.
16642    pub async fn delete_certificate_by_uuid<'a>(
16643        &'a self,
16644        uuid: &'a ::uuid::Uuid,
16645    ) -> Result<
16646        ResponseValue<types::DeleteCertificatesResponse>,
16647        Error<types::DeleteCertificatesResponse>,
16648    > {
16649        let url = format!(
16650            "{}/v1/certificates/{}",
16651            self.baseurl,
16652            encode_path(&uuid.to_string()),
16653        );
16654        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16655        header_map.append(
16656            ::reqwest::header::HeaderName::from_static("api-version"),
16657            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16658        );
16659        #[allow(unused_mut)]
16660        let mut request = self
16661            .client
16662            .delete(url)
16663            .header(
16664                ::reqwest::header::ACCEPT,
16665                ::reqwest::header::HeaderValue::from_static("application/json"),
16666            )
16667            .headers(header_map)
16668            .build()?;
16669        let result = self.client.execute(request).await;
16670        let response = result?;
16671        match response.status().as_u16() {
16672            200..=299 => ResponseValue::from_response(response).await,
16673            _ => Err(Error::ErrorResponse(
16674                ResponseValue::from_response(response).await?,
16675            )),
16676        }
16677    }
16678
16679    ///Health Check
16680    ///
16681    ///Return the status of a full-system health check of the platform.
16682    ///
16683    ///Sends a `GET` request to `/v1/healthz`
16684    pub async fn healthz<'a>(
16685        &'a self,
16686    ) -> Result<ResponseValue<types::HealthzResponse>, Error<types::HealthzResponse>> {
16687        let url = format!("{}/v1/healthz", self.baseurl,);
16688        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16689        header_map.append(
16690            ::reqwest::header::HeaderName::from_static("api-version"),
16691            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16692        );
16693        #[allow(unused_mut)]
16694        let mut request = self
16695            .client
16696            .get(url)
16697            .header(
16698                ::reqwest::header::ACCEPT,
16699                ::reqwest::header::HeaderValue::from_static("application/json"),
16700            )
16701            .headers(header_map)
16702            .build()?;
16703        let result = self.client.execute(request).await;
16704        let response = result?;
16705        match response.status().as_u16() {
16706            200..=299 => ResponseValue::from_response(response).await,
16707            _ => Err(Error::ErrorResponse(
16708                ResponseValue::from_response(response).await?,
16709            )),
16710        }
16711    }
16712
16713    ///Get Image by Digest
16714    ///
16715    ///Retrieve an image by its digest.
16716    ///
16717    ///Sends a `GET` request to `/v1/images/digest/{digest}`
16718    pub async fn get_image_by_digest<'a>(
16719        &'a self,
16720        digest: &'a str,
16721    ) -> Result<ResponseValue<types::GetImageResponse>, Error<types::GetImageResponse>> {
16722        let url = format!(
16723            "{}/v1/images/digest/{}",
16724            self.baseurl,
16725            encode_path(&digest.to_string()),
16726        );
16727        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16728        header_map.append(
16729            ::reqwest::header::HeaderName::from_static("api-version"),
16730            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16731        );
16732        #[allow(unused_mut)]
16733        let mut request = self
16734            .client
16735            .get(url)
16736            .header(
16737                ::reqwest::header::ACCEPT,
16738                ::reqwest::header::HeaderValue::from_static("application/json"),
16739            )
16740            .headers(header_map)
16741            .build()?;
16742        let result = self.client.execute(request).await;
16743        let response = result?;
16744        match response.status().as_u16() {
16745            200..=299 => ResponseValue::from_response(response).await,
16746            _ => Err(Error::ErrorResponse(
16747                ResponseValue::from_response(response).await?,
16748            )),
16749        }
16750    }
16751
16752    ///Get Image by Tag
16753    ///
16754    ///Retrieve an image by its tag.
16755    ///
16756    ///Sends a `GET` request to `/v1/images/tag/{tag}`
16757    pub async fn get_image_by_tag<'a>(
16758        &'a self,
16759        tag: &'a str,
16760    ) -> Result<ResponseValue<types::GetImageResponse>, Error<types::GetImageResponse>> {
16761        let url = format!(
16762            "{}/v1/images/tag/{}",
16763            self.baseurl,
16764            encode_path(&tag.to_string()),
16765        );
16766        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16767        header_map.append(
16768            ::reqwest::header::HeaderName::from_static("api-version"),
16769            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16770        );
16771        #[allow(unused_mut)]
16772        let mut request = self
16773            .client
16774            .get(url)
16775            .header(
16776                ::reqwest::header::ACCEPT,
16777                ::reqwest::header::HeaderValue::from_static("application/json"),
16778            )
16779            .headers(header_map)
16780            .build()?;
16781        let result = self.client.execute(request).await;
16782        let response = result?;
16783        match response.status().as_u16() {
16784            200..=299 => ResponseValue::from_response(response).await,
16785            _ => Err(Error::ErrorResponse(
16786                ResponseValue::from_response(response).await?,
16787            )),
16788        }
16789    }
16790
16791    ///List Instances
16792    ///
16793    ///Get one or many instances with their current status and configuration.
16794    ///It's possible to filter this list by ID(s) (name or UUID).
16795    ///
16796    ///Sends a `GET` request to `/v1/instances`
16797    ///
16798    ///Arguments:
16799    /// - `details`: Whether to include details about the instance in the
16800    ///   response.  By default
16801    ///this is set to true, meaning that all information about the instance
16802    /// will be included in the response.  If set to false, only the basic
16803    /// information about the instance will be included, such as its name
16804    /// and UUID.
16805    /// - `body`
16806    pub async fn get_instances<'a>(
16807        &'a self,
16808        details: Option<bool>,
16809        body: &'a ::std::vec::Vec<types::NameOrUuid>,
16810    ) -> Result<ResponseValue<types::GetInstancesResponse>, Error<types::GetInstancesResponse>>
16811    {
16812        let url = format!("{}/v1/instances", self.baseurl,);
16813        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16814        header_map.append(
16815            ::reqwest::header::HeaderName::from_static("api-version"),
16816            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16817        );
16818        #[allow(unused_mut)]
16819        let mut request = self
16820            .client
16821            .get(url)
16822            .header(
16823                ::reqwest::header::ACCEPT,
16824                ::reqwest::header::HeaderValue::from_static("application/json"),
16825            )
16826            .json(&body)
16827            .query(&progenitor_client::QueryParam::new("details", &details))
16828            .headers(header_map)
16829            .build()?;
16830        let result = self.client.execute(request).await;
16831        let response = result?;
16832        match response.status().as_u16() {
16833            200..=299 => ResponseValue::from_response(response).await,
16834            _ => Err(Error::ErrorResponse(
16835                ResponseValue::from_response(response).await?,
16836            )),
16837        }
16838    }
16839
16840    ///Create Instance
16841    ///
16842    ///Create an instance in Unikraft Cloud.
16843    ///
16844    ///Sends a `POST` request to `/v1/instances`
16845    pub async fn create_instance<'a>(
16846        &'a self,
16847        body: &'a types::CreateInstanceRequest,
16848    ) -> Result<ResponseValue<types::CreateInstanceResponse>, Error<types::CreateInstanceResponse>>
16849    {
16850        let url = format!("{}/v1/instances", self.baseurl,);
16851        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16852        header_map.append(
16853            ::reqwest::header::HeaderName::from_static("api-version"),
16854            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16855        );
16856        #[allow(unused_mut)]
16857        let mut request = self
16858            .client
16859            .post(url)
16860            .header(
16861                ::reqwest::header::ACCEPT,
16862                ::reqwest::header::HeaderValue::from_static("application/json"),
16863            )
16864            .json(&body)
16865            .headers(header_map)
16866            .build()?;
16867        let result = self.client.execute(request).await;
16868        let response = result?;
16869        match response.status().as_u16() {
16870            200..=299 => ResponseValue::from_response(response).await,
16871            _ => Err(Error::ErrorResponse(
16872                ResponseValue::from_response(response).await?,
16873            )),
16874        }
16875    }
16876
16877    ///Delete Instances
16878    ///
16879    ///Delete the specified instance(s) by ID(s) (name or UUID).  After this
16880    /// call the name of the instances are no longer valid.  If the
16881    /// instances are currently running, they are force-stopped.
16882    ///
16883    ///Sends a `DELETE` request to `/v1/instances`
16884    pub async fn delete_instances<'a>(
16885        &'a self,
16886        body: &'a ::std::vec::Vec<types::NameOrUuid>,
16887    ) -> Result<ResponseValue<types::DeleteInstancesResponse>, Error<types::DeleteInstancesResponse>>
16888    {
16889        let url = format!("{}/v1/instances", self.baseurl,);
16890        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16891        header_map.append(
16892            ::reqwest::header::HeaderName::from_static("api-version"),
16893            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16894        );
16895        #[allow(unused_mut)]
16896        let mut request = self
16897            .client
16898            .delete(url)
16899            .header(
16900                ::reqwest::header::ACCEPT,
16901                ::reqwest::header::HeaderValue::from_static("application/json"),
16902            )
16903            .json(&body)
16904            .headers(header_map)
16905            .build()?;
16906        let result = self.client.execute(request).await;
16907        let response = result?;
16908        match response.status().as_u16() {
16909            200..=299 => ResponseValue::from_response(response).await,
16910            _ => Err(Error::ErrorResponse(
16911                ResponseValue::from_response(response).await?,
16912            )),
16913        }
16914    }
16915
16916    ///Update Instances
16917    ///
16918    ///Update (modify) one or more instances by ID(s) (name or UUID).  The
16919    ///instances must be in a stopped state for most update operations.
16920    ///
16921    ///Sends a `PATCH` request to `/v1/instances`
16922    pub async fn update_instances<'a>(
16923        &'a self,
16924        body: &'a types::UpdateInstancesRequest,
16925    ) -> Result<ResponseValue<types::UpdateInstancesResponse>, Error<types::UpdateInstancesResponse>>
16926    {
16927        let url = format!("{}/v1/instances", self.baseurl,);
16928        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16929        header_map.append(
16930            ::reqwest::header::HeaderName::from_static("api-version"),
16931            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16932        );
16933        #[allow(unused_mut)]
16934        let mut request = self
16935            .client
16936            .patch(url)
16937            .header(
16938                ::reqwest::header::ACCEPT,
16939                ::reqwest::header::HeaderValue::from_static("application/json"),
16940            )
16941            .json(&body)
16942            .headers(header_map)
16943            .build()?;
16944        let result = self.client.execute(request).await;
16945        let response = result?;
16946        match response.status().as_u16() {
16947            200..=299 => ResponseValue::from_response(response).await,
16948            _ => Err(Error::ErrorResponse(
16949                ResponseValue::from_response(response).await?,
16950            )),
16951        }
16952    }
16953
16954    ///Get Instances Logs
16955    ///
16956    ///Retrieve the logs of one or more instances by ID(s) (name or UUID).
16957    ///
16958    ///Sends a `GET` request to `/v1/instances/log`
16959    pub async fn get_instance_logs<'a>(
16960        &'a self,
16961        body: &'a types::GetInstanceLogsRequest,
16962    ) -> Result<ResponseValue<types::GetInstanceLogsResponse>, Error<types::GetInstanceLogsResponse>>
16963    {
16964        let url = format!("{}/v1/instances/log", self.baseurl,);
16965        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
16966        header_map.append(
16967            ::reqwest::header::HeaderName::from_static("api-version"),
16968            ::reqwest::header::HeaderValue::from_static(self.api_version()),
16969        );
16970        #[allow(unused_mut)]
16971        let mut request = self
16972            .client
16973            .get(url)
16974            .header(
16975                ::reqwest::header::ACCEPT,
16976                ::reqwest::header::HeaderValue::from_static("application/json"),
16977            )
16978            .json(&body)
16979            .headers(header_map)
16980            .build()?;
16981        let result = self.client.execute(request).await;
16982        let response = result?;
16983        match response.status().as_u16() {
16984            200..=299 => ResponseValue::from_response(response).await,
16985            _ => Err(Error::ErrorResponse(
16986                ResponseValue::from_response(response).await?,
16987            )),
16988        }
16989    }
16990
16991    ///Get Instances Metrics
16992    ///
16993    ///Get the metrics of an instance by its UUID or name.
16994    ///
16995    ///Sends a `GET` request to `/v1/instances/metrics`
16996    ///
16997    ///Arguments:
16998    /// - `name`: Mutually exclusive with UUID.
16999    /// - `uuid`: Mutually exclusive with name.
17000    pub async fn get_instance_metrics<'a>(
17001        &'a self,
17002        name: Option<&'a str>,
17003        uuid: Option<&'a str>,
17004    ) -> Result<
17005        ResponseValue<types::GetInstanceMetricsResponse>,
17006        Error<types::GetInstanceMetricsResponse>,
17007    > {
17008        let url = format!("{}/v1/instances/metrics", self.baseurl,);
17009        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17010        header_map.append(
17011            ::reqwest::header::HeaderName::from_static("api-version"),
17012            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17013        );
17014        #[allow(unused_mut)]
17015        let mut request = self
17016            .client
17017            .get(url)
17018            .header(
17019                ::reqwest::header::ACCEPT,
17020                ::reqwest::header::HeaderValue::from_static("application/json"),
17021            )
17022            .query(&progenitor_client::QueryParam::new("name", &name))
17023            .query(&progenitor_client::QueryParam::new("uuid", &uuid))
17024            .headers(header_map)
17025            .build()?;
17026        let result = self.client.execute(request).await;
17027        let response = result?;
17028        match response.status().as_u16() {
17029            200..=299 => ResponseValue::from_response(response).await,
17030            _ => Err(Error::ErrorResponse(
17031                ResponseValue::from_response(response).await?,
17032            )),
17033        }
17034    }
17035
17036    ///Start Instances
17037    ///
17038    ///Start previously stopped instances by ID(s) (name or UUID) or do
17039    ///nothing if the instances are already running.
17040    ///
17041    ///Sends a `PUT` request to `/v1/instances/start`
17042    pub async fn start_instances<'a>(
17043        &'a self,
17044        body: &'a ::std::vec::Vec<types::NameOrUuid>,
17045    ) -> Result<ResponseValue<types::StartInstanceResponse>, Error<types::StartInstanceResponse>>
17046    {
17047        let url = format!("{}/v1/instances/start", self.baseurl,);
17048        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17049        header_map.append(
17050            ::reqwest::header::HeaderName::from_static("api-version"),
17051            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17052        );
17053        #[allow(unused_mut)]
17054        let mut request = self
17055            .client
17056            .put(url)
17057            .header(
17058                ::reqwest::header::ACCEPT,
17059                ::reqwest::header::HeaderValue::from_static("application/json"),
17060            )
17061            .json(&body)
17062            .headers(header_map)
17063            .build()?;
17064        let result = self.client.execute(request).await;
17065        let response = result?;
17066        match response.status().as_u16() {
17067            200..=299 => ResponseValue::from_response(response).await,
17068            _ => Err(Error::ErrorResponse(
17069                ResponseValue::from_response(response).await?,
17070            )),
17071        }
17072    }
17073
17074    ///Stop Instances
17075    ///
17076    ///Stop one or more running instance by ID(s) (name or UUID) or do
17077    ///nothing if the instances are already stopped.
17078    ///
17079    ///Sends a `PUT` request to `/v1/instances/stop`
17080    pub async fn stop_instances<'a>(
17081        &'a self,
17082        body: &'a ::std::vec::Vec<types::StopInstancesRequestId>,
17083    ) -> Result<ResponseValue<types::StopInstanceResponse>, Error<types::StopInstanceResponse>>
17084    {
17085        let url = format!("{}/v1/instances/stop", self.baseurl,);
17086        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17087        header_map.append(
17088            ::reqwest::header::HeaderName::from_static("api-version"),
17089            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17090        );
17091        #[allow(unused_mut)]
17092        let mut request = self
17093            .client
17094            .put(url)
17095            .header(
17096                ::reqwest::header::ACCEPT,
17097                ::reqwest::header::HeaderValue::from_static("application/json"),
17098            )
17099            .json(&body)
17100            .headers(header_map)
17101            .build()?;
17102        let result = self.client.execute(request).await;
17103        let response = result?;
17104        match response.status().as_u16() {
17105            200..=299 => ResponseValue::from_response(response).await,
17106            _ => Err(Error::ErrorResponse(
17107                ResponseValue::from_response(response).await?,
17108            )),
17109        }
17110    }
17111
17112    ///Wait for Instances States
17113    ///
17114    ///Wait for one or more instances to reach certain states by ID(s)
17115    ///(name or UUID).
17116    ///
17117    ///If the instances are already in the desired states, the request will
17118    /// return immediately.  If the instances are not in the desired state,
17119    /// the request will block until the instances reach the desired state
17120    /// or the timeout is reached.  If the timeout is reached, the request
17121    /// will fail with an error. If the timeout is -1, the request will
17122    /// block indefinitely until the instances reach the desired states.
17123    ///
17124    ///Sends a `GET` request to `/v1/instances/wait`
17125    ///
17126    ///Arguments:
17127    /// - `state`: The desired state to wait for.  Default is `running`.
17128    /// - `timeout_ms`: Timeout in milliseconds to wait for the instance to
17129    ///   reach the desired
17130    ///state.  If the timeout is reached, the request will fail with an error.
17131    ///A value of -1 means to wait indefinitely until the instance reaches the
17132    ///desired state.
17133    /// - `body`
17134    pub async fn wait_instances<'a>(
17135        &'a self,
17136        state: Option<types::WaitInstancesState>,
17137        timeout_ms: Option<i64>,
17138        body: &'a ::std::vec::Vec<types::NameOrUuid>,
17139    ) -> Result<ResponseValue<types::WaitInstanceResponse>, Error<types::WaitInstanceResponse>>
17140    {
17141        let url = format!("{}/v1/instances/wait", self.baseurl,);
17142        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17143        header_map.append(
17144            ::reqwest::header::HeaderName::from_static("api-version"),
17145            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17146        );
17147        #[allow(unused_mut)]
17148        let mut request = self
17149            .client
17150            .get(url)
17151            .header(
17152                ::reqwest::header::ACCEPT,
17153                ::reqwest::header::HeaderValue::from_static("application/json"),
17154            )
17155            .json(&body)
17156            .query(&progenitor_client::QueryParam::new("state", &state))
17157            .query(&progenitor_client::QueryParam::new(
17158                "timeout_ms",
17159                &timeout_ms,
17160            ))
17161            .headers(header_map)
17162            .build()?;
17163        let result = self.client.execute(request).await;
17164        let response = result?;
17165        match response.status().as_u16() {
17166            200..=299 => ResponseValue::from_response(response).await,
17167            _ => Err(Error::ErrorResponse(
17168                ResponseValue::from_response(response).await?,
17169            )),
17170        }
17171    }
17172
17173    ///Get Instance by UUID
17174    ///
17175    ///Get a single instance by its UUID.
17176    ///
17177    ///Sends a `GET` request to `/v1/instances/{uuid}`
17178    ///
17179    ///Arguments:
17180    /// - `uuid`: The UUID of the instance to get.
17181    /// - `details`: Whether to include details about the instance in the
17182    ///   response.  By default
17183    ///this is set to true, meaning that all information about the instance
17184    /// will be included in the response.  If set to false, only the basic
17185    /// information about the instance will be included, such as its name
17186    /// and UUID.
17187    pub async fn get_instance_by_uuid<'a>(
17188        &'a self,
17189        uuid: &'a ::uuid::Uuid,
17190        details: Option<bool>,
17191    ) -> Result<ResponseValue<types::GetInstancesResponse>, Error<types::GetInstancesResponse>>
17192    {
17193        let url = format!(
17194            "{}/v1/instances/{}",
17195            self.baseurl,
17196            encode_path(&uuid.to_string()),
17197        );
17198        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17199        header_map.append(
17200            ::reqwest::header::HeaderName::from_static("api-version"),
17201            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17202        );
17203        #[allow(unused_mut)]
17204        let mut request = self
17205            .client
17206            .get(url)
17207            .header(
17208                ::reqwest::header::ACCEPT,
17209                ::reqwest::header::HeaderValue::from_static("application/json"),
17210            )
17211            .query(&progenitor_client::QueryParam::new("details", &details))
17212            .headers(header_map)
17213            .build()?;
17214        let result = self.client.execute(request).await;
17215        let response = result?;
17216        match response.status().as_u16() {
17217            200..=299 => ResponseValue::from_response(response).await,
17218            _ => Err(Error::ErrorResponse(
17219                ResponseValue::from_response(response).await?,
17220            )),
17221        }
17222    }
17223
17224    ///Delete Instance by UUID
17225    ///
17226    ///Delete a specified instance by its UUID.  After this call the UUID of
17227    /// the instance is no longer valid.  If the instance is currently
17228    /// running, it is force-stopped.
17229    ///
17230    ///Sends a `DELETE` request to `/v1/instances/{uuid}`
17231    ///
17232    ///Arguments:
17233    /// - `uuid`: The UUID of the instance to delete.
17234    pub async fn delete_instance_by_uuid<'a>(
17235        &'a self,
17236        uuid: &'a ::uuid::Uuid,
17237    ) -> Result<ResponseValue<types::DeleteInstancesResponse>, Error<types::DeleteInstancesResponse>>
17238    {
17239        let url = format!(
17240            "{}/v1/instances/{}",
17241            self.baseurl,
17242            encode_path(&uuid.to_string()),
17243        );
17244        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17245        header_map.append(
17246            ::reqwest::header::HeaderName::from_static("api-version"),
17247            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17248        );
17249        #[allow(unused_mut)]
17250        let mut request = self
17251            .client
17252            .delete(url)
17253            .header(
17254                ::reqwest::header::ACCEPT,
17255                ::reqwest::header::HeaderValue::from_static("application/json"),
17256            )
17257            .headers(header_map)
17258            .build()?;
17259        let result = self.client.execute(request).await;
17260        let response = result?;
17261        match response.status().as_u16() {
17262            200..=299 => ResponseValue::from_response(response).await,
17263            _ => Err(Error::ErrorResponse(
17264                ResponseValue::from_response(response).await?,
17265            )),
17266        }
17267    }
17268
17269    ///Update Instance by UUID
17270    ///
17271    ///Update (modify) an instance by its UUID.  The instance must be in a
17272    /// stopped state for most update operations.
17273    ///
17274    ///Sends a `PATCH` request to `/v1/instances/{uuid}`
17275    ///
17276    ///Arguments:
17277    /// - `uuid`: The UUID of the instance to update.
17278    /// - `body`
17279    pub async fn update_instance_by_uuid<'a>(
17280        &'a self,
17281        uuid: &'a ::uuid::Uuid,
17282        body: &'a types::UpdateInstanceByUuidRequestBody,
17283    ) -> Result<ResponseValue<types::UpdateInstancesResponse>, Error<types::UpdateInstancesResponse>>
17284    {
17285        let url = format!(
17286            "{}/v1/instances/{}",
17287            self.baseurl,
17288            encode_path(&uuid.to_string()),
17289        );
17290        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17291        header_map.append(
17292            ::reqwest::header::HeaderName::from_static("api-version"),
17293            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17294        );
17295        #[allow(unused_mut)]
17296        let mut request = self
17297            .client
17298            .patch(url)
17299            .header(
17300                ::reqwest::header::ACCEPT,
17301                ::reqwest::header::HeaderValue::from_static("application/json"),
17302            )
17303            .json(&body)
17304            .headers(header_map)
17305            .build()?;
17306        let result = self.client.execute(request).await;
17307        let response = result?;
17308        match response.status().as_u16() {
17309            200..=299 => ResponseValue::from_response(response).await,
17310            _ => Err(Error::ErrorResponse(
17311                ResponseValue::from_response(response).await?,
17312            )),
17313        }
17314    }
17315
17316    ///Get Instance Logs by UUID
17317    ///
17318    ///Retrieve the logs of an instance by its UUID.
17319    ///
17320    ///Sends a `GET` request to `/v1/instances/{uuid}/log`
17321    ///
17322    ///Arguments:
17323    /// - `uuid`: The UUID of the instance to retrieve logs for.
17324    /// - `body`
17325    pub async fn get_instance_logs_by_uuid<'a>(
17326        &'a self,
17327        uuid: &'a ::uuid::Uuid,
17328        body: &'a types::GetInstanceLogsByUuidRequestBody,
17329    ) -> Result<ResponseValue<types::GetInstanceLogsResponse>, Error<types::GetInstanceLogsResponse>>
17330    {
17331        let url = format!(
17332            "{}/v1/instances/{}/log",
17333            self.baseurl,
17334            encode_path(&uuid.to_string()),
17335        );
17336        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17337        header_map.append(
17338            ::reqwest::header::HeaderName::from_static("api-version"),
17339            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17340        );
17341        #[allow(unused_mut)]
17342        let mut request = self
17343            .client
17344            .get(url)
17345            .header(
17346                ::reqwest::header::ACCEPT,
17347                ::reqwest::header::HeaderValue::from_static("application/json"),
17348            )
17349            .json(&body)
17350            .headers(header_map)
17351            .build()?;
17352        let result = self.client.execute(request).await;
17353        let response = result?;
17354        match response.status().as_u16() {
17355            200..=299 => ResponseValue::from_response(response).await,
17356            _ => Err(Error::ErrorResponse(
17357                ResponseValue::from_response(response).await?,
17358            )),
17359        }
17360    }
17361
17362    ///Get Instance Metrics by UUID
17363    ///
17364    ///Get the metrics of an instance by its UUID.
17365    ///
17366    ///Sends a `GET` request to `/v1/instances/{uuid}/metrics`
17367    ///
17368    ///Arguments:
17369    /// - `uuid`: The UUID of the instance to retrieve metrics for.
17370    pub async fn get_instance_metrics_by_uuid<'a>(
17371        &'a self,
17372        uuid: &'a ::uuid::Uuid,
17373    ) -> Result<
17374        ResponseValue<types::GetInstanceMetricsResponse>,
17375        Error<types::GetInstanceMetricsResponse>,
17376    > {
17377        let url = format!(
17378            "{}/v1/instances/{}/metrics",
17379            self.baseurl,
17380            encode_path(&uuid.to_string()),
17381        );
17382        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17383        header_map.append(
17384            ::reqwest::header::HeaderName::from_static("api-version"),
17385            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17386        );
17387        #[allow(unused_mut)]
17388        let mut request = self
17389            .client
17390            .get(url)
17391            .header(
17392                ::reqwest::header::ACCEPT,
17393                ::reqwest::header::HeaderValue::from_static("application/json"),
17394            )
17395            .headers(header_map)
17396            .build()?;
17397        let result = self.client.execute(request).await;
17398        let response = result?;
17399        match response.status().as_u16() {
17400            200..=299 => ResponseValue::from_response(response).await,
17401            _ => Err(Error::ErrorResponse(
17402                ResponseValue::from_response(response).await?,
17403            )),
17404        }
17405    }
17406
17407    ///Start Instance by UUID
17408    ///
17409    ///Start a previously stopped instance by its UUID or do nothing if the
17410    ///instance is already running.
17411    ///
17412    ///Sends a `PUT` request to `/v1/instances/{uuid}/start`
17413    ///
17414    ///Arguments:
17415    /// - `uuid`: The UUID of the instance to start.
17416    pub async fn start_instance_by_uuid<'a>(
17417        &'a self,
17418        uuid: &'a ::uuid::Uuid,
17419    ) -> Result<ResponseValue<types::StartInstanceResponse>, Error<types::StartInstanceResponse>>
17420    {
17421        let url = format!(
17422            "{}/v1/instances/{}/start",
17423            self.baseurl,
17424            encode_path(&uuid.to_string()),
17425        );
17426        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17427        header_map.append(
17428            ::reqwest::header::HeaderName::from_static("api-version"),
17429            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17430        );
17431        #[allow(unused_mut)]
17432        let mut request = self
17433            .client
17434            .put(url)
17435            .header(
17436                ::reqwest::header::ACCEPT,
17437                ::reqwest::header::HeaderValue::from_static("application/json"),
17438            )
17439            .headers(header_map)
17440            .build()?;
17441        let result = self.client.execute(request).await;
17442        let response = result?;
17443        match response.status().as_u16() {
17444            200..=299 => ResponseValue::from_response(response).await,
17445            _ => Err(Error::ErrorResponse(
17446                ResponseValue::from_response(response).await?,
17447            )),
17448        }
17449    }
17450
17451    ///Stop Instance by UUID
17452    ///
17453    ///Stop a running instance by its UUID or do nothing if the instance is
17454    ///already stopped.
17455    ///
17456    ///Sends a `PUT` request to `/v1/instances/{uuid}/stop`
17457    ///
17458    ///Arguments:
17459    /// - `uuid`: The UUID of the instance to stop.
17460    /// - `drain_timeout_ms`: Timeout for draining connections in milliseconds.
17461    ///   The instance does not
17462    ///receive new connections in the draining phase.  The instance is stopped
17463    ///when the last connection has been closed or the timeout expired.  The
17464    ///maximum timeout may vary.  Use -1 for the largest possible value.
17465    ///
17466    ///Note: This endpoint does not block.  Use the wait endpoint for the
17467    /// instance to reach the stopped state.
17468    /// - `force`: Whether to immediately force stop the instance.
17469    pub async fn stop_instance_by_uuid<'a>(
17470        &'a self,
17471        uuid: &'a ::uuid::Uuid,
17472        drain_timeout_ms: Option<u64>,
17473        force: Option<bool>,
17474    ) -> Result<ResponseValue<types::StopInstanceResponse>, Error<types::StopInstanceResponse>>
17475    {
17476        let url = format!(
17477            "{}/v1/instances/{}/stop",
17478            self.baseurl,
17479            encode_path(&uuid.to_string()),
17480        );
17481        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17482        header_map.append(
17483            ::reqwest::header::HeaderName::from_static("api-version"),
17484            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17485        );
17486        #[allow(unused_mut)]
17487        let mut request = self
17488            .client
17489            .put(url)
17490            .header(
17491                ::reqwest::header::ACCEPT,
17492                ::reqwest::header::HeaderValue::from_static("application/json"),
17493            )
17494            .query(&progenitor_client::QueryParam::new(
17495                "drain_timeout_ms",
17496                &drain_timeout_ms,
17497            ))
17498            .query(&progenitor_client::QueryParam::new("force", &force))
17499            .headers(header_map)
17500            .build()?;
17501        let result = self.client.execute(request).await;
17502        let response = result?;
17503        match response.status().as_u16() {
17504            200..=299 => ResponseValue::from_response(response).await,
17505            _ => Err(Error::ErrorResponse(
17506                ResponseValue::from_response(response).await?,
17507            )),
17508        }
17509    }
17510
17511    ///Wait for Instance State by UUID
17512    ///
17513    ///Wait for an instance to reach a certain state, by its UUID.
17514    ///
17515    ///If the instance is already in the desired state, the request will return
17516    ///immediately.  If the instance is not in the desired state, the request
17517    /// will block until the instance reaches the desired state or the
17518    /// timeout is reached.  If the timeout is reached, the request will
17519    /// fail with an error. If the timeout is -1, the request will block
17520    /// indefinitely until the instance reaches the desired state.
17521    ///
17522    ///Sends a `GET` request to `/v1/instances/{uuid}/wait`
17523    ///
17524    ///Arguments:
17525    /// - `uuid`: The UUID of the instance to wait for.
17526    /// - `body`
17527    pub async fn wait_instance_by_uuid<'a>(
17528        &'a self,
17529        uuid: &'a ::uuid::Uuid,
17530        body: &'a types::WaitInstanceByUuidRequestBody,
17531    ) -> Result<ResponseValue<types::WaitInstanceResponse>, Error<types::WaitInstanceResponse>>
17532    {
17533        let url = format!(
17534            "{}/v1/instances/{}/wait",
17535            self.baseurl,
17536            encode_path(&uuid.to_string()),
17537        );
17538        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17539        header_map.append(
17540            ::reqwest::header::HeaderName::from_static("api-version"),
17541            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17542        );
17543        #[allow(unused_mut)]
17544        let mut request = self
17545            .client
17546            .get(url)
17547            .header(
17548                ::reqwest::header::ACCEPT,
17549                ::reqwest::header::HeaderValue::from_static("application/json"),
17550            )
17551            .json(&body)
17552            .headers(header_map)
17553            .build()?;
17554        let result = self.client.execute(request).await;
17555        let response = result?;
17556        match response.status().as_u16() {
17557            200..=299 => ResponseValue::from_response(response).await,
17558            _ => Err(Error::ErrorResponse(
17559                ResponseValue::from_response(response).await?,
17560            )),
17561        }
17562    }
17563
17564    ///List Service Groups
17565    ///
17566    ///Get one or many service groups with their current status and
17567    /// configuration. It's possible to filter this list by name or UUID.
17568    ///
17569    ///Sends a `GET` request to `/v1/services`
17570    ///
17571    ///Arguments:
17572    /// - `details`: Whether to include details about the service group in the
17573    ///   response.  By
17574    ///default this is set to true, meaning that all information about the
17575    /// service group will be included in the response.  If set to false,
17576    /// only the basic information about the service group will be included,
17577    /// such as its name and UUID.
17578    /// - `body`
17579    pub async fn get_service_groups<'a>(
17580        &'a self,
17581        details: Option<bool>,
17582        body: &'a ::std::vec::Vec<types::NameOrUuid>,
17583    ) -> Result<
17584        ResponseValue<types::GetServiceGroupsResponse>,
17585        Error<types::GetServiceGroupsResponse>,
17586    > {
17587        let url = format!("{}/v1/services", self.baseurl,);
17588        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17589        header_map.append(
17590            ::reqwest::header::HeaderName::from_static("api-version"),
17591            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17592        );
17593        #[allow(unused_mut)]
17594        let mut request = self
17595            .client
17596            .get(url)
17597            .header(
17598                ::reqwest::header::ACCEPT,
17599                ::reqwest::header::HeaderValue::from_static("application/json"),
17600            )
17601            .json(&body)
17602            .query(&progenitor_client::QueryParam::new("details", &details))
17603            .headers(header_map)
17604            .build()?;
17605        let result = self.client.execute(request).await;
17606        let response = result?;
17607        match response.status().as_u16() {
17608            200..=299 => ResponseValue::from_response(response).await,
17609            _ => Err(Error::ErrorResponse(
17610                ResponseValue::from_response(response).await?,
17611            )),
17612        }
17613    }
17614
17615    ///Create Service Group
17616    ///
17617    ///Create a new service with the given configuration.
17618    ///
17619    ///Note that the service properties like published ports can only be
17620    /// defined during creation.  They cannot be changed later.  Each port
17621    /// in a service can specify a list of handlers that determine how
17622    /// traffic arriving at the port is handled. See Connection Handlers for
17623    /// a complete overview.
17624    ///
17625    ///Sends a `POST` request to `/v1/services`
17626    pub async fn create_service_group<'a>(
17627        &'a self,
17628        body: &'a types::CreateServiceGroupRequest,
17629    ) -> Result<
17630        ResponseValue<types::CreateServiceGroupResponse>,
17631        Error<types::CreateServiceGroupResponse>,
17632    > {
17633        let url = format!("{}/v1/services", self.baseurl,);
17634        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17635        header_map.append(
17636            ::reqwest::header::HeaderName::from_static("api-version"),
17637            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17638        );
17639        #[allow(unused_mut)]
17640        let mut request = self
17641            .client
17642            .post(url)
17643            .header(
17644                ::reqwest::header::ACCEPT,
17645                ::reqwest::header::HeaderValue::from_static("application/json"),
17646            )
17647            .json(&body)
17648            .headers(header_map)
17649            .build()?;
17650        let result = self.client.execute(request).await;
17651        let response = result?;
17652        match response.status().as_u16() {
17653            200..=299 => ResponseValue::from_response(response).await,
17654            _ => Err(Error::ErrorResponse(
17655                ResponseValue::from_response(response).await?,
17656            )),
17657        }
17658    }
17659
17660    ///Delete Service Groups
17661    ///
17662    ///Delete the specified service group(s).  After this call the name of the
17663    ///service group(s) are no longer valid.
17664    ///
17665    ///Sends a `DELETE` request to `/v1/services`
17666    pub async fn delete_service_groups<'a>(
17667        &'a self,
17668        body: &'a ::std::vec::Vec<types::NameOrUuid>,
17669    ) -> Result<
17670        ResponseValue<types::DeleteServiceGroupsResponse>,
17671        Error<types::DeleteServiceGroupsResponse>,
17672    > {
17673        let url = format!("{}/v1/services", self.baseurl,);
17674        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17675        header_map.append(
17676            ::reqwest::header::HeaderName::from_static("api-version"),
17677            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17678        );
17679        #[allow(unused_mut)]
17680        let mut request = self
17681            .client
17682            .delete(url)
17683            .header(
17684                ::reqwest::header::ACCEPT,
17685                ::reqwest::header::HeaderValue::from_static("application/json"),
17686            )
17687            .json(&body)
17688            .headers(header_map)
17689            .build()?;
17690        let result = self.client.execute(request).await;
17691        let response = result?;
17692        match response.status().as_u16() {
17693            200..=299 => ResponseValue::from_response(response).await,
17694            _ => Err(Error::ErrorResponse(
17695                ResponseValue::from_response(response).await?,
17696            )),
17697        }
17698    }
17699
17700    ///Update Service Groups
17701    ///
17702    ///Update one or more service groups.
17703    ///
17704    ///Sends a `PATCH` request to `/v1/services`
17705    pub async fn update_service_groups<'a>(
17706        &'a self,
17707        body: &'a ::std::vec::Vec<types::UpdateServiceGroupsRequestItem>,
17708    ) -> Result<
17709        ResponseValue<types::UpdateServiceGroupsResponse>,
17710        Error<types::UpdateServiceGroupsResponse>,
17711    > {
17712        let url = format!("{}/v1/services", self.baseurl,);
17713        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17714        header_map.append(
17715            ::reqwest::header::HeaderName::from_static("api-version"),
17716            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17717        );
17718        #[allow(unused_mut)]
17719        let mut request = self
17720            .client
17721            .patch(url)
17722            .header(
17723                ::reqwest::header::ACCEPT,
17724                ::reqwest::header::HeaderValue::from_static("application/json"),
17725            )
17726            .json(&body)
17727            .headers(header_map)
17728            .build()?;
17729        let result = self.client.execute(request).await;
17730        let response = result?;
17731        match response.status().as_u16() {
17732            200..=299 => ResponseValue::from_response(response).await,
17733            _ => Err(Error::ErrorResponse(
17734                ResponseValue::from_response(response).await?,
17735            )),
17736        }
17737    }
17738
17739    ///List Autoscale Configurations
17740    ///
17741    ///Return the current states and configurations of autoscale configurations
17742    ///for a given set of service groups given their UUIDs or names.
17743    ///
17744    ///Sends a `GET` request to `/v1/services/autoscale`
17745    pub async fn get_autoscale_configurations<'a>(
17746        &'a self,
17747        body: &'a ::std::vec::Vec<types::NameOrUuid>,
17748    ) -> Result<
17749        ResponseValue<types::GetAutoscaleConfigurationsResponse>,
17750        Error<types::GetAutoscaleConfigurationsResponse>,
17751    > {
17752        let url = format!("{}/v1/services/autoscale", self.baseurl,);
17753        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17754        header_map.append(
17755            ::reqwest::header::HeaderName::from_static("api-version"),
17756            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17757        );
17758        #[allow(unused_mut)]
17759        let mut request = self
17760            .client
17761            .get(url)
17762            .header(
17763                ::reqwest::header::ACCEPT,
17764                ::reqwest::header::HeaderValue::from_static("application/json"),
17765            )
17766            .json(&body)
17767            .headers(header_map)
17768            .build()?;
17769        let result = self.client.execute(request).await;
17770        let response = result?;
17771        match response.status().as_u16() {
17772            200..=299 => ResponseValue::from_response(response).await,
17773            _ => Err(Error::ErrorResponse(
17774                ResponseValue::from_response(response).await?,
17775            )),
17776        }
17777    }
17778
17779    ///Create Autoscale Configurations
17780    ///
17781    ///Create one or more autoscale configurations for the specified service
17782    /// groups given their UUIDs or names.
17783    ///
17784    ///Sends a `POST` request to `/v1/services/autoscale`
17785    pub async fn create_autoscale_configurations<'a>(
17786        &'a self,
17787        body: &'a ::std::vec::Vec<types::CreateAutoscaleConfigurationsRequestConfiguration>,
17788    ) -> Result<
17789        ResponseValue<types::CreateAutoscaleConfigurationsResponse>,
17790        Error<types::CreateAutoscaleConfigurationsResponse>,
17791    > {
17792        let url = format!("{}/v1/services/autoscale", self.baseurl,);
17793        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17794        header_map.append(
17795            ::reqwest::header::HeaderName::from_static("api-version"),
17796            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17797        );
17798        #[allow(unused_mut)]
17799        let mut request = self
17800            .client
17801            .post(url)
17802            .header(
17803                ::reqwest::header::ACCEPT,
17804                ::reqwest::header::HeaderValue::from_static("application/json"),
17805            )
17806            .json(&body)
17807            .headers(header_map)
17808            .build()?;
17809        let result = self.client.execute(request).await;
17810        let response = result?;
17811        match response.status().as_u16() {
17812            200..=299 => ResponseValue::from_response(response).await,
17813            _ => Err(Error::ErrorResponse(
17814                ResponseValue::from_response(response).await?,
17815            )),
17816        }
17817    }
17818
17819    ///Delete Autoscale Configurations
17820    ///
17821    ///Delete autoscale configuration for a given set of service groups given
17822    ///their UUIDs or names.
17823    ///
17824    ///Sends a `DELETE` request to `/v1/services/autoscale`
17825    pub async fn delete_autoscale_configurations<'a>(
17826        &'a self,
17827        body: &'a ::std::vec::Vec<types::NameOrUuid>,
17828    ) -> Result<
17829        ResponseValue<types::DeleteAutoscaleConfigurationsResponse>,
17830        Error<types::DeleteAutoscaleConfigurationsResponse>,
17831    > {
17832        let url = format!("{}/v1/services/autoscale", self.baseurl,);
17833        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17834        header_map.append(
17835            ::reqwest::header::HeaderName::from_static("api-version"),
17836            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17837        );
17838        #[allow(unused_mut)]
17839        let mut request = self
17840            .client
17841            .delete(url)
17842            .header(
17843                ::reqwest::header::ACCEPT,
17844                ::reqwest::header::HeaderValue::from_static("application/json"),
17845            )
17846            .json(&body)
17847            .headers(header_map)
17848            .build()?;
17849        let result = self.client.execute(request).await;
17850        let response = result?;
17851        match response.status().as_u16() {
17852            200..=299 => ResponseValue::from_response(response).await,
17853            _ => Err(Error::ErrorResponse(
17854                ResponseValue::from_response(response).await?,
17855            )),
17856        }
17857    }
17858
17859    ///Get Service Group by UUID
17860    ///
17861    ///Get a specified service group by its UUID.
17862    ///
17863    ///Sends a `GET` request to `/v1/services/{uuid}`
17864    ///
17865    ///Arguments:
17866    /// - `uuid`: The UUID of the service group to retrieve.
17867    /// - `details`: Whether to include details about the service group in the
17868    ///   response.  By
17869    ///default this is set to true, meaning that all information about the
17870    /// service group will be included in the response.  If set to false,
17871    /// only the basic information about the service group will be included,
17872    /// such as its name and UUID.
17873    pub async fn get_service_group_by_uuid<'a>(
17874        &'a self,
17875        uuid: &'a ::uuid::Uuid,
17876        details: Option<bool>,
17877    ) -> Result<
17878        ResponseValue<types::GetServiceGroupsResponse>,
17879        Error<types::GetServiceGroupsResponse>,
17880    > {
17881        let url = format!(
17882            "{}/v1/services/{}",
17883            self.baseurl,
17884            encode_path(&uuid.to_string()),
17885        );
17886        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17887        header_map.append(
17888            ::reqwest::header::HeaderName::from_static("api-version"),
17889            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17890        );
17891        #[allow(unused_mut)]
17892        let mut request = self
17893            .client
17894            .get(url)
17895            .header(
17896                ::reqwest::header::ACCEPT,
17897                ::reqwest::header::HeaderValue::from_static("application/json"),
17898            )
17899            .query(&progenitor_client::QueryParam::new("details", &details))
17900            .headers(header_map)
17901            .build()?;
17902        let result = self.client.execute(request).await;
17903        let response = result?;
17904        match response.status().as_u16() {
17905            200..=299 => ResponseValue::from_response(response).await,
17906            _ => Err(Error::ErrorResponse(
17907                ResponseValue::from_response(response).await?,
17908            )),
17909        }
17910    }
17911
17912    ///Delete Service Group by UUID
17913    ///
17914    ///Delete a specified service group by its UUID.  After this call the UUID
17915    /// of the service group is no longer valid.
17916    ///
17917    ///Sends a `DELETE` request to `/v1/services/{uuid}`
17918    ///
17919    ///Arguments:
17920    /// - `uuid`: The UUID of the service group to delete.
17921    pub async fn delete_service_group_by_uuid<'a>(
17922        &'a self,
17923        uuid: &'a ::uuid::Uuid,
17924    ) -> Result<
17925        ResponseValue<types::DeleteServiceGroupsResponse>,
17926        Error<types::DeleteServiceGroupsResponse>,
17927    > {
17928        let url = format!(
17929            "{}/v1/services/{}",
17930            self.baseurl,
17931            encode_path(&uuid.to_string()),
17932        );
17933        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17934        header_map.append(
17935            ::reqwest::header::HeaderName::from_static("api-version"),
17936            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17937        );
17938        #[allow(unused_mut)]
17939        let mut request = self
17940            .client
17941            .delete(url)
17942            .header(
17943                ::reqwest::header::ACCEPT,
17944                ::reqwest::header::HeaderValue::from_static("application/json"),
17945            )
17946            .headers(header_map)
17947            .build()?;
17948        let result = self.client.execute(request).await;
17949        let response = result?;
17950        match response.status().as_u16() {
17951            200..=299 => ResponseValue::from_response(response).await,
17952            _ => Err(Error::ErrorResponse(
17953                ResponseValue::from_response(response).await?,
17954            )),
17955        }
17956    }
17957
17958    ///Update Service Group by UUID
17959    ///
17960    ///Update a service group by its UUID.
17961    ///
17962    ///Sends a `PATCH` request to `/v1/services/{uuid}`
17963    ///
17964    ///Arguments:
17965    /// - `uuid`: The UUID of the service group to update.
17966    /// - `body`
17967    pub async fn update_service_group_by_uuid<'a>(
17968        &'a self,
17969        uuid: &'a ::uuid::Uuid,
17970        body: &'a types::UpdateServiceGroupByUuidRequestBody,
17971    ) -> Result<
17972        ResponseValue<types::UpdateServiceGroupsResponse>,
17973        Error<types::UpdateServiceGroupsResponse>,
17974    > {
17975        let url = format!(
17976            "{}/v1/services/{}",
17977            self.baseurl,
17978            encode_path(&uuid.to_string()),
17979        );
17980        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
17981        header_map.append(
17982            ::reqwest::header::HeaderName::from_static("api-version"),
17983            ::reqwest::header::HeaderValue::from_static(self.api_version()),
17984        );
17985        #[allow(unused_mut)]
17986        let mut request = self
17987            .client
17988            .patch(url)
17989            .header(
17990                ::reqwest::header::ACCEPT,
17991                ::reqwest::header::HeaderValue::from_static("application/json"),
17992            )
17993            .json(&body)
17994            .headers(header_map)
17995            .build()?;
17996        let result = self.client.execute(request).await;
17997        let response = result?;
17998        match response.status().as_u16() {
17999            200..=299 => ResponseValue::from_response(response).await,
18000            _ => Err(Error::ErrorResponse(
18001                ResponseValue::from_response(response).await?,
18002            )),
18003        }
18004    }
18005
18006    ///Get Autoscale Configurations by Service Group UUID
18007    ///
18008    ///Return the current states and configurations of autoscale configurations
18009    ///given a service group UUID.
18010    ///
18011    ///Sends a `GET` request to `/v1/services/{uuid}/autoscale`
18012    ///
18013    ///Arguments:
18014    /// - `uuid`: The UUID of the service group.
18015    pub async fn get_autoscale_configurations_by_service_group_uuid<'a>(
18016        &'a self,
18017        uuid: &'a ::uuid::Uuid,
18018    ) -> Result<
18019        ResponseValue<types::GetAutoscaleConfigurationsResponse>,
18020        Error<types::GetAutoscaleConfigurationsResponse>,
18021    > {
18022        let url = format!(
18023            "{}/v1/services/{}/autoscale",
18024            self.baseurl,
18025            encode_path(&uuid.to_string()),
18026        );
18027        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18028        header_map.append(
18029            ::reqwest::header::HeaderName::from_static("api-version"),
18030            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18031        );
18032        #[allow(unused_mut)]
18033        let mut request = self
18034            .client
18035            .get(url)
18036            .header(
18037                ::reqwest::header::ACCEPT,
18038                ::reqwest::header::HeaderValue::from_static("application/json"),
18039            )
18040            .headers(header_map)
18041            .build()?;
18042        let result = self.client.execute(request).await;
18043        let response = result?;
18044        match response.status().as_u16() {
18045            200..=299 => ResponseValue::from_response(response).await,
18046            _ => Err(Error::ErrorResponse(
18047                ResponseValue::from_response(response).await?,
18048            )),
18049        }
18050    }
18051
18052    ///Create Autoscale Configuration by Service Group UUID
18053    ///
18054    ///Create an autoscale configuration for the specified service group given
18055    ///its UUID.
18056    ///
18057    ///Sends a `POST` request to `/v1/services/{uuid}/autoscale`
18058    ///
18059    ///Arguments:
18060    /// - `uuid`: The UUID of the service to create a configuration for.
18061    ///Mutually exclusive with name.
18062    /// - `body`
18063    pub async fn create_autoscale_configuration_by_service_group_uuid<'a>(
18064        &'a self,
18065        uuid: &'a ::uuid::Uuid,
18066        body: &'a types::CreateAutoscaleConfigurationByServiceGroupUuidRequest,
18067    ) -> Result<
18068        ResponseValue<types::CreateAutoscaleConfigurationsResponse>,
18069        Error<types::CreateAutoscaleConfigurationsResponse>,
18070    > {
18071        let url = format!(
18072            "{}/v1/services/{}/autoscale",
18073            self.baseurl,
18074            encode_path(&uuid.to_string()),
18075        );
18076        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18077        header_map.append(
18078            ::reqwest::header::HeaderName::from_static("api-version"),
18079            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18080        );
18081        #[allow(unused_mut)]
18082        let mut request = self
18083            .client
18084            .post(url)
18085            .header(
18086                ::reqwest::header::ACCEPT,
18087                ::reqwest::header::HeaderValue::from_static("application/json"),
18088            )
18089            .json(&body)
18090            .headers(header_map)
18091            .build()?;
18092        let result = self.client.execute(request).await;
18093        let response = result?;
18094        match response.status().as_u16() {
18095            200..=299 => ResponseValue::from_response(response).await,
18096            _ => Err(Error::ErrorResponse(
18097                ResponseValue::from_response(response).await?,
18098            )),
18099        }
18100    }
18101
18102    ///Delete Autoscale Configurations by Service Group UUID
18103    ///
18104    ///Delete the autoscale configuration for the service group given its UUID.
18105    ///
18106    ///Unikraft Cloud will immediately drain all connections from all instances
18107    ///that have been created by autoscale and delete the instances afterwards.
18108    ///The draining phase is allowed to take at most `cooldown_time_ms`
18109    ///milliseconds after which remaining connections are forcefully closed.
18110    /// The master instance is never deleted.  However, deleting the
18111    /// autoscale configuration causes the master instance to start if it is
18112    /// stopped.
18113    ///
18114    ///Sends a `DELETE` request to `/v1/services/{uuid}/autoscale`
18115    ///
18116    ///Arguments:
18117    /// - `uuid`: The UUID of the service group.
18118    pub async fn delete_autoscale_configurations_by_service_group_uuid<'a>(
18119        &'a self,
18120        uuid: &'a ::uuid::Uuid,
18121    ) -> Result<
18122        ResponseValue<types::DeleteAutoscaleConfigurationsResponse>,
18123        Error<types::DeleteAutoscaleConfigurationsResponse>,
18124    > {
18125        let url = format!(
18126            "{}/v1/services/{}/autoscale",
18127            self.baseurl,
18128            encode_path(&uuid.to_string()),
18129        );
18130        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18131        header_map.append(
18132            ::reqwest::header::HeaderName::from_static("api-version"),
18133            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18134        );
18135        #[allow(unused_mut)]
18136        let mut request = self
18137            .client
18138            .delete(url)
18139            .header(
18140                ::reqwest::header::ACCEPT,
18141                ::reqwest::header::HeaderValue::from_static("application/json"),
18142            )
18143            .headers(header_map)
18144            .build()?;
18145        let result = self.client.execute(request).await;
18146        let response = result?;
18147        match response.status().as_u16() {
18148            200..=299 => ResponseValue::from_response(response).await,
18149            _ => Err(Error::ErrorResponse(
18150                ResponseValue::from_response(response).await?,
18151            )),
18152        }
18153    }
18154
18155    ///List Autoscale Configuration Policies
18156    ///
18157    ///List the autoscale policies for a given service group given its UUID.
18158    ///
18159    ///Sends a `GET` request to `/v1/services/{uuid}/autoscale/policies`
18160    pub async fn get_autoscale_configuration_policies<'a>(
18161        &'a self,
18162        uuid: &'a str,
18163        body: &'a types::GetAutoscaleConfigurationPolicyRequest,
18164    ) -> Result<
18165        ResponseValue<types::GetAutoscaleConfigurationPolicyResponse>,
18166        Error<types::GetAutoscaleConfigurationPolicyResponse>,
18167    > {
18168        let url = format!(
18169            "{}/v1/services/{}/autoscale/policies",
18170            self.baseurl,
18171            encode_path(&uuid.to_string()),
18172        );
18173        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18174        header_map.append(
18175            ::reqwest::header::HeaderName::from_static("api-version"),
18176            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18177        );
18178        #[allow(unused_mut)]
18179        let mut request = self
18180            .client
18181            .get(url)
18182            .header(
18183                ::reqwest::header::ACCEPT,
18184                ::reqwest::header::HeaderValue::from_static("application/json"),
18185            )
18186            .json(&body)
18187            .headers(header_map)
18188            .build()?;
18189        let result = self.client.execute(request).await;
18190        let response = result?;
18191        match response.status().as_u16() {
18192            200..=299 => ResponseValue::from_response(response).await,
18193            _ => Err(Error::ErrorResponse(
18194                ResponseValue::from_response(response).await?,
18195            )),
18196        }
18197    }
18198
18199    ///Create Autoscale Configuration Policy
18200    ///
18201    ///Add a new autoscale policy to an autoscale configuration given a service
18202    ///group UUID.
18203    ///
18204    ///Sends a `POST` request to `/v1/services/{uuid}/autoscale/policies`
18205    pub async fn create_autoscale_configuration_policy<'a>(
18206        &'a self,
18207        uuid: &'a str,
18208        body: &'a types::CreateAutoscaleConfigurationPolicyRequest,
18209    ) -> Result<
18210        ResponseValue<types::CreateAutoscaleConfigurationPolicyResponse>,
18211        Error<types::CreateAutoscaleConfigurationPolicyResponse>,
18212    > {
18213        let url = format!(
18214            "{}/v1/services/{}/autoscale/policies",
18215            self.baseurl,
18216            encode_path(&uuid.to_string()),
18217        );
18218        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18219        header_map.append(
18220            ::reqwest::header::HeaderName::from_static("api-version"),
18221            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18222        );
18223        #[allow(unused_mut)]
18224        let mut request = self
18225            .client
18226            .post(url)
18227            .header(
18228                ::reqwest::header::ACCEPT,
18229                ::reqwest::header::HeaderValue::from_static("application/json"),
18230            )
18231            .json(&body)
18232            .headers(header_map)
18233            .build()?;
18234        let result = self.client.execute(request).await;
18235        let response = result?;
18236        match response.status().as_u16() {
18237            200..=299 => ResponseValue::from_response(response).await,
18238            _ => Err(Error::ErrorResponse(
18239                ResponseValue::from_response(response).await?,
18240            )),
18241        }
18242    }
18243
18244    ///Delete Autoscale Configuration Policies
18245    ///
18246    ///Delete one or more autoscale policies for a given service group.
18247    ///
18248    ///Sends a `DELETE` request to `/v1/services/{uuid}/autoscale/policies`
18249    pub async fn delete_autoscale_configuration_policies<'a>(
18250        &'a self,
18251        uuid: &'a str,
18252        body: &'a types::DeletePolicyRequest,
18253    ) -> Result<
18254        ResponseValue<types::DeleteAutoscaleConfigurationPolicyResponse>,
18255        Error<types::DeleteAutoscaleConfigurationPolicyResponse>,
18256    > {
18257        let url = format!(
18258            "{}/v1/services/{}/autoscale/policies",
18259            self.baseurl,
18260            encode_path(&uuid.to_string()),
18261        );
18262        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18263        header_map.append(
18264            ::reqwest::header::HeaderName::from_static("api-version"),
18265            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18266        );
18267        #[allow(unused_mut)]
18268        let mut request = self
18269            .client
18270            .delete(url)
18271            .header(
18272                ::reqwest::header::ACCEPT,
18273                ::reqwest::header::HeaderValue::from_static("application/json"),
18274            )
18275            .json(&body)
18276            .headers(header_map)
18277            .build()?;
18278        let result = self.client.execute(request).await;
18279        let response = result?;
18280        match response.status().as_u16() {
18281            200..=299 => ResponseValue::from_response(response).await,
18282            _ => Err(Error::ErrorResponse(
18283                ResponseValue::from_response(response).await?,
18284            )),
18285        }
18286    }
18287
18288    ///Get Autoscale Configuration Policy by Name
18289    ///
18290    ///Return the current state and configuration of an autoscale policy given
18291    ///the service group UUID and the name of the policy.
18292    ///
18293    ///Sends a `GET` request to `/v1/services/{uuid}/autoscale/policies/{name}`
18294    ///
18295    ///Arguments:
18296    /// - `uuid`: The UUID of the service group.
18297    /// - `name`: The name of the policy to get.
18298    pub async fn get_autoscale_configuration_policy_by_name<'a>(
18299        &'a self,
18300        uuid: &'a ::uuid::Uuid,
18301        name: &'a str,
18302    ) -> Result<
18303        ResponseValue<types::GetAutoscaleConfigurationPolicyResponse>,
18304        Error<types::GetAutoscaleConfigurationPolicyResponse>,
18305    > {
18306        let url = format!(
18307            "{}/v1/services/{}/autoscale/policies/{}",
18308            self.baseurl,
18309            encode_path(&uuid.to_string()),
18310            encode_path(&name.to_string()),
18311        );
18312        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18313        header_map.append(
18314            ::reqwest::header::HeaderName::from_static("api-version"),
18315            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18316        );
18317        #[allow(unused_mut)]
18318        let mut request = self
18319            .client
18320            .get(url)
18321            .header(
18322                ::reqwest::header::ACCEPT,
18323                ::reqwest::header::HeaderValue::from_static("application/json"),
18324            )
18325            .headers(header_map)
18326            .build()?;
18327        let result = self.client.execute(request).await;
18328        let response = result?;
18329        match response.status().as_u16() {
18330            200..=299 => ResponseValue::from_response(response).await,
18331            _ => Err(Error::ErrorResponse(
18332                ResponseValue::from_response(response).await?,
18333            )),
18334        }
18335    }
18336
18337    ///Delete Autoscale Configuration Policy by Name
18338    ///
18339    ///Delete an autoscale policy by name given the service group UUID.
18340    ///
18341    ///Sends a `DELETE` request to
18342    /// `/v1/services/{uuid}/autoscale/policies/{name}`
18343    ///
18344    ///Arguments:
18345    /// - `uuid`: The UUID of the service group.
18346    /// - `name`: The name of the policy to delete.
18347    pub async fn delete_autoscale_configuration_policy_by_name<'a>(
18348        &'a self,
18349        uuid: &'a ::uuid::Uuid,
18350        name: &'a str,
18351    ) -> Result<
18352        ResponseValue<types::DeleteAutoscaleConfigurationPolicyResponse>,
18353        Error<types::DeleteAutoscaleConfigurationPolicyResponse>,
18354    > {
18355        let url = format!(
18356            "{}/v1/services/{}/autoscale/policies/{}",
18357            self.baseurl,
18358            encode_path(&uuid.to_string()),
18359            encode_path(&name.to_string()),
18360        );
18361        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18362        header_map.append(
18363            ::reqwest::header::HeaderName::from_static("api-version"),
18364            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18365        );
18366        #[allow(unused_mut)]
18367        let mut request = self
18368            .client
18369            .delete(url)
18370            .header(
18371                ::reqwest::header::ACCEPT,
18372                ::reqwest::header::HeaderValue::from_static("application/json"),
18373            )
18374            .headers(header_map)
18375            .build()?;
18376        let result = self.client.execute(request).await;
18377        let response = result?;
18378        match response.status().as_u16() {
18379            200..=299 => ResponseValue::from_response(response).await,
18380            _ => Err(Error::ErrorResponse(
18381                ResponseValue::from_response(response).await?,
18382            )),
18383        }
18384    }
18385
18386    ///Get Current User Quotas
18387    ///
18388    ///List quota usage and limits of your user account.
18389    ///Limits are hard limits that cannot be exceeded.
18390    ///
18391    ///Sends a `GET` request to `/v1/users/quotas`
18392    pub async fn get_user<'a>(
18393        &'a self,
18394    ) -> Result<ResponseValue<types::QuotasResponse>, Error<types::QuotasResponse>> {
18395        let url = format!("{}/v1/users/quotas", self.baseurl,);
18396        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18397        header_map.append(
18398            ::reqwest::header::HeaderName::from_static("api-version"),
18399            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18400        );
18401        #[allow(unused_mut)]
18402        let mut request = self
18403            .client
18404            .get(url)
18405            .header(
18406                ::reqwest::header::ACCEPT,
18407                ::reqwest::header::HeaderValue::from_static("application/json"),
18408            )
18409            .headers(header_map)
18410            .build()?;
18411        let result = self.client.execute(request).await;
18412        let response = result?;
18413        match response.status().as_u16() {
18414            200..=299 => ResponseValue::from_response(response).await,
18415            _ => Err(Error::ErrorResponse(
18416                ResponseValue::from_response(response).await?,
18417            )),
18418        }
18419    }
18420
18421    ///Get User Quotas by UUID
18422    ///
18423    ///List quota usage and limits of a user account by UUID.
18424    ///Limits are hard limits that cannot be exceeded.
18425    ///
18426    ///Sends a `GET` request to `/v1/users/{uuid}/quotas`
18427    ///
18428    ///Arguments:
18429    /// - `uuid`: The UUID of the user to retrieve quotas for.
18430    pub async fn get_user_by_uuid<'a>(
18431        &'a self,
18432        uuid: &'a ::uuid::Uuid,
18433    ) -> Result<ResponseValue<types::QuotasResponse>, Error<types::QuotasResponse>> {
18434        let url = format!(
18435            "{}/v1/users/{}/quotas",
18436            self.baseurl,
18437            encode_path(&uuid.to_string()),
18438        );
18439        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18440        header_map.append(
18441            ::reqwest::header::HeaderName::from_static("api-version"),
18442            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18443        );
18444        #[allow(unused_mut)]
18445        let mut request = self
18446            .client
18447            .get(url)
18448            .header(
18449                ::reqwest::header::ACCEPT,
18450                ::reqwest::header::HeaderValue::from_static("application/json"),
18451            )
18452            .headers(header_map)
18453            .build()?;
18454        let result = self.client.execute(request).await;
18455        let response = result?;
18456        match response.status().as_u16() {
18457            200..=299 => ResponseValue::from_response(response).await,
18458            _ => Err(Error::ErrorResponse(
18459                ResponseValue::from_response(response).await?,
18460            )),
18461        }
18462    }
18463
18464    ///List Volumes
18465    ///
18466    ///Return the current status and the configuration of one or more volumes
18467    ///specified by either UUID(s) or name(s).  If no identifier is provided,
18468    ///all volumes are returned.
18469    ///
18470    ///Sends a `GET` request to `/v1/volumes`
18471    ///
18472    ///Arguments:
18473    /// - `details`: Whether to include details about the volume in the
18474    ///   response.  By
18475    ///default this is set to true, meaning that all information about the
18476    ///volume will be included in the response.  If set to false, only the
18477    ///basic information about the volume will be included, such as its name
18478    ///and UUID.
18479    /// - `body`
18480    pub async fn get_volumes<'a>(
18481        &'a self,
18482        details: Option<bool>,
18483        body: &'a ::std::vec::Vec<types::NameOrUuid>,
18484    ) -> Result<ResponseValue<types::GetVolumesResponse>, Error<types::GetVolumesResponse>> {
18485        let url = format!("{}/v1/volumes", self.baseurl,);
18486        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18487        header_map.append(
18488            ::reqwest::header::HeaderName::from_static("api-version"),
18489            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18490        );
18491        #[allow(unused_mut)]
18492        let mut request = self
18493            .client
18494            .get(url)
18495            .header(
18496                ::reqwest::header::ACCEPT,
18497                ::reqwest::header::HeaderValue::from_static("application/json"),
18498            )
18499            .json(&body)
18500            .query(&progenitor_client::QueryParam::new("details", &details))
18501            .headers(header_map)
18502            .build()?;
18503        let result = self.client.execute(request).await;
18504        let response = result?;
18505        match response.status().as_u16() {
18506            200..=299 => ResponseValue::from_response(response).await,
18507            _ => Err(Error::ErrorResponse(
18508                ResponseValue::from_response(response).await?,
18509            )),
18510        }
18511    }
18512
18513    ///Create Volume
18514    ///
18515    ///Create a volume given the specified configuration parameters.
18516    ///The volume is automatically initialized with an empty file system.
18517    ///After initialization, the volume is in the `available` state and can be
18518    ///attached to an instance with the `PUT /v1/volumes/attach` endpoint.
18519    ///Note that, the size of a volume cannot be changed after creation.
18520    ///
18521    ///Sends a `POST` request to `/v1/volumes`
18522    pub async fn create_volume<'a>(
18523        &'a self,
18524        body: &'a types::CreateVolumeRequest,
18525    ) -> Result<ResponseValue<types::CreateVolumeResponse>, Error<types::CreateVolumeResponse>>
18526    {
18527        let url = format!("{}/v1/volumes", self.baseurl,);
18528        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18529        header_map.append(
18530            ::reqwest::header::HeaderName::from_static("api-version"),
18531            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18532        );
18533        #[allow(unused_mut)]
18534        let mut request = self
18535            .client
18536            .post(url)
18537            .header(
18538                ::reqwest::header::ACCEPT,
18539                ::reqwest::header::HeaderValue::from_static("application/json"),
18540            )
18541            .json(&body)
18542            .headers(header_map)
18543            .build()?;
18544        let result = self.client.execute(request).await;
18545        let response = result?;
18546        match response.status().as_u16() {
18547            200..=299 => ResponseValue::from_response(response).await,
18548            _ => Err(Error::ErrorResponse(
18549                ResponseValue::from_response(response).await?,
18550            )),
18551        }
18552    }
18553
18554    ///Delete Volumes
18555    ///
18556    ///Delete one or more volumes by their UUID(s) or name(s).  If the volumes
18557    /// are still attached to an instance, the operation fails.  After this
18558    /// call, the IDs associated with the volumes are no longer valid.
18559    ///
18560    ///Sends a `DELETE` request to `/v1/volumes`
18561    pub async fn delete_volumes<'a>(
18562        &'a self,
18563        body: &'a ::std::vec::Vec<types::NameOrUuid>,
18564    ) -> Result<ResponseValue<types::DeleteVolumesResponse>, Error<types::DeleteVolumesResponse>>
18565    {
18566        let url = format!("{}/v1/volumes", self.baseurl,);
18567        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18568        header_map.append(
18569            ::reqwest::header::HeaderName::from_static("api-version"),
18570            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18571        );
18572        #[allow(unused_mut)]
18573        let mut request = self
18574            .client
18575            .delete(url)
18576            .header(
18577                ::reqwest::header::ACCEPT,
18578                ::reqwest::header::HeaderValue::from_static("application/json"),
18579            )
18580            .json(&body)
18581            .headers(header_map)
18582            .build()?;
18583        let result = self.client.execute(request).await;
18584        let response = result?;
18585        match response.status().as_u16() {
18586            200..=299 => ResponseValue::from_response(response).await,
18587            _ => Err(Error::ErrorResponse(
18588                ResponseValue::from_response(response).await?,
18589            )),
18590        }
18591    }
18592
18593    ///Update Volumes
18594    ///
18595    ///Update one or more volumes specified by either UUID(s) or name(s).
18596    ///
18597    ///Sends a `PATCH` request to `/v1/volumes`
18598    pub async fn update_volumes<'a>(
18599        &'a self,
18600        body: &'a ::std::vec::Vec<types::UpdateVolumesRequestItem>,
18601    ) -> Result<ResponseValue<types::UpdateVolumesResponse>, Error<types::UpdateVolumesResponse>>
18602    {
18603        let url = format!("{}/v1/volumes", self.baseurl,);
18604        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18605        header_map.append(
18606            ::reqwest::header::HeaderName::from_static("api-version"),
18607            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18608        );
18609        #[allow(unused_mut)]
18610        let mut request = self
18611            .client
18612            .patch(url)
18613            .header(
18614                ::reqwest::header::ACCEPT,
18615                ::reqwest::header::HeaderValue::from_static("application/json"),
18616            )
18617            .json(&body)
18618            .headers(header_map)
18619            .build()?;
18620        let result = self.client.execute(request).await;
18621        let response = result?;
18622        match response.status().as_u16() {
18623            200..=299 => ResponseValue::from_response(response).await,
18624            _ => Err(Error::ErrorResponse(
18625                ResponseValue::from_response(response).await?,
18626            )),
18627        }
18628    }
18629
18630    ///Attach Volumes
18631    ///
18632    ///Attach one or more volumes specified by ID(s) (name or UUID) to
18633    /// instances so that the volumes are mounted when the instances start.
18634    /// The volumes need to be in `available` state and the instances must
18635    /// be in `stopped` state.
18636    ///
18637    ///Sends a `PUT` request to `/v1/volumes/attach`
18638    pub async fn attach_volumes<'a>(
18639        &'a self,
18640        body: &'a types::AttachVolumesRequest,
18641    ) -> Result<ResponseValue<types::AttachVolumesResponse>, Error<types::AttachVolumesResponse>>
18642    {
18643        let url = format!("{}/v1/volumes/attach", self.baseurl,);
18644        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18645        header_map.append(
18646            ::reqwest::header::HeaderName::from_static("api-version"),
18647            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18648        );
18649        #[allow(unused_mut)]
18650        let mut request = self
18651            .client
18652            .put(url)
18653            .header(
18654                ::reqwest::header::ACCEPT,
18655                ::reqwest::header::HeaderValue::from_static("application/json"),
18656            )
18657            .json(&body)
18658            .headers(header_map)
18659            .build()?;
18660        let result = self.client.execute(request).await;
18661        let response = result?;
18662        match response.status().as_u16() {
18663            200..=299 => ResponseValue::from_response(response).await,
18664            _ => Err(Error::ErrorResponse(
18665                ResponseValue::from_response(response).await?,
18666            )),
18667        }
18668    }
18669
18670    ///Detach Volumes
18671    ///
18672    ///Detach volumes specified by ID(s) (name or UUID) from instances.  If no
18673    ///particular instance is specified the volume is detached from all
18674    /// instances. The instances from which to detach must not have the
18675    /// volumes mounted.  The API returns an error for each instance from
18676    /// which it was unable to detach the volume.  If the volume has been
18677    /// created together with an instance, detaching the volume will make it
18678    /// persistent (i.e., it survives the deletion of the instance).
18679    ///
18680    ///Sends a `PUT` request to `/v1/volumes/detach`
18681    pub async fn detach_volumes<'a>(
18682        &'a self,
18683        body: &'a types::DetachVolumesRequest,
18684    ) -> Result<ResponseValue<types::DetachVolumesResponse>, Error<types::DetachVolumesResponse>>
18685    {
18686        let url = format!("{}/v1/volumes/detach", self.baseurl,);
18687        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18688        header_map.append(
18689            ::reqwest::header::HeaderName::from_static("api-version"),
18690            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18691        );
18692        #[allow(unused_mut)]
18693        let mut request = self
18694            .client
18695            .put(url)
18696            .header(
18697                ::reqwest::header::ACCEPT,
18698                ::reqwest::header::HeaderValue::from_static("application/json"),
18699            )
18700            .json(&body)
18701            .headers(header_map)
18702            .build()?;
18703        let result = self.client.execute(request).await;
18704        let response = result?;
18705        match response.status().as_u16() {
18706            200..=299 => ResponseValue::from_response(response).await,
18707            _ => Err(Error::ErrorResponse(
18708                ResponseValue::from_response(response).await?,
18709            )),
18710        }
18711    }
18712
18713    ///Get Volume by UUID
18714    ///
18715    ///Return the current status and the configuration of a particular volume
18716    /// by its UUID.
18717    ///
18718    ///Sends a `GET` request to `/v1/volumes/{uuid}`
18719    ///
18720    ///Arguments:
18721    /// - `uuid`: The UUID of the volume to retrieve.
18722    /// - `details`: Whether to include details about the volume in the
18723    ///   response.  By
18724    ///default this is set to true, meaning that all information about the
18725    ///volume will be included in the response.  If set to false, only the
18726    ///basic information about the volume will be included, such as its name
18727    ///and UUID.
18728    pub async fn get_volume_by_uuid<'a>(
18729        &'a self,
18730        uuid: &'a ::uuid::Uuid,
18731        details: Option<bool>,
18732    ) -> Result<ResponseValue<types::GetVolumesResponse>, Error<types::GetVolumesResponse>> {
18733        let url = format!(
18734            "{}/v1/volumes/{}",
18735            self.baseurl,
18736            encode_path(&uuid.to_string()),
18737        );
18738        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18739        header_map.append(
18740            ::reqwest::header::HeaderName::from_static("api-version"),
18741            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18742        );
18743        #[allow(unused_mut)]
18744        let mut request = self
18745            .client
18746            .get(url)
18747            .header(
18748                ::reqwest::header::ACCEPT,
18749                ::reqwest::header::HeaderValue::from_static("application/json"),
18750            )
18751            .query(&progenitor_client::QueryParam::new("details", &details))
18752            .headers(header_map)
18753            .build()?;
18754        let result = self.client.execute(request).await;
18755        let response = result?;
18756        match response.status().as_u16() {
18757            200..=299 => ResponseValue::from_response(response).await,
18758            _ => Err(Error::ErrorResponse(
18759                ResponseValue::from_response(response).await?,
18760            )),
18761        }
18762    }
18763
18764    ///Delete Volume by UUID
18765    ///
18766    ///Delete the specified volume by its UUID.  If the volume is still
18767    /// attached to an instance, the operation fails.  After this call, the
18768    /// IDs associated with the volume are no longer valid.
18769    ///
18770    ///Sends a `DELETE` request to `/v1/volumes/{uuid}`
18771    ///
18772    ///Arguments:
18773    /// - `uuid`: The UUID of the volume to delete.
18774    pub async fn delete_volume_by_uuid<'a>(
18775        &'a self,
18776        uuid: &'a ::uuid::Uuid,
18777    ) -> Result<ResponseValue<types::DeleteVolumesResponse>, Error<types::DeleteVolumesResponse>>
18778    {
18779        let url = format!(
18780            "{}/v1/volumes/{}",
18781            self.baseurl,
18782            encode_path(&uuid.to_string()),
18783        );
18784        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18785        header_map.append(
18786            ::reqwest::header::HeaderName::from_static("api-version"),
18787            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18788        );
18789        #[allow(unused_mut)]
18790        let mut request = self
18791            .client
18792            .delete(url)
18793            .header(
18794                ::reqwest::header::ACCEPT,
18795                ::reqwest::header::HeaderValue::from_static("application/json"),
18796            )
18797            .headers(header_map)
18798            .build()?;
18799        let result = self.client.execute(request).await;
18800        let response = result?;
18801        match response.status().as_u16() {
18802            200..=299 => ResponseValue::from_response(response).await,
18803            _ => Err(Error::ErrorResponse(
18804                ResponseValue::from_response(response).await?,
18805            )),
18806        }
18807    }
18808
18809    ///Update Volume by UUID
18810    ///
18811    ///Update the specified volume by its UUID.
18812    ///
18813    ///Sends a `PATCH` request to `/v1/volumes/{uuid}`
18814    ///
18815    ///Arguments:
18816    /// - `uuid`: The UUID of the service group to update.
18817    /// - `body`
18818    pub async fn update_volume_by_uuid<'a>(
18819        &'a self,
18820        uuid: &'a ::uuid::Uuid,
18821        body: &'a types::UpdateVolumeByUuidRequestBody,
18822    ) -> Result<ResponseValue<types::UpdateVolumesResponse>, Error<types::UpdateVolumesResponse>>
18823    {
18824        let url = format!(
18825            "{}/v1/volumes/{}",
18826            self.baseurl,
18827            encode_path(&uuid.to_string()),
18828        );
18829        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18830        header_map.append(
18831            ::reqwest::header::HeaderName::from_static("api-version"),
18832            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18833        );
18834        #[allow(unused_mut)]
18835        let mut request = self
18836            .client
18837            .patch(url)
18838            .header(
18839                ::reqwest::header::ACCEPT,
18840                ::reqwest::header::HeaderValue::from_static("application/json"),
18841            )
18842            .json(&body)
18843            .headers(header_map)
18844            .build()?;
18845        let result = self.client.execute(request).await;
18846        let response = result?;
18847        match response.status().as_u16() {
18848            200..=299 => ResponseValue::from_response(response).await,
18849            _ => Err(Error::ErrorResponse(
18850                ResponseValue::from_response(response).await?,
18851            )),
18852        }
18853    }
18854
18855    ///Attach Volume by UUID
18856    ///
18857    ///Attach a volume by UUID to an instance so that the volume is mounted
18858    /// when the instance starts.  The volume needs to be in `available`
18859    /// state and the instance must be in `stopped` state.
18860    ///
18861    ///Sends a `PUT` request to `/v1/volumes/{uuid}/attach`
18862    ///
18863    ///Arguments:
18864    /// - `uuid`: The UUID of the volume to attach.
18865    /// - `body`
18866    pub async fn attach_volume_by_uuid<'a>(
18867        &'a self,
18868        uuid: &'a ::uuid::Uuid,
18869        body: &'a types::AttachVolumeByUuidRequestBody,
18870    ) -> Result<ResponseValue<types::AttachVolumesResponse>, Error<types::AttachVolumesResponse>>
18871    {
18872        let url = format!(
18873            "{}/v1/volumes/{}/attach",
18874            self.baseurl,
18875            encode_path(&uuid.to_string()),
18876        );
18877        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18878        header_map.append(
18879            ::reqwest::header::HeaderName::from_static("api-version"),
18880            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18881        );
18882        #[allow(unused_mut)]
18883        let mut request = self
18884            .client
18885            .put(url)
18886            .header(
18887                ::reqwest::header::ACCEPT,
18888                ::reqwest::header::HeaderValue::from_static("application/json"),
18889            )
18890            .json(&body)
18891            .headers(header_map)
18892            .build()?;
18893        let result = self.client.execute(request).await;
18894        let response = result?;
18895        match response.status().as_u16() {
18896            200..=299 => ResponseValue::from_response(response).await,
18897            _ => Err(Error::ErrorResponse(
18898                ResponseValue::from_response(response).await?,
18899            )),
18900        }
18901    }
18902
18903    ///Detach Volume by UUID
18904    ///
18905    ///Detaches a volume by UUID from instances.  If no particular instance is
18906    ///specified the volume is detached from all instances.  The instances from
18907    ///which to detach must not have the volume mounted.  The API returns an
18908    /// error for each instance from which it was unable to detach the
18909    /// volume.  If the volume has been created together with an instance,
18910    /// detaching the volume will make it persistent (i.e., it survives the
18911    /// deletion of the instance).
18912    ///
18913    ///Sends a `PUT` request to `/v1/volumes/{uuid}/detach`
18914    ///
18915    ///Arguments:
18916    /// - `uuid`: The UUID of the volume to detach.
18917    /// - `body`
18918    pub async fn detach_volume_by_uuid<'a>(
18919        &'a self,
18920        uuid: &'a ::uuid::Uuid,
18921        body: &'a types::DetachVolumeByUuidRequestBody,
18922    ) -> Result<ResponseValue<types::DetachVolumesResponse>, Error<types::DetachVolumesResponse>>
18923    {
18924        let url = format!(
18925            "{}/v1/volumes/{}/detach",
18926            self.baseurl,
18927            encode_path(&uuid.to_string()),
18928        );
18929        let mut header_map = ::reqwest::header::HeaderMap::with_capacity(1usize);
18930        header_map.append(
18931            ::reqwest::header::HeaderName::from_static("api-version"),
18932            ::reqwest::header::HeaderValue::from_static(self.api_version()),
18933        );
18934        #[allow(unused_mut)]
18935        let mut request = self
18936            .client
18937            .put(url)
18938            .header(
18939                ::reqwest::header::ACCEPT,
18940                ::reqwest::header::HeaderValue::from_static("application/json"),
18941            )
18942            .json(&body)
18943            .headers(header_map)
18944            .build()?;
18945        let result = self.client.execute(request).await;
18946        let response = result?;
18947        match response.status().as_u16() {
18948            200..=299 => ResponseValue::from_response(response).await,
18949            _ => Err(Error::ErrorResponse(
18950                ResponseValue::from_response(response).await?,
18951            )),
18952        }
18953    }
18954}
18955
18956/// Items consumers will typically use such as the Client.
18957pub mod prelude {
18958    #[allow(unused_imports)]
18959    pub use super::Client;
18960}