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 StartExecutionPreviewInput {
    /// <p>The name of the Automation runbook to run. The result of the execution preview indicates what the impact would be of running this runbook.</p>
    pub document_name: ::std::option::Option<::std::string::String>,
    /// <p>The version of the Automation runbook to run. The default value is <code>$DEFAULT</code>.</p>
    pub document_version: ::std::option::Option<::std::string::String>,
    /// <p>Information about the inputs that can be specified for the preview operation.</p>
    pub execution_inputs: ::std::option::Option<crate::types::ExecutionInputs>,
}
impl StartExecutionPreviewInput {
    /// <p>The name of the Automation runbook to run. The result of the execution preview indicates what the impact would be of running this runbook.</p>
    pub fn document_name(&self) -> ::std::option::Option<&str> {
        self.document_name.as_deref()
    }
    /// <p>The version of the Automation runbook to run. The default value is <code>$DEFAULT</code>.</p>
    pub fn document_version(&self) -> ::std::option::Option<&str> {
        self.document_version.as_deref()
    }
    /// <p>Information about the inputs that can be specified for the preview operation.</p>
    pub fn execution_inputs(&self) -> ::std::option::Option<&crate::types::ExecutionInputs> {
        self.execution_inputs.as_ref()
    }
}
impl StartExecutionPreviewInput {
    /// Creates a new builder-style object to manufacture [`StartExecutionPreviewInput`](crate::operation::start_execution_preview::StartExecutionPreviewInput).
    pub fn builder() -> crate::operation::start_execution_preview::builders::StartExecutionPreviewInputBuilder {
        crate::operation::start_execution_preview::builders::StartExecutionPreviewInputBuilder::default()
    }
}

/// A builder for [`StartExecutionPreviewInput`](crate::operation::start_execution_preview::StartExecutionPreviewInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct StartExecutionPreviewInputBuilder {
    pub(crate) document_name: ::std::option::Option<::std::string::String>,
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
    pub(crate) execution_inputs: ::std::option::Option<crate::types::ExecutionInputs>,
}
impl StartExecutionPreviewInputBuilder {
    /// <p>The name of the Automation runbook to run. The result of the execution preview indicates what the impact would be of running this runbook.</p>
    /// This field is required.
    pub fn document_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.document_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Automation runbook to run. The result of the execution preview indicates what the impact would be of running this runbook.</p>
    pub fn set_document_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.document_name = input;
        self
    }
    /// <p>The name of the Automation runbook to run. The result of the execution preview indicates what the impact would be of running this runbook.</p>
    pub fn get_document_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.document_name
    }
    /// <p>The version of the Automation runbook to run. The default value is <code>$DEFAULT</code>.</p>
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.document_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of the Automation runbook to run. The default value is <code>$DEFAULT</code>.</p>
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.document_version = input;
        self
    }
    /// <p>The version of the Automation runbook to run. The default value is <code>$DEFAULT</code>.</p>
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.document_version
    }
    /// <p>Information about the inputs that can be specified for the preview operation.</p>
    pub fn execution_inputs(mut self, input: crate::types::ExecutionInputs) -> Self {
        self.execution_inputs = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the inputs that can be specified for the preview operation.</p>
    pub fn set_execution_inputs(mut self, input: ::std::option::Option<crate::types::ExecutionInputs>) -> Self {
        self.execution_inputs = input;
        self
    }
    /// <p>Information about the inputs that can be specified for the preview operation.</p>
    pub fn get_execution_inputs(&self) -> &::std::option::Option<crate::types::ExecutionInputs> {
        &self.execution_inputs
    }
    /// Consumes the builder and constructs a [`StartExecutionPreviewInput`](crate::operation::start_execution_preview::StartExecutionPreviewInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::start_execution_preview::StartExecutionPreviewInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::start_execution_preview::StartExecutionPreviewInput {
            document_name: self.document_name,
            document_version: self.document_version,
            execution_inputs: self.execution_inputs,
        })
    }
}