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 CreateDataProviderInput {
    /// <p>A user-friendly name for 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>The settings in JSON format for a data provider.</p>
    pub settings: ::std::option::Option<crate::types::DataProviderSettings>,
    /// <p>One or more tags to be assigned to the data provider.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateDataProviderInput {
    /// <p>A user-friendly name for 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>The settings in JSON format for a data provider.</p>
    pub fn settings(&self) -> ::std::option::Option<&crate::types::DataProviderSettings> {
        self.settings.as_ref()
    }
    /// <p>One or more tags to be assigned to the data provider.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
}
impl CreateDataProviderInput {
    /// Creates a new builder-style object to manufacture [`CreateDataProviderInput`](crate::operation::create_data_provider::CreateDataProviderInput).
    pub fn builder() -> crate::operation::create_data_provider::builders::CreateDataProviderInputBuilder {
        crate::operation::create_data_provider::builders::CreateDataProviderInputBuilder::default()
    }
}

/// A builder for [`CreateDataProviderInput`](crate::operation::create_data_provider::CreateDataProviderInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDataProviderInputBuilder {
    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) settings: ::std::option::Option<crate::types::DataProviderSettings>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl CreateDataProviderInputBuilder {
    /// <p>A user-friendly name for 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>A user-friendly name for 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>A user-friendly name for 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>
    /// This field is required.
    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>The settings in JSON format for a data provider.</p>
    /// This field is required.
    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
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>One or more tags to be assigned to the data provider.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>One or more tags to be assigned to the data provider.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>One or more tags to be assigned to the data provider.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateDataProviderInput`](crate::operation::create_data_provider::CreateDataProviderInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_data_provider::CreateDataProviderInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_data_provider::CreateDataProviderInput {
            data_provider_name: self.data_provider_name,
            description: self.description,
            engine: self.engine,
            r#virtual: self.r#virtual,
            settings: self.settings,
            tags: self.tags,
        })
    }
}