# coding: utf-8

"""
    CartoVista REST API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class GenericWebPortalResponse(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 = {
        'version': 'str',
        'success': 'bool',
        'error': 'OneOfGenericWebPortalResponseError',
        'payload_type': 'str',
        'payload': 'object',
        'un_authorized_request': 'bool'
    }

    attribute_map = {
        'version': 'version',
        'success': 'success',
        'error': 'error',
        'payload_type': 'payloadType',
        'payload': 'payload',
        'un_authorized_request': 'unAuthorizedRequest'
    }

    def __init__(self, version=None, success=None, error=None, payload_type=None, payload=None, un_authorized_request=None):  # noqa: E501
        """GenericWebPortalResponse - a model defined in Swagger"""  # noqa: E501
        self._version = None
        self._success = None
        self._error = None
        self._payload_type = None
        self._payload = None
        self._un_authorized_request = None
        self.discriminator = None
        if version is not None:
            self.version = version
        if success is not None:
            self.success = success
        if error is not None:
            self.error = error
        if payload_type is not None:
            self.payload_type = payload_type
        if payload is not None:
            self.payload = payload
        if un_authorized_request is not None:
            self.un_authorized_request = un_authorized_request

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


        :return: The version of this GenericWebPortalResponse.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this GenericWebPortalResponse.


        :param version: The version of this GenericWebPortalResponse.  # noqa: E501
        :type: str
        """

        self._version = version

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


        :return: The success of this GenericWebPortalResponse.  # noqa: E501
        :rtype: bool
        """
        return self._success

    @success.setter
    def success(self, success):
        """Sets the success of this GenericWebPortalResponse.


        :param success: The success of this GenericWebPortalResponse.  # noqa: E501
        :type: bool
        """

        self._success = success

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


        :return: The error of this GenericWebPortalResponse.  # noqa: E501
        :rtype: OneOfGenericWebPortalResponseError
        """
        return self._error

    @error.setter
    def error(self, error):
        """Sets the error of this GenericWebPortalResponse.


        :param error: The error of this GenericWebPortalResponse.  # noqa: E501
        :type: OneOfGenericWebPortalResponseError
        """

        self._error = error

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


        :return: The payload_type of this GenericWebPortalResponse.  # noqa: E501
        :rtype: str
        """
        return self._payload_type

    @payload_type.setter
    def payload_type(self, payload_type):
        """Sets the payload_type of this GenericWebPortalResponse.


        :param payload_type: The payload_type of this GenericWebPortalResponse.  # noqa: E501
        :type: str
        """

        self._payload_type = payload_type

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


        :return: The payload of this GenericWebPortalResponse.  # noqa: E501
        :rtype: object
        """
        return self._payload

    @payload.setter
    def payload(self, payload):
        """Sets the payload of this GenericWebPortalResponse.


        :param payload: The payload of this GenericWebPortalResponse.  # noqa: E501
        :type: object
        """

        self._payload = payload

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


        :return: The un_authorized_request of this GenericWebPortalResponse.  # noqa: E501
        :rtype: bool
        """
        return self._un_authorized_request

    @un_authorized_request.setter
    def un_authorized_request(self, un_authorized_request):
        """Sets the un_authorized_request of this GenericWebPortalResponse.


        :param un_authorized_request: The un_authorized_request of this GenericWebPortalResponse.  # noqa: E501
        :type: bool
        """

        self._un_authorized_request = un_authorized_request

    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(GenericWebPortalResponse, 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, GenericWebPortalResponse):
            return False

        return self.__dict__ == other.__dict__

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