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 ModifyDataProviderInput {
    /// <p>The identifier of the data provider. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub data_provider_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The name of the data provider.</p>
    pub data_provider_name: ::std::option::Option<::std::string::String>,
    /// <p>A user-friendly description of the data provider.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
    pub engine: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the data provider is virtual.</p>
    pub r#virtual: ::std::option::Option<bool>,
    /// <p>If this attribute is Y, the current call to <code>ModifyDataProvider</code> replaces all existing data provider settings with the exact settings that you specify in this call. If this attribute is N, the current call to <code>ModifyDataProvider</code> does two things:</p>
    /// <ul>
    /// <li>
    /// <p>It replaces any data provider settings that already exist with new values, for settings with the same names.</p></li>
    /// <li>
    /// <p>It creates new data provider settings that you specify in the call, for settings with different names.</p></li>
    /// </ul>
    pub exact_settings: ::std::option::Option<bool>,
    /// <p>The settings in JSON format for a data provider.</p>
    pub settings: ::std::option::Option<crate::types::DataProviderSettings>,
}
impl ModifyDataProviderInput {
    /// <p>The identifier of the data provider. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub fn data_provider_identifier(&self) -> ::std::option::Option<&str> {
        self.data_provider_identifier.as_deref()
    }
    /// <p>The name of the data provider.</p>
    pub fn data_provider_name(&self) -> ::std::option::Option<&str> {
        self.data_provider_name.as_deref()
    }
    /// <p>A user-friendly description of the data provider.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
    pub fn engine(&self) -> ::std::option::Option<&str> {
        self.engine.as_deref()
    }
    /// <p>Indicates whether the data provider is virtual.</p>
    pub fn r#virtual(&self) -> ::std::option::Option<bool> {
        self.r#virtual
    }
    /// <p>If this attribute is Y, the current call to <code>ModifyDataProvider</code> replaces all existing data provider settings with the exact settings that you specify in this call. If this attribute is N, the current call to <code>ModifyDataProvider</code> does two things:</p>
    /// <ul>
    /// <li>
    /// <p>It replaces any data provider settings that already exist with new values, for settings with the same names.</p></li>
    /// <li>
    /// <p>It creates new data provider settings that you specify in the call, for settings with different names.</p></li>
    /// </ul>
    pub fn exact_settings(&self) -> ::std::option::Option<bool> {
        self.exact_settings
    }
    /// <p>The settings in JSON format for a data provider.</p>
    pub fn settings(&self) -> ::std::option::Option<&crate::types::DataProviderSettings> {
        self.settings.as_ref()
    }
}
impl ModifyDataProviderInput {
    /// Creates a new builder-style object to manufacture [`ModifyDataProviderInput`](crate::operation::modify_data_provider::ModifyDataProviderInput).
    pub fn builder() -> crate::operation::modify_data_provider::builders::ModifyDataProviderInputBuilder {
        crate::operation::modify_data_provider::builders::ModifyDataProviderInputBuilder::default()
    }
}

