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 DescribeMetadataModelOutput {
    /// <p>The name of the metadata model.</p>
    pub metadata_model_name: ::std::option::Option<::std::string::String>,
    /// <p>The type of the metadata model.</p>
    pub metadata_model_type: ::std::option::Option<::std::string::String>,
    /// <p>A list of counterpart metadata models in the target. This field is populated only when Origin is SOURCE and after the object has been converted by DMS Schema Conversion.</p>
    pub target_metadata_models: ::std::option::Option<::std::vec::Vec<crate::types::MetadataModelReference>>,
    /// <p>The SQL text of the metadata model. This field might not be populated for some metadata models.</p>
    pub definition: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeMetadataModelOutput {
    /// <p>The name of the metadata model.</p>
    pub fn metadata_model_name(&self) -> ::std::option::Option<&str> {
        self.metadata_model_name.as_deref()
    }
    /// <p>The type of the metadata model.</p>
    pub fn metadata_model_type(&self) -> ::std::option::Option<&str> {
        self.metadata_model_type.as_deref()
    }
    /// <p>A list of counterpart metadata models in the target. This field is populated only when Origin is SOURCE and after the object has been converted by DMS Schema Conversion.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_metadata_models.is_none()`.
    pub fn target_metadata_models(&self) -> &[crate::types::MetadataModelReference] {
        self.target_metadata_models.as_deref().unwrap_or_default()
    }
    /// <p>The SQL text of the metadata model. This field might not be populated for some metadata models.</p>
    pub fn definition(&self) -> ::std::option::Option<&str> {
        self.definition.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for DescribeMetadataModelOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeMetadataModelOutput {
    /// Creates a new builder-style object to manufacture [`DescribeMetadataModelOutput`](crate::operation::describe_metadata_model::DescribeMetadataModelOutput).
    pub fn builder() -> crate::operation::describe_metadata_model::builders::DescribeMetadataModelOutputBuilder {
        crate::operation::describe_metadata_model::builders::DescribeMetadataModelOutputBuilder::default()
    }
}

/// A builder for [`DescribeMetadataModelOutput`](crate::operation::describe_metadata_model::DescribeMetadataModelOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeMetadataModelOutputBuilder {
    pub(crate) metadata_model_name: ::std::option::Option<::std::string::String>,
    pub(crate) metadata_model_type: ::std::option::Option<::std::string::String>,
    pub(crate) target_metadata_models: ::std::option::Option<::std::vec::Vec<crate::types::MetadataModelReference>>,
    pub(crate) definition: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl DescribeMetadataModelOutputBuilder {
    /// <p>The name of the metadata model.</p>
    pub fn metadata_model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.metadata_model_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the metadata model.</p>
    pub fn set_metadata_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.metadata_model_name = input;
        self
    }
    /// <p>The name of the metadata model.</p>
    pub fn get_metadata_model_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.metadata_model_name
    }
    /// <p>The type of the metadata model.</p>
    pub fn metadata_model_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.metadata_model_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of the metadata model.</p>
    pub fn set_metadata_model_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.metadata_model_type = input;
        self
    }
    /// <p>The type of the metadata model.</p>
    pub fn get_metadata_model_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.metadata_model_type
    }
    /// Appends an item to `target_metadata_models`.
    ///
    /// To override the contents of this collection use [`set_target_metadata_models`](Self::set_target_metadata_models).
    ///
    /// <p>A list of counterpart metadata models in the target. This field is populated only when Origin is SOURCE and after the object has been converted by DMS Schema Conversion.</p>
    pub fn target_metadata_models(mut self, input: crate::types::MetadataModelReference) -> Self {
        let mut v = self.target_metadata_models.unwrap_or_default();
        v.push(input);
        self.target_metadata_models = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of counterpart metadata models in the target. This field is populated only when Origin is SOURCE and after the object has been converted by DMS Schema Conversion.</p>
    pub fn set_target_metadata_models(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::MetadataModelReference>>) -> Self {
        self.target_metadata_models = input;
        self
    }
    /// <p>A list of counterpart metadata models in the target. This field is populated only when Origin is SOURCE and after the object has been converted by DMS Schema Conversion.</p>
    pub fn get_target_metadata_models(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::MetadataModelReference>> {
        &self.target_metadata_models
    }
    /// <p>The SQL text of the metadata model. This field might not be populated for some metadata models.</p>
    pub fn definition(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.definition = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The SQL text of the metadata model. This field might not be populated for some metadata models.</p>
    pub fn set_definition(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.definition = input;
        self
    }
    /// <p>The SQL text of the metadata model. This field might not be populated for some metadata models.</p>
    pub fn get_definition(&self) -> &::std::option::Option<::std::string::String> {
        &self.definition
    }
    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 [`DescribeMetadataModelOutput`](crate::operation::describe_metadata_model::DescribeMetadataModelOutput).
    pub fn build(self) -> crate::operation::describe_metadata_model::DescribeMetadataModelOutput {
        crate::operation::describe_metadata_model::DescribeMetadataModelOutput {
            metadata_model_name: self.metadata_model_name,
            metadata_model_type: self.metadata_model_type,
            target_metadata_models: self.target_metadata_models,
            definition: self.definition,
            _request_id: self._request_id,
        }
    }
}