Source code for iottsbulk.models.retrieve_timeseries_request

# coding: utf-8

"""
    IoT Time Series Bulk API

    This API allows to bulk import IoT time series data based on files uploaded via IoT File Service. Data import for simulation assets (entities) is supported with up to nano second precision and for performance assets (entities) with up to milli second precision. A bulk import is modeled as asynchronous job whose status can be retrieved after creation. Successfully imported time series data can be retrieved using the read operation.   # noqa: E501
"""


import pprint
import re
import six
from mindsphere_core.exceptions import MindsphereClientError


[docs]class RetrieveTimeseriesRequest(object): """ Attributes: attribute_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. """ attribute_types = { 'select': 'str', 'property_set_name': 'str', 'limit': 'int', '_from': 'str', 'to': 'str', 'entity': 'str' } attribute_map = { 'select': 'select', 'property_set_name': 'propertySetName', 'limit': 'limit', '_from': 'from', 'to': 'to', 'entity': 'entity' } def __init__(self, select=None, property_set_name=None, limit=None, _from=None, to=None, entity=None): self._select = select self._property_set_name = property_set_name self._limit = limit self.__from = _from self._to = to self._entity = entity self.discriminator = None @property def select(self): """Gets the select of this RetrieveTimeseriesRequest. :return: The select of this RetrieveTimeseriesRequest. :rtype: str """ return self._select @select.setter def select(self, select): """Sets the select of this RetrieveTimeseriesRequest. :param select: The select of this RetrieveTimeseriesRequest. :type: str """ self._select = select @property def property_set_name(self): """Gets the property_set_name of this RetrieveTimeseriesRequest. :return: The property_set_name of this RetrieveTimeseriesRequest. :rtype: str """ return self._property_set_name @property_set_name.setter def property_set_name(self, property_set_name): """Sets the property_set_name of this RetrieveTimeseriesRequest. :param property_set_name: The property_set_name of this RetrieveTimeseriesRequest. :type: str """ self._property_set_name = property_set_name @property def limit(self): """Gets the limit of this RetrieveTimeseriesRequest. :return: The limit of this RetrieveTimeseriesRequest. :rtype: int """ return self._limit @limit.setter def limit(self, limit): """Sets the limit of this RetrieveTimeseriesRequest. :param limit: The limit of this RetrieveTimeseriesRequest. :type: int """ self._limit = limit @property def _from(self): """Gets the _from of this RetrieveTimeseriesRequest. :return: The _from of this RetrieveTimeseriesRequest. :rtype: str """ return self.__from @_from.setter def _from(self, _from): """Sets the _from of this RetrieveTimeseriesRequest. :param _from: The _from of this RetrieveTimeseriesRequest. :type: str """ self.__from = _from @property def to(self): """Gets the to of this RetrieveTimeseriesRequest. :return: The to of this RetrieveTimeseriesRequest. :rtype: str """ return self._to @to.setter def to(self, to): """Sets the to of this RetrieveTimeseriesRequest. :param to: The to of this RetrieveTimeseriesRequest. :type: str """ self._to = to @property def entity(self): """Gets the entity of this RetrieveTimeseriesRequest. :return: The entity of this RetrieveTimeseriesRequest. :rtype: str """ return self._entity @entity.setter def entity(self, entity): """Sets the entity of this RetrieveTimeseriesRequest. :param entity: The entity of this RetrieveTimeseriesRequest. :type: str """ self._entity = entity
[docs] def to_dict(self): """Returns the model properties as a dict""" result = {} for attr, _ in six.iteritems(self.attribute_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(RetrieveTimeseriesRequest, dict): for key, value in self.items(): result[key] = value return result
[docs] 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, RetrieveTimeseriesRequest): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other