aws-sdk-codestarnotifications 1.92.0

AWS SDK for AWS CodeStar Notifications
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 SubscribeInput {
    /// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>Information about the Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients associated with a notification rule.</p>
    pub target: ::std::option::Option<crate::types::Target>,
    /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
    pub client_request_token: ::std::option::Option<::std::string::String>,
}
impl SubscribeInput {
    /// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>Information about the Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients associated with a notification rule.</p>
    pub fn target(&self) -> ::std::option::Option<&crate::types::Target> {
        self.target.as_ref()
    }
    /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
    pub fn client_request_token(&self) -> ::std::option::Option<&str> {
        self.client_request_token.as_deref()
    }
}
impl SubscribeInput {
    /// Creates a new builder-style object to manufacture [`SubscribeInput`](crate::operation::subscribe::SubscribeInput).
    pub fn builder() -> crate::operation::subscribe::builders::SubscribeInputBuilder {
        crate::operation::subscribe::builders::SubscribeInputBuilder::default()
    }
}

/// A builder for [`SubscribeInput`](crate::operation::subscribe::SubscribeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SubscribeInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) target: ::std::option::Option<crate::types::Target>,
    pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
}
impl SubscribeInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</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 Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the notification rule for which you want to create the association.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>Information about the Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients associated with a notification rule.</p>
    /// This field is required.
    pub fn target(mut self, input: crate::types::Target) -> Self {
        self.target = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients associated with a notification rule.</p>
    pub fn set_target(mut self, input: ::std::option::Option<crate::types::Target>) -> Self {
        self.target = input;
        self
    }
    /// <p>Information about the Amazon Q Developer in chat applications topics or Amazon Q Developer in chat applications clients associated with a notification rule.</p>
    pub fn get_target(&self) -> &::std::option::Option<crate::types::Target> {
        &self.target
    }
    /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
    pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_request_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
    pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_request_token = input;
        self
    }
    /// <p>An enumeration token that, when provided in a request, returns the next batch of the results.</p>
    pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_request_token
    }
    /// Consumes the builder and constructs a [`SubscribeInput`](crate::operation::subscribe::SubscribeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::subscribe::SubscribeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::subscribe::SubscribeInput {
            arn: self.arn,
            target: self.target,
            client_request_token: self.client_request_token,
        })
    }
}