#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PurchaseOfferingInput {
#[doc(hidden)]
pub offering_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quantity: std::option::Option<i32>,
#[doc(hidden)]
pub offering_promotion_id: std::option::Option<std::string::String>,
}
impl PurchaseOfferingInput {
pub fn offering_id(&self) -> std::option::Option<&str> {
self.offering_id.as_deref()
}
pub fn quantity(&self) -> std::option::Option<i32> {
self.quantity
}
pub fn offering_promotion_id(&self) -> std::option::Option<&str> {
self.offering_promotion_id.as_deref()
}
}
impl PurchaseOfferingInput {
pub fn builder() -> crate::operation::purchase_offering::builders::PurchaseOfferingInputBuilder
{
crate::operation::purchase_offering::builders::PurchaseOfferingInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct PurchaseOfferingInputBuilder {
pub(crate) offering_id: std::option::Option<std::string::String>,
pub(crate) quantity: std::option::Option<i32>,
pub(crate) offering_promotion_id: std::option::Option<std::string::String>,
}
impl PurchaseOfferingInputBuilder {
pub fn offering_id(mut self, input: impl Into<std::string::String>) -> Self {
self.offering_id = Some(input.into());
self
}
pub fn set_offering_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.offering_id = input;
self
}
pub fn quantity(mut self, input: i32) -> Self {
self.quantity = Some(input);
self
}
pub fn set_quantity(mut self, input: std::option::Option<i32>) -> Self {
self.quantity = input;
self
}
pub fn offering_promotion_id(mut self, input: impl Into<std::string::String>) -> Self {
self.offering_promotion_id = Some(input.into());
self
}
pub fn set_offering_promotion_id(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.offering_promotion_id = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::purchase_offering::PurchaseOfferingInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::purchase_offering::PurchaseOfferingInput {
offering_id: self.offering_id,
quantity: self.quantity,
offering_promotion_id: self.offering_promotion_id,
})
}
}