# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.02.16
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class OIDCAuthConfig(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 = {
        'auth_enabled': 'bool',
        'client_id': 'str',
        'issuer': 'str',
        'logout_url': 'str',
        'scopes': 'list[OIDCProxyScope]',
        'path_config': 'OIDCAuthPathConfig'
    }

    attribute_map = {
        'auth_enabled': 'auth_enabled',
        'client_id': 'client_id',
        'issuer': 'issuer',
        'logout_url': 'logout_url',
        'scopes': 'scopes',
        'path_config': 'path_config'
    }

    def __init__(self, auth_enabled=None, client_id=None, issuer=None, logout_url=None, scopes=None, path_config=None, local_vars_configuration=None):  # noqa: E501
        """OIDCAuthConfig - 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._auth_enabled = None
        self._client_id = None
        self._issuer = None
        self._logout_url = None
        self._scopes = None
        self._path_config = None
        self.discriminator = None

        self.auth_enabled = auth_enabled
        self.client_id = client_id
        self.issuer = issuer
        if logout_url is not None:
            self.logout_url = logout_url
        if scopes is not None:
            self.scopes = scopes
        if path_config is not None:
            self.path_config = path_config

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

        Whether the authentication is enabled. If true, users will be forced to log in before accessing any of its assets. If false, no authentication will be performed.   # noqa: E501

        :return: The auth_enabled of this OIDCAuthConfig.  # noqa: E501
        :rtype: bool
        """
        return self._auth_enabled

    @auth_enabled.setter
    def auth_enabled(self, auth_enabled):
        """Sets the auth_enabled of this OIDCAuthConfig.

        Whether the authentication is enabled. If true, users will be forced to log in before accessing any of its assets. If false, no authentication will be performed.   # noqa: E501

        :param auth_enabled: The auth_enabled of this OIDCAuthConfig.  # noqa: E501
        :type: bool
        """
        if self.local_vars_configuration.client_side_validation and auth_enabled is None:  # noqa: E501
            raise ValueError("Invalid value for `auth_enabled`, must not be `None`")  # noqa: E501

        self._auth_enabled = auth_enabled

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

        The OIDC client identifier to use when logging in with this application.  # noqa: E501

        :return: The client_id of this OIDCAuthConfig.  # noqa: E501
        :rtype: str
        """
        return self._client_id

    @client_id.setter
    def client_id(self, client_id):
        """Sets the client_id of this OIDCAuthConfig.

        The OIDC client identifier to use when logging in with this application.  # noqa: E501

        :param client_id: The client_id of this OIDCAuthConfig.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and client_id is None:  # noqa: E501
            raise ValueError("Invalid value for `client_id`, must not be `None`")  # noqa: E501

        self._client_id = client_id

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

        The url of the OpenID Connect issuer.  # noqa: E501

        :return: The issuer of this OIDCAuthConfig.  # noqa: E501
        :rtype: str
        """
        return self._issuer

    @issuer.setter
    def issuer(self, issuer):
        """Sets the issuer of this OIDCAuthConfig.

        The url of the OpenID Connect issuer.  # noqa: E501

        :param issuer: The issuer of this OIDCAuthConfig.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and issuer is None:  # noqa: E501
            raise ValueError("Invalid value for `issuer`, must not be `None`")  # noqa: E501

        self._issuer = issuer

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

        The relative http path to the logout page.  # noqa: E501

        :return: The logout_url of this OIDCAuthConfig.  # noqa: E501
        :rtype: str
        """
        return self._logout_url

    @logout_url.setter
    def logout_url(self, logout_url):
        """Sets the logout_url of this OIDCAuthConfig.

        The relative http path to the logout page.  # noqa: E501

        :param logout_url: The logout_url of this OIDCAuthConfig.  # noqa: E501
        :type: str
        """

        self._logout_url = logout_url

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

        A list of scopes to be requested on behalf of the user of the application.  # noqa: E501

        :return: The scopes of this OIDCAuthConfig.  # noqa: E501
        :rtype: list[OIDCProxyScope]
        """
        return self._scopes

    @scopes.setter
    def scopes(self, scopes):
        """Sets the scopes of this OIDCAuthConfig.

        A list of scopes to be requested on behalf of the user of the application.  # noqa: E501

        :param scopes: The scopes of this OIDCAuthConfig.  # noqa: E501
        :type: list[OIDCProxyScope]
        """

        self._scopes = scopes

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


        :return: The path_config of this OIDCAuthConfig.  # noqa: E501
        :rtype: OIDCAuthPathConfig
        """
        return self._path_config

    @path_config.setter
    def path_config(self, path_config):
        """Sets the path_config of this OIDCAuthConfig.


        :param path_config: The path_config of this OIDCAuthConfig.  # noqa: E501
        :type: OIDCAuthPathConfig
        """

        self._path_config = path_config

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

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