Skip to main content

aws_sdk_lexmodelsv2/operation/start_import/
_start_import_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 StartImportOutput {
6    /// <p>A unique identifier for the import.</p>
7    pub import_id: ::std::option::Option<::std::string::String>,
8    /// <p>The parameters used when importing the resource.</p>
9    pub resource_specification: ::std::option::Option<crate::types::ImportResourceSpecification>,
10    /// <p>The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is <code>FailOnConflict</code> existing resources are not overwritten and the import fails.</p>
11    pub merge_strategy: ::std::option::Option<crate::types::MergeStrategy>,
12    /// <p>The current status of the import. When the status is <code>Complete</code> the bot, bot alias, or custom vocabulary is ready to use.</p>
13    pub import_status: ::std::option::Option<crate::types::ImportStatus>,
14    /// <p>The date and time that the import request was created.</p>
15    pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16    _request_id: Option<String>,
17}
18impl StartImportOutput {
19    /// <p>A unique identifier for the import.</p>
20    pub fn import_id(&self) -> ::std::option::Option<&str> {
21        self.import_id.as_deref()
22    }
23    /// <p>The parameters used when importing the resource.</p>
24    pub fn resource_specification(&self) -> ::std::option::Option<&crate::types::ImportResourceSpecification> {
25        self.resource_specification.as_ref()
26    }
27    /// <p>The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is <code>FailOnConflict</code> existing resources are not overwritten and the import fails.</p>
28    pub fn merge_strategy(&self) -> ::std::option::Option<&crate::types::MergeStrategy> {
29        self.merge_strategy.as_ref()
30    }
31    /// <p>The current status of the import. When the status is <code>Complete</code> the bot, bot alias, or custom vocabulary is ready to use.</p>
32    pub fn import_status(&self) -> ::std::option::Option<&crate::types::ImportStatus> {
33        self.import_status.as_ref()
34    }
35    /// <p>The date and time that the import request was created.</p>
36    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
37        self.creation_date_time.as_ref()
38    }
39}
40impl ::aws_types::request_id::RequestId for StartImportOutput {
41    fn request_id(&self) -> Option<&str> {
42        self._request_id.as_deref()
43    }
44}
45impl StartImportOutput {
46    /// Creates a new builder-style object to manufacture [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
47    pub fn builder() -> crate::operation::start_import::builders::StartImportOutputBuilder {
48        crate::operation::start_import::builders::StartImportOutputBuilder::default()
49    }
50}
51
52/// A builder for [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
53#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
54#[non_exhaustive]
55pub struct StartImportOutputBuilder {
56    pub(crate) import_id: ::std::option::Option<::std::string::String>,
57    pub(crate) resource_specification: ::std::option::Option<crate::types::ImportResourceSpecification>,
58    pub(crate) merge_strategy: ::std::option::Option<crate::types::MergeStrategy>,
59    pub(crate) import_status: ::std::option::Option<crate::types::ImportStatus>,
60    pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
61    _request_id: Option<String>,
62}
63impl StartImportOutputBuilder {
64    /// <p>A unique identifier for the import.</p>
65    pub fn import_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
66        self.import_id = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// <p>A unique identifier for the import.</p>
70    pub fn set_import_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.import_id = input;
72        self
73    }
74    /// <p>A unique identifier for the import.</p>
75    pub fn get_import_id(&self) -> &::std::option::Option<::std::string::String> {
76        &self.import_id
77    }
78    /// <p>The parameters used when importing the resource.</p>
79    pub fn resource_specification(mut self, input: crate::types::ImportResourceSpecification) -> Self {
80        self.resource_specification = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>The parameters used when importing the resource.</p>
84    pub fn set_resource_specification(mut self, input: ::std::option::Option<crate::types::ImportResourceSpecification>) -> Self {
85        self.resource_specification = input;
86        self
87    }
88    /// <p>The parameters used when importing the resource.</p>
89    pub fn get_resource_specification(&self) -> &::std::option::Option<crate::types::ImportResourceSpecification> {
90        &self.resource_specification
91    }
92    /// <p>The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is <code>FailOnConflict</code> existing resources are not overwritten and the import fails.</p>
93    pub fn merge_strategy(mut self, input: crate::types::MergeStrategy) -> Self {
94        self.merge_strategy = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is <code>FailOnConflict</code> existing resources are not overwritten and the import fails.</p>
98    pub fn set_merge_strategy(mut self, input: ::std::option::Option<crate::types::MergeStrategy>) -> Self {
99        self.merge_strategy = input;
100        self
101    }
102    /// <p>The strategy used when there was a name conflict between the imported resource and an existing resource. When the merge strategy is <code>FailOnConflict</code> existing resources are not overwritten and the import fails.</p>
103    pub fn get_merge_strategy(&self) -> &::std::option::Option<crate::types::MergeStrategy> {
104        &self.merge_strategy
105    }
106    /// <p>The current status of the import. When the status is <code>Complete</code> the bot, bot alias, or custom vocabulary is ready to use.</p>
107    pub fn import_status(mut self, input: crate::types::ImportStatus) -> Self {
108        self.import_status = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>The current status of the import. When the status is <code>Complete</code> the bot, bot alias, or custom vocabulary is ready to use.</p>
112    pub fn set_import_status(mut self, input: ::std::option::Option<crate::types::ImportStatus>) -> Self {
113        self.import_status = input;
114        self
115    }
116    /// <p>The current status of the import. When the status is <code>Complete</code> the bot, bot alias, or custom vocabulary is ready to use.</p>
117    pub fn get_import_status(&self) -> &::std::option::Option<crate::types::ImportStatus> {
118        &self.import_status
119    }
120    /// <p>The date and time that the import request was created.</p>
121    pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
122        self.creation_date_time = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>The date and time that the import request was created.</p>
126    pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
127        self.creation_date_time = input;
128        self
129    }
130    /// <p>The date and time that the import request was created.</p>
131    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
132        &self.creation_date_time
133    }
134    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
135        self._request_id = Some(request_id.into());
136        self
137    }
138
139    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
140        self._request_id = request_id;
141        self
142    }
143    /// Consumes the builder and constructs a [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
144    pub fn build(self) -> crate::operation::start_import::StartImportOutput {
145        crate::operation::start_import::StartImportOutput {
146            import_id: self.import_id,
147            resource_specification: self.resource_specification,
148            merge_strategy: self.merge_strategy,
149            import_status: self.import_status,
150            creation_date_time: self.creation_date_time,
151            _request_id: self._request_id,
152        }
153    }
154}