aws_sdk_quicksight/types/
_template_source_analysis.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TemplateSourceAnalysis {
7 pub arn: ::std::string::String,
9 pub data_set_references: ::std::vec::Vec<crate::types::DataSetReference>,
11}
12impl TemplateSourceAnalysis {
13 pub fn arn(&self) -> &str {
15 use std::ops::Deref;
16 self.arn.deref()
17 }
18 pub fn data_set_references(&self) -> &[crate::types::DataSetReference] {
20 use std::ops::Deref;
21 self.data_set_references.deref()
22 }
23}
24impl TemplateSourceAnalysis {
25 pub fn builder() -> crate::types::builders::TemplateSourceAnalysisBuilder {
27 crate::types::builders::TemplateSourceAnalysisBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct TemplateSourceAnalysisBuilder {
35 pub(crate) arn: ::std::option::Option<::std::string::String>,
36 pub(crate) data_set_references: ::std::option::Option<::std::vec::Vec<crate::types::DataSetReference>>,
37}
38impl TemplateSourceAnalysisBuilder {
39 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42 self.arn = ::std::option::Option::Some(input.into());
43 self
44 }
45 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47 self.arn = input;
48 self
49 }
50 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
52 &self.arn
53 }
54 pub fn data_set_references(mut self, input: crate::types::DataSetReference) -> Self {
60 let mut v = self.data_set_references.unwrap_or_default();
61 v.push(input);
62 self.data_set_references = ::std::option::Option::Some(v);
63 self
64 }
65 pub fn set_data_set_references(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DataSetReference>>) -> Self {
67 self.data_set_references = input;
68 self
69 }
70 pub fn get_data_set_references(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DataSetReference>> {
72 &self.data_set_references
73 }
74 pub fn build(self) -> ::std::result::Result<crate::types::TemplateSourceAnalysis, ::aws_smithy_types::error::operation::BuildError> {
79 ::std::result::Result::Ok(crate::types::TemplateSourceAnalysis {
80 arn: self.arn.ok_or_else(|| {
81 ::aws_smithy_types::error::operation::BuildError::missing_field(
82 "arn",
83 "arn was not specified but it is required when building TemplateSourceAnalysis",
84 )
85 })?,
86 data_set_references: self.data_set_references.ok_or_else(|| {
87 ::aws_smithy_types::error::operation::BuildError::missing_field(
88 "data_set_references",
89 "data_set_references was not specified but it is required when building TemplateSourceAnalysis",
90 )
91 })?,
92 })
93 }
94}