aws-sdk-dataexchange 1.102.0

AWS SDK for AWS Data Exchange
Documentation
// 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 AcceptDataGrantInput {
    /// <p>The Amazon Resource Name (ARN) of the data grant to accept.</p>
    pub data_grant_arn: ::std::option::Option<::std::string::String>,
}
impl AcceptDataGrantInput {
    /// <p>The Amazon Resource Name (ARN) of the data grant to accept.</p>
    pub fn data_grant_arn(&self) -> ::std::option::Option<&str> {
        self.data_grant_arn.as_deref()
    }
}
impl AcceptDataGrantInput {
    /// Creates a new builder-style object to manufacture [`AcceptDataGrantInput`](crate::operation::accept_data_grant::AcceptDataGrantInput).
    pub fn builder() -> crate::operation::accept_data_grant::builders::AcceptDataGrantInputBuilder {
        crate::operation::accept_data_grant::builders::AcceptDataGrantInputBuilder::default()
    }
}

/// A builder for [`AcceptDataGrantInput`](crate::operation::accept_data_grant::AcceptDataGrantInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AcceptDataGrantInputBuilder {
    pub(crate) data_grant_arn: ::std::option::Option<::std::string::String>,
}
impl AcceptDataGrantInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the data grant to accept.</p>
    /// This field is required.
    pub fn data_grant_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.data_grant_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the data grant to accept.</p>
    pub fn set_data_grant_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.data_grant_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the data grant to accept.</p>
    pub fn get_data_grant_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.data_grant_arn
    }
    /// Consumes the builder and constructs a [`AcceptDataGrantInput`](crate::operation::accept_data_grant::AcceptDataGrantInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::accept_data_grant::AcceptDataGrantInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::accept_data_grant::AcceptDataGrantInput {
            data_grant_arn: self.data_grant_arn,
        })
    }
}