/// A builder for [`ModifyDataProviderInput`](crate::operation::modify_data_provider::ModifyDataProviderInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ModifyDataProviderInputBuilder {
    pub(crate) data_provider_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) data_provider_name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) engine: ::std::option::Option<::std::string::String>,
    pub(crate) r#virtual: ::std::option::Option<bool>,
    pub(crate) exact_settings: ::std::option::Option<bool>,
    pub(crate) settings: ::std::option::Option<crate::types::DataProviderSettings>,
}
impl ModifyDataProviderInputBuilder {
    /// <p>The identifier of the data provider. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    /// This field is required.
    pub fn data_provider_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_provider_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the data provider. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub fn set_data_provider_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_provider_identifier = input;
        self
    }
    /// <p>The identifier of the data provider. Identifiers must begin with a letter and must contain only ASCII letters, digits, and hyphens. They can't end with a hyphen, or contain two consecutive hyphens.</p>
    pub fn get_data_provider_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_provider_identifier
    }
    /// <p>The name of the data provider.</p>
    pub fn data_provider_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_provider_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the data provider.</p>
    pub fn set_data_provider_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_provider_name = input;
        self
    }
    /// <p>The name of the data provider.</p>
    pub fn get_data_provider_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_provider_name
    }
    /// <p>A user-friendly description of the data provider.</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>A user-friendly description of the data provider.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A user-friendly description of the data provider.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine = input;
        self
    }
    /// <p>The type of database engine for the data provider. Valid values include <code>"aurora"</code>, <code>"aurora-postgresql"</code>, <code>"mysql"</code>, <code>"oracle"</code>, <code>"postgres"</code>, <code>"sqlserver"</code>, <code>redshift</code>, <code>mariadb</code>, <code>mongodb</code>, <code>db2</code>, <code>db2-zos</code>, <code>docdb</code>, and <code>sybase</code>. A value of <code>"aurora"</code> represents Amazon Aurora MySQL-Compatible Edition.</p>
    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine
    }
    /// <p>Indicates whether the data provider is virtual.</p>
    pub fn r#virtual(mut self, input: bool) -> Self {
        self.r#virtual = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the data provider is virtual.</p>
    pub fn set_virtual(mut self, input: ::std::option::Option<bool>) -> Self {
        self.r#virtual = input;
        self
    }
    /// <p>Indicates whether the data provider is virtual.</p>
    pub fn get_virtual(&self) -> &::std::option::Option<bool> {
        &self.r#virtual
    }
    /// <p>If this attribute is Y, the current call to <code>ModifyDataProvider</code> replaces all existing data provider settings with the exact settings that you specify in this call. If this attribute is N, the current call to <code>ModifyDataProvider</code> does two things:</p>
    /// <ul>
    /// <li>
    /// <p>It replaces any data provider settings that already exist with new values, for settings with the same names.</p></li>
    /// <li>
    /// <p>It creates new data provider settings that you specify in the call, for settings with different names.</p></li>
    /// </ul>
    pub fn exact_settings(mut self, input: bool) -> Self {
        self.exact_settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>If this attribute is Y, the current call to <code>ModifyDataProvider</code> replaces all existing data provider settings with the exact settings that you specify in this call. If this attribute is N, the current call to <code>ModifyDataProvider</code> does two things:</p>
    /// <ul>
    /// <li>
    /// <p>It replaces any data provider settings that already exist with new values, for settings with the same names.</p></li>
    /// <li>
    /// <p>It creates new data provider settings that you specify in the call, for settings with different names.</p></li>
    /// </ul>
    pub fn set_exact_settings(mut self, input: ::std::option::Option<bool>) -> Self {
        self.exact_settings = input;
        self
    }
    /// <p>If this attribute is Y, the current call to <code>ModifyDataProvider</code> replaces all existing data provider settings with the exact settings that you specify in this call. If this attribute is N, the current call to <code>ModifyDataProvider</code> does two things:</p>
    /// <ul>
    /// <li>
    /// <p>It replaces any data provider settings that already exist with new values, for settings with the same names.</p></li>
    /// <li>
    /// <p>It creates new data provider settings that you specify in the call, for settings with different names.</p></li>
    /// </ul>
    pub fn get_exact_settings(&self) -> &::std::option::Option<bool> {
        &self.exact_settings
    }
    /// <p>The settings in JSON format for a data provider.</p>
    pub fn settings(mut self, input: crate::types::DataProviderSettings) -> Self {
        self.settings = ::std::option::Option::Some(input);
        self
    }
    /// <p>The settings in JSON format for a data provider.</p>
    pub fn set_settings(mut self, input: ::std::option::Option<crate::types::DataProviderSettings>) -> Self {
        self.settings = input;
        self
    }
    /// <p>The settings in JSON format for a data provider.</p>
    pub fn get_settings(&self) -> &::std::option::Option<crate::types::DataProviderSettings> {
        &self.settings
    }
    /// Consumes the builder and constructs a [`ModifyDataProviderInput`](crate::operation::modify_data_provider::ModifyDataProviderInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::modify_data_provider::ModifyDataProviderInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::modify_data_provider::ModifyDataProviderInput {
            data_provider_identifier: self.data_provider_identifier,
            data_provider_name: self.data_provider_name,
            description: self.description,
            engine: self.engine,
            r#virtual: self.r#virtual,
            exact_settings: self.exact_settings,
            settings: self.settings,
        })
    }
}