aws_sdk_robomaker/operation/create_robot/
_create_robot_input.rs1#[allow(missing_docs)] #[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 CreateRobotInput {
9 pub name: ::std::option::Option<::std::string::String>,
11 pub architecture: ::std::option::Option<crate::types::Architecture>,
13 pub greengrass_group_id: ::std::option::Option<::std::string::String>,
15 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
17}
18impl CreateRobotInput {
19 pub fn name(&self) -> ::std::option::Option<&str> {
21 self.name.as_deref()
22 }
23 pub fn architecture(&self) -> ::std::option::Option<&crate::types::Architecture> {
25 self.architecture.as_ref()
26 }
27 pub fn greengrass_group_id(&self) -> ::std::option::Option<&str> {
29 self.greengrass_group_id.as_deref()
30 }
31 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
33 self.tags.as_ref()
34 }
35}
36impl CreateRobotInput {
37 pub fn builder() -> crate::operation::create_robot::builders::CreateRobotInputBuilder {
39 crate::operation::create_robot::builders::CreateRobotInputBuilder::default()
40 }
41}
42
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct CreateRobotInputBuilder {
47 pub(crate) name: ::std::option::Option<::std::string::String>,
48 pub(crate) architecture: ::std::option::Option<crate::types::Architecture>,
49 pub(crate) greengrass_group_id: ::std::option::Option<::std::string::String>,
50 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
51}
52impl CreateRobotInputBuilder {
53 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.name = ::std::option::Option::Some(input.into());
57 self
58 }
59 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.name = input;
62 self
63 }
64 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
66 &self.name
67 }
68 pub fn architecture(mut self, input: crate::types::Architecture) -> Self {
71 self.architecture = ::std::option::Option::Some(input);
72 self
73 }
74 pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::Architecture>) -> Self {
76 self.architecture = input;
77 self
78 }
79 pub fn get_architecture(&self) -> &::std::option::Option<crate::types::Architecture> {
81 &self.architecture
82 }
83 pub fn greengrass_group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86 self.greengrass_group_id = ::std::option::Option::Some(input.into());
87 self
88 }
89 pub fn set_greengrass_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
91 self.greengrass_group_id = input;
92 self
93 }
94 pub fn get_greengrass_group_id(&self) -> &::std::option::Option<::std::string::String> {
96 &self.greengrass_group_id
97 }
98 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
104 let mut hash_map = self.tags.unwrap_or_default();
105 hash_map.insert(k.into(), v.into());
106 self.tags = ::std::option::Option::Some(hash_map);
107 self
108 }
109 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
111 self.tags = input;
112 self
113 }
114 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
116 &self.tags
117 }
118 pub fn build(self) -> ::std::result::Result<crate::operation::create_robot::CreateRobotInput, ::aws_smithy_types::error::operation::BuildError> {
120 ::std::result::Result::Ok(crate::operation::create_robot::CreateRobotInput {
121 name: self.name,
122 architecture: self.architecture,
123 greengrass_group_id: self.greengrass_group_id,
124 tags: self.tags,
125 })
126 }
127}