# coding: utf-8

"""
    VeeRoute.LSS Account

    LSS Account Panel  # noqa: E501

    The version of the OpenAPI document: 3.6.163551
    Contact: support@veeroute.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from vrt_lss_account.configuration import Configuration


class MethodQuota(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 = {
        'method': 'MethodName',
        'points_per_request': 'int',
        'points_per_day': 'int',
        'points_per_date_window': 'int',
        'max_concurrent_execution': 'int'
    }

    attribute_map = {
        'method': 'method',
        'points_per_request': 'points_per_request',
        'points_per_day': 'points_per_day',
        'points_per_date_window': 'points_per_date_window',
        'max_concurrent_execution': 'max_concurrent_execution'
    }

    def __init__(self, method=None, points_per_request=None, points_per_day=None, points_per_date_window=None, max_concurrent_execution=0, local_vars_configuration=None):  # noqa: E501
        """MethodQuota - 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._method = None
        self._points_per_request = None
        self._points_per_day = None
        self._points_per_date_window = None
        self._max_concurrent_execution = None
        self.discriminator = None

        self.method = method
        self.points_per_request = points_per_request
        self.points_per_day = points_per_day
        if points_per_date_window is not None:
            self.points_per_date_window = points_per_date_window
        if max_concurrent_execution is not None:
            self.max_concurrent_execution = max_concurrent_execution

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


        :return: The method of this MethodQuota.  # noqa: E501
        :rtype: MethodName
        """
        return self._method

    @method.setter
    def method(self, method):
        """Sets the method of this MethodQuota.


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

        self._method = method

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

        Maximum number of non-unique points per request.  # noqa: E501

        :return: The points_per_request of this MethodQuota.  # noqa: E501
        :rtype: int
        """
        return self._points_per_request

    @points_per_request.setter
    def points_per_request(self, points_per_request):
        """Sets the points_per_request of this MethodQuota.

        Maximum number of non-unique points per request.  # noqa: E501

        :param points_per_request: The points_per_request of this MethodQuota.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and points_per_request is None:  # noqa: E501
            raise ValueError("Invalid value for `points_per_request`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                points_per_request is not None and points_per_request > 1000000):  # noqa: E501
            raise ValueError("Invalid value for `points_per_request`, must be a value less than or equal to `1000000`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                points_per_request is not None and points_per_request < 0):  # noqa: E501
            raise ValueError("Invalid value for `points_per_request`, must be a value greater than or equal to `0`")  # noqa: E501

        self._points_per_request = points_per_request

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

        Maximum number of non-unique points per request per day.  # noqa: E501

        :return: The points_per_day of this MethodQuota.  # noqa: E501
        :rtype: int
        """
        return self._points_per_day

    @points_per_day.setter
    def points_per_day(self, points_per_day):
        """Sets the points_per_day of this MethodQuota.

        Maximum number of non-unique points per request per day.  # noqa: E501

        :param points_per_day: The points_per_day of this MethodQuota.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and points_per_day is None:  # noqa: E501
            raise ValueError("Invalid value for `points_per_day`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                points_per_day is not None and points_per_day > 100000000):  # noqa: E501
            raise ValueError("Invalid value for `points_per_day`, must be a value less than or equal to `100000000`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                points_per_day is not None and points_per_day < 0):  # noqa: E501
            raise ValueError("Invalid value for `points_per_day`, must be a value greater than or equal to `0`")  # noqa: E501

        self._points_per_day = points_per_day

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

        The maximum total number of non-unique points for the specified time period, multiple of a day. If the time period equals to a day, this parameter is not taken into account, since it is responsible for one day   # noqa: E501

        :return: The points_per_date_window of this MethodQuota.  # noqa: E501
        :rtype: int
        """
        return self._points_per_date_window

    @points_per_date_window.setter
    def points_per_date_window(self, points_per_date_window):
        """Sets the points_per_date_window of this MethodQuota.

        The maximum total number of non-unique points for the specified time period, multiple of a day. If the time period equals to a day, this parameter is not taken into account, since it is responsible for one day   # noqa: E501

        :param points_per_date_window: The points_per_date_window of this MethodQuota.  # noqa: E501
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                points_per_date_window is not None and points_per_date_window > 100000000):  # noqa: E501
            raise ValueError("Invalid value for `points_per_date_window`, must be a value less than or equal to `100000000`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                points_per_date_window is not None and points_per_date_window < 0):  # noqa: E501
            raise ValueError("Invalid value for `points_per_date_window`, must be a value greater than or equal to `0`")  # noqa: E501

        self._points_per_date_window = points_per_date_window

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

        The maximum total number of concurrent method execution.   # noqa: E501

        :return: The max_concurrent_execution of this MethodQuota.  # noqa: E501
        :rtype: int
        """
        return self._max_concurrent_execution

    @max_concurrent_execution.setter
    def max_concurrent_execution(self, max_concurrent_execution):
        """Sets the max_concurrent_execution of this MethodQuota.

        The maximum total number of concurrent method execution.   # noqa: E501

        :param max_concurrent_execution: The max_concurrent_execution of this MethodQuota.  # noqa: E501
        :type: int
        """
        if (self.local_vars_configuration.client_side_validation and
                max_concurrent_execution is not None and max_concurrent_execution > 1000):  # noqa: E501
            raise ValueError("Invalid value for `max_concurrent_execution`, must be a value less than or equal to `1000`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                max_concurrent_execution is not None and max_concurrent_execution < 0):  # noqa: E501
            raise ValueError("Invalid value for `max_concurrent_execution`, must be a value greater than or equal to `0`")  # noqa: E501

        self._max_concurrent_execution = max_concurrent_execution

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

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