# coding: utf-8

"""
    Dokumenty CITES

    API pro datový řadič dokumentů CITES ### Verze 1.0.0    - public   - developers  ### Verze 1.1.0    - admins   - additional   - statement   - attachments   - registration_cards   - permit   # noqa: E501

    OpenAPI spec version: 1.1.0
    Contact: info@sysnet.cz
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class GoodsType(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'annex_eu': 'str',
        'appendix_cites': 'str',
        'class_411': 'bool',
        'comment': 'str',
        'common': 'str',
        'common_cz': 'str',
        'common_en': 'str',
        'country_last': 'str',
        'country_origin': 'str',
        'customs': 'CustomsGoodsType',
        'date_external': 'date',
        'date_last': 'date',
        'date_origin': 'date',
        'date_created': 'datetime',
        'date_modified': 'datetime',
        'external': 'bool',
        'creator': 'str',
        'goods_code': 'str',
        'goods_description': 'str',
        'goods_additional': 'str',
        'identifier': 'str',
        'identifier_permit': 'str',
        'id_no': 'str',
        'order': 'OrderType',
        'origin': 'str',
        'permit_external': 'str',
        'permit_last': 'str',
        'permit_origin': 'str',
        'purpose': 'str',
        'purpose_value': 'str',
        'quantity': 'float',
        'species': 'str',
        'units': 'str',
        'weight': 'float'
    }

    attribute_map = {
        'annex_eu': 'annex_eu',
        'appendix_cites': 'appendix_cites',
        'class_411': 'class_411',
        'comment': 'comment',
        'common': 'common',
        'common_cz': 'common_cz',
        'common_en': 'common_en',
        'country_last': 'country_last',
        'country_origin': 'country_origin',
        'customs': 'customs',
        'date_external': 'date_external',
        'date_last': 'date_last',
        'date_origin': 'date_origin',
        'date_created': 'date_created',
        'date_modified': 'date_modified',
        'external': 'external',
        'creator': 'creator',
        'goods_code': 'goods_code',
        'goods_description': 'goods_description',
        'goods_additional': 'goods_additional',
        'identifier': 'identifier',
        'identifier_permit': 'identifier_permit',
        'id_no': 'id_no',
        'order': 'order',
        'origin': 'origin',
        'permit_external': 'permit_external',
        'permit_last': 'permit_last',
        'permit_origin': 'permit_origin',
        'purpose': 'purpose',
        'purpose_value': 'purpose_value',
        'quantity': 'quantity',
        'species': 'species',
        'units': 'units',
        'weight': 'weight'
    }

    def __init__(self, annex_eu=None, appendix_cites=None, class_411=None, comment=None, common=None, common_cz=None, common_en=None, country_last=None, country_origin=None, customs=None, date_external=None, date_last=None, date_origin=None, date_created=None, date_modified=None, external=None, creator=None, goods_code=None, goods_description=None, goods_additional=None, identifier=None, identifier_permit=None, id_no=None, order=None, origin=None, permit_external=None, permit_last=None, permit_origin=None, purpose=None, purpose_value=None, quantity=None, species=None, units=None, weight=None):  # noqa: E501
        """GoodsType - a model defined in Swagger"""  # noqa: E501
        self._annex_eu = None
        self._appendix_cites = None
        self._class_411 = None
        self._comment = None
        self._common = None
        self._common_cz = None
        self._common_en = None
        self._country_last = None
        self._country_origin = None
        self._customs = None
        self._date_external = None
        self._date_last = None
        self._date_origin = None
        self._date_created = None
        self._date_modified = None
        self._external = None
        self._creator = None
        self._goods_code = None
        self._goods_description = None
        self._goods_additional = None
        self._identifier = None
        self._identifier_permit = None
        self._id_no = None
        self._order = None
        self._origin = None
        self._permit_external = None
        self._permit_last = None
        self._permit_origin = None
        self._purpose = None
        self._purpose_value = None
        self._quantity = None
        self._species = None
        self._units = None
        self._weight = None
        self.discriminator = None
        if annex_eu is not None:
            self.annex_eu = annex_eu
        if appendix_cites is not None:
            self.appendix_cites = appendix_cites
        if class_411 is not None:
            self.class_411 = class_411
        if comment is not None:
            self.comment = comment
        if common is not None:
            self.common = common
        if common_cz is not None:
            self.common_cz = common_cz
        if common_en is not None:
            self.common_en = common_en
        if country_last is not None:
            self.country_last = country_last
        if country_origin is not None:
            self.country_origin = country_origin
        if customs is not None:
            self.customs = customs
        if date_external is not None:
            self.date_external = date_external
        if date_last is not None:
            self.date_last = date_last
        if date_origin is not None:
            self.date_origin = date_origin
        if date_created is not None:
            self.date_created = date_created
        if date_modified is not None:
            self.date_modified = date_modified
        if external is not None:
            self.external = external
        if creator is not None:
            self.creator = creator
        if goods_code is not None:
            self.goods_code = goods_code
        if goods_description is not None:
            self.goods_description = goods_description
        if goods_additional is not None:
            self.goods_additional = goods_additional
        if identifier is not None:
            self.identifier = identifier
        if identifier_permit is not None:
            self.identifier_permit = identifier_permit
        if id_no is not None:
            self.id_no = id_no
        if order is not None:
            self.order = order
        if origin is not None:
            self.origin = origin
        if permit_external is not None:
            self.permit_external = permit_external
        if permit_last is not None:
            self.permit_last = permit_last
        if permit_origin is not None:
            self.permit_origin = permit_origin
        if purpose is not None:
            self.purpose = purpose
        if purpose_value is not None:
            self.purpose_value = purpose_value
        if quantity is not None:
            self.quantity = quantity
        if species is not None:
            self.species = species
        if units is not None:
            self.units = units
        if weight is not None:
            self.weight = weight

    @property
    def annex_eu(self):
        """Gets the annex_eu of this GoodsType.  # noqa: E501

        Příloha EU  # noqa: E501

        :return: The annex_eu of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._annex_eu

    @annex_eu.setter
    def annex_eu(self, annex_eu):
        """Sets the annex_eu of this GoodsType.

        Příloha EU  # noqa: E501

        :param annex_eu: The annex_eu of this GoodsType.  # noqa: E501
        :type: str
        """
        allowed_values = ["A", "B", "C", "", None]  # noqa: E501
        if annex_eu not in allowed_values:
            raise ValueError(
                "Invalid value for `annex_eu` ({0}), must be one of {1}"  # noqa: E501
                .format(annex_eu, allowed_values)
            )

        self._annex_eu = annex_eu

    @property
    def appendix_cites(self):
        """Gets the appendix_cites of this GoodsType.  # noqa: E501

        Příloha CITES  # noqa: E501

        :return: The appendix_cites of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._appendix_cites

    @appendix_cites.setter
    def appendix_cites(self, appendix_cites):
        """Sets the appendix_cites of this GoodsType.

        Příloha CITES  # noqa: E501

        :param appendix_cites: The appendix_cites of this GoodsType.  # noqa: E501
        :type: str
        """
        allowed_values = ["I", "II", "III", "", None]  # noqa: E501
        if appendix_cites not in allowed_values:
            raise ValueError(
                "Invalid value for `appendix_cites` ({0}), must be one of {1}"  # noqa: E501
                .format(appendix_cites, allowed_values)
            )

        self._appendix_cites = appendix_cites

    @property
    def class_411(self):
        """Gets the class_411 of this GoodsType.  # noqa: E501

        Zvláštní zacházení podle vyhlášky 411/2008 Sb.  # noqa: E501

        :return: The class_411 of this GoodsType.  # noqa: E501
        :rtype: bool
        """
        return self._class_411

    @class_411.setter
    def class_411(self, class_411):
        """Sets the class_411 of this GoodsType.

        Zvláštní zacházení podle vyhlášky 411/2008 Sb.  # noqa: E501

        :param class_411: The class_411 of this GoodsType.  # noqa: E501
        :type: bool
        """

        self._class_411 = class_411

    @property
    def comment(self):
        """Gets the comment of this GoodsType.  # noqa: E501

        Poznámka ke zboží  # noqa: E501

        :return: The comment of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this GoodsType.

        Poznámka ke zboží  # noqa: E501

        :param comment: The comment of this GoodsType.  # noqa: E501
        :type: str
        """

        self._comment = comment

    @property
    def common(self):
        """Gets the common of this GoodsType.  # noqa: E501

        Obecný název. Obvykle commonCz/commonEn  # noqa: E501

        :return: The common of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._common

    @common.setter
    def common(self, common):
        """Sets the common of this GoodsType.

        Obecný název. Obvykle commonCz/commonEn  # noqa: E501

        :param common: The common of this GoodsType.  # noqa: E501
        :type: str
        """

        self._common = common

    @property
    def common_cz(self):
        """Gets the common_cz of this GoodsType.  # noqa: E501

        Obecný název česky  # noqa: E501

        :return: The common_cz of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._common_cz

    @common_cz.setter
    def common_cz(self, common_cz):
        """Sets the common_cz of this GoodsType.

        Obecný název česky  # noqa: E501

        :param common_cz: The common_cz of this GoodsType.  # noqa: E501
        :type: str
        """

        self._common_cz = common_cz

    @property
    def common_en(self):
        """Gets the common_en of this GoodsType.  # noqa: E501

        Obecný název anglicky  # noqa: E501

        :return: The common_en of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._common_en

    @common_en.setter
    def common_en(self, common_en):
        """Sets the common_en of this GoodsType.

        Obecný název anglicky  # noqa: E501

        :param common_en: The common_en of this GoodsType.  # noqa: E501
        :type: str
        """

        self._common_en = common_en

    @property
    def country_last(self):
        """Gets the country_last of this GoodsType.  # noqa: E501

        Země posledního zpětného vývozu  # noqa: E501

        :return: The country_last of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._country_last

    @country_last.setter
    def country_last(self, country_last):
        """Sets the country_last of this GoodsType.

        Země posledního zpětného vývozu  # noqa: E501

        :param country_last: The country_last of this GoodsType.  # noqa: E501
        :type: str
        """

        self._country_last = country_last

    @property
    def country_origin(self):
        """Gets the country_origin of this GoodsType.  # noqa: E501

        Země původu  # noqa: E501

        :return: The country_origin of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._country_origin

    @country_origin.setter
    def country_origin(self, country_origin):
        """Sets the country_origin of this GoodsType.

        Země původu  # noqa: E501

        :param country_origin: The country_origin of this GoodsType.  # noqa: E501
        :type: str
        """

        self._country_origin = country_origin

    @property
    def customs(self):
        """Gets the customs of this GoodsType.  # noqa: E501


        :return: The customs of this GoodsType.  # noqa: E501
        :rtype: CustomsGoodsType
        """
        return self._customs

    @customs.setter
    def customs(self, customs):
        """Sets the customs of this GoodsType.


        :param customs: The customs of this GoodsType.  # noqa: E501
        :type: CustomsGoodsType
        """

        self._customs = customs

    @property
    def date_external(self):
        """Gets the date_external of this GoodsType.  # noqa: E501

        Datum vydání externího permitu  # noqa: E501

        :return: The date_external of this GoodsType.  # noqa: E501
        :rtype: date
        """
        return self._date_external

    @date_external.setter
    def date_external(self, date_external):
        """Sets the date_external of this GoodsType.

        Datum vydání externího permitu  # noqa: E501

        :param date_external: The date_external of this GoodsType.  # noqa: E501
        :type: date
        """

        self._date_external = date_external

    @property
    def date_last(self):
        """Gets the date_last of this GoodsType.  # noqa: E501

        Datum vydání permitu země posledního zpětného vývozu  # noqa: E501

        :return: The date_last of this GoodsType.  # noqa: E501
        :rtype: date
        """
        return self._date_last

    @date_last.setter
    def date_last(self, date_last):
        """Sets the date_last of this GoodsType.

        Datum vydání permitu země posledního zpětného vývozu  # noqa: E501

        :param date_last: The date_last of this GoodsType.  # noqa: E501
        :type: date
        """

        self._date_last = date_last

    @property
    def date_origin(self):
        """Gets the date_origin of this GoodsType.  # noqa: E501

        Datum vydání permitu země původu  # noqa: E501

        :return: The date_origin of this GoodsType.  # noqa: E501
        :rtype: date
        """
        return self._date_origin

    @date_origin.setter
    def date_origin(self, date_origin):
        """Sets the date_origin of this GoodsType.

        Datum vydání permitu země původu  # noqa: E501

        :param date_origin: The date_origin of this GoodsType.  # noqa: E501
        :type: date
        """

        self._date_origin = date_origin

    @property
    def date_created(self):
        """Gets the date_created of this GoodsType.  # noqa: E501

        Datum vytvoření datové položky  # noqa: E501

        :return: The date_created of this GoodsType.  # noqa: E501
        :rtype: datetime
        """
        return self._date_created

    @date_created.setter
    def date_created(self, date_created):
        """Sets the date_created of this GoodsType.

        Datum vytvoření datové položky  # noqa: E501

        :param date_created: The date_created of this GoodsType.  # noqa: E501
        :type: datetime
        """

        self._date_created = date_created

    @property
    def date_modified(self):
        """Gets the date_modified of this GoodsType.  # noqa: E501

        Datum poslední úpravy datové položky  # noqa: E501

        :return: The date_modified of this GoodsType.  # noqa: E501
        :rtype: datetime
        """
        return self._date_modified

    @date_modified.setter
    def date_modified(self, date_modified):
        """Sets the date_modified of this GoodsType.

        Datum poslední úpravy datové položky  # noqa: E501

        :param date_modified: The date_modified of this GoodsType.  # noqa: E501
        :type: datetime
        """

        self._date_modified = date_modified

    @property
    def external(self):
        """Gets the external of this GoodsType.  # noqa: E501

        Externí permit - permit vydán jinou, než CZ autoritou  # noqa: E501

        :return: The external of this GoodsType.  # noqa: E501
        :rtype: bool
        """
        return self._external

    @external.setter
    def external(self, external):
        """Sets the external of this GoodsType.

        Externí permit - permit vydán jinou, než CZ autoritou  # noqa: E501

        :param external: The external of this GoodsType.  # noqa: E501
        :type: bool
        """

        self._external = external

    @property
    def creator(self):
        """Gets the creator of this GoodsType.  # noqa: E501

        Tvůrce datové položky  # noqa: E501

        :return: The creator of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._creator

    @creator.setter
    def creator(self, creator):
        """Sets the creator of this GoodsType.

        Tvůrce datové položky  # noqa: E501

        :param creator: The creator of this GoodsType.  # noqa: E501
        :type: str
        """

        self._creator = creator

    @property
    def goods_code(self):
        """Gets the goods_code of this GoodsType.  # noqa: E501

        CITES kód  # noqa: E501

        :return: The goods_code of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._goods_code

    @goods_code.setter
    def goods_code(self, goods_code):
        """Sets the goods_code of this GoodsType.

        CITES kód  # noqa: E501

        :param goods_code: The goods_code of this GoodsType.  # noqa: E501
        :type: str
        """

        self._goods_code = goods_code

    @property
    def goods_description(self):
        """Gets the goods_description of this GoodsType.  # noqa: E501

        Popis exemplářů (včetně značek, pohlaví, data narození živých zvířat)  # noqa: E501

        :return: The goods_description of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._goods_description

    @goods_description.setter
    def goods_description(self, goods_description):
        """Sets the goods_description of this GoodsType.

        Popis exemplářů (včetně značek, pohlaví, data narození živých zvířat)  # noqa: E501

        :param goods_description: The goods_description of this GoodsType.  # noqa: E501
        :type: str
        """

        self._goods_description = goods_description

    @property
    def goods_additional(self):
        """Gets the goods_additional of this GoodsType.  # noqa: E501

        Další popis  # noqa: E501

        :return: The goods_additional of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._goods_additional

    @goods_additional.setter
    def goods_additional(self, goods_additional):
        """Sets the goods_additional of this GoodsType.

        Další popis  # noqa: E501

        :param goods_additional: The goods_additional of this GoodsType.  # noqa: E501
        :type: str
        """

        self._goods_additional = goods_additional

    @property
    def identifier(self):
        """Gets the identifier of this GoodsType.  # noqa: E501

        Jednoznačný identifikátor datové položky (PID)  # noqa: E501

        :return: The identifier of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._identifier

    @identifier.setter
    def identifier(self, identifier):
        """Sets the identifier of this GoodsType.

        Jednoznačný identifikátor datové položky (PID)  # noqa: E501

        :param identifier: The identifier of this GoodsType.  # noqa: E501
        :type: str
        """

        self._identifier = identifier

    @property
    def identifier_permit(self):
        """Gets the identifier_permit of this GoodsType.  # noqa: E501

        Jednoznačný identifikátor datové položky permitu (PID)  # noqa: E501

        :return: The identifier_permit of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._identifier_permit

    @identifier_permit.setter
    def identifier_permit(self, identifier_permit):
        """Sets the identifier_permit of this GoodsType.

        Jednoznačný identifikátor datové položky permitu (PID)  # noqa: E501

        :param identifier_permit: The identifier_permit of this GoodsType.  # noqa: E501
        :type: str
        """

        self._identifier_permit = identifier_permit

    @property
    def id_no(self):
        """Gets the id_no of this GoodsType.  # noqa: E501

        Číslo permitu  # noqa: E501

        :return: The id_no of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._id_no

    @id_no.setter
    def id_no(self, id_no):
        """Sets the id_no of this GoodsType.

        Číslo permitu  # noqa: E501

        :param id_no: The id_no of this GoodsType.  # noqa: E501
        :type: str
        """

        self._id_no = id_no

    @property
    def order(self):
        """Gets the order of this GoodsType.  # noqa: E501


        :return: The order of this GoodsType.  # noqa: E501
        :rtype: OrderType
        """
        return self._order

    @order.setter
    def order(self, order):
        """Sets the order of this GoodsType.


        :param order: The order of this GoodsType.  # noqa: E501
        :type: OrderType
        """

        self._order = order

    @property
    def origin(self):
        """Gets the origin of this GoodsType.  # noqa: E501

        Původ  # noqa: E501

        :return: The origin of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._origin

    @origin.setter
    def origin(self, origin):
        """Sets the origin of this GoodsType.

        Původ  # noqa: E501

        :param origin: The origin of this GoodsType.  # noqa: E501
        :type: str
        """

        self._origin = origin

    @property
    def permit_external(self):
        """Gets the permit_external of this GoodsType.  # noqa: E501

        Číslo externího permitu  # noqa: E501

        :return: The permit_external of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._permit_external

    @permit_external.setter
    def permit_external(self, permit_external):
        """Sets the permit_external of this GoodsType.

        Číslo externího permitu  # noqa: E501

        :param permit_external: The permit_external of this GoodsType.  # noqa: E501
        :type: str
        """

        self._permit_external = permit_external

    @property
    def permit_last(self):
        """Gets the permit_last of this GoodsType.  # noqa: E501

        Číslo permitu země posledního zpětného vývozu  # noqa: E501

        :return: The permit_last of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._permit_last

    @permit_last.setter
    def permit_last(self, permit_last):
        """Sets the permit_last of this GoodsType.

        Číslo permitu země posledního zpětného vývozu  # noqa: E501

        :param permit_last: The permit_last of this GoodsType.  # noqa: E501
        :type: str
        """

        self._permit_last = permit_last

    @property
    def permit_origin(self):
        """Gets the permit_origin of this GoodsType.  # noqa: E501

        Číslo permitu země původu  # noqa: E501

        :return: The permit_origin of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._permit_origin

    @permit_origin.setter
    def permit_origin(self, permit_origin):
        """Sets the permit_origin of this GoodsType.

        Číslo permitu země původu  # noqa: E501

        :param permit_origin: The permit_origin of this GoodsType.  # noqa: E501
        :type: str
        """

        self._permit_origin = permit_origin

    @property
    def purpose(self):
        """Gets the purpose of this GoodsType.  # noqa: E501

        Kód účelu  # noqa: E501

        :return: The purpose of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._purpose

    @purpose.setter
    def purpose(self, purpose):
        """Sets the purpose of this GoodsType.

        Kód účelu  # noqa: E501

        :param purpose: The purpose of this GoodsType.  # noqa: E501
        :type: str
        """

        self._purpose = purpose

    @property
    def purpose_value(self):
        """Gets the purpose_value of this GoodsType.  # noqa: E501

        Textová hodnota účelu  # noqa: E501

        :return: The purpose_value of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._purpose_value

    @purpose_value.setter
    def purpose_value(self, purpose_value):
        """Sets the purpose_value of this GoodsType.

        Textová hodnota účelu  # noqa: E501

        :param purpose_value: The purpose_value of this GoodsType.  # noqa: E501
        :type: str
        """

        self._purpose_value = purpose_value

    @property
    def quantity(self):
        """Gets the quantity of this GoodsType.  # noqa: E501

        Množství exemplářů  # noqa: E501

        :return: The quantity of this GoodsType.  # noqa: E501
        :rtype: float
        """
        return self._quantity

    @quantity.setter
    def quantity(self, quantity):
        """Sets the quantity of this GoodsType.

        Množství exemplářů  # noqa: E501

        :param quantity: The quantity of this GoodsType.  # noqa: E501
        :type: float
        """

        self._quantity = quantity

    @property
    def species(self):
        """Gets the species of this GoodsType.  # noqa: E501

        Vědecký název exempláře (latinsky)  # noqa: E501

        :return: The species of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._species

    @species.setter
    def species(self, species):
        """Sets the species of this GoodsType.

        Vědecký název exempláře (latinsky)  # noqa: E501

        :param species: The species of this GoodsType.  # noqa: E501
        :type: str
        """

        self._species = species

    @property
    def units(self):
        """Gets the units of this GoodsType.  # noqa: E501

        Jednotky  # noqa: E501

        :return: The units of this GoodsType.  # noqa: E501
        :rtype: str
        """
        return self._units

    @units.setter
    def units(self, units):
        """Sets the units of this GoodsType.

        Jednotky  # noqa: E501

        :param units: The units of this GoodsType.  # noqa: E501
        :type: str
        """

        self._units = units

    @property
    def weight(self):
        """Gets the weight of this GoodsType.  # noqa: E501

        Hmotnost  # noqa: E501

        :return: The weight of this GoodsType.  # noqa: E501
        :rtype: float
        """
        return self._weight

    @weight.setter
    def weight(self, weight):
        """Sets the weight of this GoodsType.

        Hmotnost  # noqa: E501

        :param weight: The weight of this GoodsType.  # noqa: E501
        :type: float
        """

        self._weight = weight

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(GoodsType, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, GoodsType):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
