aws-sdk-computeoptimizerautomation 1.9.0

AWS SDK for Compute Optimizer Automation
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 StartAutomationEventOutput {
    /// <p>The ID of the recommended action being automated.</p>
    pub recommended_action_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the automation event.</p>
    pub event_id: ::std::option::Option<::std::string::String>,
    /// <p>The current status of the automation event.</p>
    pub event_status: ::std::option::Option<crate::types::EventStatus>,
    _request_id: Option<String>,
}
impl StartAutomationEventOutput {
    /// <p>The ID of the recommended action being automated.</p>
    pub fn recommended_action_id(&self) -> ::std::option::Option<&str> {
        self.recommended_action_id.as_deref()
    }
    /// <p>The ID of the automation event.</p>
    pub fn event_id(&self) -> ::std::option::Option<&str> {
        self.event_id.as_deref()
    }
    /// <p>The current status of the automation event.</p>
    pub fn event_status(&self) -> ::std::option::Option<&crate::types::EventStatus> {
        self.event_status.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for StartAutomationEventOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl StartAutomationEventOutput {
    /// Creates a new builder-style object to manufacture [`StartAutomationEventOutput`](crate::operation::start_automation_event::StartAutomationEventOutput).
    pub fn builder() -> crate::operation::start_automation_event::builders::StartAutomationEventOutputBuilder {
        crate::operation::start_automation_event::builders::StartAutomationEventOutputBuilder::default()
    }
}

/// A builder for [`StartAutomationEventOutput`](crate::operation::start_automation_event::StartAutomationEventOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartAutomationEventOutputBuilder {
    pub(crate) recommended_action_id: ::std::option::Option<::std::string::String>,
    pub(crate) event_id: ::std::option::Option<::std::string::String>,
    pub(crate) event_status: ::std::option::Option<crate::types::EventStatus>,
    _request_id: Option<String>,
}
impl StartAutomationEventOutputBuilder {
    /// <p>The ID of the recommended action being automated.</p>
    pub fn recommended_action_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommended_action_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the recommended action being automated.</p>
    pub fn set_recommended_action_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommended_action_id = input;
        self
    }
    /// <p>The ID of the recommended action being automated.</p>
    pub fn get_recommended_action_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommended_action_id
    }
    /// <p>The ID of the automation event.</p>
    pub fn event_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the automation event.</p>
    pub fn set_event_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_id = input;
        self
    }
    /// <p>The ID of the automation event.</p>
    pub fn get_event_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_id
    }
    /// <p>The current status of the automation event.</p>
    pub fn event_status(mut self, input: crate::types::EventStatus) -> Self {
        self.event_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the automation event.</p>
    pub fn set_event_status(mut self, input: ::std::option::Option<crate::types::EventStatus>) -> Self {
        self.event_status = input;
        self
    }
    /// <p>The current status of the automation event.</p>
    pub fn get_event_status(&self) -> &::std::option::Option<crate::types::EventStatus> {
        &self.event_status
    }
    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 [`StartAutomationEventOutput`](crate::operation::start_automation_event::StartAutomationEventOutput).
    pub fn build(self) -> crate::operation::start_automation_event::StartAutomationEventOutput {
        crate::operation::start_automation_event::StartAutomationEventOutput {
            recommended_action_id: self.recommended_action_id,
            event_id: self.event_id,
            event_status: self.event_status,
            _request_id: self._request_id,
        }
    }
}