aws_sdk_robomaker/operation/create_fleet/
_create_fleet_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 CreateFleetInput {
9 pub name: ::std::option::Option<::std::string::String>,
11 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
13}
14impl CreateFleetInput {
15 pub fn name(&self) -> ::std::option::Option<&str> {
17 self.name.as_deref()
18 }
19 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
21 self.tags.as_ref()
22 }
23}
24impl CreateFleetInput {
25 pub fn builder() -> crate::operation::create_fleet::builders::CreateFleetInputBuilder {
27 crate::operation::create_fleet::builders::CreateFleetInputBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct CreateFleetInputBuilder {
35 pub(crate) name: ::std::option::Option<::std::string::String>,
36 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
37}
38impl CreateFleetInputBuilder {
39 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42 self.name = ::std::option::Option::Some(input.into());
43 self
44 }
45 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47 self.name = input;
48 self
49 }
50 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
52 &self.name
53 }
54 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
60 let mut hash_map = self.tags.unwrap_or_default();
61 hash_map.insert(k.into(), v.into());
62 self.tags = ::std::option::Option::Some(hash_map);
63 self
64 }
65 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
67 self.tags = input;
68 self
69 }
70 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
72 &self.tags
73 }
74 pub fn build(self) -> ::std::result::Result<crate::operation::create_fleet::CreateFleetInput, ::aws_smithy_types::error::operation::BuildError> {
76 ::std::result::Result::Ok(crate::operation::create_fleet::CreateFleetInput {
77 name: self.name,
78 tags: self.tags,
79 })
80 }
81}