# 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 Endpoint(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 = { 'port': 'int', 'web_url_path': 'str', 'protocol': 'str' } attribute_map = { 'port': 'Port', 'web_url_path': 'WebUrlPath', 'protocol': 'Protocol' } def __init__(self, port=None, web_url_path=None, protocol=None): # noqa: E501 """Endpoint - a model defined in Swagger""" # noqa: E501 self._port = None self._web_url_path = None self._protocol = None self.discriminator = None if port is not None: self.port = port if web_url_path is not None: self.web_url_path = web_url_path if protocol is not None: self.protocol = protocol @property def port(self): """Gets the port of this Endpoint. # noqa: E501 The port of the DCV endpoint # noqa: E501 :return: The port of this Endpoint. # noqa: E501 :rtype: int """ return self._port @port.setter def port(self, port): """Sets the port of this Endpoint. The port of the DCV endpoint # noqa: E501 :param port: The port of this Endpoint. # noqa: E501 :type: int """ self._port = port @property def web_url_path(self): """Gets the web_url_path of this Endpoint. # noqa: E501 The web url path of the DCV endpoint # noqa: E501 :return: The web_url_path of this Endpoint. # noqa: E501 :rtype: str """ return self._web_url_path @web_url_path.setter def web_url_path(self, web_url_path): """Sets the web_url_path of this Endpoint. The web url path of the DCV endpoint # noqa: E501 :param web_url_path: The web_url_path of this Endpoint. # noqa: E501 :type: str """ self._web_url_path = web_url_path @property def protocol(self): """Gets the protocol of this Endpoint. # noqa: E501 The protocol of the DCV endpoint # noqa: E501 :return: The protocol of this Endpoint. # noqa: E501 :rtype: str """ return self._protocol @protocol.setter def protocol(self, protocol): """Sets the protocol of this Endpoint. The protocol of the DCV endpoint # noqa: E501 :param protocol: The protocol of this Endpoint. # noqa: E501 :type: str """ allowed_values = ["HTTP", "QUIC"] # noqa: E501 if protocol not in allowed_values: raise ValueError( "Invalid value for `protocol` ({0}), must be one of {1}" # noqa: E501 .format(protocol, allowed_values) ) self._protocol = protocol 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(Endpoint, 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, Endpoint): return False return self.__dict__ == other.__dict__ def __ne__(self, other): """Returns true if both objects are not equal""" return not self == other