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
87
88
89
90
91
// 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)]
pub struct DetectSyntaxInput {
    /// <p>A UTF-8 string. The maximum string size is 5 KB.</p>
    pub text: ::std::option::Option<::std::string::String>,
    /// <p>The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").</p>
    pub language_code: ::std::option::Option<crate::types::SyntaxLanguageCode>,
}
impl DetectSyntaxInput {
    /// <p>A UTF-8 string. The maximum string size is 5 KB.</p>
    pub fn text(&self) -> ::std::option::Option<&str> {
        self.text.as_deref()
    }
    /// <p>The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").</p>
    pub fn language_code(&self) -> ::std::option::Option<&crate::types::SyntaxLanguageCode> {
        self.language_code.as_ref()
    }
}
impl ::std::fmt::Debug for DetectSyntaxInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("DetectSyntaxInput");
        formatter.field("text", &"*** Sensitive Data Redacted ***");
        formatter.field("language_code", &self.language_code);
        formatter.finish()
    }
}
impl DetectSyntaxInput {
    /// Creates a new builder-style object to manufacture [`DetectSyntaxInput`](crate::operation::detect_syntax::DetectSyntaxInput).
    pub fn builder() -> crate::operation::detect_syntax::builders::DetectSyntaxInputBuilder {
        crate::operation::detect_syntax::builders::DetectSyntaxInputBuilder::default()
    }
}

/// A builder for [`DetectSyntaxInput`](crate::operation::detect_syntax::DetectSyntaxInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct DetectSyntaxInputBuilder {
    pub(crate) text: ::std::option::Option<::std::string::String>,
    pub(crate) language_code: ::std::option::Option<crate::types::SyntaxLanguageCode>,
}
impl DetectSyntaxInputBuilder {
    /// <p>A UTF-8 string. The maximum string size is 5 KB.</p>
    /// This field is required.
    pub fn text(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.text = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A UTF-8 string. The maximum string size is 5 KB.</p>
    pub fn set_text(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.text = input;
        self
    }
    /// <p>A UTF-8 string. The maximum string size is 5 KB.</p>
    pub fn get_text(&self) -> &::std::option::Option<::std::string::String> {
        &self.text
    }
    /// <p>The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").</p>
    /// This field is required.
    pub fn language_code(mut self, input: crate::types::SyntaxLanguageCode) -> Self {
        self.language_code = ::std::option::Option::Some(input);
        self
    }
    /// <p>The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").</p>
    pub fn set_language_code(mut self, input: ::std::option::Option<crate::types::SyntaxLanguageCode>) -> Self {
        self.language_code = input;
        self
    }
    /// <p>The language code of the input documents. You can specify any of the following languages supported by Amazon Comprehend: German ("de"), English ("en"), Spanish ("es"), French ("fr"), Italian ("it"), or Portuguese ("pt").</p>
    pub fn get_language_code(&self) -> &::std::option::Option<crate::types::SyntaxLanguageCode> {
        &self.language_code
    }
    /// Consumes the builder and constructs a [`DetectSyntaxInput`](crate::operation::detect_syntax::DetectSyntaxInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::detect_syntax::DetectSyntaxInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::detect_syntax::DetectSyntaxInput {
            text: self.text,
            language_code: self.language_code,
        })
    }
}
impl ::std::fmt::Debug for DetectSyntaxInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("DetectSyntaxInputBuilder");
        formatter.field("text", &"*** Sensitive Data Redacted ***");
        formatter.field("language_code", &self.language_code);
        formatter.finish()
    }
}