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 V1LocalVolumeSource(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 'path': 'str'38 }39 40 attribute_map = {41 'fs_type': 'fsType',42 'path': 'path'43 }44 45 def __init__(self, fs_type=None, path=None, local_vars_configuration=None): # noqa: E50146 """V1LocalVolumeSource - a model defined in OpenAPI""" # noqa: E50147 if local_vars_configuration is None:48 local_vars_configuration = Configuration()49 self.local_vars_configuration = local_vars_configuration50 51 self._fs_type = None52 self._path = None53 self.discriminator = None54 55 if fs_type is not None:56 self.fs_type = fs_type57 self.path = path58 59 @property60 def fs_type(self):61 """Gets the fs_type of this V1LocalVolumeSource. # noqa: E50162 63 fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified. # noqa: E50164 65 :return: The fs_type of this V1LocalVolumeSource. # noqa: E50166 :rtype: str67 """68 return self._fs_type69 70 @fs_type.setter71 def fs_type(self, fs_type):72 """Sets the fs_type of this V1LocalVolumeSource.73 74 fsType is the filesystem type to mount. It applies only when the Path is a block device. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default value is to auto-select a filesystem if unspecified. # noqa: E50175 76 :param fs_type: The fs_type of this V1LocalVolumeSource. # noqa: E50177 :type: str78 """79 80 self._fs_type = fs_type81 82 @property83 def path(self):84 """Gets the path of this V1LocalVolumeSource. # noqa: E50185 86 path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). # noqa: E50187 88 :return: The path of this V1LocalVolumeSource. # noqa: E50189 :rtype: str90 """91 return self._path92 93 @path.setter94 def path(self, path):95 """Sets the path of this V1LocalVolumeSource.96 97 path of the full path to the volume on the node. It can be either a directory or block device (disk, partition, ...). # noqa: E50198 99 :param path: The path of this V1LocalVolumeSource. # noqa: E501100 :type: str101 """102 if self.local_vars_configuration.client_side_validation and path is None: # noqa: E501103 raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501104 105 self._path = path106 107 def to_dict(self):108 """Returns the model properties as a dict"""109 result = {}110 111 for attr, _ in six.iteritems(self.openapi_types):112 value = getattr(self, attr)113 if isinstance(value, list):114 result[attr] = list(map(115 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,116 value117 ))118 elif hasattr(value, "to_dict"):119 result[attr] = value.to_dict()120 elif isinstance(value, dict):121 result[attr] = dict(map(122 lambda item: (item[0], item[1].to_dict())123 if hasattr(item[1], "to_dict") else item,124 value.items()125 ))126 else:127 result[attr] = value128 129 return result130 131 def to_str(self):132 """Returns the string representation of the model"""133 return pprint.pformat(self.to_dict())134 135 def __repr__(self):136 """For `print` and `pprint`"""137 return self.to_str()138 139 def __eq__(self, other):140 """Returns true if both objects are equal"""141 if not isinstance(other, V1LocalVolumeSource):142 return False143 144 return self.to_dict() == other.to_dict()145 146 def __ne__(self, other):147 """Returns true if both objects are not equal"""148 if not isinstance(other, V1LocalVolumeSource):149 return True150 151 return self.to_dict() != other.to_dict()152 