# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class AggregatedUsageQuery(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 = {
        'start_date': 'date',
        'end_date': 'date',
        'name_contains': 'str',
        'group_by_date': 'bool',
        'asc': 'bool'
    }

    attribute_map = {
        'start_date': 'start_date',
        'end_date': 'end_date',
        'name_contains': 'name_contains',
        'group_by_date': 'group_by_date',
        'asc': 'asc'
    }

    def __init__(self, start_date=None, end_date=None, name_contains=None, group_by_date=False, asc=False, local_vars_configuration=None):  # noqa: E501
        """AggregatedUsageQuery - 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._start_date = None
        self._end_date = None
        self._name_contains = None
        self._group_by_date = None
        self._asc = None
        self.discriminator = None

        self.start_date = start_date
        self.end_date = end_date
        if name_contains is not None:
            self.name_contains = name_contains
        if group_by_date is not None:
            self.group_by_date = group_by_date
        if asc is not None:
            self.asc = asc

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

        Start date of the usage data to query  # noqa: E501

        :return: The start_date of this AggregatedUsageQuery.  # noqa: E501
        :rtype: date
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this AggregatedUsageQuery.

        Start date of the usage data to query  # noqa: E501

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

        self._start_date = start_date

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

        End date of the usage data to query  # noqa: E501

        :return: The end_date of this AggregatedUsageQuery.  # noqa: E501
        :rtype: date
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this AggregatedUsageQuery.

        End date of the usage data to query  # noqa: E501

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

        self._end_date = end_date

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

        Filter the usage data by name containing this string  # noqa: E501

        :return: The name_contains of this AggregatedUsageQuery.  # noqa: E501
        :rtype: str
        """
        return self._name_contains

    @name_contains.setter
    def name_contains(self, name_contains):
        """Sets the name_contains of this AggregatedUsageQuery.

        Filter the usage data by name containing this string  # noqa: E501

        :param name_contains: The name_contains of this AggregatedUsageQuery.  # noqa: E501
        :type: str
        """

        self._name_contains = name_contains

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

        Whether to group the usage data by date  # noqa: E501

        :return: The group_by_date of this AggregatedUsageQuery.  # noqa: E501
        :rtype: bool
        """
        return self._group_by_date

    @group_by_date.setter
    def group_by_date(self, group_by_date):
        """Sets the group_by_date of this AggregatedUsageQuery.

        Whether to group the usage data by date  # noqa: E501

        :param group_by_date: The group_by_date of this AggregatedUsageQuery.  # noqa: E501
        :type: bool
        """

        self._group_by_date = group_by_date

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

        Whether to sort the usage data in ascending order  # noqa: E501

        :return: The asc of this AggregatedUsageQuery.  # noqa: E501
        :rtype: bool
        """
        return self._asc

    @asc.setter
    def asc(self, asc):
        """Sets the asc of this AggregatedUsageQuery.

        Whether to sort the usage data in ascending order  # noqa: E501

        :param asc: The asc of this AggregatedUsageQuery.  # noqa: E501
        :type: bool
        """

        self._asc = asc

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

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