Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
v1_volume_attributes_class.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 V1VolumeAttributesClass(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        'api_version': 'str',37        'driver_name': 'str',38        'kind': 'str',39        'metadata': 'V1ObjectMeta',40        'parameters': 'dict(str, str)'41    }42 43    attribute_map = {44        'api_version': 'apiVersion',45        'driver_name': 'driverName',46        'kind': 'kind',47        'metadata': 'metadata',48        'parameters': 'parameters'49    }50 51    def __init__(self, api_version=None, driver_name=None, kind=None, metadata=None, parameters=None, local_vars_configuration=None):  # noqa: E50152        """V1VolumeAttributesClass - 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._api_version = None58        self._driver_name = None59        self._kind = None60        self._metadata = None61        self._parameters = None62        self.discriminator = None63 64        if api_version is not None:65            self.api_version = api_version66        self.driver_name = driver_name67        if kind is not None:68            self.kind = kind69        if metadata is not None:70            self.metadata = metadata71        if parameters is not None:72            self.parameters = parameters73 74    @property75    def api_version(self):76        """Gets the api_version of this V1VolumeAttributesClass.  # noqa: E50177 78        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: E50179 80        :return: The api_version of this V1VolumeAttributesClass.  # noqa: E50181        :rtype: str82        """83        return self._api_version84 85    @api_version.setter86    def api_version(self, api_version):87        """Sets the api_version of this V1VolumeAttributesClass.88 89        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: E50190 91        :param api_version: The api_version of this V1VolumeAttributesClass.  # noqa: E50192        :type: str93        """94 95        self._api_version = api_version96 97    @property98    def driver_name(self):99        """Gets the driver_name of this V1VolumeAttributesClass.  # noqa: E501100 101        Name of the CSI driver This field is immutable.  # noqa: E501102 103        :return: The driver_name of this V1VolumeAttributesClass.  # noqa: E501104        :rtype: str105        """106        return self._driver_name107 108    @driver_name.setter109    def driver_name(self, driver_name):110        """Sets the driver_name of this V1VolumeAttributesClass.111 112        Name of the CSI driver This field is immutable.  # noqa: E501113 114        :param driver_name: The driver_name of this V1VolumeAttributesClass.  # noqa: E501115        :type: str116        """117        if self.local_vars_configuration.client_side_validation and driver_name is None:  # noqa: E501118            raise ValueError("Invalid value for `driver_name`, must not be `None`")  # noqa: E501119 120        self._driver_name = driver_name121 122    @property123    def kind(self):124        """Gets the kind of this V1VolumeAttributesClass.  # noqa: E501125 126        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: E501127 128        :return: The kind of this V1VolumeAttributesClass.  # noqa: E501129        :rtype: str130        """131        return self._kind132 133    @kind.setter134    def kind(self, kind):135        """Sets the kind of this V1VolumeAttributesClass.136 137        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: E501138 139        :param kind: The kind of this V1VolumeAttributesClass.  # noqa: E501140        :type: str141        """142 143        self._kind = kind144 145    @property146    def metadata(self):147        """Gets the metadata of this V1VolumeAttributesClass.  # noqa: E501148 149 150        :return: The metadata of this V1VolumeAttributesClass.  # noqa: E501151        :rtype: V1ObjectMeta152        """153        return self._metadata154 155    @metadata.setter156    def metadata(self, metadata):157        """Sets the metadata of this V1VolumeAttributesClass.158 159 160        :param metadata: The metadata of this V1VolumeAttributesClass.  # noqa: E501161        :type: V1ObjectMeta162        """163 164        self._metadata = metadata165 166    @property167    def parameters(self):168        """Gets the parameters of this V1VolumeAttributesClass.  # noqa: E501169 170        parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.  This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an \"Infeasible\" state in the modifyVolumeStatus field.  # noqa: E501171 172        :return: The parameters of this V1VolumeAttributesClass.  # noqa: E501173        :rtype: dict(str, str)174        """175        return self._parameters176 177    @parameters.setter178    def parameters(self, parameters):179        """Sets the parameters of this V1VolumeAttributesClass.180 181        parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass.  This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an \"Infeasible\" state in the modifyVolumeStatus field.  # noqa: E501182 183        :param parameters: The parameters of this V1VolumeAttributesClass.  # noqa: E501184        :type: dict(str, str)185        """186 187        self._parameters = parameters188 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, V1VolumeAttributesClass):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, V1VolumeAttributesClass):231            return True232 233        return self.to_dict() != other.to_dict()234 
codekingpro/portable-devtools · Team Ai