# -*- coding: utf-8 -*-

"""
coingeckopublicapiv3

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""
from coingeckopublicapiv3.api_helper import APIHelper
from coingeckopublicapiv3.models.data_1 import Data1


class Nft1(object):

    """Implementation of the 'Nft1' model.

    Attributes:
        id (str): NFT collection ID
        name (str): NFT collection name
        symbol (str): NFT collection symbol
        thumb (str): NFT collection thumb image url
        nft_contract_id (float): The model property of type float.
        native_currency_symbol (str): NFT collection native currency symbol
        floor_price_in_native_currency (float): NFT collection floor price in
            native currency
        floor_price_24_h_percentage_change (float): NFT collection floor price
            24 hours percentage change
        data (Data1): The model property of type Data1.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "id": 'id',
        "name": 'name',
        "symbol": 'symbol',
        "thumb": 'thumb',
        "nft_contract_id": 'nft_contract_id',
        "native_currency_symbol": 'native_currency_symbol',
        "floor_price_in_native_currency": 'floor_price_in_native_currency',
        "floor_price_24_h_percentage_change": 'floor_price_24h_percentage_change',
        "data": 'data'
    }

    _optionals = [
        'id',
        'name',
        'symbol',
        'thumb',
        'nft_contract_id',
        'native_currency_symbol',
        'floor_price_in_native_currency',
        'floor_price_24_h_percentage_change',
        'data',
    ]

    def __init__(self,
                 id=APIHelper.SKIP,
                 name=APIHelper.SKIP,
                 symbol=APIHelper.SKIP,
                 thumb=APIHelper.SKIP,
                 nft_contract_id=APIHelper.SKIP,
                 native_currency_symbol=APIHelper.SKIP,
                 floor_price_in_native_currency=APIHelper.SKIP,
                 floor_price_24_h_percentage_change=APIHelper.SKIP,
                 data=APIHelper.SKIP):
        """Constructor for the Nft1 class"""

        # Initialize members of the class
        if id is not APIHelper.SKIP:
            self.id = id 
        if name is not APIHelper.SKIP:
            self.name = name 
        if symbol is not APIHelper.SKIP:
            self.symbol = symbol 
        if thumb is not APIHelper.SKIP:
            self.thumb = thumb 
        if nft_contract_id is not APIHelper.SKIP:
            self.nft_contract_id = nft_contract_id 
        if native_currency_symbol is not APIHelper.SKIP:
            self.native_currency_symbol = native_currency_symbol 
        if floor_price_in_native_currency is not APIHelper.SKIP:
            self.floor_price_in_native_currency = floor_price_in_native_currency 
        if floor_price_24_h_percentage_change is not APIHelper.SKIP:
            self.floor_price_24_h_percentage_change = floor_price_24_h_percentage_change 
        if data is not APIHelper.SKIP:
            self.data = data 

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Creates an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """

        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        id = dictionary.get("id") if dictionary.get("id") else APIHelper.SKIP
        name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP
        symbol = dictionary.get("symbol") if dictionary.get("symbol") else APIHelper.SKIP
        thumb = dictionary.get("thumb") if dictionary.get("thumb") else APIHelper.SKIP
        nft_contract_id = dictionary.get("nft_contract_id") if dictionary.get("nft_contract_id") else APIHelper.SKIP
        native_currency_symbol = dictionary.get("native_currency_symbol") if dictionary.get("native_currency_symbol") else APIHelper.SKIP
        floor_price_in_native_currency = dictionary.get("floor_price_in_native_currency") if dictionary.get("floor_price_in_native_currency") else APIHelper.SKIP
        floor_price_24_h_percentage_change = dictionary.get("floor_price_24h_percentage_change") if dictionary.get("floor_price_24h_percentage_change") else APIHelper.SKIP
        data = Data1.from_dictionary(dictionary.get('data')) if 'data' in dictionary.keys() else APIHelper.SKIP
        # Return an object of this model
        return cls(id,
                   name,
                   symbol,
                   thumb,
                   nft_contract_id,
                   native_currency_symbol,
                   floor_price_in_native_currency,
                   floor_price_24_h_percentage_change,
                   data)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'id={(self.id if hasattr(self, "id") else None)!r}, '
                f'name={(self.name if hasattr(self, "name") else None)!r}, '
                f'symbol={(self.symbol if hasattr(self, "symbol") else None)!r}, '
                f'thumb={(self.thumb if hasattr(self, "thumb") else None)!r}, '
                f'nft_contract_id={(self.nft_contract_id if hasattr(self, "nft_contract_id") else None)!r}, '
                f'native_currency_symbol={(self.native_currency_symbol if hasattr(self, "native_currency_symbol") else None)!r}, '
                f'floor_price_in_native_currency={(self.floor_price_in_native_currency if hasattr(self, "floor_price_in_native_currency") else None)!r}, '
                f'floor_price_24_h_percentage_change={(self.floor_price_24_h_percentage_change if hasattr(self, "floor_price_24_h_percentage_change") else None)!r}, '
                f'data={(self.data if hasattr(self, "data") else None)!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'id={(self.id if hasattr(self, "id") else None)!s}, '
                f'name={(self.name if hasattr(self, "name") else None)!s}, '
                f'symbol={(self.symbol if hasattr(self, "symbol") else None)!s}, '
                f'thumb={(self.thumb if hasattr(self, "thumb") else None)!s}, '
                f'nft_contract_id={(self.nft_contract_id if hasattr(self, "nft_contract_id") else None)!s}, '
                f'native_currency_symbol={(self.native_currency_symbol if hasattr(self, "native_currency_symbol") else None)!s}, '
                f'floor_price_in_native_currency={(self.floor_price_in_native_currency if hasattr(self, "floor_price_in_native_currency") else None)!s}, '
                f'floor_price_24_h_percentage_change={(self.floor_price_24_h_percentage_change if hasattr(self, "floor_price_24_h_percentage_change") else None)!s}, '
                f'data={(self.data if hasattr(self, "data") else None)!s})')
