Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_ceph_fs_volume_source.py262 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 V1CephFSVolumeSource(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        'monitors': 'list[str]',37        'path': 'str',38        'read_only': 'bool',39        'secret_file': 'str',40        'secret_ref': 'V1LocalObjectReference',41        'user': 'str'42    }43 44    attribute_map = {45        'monitors': 'monitors',46        'path': 'path',47        'read_only': 'readOnly',48        'secret_file': 'secretFile',49        'secret_ref': 'secretRef',50        'user': 'user'51    }52 53    def __init__(self, monitors=None, path=None, read_only=None, secret_file=None, secret_ref=None, user=None, local_vars_configuration=None):  # noqa: E50154        """V1CephFSVolumeSource - a model defined in OpenAPI"""  # noqa: E50155        if local_vars_configuration is None:56            local_vars_configuration = Configuration()57        self.local_vars_configuration = local_vars_configuration58 59        self._monitors = None60        self._path = None61        self._read_only = None62        self._secret_file = None63        self._secret_ref = None64        self._user = None65        self.discriminator = None66 67        self.monitors = monitors68        if path is not None:69            self.path = path70        if read_only is not None:71            self.read_only = read_only72        if secret_file is not None:73            self.secret_file = secret_file74        if secret_ref is not None:75            self.secret_ref = secret_ref76        if user is not None:77            self.user = user78 79    @property80    def monitors(self):81        """Gets the monitors of this V1CephFSVolumeSource.  # noqa: E50182 83        monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E50184 85        :return: The monitors of this V1CephFSVolumeSource.  # noqa: E50186        :rtype: list[str]87        """88        return self._monitors89 90    @monitors.setter91    def monitors(self, monitors):92        """Sets the monitors of this V1CephFSVolumeSource.93 94        monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E50195 96        :param monitors: The monitors of this V1CephFSVolumeSource.  # noqa: E50197        :type: list[str]98        """99        if self.local_vars_configuration.client_side_validation and monitors is None:  # noqa: E501100            raise ValueError("Invalid value for `monitors`, must not be `None`")  # noqa: E501101 102        self._monitors = monitors103 104    @property105    def path(self):106        """Gets the path of this V1CephFSVolumeSource.  # noqa: E501107 108        path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /  # noqa: E501109 110        :return: The path of this V1CephFSVolumeSource.  # noqa: E501111        :rtype: str112        """113        return self._path114 115    @path.setter116    def path(self, path):117        """Sets the path of this V1CephFSVolumeSource.118 119        path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /  # noqa: E501120 121        :param path: The path of this V1CephFSVolumeSource.  # noqa: E501122        :type: str123        """124 125        self._path = path126 127    @property128    def read_only(self):129        """Gets the read_only of this V1CephFSVolumeSource.  # noqa: E501130 131        readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E501132 133        :return: The read_only of this V1CephFSVolumeSource.  # noqa: E501134        :rtype: bool135        """136        return self._read_only137 138    @read_only.setter139    def read_only(self, read_only):140        """Sets the read_only of this V1CephFSVolumeSource.141 142        readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E501143 144        :param read_only: The read_only of this V1CephFSVolumeSource.  # noqa: E501145        :type: bool146        """147 148        self._read_only = read_only149 150    @property151    def secret_file(self):152        """Gets the secret_file of this V1CephFSVolumeSource.  # noqa: E501153 154        secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E501155 156        :return: The secret_file of this V1CephFSVolumeSource.  # noqa: E501157        :rtype: str158        """159        return self._secret_file160 161    @secret_file.setter162    def secret_file(self, secret_file):163        """Sets the secret_file of this V1CephFSVolumeSource.164 165        secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E501166 167        :param secret_file: The secret_file of this V1CephFSVolumeSource.  # noqa: E501168        :type: str169        """170 171        self._secret_file = secret_file172 173    @property174    def secret_ref(self):175        """Gets the secret_ref of this V1CephFSVolumeSource.  # noqa: E501176 177 178        :return: The secret_ref of this V1CephFSVolumeSource.  # noqa: E501179        :rtype: V1LocalObjectReference180        """181        return self._secret_ref182 183    @secret_ref.setter184    def secret_ref(self, secret_ref):185        """Sets the secret_ref of this V1CephFSVolumeSource.186 187 188        :param secret_ref: The secret_ref of this V1CephFSVolumeSource.  # noqa: E501189        :type: V1LocalObjectReference190        """191 192        self._secret_ref = secret_ref193 194    @property195    def user(self):196        """Gets the user of this V1CephFSVolumeSource.  # noqa: E501197 198        user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E501199 200        :return: The user of this V1CephFSVolumeSource.  # noqa: E501201        :rtype: str202        """203        return self._user204 205    @user.setter206    def user(self, user):207        """Sets the user of this V1CephFSVolumeSource.208 209        user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it  # noqa: E501210 211        :param user: The user of this V1CephFSVolumeSource.  # noqa: E501212        :type: str213        """214 215        self._user = user216 217    def to_dict(self):218        """Returns the model properties as a dict"""219        result = {}220 221        for attr, _ in six.iteritems(self.openapi_types):222            value = getattr(self, attr)223            if isinstance(value, list):224                result[attr] = list(map(225                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,226                    value227                ))228            elif hasattr(value, "to_dict"):229                result[attr] = value.to_dict()230            elif isinstance(value, dict):231                result[attr] = dict(map(232                    lambda item: (item[0], item[1].to_dict())233                    if hasattr(item[1], "to_dict") else item,234                    value.items()235                ))236            else:237                result[attr] = value238 239        return result240 241    def to_str(self):242        """Returns the string representation of the model"""243        return pprint.pformat(self.to_dict())244 245    def __repr__(self):246        """For `print` and `pprint`"""247        return self.to_str()248 249    def __eq__(self, other):250        """Returns true if both objects are equal"""251        if not isinstance(other, V1CephFSVolumeSource):252            return False253 254        return self.to_dict() == other.to_dict()255 256    def __ne__(self, other):257        """Returns true if both objects are not equal"""258        if not isinstance(other, V1CephFSVolumeSource):259            return True260 261        return self.to_dict() != other.to_dict()262 
codekingpro/portable-devtools · Team Ai