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

"""
uexcorpapi

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


class Data18(object):

    """Implementation of the 'Data18' model.

    Attributes:
        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_orbit_destination (str): The model property of type str.
        id_orbit_origin (str): The model property of type str.
        id_star_system_destination (str): The model property of type str.
        id_star_system_origin (str): The model property of type str.
        orbit_destination_name (str): The model property of type str.
        orbit_origin_name (str): The model property of type str.
        star_system_destination_name (str): The model property of type str.
        star_system_origin_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 = {
        "date_added": 'date_added',
        "date_modified": 'date_modified',
        "id": 'id',
        "id_orbit_destination": 'id_orbit_destination',
        "id_orbit_origin": 'id_orbit_origin',
        "id_star_system_destination": 'id_star_system_destination',
        "id_star_system_origin": 'id_star_system_origin',
        "orbit_destination_name": 'orbit_destination_name',
        "orbit_origin_name": 'orbit_origin_name',
        "star_system_destination_name": 'star_system_destination_name',
        "star_system_origin_name": 'star_system_origin_name'
    }

    def __init__(self,
                 date_added=None,
                 date_modified=None,
                 id=None,
                 id_orbit_destination=None,
                 id_orbit_origin=None,
                 id_star_system_destination=None,
                 id_star_system_origin=None,
                 orbit_destination_name=None,
                 orbit_origin_name=None,
                 star_system_destination_name=None,
                 star_system_origin_name=None,
                 additional_properties=None):
        """Constructor for the Data18 class"""

        # Initialize members of the class
        self.date_added = date_added 
        self.date_modified = date_modified 
        self.id = id 
        self.id_orbit_destination = id_orbit_destination 
        self.id_orbit_origin = id_orbit_origin 
        self.id_star_system_destination = id_star_system_destination 
        self.id_star_system_origin = id_star_system_origin 
        self.orbit_destination_name = orbit_destination_name 
        self.orbit_origin_name = orbit_origin_name 
        self.star_system_destination_name = star_system_destination_name 
        self.star_system_origin_name = star_system_origin_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
        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_orbit_destination = dictionary.get("id_orbit_destination") if dictionary.get("id_orbit_destination") else None
        id_orbit_origin = dictionary.get("id_orbit_origin") if dictionary.get("id_orbit_origin") else None
        id_star_system_destination = dictionary.get("id_star_system_destination") if dictionary.get("id_star_system_destination") else None
        id_star_system_origin = dictionary.get("id_star_system_origin") if dictionary.get("id_star_system_origin") else None
        orbit_destination_name = dictionary.get("orbit_destination_name") if dictionary.get("orbit_destination_name") else None
        orbit_origin_name = dictionary.get("orbit_origin_name") if dictionary.get("orbit_origin_name") else None
        star_system_destination_name = dictionary.get("star_system_destination_name") if dictionary.get("star_system_destination_name") else None
        star_system_origin_name = dictionary.get("star_system_origin_name") if dictionary.get("star_system_origin_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(date_added,
                   date_modified,
                   id,
                   id_orbit_destination,
                   id_orbit_origin,
                   id_star_system_destination,
                   id_star_system_origin,
                   orbit_destination_name,
                   orbit_origin_name,
                   star_system_destination_name,
                   star_system_origin_name,
                   additional_properties)

    def __repr__(self):
        return (f'{self.__class__.__name__}('
                f'date_added={self.date_added!r}, '
                f'date_modified={self.date_modified!r}, '
                f'id={self.id!r}, '
                f'id_orbit_destination={self.id_orbit_destination!r}, '
                f'id_orbit_origin={self.id_orbit_origin!r}, '
                f'id_star_system_destination={self.id_star_system_destination!r}, '
                f'id_star_system_origin={self.id_star_system_origin!r}, '
                f'orbit_destination_name={self.orbit_destination_name!r}, '
                f'orbit_origin_name={self.orbit_origin_name!r}, '
                f'star_system_destination_name={self.star_system_destination_name!r}, '
                f'star_system_origin_name={self.star_system_origin_name!r}, '
                f'additional_properties={self.additional_properties!r})')

    def __str__(self):
        return (f'{self.__class__.__name__}('
                f'date_added={self.date_added!s}, '
                f'date_modified={self.date_modified!s}, '
                f'id={self.id!s}, '
                f'id_orbit_destination={self.id_orbit_destination!s}, '
                f'id_orbit_origin={self.id_orbit_origin!s}, '
                f'id_star_system_destination={self.id_star_system_destination!s}, '
                f'id_star_system_origin={self.id_star_system_origin!s}, '
                f'orbit_destination_name={self.orbit_destination_name!s}, '
                f'orbit_origin_name={self.orbit_origin_name!s}, '
                f'star_system_destination_name={self.star_system_destination_name!s}, '
                f'star_system_origin_name={self.star_system_origin_name!s}, '
                f'additional_properties={self.additional_properties!s})')
