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, ::std::fmt::Debug)]
pub struct CreateRecommenderSchemaOutput {
    /// <p>The Amazon Resource Name (ARN) of the recommender schema.</p>
    pub recommender_schema_arn: ::std::string::String,
    /// <p>The name of the recommender schema.</p>
    pub recommender_schema_name: ::std::string::String,
    /// <p>A map of dataset type to column definitions included in the schema.</p>
    pub fields: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>>,
    /// <p>The timestamp of when the recommender schema was created.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>The status of the recommender schema.</p>
    pub status: crate::types::RecommenderSchemaStatus,
    /// <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>>,
    _request_id: Option<String>,
}
impl CreateRecommenderSchemaOutput {
    /// <p>The Amazon Resource Name (ARN) of the recommender schema.</p>
    pub fn recommender_schema_arn(&self) -> &str {
        use std::ops::Deref;
        self.recommender_schema_arn.deref()
    }
    /// <p>The name of the recommender schema.</p>
    pub fn recommender_schema_name(&self) -> &str {
        use std::ops::Deref;
        self.recommender_schema_name.deref()
    }
    /// <p>A map of dataset type to column definitions included in the schema.</p>
    pub fn fields(&self) -> &::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>> {
        &self.fields
    }
    /// <p>The timestamp of when the recommender schema was created.</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>The status of the recommender schema.</p>
    pub fn status(&self) -> &crate::types::RecommenderSchemaStatus {
        &self.status
    }
    /// <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 ::aws_types::request_id::RequestId for CreateRecommenderSchemaOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateRecommenderSchemaOutput {
    /// Creates a new builder-style object to manufacture [`CreateRecommenderSchemaOutput`](crate::operation::create_recommender_schema::CreateRecommenderSchemaOutput).
    pub fn builder() -> crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaOutputBuilder {
        crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaOutputBuilder::default()
    }
}

/// A builder for [`CreateRecommenderSchemaOutput`](crate::operation::create_recommender_schema::CreateRecommenderSchemaOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRecommenderSchemaOutputBuilder {
    pub(crate) recommender_schema_arn: ::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) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) status: ::std::option::Option<crate::types::RecommenderSchemaStatus>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl CreateRecommenderSchemaOutputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the recommender schema.</p>
    /// This field is required.
    pub fn recommender_schema_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.recommender_schema_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the recommender schema.</p>
    pub fn set_recommender_schema_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.recommender_schema_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the recommender schema.</p>
    pub fn get_recommender_schema_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.recommender_schema_arn
    }
    /// <p>The name of the recommender schema.</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.</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.</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 included in the schema.</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 included in the schema.</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 included in the schema.</p>
    pub fn get_fields(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<crate::types::RecommenderSchemaField>>> {
        &self.fields
    }
    /// <p>The timestamp of when the recommender schema was created.</p>
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The timestamp of when the recommender schema was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The timestamp of when the recommender schema was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The status of the recommender schema.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::RecommenderSchemaStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The status of the recommender schema.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::RecommenderSchemaStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the recommender schema.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::RecommenderSchemaStatus> {
        &self.status
    }
    /// 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
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`CreateRecommenderSchemaOutput`](crate::operation::create_recommender_schema::CreateRecommenderSchemaOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`recommender_schema_arn`](crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaOutputBuilder::recommender_schema_arn)
    /// - [`recommender_schema_name`](crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaOutputBuilder::recommender_schema_name)
    /// - [`fields`](crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaOutputBuilder::fields)
    /// - [`created_at`](crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaOutputBuilder::created_at)
    /// - [`status`](crate::operation::create_recommender_schema::builders::CreateRecommenderSchemaOutputBuilder::status)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_recommender_schema::CreateRecommenderSchemaOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_recommender_schema::CreateRecommenderSchemaOutput {
            recommender_schema_arn: self.recommender_schema_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "recommender_schema_arn",
                    "recommender_schema_arn was not specified but it is required when building CreateRecommenderSchemaOutput",
                )
            })?,
            recommender_schema_name: self.recommender_schema_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "recommender_schema_name",
                    "recommender_schema_name was not specified but it is required when building CreateRecommenderSchemaOutput",
                )
            })?,
            fields: self.fields.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "fields",
                    "fields was not specified but it is required when building CreateRecommenderSchemaOutput",
                )
            })?,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building CreateRecommenderSchemaOutput",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building CreateRecommenderSchemaOutput",
                )
            })?,
            tags: self.tags,
            _request_id: self._request_id,
        })
    }
}