aws-sdk-iotfleetwise 1.106.0

AWS SDK for AWS IoT FleetWise
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchUpdateVehicleInput {
    /// <p>A list of information about the vehicles to update. For more information, see the API data type.</p>
    pub vehicles: ::std::option::Option<::std::vec::Vec<crate::types::UpdateVehicleRequestItem>>,
}
impl BatchUpdateVehicleInput {
    /// <p>A list of information about the vehicles to update. For more information, see the API data type.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.vehicles.is_none()`.
    pub fn vehicles(&self) -> &[crate::types::UpdateVehicleRequestItem] {
        self.vehicles.as_deref().unwrap_or_default()
    }
}
impl BatchUpdateVehicleInput {
    /// Creates a new builder-style object to manufacture [`BatchUpdateVehicleInput`](crate::operation::batch_update_vehicle::BatchUpdateVehicleInput).
    pub fn builder() -> crate::operation::batch_update_vehicle::builders::BatchUpdateVehicleInputBuilder {
        crate::operation::batch_update_vehicle::builders::BatchUpdateVehicleInputBuilder::default()
    }
}

/// A builder for [`BatchUpdateVehicleInput`](crate::operation::batch_update_vehicle::BatchUpdateVehicleInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchUpdateVehicleInputBuilder {
    pub(crate) vehicles: ::std::option::Option<::std::vec::Vec<crate::types::UpdateVehicleRequestItem>>,
}
impl BatchUpdateVehicleInputBuilder {
    /// Appends an item to `vehicles`.
    ///
    /// To override the contents of this collection use [`set_vehicles`](Self::set_vehicles).
    ///
    /// <p>A list of information about the vehicles to update. For more information, see the API data type.</p>
    pub fn vehicles(mut self, input: crate::types::UpdateVehicleRequestItem) -> Self {
        let mut v = self.vehicles.unwrap_or_default();
        v.push(input);
        self.vehicles = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of information about the vehicles to update. For more information, see the API data type.</p>
    pub fn set_vehicles(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::UpdateVehicleRequestItem>>) -> Self {
        self.vehicles = input;
        self
    }
    /// <p>A list of information about the vehicles to update. For more information, see the API data type.</p>
    pub fn get_vehicles(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::UpdateVehicleRequestItem>> {
        &self.vehicles
    }
    /// Consumes the builder and constructs a [`BatchUpdateVehicleInput`](crate::operation::batch_update_vehicle::BatchUpdateVehicleInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_update_vehicle::BatchUpdateVehicleInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::batch_update_vehicle::BatchUpdateVehicleInput { vehicles: self.vehicles })
    }
}