aws-sdk-storagegateway 1.102.0

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

/// <p>DeleteTapeInput</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteTapeInput {
    /// <p>The unique Amazon Resource Name (ARN) of the gateway that the virtual tape to delete is associated with. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub gateway_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the virtual tape to delete.</p>
    pub tape_arn: ::std::option::Option<::std::string::String>,
    /// <p>Set to <code>TRUE</code> to delete an archived tape that belongs to a custom pool with tape retention lock. Only archived tapes with tape retention lock set to <code>governance</code> can be deleted. Archived tapes with tape retention lock set to <code>compliance</code> can't be deleted.</p>
    pub bypass_governance_retention: ::std::option::Option<bool>,
}
impl DeleteTapeInput {
    /// <p>The unique Amazon Resource Name (ARN) of the gateway that the virtual tape to delete is associated with. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub fn gateway_arn(&self) -> ::std::option::Option<&str> {
        self.gateway_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the virtual tape to delete.</p>
    pub fn tape_arn(&self) -> ::std::option::Option<&str> {
        self.tape_arn.as_deref()
    }
    /// <p>Set to <code>TRUE</code> to delete an archived tape that belongs to a custom pool with tape retention lock. Only archived tapes with tape retention lock set to <code>governance</code> can be deleted. Archived tapes with tape retention lock set to <code>compliance</code> can't be deleted.</p>
    pub fn bypass_governance_retention(&self) -> ::std::option::Option<bool> {
        self.bypass_governance_retention
    }
}
impl DeleteTapeInput {
    /// Creates a new builder-style object to manufacture [`DeleteTapeInput`](crate::operation::delete_tape::DeleteTapeInput).
    pub fn builder() -> crate::operation::delete_tape::builders::DeleteTapeInputBuilder {
        crate::operation::delete_tape::builders::DeleteTapeInputBuilder::default()
    }
}

/// A builder for [`DeleteTapeInput`](crate::operation::delete_tape::DeleteTapeInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteTapeInputBuilder {
    pub(crate) gateway_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tape_arn: ::std::option::Option<::std::string::String>,
    pub(crate) bypass_governance_retention: ::std::option::Option<bool>,
}
impl DeleteTapeInputBuilder {
    /// <p>The unique Amazon Resource Name (ARN) of the gateway that the virtual tape to delete is associated with. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    /// This field is required.
    pub fn gateway_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.gateway_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique Amazon Resource Name (ARN) of the gateway that the virtual tape to delete is associated with. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub fn set_gateway_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.gateway_arn = input;
        self
    }
    /// <p>The unique Amazon Resource Name (ARN) of the gateway that the virtual tape to delete is associated with. Use the <code>ListGateways</code> operation to return a list of gateways for your account and Amazon Web Services Region.</p>
    pub fn get_gateway_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.gateway_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the virtual tape to delete.</p>
    /// This field is required.
    pub fn tape_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tape_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the virtual tape to delete.</p>
    pub fn set_tape_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tape_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the virtual tape to delete.</p>
    pub fn get_tape_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.tape_arn
    }
    /// <p>Set to <code>TRUE</code> to delete an archived tape that belongs to a custom pool with tape retention lock. Only archived tapes with tape retention lock set to <code>governance</code> can be deleted. Archived tapes with tape retention lock set to <code>compliance</code> can't be deleted.</p>
    pub fn bypass_governance_retention(mut self, input: bool) -> Self {
        self.bypass_governance_retention = ::std::option::Option::Some(input);
        self
    }
    /// <p>Set to <code>TRUE</code> to delete an archived tape that belongs to a custom pool with tape retention lock. Only archived tapes with tape retention lock set to <code>governance</code> can be deleted. Archived tapes with tape retention lock set to <code>compliance</code> can't be deleted.</p>
    pub fn set_bypass_governance_retention(mut self, input: ::std::option::Option<bool>) -> Self {
        self.bypass_governance_retention = input;
        self
    }
    /// <p>Set to <code>TRUE</code> to delete an archived tape that belongs to a custom pool with tape retention lock. Only archived tapes with tape retention lock set to <code>governance</code> can be deleted. Archived tapes with tape retention lock set to <code>compliance</code> can't be deleted.</p>
    pub fn get_bypass_governance_retention(&self) -> &::std::option::Option<bool> {
        &self.bypass_governance_retention
    }
    /// Consumes the builder and constructs a [`DeleteTapeInput`](crate::operation::delete_tape::DeleteTapeInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::delete_tape::DeleteTapeInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_tape::DeleteTapeInput {
            gateway_arn: self.gateway_arn,
            tape_arn: self.tape_arn,
            bypass_governance_retention: self.bypass_governance_retention,
        })
    }
}