aws_sdk_robomaker/operation/create_robot/
_create_robot_input.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 CreateRobotInput {
9    /// <p>The name for the robot.</p>
10    pub name: ::std::option::Option<::std::string::String>,
11    /// <p>The target architecture of the robot.</p>
12    pub architecture: ::std::option::Option<crate::types::Architecture>,
13    /// <p>The Greengrass group id.</p>
14    pub greengrass_group_id: ::std::option::Option<::std::string::String>,
15    /// <p>A map that contains tag keys and tag values that are attached to the robot.</p>
16    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
17}
18impl CreateRobotInput {
19    /// <p>The name for the robot.</p>
20    pub fn name(&self) -> ::std::option::Option<&str> {
21        self.name.as_deref()
22    }
23    /// <p>The target architecture of the robot.</p>
24    pub fn architecture(&self) -> ::std::option::Option<&crate::types::Architecture> {
25        self.architecture.as_ref()
26    }
27    /// <p>The Greengrass group id.</p>
28    pub fn greengrass_group_id(&self) -> ::std::option::Option<&str> {
29        self.greengrass_group_id.as_deref()
30    }
31    /// <p>A map that contains tag keys and tag values that are attached to the robot.</p>
32    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    /// Creates a new builder-style object to manufacture [`CreateRobotInput`](crate::operation::create_robot::CreateRobotInput).
38    pub fn builder() -> crate::operation::create_robot::builders::CreateRobotInputBuilder {
39        crate::operation::create_robot::builders::CreateRobotInputBuilder::default()
40    }
41}
42
43/// A builder for [`CreateRobotInput`](crate::operation::create_robot::CreateRobotInput).
44#[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    /// <p>The name for the robot.</p>
54    /// This field is required.
55    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    /// <p>The name for the robot.</p>
60    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61        self.name = input;
62        self
63    }
64    /// <p>The name for the robot.</p>
65    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
66        &self.name
67    }
68    /// <p>The target architecture of the robot.</p>
69    /// This field is required.
70    pub fn architecture(mut self, input: crate::types::Architecture) -> Self {
71        self.architecture = ::std::option::Option::Some(input);
72        self
73    }
74    /// <p>The target architecture of the robot.</p>
75    pub fn set_architecture(mut self, input: ::std::option::Option<crate::types::Architecture>) -> Self {
76        self.architecture = input;
77        self
78    }
79    /// <p>The target architecture of the robot.</p>
80    pub fn get_architecture(&self) -> &::std::option::Option<crate::types::Architecture> {
81        &self.architecture
82    }
83    /// <p>The Greengrass group id.</p>
84    /// This field is required.
85    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    /// <p>The Greengrass group id.</p>
90    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    /// <p>The Greengrass group id.</p>
95    pub fn get_greengrass_group_id(&self) -> &::std::option::Option<::std::string::String> {
96        &self.greengrass_group_id
97    }
98    /// Adds a key-value pair to `tags`.
99    ///
100    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
101    ///
102    /// <p>A map that contains tag keys and tag values that are attached to the robot.</p>
103    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    /// <p>A map that contains tag keys and tag values that are attached to the robot.</p>
110    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    /// <p>A map that contains tag keys and tag values that are attached to the robot.</p>
115    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
116        &self.tags
117    }
118    /// Consumes the builder and constructs a [`CreateRobotInput`](crate::operation::create_robot::CreateRobotInput).
119    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}