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 V1NodeSpec(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 'config_source': 'V1NodeConfigSource',37 'external_id': 'str',38 'pod_cidr': 'str',39 'pod_cid_rs': 'list[str]',40 'provider_id': 'str',41 'taints': 'list[V1Taint]',42 'unschedulable': 'bool'43 }44 45 attribute_map = {46 'config_source': 'configSource',47 'external_id': 'externalID',48 'pod_cidr': 'podCIDR',49 'pod_cid_rs': 'podCIDRs',50 'provider_id': 'providerID',51 'taints': 'taints',52 'unschedulable': 'unschedulable'53 }54 55 def __init__(self, config_source=None, external_id=None, pod_cidr=None, pod_cid_rs=None, provider_id=None, taints=None, unschedulable=None, local_vars_configuration=None): # noqa: E50156 """V1NodeSpec - a model defined in OpenAPI""" # noqa: E50157 if local_vars_configuration is None:58 local_vars_configuration = Configuration()59 self.local_vars_configuration = local_vars_configuration60 61 self._config_source = None62 self._external_id = None63 self._pod_cidr = None64 self._pod_cid_rs = None65 self._provider_id = None66 self._taints = None67 self._unschedulable = None68 self.discriminator = None69 70 if config_source is not None:71 self.config_source = config_source72 if external_id is not None:73 self.external_id = external_id74 if pod_cidr is not None:75 self.pod_cidr = pod_cidr76 if pod_cid_rs is not None:77 self.pod_cid_rs = pod_cid_rs78 if provider_id is not None:79 self.provider_id = provider_id80 if taints is not None:81 self.taints = taints82 if unschedulable is not None:83 self.unschedulable = unschedulable84 85 @property86 def config_source(self):87 """Gets the config_source of this V1NodeSpec. # noqa: E50188 89 90 :return: The config_source of this V1NodeSpec. # noqa: E50191 :rtype: V1NodeConfigSource92 """93 return self._config_source94 95 @config_source.setter96 def config_source(self, config_source):97 """Sets the config_source of this V1NodeSpec.98 99 100 :param config_source: The config_source of this V1NodeSpec. # noqa: E501101 :type: V1NodeConfigSource102 """103 104 self._config_source = config_source105 106 @property107 def external_id(self):108 """Gets the external_id of this V1NodeSpec. # noqa: E501109 110 Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966 # noqa: E501111 112 :return: The external_id of this V1NodeSpec. # noqa: E501113 :rtype: str114 """115 return self._external_id116 117 @external_id.setter118 def external_id(self, external_id):119 """Sets the external_id of this V1NodeSpec.120 121 Deprecated. Not all kubelets will set this field. Remove field after 1.13. see: https://issues.k8s.io/61966 # noqa: E501122 123 :param external_id: The external_id of this V1NodeSpec. # noqa: E501124 :type: str125 """126 127 self._external_id = external_id128 129 @property130 def pod_cidr(self):131 """Gets the pod_cidr of this V1NodeSpec. # noqa: E501132 133 PodCIDR represents the pod IP range assigned to the node. # noqa: E501134 135 :return: The pod_cidr of this V1NodeSpec. # noqa: E501136 :rtype: str137 """138 return self._pod_cidr139 140 @pod_cidr.setter141 def pod_cidr(self, pod_cidr):142 """Sets the pod_cidr of this V1NodeSpec.143 144 PodCIDR represents the pod IP range assigned to the node. # noqa: E501145 146 :param pod_cidr: The pod_cidr of this V1NodeSpec. # noqa: E501147 :type: str148 """149 150 self._pod_cidr = pod_cidr151 152 @property153 def pod_cid_rs(self):154 """Gets the pod_cid_rs of this V1NodeSpec. # noqa: E501155 156 podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6. # noqa: E501157 158 :return: The pod_cid_rs of this V1NodeSpec. # noqa: E501159 :rtype: list[str]160 """161 return self._pod_cid_rs162 163 @pod_cid_rs.setter164 def pod_cid_rs(self, pod_cid_rs):165 """Sets the pod_cid_rs of this V1NodeSpec.166 167 podCIDRs represents the IP ranges assigned to the node for usage by Pods on that node. If this field is specified, the 0th entry must match the podCIDR field. It may contain at most 1 value for each of IPv4 and IPv6. # noqa: E501168 169 :param pod_cid_rs: The pod_cid_rs of this V1NodeSpec. # noqa: E501170 :type: list[str]171 """172 173 self._pod_cid_rs = pod_cid_rs174 175 @property176 def provider_id(self):177 """Gets the provider_id of this V1NodeSpec. # noqa: E501178 179 ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID> # noqa: E501180 181 :return: The provider_id of this V1NodeSpec. # noqa: E501182 :rtype: str183 """184 return self._provider_id185 186 @provider_id.setter187 def provider_id(self, provider_id):188 """Sets the provider_id of this V1NodeSpec.189 190 ID of the node assigned by the cloud provider in the format: <ProviderName>://<ProviderSpecificNodeID> # noqa: E501191 192 :param provider_id: The provider_id of this V1NodeSpec. # noqa: E501193 :type: str194 """195 196 self._provider_id = provider_id197 198 @property199 def taints(self):200 """Gets the taints of this V1NodeSpec. # noqa: E501201 202 If specified, the node's taints. # noqa: E501203 204 :return: The taints of this V1NodeSpec. # noqa: E501205 :rtype: list[V1Taint]206 """207 return self._taints208 209 @taints.setter210 def taints(self, taints):211 """Sets the taints of this V1NodeSpec.212 213 If specified, the node's taints. # noqa: E501214 215 :param taints: The taints of this V1NodeSpec. # noqa: E501216 :type: list[V1Taint]217 """218 219 self._taints = taints220 221 @property222 def unschedulable(self):223 """Gets the unschedulable of this V1NodeSpec. # noqa: E501224 225 Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration # noqa: E501226 227 :return: The unschedulable of this V1NodeSpec. # noqa: E501228 :rtype: bool229 """230 return self._unschedulable231 232 @unschedulable.setter233 def unschedulable(self, unschedulable):234 """Sets the unschedulable of this V1NodeSpec.235 236 Unschedulable controls node schedulability of new pods. By default, node is schedulable. More info: https://kubernetes.io/docs/concepts/nodes/node/#manual-node-administration # noqa: E501237 238 :param unschedulable: The unschedulable of this V1NodeSpec. # noqa: E501239 :type: bool240 """241 242 self._unschedulable = unschedulable243 244 def to_dict(self):245 """Returns the model properties as a dict"""246 result = {}247 248 for attr, _ in six.iteritems(self.openapi_types):249 value = getattr(self, attr)250 if isinstance(value, list):251 result[attr] = list(map(252 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,253 value254 ))255 elif hasattr(value, "to_dict"):256 result[attr] = value.to_dict()257 elif isinstance(value, dict):258 result[attr] = dict(map(259 lambda item: (item[0], item[1].to_dict())260 if hasattr(item[1], "to_dict") else item,261 value.items()262 ))263 else:264 result[attr] = value265 266 return result267 268 def to_str(self):269 """Returns the string representation of the model"""270 return pprint.pformat(self.to_dict())271 272 def __repr__(self):273 """For `print` and `pprint`"""274 return self.to_str()275 276 def __eq__(self, other):277 """Returns true if both objects are equal"""278 if not isinstance(other, V1NodeSpec):279 return False280 281 return self.to_dict() == other.to_dict()282 283 def __ne__(self, other):284 """Returns true if both objects are not equal"""285 if not isinstance(other, V1NodeSpec):286 return True287 288 return self.to_dict() != other.to_dict()289 