aws-sdk-managedblockchainquery 1.101.0

AWS SDK for Amazon Managed Blockchain Query
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 GetTokenBalanceInput {
    /// <p>The container for the identifier for the token, including the unique token ID and its blockchain network.</p>
    pub token_identifier: ::std::option::Option<crate::types::TokenIdentifier>,
    /// <p>The container for the identifier for the owner.</p>
    pub owner_identifier: ::std::option::Option<crate::types::OwnerIdentifier>,
    /// <p>The time for when the TokenBalance is requested or the current time if a time is not provided in the request.</p><note>
    /// <p>This time will only be recorded up to the second.</p>
    /// </note>
    pub at_blockchain_instant: ::std::option::Option<crate::types::BlockchainInstant>,
}
impl GetTokenBalanceInput {
    /// <p>The container for the identifier for the token, including the unique token ID and its blockchain network.</p>
    pub fn token_identifier(&self) -> ::std::option::Option<&crate::types::TokenIdentifier> {
        self.token_identifier.as_ref()
    }
    /// <p>The container for the identifier for the owner.</p>
    pub fn owner_identifier(&self) -> ::std::option::Option<&crate::types::OwnerIdentifier> {
        self.owner_identifier.as_ref()
    }
    /// <p>The time for when the TokenBalance is requested or the current time if a time is not provided in the request.</p><note>
    /// <p>This time will only be recorded up to the second.</p>
    /// </note>
    pub fn at_blockchain_instant(&self) -> ::std::option::Option<&crate::types::BlockchainInstant> {
        self.at_blockchain_instant.as_ref()
    }
}
impl GetTokenBalanceInput {
    /// Creates a new builder-style object to manufacture [`GetTokenBalanceInput`](crate::operation::get_token_balance::GetTokenBalanceInput).
    pub fn builder() -> crate::operation::get_token_balance::builders::GetTokenBalanceInputBuilder {
        crate::operation::get_token_balance::builders::GetTokenBalanceInputBuilder::default()
    }
}

/// A builder for [`GetTokenBalanceInput`](crate::operation::get_token_balance::GetTokenBalanceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetTokenBalanceInputBuilder {
    pub(crate) token_identifier: ::std::option::Option<crate::types::TokenIdentifier>,
    pub(crate) owner_identifier: ::std::option::Option<crate::types::OwnerIdentifier>,
    pub(crate) at_blockchain_instant: ::std::option::Option<crate::types::BlockchainInstant>,
}
impl GetTokenBalanceInputBuilder {
    /// <p>The container for the identifier for the token, including the unique token ID and its blockchain network.</p>
    /// This field is required.
    pub fn token_identifier(mut self, input: crate::types::TokenIdentifier) -> Self {
        self.token_identifier = ::std::option::Option::Some(input);
        self
    }
    /// <p>The container for the identifier for the token, including the unique token ID and its blockchain network.</p>
    pub fn set_token_identifier(mut self, input: ::std::option::Option<crate::types::TokenIdentifier>) -> Self {
        self.token_identifier = input;
        self
    }
    /// <p>The container for the identifier for the token, including the unique token ID and its blockchain network.</p>
    pub fn get_token_identifier(&self) -> &::std::option::Option<crate::types::TokenIdentifier> {
        &self.token_identifier
    }
    /// <p>The container for the identifier for the owner.</p>
    /// This field is required.
    pub fn owner_identifier(mut self, input: crate::types::OwnerIdentifier) -> Self {
        self.owner_identifier = ::std::option::Option::Some(input);
        self
    }
    /// <p>The container for the identifier for the owner.</p>
    pub fn set_owner_identifier(mut self, input: ::std::option::Option<crate::types::OwnerIdentifier>) -> Self {
        self.owner_identifier = input;
        self
    }
    /// <p>The container for the identifier for the owner.</p>
    pub fn get_owner_identifier(&self) -> &::std::option::Option<crate::types::OwnerIdentifier> {
        &self.owner_identifier
    }
    /// <p>The time for when the TokenBalance is requested or the current time if a time is not provided in the request.</p><note>
    /// <p>This time will only be recorded up to the second.</p>
    /// </note>
    pub fn at_blockchain_instant(mut self, input: crate::types::BlockchainInstant) -> Self {
        self.at_blockchain_instant = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time for when the TokenBalance is requested or the current time if a time is not provided in the request.</p><note>
    /// <p>This time will only be recorded up to the second.</p>
    /// </note>
    pub fn set_at_blockchain_instant(mut self, input: ::std::option::Option<crate::types::BlockchainInstant>) -> Self {
        self.at_blockchain_instant = input;
        self
    }
    /// <p>The time for when the TokenBalance is requested or the current time if a time is not provided in the request.</p><note>
    /// <p>This time will only be recorded up to the second.</p>
    /// </note>
    pub fn get_at_blockchain_instant(&self) -> &::std::option::Option<crate::types::BlockchainInstant> {
        &self.at_blockchain_instant
    }
    /// Consumes the builder and constructs a [`GetTokenBalanceInput`](crate::operation::get_token_balance::GetTokenBalanceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_token_balance::GetTokenBalanceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_token_balance::GetTokenBalanceInput {
            token_identifier: self.token_identifier,
            owner_identifier: self.owner_identifier,
            at_blockchain_instant: self.at_blockchain_instant,
        })
    }
}