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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>The request details.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ImportAssetFromApiGatewayApiRequestDetails {
    /// <p>The API description. Markdown supported.</p>
    pub api_description: ::std::option::Option<::std::string::String>,
    /// <p>The API Gateway API ID.</p>
    pub api_id: ::std::string::String,
    /// <p>The API Gateway API key.</p>
    pub api_key: ::std::option::Option<::std::string::String>,
    /// <p>The API name.</p>
    pub api_name: ::std::string::String,
    /// <p>The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.</p>
    pub api_specification_md5_hash: ::std::string::String,
    /// <p>The data set ID.</p>
    pub data_set_id: ::std::string::String,
    /// <p>The protocol type.</p>
    pub protocol_type: crate::types::ProtocolType,
    /// <p>The revision ID.</p>
    pub revision_id: ::std::string::String,
    /// <p>The API stage.</p>
    pub stage: ::std::string::String,
}
impl ImportAssetFromApiGatewayApiRequestDetails {
    /// <p>The API description. Markdown supported.</p>
    pub fn api_description(&self) -> ::std::option::Option<&str> {
        self.api_description.as_deref()
    }
    /// <p>The API Gateway API ID.</p>
    pub fn api_id(&self) -> &str {
        use std::ops::Deref;
        self.api_id.deref()
    }
    /// <p>The API Gateway API key.</p>
    pub fn api_key(&self) -> ::std::option::Option<&str> {
        self.api_key.as_deref()
    }
    /// <p>The API name.</p>
    pub fn api_name(&self) -> &str {
        use std::ops::Deref;
        self.api_name.deref()
    }
    /// <p>The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.</p>
    pub fn api_specification_md5_hash(&self) -> &str {
        use std::ops::Deref;
        self.api_specification_md5_hash.deref()
    }
    /// <p>The data set ID.</p>
    pub fn data_set_id(&self) -> &str {
        use std::ops::Deref;
        self.data_set_id.deref()
    }
    /// <p>The protocol type.</p>
    pub fn protocol_type(&self) -> &crate::types::ProtocolType {
        &self.protocol_type
    }
    /// <p>The revision ID.</p>
    pub fn revision_id(&self) -> &str {
        use std::ops::Deref;
        self.revision_id.deref()
    }
    /// <p>The API stage.</p>
    pub fn stage(&self) -> &str {
        use std::ops::Deref;
        self.stage.deref()
    }
}
impl ImportAssetFromApiGatewayApiRequestDetails {
    /// Creates a new builder-style object to manufacture [`ImportAssetFromApiGatewayApiRequestDetails`](crate::types::ImportAssetFromApiGatewayApiRequestDetails).
    pub fn builder() -> crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder {
        crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::default()
    }
}

