aws-sdk-quicksight 1.134.0

AWS SDK for Amazon QuickSight
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 CreateDataSourceInput {
    /// <p>The Amazon Web Services account ID.</p>
    pub aws_account_id: ::std::option::Option<::std::string::String>,
    /// <p>An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
    pub data_source_id: ::std::option::Option<::std::string::String>,
    /// <p>A display name for the data source.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The type of the data source. To return a list of all data sources, use <code>ListDataSources</code>.</p>
    /// <p>Use <code>AMAZON_ELASTICSEARCH</code> for Amazon OpenSearch Service.</p>
    pub r#type: ::std::option::Option<crate::types::DataSourceType>,
    /// <p>The parameters that Amazon Quick Sight uses to connect to your underlying source.</p>
    pub data_source_parameters: ::std::option::Option<crate::types::DataSourceParameters>,
    /// <p>The credentials Amazon Quick Sight that uses to connect to your underlying source. Currently, only credentials based on user name and password are supported.</p>
    pub credentials: ::std::option::Option<crate::types::DataSourceCredentials>,
    /// <p>A list of resource permissions on the data source.</p>
    pub permissions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>,
    /// <p>Use this parameter only when you want Amazon Quick Sight to use a VPC connection when connecting to your underlying source.</p>
    pub vpc_connection_properties: ::std::option::Option<crate::types::VpcConnectionProperties>,
    /// <p>Secure Socket Layer (SSL) properties that apply when Amazon Quick Sight connects to your underlying source.</p>
    pub ssl_properties: ::std::option::Option<crate::types::SslProperties>,
    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>When you create the data source, Amazon Quick Sight adds the data source to these folders.</p>
    pub folder_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateDataSourceInput {
    /// <p>The Amazon Web Services account ID.</p>
    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
        self.aws_account_id.as_deref()
    }
    /// <p>An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
    pub fn data_source_id(&self) -> ::std::option::Option<&str> {
        self.data_source_id.as_deref()
    }
    /// <p>A display name for the data source.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The type of the data source. To return a list of all data sources, use <code>ListDataSources</code>.</p>
    /// <p>Use <code>AMAZON_ELASTICSEARCH</code> for Amazon OpenSearch Service.</p>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::DataSourceType> {
        self.r#type.as_ref()
    }
    /// <p>The parameters that Amazon Quick Sight uses to connect to your underlying source.</p>
    pub fn data_source_parameters(&self) -> ::std::option::Option<&crate::types::DataSourceParameters> {
        self.data_source_parameters.as_ref()
    }
    /// <p>The credentials Amazon Quick Sight that uses to connect to your underlying source. Currently, only credentials based on user name and password are supported.</p>
    pub fn credentials(&self) -> ::std::option::Option<&crate::types::DataSourceCredentials> {
        self.credentials.as_ref()
    }
    /// <p>A list of resource permissions on the data source.</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 `.permissions.is_none()`.
    pub fn permissions(&self) -> &[crate::types::ResourcePermission] {
        self.permissions.as_deref().unwrap_or_default()
    }
    /// <p>Use this parameter only when you want Amazon Quick Sight to use a VPC connection when connecting to your underlying source.</p>
    pub fn vpc_connection_properties(&self) -> ::std::option::Option<&crate::types::VpcConnectionProperties> {
        self.vpc_connection_properties.as_ref()
    }
    /// <p>Secure Socket Layer (SSL) properties that apply when Amazon Quick Sight connects to your underlying source.</p>
    pub fn ssl_properties(&self) -> ::std::option::Option<&crate::types::SslProperties> {
        self.ssl_properties.as_ref()
    }
    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.</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()
    }
    /// <p>When you create the data source, Amazon Quick Sight adds the data source to these folders.</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 `.folder_arns.is_none()`.
    pub fn folder_arns(&self) -> &[::std::string::String] {
        self.folder_arns.as_deref().unwrap_or_default()
    }
}
impl ::std::fmt::Debug for CreateDataSourceInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateDataSourceInput");
        formatter.field("aws_account_id", &self.aws_account_id);
        formatter.field("data_source_id", &self.data_source_id);
        formatter.field("name", &self.name);
        formatter.field("r#type", &self.r#type);
        formatter.field("data_source_parameters", &self.data_source_parameters);
        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
        formatter.field("permissions", &self.permissions);
        formatter.field("vpc_connection_properties", &self.vpc_connection_properties);
        formatter.field("ssl_properties", &self.ssl_properties);
        formatter.field("tags", &self.tags);
        formatter.field("folder_arns", &self.folder_arns);
        formatter.finish()
    }
}
impl CreateDataSourceInput {
    /// Creates a new builder-style object to manufacture [`CreateDataSourceInput`](crate::operation::create_data_source::CreateDataSourceInput).
    pub fn builder() -> crate::operation::create_data_source::builders::CreateDataSourceInputBuilder {
        crate::operation::create_data_source::builders::CreateDataSourceInputBuilder::default()
    }
}

