"""
    HCL AppScan on Cloud (v2)

    This API allows you to interact with the service. The API allows you to perform many of the operations available in the UI and more.</br>For authentication, use the relevant APIs in the Account section. A successful authentication response includes a bearer token for use in subsequent API calls. Pasting this token in the 'Access token' field above will automatically add the authorization header to any API call that requires a valid session.

    OpenAPI spec version: v2

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

from pyasoc.configuration import Configuration


class CommonModelsDomainModel:
    """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": "int",
        "domain": "str",
        "enabled": "bool",
        "type": "str",
        "status": "str",
        "key": "str",
        "added_by": "str",
        "created_at": "datetime",
    }

    attribute_map = {
        "id": "Id",
        "domain": "Domain",
        "enabled": "Enabled",
        "type": "Type",
        "status": "Status",
        "key": "Key",
        "added_by": "AddedBy",
        "created_at": "CreatedAt",
    }

    def __init__(
        self,
        id=None,
        domain=None,
        enabled=None,
        type=None,
        status=None,
        key=None,
        added_by=None,
        created_at=None,
        _configuration=None,
    ):
        """CommonModelsDomainModel - a model defined in Swagger"""
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._domain = None
        self._enabled = None
        self._type = None
        self._status = None
        self._key = None
        self._added_by = None
        self._created_at = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if domain is not None:
            self.domain = domain
        if enabled is not None:
            self.enabled = enabled
        if type is not None:
            self.type = type
        if status is not None:
            self.status = status
        if key is not None:
            self.key = key
        if added_by is not None:
            self.added_by = added_by
        if created_at is not None:
            self.created_at = created_at

    @property
    def id(self):
        # type: () -> int
        """Gets the id of this CommonModelsDomainModel.


        :return: The id of this CommonModelsDomainModel.
        :rtype: int
        """
        return self._id

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


        :param id: The id of this CommonModelsDomainModel.
        :type: int
        """

        self._id = id

    @property
    def domain(self):
        # type: () -> str
        """Gets the domain of this CommonModelsDomainModel.


        :return: The domain of this CommonModelsDomainModel.
        :rtype: str
        """
        return self._domain

    @domain.setter
    def domain(self, domain):
        """Sets the domain of this CommonModelsDomainModel.


        :param domain: The domain of this CommonModelsDomainModel.
        :type: str
        """

        self._domain = domain

    @property
    def enabled(self):
        # type: () -> bool
        """Gets the enabled of this CommonModelsDomainModel.


        :return: The enabled of this CommonModelsDomainModel.
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this CommonModelsDomainModel.


        :param enabled: The enabled of this CommonModelsDomainModel.
        :type: bool
        """

        self._enabled = enabled

    @property
    def type(self):
        # type: () -> str
        """Gets the type of this CommonModelsDomainModel.


        :return: The type of this CommonModelsDomainModel.
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CommonModelsDomainModel.


        :param type: The type of this CommonModelsDomainModel.
        :type: str
        """
        allowed_values = ["Manually", "Html", "Email", "DnsComparison"]
        if self._configuration.client_side_validation and type not in allowed_values:
            raise ValueError(f"Invalid value for `type` ({type}), must be one of {allowed_values}")

        self._type = type

    @property
    def status(self):
        # type: () -> str
        """Gets the status of this CommonModelsDomainModel.


        :return: The status of this CommonModelsDomainModel.
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this CommonModelsDomainModel.


        :param status: The status of this CommonModelsDomainModel.
        :type: str
        """
        allowed_values = ["None", "Verified", "Pending"]
        if self._configuration.client_side_validation and status not in allowed_values:
            raise ValueError(
                f"Invalid value for `status` ({status}), must be one of {allowed_values}"
            )

        self._status = status

    @property
    def key(self):
        # type: () -> str
        """Gets the key of this CommonModelsDomainModel.


        :return: The key of this CommonModelsDomainModel.
        :rtype: str
        """
        return self._key

    @key.setter
    def key(self, key):
        """Sets the key of this CommonModelsDomainModel.


        :param key: The key of this CommonModelsDomainModel.
        :type: str
        """

        self._key = key

    @property
    def added_by(self):
        # type: () -> str
        """Gets the added_by of this CommonModelsDomainModel.


        :return: The added_by of this CommonModelsDomainModel.
        :rtype: str
        """
        return self._added_by

    @added_by.setter
    def added_by(self, added_by):
        """Sets the added_by of this CommonModelsDomainModel.


        :param added_by: The added_by of this CommonModelsDomainModel.
        :type: str
        """

        self._added_by = added_by

    @property
    def created_at(self):
        # type: () -> datetime
        """Gets the created_at of this CommonModelsDomainModel.


        :return: The created_at of this CommonModelsDomainModel.
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this CommonModelsDomainModel.


        :param created_at: The created_at of this CommonModelsDomainModel.
        :type: datetime
        """

        self._created_at = created_at

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

        for attr, _ in self.swagger_types.items():
            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(CommonModelsDomainModel, 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, CommonModelsDomainModel):
            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, CommonModelsDomainModel):
            return True

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