aws-sdk-ssm 1.112.0

AWS SDK for Amazon Simple Systems Manager (SSM)
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 GetExecutionPreviewOutput {
    /// <p>The generated ID for the existing execution preview.</p>
    pub execution_preview_id: ::std::option::Option<::std::string::String>,
    /// <p>A UTC timestamp indicating when the execution preview operation ended.</p>
    pub ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The current status of the execution preview operation.</p>
    pub status: ::std::option::Option<crate::types::ExecutionPreviewStatus>,
    /// <p>Supplemental information about the current status of the execution preview.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>Information about the changes that would be made if an execution were run.</p>
    pub execution_preview: ::std::option::Option<crate::types::ExecutionPreview>,
    _request_id: Option<String>,
}
impl GetExecutionPreviewOutput {
    /// <p>The generated ID for the existing execution preview.</p>
    pub fn execution_preview_id(&self) -> ::std::option::Option<&str> {
        self.execution_preview_id.as_deref()
    }
    /// <p>A UTC timestamp indicating when the execution preview operation ended.</p>
    pub fn ended_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.ended_at.as_ref()
    }
    /// <p>The current status of the execution preview operation.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ExecutionPreviewStatus> {
        self.status.as_ref()
    }
    /// <p>Supplemental information about the current status of the execution preview.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>Information about the changes that would be made if an execution were run.</p>
    pub fn execution_preview(&self) -> ::std::option::Option<&crate::types::ExecutionPreview> {
        self.execution_preview.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetExecutionPreviewOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetExecutionPreviewOutput {
    /// Creates a new builder-style object to manufacture [`GetExecutionPreviewOutput`](crate::operation::get_execution_preview::GetExecutionPreviewOutput).
    pub fn builder() -> crate::operation::get_execution_preview::builders::GetExecutionPreviewOutputBuilder {
        crate::operation::get_execution_preview::builders::GetExecutionPreviewOutputBuilder::default()
    }
}

/// A builder for [`GetExecutionPreviewOutput`](crate::operation::get_execution_preview::GetExecutionPreviewOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetExecutionPreviewOutputBuilder {
    pub(crate) execution_preview_id: ::std::option::Option<::std::string::String>,
    pub(crate) ended_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) status: ::std::option::Option<crate::types::ExecutionPreviewStatus>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) execution_preview: ::std::option::Option<crate::types::ExecutionPreview>,
    _request_id: Option<String>,
}
impl GetExecutionPreviewOutputBuilder {
    /// <p>The generated ID for the existing execution preview.</p>
    pub fn execution_preview_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.execution_preview_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The generated ID for the existing execution preview.</p>
    pub fn set_execution_preview_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.execution_preview_id = input;
        self
    }
    /// <p>The generated ID for the existing execution preview.</p>
    pub fn get_execution_preview_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.execution_preview_id
    }
    /// <p>A UTC timestamp indicating when the execution preview operation ended.</p>
    pub fn ended_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.ended_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>A UTC timestamp indicating when the execution preview operation ended.</p>
    pub fn set_ended_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.ended_at = input;
        self
    }
    /// <p>A UTC timestamp indicating when the execution preview operation ended.</p>
    pub fn get_ended_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.ended_at
    }
    /// <p>The current status of the execution preview operation.</p>
    pub fn status(mut self, input: crate::types::ExecutionPreviewStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status of the execution preview operation.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ExecutionPreviewStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status of the execution preview operation.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ExecutionPreviewStatus> {
        &self.status
    }
    /// <p>Supplemental information about the current status of the execution preview.</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Supplemental information about the current status of the execution preview.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>Supplemental information about the current status of the execution preview.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>Information about the changes that would be made if an execution were run.</p>
    pub fn execution_preview(mut self, input: crate::types::ExecutionPreview) -> Self {
        self.execution_preview = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the changes that would be made if an execution were run.</p>
    pub fn set_execution_preview(mut self, input: ::std::option::Option<crate::types::ExecutionPreview>) -> Self {
        self.execution_preview = input;
        self
    }
    /// <p>Information about the changes that would be made if an execution were run.</p>
    pub fn get_execution_preview(&self) -> &::std::option::Option<crate::types::ExecutionPreview> {
        &self.execution_preview
    }
    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 [`GetExecutionPreviewOutput`](crate::operation::get_execution_preview::GetExecutionPreviewOutput).
    pub fn build(self) -> crate::operation::get_execution_preview::GetExecutionPreviewOutput {
        crate::operation::get_execution_preview::GetExecutionPreviewOutput {
            execution_preview_id: self.execution_preview_id,
            ended_at: self.ended_at,
            status: self.status,
            status_message: self.status_message,
            execution_preview: self.execution_preview,
            _request_id: self._request_id,
        }
    }
}