aws_sdk_translate/operation/get_terminology/
_get_terminology_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 GetTerminologyOutput {
6    /// <p>The properties of the custom terminology being retrieved.</p>
7    pub terminology_properties: ::std::option::Option<crate::types::TerminologyProperties>,
8    /// <p>The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.</p><important>
9    /// <p>Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.</p>
10    /// <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it.</p>
11    /// <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
12    /// </important>
13    pub terminology_data_location: ::std::option::Option<crate::types::TerminologyDataLocation>,
14    /// <p>The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30-minute expiration.</p>
15    pub auxiliary_data_location: ::std::option::Option<crate::types::TerminologyDataLocation>,
16    _request_id: Option<String>,
17}
18impl GetTerminologyOutput {
19    /// <p>The properties of the custom terminology being retrieved.</p>
20    pub fn terminology_properties(&self) -> ::std::option::Option<&crate::types::TerminologyProperties> {
21        self.terminology_properties.as_ref()
22    }
23    /// <p>The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.</p><important>
24    /// <p>Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.</p>
25    /// <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it.</p>
26    /// <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
27    /// </important>
28    pub fn terminology_data_location(&self) -> ::std::option::Option<&crate::types::TerminologyDataLocation> {
29        self.terminology_data_location.as_ref()
30    }
31    /// <p>The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30-minute expiration.</p>
32    pub fn auxiliary_data_location(&self) -> ::std::option::Option<&crate::types::TerminologyDataLocation> {
33        self.auxiliary_data_location.as_ref()
34    }
35}
36impl ::aws_types::request_id::RequestId for GetTerminologyOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl GetTerminologyOutput {
42    /// Creates a new builder-style object to manufacture [`GetTerminologyOutput`](crate::operation::get_terminology::GetTerminologyOutput).
43    pub fn builder() -> crate::operation::get_terminology::builders::GetTerminologyOutputBuilder {
44        crate::operation::get_terminology::builders::GetTerminologyOutputBuilder::default()
45    }
46}
47
48/// A builder for [`GetTerminologyOutput`](crate::operation::get_terminology::GetTerminologyOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct GetTerminologyOutputBuilder {
52    pub(crate) terminology_properties: ::std::option::Option<crate::types::TerminologyProperties>,
53    pub(crate) terminology_data_location: ::std::option::Option<crate::types::TerminologyDataLocation>,
54    pub(crate) auxiliary_data_location: ::std::option::Option<crate::types::TerminologyDataLocation>,
55    _request_id: Option<String>,
56}
57impl GetTerminologyOutputBuilder {
58    /// <p>The properties of the custom terminology being retrieved.</p>
59    pub fn terminology_properties(mut self, input: crate::types::TerminologyProperties) -> Self {
60        self.terminology_properties = ::std::option::Option::Some(input);
61        self
62    }
63    /// <p>The properties of the custom terminology being retrieved.</p>
64    pub fn set_terminology_properties(mut self, input: ::std::option::Option<crate::types::TerminologyProperties>) -> Self {
65        self.terminology_properties = input;
66        self
67    }
68    /// <p>The properties of the custom terminology being retrieved.</p>
69    pub fn get_terminology_properties(&self) -> &::std::option::Option<crate::types::TerminologyProperties> {
70        &self.terminology_properties
71    }
72    /// <p>The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.</p><important>
73    /// <p>Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.</p>
74    /// <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it.</p>
75    /// <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
76    /// </important>
77    pub fn terminology_data_location(mut self, input: crate::types::TerminologyDataLocation) -> Self {
78        self.terminology_data_location = ::std::option::Option::Some(input);
79        self
80    }
81    /// <p>The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.</p><important>
82    /// <p>Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.</p>
83    /// <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it.</p>
84    /// <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
85    /// </important>
86    pub fn set_terminology_data_location(mut self, input: ::std::option::Option<crate::types::TerminologyDataLocation>) -> Self {
87        self.terminology_data_location = input;
88        self
89    }
90    /// <p>The Amazon S3 location of the most recent custom terminology input file that was successfully imported into Amazon Translate. The location is returned as a presigned URL that has a 30-minute expiration.</p><important>
91    /// <p>Amazon Translate doesn't scan all input files for the risk of CSV injection attacks.</p>
92    /// <p>CSV injection occurs when a .csv or .tsv file is altered so that a record contains malicious code. The record begins with a special character, such as =, +, -, or @. When the file is opened in a spreadsheet program, the program might interpret the record as a formula and run the code within it.</p>
93    /// <p>Before you download an input file from Amazon S3, ensure that you recognize the file and trust its creator.</p>
94    /// </important>
95    pub fn get_terminology_data_location(&self) -> &::std::option::Option<crate::types::TerminologyDataLocation> {
96        &self.terminology_data_location
97    }
98    /// <p>The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30-minute expiration.</p>
99    pub fn auxiliary_data_location(mut self, input: crate::types::TerminologyDataLocation) -> Self {
100        self.auxiliary_data_location = ::std::option::Option::Some(input);
101        self
102    }
103    /// <p>The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30-minute expiration.</p>
104    pub fn set_auxiliary_data_location(mut self, input: ::std::option::Option<crate::types::TerminologyDataLocation>) -> Self {
105        self.auxiliary_data_location = input;
106        self
107    }
108    /// <p>The Amazon S3 location of a file that provides any errors or warnings that were produced by your input file. This file was created when Amazon Translate attempted to create a terminology resource. The location is returned as a presigned URL to that has a 30-minute expiration.</p>
109    pub fn get_auxiliary_data_location(&self) -> &::std::option::Option<crate::types::TerminologyDataLocation> {
110        &self.auxiliary_data_location
111    }
112    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
113        self._request_id = Some(request_id.into());
114        self
115    }
116
117    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
118        self._request_id = request_id;
119        self
120    }
121    /// Consumes the builder and constructs a [`GetTerminologyOutput`](crate::operation::get_terminology::GetTerminologyOutput).
122    pub fn build(self) -> crate::operation::get_terminology::GetTerminologyOutput {
123        crate::operation::get_terminology::GetTerminologyOutput {
124            terminology_properties: self.terminology_properties,
125            terminology_data_location: self.terminology_data_location,
126            auxiliary_data_location: self.auxiliary_data_location,
127            _request_id: self._request_id,
128        }
129    }
130}