1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DeleteAnalysisInput {
/// <p>The ID of the Amazon Web Services account where you want to delete an analysis.</p>
#[doc(hidden)]
pub aws_account_id: std::option::Option<std::string::String>,
/// <p>The ID of the analysis that you're deleting.</p>
#[doc(hidden)]
pub analysis_id: std::option::Option<std::string::String>,
/// <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>
#[doc(hidden)]
pub recovery_window_in_days: std::option::Option<i64>,
/// <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>
#[doc(hidden)]
pub force_delete_without_recovery: std::option::Option<bool>,
}
impl DeleteAnalysisInput {
/// <p>The ID of the Amazon Web Services account where you want to delete an analysis.</p>
pub fn aws_account_id(&self) -> std::option::Option<&str> {
self.aws_account_id.as_deref()
}
/// <p>The ID of the analysis that you're deleting.</p>
pub fn analysis_id(&self) -> std::option::Option<&str> {
self.analysis_id.as_deref()
}
/// <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>
pub fn recovery_window_in_days(&self) -> std::option::Option<i64> {
self.recovery_window_in_days
}
/// <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>
pub fn force_delete_without_recovery(&self) -> std::option::Option<bool> {
self.force_delete_without_recovery
}
}
impl DeleteAnalysisInput {
/// Creates a new builder-style object to manufacture [`DeleteAnalysisInput`](crate::operation::delete_analysis::DeleteAnalysisInput).
pub fn builder() -> crate::operation::delete_analysis::builders::DeleteAnalysisInputBuilder {
crate::operation::delete_analysis::builders::DeleteAnalysisInputBuilder::default()
}
}
/// A builder for [`DeleteAnalysisInput`](crate::operation::delete_analysis::DeleteAnalysisInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DeleteAnalysisInputBuilder {
pub(crate) aws_account_id: std::option::Option<std::string::String>,
pub(crate) analysis_id: std::option::Option<std::string::String>,
pub(crate) recovery_window_in_days: std::option::Option<i64>,
pub(crate) force_delete_without_recovery: std::option::Option<bool>,
}
impl DeleteAnalysisInputBuilder {
/// <p>The ID of the Amazon Web Services account where you want to delete an analysis.</p>
pub fn aws_account_id(mut self, input: impl Into<std::string::String>) -> Self {
self.aws_account_id = Some(input.into());
self
}
/// <p>The ID of the Amazon Web Services account where you want to delete an analysis.</p>
pub fn set_aws_account_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.aws_account_id = input;
self
}
/// <p>The ID of the analysis that you're deleting.</p>
pub fn analysis_id(mut self, input: impl Into<std::string::String>) -> Self {
self.analysis_id = Some(input.into());
self
}
/// <p>The ID of the analysis that you're deleting.</p>
pub fn set_analysis_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.analysis_id = input;
self
}
/// <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>
pub fn recovery_window_in_days(mut self, input: i64) -> Self {
self.recovery_window_in_days = Some(input);
self
}
/// <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>
pub fn set_recovery_window_in_days(mut self, input: std::option::Option<i64>) -> Self {
self.recovery_window_in_days = input;
self
}
/// <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>
pub fn force_delete_without_recovery(mut self, input: bool) -> Self {
self.force_delete_without_recovery = Some(input);
self
}
/// <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>
pub fn set_force_delete_without_recovery(mut self, input: std::option::Option<bool>) -> Self {
self.force_delete_without_recovery = input;
self
}
/// Consumes the builder and constructs a [`DeleteAnalysisInput`](crate::operation::delete_analysis::DeleteAnalysisInput).
pub fn build(
self,
) -> Result<
crate::operation::delete_analysis::DeleteAnalysisInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::delete_analysis::DeleteAnalysisInput {
aws_account_id: self.aws_account_id,
analysis_id: self.analysis_id,
recovery_window_in_days: self.recovery_window_in_days,
force_delete_without_recovery: self.force_delete_without_recovery,
})
}
}