Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1beta2_device_taint.py209 linesDownload Raw Back to models
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 V1beta2DeviceTaint(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        'time_added': 'datetime',39        'value': 'str'40    }41 42    attribute_map = {43        'effect': 'effect',44        'key': 'key',45        'time_added': 'timeAdded',46        'value': 'value'47    }48 49    def __init__(self, effect=None, key=None, time_added=None, value=None, local_vars_configuration=None):  # noqa: E50150        """V1beta2DeviceTaint - 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._effect = None56        self._key = None57        self._time_added = None58        self._value = None59        self.discriminator = None60 61        self.effect = effect62        self.key = key63        if time_added is not None:64            self.time_added = time_added65        if value is not None:66            self.value = value67 68    @property69    def effect(self):70        """Gets the effect of this V1beta2DeviceTaint.  # noqa: E50171 72        The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them.  Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None.  # noqa: E50173 74        :return: The effect of this V1beta2DeviceTaint.  # noqa: E50175        :rtype: str76        """77        return self._effect78 79    @effect.setter80    def effect(self, effect):81        """Sets the effect of this V1beta2DeviceTaint.82 83        The effect of the taint on claims that do not tolerate the taint and through such claims on the pods using them.  Valid effects are None, NoSchedule and NoExecute. PreferNoSchedule as used for nodes is not valid here. More effects may get added in the future. Consumers must treat unknown effects like None.  # noqa: E50184 85        :param effect: The effect of this V1beta2DeviceTaint.  # noqa: E50186        :type: str87        """88        if self.local_vars_configuration.client_side_validation and effect is None:  # noqa: E50189            raise ValueError("Invalid value for `effect`, must not be `None`")  # noqa: E50190 91        self._effect = effect92 93    @property94    def key(self):95        """Gets the key of this V1beta2DeviceTaint.  # noqa: E50196 97        The taint key to be applied to a device. Must be a label name.  # noqa: E50198 99        :return: The key of this V1beta2DeviceTaint.  # noqa: E501100        :rtype: str101        """102        return self._key103 104    @key.setter105    def key(self, key):106        """Sets the key of this V1beta2DeviceTaint.107 108        The taint key to be applied to a device. Must be a label name.  # noqa: E501109 110        :param key: The key of this V1beta2DeviceTaint.  # noqa: E501111        :type: str112        """113        if self.local_vars_configuration.client_side_validation and key is None:  # noqa: E501114            raise ValueError("Invalid value for `key`, must not be `None`")  # noqa: E501115 116        self._key = key117 118    @property119    def time_added(self):120        """Gets the time_added of this V1beta2DeviceTaint.  # noqa: E501121 122        TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.  # noqa: E501123 124        :return: The time_added of this V1beta2DeviceTaint.  # noqa: E501125        :rtype: datetime126        """127        return self._time_added128 129    @time_added.setter130    def time_added(self, time_added):131        """Sets the time_added of this V1beta2DeviceTaint.132 133        TimeAdded represents the time at which the taint was added. Added automatically during create or update if not set.  # noqa: E501134 135        :param time_added: The time_added of this V1beta2DeviceTaint.  # noqa: E501136        :type: datetime137        """138 139        self._time_added = time_added140 141    @property142    def value(self):143        """Gets the value of this V1beta2DeviceTaint.  # noqa: E501144 145        The taint value corresponding to the taint key. Must be a label value.  # noqa: E501146 147        :return: The value of this V1beta2DeviceTaint.  # noqa: E501148        :rtype: str149        """150        return self._value151 152    @value.setter153    def value(self, value):154        """Sets the value of this V1beta2DeviceTaint.155 156        The taint value corresponding to the taint key. Must be a label value.  # noqa: E501157 158        :param value: The value of this V1beta2DeviceTaint.  # noqa: E501159        :type: str160        """161 162        self._value = value163 164    def to_dict(self):165        """Returns the model properties as a dict"""166        result = {}167 168        for attr, _ in six.iteritems(self.openapi_types):169            value = getattr(self, attr)170            if isinstance(value, list):171                result[attr] = list(map(172                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,173                    value174                ))175            elif hasattr(value, "to_dict"):176                result[attr] = value.to_dict()177            elif isinstance(value, dict):178                result[attr] = dict(map(179                    lambda item: (item[0], item[1].to_dict())180                    if hasattr(item[1], "to_dict") else item,181                    value.items()182                ))183            else:184                result[attr] = value185 186        return result187 188    def to_str(self):189        """Returns the string representation of the model"""190        return pprint.pformat(self.to_dict())191 192    def __repr__(self):193        """For `print` and `pprint`"""194        return self.to_str()195 196    def __eq__(self, other):197        """Returns true if both objects are equal"""198        if not isinstance(other, V1beta2DeviceTaint):199            return False200 201        return self.to_dict() == other.to_dict()202 203    def __ne__(self, other):204        """Returns true if both objects are not equal"""205        if not isinstance(other, V1beta2DeviceTaint):206            return True207 208        return self.to_dict() != other.to_dict()209 
codekingpro/portable-devtools · Team Ai