aws_sdk_robomaker/operation/create_robot/
_create_robot_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#[deprecated(
4    note = "AWS RoboMaker is unable to process this request as the support for the AWS RoboMaker application deployment feature has ended. For additional information, see https://docs.aws.amazon.com/robomaker/latest/dg/fleets.html."
5)]
6#[non_exhaustive]
7#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
8pub struct CreateRobotOutput {
9    /// <p>The Amazon Resource Name (ARN) of the robot.</p>
10    pub arn: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the robot.</p>
12    pub name: ::std::option::Option<::std::string::String>,
13    /// <p>The time, in milliseconds since the epoch, when the robot was created.</p>
14    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>The Amazon Resource Name (ARN) of the Greengrass group associated with the robot.</p>
16    pub greengrass_group_id: ::std::option::Option<::std::string::String>,
17    /// <p>The target architecture of the robot.</p>
18    pub architecture: ::std::option::Option<crate::types::Architecture>,
19    /// <p>The list of all tags added to the robot.</p>
20    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
21    _request_id: Option<String>,
22}
23impl CreateRobotOutput {
24    /// <p>The Amazon Resource Name (ARN) of the robot.</p>
25    pub fn arn(&self) -> ::std::option::Option<&str> {
26        self.arn.as_deref()
27    }
28    /// <p>The name of the robot.</p>
29    pub fn name(&self) -> ::std::option::Option<&str> {
30        self.name.as_deref()
31    }
32    /// <p>The time, in milliseconds since the epoch, when the robot was created.</p>
33    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
34        self.created_at.as_ref()
35    }
36    /// <p>The Amazon Resource Name (ARN) of the Greengrass group associated with the robot.</p>
37    pub fn greengrass_group_id(&self) -> ::std::option::Option<&str> {
38        self.greengrass_group_id.as_deref()
39    }
40    /// <p>The target architecture of the robot.</p>
41    pub fn architecture(&self) -> ::std::option::Option<&crate::types::Architecture> {
42        self.architecture.as_ref()
43    }
44    /// <p>The list of all tags added to the robot.</p>
45    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
46        self.tags.as_ref()
47    }
48}
49impl ::aws_types::request_id::RequestId for CreateRobotOutput {
50    fn request_id(&self) -> Option<&str> {
51        self._request_id.as_deref()
52    }
53}
54impl CreateRobotOutput {
55    /// Creates a new builder-style object to manufacture [`CreateRobotOutput`](crate::operation::create_robot::CreateRobotOutput).
56    pub fn builder() -> crate::operation::create_robot::builders::CreateRobotOutputBuilder {
57        crate::operation::create_robot::builders::CreateRobotOutputBuilder::default()
58    }
59}
60
61/// A builder for [`CreateRobotOutput`](crate::operation::create_robot::CreateRobotOutput).
62#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
63#[non_exhaustive]
64pub struct CreateRobotOutputBuilder {
65    pub(crate) arn: ::std::option::Option<::std::string::String>,
66    pub(crate) name: ::std::option::Option<::std::string::String>,
67    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
68    pub(crate) greengrass_group_id: ::std::option::Option<::std::string::String>,
69    pub(crate) architecture: ::std::option::Option<crate::types::Architecture>,
70    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
71    _request_id: Option<String>,
72}
73impl CreateRobotOutputBuilder {
74    /// <p>The Amazon Resource Name (ARN) of the robot.</p>
75    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.arn = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The Amazon Resource Name (ARN) of the robot.</p>
80    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.arn = input;
82        self
83    }
84    /// <p>The Amazon Resource Name (ARN) of the robot.</p>
85    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
86        &self.arn
87    }
88    /// <p>The name of the robot.</p>
89    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
90        self.name = ::std::option::Option::Some(input.into());
91        self
92    }
93    /// <p>The name of the robot.</p>
94    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
95        self.name = input;
96        self
97    }
98    /// <p>The name of the robot.</p>
99    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
100        &self.name
101    }
102    /// <p>The time, in milliseconds since the epoch, when the robot was created.</p>
103    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
104        self.created_at = ::std::option::Option::Some(input);
105        self
106    }
107    /// <p>The time, in milliseconds since the epoch, when the robot was created.</p>
108    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
109        self.created_at = input;
110        self
111    }
112    /// <p>The time, in milliseconds since the epoch, when the robot was created.</p>
113    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
114        &self.created_at
115    }
116    /// <p>The Amazon Resource Name (ARN) of the Greengrass group associated with the robot.</p>
117    pub fn greengrass_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118        self.greengrass_group_id = ::std::option::Option::Some(input.into());
119        self
120    }
121    /// <p>The Amazon Resource Name (ARN) of the Greengrass group associated with the robot.</p>
122    pub fn set_greengrass_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123        self.greengrass_group_id = input;
124        self
125    }
126    /// <p>The Amazon Resource Name (ARN) of the Greengrass group associated with the robot.</p>
127    pub fn get_greengrass_group_id(&self) -> &::std::option::Option<::std::string::String> {
128        &self.greengrass_group_id
129    }
130    /// <p>The target architecture of the robot.</p>
131    pub fn architecture(mut self, input: crate::types::Architecture) -> Self {
132        self.architecture = ::std::option::Option::Some(input);
133        self
134    }
135    /// <p>The target architecture of the robot.</p>
136    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::Architecture>) -> Self {
137        self.architecture = input;
138        self
139    }
140    /// <p>The target architecture of the robot.</p>
141    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::Architecture> {
142        &self.architecture
143    }
144    /// Adds a key-value pair to `tags`.
145    ///
146    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
147    ///
148    /// <p>The list of all tags added to the robot.</p>
149    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
150        let mut hash_map = self.tags.unwrap_or_default();
151        hash_map.insert(k.into(), v.into());
152        self.tags = ::std::option::Option::Some(hash_map);
153        self
154    }
155    /// <p>The list of all tags added to the robot.</p>
156    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
157        self.tags = input;
158        self
159    }
160    /// <p>The list of all tags added to the robot.</p>
161    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
162        &self.tags
163    }
164    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
165        self._request_id = Some(request_id.into());
166        self
167    }
168
169    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
170        self._request_id = request_id;
171        self
172    }
173    /// Consumes the builder and constructs a [`CreateRobotOutput`](crate::operation::create_robot::CreateRobotOutput).
174    pub fn build(self) -> crate::operation::create_robot::CreateRobotOutput {
175        crate::operation::create_robot::CreateRobotOutput {
176            arn: self.arn,
177            name: self.name,
178            created_at: self.created_at,
179            greengrass_group_id: self.greengrass_group_id,
180            architecture: self.architecture,
181            tags: self.tags,
182            _request_id: self._request_id,
183        }
184    }
185}