aws-sdk-budgets 1.35.0

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

/// <p>Request of CreateSubscriber</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateSubscriberInput {
    /// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</p>
    pub budget_name: ::std::option::Option<::std::string::String>,
    /// <p>The notification that you want to create a subscriber for.</p>
    pub notification: ::std::option::Option<crate::types::Notification>,
    /// <p>The subscriber that you want to associate with a budget notification.</p>
    pub subscriber: ::std::option::Option<crate::types::Subscriber>,
}
impl CreateSubscriberInput {
    /// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</p>
    pub fn budget_name(&self) -> ::std::option::Option<&str> {
        self.budget_name.as_deref()
    }
    /// <p>The notification that you want to create a subscriber for.</p>
    pub fn notification(&self) -> ::std::option::Option<&crate::types::Notification> {
        self.notification.as_ref()
    }
    /// <p>The subscriber that you want to associate with a budget notification.</p>
    pub fn subscriber(&self) -> ::std::option::Option<&crate::types::Subscriber> {
        self.subscriber.as_ref()
    }
}
impl CreateSubscriberInput {
    /// Creates a new builder-style object to manufacture [`CreateSubscriberInput`](crate::operation::create_subscriber::CreateSubscriberInput).
    pub fn builder() -> crate::operation::create_subscriber::builders::CreateSubscriberInputBuilder {
        crate::operation::create_subscriber::builders::CreateSubscriberInputBuilder::default()
    }
}

/// A builder for [`CreateSubscriberInput`](crate::operation::create_subscriber::CreateSubscriberInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSubscriberInputBuilder {
    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) subscriber: ::std::option::Option<crate::types::Subscriber>,
}
impl CreateSubscriberInputBuilder {
    /// <p>The <code>accountId</code> that is associated with the budget that you want to create a subscriber for.</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 that you want to create a subscriber for.</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 that you want to create a subscriber for.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The name of the budget that you want to subscribe to. Budget names must be unique within an account.</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 that you want to subscribe to. Budget names must be unique within an account.</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 that you want to subscribe to. Budget names must be unique within an account.</p>
    pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.budget_name
    }
    /// <p>The notification that you want to create a subscriber for.</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 that you want to create a subscriber for.</p>
    pub fn set_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
        self.notification = input;
        self
    }
    /// <p>The notification that you want to create a subscriber for.</p>
    pub fn get_notification(&self) -> &::std::option::Option<crate::types::Notification> {
        &self.notification
    }
    /// <p>The subscriber that you want to associate with a budget notification.</p>
    /// This field is required.
    pub fn subscriber(mut self, input: crate::types::Subscriber) -> Self {
        self.subscriber = ::std::option::Option::Some(input);
        self
    }
    /// <p>The subscriber that you want to associate with a budget notification.</p>
    pub fn set_subscriber(mut self, input: ::std::option::Option<crate::types::Subscriber>) -> Self {
        self.subscriber = input;
        self
    }
    /// <p>The subscriber that you want to associate with a budget notification.</p>
    pub fn get_subscriber(&self) -> &::std::option::Option<crate::types::Subscriber> {
        &self.subscriber
    }
    /// Consumes the builder and constructs a [`CreateSubscriberInput`](crate::operation::create_subscriber::CreateSubscriberInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_subscriber::CreateSubscriberInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_subscriber::CreateSubscriberInput {
            account_id: self.account_id,
            budget_name: self.budget_name,
            notification: self.notification,
            subscriber: self.subscriber,
        })
    }
}