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

"""
uexcorpapi

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


class Datum15(object):

    """Implementation of the 'Datum15' model.

    Attributes:
        availability_buy (str): The model property of type str.
        availability_sell (str): The model property of type str.
        cax_score (str): The model property of type str.
        code (str): The model property of type str.
        id (str): The model property of type str.
        investment (str): The model property of type str.
        investment_per_scu (str): The model property of type str.
        is_average_trade_price_invalid (str): The model property of type str.
        is_illegal (str): The model property of type str.
        is_temporary (str): The model property of type str.
        name (str): The model property of type str.
        price_buy_avg (str): The model property of type str.
        price_buy_min (str): The model property of type str.
        price_buy_minimum (Any): The model property of type Any.
        price_sell_avg (str): The model property of type str.
        price_sell_max (str): The model property of type str.
        price_sell_maximum (Any): The model property of type Any.
        profitability (str): The model property of type str.
        profitability_best (str): The model property of type str.
        profitability_per_scu (str): The model property of type str.
        profitability_per_scu_best (str): The model property of type str.
        profitability_relative_percentage (str): The model property of type
            str.
        profitability_relative_percentage_best (str): The model property of
            type str.
        scu_buy_avg (str): The model property of type str.
        scu_buy_users (str): The model property of type str.
        scu_buy_users_rows (str): The model property of type str.
        scu_sell_avg (str): The model property of type str.
        scu_sell_users (str): The model property of type str.
        scu_sell_users_rows (str): The model property of type str.
        slug (str): The model property of type str.
        status_buy_avg (str): The model property of type str.
        status_sell_avg (str): The model property of type str.
        terminal_id_price_buy_minimum (Any): The model property of type Any.
        terminal_id_price_sell_maximum (Any): The model property of type Any.
        terminal_slug_price_buy_minimum (Any): The model property of type Any.
        terminal_slug_price_sell_maximum (Any): The model property of type Any.
        volatility_price_buy (str): The model property of type str.
        volatility_price_sell (str): The model property of type str.
        volatility_scu_buy (str): The model property of type str.
        volatility_scu_sell (str): The model property of type str.
        additional_properties (Dict[str, Any]): The additional properties for
            the model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "availability_buy": 'availability_buy',
        "availability_sell": 'availability_sell',
        "cax_score": 'cax_score',
        "code": 'code',
        "id": 'id',
        "investment": 'investment',
        "investment_per_scu": 'investment_per_scu',
        "is_average_trade_price_invalid": 'is_average_trade_price_invalid',
        "is_illegal": 'is_illegal',
        "is_temporary": 'is_temporary',
        "name": 'name',
        "price_buy_avg": 'price_buy_avg',
        "price_buy_min": 'price_buy_min',
        "price_buy_minimum": 'price_buy_minimum',
        "price_sell_avg": 'price_sell_avg',
        "price_sell_max": 'price_sell_max',
        "price_sell_maximum": 'price_sell_maximum',
        "profitability": 'profitability',
        "profitability_best": 'profitability_best',
        "profitability_per_scu": 'profitability_per_scu',
        "profitability_per_scu_best": 'profitability_per_scu_best',
        "profitability_relative_percentage": 'profitability_relative_percentage',
        "profitability_relative_percentage_best": 'profitability_relative_percentage_best',
        "scu_buy_avg": 'scu_buy_avg',
        "scu_buy_users": 'scu_buy_users',
        "scu_buy_users_rows": 'scu_buy_users_rows',
        "scu_sell_avg": 'scu_sell_avg',
        "scu_sell_users": 'scu_sell_users',
        "scu_sell_users_rows": 'scu_sell_users_rows',
        "slug": 'slug',
        "status_buy_avg": 'status_buy_avg',
        "status_sell_avg": 'status_sell_avg',
        "terminal_id_price_buy_minimum": 'terminal_id_price_buy_minimum',
        "terminal_id_price_sell_maximum": 'terminal_id_price_sell_maximum',
        "terminal_slug_price_buy_minimum": 'terminal_slug_price_buy_minimum',
        "terminal_slug_price_sell_maximum": 'terminal_slug_price_sell_maximum',
        "volatility_price_buy": 'volatility_price_buy',
        "volatility_price_sell": 'volatility_price_sell',
        "volatility_scu_buy": 'volatility_scu_buy',
        "volatility_scu_sell": 'volatility_scu_sell'
    }

    def __init__(self,
                 availability_buy=None,
                 availability_sell=None,
                 cax_score=None,
                 code=None,
                 id=None,
                 investment=None,
                 investment_per_scu=None,
                 is_average_trade_price_invalid=None,
                 is_illegal=None,
                 is_temporary=None,
                 name=None,
                 price_buy_avg=None,
                 price_buy_min=None,
                 price_buy_minimum=None,
                 price_sell_avg=None,
                 price_sell_max=None,
                 price_sell_maximum=None,
                 profitability=None,
                 profitability_best=None,
                 profitability_per_scu=None,
                 profitability_per_scu_best=None,
                 profitability_relative_percentage=None,
                 profitability_relative_percentage_best=None,
                 scu_buy_avg=None,
                 scu_buy_users=None,
                 scu_buy_users_rows=None,
                 scu_sell_avg=None,
                 scu_sell_users=None,
                 scu_sell_users_rows=None,
                 slug=None,
                 status_buy_avg=None,
                 status_sell_avg=None,
                 terminal_id_price_buy_minimum=None,
                 terminal_id_price_sell_maximum=None,
                 terminal_slug_price_buy_minimum=None,
                 terminal_slug_price_sell_maximum=None,
                 volatility_price_buy=None,
                 volatility_price_sell=None,
                 volatility_scu_buy=None,
                 volatility_scu_sell=None,
                 additional_properties=None):
        """Constructor for the Datum15 class"""

        # Initialize members of the class
        self.availability_buy = availability_buy 
        self.availability_sell = availability_sell 
        self.cax_score = cax_score 
        self.code = code 
        self.id = id 
        self.investment = investment 
        self.investment_per_scu = investment_per_scu 
        self.is_average_trade_price_invalid = is_average_trade_price_invalid 
        self.is_illegal = is_illegal 
        self.is_temporary = is_temporary 
        self.name = name 
        self.price_buy_avg = price_buy_avg 
        self.price_buy_min = price_buy_min 
        self.price_buy_minimum = price_buy_minimum 
        self.price_sell_avg = price_sell_avg 
        self.price_sell_max = price_sell_max 
        self.price_sell_maximum = price_sell_maximum 
        self.profitability = profitability 
        self.profitability_best = profitability_best 
        self.profitability_per_scu = profitability_per_scu 
        self.profitability_per_scu_best = profitability_per_scu_best 
        self.profitability_relative_percentage = profitability_relative_percentage 
        self.profitability_relative_percentage_best = profitability_relative_percentage_best 
        self.scu_buy_avg = scu_buy_avg 
        self.scu_buy_users = scu_buy_users 
        self.scu_buy_users_rows = scu_buy_users_rows 
        self.scu_sell_avg = scu_sell_avg 
        self.scu_sell_users = scu_sell_users 
        self.scu_sell_users_rows = scu_sell_users_rows 
        self.slug = slug 
        self.status_buy_avg = status_buy_avg 
        self.status_sell_avg = status_sell_avg 
        self.terminal_id_price_buy_minimum = terminal_id_price_buy_minimum 
        self.terminal_id_price_sell_maximum = terminal_id_price_sell_maximum 
        self.terminal_slug_price_buy_minimum = terminal_slug_price_buy_minimum 
        self.terminal_slug_price_sell_maximum = terminal_slug_price_sell_maximum 
        self.volatility_price_buy = volatility_price_buy 
        self.volatility_price_sell = volatility_price_sell 
        self.volatility_scu_buy = volatility_scu_buy 
        self.volatility_scu_sell = volatility_scu_sell 

        # Add additional model properties to the instance
        if additional_properties is None:
            additional_properties = {}
        self.additional_properties = additional_properties

    @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
        availability_buy = dictionary.get("availability_buy") if dictionary.get("availability_buy") else None
        availability_sell = dictionary.get("availability_sell") if dictionary.get("availability_sell") else None
        cax_score = dictionary.get("cax_score") if dictionary.get("cax_score") else None
        code = dictionary.get("code") if dictionary.get("code") else None
        id = dictionary.get("id") if dictionary.get("id") else None
        investment = dictionary.get("investment") if dictionary.get("investment") else None
        investment_per_scu = dictionary.get("investment_per_scu") if dictionary.get("investment_per_scu") else None
        is_average_trade_price_invalid = dictionary.get("is_average_trade_price_invalid") if dictionary.get("is_average_trade_price_invalid") else None
        is_illegal = dictionary.get("is_illegal") if dictionary.get("is_illegal") else None
        is_temporary = dictionary.get("is_temporary") if dictionary.get("is_temporary") else None
        name = dictionary.get("name") if dictionary.get("name") else None
        price_buy_avg = dictionary.get("price_buy_avg") if dictionary.get("price_buy_avg") else None
        price_buy_min = dictionary.get("price_buy_min") if dictionary.get("price_buy_min") else None
        price_buy_minimum = dictionary.get("price_buy_minimum") if dictionary.get("price_buy_minimum") else None
        price_sell_avg = dictionary.get("price_sell_avg") if dictionary.get("price_sell_avg") else None
        price_sell_max = dictionary.get("price_sell_max") if dictionary.get("price_sell_max") else None
        price_sell_maximum = dictionary.get("price_sell_maximum") if dictionary.get("price_sell_maximum") else None
        profitability = dictionary.get("profitability") if dictionary.get("profitability") else None
        profitability_best = dictionary.get("profitability_best") if dictionary.get("profitability_best") else None
        profitability_per_scu = dictionary.get("profitability_per_scu") if dictionary.get("profitability_per_scu") else None
        profitability_per_scu_best = dictionary.get("profitability_per_scu_best") if dictionary.get("profitability_per_scu_best") else None
        profitability_relative_percentage = dictionary.get("profitability_relative_percentage") if dictionary.get("profitability_relative_percentage") else None
        profitability_relative_percentage_best = dictionary.get("profitability_relative_percentage_best") if dictionary.get("profitability_relative_percentage_best") else None
        scu_buy_avg = dictionary.get("scu_buy_avg") if dictionary.get("scu_buy_avg") else None
        scu_buy_users = dictionary.get("scu_buy_users") if dictionary.get("scu_buy_users") else None
        scu_buy_users_rows = dictionary.get("scu_buy_users_rows") if dictionary.get("scu_buy_users_rows") else None
        scu_sell_avg = dictionary.get("scu_sell_avg") if dictionary.get("scu_sell_avg") else None
        scu_sell_users = dictionary.get("scu_sell_users") if dictionary.get("scu_sell_users") else None
        scu_sell_users_rows = dictionary.get("scu_sell_users_rows") if dictionary.get("scu_sell_users_rows") else None
        slug = dictionary.get("slug") if dictionary.get("slug") else None
        status_buy_avg = dictionary.get("status_buy_avg") if dictionary.get("status_buy_avg") else None
        status_sell_avg = dictionary.get("status_sell_avg") if dictionary.get("status_sell_avg") else None
        terminal_id_price_buy_minimum = dictionary.get("terminal_id_price_buy_minimum") if dictionary.get("terminal_id_price_buy_minimum") else None
        terminal_id_price_sell_maximum = dictionary.get("terminal_id_price_sell_maximum") if dictionary.get("terminal_id_price_sell_maximum") else None
        terminal_slug_price_buy_minimum = dictionary.get("terminal_slug_price_buy_minimum") if dictionary.get("terminal_slug_price_buy_minimum") else None
        terminal_slug_price_sell_maximum = dictionary.get("terminal_slug_price_sell_maximum") if dictionary.get("terminal_slug_price_sell_maximum") else None
        volatility_price_buy = dictionary.get("volatility_price_buy") if dictionary.get("volatility_price_buy") else None
        volatility_price_sell = dictionary.get("volatility_price_sell") if dictionary.get("volatility_price_sell") else None
        volatility_scu_buy = dictionary.get("volatility_scu_buy") if dictionary.get("volatility_scu_buy") else None
        volatility_scu_sell = dictionary.get("volatility_scu_sell") if dictionary.get("volatility_scu_sell") else None
        additional_properties = APIHelper.get_additional_properties(
            dictionary={k: v for k, v in dictionary.items() if k not in cls._names.values()},
            unboxing_function=lambda value: value)
        # Return an object of this model
        return cls(availability_buy,
                   availability_sell,
                   cax_score,
                   code,
                   id,
                   investment,
                   investment_per_scu,
                   is_average_trade_price_invalid,
                   is_illegal,
                   is_temporary,
                   name,
                   price_buy_avg,
                   price_buy_min,
                   price_buy_minimum,
                   price_sell_avg,
                   price_sell_max,
                   price_sell_maximum,
                   profitability,
                   profitability_best,
                   profitability_per_scu,
                   profitability_per_scu_best,
                   profitability_relative_percentage,
                   profitability_relative_percentage_best,
                   scu_buy_avg,
                   scu_buy_users,
                   scu_buy_users_rows,
                   scu_sell_avg,
                   scu_sell_users,
                   scu_sell_users_rows,
                   slug,
                   status_buy_avg,
                   status_sell_avg,
                   terminal_id_price_buy_minimum,
                   terminal_id_price_sell_maximum,
                   terminal_slug_price_buy_minimum,
                   terminal_slug_price_sell_maximum,
                   volatility_price_buy,
                   volatility_price_sell,
                   volatility_scu_buy,
                   volatility_scu_sell,
                   additional_properties)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'availability_buy={self.availability_buy!r}, '
                f'availability_sell={self.availability_sell!r}, '
                f'cax_score={self.cax_score!r}, '
                f'code={self.code!r}, '
                f'id={self.id!r}, '
                f'investment={self.investment!r}, '
                f'investment_per_scu={self.investment_per_scu!r}, '
                f'is_average_trade_price_invalid={self.is_average_trade_price_invalid!r}, '
                f'is_illegal={self.is_illegal!r}, '
                f'is_temporary={self.is_temporary!r}, '
                f'name={self.name!r}, '
                f'price_buy_avg={self.price_buy_avg!r}, '
                f'price_buy_min={self.price_buy_min!r}, '
                f'price_buy_minimum={self.price_buy_minimum!r}, '
                f'price_sell_avg={self.price_sell_avg!r}, '
                f'price_sell_max={self.price_sell_max!r}, '
                f'price_sell_maximum={self.price_sell_maximum!r}, '
                f'profitability={self.profitability!r}, '
                f'profitability_best={self.profitability_best!r}, '
                f'profitability_per_scu={self.profitability_per_scu!r}, '
                f'profitability_per_scu_best={self.profitability_per_scu_best!r}, '
                f'profitability_relative_percentage={self.profitability_relative_percentage!r}, '
                f'profitability_relative_percentage_best={self.profitability_relative_percentage_best!r}, '
                f'scu_buy_avg={self.scu_buy_avg!r}, '
                f'scu_buy_users={self.scu_buy_users!r}, '
                f'scu_buy_users_rows={self.scu_buy_users_rows!r}, '
                f'scu_sell_avg={self.scu_sell_avg!r}, '
                f'scu_sell_users={self.scu_sell_users!r}, '
                f'scu_sell_users_rows={self.scu_sell_users_rows!r}, '
                f'slug={self.slug!r}, '
                f'status_buy_avg={self.status_buy_avg!r}, '
                f'status_sell_avg={self.status_sell_avg!r}, '
                f'terminal_id_price_buy_minimum={self.terminal_id_price_buy_minimum!r}, '
                f'terminal_id_price_sell_maximum={self.terminal_id_price_sell_maximum!r}, '
                f'terminal_slug_price_buy_minimum={self.terminal_slug_price_buy_minimum!r}, '
                f'terminal_slug_price_sell_maximum={self.terminal_slug_price_sell_maximum!r}, '
                f'volatility_price_buy={self.volatility_price_buy!r}, '
                f'volatility_price_sell={self.volatility_price_sell!r}, '
                f'volatility_scu_buy={self.volatility_scu_buy!r}, '
                f'volatility_scu_sell={self.volatility_scu_sell!r}, '
                f'additional_properties={self.additional_properties!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'availability_buy={self.availability_buy!s}, '
                f'availability_sell={self.availability_sell!s}, '
                f'cax_score={self.cax_score!s}, '
                f'code={self.code!s}, '
                f'id={self.id!s}, '
                f'investment={self.investment!s}, '
                f'investment_per_scu={self.investment_per_scu!s}, '
                f'is_average_trade_price_invalid={self.is_average_trade_price_invalid!s}, '
                f'is_illegal={self.is_illegal!s}, '
                f'is_temporary={self.is_temporary!s}, '
                f'name={self.name!s}, '
                f'price_buy_avg={self.price_buy_avg!s}, '
                f'price_buy_min={self.price_buy_min!s}, '
                f'price_buy_minimum={self.price_buy_minimum!s}, '
                f'price_sell_avg={self.price_sell_avg!s}, '
                f'price_sell_max={self.price_sell_max!s}, '
                f'price_sell_maximum={self.price_sell_maximum!s}, '
                f'profitability={self.profitability!s}, '
                f'profitability_best={self.profitability_best!s}, '
                f'profitability_per_scu={self.profitability_per_scu!s}, '
                f'profitability_per_scu_best={self.profitability_per_scu_best!s}, '
                f'profitability_relative_percentage={self.profitability_relative_percentage!s}, '
                f'profitability_relative_percentage_best={self.profitability_relative_percentage_best!s}, '
                f'scu_buy_avg={self.scu_buy_avg!s}, '
                f'scu_buy_users={self.scu_buy_users!s}, '
                f'scu_buy_users_rows={self.scu_buy_users_rows!s}, '
                f'scu_sell_avg={self.scu_sell_avg!s}, '
                f'scu_sell_users={self.scu_sell_users!s}, '
                f'scu_sell_users_rows={self.scu_sell_users_rows!s}, '
                f'slug={self.slug!s}, '
                f'status_buy_avg={self.status_buy_avg!s}, '
                f'status_sell_avg={self.status_sell_avg!s}, '
                f'terminal_id_price_buy_minimum={self.terminal_id_price_buy_minimum!s}, '
                f'terminal_id_price_sell_maximum={self.terminal_id_price_sell_maximum!s}, '
                f'terminal_slug_price_buy_minimum={self.terminal_slug_price_buy_minimum!s}, '
                f'terminal_slug_price_sell_maximum={self.terminal_slug_price_sell_maximum!s}, '
                f'volatility_price_buy={self.volatility_price_buy!s}, '
                f'volatility_price_sell={self.volatility_price_sell!s}, '
                f'volatility_scu_buy={self.volatility_scu_buy!s}, '
                f'volatility_scu_sell={self.volatility_scu_sell!s}, '
                f'additional_properties={self.additional_properties!s})')
