aws-sdk-customerprofiles 1.119.0

AWS SDK for Amazon Connect Customer Profiles
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 CreateUploadJobInput {
    /// <p>The unique name of the domain. Domain should be exists for the upload job to be created.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The unique name of the upload job. Could be a file name to identify the upload job.</p>
    pub display_name: ::std::option::Option<::std::string::String>,
    /// <p>The mapping between CSV Columns and Profile Object attributes. A map of the name and ObjectType field.</p>
    pub fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
    /// <p>The unique key columns for de-duping the profiles used to map data to the profile.</p>
    pub unique_key: ::std::option::Option<::std::string::String>,
    /// <p>The expiry duration for the profiles ingested with the job. If not provided, the system default of 2 weeks is used.</p>
    pub data_expiry: ::std::option::Option<i32>,
}
impl CreateUploadJobInput {
    /// <p>The unique name of the domain. Domain should be exists for the upload job to be created.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The unique name of the upload job. Could be a file name to identify the upload job.</p>
    pub fn display_name(&self) -> ::std::option::Option<&str> {
        self.display_name.as_deref()
    }
    /// <p>The mapping between CSV Columns and Profile Object attributes. A map of the name and ObjectType field.</p>
    pub fn fields(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
        self.fields.as_ref()
    }
    /// <p>The unique key columns for de-duping the profiles used to map data to the profile.</p>
    pub fn unique_key(&self) -> ::std::option::Option<&str> {
        self.unique_key.as_deref()
    }
    /// <p>The expiry duration for the profiles ingested with the job. If not provided, the system default of 2 weeks is used.</p>
    pub fn data_expiry(&self) -> ::std::option::Option<i32> {
        self.data_expiry
    }
}
impl ::std::fmt::Debug for CreateUploadJobInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateUploadJobInput");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("display_name", &self.display_name);
        formatter.field("fields", &"*** Sensitive Data Redacted ***");
        formatter.field("unique_key", &self.unique_key);
        formatter.field("data_expiry", &self.data_expiry);
        formatter.finish()
    }
}
impl CreateUploadJobInput {
    /// Creates a new builder-style object to manufacture [`CreateUploadJobInput`](crate::operation::create_upload_job::CreateUploadJobInput).
    pub fn builder() -> crate::operation::create_upload_job::builders::CreateUploadJobInputBuilder {
        crate::operation::create_upload_job::builders::CreateUploadJobInputBuilder::default()
    }
}

/// A builder for [`CreateUploadJobInput`](crate::operation::create_upload_job::CreateUploadJobInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateUploadJobInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) display_name: ::std::option::Option<::std::string::String>,
    pub(crate) fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
    pub(crate) unique_key: ::std::option::Option<::std::string::String>,
    pub(crate) data_expiry: ::std::option::Option<i32>,
}
impl CreateUploadJobInputBuilder {
    /// <p>The unique name of the domain. Domain should be exists for the upload job to be created.</p>
    /// This field is required.
    pub fn domain_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.domain_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the domain. Domain should be exists for the upload job to be created.</p>
    pub fn set_domain_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.domain_name = input;
        self
    }
    /// <p>The unique name of the domain. Domain should be exists for the upload job to be created.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The unique name of the upload job. Could be a file name to identify the upload job.</p>
    /// This field is required.
    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.display_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique name of the upload job. Could be a file name to identify the upload job.</p>
    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.display_name = input;
        self
    }
    /// <p>The unique name of the upload job. Could be a file name to identify the upload job.</p>
    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.display_name
    }
    /// Adds a key-value pair to `fields`.
    ///
    /// To override the contents of this collection use [`set_fields`](Self::set_fields).
    ///
    /// <p>The mapping between CSV Columns and Profile Object attributes. A map of the name and ObjectType field.</p>
    pub fn fields(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::ObjectTypeField) -> Self {
        let mut hash_map = self.fields.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.fields = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The mapping between CSV Columns and Profile Object attributes. A map of the name and ObjectType field.</p>
    pub fn set_fields(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>>,
    ) -> Self {
        self.fields = input;
        self
    }
    /// <p>The mapping between CSV Columns and Profile Object attributes. A map of the name and ObjectType field.</p>
    pub fn get_fields(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::ObjectTypeField>> {
        &self.fields
    }
    /// <p>The unique key columns for de-duping the profiles used to map data to the profile.</p>
    /// This field is required.
    pub fn unique_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.unique_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique key columns for de-duping the profiles used to map data to the profile.</p>
    pub fn set_unique_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.unique_key = input;
        self
    }
    /// <p>The unique key columns for de-duping the profiles used to map data to the profile.</p>
    pub fn get_unique_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.unique_key
    }
    /// <p>The expiry duration for the profiles ingested with the job. If not provided, the system default of 2 weeks is used.</p>
    pub fn data_expiry(mut self, input: i32) -> Self {
        self.data_expiry = ::std::option::Option::Some(input);
        self
    }
    /// <p>The expiry duration for the profiles ingested with the job. If not provided, the system default of 2 weeks is used.</p>
    pub fn set_data_expiry(mut self, input: ::std::option::Option<i32>) -> Self {
        self.data_expiry = input;
        self
    }
    /// <p>The expiry duration for the profiles ingested with the job. If not provided, the system default of 2 weeks is used.</p>
    pub fn get_data_expiry(&self) -> &::std::option::Option<i32> {
        &self.data_expiry
    }
    /// Consumes the builder and constructs a [`CreateUploadJobInput`](crate::operation::create_upload_job::CreateUploadJobInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_upload_job::CreateUploadJobInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_upload_job::CreateUploadJobInput {
            domain_name: self.domain_name,
            display_name: self.display_name,
            fields: self.fields,
            unique_key: self.unique_key,
            data_expiry: self.data_expiry,
        })
    }
}
impl ::std::fmt::Debug for CreateUploadJobInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateUploadJobInputBuilder");
        formatter.field("domain_name", &self.domain_name);
        formatter.field("display_name", &self.display_name);
        formatter.field("fields", &"*** Sensitive Data Redacted ***");
        formatter.field("unique_key", &self.unique_key);
        formatter.field("data_expiry", &self.data_expiry);
        formatter.finish()
    }
}