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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes the estimated monthly savings possible for Amazon ECS services by adopting Compute Optimizer recommendations. This is based on Amazon ECS service pricing after applying Savings Plans discounts.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EcsEstimatedMonthlySavings {
    /// <p>The currency of the estimated monthly savings.</p>
    pub currency: ::std::option::Option<crate::types::Currency>,
    /// <p>The value of the estimated monthly savings for Amazon ECS services.</p>
    pub value: f64,
}
impl EcsEstimatedMonthlySavings {
    /// <p>The currency of the estimated monthly savings.</p>
    pub fn currency(&self) -> ::std::option::Option<&crate::types::Currency> {
        self.currency.as_ref()
    }
    /// <p>The value of the estimated monthly savings for Amazon ECS services.</p>
    pub fn value(&self) -> f64 {
        self.value
    }
}
impl EcsEstimatedMonthlySavings {
    /// Creates a new builder-style object to manufacture [`EcsEstimatedMonthlySavings`](crate::types::EcsEstimatedMonthlySavings).
    pub fn builder() -> crate::types::builders::EcsEstimatedMonthlySavingsBuilder {
        crate::types::builders::EcsEstimatedMonthlySavingsBuilder::default()
    }
}

/// A builder for [`EcsEstimatedMonthlySavings`](crate::types::EcsEstimatedMonthlySavings).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EcsEstimatedMonthlySavingsBuilder {
    pub(crate) currency: ::std::option::Option<crate::types::Currency>,
    pub(crate) value: ::std::option::Option<f64>,
}
impl EcsEstimatedMonthlySavingsBuilder {
    /// <p>The currency of the estimated monthly savings.</p>
    pub fn currency(mut self, input: crate::types::Currency) -> Self {
        self.currency = ::std::option::Option::Some(input);
        self
    }
    /// <p>The currency of the estimated monthly savings.</p>
    pub fn set_currency(mut self, input: ::std::option::Option<crate::types::Currency>) -> Self {
        self.currency = input;
        self
    }
    /// <p>The currency of the estimated monthly savings.</p>
    pub fn get_currency(&self) -> &::std::option::Option<crate::types::Currency> {
        &self.currency
    }
    /// <p>The value of the estimated monthly savings for Amazon ECS services.</p>
    pub fn value(mut self, input: f64) -> Self {
        self.value = ::std::option::Option::Some(input);
        self
    }
    /// <p>The value of the estimated monthly savings for Amazon ECS services.</p>
    pub fn set_value(mut self, input: ::std::option::Option<f64>) -> Self {
        self.value = input;
        self
    }
    /// <p>The value of the estimated monthly savings for Amazon ECS services.</p>
    pub fn get_value(&self) -> &::std::option::Option<f64> {
        &self.value
    }
    /// Consumes the builder and constructs a [`EcsEstimatedMonthlySavings`](crate::types::EcsEstimatedMonthlySavings).
    pub fn build(self) -> crate::types::EcsEstimatedMonthlySavings {
        crate::types::EcsEstimatedMonthlySavings {
            currency: self.currency,
            value: self.value.unwrap_or_default(),
        }
    }
}