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>See <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html">Expression</a>. Billing view only supports <code>LINKED_ACCOUNT</code> and <code>Tags</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Expression {
/// <p>The specific <code>Dimension</code> to use for <code>Expression</code>.</p>
pub dimensions: ::std::option::Option<crate::types::DimensionValues>,
/// <p>The specific <code>Tag</code> to use for <code>Expression</code>.</p>
pub tags: ::std::option::Option<crate::types::TagValues>,
}
impl Expression {
/// <p>The specific <code>Dimension</code> to use for <code>Expression</code>.</p>
pub fn dimensions(&self) -> ::std::option::Option<&crate::types::DimensionValues> {
self.dimensions.as_ref()
}
/// <p>The specific <code>Tag</code> to use for <code>Expression</code>.</p>
pub fn tags(&self) -> ::std::option::Option<&crate::types::TagValues> {
self.tags.as_ref()
}
}
impl Expression {
/// Creates a new builder-style object to manufacture [`Expression`](crate::types::Expression).
pub fn builder() -> crate::types::builders::ExpressionBuilder {
crate::types::builders::ExpressionBuilder::default()
}
}
/// A builder for [`Expression`](crate::types::Expression).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ExpressionBuilder {
pub(crate) dimensions: ::std::option::Option<crate::types::DimensionValues>,
pub(crate) tags: ::std::option::Option<crate::types::TagValues>,
}
impl ExpressionBuilder {
/// <p>The specific <code>Dimension</code> to use for <code>Expression</code>.</p>
pub fn dimensions(mut self, input: crate::types::DimensionValues) -> Self {
self.dimensions = ::std::option::Option::Some(input);
self
}
/// <p>The specific <code>Dimension</code> to use for <code>Expression</code>.</p>
pub fn set_dimensions(mut self, input: ::std::option::Option<crate::types::DimensionValues>) -> Self {
self.dimensions = input;
self
}
/// <p>The specific <code>Dimension</code> to use for <code>Expression</code>.</p>
pub fn get_dimensions(&self) -> &::std::option::Option<crate::types::DimensionValues> {
&self.dimensions
}
/// <p>The specific <code>Tag</code> to use for <code>Expression</code>.</p>
pub fn tags(mut self, input: crate::types::TagValues) -> Self {
self.tags = ::std::option::Option::Some(input);
self
}
/// <p>The specific <code>Tag</code> to use for <code>Expression</code>.</p>
pub fn set_tags(mut self, input: ::std::option::Option<crate::types::TagValues>) -> Self {
self.tags = input;
self
}
/// <p>The specific <code>Tag</code> to use for <code>Expression</code>.</p>
pub fn get_tags(&self) -> &::std::option::Option<crate::types::TagValues> {
&self.tags
}
/// Consumes the builder and constructs a [`Expression`](crate::types::Expression).
pub fn build(self) -> crate::types::Expression {
crate::types::Expression {
dimensions: self.dimensions,
tags: self.tags,
}
}
}