"""
    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 UserSiteCommonModelsPresence:
    """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",
        "presence_name": "str",
        "key_expires_at": "datetime",
        "host_name": "str",
        "status": "str",
        "is_v2": "bool",
        "platform": "str",
    }

    attribute_map = {
        "id": "Id",
        "presence_name": "PresenceName",
        "key_expires_at": "KeyExpiresAt",
        "host_name": "HostName",
        "status": "Status",
        "is_v2": "IsV2",
        "platform": "Platform",
    }

    def __init__(
        self,
        id=None,
        presence_name=None,
        key_expires_at=None,
        host_name=None,
        status=None,
        is_v2=None,
        platform=None,
        _configuration=None,
    ):
        """UserSiteCommonModelsPresence - a model defined in Swagger"""
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._presence_name = None
        self._key_expires_at = None
        self._host_name = None
        self._status = None
        self._is_v2 = None
        self._platform = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if presence_name is not None:
            self.presence_name = presence_name
        if key_expires_at is not None:
            self.key_expires_at = key_expires_at
        if host_name is not None:
            self.host_name = host_name
        if status is not None:
            self.status = status
        if is_v2 is not None:
            self.is_v2 = is_v2
        if platform is not None:
            self.platform = platform

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


        :return: The id of this UserSiteCommonModelsPresence.
        :rtype: str
        """
        return self._id

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


        :param id: The id of this UserSiteCommonModelsPresence.
        :type: str
        """

        self._id = id

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


        :return: The presence_name of this UserSiteCommonModelsPresence.
        :rtype: str
        """
        return self._presence_name

    @presence_name.setter
    def presence_name(self, presence_name):
        """Sets the presence_name of this UserSiteCommonModelsPresence.


        :param presence_name: The presence_name of this UserSiteCommonModelsPresence.
        :type: str
        """

        self._presence_name = presence_name

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


        :return: The key_expires_at of this UserSiteCommonModelsPresence.
        :rtype: datetime
        """
        return self._key_expires_at

    @key_expires_at.setter
    def key_expires_at(self, key_expires_at):
        """Sets the key_expires_at of this UserSiteCommonModelsPresence.


        :param key_expires_at: The key_expires_at of this UserSiteCommonModelsPresence.
        :type: datetime
        """

        self._key_expires_at = key_expires_at

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


        :return: The host_name of this UserSiteCommonModelsPresence.
        :rtype: str
        """
        return self._host_name

    @host_name.setter
    def host_name(self, host_name):
        """Sets the host_name of this UserSiteCommonModelsPresence.


        :param host_name: The host_name of this UserSiteCommonModelsPresence.
        :type: str
        """

        self._host_name = host_name

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


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

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


        :param status: The status of this UserSiteCommonModelsPresence.
        :type: str
        """
        allowed_values = [
            "Active",
            "NeverUsed",
            "KeyExpired",
            "KeyNeverUsed",
            "Inactive",
            "Disable",
        ]
        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 is_v2(self):
        # type: () -> bool
        """Gets the is_v2 of this UserSiteCommonModelsPresence.


        :return: The is_v2 of this UserSiteCommonModelsPresence.
        :rtype: bool
        """
        return self._is_v2

    @is_v2.setter
    def is_v2(self, is_v2):
        """Sets the is_v2 of this UserSiteCommonModelsPresence.


        :param is_v2: The is_v2 of this UserSiteCommonModelsPresence.
        :type: bool
        """

        self._is_v2 = is_v2

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


        :return: The platform of this UserSiteCommonModelsPresence.
        :rtype: str
        """
        return self._platform

    @platform.setter
    def platform(self, platform):
        """Sets the platform of this UserSiteCommonModelsPresence.


        :param platform: The platform of this UserSiteCommonModelsPresence.
        :type: str
        """

        self._platform = platform

    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(UserSiteCommonModelsPresence, 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, UserSiteCommonModelsPresence):
            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, UserSiteCommonModelsPresence):
            return True

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