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

"""
uexcorpapi

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


class Data39(object):

    """Implementation of the 'Data39' model.

    Attributes:
        currency (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.
        game_version (str): The model property of type str.
        id (str): The model property of type str.
        id_vehicle (str): The model property of type str.
        on_sale (str): The model property of type str.
        on_sale_concierge (str): The model property of type str.
        on_sale_package (str): The model property of type str.
        on_sale_warbond (str): The model property of type str.
        price (str): The model property of type str.
        price_concierge (str): The model property of type str.
        price_package (str): The model property of type str.
        price_warbond (str): The model property of type str.
        vehicle_name (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 = {
        "currency": 'currency',
        "date_added": 'date_added',
        "date_modified": 'date_modified',
        "game_version": 'game_version',
        "id": 'id',
        "id_vehicle": 'id_vehicle',
        "on_sale": 'on_sale',
        "on_sale_concierge": 'on_sale_concierge',
        "on_sale_package": 'on_sale_package',
        "on_sale_warbond": 'on_sale_warbond',
        "price": 'price',
        "price_concierge": 'price_concierge',
        "price_package": 'price_package',
        "price_warbond": 'price_warbond',
        "vehicle_name": 'vehicle_name'
    }

    def __init__(self,
                 currency=None,
                 date_added=None,
                 date_modified=None,
                 game_version=None,
                 id=None,
                 id_vehicle=None,
                 on_sale=None,
                 on_sale_concierge=None,
                 on_sale_package=None,
                 on_sale_warbond=None,
                 price=None,
                 price_concierge=None,
                 price_package=None,
                 price_warbond=None,
                 vehicle_name=None,
                 additional_properties=None):
        """Constructor for the Data39 class"""

        # Initialize members of the class
        self.currency = currency 
        self.date_added = date_added 
        self.date_modified = date_modified 
        self.game_version = game_version 
        self.id = id 
        self.id_vehicle = id_vehicle 
        self.on_sale = on_sale 
        self.on_sale_concierge = on_sale_concierge 
        self.on_sale_package = on_sale_package 
        self.on_sale_warbond = on_sale_warbond 
        self.price = price 
        self.price_concierge = price_concierge 
        self.price_package = price_package 
        self.price_warbond = price_warbond 
        self.vehicle_name = vehicle_name 

        # 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
        currency = dictionary.get("currency") if dictionary.get("currency") 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
        game_version = dictionary.get("game_version") if dictionary.get("game_version") else None
        id = dictionary.get("id") if dictionary.get("id") else None
        id_vehicle = dictionary.get("id_vehicle") if dictionary.get("id_vehicle") else None
        on_sale = dictionary.get("on_sale") if dictionary.get("on_sale") else None
        on_sale_concierge = dictionary.get("on_sale_concierge") if dictionary.get("on_sale_concierge") else None
        on_sale_package = dictionary.get("on_sale_package") if dictionary.get("on_sale_package") else None
        on_sale_warbond = dictionary.get("on_sale_warbond") if dictionary.get("on_sale_warbond") else None
        price = dictionary.get("price") if dictionary.get("price") else None
        price_concierge = dictionary.get("price_concierge") if dictionary.get("price_concierge") else None
        price_package = dictionary.get("price_package") if dictionary.get("price_package") else None
        price_warbond = dictionary.get("price_warbond") if dictionary.get("price_warbond") else None
        vehicle_name = dictionary.get("vehicle_name") if dictionary.get("vehicle_name") 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(currency,
                   date_added,
                   date_modified,
                   game_version,
                   id,
                   id_vehicle,
                   on_sale,
                   on_sale_concierge,
                   on_sale_package,
                   on_sale_warbond,
                   price,
                   price_concierge,
                   price_package,
                   price_warbond,
                   vehicle_name,
                   additional_properties)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'currency={self.currency!r}, '
                f'date_added={self.date_added!r}, '
                f'date_modified={self.date_modified!r}, '
                f'game_version={self.game_version!r}, '
                f'id={self.id!r}, '
                f'id_vehicle={self.id_vehicle!r}, '
                f'on_sale={self.on_sale!r}, '
                f'on_sale_concierge={self.on_sale_concierge!r}, '
                f'on_sale_package={self.on_sale_package!r}, '
                f'on_sale_warbond={self.on_sale_warbond!r}, '
                f'price={self.price!r}, '
                f'price_concierge={self.price_concierge!r}, '
                f'price_package={self.price_package!r}, '
                f'price_warbond={self.price_warbond!r}, '
                f'vehicle_name={self.vehicle_name!r}, '
                f'additional_properties={self.additional_properties!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'currency={self.currency!s}, '
                f'date_added={self.date_added!s}, '
                f'date_modified={self.date_modified!s}, '
                f'game_version={self.game_version!s}, '
                f'id={self.id!s}, '
                f'id_vehicle={self.id_vehicle!s}, '
                f'on_sale={self.on_sale!s}, '
                f'on_sale_concierge={self.on_sale_concierge!s}, '
                f'on_sale_package={self.on_sale_package!s}, '
                f'on_sale_warbond={self.on_sale_warbond!s}, '
                f'price={self.price!s}, '
                f'price_concierge={self.price_concierge!s}, '
                f'price_package={self.price_package!s}, '
                f'price_warbond={self.price_warbond!s}, '
                f'vehicle_name={self.vehicle_name!s}, '
                f'additional_properties={self.additional_properties!s})')
