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 V1ConfigMap(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 'binary_data': 'dict(str, str)',38 'data': 'dict(str, str)',39 'immutable': 'bool',40 'kind': 'str',41 'metadata': 'V1ObjectMeta'42 }43 44 attribute_map = {45 'api_version': 'apiVersion',46 'binary_data': 'binaryData',47 'data': 'data',48 'immutable': 'immutable',49 'kind': 'kind',50 'metadata': 'metadata'51 }52 53 def __init__(self, api_version=None, binary_data=None, data=None, immutable=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E50154 """V1ConfigMap - 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._api_version = None60 self._binary_data = None61 self._data = None62 self._immutable = None63 self._kind = None64 self._metadata = None65 self.discriminator = None66 67 if api_version is not None:68 self.api_version = api_version69 if binary_data is not None:70 self.binary_data = binary_data71 if data is not None:72 self.data = data73 if immutable is not None:74 self.immutable = immutable75 if kind is not None:76 self.kind = kind77 if metadata is not None:78 self.metadata = metadata79 80 @property81 def api_version(self):82 """Gets the api_version of this V1ConfigMap. # noqa: E50183 84 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: E50185 86 :return: The api_version of this V1ConfigMap. # noqa: E50187 :rtype: str88 """89 return self._api_version90 91 @api_version.setter92 def api_version(self, api_version):93 """Sets the api_version of this V1ConfigMap.94 95 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: E50196 97 :param api_version: The api_version of this V1ConfigMap. # noqa: E50198 :type: str99 """100 101 self._api_version = api_version102 103 @property104 def binary_data(self):105 """Gets the binary_data of this V1ConfigMap. # noqa: E501106 107 BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. # noqa: E501108 109 :return: The binary_data of this V1ConfigMap. # noqa: E501110 :rtype: dict(str, str)111 """112 return self._binary_data113 114 @binary_data.setter115 def binary_data(self, binary_data):116 """Sets the binary_data of this V1ConfigMap.117 118 BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. # noqa: E501119 120 :param binary_data: The binary_data of this V1ConfigMap. # noqa: E501121 :type: dict(str, str)122 """123 124 self._binary_data = binary_data125 126 @property127 def data(self):128 """Gets the data of this V1ConfigMap. # noqa: E501129 130 Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. # noqa: E501131 132 :return: The data of this V1ConfigMap. # noqa: E501133 :rtype: dict(str, str)134 """135 return self._data136 137 @data.setter138 def data(self, data):139 """Sets the data of this V1ConfigMap.140 141 Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. # noqa: E501142 143 :param data: The data of this V1ConfigMap. # noqa: E501144 :type: dict(str, str)145 """146 147 self._data = data148 149 @property150 def immutable(self):151 """Gets the immutable of this V1ConfigMap. # noqa: E501152 153 Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. # noqa: E501154 155 :return: The immutable of this V1ConfigMap. # noqa: E501156 :rtype: bool157 """158 return self._immutable159 160 @immutable.setter161 def immutable(self, immutable):162 """Sets the immutable of this V1ConfigMap.163 164 Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. # noqa: E501165 166 :param immutable: The immutable of this V1ConfigMap. # noqa: E501167 :type: bool168 """169 170 self._immutable = immutable171 172 @property173 def kind(self):174 """Gets the kind of this V1ConfigMap. # noqa: E501175 176 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: E501177 178 :return: The kind of this V1ConfigMap. # noqa: E501179 :rtype: str180 """181 return self._kind182 183 @kind.setter184 def kind(self, kind):185 """Sets the kind of this V1ConfigMap.186 187 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: E501188 189 :param kind: The kind of this V1ConfigMap. # noqa: E501190 :type: str191 """192 193 self._kind = kind194 195 @property196 def metadata(self):197 """Gets the metadata of this V1ConfigMap. # noqa: E501198 199 200 :return: The metadata of this V1ConfigMap. # noqa: E501201 :rtype: V1ObjectMeta202 """203 return self._metadata204 205 @metadata.setter206 def metadata(self, metadata):207 """Sets the metadata of this V1ConfigMap.208 209 210 :param metadata: The metadata of this V1ConfigMap. # noqa: E501211 :type: V1ObjectMeta212 """213 214 self._metadata = metadata215 216 def to_dict(self):217 """Returns the model properties as a dict"""218 result = {}219 220 for attr, _ in six.iteritems(self.openapi_types):221 value = getattr(self, attr)222 if isinstance(value, list):223 result[attr] = list(map(224 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,225 value226 ))227 elif hasattr(value, "to_dict"):228 result[attr] = value.to_dict()229 elif isinstance(value, dict):230 result[attr] = dict(map(231 lambda item: (item[0], item[1].to_dict())232 if hasattr(item[1], "to_dict") else item,233 value.items()234 ))235 else:236 result[attr] = value237 238 return result239 240 def to_str(self):241 """Returns the string representation of the model"""242 return pprint.pformat(self.to_dict())243 244 def __repr__(self):245 """For `print` and `pprint`"""246 return self.to_str()247 248 def __eq__(self, other):249 """Returns true if both objects are equal"""250 if not isinstance(other, V1ConfigMap):251 return False252 253 return self.to_dict() == other.to_dict()254 255 def __ne__(self, other):256 """Returns true if both objects are not equal"""257 if not isinstance(other, V1ConfigMap):258 return True259 260 return self.to_dict() != other.to_dict()261 