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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// 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, ::std::fmt::Debug)]
pub struct StartImportOutput {
    /// <p>A unique identifier for the import.</p>
    pub import_id: ::std::option::Option<::std::string::String>,
    /// <p>The parameters used when importing the resource.</p>
    pub resource_specification: ::std::option::Option<crate::types::ImportResourceSpecification>,
    /// <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>
    pub merge_strategy: ::std::option::Option<crate::types::MergeStrategy>,
    /// <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>
    pub import_status: ::std::option::Option<crate::types::ImportStatus>,
    /// <p>The date and time that the import request was created.</p>
    pub creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl StartImportOutput {
    /// <p>A unique identifier for the import.</p>
    pub fn import_id(&self) -> ::std::option::Option<&str> {
        self.import_id.as_deref()
    }
    /// <p>The parameters used when importing the resource.</p>
    pub fn resource_specification(&self) -> ::std::option::Option<&crate::types::ImportResourceSpecification> {
        self.resource_specification.as_ref()
    }
    /// <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>
    pub fn merge_strategy(&self) -> ::std::option::Option<&crate::types::MergeStrategy> {
        self.merge_strategy.as_ref()
    }
    /// <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>
    pub fn import_status(&self) -> ::std::option::Option<&crate::types::ImportStatus> {
        self.import_status.as_ref()
    }
    /// <p>The date and time that the import request was created.</p>
    pub fn creation_date_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_date_time.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for StartImportOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl StartImportOutput {
    /// Creates a new builder-style object to manufacture [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
    pub fn builder() -> crate::operation::start_import::builders::StartImportOutputBuilder {
        crate::operation::start_import::builders::StartImportOutputBuilder::default()
    }
}

/// A builder for [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct StartImportOutputBuilder {
    pub(crate) import_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_specification: ::std::option::Option<crate::types::ImportResourceSpecification>,
    pub(crate) merge_strategy: ::std::option::Option<crate::types::MergeStrategy>,
    pub(crate) import_status: ::std::option::Option<crate::types::ImportStatus>,
    pub(crate) creation_date_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl StartImportOutputBuilder {
    /// <p>A unique identifier for the import.</p>
    pub fn import_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.import_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A unique identifier for the import.</p>
    pub fn set_import_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.import_id = input;
        self
    }
    /// <p>A unique identifier for the import.</p>
    pub fn get_import_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.import_id
    }
    /// <p>The parameters used when importing the resource.</p>
    pub fn resource_specification(mut self, input: crate::types::ImportResourceSpecification) -> Self {
        self.resource_specification = ::std::option::Option::Some(input);
        self
    }
    /// <p>The parameters used when importing the resource.</p>
    pub fn set_resource_specification(mut self, input: ::std::option::Option<crate::types::ImportResourceSpecification>) -> Self {
        self.resource_specification = input;
        self
    }
    /// <p>The parameters used when importing the resource.</p>
    pub fn get_resource_specification(&self) -> &::std::option::Option<crate::types::ImportResourceSpecification> {
        &self.resource_specification
    }
    /// <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>
    pub fn merge_strategy(mut self, input: crate::types::MergeStrategy) -> Self {
        self.merge_strategy = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_merge_strategy(mut self, input: ::std::option::Option<crate::types::MergeStrategy>) -> Self {
        self.merge_strategy = input;
        self
    }
    /// <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>
    pub fn get_merge_strategy(&self) -> &::std::option::Option<crate::types::MergeStrategy> {
        &self.merge_strategy
    }
    /// <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>
    pub fn import_status(mut self, input: crate::types::ImportStatus) -> Self {
        self.import_status = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_import_status(mut self, input: ::std::option::Option<crate::types::ImportStatus>) -> Self {
        self.import_status = input;
        self
    }
    /// <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>
    pub fn get_import_status(&self) -> &::std::option::Option<crate::types::ImportStatus> {
        &self.import_status
    }
    /// <p>The date and time that the import request was created.</p>
    pub fn creation_date_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_date_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time that the import request was created.</p>
    pub fn set_creation_date_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_date_time = input;
        self
    }
    /// <p>The date and time that the import request was created.</p>
    pub fn get_creation_date_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_date_time
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`StartImportOutput`](crate::operation::start_import::StartImportOutput).
    pub fn build(self) -> crate::operation::start_import::StartImportOutput {
        crate::operation::start_import::StartImportOutput {
            import_id: self.import_id,
            resource_specification: self.resource_specification,
            merge_strategy: self.merge_strategy,
            import_status: self.import_status,
            creation_date_time: self.creation_date_time,
            _request_id: self._request_id,
        }
    }
}