aws-sdk-databasemigration 1.112.0

AWS SDK for AWS Database 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 DescribeMetadataModelInput {
    /// <p>The JSON string that specifies which metadata model to retrieve. Only one selection rule with "rule-action": "explicit" can be provided. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Selections.html">Selection Rules</a> in the DMS User Guide.</p>
    pub selection_rules: ::std::option::Option<::std::string::String>,
    /// <p>The migration project name or Amazon Resource Name (ARN).</p>
    pub migration_project_identifier: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether to retrieve metadata from the source or target tree. Valid values: SOURCE | TARGET</p>
    pub origin: ::std::option::Option<crate::types::OriginTypeValue>,
}
impl DescribeMetadataModelInput {
    /// <p>The JSON string that specifies which metadata model to retrieve. Only one selection rule with "rule-action": "explicit" can be provided. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Selections.html">Selection Rules</a> in the DMS User Guide.</p>
    pub fn selection_rules(&self) -> ::std::option::Option<&str> {
        self.selection_rules.as_deref()
    }
    /// <p>The migration project name or Amazon Resource Name (ARN).</p>
    pub fn migration_project_identifier(&self) -> ::std::option::Option<&str> {
        self.migration_project_identifier.as_deref()
    }
    /// <p>Specifies whether to retrieve metadata from the source or target tree. Valid values: SOURCE | TARGET</p>
    pub fn origin(&self) -> ::std::option::Option<&crate::types::OriginTypeValue> {
        self.origin.as_ref()
    }
}
impl DescribeMetadataModelInput {
    /// Creates a new builder-style object to manufacture [`DescribeMetadataModelInput`](crate::operation::describe_metadata_model::DescribeMetadataModelInput).
    pub fn builder() -> crate::operation::describe_metadata_model::builders::DescribeMetadataModelInputBuilder {
        crate::operation::describe_metadata_model::builders::DescribeMetadataModelInputBuilder::default()
    }
}

/// A builder for [`DescribeMetadataModelInput`](crate::operation::describe_metadata_model::DescribeMetadataModelInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeMetadataModelInputBuilder {
    pub(crate) selection_rules: ::std::option::Option<::std::string::String>,
    pub(crate) migration_project_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) origin: ::std::option::Option<crate::types::OriginTypeValue>,
}
impl DescribeMetadataModelInputBuilder {
    /// <p>The JSON string that specifies which metadata model to retrieve. Only one selection rule with "rule-action": "explicit" can be provided. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Selections.html">Selection Rules</a> in the DMS User Guide.</p>
    /// This field is required.
    pub fn selection_rules(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.selection_rules = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The JSON string that specifies which metadata model to retrieve. Only one selection rule with "rule-action": "explicit" can be provided. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Selections.html">Selection Rules</a> in the DMS User Guide.</p>
    pub fn set_selection_rules(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.selection_rules = input;
        self
    }
    /// <p>The JSON string that specifies which metadata model to retrieve. Only one selection rule with "rule-action": "explicit" can be provided. For more information, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation.Selections.html">Selection Rules</a> in the DMS User Guide.</p>
    pub fn get_selection_rules(&self) -> &::std::option::Option<::std::string::String> {
        &self.selection_rules
    }
    /// <p>The migration project name or Amazon Resource Name (ARN).</p>
    /// This field is required.
    pub fn migration_project_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.migration_project_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The migration project name or Amazon Resource Name (ARN).</p>
    pub fn set_migration_project_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.migration_project_identifier = input;
        self
    }
    /// <p>The migration project name or Amazon Resource Name (ARN).</p>
    pub fn get_migration_project_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.migration_project_identifier
    }
    /// <p>Specifies whether to retrieve metadata from the source or target tree. Valid values: SOURCE | TARGET</p>
    /// This field is required.
    pub fn origin(mut self, input: crate::types::OriginTypeValue) -> Self {
        self.origin = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether to retrieve metadata from the source or target tree. Valid values: SOURCE | TARGET</p>
    pub fn set_origin(mut self, input: ::std::option::Option<crate::types::OriginTypeValue>) -> Self {
        self.origin = input;
        self
    }
    /// <p>Specifies whether to retrieve metadata from the source or target tree. Valid values: SOURCE | TARGET</p>
    pub fn get_origin(&self) -> &::std::option::Option<crate::types::OriginTypeValue> {
        &self.origin
    }
    /// Consumes the builder and constructs a [`DescribeMetadataModelInput`](crate::operation::describe_metadata_model::DescribeMetadataModelInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_metadata_model::DescribeMetadataModelInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::describe_metadata_model::DescribeMetadataModelInput {
            selection_rules: self.selection_rules,
            migration_project_identifier: self.migration_project_identifier,
            origin: self.origin,
        })
    }
}