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

"""
uexcorpapi

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


class Data23(object):

    """Implementation of the 'Data23' model.

    Attributes:
        date_added (str): The model property of type str.
        date_modified (str): The model property of type str.
        description (str): The model property of type str.
        id (str): The model property of type str.
        logo (str): The model property of type str.
        name (str): The model property of type str.
        slug (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',
        "description": 'description',
        "id": 'id',
        "logo": 'logo',
        "name": 'name',
        "slug": 'slug'
    }

    def __init__(self,
                 date_added=None,
                 date_modified=None,
                 description=None,
                 id=None,
                 logo=None,
                 name=None,
                 slug=None,
                 additional_properties=None):
        """Constructor for the Data23 class"""

        # Initialize members of the class
        self.date_added = date_added 
        self.date_modified = date_modified 
        self.description = description 
        self.id = id 
        self.logo = logo 
        self.name = name 
        self.slug = slug 

        # 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
        description = dictionary.get("description") if dictionary.get("description") else None
        id = dictionary.get("id") if dictionary.get("id") else None
        logo = dictionary.get("logo") if dictionary.get("logo") else None
        name = dictionary.get("name") if dictionary.get("name") else None
        slug = dictionary.get("slug") if dictionary.get("slug") 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,
                   description,
                   id,
                   logo,
                   name,
                   slug,
                   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'description={self.description!r}, '
                f'id={self.id!r}, '
                f'logo={self.logo!r}, '
                f'name={self.name!r}, '
                f'slug={self.slug!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'description={self.description!s}, '
                f'id={self.id!s}, '
                f'logo={self.logo!s}, '
                f'name={self.name!s}, '
                f'slug={self.slug!s}, '
                f'additional_properties={self.additional_properties!s})')
