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

"""
uexcorpapi

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


class Data42(object):

    """Implementation of the 'Data42' model.

    Attributes:
        city_name (str): The model property of type str.
        datarunner (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.
        faction_affinity (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_city (str): The model property of type str.
        id_moon (str): The model property of type str.
        id_orbit (str): The model property of type str.
        id_outpost (str): The model property of type str.
        id_planet (str): The model property of type str.
        id_poi (str): The model property of type str.
        id_report (str): The model property of type str.
        id_star_system (str): The model property of type str.
        id_terminal (str): The model property of type str.
        id_vehicle (str): The model property of type str.
        moon_name (Any): The model property of type Any.
        orbit_name (str): The model property of type str.
        outpost_name (Any): The model property of type Any.
        planet_name (str): The model property of type str.
        poi_name (Any): The model property of type Any.
        price_rent (str): The model property of type str.
        price_rent_avg (str): The model property of type str.
        price_rent_avg_month (str): The model property of type str.
        price_rent_avg_week (str): The model property of type str.
        price_rent_max (str): The model property of type str.
        price_rent_max_month (str): The model property of type str.
        price_rent_max_week (str): The model property of type str.
        price_rent_min (str): The model property of type str.
        price_rent_min_month (str): The model property of type str.
        price_rent_min_week (str): The model property of type str.
        space_station_name (Any): The model property of type Any.
        star_system_name (str): The model property of type str.
        terminal_code (str): The model property of type str.
        terminal_is_player_owned (str): The model property of type str.
        terminal_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 = {
        "city_name": 'city_name',
        "datarunner": 'datarunner',
        "date_added": 'date_added',
        "date_modified": 'date_modified',
        "faction_affinity": 'faction_affinity',
        "game_version": 'game_version',
        "id": 'id',
        "id_city": 'id_city',
        "id_moon": 'id_moon',
        "id_orbit": 'id_orbit',
        "id_outpost": 'id_outpost',
        "id_planet": 'id_planet',
        "id_poi": 'id_poi',
        "id_report": 'id_report',
        "id_star_system": 'id_star_system',
        "id_terminal": 'id_terminal',
        "id_vehicle": 'id_vehicle',
        "moon_name": 'moon_name',
        "orbit_name": 'orbit_name',
        "outpost_name": 'outpost_name',
        "planet_name": 'planet_name',
        "poi_name": 'poi_name',
        "price_rent": 'price_rent',
        "price_rent_avg": 'price_rent_avg',
        "price_rent_avg_month": 'price_rent_avg_month',
        "price_rent_avg_week": 'price_rent_avg_week',
        "price_rent_max": 'price_rent_max',
        "price_rent_max_month": 'price_rent_max_month',
        "price_rent_max_week": 'price_rent_max_week',
        "price_rent_min": 'price_rent_min',
        "price_rent_min_month": 'price_rent_min_month',
        "price_rent_min_week": 'price_rent_min_week',
        "space_station_name": 'space_station_name',
        "star_system_name": 'star_system_name',
        "terminal_code": 'terminal_code',
        "terminal_is_player_owned": 'terminal_is_player_owned',
        "terminal_name": 'terminal_name'
    }

    def __init__(self,
                 city_name=None,
                 datarunner=None,
                 date_added=None,
                 date_modified=None,
                 faction_affinity=None,
                 game_version=None,
                 id=None,
                 id_city=None,
                 id_moon=None,
                 id_orbit=None,
                 id_outpost=None,
                 id_planet=None,
                 id_poi=None,
                 id_report=None,
                 id_star_system=None,
                 id_terminal=None,
                 id_vehicle=None,
                 moon_name=None,
                 orbit_name=None,
                 outpost_name=None,
                 planet_name=None,
                 poi_name=None,
                 price_rent=None,
                 price_rent_avg=None,
                 price_rent_avg_month=None,
                 price_rent_avg_week=None,
                 price_rent_max=None,
                 price_rent_max_month=None,
                 price_rent_max_week=None,
                 price_rent_min=None,
                 price_rent_min_month=None,
                 price_rent_min_week=None,
                 space_station_name=None,
                 star_system_name=None,
                 terminal_code=None,
                 terminal_is_player_owned=None,
                 terminal_name=None,
                 additional_properties=None):
        """Constructor for the Data42 class"""

        # Initialize members of the class
        self.city_name = city_name 
        self.datarunner = datarunner 
        self.date_added = date_added 
        self.date_modified = date_modified 
        self.faction_affinity = faction_affinity 
        self.game_version = game_version 
        self.id = id 
        self.id_city = id_city 
        self.id_moon = id_moon 
        self.id_orbit = id_orbit 
        self.id_outpost = id_outpost 
        self.id_planet = id_planet 
        self.id_poi = id_poi 
        self.id_report = id_report 
        self.id_star_system = id_star_system 
        self.id_terminal = id_terminal 
        self.id_vehicle = id_vehicle 
        self.moon_name = moon_name 
        self.orbit_name = orbit_name 
        self.outpost_name = outpost_name 
        self.planet_name = planet_name 
        self.poi_name = poi_name 
        self.price_rent = price_rent 
        self.price_rent_avg = price_rent_avg 
        self.price_rent_avg_month = price_rent_avg_month 
        self.price_rent_avg_week = price_rent_avg_week 
        self.price_rent_max = price_rent_max 
        self.price_rent_max_month = price_rent_max_month 
        self.price_rent_max_week = price_rent_max_week 
        self.price_rent_min = price_rent_min 
        self.price_rent_min_month = price_rent_min_month 
        self.price_rent_min_week = price_rent_min_week 
        self.space_station_name = space_station_name 
        self.star_system_name = star_system_name 
        self.terminal_code = terminal_code 
        self.terminal_is_player_owned = terminal_is_player_owned 
        self.terminal_name = terminal_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
        city_name = dictionary.get("city_name") if dictionary.get("city_name") else None
        datarunner = dictionary.get("datarunner") if dictionary.get("datarunner") 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
        faction_affinity = dictionary.get("faction_affinity") if dictionary.get("faction_affinity") 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_city = dictionary.get("id_city") if dictionary.get("id_city") else None
        id_moon = dictionary.get("id_moon") if dictionary.get("id_moon") else None
        id_orbit = dictionary.get("id_orbit") if dictionary.get("id_orbit") else None
        id_outpost = dictionary.get("id_outpost") if dictionary.get("id_outpost") else None
        id_planet = dictionary.get("id_planet") if dictionary.get("id_planet") else None
        id_poi = dictionary.get("id_poi") if dictionary.get("id_poi") else None
        id_report = dictionary.get("id_report") if dictionary.get("id_report") else None
        id_star_system = dictionary.get("id_star_system") if dictionary.get("id_star_system") else None
        id_terminal = dictionary.get("id_terminal") if dictionary.get("id_terminal") else None
        id_vehicle = dictionary.get("id_vehicle") if dictionary.get("id_vehicle") else None
        moon_name = dictionary.get("moon_name") if dictionary.get("moon_name") else None
        orbit_name = dictionary.get("orbit_name") if dictionary.get("orbit_name") else None
        outpost_name = dictionary.get("outpost_name") if dictionary.get("outpost_name") else None
        planet_name = dictionary.get("planet_name") if dictionary.get("planet_name") else None
        poi_name = dictionary.get("poi_name") if dictionary.get("poi_name") else None
        price_rent = dictionary.get("price_rent") if dictionary.get("price_rent") else None
        price_rent_avg = dictionary.get("price_rent_avg") if dictionary.get("price_rent_avg") else None
        price_rent_avg_month = dictionary.get("price_rent_avg_month") if dictionary.get("price_rent_avg_month") else None
        price_rent_avg_week = dictionary.get("price_rent_avg_week") if dictionary.get("price_rent_avg_week") else None
        price_rent_max = dictionary.get("price_rent_max") if dictionary.get("price_rent_max") else None
        price_rent_max_month = dictionary.get("price_rent_max_month") if dictionary.get("price_rent_max_month") else None
        price_rent_max_week = dictionary.get("price_rent_max_week") if dictionary.get("price_rent_max_week") else None
        price_rent_min = dictionary.get("price_rent_min") if dictionary.get("price_rent_min") else None
        price_rent_min_month = dictionary.get("price_rent_min_month") if dictionary.get("price_rent_min_month") else None
        price_rent_min_week = dictionary.get("price_rent_min_week") if dictionary.get("price_rent_min_week") else None
        space_station_name = dictionary.get("space_station_name") if dictionary.get("space_station_name") else None
        star_system_name = dictionary.get("star_system_name") if dictionary.get("star_system_name") else None
        terminal_code = dictionary.get("terminal_code") if dictionary.get("terminal_code") else None
        terminal_is_player_owned = dictionary.get("terminal_is_player_owned") if dictionary.get("terminal_is_player_owned") else None
        terminal_name = dictionary.get("terminal_name") if dictionary.get("terminal_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(city_name,
                   datarunner,
                   date_added,
                   date_modified,
                   faction_affinity,
                   game_version,
                   id,
                   id_city,
                   id_moon,
                   id_orbit,
                   id_outpost,
                   id_planet,
                   id_poi,
                   id_report,
                   id_star_system,
                   id_terminal,
                   id_vehicle,
                   moon_name,
                   orbit_name,
                   outpost_name,
                   planet_name,
                   poi_name,
                   price_rent,
                   price_rent_avg,
                   price_rent_avg_month,
                   price_rent_avg_week,
                   price_rent_max,
                   price_rent_max_month,
                   price_rent_max_week,
                   price_rent_min,
                   price_rent_min_month,
                   price_rent_min_week,
                   space_station_name,
                   star_system_name,
                   terminal_code,
                   terminal_is_player_owned,
                   terminal_name,
                   additional_properties)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'city_name={self.city_name!r}, '
                f'datarunner={self.datarunner!r}, '
                f'date_added={self.date_added!r}, '
                f'date_modified={self.date_modified!r}, '
                f'faction_affinity={self.faction_affinity!r}, '
                f'game_version={self.game_version!r}, '
                f'id={self.id!r}, '
                f'id_city={self.id_city!r}, '
                f'id_moon={self.id_moon!r}, '
                f'id_orbit={self.id_orbit!r}, '
                f'id_outpost={self.id_outpost!r}, '
                f'id_planet={self.id_planet!r}, '
                f'id_poi={self.id_poi!r}, '
                f'id_report={self.id_report!r}, '
                f'id_star_system={self.id_star_system!r}, '
                f'id_terminal={self.id_terminal!r}, '
                f'id_vehicle={self.id_vehicle!r}, '
                f'moon_name={self.moon_name!r}, '
                f'orbit_name={self.orbit_name!r}, '
                f'outpost_name={self.outpost_name!r}, '
                f'planet_name={self.planet_name!r}, '
                f'poi_name={self.poi_name!r}, '
                f'price_rent={self.price_rent!r}, '
                f'price_rent_avg={self.price_rent_avg!r}, '
                f'price_rent_avg_month={self.price_rent_avg_month!r}, '
                f'price_rent_avg_week={self.price_rent_avg_week!r}, '
                f'price_rent_max={self.price_rent_max!r}, '
                f'price_rent_max_month={self.price_rent_max_month!r}, '
                f'price_rent_max_week={self.price_rent_max_week!r}, '
                f'price_rent_min={self.price_rent_min!r}, '
                f'price_rent_min_month={self.price_rent_min_month!r}, '
                f'price_rent_min_week={self.price_rent_min_week!r}, '
                f'space_station_name={self.space_station_name!r}, '
                f'star_system_name={self.star_system_name!r}, '
                f'terminal_code={self.terminal_code!r}, '
                f'terminal_is_player_owned={self.terminal_is_player_owned!r}, '
                f'terminal_name={self.terminal_name!r}, '
                f'additional_properties={self.additional_properties!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'city_name={self.city_name!s}, '
                f'datarunner={self.datarunner!s}, '
                f'date_added={self.date_added!s}, '
                f'date_modified={self.date_modified!s}, '
                f'faction_affinity={self.faction_affinity!s}, '
                f'game_version={self.game_version!s}, '
                f'id={self.id!s}, '
                f'id_city={self.id_city!s}, '
                f'id_moon={self.id_moon!s}, '
                f'id_orbit={self.id_orbit!s}, '
                f'id_outpost={self.id_outpost!s}, '
                f'id_planet={self.id_planet!s}, '
                f'id_poi={self.id_poi!s}, '
                f'id_report={self.id_report!s}, '
                f'id_star_system={self.id_star_system!s}, '
                f'id_terminal={self.id_terminal!s}, '
                f'id_vehicle={self.id_vehicle!s}, '
                f'moon_name={self.moon_name!s}, '
                f'orbit_name={self.orbit_name!s}, '
                f'outpost_name={self.outpost_name!s}, '
                f'planet_name={self.planet_name!s}, '
                f'poi_name={self.poi_name!s}, '
                f'price_rent={self.price_rent!s}, '
                f'price_rent_avg={self.price_rent_avg!s}, '
                f'price_rent_avg_month={self.price_rent_avg_month!s}, '
                f'price_rent_avg_week={self.price_rent_avg_week!s}, '
                f'price_rent_max={self.price_rent_max!s}, '
                f'price_rent_max_month={self.price_rent_max_month!s}, '
                f'price_rent_max_week={self.price_rent_max_week!s}, '
                f'price_rent_min={self.price_rent_min!s}, '
                f'price_rent_min_month={self.price_rent_min_month!s}, '
                f'price_rent_min_week={self.price_rent_min_week!s}, '
                f'space_station_name={self.space_station_name!s}, '
                f'star_system_name={self.star_system_name!s}, '
                f'terminal_code={self.terminal_code!s}, '
                f'terminal_is_player_owned={self.terminal_is_player_owned!s}, '
                f'terminal_name={self.terminal_name!s}, '
                f'additional_properties={self.additional_properties!s})')
