# coding: utf-8

"""
    Lotus API

    Lotus is an open-core pricing and billing engine. We enable API companies to automate and optimize their custom usage-based pricing for any metric.  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class MetricRequest(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 = {
        'metric_id': 'str',
        'aggregation_type': 'str',
        'metric_name': 'str',
        'numeric_filters': 'list[NumericFilterRequest]',
        'categorical_filters': 'list[CategoricalFilterRequest]'
    }

    attribute_map = {
        'metric_id': 'metric_id',
        'aggregation_type': 'aggregation_type',
        'metric_name': 'metric_name',
        'numeric_filters': 'numeric_filters',
        'categorical_filters': 'categorical_filters'
    }

    def __init__(self, metric_id=None, aggregation_type=None, metric_name=None, numeric_filters=None, categorical_filters=None):  # noqa: E501
        """MetricRequest - a model defined in Swagger"""  # noqa: E501
        self._metric_id = None
        self._aggregation_type = None
        self._metric_name = None
        self._numeric_filters = None
        self._categorical_filters = None
        self.discriminator = None
        self.metric_id = metric_id
        self.aggregation_type = aggregation_type
        self.metric_name = metric_name
        self.numeric_filters = numeric_filters
        self.categorical_filters = categorical_filters

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


        :return: The metric_id of this MetricRequest.  # noqa: E501
        :rtype: str
        """
        return self._metric_id

    @metric_id.setter
    def metric_id(self, metric_id):
        """Sets the metric_id of this MetricRequest.


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

        self._metric_id = metric_id

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


        :return: The aggregation_type of this MetricRequest.  # noqa: E501
        :rtype: str
        """
        return self._aggregation_type

    @aggregation_type.setter
    def aggregation_type(self, aggregation_type):
        """Sets the aggregation_type of this MetricRequest.


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

        self._aggregation_type = aggregation_type

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


        :return: The metric_name of this MetricRequest.  # noqa: E501
        :rtype: str
        """
        return self._metric_name

    @metric_name.setter
    def metric_name(self, metric_name):
        """Sets the metric_name of this MetricRequest.


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

        self._metric_name = metric_name

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


        :return: The numeric_filters of this MetricRequest.  # noqa: E501
        :rtype: list[NumericFilterRequest]
        """
        return self._numeric_filters

    @numeric_filters.setter
    def numeric_filters(self, numeric_filters):
        """Sets the numeric_filters of this MetricRequest.


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

        self._numeric_filters = numeric_filters

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


        :return: The categorical_filters of this MetricRequest.  # noqa: E501
        :rtype: list[CategoricalFilterRequest]
        """
        return self._categorical_filters

    @categorical_filters.setter
    def categorical_filters(self, categorical_filters):
        """Sets the categorical_filters of this MetricRequest.


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

        self._categorical_filters = categorical_filters

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

        return self.__dict__ == other.__dict__

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