aws-sdk-eventbridgev2 1.2.0

AWS SDK for Amazon EventBridgeV2
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 ListSubscribersInput {
    /// The Amazon Resource Name (ARN) that uniquely identifies an event bus.
    pub event_bus_arn: ::std::option::Option<::std::string::String>,
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub name_prefix: ::std::option::Option<::std::string::String>,
    /// Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.
    pub next_token: ::std::option::Option<::std::string::String>,
    /// Maximum number of results to return in one page of a List operation.
    pub max_results: ::std::option::Option<i32>,
}
impl ListSubscribersInput {
    /// The Amazon Resource Name (ARN) that uniquely identifies an event bus.
    pub fn event_bus_arn(&self) -> ::std::option::Option<&str> {
        self.event_bus_arn.as_deref()
    }
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub fn name_prefix(&self) -> ::std::option::Option<&str> {
        self.name_prefix.as_deref()
    }
    /// Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// Maximum number of results to return in one page of a List operation.
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
}
impl ListSubscribersInput {
    /// Creates a new builder-style object to manufacture [`ListSubscribersInput`](crate::operation::list_subscribers::ListSubscribersInput).
    pub fn builder() -> crate::operation::list_subscribers::builders::ListSubscribersInputBuilder {
        crate::operation::list_subscribers::builders::ListSubscribersInputBuilder::default()
    }
}

/// A builder for [`ListSubscribersInput`](crate::operation::list_subscribers::ListSubscribersInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListSubscribersInputBuilder {
    pub(crate) event_bus_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name_prefix: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
}
impl ListSubscribersInputBuilder {
    /// The Amazon Resource Name (ARN) that uniquely identifies an event bus.
    pub fn event_bus_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_bus_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) that uniquely identifies an event bus.
    pub fn set_event_bus_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_bus_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) that uniquely identifies an event bus.
    pub fn get_event_bus_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_bus_arn
    }
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub fn name_prefix(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name_prefix = ::std::option::Option::Some(input.into());
        self
    }
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub fn set_name_prefix(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name_prefix = input;
        self
    }
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub fn get_name_prefix(&self) -> &::std::option::Option<::std::string::String> {
        &self.name_prefix
    }
    /// Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// Opaque pagination token returned by a List operation. Pass it back in the next request to retrieve the next page of results.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Maximum number of results to return in one page of a List operation.
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// Maximum number of results to return in one page of a List operation.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// Maximum number of results to return in one page of a List operation.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// Consumes the builder and constructs a [`ListSubscribersInput`](crate::operation::list_subscribers::ListSubscribersInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::list_subscribers::ListSubscribersInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_subscribers::ListSubscribersInput {
            event_bus_arn: self.event_bus_arn,
            name_prefix: self.name_prefix,
            next_token: self.next_token,
            max_results: self.max_results,
        })
    }
}