1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
// 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>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
pub auto_renew: ::std::option::Option<crate::types::AutoRenew>,
}
impl UpdateSubscriptionInput {
/// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
pub fn auto_renew(&self) -> ::std::option::Option<&crate::types::AutoRenew> {
self.auto_renew.as_ref()
}
}
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) auto_renew: ::std::option::Option<crate::types::AutoRenew>,
}
impl UpdateSubscriptionInputBuilder {
/// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
pub fn auto_renew(mut self, input: crate::types::AutoRenew) -> Self {
self.auto_renew = ::std::option::Option::Some(input);
self
}
/// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
pub fn set_auto_renew(mut self, input: ::std::option::Option<crate::types::AutoRenew>) -> Self {
self.auto_renew = input;
self
}
/// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
pub fn get_auto_renew(&self) -> &::std::option::Option<crate::types::AutoRenew> {
&self.auto_renew
}
/// 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 { auto_renew: self.auto_renew })
}
}