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
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Set of fields associated with a provisioned throughput.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ProvisionedModelSummary {
    /// <p>The name of the provisioned throughput.</p>
    pub provisioned_model_name: ::std::string::String,
    /// <p>The ARN of the provisioned throughput.</p>
    pub provisioned_model_arn: ::std::string::String,
    /// <p>The ARN of the model associated with this provisioned throughput.</p>
    pub model_arn: ::std::string::String,
    /// <p>Desired model ARN.</p>
    pub desired_model_arn: ::std::string::String,
    /// <p>Foundation model ARN.</p>
    pub foundation_model_arn: ::std::string::String,
    /// <p>The number of model units allocated.</p>
    pub model_units: i32,
    /// <p>Desired model units.</p>
    pub desired_model_units: i32,
    /// <p>Status of the provisioned throughput.</p>
    pub status: crate::types::ProvisionedModelStatus,
    /// <p>Commitment duration for the provisioned throughput.</p>
    pub commitment_duration: ::std::option::Option<crate::types::CommitmentDuration>,
    /// <p>Commitment expiration time for the provisioned throughput.</p>
    pub commitment_expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The time that this provisioned throughput was created.</p>
    pub creation_time: ::aws_smithy_types::DateTime,
    /// <p>The time that this provisioned throughput was last modified.</p>
    pub last_modified_time: ::aws_smithy_types::DateTime,
}
impl ProvisionedModelSummary {
    /// <p>The name of the provisioned throughput.</p>
    pub fn provisioned_model_name(&self) -> &str {
        use std::ops::Deref;
        self.provisioned_model_name.deref()
    }
    /// <p>The ARN of the provisioned throughput.</p>
    pub fn provisioned_model_arn(&self) -> &str {
        use std::ops::Deref;
        self.provisioned_model_arn.deref()
    }
    /// <p>The ARN of the model associated with this provisioned throughput.</p>
    pub fn model_arn(&self) -> &str {
        use std::ops::Deref;
        self.model_arn.deref()
    }
    /// <p>Desired model ARN.</p>
    pub fn desired_model_arn(&self) -> &str {
        use std::ops::Deref;
        self.desired_model_arn.deref()
    }
    /// <p>Foundation model ARN.</p>
    pub fn foundation_model_arn(&self) -> &str {
        use std::ops::Deref;
        self.foundation_model_arn.deref()
    }
    /// <p>The number of model units allocated.</p>
    pub fn model_units(&self) -> i32 {
        self.model_units
    }
    /// <p>Desired model units.</p>
    pub fn desired_model_units(&self) -> i32 {
        self.desired_model_units
    }
    /// <p>Status of the provisioned throughput.</p>
    pub fn status(&self) -> &crate::types::ProvisionedModelStatus {
        &self.status
    }
    /// <p>Commitment duration for the provisioned throughput.</p>
    pub fn commitment_duration(&self) -> ::std::option::Option<&crate::types::CommitmentDuration> {
        self.commitment_duration.as_ref()
    }
    /// <p>Commitment expiration time for the provisioned throughput.</p>
    pub fn commitment_expiration_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.commitment_expiration_time.as_ref()
    }
    /// <p>The time that this provisioned throughput was created.</p>
    pub fn creation_time(&self) -> &::aws_smithy_types::DateTime {
        &self.creation_time
    }
    /// <p>The time that this provisioned throughput was last modified.</p>
    pub fn last_modified_time(&self) -> &::aws_smithy_types::DateTime {
        &self.last_modified_time
    }
}
impl ProvisionedModelSummary {
    /// Creates a new builder-style object to manufacture [`ProvisionedModelSummary`](crate::types::ProvisionedModelSummary).
    pub fn builder() -> crate::types::builders::ProvisionedModelSummaryBuilder {
        crate::types::builders::ProvisionedModelSummaryBuilder::default()
    }
}

