aws_sdk_costexplorer/types/
_service_specification.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Hardware specifications for the service that you want recommendations for.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ServiceSpecification {
7    /// <p>The Amazon EC2 hardware specifications that you want Amazon Web Services to provide recommendations for.</p>
8    pub ec2_specification: ::std::option::Option<crate::types::Ec2Specification>,
9}
10impl ServiceSpecification {
11    /// <p>The Amazon EC2 hardware specifications that you want Amazon Web Services to provide recommendations for.</p>
12    pub fn ec2_specification(&self) -> ::std::option::Option<&crate::types::Ec2Specification> {
13        self.ec2_specification.as_ref()
14    }
15}
16impl ServiceSpecification {
17    /// Creates a new builder-style object to manufacture [`ServiceSpecification`](crate::types::ServiceSpecification).
18    pub fn builder() -> crate::types::builders::ServiceSpecificationBuilder {
19        crate::types::builders::ServiceSpecificationBuilder::default()
20    }
21}
22
23/// A builder for [`ServiceSpecification`](crate::types::ServiceSpecification).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct ServiceSpecificationBuilder {
27    pub(crate) ec2_specification: ::std::option::Option<crate::types::Ec2Specification>,
28}
29impl ServiceSpecificationBuilder {
30    /// <p>The Amazon EC2 hardware specifications that you want Amazon Web Services to provide recommendations for.</p>
31    pub fn ec2_specification(mut self, input: crate::types::Ec2Specification) -> Self {
32        self.ec2_specification = ::std::option::Option::Some(input);
33        self
34    }
35    /// <p>The Amazon EC2 hardware specifications that you want Amazon Web Services to provide recommendations for.</p>
36    pub fn set_ec2_specification(mut self, input: ::std::option::Option<crate::types::Ec2Specification>) -> Self {
37        self.ec2_specification = input;
38        self
39    }
40    /// <p>The Amazon EC2 hardware specifications that you want Amazon Web Services to provide recommendations for.</p>
41    pub fn get_ec2_specification(&self) -> &::std::option::Option<crate::types::Ec2Specification> {
42        &self.ec2_specification
43    }
44    /// Consumes the builder and constructs a [`ServiceSpecification`](crate::types::ServiceSpecification).
45    pub fn build(self) -> crate::types::ServiceSpecification {
46        crate::types::ServiceSpecification {
47            ec2_specification: self.ec2_specification,
48        }
49    }
50}