aws_sdk_quicksight/operation/update_template/_update_template_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct UpdateTemplateInput {
6 /// <p>The ID of the Amazon Web Services account that contains the template that you're updating.</p>
7 pub aws_account_id: ::std::option::Option<::std::string::String>,
8 /// <p>The ID for the template.</p>
9 pub template_id: ::std::option::Option<::std::string::String>,
10 /// <p>The entity that you are using as a source when you update the template. In <code>SourceEntity</code>, you specify the type of object you're using as source: <code>SourceTemplate</code> for a template or <code>SourceAnalysis</code> for an analysis. Both of these require an Amazon Resource Name (ARN). For <code>SourceTemplate</code>, specify the ARN of the source template. For <code>SourceAnalysis</code>, specify the ARN of the source analysis. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region;.</p>
11 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> or <code>SourceAnalysis</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
12 pub source_entity: ::std::option::Option<crate::types::TemplateSourceEntity>,
13 /// <p>A description of the current template version that is being updated. Every time you call <code>UpdateTemplate</code>, you create a new version of the template. Each version of the template maintains a description of the version in the <code>VersionDescription</code> field.</p>
14 pub version_description: ::std::option::Option<::std::string::String>,
15 /// <p>The name for the template.</p>
16 pub name: ::std::option::Option<::std::string::String>,
17 /// <p>The definition of a template.</p>
18 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
19 pub definition: ::std::option::Option<crate::types::TemplateVersionDefinition>,
20 /// <p>The option to relax the validation needed to update a template with definition objects. This skips the validation step for specific errors.</p>
21 pub validation_strategy: ::std::option::Option<crate::types::ValidationStrategy>,
22}
23impl UpdateTemplateInput {
24 /// <p>The ID of the Amazon Web Services account that contains the template that you're updating.</p>
25 pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
26 self.aws_account_id.as_deref()
27 }
28 /// <p>The ID for the template.</p>
29 pub fn template_id(&self) -> ::std::option::Option<&str> {
30 self.template_id.as_deref()
31 }
32 /// <p>The entity that you are using as a source when you update the template. In <code>SourceEntity</code>, you specify the type of object you're using as source: <code>SourceTemplate</code> for a template or <code>SourceAnalysis</code> for an analysis. Both of these require an Amazon Resource Name (ARN). For <code>SourceTemplate</code>, specify the ARN of the source template. For <code>SourceAnalysis</code>, specify the ARN of the source analysis. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region;.</p>
33 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> or <code>SourceAnalysis</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
34 pub fn source_entity(&self) -> ::std::option::Option<&crate::types::TemplateSourceEntity> {
35 self.source_entity.as_ref()
36 }
37 /// <p>A description of the current template version that is being updated. Every time you call <code>UpdateTemplate</code>, you create a new version of the template. Each version of the template maintains a description of the version in the <code>VersionDescription</code> field.</p>
38 pub fn version_description(&self) -> ::std::option::Option<&str> {
39 self.version_description.as_deref()
40 }
41 /// <p>The name for the template.</p>
42 pub fn name(&self) -> ::std::option::Option<&str> {
43 self.name.as_deref()
44 }
45 /// <p>The definition of a template.</p>
46 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
47 pub fn definition(&self) -> ::std::option::Option<&crate::types::TemplateVersionDefinition> {
48 self.definition.as_ref()
49 }
50 /// <p>The option to relax the validation needed to update a template with definition objects. This skips the validation step for specific errors.</p>
51 pub fn validation_strategy(&self) -> ::std::option::Option<&crate::types::ValidationStrategy> {
52 self.validation_strategy.as_ref()
53 }
54}
55impl UpdateTemplateInput {
56 /// Creates a new builder-style object to manufacture [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
57 pub fn builder() -> crate::operation::update_template::builders::UpdateTemplateInputBuilder {
58 crate::operation::update_template::builders::UpdateTemplateInputBuilder::default()
59 }
60}
61
62/// A builder for [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
63#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
64#[non_exhaustive]
65pub struct UpdateTemplateInputBuilder {
66 pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
67 pub(crate) template_id: ::std::option::Option<::std::string::String>,
68 pub(crate) source_entity: ::std::option::Option<crate::types::TemplateSourceEntity>,
69 pub(crate) version_description: ::std::option::Option<::std::string::String>,
70 pub(crate) name: ::std::option::Option<::std::string::String>,
71 pub(crate) definition: ::std::option::Option<crate::types::TemplateVersionDefinition>,
72 pub(crate) validation_strategy: ::std::option::Option<crate::types::ValidationStrategy>,
73}
74impl UpdateTemplateInputBuilder {
75 /// <p>The ID of the Amazon Web Services account that contains the template that you're updating.</p>
76 /// This field is required.
77 pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
78 self.aws_account_id = ::std::option::Option::Some(input.into());
79 self
80 }
81 /// <p>The ID of the Amazon Web Services account that contains the template that you're updating.</p>
82 pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
83 self.aws_account_id = input;
84 self
85 }
86 /// <p>The ID of the Amazon Web Services account that contains the template that you're updating.</p>
87 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
88 &self.aws_account_id
89 }
90 /// <p>The ID for the template.</p>
91 /// This field is required.
92 pub fn template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
93 self.template_id = ::std::option::Option::Some(input.into());
94 self
95 }
96 /// <p>The ID for the template.</p>
97 pub fn set_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
98 self.template_id = input;
99 self
100 }
101 /// <p>The ID for the template.</p>
102 pub fn get_template_id(&self) -> &::std::option::Option<::std::string::String> {
103 &self.template_id
104 }
105 /// <p>The entity that you are using as a source when you update the template. In <code>SourceEntity</code>, you specify the type of object you're using as source: <code>SourceTemplate</code> for a template or <code>SourceAnalysis</code> for an analysis. Both of these require an Amazon Resource Name (ARN). For <code>SourceTemplate</code>, specify the ARN of the source template. For <code>SourceAnalysis</code>, specify the ARN of the source analysis. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region;.</p>
106 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> or <code>SourceAnalysis</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
107 pub fn source_entity(mut self, input: crate::types::TemplateSourceEntity) -> Self {
108 self.source_entity = ::std::option::Option::Some(input);
109 self
110 }
111 /// <p>The entity that you are using as a source when you update the template. In <code>SourceEntity</code>, you specify the type of object you're using as source: <code>SourceTemplate</code> for a template or <code>SourceAnalysis</code> for an analysis. Both of these require an Amazon Resource Name (ARN). For <code>SourceTemplate</code>, specify the ARN of the source template. For <code>SourceAnalysis</code>, specify the ARN of the source analysis. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region;.</p>
112 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> or <code>SourceAnalysis</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
113 pub fn set_source_entity(mut self, input: ::std::option::Option<crate::types::TemplateSourceEntity>) -> Self {
114 self.source_entity = input;
115 self
116 }
117 /// <p>The entity that you are using as a source when you update the template. In <code>SourceEntity</code>, you specify the type of object you're using as source: <code>SourceTemplate</code> for a template or <code>SourceAnalysis</code> for an analysis. Both of these require an Amazon Resource Name (ARN). For <code>SourceTemplate</code>, specify the ARN of the source template. For <code>SourceAnalysis</code>, specify the ARN of the source analysis. The <code>SourceTemplate</code> ARN can contain any Amazon Web Services account and any Amazon QuickSight-supported Amazon Web Services Region;.</p>
118 /// <p>Use the <code>DataSetReferences</code> entity within <code>SourceTemplate</code> or <code>SourceAnalysis</code> to list the replacement datasets for the placeholders listed in the original. The schema in each dataset must match its placeholder.</p>
119 pub fn get_source_entity(&self) -> &::std::option::Option<crate::types::TemplateSourceEntity> {
120 &self.source_entity
121 }
122 /// <p>A description of the current template version that is being updated. Every time you call <code>UpdateTemplate</code>, you create a new version of the template. Each version of the template maintains a description of the version in the <code>VersionDescription</code> field.</p>
123 pub fn version_description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124 self.version_description = ::std::option::Option::Some(input.into());
125 self
126 }
127 /// <p>A description of the current template version that is being updated. Every time you call <code>UpdateTemplate</code>, you create a new version of the template. Each version of the template maintains a description of the version in the <code>VersionDescription</code> field.</p>
128 pub fn set_version_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129 self.version_description = input;
130 self
131 }
132 /// <p>A description of the current template version that is being updated. Every time you call <code>UpdateTemplate</code>, you create a new version of the template. Each version of the template maintains a description of the version in the <code>VersionDescription</code> field.</p>
133 pub fn get_version_description(&self) -> &::std::option::Option<::std::string::String> {
134 &self.version_description
135 }
136 /// <p>The name for the template.</p>
137 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138 self.name = ::std::option::Option::Some(input.into());
139 self
140 }
141 /// <p>The name for the template.</p>
142 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143 self.name = input;
144 self
145 }
146 /// <p>The name for the template.</p>
147 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
148 &self.name
149 }
150 /// <p>The definition of a template.</p>
151 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
152 pub fn definition(mut self, input: crate::types::TemplateVersionDefinition) -> Self {
153 self.definition = ::std::option::Option::Some(input);
154 self
155 }
156 /// <p>The definition of a template.</p>
157 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
158 pub fn set_definition(mut self, input: ::std::option::Option<crate::types::TemplateVersionDefinition>) -> Self {
159 self.definition = input;
160 self
161 }
162 /// <p>The definition of a template.</p>
163 /// <p>A definition is the data model of all features in a Dashboard, Template, or Analysis.</p>
164 pub fn get_definition(&self) -> &::std::option::Option<crate::types::TemplateVersionDefinition> {
165 &self.definition
166 }
167 /// <p>The option to relax the validation needed to update a template with definition objects. This skips the validation step for specific errors.</p>
168 pub fn validation_strategy(mut self, input: crate::types::ValidationStrategy) -> Self {
169 self.validation_strategy = ::std::option::Option::Some(input);
170 self
171 }
172 /// <p>The option to relax the validation needed to update a template with definition objects. This skips the validation step for specific errors.</p>
173 pub fn set_validation_strategy(mut self, input: ::std::option::Option<crate::types::ValidationStrategy>) -> Self {
174 self.validation_strategy = input;
175 self
176 }
177 /// <p>The option to relax the validation needed to update a template with definition objects. This skips the validation step for specific errors.</p>
178 pub fn get_validation_strategy(&self) -> &::std::option::Option<crate::types::ValidationStrategy> {
179 &self.validation_strategy
180 }
181 /// Consumes the builder and constructs a [`UpdateTemplateInput`](crate::operation::update_template::UpdateTemplateInput).
182 pub fn build(
183 self,
184 ) -> ::std::result::Result<crate::operation::update_template::UpdateTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
185 ::std::result::Result::Ok(crate::operation::update_template::UpdateTemplateInput {
186 aws_account_id: self.aws_account_id,
187 template_id: self.template_id,
188 source_entity: self.source_entity,
189 version_description: self.version_description,
190 name: self.name,
191 definition: self.definition,
192 validation_strategy: self.validation_strategy,
193 })
194 }
195}