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 CreateSubscriberOutput {
    /// The Amazon Resource Name (ARN) that uniquely identifies a subscriber.
    pub subscriber_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: ::std::option::Option<::std::string::String>,
    /// The Amazon Resource Name (ARN) that uniquely identifies an event bus.
    pub event_bus_arn: ::std::option::Option<::std::string::String>,
    /// Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.
    pub r#type: ::std::option::Option<crate::types::OrderingType>,
    /// Starting position for a subscriber.
    pub starting_position: ::std::option::Option<crate::types::StartingPosition>,
    /// Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.
    pub point_in_time_configuration: ::std::option::Option<crate::types::PointInTimeConfiguration>,
    /// Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.
    pub state: ::std::option::Option<crate::types::SubscriberState>,
    /// The time the subscriber was created.
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl CreateSubscriberOutput {
    /// The Amazon Resource Name (ARN) that uniquely identifies a subscriber.
    pub fn subscriber_arn(&self) -> ::std::option::Option<&str> {
        self.subscriber_arn.as_deref()
    }
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// 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()
    }
    /// Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::OrderingType> {
        self.r#type.as_ref()
    }
    /// Starting position for a subscriber.
    pub fn starting_position(&self) -> ::std::option::Option<&crate::types::StartingPosition> {
        self.starting_position.as_ref()
    }
    /// Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.
    pub fn point_in_time_configuration(&self) -> ::std::option::Option<&crate::types::PointInTimeConfiguration> {
        self.point_in_time_configuration.as_ref()
    }
    /// Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.
    pub fn state(&self) -> ::std::option::Option<&crate::types::SubscriberState> {
        self.state.as_ref()
    }
    /// The time the subscriber was created.
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for CreateSubscriberOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateSubscriberOutput {
    /// Creates a new builder-style object to manufacture [`CreateSubscriberOutput`](crate::operation::create_subscriber::CreateSubscriberOutput).
    pub fn builder() -> crate::operation::create_subscriber::builders::CreateSubscriberOutputBuilder {
        crate::operation::create_subscriber::builders::CreateSubscriberOutputBuilder::default()
    }
}

/// A builder for [`CreateSubscriberOutput`](crate::operation::create_subscriber::CreateSubscriberOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateSubscriberOutputBuilder {
    pub(crate) subscriber_arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) event_bus_arn: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::OrderingType>,
    pub(crate) starting_position: ::std::option::Option<crate::types::StartingPosition>,
    pub(crate) point_in_time_configuration: ::std::option::Option<crate::types::PointInTimeConfiguration>,
    pub(crate) state: ::std::option::Option<crate::types::SubscriberState>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl CreateSubscriberOutputBuilder {
    /// The Amazon Resource Name (ARN) that uniquely identifies a subscriber.
    pub fn subscriber_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.subscriber_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) that uniquely identifies a subscriber.
    pub fn set_subscriber_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.subscriber_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) that uniquely identifies a subscriber.
    pub fn get_subscriber_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.subscriber_arn
    }
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::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(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// Name of a subscriber. The first character must be alphanumeric; the remaining characters may also include '.', '-', and '_'.
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// 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
    }
    /// Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.
    pub fn r#type(mut self, input: crate::types::OrderingType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::OrderingType>) -> Self {
        self.r#type = input;
        self
    }
    /// Delivery ordering mode of a subscriber: FIFO delivers events in order within an event group; UNORDERED delivers without an ordering guarantee.
    pub fn get_type(&self) -> &::std::option::Option<crate::types::OrderingType> {
        &self.r#type
    }
    /// Starting position for a subscriber.
    pub fn starting_position(mut self, input: crate::types::StartingPosition) -> Self {
        self.starting_position = ::std::option::Option::Some(input);
        self
    }
    /// Starting position for a subscriber.
    pub fn set_starting_position(mut self, input: ::std::option::Option<crate::types::StartingPosition>) -> Self {
        self.starting_position = input;
        self
    }
    /// Starting position for a subscriber.
    pub fn get_starting_position(&self) -> &::std::option::Option<crate::types::StartingPosition> {
        &self.starting_position
    }
    /// Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.
    pub fn point_in_time_configuration(mut self, input: crate::types::PointInTimeConfiguration) -> Self {
        self.point_in_time_configuration = ::std::option::Option::Some(input);
        self
    }
    /// Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.
    pub fn set_point_in_time_configuration(mut self, input: ::std::option::Option<crate::types::PointInTimeConfiguration>) -> Self {
        self.point_in_time_configuration = input;
        self
    }
    /// Point-in-time configuration for a subscriber. Only applicable when StartingPosition is POINT_IN_TIME.
    pub fn get_point_in_time_configuration(&self) -> &::std::option::Option<crate::types::PointInTimeConfiguration> {
        &self.point_in_time_configuration
    }
    /// Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.
    pub fn state(mut self, input: crate::types::SubscriberState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::SubscriberState>) -> Self {
        self.state = input;
        self
    }
    /// Customer-controlled run state of a subscriber, set on create or update. Distinct from the bus lifecycle vocabulary, where ACTIVE means "provisioned and healthy". Delivery requires State RUNNING on a subscriber that is not revoked.
    pub fn get_state(&self) -> &::std::option::Option<crate::types::SubscriberState> {
        &self.state
    }
    /// The time the subscriber was created.
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// The time the subscriber was created.
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// The time the subscriber was created.
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateSubscriberOutput`](crate::operation::create_subscriber::CreateSubscriberOutput).
    pub fn build(self) -> crate::operation::create_subscriber::CreateSubscriberOutput {
        crate::operation::create_subscriber::CreateSubscriberOutput {
            subscriber_arn: self.subscriber_arn,
            name: self.name,
            event_bus_arn: self.event_bus_arn,
            r#type: self.r#type,
            starting_position: self.starting_position,
            point_in_time_configuration: self.point_in_time_configuration,
            state: self.state,
            creation_time: self.creation_time,
            _request_id: self._request_id,
        }
    }
}