"""
    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 UserSiteCommonModelsApiKey:
    """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 = {"key_id": "str", "key_secret": "str"}

    attribute_map = {"key_id": "KeyId", "key_secret": "KeySecret"}

    def __init__(self, key_id=None, key_secret=None, _configuration=None):
        """UserSiteCommonModelsApiKey - a model defined in Swagger"""
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._key_id = None
        self._key_secret = None
        self.discriminator = None

        self.key_id = key_id
        self.key_secret = key_secret

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


        :return: The key_id of this UserSiteCommonModelsApiKey.
        :rtype: str
        """
        return self._key_id

    @key_id.setter
    def key_id(self, key_id):
        """Sets the key_id of this UserSiteCommonModelsApiKey.


        :param key_id: The key_id of this UserSiteCommonModelsApiKey.
        :type: str
        """
        if self._configuration.client_side_validation and key_id is None:
            raise ValueError("Invalid value for `key_id`, must not be `None`")

        self._key_id = key_id

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


        :return: The key_secret of this UserSiteCommonModelsApiKey.
        :rtype: str
        """
        return self._key_secret

    @key_secret.setter
    def key_secret(self, key_secret):
        """Sets the key_secret of this UserSiteCommonModelsApiKey.


        :param key_secret: The key_secret of this UserSiteCommonModelsApiKey.
        :type: str
        """
        if self._configuration.client_side_validation and key_secret is None:
            raise ValueError("Invalid value for `key_secret`, must not be `None`")
        if (
            self._configuration.client_side_validation
            and key_secret is not None
            and len(key_secret) > 100
        ):
            raise ValueError(
                "Invalid value for `key_secret`, length must be less than or equal to `100`"
            )
        if (
            self._configuration.client_side_validation
            and key_secret is not None
            and len(key_secret) < 5
        ):
            raise ValueError(
                "Invalid value for `key_secret`, length must be greater than or equal to `5`"
            )

        self._key_secret = key_secret

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

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