aws_sdk_iotfleetwise/operation/get_vehicle/
_get_vehicle_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetVehicleOutput {
6 pub vehicle_name: ::std::option::Option<::std::string::String>,
8 pub arn: ::std::option::Option<::std::string::String>,
10 pub model_manifest_arn: ::std::option::Option<::std::string::String>,
12 pub decoder_manifest_arn: ::std::option::Option<::std::string::String>,
14 pub attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
17 pub state_templates: ::std::option::Option<::std::vec::Vec<crate::types::StateTemplateAssociation>>,
19 pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
21 pub last_modification_time: ::std::option::Option<::aws_smithy_types::DateTime>,
23 _request_id: Option<String>,
24}
25impl GetVehicleOutput {
26 pub fn vehicle_name(&self) -> ::std::option::Option<&str> {
28 self.vehicle_name.as_deref()
29 }
30 pub fn arn(&self) -> ::std::option::Option<&str> {
32 self.arn.as_deref()
33 }
34 pub fn model_manifest_arn(&self) -> ::std::option::Option<&str> {
36 self.model_manifest_arn.as_deref()
37 }
38 pub fn decoder_manifest_arn(&self) -> ::std::option::Option<&str> {
40 self.decoder_manifest_arn.as_deref()
41 }
42 pub fn attributes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
45 self.attributes.as_ref()
46 }
47 pub fn state_templates(&self) -> &[crate::types::StateTemplateAssociation] {
51 self.state_templates.as_deref().unwrap_or_default()
52 }
53 pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
55 self.creation_time.as_ref()
56 }
57 pub fn last_modification_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
59 self.last_modification_time.as_ref()
60 }
61}
62impl ::aws_types::request_id::RequestId for GetVehicleOutput {
63 fn request_id(&self) -> Option<&str> {
64 self._request_id.as_deref()
65 }
66}
67impl GetVehicleOutput {
68 pub fn builder() -> crate::operation::get_vehicle::builders::GetVehicleOutputBuilder {
70 crate::operation::get_vehicle::builders::GetVehicleOutputBuilder::default()
71 }
72}
73
74#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
76#[non_exhaustive]
77pub struct GetVehicleOutputBuilder {
78 pub(crate) vehicle_name: ::std::option::Option<::std::string::String>,
79 pub(crate) arn: ::std::option::Option<::std::string::String>,
80 pub(crate) model_manifest_arn: ::std::option::Option<::std::string::String>,
81 pub(crate) decoder_manifest_arn: ::std::option::Option<::std::string::String>,
82 pub(crate) attributes: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
83 pub(crate) state_templates: ::std::option::Option<::std::vec::Vec<crate::types::StateTemplateAssociation>>,
84 pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
85 pub(crate) last_modification_time: ::std::option::Option<::aws_smithy_types::DateTime>,
86 _request_id: Option<String>,
87}
88impl GetVehicleOutputBuilder {
89 pub fn vehicle_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.vehicle_name = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_vehicle_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.vehicle_name = input;
97 self
98 }
99 pub fn get_vehicle_name(&self) -> &::std::option::Option<::std::string::String> {
101 &self.vehicle_name
102 }
103 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.arn = ::std::option::Option::Some(input.into());
106 self
107 }
108 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.arn = input;
111 self
112 }
113 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
115 &self.arn
116 }
117 pub fn model_manifest_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.model_manifest_arn = ::std::option::Option::Some(input.into());
120 self
121 }
122 pub fn set_model_manifest_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.model_manifest_arn = input;
125 self
126 }
127 pub fn get_model_manifest_arn(&self) -> &::std::option::Option<::std::string::String> {
129 &self.model_manifest_arn
130 }
131 pub fn decoder_manifest_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.decoder_manifest_arn = ::std::option::Option::Some(input.into());
134 self
135 }
136 pub fn set_decoder_manifest_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.decoder_manifest_arn = input;
139 self
140 }
141 pub fn get_decoder_manifest_arn(&self) -> &::std::option::Option<::std::string::String> {
143 &self.decoder_manifest_arn
144 }
145 pub fn attributes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
152 let mut hash_map = self.attributes.unwrap_or_default();
153 hash_map.insert(k.into(), v.into());
154 self.attributes = ::std::option::Option::Some(hash_map);
155 self
156 }
157 pub fn set_attributes(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
160 self.attributes = input;
161 self
162 }
163 pub fn get_attributes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
166 &self.attributes
167 }
168 pub fn state_templates(mut self, input: crate::types::StateTemplateAssociation) -> Self {
174 let mut v = self.state_templates.unwrap_or_default();
175 v.push(input);
176 self.state_templates = ::std::option::Option::Some(v);
177 self
178 }
179 pub fn set_state_templates(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StateTemplateAssociation>>) -> Self {
181 self.state_templates = input;
182 self
183 }
184 pub fn get_state_templates(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StateTemplateAssociation>> {
186 &self.state_templates
187 }
188 pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
190 self.creation_time = ::std::option::Option::Some(input);
191 self
192 }
193 pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
195 self.creation_time = input;
196 self
197 }
198 pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
200 &self.creation_time
201 }
202 pub fn last_modification_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
204 self.last_modification_time = ::std::option::Option::Some(input);
205 self
206 }
207 pub fn set_last_modification_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
209 self.last_modification_time = input;
210 self
211 }
212 pub fn get_last_modification_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
214 &self.last_modification_time
215 }
216 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
217 self._request_id = Some(request_id.into());
218 self
219 }
220
221 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
222 self._request_id = request_id;
223 self
224 }
225 pub fn build(self) -> crate::operation::get_vehicle::GetVehicleOutput {
227 crate::operation::get_vehicle::GetVehicleOutput {
228 vehicle_name: self.vehicle_name,
229 arn: self.arn,
230 model_manifest_arn: self.model_manifest_arn,
231 decoder_manifest_arn: self.decoder_manifest_arn,
232 attributes: self.attributes,
233 state_templates: self.state_templates,
234 creation_time: self.creation_time,
235 last_modification_time: self.last_modification_time,
236 _request_id: self._request_id,
237 }
238 }
239}