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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeDimensionKeysOutput {
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or equal to the value of the user-specified <code>StartTime</code>.</p>
pub aligned_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than or equal to the value of the user-specified <code>Endtime</code>.</p>
pub aligned_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub partition_keys: ::std::option::Option<::std::vec::Vec<crate::types::ResponsePartitionKey>>,
/// <p>The dimension keys that were requested.</p>
pub keys: ::std::option::Option<::std::vec::Vec<crate::types::DimensionKeyDescription>>,
/// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
pub next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeDimensionKeysOutput {
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn aligned_start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.aligned_start_time.as_ref()
}
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn aligned_end_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.aligned_end_time.as_ref()
}
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.partition_keys.is_none()`.
pub fn partition_keys(&self) -> &[crate::types::ResponsePartitionKey] {
self.partition_keys.as_deref().unwrap_or_default()
}
/// <p>The dimension keys that were requested.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.keys.is_none()`.
pub fn keys(&self) -> &[crate::types::DimensionKeyDescription] {
self.keys.as_deref().unwrap_or_default()
}
/// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
pub fn next_token(&self) -> ::std::option::Option<&str> {
self.next_token.as_deref()
}
}
impl ::aws_types::request_id::RequestId for DescribeDimensionKeysOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeDimensionKeysOutput {
/// Creates a new builder-style object to manufacture [`DescribeDimensionKeysOutput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput).
pub fn builder() -> crate::operation::describe_dimension_keys::builders::DescribeDimensionKeysOutputBuilder {
crate::operation::describe_dimension_keys::builders::DescribeDimensionKeysOutputBuilder::default()
}
}
/// A builder for [`DescribeDimensionKeysOutput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeDimensionKeysOutputBuilder {
pub(crate) aligned_start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) aligned_end_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) partition_keys: ::std::option::Option<::std::vec::Vec<crate::types::ResponsePartitionKey>>,
pub(crate) keys: ::std::option::Option<::std::vec::Vec<crate::types::DimensionKeyDescription>>,
pub(crate) next_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeDimensionKeysOutputBuilder {
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn aligned_start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.aligned_start_time = ::std::option::Option::Some(input);
self
}
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn set_aligned_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.aligned_start_time = input;
self
}
/// <p>The start time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedStartTime</code> will be less than or equal to the value of the user-specified <code>StartTime</code>.</p>
pub fn get_aligned_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.aligned_start_time
}
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn aligned_end_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.aligned_end_time = ::std::option::Option::Some(input);
self
}
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn set_aligned_end_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.aligned_end_time = input;
self
}
/// <p>The end time for the returned dimension keys, after alignment to a granular boundary (as specified by <code>PeriodInSeconds</code>). <code>AlignedEndTime</code> will be greater than or equal to the value of the user-specified <code>Endtime</code>.</p>
pub fn get_aligned_end_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.aligned_end_time
}
/// Appends an item to `partition_keys`.
///
/// To override the contents of this collection use [`set_partition_keys`](Self::set_partition_keys).
///
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub fn partition_keys(mut self, input: crate::types::ResponsePartitionKey) -> Self {
let mut v = self.partition_keys.unwrap_or_default();
v.push(input);
self.partition_keys = ::std::option::Option::Some(v);
self
}
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub fn set_partition_keys(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResponsePartitionKey>>) -> Self {
self.partition_keys = input;
self
}
/// <p>If <code>PartitionBy</code> was present in the request, <code>PartitionKeys</code> contains the breakdown of dimension keys by the specified partitions.</p>
pub fn get_partition_keys(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResponsePartitionKey>> {
&self.partition_keys
}
/// Appends an item to `keys`.
///
/// To override the contents of this collection use [`set_keys`](Self::set_keys).
///
/// <p>The dimension keys that were requested.</p>
pub fn keys(mut self, input: crate::types::DimensionKeyDescription) -> Self {
let mut v = self.keys.unwrap_or_default();
v.push(input);
self.keys = ::std::option::Option::Some(v);
self
}
/// <p>The dimension keys that were requested.</p>
pub fn set_keys(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DimensionKeyDescription>>) -> Self {
self.keys = input;
self
}
/// <p>The dimension keys that were requested.</p>
pub fn get_keys(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DimensionKeyDescription>> {
&self.keys
}
/// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_token = ::std::option::Option::Some(input.into());
self
}
/// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.next_token = input;
self
}
/// <p>A pagination token that indicates the response didn’t return all available records because <code>MaxRecords</code> was specified in the previous request. To get the remaining records, specify <code>NextToken</code> in a separate request with this value.</p>
pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
&self.next_token
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
/// Consumes the builder and constructs a [`DescribeDimensionKeysOutput`](crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput).
pub fn build(self) -> crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput {
crate::operation::describe_dimension_keys::DescribeDimensionKeysOutput {
aligned_start_time: self.aligned_start_time,
aligned_end_time: self.aligned_end_time,
partition_keys: self.partition_keys,
keys: self.keys,
next_token: self.next_token,
_request_id: self._request_id,
}
}
}