aws-sdk-outposts 1.114.0

AWS SDK for AWS Outposts
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)]
pub struct CreateQuoteInput {
    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
    pub outpost_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The country code for the Outpost site location.</p>
    pub country_code: ::std::option::Option<::std::string::String>,
    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
    pub requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
    pub requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
    pub requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
    pub requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
    /// <p>A description for the quote.</p>
    pub description: ::std::option::Option<::std::string::String>,
}
impl CreateQuoteInput {
    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
    pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
        self.outpost_identifier.as_deref()
    }
    /// <p>The country code for the Outpost site location.</p>
    pub fn country_code(&self) -> ::std::option::Option<&str> {
        self.country_code.as_deref()
    }
    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</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 `.requested_capacities.is_none()`.
    pub fn requested_capacities(&self) -> &[crate::types::QuoteCapacity] {
        self.requested_capacities.as_deref().unwrap_or_default()
    }
    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</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 `.requested_constraints.is_none()`.
    pub fn requested_constraints(&self) -> &[crate::types::QuoteConstraint] {
        self.requested_constraints.as_deref().unwrap_or_default()
    }
    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</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 `.requested_payment_options.is_none()`.
    pub fn requested_payment_options(&self) -> &[crate::types::PaymentOption] {
        self.requested_payment_options.as_deref().unwrap_or_default()
    }
    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</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 `.requested_payment_terms.is_none()`.
    pub fn requested_payment_terms(&self) -> &[crate::types::PaymentTerm] {
        self.requested_payment_terms.as_deref().unwrap_or_default()
    }
    /// <p>A description for the quote.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
}
impl ::std::fmt::Debug for CreateQuoteInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateQuoteInput");
        formatter.field("outpost_identifier", &self.outpost_identifier);
        formatter.field("country_code", &self.country_code);
        formatter.field("requested_capacities", &self.requested_capacities);
        formatter.field("requested_constraints", &self.requested_constraints);
        formatter.field("requested_payment_options", &self.requested_payment_options);
        formatter.field("requested_payment_terms", &self.requested_payment_terms);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateQuoteInput {
    /// Creates a new builder-style object to manufacture [`CreateQuoteInput`](crate::operation::create_quote::CreateQuoteInput).
    pub fn builder() -> crate::operation::create_quote::builders::CreateQuoteInputBuilder {
        crate::operation::create_quote::builders::CreateQuoteInputBuilder::default()
    }
}

/// A builder for [`CreateQuoteInput`](crate::operation::create_quote::CreateQuoteInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateQuoteInputBuilder {
    pub(crate) outpost_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) country_code: ::std::option::Option<::std::string::String>,
    pub(crate) requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
    pub(crate) requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
    pub(crate) requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
    pub(crate) requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
}
impl CreateQuoteInputBuilder {
    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
    pub fn outpost_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
    pub fn set_outpost_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_identifier = input;
        self
    }
    /// <p>The ID or ARN of the Outpost to associate with the quote. If not specified, the quote is created without an Outpost association.</p>
    pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_identifier
    }
    /// <p>The country code for the Outpost site location.</p>
    /// This field is required.
    pub fn country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.country_code = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The country code for the Outpost site location.</p>
    pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.country_code = input;
        self
    }
    /// <p>The country code for the Outpost site location.</p>
    pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> {
        &self.country_code
    }
    /// Appends an item to `requested_capacities`.
    ///
    /// To override the contents of this collection use [`set_requested_capacities`](Self::set_requested_capacities).
    ///
    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
    pub fn requested_capacities(mut self, input: crate::types::QuoteCapacity) -> Self {
        let mut v = self.requested_capacities.unwrap_or_default();
        v.push(input);
        self.requested_capacities = ::std::option::Option::Some(v);
        self
    }
    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
    pub fn set_requested_capacities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>) -> Self {
        self.requested_capacities = input;
        self
    }
    /// <p>The capacity requirements for the quote. Each entry specifies a capacity type (such as Amazon EC2), the unit, and the quantity. For Amazon EC2, the quantity is the number of additional instances to add to the Outpost. For Amazon EBS and Amazon S3, the quantity is the total desired end-state capacity of the Outpost.</p>
    pub fn get_requested_capacities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>> {
        &self.requested_capacities
    }
    /// Appends an item to `requested_constraints`.
    ///
    /// To override the contents of this collection use [`set_requested_constraints`](Self::set_requested_constraints).
    ///
    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
    pub fn requested_constraints(mut self, input: crate::types::QuoteConstraint) -> Self {
        let mut v = self.requested_constraints.unwrap_or_default();
        v.push(input);
        self.requested_constraints = ::std::option::Option::Some(v);
        self
    }
    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
    pub fn set_requested_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>) -> Self {
        self.requested_constraints = input;
        self
    }
    /// <p>The physical constraints for the quote, such as maximum number of racks, maximum power draw per rack, or maximum weight per rack.</p>
    pub fn get_requested_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>> {
        &self.requested_constraints
    }
    /// Appends an item to `requested_payment_options`.
    ///
    /// To override the contents of this collection use [`set_requested_payment_options`](Self::set_requested_payment_options).
    ///
    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
    pub fn requested_payment_options(mut self, input: crate::types::PaymentOption) -> Self {
        let mut v = self.requested_payment_options.unwrap_or_default();
        v.push(input);
        self.requested_payment_options = ::std::option::Option::Some(v);
        self
    }
    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
    pub fn set_requested_payment_options(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>) -> Self {
        self.requested_payment_options = input;
        self
    }
    /// <p>The payment options to include in the quote pricing. If not specified, all available payment options are returned.</p>
    pub fn get_requested_payment_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>> {
        &self.requested_payment_options
    }
    /// Appends an item to `requested_payment_terms`.
    ///
    /// To override the contents of this collection use [`set_requested_payment_terms`](Self::set_requested_payment_terms).
    ///
    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
    pub fn requested_payment_terms(mut self, input: crate::types::PaymentTerm) -> Self {
        let mut v = self.requested_payment_terms.unwrap_or_default();
        v.push(input);
        self.requested_payment_terms = ::std::option::Option::Some(v);
        self
    }
    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
    pub fn set_requested_payment_terms(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>) -> Self {
        self.requested_payment_terms = input;
        self
    }
    /// <p>The payment terms to include in the quote pricing. If not specified, all available payment terms are returned.</p>
    pub fn get_requested_payment_terms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>> {
        &self.requested_payment_terms
    }
    /// <p>A description for the quote.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description for the quote.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description for the quote.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// Consumes the builder and constructs a [`CreateQuoteInput`](crate::operation::create_quote::CreateQuoteInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::create_quote::CreateQuoteInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_quote::CreateQuoteInput {
            outpost_identifier: self.outpost_identifier,
            country_code: self.country_code,
            requested_capacities: self.requested_capacities,
            requested_constraints: self.requested_constraints,
            requested_payment_options: self.requested_payment_options,
            requested_payment_terms: self.requested_payment_terms,
            description: self.description,
        })
    }
}
impl ::std::fmt::Debug for CreateQuoteInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateQuoteInputBuilder");
        formatter.field("outpost_identifier", &self.outpost_identifier);
        formatter.field("country_code", &self.country_code);
        formatter.field("requested_capacities", &self.requested_capacities);
        formatter.field("requested_constraints", &self.requested_constraints);
        formatter.field("requested_payment_options", &self.requested_payment_options);
        formatter.field("requested_payment_terms", &self.requested_payment_terms);
        formatter.field("description", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}