# 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 OIDCProxyDomainMapping(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 = {
        'primary_external_name': 'str',
        'primary_internal_name': 'str',
        'other_mappings': 'list[OIDCProxyDomainNameMapping]'
    }

    attribute_map = {
        'primary_external_name': 'primary_external_name',
        'primary_internal_name': 'primary_internal_name',
        'other_mappings': 'other_mappings'
    }

    def __init__(self, primary_external_name=None, primary_internal_name=None, other_mappings=None, local_vars_configuration=None):  # noqa: E501
        """OIDCProxyDomainMapping - 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._primary_external_name = None
        self._primary_internal_name = None
        self._other_mappings = None
        self.discriminator = None

        self.primary_external_name = primary_external_name
        self.primary_internal_name = primary_internal_name
        if other_mappings is not None:
            self.other_mappings = other_mappings

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

        The primary external name is the name that gets exposed publicly.  # noqa: E501

        :return: The primary_external_name of this OIDCProxyDomainMapping.  # noqa: E501
        :rtype: str
        """
        return self._primary_external_name

    @primary_external_name.setter
    def primary_external_name(self, primary_external_name):
        """Sets the primary_external_name of this OIDCProxyDomainMapping.

        The primary external name is the name that gets exposed publicly.  # noqa: E501

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

        self._primary_external_name = primary_external_name

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

        The primary internal name is the name that used internally in the local environment.  # noqa: E501

        :return: The primary_internal_name of this OIDCProxyDomainMapping.  # noqa: E501
        :rtype: str
        """
        return self._primary_internal_name

    @primary_internal_name.setter
    def primary_internal_name(self, primary_internal_name):
        """Sets the primary_internal_name of this OIDCProxyDomainMapping.

        The primary internal name is the name that used internally in the local environment.  # noqa: E501

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

        self._primary_internal_name = primary_internal_name

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

        The list of extra mappings between internal and external domain names.  # noqa: E501

        :return: The other_mappings of this OIDCProxyDomainMapping.  # noqa: E501
        :rtype: list[OIDCProxyDomainNameMapping]
        """
        return self._other_mappings

    @other_mappings.setter
    def other_mappings(self, other_mappings):
        """Sets the other_mappings of this OIDCProxyDomainMapping.

        The list of extra mappings between internal and external domain names.  # noqa: E501

        :param other_mappings: The other_mappings of this OIDCProxyDomainMapping.  # noqa: E501
        :type: list[OIDCProxyDomainNameMapping]
        """

        self._other_mappings = other_mappings

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

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