#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateRenewalInput {
pub payment_option: ::std::option::Option<crate::types::PaymentOption>,
pub payment_term: ::std::option::Option<crate::types::PaymentTerm>,
pub outpost_identifier: ::std::option::Option<::std::string::String>,
pub client_token: ::std::option::Option<::std::string::String>,
}
impl CreateRenewalInput {
pub fn payment_option(&self) -> ::std::option::Option<&crate::types::PaymentOption> {
self.payment_option.as_ref()
}
pub fn payment_term(&self) -> ::std::option::Option<&crate::types::PaymentTerm> {
self.payment_term.as_ref()
}
pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
self.outpost_identifier.as_deref()
}
pub fn client_token(&self) -> ::std::option::Option<&str> {
self.client_token.as_deref()
}
}
impl CreateRenewalInput {
pub fn builder() -> crate::operation::create_renewal::builders::CreateRenewalInputBuilder {
crate::operation::create_renewal::builders::CreateRenewalInputBuilder::default()
}
}
#[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 {
pub fn payment_option(mut self, input: crate::types::PaymentOption) -> Self {
self.payment_option = ::std::option::Option::Some(input);
self
}
pub fn set_payment_option(mut self, input: ::std::option::Option<crate::types::PaymentOption>) -> Self {
self.payment_option = input;
self
}
pub fn get_payment_option(&self) -> &::std::option::Option<crate::types::PaymentOption> {
&self.payment_option
}
pub fn payment_term(mut self, input: crate::types::PaymentTerm) -> Self {
self.payment_term = ::std::option::Option::Some(input);
self
}
pub fn set_payment_term(mut self, input: ::std::option::Option<crate::types::PaymentTerm>) -> Self {
self.payment_term = input;
self
}
pub fn get_payment_term(&self) -> &::std::option::Option<crate::types::PaymentTerm> {
&self.payment_term
}
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
}
pub fn set_outpost_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.outpost_identifier = input;
self
}
pub fn get_outpost_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.outpost_identifier
}
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
}
pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.client_token = input;
self
}
pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
&self.client_token
}
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,
})
}
}