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

"""
uexcorpapi

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


class Data19(object):

    """Implementation of the 'Data19' model.

    Attributes:
        date_added (str): The model property of type str.
        date_modified (str): The model property of type str.
        faction_name (str): The model property of type str.
        id (str): The model property of type str.
        id_faction (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_default (str): The model property of type str.
        is_visible (str): The model property of type str.
        name (str): The model property of type str.
        nickname (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 = {
        "date_added": 'date_added',
        "date_modified": 'date_modified',
        "faction_name": 'faction_name',
        "id": 'id',
        "id_faction": 'id_faction',
        "is_available": 'is_available',
        "is_available_live": 'is_available_live',
        "is_default": 'is_default',
        "is_visible": 'is_visible',
        "name": 'name',
        "nickname": 'nickname',
        "wiki": 'wiki'
    }

    def __init__(self,
                 date_added=None,
                 date_modified=None,
                 faction_name=None,
                 id=None,
                 id_faction=None,
                 is_available=None,
                 is_available_live=None,
                 is_default=None,
                 is_visible=None,
                 name=None,
                 nickname=None,
                 wiki=None,
                 additional_properties=None):
        """Constructor for the Data19 class"""

        # Initialize members of the class
        self.date_added = date_added 
        self.date_modified = date_modified 
        self.faction_name = faction_name 
        self.id = id 
        self.id_faction = id_faction 
        self.is_available = is_available 
        self.is_available_live = is_available_live 
        self.is_default = is_default 
        self.is_visible = is_visible 
        self.name = name 
        self.nickname = nickname 
        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
        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_name = dictionary.get("faction_name") if dictionary.get("faction_name") else None
        id = dictionary.get("id") if dictionary.get("id") else None
        id_faction = dictionary.get("id_faction") if dictionary.get("id_faction") 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_default = dictionary.get("is_default") if dictionary.get("is_default") else None
        is_visible = dictionary.get("is_visible") if dictionary.get("is_visible") else None
        name = dictionary.get("name") if dictionary.get("name") else None
        nickname = dictionary.get("nickname") if dictionary.get("nickname") 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(date_added,
                   date_modified,
                   faction_name,
                   id,
                   id_faction,
                   is_available,
                   is_available_live,
                   is_default,
                   is_visible,
                   name,
                   nickname,
                   wiki,
                   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'faction_name={self.faction_name!r}, '
                f'id={self.id!r}, '
                f'id_faction={self.id_faction!r}, '
                f'is_available={self.is_available!r}, '
                f'is_available_live={self.is_available_live!r}, '
                f'is_default={self.is_default!r}, '
                f'is_visible={self.is_visible!r}, '
                f'name={self.name!r}, '
                f'nickname={self.nickname!r}, '
                f'wiki={self.wiki!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'faction_name={self.faction_name!s}, '
                f'id={self.id!s}, '
                f'id_faction={self.id_faction!s}, '
                f'is_available={self.is_available!s}, '
                f'is_available_live={self.is_available_live!s}, '
                f'is_default={self.is_default!s}, '
                f'is_visible={self.is_visible!s}, '
                f'name={self.name!s}, '
                f'nickname={self.nickname!s}, '
                f'wiki={self.wiki!s}, '
                f'additional_properties={self.additional_properties!s})')
