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 V1beta1DeviceClassSpec(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': 'list[V1beta1DeviceClassConfiguration]',37 'extended_resource_name': 'str',38 'selectors': 'list[V1beta1DeviceSelector]'39 }40 41 attribute_map = {42 'config': 'config',43 'extended_resource_name': 'extendedResourceName',44 'selectors': 'selectors'45 }46 47 def __init__(self, config=None, extended_resource_name=None, selectors=None, local_vars_configuration=None): # noqa: E50148 """V1beta1DeviceClassSpec - a model defined in OpenAPI""" # noqa: E50149 if local_vars_configuration is None:50 local_vars_configuration = Configuration()51 self.local_vars_configuration = local_vars_configuration52 53 self._config = None54 self._extended_resource_name = None55 self._selectors = None56 self.discriminator = None57 58 if config is not None:59 self.config = config60 if extended_resource_name is not None:61 self.extended_resource_name = extended_resource_name62 if selectors is not None:63 self.selectors = selectors64 65 @property66 def config(self):67 """Gets the config of this V1beta1DeviceClassSpec. # noqa: E50168 69 Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. # noqa: E50170 71 :return: The config of this V1beta1DeviceClassSpec. # noqa: E50172 :rtype: list[V1beta1DeviceClassConfiguration]73 """74 return self._config75 76 @config.setter77 def config(self, config):78 """Sets the config of this V1beta1DeviceClassSpec.79 80 Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver. They are passed to the driver, but are not considered while allocating the claim. # noqa: E50181 82 :param config: The config of this V1beta1DeviceClassSpec. # noqa: E50183 :type: list[V1beta1DeviceClassConfiguration]84 """85 86 self._config = config87 88 @property89 def extended_resource_name(self):90 """Gets the extended_resource_name of this V1beta1DeviceClassSpec. # noqa: E50191 92 ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E50193 94 :return: The extended_resource_name of this V1beta1DeviceClassSpec. # noqa: E50195 :rtype: str96 """97 return self._extended_resource_name98 99 @extended_resource_name.setter100 def extended_resource_name(self, extended_resource_name):101 """Sets the extended_resource_name of this V1beta1DeviceClassSpec.102 103 ExtendedResourceName is the extended resource name for the devices of this class. The devices of this class can be used to satisfy a pod's extended resource requests. It has the same format as the name of a pod's extended resource. It should be unique among all the device classes in a cluster. If two device classes have the same name, then the class created later is picked to satisfy a pod's extended resource requests. If two classes are created at the same time, then the name of the class lexicographically sorted first is picked. This is an alpha field. # noqa: E501104 105 :param extended_resource_name: The extended_resource_name of this V1beta1DeviceClassSpec. # noqa: E501106 :type: str107 """108 109 self._extended_resource_name = extended_resource_name110 111 @property112 def selectors(self):113 """Gets the selectors of this V1beta1DeviceClassSpec. # noqa: E501114 115 Each selector must be satisfied by a device which is claimed via this class. # noqa: E501116 117 :return: The selectors of this V1beta1DeviceClassSpec. # noqa: E501118 :rtype: list[V1beta1DeviceSelector]119 """120 return self._selectors121 122 @selectors.setter123 def selectors(self, selectors):124 """Sets the selectors of this V1beta1DeviceClassSpec.125 126 Each selector must be satisfied by a device which is claimed via this class. # noqa: E501127 128 :param selectors: The selectors of this V1beta1DeviceClassSpec. # noqa: E501129 :type: list[V1beta1DeviceSelector]130 """131 132 self._selectors = selectors133 134 def to_dict(self):135 """Returns the model properties as a dict"""136 result = {}137 138 for attr, _ in six.iteritems(self.openapi_types):139 value = getattr(self, attr)140 if isinstance(value, list):141 result[attr] = list(map(142 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,143 value144 ))145 elif hasattr(value, "to_dict"):146 result[attr] = value.to_dict()147 elif isinstance(value, dict):148 result[attr] = dict(map(149 lambda item: (item[0], item[1].to_dict())150 if hasattr(item[1], "to_dict") else item,151 value.items()152 ))153 else:154 result[attr] = value155 156 return result157 158 def to_str(self):159 """Returns the string representation of the model"""160 return pprint.pformat(self.to_dict())161 162 def __repr__(self):163 """For `print` and `pprint`"""164 return self.to_str()165 166 def __eq__(self, other):167 """Returns true if both objects are equal"""168 if not isinstance(other, V1beta1DeviceClassSpec):169 return False170 171 return self.to_dict() == other.to_dict()172 173 def __ne__(self, other):174 """Returns true if both objects are not equal"""175 if not isinstance(other, V1beta1DeviceClassSpec):176 return True177 178 return self.to_dict() != other.to_dict()179 