aws-sdk-connect 1.166.0

AWS SDK for Amazon Connect 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 SubmitContactEvaluationInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>A unique identifier for the contact evaluation.</p>
    pub evaluation_id: ::std::option::Option<::std::string::String>,
    /// <p>A map of question identifiers to answer value.</p>
    pub answers: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>>,
    /// <p>A map of question identifiers to note value.</p>
    pub notes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>>,
    /// <p>The ID of the user who submitted the contact evaluation.</p>
    pub submitted_by: ::std::option::Option<crate::types::EvaluatorUserUnion>,
}
impl SubmitContactEvaluationInput {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>A unique identifier for the contact evaluation.</p>
    pub fn evaluation_id(&self) -> ::std::option::Option<&str> {
        self.evaluation_id.as_deref()
    }
    /// <p>A map of question identifiers to answer value.</p>
    pub fn answers(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>> {
        self.answers.as_ref()
    }
    /// <p>A map of question identifiers to note value.</p>
    pub fn notes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>> {
        self.notes.as_ref()
    }
    /// <p>The ID of the user who submitted the contact evaluation.</p>
    pub fn submitted_by(&self) -> ::std::option::Option<&crate::types::EvaluatorUserUnion> {
        self.submitted_by.as_ref()
    }
}
impl SubmitContactEvaluationInput {
    /// Creates a new builder-style object to manufacture [`SubmitContactEvaluationInput`](crate::operation::submit_contact_evaluation::SubmitContactEvaluationInput).
    pub fn builder() -> crate::operation::submit_contact_evaluation::builders::SubmitContactEvaluationInputBuilder {
        crate::operation::submit_contact_evaluation::builders::SubmitContactEvaluationInputBuilder::default()
    }
}

/// A builder for [`SubmitContactEvaluationInput`](crate::operation::submit_contact_evaluation::SubmitContactEvaluationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SubmitContactEvaluationInputBuilder {
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) evaluation_id: ::std::option::Option<::std::string::String>,
    pub(crate) answers: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>>,
    pub(crate) notes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>>,
    pub(crate) submitted_by: ::std::option::Option<crate::types::EvaluatorUserUnion>,
}
impl SubmitContactEvaluationInputBuilder {
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    /// This field is required.
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The identifier of the Amazon Connect instance. You can <a href="https://docs.aws.amazon.com/connect/latest/adminguide/find-instance-arn.html">find the instance ID</a> in the Amazon Resource Name (ARN) of the instance.</p>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// <p>A unique identifier for the contact evaluation.</p>
    /// This field is required.
    pub fn evaluation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.evaluation_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the contact evaluation.</p>
    pub fn set_evaluation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.evaluation_id = input;
        self
    }
    /// <p>A unique identifier for the contact evaluation.</p>
    pub fn get_evaluation_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.evaluation_id
    }
    /// Adds a key-value pair to `answers`.
    ///
    /// To override the contents of this collection use [`set_answers`](Self::set_answers).
    ///
    /// <p>A map of question identifiers to answer value.</p>
    pub fn answers(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::EvaluationAnswerInput) -> Self {
        let mut hash_map = self.answers.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.answers = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of question identifiers to answer value.</p>
    pub fn set_answers(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>>,
    ) -> Self {
        self.answers = input;
        self
    }
    /// <p>A map of question identifiers to answer value.</p>
    pub fn get_answers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>> {
        &self.answers
    }
    /// Adds a key-value pair to `notes`.
    ///
    /// To override the contents of this collection use [`set_notes`](Self::set_notes).
    ///
    /// <p>A map of question identifiers to note value.</p>
    pub fn notes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::EvaluationNote) -> Self {
        let mut hash_map = self.notes.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.notes = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A map of question identifiers to note value.</p>
    pub fn set_notes(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>>,
    ) -> Self {
        self.notes = input;
        self
    }
    /// <p>A map of question identifiers to note value.</p>
    pub fn get_notes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>> {
        &self.notes
    }
    /// <p>The ID of the user who submitted the contact evaluation.</p>
    pub fn submitted_by(mut self, input: crate::types::EvaluatorUserUnion) -> Self {
        self.submitted_by = ::std::option::Option::Some(input);
        self
    }
    /// <p>The ID of the user who submitted the contact evaluation.</p>
    pub fn set_submitted_by(mut self, input: ::std::option::Option<crate::types::EvaluatorUserUnion>) -> Self {
        self.submitted_by = input;
        self
    }
    /// <p>The ID of the user who submitted the contact evaluation.</p>
    pub fn get_submitted_by(&self) -> &::std::option::Option<crate::types::EvaluatorUserUnion> {
        &self.submitted_by
    }
    /// Consumes the builder and constructs a [`SubmitContactEvaluationInput`](crate::operation::submit_contact_evaluation::SubmitContactEvaluationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::submit_contact_evaluation::SubmitContactEvaluationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::submit_contact_evaluation::SubmitContactEvaluationInput {
            instance_id: self.instance_id,
            evaluation_id: self.evaluation_id,
            answers: self.answers,
            notes: self.notes,
            submitted_by: self.submitted_by,
        })
    }
}