1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Hetzner Cloud API
 *
 * Copied from the official API documentation for the Public Hetzner Cloud.
 *
 * The version of the OpenAPI document: 0.20.0
 *
 * Generated by: https://openapi-generator.tech
 */

/// DeprecationInfo : Describes if, when & how the resources was deprecated. If this field is set to `null` the resource is not deprecated. If it has a value, it is considered deprecated.

#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DeprecationInfo {
    /// Date of when the deprecation was announced.
    #[serde(rename = "announced")]
    pub announced: String,
    /// After the time in this field, the resource will not be available from the general listing endpoint of the resource type, and it can not be used in new resources. For example, if this is an image, you can not create new servers with this image after the mentioned date.
    #[serde(rename = "unavailable_after")]
    pub unavailable_after: String,
}

impl DeprecationInfo {
    #![allow(clippy::too_many_arguments)]
    /// Describes if, when & how the resources was deprecated. If this field is set to `null` the resource is not deprecated. If it has a value, it is considered deprecated.
    pub fn new(announced: String, unavailable_after: String) -> DeprecationInfo {
        DeprecationInfo {
            announced,
            unavailable_after,
        }
    }
}