Skip to main content

aws_sdk_connect/operation/update_contact_evaluation/
_update_contact_evaluation_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateContactEvaluationInput {
6    /// <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>
7    pub instance_id: ::std::option::Option<::std::string::String>,
8    /// <p>A unique identifier for the contact evaluation.</p>
9    pub evaluation_id: ::std::option::Option<::std::string::String>,
10    /// <p>A map of question identifiers to answer value.</p>
11    pub answers: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>>,
12    /// <p>A map of question identifiers to note value.</p>
13    pub notes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>>,
14    /// <p>The ID of the user who updated the contact evaluation.</p>
15    pub updated_by: ::std::option::Option<crate::types::EvaluatorUserUnion>,
16}
17impl UpdateContactEvaluationInput {
18    /// <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>
19    pub fn instance_id(&self) -> ::std::option::Option<&str> {
20        self.instance_id.as_deref()
21    }
22    /// <p>A unique identifier for the contact evaluation.</p>
23    pub fn evaluation_id(&self) -> ::std::option::Option<&str> {
24        self.evaluation_id.as_deref()
25    }
26    /// <p>A map of question identifiers to answer value.</p>
27    pub fn answers(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>> {
28        self.answers.as_ref()
29    }
30    /// <p>A map of question identifiers to note value.</p>
31    pub fn notes(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>> {
32        self.notes.as_ref()
33    }
34    /// <p>The ID of the user who updated the contact evaluation.</p>
35    pub fn updated_by(&self) -> ::std::option::Option<&crate::types::EvaluatorUserUnion> {
36        self.updated_by.as_ref()
37    }
38}
39impl UpdateContactEvaluationInput {
40    /// Creates a new builder-style object to manufacture [`UpdateContactEvaluationInput`](crate::operation::update_contact_evaluation::UpdateContactEvaluationInput).
41    pub fn builder() -> crate::operation::update_contact_evaluation::builders::UpdateContactEvaluationInputBuilder {
42        crate::operation::update_contact_evaluation::builders::UpdateContactEvaluationInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateContactEvaluationInput`](crate::operation::update_contact_evaluation::UpdateContactEvaluationInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateContactEvaluationInputBuilder {
50    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
51    pub(crate) evaluation_id: ::std::option::Option<::std::string::String>,
52    pub(crate) answers: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>>,
53    pub(crate) notes: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>>,
54    pub(crate) updated_by: ::std::option::Option<crate::types::EvaluatorUserUnion>,
55}
56impl UpdateContactEvaluationInputBuilder {
57    /// <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>
58    /// This field is required.
59    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.instance_id = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <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>
64    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.instance_id = input;
66        self
67    }
68    /// <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>
69    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
70        &self.instance_id
71    }
72    /// <p>A unique identifier for the contact evaluation.</p>
73    /// This field is required.
74    pub fn evaluation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.evaluation_id = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>A unique identifier for the contact evaluation.</p>
79    pub fn set_evaluation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.evaluation_id = input;
81        self
82    }
83    /// <p>A unique identifier for the contact evaluation.</p>
84    pub fn get_evaluation_id(&self) -> &::std::option::Option<::std::string::String> {
85        &self.evaluation_id
86    }
87    /// Adds a key-value pair to `answers`.
88    ///
89    /// To override the contents of this collection use [`set_answers`](Self::set_answers).
90    ///
91    /// <p>A map of question identifiers to answer value.</p>
92    pub fn answers(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::EvaluationAnswerInput) -> Self {
93        let mut hash_map = self.answers.unwrap_or_default();
94        hash_map.insert(k.into(), v);
95        self.answers = ::std::option::Option::Some(hash_map);
96        self
97    }
98    /// <p>A map of question identifiers to answer value.</p>
99    pub fn set_answers(
100        mut self,
101        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>>,
102    ) -> Self {
103        self.answers = input;
104        self
105    }
106    /// <p>A map of question identifiers to answer value.</p>
107    pub fn get_answers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationAnswerInput>> {
108        &self.answers
109    }
110    /// Adds a key-value pair to `notes`.
111    ///
112    /// To override the contents of this collection use [`set_notes`](Self::set_notes).
113    ///
114    /// <p>A map of question identifiers to note value.</p>
115    pub fn notes(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::EvaluationNote) -> Self {
116        let mut hash_map = self.notes.unwrap_or_default();
117        hash_map.insert(k.into(), v);
118        self.notes = ::std::option::Option::Some(hash_map);
119        self
120    }
121    /// <p>A map of question identifiers to note value.</p>
122    pub fn set_notes(
123        mut self,
124        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>>,
125    ) -> Self {
126        self.notes = input;
127        self
128    }
129    /// <p>A map of question identifiers to note value.</p>
130    pub fn get_notes(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::EvaluationNote>> {
131        &self.notes
132    }
133    /// <p>The ID of the user who updated the contact evaluation.</p>
134    pub fn updated_by(mut self, input: crate::types::EvaluatorUserUnion) -> Self {
135        self.updated_by = ::std::option::Option::Some(input);
136        self
137    }
138    /// <p>The ID of the user who updated the contact evaluation.</p>
139    pub fn set_updated_by(mut self, input: ::std::option::Option<crate::types::EvaluatorUserUnion>) -> Self {
140        self.updated_by = input;
141        self
142    }
143    /// <p>The ID of the user who updated the contact evaluation.</p>
144    pub fn get_updated_by(&self) -> &::std::option::Option<crate::types::EvaluatorUserUnion> {
145        &self.updated_by
146    }
147    /// Consumes the builder and constructs a [`UpdateContactEvaluationInput`](crate::operation::update_contact_evaluation::UpdateContactEvaluationInput).
148    pub fn build(
149        self,
150    ) -> ::std::result::Result<
151        crate::operation::update_contact_evaluation::UpdateContactEvaluationInput,
152        ::aws_smithy_types::error::operation::BuildError,
153    > {
154        ::std::result::Result::Ok(crate::operation::update_contact_evaluation::UpdateContactEvaluationInput {
155            instance_id: self.instance_id,
156            evaluation_id: self.evaluation_id,
157            answers: self.answers,
158            notes: self.notes,
159            updated_by: self.updated_by,
160        })
161    }
162}