aws-sdk-appintegrations 1.102.0

AWS SDK for Amazon AppIntegrations 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 CreateDataIntegrationInput {
    /// <p>The name of the DataIntegration.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>A description of the DataIntegration.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The KMS key ARN for the DataIntegration.</p>
    pub kms_key: ::std::option::Option<::std::string::String>,
    /// <p>The URI of the data source.</p>
    pub source_uri: ::std::option::Option<::std::string::String>,
    /// <p>The name of the data and how often it should be pulled from the source.</p>
    pub schedule_config: ::std::option::Option<crate::types::ScheduleConfiguration>,
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>The configuration for what files should be pulled from the source.</p>
    pub file_configuration: ::std::option::Option<crate::types::FileConfiguration>,
    /// <p>The configuration for what data should be pulled from the source.</p>
    pub object_configuration: ::std::option::Option<
        ::std::collections::HashMap<
            ::std::string::String,
            ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
        >,
    >,
}
impl CreateDataIntegrationInput {
    /// <p>The name of the DataIntegration.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>A description of the DataIntegration.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The KMS key ARN for the DataIntegration.</p>
    pub fn kms_key(&self) -> ::std::option::Option<&str> {
        self.kms_key.as_deref()
    }
    /// <p>The URI of the data source.</p>
    pub fn source_uri(&self) -> ::std::option::Option<&str> {
        self.source_uri.as_deref()
    }
    /// <p>The name of the data and how often it should be pulled from the source.</p>
    pub fn schedule_config(&self) -> ::std::option::Option<&crate::types::ScheduleConfiguration> {
        self.schedule_config.as_ref()
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>The configuration for what files should be pulled from the source.</p>
    pub fn file_configuration(&self) -> ::std::option::Option<&crate::types::FileConfiguration> {
        self.file_configuration.as_ref()
    }
    /// <p>The configuration for what data should be pulled from the source.</p>
    pub fn object_configuration(
        &self,
    ) -> ::std::option::Option<
        &::std::collections::HashMap<
            ::std::string::String,
            ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
        >,
    > {
        self.object_configuration.as_ref()
    }
}
impl CreateDataIntegrationInput {
    /// Creates a new builder-style object to manufacture [`CreateDataIntegrationInput`](crate::operation::create_data_integration::CreateDataIntegrationInput).
    pub fn builder() -> crate::operation::create_data_integration::builders::CreateDataIntegrationInputBuilder {
        crate::operation::create_data_integration::builders::CreateDataIntegrationInputBuilder::default()
    }
}

/// A builder for [`CreateDataIntegrationInput`](crate::operation::create_data_integration::CreateDataIntegrationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateDataIntegrationInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key: ::std::option::Option<::std::string::String>,
    pub(crate) source_uri: ::std::option::Option<::std::string::String>,
    pub(crate) schedule_config: ::std::option::Option<crate::types::ScheduleConfiguration>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) file_configuration: ::std::option::Option<crate::types::FileConfiguration>,
    pub(crate) object_configuration: ::std::option::Option<
        ::std::collections::HashMap<
            ::std::string::String,
            ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
        >,
    >,
}
impl CreateDataIntegrationInputBuilder {
    /// <p>The name of the DataIntegration.</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>The name of the DataIntegration.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the DataIntegration.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>A description of the DataIntegration.</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 description of the DataIntegration.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>A description of the DataIntegration.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The KMS key ARN for the DataIntegration.</p>
    /// This field is required.
    pub fn kms_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The KMS key ARN for the DataIntegration.</p>
    pub fn set_kms_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key = input;
        self
    }
    /// <p>The KMS key ARN for the DataIntegration.</p>
    pub fn get_kms_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key
    }
    /// <p>The URI of the data source.</p>
    pub fn source_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_uri = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The URI of the data source.</p>
    pub fn set_source_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_uri = input;
        self
    }
    /// <p>The URI of the data source.</p>
    pub fn get_source_uri(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_uri
    }
    /// <p>The name of the data and how often it should be pulled from the source.</p>
    pub fn schedule_config(mut self, input: crate::types::ScheduleConfiguration) -> Self {
        self.schedule_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The name of the data and how often it should be pulled from the source.</p>
    pub fn set_schedule_config(mut self, input: ::std::option::Option<crate::types::ScheduleConfiguration>) -> Self {
        self.schedule_config = input;
        self
    }
    /// <p>The name of the data and how often it should be pulled from the source.</p>
    pub fn get_schedule_config(&self) -> &::std::option::Option<crate::types::ScheduleConfiguration> {
        &self.schedule_config
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// <p>The configuration for what files should be pulled from the source.</p>
    pub fn file_configuration(mut self, input: crate::types::FileConfiguration) -> Self {
        self.file_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The configuration for what files should be pulled from the source.</p>
    pub fn set_file_configuration(mut self, input: ::std::option::Option<crate::types::FileConfiguration>) -> Self {
        self.file_configuration = input;
        self
    }
    /// <p>The configuration for what files should be pulled from the source.</p>
    pub fn get_file_configuration(&self) -> &::std::option::Option<crate::types::FileConfiguration> {
        &self.file_configuration
    }
    /// Adds a key-value pair to `object_configuration`.
    ///
    /// To override the contents of this collection use [`set_object_configuration`](Self::set_object_configuration).
    ///
    /// <p>The configuration for what data should be pulled from the source.</p>
    pub fn object_configuration(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
    ) -> Self {
        let mut hash_map = self.object_configuration.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.object_configuration = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The configuration for what data should be pulled from the source.</p>
    pub fn set_object_configuration(
        mut self,
        input: ::std::option::Option<
            ::std::collections::HashMap<
                ::std::string::String,
                ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
            >,
        >,
    ) -> Self {
        self.object_configuration = input;
        self
    }
    /// <p>The configuration for what data should be pulled from the source.</p>
    pub fn get_object_configuration(
        &self,
    ) -> &::std::option::Option<
        ::std::collections::HashMap<
            ::std::string::String,
            ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>,
        >,
    > {
        &self.object_configuration
    }
    /// Consumes the builder and constructs a [`CreateDataIntegrationInput`](crate::operation::create_data_integration::CreateDataIntegrationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_data_integration::CreateDataIntegrationInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::create_data_integration::CreateDataIntegrationInput {
            name: self.name,
            description: self.description,
            kms_key: self.kms_key,
            source_uri: self.source_uri,
            schedule_config: self.schedule_config,
            tags: self.tags,
            client_token: self.client_token,
            file_configuration: self.file_configuration,
            object_configuration: self.object_configuration,
        })
    }
}