aws-sdk-pricingplanmanager 1.0.0

AWS SDK for PricingPlanManager
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 UpdateSubscriptionInput {
    /// <p>The ARN of the subscription to update.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The new tier level for the subscription.</p>
    pub plan_tier: ::std::option::Option<::std::string::String>,
    /// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
    pub usage_level: ::std::option::Option<::std::string::String>,
    /// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
    pub if_match: ::std::option::Option<::std::string::String>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateSubscriptionInput {
    /// <p>The ARN of the subscription to update.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The new tier level for the subscription.</p>
    pub fn plan_tier(&self) -> ::std::option::Option<&str> {
        self.plan_tier.as_deref()
    }
    /// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
    pub fn usage_level(&self) -> ::std::option::Option<&str> {
        self.usage_level.as_deref()
    }
    /// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
    pub fn if_match(&self) -> ::std::option::Option<&str> {
        self.if_match.as_deref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
}
impl UpdateSubscriptionInput {
    /// Creates a new builder-style object to manufacture [`UpdateSubscriptionInput`](crate::operation::update_subscription::UpdateSubscriptionInput).
    pub fn builder() -> crate::operation::update_subscription::builders::UpdateSubscriptionInputBuilder {
        crate::operation::update_subscription::builders::UpdateSubscriptionInputBuilder::default()
    }
}

/// A builder for [`UpdateSubscriptionInput`](crate::operation::update_subscription::UpdateSubscriptionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSubscriptionInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) plan_tier: ::std::option::Option<::std::string::String>,
    pub(crate) usage_level: ::std::option::Option<::std::string::String>,
    pub(crate) if_match: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
}
impl UpdateSubscriptionInputBuilder {
    /// <p>The ARN of the subscription to update.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the subscription to update.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The ARN of the subscription to update.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The new tier level for the subscription.</p>
    /// This field is required.
    pub fn plan_tier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.plan_tier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new tier level for the subscription.</p>
    pub fn set_plan_tier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.plan_tier = input;
        self
    }
    /// <p>The new tier level for the subscription.</p>
    pub fn get_plan_tier(&self) -> &::std::option::Option<::std::string::String> {
        &self.plan_tier
    }
    /// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
    pub fn usage_level(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.usage_level = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
    pub fn set_usage_level(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.usage_level = input;
        self
    }
    /// <p>The usage level within the plan tier. Specify <code>DEFAULT</code> for the base configuration. If omitted, the usage level is reset to the default.</p>
    pub fn get_usage_level(&self) -> &::std::option::Option<::std::string::String> {
        &self.usage_level
    }
    /// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
    /// This field is required.
    pub fn if_match(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.if_match = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
    pub fn set_if_match(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.if_match = input;
        self
    }
    /// <p>The <code>ETag</code> value from a previous <code>GetSubscription</code> or <code>ListSubscriptions</code> response. This ensures you are updating the expected version of the subscription.</p>
    pub fn get_if_match(&self) -> &::std::option::Option<::std::string::String> {
        &self.if_match
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the request is handled only once.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Consumes the builder and constructs a [`UpdateSubscriptionInput`](crate::operation::update_subscription::UpdateSubscriptionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_subscription::UpdateSubscriptionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_subscription::UpdateSubscriptionInput {
            arn: self.arn,
            plan_tier: self.plan_tier,
            usage_level: self.usage_level,
            if_match: self.if_match,
            client_token: self.client_token,
        })
    }
}