aws-sdk-budgets 1.68.0

AWS SDK for AWS Budgets
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Request of UpdateSubscriber</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateSubscriberInput {
    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the budget whose subscriber you want to update.</p>
    pub budget_name: ::std::option::Option<::std::string::String>,
    /// <p>The notification whose subscriber you want to update.</p>
    pub notification: ::std::option::Option<crate::types::Notification>,
    /// <p>The previous subscriber that is associated with a budget notification.</p>
    pub old_subscriber: ::std::option::Option<crate::types::Subscriber>,
    /// <p>The updated subscriber that is associated with a budget notification.</p>
    pub new_subscriber: ::std::option::Option<crate::types::Subscriber>,
}
impl UpdateSubscriberInput {
    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The name of the budget whose subscriber you want to update.</p>
    pub fn budget_name(&self) -> ::std::option::Option<&str> {
        self.budget_name.as_deref()
    }
    /// <p>The notification whose subscriber you want to update.</p>
    pub fn notification(&self) -> ::std::option::Option<&crate::types::Notification> {
        self.notification.as_ref()
    }
    /// <p>The previous subscriber that is associated with a budget notification.</p>
    pub fn old_subscriber(&self) -> ::std::option::Option<&crate::types::Subscriber> {
        self.old_subscriber.as_ref()
    }
    /// <p>The updated subscriber that is associated with a budget notification.</p>
    pub fn new_subscriber(&self) -> ::std::option::Option<&crate::types::Subscriber> {
        self.new_subscriber.as_ref()
    }
}
impl UpdateSubscriberInput {
    /// Creates a new builder-style object to manufacture [`UpdateSubscriberInput`](crate::operation::update_subscriber::UpdateSubscriberInput).
    pub fn builder() -> crate::operation::update_subscriber::builders::UpdateSubscriberInputBuilder {
        crate::operation::update_subscriber::builders::UpdateSubscriberInputBuilder::default()
    }
}

/// A builder for [`UpdateSubscriberInput`](crate::operation::update_subscriber::UpdateSubscriberInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateSubscriberInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) budget_name: ::std::option::Option<::std::string::String>,
    pub(crate) notification: ::std::option::Option<crate::types::Notification>,
    pub(crate) old_subscriber: ::std::option::Option<crate::types::Subscriber>,
    pub(crate) new_subscriber: ::std::option::Option<crate::types::Subscriber>,
}
impl UpdateSubscriberInputBuilder {
    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
    /// This field is required.
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The <code>accountId</code> that is associated with the budget whose subscriber you want to update.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The name of the budget whose subscriber you want to update.</p>
    /// This field is required.
    pub fn budget_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.budget_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the budget whose subscriber you want to update.</p>
    pub fn set_budget_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.budget_name = input;
        self
    }
    /// <p>The name of the budget whose subscriber you want to update.</p>
    pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.budget_name
    }
    /// <p>The notification whose subscriber you want to update.</p>
    /// This field is required.
    pub fn notification(mut self, input: crate::types::Notification) -> Self {
        self.notification = ::std::option::Option::Some(input);
        self
    }
    /// <p>The notification whose subscriber you want to update.</p>
    pub fn set_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
        self.notification = input;
        self
    }
    /// <p>The notification whose subscriber you want to update.</p>
    pub fn get_notification(&self) -> &::std::option::Option<crate::types::Notification> {
        &self.notification
    }
    /// <p>The previous subscriber that is associated with a budget notification.</p>
    /// This field is required.
    pub fn old_subscriber(mut self, input: crate::types::Subscriber) -> Self {
        self.old_subscriber = ::std::option::Option::Some(input);
        self
    }
    /// <p>The previous subscriber that is associated with a budget notification.</p>
    pub fn set_old_subscriber(mut self, input: ::std::option::Option<crate::types::Subscriber>) -> Self {
        self.old_subscriber = input;
        self
    }
    /// <p>The previous subscriber that is associated with a budget notification.</p>
    pub fn get_old_subscriber(&self) -> &::std::option::Option<crate::types::Subscriber> {
        &self.old_subscriber
    }
    /// <p>The updated subscriber that is associated with a budget notification.</p>
    /// This field is required.
    pub fn new_subscriber(mut self, input: crate::types::Subscriber) -> Self {
        self.new_subscriber = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated subscriber that is associated with a budget notification.</p>
    pub fn set_new_subscriber(mut self, input: ::std::option::Option<crate::types::Subscriber>) -> Self {
        self.new_subscriber = input;
        self
    }
    /// <p>The updated subscriber that is associated with a budget notification.</p>
    pub fn get_new_subscriber(&self) -> &::std::option::Option<crate::types::Subscriber> {
        &self.new_subscriber
    }
    /// Consumes the builder and constructs a [`UpdateSubscriberInput`](crate::operation::update_subscriber::UpdateSubscriberInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_subscriber::UpdateSubscriberInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_subscriber::UpdateSubscriberInput {
            account_id: self.account_id,
            budget_name: self.budget_name,
            notification: self.notification,
            old_subscriber: self.old_subscriber,
            new_subscriber: self.new_subscriber,
        })
    }
}