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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
// 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)]
pub struct GetIndexOutput {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the index.</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The type of the index in this Region. For information about the aggregator index and how it differs from a local index, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html">Turning on cross-Region search by creating an aggregator index</a>.</p>
pub r#type: ::std::option::Option<crate::types::IndexType>,
/// <p>The current state of the index in this Amazon Web Services Region.</p>
pub state: ::std::option::Option<crate::types::IndexState>,
/// <p>This response value is present only if this index is <code>Type=AGGREGATOR</code>.</p>
/// <p>A list of the Amazon Web Services Regions that replicate their content to the index in this Region.</p>
pub replicating_from: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>This response value is present only if this index is <code>Type=LOCAL</code>.</p>
/// <p>The Amazon Web Services Region that contains the aggregator index, if one exists. If an aggregator index does exist then the Region in which you called this operation replicates its index information to the Region specified in this response value.</p>
pub replicating_to: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The date and time when the index was originally created.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date and time when the index was last updated.</p>
pub last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Tag key and value pairs that are attached to the index.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetIndexOutput {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the index.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The type of the index in this Region. For information about the aggregator index and how it differs from a local index, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html">Turning on cross-Region search by creating an aggregator index</a>.</p>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::IndexType> {
self.r#type.as_ref()
}
/// <p>The current state of the index in this Amazon Web Services Region.</p>
pub fn state(&self) -> ::std::option::Option<&crate::types::IndexState> {
self.state.as_ref()
}
/// <p>This response value is present only if this index is <code>Type=AGGREGATOR</code>.</p>
/// <p>A list of the Amazon Web Services Regions that replicate their content to the index in this Region.</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 `.replicating_from.is_none()`.
pub fn replicating_from(&self) -> &[::std::string::String] {
self.replicating_from.as_deref().unwrap_or_default()
}
/// <p>This response value is present only if this index is <code>Type=LOCAL</code>.</p>
/// <p>The Amazon Web Services Region that contains the aggregator index, if one exists. If an aggregator index does exist then the Region in which you called this operation replicates its index information to the Region specified in this response value.</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 `.replicating_to.is_none()`.
pub fn replicating_to(&self) -> &[::std::string::String] {
self.replicating_to.as_deref().unwrap_or_default()
}
/// <p>The date and time when the index was originally created.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>The date and time when the index was last updated.</p>
pub fn last_updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_at.as_ref()
}
/// <p>Tag key and value pairs that are attached to the index.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
}
impl ::std::fmt::Debug for GetIndexOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetIndexOutput");
formatter.field("arn", &self.arn);
formatter.field("r#type", &self.r#type);
formatter.field("state", &self.state);
formatter.field("replicating_from", &self.replicating_from);
formatter.field("replicating_to", &self.replicating_to);
formatter.field("created_at", &self.created_at);
formatter.field("last_updated_at", &self.last_updated_at);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetIndexOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetIndexOutput {
/// Creates a new builder-style object to manufacture [`GetIndexOutput`](crate::operation::get_index::GetIndexOutput).
pub fn builder() -> crate::operation::get_index::builders::GetIndexOutputBuilder {
crate::operation::get_index::builders::GetIndexOutputBuilder::default()
}
}
/// A builder for [`GetIndexOutput`](crate::operation::get_index::GetIndexOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetIndexOutputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::IndexType>,
pub(crate) state: ::std::option::Option<crate::types::IndexState>,
pub(crate) replicating_from: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) replicating_to: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
_request_id: Option<String>,
}
impl GetIndexOutputBuilder {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the index.</p>
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the index.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon resource name (ARN)</a> of the index.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The type of the index in this Region. For information about the aggregator index and how it differs from a local index, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html">Turning on cross-Region search by creating an aggregator index</a>.</p>
pub fn r#type(mut self, input: crate::types::IndexType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of the index in this Region. For information about the aggregator index and how it differs from a local index, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html">Turning on cross-Region search by creating an aggregator index</a>.</p>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::IndexType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of the index in this Region. For information about the aggregator index and how it differs from a local index, see <a href="https://docs.aws.amazon.com/resource-explorer/latest/userguide/manage-aggregator-region.html">Turning on cross-Region search by creating an aggregator index</a>.</p>
pub fn get_type(&self) -> &::std::option::Option<crate::types::IndexType> {
&self.r#type
}
/// <p>The current state of the index in this Amazon Web Services Region.</p>
pub fn state(mut self, input: crate::types::IndexState) -> Self {
self.state = ::std::option::Option::Some(input);
self
}
/// <p>The current state of the index in this Amazon Web Services Region.</p>
pub fn set_state(mut self, input: ::std::option::Option<crate::types::IndexState>) -> Self {
self.state = input;
self
}
/// <p>The current state of the index in this Amazon Web Services Region.</p>
pub fn get_state(&self) -> &::std::option::Option<crate::types::IndexState> {
&self.state
}
/// Appends an item to `replicating_from`.
///
/// To override the contents of this collection use [`set_replicating_from`](Self::set_replicating_from).
///
/// <p>This response value is present only if this index is <code>Type=AGGREGATOR</code>.</p>
/// <p>A list of the Amazon Web Services Regions that replicate their content to the index in this Region.</p>
pub fn replicating_from(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.replicating_from.unwrap_or_default();
v.push(input.into());
self.replicating_from = ::std::option::Option::Some(v);
self
}
/// <p>This response value is present only if this index is <code>Type=AGGREGATOR</code>.</p>
/// <p>A list of the Amazon Web Services Regions that replicate their content to the index in this Region.</p>
pub fn set_replicating_from(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.replicating_from = input;
self
}
/// <p>This response value is present only if this index is <code>Type=AGGREGATOR</code>.</p>
/// <p>A list of the Amazon Web Services Regions that replicate their content to the index in this Region.</p>
pub fn get_replicating_from(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.replicating_from
}
/// Appends an item to `replicating_to`.
///
/// To override the contents of this collection use [`set_replicating_to`](Self::set_replicating_to).
///
/// <p>This response value is present only if this index is <code>Type=LOCAL</code>.</p>
/// <p>The Amazon Web Services Region that contains the aggregator index, if one exists. If an aggregator index does exist then the Region in which you called this operation replicates its index information to the Region specified in this response value.</p>
pub fn replicating_to(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.replicating_to.unwrap_or_default();
v.push(input.into());
self.replicating_to = ::std::option::Option::Some(v);
self
}
/// <p>This response value is present only if this index is <code>Type=LOCAL</code>.</p>
/// <p>The Amazon Web Services Region that contains the aggregator index, if one exists. If an aggregator index does exist then the Region in which you called this operation replicates its index information to the Region specified in this response value.</p>
pub fn set_replicating_to(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.replicating_to = input;
self
}
/// <p>This response value is present only if this index is <code>Type=LOCAL</code>.</p>
/// <p>The Amazon Web Services Region that contains the aggregator index, if one exists. If an aggregator index does exist then the Region in which you called this operation replicates its index information to the Region specified in this response value.</p>
pub fn get_replicating_to(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.replicating_to
}
/// <p>The date and time when the index was originally created.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the index was originally created.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The date and time when the index was originally created.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The date and time when the index was last updated.</p>
pub fn last_updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_at = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the index was last updated.</p>
pub fn set_last_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_at = input;
self
}
/// <p>The date and time when the index was last updated.</p>
pub fn get_last_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_at
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Tag key and value pairs that are attached to the index.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>Tag key and value pairs that are attached to the index.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>Tag key and value pairs that are attached to the index.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
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 [`GetIndexOutput`](crate::operation::get_index::GetIndexOutput).
pub fn build(self) -> crate::operation::get_index::GetIndexOutput {
crate::operation::get_index::GetIndexOutput {
arn: self.arn,
r#type: self.r#type,
state: self.state,
replicating_from: self.replicating_from,
replicating_to: self.replicating_to,
created_at: self.created_at,
last_updated_at: self.last_updated_at,
tags: self.tags,
_request_id: self._request_id,
}
}
}
impl ::std::fmt::Debug for GetIndexOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetIndexOutputBuilder");
formatter.field("arn", &self.arn);
formatter.field("r#type", &self.r#type);
formatter.field("state", &self.state);
formatter.field("replicating_from", &self.replicating_from);
formatter.field("replicating_to", &self.replicating_to);
formatter.field("created_at", &self.created_at);
formatter.field("last_updated_at", &self.last_updated_at);
formatter.field("tags", &"*** Sensitive Data Redacted ***");
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}