/**
 * # NFT.
 * This is a single, whole, unique, non-fungible token within the Hedera network.
 *
 * ### Keywords
 * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
 * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
 * document are to be interpreted as described in [RFC2119](https://www.ietf.org/rfc/rfc2119)
 * and clarified in [RFC8174](https://www.ietf.org/rfc/rfc8174).
 */
syntax = "proto3";

package proto;

// SPDX-License-Identifier: Apache-2.0
import "services_timestamp.proto";
import "services_basic_types.proto";

option java_package = "com.hederahashgraph.api.proto.java";
// <<<pbj.java_package = "com.hedera.hapi.node.state.token">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;

/**
 * An Hedera Token Service non-fungible token (NFT).<br/>
 * Every NFT is a unique instance of a token with non-fungible type.
 *
 * The NFT SHALL be identified by token ID and serial number.<br/>
 * The token treasury account SHALL own all minted NFTs of that token type
 * initially.<br/>
 * NFTs owned by the token treasury SHALL NOT be linked into that account's
 * virtual linked list of NFTs.<br/>
 * NFTs not owned by the token treasury SHALL be linked into the owner
 * account's virtual linked list of NFTs.
 */
message Nft {

    /**
     * The id of this NFT, consisting of a Token ID and serial number.
     */
    NftID nft_id = 1;

    /**
     * The account or contract id that owns this NFT.
     * <p>
     * If this NFT is owned by its token type's current treasury account,
     * this value SHALL be zero.
     */
    AccountID owner_id = 2;

    /**
     * The account or contract id approved to spend this NFT.
     * <p>
     * If there is no approved spender, this value SHALL be null.
     */
    AccountID spender_id = 3;

    /**
     * The consensus time of the TokenMint that created this NFT as
     * offset from the epoch.
     * <p>
     * For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.
     */
    Timestamp mint_time = 4;

    /**
     * The metadata bytes for this NFT. This is often a URI value.
     * <p>
     * This value, if set, SHALL NOT exceed 100 bytes.
     */
    bytes metadata = 5;

    /**
     * The NFT ID of the previous entry in the current owner's "virtual
     * double-linked list" of owned NFTs.
     * <p>
     * If the owner of this NFT is the token treasury, this SHALL be unset.
     */
    NftID owner_previous_nft_id = 6;

    /**
     * The NFT ID of the next entry in the current owner's "virtual
     * double-linked list" of owned NFTs.
     * <p>
     * If the owner of this NFT is the token treasury, this SHALL be unset.
     */
    NftID owner_next_nft_id = 7;
}
