# coding: utf-8

"""
    Kill Bill

    Kill Bill is an open-source billing and payments platform  # noqa: E501

    OpenAPI spec version: 0.22.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class TagDefinition(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 = {
        'id': 'str',
        'is_control_tag': 'bool',
        'name': 'str',
        'description': 'str',
        'applicable_object_types': 'list[str]',
        'audit_logs': 'list[AuditLog]'
    }

    attribute_map = {
        'id': 'id',
        'is_control_tag': 'isControlTag',
        'name': 'name',
        'description': 'description',
        'applicable_object_types': 'applicableObjectTypes',
        'audit_logs': 'auditLogs'
    }

    def __init__(self, id=None, is_control_tag=None, name=None, description=None, applicable_object_types=None, audit_logs=None):  # noqa: E501
        """TagDefinition - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._is_control_tag = None
        self._name = None
        self._description = None
        self._applicable_object_types = None
        self._audit_logs = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if is_control_tag is not None:
            self.is_control_tag = is_control_tag
        self.name = name
        self.description = description
        if applicable_object_types is not None:
            self.applicable_object_types = applicable_object_types
        if audit_logs is not None:
            self.audit_logs = audit_logs

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


        :return: The id of this TagDefinition.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this TagDefinition.


        :param id: The id of this TagDefinition.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The is_control_tag of this TagDefinition.  # noqa: E501
        :rtype: bool
        """
        return self._is_control_tag

    @is_control_tag.setter
    def is_control_tag(self, is_control_tag):
        """Sets the is_control_tag of this TagDefinition.


        :param is_control_tag: The is_control_tag of this TagDefinition.  # noqa: E501
        :type: bool
        """

        self._is_control_tag = is_control_tag

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


        :return: The name of this TagDefinition.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this TagDefinition.


        :param name: The name of this TagDefinition.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The description of this TagDefinition.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this TagDefinition.


        :param description: The description of this TagDefinition.  # noqa: E501
        :type: str
        """
        if description is None:
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

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


        :return: The applicable_object_types of this TagDefinition.  # noqa: E501
        :rtype: list[str]
        """
        return self._applicable_object_types

    @applicable_object_types.setter
    def applicable_object_types(self, applicable_object_types):
        """Sets the applicable_object_types of this TagDefinition.


        :param applicable_object_types: The applicable_object_types of this TagDefinition.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["ACCOUNT", "ACCOUNT_EMAIL", "BLOCKING_STATES", "BUNDLE", "CUSTOM_FIELD", "INVOICE", "PAYMENT", "TRANSACTION", "INVOICE_ITEM", "INVOICE_PAYMENT", "SUBSCRIPTION", "SUBSCRIPTION_EVENT", "SERVICE_BROADCAST", "PAYMENT_ATTEMPT", "PAYMENT_METHOD", "TAG", "TAG_DEFINITION", "TENANT", "TENANT_KVS"]  # noqa: E501
        if not set(applicable_object_types).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `applicable_object_types` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(applicable_object_types) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._applicable_object_types = applicable_object_types

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


        :return: The audit_logs of this TagDefinition.  # noqa: E501
        :rtype: list[AuditLog]
        """
        return self._audit_logs

    @audit_logs.setter
    def audit_logs(self, audit_logs):
        """Sets the audit_logs of this TagDefinition.


        :param audit_logs: The audit_logs of this TagDefinition.  # noqa: E501
        :type: list[AuditLog]
        """

        self._audit_logs = audit_logs

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

        return self.__dict__ == other.__dict__

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