aws_sdk_iotfleetwise/operation/delete_vehicle/
_delete_vehicle_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteVehicleOutput {
6 pub vehicle_name: ::std::string::String,
8 pub arn: ::std::string::String,
10 _request_id: Option<String>,
11}
12impl DeleteVehicleOutput {
13 pub fn vehicle_name(&self) -> &str {
15 use std::ops::Deref;
16 self.vehicle_name.deref()
17 }
18 pub fn arn(&self) -> &str {
20 use std::ops::Deref;
21 self.arn.deref()
22 }
23}
24impl ::aws_types::request_id::RequestId for DeleteVehicleOutput {
25 fn request_id(&self) -> Option<&str> {
26 self._request_id.as_deref()
27 }
28}
29impl DeleteVehicleOutput {
30 pub fn builder() -> crate::operation::delete_vehicle::builders::DeleteVehicleOutputBuilder {
32 crate::operation::delete_vehicle::builders::DeleteVehicleOutputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct DeleteVehicleOutputBuilder {
40 pub(crate) vehicle_name: ::std::option::Option<::std::string::String>,
41 pub(crate) arn: ::std::option::Option<::std::string::String>,
42 _request_id: Option<String>,
43}
44impl DeleteVehicleOutputBuilder {
45 pub fn vehicle_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.vehicle_name = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_vehicle_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.vehicle_name = input;
54 self
55 }
56 pub fn get_vehicle_name(&self) -> &::std::option::Option<::std::string::String> {
58 &self.vehicle_name
59 }
60 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.arn = ::std::option::Option::Some(input.into());
64 self
65 }
66 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.arn = input;
69 self
70 }
71 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
73 &self.arn
74 }
75 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
76 self._request_id = Some(request_id.into());
77 self
78 }
79
80 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
81 self._request_id = request_id;
82 self
83 }
84 pub fn build(
89 self,
90 ) -> ::std::result::Result<crate::operation::delete_vehicle::DeleteVehicleOutput, ::aws_smithy_types::error::operation::BuildError> {
91 ::std::result::Result::Ok(crate::operation::delete_vehicle::DeleteVehicleOutput {
92 vehicle_name: self.vehicle_name.ok_or_else(|| {
93 ::aws_smithy_types::error::operation::BuildError::missing_field(
94 "vehicle_name",
95 "vehicle_name was not specified but it is required when building DeleteVehicleOutput",
96 )
97 })?,
98 arn: self.arn.ok_or_else(|| {
99 ::aws_smithy_types::error::operation::BuildError::missing_field(
100 "arn",
101 "arn was not specified but it is required when building DeleteVehicleOutput",
102 )
103 })?,
104 _request_id: self._request_id,
105 })
106 }
107}