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

"""
uexcorpapi

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


class Datum3(object):

    """Implementation of the 'Datum3' model.

    Attributes:
        code (str): The model property of type str.
        date_added (str): The model property of type str.
        date_modified (str): The model property of type str.
        id (str): The model property of type str.
        id_parent (str): The model property of type str.
        is_available (str): The model property of type str.
        is_available_live (str): The model property of type str.
        is_buggy (str): The model property of type str.
        is_buyable (str): The model property of type str.
        is_explosive (str): The model property of type str.
        is_extractable (str): The model property of type str.
        is_fuel (str): The model property of type str.
        is_harvestable (str): The model property of type str.
        is_illegal (str): The model property of type str.
        is_inert (str): The model property of type str.
        is_mineral (str): The model property of type str.
        is_raw (str): The model property of type str.
        is_refinable (str): The model property of type str.
        is_refined (str): The model property of type str.
        is_sellable (str): The model property of type str.
        is_temporary (str): The model property of type str.
        is_visible (str): The model property of type str.
        is_volatile_qt (str): The model property of type str.
        is_volatile_time (str): The model property of type str.
        kind (str): The model property of type str.
        name (str): The model property of type str.
        price_buy (str): The model property of type str.
        price_sell (str): The model property of type str.
        weight_scu (str): The model property of type str.
        wiki (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 = {
        "code": 'code',
        "date_added": 'date_added',
        "date_modified": 'date_modified',
        "id": 'id',
        "id_parent": 'id_parent',
        "is_available": 'is_available',
        "is_available_live": 'is_available_live',
        "is_buggy": 'is_buggy',
        "is_buyable": 'is_buyable',
        "is_explosive": 'is_explosive',
        "is_extractable": 'is_extractable',
        "is_fuel": 'is_fuel',
        "is_harvestable": 'is_harvestable',
        "is_illegal": 'is_illegal',
        "is_inert": 'is_inert',
        "is_mineral": 'is_mineral',
        "is_raw": 'is_raw',
        "is_refinable": 'is_refinable',
        "is_refined": 'is_refined',
        "is_sellable": 'is_sellable',
        "is_temporary": 'is_temporary',
        "is_visible": 'is_visible',
        "is_volatile_qt": 'is_volatile_qt',
        "is_volatile_time": 'is_volatile_time',
        "kind": 'kind',
        "name": 'name',
        "price_buy": 'price_buy',
        "price_sell": 'price_sell',
        "weight_scu": 'weight_scu',
        "wiki": 'wiki'
    }

    def __init__(self,
                 code=None,
                 date_added=None,
                 date_modified=None,
                 id=None,
                 id_parent=None,
                 is_available=None,
                 is_available_live=None,
                 is_buggy=None,
                 is_buyable=None,
                 is_explosive=None,
                 is_extractable=None,
                 is_fuel=None,
                 is_harvestable=None,
                 is_illegal=None,
                 is_inert=None,
                 is_mineral=None,
                 is_raw=None,
                 is_refinable=None,
                 is_refined=None,
                 is_sellable=None,
                 is_temporary=None,
                 is_visible=None,
                 is_volatile_qt=None,
                 is_volatile_time=None,
                 kind=None,
                 name=None,
                 price_buy=None,
                 price_sell=None,
                 weight_scu=None,
                 wiki=None,
                 additional_properties=None):
        """Constructor for the Datum3 class"""

        # Initialize members of the class
        self.code = code 
        self.date_added = date_added 
        self.date_modified = date_modified 
        self.id = id 
        self.id_parent = id_parent 
        self.is_available = is_available 
        self.is_available_live = is_available_live 
        self.is_buggy = is_buggy 
        self.is_buyable = is_buyable 
        self.is_explosive = is_explosive 
        self.is_extractable = is_extractable 
        self.is_fuel = is_fuel 
        self.is_harvestable = is_harvestable 
        self.is_illegal = is_illegal 
        self.is_inert = is_inert 
        self.is_mineral = is_mineral 
        self.is_raw = is_raw 
        self.is_refinable = is_refinable 
        self.is_refined = is_refined 
        self.is_sellable = is_sellable 
        self.is_temporary = is_temporary 
        self.is_visible = is_visible 
        self.is_volatile_qt = is_volatile_qt 
        self.is_volatile_time = is_volatile_time 
        self.kind = kind 
        self.name = name 
        self.price_buy = price_buy 
        self.price_sell = price_sell 
        self.weight_scu = weight_scu 
        self.wiki = wiki 

        # 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
        code = dictionary.get("code") if dictionary.get("code") else None
        date_added = dictionary.get("date_added") if dictionary.get("date_added") else None
        date_modified = dictionary.get("date_modified") if dictionary.get("date_modified") else None
        id = dictionary.get("id") if dictionary.get("id") else None
        id_parent = dictionary.get("id_parent") if dictionary.get("id_parent") else None
        is_available = dictionary.get("is_available") if dictionary.get("is_available") else None
        is_available_live = dictionary.get("is_available_live") if dictionary.get("is_available_live") else None
        is_buggy = dictionary.get("is_buggy") if dictionary.get("is_buggy") else None
        is_buyable = dictionary.get("is_buyable") if dictionary.get("is_buyable") else None
        is_explosive = dictionary.get("is_explosive") if dictionary.get("is_explosive") else None
        is_extractable = dictionary.get("is_extractable") if dictionary.get("is_extractable") else None
        is_fuel = dictionary.get("is_fuel") if dictionary.get("is_fuel") else None
        is_harvestable = dictionary.get("is_harvestable") if dictionary.get("is_harvestable") else None
        is_illegal = dictionary.get("is_illegal") if dictionary.get("is_illegal") else None
        is_inert = dictionary.get("is_inert") if dictionary.get("is_inert") else None
        is_mineral = dictionary.get("is_mineral") if dictionary.get("is_mineral") else None
        is_raw = dictionary.get("is_raw") if dictionary.get("is_raw") else None
        is_refinable = dictionary.get("is_refinable") if dictionary.get("is_refinable") else None
        is_refined = dictionary.get("is_refined") if dictionary.get("is_refined") else None
        is_sellable = dictionary.get("is_sellable") if dictionary.get("is_sellable") else None
        is_temporary = dictionary.get("is_temporary") if dictionary.get("is_temporary") else None
        is_visible = dictionary.get("is_visible") if dictionary.get("is_visible") else None
        is_volatile_qt = dictionary.get("is_volatile_qt") if dictionary.get("is_volatile_qt") else None
        is_volatile_time = dictionary.get("is_volatile_time") if dictionary.get("is_volatile_time") else None
        kind = dictionary.get("kind") if dictionary.get("kind") else None
        name = dictionary.get("name") if dictionary.get("name") else None
        price_buy = dictionary.get("price_buy") if dictionary.get("price_buy") else None
        price_sell = dictionary.get("price_sell") if dictionary.get("price_sell") else None
        weight_scu = dictionary.get("weight_scu") if dictionary.get("weight_scu") else None
        wiki = dictionary.get("wiki") if dictionary.get("wiki") 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(code,
                   date_added,
                   date_modified,
                   id,
                   id_parent,
                   is_available,
                   is_available_live,
                   is_buggy,
                   is_buyable,
                   is_explosive,
                   is_extractable,
                   is_fuel,
                   is_harvestable,
                   is_illegal,
                   is_inert,
                   is_mineral,
                   is_raw,
                   is_refinable,
                   is_refined,
                   is_sellable,
                   is_temporary,
                   is_visible,
                   is_volatile_qt,
                   is_volatile_time,
                   kind,
                   name,
                   price_buy,
                   price_sell,
                   weight_scu,
                   wiki,
                   additional_properties)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'code={self.code!r}, '
                f'date_added={self.date_added!r}, '
                f'date_modified={self.date_modified!r}, '
                f'id={self.id!r}, '
                f'id_parent={self.id_parent!r}, '
                f'is_available={self.is_available!r}, '
                f'is_available_live={self.is_available_live!r}, '
                f'is_buggy={self.is_buggy!r}, '
                f'is_buyable={self.is_buyable!r}, '
                f'is_explosive={self.is_explosive!r}, '
                f'is_extractable={self.is_extractable!r}, '
                f'is_fuel={self.is_fuel!r}, '
                f'is_harvestable={self.is_harvestable!r}, '
                f'is_illegal={self.is_illegal!r}, '
                f'is_inert={self.is_inert!r}, '
                f'is_mineral={self.is_mineral!r}, '
                f'is_raw={self.is_raw!r}, '
                f'is_refinable={self.is_refinable!r}, '
                f'is_refined={self.is_refined!r}, '
                f'is_sellable={self.is_sellable!r}, '
                f'is_temporary={self.is_temporary!r}, '
                f'is_visible={self.is_visible!r}, '
                f'is_volatile_qt={self.is_volatile_qt!r}, '
                f'is_volatile_time={self.is_volatile_time!r}, '
                f'kind={self.kind!r}, '
                f'name={self.name!r}, '
                f'price_buy={self.price_buy!r}, '
                f'price_sell={self.price_sell!r}, '
                f'weight_scu={self.weight_scu!r}, '
                f'wiki={self.wiki!r}, '
                f'additional_properties={self.additional_properties!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'code={self.code!s}, '
                f'date_added={self.date_added!s}, '
                f'date_modified={self.date_modified!s}, '
                f'id={self.id!s}, '
                f'id_parent={self.id_parent!s}, '
                f'is_available={self.is_available!s}, '
                f'is_available_live={self.is_available_live!s}, '
                f'is_buggy={self.is_buggy!s}, '
                f'is_buyable={self.is_buyable!s}, '
                f'is_explosive={self.is_explosive!s}, '
                f'is_extractable={self.is_extractable!s}, '
                f'is_fuel={self.is_fuel!s}, '
                f'is_harvestable={self.is_harvestable!s}, '
                f'is_illegal={self.is_illegal!s}, '
                f'is_inert={self.is_inert!s}, '
                f'is_mineral={self.is_mineral!s}, '
                f'is_raw={self.is_raw!s}, '
                f'is_refinable={self.is_refinable!s}, '
                f'is_refined={self.is_refined!s}, '
                f'is_sellable={self.is_sellable!s}, '
                f'is_temporary={self.is_temporary!s}, '
                f'is_visible={self.is_visible!s}, '
                f'is_volatile_qt={self.is_volatile_qt!s}, '
                f'is_volatile_time={self.is_volatile_time!s}, '
                f'kind={self.kind!s}, '
                f'name={self.name!s}, '
                f'price_buy={self.price_buy!s}, '
                f'price_sell={self.price_sell!s}, '
                f'weight_scu={self.weight_scu!s}, '
                f'wiki={self.wiki!s}, '
                f'additional_properties={self.additional_properties!s})')
