aws_sdk_quicksight/operation/delete_analysis/
_delete_analysis_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 DeleteAnalysisInput {
6    /// <p>The ID of the Amazon Web Services account where you want to delete an analysis.</p>
7    pub aws_account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the analysis that you're deleting.</p>
9    pub analysis_id: ::std::option::Option<::std::string::String>,
10    /// <p>A value that specifies the number of days that Amazon QuickSight waits before it deletes the analysis. You can't use this parameter with the <code>ForceDeleteWithoutRecovery</code> option in the same API call. The default value is 30.</p>
11    pub recovery_window_in_days: ::std::option::Option<i64>,
12    /// <p>This option defaults to the value <code>NoForceDeleteWithoutRecovery</code>. To immediately delete the analysis, add the <code>ForceDeleteWithoutRecovery</code> option. You can't restore an analysis after it's deleted.</p>
13    pub force_delete_without_recovery: ::std::option::Option<bool>,
14}
15impl DeleteAnalysisInput {
16    /// <p>The ID of the Amazon Web Services account where you want to delete an analysis.</p>
17    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
18        self.aws_account_id.as_deref()
19    }
20    /// <p>The ID of the analysis that you're deleting.</p>
21    pub fn analysis_id(&self) -> ::std::option::Option<&str> {
22        self.analysis_id.as_deref()
23    }
24    /// <p>A value that specifies the number of days that Amazon QuickSight waits before it deletes the analysis. You can't use this parameter with the <code>ForceDeleteWithoutRecovery</code> option in the same API call. The default value is 30.</p>
25    pub fn recovery_window_in_days(&self) -> ::std::option::Option<i64> {
26        self.recovery_window_in_days
27    }
28    /// <p>This option defaults to the value <code>NoForceDeleteWithoutRecovery</code>. To immediately delete the analysis, add the <code>ForceDeleteWithoutRecovery</code> option. You can't restore an analysis after it's deleted.</p>
29    pub fn force_delete_without_recovery(&self) -> ::std::option::Option<bool> {
30        self.force_delete_without_recovery
31    }
32}
33impl DeleteAnalysisInput {
34    /// Creates a new builder-style object to manufacture [`DeleteAnalysisInput`](crate::operation::delete_analysis::DeleteAnalysisInput).
35    pub fn builder() -> crate::operation::delete_analysis::builders::DeleteAnalysisInputBuilder {
36        crate::operation::delete_analysis::builders::DeleteAnalysisInputBuilder::default()
37    }
38}
39
40/// A builder for [`DeleteAnalysisInput`](crate::operation::delete_analysis::DeleteAnalysisInput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct DeleteAnalysisInputBuilder {
44    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
45    pub(crate) analysis_id: ::std::option::Option<::std::string::String>,
46    pub(crate) recovery_window_in_days: ::std::option::Option<i64>,
47    pub(crate) force_delete_without_recovery: ::std::option::Option<bool>,
48}
49impl DeleteAnalysisInputBuilder {
50    /// <p>The ID of the Amazon Web Services account where you want to delete an analysis.</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 where you want to delete an analysis.</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 where you want to delete an analysis.</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 of the analysis that you're deleting.</p>
66    /// This field is required.
67    pub fn analysis_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
68        self.analysis_id = ::std::option::Option::Some(input.into());
69        self
70    }
71    /// <p>The ID of the analysis that you're deleting.</p>
72    pub fn set_analysis_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
73        self.analysis_id = input;
74        self
75    }
76    /// <p>The ID of the analysis that you're deleting.</p>
77    pub fn get_analysis_id(&self) -> &::std::option::Option<::std::string::String> {
78        &self.analysis_id
79    }
80    /// <p>A value that specifies the number of days that Amazon QuickSight waits before it deletes the analysis. You can't use this parameter with the <code>ForceDeleteWithoutRecovery</code> option in the same API call. The default value is 30.</p>
81    pub fn recovery_window_in_days(mut self, input: i64) -> Self {
82        self.recovery_window_in_days = ::std::option::Option::Some(input);
83        self
84    }
85    /// <p>A value that specifies the number of days that Amazon QuickSight waits before it deletes the analysis. You can't use this parameter with the <code>ForceDeleteWithoutRecovery</code> option in the same API call. The default value is 30.</p>
86    pub fn set_recovery_window_in_days(mut self, input: ::std::option::Option<i64>) -> Self {
87        self.recovery_window_in_days = input;
88        self
89    }
90    /// <p>A value that specifies the number of days that Amazon QuickSight waits before it deletes the analysis. You can't use this parameter with the <code>ForceDeleteWithoutRecovery</code> option in the same API call. The default value is 30.</p>
91    pub fn get_recovery_window_in_days(&self) -> &::std::option::Option<i64> {
92        &self.recovery_window_in_days
93    }
94    /// <p>This option defaults to the value <code>NoForceDeleteWithoutRecovery</code>. To immediately delete the analysis, add the <code>ForceDeleteWithoutRecovery</code> option. You can't restore an analysis after it's deleted.</p>
95    pub fn force_delete_without_recovery(mut self, input: bool) -> Self {
96        self.force_delete_without_recovery = ::std::option::Option::Some(input);
97        self
98    }
99    /// <p>This option defaults to the value <code>NoForceDeleteWithoutRecovery</code>. To immediately delete the analysis, add the <code>ForceDeleteWithoutRecovery</code> option. You can't restore an analysis after it's deleted.</p>
100    pub fn set_force_delete_without_recovery(mut self, input: ::std::option::Option<bool>) -> Self {
101        self.force_delete_without_recovery = input;
102        self
103    }
104    /// <p>This option defaults to the value <code>NoForceDeleteWithoutRecovery</code>. To immediately delete the analysis, add the <code>ForceDeleteWithoutRecovery</code> option. You can't restore an analysis after it's deleted.</p>
105    pub fn get_force_delete_without_recovery(&self) -> &::std::option::Option<bool> {
106        &self.force_delete_without_recovery
107    }
108    /// Consumes the builder and constructs a [`DeleteAnalysisInput`](crate::operation::delete_analysis::DeleteAnalysisInput).
109    pub fn build(
110        self,
111    ) -> ::std::result::Result<crate::operation::delete_analysis::DeleteAnalysisInput, ::aws_smithy_types::error::operation::BuildError> {
112        ::std::result::Result::Ok(crate::operation::delete_analysis::DeleteAnalysisInput {
113            aws_account_id: self.aws_account_id,
114            analysis_id: self.analysis_id,
115            recovery_window_in_days: self.recovery_window_in_days,
116            force_delete_without_recovery: self.force_delete_without_recovery,
117        })
118    }
119}