Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_flex_volume_source.py234 linesDownload Raw Back to models
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 V1FlexVolumeSource(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        'options': 'dict(str, str)',39        'read_only': 'bool',40        'secret_ref': 'V1LocalObjectReference'41    }42 43    attribute_map = {44        'driver': 'driver',45        'fs_type': 'fsType',46        'options': 'options',47        'read_only': 'readOnly',48        'secret_ref': 'secretRef'49    }50 51    def __init__(self, driver=None, fs_type=None, options=None, read_only=None, secret_ref=None, local_vars_configuration=None):  # noqa: E50152        """V1FlexVolumeSource - 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._options = None60        self._read_only = None61        self._secret_ref = None62        self.discriminator = None63 64        self.driver = driver65        if fs_type is not None:66            self.fs_type = fs_type67        if options is not None:68            self.options = options69        if read_only is not None:70            self.read_only = read_only71        if secret_ref is not None:72            self.secret_ref = secret_ref73 74    @property75    def driver(self):76        """Gets the driver of this V1FlexVolumeSource.  # noqa: E50177 78        driver is the name of the driver to use for this volume.  # noqa: E50179 80        :return: The driver of this V1FlexVolumeSource.  # noqa: E50181        :rtype: str82        """83        return self._driver84 85    @driver.setter86    def driver(self, driver):87        """Sets the driver of this V1FlexVolumeSource.88 89        driver is the name of the driver to use for this volume.  # noqa: E50190 91        :param driver: The driver of this V1FlexVolumeSource.  # 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 V1FlexVolumeSource.  # noqa: E501102 103        fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.  # noqa: E501104 105        :return: The fs_type of this V1FlexVolumeSource.  # 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 V1FlexVolumeSource.113 114        fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". The default filesystem depends on FlexVolume script.  # noqa: E501115 116        :param fs_type: The fs_type of this V1FlexVolumeSource.  # noqa: E501117        :type: str118        """119 120        self._fs_type = fs_type121 122    @property123    def options(self):124        """Gets the options of this V1FlexVolumeSource.  # noqa: E501125 126        options is Optional: this field holds extra command options if any.  # noqa: E501127 128        :return: The options of this V1FlexVolumeSource.  # noqa: E501129        :rtype: dict(str, str)130        """131        return self._options132 133    @options.setter134    def options(self, options):135        """Sets the options of this V1FlexVolumeSource.136 137        options is Optional: this field holds extra command options if any.  # noqa: E501138 139        :param options: The options of this V1FlexVolumeSource.  # noqa: E501140        :type: dict(str, str)141        """142 143        self._options = options144 145    @property146    def read_only(self):147        """Gets the read_only of this V1FlexVolumeSource.  # noqa: E501148 149        readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.  # noqa: E501150 151        :return: The read_only of this V1FlexVolumeSource.  # noqa: E501152        :rtype: bool153        """154        return self._read_only155 156    @read_only.setter157    def read_only(self, read_only):158        """Sets the read_only of this V1FlexVolumeSource.159 160        readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.  # noqa: E501161 162        :param read_only: The read_only of this V1FlexVolumeSource.  # noqa: E501163        :type: bool164        """165 166        self._read_only = read_only167 168    @property169    def secret_ref(self):170        """Gets the secret_ref of this V1FlexVolumeSource.  # noqa: E501171 172 173        :return: The secret_ref of this V1FlexVolumeSource.  # noqa: E501174        :rtype: V1LocalObjectReference175        """176        return self._secret_ref177 178    @secret_ref.setter179    def secret_ref(self, secret_ref):180        """Sets the secret_ref of this V1FlexVolumeSource.181 182 183        :param secret_ref: The secret_ref of this V1FlexVolumeSource.  # noqa: E501184        :type: V1LocalObjectReference185        """186 187        self._secret_ref = secret_ref188 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, V1FlexVolumeSource):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, V1FlexVolumeSource):231            return True232 233        return self.to_dict() != other.to_dict()234 
codekingpro/portable-devtools · Team Ai