# coding: utf-8

"""
    Tator REST API

    Interface to the Tator backend.  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from ..configuration import Configuration


class AttributeTypeUpdate(object):
    """
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'attribute_type_update': 'AttributeTypeUpdateAttributeTypeUpdate',
        'current_name': 'str',
        'entity_type': 'str'
    }

    attribute_map = {
        'attribute_type_update': 'attribute_type_update',
        'current_name': 'current_name',
        'entity_type': 'entity_type'
    }

    def __init__(self, attribute_type_update=None, current_name=None, entity_type=None, local_vars_configuration=None):  # noqa: E501
        """AttributeTypeUpdate - a model defined in OpenAPI"""
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._attribute_type_update = None
        self._current_name = None
        self._entity_type = None
        self.discriminator = None

        self.attribute_type_update = attribute_type_update
        self.current_name = current_name
        self.entity_type = entity_type

    @property
    def attribute_type_update(self):
        """

        :return: The attribute_type_update of this AttributeTypeUpdate. 
        :rtype: AttributeTypeUpdateAttributeTypeUpdate
        """
        return self._attribute_type_update

    @attribute_type_update.setter
    def attribute_type_update(self, attribute_type_update):
        """

        :param attribute_type_update: The attribute_type_update of this AttributeTypeUpdate.
        :type: AttributeTypeUpdateAttributeTypeUpdate
        """
        if self.local_vars_configuration.client_side_validation and attribute_type_update is None:  # noqa: E501
            raise ValueError("Invalid value for `attribute_type_update`, must not be `None`")  # noqa: E501

        self._attribute_type_update = attribute_type_update

    @property
    def current_name(self):
        """
        The attribute to rename.

        :return: The current_name of this AttributeTypeUpdate. 
        :rtype: str
        """
        return self._current_name

    @current_name.setter
    def current_name(self, current_name):
        """
        The attribute to rename.

        :param current_name: The current_name of this AttributeTypeUpdate.
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and current_name is None:  # noqa: E501
            raise ValueError("Invalid value for `current_name`, must not be `None`")  # noqa: E501

        self._current_name = current_name

    @property
    def entity_type(self):
        """
        The entity type containing the attribute to rename.

        :return: The entity_type of this AttributeTypeUpdate. 
        :rtype: str
        """
        return self._entity_type

    @entity_type.setter
    def entity_type(self, entity_type):
        """
        The entity type containing the attribute to rename.

        :param entity_type: The entity_type of this AttributeTypeUpdate.
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and entity_type is None:  # noqa: E501
            raise ValueError("Invalid value for `entity_type`, must not be `None`")  # noqa: E501
        allowed_values = ["FileType", "MediaType", "LocalizationType", "StateType", "LeafType", "Section"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and entity_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `entity_type` ({0}), must be one of {1}"  # noqa: E501
                .format(entity_type, allowed_values)
            )

        self._entity_type = entity_type

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

        for attr, _ in six.iteritems(self.openapi_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

        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, AttributeTypeUpdate):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