/// A builder for [`ImportAssetFromApiGatewayApiRequestDetails`](crate::types::ImportAssetFromApiGatewayApiRequestDetails).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ImportAssetFromApiGatewayApiRequestDetailsBuilder {
    pub(crate) api_description: ::std::option::Option<::std::string::String>,
    pub(crate) api_id: ::std::option::Option<::std::string::String>,
    pub(crate) api_key: ::std::option::Option<::std::string::String>,
    pub(crate) api_name: ::std::option::Option<::std::string::String>,
    pub(crate) api_specification_md5_hash: ::std::option::Option<::std::string::String>,
    pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
    pub(crate) protocol_type: ::std::option::Option<crate::types::ProtocolType>,
    pub(crate) revision_id: ::std::option::Option<::std::string::String>,
    pub(crate) stage: ::std::option::Option<::std::string::String>,
}
impl ImportAssetFromApiGatewayApiRequestDetailsBuilder {
    /// <p>The API description. Markdown supported.</p>
    pub fn api_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.api_description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The API description. Markdown supported.</p>
    pub fn set_api_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.api_description = input;
        self
    }
    /// <p>The API description. Markdown supported.</p>
    pub fn get_api_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.api_description
    }
    /// <p>The API Gateway API ID.</p>
    /// This field is required.
    pub fn api_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.api_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The API Gateway API ID.</p>
    pub fn set_api_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.api_id = input;
        self
    }
    /// <p>The API Gateway API ID.</p>
    pub fn get_api_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.api_id
    }
    /// <p>The API Gateway API key.</p>
    pub fn api_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.api_key = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The API Gateway API key.</p>
    pub fn set_api_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.api_key = input;
        self
    }
    /// <p>The API Gateway API key.</p>
    pub fn get_api_key(&self) -> &::std::option::Option<::std::string::String> {
        &self.api_key
    }
    /// <p>The API name.</p>
    /// This field is required.
    pub fn api_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.api_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The API name.</p>
    pub fn set_api_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.api_name = input;
        self
    }
    /// <p>The API name.</p>
    pub fn get_api_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.api_name
    }
    /// <p>The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.</p>
    /// This field is required.
    pub fn api_specification_md5_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.api_specification_md5_hash = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.</p>
    pub fn set_api_specification_md5_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.api_specification_md5_hash = input;
        self
    }
    /// <p>The Base64-encoded MD5 hash of the OpenAPI 3.0 JSON API specification file. It is used to ensure the integrity of the file.</p>
    pub fn get_api_specification_md5_hash(&self) -> &::std::option::Option<::std::string::String> {
        &self.api_specification_md5_hash
    }
    /// <p>The data set ID.</p>
    /// This field is required.
    pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_set_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The data set ID.</p>
    pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_set_id = input;
        self
    }
    /// <p>The data set ID.</p>
    pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_set_id
    }
    /// <p>The protocol type.</p>
    /// This field is required.
    pub fn protocol_type(mut self, input: crate::types::ProtocolType) -> Self {
        self.protocol_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The protocol type.</p>
    pub fn set_protocol_type(mut self, input: ::std::option::Option<crate::types::ProtocolType>) -> Self {
        self.protocol_type = input;
        self
    }
    /// <p>The protocol type.</p>
    pub fn get_protocol_type(&self) -> &::std::option::Option<crate::types::ProtocolType> {
        &self.protocol_type
    }
    /// <p>The revision ID.</p>
    /// This field is required.
    pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.revision_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The revision ID.</p>
    pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.revision_id = input;
        self
    }
    /// <p>The revision ID.</p>
    pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.revision_id
    }
    /// <p>The API stage.</p>
    /// This field is required.
    pub fn stage(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.stage = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The API stage.</p>
    pub fn set_stage(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.stage = input;
        self
    }
    /// <p>The API stage.</p>
    pub fn get_stage(&self) -> &::std::option::Option<::std::string::String> {
        &self.stage
    }
    /// Consumes the builder and constructs a [`ImportAssetFromApiGatewayApiRequestDetails`](crate::types::ImportAssetFromApiGatewayApiRequestDetails).
    /// This method will fail if any of the following fields are not set:
    /// - [`api_id`](crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::api_id)
    /// - [`api_name`](crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::api_name)
    /// - [`api_specification_md5_hash`](crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::api_specification_md5_hash)
    /// - [`data_set_id`](crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::data_set_id)
    /// - [`protocol_type`](crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::protocol_type)
    /// - [`revision_id`](crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::revision_id)
    /// - [`stage`](crate::types::builders::ImportAssetFromApiGatewayApiRequestDetailsBuilder::stage)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::types::ImportAssetFromApiGatewayApiRequestDetails, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::ImportAssetFromApiGatewayApiRequestDetails {
            api_description: self.api_description,
            api_id: self.api_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "api_id",
                    "api_id was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
                )
            })?,
            api_key: self.api_key,
            api_name: self.api_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "api_name",
                    "api_name was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
                )
            })?,
            api_specification_md5_hash: self.api_specification_md5_hash.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "api_specification_md5_hash",
                    "api_specification_md5_hash was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
                )
            })?,
            data_set_id: self.data_set_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "data_set_id",
                    "data_set_id was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
                )
            })?,
            protocol_type: self.protocol_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "protocol_type",
                    "protocol_type was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
                )
            })?,
            revision_id: self.revision_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "revision_id",
                    "revision_id was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
                )
            })?,
            stage: self.stage.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "stage",
                    "stage was not specified but it is required when building ImportAssetFromApiGatewayApiRequestDetails",
                )
            })?,
        })
    }
}