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 V1GlusterfsVolumeSource(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 'endpoints': 'str',37 'path': 'str',38 'read_only': 'bool'39 }40 41 attribute_map = {42 'endpoints': 'endpoints',43 'path': 'path',44 'read_only': 'readOnly'45 }46 47 def __init__(self, endpoints=None, path=None, read_only=None, local_vars_configuration=None): # noqa: E50148 """V1GlusterfsVolumeSource - a model defined in OpenAPI""" # noqa: E50149 if local_vars_configuration is None:50 local_vars_configuration = Configuration()51 self.local_vars_configuration = local_vars_configuration52 53 self._endpoints = None54 self._path = None55 self._read_only = None56 self.discriminator = None57 58 self.endpoints = endpoints59 self.path = path60 if read_only is not None:61 self.read_only = read_only62 63 @property64 def endpoints(self):65 """Gets the endpoints of this V1GlusterfsVolumeSource. # noqa: E50166 67 endpoints is the endpoint name that details Glusterfs topology. # noqa: E50168 69 :return: The endpoints of this V1GlusterfsVolumeSource. # noqa: E50170 :rtype: str71 """72 return self._endpoints73 74 @endpoints.setter75 def endpoints(self, endpoints):76 """Sets the endpoints of this V1GlusterfsVolumeSource.77 78 endpoints is the endpoint name that details Glusterfs topology. # noqa: E50179 80 :param endpoints: The endpoints of this V1GlusterfsVolumeSource. # noqa: E50181 :type: str82 """83 if self.local_vars_configuration.client_side_validation and endpoints is None: # noqa: E50184 raise ValueError("Invalid value for `endpoints`, must not be `None`") # noqa: E50185 86 self._endpoints = endpoints87 88 @property89 def path(self):90 """Gets the path of this V1GlusterfsVolumeSource. # noqa: E50191 92 path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod # noqa: E50193 94 :return: The path of this V1GlusterfsVolumeSource. # noqa: E50195 :rtype: str96 """97 return self._path98 99 @path.setter100 def path(self, path):101 """Sets the path of this V1GlusterfsVolumeSource.102 103 path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod # noqa: E501104 105 :param path: The path of this V1GlusterfsVolumeSource. # noqa: E501106 :type: str107 """108 if self.local_vars_configuration.client_side_validation and path is None: # noqa: E501109 raise ValueError("Invalid value for `path`, must not be `None`") # noqa: E501110 111 self._path = path112 113 @property114 def read_only(self):115 """Gets the read_only of this V1GlusterfsVolumeSource. # noqa: E501116 117 readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod # noqa: E501118 119 :return: The read_only of this V1GlusterfsVolumeSource. # noqa: E501120 :rtype: bool121 """122 return self._read_only123 124 @read_only.setter125 def read_only(self, read_only):126 """Sets the read_only of this V1GlusterfsVolumeSource.127 128 readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod # noqa: E501129 130 :param read_only: The read_only of this V1GlusterfsVolumeSource. # noqa: E501131 :type: bool132 """133 134 self._read_only = read_only135 136 def to_dict(self):137 """Returns the model properties as a dict"""138 result = {}139 140 for attr, _ in six.iteritems(self.openapi_types):141 value = getattr(self, attr)142 if isinstance(value, list):143 result[attr] = list(map(144 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,145 value146 ))147 elif hasattr(value, "to_dict"):148 result[attr] = value.to_dict()149 elif isinstance(value, dict):150 result[attr] = dict(map(151 lambda item: (item[0], item[1].to_dict())152 if hasattr(item[1], "to_dict") else item,153 value.items()154 ))155 else:156 result[attr] = value157 158 return result159 160 def to_str(self):161 """Returns the string representation of the model"""162 return pprint.pformat(self.to_dict())163 164 def __repr__(self):165 """For `print` and `pprint`"""166 return self.to_str()167 168 def __eq__(self, other):169 """Returns true if both objects are equal"""170 if not isinstance(other, V1GlusterfsVolumeSource):171 return False172 173 return self.to_dict() == other.to_dict()174 175 def __ne__(self, other):176 """Returns true if both objects are not equal"""177 if not isinstance(other, V1GlusterfsVolumeSource):178 return True179 180 return self.to_dict() != other.to_dict()181 