aws-sdk-redshift 1.106.0

AWS SDK for Amazon Redshift
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p></p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RevokeSnapshotAccessInput {
    /// <p>The identifier of the snapshot that the account can no longer access.</p>
    pub snapshot_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
    pub snapshot_arn: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
    pub snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
    pub account_with_restore_access: ::std::option::Option<::std::string::String>,
}
impl RevokeSnapshotAccessInput {
    /// <p>The identifier of the snapshot that the account can no longer access.</p>
    pub fn snapshot_identifier(&self) -> ::std::option::Option<&str> {
        self.snapshot_identifier.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
    pub fn snapshot_arn(&self) -> ::std::option::Option<&str> {
        self.snapshot_arn.as_deref()
    }
    /// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
    pub fn snapshot_cluster_identifier(&self) -> ::std::option::Option<&str> {
        self.snapshot_cluster_identifier.as_deref()
    }
    /// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
    pub fn account_with_restore_access(&self) -> ::std::option::Option<&str> {
        self.account_with_restore_access.as_deref()
    }
}
impl RevokeSnapshotAccessInput {
    /// Creates a new builder-style object to manufacture [`RevokeSnapshotAccessInput`](crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput).
    pub fn builder() -> crate::operation::revoke_snapshot_access::builders::RevokeSnapshotAccessInputBuilder {
        crate::operation::revoke_snapshot_access::builders::RevokeSnapshotAccessInputBuilder::default()
    }
}

/// A builder for [`RevokeSnapshotAccessInput`](crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RevokeSnapshotAccessInputBuilder {
    pub(crate) snapshot_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) snapshot_arn: ::std::option::Option<::std::string::String>,
    pub(crate) snapshot_cluster_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) account_with_restore_access: ::std::option::Option<::std::string::String>,
}
impl RevokeSnapshotAccessInputBuilder {
    /// <p>The identifier of the snapshot that the account can no longer access.</p>
    pub fn snapshot_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the snapshot that the account can no longer access.</p>
    pub fn set_snapshot_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_identifier = input;
        self
    }
    /// <p>The identifier of the snapshot that the account can no longer access.</p>
    pub fn get_snapshot_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_identifier
    }
    /// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
    pub fn snapshot_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
    pub fn set_snapshot_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the snapshot associated with the message to revoke access.</p>
    pub fn get_snapshot_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_arn
    }
    /// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
    pub fn snapshot_cluster_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.snapshot_cluster_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
    pub fn set_snapshot_cluster_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.snapshot_cluster_identifier = input;
        self
    }
    /// <p>The identifier of the cluster the snapshot was created from. This parameter is required if your IAM user has a policy containing a snapshot resource element that specifies anything other than * for the cluster name.</p>
    pub fn get_snapshot_cluster_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.snapshot_cluster_identifier
    }
    /// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
    /// This field is required.
    pub fn account_with_restore_access(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_with_restore_access = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
    pub fn set_account_with_restore_access(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_with_restore_access = input;
        self
    }
    /// <p>The identifier of the Amazon Web Services account that can no longer restore the specified snapshot.</p>
    pub fn get_account_with_restore_access(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_with_restore_access
    }
    /// Consumes the builder and constructs a [`RevokeSnapshotAccessInput`](crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::revoke_snapshot_access::RevokeSnapshotAccessInput {
            snapshot_identifier: self.snapshot_identifier,
            snapshot_arn: self.snapshot_arn,
            snapshot_cluster_identifier: self.snapshot_cluster_identifier,
            account_with_restore_access: self.account_with_restore_access,
        })
    }
}