aws_sdk_connect/operation/start_contact_evaluation/
_start_contact_evaluation_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartContactEvaluationOutput {
6 pub evaluation_id: ::std::string::String,
8 pub evaluation_arn: ::std::string::String,
10 _request_id: Option<String>,
11}
12impl StartContactEvaluationOutput {
13 pub fn evaluation_id(&self) -> &str {
15 use std::ops::Deref;
16 self.evaluation_id.deref()
17 }
18 pub fn evaluation_arn(&self) -> &str {
20 use std::ops::Deref;
21 self.evaluation_arn.deref()
22 }
23}
24impl ::aws_types::request_id::RequestId for StartContactEvaluationOutput {
25 fn request_id(&self) -> Option<&str> {
26 self._request_id.as_deref()
27 }
28}
29impl StartContactEvaluationOutput {
30 pub fn builder() -> crate::operation::start_contact_evaluation::builders::StartContactEvaluationOutputBuilder {
32 crate::operation::start_contact_evaluation::builders::StartContactEvaluationOutputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct StartContactEvaluationOutputBuilder {
40 pub(crate) evaluation_id: ::std::option::Option<::std::string::String>,
41 pub(crate) evaluation_arn: ::std::option::Option<::std::string::String>,
42 _request_id: Option<String>,
43}
44impl StartContactEvaluationOutputBuilder {
45 pub fn evaluation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.evaluation_id = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_evaluation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.evaluation_id = input;
54 self
55 }
56 pub fn get_evaluation_id(&self) -> &::std::option::Option<::std::string::String> {
58 &self.evaluation_id
59 }
60 pub fn evaluation_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
63 self.evaluation_arn = ::std::option::Option::Some(input.into());
64 self
65 }
66 pub fn set_evaluation_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
68 self.evaluation_arn = input;
69 self
70 }
71 pub fn get_evaluation_arn(&self) -> &::std::option::Option<::std::string::String> {
73 &self.evaluation_arn
74 }
75 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
76 self._request_id = Some(request_id.into());
77 self
78 }
79
80 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
81 self._request_id = request_id;
82 self
83 }
84 pub fn build(
89 self,
90 ) -> ::std::result::Result<
91 crate::operation::start_contact_evaluation::StartContactEvaluationOutput,
92 ::aws_smithy_types::error::operation::BuildError,
93 > {
94 ::std::result::Result::Ok(crate::operation::start_contact_evaluation::StartContactEvaluationOutput {
95 evaluation_id: self.evaluation_id.ok_or_else(|| {
96 ::aws_smithy_types::error::operation::BuildError::missing_field(
97 "evaluation_id",
98 "evaluation_id was not specified but it is required when building StartContactEvaluationOutput",
99 )
100 })?,
101 evaluation_arn: self.evaluation_arn.ok_or_else(|| {
102 ::aws_smithy_types::error::operation::BuildError::missing_field(
103 "evaluation_arn",
104 "evaluation_arn was not specified but it is required when building StartContactEvaluationOutput",
105 )
106 })?,
107 _request_id: self._request_id,
108 })
109 }
110}