#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePricingPlanInput {
pub pricing_mode: ::std::option::Option<crate::types::PricingMode>,
pub bundle_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdatePricingPlanInput {
pub fn pricing_mode(&self) -> ::std::option::Option<&crate::types::PricingMode> {
self.pricing_mode.as_ref()
}
pub fn bundle_names(&self) -> &[::std::string::String] {
self.bundle_names.as_deref().unwrap_or_default()
}
}
impl UpdatePricingPlanInput {
pub fn builder() -> crate::operation::update_pricing_plan::builders::UpdatePricingPlanInputBuilder {
crate::operation::update_pricing_plan::builders::UpdatePricingPlanInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdatePricingPlanInputBuilder {
pub(crate) pricing_mode: ::std::option::Option<crate::types::PricingMode>,
pub(crate) bundle_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdatePricingPlanInputBuilder {
pub fn pricing_mode(mut self, input: crate::types::PricingMode) -> Self {
self.pricing_mode = ::std::option::Option::Some(input);
self
}
pub fn set_pricing_mode(mut self, input: ::std::option::Option<crate::types::PricingMode>) -> Self {
self.pricing_mode = input;
self
}
pub fn get_pricing_mode(&self) -> &::std::option::Option<crate::types::PricingMode> {
&self.pricing_mode
}
pub fn bundle_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.bundle_names.unwrap_or_default();
v.push(input.into());
self.bundle_names = ::std::option::Option::Some(v);
self
}
pub fn set_bundle_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.bundle_names = input;
self
}
pub fn get_bundle_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.bundle_names
}
pub fn build(
self,
) -> ::std::result::Result<crate::operation::update_pricing_plan::UpdatePricingPlanInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::update_pricing_plan::UpdatePricingPlanInput {
pricing_mode: self.pricing_mode,
bundle_names: self.bundle_names,
})
}
}