aws_sdk_quicksight/operation/describe_template/_describe_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 DescribeTemplateInput {
6 /// <p>The ID of the Amazon Web Services account that contains the template that you're describing.</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>(Optional) The number for the version to describe. If a <code>VersionNumber</code> parameter value isn't provided, the latest version of the template is described.</p>
11 pub version_number: ::std::option::Option<i64>,
12 /// <p>The alias of the template that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the template by providing the keyword <code>$LATEST</code> in the <code>AliasName</code> parameter. The keyword <code>$PUBLISHED</code> doesn't apply to templates.</p>
13 pub alias_name: ::std::option::Option<::std::string::String>,
14}
15impl DescribeTemplateInput {
16 /// <p>The ID of the Amazon Web Services account that contains the template that you're describing.</p>
17 pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
18 self.aws_account_id.as_deref()
19 }
20 /// <p>The ID for the template.</p>
21 pub fn template_id(&self) -> ::std::option::Option<&str> {
22 self.template_id.as_deref()
23 }
24 /// <p>(Optional) The number for the version to describe. If a <code>VersionNumber</code> parameter value isn't provided, the latest version of the template is described.</p>
25 pub fn version_number(&self) -> ::std::option::Option<i64> {
26 self.version_number
27 }
28 /// <p>The alias of the template that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the template by providing the keyword <code>$LATEST</code> in the <code>AliasName</code> parameter. The keyword <code>$PUBLISHED</code> doesn't apply to templates.</p>
29 pub fn alias_name(&self) -> ::std::option::Option<&str> {
30 self.alias_name.as_deref()
31 }
32}
33impl DescribeTemplateInput {
34 /// Creates a new builder-style object to manufacture [`DescribeTemplateInput`](crate::operation::describe_template::DescribeTemplateInput).
35 pub fn builder() -> crate::operation::describe_template::builders::DescribeTemplateInputBuilder {
36 crate::operation::describe_template::builders::DescribeTemplateInputBuilder::default()
37 }
38}
39
40/// A builder for [`DescribeTemplateInput`](crate::operation::describe_template::DescribeTemplateInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DescribeTemplateInputBuilder {
44 pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
45 pub(crate) template_id: ::std::option::Option<::std::string::String>,
46 pub(crate) version_number: ::std::option::Option<i64>,
47 pub(crate) alias_name: ::std::option::Option<::std::string::String>,
48}
49impl DescribeTemplateInputBuilder {
50 /// <p>The ID of the Amazon Web Services account that contains the template that you're describing.</p>
51 /// This field is required.
52 pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53 self.aws_account_id = ::std::option::Option::Some(input.into());
54 self
55 }
56 /// <p>The ID of the Amazon Web Services account that contains the template that you're describing.</p>
57 pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58 self.aws_account_id = input;
59 self
60 }
61 /// <p>The ID of the Amazon Web Services account that contains the template that you're describing.</p>
62 pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
63 &self.aws_account_id
64 }
65 /// <p>The ID for the template.</p>
66 /// This field is required.
67 pub fn template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68 self.template_id = ::std::option::Option::Some(input.into());
69 self
70 }
71 /// <p>The ID for the template.</p>
72 pub fn set_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73 self.template_id = input;
74 self
75 }
76 /// <p>The ID for the template.</p>
77 pub fn get_template_id(&self) -> &::std::option::Option<::std::string::String> {
78 &self.template_id
79 }
80 /// <p>(Optional) The number for the version to describe. If a <code>VersionNumber</code> parameter value isn't provided, the latest version of the template is described.</p>
81 pub fn version_number(mut self, input: i64) -> Self {
82 self.version_number = ::std::option::Option::Some(input);
83 self
84 }
85 /// <p>(Optional) The number for the version to describe. If a <code>VersionNumber</code> parameter value isn't provided, the latest version of the template is described.</p>
86 pub fn set_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
87 self.version_number = input;
88 self
89 }
90 /// <p>(Optional) The number for the version to describe. If a <code>VersionNumber</code> parameter value isn't provided, the latest version of the template is described.</p>
91 pub fn get_version_number(&self) -> &::std::option::Option<i64> {
92 &self.version_number
93 }
94 /// <p>The alias of the template that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the template by providing the keyword <code>$LATEST</code> in the <code>AliasName</code> parameter. The keyword <code>$PUBLISHED</code> doesn't apply to templates.</p>
95 pub fn alias_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.alias_name = ::std::option::Option::Some(input.into());
97 self
98 }
99 /// <p>The alias of the template that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the template by providing the keyword <code>$LATEST</code> in the <code>AliasName</code> parameter. The keyword <code>$PUBLISHED</code> doesn't apply to templates.</p>
100 pub fn set_alias_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.alias_name = input;
102 self
103 }
104 /// <p>The alias of the template that you want to describe. If you name a specific alias, you describe the version that the alias points to. You can specify the latest version of the template by providing the keyword <code>$LATEST</code> in the <code>AliasName</code> parameter. The keyword <code>$PUBLISHED</code> doesn't apply to templates.</p>
105 pub fn get_alias_name(&self) -> &::std::option::Option<::std::string::String> {
106 &self.alias_name
107 }
108 /// Consumes the builder and constructs a [`DescribeTemplateInput`](crate::operation::describe_template::DescribeTemplateInput).
109 pub fn build(
110 self,
111 ) -> ::std::result::Result<crate::operation::describe_template::DescribeTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::describe_template::DescribeTemplateInput {
113 aws_account_id: self.aws_account_id,
114 template_id: self.template_id,
115 version_number: self.version_number,
116 alias_name: self.alias_name,
117 })
118 }
119}