exoscale/models/
manager.rs

1/*
2 * Exoscale Public API
3 *
4 *  Infrastructure automation API, allowing programmatic access to all Exoscale products and services.  The [OpenAPI Specification](http://spec.openapis.org/oas/v3.0.3.html) source of this documentation can be obtained here:  * [JSON format](https://bump.sh/doc/exoscale-api.json) * [YAML format](https://bump.sh/doc/exoscale-api.yaml)
5 *
6 * The version of the OpenAPI document: 2.0.0
7 * Contact: api@exoscale.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// Manager : Resource manager
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct Manager {
15    /// Manager ID
16    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
17    pub id: Option<String>,
18    /// Manager type
19    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
20    pub _type: Option<Type>,
21}
22
23impl Manager {
24    /// Resource manager
25    pub fn new() -> Manager {
26        Manager {
27            id: None,
28            _type: None,
29        }
30    }
31}
32
33/// Manager type
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Type {
36    #[serde(rename = "sks-nodepool")]
37    SksNodepool,
38    #[serde(rename = "instance-pool")]
39    InstancePool,
40}
41
42impl Default for Type {
43    fn default() -> Type {
44        Self::SksNodepool
45    }
46}