#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateVehicleError {
pub vehicle_name: ::std::option::Option<::std::string::String>,
pub code: ::std::option::Option<::std::string::String>,
pub message: ::std::option::Option<::std::string::String>,
}
impl CreateVehicleError {
pub fn vehicle_name(&self) -> ::std::option::Option<&str> {
self.vehicle_name.as_deref()
}
pub fn code(&self) -> ::std::option::Option<&str> {
self.code.as_deref()
}
pub fn message(&self) -> ::std::option::Option<&str> {
self.message.as_deref()
}
}
impl CreateVehicleError {
pub fn builder() -> crate::types::builders::CreateVehicleErrorBuilder {
crate::types::builders::CreateVehicleErrorBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct CreateVehicleErrorBuilder {
pub(crate) vehicle_name: ::std::option::Option<::std::string::String>,
pub(crate) code: ::std::option::Option<::std::string::String>,
pub(crate) message: ::std::option::Option<::std::string::String>,
}
impl CreateVehicleErrorBuilder {
pub fn vehicle_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.vehicle_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_vehicle_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.vehicle_name = input;
self
}
pub fn get_vehicle_name(&self) -> &::std::option::Option<::std::string::String> {
&self.vehicle_name
}
pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.code = ::std::option::Option::Some(input.into());
self
}
pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.code = input;
self
}
pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
&self.code
}
pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message = ::std::option::Option::Some(input.into());
self
}
pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message = input;
self
}
pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
&self.message
}
pub fn build(self) -> crate::types::CreateVehicleError {
crate::types::CreateVehicleError {
vehicle_name: self.vehicle_name,
code: self.code,
message: self.message,
}
}
}