aws_sdk_polly/operation/get_lexicon/
_get_lexicon_output.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 GetLexiconOutput {
6    /// <p>Lexicon object that provides name and the string content of the lexicon.</p>
7    pub lexicon: ::std::option::Option<crate::types::Lexicon>,
8    /// <p>Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.</p>
9    pub lexicon_attributes: ::std::option::Option<crate::types::LexiconAttributes>,
10    _request_id: Option<String>,
11}
12impl GetLexiconOutput {
13    /// <p>Lexicon object that provides name and the string content of the lexicon.</p>
14    pub fn lexicon(&self) -> ::std::option::Option<&crate::types::Lexicon> {
15        self.lexicon.as_ref()
16    }
17    /// <p>Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.</p>
18    pub fn lexicon_attributes(&self) -> ::std::option::Option<&crate::types::LexiconAttributes> {
19        self.lexicon_attributes.as_ref()
20    }
21}
22impl ::aws_types::request_id::RequestId for GetLexiconOutput {
23    fn request_id(&self) -> Option<&str> {
24        self._request_id.as_deref()
25    }
26}
27impl GetLexiconOutput {
28    /// Creates a new builder-style object to manufacture [`GetLexiconOutput`](crate::operation::get_lexicon::GetLexiconOutput).
29    pub fn builder() -> crate::operation::get_lexicon::builders::GetLexiconOutputBuilder {
30        crate::operation::get_lexicon::builders::GetLexiconOutputBuilder::default()
31    }
32}
33
34/// A builder for [`GetLexiconOutput`](crate::operation::get_lexicon::GetLexiconOutput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct GetLexiconOutputBuilder {
38    pub(crate) lexicon: ::std::option::Option<crate::types::Lexicon>,
39    pub(crate) lexicon_attributes: ::std::option::Option<crate::types::LexiconAttributes>,
40    _request_id: Option<String>,
41}
42impl GetLexiconOutputBuilder {
43    /// <p>Lexicon object that provides name and the string content of the lexicon.</p>
44    pub fn lexicon(mut self, input: crate::types::Lexicon) -> Self {
45        self.lexicon = ::std::option::Option::Some(input);
46        self
47    }
48    /// <p>Lexicon object that provides name and the string content of the lexicon.</p>
49    pub fn set_lexicon(mut self, input: ::std::option::Option<crate::types::Lexicon>) -> Self {
50        self.lexicon = input;
51        self
52    }
53    /// <p>Lexicon object that provides name and the string content of the lexicon.</p>
54    pub fn get_lexicon(&self) -> &::std::option::Option<crate::types::Lexicon> {
55        &self.lexicon
56    }
57    /// <p>Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.</p>
58    pub fn lexicon_attributes(mut self, input: crate::types::LexiconAttributes) -> Self {
59        self.lexicon_attributes = ::std::option::Option::Some(input);
60        self
61    }
62    /// <p>Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.</p>
63    pub fn set_lexicon_attributes(mut self, input: ::std::option::Option<crate::types::LexiconAttributes>) -> Self {
64        self.lexicon_attributes = input;
65        self
66    }
67    /// <p>Metadata of the lexicon, including phonetic alphabetic used, language code, lexicon ARN, number of lexemes defined in the lexicon, and size of lexicon in bytes.</p>
68    pub fn get_lexicon_attributes(&self) -> &::std::option::Option<crate::types::LexiconAttributes> {
69        &self.lexicon_attributes
70    }
71    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
72        self._request_id = Some(request_id.into());
73        self
74    }
75
76    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
77        self._request_id = request_id;
78        self
79    }
80    /// Consumes the builder and constructs a [`GetLexiconOutput`](crate::operation::get_lexicon::GetLexiconOutput).
81    pub fn build(self) -> crate::operation::get_lexicon::GetLexiconOutput {
82        crate::operation::get_lexicon::GetLexiconOutput {
83            lexicon: self.lexicon,
84            lexicon_attributes: self.lexicon_attributes,
85            _request_id: self._request_id,
86        }
87    }
88}