# coding: utf-8

"""
    Akeyless API

    The purpose of this application is to provide access to Akeyless API.  # noqa: E501

    The version of the OpenAPI document: 2.0
    Contact: support@akeyless.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from akeyless.configuration import Configuration


class AllowedAccess(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    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 = {
        'acc_id': 'str',
        'access_rules_type': 'str',
        'allowed_api': 'bool',
        'alloweds_login': 'bool',
        'err_msg': 'str',
        'hash': 'str',
        'is_valid': 'bool',
        'name': 'str',
        'sub_claims': 'dict(str, list[str])'
    }

    attribute_map = {
        'acc_id': 'acc_id',
        'access_rules_type': 'access_rules_type',
        'allowed_api': 'allowed_api',
        'alloweds_login': 'alloweds_login',
        'err_msg': 'err_msg',
        'hash': 'hash',
        'is_valid': 'is_valid',
        'name': 'name',
        'sub_claims': 'sub_claims'
    }

    def __init__(self, acc_id=None, access_rules_type=None, allowed_api=None, alloweds_login=None, err_msg=None, hash=None, is_valid=None, name=None, sub_claims=None, local_vars_configuration=None):  # noqa: E501
        """AllowedAccess - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._acc_id = None
        self._access_rules_type = None
        self._allowed_api = None
        self._alloweds_login = None
        self._err_msg = None
        self._hash = None
        self._is_valid = None
        self._name = None
        self._sub_claims = None
        self.discriminator = None

        if acc_id is not None:
            self.acc_id = acc_id
        if access_rules_type is not None:
            self.access_rules_type = access_rules_type
        if allowed_api is not None:
            self.allowed_api = allowed_api
        if alloweds_login is not None:
            self.alloweds_login = alloweds_login
        if err_msg is not None:
            self.err_msg = err_msg
        if hash is not None:
            self.hash = hash
        if is_valid is not None:
            self.is_valid = is_valid
        if name is not None:
            self.name = name
        if sub_claims is not None:
            self.sub_claims = sub_claims

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


        :return: The acc_id of this AllowedAccess.  # noqa: E501
        :rtype: str
        """
        return self._acc_id

    @acc_id.setter
    def acc_id(self, acc_id):
        """Sets the acc_id of this AllowedAccess.


        :param acc_id: The acc_id of this AllowedAccess.  # noqa: E501
        :type: str
        """

        self._acc_id = acc_id

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


        :return: The access_rules_type of this AllowedAccess.  # noqa: E501
        :rtype: str
        """
        return self._access_rules_type

    @access_rules_type.setter
    def access_rules_type(self, access_rules_type):
        """Sets the access_rules_type of this AllowedAccess.


        :param access_rules_type: The access_rules_type of this AllowedAccess.  # noqa: E501
        :type: str
        """

        self._access_rules_type = access_rules_type

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


        :return: The allowed_api of this AllowedAccess.  # noqa: E501
        :rtype: bool
        """
        return self._allowed_api

    @allowed_api.setter
    def allowed_api(self, allowed_api):
        """Sets the allowed_api of this AllowedAccess.


        :param allowed_api: The allowed_api of this AllowedAccess.  # noqa: E501
        :type: bool
        """

        self._allowed_api = allowed_api

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


        :return: The alloweds_login of this AllowedAccess.  # noqa: E501
        :rtype: bool
        """
        return self._alloweds_login

    @alloweds_login.setter
    def alloweds_login(self, alloweds_login):
        """Sets the alloweds_login of this AllowedAccess.


        :param alloweds_login: The alloweds_login of this AllowedAccess.  # noqa: E501
        :type: bool
        """

        self._alloweds_login = alloweds_login

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


        :return: The err_msg of this AllowedAccess.  # noqa: E501
        :rtype: str
        """
        return self._err_msg

    @err_msg.setter
    def err_msg(self, err_msg):
        """Sets the err_msg of this AllowedAccess.


        :param err_msg: The err_msg of this AllowedAccess.  # noqa: E501
        :type: str
        """

        self._err_msg = err_msg

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


        :return: The hash of this AllowedAccess.  # noqa: E501
        :rtype: str
        """
        return self._hash

    @hash.setter
    def hash(self, hash):
        """Sets the hash of this AllowedAccess.


        :param hash: The hash of this AllowedAccess.  # noqa: E501
        :type: str
        """

        self._hash = hash

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


        :return: The is_valid of this AllowedAccess.  # noqa: E501
        :rtype: bool
        """
        return self._is_valid

    @is_valid.setter
    def is_valid(self, is_valid):
        """Sets the is_valid of this AllowedAccess.


        :param is_valid: The is_valid of this AllowedAccess.  # noqa: E501
        :type: bool
        """

        self._is_valid = is_valid

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


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

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


        :param name: The name of this AllowedAccess.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The sub_claims of this AllowedAccess.  # noqa: E501
        :rtype: dict(str, list[str])
        """
        return self._sub_claims

    @sub_claims.setter
    def sub_claims(self, sub_claims):
        """Sets the sub_claims of this AllowedAccess.


        :param sub_claims: The sub_claims of this AllowedAccess.  # noqa: E501
        :type: dict(str, list[str])
        """

        self._sub_claims = sub_claims

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

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