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 V1ScaleIOVolumeSource(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 'fs_type': 'str',37 'gateway': 'str',38 'protection_domain': 'str',39 'read_only': 'bool',40 'secret_ref': 'V1LocalObjectReference',41 'ssl_enabled': 'bool',42 'storage_mode': 'str',43 'storage_pool': 'str',44 'system': 'str',45 'volume_name': 'str'46 }47 48 attribute_map = {49 'fs_type': 'fsType',50 'gateway': 'gateway',51 'protection_domain': 'protectionDomain',52 'read_only': 'readOnly',53 'secret_ref': 'secretRef',54 'ssl_enabled': 'sslEnabled',55 'storage_mode': 'storageMode',56 'storage_pool': 'storagePool',57 'system': 'system',58 'volume_name': 'volumeName'59 }60 61 def __init__(self, fs_type=None, gateway=None, protection_domain=None, read_only=None, secret_ref=None, ssl_enabled=None, storage_mode=None, storage_pool=None, system=None, volume_name=None, local_vars_configuration=None): # noqa: E50162 """V1ScaleIOVolumeSource - a model defined in OpenAPI""" # noqa: E50163 if local_vars_configuration is None:64 local_vars_configuration = Configuration()65 self.local_vars_configuration = local_vars_configuration66 67 self._fs_type = None68 self._gateway = None69 self._protection_domain = None70 self._read_only = None71 self._secret_ref = None72 self._ssl_enabled = None73 self._storage_mode = None74 self._storage_pool = None75 self._system = None76 self._volume_name = None77 self.discriminator = None78 79 if fs_type is not None:80 self.fs_type = fs_type81 self.gateway = gateway82 if protection_domain is not None:83 self.protection_domain = protection_domain84 if read_only is not None:85 self.read_only = read_only86 self.secret_ref = secret_ref87 if ssl_enabled is not None:88 self.ssl_enabled = ssl_enabled89 if storage_mode is not None:90 self.storage_mode = storage_mode91 if storage_pool is not None:92 self.storage_pool = storage_pool93 self.system = system94 if volume_name is not None:95 self.volume_name = volume_name96 97 @property98 def fs_type(self):99 """Gets the fs_type of this V1ScaleIOVolumeSource. # noqa: E501100 101 fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\". # noqa: E501102 103 :return: The fs_type of this V1ScaleIOVolumeSource. # noqa: E501104 :rtype: str105 """106 return self._fs_type107 108 @fs_type.setter109 def fs_type(self, fs_type):110 """Sets the fs_type of this V1ScaleIOVolumeSource.111 112 fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\". # noqa: E501113 114 :param fs_type: The fs_type of this V1ScaleIOVolumeSource. # noqa: E501115 :type: str116 """117 118 self._fs_type = fs_type119 120 @property121 def gateway(self):122 """Gets the gateway of this V1ScaleIOVolumeSource. # noqa: E501123 124 gateway is the host address of the ScaleIO API Gateway. # noqa: E501125 126 :return: The gateway of this V1ScaleIOVolumeSource. # noqa: E501127 :rtype: str128 """129 return self._gateway130 131 @gateway.setter132 def gateway(self, gateway):133 """Sets the gateway of this V1ScaleIOVolumeSource.134 135 gateway is the host address of the ScaleIO API Gateway. # noqa: E501136 137 :param gateway: The gateway of this V1ScaleIOVolumeSource. # noqa: E501138 :type: str139 """140 if self.local_vars_configuration.client_side_validation and gateway is None: # noqa: E501141 raise ValueError("Invalid value for `gateway`, must not be `None`") # noqa: E501142 143 self._gateway = gateway144 145 @property146 def protection_domain(self):147 """Gets the protection_domain of this V1ScaleIOVolumeSource. # noqa: E501148 149 protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. # noqa: E501150 151 :return: The protection_domain of this V1ScaleIOVolumeSource. # noqa: E501152 :rtype: str153 """154 return self._protection_domain155 156 @protection_domain.setter157 def protection_domain(self, protection_domain):158 """Sets the protection_domain of this V1ScaleIOVolumeSource.159 160 protectionDomain is the name of the ScaleIO Protection Domain for the configured storage. # noqa: E501161 162 :param protection_domain: The protection_domain of this V1ScaleIOVolumeSource. # noqa: E501163 :type: str164 """165 166 self._protection_domain = protection_domain167 168 @property169 def read_only(self):170 """Gets the read_only of this V1ScaleIOVolumeSource. # noqa: E501171 172 readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. # noqa: E501173 174 :return: The read_only of this V1ScaleIOVolumeSource. # noqa: E501175 :rtype: bool176 """177 return self._read_only178 179 @read_only.setter180 def read_only(self, read_only):181 """Sets the read_only of this V1ScaleIOVolumeSource.182 183 readOnly Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. # noqa: E501184 185 :param read_only: The read_only of this V1ScaleIOVolumeSource. # noqa: E501186 :type: bool187 """188 189 self._read_only = read_only190 191 @property192 def secret_ref(self):193 """Gets the secret_ref of this V1ScaleIOVolumeSource. # noqa: E501194 195 196 :return: The secret_ref of this V1ScaleIOVolumeSource. # noqa: E501197 :rtype: V1LocalObjectReference198 """199 return self._secret_ref200 201 @secret_ref.setter202 def secret_ref(self, secret_ref):203 """Sets the secret_ref of this V1ScaleIOVolumeSource.204 205 206 :param secret_ref: The secret_ref of this V1ScaleIOVolumeSource. # noqa: E501207 :type: V1LocalObjectReference208 """209 if self.local_vars_configuration.client_side_validation and secret_ref is None: # noqa: E501210 raise ValueError("Invalid value for `secret_ref`, must not be `None`") # noqa: E501211 212 self._secret_ref = secret_ref213 214 @property215 def ssl_enabled(self):216 """Gets the ssl_enabled of this V1ScaleIOVolumeSource. # noqa: E501217 218 sslEnabled Flag enable/disable SSL communication with Gateway, default false # noqa: E501219 220 :return: The ssl_enabled of this V1ScaleIOVolumeSource. # noqa: E501221 :rtype: bool222 """223 return self._ssl_enabled224 225 @ssl_enabled.setter226 def ssl_enabled(self, ssl_enabled):227 """Sets the ssl_enabled of this V1ScaleIOVolumeSource.228 229 sslEnabled Flag enable/disable SSL communication with Gateway, default false # noqa: E501230 231 :param ssl_enabled: The ssl_enabled of this V1ScaleIOVolumeSource. # noqa: E501232 :type: bool233 """234 235 self._ssl_enabled = ssl_enabled236 237 @property238 def storage_mode(self):239 """Gets the storage_mode of this V1ScaleIOVolumeSource. # noqa: E501240 241 storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. # noqa: E501242 243 :return: The storage_mode of this V1ScaleIOVolumeSource. # noqa: E501244 :rtype: str245 """246 return self._storage_mode247 248 @storage_mode.setter249 def storage_mode(self, storage_mode):250 """Sets the storage_mode of this V1ScaleIOVolumeSource.251 252 storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned. # noqa: E501253 254 :param storage_mode: The storage_mode of this V1ScaleIOVolumeSource. # noqa: E501255 :type: str256 """257 258 self._storage_mode = storage_mode259 260 @property261 def storage_pool(self):262 """Gets the storage_pool of this V1ScaleIOVolumeSource. # noqa: E501263 264 storagePool is the ScaleIO Storage Pool associated with the protection domain. # noqa: E501265 266 :return: The storage_pool of this V1ScaleIOVolumeSource. # noqa: E501267 :rtype: str268 """269 return self._storage_pool270 271 @storage_pool.setter272 def storage_pool(self, storage_pool):273 """Sets the storage_pool of this V1ScaleIOVolumeSource.274 275 storagePool is the ScaleIO Storage Pool associated with the protection domain. # noqa: E501276 277 :param storage_pool: The storage_pool of this V1ScaleIOVolumeSource. # noqa: E501278 :type: str279 """280 281 self._storage_pool = storage_pool282 283 @property284 def system(self):285 """Gets the system of this V1ScaleIOVolumeSource. # noqa: E501286 287 system is the name of the storage system as configured in ScaleIO. # noqa: E501288 289 :return: The system of this V1ScaleIOVolumeSource. # noqa: E501290 :rtype: str291 """292 return self._system293 294 @system.setter295 def system(self, system):296 """Sets the system of this V1ScaleIOVolumeSource.297 298 system is the name of the storage system as configured in ScaleIO. # noqa: E501299 300 :param system: The system of this V1ScaleIOVolumeSource. # noqa: E501301 :type: str302 """303 if self.local_vars_configuration.client_side_validation and system is None: # noqa: E501304 raise ValueError("Invalid value for `system`, must not be `None`") # noqa: E501305 306 self._system = system307 308 @property309 def volume_name(self):310 """Gets the volume_name of this V1ScaleIOVolumeSource. # noqa: E501311 312 volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. # noqa: E501313 314 :return: The volume_name of this V1ScaleIOVolumeSource. # noqa: E501315 :rtype: str316 """317 return self._volume_name318 319 @volume_name.setter320 def volume_name(self, volume_name):321 """Sets the volume_name of this V1ScaleIOVolumeSource.322 323 volumeName is the name of a volume already created in the ScaleIO system that is associated with this volume source. # noqa: E501324 325 :param volume_name: The volume_name of this V1ScaleIOVolumeSource. # noqa: E501326 :type: str327 """328 329 self._volume_name = volume_name330 331 def to_dict(self):332 """Returns the model properties as a dict"""333 result = {}334 335 for attr, _ in six.iteritems(self.openapi_types):336 value = getattr(self, attr)337 if isinstance(value, list):338 result[attr] = list(map(339 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,340 value341 ))342 elif hasattr(value, "to_dict"):343 result[attr] = value.to_dict()344 elif isinstance(value, dict):345 result[attr] = dict(map(346 lambda item: (item[0], item[1].to_dict())347 if hasattr(item[1], "to_dict") else item,348 value.items()349 ))350 else:351 result[attr] = value352 353 return result354 355 def to_str(self):356 """Returns the string representation of the model"""357 return pprint.pformat(self.to_dict())358 359 def __repr__(self):360 """For `print` and `pprint`"""361 return self.to_str()362 363 def __eq__(self, other):364 """Returns true if both objects are equal"""365 if not isinstance(other, V1ScaleIOVolumeSource):366 return False367 368 return self.to_dict() == other.to_dict()369 370 def __ne__(self, other):371 """Returns true if both objects are not equal"""372 if not isinstance(other, V1ScaleIOVolumeSource):373 return True374 375 return self.to_dict() != other.to_dict()376 