aws-sdk-mgn 1.102.0

AWS SDK for Application Migration Service
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 PutTemplateActionInput {
    /// <p>Launch configuration template ID.</p>
    pub launch_configuration_template_id: ::std::option::Option<::std::string::String>,
    /// <p>Template post migration custom action name.</p>
    pub action_name: ::std::option::Option<::std::string::String>,
    /// <p>Template post migration custom action document identifier.</p>
    pub document_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Template post migration custom action order.</p>
    pub order: ::std::option::Option<i32>,
    /// <p>Template post migration custom action ID.</p>
    pub action_id: ::std::option::Option<::std::string::String>,
    /// <p>Template post migration custom action document version.</p>
    pub document_version: ::std::option::Option<::std::string::String>,
    /// <p>Template post migration custom action active status.</p>
    pub active: ::std::option::Option<bool>,
    /// <p>Template post migration custom action timeout in seconds.</p>
    pub timeout_seconds: ::std::option::Option<i32>,
    /// <p>Template post migration custom action must succeed for cutover.</p>
    pub must_succeed_for_cutover: ::std::option::Option<bool>,
    /// <p>Template post migration custom action parameters.</p>
    pub parameters:
        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::SsmParameterStoreParameter>>>,
    /// <p>Operating system eligible for this template post migration custom action.</p>
    pub operating_system: ::std::option::Option<::std::string::String>,
    /// <p>Template post migration custom action external parameters.</p>
    pub external_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SsmExternalParameter>>,
    /// <p>Template post migration custom action description.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>Template post migration custom action category.</p>
    pub category: ::std::option::Option<crate::types::ActionCategory>,
}
impl PutTemplateActionInput {
    /// <p>Launch configuration template ID.</p>
    pub fn launch_configuration_template_id(&self) -> ::std::option::Option<&str> {
        self.launch_configuration_template_id.as_deref()
    }
    /// <p>Template post migration custom action name.</p>
    pub fn action_name(&self) -> ::std::option::Option<&str> {
        self.action_name.as_deref()
    }
    /// <p>Template post migration custom action document identifier.</p>
    pub fn document_identifier(&self) -> ::std::option::Option<&str> {
        self.document_identifier.as_deref()
    }
    /// <p>Template post migration custom action order.</p>
    pub fn order(&self) -> ::std::option::Option<i32> {
        self.order
    }
    /// <p>Template post migration custom action ID.</p>
    pub fn action_id(&self) -> ::std::option::Option<&str> {
        self.action_id.as_deref()
    }
    /// <p>Template post migration custom action document version.</p>
    pub fn document_version(&self) -> ::std::option::Option<&str> {
        self.document_version.as_deref()
    }
    /// <p>Template post migration custom action active status.</p>
    pub fn active(&self) -> ::std::option::Option<bool> {
        self.active
    }
    /// <p>Template post migration custom action timeout in seconds.</p>
    pub fn timeout_seconds(&self) -> ::std::option::Option<i32> {
        self.timeout_seconds
    }
    /// <p>Template post migration custom action must succeed for cutover.</p>
    pub fn must_succeed_for_cutover(&self) -> ::std::option::Option<bool> {
        self.must_succeed_for_cutover
    }
    /// <p>Template post migration custom action parameters.</p>
    pub fn parameters(
        &self,
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::SsmParameterStoreParameter>>> {
        self.parameters.as_ref()
    }
    /// <p>Operating system eligible for this template post migration custom action.</p>
    pub fn operating_system(&self) -> ::std::option::Option<&str> {
        self.operating_system.as_deref()
    }
    /// <p>Template post migration custom action external parameters.</p>
    pub fn external_parameters(
        &self,
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::SsmExternalParameter>> {
        self.external_parameters.as_ref()
    }
    /// <p>Template post migration custom action description.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>Template post migration custom action category.</p>
    pub fn category(&self) -> ::std::option::Option<&crate::types::ActionCategory> {
        self.category.as_ref()
    }
}
impl PutTemplateActionInput {
    /// Creates a new builder-style object to manufacture [`PutTemplateActionInput`](crate::operation::put_template_action::PutTemplateActionInput).
    pub fn builder() -> crate::operation::put_template_action::builders::PutTemplateActionInputBuilder {
        crate::operation::put_template_action::builders::PutTemplateActionInputBuilder::default()
    }
}

/// A builder for [`PutTemplateActionInput`](crate::operation::put_template_action::PutTemplateActionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutTemplateActionInputBuilder {
    pub(crate) launch_configuration_template_id: ::std::option::Option<::std::string::String>,
    pub(crate) action_name: ::std::option::Option<::std::string::String>,
    pub(crate) document_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) order: ::std::option::Option<i32>,
    pub(crate) action_id: ::std::option::Option<::std::string::String>,
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
    pub(crate) active: ::std::option::Option<bool>,
    pub(crate) timeout_seconds: ::std::option::Option<i32>,
    pub(crate) must_succeed_for_cutover: ::std::option::Option<bool>,
    pub(crate) parameters:
        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::SsmParameterStoreParameter>>>,
    pub(crate) operating_system: ::std::option::Option<::std::string::String>,
    pub(crate) external_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SsmExternalParameter>>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) category: ::std::option::Option<crate::types::ActionCategory>,
}
impl PutTemplateActionInputBuilder {
    /// <p>Launch configuration template ID.</p>
    /// This field is required.
    pub fn launch_configuration_template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.launch_configuration_template_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Launch configuration template ID.</p>
    pub fn set_launch_configuration_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.launch_configuration_template_id = input;
        self
    }
    /// <p>Launch configuration template ID.</p>
    pub fn get_launch_configuration_template_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.launch_configuration_template_id
    }
    /// <p>Template post migration custom action name.</p>
    /// This field is required.
    pub fn action_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.action_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Template post migration custom action name.</p>
    pub fn set_action_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.action_name = input;
        self
    }
    /// <p>Template post migration custom action name.</p>
    pub fn get_action_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.action_name
    }
    /// <p>Template post migration custom action document identifier.</p>
    /// This field is required.
    pub fn document_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.document_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Template post migration custom action document identifier.</p>
    pub fn set_document_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.document_identifier = input;
        self
    }
    /// <p>Template post migration custom action document identifier.</p>
    pub fn get_document_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.document_identifier
    }
    /// <p>Template post migration custom action order.</p>
    /// This field is required.
    pub fn order(mut self, input: i32) -> Self {
        self.order = ::std::option::Option::Some(input);
        self
    }
    /// <p>Template post migration custom action order.</p>
    pub fn set_order(mut self, input: ::std::option::Option<i32>) -> Self {
        self.order = input;
        self
    }
    /// <p>Template post migration custom action order.</p>
    pub fn get_order(&self) -> &::std::option::Option<i32> {
        &self.order
    }
    /// <p>Template post migration custom action ID.</p>
    /// This field is required.
    pub fn action_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.action_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Template post migration custom action ID.</p>
    pub fn set_action_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.action_id = input;
        self
    }
    /// <p>Template post migration custom action ID.</p>
    pub fn get_action_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.action_id
    }
    /// <p>Template post migration custom action document version.</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>Template post migration custom action document version.</p>
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.document_version = input;
        self
    }
    /// <p>Template post migration custom action document version.</p>
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.document_version
    }
    /// <p>Template post migration custom action active status.</p>
    pub fn active(mut self, input: bool) -> Self {
        self.active = ::std::option::Option::Some(input);
        self
    }
    /// <p>Template post migration custom action active status.</p>
    pub fn set_active(mut self, input: ::std::option::Option<bool>) -> Self {
        self.active = input;
        self
    }
    /// <p>Template post migration custom action active status.</p>
    pub fn get_active(&self) -> &::std::option::Option<bool> {
        &self.active
    }
    /// <p>Template post migration custom action timeout in seconds.</p>
    pub fn timeout_seconds(mut self, input: i32) -> Self {
        self.timeout_seconds = ::std::option::Option::Some(input);
        self
    }
    /// <p>Template post migration custom action timeout in seconds.</p>
    pub fn set_timeout_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
        self.timeout_seconds = input;
        self
    }
    /// <p>Template post migration custom action timeout in seconds.</p>
    pub fn get_timeout_seconds(&self) -> &::std::option::Option<i32> {
        &self.timeout_seconds
    }
    /// <p>Template post migration custom action must succeed for cutover.</p>
    pub fn must_succeed_for_cutover(mut self, input: bool) -> Self {
        self.must_succeed_for_cutover = ::std::option::Option::Some(input);
        self
    }
    /// <p>Template post migration custom action must succeed for cutover.</p>
    pub fn set_must_succeed_for_cutover(mut self, input: ::std::option::Option<bool>) -> Self {
        self.must_succeed_for_cutover = input;
        self
    }
    /// <p>Template post migration custom action must succeed for cutover.</p>
    pub fn get_must_succeed_for_cutover(&self) -> &::std::option::Option<bool> {
        &self.must_succeed_for_cutover
    }
    /// Adds a key-value pair to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>Template post migration custom action parameters.</p>
    pub fn parameters(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: ::std::vec::Vec<crate::types::SsmParameterStoreParameter>,
    ) -> Self {
        let mut hash_map = self.parameters.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Template post migration custom action parameters.</p>
    pub fn set_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::SsmParameterStoreParameter>>>,
    ) -> Self {
        self.parameters = input;
        self
    }
    /// <p>Template post migration custom action parameters.</p>
    pub fn get_parameters(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::SsmParameterStoreParameter>>> {
        &self.parameters
    }
    /// <p>Operating system eligible for this template post migration custom action.</p>
    pub fn operating_system(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.operating_system = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Operating system eligible for this template post migration custom action.</p>
    pub fn set_operating_system(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.operating_system = input;
        self
    }
    /// <p>Operating system eligible for this template post migration custom action.</p>
    pub fn get_operating_system(&self) -> &::std::option::Option<::std::string::String> {
        &self.operating_system
    }
    /// Adds a key-value pair to `external_parameters`.
    ///
    /// To override the contents of this collection use [`set_external_parameters`](Self::set_external_parameters).
    ///
    /// <p>Template post migration custom action external parameters.</p>
    pub fn external_parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::SsmExternalParameter) -> Self {
        let mut hash_map = self.external_parameters.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.external_parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Template post migration custom action external parameters.</p>
    pub fn set_external_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SsmExternalParameter>>,
    ) -> Self {
        self.external_parameters = input;
        self
    }
    /// <p>Template post migration custom action external parameters.</p>
    pub fn get_external_parameters(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::SsmExternalParameter>> {
        &self.external_parameters
    }
    /// <p>Template post migration custom action description.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Template post migration custom action description.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>Template post migration custom action description.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>Template post migration custom action category.</p>
    pub fn category(mut self, input: crate::types::ActionCategory) -> Self {
        self.category = ::std::option::Option::Some(input);
        self
    }
    /// <p>Template post migration custom action category.</p>
    pub fn set_category(mut self, input: ::std::option::Option<crate::types::ActionCategory>) -> Self {
        self.category = input;
        self
    }
    /// <p>Template post migration custom action category.</p>
    pub fn get_category(&self) -> &::std::option::Option<crate::types::ActionCategory> {
        &self.category
    }
    /// Consumes the builder and constructs a [`PutTemplateActionInput`](crate::operation::put_template_action::PutTemplateActionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::put_template_action::PutTemplateActionInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::put_template_action::PutTemplateActionInput {
            launch_configuration_template_id: self.launch_configuration_template_id,
            action_name: self.action_name,
            document_identifier: self.document_identifier,
            order: self.order,
            action_id: self.action_id,
            document_version: self.document_version,
            active: self.active,
            timeout_seconds: self.timeout_seconds,
            must_succeed_for_cutover: self.must_succeed_for_cutover,
            parameters: self.parameters,
            operating_system: self.operating_system,
            external_parameters: self.external_parameters,
            description: self.description,
            category: self.category,
        })
    }
}