lentiq.models.project_utilization module
# coding: utf-8 ####alex test """ """ import pprint import re # noqa: F401 import six class ProjectUtilization(object): """ """ """ 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 = { 'cores': 'float', 'datapool_name': 'str', 'end_timestamp_millis': 'datetime', 'memory_gi_b': 'float', 'owner_id': 'int', 'project_created_timestamp_millis': 'datetime', 'project_generation': 'int', 'project_name': 'str', 'start_timestamp_millis': 'datetime' } attribute_map = { 'cores': 'cores', 'datapool_name': 'datapoolName', 'end_timestamp_millis': 'endTimestampMillis', 'memory_gi_b': 'memoryGiB', 'owner_id': 'ownerId', 'project_created_timestamp_millis': 'projectCreatedTimestampMillis', 'project_generation': 'projectGeneration', 'project_name': 'projectName', 'start_timestamp_millis': 'startTimestampMillis' } discriminator = None def __init__(self, cores=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, owner_id=None, project_created_timestamp_millis=None, project_generation=None, project_name=None, start_timestamp_millis=None): # noqa: E501 """ProjectUtilization - a model defined in Swagger""" # noqa: E501 self._cores = None self._datapool_name = None self._end_timestamp_millis = None self._memory_gi_b = None self._owner_id = None self._project_created_timestamp_millis = None self._project_generation = None self._project_name = None self._start_timestamp_millis = None if cores is not None: self.cores = cores if datapool_name is not None: self.datapool_name = datapool_name if end_timestamp_millis is not None: self.end_timestamp_millis = end_timestamp_millis if memory_gi_b is not None: self.memory_gi_b = memory_gi_b if owner_id is not None: self.owner_id = owner_id if project_created_timestamp_millis is not None: self.project_created_timestamp_millis = project_created_timestamp_millis if project_generation is not None: self.project_generation = project_generation if project_name is not None: self.project_name = project_name if start_timestamp_millis is not None: self.start_timestamp_millis = start_timestamp_millis @property def cores(self): """Gets the cores of this ProjectUtilization. # noqa: E501 The total number of cores of the project. # noqa: E501 :return: The cores of this ProjectUtilization. # noqa: E501 :rtype: float """ return self._cores @cores.setter def cores(self, cores): """Sets the cores of this ProjectUtilization. The total number of cores of the project. # noqa: E501 :param cores: The cores of this ProjectUtilization. # noqa: E501 :type: float """ self._cores = cores @property def datapool_name(self): """Gets the datapool_name of this ProjectUtilization. # noqa: E501 The name of the datapool. # noqa: E501 :return: The datapool_name of this ProjectUtilization. # noqa: E501 :rtype: str """ return self._datapool_name @datapool_name.setter def datapool_name(self, datapool_name): """Sets the datapool_name of this ProjectUtilization. The name of the datapool. # noqa: E501 :param datapool_name: The datapool_name of this ProjectUtilization. # noqa: E501 :type: str """ self._datapool_name = datapool_name @property def end_timestamp_millis(self): """Gets the end_timestamp_millis of this ProjectUtilization. # noqa: E501 The end timestamp of the resource utilization. If null, the resource utilization is ongoing. # noqa: E501 :return: The end_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime """ return self._end_timestamp_millis @end_timestamp_millis.setter def end_timestamp_millis(self, end_timestamp_millis): """Sets the end_timestamp_millis of this ProjectUtilization. The end timestamp of the resource utilization. If null, the resource utilization is ongoing. # noqa: E501 :param end_timestamp_millis: The end_timestamp_millis of this ProjectUtilization. # noqa: E501 :type: datetime """ self._end_timestamp_millis = end_timestamp_millis @property def memory_gi_b(self): """Gets the memory_gi_b of this ProjectUtilization. # noqa: E501 The total memory of the project in GiB. # noqa: E501 :return: The memory_gi_b of this ProjectUtilization. # noqa: E501 :rtype: float """ return self._memory_gi_b @memory_gi_b.setter def memory_gi_b(self, memory_gi_b): """Sets the memory_gi_b of this ProjectUtilization. The total memory of the project in GiB. # noqa: E501 :param memory_gi_b: The memory_gi_b of this ProjectUtilization. # noqa: E501 :type: float """ self._memory_gi_b = memory_gi_b @property def owner_id(self): """Gets the owner_id of this ProjectUtilization. # noqa: E501 The ID of the resource owner. # noqa: E501 :return: The owner_id of this ProjectUtilization. # noqa: E501 :rtype: int """ return self._owner_id @owner_id.setter def owner_id(self, owner_id): """Sets the owner_id of this ProjectUtilization. The ID of the resource owner. # noqa: E501 :param owner_id: The owner_id of this ProjectUtilization. # noqa: E501 :type: int """ self._owner_id = owner_id @property def project_created_timestamp_millis(self): """Gets the project_created_timestamp_millis of this ProjectUtilization. # noqa: E501 The created timestamp of the project in milliseconds. # noqa: E501 :return: The project_created_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime """ return self._project_created_timestamp_millis @project_created_timestamp_millis.setter def project_created_timestamp_millis(self, project_created_timestamp_millis): """Sets the project_created_timestamp_millis of this ProjectUtilization. The created timestamp of the project in milliseconds. # noqa: E501 :param project_created_timestamp_millis: The project_created_timestamp_millis of this ProjectUtilization. # noqa: E501 :type: datetime """ self._project_created_timestamp_millis = project_created_timestamp_millis @property def project_generation(self): """Gets the project_generation of this ProjectUtilization. # noqa: E501 The generation of the datapool. # noqa: E501 :return: The project_generation of this ProjectUtilization. # noqa: E501 :rtype: int """ return self._project_generation @project_generation.setter def project_generation(self, project_generation): """Sets the project_generation of this ProjectUtilization. The generation of the datapool. # noqa: E501 :param project_generation: The project_generation of this ProjectUtilization. # noqa: E501 :type: int """ self._project_generation = project_generation @property def project_name(self): """Gets the project_name of this ProjectUtilization. # noqa: E501 The name of the project. # noqa: E501 :return: The project_name of this ProjectUtilization. # noqa: E501 :rtype: str """ return self._project_name @project_name.setter def project_name(self, project_name): """Sets the project_name of this ProjectUtilization. The name of the project. # noqa: E501 :param project_name: The project_name of this ProjectUtilization. # noqa: E501 :type: str """ self._project_name = project_name @property def start_timestamp_millis(self): """Gets the start_timestamp_millis of this ProjectUtilization. # noqa: E501 The start timestamp of the resource utilization. # noqa: E501 :return: The start_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime """ return self._start_timestamp_millis @start_timestamp_millis.setter def start_timestamp_millis(self, start_timestamp_millis): """Sets the start_timestamp_millis of this ProjectUtilization. The start timestamp of the resource utilization. # noqa: E501 :param start_timestamp_millis: The start_timestamp_millis of this ProjectUtilization. # noqa: E501 :type: datetime """ self._start_timestamp_millis = start_timestamp_millis 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(ProjectUtilization, 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, ProjectUtilization): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Classes
class ProjectUtilization
class ProjectUtilization(object): """ """ """ 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 = { 'cores': 'float', 'datapool_name': 'str', 'end_timestamp_millis': 'datetime', 'memory_gi_b': 'float', 'owner_id': 'int', 'project_created_timestamp_millis': 'datetime', 'project_generation': 'int', 'project_name': 'str', 'start_timestamp_millis': 'datetime' } attribute_map = { 'cores': 'cores', 'datapool_name': 'datapoolName', 'end_timestamp_millis': 'endTimestampMillis', 'memory_gi_b': 'memoryGiB', 'owner_id': 'ownerId', 'project_created_timestamp_millis': 'projectCreatedTimestampMillis', 'project_generation': 'projectGeneration', 'project_name': 'projectName', 'start_timestamp_millis': 'startTimestampMillis' } discriminator = None def __init__(self, cores=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, owner_id=None, project_created_timestamp_millis=None, project_generation=None, project_name=None, start_timestamp_millis=None): # noqa: E501 """ProjectUtilization - a model defined in Swagger""" # noqa: E501 self._cores = None self._datapool_name = None self._end_timestamp_millis = None self._memory_gi_b = None self._owner_id = None self._project_created_timestamp_millis = None self._project_generation = None self._project_name = None self._start_timestamp_millis = None if cores is not None: self.cores = cores if datapool_name is not None: self.datapool_name = datapool_name if end_timestamp_millis is not None: self.end_timestamp_millis = end_timestamp_millis if memory_gi_b is not None: self.memory_gi_b = memory_gi_b if owner_id is not None: self.owner_id = owner_id if project_created_timestamp_millis is not None: self.project_created_timestamp_millis = project_created_timestamp_millis if project_generation is not None: self.project_generation = project_generation if project_name is not None: self.project_name = project_name if start_timestamp_millis is not None: self.start_timestamp_millis = start_timestamp_millis @property def cores(self): """Gets the cores of this ProjectUtilization. # noqa: E501 The total number of cores of the project. # noqa: E501 :return: The cores of this ProjectUtilization. # noqa: E501 :rtype: float """ return self._cores @cores.setter def cores(self, cores): """Sets the cores of this ProjectUtilization. The total number of cores of the project. # noqa: E501 :param cores: The cores of this ProjectUtilization. # noqa: E501 :type: float """ self._cores = cores @property def datapool_name(self): """Gets the datapool_name of this ProjectUtilization. # noqa: E501 The name of the datapool. # noqa: E501 :return: The datapool_name of this ProjectUtilization. # noqa: E501 :rtype: str """ return self._datapool_name @datapool_name.setter def datapool_name(self, datapool_name): """Sets the datapool_name of this ProjectUtilization. The name of the datapool. # noqa: E501 :param datapool_name: The datapool_name of this ProjectUtilization. # noqa: E501 :type: str """ self._datapool_name = datapool_name @property def end_timestamp_millis(self): """Gets the end_timestamp_millis of this ProjectUtilization. # noqa: E501 The end timestamp of the resource utilization. If null, the resource utilization is ongoing. # noqa: E501 :return: The end_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime """ return self._end_timestamp_millis @end_timestamp_millis.setter def end_timestamp_millis(self, end_timestamp_millis): """Sets the end_timestamp_millis of this ProjectUtilization. The end timestamp of the resource utilization. If null, the resource utilization is ongoing. # noqa: E501 :param end_timestamp_millis: The end_timestamp_millis of this ProjectUtilization. # noqa: E501 :type: datetime """ self._end_timestamp_millis = end_timestamp_millis @property def memory_gi_b(self): """Gets the memory_gi_b of this ProjectUtilization. # noqa: E501 The total memory of the project in GiB. # noqa: E501 :return: The memory_gi_b of this ProjectUtilization. # noqa: E501 :rtype: float """ return self._memory_gi_b @memory_gi_b.setter def memory_gi_b(self, memory_gi_b): """Sets the memory_gi_b of this ProjectUtilization. The total memory of the project in GiB. # noqa: E501 :param memory_gi_b: The memory_gi_b of this ProjectUtilization. # noqa: E501 :type: float """ self._memory_gi_b = memory_gi_b @property def owner_id(self): """Gets the owner_id of this ProjectUtilization. # noqa: E501 The ID of the resource owner. # noqa: E501 :return: The owner_id of this ProjectUtilization. # noqa: E501 :rtype: int """ return self._owner_id @owner_id.setter def owner_id(self, owner_id): """Sets the owner_id of this ProjectUtilization. The ID of the resource owner. # noqa: E501 :param owner_id: The owner_id of this ProjectUtilization. # noqa: E501 :type: int """ self._owner_id = owner_id @property def project_created_timestamp_millis(self): """Gets the project_created_timestamp_millis of this ProjectUtilization. # noqa: E501 The created timestamp of the project in milliseconds. # noqa: E501 :return: The project_created_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime """ return self._project_created_timestamp_millis @project_created_timestamp_millis.setter def project_created_timestamp_millis(self, project_created_timestamp_millis): """Sets the project_created_timestamp_millis of this ProjectUtilization. The created timestamp of the project in milliseconds. # noqa: E501 :param project_created_timestamp_millis: The project_created_timestamp_millis of this ProjectUtilization. # noqa: E501 :type: datetime """ self._project_created_timestamp_millis = project_created_timestamp_millis @property def project_generation(self): """Gets the project_generation of this ProjectUtilization. # noqa: E501 The generation of the datapool. # noqa: E501 :return: The project_generation of this ProjectUtilization. # noqa: E501 :rtype: int """ return self._project_generation @project_generation.setter def project_generation(self, project_generation): """Sets the project_generation of this ProjectUtilization. The generation of the datapool. # noqa: E501 :param project_generation: The project_generation of this ProjectUtilization. # noqa: E501 :type: int """ self._project_generation = project_generation @property def project_name(self): """Gets the project_name of this ProjectUtilization. # noqa: E501 The name of the project. # noqa: E501 :return: The project_name of this ProjectUtilization. # noqa: E501 :rtype: str """ return self._project_name @project_name.setter def project_name(self, project_name): """Sets the project_name of this ProjectUtilization. The name of the project. # noqa: E501 :param project_name: The project_name of this ProjectUtilization. # noqa: E501 :type: str """ self._project_name = project_name @property def start_timestamp_millis(self): """Gets the start_timestamp_millis of this ProjectUtilization. # noqa: E501 The start timestamp of the resource utilization. # noqa: E501 :return: The start_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime """ return self._start_timestamp_millis @start_timestamp_millis.setter def start_timestamp_millis(self, start_timestamp_millis): """Sets the start_timestamp_millis of this ProjectUtilization. The start timestamp of the resource utilization. # noqa: E501 :param start_timestamp_millis: The start_timestamp_millis of this ProjectUtilization. # noqa: E501 :type: datetime """ self._start_timestamp_millis = start_timestamp_millis 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(ProjectUtilization, 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, ProjectUtilization): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other
Ancestors (in MRO)
- ProjectUtilization
- builtins.object
Class variables
var attribute_map
var discriminator
var swagger_types
Static methods
def __init__(
self, cores=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, owner_id=None, project_created_timestamp_millis=None, project_generation=None, project_name=None, start_timestamp_millis=None)
ProjectUtilization - a model defined in Swagger
def __init__(self, cores=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, owner_id=None, project_created_timestamp_millis=None, project_generation=None, project_name=None, start_timestamp_millis=None): # noqa: E501 """ProjectUtilization - a model defined in Swagger""" # noqa: E501 self._cores = None self._datapool_name = None self._end_timestamp_millis = None self._memory_gi_b = None self._owner_id = None self._project_created_timestamp_millis = None self._project_generation = None self._project_name = None self._start_timestamp_millis = None if cores is not None: self.cores = cores if datapool_name is not None: self.datapool_name = datapool_name if end_timestamp_millis is not None: self.end_timestamp_millis = end_timestamp_millis if memory_gi_b is not None: self.memory_gi_b = memory_gi_b if owner_id is not None: self.owner_id = owner_id if project_created_timestamp_millis is not None: self.project_created_timestamp_millis = project_created_timestamp_millis if project_generation is not None: self.project_generation = project_generation if project_name is not None: self.project_name = project_name if start_timestamp_millis is not None: self.start_timestamp_millis = start_timestamp_millis
def to_dict(
self)
Returns the model properties as a dict
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(ProjectUtilization, dict): for key, value in self.items(): result[key] = value return result
def to_str(
self)
Returns the string representation of the model
def to_str(self): """Returns the string representation of the model""" return pprint.pformat(self.to_dict())
Instance variables
var cores
Gets the cores of this ProjectUtilization. # noqa: E501
The total number of cores of the project. # noqa: E501
:return: The cores of this ProjectUtilization. # noqa: E501 :rtype: float
var datapool_name
Gets the datapool_name of this ProjectUtilization. # noqa: E501
The name of the datapool. # noqa: E501
:return: The datapool_name of this ProjectUtilization. # noqa: E501 :rtype: str
var end_timestamp_millis
Gets the end_timestamp_millis of this ProjectUtilization. # noqa: E501
The end timestamp of the resource utilization. If null, the resource utilization is ongoing. # noqa: E501
:return: The end_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime
var memory_gi_b
Gets the memory_gi_b of this ProjectUtilization. # noqa: E501
The total memory of the project in GiB. # noqa: E501
:return: The memory_gi_b of this ProjectUtilization. # noqa: E501 :rtype: float
var owner_id
Gets the owner_id of this ProjectUtilization. # noqa: E501
The ID of the resource owner. # noqa: E501
:return: The owner_id of this ProjectUtilization. # noqa: E501 :rtype: int
var project_created_timestamp_millis
Gets the project_created_timestamp_millis of this ProjectUtilization. # noqa: E501
The created timestamp of the project in milliseconds. # noqa: E501
:return: The project_created_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime
var project_generation
Gets the project_generation of this ProjectUtilization. # noqa: E501
The generation of the datapool. # noqa: E501
:return: The project_generation of this ProjectUtilization. # noqa: E501 :rtype: int
var project_name
Gets the project_name of this ProjectUtilization. # noqa: E501
The name of the project. # noqa: E501
:return: The project_name of this ProjectUtilization. # noqa: E501 :rtype: str
var start_timestamp_millis
Gets the start_timestamp_millis of this ProjectUtilization. # noqa: E501
The start timestamp of the resource utilization. # noqa: E501
:return: The start_timestamp_millis of this ProjectUtilization. # noqa: E501 :rtype: datetime