aws_sdk_devicefarm/operation/purchase_offering/
_purchase_offering_input.rs#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PurchaseOfferingInput {
pub offering_id: ::std::option::Option<::std::string::String>,
pub quantity: ::std::option::Option<i32>,
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()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
self.offering_id = ::std::option::Option::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 get_offering_id(&self) -> &::std::option::Option<::std::string::String> {
&self.offering_id
}
pub fn quantity(mut self, input: i32) -> Self {
self.quantity = ::std::option::Option::Some(input);
self
}
pub fn set_quantity(mut self, input: ::std::option::Option<i32>) -> Self {
self.quantity = input;
self
}
pub fn get_quantity(&self) -> &::std::option::Option<i32> {
&self.quantity
}
pub fn offering_promotion_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.offering_promotion_id = ::std::option::Option::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 get_offering_promotion_id(&self) -> &::std::option::Option<::std::string::String> {
&self.offering_promotion_id
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::purchase_offering::PurchaseOfferingInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::purchase_offering::PurchaseOfferingInput {
offering_id: self.offering_id,
quantity: self.quantity,
offering_promotion_id: self.offering_promotion_id,
})
}
}