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

"""
coingeckopublicapiv3

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


class ExchangeData(object):

    """Implementation of the 'ExchangeData' model.

    Attributes:
        name (str): exchange name
        year_established (float): exchange established year
        country (str): exchange incorporated country
        description (str): exchange description
        url (str): exchange website url
        image (str): exchange image url
        facebook_url (str): exchange facebook url
        reddit_url (str): exchange reddit url
        telegram_url (str): exchange telegram url
        slack_url (str): exchange slack url
        other_url_1 (str): The model property of type str.
        other_url_2 (str): The model property of type str.
        twitter_handle (str): exchange twitter handle
        has_trading_incentive (bool): exchange trading incentive
        centralized (bool): exchange type (true for centralized, false for
            decentralized)
        public_notice (str): public notice for exchange
        alert_notice (str): alert notice for exchange
        trust_score (float): exchange trust score
        trust_score_rank (float): exchange trust score rank
        trade_volume_24_h_btc (float): The model property of type float.
        coins (float): number of coins listed on the exchange
        pairs (float): number of trading pairs on the exchange
        tickers (List[Any]): The model property of type List[Any].

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "name": 'name',
        "year_established": 'year_established',
        "country": 'country',
        "description": 'description',
        "url": 'url',
        "image": 'image',
        "facebook_url": 'facebook_url',
        "reddit_url": 'reddit_url',
        "telegram_url": 'telegram_url',
        "slack_url": 'slack_url',
        "other_url_1": 'other_url_1',
        "other_url_2": 'other_url_2',
        "twitter_handle": 'twitter_handle',
        "has_trading_incentive": 'has_trading_incentive',
        "centralized": 'centralized',
        "public_notice": 'public_notice',
        "alert_notice": 'alert_notice',
        "trust_score": 'trust_score',
        "trust_score_rank": 'trust_score_rank',
        "trade_volume_24_h_btc": 'trade_volume_24h_btc',
        "coins": 'coins',
        "pairs": 'pairs',
        "tickers": 'tickers'
    }

    _optionals = [
        'name',
        'year_established',
        'country',
        'description',
        'url',
        'image',
        'facebook_url',
        'reddit_url',
        'telegram_url',
        'slack_url',
        'other_url_1',
        'other_url_2',
        'twitter_handle',
        'has_trading_incentive',
        'centralized',
        'public_notice',
        'alert_notice',
        'trust_score',
        'trust_score_rank',
        'trade_volume_24_h_btc',
        'coins',
        'pairs',
        'tickers',
    ]

    def __init__(self,
                 name=APIHelper.SKIP,
                 year_established=APIHelper.SKIP,
                 country=APIHelper.SKIP,
                 description=APIHelper.SKIP,
                 url=APIHelper.SKIP,
                 image=APIHelper.SKIP,
                 facebook_url=APIHelper.SKIP,
                 reddit_url=APIHelper.SKIP,
                 telegram_url=APIHelper.SKIP,
                 slack_url=APIHelper.SKIP,
                 other_url_1=APIHelper.SKIP,
                 other_url_2=APIHelper.SKIP,
                 twitter_handle=APIHelper.SKIP,
                 has_trading_incentive=APIHelper.SKIP,
                 centralized=APIHelper.SKIP,
                 public_notice=APIHelper.SKIP,
                 alert_notice=APIHelper.SKIP,
                 trust_score=APIHelper.SKIP,
                 trust_score_rank=APIHelper.SKIP,
                 trade_volume_24_h_btc=APIHelper.SKIP,
                 coins=APIHelper.SKIP,
                 pairs=APIHelper.SKIP,
                 tickers=APIHelper.SKIP):
        """Constructor for the ExchangeData class"""

        # Initialize members of the class
        if name is not APIHelper.SKIP:
            self.name = name 
        if year_established is not APIHelper.SKIP:
            self.year_established = year_established 
        if country is not APIHelper.SKIP:
            self.country = country 
        if description is not APIHelper.SKIP:
            self.description = description 
        if url is not APIHelper.SKIP:
            self.url = url 
        if image is not APIHelper.SKIP:
            self.image = image 
        if facebook_url is not APIHelper.SKIP:
            self.facebook_url = facebook_url 
        if reddit_url is not APIHelper.SKIP:
            self.reddit_url = reddit_url 
        if telegram_url is not APIHelper.SKIP:
            self.telegram_url = telegram_url 
        if slack_url is not APIHelper.SKIP:
            self.slack_url = slack_url 
        if other_url_1 is not APIHelper.SKIP:
            self.other_url_1 = other_url_1 
        if other_url_2 is not APIHelper.SKIP:
            self.other_url_2 = other_url_2 
        if twitter_handle is not APIHelper.SKIP:
            self.twitter_handle = twitter_handle 
        if has_trading_incentive is not APIHelper.SKIP:
            self.has_trading_incentive = has_trading_incentive 
        if centralized is not APIHelper.SKIP:
            self.centralized = centralized 
        if public_notice is not APIHelper.SKIP:
            self.public_notice = public_notice 
        if alert_notice is not APIHelper.SKIP:
            self.alert_notice = alert_notice 
        if trust_score is not APIHelper.SKIP:
            self.trust_score = trust_score 
        if trust_score_rank is not APIHelper.SKIP:
            self.trust_score_rank = trust_score_rank 
        if trade_volume_24_h_btc is not APIHelper.SKIP:
            self.trade_volume_24_h_btc = trade_volume_24_h_btc 
        if coins is not APIHelper.SKIP:
            self.coins = coins 
        if pairs is not APIHelper.SKIP:
            self.pairs = pairs 
        if tickers is not APIHelper.SKIP:
            self.tickers = tickers 

    @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
        name = dictionary.get("name") if dictionary.get("name") else APIHelper.SKIP
        year_established = dictionary.get("year_established") if dictionary.get("year_established") else APIHelper.SKIP
        country = dictionary.get("country") if dictionary.get("country") else APIHelper.SKIP
        description = dictionary.get("description") if dictionary.get("description") else APIHelper.SKIP
        url = dictionary.get("url") if dictionary.get("url") else APIHelper.SKIP
        image = dictionary.get("image") if dictionary.get("image") else APIHelper.SKIP
        facebook_url = dictionary.get("facebook_url") if dictionary.get("facebook_url") else APIHelper.SKIP
        reddit_url = dictionary.get("reddit_url") if dictionary.get("reddit_url") else APIHelper.SKIP
        telegram_url = dictionary.get("telegram_url") if dictionary.get("telegram_url") else APIHelper.SKIP
        slack_url = dictionary.get("slack_url") if dictionary.get("slack_url") else APIHelper.SKIP
        other_url_1 = dictionary.get("other_url_1") if dictionary.get("other_url_1") else APIHelper.SKIP
        other_url_2 = dictionary.get("other_url_2") if dictionary.get("other_url_2") else APIHelper.SKIP
        twitter_handle = dictionary.get("twitter_handle") if dictionary.get("twitter_handle") else APIHelper.SKIP
        has_trading_incentive = dictionary.get("has_trading_incentive") if "has_trading_incentive" in dictionary.keys() else APIHelper.SKIP
        centralized = dictionary.get("centralized") if "centralized" in dictionary.keys() else APIHelper.SKIP
        public_notice = dictionary.get("public_notice") if dictionary.get("public_notice") else APIHelper.SKIP
        alert_notice = dictionary.get("alert_notice") if dictionary.get("alert_notice") else APIHelper.SKIP
        trust_score = dictionary.get("trust_score") if dictionary.get("trust_score") else APIHelper.SKIP
        trust_score_rank = dictionary.get("trust_score_rank") if dictionary.get("trust_score_rank") else APIHelper.SKIP
        trade_volume_24_h_btc = dictionary.get("trade_volume_24h_btc") if dictionary.get("trade_volume_24h_btc") else APIHelper.SKIP
        coins = dictionary.get("coins") if dictionary.get("coins") else APIHelper.SKIP
        pairs = dictionary.get("pairs") if dictionary.get("pairs") else APIHelper.SKIP
        tickers = dictionary.get("tickers") if dictionary.get("tickers") else APIHelper.SKIP
        # Return an object of this model
        return cls(name,
                   year_established,
                   country,
                   description,
                   url,
                   image,
                   facebook_url,
                   reddit_url,
                   telegram_url,
                   slack_url,
                   other_url_1,
                   other_url_2,
                   twitter_handle,
                   has_trading_incentive,
                   centralized,
                   public_notice,
                   alert_notice,
                   trust_score,
                   trust_score_rank,
                   trade_volume_24_h_btc,
                   coins,
                   pairs,
                   tickers)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'name={(self.name if hasattr(self, "name") else None)!r}, '
                f'year_established={(self.year_established if hasattr(self, "year_established") else None)!r}, '
                f'country={(self.country if hasattr(self, "country") else None)!r}, '
                f'description={(self.description if hasattr(self, "description") else None)!r}, '
                f'url={(self.url if hasattr(self, "url") else None)!r}, '
                f'image={(self.image if hasattr(self, "image") else None)!r}, '
                f'facebook_url={(self.facebook_url if hasattr(self, "facebook_url") else None)!r}, '
                f'reddit_url={(self.reddit_url if hasattr(self, "reddit_url") else None)!r}, '
                f'telegram_url={(self.telegram_url if hasattr(self, "telegram_url") else None)!r}, '
                f'slack_url={(self.slack_url if hasattr(self, "slack_url") else None)!r}, '
                f'other_url_1={(self.other_url_1 if hasattr(self, "other_url_1") else None)!r}, '
                f'other_url_2={(self.other_url_2 if hasattr(self, "other_url_2") else None)!r}, '
                f'twitter_handle={(self.twitter_handle if hasattr(self, "twitter_handle") else None)!r}, '
                f'has_trading_incentive={(self.has_trading_incentive if hasattr(self, "has_trading_incentive") else None)!r}, '
                f'centralized={(self.centralized if hasattr(self, "centralized") else None)!r}, '
                f'public_notice={(self.public_notice if hasattr(self, "public_notice") else None)!r}, '
                f'alert_notice={(self.alert_notice if hasattr(self, "alert_notice") else None)!r}, '
                f'trust_score={(self.trust_score if hasattr(self, "trust_score") else None)!r}, '
                f'trust_score_rank={(self.trust_score_rank if hasattr(self, "trust_score_rank") else None)!r}, '
                f'trade_volume_24_h_btc={(self.trade_volume_24_h_btc if hasattr(self, "trade_volume_24_h_btc") else None)!r}, '
                f'coins={(self.coins if hasattr(self, "coins") else None)!r}, '
                f'pairs={(self.pairs if hasattr(self, "pairs") else None)!r}, '
                f'tickers={(self.tickers if hasattr(self, "tickers") else None)!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'name={(self.name if hasattr(self, "name") else None)!s}, '
                f'year_established={(self.year_established if hasattr(self, "year_established") else None)!s}, '
                f'country={(self.country if hasattr(self, "country") else None)!s}, '
                f'description={(self.description if hasattr(self, "description") else None)!s}, '
                f'url={(self.url if hasattr(self, "url") else None)!s}, '
                f'image={(self.image if hasattr(self, "image") else None)!s}, '
                f'facebook_url={(self.facebook_url if hasattr(self, "facebook_url") else None)!s}, '
                f'reddit_url={(self.reddit_url if hasattr(self, "reddit_url") else None)!s}, '
                f'telegram_url={(self.telegram_url if hasattr(self, "telegram_url") else None)!s}, '
                f'slack_url={(self.slack_url if hasattr(self, "slack_url") else None)!s}, '
                f'other_url_1={(self.other_url_1 if hasattr(self, "other_url_1") else None)!s}, '
                f'other_url_2={(self.other_url_2 if hasattr(self, "other_url_2") else None)!s}, '
                f'twitter_handle={(self.twitter_handle if hasattr(self, "twitter_handle") else None)!s}, '
                f'has_trading_incentive={(self.has_trading_incentive if hasattr(self, "has_trading_incentive") else None)!s}, '
                f'centralized={(self.centralized if hasattr(self, "centralized") else None)!s}, '
                f'public_notice={(self.public_notice if hasattr(self, "public_notice") else None)!s}, '
                f'alert_notice={(self.alert_notice if hasattr(self, "alert_notice") else None)!s}, '
                f'trust_score={(self.trust_score if hasattr(self, "trust_score") else None)!s}, '
                f'trust_score_rank={(self.trust_score_rank if hasattr(self, "trust_score_rank") else None)!s}, '
                f'trade_volume_24_h_btc={(self.trade_volume_24_h_btc if hasattr(self, "trade_volume_24_h_btc") else None)!s}, '
                f'coins={(self.coins if hasattr(self, "coins") else None)!s}, '
                f'pairs={(self.pairs if hasattr(self, "pairs") else None)!s}, '
                f'tickers={(self.tickers if hasattr(self, "tickers") else None)!s})')
