# coding: utf-8 """ DCV Session Manager DCV Session Manager API # noqa: E501 OpenAPI spec version: 2021.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Host(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 = { 'os': 'Os', 'memory': 'Memory', 'swap': 'Swap', 'aws': 'Aws', 'cpu_info': 'CpuInfo', 'cpu_load_average': 'CpuLoadAverage', 'gpus': 'list[Gpu]', 'logged_in_users': 'list[LoggedInUser]' } attribute_map = { 'os': 'Os', 'memory': 'Memory', 'swap': 'Swap', 'aws': 'Aws', 'cpu_info': 'CpuInfo', 'cpu_load_average': 'CpuLoadAverage', 'gpus': 'Gpus', 'logged_in_users': 'LoggedInUsers' } def __init__(self, os=None, memory=None, swap=None, aws=None, cpu_info=None, cpu_load_average=None, gpus=None, logged_in_users=None): # noqa: E501 """Host - a model defined in Swagger""" # noqa: E501 self._os = None self._memory = None self._swap = None self._aws = None self._cpu_info = None self._cpu_load_average = None self._gpus = None self._logged_in_users = None self.discriminator = None if os is not None: self.os = os if memory is not None: self.memory = memory if swap is not None: self.swap = swap if aws is not None: self.aws = aws if cpu_info is not None: self.cpu_info = cpu_info if cpu_load_average is not None: self.cpu_load_average = cpu_load_average if gpus is not None: self.gpus = gpus if logged_in_users is not None: self.logged_in_users = logged_in_users @property def os(self): """Gets the os of this Host. # noqa: E501 :return: The os of this Host. # noqa: E501 :rtype: Os """ return self._os @os.setter def os(self, os): """Sets the os of this Host. :param os: The os of this Host. # noqa: E501 :type: Os """ self._os = os @property def memory(self): """Gets the memory of this Host. # noqa: E501 :return: The memory of this Host. # noqa: E501 :rtype: Memory """ return self._memory @memory.setter def memory(self, memory): """Sets the memory of this Host. :param memory: The memory of this Host. # noqa: E501 :type: Memory """ self._memory = memory @property def swap(self): """Gets the swap of this Host. # noqa: E501 :return: The swap of this Host. # noqa: E501 :rtype: Swap """ return self._swap @swap.setter def swap(self, swap): """Sets the swap of this Host. :param swap: The swap of this Host. # noqa: E501 :type: Swap """ self._swap = swap @property def aws(self): """Gets the aws of this Host. # noqa: E501 :return: The aws of this Host. # noqa: E501 :rtype: Aws """ return self._aws @aws.setter def aws(self, aws): """Sets the aws of this Host. :param aws: The aws of this Host. # noqa: E501 :type: Aws """ self._aws = aws @property def cpu_info(self): """Gets the cpu_info of this Host. # noqa: E501 :return: The cpu_info of this Host. # noqa: E501 :rtype: CpuInfo """ return self._cpu_info @cpu_info.setter def cpu_info(self, cpu_info): """Sets the cpu_info of this Host. :param cpu_info: The cpu_info of this Host. # noqa: E501 :type: CpuInfo """ self._cpu_info = cpu_info @property def cpu_load_average(self): """Gets the cpu_load_average of this Host. # noqa: E501 :return: The cpu_load_average of this Host. # noqa: E501 :rtype: CpuLoadAverage """ return self._cpu_load_average @cpu_load_average.setter def cpu_load_average(self, cpu_load_average): """Sets the cpu_load_average of this Host. :param cpu_load_average: The cpu_load_average of this Host. # noqa: E501 :type: CpuLoadAverage """ self._cpu_load_average = cpu_load_average @property def gpus(self): """Gets the gpus of this Host. # noqa: E501 The array containing GPU information # noqa: E501 :return: The gpus of this Host. # noqa: E501 :rtype: list[Gpu] """ return self._gpus @gpus.setter def gpus(self, gpus): """Sets the gpus of this Host. The array containing GPU information # noqa: E501 :param gpus: The gpus of this Host. # noqa: E501 :type: list[Gpu] """ self._gpus = gpus @property def logged_in_users(self): """Gets the logged_in_users of this Host. # noqa: E501 The array containing users information # noqa: E501 :return: The logged_in_users of this Host. # noqa: E501 :rtype: list[LoggedInUser] """ return self._logged_in_users @logged_in_users.setter def logged_in_users(self, logged_in_users): """Sets the logged_in_users of this Host. The array containing users information # noqa: E501 :param logged_in_users: The logged_in_users of this Host. # noqa: E501 :type: list[LoggedInUser] """ self._logged_in_users = logged_in_users 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(Host, 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, Host): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other