aws-sdk-dataexchange 1.102.0

AWS SDK for AWS Data Exchange
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 UpdateEventActionInput {
    /// <p>What occurs after a certain event.</p>
    pub action: ::std::option::Option<crate::types::Action>,
    /// <p>The unique identifier for the event action.</p>
    pub event_action_id: ::std::option::Option<::std::string::String>,
}
impl UpdateEventActionInput {
    /// <p>What occurs after a certain event.</p>
    pub fn action(&self) -> ::std::option::Option<&crate::types::Action> {
        self.action.as_ref()
    }
    /// <p>The unique identifier for the event action.</p>
    pub fn event_action_id(&self) -> ::std::option::Option<&str> {
        self.event_action_id.as_deref()
    }
}
impl UpdateEventActionInput {
    /// Creates a new builder-style object to manufacture [`UpdateEventActionInput`](crate::operation::update_event_action::UpdateEventActionInput).
    pub fn builder() -> crate::operation::update_event_action::builders::UpdateEventActionInputBuilder {
        crate::operation::update_event_action::builders::UpdateEventActionInputBuilder::default()
    }
}

/// A builder for [`UpdateEventActionInput`](crate::operation::update_event_action::UpdateEventActionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateEventActionInputBuilder {
    pub(crate) action: ::std::option::Option<crate::types::Action>,
    pub(crate) event_action_id: ::std::option::Option<::std::string::String>,
}
impl UpdateEventActionInputBuilder {
    /// <p>What occurs after a certain event.</p>
    pub fn action(mut self, input: crate::types::Action) -> Self {
        self.action = ::std::option::Option::Some(input);
        self
    }
    /// <p>What occurs after a certain event.</p>
    pub fn set_action(mut self, input: ::std::option::Option<crate::types::Action>) -> Self {
        self.action = input;
        self
    }
    /// <p>What occurs after a certain event.</p>
    pub fn get_action(&self) -> &::std::option::Option<crate::types::Action> {
        &self.action
    }
    /// <p>The unique identifier for the event action.</p>
    /// This field is required.
    pub fn event_action_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_action_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the event action.</p>
    pub fn set_event_action_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_action_id = input;
        self
    }
    /// <p>The unique identifier for the event action.</p>
    pub fn get_event_action_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_action_id
    }
    /// Consumes the builder and constructs a [`UpdateEventActionInput`](crate::operation::update_event_action::UpdateEventActionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_event_action::UpdateEventActionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_event_action::UpdateEventActionInput {
            action: self.action,
            event_action_id: self.event_action_id,
        })
    }
}