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 V1beta1DeviceToleration(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 'effect': 'str',37 'key': 'str',38 'operator': 'str',39 'toleration_seconds': 'int',40 'value': 'str'41 }42 43 attribute_map = {44 'effect': 'effect',45 'key': 'key',46 'operator': 'operator',47 'toleration_seconds': 'tolerationSeconds',48 'value': 'value'49 }50 51 def __init__(self, effect=None, key=None, operator=None, toleration_seconds=None, value=None, local_vars_configuration=None): # noqa: E50152 """V1beta1DeviceToleration - a model defined in OpenAPI""" # noqa: E50153 if local_vars_configuration is None:54 local_vars_configuration = Configuration()55 self.local_vars_configuration = local_vars_configuration56 57 self._effect = None58 self._key = None59 self._operator = None60 self._toleration_seconds = None61 self._value = None62 self.discriminator = None63 64 if effect is not None:65 self.effect = effect66 if key is not None:67 self.key = key68 if operator is not None:69 self.operator = operator70 if toleration_seconds is not None:71 self.toleration_seconds = toleration_seconds72 if value is not None:73 self.value = value74 75 @property76 def effect(self):77 """Gets the effect of this V1beta1DeviceToleration. # noqa: E50178 79 Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute. # noqa: E50180 81 :return: The effect of this V1beta1DeviceToleration. # noqa: E50182 :rtype: str83 """84 return self._effect85 86 @effect.setter87 def effect(self, effect):88 """Sets the effect of this V1beta1DeviceToleration.89 90 Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule and NoExecute. # noqa: E50191 92 :param effect: The effect of this V1beta1DeviceToleration. # noqa: E50193 :type: str94 """95 96 self._effect = effect97 98 @property99 def key(self):100 """Gets the key of this V1beta1DeviceToleration. # noqa: E501101 102 Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. # noqa: E501103 104 :return: The key of this V1beta1DeviceToleration. # noqa: E501105 :rtype: str106 """107 return self._key108 109 @key.setter110 def key(self, key):111 """Sets the key of this V1beta1DeviceToleration.112 113 Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys. Must be a label name. # noqa: E501114 115 :param key: The key of this V1beta1DeviceToleration. # noqa: E501116 :type: str117 """118 119 self._key = key120 121 @property122 def operator(self):123 """Gets the operator of this V1beta1DeviceToleration. # noqa: E501124 125 Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category. # noqa: E501126 127 :return: The operator of this V1beta1DeviceToleration. # noqa: E501128 :rtype: str129 """130 return self._operator131 132 @operator.setter133 def operator(self, operator):134 """Sets the operator of this V1beta1DeviceToleration.135 136 Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a ResourceClaim can tolerate all taints of a particular category. # noqa: E501137 138 :param operator: The operator of this V1beta1DeviceToleration. # noqa: E501139 :type: str140 """141 142 self._operator = operator143 144 @property145 def toleration_seconds(self):146 """Gets the toleration_seconds of this V1beta1DeviceToleration. # noqa: E501147 148 TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>. # noqa: E501149 150 :return: The toleration_seconds of this V1beta1DeviceToleration. # noqa: E501151 :rtype: int152 """153 return self._toleration_seconds154 155 @toleration_seconds.setter156 def toleration_seconds(self, toleration_seconds):157 """Sets the toleration_seconds of this V1beta1DeviceToleration.158 159 TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system. If larger than zero, the time when the pod needs to be evicted is calculated as <time when taint was adedd> + <toleration seconds>. # noqa: E501160 161 :param toleration_seconds: The toleration_seconds of this V1beta1DeviceToleration. # noqa: E501162 :type: int163 """164 165 self._toleration_seconds = toleration_seconds166 167 @property168 def value(self):169 """Gets the value of this V1beta1DeviceToleration. # noqa: E501170 171 Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value. # noqa: E501172 173 :return: The value of this V1beta1DeviceToleration. # noqa: E501174 :rtype: str175 """176 return self._value177 178 @value.setter179 def value(self, value):180 """Sets the value of this V1beta1DeviceToleration.181 182 Value is the taint value the toleration matches to. If the operator is Exists, the value must be empty, otherwise just a regular string. Must be a label value. # noqa: E501183 184 :param value: The value of this V1beta1DeviceToleration. # noqa: E501185 :type: str186 """187 188 self._value = value189 190 def to_dict(self):191 """Returns the model properties as a dict"""192 result = {}193 194 for attr, _ in six.iteritems(self.openapi_types):195 value = getattr(self, attr)196 if isinstance(value, list):197 result[attr] = list(map(198 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,199 value200 ))201 elif hasattr(value, "to_dict"):202 result[attr] = value.to_dict()203 elif isinstance(value, dict):204 result[attr] = dict(map(205 lambda item: (item[0], item[1].to_dict())206 if hasattr(item[1], "to_dict") else item,207 value.items()208 ))209 else:210 result[attr] = value211 212 return result213 214 def to_str(self):215 """Returns the string representation of the model"""216 return pprint.pformat(self.to_dict())217 218 def __repr__(self):219 """For `print` and `pprint`"""220 return self.to_str()221 222 def __eq__(self, other):223 """Returns true if both objects are equal"""224 if not isinstance(other, V1beta1DeviceToleration):225 return False226 227 return self.to_dict() == other.to_dict()228 229 def __ne__(self, other):230 """Returns true if both objects are not equal"""231 if not isinstance(other, V1beta1DeviceToleration):232 return True233 234 return self.to_dict() != other.to_dict()235 