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
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The resolved ontology version's metadata and template, and the ontology's status. With <code>sourceFormat</code>, the response carries no template, and <code>source</code> carries the version's source document, or the draft on a DRAFT, with or without <code>version</code>. A DRAFT also returns <code>revisionId</code>, and the draft's warnings in <code>validationIssues</code>.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct GetOntologyOutput {
/// <p>The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.</p>
pub arn: ::std::string::String,
/// <p>The version of the ontology, in MAJOR.MINOR.PATCH form, for example <code>1.0.0</code>.</p>
pub version: ::std::string::String,
/// <p>The serialized template JSON for this version (see OntologyTemplate).</p>
pub template: ::std::option::Option<::std::string::String>,
/// <p>When this version was created. Absent when the stored version carries no creation time.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.</p>
pub published_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.</p>
pub name: ::std::option::Option<::std::string::String>,
/// <p>The ontology's description. The same for every version. Absent when the ontology has none.</p>
pub description: ::std::option::Option<::std::string::String>,
/// <p>Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.</p>
pub derivation_version: ::std::option::Option<::std::string::String>,
/// <p>The ID of the ontology, assigned by AWS Context.</p>
pub id: ::std::string::String,
/// <p>The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.</p>
pub status: crate::types::OntologyStatus,
/// <p>When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level <code>createdAt</code> (from the version fields) is the returned version's creation time, not the ontology's.</p>
pub updated_at: ::aws_smithy_types::DateTime,
/// <p>The induction that made the ontology. Absent for an ontology CreateOntology made.</p>
pub ontology_induction_id: ::std::option::Option<::std::string::String>,
/// <p>The source document of the returned version, or the draft of a <code>DRAFT</code> ontology, with or without <code>version</code>. Set only when the request set <code>sourceFormat</code>. Absent otherwise.</p>
pub source: ::std::option::Option<::std::string::String>,
/// <p>The format of the version's source document. On a <code>DRAFT</code>, <code>TURTLE</code>, the format of the draft. Set whether or not the request asked for <code>source</code>, and a <code>source</code> in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see <code>sourceFormat</code> on the request).</p>
pub source_format: ::std::option::Option<crate::types::OntologySourceFormat>,
/// <p>The revision of the draft. Set only for a DRAFT ontology.</p>
pub revision_id: ::std::option::Option<::std::string::String>,
/// <p>Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.</p>
pub validation_issues: ::std::option::Option<::std::vec::Vec<crate::types::OntologyValidationIssue>>,
_request_id: Option<String>,
}
impl GetOntologyOutput {
/// <p>The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.</p>
pub fn arn(&self) -> &str {
use std::ops::Deref;
self.arn.deref()
}
/// <p>The version of the ontology, in MAJOR.MINOR.PATCH form, for example <code>1.0.0</code>.</p>
pub fn version(&self) -> &str {
use std::ops::Deref;
self.version.deref()
}
/// <p>The serialized template JSON for this version (see OntologyTemplate).</p>
pub fn template(&self) -> ::std::option::Option<&str> {
self.template.as_deref()
}
/// <p>When this version was created. Absent when the stored version carries no creation time.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.</p>
pub fn published_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.published_at.as_ref()
}
/// <p>The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.</p>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>The ontology's description. The same for every version. Absent when the ontology has none.</p>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.</p>
pub fn derivation_version(&self) -> ::std::option::Option<&str> {
self.derivation_version.as_deref()
}
/// <p>The ID of the ontology, assigned by AWS Context.</p>
pub fn id(&self) -> &str {
use std::ops::Deref;
self.id.deref()
}
/// <p>The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.</p>
pub fn status(&self) -> &crate::types::OntologyStatus {
&self.status
}
/// <p>When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level <code>createdAt</code> (from the version fields) is the returned version's creation time, not the ontology's.</p>
pub fn updated_at(&self) -> &::aws_smithy_types::DateTime {
&self.updated_at
}
/// <p>The induction that made the ontology. Absent for an ontology CreateOntology made.</p>
pub fn ontology_induction_id(&self) -> ::std::option::Option<&str> {
self.ontology_induction_id.as_deref()
}
/// <p>The source document of the returned version, or the draft of a <code>DRAFT</code> ontology, with or without <code>version</code>. Set only when the request set <code>sourceFormat</code>. Absent otherwise.</p>
pub fn source(&self) -> ::std::option::Option<&str> {
self.source.as_deref()
}
/// <p>The format of the version's source document. On a <code>DRAFT</code>, <code>TURTLE</code>, the format of the draft. Set whether or not the request asked for <code>source</code>, and a <code>source</code> in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see <code>sourceFormat</code> on the request).</p>
pub fn source_format(&self) -> ::std::option::Option<&crate::types::OntologySourceFormat> {
self.source_format.as_ref()
}
/// <p>The revision of the draft. Set only for a DRAFT ontology.</p>
pub fn revision_id(&self) -> ::std::option::Option<&str> {
self.revision_id.as_deref()
}
/// <p>Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.validation_issues.is_none()`.
pub fn validation_issues(&self) -> &[crate::types::OntologyValidationIssue] {
self.validation_issues.as_deref().unwrap_or_default()
}
}
impl ::std::fmt::Debug for GetOntologyOutput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetOntologyOutput");
formatter.field("arn", &self.arn);
formatter.field("version", &self.version);
formatter.field("template", &"*** Sensitive Data Redacted ***");
formatter.field("created_at", &self.created_at);
formatter.field("published_at", &self.published_at);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("derivation_version", &self.derivation_version);
formatter.field("id", &self.id);
formatter.field("status", &self.status);
formatter.field("updated_at", &self.updated_at);
formatter.field("ontology_induction_id", &self.ontology_induction_id);
formatter.field("source", &"*** Sensitive Data Redacted ***");
formatter.field("source_format", &self.source_format);
formatter.field("revision_id", &self.revision_id);
formatter.field("validation_issues", &self.validation_issues);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}
impl ::aws_types::request_id::RequestId for GetOntologyOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl GetOntologyOutput {
/// Creates a new builder-style object to manufacture [`GetOntologyOutput`](crate::operation::get_ontology::GetOntologyOutput).
pub fn builder() -> crate::operation::get_ontology::builders::GetOntologyOutputBuilder {
crate::operation::get_ontology::builders::GetOntologyOutputBuilder::default()
}
}
/// A builder for [`GetOntologyOutput`](crate::operation::get_ontology::GetOntologyOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct GetOntologyOutputBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) version: ::std::option::Option<::std::string::String>,
pub(crate) template: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) published_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) derivation_version: ::std::option::Option<::std::string::String>,
pub(crate) id: ::std::option::Option<::std::string::String>,
pub(crate) status: ::std::option::Option<crate::types::OntologyStatus>,
pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) ontology_induction_id: ::std::option::Option<::std::string::String>,
pub(crate) source: ::std::option::Option<::std::string::String>,
pub(crate) source_format: ::std::option::Option<crate::types::OntologySourceFormat>,
pub(crate) revision_id: ::std::option::Option<::std::string::String>,
pub(crate) validation_issues: ::std::option::Option<::std::vec::Vec<crate::types::OntologyValidationIssue>>,
_request_id: Option<String>,
}
impl GetOntologyOutputBuilder {
/// <p>The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.</p>
/// This field is required.
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.</p>
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
/// <p>The ARN of the ontology. It has no account for an AWS managed ontology, and includes the account for a customer-owned one. Use it to address the same ontology again.</p>
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
/// <p>The version of the ontology, in MAJOR.MINOR.PATCH form, for example <code>1.0.0</code>.</p>
/// This field is required.
pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
/// <p>The version of the ontology, in MAJOR.MINOR.PATCH form, for example <code>1.0.0</code>.</p>
pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input;
self
}
/// <p>The version of the ontology, in MAJOR.MINOR.PATCH form, for example <code>1.0.0</code>.</p>
pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
/// <p>The serialized template JSON for this version (see OntologyTemplate).</p>
pub fn template(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.template = ::std::option::Option::Some(input.into());
self
}
/// <p>The serialized template JSON for this version (see OntologyTemplate).</p>
pub fn set_template(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.template = input;
self
}
/// <p>The serialized template JSON for this version (see OntologyTemplate).</p>
pub fn get_template(&self) -> &::std::option::Option<::std::string::String> {
&self.template
}
/// <p>When this version was created. Absent when the stored version carries no creation time.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>When this version was created. Absent when the stored version carries no creation time.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>When this version was created. Absent when the stored version carries no creation time.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.</p>
pub fn published_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.published_at = ::std::option::Option::Some(input);
self
}
/// <p>Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.</p>
pub fn set_published_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.published_at = input;
self
}
/// <p>Publish time of the DEFAULT version. Absent for non-default versions, and while the ontology is DRAFT: a DRAFT ontology stays a draft until you publish it in the AWS Context console.</p>
pub fn get_published_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.published_at
}
/// <p>The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.</p>
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.</p>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The ontology's current display name. The same for every version. Absent for an AWS managed ontology, which has no name, and for a customer-owned ontology that was created without a name and hasn't been named since.</p>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>The ontology's description. The same for every version. Absent when the ontology has none.</p>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>The ontology's description. The same for every version. Absent when the ontology has none.</p>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>The ontology's description. The same for every version. Absent when the ontology has none.</p>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.</p>
pub fn derivation_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.derivation_version = ::std::option::Option::Some(input.into());
self
}
/// <p>Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.</p>
pub fn set_derivation_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.derivation_version = input;
self
}
/// <p>Identifies the derivation rules that produced this template. Node ID formulas don't change after a version is published.</p>
pub fn get_derivation_version(&self) -> &::std::option::Option<::std::string::String> {
&self.derivation_version
}
/// <p>The ID of the ontology, assigned by AWS Context.</p>
/// This field is required.
pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.id = ::std::option::Option::Some(input.into());
self
}
/// <p>The ID of the ontology, assigned by AWS Context.</p>
pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.id = input;
self
}
/// <p>The ID of the ontology, assigned by AWS Context.</p>
pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
&self.id
}
/// <p>The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.</p>
/// This field is required.
pub fn status(mut self, input: crate::types::OntologyStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::OntologyStatus>) -> Self {
self.status = input;
self
}
/// <p>The ontology's status. PUBLISHED for every ontology CreateOntology made. Check it before using the template: a DRAFT ontology stays a draft until you publish it in the AWS Context console, and until then its template is the empty template of version 1.0.0 and GetOntology returns the draft.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::OntologyStatus> {
&self.status
}
/// <p>When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level <code>createdAt</code> (from the version fields) is the returned version's creation time, not the ontology's.</p>
/// This field is required.
pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.updated_at = ::std::option::Option::Some(input);
self
}
/// <p>When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level <code>createdAt</code> (from the version fields) is the returned version's creation time, not the ontology's.</p>
pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.updated_at = input;
self
}
/// <p>When the ontology itself last changed. Equal to the ontology's creation time until the first update. The top-level <code>createdAt</code> (from the version fields) is the returned version's creation time, not the ontology's.</p>
pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.updated_at
}
/// <p>The induction that made the ontology. Absent for an ontology CreateOntology made.</p>
pub fn ontology_induction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ontology_induction_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The induction that made the ontology. Absent for an ontology CreateOntology made.</p>
pub fn set_ontology_induction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ontology_induction_id = input;
self
}
/// <p>The induction that made the ontology. Absent for an ontology CreateOntology made.</p>
pub fn get_ontology_induction_id(&self) -> &::std::option::Option<::std::string::String> {
&self.ontology_induction_id
}
/// <p>The source document of the returned version, or the draft of a <code>DRAFT</code> ontology, with or without <code>version</code>. Set only when the request set <code>sourceFormat</code>. Absent otherwise.</p>
pub fn source(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.source = ::std::option::Option::Some(input.into());
self
}
/// <p>The source document of the returned version, or the draft of a <code>DRAFT</code> ontology, with or without <code>version</code>. Set only when the request set <code>sourceFormat</code>. Absent otherwise.</p>
pub fn set_source(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.source = input;
self
}
/// <p>The source document of the returned version, or the draft of a <code>DRAFT</code> ontology, with or without <code>version</code>. Set only when the request set <code>sourceFormat</code>. Absent otherwise.</p>
pub fn get_source(&self) -> &::std::option::Option<::std::string::String> {
&self.source
}
/// <p>The format of the version's source document. On a <code>DRAFT</code>, <code>TURTLE</code>, the format of the draft. Set whether or not the request asked for <code>source</code>, and a <code>source</code> in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see <code>sourceFormat</code> on the request).</p>
pub fn source_format(mut self, input: crate::types::OntologySourceFormat) -> Self {
self.source_format = ::std::option::Option::Some(input);
self
}
/// <p>The format of the version's source document. On a <code>DRAFT</code>, <code>TURTLE</code>, the format of the draft. Set whether or not the request asked for <code>source</code>, and a <code>source</code> in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see <code>sourceFormat</code> on the request).</p>
pub fn set_source_format(mut self, input: ::std::option::Option<crate::types::OntologySourceFormat>) -> Self {
self.source_format = input;
self
}
/// <p>The format of the version's source document. On a <code>DRAFT</code>, <code>TURTLE</code>, the format of the draft. Set whether or not the request asked for <code>source</code>, and a <code>source</code> in the response is in this format. On an AWS managed ontology, it names the format that its template was derived from, but its source is never returned (see <code>sourceFormat</code> on the request).</p>
pub fn get_source_format(&self) -> &::std::option::Option<crate::types::OntologySourceFormat> {
&self.source_format
}
/// <p>The revision of the draft. Set only for a DRAFT ontology.</p>
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 of the draft. Set only for a DRAFT ontology.</p>
pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision_id = input;
self
}
/// <p>The revision of the draft. Set only for a DRAFT ontology.</p>
pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
&self.revision_id
}
/// Appends an item to `validation_issues`.
///
/// To override the contents of this collection use [`set_validation_issues`](Self::set_validation_issues).
///
/// <p>Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.</p>
pub fn validation_issues(mut self, input: crate::types::OntologyValidationIssue) -> Self {
let mut v = self.validation_issues.unwrap_or_default();
v.push(input);
self.validation_issues = ::std::option::Option::Some(v);
self
}
/// <p>Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.</p>
pub fn set_validation_issues(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::OntologyValidationIssue>>) -> Self {
self.validation_issues = input;
self
}
/// <p>Non-fatal warnings raised while deriving the returned version. On a DRAFT, the warnings from deriving the draft.</p>
pub fn get_validation_issues(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::OntologyValidationIssue>> {
&self.validation_issues
}
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 [`GetOntologyOutput`](crate::operation::get_ontology::GetOntologyOutput).
/// This method will fail if any of the following fields are not set:
/// - [`arn`](crate::operation::get_ontology::builders::GetOntologyOutputBuilder::arn)
/// - [`version`](crate::operation::get_ontology::builders::GetOntologyOutputBuilder::version)
/// - [`id`](crate::operation::get_ontology::builders::GetOntologyOutputBuilder::id)
/// - [`status`](crate::operation::get_ontology::builders::GetOntologyOutputBuilder::status)
/// - [`updated_at`](crate::operation::get_ontology::builders::GetOntologyOutputBuilder::updated_at)
pub fn build(self) -> ::std::result::Result<crate::operation::get_ontology::GetOntologyOutput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::get_ontology::GetOntologyOutput {
arn: self.arn.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"arn",
"arn was not specified but it is required when building GetOntologyOutput",
)
})?,
version: self.version.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"version",
"version was not specified but it is required when building GetOntologyOutput",
)
})?,
template: self.template,
created_at: self.created_at,
published_at: self.published_at,
name: self.name,
description: self.description,
derivation_version: self.derivation_version,
id: self.id.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"id",
"id was not specified but it is required when building GetOntologyOutput",
)
})?,
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 GetOntologyOutput",
)
})?,
updated_at: self.updated_at.ok_or_else(|| {
::aws_smithy_types::error::operation::BuildError::missing_field(
"updated_at",
"updated_at was not specified but it is required when building GetOntologyOutput",
)
})?,
ontology_induction_id: self.ontology_induction_id,
source: self.source,
source_format: self.source_format,
revision_id: self.revision_id,
validation_issues: self.validation_issues,
_request_id: self._request_id,
})
}
}
impl ::std::fmt::Debug for GetOntologyOutputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("GetOntologyOutputBuilder");
formatter.field("arn", &self.arn);
formatter.field("version", &self.version);
formatter.field("template", &"*** Sensitive Data Redacted ***");
formatter.field("created_at", &self.created_at);
formatter.field("published_at", &self.published_at);
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("derivation_version", &self.derivation_version);
formatter.field("id", &self.id);
formatter.field("status", &self.status);
formatter.field("updated_at", &self.updated_at);
formatter.field("ontology_induction_id", &self.ontology_induction_id);
formatter.field("source", &"*** Sensitive Data Redacted ***");
formatter.field("source_format", &self.source_format);
formatter.field("revision_id", &self.revision_id);
formatter.field("validation_issues", &self.validation_issues);
formatter.field("_request_id", &self._request_id);
formatter.finish()
}
}