#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct UpdateQuoteInput {
pub quote_identifier: ::std::option::Option<::std::string::String>,
pub outpost_identifier: ::std::option::Option<::std::string::String>,
pub country_code: ::std::option::Option<::std::string::String>,
pub requested_capacities: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>,
pub requested_constraints: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>,
pub requested_payment_options: ::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>>,
pub requested_payment_terms: ::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>>,
pub description: ::std::option::Option<::std::string::String>,
}
impl UpdateQuoteInput {
pub fn quote_identifier(&self) -> ::std::option::Option<&str> {
self.quote_identifier.as_deref()
}
pub fn outpost_identifier(&self) -> ::std::option::Option<&str> {
self.outpost_identifier.as_deref()
}
pub fn country_code(&self) -> ::std::option::Option<&str> {
self.country_code.as_deref()
}
pub fn requested_capacities(&self) -> &[crate::types::QuoteCapacity] {
self.requested_capacities.as_deref().unwrap_or_default()
}
pub fn requested_constraints(&self) -> &[crate::types::QuoteConstraint] {
self.requested_constraints.as_deref().unwrap_or_default()
}
pub fn requested_payment_options(&self) -> &[crate::types::PaymentOption] {
self.requested_payment_options.as_deref().unwrap_or_default()
}
pub fn requested_payment_terms(&self) -> &[crate::types::PaymentTerm] {
self.requested_payment_terms.as_deref().unwrap_or_default()
}
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
}
impl ::std::fmt::Debug for UpdateQuoteInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateQuoteInput");
formatter.field("quote_identifier", &self.quote_identifier);
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 UpdateQuoteInput {
pub fn builder() -> crate::operation::update_quote::builders::UpdateQuoteInputBuilder {
crate::operation::update_quote::builders::UpdateQuoteInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct UpdateQuoteInputBuilder {
pub(crate) quote_identifier: ::std::option::Option<::std::string::String>,
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 UpdateQuoteInputBuilder {
pub fn quote_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.quote_identifier = ::std::option::Option::Some(input.into());
self
}
pub fn set_quote_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.quote_identifier = input;
self
}
pub fn get_quote_identifier(&self) -> &::std::option::Option<::std::string::String> {
&self.quote_identifier
}
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 country_code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.country_code = ::std::option::Option::Some(input.into());
self
}
pub fn set_country_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.country_code = input;
self
}
pub fn get_country_code(&self) -> &::std::option::Option<::std::string::String> {
&self.country_code
}
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
}
pub fn set_requested_capacities(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>>) -> Self {
self.requested_capacities = input;
self
}
pub fn get_requested_capacities(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteCapacity>> {
&self.requested_capacities
}
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
}
pub fn set_requested_constraints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>>) -> Self {
self.requested_constraints = input;
self
}
pub fn get_requested_constraints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::QuoteConstraint>> {
&self.requested_constraints
}
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
}
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
}
pub fn get_requested_payment_options(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentOption>> {
&self.requested_payment_options
}
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
}
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
}
pub fn get_requested_payment_terms(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PaymentTerm>> {
&self.requested_payment_terms
}
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
pub fn build(self) -> ::std::result::Result<crate::operation::update_quote::UpdateQuoteInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_quote::UpdateQuoteInput {
quote_identifier: self.quote_identifier,
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 UpdateQuoteInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("UpdateQuoteInputBuilder");
formatter.field("quote_identifier", &self.quote_identifier);
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()
}
}