Top

lentiq.models.datapool_utilization module

# coding: utf-8
####alex test
"""
    
    
        
    """

import pprint
import re  # noqa: F401

import six


class DatapoolUtilization(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': 'int',
        'datapool_created_timestamp_millis': 'datetime',
        'datapool_generation': 'int',
        'datapool_name': 'str',
        'end_timestamp_millis': 'datetime',
        'memory_gi_b': 'float',
        'nodes': 'int',
        'owner_id': 'int',
        'start_timestamp_millis': 'datetime'
    }

    attribute_map = {
        'cores': 'cores',
        'datapool_created_timestamp_millis': 'datapoolCreatedTimestampMillis',
        'datapool_generation': 'datapoolGeneration',
        'datapool_name': 'datapoolName',
        'end_timestamp_millis': 'endTimestampMillis',
        'memory_gi_b': 'memoryGiB',
        'nodes': 'nodes',
        'owner_id': 'ownerId',
        'start_timestamp_millis': 'startTimestampMillis'
    }

    discriminator = None

    def __init__(self, cores=None, datapool_created_timestamp_millis=None, datapool_generation=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, nodes=None, owner_id=None, start_timestamp_millis=None):  # noqa: E501
        """DatapoolUtilization - a model defined in Swagger"""  # noqa: E501
        self._cores = None
        self._datapool_created_timestamp_millis = None
        self._datapool_generation = None
        self._datapool_name = None
        self._end_timestamp_millis = None
        self._memory_gi_b = None
        self._nodes = None
        self._owner_id = None
        self._start_timestamp_millis = None

        if cores is not None:
            self.cores = cores
        if datapool_created_timestamp_millis is not None:
            self.datapool_created_timestamp_millis = datapool_created_timestamp_millis
        if datapool_generation is not None:
            self.datapool_generation = datapool_generation
        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 nodes is not None:
            self.nodes = nodes
        if owner_id is not None:
            self.owner_id = owner_id
        if start_timestamp_millis is not None:
            self.start_timestamp_millis = start_timestamp_millis

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

        The total number of cores of the datapool.  # noqa: E501

        :return: The cores of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._cores

    @cores.setter
    def cores(self, cores):
        """Sets the cores of this DatapoolUtilization.

        The total number of cores of the datapool.  # noqa: E501

        :param cores: The cores of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._cores = cores

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

        The created timestamp of the datapool in milliseconds.  # noqa: E501

        :return: The datapool_created_timestamp_millis of this DatapoolUtilization.  # noqa: E501
        :rtype: datetime
        """
        return self._datapool_created_timestamp_millis

    @datapool_created_timestamp_millis.setter
    def datapool_created_timestamp_millis(self, datapool_created_timestamp_millis):
        """Sets the datapool_created_timestamp_millis of this DatapoolUtilization.

        The created timestamp of the datapool in milliseconds.  # noqa: E501

        :param datapool_created_timestamp_millis: The datapool_created_timestamp_millis of this DatapoolUtilization.  # noqa: E501
        :type: datetime
        """

        self._datapool_created_timestamp_millis = datapool_created_timestamp_millis

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

        The generation of the datapool.  # noqa: E501

        :return: The datapool_generation of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._datapool_generation

    @datapool_generation.setter
    def datapool_generation(self, datapool_generation):
        """Sets the datapool_generation of this DatapoolUtilization.

        The generation of the datapool.  # noqa: E501

        :param datapool_generation: The datapool_generation of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._datapool_generation = datapool_generation

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

        The name of the datapool.  # noqa: E501

        :return: The datapool_name of this DatapoolUtilization.  # noqa: E501
        :rtype: str
        """
        return self._datapool_name

    @datapool_name.setter
    def datapool_name(self, datapool_name):
        """Sets the datapool_name of this DatapoolUtilization.

        The name of the datapool.  # noqa: E501

        :param datapool_name: The datapool_name of this DatapoolUtilization.  # noqa: E501
        :type: str
        """

        self._datapool_name = datapool_name

    @property
    def end_timestamp_millis(self):
        """Gets the end_timestamp_millis of this DatapoolUtilization.  # 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 DatapoolUtilization.  # 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 DatapoolUtilization.

        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 DatapoolUtilization.  # noqa: E501
        :type: datetime
        """

        self._end_timestamp_millis = end_timestamp_millis

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

        The total memory of the datapool in GiB.  # noqa: E501

        :return: The memory_gi_b of this DatapoolUtilization.  # 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 DatapoolUtilization.

        The total memory of the datapool in GiB.  # noqa: E501

        :param memory_gi_b: The memory_gi_b of this DatapoolUtilization.  # noqa: E501
        :type: float
        """

        self._memory_gi_b = memory_gi_b

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

        The number of nodes of the datapool.  # noqa: E501

        :return: The nodes of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._nodes

    @nodes.setter
    def nodes(self, nodes):
        """Sets the nodes of this DatapoolUtilization.

        The number of nodes of the datapool.  # noqa: E501

        :param nodes: The nodes of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._nodes = nodes

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

        The ID of the resource owner.  # noqa: E501

        :return: The owner_id of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this DatapoolUtilization.

        The ID of the resource owner.  # noqa: E501

        :param owner_id: The owner_id of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._owner_id = owner_id

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

        The start timestamp of the resource utilization.  # noqa: E501

        :return: The start_timestamp_millis of this DatapoolUtilization.  # 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 DatapoolUtilization.

        The start timestamp of the resource utilization.  # noqa: E501

        :param start_timestamp_millis: The start_timestamp_millis of this DatapoolUtilization.  # 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(DatapoolUtilization, 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, DatapoolUtilization):
            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 DatapoolUtilization

