aws-sdk-storagegateway 1.115.0

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

/// <p>CancelRetrievalInput</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CancelRetrievalInput {
    /// <p>The Amazon Resource Name (ARN) of the gateway. 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 you want to cancel retrieval for.</p>
    pub tape_arn: ::std::option::Option<::std::string::String>,
}
impl CancelRetrievalInput {
    /// <p>The Amazon Resource Name (ARN) of the gateway. 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 you want to cancel retrieval for.</p>
    pub fn tape_arn(&self) -> ::std::option::Option<&str> {
        self.tape_arn.as_deref()
    }
}
impl CancelRetrievalInput {
    /// Creates a new builder-style object to manufacture [`CancelRetrievalInput`](crate::operation::cancel_retrieval::CancelRetrievalInput).
    pub fn builder() -> crate::operation::cancel_retrieval::builders::CancelRetrievalInputBuilder {
        crate::operation::cancel_retrieval::builders::CancelRetrievalInputBuilder::default()
    }
}

/// A builder for [`CancelRetrievalInput`](crate::operation::cancel_retrieval::CancelRetrievalInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CancelRetrievalInputBuilder {
    pub(crate) gateway_arn: ::std::option::Option<::std::string::String>,
    pub(crate) tape_arn: ::std::option::Option<::std::string::String>,
}
impl CancelRetrievalInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the gateway. 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 Amazon Resource Name (ARN) of the gateway. 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 Amazon Resource Name (ARN) of the gateway. 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 you want to cancel retrieval for.</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 you want to cancel retrieval for.</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 you want to cancel retrieval for.</p>
    pub fn get_tape_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.tape_arn
    }
    /// Consumes the builder and constructs a [`CancelRetrievalInput`](crate::operation::cancel_retrieval::CancelRetrievalInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::cancel_retrieval::CancelRetrievalInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::cancel_retrieval::CancelRetrievalInput {
            gateway_arn: self.gateway_arn,
            tape_arn: self.tape_arn,
        })
    }
}