/// A builder for [`ProvisionedModelSummary`](crate::types::ProvisionedModelSummary).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ProvisionedModelSummaryBuilder {
    pub(crate) provisioned_model_name: ::std::option::Option<::std::string::String>,
    pub(crate) provisioned_model_arn: ::std::option::Option<::std::string::String>,
    pub(crate) model_arn: ::std::option::Option<::std::string::String>,
    pub(crate) desired_model_arn: ::std::option::Option<::std::string::String>,
    pub(crate) foundation_model_arn: ::std::option::Option<::std::string::String>,
    pub(crate) model_units: ::std::option::Option<i32>,
    pub(crate) desired_model_units: ::std::option::Option<i32>,
    pub(crate) status: ::std::option::Option<crate::types::ProvisionedModelStatus>,
    pub(crate) commitment_duration: ::std::option::Option<crate::types::CommitmentDuration>,
    pub(crate) commitment_expiration_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_modified_time: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ProvisionedModelSummaryBuilder {
    /// <p>The name of the provisioned throughput.</p>
    /// This field is required.
    pub fn provisioned_model_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.provisioned_model_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the provisioned throughput.</p>
    pub fn set_provisioned_model_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.provisioned_model_name = input;
        self
    }
    /// <p>The name of the provisioned throughput.</p>
    pub fn get_provisioned_model_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.provisioned_model_name
    }
    /// <p>The ARN of the provisioned throughput.</p>
    /// This field is required.
    pub fn provisioned_model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.provisioned_model_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the provisioned throughput.</p>
    pub fn set_provisioned_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.provisioned_model_arn = input;
        self
    }
    /// <p>The ARN of the provisioned throughput.</p>
    pub fn get_provisioned_model_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.provisioned_model_arn
    }
    /// <p>The ARN of the model associated with this provisioned throughput.</p>
    /// This field is required.
    pub fn model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.model_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the model associated with this provisioned throughput.</p>
    pub fn set_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.model_arn = input;
        self
    }
    /// <p>The ARN of the model associated with this provisioned throughput.</p>
    pub fn get_model_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.model_arn
    }
    /// <p>Desired model ARN.</p>
    /// This field is required.
    pub fn desired_model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.desired_model_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Desired model ARN.</p>
    pub fn set_desired_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.desired_model_arn = input;
        self
    }
    /// <p>Desired model ARN.</p>
    pub fn get_desired_model_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.desired_model_arn
    }
    /// <p>Foundation model ARN.</p>
    /// This field is required.
    pub fn foundation_model_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.foundation_model_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Foundation model ARN.</p>
    pub fn set_foundation_model_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.foundation_model_arn = input;
        self
    }
    /// <p>Foundation model ARN.</p>
    pub fn get_foundation_model_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.foundation_model_arn
    }
    /// <p>The number of model units allocated.</p>
    /// This field is required.
    pub fn model_units(mut self, input: i32) -> Self {
        self.model_units = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of model units allocated.</p>
    pub fn set_model_units(mut self, input: ::std::option::Option<i32>) -> Self {
        self.model_units = input;
        self
    }
    /// <p>The number of model units allocated.</p>
    pub fn get_model_units(&self) -> &::std::option::Option<i32> {
        &self.model_units
    }
    /// <p>Desired model units.</p>
    /// This field is required.
    pub fn desired_model_units(mut self, input: i32) -> Self {
        self.desired_model_units = ::std::option::Option::Some(input);
        self
    }
    /// <p>Desired model units.</p>
    pub fn set_desired_model_units(mut self, input: ::std::option::Option<i32>) -> Self {
        self.desired_model_units = input;
        self
    }
    /// <p>Desired model units.</p>
    pub fn get_desired_model_units(&self) -> &::std::option::Option<i32> {
        &self.desired_model_units
    }
    /// <p>Status of the provisioned throughput.</p>
    /// This field is required.
    pub fn status(mut self, input: crate::types::ProvisionedModelStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Status of the provisioned throughput.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ProvisionedModelStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>Status of the provisioned throughput.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ProvisionedModelStatus> {
        &self.status
    }
    /// <p>Commitment duration for the provisioned throughput.</p>
    pub fn commitment_duration(mut self, input: crate::types::CommitmentDuration) -> Self {
        self.commitment_duration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Commitment duration for the provisioned throughput.</p>
    pub fn set_commitment_duration(mut self, input: ::std::option::Option<crate::types::CommitmentDuration>) -> Self {
        self.commitment_duration = input;
        self
    }
    /// <p>Commitment duration for the provisioned throughput.</p>
    pub fn get_commitment_duration(&self) -> &::std::option::Option<crate::types::CommitmentDuration> {
        &self.commitment_duration
    }
    /// <p>Commitment expiration time for the provisioned throughput.</p>
    pub fn commitment_expiration_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.commitment_expiration_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>Commitment expiration time for the provisioned throughput.</p>
    pub fn set_commitment_expiration_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.commitment_expiration_time = input;
        self
    }
    /// <p>Commitment expiration time for the provisioned throughput.</p>
    pub fn get_commitment_expiration_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.commitment_expiration_time
    }
    /// <p>The time that this provisioned throughput was created.</p>
    /// This field is required.
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that this provisioned throughput was created.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>The time that this provisioned throughput was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The time that this provisioned throughput was last modified.</p>
    /// This field is required.
    pub fn last_modified_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_modified_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time that this provisioned throughput was last modified.</p>
    pub fn set_last_modified_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_modified_time = input;
        self
    }
    /// <p>The time that this provisioned throughput was last modified.</p>
    pub fn get_last_modified_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_modified_time
    }
    /// Consumes the builder and constructs a [`ProvisionedModelSummary`](crate::types::ProvisionedModelSummary).
    /// This method will fail if any of the following fields are not set:
    /// - [`provisioned_model_name`](crate::types::builders::ProvisionedModelSummaryBuilder::provisioned_model_name)
    /// - [`provisioned_model_arn`](crate::types::builders::ProvisionedModelSummaryBuilder::provisioned_model_arn)
    /// - [`model_arn`](crate::types::builders::ProvisionedModelSummaryBuilder::model_arn)
    /// - [`desired_model_arn`](crate::types::builders::ProvisionedModelSummaryBuilder::desired_model_arn)
    /// - [`foundation_model_arn`](crate::types::builders::ProvisionedModelSummaryBuilder::foundation_model_arn)
    /// - [`model_units`](crate::types::builders::ProvisionedModelSummaryBuilder::model_units)
    /// - [`desired_model_units`](crate::types::builders::ProvisionedModelSummaryBuilder::desired_model_units)
    /// - [`status`](crate::types::builders::ProvisionedModelSummaryBuilder::status)
    /// - [`creation_time`](crate::types::builders::ProvisionedModelSummaryBuilder::creation_time)
    /// - [`last_modified_time`](crate::types::builders::ProvisionedModelSummaryBuilder::last_modified_time)
    pub fn build(self) -> ::std::result::Result<crate::types::ProvisionedModelSummary, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::ProvisionedModelSummary {
            provisioned_model_name: self.provisioned_model_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "provisioned_model_name",
                    "provisioned_model_name was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            provisioned_model_arn: self.provisioned_model_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "provisioned_model_arn",
                    "provisioned_model_arn was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            model_arn: self.model_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "model_arn",
                    "model_arn was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            desired_model_arn: self.desired_model_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "desired_model_arn",
                    "desired_model_arn was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            foundation_model_arn: self.foundation_model_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "foundation_model_arn",
                    "foundation_model_arn was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            model_units: self.model_units.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "model_units",
                    "model_units was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            desired_model_units: self.desired_model_units.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "desired_model_units",
                    "desired_model_units was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            commitment_duration: self.commitment_duration,
            commitment_expiration_time: self.commitment_expiration_time,
            creation_time: self.creation_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "creation_time",
                    "creation_time was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
            last_modified_time: self.last_modified_time.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "last_modified_time",
                    "last_modified_time was not specified but it is required when building ProvisionedModelSummary",
                )
            })?,
        })
    }
}