aws-sdk-customerprofiles 1.118.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, ::std::fmt::Debug)]
pub struct CreateRecommenderSchemaInput {
    /// <p>The unique name of the domain.</p>
    pub domain_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the recommender schema. The name must be unique within the domain.</p>
    pub recommender_schema_name: ::std::option::Option<::std::string::String>,
    /// <p>A map of dataset type to column definitions that specifies which data columns to include in the schema. The <code>_webAnalytics</code> and <code>_catalogItem</code> keys are supported.</p>
    pub fields: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>>>,
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateRecommenderSchemaInput {
    /// <p>The unique name of the domain.</p>
    pub fn domain_name(&self) -> ::std::option::Option<&str> {
        self.domain_name.as_deref()
    }
    /// <p>The name of the recommender schema. The name must be unique within the domain.</p>
    pub fn recommender_schema_name(&self) -> ::std::option::Option<&str> {
        self.recommender_schema_name.as_deref()
    }
    /// <p>A map of dataset type to column definitions that specifies which data columns to include in the schema. The <code>_webAnalytics</code> and <code>_catalogItem</code> keys are supported.</p>
    pub fn fields(
        &self,
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>>> {
        self.fields.as_ref()
    }
    /// <p>The tags used to organize, track, or control access for this resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl CreateRecommenderSchemaInput {
    /// Creates a new builder-style object to manufacture [`CreateRecommenderSchemaInput`](crate::operation::create_recommender_schema::CreateRecommenderSchemaInput).
    pub fn builder() -> crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaInputBuilder {
        crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaInputBuilder::default()
    }
}

/// A builder for [`CreateRecommenderSchemaInput`](crate::operation::create_recommender_schema::CreateRecommenderSchemaInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRecommenderSchemaInputBuilder {
    pub(crate) domain_name: ::std::option::Option<::std::string::String>,
    pub(crate) recommender_schema_name: ::std::option::Option<::std::string::String>,
    pub(crate) fields:
        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>>>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateRecommenderSchemaInputBuilder {
    /// <p>The unique name of the domain.</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.</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.</p>
    pub fn get_domain_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.domain_name
    }
    /// <p>The name of the recommender schema. The name must be unique within the domain.</p>
    /// This field is required.
    pub fn recommender_schema_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommender_schema_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the recommender schema. The name must be unique within the domain.</p>
    pub fn set_recommender_schema_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommender_schema_name = input;
        self
    }
    /// <p>The name of the recommender schema. The name must be unique within the domain.</p>
    pub fn get_recommender_schema_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommender_schema_name
    }
    /// Adds a key-value pair to `fields`.
    ///
    /// To override the contents of this collection use [`set_fields`](Self::set_fields).
    ///
    /// <p>A map of dataset type to column definitions that specifies which data columns to include in the schema. The <code>_webAnalytics</code> and <code>_catalogItem</code> keys are supported.</p>
    pub fn fields(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<crate::types::RecommenderSchemaField>) -> 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>A map of dataset type to column definitions that specifies which data columns to include in the schema. The <code>_webAnalytics</code> and <code>_catalogItem</code> keys are supported.</p>
    pub fn set_fields(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>>>,
    ) -> Self {
        self.fields = input;
        self
    }
    /// <p>A map of dataset type to column definitions that specifies which data columns to include in the schema. The <code>_webAnalytics</code> and <code>_catalogItem</code> keys are supported.</p>
    pub fn get_fields(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>>> {
        &self.fields
    }
    /// 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.</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.</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.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateRecommenderSchemaInput`](crate::operation::create_recommender_schema::CreateRecommenderSchemaInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_recommender_schema::CreateRecommenderSchemaInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_recommender_schema::CreateRecommenderSchemaInput {
            domain_name: self.domain_name,
            recommender_schema_name: self.recommender_schema_name,
            fields: self.fields,
            tags: self.tags,
        })
    }
}