aws-sdk-snowball 1.105.0

AWS SDK for Amazon Import/Export Snowball
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The <code>Status</code> and <code>TrackingNumber</code> information for an inbound or outbound shipment.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Shipment {
    /// <p>Status information for a shipment.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The tracking number for this job. Using this tracking number with your region's carrier's website, you can track a Snow device as the carrier transports it.</p>
    /// <p>For India, the carrier is Amazon Logistics. For all other regions, UPS is the carrier.</p>
    pub tracking_number: ::std::option::Option<::std::string::String>,
}
impl Shipment {
    /// <p>Status information for a shipment.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The tracking number for this job. Using this tracking number with your region's carrier's website, you can track a Snow device as the carrier transports it.</p>
    /// <p>For India, the carrier is Amazon Logistics. For all other regions, UPS is the carrier.</p>
    pub fn tracking_number(&self) -> ::std::option::Option<&str> {
        self.tracking_number.as_deref()
    }
}
impl Shipment {
    /// Creates a new builder-style object to manufacture [`Shipment`](crate::types::Shipment).
    pub fn builder() -> crate::types::builders::ShipmentBuilder {
        crate::types::builders::ShipmentBuilder::default()
    }
}

/// A builder for [`Shipment`](crate::types::Shipment).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ShipmentBuilder {
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) tracking_number: ::std::option::Option<::std::string::String>,
}
impl ShipmentBuilder {
    /// <p>Status information for a shipment.</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Status information for a shipment.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>Status information for a shipment.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The tracking number for this job. Using this tracking number with your region's carrier's website, you can track a Snow device as the carrier transports it.</p>
    /// <p>For India, the carrier is Amazon Logistics. For all other regions, UPS is the carrier.</p>
    pub fn tracking_number(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tracking_number = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The tracking number for this job. Using this tracking number with your region's carrier's website, you can track a Snow device as the carrier transports it.</p>
    /// <p>For India, the carrier is Amazon Logistics. For all other regions, UPS is the carrier.</p>
    pub fn set_tracking_number(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tracking_number = input;
        self
    }
    /// <p>The tracking number for this job. Using this tracking number with your region's carrier's website, you can track a Snow device as the carrier transports it.</p>
    /// <p>For India, the carrier is Amazon Logistics. For all other regions, UPS is the carrier.</p>
    pub fn get_tracking_number(&self) -> &::std::option::Option<::std::string::String> {
        &self.tracking_number
    }
    /// Consumes the builder and constructs a [`Shipment`](crate::types::Shipment).
    pub fn build(self) -> crate::types::Shipment {
        crate::types::Shipment {
            status: self.status,
            tracking_number: self.tracking_number,
        }
    }
}