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 V1CSIStorageCapacity(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 'api_version': 'str',37 'capacity': 'str',38 'kind': 'str',39 'maximum_volume_size': 'str',40 'metadata': 'V1ObjectMeta',41 'node_topology': 'V1LabelSelector',42 'storage_class_name': 'str'43 }44 45 attribute_map = {46 'api_version': 'apiVersion',47 'capacity': 'capacity',48 'kind': 'kind',49 'maximum_volume_size': 'maximumVolumeSize',50 'metadata': 'metadata',51 'node_topology': 'nodeTopology',52 'storage_class_name': 'storageClassName'53 }54 55 def __init__(self, api_version=None, capacity=None, kind=None, maximum_volume_size=None, metadata=None, node_topology=None, storage_class_name=None, local_vars_configuration=None): # noqa: E50156 """V1CSIStorageCapacity - 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._api_version = None62 self._capacity = None63 self._kind = None64 self._maximum_volume_size = None65 self._metadata = None66 self._node_topology = None67 self._storage_class_name = None68 self.discriminator = None69 70 if api_version is not None:71 self.api_version = api_version72 if capacity is not None:73 self.capacity = capacity74 if kind is not None:75 self.kind = kind76 if maximum_volume_size is not None:77 self.maximum_volume_size = maximum_volume_size78 if metadata is not None:79 self.metadata = metadata80 if node_topology is not None:81 self.node_topology = node_topology82 self.storage_class_name = storage_class_name83 84 @property85 def api_version(self):86 """Gets the api_version of this V1CSIStorageCapacity. # noqa: E50187 88 APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E50189 90 :return: The api_version of this V1CSIStorageCapacity. # noqa: E50191 :rtype: str92 """93 return self._api_version94 95 @api_version.setter96 def api_version(self, api_version):97 """Sets the api_version of this V1CSIStorageCapacity.98 99 APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E501100 101 :param api_version: The api_version of this V1CSIStorageCapacity. # noqa: E501102 :type: str103 """104 105 self._api_version = api_version106 107 @property108 def capacity(self):109 """Gets the capacity of this V1CSIStorageCapacity. # noqa: E501110 111 capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable. # noqa: E501112 113 :return: The capacity of this V1CSIStorageCapacity. # noqa: E501114 :rtype: str115 """116 return self._capacity117 118 @capacity.setter119 def capacity(self, capacity):120 """Sets the capacity of this V1CSIStorageCapacity.121 122 capacity is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. The semantic is currently (CSI spec 1.2) defined as: The available capacity, in bytes, of the storage that can be used to provision volumes. If not set, that information is currently unavailable. # noqa: E501123 124 :param capacity: The capacity of this V1CSIStorageCapacity. # noqa: E501125 :type: str126 """127 128 self._capacity = capacity129 130 @property131 def kind(self):132 """Gets the kind of this V1CSIStorageCapacity. # noqa: E501133 134 Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501135 136 :return: The kind of this V1CSIStorageCapacity. # noqa: E501137 :rtype: str138 """139 return self._kind140 141 @kind.setter142 def kind(self, kind):143 """Sets the kind of this V1CSIStorageCapacity.144 145 Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501146 147 :param kind: The kind of this V1CSIStorageCapacity. # noqa: E501148 :type: str149 """150 151 self._kind = kind152 153 @property154 def maximum_volume_size(self):155 """Gets the maximum_volume_size of this V1CSIStorageCapacity. # noqa: E501156 157 maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. # noqa: E501158 159 :return: The maximum_volume_size of this V1CSIStorageCapacity. # noqa: E501160 :rtype: str161 """162 return self._maximum_volume_size163 164 @maximum_volume_size.setter165 def maximum_volume_size(self, maximum_volume_size):166 """Sets the maximum_volume_size of this V1CSIStorageCapacity.167 168 maximumVolumeSize is the value reported by the CSI driver in its GetCapacityResponse for a GetCapacityRequest with topology and parameters that match the previous fields. This is defined since CSI spec 1.4.0 as the largest size that may be used in a CreateVolumeRequest.capacity_range.required_bytes field to create a volume with the same parameters as those in GetCapacityRequest. The corresponding value in the Kubernetes API is ResourceRequirements.Requests in a volume claim. # noqa: E501169 170 :param maximum_volume_size: The maximum_volume_size of this V1CSIStorageCapacity. # noqa: E501171 :type: str172 """173 174 self._maximum_volume_size = maximum_volume_size175 176 @property177 def metadata(self):178 """Gets the metadata of this V1CSIStorageCapacity. # noqa: E501179 180 181 :return: The metadata of this V1CSIStorageCapacity. # noqa: E501182 :rtype: V1ObjectMeta183 """184 return self._metadata185 186 @metadata.setter187 def metadata(self, metadata):188 """Sets the metadata of this V1CSIStorageCapacity.189 190 191 :param metadata: The metadata of this V1CSIStorageCapacity. # noqa: E501192 :type: V1ObjectMeta193 """194 195 self._metadata = metadata196 197 @property198 def node_topology(self):199 """Gets the node_topology of this V1CSIStorageCapacity. # noqa: E501200 201 202 :return: The node_topology of this V1CSIStorageCapacity. # noqa: E501203 :rtype: V1LabelSelector204 """205 return self._node_topology206 207 @node_topology.setter208 def node_topology(self, node_topology):209 """Sets the node_topology of this V1CSIStorageCapacity.210 211 212 :param node_topology: The node_topology of this V1CSIStorageCapacity. # noqa: E501213 :type: V1LabelSelector214 """215 216 self._node_topology = node_topology217 218 @property219 def storage_class_name(self):220 """Gets the storage_class_name of this V1CSIStorageCapacity. # noqa: E501221 222 storageClassName represents the name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. # noqa: E501223 224 :return: The storage_class_name of this V1CSIStorageCapacity. # noqa: E501225 :rtype: str226 """227 return self._storage_class_name228 229 @storage_class_name.setter230 def storage_class_name(self, storage_class_name):231 """Sets the storage_class_name of this V1CSIStorageCapacity.232 233 storageClassName represents the name of the StorageClass that the reported capacity applies to. It must meet the same requirements as the name of a StorageClass object (non-empty, DNS subdomain). If that object no longer exists, the CSIStorageCapacity object is obsolete and should be removed by its creator. This field is immutable. # noqa: E501234 235 :param storage_class_name: The storage_class_name of this V1CSIStorageCapacity. # noqa: E501236 :type: str237 """238 if self.local_vars_configuration.client_side_validation and storage_class_name is None: # noqa: E501239 raise ValueError("Invalid value for `storage_class_name`, must not be `None`") # noqa: E501240 241 self._storage_class_name = storage_class_name242 243 def to_dict(self):244 """Returns the model properties as a dict"""245 result = {}246 247 for attr, _ in six.iteritems(self.openapi_types):248 value = getattr(self, attr)249 if isinstance(value, list):250 result[attr] = list(map(251 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,252 value253 ))254 elif hasattr(value, "to_dict"):255 result[attr] = value.to_dict()256 elif isinstance(value, dict):257 result[attr] = dict(map(258 lambda item: (item[0], item[1].to_dict())259 if hasattr(item[1], "to_dict") else item,260 value.items()261 ))262 else:263 result[attr] = value264 265 return result266 267 def to_str(self):268 """Returns the string representation of the model"""269 return pprint.pformat(self.to_dict())270 271 def __repr__(self):272 """For `print` and `pprint`"""273 return self.to_str()274 275 def __eq__(self, other):276 """Returns true if both objects are equal"""277 if not isinstance(other, V1CSIStorageCapacity):278 return False279 280 return self.to_dict() == other.to_dict()281 282 def __ne__(self, other):283 """Returns true if both objects are not equal"""284 if not isinstance(other, V1CSIStorageCapacity):285 return True286 287 return self.to_dict() != other.to_dict()288 