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)]
pub struct ModifyDataMigrationInput {
    /// <p>The identifier (name or ARN) of the data migration to modify.</p>
    pub data_migration_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The new name for the data migration.</p>
    pub data_migration_name: ::std::option::Option<::std::string::String>,
    /// <p>Whether to enable Cloudwatch logs for the data migration.</p>
    pub enable_cloudwatch_logs: ::std::option::Option<bool>,
    /// <p>The new service access role ARN for the data migration.</p>
    pub service_access_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>The new migration type for the data migration.</p>
    pub data_migration_type: ::std::option::Option<crate::types::MigrationTypeValue>,
    /// <p>The new information about the source data provider for the data migration.</p>
    pub source_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>>,
    /// <p>The new information about the target data provider for the data migration.</p>
    pub target_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>>,
    /// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
    pub number_of_jobs: ::std::option::Option<i32>,
    /// <p>A JSON-formatted string that defines what objects to include and exclude from the migration.</p>
    pub selection_rules: ::std::option::Option<::std::string::String>,
}
impl ModifyDataMigrationInput {
    /// <p>The identifier (name or ARN) of the data migration to modify.</p>
    pub fn data_migration_identifier(&self) -> ::std::option::Option<&str> {
        self.data_migration_identifier.as_deref()
    }
    /// <p>The new name for the data migration.</p>
    pub fn data_migration_name(&self) -> ::std::option::Option<&str> {
        self.data_migration_name.as_deref()
    }
    /// <p>Whether to enable Cloudwatch logs for the data migration.</p>
    pub fn enable_cloudwatch_logs(&self) -> ::std::option::Option<bool> {
        self.enable_cloudwatch_logs
    }
    /// <p>The new service access role ARN for the data migration.</p>
    pub fn service_access_role_arn(&self) -> ::std::option::Option<&str> {
        self.service_access_role_arn.as_deref()
    }
    /// <p>The new migration type for the data migration.</p>
    pub fn data_migration_type(&self) -> ::std::option::Option<&crate::types::MigrationTypeValue> {
        self.data_migration_type.as_ref()
    }
    /// <p>The new information about the source data provider for the data migration.</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 `.source_data_settings.is_none()`.
    pub fn source_data_settings(&self) -> &[crate::types::SourceDataSetting] {
        self.source_data_settings.as_deref().unwrap_or_default()
    }
    /// <p>The new information about the target data provider for the data migration.</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_data_settings.is_none()`.
    pub fn target_data_settings(&self) -> &[crate::types::TargetDataSetting] {
        self.target_data_settings.as_deref().unwrap_or_default()
    }
    /// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
    pub fn number_of_jobs(&self) -> ::std::option::Option<i32> {
        self.number_of_jobs
    }
    /// <p>A JSON-formatted string that defines what objects to include and exclude from the migration.</p>
    pub fn selection_rules(&self) -> ::std::option::Option<&str> {
        self.selection_rules.as_deref()
    }
}
impl ::std::fmt::Debug for ModifyDataMigrationInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ModifyDataMigrationInput");
        formatter.field("data_migration_identifier", &self.data_migration_identifier);
        formatter.field("data_migration_name", &self.data_migration_name);
        formatter.field("enable_cloudwatch_logs", &self.enable_cloudwatch_logs);
        formatter.field("service_access_role_arn", &self.service_access_role_arn);
        formatter.field("data_migration_type", &self.data_migration_type);
        formatter.field("source_data_settings", &self.source_data_settings);
        formatter.field("target_data_settings", &self.target_data_settings);
        formatter.field("number_of_jobs", &self.number_of_jobs);
        formatter.field("selection_rules", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl ModifyDataMigrationInput {
    /// Creates a new builder-style object to manufacture [`ModifyDataMigrationInput`](crate::operation::modify_data_migration::ModifyDataMigrationInput).
    pub fn builder() -> crate::operation::modify_data_migration::builders::ModifyDataMigrationInputBuilder {
        crate::operation::modify_data_migration::builders::ModifyDataMigrationInputBuilder::default()
    }
}

/// A builder for [`ModifyDataMigrationInput`](crate::operation::modify_data_migration::ModifyDataMigrationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ModifyDataMigrationInputBuilder {
    pub(crate) data_migration_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) data_migration_name: ::std::option::Option<::std::string::String>,
    pub(crate) enable_cloudwatch_logs: ::std::option::Option<bool>,
    pub(crate) service_access_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) data_migration_type: ::std::option::Option<crate::types::MigrationTypeValue>,
    pub(crate) source_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>>,
    pub(crate) target_data_settings: ::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>>,
    pub(crate) number_of_jobs: ::std::option::Option<i32>,
    pub(crate) selection_rules: ::std::option::Option<::std::string::String>,
}
impl ModifyDataMigrationInputBuilder {
    /// <p>The identifier (name or ARN) of the data migration to modify.</p>
    /// This field is required.
    pub fn data_migration_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_migration_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier (name or ARN) of the data migration to modify.</p>
    pub fn set_data_migration_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_migration_identifier = input;
        self
    }
    /// <p>The identifier (name or ARN) of the data migration to modify.</p>
    pub fn get_data_migration_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_migration_identifier
    }
    /// <p>The new name for the data migration.</p>
    pub fn data_migration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_migration_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new name for the data migration.</p>
    pub fn set_data_migration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_migration_name = input;
        self
    }
    /// <p>The new name for the data migration.</p>
    pub fn get_data_migration_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_migration_name
    }
    /// <p>Whether to enable Cloudwatch logs for the data migration.</p>
    pub fn enable_cloudwatch_logs(mut self, input: bool) -> Self {
        self.enable_cloudwatch_logs = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether to enable Cloudwatch logs for the data migration.</p>
    pub fn set_enable_cloudwatch_logs(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enable_cloudwatch_logs = input;
        self
    }
    /// <p>Whether to enable Cloudwatch logs for the data migration.</p>
    pub fn get_enable_cloudwatch_logs(&self) -> &::std::option::Option<bool> {
        &self.enable_cloudwatch_logs
    }
    /// <p>The new service access role ARN for the data migration.</p>
    pub fn service_access_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_access_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The new service access role ARN for the data migration.</p>
    pub fn set_service_access_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_access_role_arn = input;
        self
    }
    /// <p>The new service access role ARN for the data migration.</p>
    pub fn get_service_access_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_access_role_arn
    }
    /// <p>The new migration type for the data migration.</p>
    pub fn data_migration_type(mut self, input: crate::types::MigrationTypeValue) -> Self {
        self.data_migration_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The new migration type for the data migration.</p>
    pub fn set_data_migration_type(mut self, input: ::std::option::Option<crate::types::MigrationTypeValue>) -> Self {
        self.data_migration_type = input;
        self
    }
    /// <p>The new migration type for the data migration.</p>
    pub fn get_data_migration_type(&self) -> &::std::option::Option<crate::types::MigrationTypeValue> {
        &self.data_migration_type
    }
    /// Appends an item to `source_data_settings`.
    ///
    /// To override the contents of this collection use [`set_source_data_settings`](Self::set_source_data_settings).
    ///
    /// <p>The new information about the source data provider for the data migration.</p>
    pub fn source_data_settings(mut self, input: crate::types::SourceDataSetting) -> Self {
        let mut v = self.source_data_settings.unwrap_or_default();
        v.push(input);
        self.source_data_settings = ::std::option::Option::Some(v);
        self
    }
    /// <p>The new information about the source data provider for the data migration.</p>
    pub fn set_source_data_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>>) -> Self {
        self.source_data_settings = input;
        self
    }
    /// <p>The new information about the source data provider for the data migration.</p>
    pub fn get_source_data_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SourceDataSetting>> {
        &self.source_data_settings
    }
    /// Appends an item to `target_data_settings`.
    ///
    /// To override the contents of this collection use [`set_target_data_settings`](Self::set_target_data_settings).
    ///
    /// <p>The new information about the target data provider for the data migration.</p>
    pub fn target_data_settings(mut self, input: crate::types::TargetDataSetting) -> Self {
        let mut v = self.target_data_settings.unwrap_or_default();
        v.push(input);
        self.target_data_settings = ::std::option::Option::Some(v);
        self
    }
    /// <p>The new information about the target data provider for the data migration.</p>
    pub fn set_target_data_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>>) -> Self {
        self.target_data_settings = input;
        self
    }
    /// <p>The new information about the target data provider for the data migration.</p>
    pub fn get_target_data_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetDataSetting>> {
        &self.target_data_settings
    }
    /// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
    pub fn number_of_jobs(mut self, input: i32) -> Self {
        self.number_of_jobs = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
    pub fn set_number_of_jobs(mut self, input: ::std::option::Option<i32>) -> Self {
        self.number_of_jobs = input;
        self
    }
    /// <p>The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.</p>
    pub fn get_number_of_jobs(&self) -> &::std::option::Option<i32> {
        &self.number_of_jobs
    }
    /// <p>A JSON-formatted string that defines what objects to include and exclude from the migration.</p>
    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>A JSON-formatted string that defines what objects to include and exclude from the migration.</p>
    pub fn set_selection_rules(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.selection_rules = input;
        self
    }
    /// <p>A JSON-formatted string that defines what objects to include and exclude from the migration.</p>
    pub fn get_selection_rules(&self) -> &::std::option::Option<::std::string::String> {
        &self.selection_rules
    }
    /// Consumes the builder and constructs a [`ModifyDataMigrationInput`](crate::operation::modify_data_migration::ModifyDataMigrationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::modify_data_migration::ModifyDataMigrationInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::modify_data_migration::ModifyDataMigrationInput {
            data_migration_identifier: self.data_migration_identifier,
            data_migration_name: self.data_migration_name,
            enable_cloudwatch_logs: self.enable_cloudwatch_logs,
            service_access_role_arn: self.service_access_role_arn,
            data_migration_type: self.data_migration_type,
            source_data_settings: self.source_data_settings,
            target_data_settings: self.target_data_settings,
            number_of_jobs: self.number_of_jobs,
            selection_rules: self.selection_rules,
        })
    }
}
impl ::std::fmt::Debug for ModifyDataMigrationInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ModifyDataMigrationInputBuilder");
        formatter.field("data_migration_identifier", &self.data_migration_identifier);
        formatter.field("data_migration_name", &self.data_migration_name);
        formatter.field("enable_cloudwatch_logs", &self.enable_cloudwatch_logs);
        formatter.field("service_access_role_arn", &self.service_access_role_arn);
        formatter.field("data_migration_type", &self.data_migration_type);
        formatter.field("source_data_settings", &self.source_data_settings);
        formatter.field("target_data_settings", &self.target_data_settings);
        formatter.field("number_of_jobs", &self.number_of_jobs);
        formatter.field("selection_rules", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}