# coding: utf-8

"""
    CardPay REST API

    Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class BrowserInfo(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 = {
        "accept_header": "str",
        "color_depth": "int",
        "java_enabled": "bool",
        "java_script_enabled": "bool",
        "language": "str",
        "screen_height": "int",
        "screen_width": "int",
        "time_zone_offset": "int",
    }

    attribute_map = {
        "accept_header": "accept_header",
        "color_depth": "color_depth",
        "java_enabled": "java_enabled",
        "java_script_enabled": "java_script_enabled",
        "language": "language",
        "screen_height": "screen_height",
        "screen_width": "screen_width",
        "time_zone_offset": "time_zone_offset",
    }

    def __init__(
        self,
        accept_header=None,
        color_depth=None,
        java_enabled=None,
        java_script_enabled=None,
        language=None,
        screen_height=None,
        screen_width=None,
        time_zone_offset=None,
    ):  # noqa: E501
        """BrowserInfo - a model defined in Swagger"""  # noqa: E501

        self._accept_header = None
        self._color_depth = None
        self._java_enabled = None
        self._java_script_enabled = None
        self._language = None
        self._screen_height = None
        self._screen_width = None
        self._time_zone_offset = None
        self.discriminator = None

        if accept_header is not None:
            self.accept_header = accept_header
        if color_depth is not None:
            self.color_depth = color_depth
        if java_enabled is not None:
            self.java_enabled = java_enabled
        if java_script_enabled is not None:
            self.java_script_enabled = java_script_enabled
        if language is not None:
            self.language = language
        if screen_height is not None:
            self.screen_height = screen_height
        if screen_width is not None:
            self.screen_width = screen_width
        if time_zone_offset is not None:
            self.time_zone_offset = time_zone_offset

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

        Exact content of the HTTP accept headers as sent to the 3-D Secure 2 Requestor from the Cardholder's browser  # noqa: E501

        :return: The accept_header of this BrowserInfo.  # noqa: E501
        :rtype: str
        """
        return self._accept_header

    @accept_header.setter
    def accept_header(self, accept_header):
        """Sets the accept_header of this BrowserInfo.

        Exact content of the HTTP accept headers as sent to the 3-D Secure 2 Requestor from the Cardholder's browser  # noqa: E501

        :param accept_header: The accept_header of this BrowserInfo.  # noqa: E501
        :type: str
        """
        if accept_header is not None and len(accept_header) > 2048:
            raise ValueError(
                "Invalid value for `accept_header`, length must be less than or equal to `2048`"
            )  # noqa: E501
        if accept_header is not None and len(accept_header) < 1:
            raise ValueError(
                "Invalid value for `accept_header`, length must be greater than or equal to `1`"
            )  # noqa: E501

        self._accept_header = accept_header

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

        Value representing the bit depth of the colour palette for displaying images, in bits per pixel  # noqa: E501

        :return: The color_depth of this BrowserInfo.  # noqa: E501
        :rtype: int
        """
        return self._color_depth

    @color_depth.setter
    def color_depth(self, color_depth):
        """Sets the color_depth of this BrowserInfo.

        Value representing the bit depth of the colour palette for displaying images, in bits per pixel  # noqa: E501

        :param color_depth: The color_depth of this BrowserInfo.  # noqa: E501
        :type: int
        """
        if color_depth is not None and color_depth > 99:  # noqa: E501
            raise ValueError(
                "Invalid value for `color_depth`, must be a value less than or equal to `99`"
            )  # noqa: E501
        if color_depth is not None and color_depth < 1:  # noqa: E501
            raise ValueError(
                "Invalid value for `color_depth`, must be a value greater than or equal to `1`"
            )  # noqa: E501

        self._color_depth = color_depth

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

        Boolean that represents the ability of the cardholder browser to execute Java  # noqa: E501

        :return: The java_enabled of this BrowserInfo.  # noqa: E501
        :rtype: bool
        """
        return self._java_enabled

    @java_enabled.setter
    def java_enabled(self, java_enabled):
        """Sets the java_enabled of this BrowserInfo.

        Boolean that represents the ability of the cardholder browser to execute Java  # noqa: E501

        :param java_enabled: The java_enabled of this BrowserInfo.  # noqa: E501
        :type: bool
        """

        self._java_enabled = java_enabled

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

        Boolean that represents the ability of the cardholder browser to execute JavaScript  # noqa: E501

        :return: The java_script_enabled of this BrowserInfo.  # noqa: E501
        :rtype: bool
        """
        return self._java_script_enabled

    @java_script_enabled.setter
    def java_script_enabled(self, java_script_enabled):
        """Sets the java_script_enabled of this BrowserInfo.

        Boolean that represents the ability of the cardholder browser to execute JavaScript  # noqa: E501

        :param java_script_enabled: The java_script_enabled of this BrowserInfo.  # noqa: E501
        :type: bool
        """

        self._java_script_enabled = java_script_enabled

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

        Value representing the browser language as defined in IETF BCP47  # noqa: E501

        :return: The language of this BrowserInfo.  # noqa: E501
        :rtype: str
        """
        return self._language

    @language.setter
    def language(self, language):
        """Sets the language of this BrowserInfo.

        Value representing the browser language as defined in IETF BCP47  # noqa: E501

        :param language: The language of this BrowserInfo.  # noqa: E501
        :type: str
        """
        if language is not None and len(language) > 8:
            raise ValueError(
                "Invalid value for `language`, length must be less than or equal to `8`"
            )  # noqa: E501
        if language is not None and len(language) < 0:
            raise ValueError(
                "Invalid value for `language`, length must be greater than or equal to `0`"
            )  # noqa: E501

        self._language = language

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

        Total height of the Cardholder’s screen in pixels  # noqa: E501

        :return: The screen_height of this BrowserInfo.  # noqa: E501
        :rtype: int
        """
        return self._screen_height

    @screen_height.setter
    def screen_height(self, screen_height):
        """Sets the screen_height of this BrowserInfo.

        Total height of the Cardholder’s screen in pixels  # noqa: E501

        :param screen_height: The screen_height of this BrowserInfo.  # noqa: E501
        :type: int
        """
        if screen_height is not None and screen_height > 999999:  # noqa: E501
            raise ValueError(
                "Invalid value for `screen_height`, must be a value less than or equal to `999999`"
            )  # noqa: E501
        if screen_height is not None and screen_height < 1:  # noqa: E501
            raise ValueError(
                "Invalid value for `screen_height`, must be a value greater than or equal to `1`"
            )  # noqa: E501

        self._screen_height = screen_height

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

        Total width of the Cardholder's screen in pixels  # noqa: E501

        :return: The screen_width of this BrowserInfo.  # noqa: E501
        :rtype: int
        """
        return self._screen_width

    @screen_width.setter
    def screen_width(self, screen_width):
        """Sets the screen_width of this BrowserInfo.

        Total width of the Cardholder's screen in pixels  # noqa: E501

        :param screen_width: The screen_width of this BrowserInfo.  # noqa: E501
        :type: int
        """
        if screen_width is not None and screen_width > 999999:  # noqa: E501
            raise ValueError(
                "Invalid value for `screen_width`, must be a value less than or equal to `999999`"
            )  # noqa: E501
        if screen_width is not None and screen_width < 1:  # noqa: E501
            raise ValueError(
                "Invalid value for `screen_width`, must be a value greater than or equal to `1`"
            )  # noqa: E501

        self._screen_width = screen_width

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

        Time-zone offset in minutes between UTC and the Cardholder browser local time  # noqa: E501

        :return: The time_zone_offset of this BrowserInfo.  # noqa: E501
        :rtype: int
        """
        return self._time_zone_offset

    @time_zone_offset.setter
    def time_zone_offset(self, time_zone_offset):
        """Sets the time_zone_offset of this BrowserInfo.

        Time-zone offset in minutes between UTC and the Cardholder browser local time  # noqa: E501

        :param time_zone_offset: The time_zone_offset of this BrowserInfo.  # noqa: E501
        :type: int
        """

        self._time_zone_offset = time_zone_offset

    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:
                if value is not None:
                    result[attr] = value
        if issubclass(BrowserInfo, 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, BrowserInfo):
            return False

        return self.__dict__ == other.__dict__

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