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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Describes a resource associated with a resource share in RAM.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Resource {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource.</p>
pub arn: ::std::option::Option<::std::string::String>,
/// <p>The resource type. This takes the form of: <code>service-code</code>:<code>resource-code</code>, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string <code>ec2:subnet</code>.</p>
pub r#type: ::std::option::Option<::std::string::String>,
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource share this resource is associated with.</p>
pub resource_share_arn: ::std::option::Option<::std::string::String>,
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource group. This value is available only if the resource is part of a resource group.</p>
pub resource_group_arn: ::std::option::Option<::std::string::String>,
/// <p>The current status of the resource.</p>
pub status: ::std::option::Option<crate::types::ResourceStatus>,
/// <p>A message about the status of the resource.</p>
pub status_message: ::std::option::Option<::std::string::String>,
/// <p>The date and time when the resource was associated with the resource share.</p>
pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The date an time when the association between the resource and the resource share was last updated.</p>
pub last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Specifies the scope of visibility of this resource:</p>
/// <ul>
/// <li>
/// <p><b>REGIONAL</b> – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.</p></li>
/// <li>
/// <p><b>GLOBAL</b> – The resource can be accessed from any Amazon Web Services Region.</p></li>
/// </ul>
pub resource_region_scope: ::std::option::Option<crate::types::ResourceRegionScope>,
}
impl Resource {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource.</p>
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
/// <p>The resource type. This takes the form of: <code>service-code</code>:<code>resource-code</code>, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string <code>ec2:subnet</code>.</p>
pub fn r#type(&self) -> ::std::option::Option<&str> {
self.r#type.as_deref()
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource share this resource is associated with.</p>
pub fn resource_share_arn(&self) -> ::std::option::Option<&str> {
self.resource_share_arn.as_deref()
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource group. This value is available only if the resource is part of a resource group.</p>
pub fn resource_group_arn(&self) -> ::std::option::Option<&str> {
self.resource_group_arn.as_deref()
}
/// <p>The current status of the resource.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::ResourceStatus> {
self.status.as_ref()
}
/// <p>A message about the status of the resource.</p>
pub fn status_message(&self) -> ::std::option::Option<&str> {
self.status_message.as_deref()
}
/// <p>The date and time when the resource was associated with the resource share.</p>
pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.creation_time.as_ref()
}
/// <p>The date an time when the association between the resource and the resource share was last updated.</p>
pub fn last_updated_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.last_updated_time.as_ref()
}
/// <p>Specifies the scope of visibility of this resource:</p>
/// <ul>
/// <li>
/// <p><b>REGIONAL</b> – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.</p></li>
/// <li>
/// <p><b>GLOBAL</b> – The resource can be accessed from any Amazon Web Services Region.</p></li>
/// </ul>
pub fn resource_region_scope(&self) -> ::std::option::Option<&crate::types::ResourceRegionScope> {
self.resource_region_scope.as_ref()
}
}
impl Resource {
/// Creates a new builder-style object to manufacture [`Resource`](crate::types::Resource).
pub fn builder() -> crate::types::builders::ResourceBuilder {
crate::types::builders::ResourceBuilder::default()
}
}
/// A builder for [`Resource`](crate::types::Resource).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ResourceBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<::std::string::String>,
pub(crate) resource_share_arn: ::std::option::Option<::std::string::String>,
pub(crate) resource_group_arn: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::ResourceStatus>,
pub(crate) status_message: ::std::option::Option<::std::string::String>,
pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) last_updated_time: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) resource_region_scope: ::std::option::Option<crate::types::ResourceRegionScope>,
}
impl ResourceBuilder {
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource.</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 resource.</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 resource.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The resource type. This takes the form of: <code>service-code</code>:<code>resource-code</code>, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string <code>ec2:subnet</code>.</p>
pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.r#type = ::std::option::Option::Some(input.into());
self
}
/// <p>The resource type. This takes the form of: <code>service-code</code>:<code>resource-code</code>, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string <code>ec2:subnet</code>.</p>
pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.r#type = input;
self
}
/// <p>The resource type. This takes the form of: <code>service-code</code>:<code>resource-code</code>, and is case-insensitive. For example, an Amazon EC2 Subnet would be represented by the string <code>ec2:subnet</code>.</p>
pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
&self.r#type
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource share this resource is associated with.</p>
pub fn resource_share_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_share_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 resource share this resource is associated with.</p>
pub fn set_resource_share_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_share_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 resource share this resource is associated with.</p>
pub fn get_resource_share_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_share_arn
}
/// <p>The <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">Amazon Resource Name (ARN)</a> of the resource group. This value is available only if the resource is part of a resource group.</p>
pub fn resource_group_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resource_group_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 resource group. This value is available only if the resource is part of a resource group.</p>
pub fn set_resource_group_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resource_group_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 resource group. This value is available only if the resource is part of a resource group.</p>
pub fn get_resource_group_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.resource_group_arn
}
/// <p>The current status of the resource.</p>
pub fn status(mut self, input: crate::types::ResourceStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The current status of the resource.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::ResourceStatus>) -> Self {
self.status = input;
self
}
/// <p>The current status of the resource.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::ResourceStatus> {
&self.status
}
/// <p>A message about the status of the resource.</p>
pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.status_message = ::std::option::Option::Some(input.into());
self
}
/// <p>A message about the status of the resource.</p>
pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.status_message = input;
self
}
/// <p>A message about the status of the resource.</p>
pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
&self.status_message
}
/// <p>The date and time when the resource was associated with the resource share.</p>
pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.creation_time = ::std::option::Option::Some(input);
self
}
/// <p>The date and time when the resource was associated with the resource share.</p>
pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.creation_time = input;
self
}
/// <p>The date and time when the resource was associated with the resource share.</p>
pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.creation_time
}
/// <p>The date an time when the association between the resource and the resource share was last updated.</p>
pub fn last_updated_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.last_updated_time = ::std::option::Option::Some(input);
self
}
/// <p>The date an time when the association between the resource and the resource share was last updated.</p>
pub fn set_last_updated_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.last_updated_time = input;
self
}
/// <p>The date an time when the association between the resource and the resource share was last updated.</p>
pub fn get_last_updated_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.last_updated_time
}
/// <p>Specifies the scope of visibility of this resource:</p>
/// <ul>
/// <li>
/// <p><b>REGIONAL</b> – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.</p></li>
/// <li>
/// <p><b>GLOBAL</b> – The resource can be accessed from any Amazon Web Services Region.</p></li>
/// </ul>
pub fn resource_region_scope(mut self, input: crate::types::ResourceRegionScope) -> Self {
self.resource_region_scope = ::std::option::Option::Some(input);
self
}
/// <p>Specifies the scope of visibility of this resource:</p>
/// <ul>
/// <li>
/// <p><b>REGIONAL</b> – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.</p></li>
/// <li>
/// <p><b>GLOBAL</b> – The resource can be accessed from any Amazon Web Services Region.</p></li>
/// </ul>
pub fn set_resource_region_scope(mut self, input: ::std::option::Option<crate::types::ResourceRegionScope>) -> Self {
self.resource_region_scope = input;
self
}
/// <p>Specifies the scope of visibility of this resource:</p>
/// <ul>
/// <li>
/// <p><b>REGIONAL</b> – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.</p></li>
/// <li>
/// <p><b>GLOBAL</b> – The resource can be accessed from any Amazon Web Services Region.</p></li>
/// </ul>
pub fn get_resource_region_scope(&self) -> &::std::option::Option<crate::types::ResourceRegionScope> {
&self.resource_region_scope
}
/// Consumes the builder and constructs a [`Resource`](crate::types::Resource).
pub fn build(self) -> crate::types::Resource {
crate::types::Resource {
arn: self.arn,
r#type: self.r#type,
resource_share_arn: self.resource_share_arn,
resource_group_arn: self.resource_group_arn,
status: self.status,
status_message: self.status_message,
creation_time: self.creation_time,
last_updated_time: self.last_updated_time,
resource_region_scope: self.resource_region_scope,
}
}
}