Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_storage_class.py374 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 V1StorageClass(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        'allow_volume_expansion': 'bool',37        'allowed_topologies': 'list[V1TopologySelectorTerm]',38        'api_version': 'str',39        'kind': 'str',40        'metadata': 'V1ObjectMeta',41        'mount_options': 'list[str]',42        'parameters': 'dict(str, str)',43        'provisioner': 'str',44        'reclaim_policy': 'str',45        'volume_binding_mode': 'str'46    }47 48    attribute_map = {49        'allow_volume_expansion': 'allowVolumeExpansion',50        'allowed_topologies': 'allowedTopologies',51        'api_version': 'apiVersion',52        'kind': 'kind',53        'metadata': 'metadata',54        'mount_options': 'mountOptions',55        'parameters': 'parameters',56        'provisioner': 'provisioner',57        'reclaim_policy': 'reclaimPolicy',58        'volume_binding_mode': 'volumeBindingMode'59    }60 61    def __init__(self, allow_volume_expansion=None, allowed_topologies=None, api_version=None, kind=None, metadata=None, mount_options=None, parameters=None, provisioner=None, reclaim_policy=None, volume_binding_mode=None, local_vars_configuration=None):  # noqa: E50162        """V1StorageClass - 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._allow_volume_expansion = None68        self._allowed_topologies = None69        self._api_version = None70        self._kind = None71        self._metadata = None72        self._mount_options = None73        self._parameters = None74        self._provisioner = None75        self._reclaim_policy = None76        self._volume_binding_mode = None77        self.discriminator = None78 79        if allow_volume_expansion is not None:80            self.allow_volume_expansion = allow_volume_expansion81        if allowed_topologies is not None:82            self.allowed_topologies = allowed_topologies83        if api_version is not None:84            self.api_version = api_version85        if kind is not None:86            self.kind = kind87        if metadata is not None:88            self.metadata = metadata89        if mount_options is not None:90            self.mount_options = mount_options91        if parameters is not None:92            self.parameters = parameters93        self.provisioner = provisioner94        if reclaim_policy is not None:95            self.reclaim_policy = reclaim_policy96        if volume_binding_mode is not None:97            self.volume_binding_mode = volume_binding_mode98 99    @property100    def allow_volume_expansion(self):101        """Gets the allow_volume_expansion of this V1StorageClass.  # noqa: E501102 103        allowVolumeExpansion shows whether the storage class allow volume expand.  # noqa: E501104 105        :return: The allow_volume_expansion of this V1StorageClass.  # noqa: E501106        :rtype: bool107        """108        return self._allow_volume_expansion109 110    @allow_volume_expansion.setter111    def allow_volume_expansion(self, allow_volume_expansion):112        """Sets the allow_volume_expansion of this V1StorageClass.113 114        allowVolumeExpansion shows whether the storage class allow volume expand.  # noqa: E501115 116        :param allow_volume_expansion: The allow_volume_expansion of this V1StorageClass.  # noqa: E501117        :type: bool118        """119 120        self._allow_volume_expansion = allow_volume_expansion121 122    @property123    def allowed_topologies(self):124        """Gets the allowed_topologies of this V1StorageClass.  # noqa: E501125 126        allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.  # noqa: E501127 128        :return: The allowed_topologies of this V1StorageClass.  # noqa: E501129        :rtype: list[V1TopologySelectorTerm]130        """131        return self._allowed_topologies132 133    @allowed_topologies.setter134    def allowed_topologies(self, allowed_topologies):135        """Sets the allowed_topologies of this V1StorageClass.136 137        allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.  # noqa: E501138 139        :param allowed_topologies: The allowed_topologies of this V1StorageClass.  # noqa: E501140        :type: list[V1TopologySelectorTerm]141        """142 143        self._allowed_topologies = allowed_topologies144 145    @property146    def api_version(self):147        """Gets the api_version of this V1StorageClass.  # noqa: E501148 149        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources  # noqa: E501150 151        :return: The api_version of this V1StorageClass.  # noqa: E501152        :rtype: str153        """154        return self._api_version155 156    @api_version.setter157    def api_version(self, api_version):158        """Sets the api_version of this V1StorageClass.159 160        APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources  # noqa: E501161 162        :param api_version: The api_version of this V1StorageClass.  # noqa: E501163        :type: str164        """165 166        self._api_version = api_version167 168    @property169    def kind(self):170        """Gets the kind of this V1StorageClass.  # noqa: E501171 172        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501173 174        :return: The kind of this V1StorageClass.  # noqa: E501175        :rtype: str176        """177        return self._kind178 179    @kind.setter180    def kind(self, kind):181        """Sets the kind of this V1StorageClass.182 183        Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds  # noqa: E501184 185        :param kind: The kind of this V1StorageClass.  # noqa: E501186        :type: str187        """188 189        self._kind = kind190 191    @property192    def metadata(self):193        """Gets the metadata of this V1StorageClass.  # noqa: E501194 195 196        :return: The metadata of this V1StorageClass.  # noqa: E501197        :rtype: V1ObjectMeta198        """199        return self._metadata200 201    @metadata.setter202    def metadata(self, metadata):203        """Sets the metadata of this V1StorageClass.204 205 206        :param metadata: The metadata of this V1StorageClass.  # noqa: E501207        :type: V1ObjectMeta208        """209 210        self._metadata = metadata211 212    @property213    def mount_options(self):214        """Gets the mount_options of this V1StorageClass.  # noqa: E501215 216        mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.  # noqa: E501217 218        :return: The mount_options of this V1StorageClass.  # noqa: E501219        :rtype: list[str]220        """221        return self._mount_options222 223    @mount_options.setter224    def mount_options(self, mount_options):225        """Sets the mount_options of this V1StorageClass.226 227        mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.  # noqa: E501228 229        :param mount_options: The mount_options of this V1StorageClass.  # noqa: E501230        :type: list[str]231        """232 233        self._mount_options = mount_options234 235    @property236    def parameters(self):237        """Gets the parameters of this V1StorageClass.  # noqa: E501238 239        parameters holds the parameters for the provisioner that should create volumes of this storage class.  # noqa: E501240 241        :return: The parameters of this V1StorageClass.  # noqa: E501242        :rtype: dict(str, str)243        """244        return self._parameters245 246    @parameters.setter247    def parameters(self, parameters):248        """Sets the parameters of this V1StorageClass.249 250        parameters holds the parameters for the provisioner that should create volumes of this storage class.  # noqa: E501251 252        :param parameters: The parameters of this V1StorageClass.  # noqa: E501253        :type: dict(str, str)254        """255 256        self._parameters = parameters257 258    @property259    def provisioner(self):260        """Gets the provisioner of this V1StorageClass.  # noqa: E501261 262        provisioner indicates the type of the provisioner.  # noqa: E501263 264        :return: The provisioner of this V1StorageClass.  # noqa: E501265        :rtype: str266        """267        return self._provisioner268 269    @provisioner.setter270    def provisioner(self, provisioner):271        """Sets the provisioner of this V1StorageClass.272 273        provisioner indicates the type of the provisioner.  # noqa: E501274 275        :param provisioner: The provisioner of this V1StorageClass.  # noqa: E501276        :type: str277        """278        if self.local_vars_configuration.client_side_validation and provisioner is None:  # noqa: E501279            raise ValueError("Invalid value for `provisioner`, must not be `None`")  # noqa: E501280 281        self._provisioner = provisioner282 283    @property284    def reclaim_policy(self):285        """Gets the reclaim_policy of this V1StorageClass.  # noqa: E501286 287        reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete.  # noqa: E501288 289        :return: The reclaim_policy of this V1StorageClass.  # noqa: E501290        :rtype: str291        """292        return self._reclaim_policy293 294    @reclaim_policy.setter295    def reclaim_policy(self, reclaim_policy):296        """Sets the reclaim_policy of this V1StorageClass.297 298        reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete.  # noqa: E501299 300        :param reclaim_policy: The reclaim_policy of this V1StorageClass.  # noqa: E501301        :type: str302        """303 304        self._reclaim_policy = reclaim_policy305 306    @property307    def volume_binding_mode(self):308        """Gets the volume_binding_mode of this V1StorageClass.  # noqa: E501309 310        volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.  When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.  # noqa: E501311 312        :return: The volume_binding_mode of this V1StorageClass.  # noqa: E501313        :rtype: str314        """315        return self._volume_binding_mode316 317    @volume_binding_mode.setter318    def volume_binding_mode(self, volume_binding_mode):319        """Sets the volume_binding_mode of this V1StorageClass.320 321        volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound.  When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.  # noqa: E501322 323        :param volume_binding_mode: The volume_binding_mode of this V1StorageClass.  # noqa: E501324        :type: str325        """326 327        self._volume_binding_mode = volume_binding_mode328 329    def to_dict(self):330        """Returns the model properties as a dict"""331        result = {}332 333        for attr, _ in six.iteritems(self.openapi_types):334            value = getattr(self, attr)335            if isinstance(value, list):336                result[attr] = list(map(337                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,338                    value339                ))340            elif hasattr(value, "to_dict"):341                result[attr] = value.to_dict()342            elif isinstance(value, dict):343                result[attr] = dict(map(344                    lambda item: (item[0], item[1].to_dict())345                    if hasattr(item[1], "to_dict") else item,346                    value.items()347                ))348            else:349                result[attr] = value350 351        return result352 353    def to_str(self):354        """Returns the string representation of the model"""355        return pprint.pformat(self.to_dict())356 357    def __repr__(self):358        """For `print` and `pprint`"""359        return self.to_str()360 361    def __eq__(self, other):362        """Returns true if both objects are equal"""363        if not isinstance(other, V1StorageClass):364            return False365 366        return self.to_dict() == other.to_dict()367 368    def __ne__(self, other):369        """Returns true if both objects are not equal"""370        if not isinstance(other, V1StorageClass):371            return True372 373        return self.to_dict() != other.to_dict()374 
codekingpro/portable-devtools · Team Ai