# 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 Session(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 = { 'id': 'str', 'name': 'str', 'owner': 'str', 'server': 'Server', 'type': 'str', 'max_concurrent_clients': 'int', 'state': 'str', 'state_reason': 'str', 'creation_time': 'datetime', 'last_disconnection_time': 'datetime', 'num_of_connections': 'int', 'storage_root': 'str' } attribute_map = { 'id': 'Id', 'name': 'Name', 'owner': 'Owner', 'server': 'Server', 'type': 'Type', 'max_concurrent_clients': 'MaxConcurrentClients', 'state': 'State', 'state_reason': 'StateReason', 'creation_time': 'CreationTime', 'last_disconnection_time': 'LastDisconnectionTime', 'num_of_connections': 'NumOfConnections', 'storage_root': 'StorageRoot' } def __init__(self, id=None, name=None, owner=None, server=None, type=None, max_concurrent_clients=None, state=None, state_reason=None, creation_time=None, last_disconnection_time=None, num_of_connections=None, storage_root=None): # noqa: E501 """Session - a model defined in Swagger""" # noqa: E501 self._id = None self._name = None self._owner = None self._server = None self._type = None self._max_concurrent_clients = None self._state = None self._state_reason = None self._creation_time = None self._last_disconnection_time = None self._num_of_connections = None self._storage_root = None self.discriminator = None if id is not None: self.id = id if name is not None: self.name = name if owner is not None: self.owner = owner if server is not None: self.server = server if type is not None: self.type = type if max_concurrent_clients is not None: self.max_concurrent_clients = max_concurrent_clients if state is not None: self.state = state if state_reason is not None: self.state_reason = state_reason if creation_time is not None: self.creation_time = creation_time if last_disconnection_time is not None: self.last_disconnection_time = last_disconnection_time if num_of_connections is not None: self.num_of_connections = num_of_connections if storage_root is not None: self.storage_root = storage_root @property def id(self): """Gets the id of this Session. # noqa: E501 The id of the session # noqa: E501 :return: The id of this Session. # noqa: E501 :rtype: str """ return self._id @id.setter def id(self, id): """Sets the id of this Session. The id of the session # noqa: E501 :param id: The id of this Session. # noqa: E501 :type: str """ self._id = id @property def name(self): """Gets the name of this Session. # noqa: E501 The descriptive name of the session # noqa: E501 :return: The name of this Session. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): """Sets the name of this Session. The descriptive name of the session # noqa: E501 :param name: The name of this Session. # noqa: E501 :type: str """ self._name = name @property def owner(self): """Gets the owner of this Session. # noqa: E501 The owner of the session # noqa: E501 :return: The owner of this Session. # noqa: E501 :rtype: str """ return self._owner @owner.setter def owner(self, owner): """Sets the owner of this Session. The owner of the session # noqa: E501 :param owner: The owner of this Session. # noqa: E501 :type: str """ self._owner = owner @property def server(self): """Gets the server of this Session. # noqa: E501 :return: The server of this Session. # noqa: E501 :rtype: Server """ return self._server @server.setter def server(self, server): """Sets the server of this Session. :param server: The server of this Session. # noqa: E501 :type: Server """ self._server = server @property def type(self): """Gets the type of this Session. # noqa: E501 The session type (Virtual or Console) # noqa: E501 :return: The type of this Session. # noqa: E501 :rtype: str """ return self._type @type.setter def type(self, type): """Sets the type of this Session. The session type (Virtual or Console) # noqa: E501 :param type: The type of this Session. # noqa: E501 :type: str """ self._type = type @property def max_concurrent_clients(self): """Gets the max_concurrent_clients of this Session. # noqa: E501 The number of max concurrent clients that can log to a session # noqa: E501 :return: The max_concurrent_clients of this Session. # noqa: E501 :rtype: int """ return self._max_concurrent_clients @max_concurrent_clients.setter def max_concurrent_clients(self, max_concurrent_clients): """Sets the max_concurrent_clients of this Session. The number of max concurrent clients that can log to a session # noqa: E501 :param max_concurrent_clients: The max_concurrent_clients of this Session. # noqa: E501 :type: int """ self._max_concurrent_clients = max_concurrent_clients @property def state(self): """Gets the state of this Session. # noqa: E501 The session state # noqa: E501 :return: The state of this Session. # noqa: E501 :rtype: str """ return self._state @state.setter def state(self, state): """Sets the state of this Session. The session state # noqa: E501 :param state: The state of this Session. # noqa: E501 :type: str """ self._state = state @property def state_reason(self): """Gets the state_reason of this Session. # noqa: E501 The reason for the current state of the session # noqa: E501 :return: The state_reason of this Session. # noqa: E501 :rtype: str """ return self._state_reason @state_reason.setter def state_reason(self, state_reason): """Sets the state_reason of this Session. The reason for the current state of the session # noqa: E501 :param state_reason: The state_reason of this Session. # noqa: E501 :type: str """ self._state_reason = state_reason @property def creation_time(self): """Gets the creation_time of this Session. # noqa: E501 The session creation time # noqa: E501 :return: The creation_time of this Session. # noqa: E501 :rtype: datetime """ return self._creation_time @creation_time.setter def creation_time(self, creation_time): """Sets the creation_time of this Session. The session creation time # noqa: E501 :param creation_time: The creation_time of this Session. # noqa: E501 :type: datetime """ self._creation_time = creation_time @property def last_disconnection_time(self): """Gets the last_disconnection_time of this Session. # noqa: E501 The last session disconnection time # noqa: E501 :return: The last_disconnection_time of this Session. # noqa: E501 :rtype: datetime """ return self._last_disconnection_time @last_disconnection_time.setter def last_disconnection_time(self, last_disconnection_time): """Sets the last_disconnection_time of this Session. The last session disconnection time # noqa: E501 :param last_disconnection_time: The last_disconnection_time of this Session. # noqa: E501 :type: datetime """ self._last_disconnection_time = last_disconnection_time @property def num_of_connections(self): """Gets the num_of_connections of this Session. # noqa: E501 The number of connection to this DCV session. # noqa: E501 :return: The num_of_connections of this Session. # noqa: E501 :rtype: int """ return self._num_of_connections @num_of_connections.setter def num_of_connections(self, num_of_connections): """Sets the num_of_connections of this Session. The number of connection to this DCV session. # noqa: E501 :param num_of_connections: The num_of_connections of this Session. # noqa: E501 :type: int """ self._num_of_connections = num_of_connections @property def storage_root(self): """Gets the storage_root of this Session. # noqa: E501 Specifies the path to the folder used for session storage. # noqa: E501 :return: The storage_root of this Session. # noqa: E501 :rtype: str """ return self._storage_root @storage_root.setter def storage_root(self, storage_root): """Sets the storage_root of this Session. Specifies the path to the folder used for session storage. # noqa: E501 :param storage_root: The storage_root of this Session. # noqa: E501 :type: str """ self._storage_root = storage_root 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(Session, 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, Session): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other