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
// 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 UploadEntityDefinitionsInput {
/// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
pub document: ::std::option::Option<crate::types::DefinitionDocument>,
/// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub sync_with_public_namespace: ::std::option::Option<bool>,
/// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub deprecate_existing_entities: ::std::option::Option<bool>,
}
impl UploadEntityDefinitionsInput {
/// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
pub fn document(&self) -> ::std::option::Option<&crate::types::DefinitionDocument> {
self.document.as_ref()
}
/// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn sync_with_public_namespace(&self) -> ::std::option::Option<bool> {
self.sync_with_public_namespace
}
/// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn deprecate_existing_entities(&self) -> ::std::option::Option<bool> {
self.deprecate_existing_entities
}
}
impl UploadEntityDefinitionsInput {
/// Creates a new builder-style object to manufacture [`UploadEntityDefinitionsInput`](crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput).
pub fn builder() -> crate::operation::upload_entity_definitions::builders::UploadEntityDefinitionsInputBuilder {
crate::operation::upload_entity_definitions::builders::UploadEntityDefinitionsInputBuilder::default()
}
}
/// A builder for [`UploadEntityDefinitionsInput`](crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UploadEntityDefinitionsInputBuilder {
pub(crate) document: ::std::option::Option<crate::types::DefinitionDocument>,
pub(crate) sync_with_public_namespace: ::std::option::Option<bool>,
pub(crate) deprecate_existing_entities: ::std::option::Option<bool>,
}
impl UploadEntityDefinitionsInputBuilder {
/// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
pub fn document(mut self, input: crate::types::DefinitionDocument) -> Self {
self.document = ::std::option::Option::Some(input);
self
}
/// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
pub fn set_document(mut self, input: ::std::option::Option<crate::types::DefinitionDocument>) -> Self {
self.document = input;
self
}
/// <p>The <code>DefinitionDocument</code> that defines the updated entities.</p>
pub fn get_document(&self) -> &::std::option::Option<crate::types::DefinitionDocument> {
&self.document
}
/// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn sync_with_public_namespace(mut self, input: bool) -> Self {
self.sync_with_public_namespace = ::std::option::Option::Some(input);
self
}
/// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn set_sync_with_public_namespace(mut self, input: ::std::option::Option<bool>) -> Self {
self.sync_with_public_namespace = input;
self
}
/// <p>A Boolean that specifies whether to synchronize with the latest version of the public namespace. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn get_sync_with_public_namespace(&self) -> &::std::option::Option<bool> {
&self.sync_with_public_namespace
}
/// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn deprecate_existing_entities(mut self, input: bool) -> Self {
self.deprecate_existing_entities = ::std::option::Option::Some(input);
self
}
/// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn set_deprecate_existing_entities(mut self, input: ::std::option::Option<bool>) -> Self {
self.deprecate_existing_entities = input;
self
}
/// <p>A Boolean that specifies whether to deprecate all entities in the latest version before uploading the new <code>DefinitionDocument</code>. If set to <code>true</code>, the upload will create a new namespace version.</p>
pub fn get_deprecate_existing_entities(&self) -> &::std::option::Option<bool> {
&self.deprecate_existing_entities
}
/// Consumes the builder and constructs a [`UploadEntityDefinitionsInput`](crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput).
pub fn build(
self,
) -> ::std::result::Result<
crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput,
::aws_smithy_types::error::operation::BuildError,
> {
::std::result::Result::Ok(crate::operation::upload_entity_definitions::UploadEntityDefinitionsInput {
document: self.document,
sync_with_public_namespace: self.sync_with_public_namespace,
deprecate_existing_entities: self.deprecate_existing_entities,
})
}
}