/// A builder for [`CreateDataSourceInput`](crate::operation::create_data_source::CreateDataSourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateDataSourceInputBuilder {
    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
    pub(crate) data_source_id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::DataSourceType>,
    pub(crate) data_source_parameters: ::std::option::Option<crate::types::DataSourceParameters>,
    pub(crate) credentials: ::std::option::Option<crate::types::DataSourceCredentials>,
    pub(crate) permissions: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>,
    pub(crate) vpc_connection_properties: ::std::option::Option<crate::types::VpcConnectionProperties>,
    pub(crate) ssl_properties: ::std::option::Option<crate::types::SslProperties>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) folder_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl CreateDataSourceInputBuilder {
    /// <p>The Amazon Web Services account ID.</p>
    /// This field is required.
    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.aws_account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services account ID.</p>
    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.aws_account_id = input;
        self
    }
    /// <p>The Amazon Web Services account ID.</p>
    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.aws_account_id
    }
    /// <p>An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
    /// This field is required.
    pub fn data_source_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_source_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
    pub fn set_data_source_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_source_id = input;
        self
    }
    /// <p>An ID for the data source. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
    pub fn get_data_source_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_source_id
    }
    /// <p>A display name for the data source.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A display name for the data source.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>A display name for the data source.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The type of the data source. To return a list of all data sources, use <code>ListDataSources</code>.</p>
    /// <p>Use <code>AMAZON_ELASTICSEARCH</code> for Amazon OpenSearch Service.</p>
    /// This field is required.
    pub fn r#type(mut self, input: crate::types::DataSourceType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of the data source. To return a list of all data sources, use <code>ListDataSources</code>.</p>
    /// <p>Use <code>AMAZON_ELASTICSEARCH</code> for Amazon OpenSearch Service.</p>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::DataSourceType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The type of the data source. To return a list of all data sources, use <code>ListDataSources</code>.</p>
    /// <p>Use <code>AMAZON_ELASTICSEARCH</code> for Amazon OpenSearch Service.</p>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::DataSourceType> {
        &self.r#type
    }
    /// <p>The parameters that Amazon Quick Sight uses to connect to your underlying source.</p>
    pub fn data_source_parameters(mut self, input: crate::types::DataSourceParameters) -> Self {
        self.data_source_parameters = ::std::option::Option::Some(input);
        self
    }
    /// <p>The parameters that Amazon Quick Sight uses to connect to your underlying source.</p>
    pub fn set_data_source_parameters(mut self, input: ::std::option::Option<crate::types::DataSourceParameters>) -> Self {
        self.data_source_parameters = input;
        self
    }
    /// <p>The parameters that Amazon Quick Sight uses to connect to your underlying source.</p>
    pub fn get_data_source_parameters(&self) -> &::std::option::Option<crate::types::DataSourceParameters> {
        &self.data_source_parameters
    }
    /// <p>The credentials Amazon Quick Sight that uses to connect to your underlying source. Currently, only credentials based on user name and password are supported.</p>
    pub fn credentials(mut self, input: crate::types::DataSourceCredentials) -> Self {
        self.credentials = ::std::option::Option::Some(input);
        self
    }
    /// <p>The credentials Amazon Quick Sight that uses to connect to your underlying source. Currently, only credentials based on user name and password are supported.</p>
    pub fn set_credentials(mut self, input: ::std::option::Option<crate::types::DataSourceCredentials>) -> Self {
        self.credentials = input;
        self
    }
    /// <p>The credentials Amazon Quick Sight that uses to connect to your underlying source. Currently, only credentials based on user name and password are supported.</p>
    pub fn get_credentials(&self) -> &::std::option::Option<crate::types::DataSourceCredentials> {
        &self.credentials
    }
    /// Appends an item to `permissions`.
    ///
    /// To override the contents of this collection use [`set_permissions`](Self::set_permissions).
    ///
    /// <p>A list of resource permissions on the data source.</p>
    pub fn permissions(mut self, input: crate::types::ResourcePermission) -> Self {
        let mut v = self.permissions.unwrap_or_default();
        v.push(input);
        self.permissions = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of resource permissions on the data source.</p>
    pub fn set_permissions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>>) -> Self {
        self.permissions = input;
        self
    }
    /// <p>A list of resource permissions on the data source.</p>
    pub fn get_permissions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ResourcePermission>> {
        &self.permissions
    }
    /// <p>Use this parameter only when you want Amazon Quick Sight to use a VPC connection when connecting to your underlying source.</p>
    pub fn vpc_connection_properties(mut self, input: crate::types::VpcConnectionProperties) -> Self {
        self.vpc_connection_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>Use this parameter only when you want Amazon Quick Sight to use a VPC connection when connecting to your underlying source.</p>
    pub fn set_vpc_connection_properties(mut self, input: ::std::option::Option<crate::types::VpcConnectionProperties>) -> Self {
        self.vpc_connection_properties = input;
        self
    }
    /// <p>Use this parameter only when you want Amazon Quick Sight to use a VPC connection when connecting to your underlying source.</p>
    pub fn get_vpc_connection_properties(&self) -> &::std::option::Option<crate::types::VpcConnectionProperties> {
        &self.vpc_connection_properties
    }
    /// <p>Secure Socket Layer (SSL) properties that apply when Amazon Quick Sight connects to your underlying source.</p>
    pub fn ssl_properties(mut self, input: crate::types::SslProperties) -> Self {
        self.ssl_properties = ::std::option::Option::Some(input);
        self
    }
    /// <p>Secure Socket Layer (SSL) properties that apply when Amazon Quick Sight connects to your underlying source.</p>
    pub fn set_ssl_properties(mut self, input: ::std::option::Option<crate::types::SslProperties>) -> Self {
        self.ssl_properties = input;
        self
    }
    /// <p>Secure Socket Layer (SSL) properties that apply when Amazon Quick Sight connects to your underlying source.</p>
    pub fn get_ssl_properties(&self) -> &::std::option::Option<crate::types::SslProperties> {
        &self.ssl_properties
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.</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>Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the data source.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Appends an item to `folder_arns`.
    ///
    /// To override the contents of this collection use [`set_folder_arns`](Self::set_folder_arns).
    ///
    /// <p>When you create the data source, Amazon Quick Sight adds the data source to these folders.</p>
    pub fn folder_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.folder_arns.unwrap_or_default();
        v.push(input.into());
        self.folder_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>When you create the data source, Amazon Quick Sight adds the data source to these folders.</p>
    pub fn set_folder_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.folder_arns = input;
        self
    }
    /// <p>When you create the data source, Amazon Quick Sight adds the data source to these folders.</p>
    pub fn get_folder_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.folder_arns
    }
    /// Consumes the builder and constructs a [`CreateDataSourceInput`](crate::operation::create_data_source::CreateDataSourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_data_source::CreateDataSourceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_data_source::CreateDataSourceInput {
            aws_account_id: self.aws_account_id,
            data_source_id: self.data_source_id,
            name: self.name,
            r#type: self.r#type,
            data_source_parameters: self.data_source_parameters,
            credentials: self.credentials,
            permissions: self.permissions,
            vpc_connection_properties: self.vpc_connection_properties,
            ssl_properties: self.ssl_properties,
            tags: self.tags,
            folder_arns: self.folder_arns,
        })
    }
}
impl ::std::fmt::Debug for CreateDataSourceInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateDataSourceInputBuilder");
        formatter.field("aws_account_id", &self.aws_account_id);
        formatter.field("data_source_id", &self.data_source_id);
        formatter.field("name", &self.name);
        formatter.field("r#type", &self.r#type);
        formatter.field("data_source_parameters", &self.data_source_parameters);
        formatter.field("credentials", &"*** Sensitive Data Redacted ***");
        formatter.field("permissions", &self.permissions);
        formatter.field("vpc_connection_properties", &self.vpc_connection_properties);
        formatter.field("ssl_properties", &self.ssl_properties);
        formatter.field("tags", &self.tags);
        formatter.field("folder_arns", &self.folder_arns);
        formatter.finish()
    }
}