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 V1RBDVolumeSource(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 'image': 'str',38 'keyring': 'str',39 'monitors': 'list[str]',40 'pool': 'str',41 'read_only': 'bool',42 'secret_ref': 'V1LocalObjectReference',43 'user': 'str'44 }45 46 attribute_map = {47 'fs_type': 'fsType',48 'image': 'image',49 'keyring': 'keyring',50 'monitors': 'monitors',51 'pool': 'pool',52 'read_only': 'readOnly',53 'secret_ref': 'secretRef',54 'user': 'user'55 }56 57 def __init__(self, fs_type=None, image=None, keyring=None, monitors=None, pool=None, read_only=None, secret_ref=None, user=None, local_vars_configuration=None): # noqa: E50158 """V1RBDVolumeSource - a model defined in OpenAPI""" # noqa: E50159 if local_vars_configuration is None:60 local_vars_configuration = Configuration()61 self.local_vars_configuration = local_vars_configuration62 63 self._fs_type = None64 self._image = None65 self._keyring = None66 self._monitors = None67 self._pool = None68 self._read_only = None69 self._secret_ref = None70 self._user = None71 self.discriminator = None72 73 if fs_type is not None:74 self.fs_type = fs_type75 self.image = image76 if keyring is not None:77 self.keyring = keyring78 self.monitors = monitors79 if pool is not None:80 self.pool = pool81 if read_only is not None:82 self.read_only = read_only83 if secret_ref is not None:84 self.secret_ref = secret_ref85 if user is not None:86 self.user = user87 88 @property89 def fs_type(self):90 """Gets the fs_type of this V1RBDVolumeSource. # noqa: E50191 92 fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd # noqa: E50193 94 :return: The fs_type of this V1RBDVolumeSource. # noqa: E50195 :rtype: str96 """97 return self._fs_type98 99 @fs_type.setter100 def fs_type(self, fs_type):101 """Sets the fs_type of this V1RBDVolumeSource.102 103 fsType is the filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd # noqa: E501104 105 :param fs_type: The fs_type of this V1RBDVolumeSource. # noqa: E501106 :type: str107 """108 109 self._fs_type = fs_type110 111 @property112 def image(self):113 """Gets the image of this V1RBDVolumeSource. # noqa: E501114 115 image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501116 117 :return: The image of this V1RBDVolumeSource. # noqa: E501118 :rtype: str119 """120 return self._image121 122 @image.setter123 def image(self, image):124 """Sets the image of this V1RBDVolumeSource.125 126 image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501127 128 :param image: The image of this V1RBDVolumeSource. # noqa: E501129 :type: str130 """131 if self.local_vars_configuration.client_side_validation and image is None: # noqa: E501132 raise ValueError("Invalid value for `image`, must not be `None`") # noqa: E501133 134 self._image = image135 136 @property137 def keyring(self):138 """Gets the keyring of this V1RBDVolumeSource. # noqa: E501139 140 keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501141 142 :return: The keyring of this V1RBDVolumeSource. # noqa: E501143 :rtype: str144 """145 return self._keyring146 147 @keyring.setter148 def keyring(self, keyring):149 """Sets the keyring of this V1RBDVolumeSource.150 151 keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501152 153 :param keyring: The keyring of this V1RBDVolumeSource. # noqa: E501154 :type: str155 """156 157 self._keyring = keyring158 159 @property160 def monitors(self):161 """Gets the monitors of this V1RBDVolumeSource. # noqa: E501162 163 monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501164 165 :return: The monitors of this V1RBDVolumeSource. # noqa: E501166 :rtype: list[str]167 """168 return self._monitors169 170 @monitors.setter171 def monitors(self, monitors):172 """Sets the monitors of this V1RBDVolumeSource.173 174 monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501175 176 :param monitors: The monitors of this V1RBDVolumeSource. # noqa: E501177 :type: list[str]178 """179 if self.local_vars_configuration.client_side_validation and monitors is None: # noqa: E501180 raise ValueError("Invalid value for `monitors`, must not be `None`") # noqa: E501181 182 self._monitors = monitors183 184 @property185 def pool(self):186 """Gets the pool of this V1RBDVolumeSource. # noqa: E501187 188 pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501189 190 :return: The pool of this V1RBDVolumeSource. # noqa: E501191 :rtype: str192 """193 return self._pool194 195 @pool.setter196 def pool(self, pool):197 """Sets the pool of this V1RBDVolumeSource.198 199 pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501200 201 :param pool: The pool of this V1RBDVolumeSource. # noqa: E501202 :type: str203 """204 205 self._pool = pool206 207 @property208 def read_only(self):209 """Gets the read_only of this V1RBDVolumeSource. # noqa: E501210 211 readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501212 213 :return: The read_only of this V1RBDVolumeSource. # noqa: E501214 :rtype: bool215 """216 return self._read_only217 218 @read_only.setter219 def read_only(self, read_only):220 """Sets the read_only of this V1RBDVolumeSource.221 222 readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501223 224 :param read_only: The read_only of this V1RBDVolumeSource. # noqa: E501225 :type: bool226 """227 228 self._read_only = read_only229 230 @property231 def secret_ref(self):232 """Gets the secret_ref of this V1RBDVolumeSource. # noqa: E501233 234 235 :return: The secret_ref of this V1RBDVolumeSource. # noqa: E501236 :rtype: V1LocalObjectReference237 """238 return self._secret_ref239 240 @secret_ref.setter241 def secret_ref(self, secret_ref):242 """Sets the secret_ref of this V1RBDVolumeSource.243 244 245 :param secret_ref: The secret_ref of this V1RBDVolumeSource. # noqa: E501246 :type: V1LocalObjectReference247 """248 249 self._secret_ref = secret_ref250 251 @property252 def user(self):253 """Gets the user of this V1RBDVolumeSource. # noqa: E501254 255 user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501256 257 :return: The user of this V1RBDVolumeSource. # noqa: E501258 :rtype: str259 """260 return self._user261 262 @user.setter263 def user(self, user):264 """Sets the user of this V1RBDVolumeSource.265 266 user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it # noqa: E501267 268 :param user: The user of this V1RBDVolumeSource. # noqa: E501269 :type: str270 """271 272 self._user = user273 274 def to_dict(self):275 """Returns the model properties as a dict"""276 result = {}277 278 for attr, _ in six.iteritems(self.openapi_types):279 value = getattr(self, attr)280 if isinstance(value, list):281 result[attr] = list(map(282 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,283 value284 ))285 elif hasattr(value, "to_dict"):286 result[attr] = value.to_dict()287 elif isinstance(value, dict):288 result[attr] = dict(map(289 lambda item: (item[0], item[1].to_dict())290 if hasattr(item[1], "to_dict") else item,291 value.items()292 ))293 else:294 result[attr] = value295 296 return result297 298 def to_str(self):299 """Returns the string representation of the model"""300 return pprint.pformat(self.to_dict())301 302 def __repr__(self):303 """For `print` and `pprint`"""304 return self.to_str()305 306 def __eq__(self, other):307 """Returns true if both objects are equal"""308 if not isinstance(other, V1RBDVolumeSource):309 return False310 311 return self.to_dict() == other.to_dict()312 313 def __ne__(self, other):314 """Returns true if both objects are not equal"""315 if not isinstance(other, V1RBDVolumeSource):316 return True317 318 return self.to_dict() != other.to_dict()319 