exoscale/models/
deploy_target.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/// DeployTarget : Deploy target
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct DeployTarget {
15    /// Deploy Target ID
16    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
17    pub id: Option<String>,
18    /// Deploy Target name
19    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
20    pub name: Option<String>,
21    /// Deploy Target type
22    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
23    pub _type: Option<Type>,
24    /// Deploy Target description
25    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
26    pub description: Option<String>,
27}
28
29impl DeployTarget {
30    /// Deploy target
31    pub fn new() -> DeployTarget {
32        DeployTarget {
33            id: None,
34            name: None,
35            _type: None,
36            description: None,
37        }
38    }
39}
40
41/// Deploy Target type
42#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
43pub enum Type {
44    #[serde(rename = "edge")]
45    Edge,
46    #[serde(rename = "dedicated")]
47    Dedicated,
48}
49
50impl Default for Type {
51    fn default() -> Type {
52        Self::Edge
53    }
54}