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 V1CSIVolumeSource(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 'driver': 'str',37 'fs_type': 'str',38 'node_publish_secret_ref': 'V1LocalObjectReference',39 'read_only': 'bool',40 'volume_attributes': 'dict(str, str)'41 }42 43 attribute_map = {44 'driver': 'driver',45 'fs_type': 'fsType',46 'node_publish_secret_ref': 'nodePublishSecretRef',47 'read_only': 'readOnly',48 'volume_attributes': 'volumeAttributes'49 }50 51 def __init__(self, driver=None, fs_type=None, node_publish_secret_ref=None, read_only=None, volume_attributes=None, local_vars_configuration=None): # noqa: E50152 """V1CSIVolumeSource - 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._driver = None58 self._fs_type = None59 self._node_publish_secret_ref = None60 self._read_only = None61 self._volume_attributes = None62 self.discriminator = None63 64 self.driver = driver65 if fs_type is not None:66 self.fs_type = fs_type67 if node_publish_secret_ref is not None:68 self.node_publish_secret_ref = node_publish_secret_ref69 if read_only is not None:70 self.read_only = read_only71 if volume_attributes is not None:72 self.volume_attributes = volume_attributes73 74 @property75 def driver(self):76 """Gets the driver of this V1CSIVolumeSource. # noqa: E50177 78 driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. # noqa: E50179 80 :return: The driver of this V1CSIVolumeSource. # noqa: E50181 :rtype: str82 """83 return self._driver84 85 @driver.setter86 def driver(self, driver):87 """Sets the driver of this V1CSIVolumeSource.88 89 driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. # noqa: E50190 91 :param driver: The driver of this V1CSIVolumeSource. # noqa: E50192 :type: str93 """94 if self.local_vars_configuration.client_side_validation and driver is None: # noqa: E50195 raise ValueError("Invalid value for `driver`, must not be `None`") # noqa: E50196 97 self._driver = driver98 99 @property100 def fs_type(self):101 """Gets the fs_type of this V1CSIVolumeSource. # noqa: E501102 103 fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. # noqa: E501104 105 :return: The fs_type of this V1CSIVolumeSource. # noqa: E501106 :rtype: str107 """108 return self._fs_type109 110 @fs_type.setter111 def fs_type(self, fs_type):112 """Sets the fs_type of this V1CSIVolumeSource.113 114 fsType to mount. Ex. \"ext4\", \"xfs\", \"ntfs\". If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply. # noqa: E501115 116 :param fs_type: The fs_type of this V1CSIVolumeSource. # noqa: E501117 :type: str118 """119 120 self._fs_type = fs_type121 122 @property123 def node_publish_secret_ref(self):124 """Gets the node_publish_secret_ref of this V1CSIVolumeSource. # noqa: E501125 126 127 :return: The node_publish_secret_ref of this V1CSIVolumeSource. # noqa: E501128 :rtype: V1LocalObjectReference129 """130 return self._node_publish_secret_ref131 132 @node_publish_secret_ref.setter133 def node_publish_secret_ref(self, node_publish_secret_ref):134 """Sets the node_publish_secret_ref of this V1CSIVolumeSource.135 136 137 :param node_publish_secret_ref: The node_publish_secret_ref of this V1CSIVolumeSource. # noqa: E501138 :type: V1LocalObjectReference139 """140 141 self._node_publish_secret_ref = node_publish_secret_ref142 143 @property144 def read_only(self):145 """Gets the read_only of this V1CSIVolumeSource. # noqa: E501146 147 readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). # noqa: E501148 149 :return: The read_only of this V1CSIVolumeSource. # noqa: E501150 :rtype: bool151 """152 return self._read_only153 154 @read_only.setter155 def read_only(self, read_only):156 """Sets the read_only of this V1CSIVolumeSource.157 158 readOnly specifies a read-only configuration for the volume. Defaults to false (read/write). # noqa: E501159 160 :param read_only: The read_only of this V1CSIVolumeSource. # noqa: E501161 :type: bool162 """163 164 self._read_only = read_only165 166 @property167 def volume_attributes(self):168 """Gets the volume_attributes of this V1CSIVolumeSource. # noqa: E501169 170 volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. # noqa: E501171 172 :return: The volume_attributes of this V1CSIVolumeSource. # noqa: E501173 :rtype: dict(str, str)174 """175 return self._volume_attributes176 177 @volume_attributes.setter178 def volume_attributes(self, volume_attributes):179 """Sets the volume_attributes of this V1CSIVolumeSource.180 181 volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. # noqa: E501182 183 :param volume_attributes: The volume_attributes of this V1CSIVolumeSource. # noqa: E501184 :type: dict(str, str)185 """186 187 self._volume_attributes = volume_attributes188 189 def to_dict(self):190 """Returns the model properties as a dict"""191 result = {}192 193 for attr, _ in six.iteritems(self.openapi_types):194 value = getattr(self, attr)195 if isinstance(value, list):196 result[attr] = list(map(197 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,198 value199 ))200 elif hasattr(value, "to_dict"):201 result[attr] = value.to_dict()202 elif isinstance(value, dict):203 result[attr] = dict(map(204 lambda item: (item[0], item[1].to_dict())205 if hasattr(item[1], "to_dict") else item,206 value.items()207 ))208 else:209 result[attr] = value210 211 return result212 213 def to_str(self):214 """Returns the string representation of the model"""215 return pprint.pformat(self.to_dict())216 217 def __repr__(self):218 """For `print` and `pprint`"""219 return self.to_str()220 221 def __eq__(self, other):222 """Returns true if both objects are equal"""223 if not isinstance(other, V1CSIVolumeSource):224 return False225 226 return self.to_dict() == other.to_dict()227 228 def __ne__(self, other):229 """Returns true if both objects are not equal"""230 if not isinstance(other, V1CSIVolumeSource):231 return True232 233 return self.to_dict() != other.to_dict()234 