# coding: utf-8

"""
    ThingsBoard REST API

     ThingsBoard Professional Edition IoT platform REST API documentation.  # noqa: E501

    OpenAPI spec version: 3.7.0PE
    Contact: info@thingsboard.io
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

#  Copyright 2024. ThingsBoard
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

import pprint
import re  # noqa: F401

import six

class OAuth2RegistrationInfo(object):
    """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 = {
        'mapper_config': 'OAuth2MapperConfig',
        'client_id': 'str',
        'client_secret': 'str',
        'authorization_uri': 'str',
        'access_token_uri': 'str',
        'scope': 'list[str]',
        'user_info_uri': 'str',
        'user_name_attribute_name': 'str',
        'jwk_set_uri': 'str',
        'client_authentication_method': 'str',
        'login_button_label': 'str',
        'login_button_icon': 'str',
        'platforms': 'list[str]',
        'additional_info': 'JsonNode'
    }

    attribute_map = {
        'mapper_config': 'mapperConfig',
        'client_id': 'clientId',
        'client_secret': 'clientSecret',
        'authorization_uri': 'authorizationUri',
        'access_token_uri': 'accessTokenUri',
        'scope': 'scope',
        'user_info_uri': 'userInfoUri',
        'user_name_attribute_name': 'userNameAttributeName',
        'jwk_set_uri': 'jwkSetUri',
        'client_authentication_method': 'clientAuthenticationMethod',
        'login_button_label': 'loginButtonLabel',
        'login_button_icon': 'loginButtonIcon',
        'platforms': 'platforms',
        'additional_info': 'additionalInfo'
    }

    def __init__(self, mapper_config=None, client_id=None, client_secret=None, authorization_uri=None, access_token_uri=None, scope=None, user_info_uri=None, user_name_attribute_name=None, jwk_set_uri=None, client_authentication_method=None, login_button_label=None, login_button_icon=None, platforms=None, additional_info=None):  # noqa: E501
        """OAuth2RegistrationInfo - a model defined in Swagger"""  # noqa: E501
        self._mapper_config = None
        self._client_id = None
        self._client_secret = None
        self._authorization_uri = None
        self._access_token_uri = None
        self._scope = None
        self._user_info_uri = None
        self._user_name_attribute_name = None
        self._jwk_set_uri = None
        self._client_authentication_method = None
        self._login_button_label = None
        self._login_button_icon = None
        self._platforms = None
        self._additional_info = None
        self.discriminator = None
        self.mapper_config = mapper_config
        self.client_id = client_id
        self.client_secret = client_secret
        self.authorization_uri = authorization_uri
        self.access_token_uri = access_token_uri
        self.scope = scope
        if user_info_uri is not None:
            self.user_info_uri = user_info_uri
        if user_name_attribute_name is not None:
            self.user_name_attribute_name = user_name_attribute_name
        if jwk_set_uri is not None:
            self.jwk_set_uri = jwk_set_uri
        self.client_authentication_method = client_authentication_method
        self.login_button_label = login_button_label
        if login_button_icon is not None:
            self.login_button_icon = login_button_icon
        if platforms is not None:
            self.platforms = platforms
        self.additional_info = additional_info

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


        :return: The mapper_config of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: OAuth2MapperConfig
        """
        return self._mapper_config

    @mapper_config.setter
    def mapper_config(self, mapper_config):
        """Sets the mapper_config of this OAuth2RegistrationInfo.


        :param mapper_config: The mapper_config of this OAuth2RegistrationInfo.  # noqa: E501
        :type: OAuth2MapperConfig
        """
        if mapper_config is None:
            raise ValueError("Invalid value for `mapper_config`, must not be `None`")  # noqa: E501

        self._mapper_config = mapper_config

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

        OAuth2 client ID. Cannot be empty  # noqa: E501

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

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

        OAuth2 client ID. Cannot be empty  # noqa: E501

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

        self._client_id = client_id

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

        OAuth2 client secret. Cannot be empty  # noqa: E501

        :return: The client_secret of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._client_secret

    @client_secret.setter
    def client_secret(self, client_secret):
        """Sets the client_secret of this OAuth2RegistrationInfo.

        OAuth2 client secret. Cannot be empty  # noqa: E501

        :param client_secret: The client_secret of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """
        if client_secret is None:
            raise ValueError("Invalid value for `client_secret`, must not be `None`")  # noqa: E501

        self._client_secret = client_secret

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

        Authorization URI of the OAuth2 provider. Cannot be empty  # noqa: E501

        :return: The authorization_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._authorization_uri

    @authorization_uri.setter
    def authorization_uri(self, authorization_uri):
        """Sets the authorization_uri of this OAuth2RegistrationInfo.

        Authorization URI of the OAuth2 provider. Cannot be empty  # noqa: E501

        :param authorization_uri: The authorization_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """
        if authorization_uri is None:
            raise ValueError("Invalid value for `authorization_uri`, must not be `None`")  # noqa: E501

        self._authorization_uri = authorization_uri

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

        Access token URI of the OAuth2 provider. Cannot be empty  # noqa: E501

        :return: The access_token_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._access_token_uri

    @access_token_uri.setter
    def access_token_uri(self, access_token_uri):
        """Sets the access_token_uri of this OAuth2RegistrationInfo.

        Access token URI of the OAuth2 provider. Cannot be empty  # noqa: E501

        :param access_token_uri: The access_token_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """
        if access_token_uri is None:
            raise ValueError("Invalid value for `access_token_uri`, must not be `None`")  # noqa: E501

        self._access_token_uri = access_token_uri

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

        OAuth scopes that will be requested from OAuth2 platform. Cannot be empty  # noqa: E501

        :return: The scope of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this OAuth2RegistrationInfo.

        OAuth scopes that will be requested from OAuth2 platform. Cannot be empty  # noqa: E501

        :param scope: The scope of this OAuth2RegistrationInfo.  # noqa: E501
        :type: list[str]
        """
        if scope is None:
            raise ValueError("Invalid value for `scope`, must not be `None`")  # noqa: E501

        self._scope = scope

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

        User info URI of the OAuth2 provider  # noqa: E501

        :return: The user_info_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._user_info_uri

    @user_info_uri.setter
    def user_info_uri(self, user_info_uri):
        """Sets the user_info_uri of this OAuth2RegistrationInfo.

        User info URI of the OAuth2 provider  # noqa: E501

        :param user_info_uri: The user_info_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """

        self._user_info_uri = user_info_uri

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

        Name of the username attribute in OAuth2 provider response. Cannot be empty  # noqa: E501

        :return: The user_name_attribute_name of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._user_name_attribute_name

    @user_name_attribute_name.setter
    def user_name_attribute_name(self, user_name_attribute_name):
        """Sets the user_name_attribute_name of this OAuth2RegistrationInfo.

        Name of the username attribute in OAuth2 provider response. Cannot be empty  # noqa: E501

        :param user_name_attribute_name: The user_name_attribute_name of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """

        self._user_name_attribute_name = user_name_attribute_name

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

        JSON Web Key URI of the OAuth2 provider  # noqa: E501

        :return: The jwk_set_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._jwk_set_uri

    @jwk_set_uri.setter
    def jwk_set_uri(self, jwk_set_uri):
        """Sets the jwk_set_uri of this OAuth2RegistrationInfo.

        JSON Web Key URI of the OAuth2 provider  # noqa: E501

        :param jwk_set_uri: The jwk_set_uri of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """

        self._jwk_set_uri = jwk_set_uri

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

        Client authentication method to use: 'BASIC' or 'POST'. Cannot be empty  # noqa: E501

        :return: The client_authentication_method of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._client_authentication_method

    @client_authentication_method.setter
    def client_authentication_method(self, client_authentication_method):
        """Sets the client_authentication_method of this OAuth2RegistrationInfo.

        Client authentication method to use: 'BASIC' or 'POST'. Cannot be empty  # noqa: E501

        :param client_authentication_method: The client_authentication_method of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """
        if client_authentication_method is None:
            raise ValueError("Invalid value for `client_authentication_method`, must not be `None`")  # noqa: E501

        self._client_authentication_method = client_authentication_method

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

        OAuth2 provider label. Cannot be empty  # noqa: E501

        :return: The login_button_label of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._login_button_label

    @login_button_label.setter
    def login_button_label(self, login_button_label):
        """Sets the login_button_label of this OAuth2RegistrationInfo.

        OAuth2 provider label. Cannot be empty  # noqa: E501

        :param login_button_label: The login_button_label of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """
        if login_button_label is None:
            raise ValueError("Invalid value for `login_button_label`, must not be `None`")  # noqa: E501

        self._login_button_label = login_button_label

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

        Log in button icon for OAuth2 provider  # noqa: E501

        :return: The login_button_icon of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: str
        """
        return self._login_button_icon

    @login_button_icon.setter
    def login_button_icon(self, login_button_icon):
        """Sets the login_button_icon of this OAuth2RegistrationInfo.

        Log in button icon for OAuth2 provider  # noqa: E501

        :param login_button_icon: The login_button_icon of this OAuth2RegistrationInfo.  # noqa: E501
        :type: str
        """

        self._login_button_icon = login_button_icon

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

        List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed)  # noqa: E501

        :return: The platforms of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: list[str]
        """
        return self._platforms

    @platforms.setter
    def platforms(self, platforms):
        """Sets the platforms of this OAuth2RegistrationInfo.

        List of platforms for which usage of the OAuth2 client is allowed (empty for all allowed)  # noqa: E501

        :param platforms: The platforms of this OAuth2RegistrationInfo.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["WEB", "ANDROID", "IOS"]  # noqa: E501
        if not set(platforms).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `platforms` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(platforms) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._platforms = platforms

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


        :return: The additional_info of this OAuth2RegistrationInfo.  # noqa: E501
        :rtype: JsonNode
        """
        return self._additional_info

    @additional_info.setter
    def additional_info(self, additional_info):
        """Sets the additional_info of this OAuth2RegistrationInfo.


        :param additional_info: The additional_info of this OAuth2RegistrationInfo.  # noqa: E501
        :type: JsonNode
        """
        if additional_info is None:
            raise ValueError("Invalid value for `additional_info`, must not be `None`")  # noqa: E501

        self._additional_info = additional_info

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(OAuth2RegistrationInfo, 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, OAuth2RegistrationInfo):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
