aws_sdk_quicksight/operation/delete_template/
_delete_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 DeleteTemplateInput {
6    /// <p>The ID of the Amazon Web Services account that contains the template that you're deleting.</p>
7    pub aws_account_id: ::std::option::Option<::std::string::String>,
8    /// <p>An ID for the template you want to delete.</p>
9    pub template_id: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies the version of the template that you want to delete. If you don't provide a version number, <code>DeleteTemplate</code> deletes all versions of the template.</p>
11    pub version_number: ::std::option::Option<i64>,
12}
13impl DeleteTemplateInput {
14    /// <p>The ID of the Amazon Web Services account that contains the template that you're deleting.</p>
15    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
16        self.aws_account_id.as_deref()
17    }
18    /// <p>An ID for the template you want to delete.</p>
19    pub fn template_id(&self) -> ::std::option::Option<&str> {
20        self.template_id.as_deref()
21    }
22    /// <p>Specifies the version of the template that you want to delete. If you don't provide a version number, <code>DeleteTemplate</code> deletes all versions of the template.</p>
23    pub fn version_number(&self) -> ::std::option::Option<i64> {
24        self.version_number
25    }
26}
27impl DeleteTemplateInput {
28    /// Creates a new builder-style object to manufacture [`DeleteTemplateInput`](crate::operation::delete_template::DeleteTemplateInput).
29    pub fn builder() -> crate::operation::delete_template::builders::DeleteTemplateInputBuilder {
30        crate::operation::delete_template::builders::DeleteTemplateInputBuilder::default()
31    }
32}
33
34/// A builder for [`DeleteTemplateInput`](crate::operation::delete_template::DeleteTemplateInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteTemplateInputBuilder {
38    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
39    pub(crate) template_id: ::std::option::Option<::std::string::String>,
40    pub(crate) version_number: ::std::option::Option<i64>,
41}
42impl DeleteTemplateInputBuilder {
43    /// <p>The ID of the Amazon Web Services account that contains the template that you're deleting.</p>
44    /// This field is required.
45    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.aws_account_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the Amazon Web Services account that contains the template that you're deleting.</p>
50    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.aws_account_id = input;
52        self
53    }
54    /// <p>The ID of the Amazon Web Services account that contains the template that you're deleting.</p>
55    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.aws_account_id
57    }
58    /// <p>An ID for the template you want to delete.</p>
59    /// This field is required.
60    pub fn template_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.template_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>An ID for the template you want to delete.</p>
65    pub fn set_template_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.template_id = input;
67        self
68    }
69    /// <p>An ID for the template you want to delete.</p>
70    pub fn get_template_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.template_id
72    }
73    /// <p>Specifies the version of the template that you want to delete. If you don't provide a version number, <code>DeleteTemplate</code> deletes all versions of the template.</p>
74    pub fn version_number(mut self, input: i64) -> Self {
75        self.version_number = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>Specifies the version of the template that you want to delete. If you don't provide a version number, <code>DeleteTemplate</code> deletes all versions of the template.</p>
79    pub fn set_version_number(mut self, input: ::std::option::Option<i64>) -> Self {
80        self.version_number = input;
81        self
82    }
83    /// <p>Specifies the version of the template that you want to delete. If you don't provide a version number, <code>DeleteTemplate</code> deletes all versions of the template.</p>
84    pub fn get_version_number(&self) -> &::std::option::Option<i64> {
85        &self.version_number
86    }
87    /// Consumes the builder and constructs a [`DeleteTemplateInput`](crate::operation::delete_template::DeleteTemplateInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::delete_template::DeleteTemplateInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::delete_template::DeleteTemplateInput {
92            aws_account_id: self.aws_account_id,
93            template_id: self.template_id,
94            version_number: self.version_number,
95        })
96    }
97}