aws-sdk-computeoptimizerautomation 1.3.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 GetAutomationEventOutput {
    /// <p>The ID of the automation event to retrieve.</p>
    pub event_id: ::std::option::Option<::std::string::String>,
    /// <p>A description of the automation event.</p>
    pub event_description: ::std::option::Option<::std::string::String>,
    /// <p>The type of automation event.</p>
    pub event_type: ::std::option::Option<crate::types::EventType>,
    /// <p>The current status of the automation event.</p>
    pub event_status: ::std::option::Option<crate::types::EventStatus>,
    /// <p>The reason for the current event status.</p>
    pub event_status_reason: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the resource affected by the automation event.</p>
    pub resource_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the resource affected by the automation event.</p>
    pub resource_id: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the recommended action associated with this automation event.</p>
    pub recommended_action_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services account ID associated with the automation event.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services Region where the automation event occurred.</p>
    pub region: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the automation rule that triggered this event.</p>
    pub rule_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of resource affected by the automation event.</p>
    pub resource_type: ::std::option::Option<crate::types::ResourceType>,
    /// <p>The timestamp when the automation event was created.</p>
    pub created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The timestamp when the automation event completed.</p>
    pub completed_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>Contains information about estimated monthly cost savings.</p>
    pub estimated_monthly_savings: ::std::option::Option<crate::types::EstimatedMonthlySavings>,
    _request_id: Option<String>,
}
impl GetAutomationEventOutput {
    /// <p>The ID of the automation event to retrieve.</p>
    pub fn event_id(&self) -> ::std::option::Option<&str> {
        self.event_id.as_deref()
    }
    /// <p>A description of the automation event.</p>
    pub fn event_description(&self) -> ::std::option::Option<&str> {
        self.event_description.as_deref()
    }
    /// <p>The type of automation event.</p>
    pub fn event_type(&self) -> ::std::option::Option<&crate::types::EventType> {
        self.event_type.as_ref()
    }
    /// <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()
    }
    /// <p>The reason for the current event status.</p>
    pub fn event_status_reason(&self) -> ::std::option::Option<&str> {
        self.event_status_reason.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the resource affected by the automation event.</p>
    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>The ID of the resource affected by the automation event.</p>
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
        self.resource_id.as_deref()
    }
    /// <p>The ID of the recommended action associated with this automation event.</p>
    pub fn recommended_action_id(&self) -> ::std::option::Option<&str> {
        self.recommended_action_id.as_deref()
    }
    /// <p>The Amazon Web Services account ID associated with the automation event.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The Amazon Web Services Region where the automation event occurred.</p>
    pub fn region(&self) -> ::std::option::Option<&str> {
        self.region.as_deref()
    }
    /// <p>The ID of the automation rule that triggered this event.</p>
    pub fn rule_id(&self) -> ::std::option::Option<&str> {
        self.rule_id.as_deref()
    }
    /// <p>The type of resource affected by the automation event.</p>
    pub fn resource_type(&self) -> ::std::option::Option<&crate::types::ResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The timestamp when the automation event was created.</p>
    pub fn created_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_timestamp.as_ref()
    }
    /// <p>The timestamp when the automation event completed.</p>
    pub fn completed_timestamp(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.completed_timestamp.as_ref()
    }
    /// <p>Contains information about estimated monthly cost savings.</p>
    pub fn estimated_monthly_savings(&self) -> ::std::option::Option<&crate::types::EstimatedMonthlySavings> {
        self.estimated_monthly_savings.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetAutomationEventOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAutomationEventOutput {
    /// Creates a new builder-style object to manufacture [`GetAutomationEventOutput`](crate::operation::get_automation_event::GetAutomationEventOutput).
    pub fn builder() -> crate::operation::get_automation_event::builders::GetAutomationEventOutputBuilder {
        crate::operation::get_automation_event::builders::GetAutomationEventOutputBuilder::default()
    }
}

/// A builder for [`GetAutomationEventOutput`](crate::operation::get_automation_event::GetAutomationEventOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAutomationEventOutputBuilder {
    pub(crate) event_id: ::std::option::Option<::std::string::String>,
    pub(crate) event_description: ::std::option::Option<::std::string::String>,
    pub(crate) event_type: ::std::option::Option<crate::types::EventType>,
    pub(crate) event_status: ::std::option::Option<crate::types::EventStatus>,
    pub(crate) event_status_reason: ::std::option::Option<::std::string::String>,
    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
    pub(crate) recommended_action_id: ::std::option::Option<::std::string::String>,
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) region: ::std::option::Option<::std::string::String>,
    pub(crate) rule_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_type: ::std::option::Option<crate::types::ResourceType>,
    pub(crate) created_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) completed_timestamp: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) estimated_monthly_savings: ::std::option::Option<crate::types::EstimatedMonthlySavings>,
    _request_id: Option<String>,
}
impl GetAutomationEventOutputBuilder {
    /// <p>The ID of the automation event to retrieve.</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 to retrieve.</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 to retrieve.</p>
    pub fn get_event_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_id
    }
    /// <p>A description of the automation event.</p>
    pub fn event_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A description of the automation event.</p>
    pub fn set_event_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_description = input;
        self
    }
    /// <p>A description of the automation event.</p>
    pub fn get_event_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_description
    }
    /// <p>The type of automation event.</p>
    pub fn event_type(mut self, input: crate::types::EventType) -> Self {
        self.event_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of automation event.</p>
    pub fn set_event_type(mut self, input: ::std::option::Option<crate::types::EventType>) -> Self {
        self.event_type = input;
        self
    }
    /// <p>The type of automation event.</p>
    pub fn get_event_type(&self) -> &::std::option::Option<crate::types::EventType> {
        &self.event_type
    }
    /// <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
    }
    /// <p>The reason for the current event status.</p>
    pub fn event_status_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.event_status_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason for the current event status.</p>
    pub fn set_event_status_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.event_status_reason = input;
        self
    }
    /// <p>The reason for the current event status.</p>
    pub fn get_event_status_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.event_status_reason
    }
    /// <p>The Amazon Resource Name (ARN) of the resource affected by the automation event.</p>
    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the resource affected by the automation event.</p>
    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the resource affected by the automation event.</p>
    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_arn
    }
    /// <p>The ID of the resource affected by the automation event.</p>
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the resource affected by the automation event.</p>
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_id = input;
        self
    }
    /// <p>The ID of the resource affected by the automation event.</p>
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_id
    }
    /// <p>The ID of the recommended action associated with this automation event.</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 associated with this automation event.</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 associated with this automation event.</p>
    pub fn get_recommended_action_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommended_action_id
    }
    /// <p>The Amazon Web Services account ID associated with the automation event.</p>
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID associated with the automation event.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID associated with the automation event.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The Amazon Web Services Region where the automation event occurred.</p>
    pub fn region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Region where the automation event occurred.</p>
    pub fn set_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.region = input;
        self
    }
    /// <p>The Amazon Web Services Region where the automation event occurred.</p>
    pub fn get_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.region
    }
    /// <p>The ID of the automation rule that triggered this event.</p>
    pub fn rule_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rule_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the automation rule that triggered this event.</p>
    pub fn set_rule_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rule_id = input;
        self
    }
    /// <p>The ID of the automation rule that triggered this event.</p>
    pub fn get_rule_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.rule_id
    }
    /// <p>The type of resource affected by the automation event.</p>
    pub fn resource_type(mut self, input: crate::types::ResourceType) -> Self {
        self.resource_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of resource affected by the automation event.</p>
    pub fn set_resource_type(mut self, input: ::std::option::Option<crate::types::ResourceType>) -> Self {
        self.resource_type = input;
        self
    }
    /// <p>The type of resource affected by the automation event.</p>
    pub fn get_resource_type(&self) -> &::std::option::Option<crate::types::ResourceType> {
        &self.resource_type
    }
    /// <p>The timestamp when the automation event was created.</p>
    pub fn created_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the automation event was created.</p>
    pub fn set_created_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_timestamp = input;
        self
    }
    /// <p>The timestamp when the automation event was created.</p>
    pub fn get_created_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_timestamp
    }
    /// <p>The timestamp when the automation event completed.</p>
    pub fn completed_timestamp(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.completed_timestamp = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp when the automation event completed.</p>
    pub fn set_completed_timestamp(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.completed_timestamp = input;
        self
    }
    /// <p>The timestamp when the automation event completed.</p>
    pub fn get_completed_timestamp(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.completed_timestamp
    }
    /// <p>Contains information about estimated monthly cost savings.</p>
    pub fn estimated_monthly_savings(mut self, input: crate::types::EstimatedMonthlySavings) -> Self {
        self.estimated_monthly_savings = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains information about estimated monthly cost savings.</p>
    pub fn set_estimated_monthly_savings(mut self, input: ::std::option::Option<crate::types::EstimatedMonthlySavings>) -> Self {
        self.estimated_monthly_savings = input;
        self
    }
    /// <p>Contains information about estimated monthly cost savings.</p>
    pub fn get_estimated_monthly_savings(&self) -> &::std::option::Option<crate::types::EstimatedMonthlySavings> {
        &self.estimated_monthly_savings
    }
    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 [`GetAutomationEventOutput`](crate::operation::get_automation_event::GetAutomationEventOutput).
    pub fn build(self) -> crate::operation::get_automation_event::GetAutomationEventOutput {
        crate::operation::get_automation_event::GetAutomationEventOutput {
            event_id: self.event_id,
            event_description: self.event_description,
            event_type: self.event_type,
            event_status: self.event_status,
            event_status_reason: self.event_status_reason,
            resource_arn: self.resource_arn,
            resource_id: self.resource_id,
            recommended_action_id: self.recommended_action_id,
            account_id: self.account_id,
            region: self.region,
            rule_id: self.rule_id,
            resource_type: self.resource_type,
            created_timestamp: self.created_timestamp,
            completed_timestamp: self.completed_timestamp,
            estimated_monthly_savings: self.estimated_monthly_savings,
            _request_id: self._request_id,
        }
    }
}