aws-sdk-outposts 1.109.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, ::std::fmt::Debug)]
pub struct CreateRenewalInput {
    /// <p>The payment option.</p>
    pub payment_option: ::std::option::Option<crate::types::PaymentOption>,
    /// <p>The payment term.</p>
    pub payment_term: ::std::option::Option<crate::types::PaymentTerm>,
    /// <p>The ID or ARN of the Outpost.</p>
    pub outpost_identifier: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateRenewalInput {
    /// <p>The payment option.</p>
    pub fn payment_option(&self) -> ::std::option::Option<&crate::types::PaymentOption> {
        self.payment_option.as_ref()
    }
    /// <p>The payment term.</p>
    pub fn payment_term(&self) -> ::std::option::Option<&crate::types::PaymentTerm> {
        self.payment_term.as_ref()
    }
    /// <p>The ID or ARN of the Outpost.</p>
    pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
        self.outpost_identifier.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl CreateRenewalInput {
    /// Creates a new builder-style object to manufacture [`CreateRenewalInput`](crate::operation::create_renewal::CreateRenewalInput).
    pub fn builder() -> crate::operation::create_renewal::builders::CreateRenewalInputBuilder {
        crate::operation::create_renewal::builders::CreateRenewalInputBuilder::default()
    }
}

/// A builder for [`CreateRenewalInput`](crate::operation::create_renewal::CreateRenewalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRenewalInputBuilder {
    pub(crate) payment_option: ::std::option::Option<crate::types::PaymentOption>,
    pub(crate) payment_term: ::std::option::Option<crate::types::PaymentTerm>,
    pub(crate) outpost_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl CreateRenewalInputBuilder {
    /// <p>The payment option.</p>
    /// This field is required.
    pub fn payment_option(mut self, input: crate::types::PaymentOption) -> Self {
        self.payment_option = ::std::option::Option::Some(input);
        self
    }
    /// <p>The payment option.</p>
    pub fn set_payment_option(mut self, input: ::std::option::Option<crate::types::PaymentOption>) -> Self {
        self.payment_option = input;
        self
    }
    /// <p>The payment option.</p>
    pub fn get_payment_option(&self) -> &::std::option::Option<crate::types::PaymentOption> {
        &self.payment_option
    }
    /// <p>The payment term.</p>
    /// This field is required.
    pub fn payment_term(mut self, input: crate::types::PaymentTerm) -> Self {
        self.payment_term = ::std::option::Option::Some(input);
        self
    }
    /// <p>The payment term.</p>
    pub fn set_payment_term(mut self, input: ::std::option::Option<crate::types::PaymentTerm>) -> Self {
        self.payment_term = input;
        self
    }
    /// <p>The payment term.</p>
    pub fn get_payment_term(&self) -> &::std::option::Option<crate::types::PaymentTerm> {
        &self.payment_term
    }
    /// <p>The ID or ARN of the Outpost.</p>
    /// This field is required.
    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.</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.</p>
    pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_identifier
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`CreateRenewalInput`](crate::operation::create_renewal::CreateRenewalInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_renewal::CreateRenewalInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_renewal::CreateRenewalInput {
            payment_option: self.payment_option,
            payment_term: self.payment_term,
            outpost_identifier: self.outpost_identifier,
            client_token: self.client_token,
        })
    }
}