codekingpro/portable-devtools
114k
1# coding: utf-82 3"""4 Kubernetes5 6 No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E5017 8 The version of the OpenAPI document: release-1.359 Generated by: https://openapi-generator.tech10"""11 12 13import pprint14import re # noqa: F40115 16import six17 18from kubernetes.client.configuration import Configuration19 20 21class V1EndpointAddress(object):22 """NOTE: This class is auto generated by OpenAPI Generator.23 Ref: https://openapi-generator.tech24 25 Do not edit the class manually.26 """27 28 """29 Attributes:30 openapi_types (dict): The key is attribute name31 and the value is attribute type.32 attribute_map (dict): The key is attribute name33 and the value is json key in definition.34 """35 openapi_types = {36 'hostname': 'str',37 'ip': 'str',38 'node_name': 'str',39 'target_ref': 'V1ObjectReference'40 }41 42 attribute_map = {43 'hostname': 'hostname',44 'ip': 'ip',45 'node_name': 'nodeName',46 'target_ref': 'targetRef'47 }48 49 def __init__(self, hostname=None, ip=None, node_name=None, target_ref=None, local_vars_configuration=None): # noqa: E50150 """V1EndpointAddress - a model defined in OpenAPI""" # noqa: E50151 if local_vars_configuration is None:52 local_vars_configuration = Configuration()53 self.local_vars_configuration = local_vars_configuration54 55 self._hostname = None56 self._ip = None57 self._node_name = None58 self._target_ref = None59 self.discriminator = None60 61 if hostname is not None:62 self.hostname = hostname63 self.ip = ip64 if node_name is not None:65 self.node_name = node_name66 if target_ref is not None:67 self.target_ref = target_ref68 69 @property70 def hostname(self):71 """Gets the hostname of this V1EndpointAddress. # noqa: E50172 73 The Hostname of this endpoint # noqa: E50174 75 :return: The hostname of this V1EndpointAddress. # noqa: E50176 :rtype: str77 """78 return self._hostname79 80 @hostname.setter81 def hostname(self, hostname):82 """Sets the hostname of this V1EndpointAddress.83 84 The Hostname of this endpoint # noqa: E50185 86 :param hostname: The hostname of this V1EndpointAddress. # noqa: E50187 :type: str88 """89 90 self._hostname = hostname91 92 @property93 def ip(self):94 """Gets the ip of this V1EndpointAddress. # noqa: E50195 96 The IP of this endpoint. May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16). # noqa: E50197 98 :return: The ip of this V1EndpointAddress. # noqa: E50199 :rtype: str100 """101 return self._ip102 103 @ip.setter104 def ip(self, ip):105 """Sets the ip of this V1EndpointAddress.106 107 The IP of this endpoint. May not be loopback (127.0.0.0/8 or ::1), link-local (169.254.0.0/16 or fe80::/10), or link-local multicast (224.0.0.0/24 or ff02::/16). # noqa: E501108 109 :param ip: The ip of this V1EndpointAddress. # noqa: E501110 :type: str111 """112 if self.local_vars_configuration.client_side_validation and ip is None: # noqa: E501113 raise ValueError("Invalid value for `ip`, must not be `None`") # noqa: E501114 115 self._ip = ip116 117 @property118 def node_name(self):119 """Gets the node_name of this V1EndpointAddress. # noqa: E501120 121 Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. # noqa: E501122 123 :return: The node_name of this V1EndpointAddress. # noqa: E501124 :rtype: str125 """126 return self._node_name127 128 @node_name.setter129 def node_name(self, node_name):130 """Sets the node_name of this V1EndpointAddress.131 132 Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. # noqa: E501133 134 :param node_name: The node_name of this V1EndpointAddress. # noqa: E501135 :type: str136 """137 138 self._node_name = node_name139 140 @property141 def target_ref(self):142 """Gets the target_ref of this V1EndpointAddress. # noqa: E501143 144 145 :return: The target_ref of this V1EndpointAddress. # noqa: E501146 :rtype: V1ObjectReference147 """148 return self._target_ref149 150 @target_ref.setter151 def target_ref(self, target_ref):152 """Sets the target_ref of this V1EndpointAddress.153 154 155 :param target_ref: The target_ref of this V1EndpointAddress. # noqa: E501156 :type: V1ObjectReference157 """158 159 self._target_ref = target_ref160 161 def to_dict(self):162 """Returns the model properties as a dict"""163 result = {}164 165 for attr, _ in six.iteritems(self.openapi_types):166 value = getattr(self, attr)167 if isinstance(value, list):168 result[attr] = list(map(169 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,170 value171 ))172 elif hasattr(value, "to_dict"):173 result[attr] = value.to_dict()174 elif isinstance(value, dict):175 result[attr] = dict(map(176 lambda item: (item[0], item[1].to_dict())177 if hasattr(item[1], "to_dict") else item,178 value.items()179 ))180 else:181 result[attr] = value182 183 return result184 185 def to_str(self):186 """Returns the string representation of the model"""187 return pprint.pformat(self.to_dict())188 189 def __repr__(self):190 """For `print` and `pprint`"""191 return self.to_str()192 193 def __eq__(self, other):194 """Returns true if both objects are equal"""195 if not isinstance(other, V1EndpointAddress):196 return False197 198 return self.to_dict() == other.to_dict()199 200 def __ne__(self, other):201 """Returns true if both objects are not equal"""202 if not isinstance(other, V1EndpointAddress):203 return True204 205 return self.to_dict() != other.to_dict()206 