aws_sdk_textract/types/
_human_loop_activation_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Shows the results of the human in the loop evaluation. If there is no HumanLoopArn, the input did not trigger human review.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct HumanLoopActivationOutput {
7    /// <p>The Amazon Resource Name (ARN) of the HumanLoop created.</p>
8    pub human_loop_arn: ::std::option::Option<::std::string::String>,
9    /// <p>Shows if and why human review was needed.</p>
10    pub human_loop_activation_reasons: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
11    /// <p>Shows the result of condition evaluations, including those conditions which activated a human review.</p>
12    pub human_loop_activation_conditions_evaluation_results: ::std::option::Option<::std::string::String>,
13}
14impl HumanLoopActivationOutput {
15    /// <p>The Amazon Resource Name (ARN) of the HumanLoop created.</p>
16    pub fn human_loop_arn(&self) -> ::std::option::Option<&str> {
17        self.human_loop_arn.as_deref()
18    }
19    /// <p>Shows if and why human review was needed.</p>
20    ///
21    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.human_loop_activation_reasons.is_none()`.
22    pub fn human_loop_activation_reasons(&self) -> &[::std::string::String] {
23        self.human_loop_activation_reasons.as_deref().unwrap_or_default()
24    }
25    /// <p>Shows the result of condition evaluations, including those conditions which activated a human review.</p>
26    pub fn human_loop_activation_conditions_evaluation_results(&self) -> ::std::option::Option<&str> {
27        self.human_loop_activation_conditions_evaluation_results.as_deref()
28    }
29}
30impl HumanLoopActivationOutput {
31    /// Creates a new builder-style object to manufacture [`HumanLoopActivationOutput`](crate::types::HumanLoopActivationOutput).
32    pub fn builder() -> crate::types::builders::HumanLoopActivationOutputBuilder {
33        crate::types::builders::HumanLoopActivationOutputBuilder::default()
34    }
35}
36
37/// A builder for [`HumanLoopActivationOutput`](crate::types::HumanLoopActivationOutput).
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
39#[non_exhaustive]
40pub struct HumanLoopActivationOutputBuilder {
41    pub(crate) human_loop_arn: ::std::option::Option<::std::string::String>,
42    pub(crate) human_loop_activation_reasons: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
43    pub(crate) human_loop_activation_conditions_evaluation_results: ::std::option::Option<::std::string::String>,
44}
45impl HumanLoopActivationOutputBuilder {
46    /// <p>The Amazon Resource Name (ARN) of the HumanLoop created.</p>
47    pub fn human_loop_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48        self.human_loop_arn = ::std::option::Option::Some(input.into());
49        self
50    }
51    /// <p>The Amazon Resource Name (ARN) of the HumanLoop created.</p>
52    pub fn set_human_loop_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53        self.human_loop_arn = input;
54        self
55    }
56    /// <p>The Amazon Resource Name (ARN) of the HumanLoop created.</p>
57    pub fn get_human_loop_arn(&self) -> &::std::option::Option<::std::string::String> {
58        &self.human_loop_arn
59    }
60    /// Appends an item to `human_loop_activation_reasons`.
61    ///
62    /// To override the contents of this collection use [`set_human_loop_activation_reasons`](Self::set_human_loop_activation_reasons).
63    ///
64    /// <p>Shows if and why human review was needed.</p>
65    pub fn human_loop_activation_reasons(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        let mut v = self.human_loop_activation_reasons.unwrap_or_default();
67        v.push(input.into());
68        self.human_loop_activation_reasons = ::std::option::Option::Some(v);
69        self
70    }
71    /// <p>Shows if and why human review was needed.</p>
72    pub fn set_human_loop_activation_reasons(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
73        self.human_loop_activation_reasons = input;
74        self
75    }
76    /// <p>Shows if and why human review was needed.</p>
77    pub fn get_human_loop_activation_reasons(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
78        &self.human_loop_activation_reasons
79    }
80    /// <p>Shows the result of condition evaluations, including those conditions which activated a human review.</p>
81    pub fn human_loop_activation_conditions_evaluation_results(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.human_loop_activation_conditions_evaluation_results = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>Shows the result of condition evaluations, including those conditions which activated a human review.</p>
86    pub fn set_human_loop_activation_conditions_evaluation_results(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.human_loop_activation_conditions_evaluation_results = input;
88        self
89    }
90    /// <p>Shows the result of condition evaluations, including those conditions which activated a human review.</p>
91    pub fn get_human_loop_activation_conditions_evaluation_results(&self) -> &::std::option::Option<::std::string::String> {
92        &self.human_loop_activation_conditions_evaluation_results
93    }
94    /// Consumes the builder and constructs a [`HumanLoopActivationOutput`](crate::types::HumanLoopActivationOutput).
95    pub fn build(self) -> crate::types::HumanLoopActivationOutput {
96        crate::types::HumanLoopActivationOutput {
97            human_loop_arn: self.human_loop_arn,
98            human_loop_activation_reasons: self.human_loop_activation_reasons,
99            human_loop_activation_conditions_evaluation_results: self.human_loop_activation_conditions_evaluation_results,
100        }
101    }
102}