class DatapoolUtilization(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': 'int',
        'datapool_created_timestamp_millis': 'datetime',
        'datapool_generation': 'int',
        'datapool_name': 'str',
        'end_timestamp_millis': 'datetime',
        'memory_gi_b': 'float',
        'nodes': 'int',
        'owner_id': 'int',
        'start_timestamp_millis': 'datetime'
    }

    attribute_map = {
        'cores': 'cores',
        'datapool_created_timestamp_millis': 'datapoolCreatedTimestampMillis',
        'datapool_generation': 'datapoolGeneration',
        'datapool_name': 'datapoolName',
        'end_timestamp_millis': 'endTimestampMillis',
        'memory_gi_b': 'memoryGiB',
        'nodes': 'nodes',
        'owner_id': 'ownerId',
        'start_timestamp_millis': 'startTimestampMillis'
    }

    discriminator = None

    def __init__(self, cores=None, datapool_created_timestamp_millis=None, datapool_generation=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, nodes=None, owner_id=None, start_timestamp_millis=None):  # noqa: E501
        """DatapoolUtilization - a model defined in Swagger"""  # noqa: E501
        self._cores = None
        self._datapool_created_timestamp_millis = None
        self._datapool_generation = None
        self._datapool_name = None
        self._end_timestamp_millis = None
        self._memory_gi_b = None
        self._nodes = None
        self._owner_id = None
        self._start_timestamp_millis = None

        if cores is not None:
            self.cores = cores
        if datapool_created_timestamp_millis is not None:
            self.datapool_created_timestamp_millis = datapool_created_timestamp_millis
        if datapool_generation is not None:
            self.datapool_generation = datapool_generation
        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 nodes is not None:
            self.nodes = nodes
        if owner_id is not None:
            self.owner_id = owner_id
        if start_timestamp_millis is not None:
            self.start_timestamp_millis = start_timestamp_millis

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

        The total number of cores of the datapool.  # noqa: E501

        :return: The cores of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._cores

    @cores.setter
    def cores(self, cores):
        """Sets the cores of this DatapoolUtilization.

        The total number of cores of the datapool.  # noqa: E501

        :param cores: The cores of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._cores = cores

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

        The created timestamp of the datapool in milliseconds.  # noqa: E501

        :return: The datapool_created_timestamp_millis of this DatapoolUtilization.  # noqa: E501
        :rtype: datetime
        """
        return self._datapool_created_timestamp_millis

    @datapool_created_timestamp_millis.setter
    def datapool_created_timestamp_millis(self, datapool_created_timestamp_millis):
        """Sets the datapool_created_timestamp_millis of this DatapoolUtilization.

        The created timestamp of the datapool in milliseconds.  # noqa: E501

        :param datapool_created_timestamp_millis: The datapool_created_timestamp_millis of this DatapoolUtilization.  # noqa: E501
        :type: datetime
        """

        self._datapool_created_timestamp_millis = datapool_created_timestamp_millis

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

        The generation of the datapool.  # noqa: E501

        :return: The datapool_generation of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._datapool_generation

    @datapool_generation.setter
    def datapool_generation(self, datapool_generation):
        """Sets the datapool_generation of this DatapoolUtilization.

        The generation of the datapool.  # noqa: E501

        :param datapool_generation: The datapool_generation of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._datapool_generation = datapool_generation

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

        The name of the datapool.  # noqa: E501

        :return: The datapool_name of this DatapoolUtilization.  # noqa: E501
        :rtype: str
        """
        return self._datapool_name

    @datapool_name.setter
    def datapool_name(self, datapool_name):
        """Sets the datapool_name of this DatapoolUtilization.

        The name of the datapool.  # noqa: E501

        :param datapool_name: The datapool_name of this DatapoolUtilization.  # noqa: E501
        :type: str
        """

        self._datapool_name = datapool_name

    @property
    def end_timestamp_millis(self):
        """Gets the end_timestamp_millis of this DatapoolUtilization.  # 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 DatapoolUtilization.  # 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 DatapoolUtilization.

        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 DatapoolUtilization.  # noqa: E501
        :type: datetime
        """

        self._end_timestamp_millis = end_timestamp_millis

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

        The total memory of the datapool in GiB.  # noqa: E501

        :return: The memory_gi_b of this DatapoolUtilization.  # 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 DatapoolUtilization.

        The total memory of the datapool in GiB.  # noqa: E501

        :param memory_gi_b: The memory_gi_b of this DatapoolUtilization.  # noqa: E501
        :type: float
        """

        self._memory_gi_b = memory_gi_b

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

        The number of nodes of the datapool.  # noqa: E501

        :return: The nodes of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._nodes

    @nodes.setter
    def nodes(self, nodes):
        """Sets the nodes of this DatapoolUtilization.

        The number of nodes of the datapool.  # noqa: E501

        :param nodes: The nodes of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._nodes = nodes

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

        The ID of the resource owner.  # noqa: E501

        :return: The owner_id of this DatapoolUtilization.  # noqa: E501
        :rtype: int
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this DatapoolUtilization.

        The ID of the resource owner.  # noqa: E501

        :param owner_id: The owner_id of this DatapoolUtilization.  # noqa: E501
        :type: int
        """

        self._owner_id = owner_id

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

        The start timestamp of the resource utilization.  # noqa: E501

        :return: The start_timestamp_millis of this DatapoolUtilization.  # 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 DatapoolUtilization.

        The start timestamp of the resource utilization.  # noqa: E501

        :param start_timestamp_millis: The start_timestamp_millis of this DatapoolUtilization.  # 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(DatapoolUtilization, 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, DatapoolUtilization):
            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)

Class variables

var attribute_map

var discriminator

var swagger_types

Static methods

def __init__(

self, cores=None, datapool_created_timestamp_millis=None, datapool_generation=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, nodes=None, owner_id=None, start_timestamp_millis=None)

DatapoolUtilization - a model defined in Swagger

def __init__(self, cores=None, datapool_created_timestamp_millis=None, datapool_generation=None, datapool_name=None, end_timestamp_millis=None, memory_gi_b=None, nodes=None, owner_id=None, start_timestamp_millis=None):  # noqa: E501
    """DatapoolUtilization - a model defined in Swagger"""  # noqa: E501
    self._cores = None
    self._datapool_created_timestamp_millis = None
    self._datapool_generation = None
    self._datapool_name = None
    self._end_timestamp_millis = None
    self._memory_gi_b = None
    self._nodes = None
    self._owner_id = None
    self._start_timestamp_millis = None
    if cores is not None:
        self.cores = cores
    if datapool_created_timestamp_millis is not None:
        self.datapool_created_timestamp_millis = datapool_created_timestamp_millis
    if datapool_generation is not None:
        self.datapool_generation = datapool_generation
    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 nodes is not None:
        self.nodes = nodes
    if owner_id is not None:
        self.owner_id = owner_id
    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(DatapoolUtilization, 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 DatapoolUtilization. # noqa: E501

The total number of cores of the datapool. # noqa: E501

:return: The cores of this DatapoolUtilization. # noqa: E501 :rtype: int

var datapool_created_timestamp_millis

Gets the datapool_created_timestamp_millis of this DatapoolUtilization. # noqa: E501

The created timestamp of the datapool in milliseconds. # noqa: E501

:return: The datapool_created_timestamp_millis of this DatapoolUtilization. # noqa: E501 :rtype: datetime

var datapool_generation

Gets the datapool_generation of this DatapoolUtilization. # noqa: E501

The generation of the datapool. # noqa: E501

:return: The datapool_generation of this DatapoolUtilization. # noqa: E501 :rtype: int

var datapool_name

Gets the datapool_name of this DatapoolUtilization. # noqa: E501

The name of the datapool. # noqa: E501

:return: The datapool_name of this DatapoolUtilization. # noqa: E501 :rtype: str

var end_timestamp_millis

Gets the end_timestamp_millis of this DatapoolUtilization. # 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 DatapoolUtilization. # noqa: E501 :rtype: datetime

var memory_gi_b

Gets the memory_gi_b of this DatapoolUtilization. # noqa: E501

The total memory of the datapool in GiB. # noqa: E501

:return: The memory_gi_b of this DatapoolUtilization. # noqa: E501 :rtype: float

var nodes

Gets the nodes of this DatapoolUtilization. # noqa: E501

The number of nodes of the datapool. # noqa: E501

:return: The nodes of this DatapoolUtilization. # noqa: E501 :rtype: int

var owner_id

Gets the owner_id of this DatapoolUtilization. # noqa: E501

The ID of the resource owner. # noqa: E501

:return: The owner_id of this DatapoolUtilization. # noqa: E501 :rtype: int

var start_timestamp_millis

Gets the start_timestamp_millis of this DatapoolUtilization. # noqa: E501

The start timestamp of the resource utilization. # noqa: E501

:return: The start_timestamp_millis of this DatapoolUtilization. # noqa: E501 :rtype: datetime