1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>A structure that defines search criteria and matching logic to search for contacts by matching text with transcripts analyzed by Amazon Connect Contact Lens.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Transcript {
/// <p>The list of search criteria based on Contact Lens conversational analytics transcript.</p>
pub criteria: ::std::vec::Vec<crate::types::TranscriptCriteria>,
/// <p>The match type combining search criteria using multiple transcript criteria.</p>
pub match_type: ::std::option::Option<crate::types::SearchContactsMatchType>,
}
impl Transcript {
/// <p>The list of search criteria based on Contact Lens conversational analytics transcript.</p>
pub fn criteria(&self) -> &[crate::types::TranscriptCriteria] {
use std::ops::Deref;
self.criteria.deref()
}
/// <p>The match type combining search criteria using multiple transcript criteria.</p>
pub fn match_type(&self) -> ::std::option::Option<&crate::types::SearchContactsMatchType> {
self.match_type.as_ref()
}
}
impl Transcript {
/// Creates a new builder-style object to manufacture [`Transcript`](crate::types::Transcript).
pub fn builder() -> crate::types::builders::TranscriptBuilder {
crate::types::builders::TranscriptBuilder::default()
}
}
/// A builder for [`Transcript`](crate::types::Transcript).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TranscriptBuilder {
pub(crate) criteria: ::std::option::Option<::std::vec::Vec<crate::types::TranscriptCriteria>>,
pub(crate) match_type: ::std::option::Option<crate::types::SearchContactsMatchType>,
}
impl TranscriptBuilder {
/// Appends an item to `criteria`.
///
/// To override the contents of this collection use [`set_criteria`](Self::set_criteria).
///
/// <p>The list of search criteria based on Contact Lens conversational analytics transcript.</p>
pub fn criteria(mut self, input: crate::types::TranscriptCriteria) -> Self {
let mut v = self.criteria.unwrap_or_default();
v.push(input);
self.criteria = ::std::option::Option::Some(v);
self
}
/// <p>The list of search criteria based on Contact Lens conversational analytics transcript.</p>
pub fn set_criteria(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TranscriptCriteria>>) -> Self {
self.criteria = input;
self
}
/// <p>The list of search criteria based on Contact Lens conversational analytics transcript.</p>
pub fn get_criteria(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TranscriptCriteria>> {
&self.criteria
}
/// <p>The match type combining search criteria using multiple transcript criteria.</p>
pub fn match_type(mut self, input: crate::types::SearchContactsMatchType) -> Self {
self.match_type = ::std::option::Option::Some(input);
self
}
/// <p>The match type combining search criteria using multiple transcript criteria.</p>
pub fn set_match_type(mut self, input: ::std::option::Option<crate::types::SearchContactsMatchType>) -> Self {
self.match_type = input;
self
}
/// <p>The match type combining search criteria using multiple transcript criteria.</p>
pub fn get_match_type(&self) -> &::std::option::Option<crate::types::SearchContactsMatchType> {
&self.match_type
}
/// Consumes the builder and constructs a [`Transcript`](crate::types::Transcript).
/// This method will fail if any of the following fields are not set:
/// - [`criteria`](crate::types::builders::TranscriptBuilder::criteria)
pub fn build(self) -> ::std::result::Result<crate::types::Transcript, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::types::Transcript {
criteria: self.criteria.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"criteria",
"criteria was not specified but it is required when building Transcript",
)
})?,
match_type: self.match_type,
})
}
}