aws_sdk_greengrass/operation/get_group/
_get_group_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetGroupOutput {
6    /// The ARN of the definition.
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// The time, in milliseconds since the epoch, when the definition was created.
9    pub creation_timestamp: ::std::option::Option<::std::string::String>,
10    /// The ID of the definition.
11    pub id: ::std::option::Option<::std::string::String>,
12    /// The time, in milliseconds since the epoch, when the definition was last updated.
13    pub last_updated_timestamp: ::std::option::Option<::std::string::String>,
14    /// The ID of the latest version associated with the definition.
15    pub latest_version: ::std::option::Option<::std::string::String>,
16    /// The ARN of the latest version associated with the definition.
17    pub latest_version_arn: ::std::option::Option<::std::string::String>,
18    /// The name of the definition.
19    pub name: ::std::option::Option<::std::string::String>,
20    /// Tag(s) attached to the resource arn.
21    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22    _request_id: Option<String>,
23}
24impl GetGroupOutput {
25    /// The ARN of the definition.
26    pub fn arn(&self) -> ::std::option::Option<&str> {
27        self.arn.as_deref()
28    }
29    /// The time, in milliseconds since the epoch, when the definition was created.
30    pub fn creation_timestamp(&self) -> ::std::option::Option<&str> {
31        self.creation_timestamp.as_deref()
32    }
33    /// The ID of the definition.
34    pub fn id(&self) -> ::std::option::Option<&str> {
35        self.id.as_deref()
36    }
37    /// The time, in milliseconds since the epoch, when the definition was last updated.
38    pub fn last_updated_timestamp(&self) -> ::std::option::Option<&str> {
39        self.last_updated_timestamp.as_deref()
40    }
41    /// The ID of the latest version associated with the definition.
42    pub fn latest_version(&self) -> ::std::option::Option<&str> {
43        self.latest_version.as_deref()
44    }
45    /// The ARN of the latest version associated with the definition.
46    pub fn latest_version_arn(&self) -> ::std::option::Option<&str> {
47        self.latest_version_arn.as_deref()
48    }
49    /// The name of the definition.
50    pub fn name(&self) -> ::std::option::Option<&str> {
51        self.name.as_deref()
52    }
53    /// Tag(s) attached to the resource arn.
54    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
55        self.tags.as_ref()
56    }
57}
58impl ::aws_types::request_id::RequestId for GetGroupOutput {
59    fn request_id(&self) -> Option<&str> {
60        self._request_id.as_deref()
61    }
62}
63impl GetGroupOutput {
64    /// Creates a new builder-style object to manufacture [`GetGroupOutput`](crate::operation::get_group::GetGroupOutput).
65    pub fn builder() -> crate::operation::get_group::builders::GetGroupOutputBuilder {
66        crate::operation::get_group::builders::GetGroupOutputBuilder::default()
67    }
68}
69
70/// A builder for [`GetGroupOutput`](crate::operation::get_group::GetGroupOutput).
71#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
72#[non_exhaustive]
73pub struct GetGroupOutputBuilder {
74    pub(crate) arn: ::std::option::Option<::std::string::String>,
75    pub(crate) creation_timestamp: ::std::option::Option<::std::string::String>,
76    pub(crate) id: ::std::option::Option<::std::string::String>,
77    pub(crate) last_updated_timestamp: ::std::option::Option<::std::string::String>,
78    pub(crate) latest_version: ::std::option::Option<::std::string::String>,
79    pub(crate) latest_version_arn: ::std::option::Option<::std::string::String>,
80    pub(crate) name: ::std::option::Option<::std::string::String>,
81    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
82    _request_id: Option<String>,
83}
84impl GetGroupOutputBuilder {
85    /// The ARN of the definition.
86    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.arn = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// The ARN of the definition.
91    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.arn = input;
93        self
94    }
95    /// The ARN of the definition.
96    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
97        &self.arn
98    }
99    /// The time, in milliseconds since the epoch, when the definition was created.
100    pub fn creation_timestamp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.creation_timestamp = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// The time, in milliseconds since the epoch, when the definition was created.
105    pub fn set_creation_timestamp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.creation_timestamp = input;
107        self
108    }
109    /// The time, in milliseconds since the epoch, when the definition was created.
110    pub fn get_creation_timestamp(&self) -> &::std::option::Option<::std::string::String> {
111        &self.creation_timestamp
112    }
113    /// The ID of the definition.
114    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.id = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// The ID of the definition.
119    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.id = input;
121        self
122    }
123    /// The ID of the definition.
124    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.id
126    }
127    /// The time, in milliseconds since the epoch, when the definition was last updated.
128    pub fn last_updated_timestamp(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.last_updated_timestamp = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// The time, in milliseconds since the epoch, when the definition was last updated.
133    pub fn set_last_updated_timestamp(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.last_updated_timestamp = input;
135        self
136    }
137    /// The time, in milliseconds since the epoch, when the definition was last updated.
138    pub fn get_last_updated_timestamp(&self) -> &::std::option::Option<::std::string::String> {
139        &self.last_updated_timestamp
140    }
141    /// The ID of the latest version associated with the definition.
142    pub fn latest_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.latest_version = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// The ID of the latest version associated with the definition.
147    pub fn set_latest_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.latest_version = input;
149        self
150    }
151    /// The ID of the latest version associated with the definition.
152    pub fn get_latest_version(&self) -> &::std::option::Option<::std::string::String> {
153        &self.latest_version
154    }
155    /// The ARN of the latest version associated with the definition.
156    pub fn latest_version_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.latest_version_arn = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// The ARN of the latest version associated with the definition.
161    pub fn set_latest_version_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.latest_version_arn = input;
163        self
164    }
165    /// The ARN of the latest version associated with the definition.
166    pub fn get_latest_version_arn(&self) -> &::std::option::Option<::std::string::String> {
167        &self.latest_version_arn
168    }
169    /// The name of the definition.
170    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171        self.name = ::std::option::Option::Some(input.into());
172        self
173    }
174    /// The name of the definition.
175    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
176        self.name = input;
177        self
178    }
179    /// The name of the definition.
180    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
181        &self.name
182    }
183    /// Adds a key-value pair to `tags`.
184    ///
185    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
186    ///
187    /// Tag(s) attached to the resource arn.
188    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
189        let mut hash_map = self.tags.unwrap_or_default();
190        hash_map.insert(k.into(), v.into());
191        self.tags = ::std::option::Option::Some(hash_map);
192        self
193    }
194    /// Tag(s) attached to the resource arn.
195    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
196        self.tags = input;
197        self
198    }
199    /// Tag(s) attached to the resource arn.
200    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
201        &self.tags
202    }
203    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
204        self._request_id = Some(request_id.into());
205        self
206    }
207
208    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
209        self._request_id = request_id;
210        self
211    }
212    /// Consumes the builder and constructs a [`GetGroupOutput`](crate::operation::get_group::GetGroupOutput).
213    pub fn build(self) -> crate::operation::get_group::GetGroupOutput {
214        crate::operation::get_group::GetGroupOutput {
215            arn: self.arn,
216            creation_timestamp: self.creation_timestamp,
217            id: self.id,
218            last_updated_timestamp: self.last_updated_timestamp,
219            latest_version: self.latest_version,
220            latest_version_arn: self.latest_version_arn,
221            name: self.name,
222            tags: self.tags,
223            _request_id: self._request_id,
224        }
225    }
226}