aws-sdk-iottwinmaker 1.101.0

AWS SDK for AWS IoT TwinMaker
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdatePricingPlanInput {
    /// <p>The pricing mode.</p>
    pub pricing_mode: ::std::option::Option<crate::types::PricingMode>,
    /// <p>The bundle names.</p>
    pub bundle_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdatePricingPlanInput {
    /// <p>The pricing mode.</p>
    pub fn pricing_mode(&self) -> ::std::option::Option<&crate::types::PricingMode> {
        self.pricing_mode.as_ref()
    }
    /// <p>The bundle names.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.bundle_names.is_none()`.
    pub fn bundle_names(&self) -> &[::std::string::String] {
        self.bundle_names.as_deref().unwrap_or_default()
    }
}
impl UpdatePricingPlanInput {
    /// Creates a new builder-style object to manufacture [`UpdatePricingPlanInput`](crate::operation::update_pricing_plan::UpdatePricingPlanInput).
    pub fn builder() -> crate::operation::update_pricing_plan::builders::UpdatePricingPlanInputBuilder {
        crate::operation::update_pricing_plan::builders::UpdatePricingPlanInputBuilder::default()
    }
}

/// A builder for [`UpdatePricingPlanInput`](crate::operation::update_pricing_plan::UpdatePricingPlanInput).
#[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 {
    /// <p>The pricing mode.</p>
    /// This field is required.
    pub fn pricing_mode(mut self, input: crate::types::PricingMode) -> Self {
        self.pricing_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The pricing mode.</p>
    pub fn set_pricing_mode(mut self, input: ::std::option::Option<crate::types::PricingMode>) -> Self {
        self.pricing_mode = input;
        self
    }
    /// <p>The pricing mode.</p>
    pub fn get_pricing_mode(&self) -> &::std::option::Option<crate::types::PricingMode> {
        &self.pricing_mode
    }
    /// Appends an item to `bundle_names`.
    ///
    /// To override the contents of this collection use [`set_bundle_names`](Self::set_bundle_names).
    ///
    /// <p>The bundle names.</p>
    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
    }
    /// <p>The bundle names.</p>
    pub fn set_bundle_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.bundle_names = input;
        self
    }
    /// <p>The bundle names.</p>
    pub fn get_bundle_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.bundle_names
    }
    /// Consumes the builder and constructs a [`UpdatePricingPlanInput`](crate::operation::update_pricing_plan::UpdatePricingPlanInput).
    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,
        })
    }
}