# coding: utf-8

"""
    SparkWorks Core API

    Management Service for the SparkWorks Processing Engine  # noqa: E501

    OpenAPI spec version: v2.0
    Contact: info@sparkworks.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class ResourceQueryCriteriaRequestWithinATimeframeAPIModel(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 = {
        '_from': 'int',
        'granularity': 'str',
        'resource_uri': 'str',
        'resource_uuid': 'str',
        'result_limit': 'int',
        'target_uom': 'str',
        'to': 'int'
    }

    attribute_map = {
        '_from': 'from',
        'granularity': 'granularity',
        'resource_uri': 'resourceURI',
        'resource_uuid': 'resourceUuid',
        'result_limit': 'resultLimit',
        'target_uom': 'targetUom',
        'to': 'to'
    }

    def __init__(self, _from=None, granularity=None, resource_uri=None, resource_uuid=None, result_limit=None, target_uom=None, to=None):  # noqa: E501
        """ResourceQueryCriteriaRequestWithinATimeframeAPIModel - a model defined in Swagger"""  # noqa: E501

        self.__from = None
        self._granularity = None
        self._resource_uri = None
        self._resource_uuid = None
        self._result_limit = None
        self._target_uom = None
        self._to = None
        self.discriminator = None

        self._from = _from
        self.granularity = granularity
        if resource_uri is not None:
            self.resource_uri = resource_uri
        if resource_uuid is not None:
            self.resource_uuid = resource_uuid
        if result_limit is not None:
            self.result_limit = result_limit
        if target_uom is not None:
            self.target_uom = target_uom
        self.to = to

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

        The UNIX timestamp of the start date for filtering  # noqa: E501

        :return: The _from of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :rtype: int
        """
        return self.__from

    @_from.setter
    def _from(self, _from):
        """Sets the _from of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.

        The UNIX timestamp of the start date for filtering  # noqa: E501

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

        self.__from = _from

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

        The time granularity for the Resource data  # noqa: E501

        :return: The granularity of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :rtype: str
        """
        return self._granularity

    @granularity.setter
    def granularity(self, granularity):
        """Sets the granularity of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.

        The time granularity for the Resource data  # noqa: E501

        :param granularity: The granularity of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :type: str
        """
        if granularity is None:
            raise ValueError("Invalid value for `granularity`, must not be `None`")  # noqa: E501
        allowed_values = ["5min", "hour", "day", "month"]  # noqa: E501
        if granularity not in allowed_values:
            raise ValueError(
                "Invalid value for `granularity` ({0}), must be one of {1}"  # noqa: E501
                .format(granularity, allowed_values)
            )

        self._granularity = granularity

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

        The Resource uniform resource identifier  # noqa: E501

        :return: The resource_uri of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :rtype: str
        """
        return self._resource_uri

    @resource_uri.setter
    def resource_uri(self, resource_uri):
        """Sets the resource_uri of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.

        The Resource uniform resource identifier  # noqa: E501

        :param resource_uri: The resource_uri of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :type: str
        """

        self._resource_uri = resource_uri

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

        The Resource unique identifier  # noqa: E501

        :return: The resource_uuid of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :rtype: str
        """
        return self._resource_uuid

    @resource_uuid.setter
    def resource_uuid(self, resource_uuid):
        """Sets the resource_uuid of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.

        The Resource unique identifier  # noqa: E501

        :param resource_uuid: The resource_uuid of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :type: str
        """

        self._resource_uuid = resource_uuid

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

        The limit of returned results  # noqa: E501

        :return: The result_limit of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :rtype: int
        """
        return self._result_limit

    @result_limit.setter
    def result_limit(self, result_limit):
        """Sets the result_limit of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.

        The limit of returned results  # noqa: E501

        :param result_limit: The result_limit of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :type: int
        """

        self._result_limit = result_limit

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


        :return: The target_uom of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :rtype: str
        """
        return self._target_uom

    @target_uom.setter
    def target_uom(self, target_uom):
        """Sets the target_uom of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.


        :param target_uom: The target_uom of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :type: str
        """

        self._target_uom = target_uom

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

        The UNIX timestamp of the end date for filtering  # noqa: E501

        :return: The to of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.  # noqa: E501
        :rtype: int
        """
        return self._to

    @to.setter
    def to(self, to):
        """Sets the to of this ResourceQueryCriteriaRequestWithinATimeframeAPIModel.

        The UNIX timestamp of the end date for filtering  # noqa: E501

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

        self._to = to

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

        return self.__dict__ == other.__dict__

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