aws_sdk_robomaker/operation/create_fleet/
_create_fleet_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 CreateFleetOutput {
9    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
10    pub arn: ::std::option::Option<::std::string::String>,
11    /// <p>The name of the fleet.</p>
12    pub name: ::std::option::Option<::std::string::String>,
13    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
14    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
15    /// <p>The list of all tags added to the fleet.</p>
16    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
17    _request_id: Option<String>,
18}
19impl CreateFleetOutput {
20    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
21    pub fn arn(&self) -> ::std::option::Option<&str> {
22        self.arn.as_deref()
23    }
24    /// <p>The name of the fleet.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
29    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
30        self.created_at.as_ref()
31    }
32    /// <p>The list of all tags added to the fleet.</p>
33    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
34        self.tags.as_ref()
35    }
36}
37impl ::aws_types::request_id::RequestId for CreateFleetOutput {
38    fn request_id(&self) -> Option<&str> {
39        self._request_id.as_deref()
40    }
41}
42impl CreateFleetOutput {
43    /// Creates a new builder-style object to manufacture [`CreateFleetOutput`](crate::operation::create_fleet::CreateFleetOutput).
44    pub fn builder() -> crate::operation::create_fleet::builders::CreateFleetOutputBuilder {
45        crate::operation::create_fleet::builders::CreateFleetOutputBuilder::default()
46    }
47}
48
49/// A builder for [`CreateFleetOutput`](crate::operation::create_fleet::CreateFleetOutput).
50#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
51#[non_exhaustive]
52pub struct CreateFleetOutputBuilder {
53    pub(crate) arn: ::std::option::Option<::std::string::String>,
54    pub(crate) name: ::std::option::Option<::std::string::String>,
55    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
56    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
57    _request_id: Option<String>,
58}
59impl CreateFleetOutputBuilder {
60    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
61    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62        self.arn = ::std::option::Option::Some(input.into());
63        self
64    }
65    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
66    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.arn = input;
68        self
69    }
70    /// <p>The Amazon Resource Name (ARN) of the fleet.</p>
71    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
72        &self.arn
73    }
74    /// <p>The name of the fleet.</p>
75    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
76        self.name = ::std::option::Option::Some(input.into());
77        self
78    }
79    /// <p>The name of the fleet.</p>
80    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
81        self.name = input;
82        self
83    }
84    /// <p>The name of the fleet.</p>
85    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
86        &self.name
87    }
88    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
89    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
90        self.created_at = ::std::option::Option::Some(input);
91        self
92    }
93    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
94    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
95        self.created_at = input;
96        self
97    }
98    /// <p>The time, in milliseconds since the epoch, when the fleet was created.</p>
99    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
100        &self.created_at
101    }
102    /// Adds a key-value pair to `tags`.
103    ///
104    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
105    ///
106    /// <p>The list of all tags added to the fleet.</p>
107    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
108        let mut hash_map = self.tags.unwrap_or_default();
109        hash_map.insert(k.into(), v.into());
110        self.tags = ::std::option::Option::Some(hash_map);
111        self
112    }
113    /// <p>The list of all tags added to the fleet.</p>
114    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
115        self.tags = input;
116        self
117    }
118    /// <p>The list of all tags added to the fleet.</p>
119    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
120        &self.tags
121    }
122    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
123        self._request_id = Some(request_id.into());
124        self
125    }
126
127    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
128        self._request_id = request_id;
129        self
130    }
131    /// Consumes the builder and constructs a [`CreateFleetOutput`](crate::operation::create_fleet::CreateFleetOutput).
132    pub fn build(self) -> crate::operation::create_fleet::CreateFleetOutput {
133        crate::operation::create_fleet::CreateFleetOutput {
134            arn: self.arn,
135            name: self.name,
136            created_at: self.created_at,
137            tags: self.tags,
138            _request_id: self._request_id,
139        }
140    }
141}