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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Information about a resource.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Resource {
/// The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub id: ::std::option::Option<::std::string::String>,
/// The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub name: ::std::option::Option<::std::string::String>,
/// A container of data for all resource types.
pub resource_data_container: ::std::option::Option<crate::types::ResourceDataContainer>,
}
impl Resource {
/// The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub fn id(&self) -> ::std::option::Option<&str> {
self.id.as_deref()
}
/// The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// A container of data for all resource types.
pub fn resource_data_container(&self) -> ::std::option::Option<&crate::types::ResourceDataContainer> {
self.resource_data_container.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) id: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) resource_data_container: ::std::option::Option<crate::types::ResourceDataContainer>,
}
impl ResourceBuilder {
/// The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
/// This field is required.
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// The resource ID, used to refer to a resource in the Lambda function configuration. Max length is 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// The descriptive resource name, which is displayed on the AWS IoT Greengrass console. Max length 128 characters with pattern ''\[a-zA-Z0-9:_-\]+''. This must be unique within a Greengrass group.
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// A container of data for all resource types.
/// This field is required.
pub fn resource_data_container(mut self, input: crate::types::ResourceDataContainer) -> Self {
self.resource_data_container = ::std::option::Option::Some(input);
self
}
/// A container of data for all resource types.
pub fn set_resource_data_container(mut self, input: ::std::option::Option<crate::types::ResourceDataContainer>) -> Self {
self.resource_data_container = input;
self
}
/// A container of data for all resource types.
pub fn get_resource_data_container(&self) -> &::std::option::Option<crate::types::ResourceDataContainer> {
&self.resource_data_container
}
/// Consumes the builder and constructs a [`Resource`](crate::types::Resource).
pub fn build(self) -> crate::types::Resource {
crate::types::Resource {
id: self.id,
name: self.name,
resource_data_container: self.resource_data_container,
}
}
}