# 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 AuthMethod(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 = {
        'access_info': 'AuthMethodAccessInfo',
        'account_id': 'str',
        'auth_method_access_id': 'str',
        'auth_method_name': 'str',
        'auth_method_roles_assoc': 'list[AuthMethodRoleAssociation]',
        'client_permissions': 'list[str]'
    }

    attribute_map = {
        'access_info': 'access_info',
        'account_id': 'account_id',
        'auth_method_access_id': 'auth_method_access_id',
        'auth_method_name': 'auth_method_name',
        'auth_method_roles_assoc': 'auth_method_roles_assoc',
        'client_permissions': 'client_permissions'
    }

    def __init__(self, access_info=None, account_id=None, auth_method_access_id=None, auth_method_name=None, auth_method_roles_assoc=None, client_permissions=None, local_vars_configuration=None):  # noqa: E501
        """AuthMethod - 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._access_info = None
        self._account_id = None
        self._auth_method_access_id = None
        self._auth_method_name = None
        self._auth_method_roles_assoc = None
        self._client_permissions = None
        self.discriminator = None

        if access_info is not None:
            self.access_info = access_info
        if account_id is not None:
            self.account_id = account_id
        if auth_method_access_id is not None:
            self.auth_method_access_id = auth_method_access_id
        if auth_method_name is not None:
            self.auth_method_name = auth_method_name
        if auth_method_roles_assoc is not None:
            self.auth_method_roles_assoc = auth_method_roles_assoc
        if client_permissions is not None:
            self.client_permissions = client_permissions

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


        :return: The access_info of this AuthMethod.  # noqa: E501
        :rtype: AuthMethodAccessInfo
        """
        return self._access_info

    @access_info.setter
    def access_info(self, access_info):
        """Sets the access_info of this AuthMethod.


        :param access_info: The access_info of this AuthMethod.  # noqa: E501
        :type: AuthMethodAccessInfo
        """

        self._access_info = access_info

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


        :return: The account_id of this AuthMethod.  # noqa: E501
        :rtype: str
        """
        return self._account_id

    @account_id.setter
    def account_id(self, account_id):
        """Sets the account_id of this AuthMethod.


        :param account_id: The account_id of this AuthMethod.  # noqa: E501
        :type: str
        """

        self._account_id = account_id

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


        :return: The auth_method_access_id of this AuthMethod.  # noqa: E501
        :rtype: str
        """
        return self._auth_method_access_id

    @auth_method_access_id.setter
    def auth_method_access_id(self, auth_method_access_id):
        """Sets the auth_method_access_id of this AuthMethod.


        :param auth_method_access_id: The auth_method_access_id of this AuthMethod.  # noqa: E501
        :type: str
        """

        self._auth_method_access_id = auth_method_access_id

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


        :return: The auth_method_name of this AuthMethod.  # noqa: E501
        :rtype: str
        """
        return self._auth_method_name

    @auth_method_name.setter
    def auth_method_name(self, auth_method_name):
        """Sets the auth_method_name of this AuthMethod.


        :param auth_method_name: The auth_method_name of this AuthMethod.  # noqa: E501
        :type: str
        """

        self._auth_method_name = auth_method_name

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


        :return: The auth_method_roles_assoc of this AuthMethod.  # noqa: E501
        :rtype: list[AuthMethodRoleAssociation]
        """
        return self._auth_method_roles_assoc

    @auth_method_roles_assoc.setter
    def auth_method_roles_assoc(self, auth_method_roles_assoc):
        """Sets the auth_method_roles_assoc of this AuthMethod.


        :param auth_method_roles_assoc: The auth_method_roles_assoc of this AuthMethod.  # noqa: E501
        :type: list[AuthMethodRoleAssociation]
        """

        self._auth_method_roles_assoc = auth_method_roles_assoc

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


        :return: The client_permissions of this AuthMethod.  # noqa: E501
        :rtype: list[str]
        """
        return self._client_permissions

    @client_permissions.setter
    def client_permissions(self, client_permissions):
        """Sets the client_permissions of this AuthMethod.


        :param client_permissions: The client_permissions of this AuthMethod.  # noqa: E501
        :type: list[str]
        """

        self._client_permissions = client_permissions

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

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