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 V1beta2ResourceSlice(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 'kind': 'str',38 'metadata': 'V1ObjectMeta',39 'spec': 'V1beta2ResourceSliceSpec'40 }41 42 attribute_map = {43 'api_version': 'apiVersion',44 'kind': 'kind',45 'metadata': 'metadata',46 'spec': 'spec'47 }48 49 def __init__(self, api_version=None, kind=None, metadata=None, spec=None, local_vars_configuration=None): # noqa: E50150 """V1beta2ResourceSlice - a model defined in OpenAPI""" # noqa: E50151 if local_vars_configuration is None:52 local_vars_configuration = Configuration()53 self.local_vars_configuration = local_vars_configuration54 55 self._api_version = None56 self._kind = None57 self._metadata = None58 self._spec = None59 self.discriminator = None60 61 if api_version is not None:62 self.api_version = api_version63 if kind is not None:64 self.kind = kind65 if metadata is not None:66 self.metadata = metadata67 self.spec = spec68 69 @property70 def api_version(self):71 """Gets the api_version of this V1beta2ResourceSlice. # noqa: E50172 73 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: E50174 75 :return: The api_version of this V1beta2ResourceSlice. # noqa: E50176 :rtype: str77 """78 return self._api_version79 80 @api_version.setter81 def api_version(self, api_version):82 """Sets the api_version of this V1beta2ResourceSlice.83 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 :param api_version: The api_version of this V1beta2ResourceSlice. # noqa: E50187 :type: str88 """89 90 self._api_version = api_version91 92 @property93 def kind(self):94 """Gets the kind of this V1beta2ResourceSlice. # noqa: E50195 96 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: E50197 98 :return: The kind of this V1beta2ResourceSlice. # noqa: E50199 :rtype: str100 """101 return self._kind102 103 @kind.setter104 def kind(self, kind):105 """Sets the kind of this V1beta2ResourceSlice.106 107 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: E501108 109 :param kind: The kind of this V1beta2ResourceSlice. # noqa: E501110 :type: str111 """112 113 self._kind = kind114 115 @property116 def metadata(self):117 """Gets the metadata of this V1beta2ResourceSlice. # noqa: E501118 119 120 :return: The metadata of this V1beta2ResourceSlice. # noqa: E501121 :rtype: V1ObjectMeta122 """123 return self._metadata124 125 @metadata.setter126 def metadata(self, metadata):127 """Sets the metadata of this V1beta2ResourceSlice.128 129 130 :param metadata: The metadata of this V1beta2ResourceSlice. # noqa: E501131 :type: V1ObjectMeta132 """133 134 self._metadata = metadata135 136 @property137 def spec(self):138 """Gets the spec of this V1beta2ResourceSlice. # noqa: E501139 140 141 :return: The spec of this V1beta2ResourceSlice. # noqa: E501142 :rtype: V1beta2ResourceSliceSpec143 """144 return self._spec145 146 @spec.setter147 def spec(self, spec):148 """Sets the spec of this V1beta2ResourceSlice.149 150 151 :param spec: The spec of this V1beta2ResourceSlice. # noqa: E501152 :type: V1beta2ResourceSliceSpec153 """154 if self.local_vars_configuration.client_side_validation and spec is None: # noqa: E501155 raise ValueError("Invalid value for `spec`, must not be `None`") # noqa: E501156 157 self._spec = spec158 159 def to_dict(self):160 """Returns the model properties as a dict"""161 result = {}162 163 for attr, _ in six.iteritems(self.openapi_types):164 value = getattr(self, attr)165 if isinstance(value, list):166 result[attr] = list(map(167 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,168 value169 ))170 elif hasattr(value, "to_dict"):171 result[attr] = value.to_dict()172 elif isinstance(value, dict):173 result[attr] = dict(map(174 lambda item: (item[0], item[1].to_dict())175 if hasattr(item[1], "to_dict") else item,176 value.items()177 ))178 else:179 result[attr] = value180 181 return result182 183 def to_str(self):184 """Returns the string representation of the model"""185 return pprint.pformat(self.to_dict())186 187 def __repr__(self):188 """For `print` and `pprint`"""189 return self.to_str()190 191 def __eq__(self, other):192 """Returns true if both objects are equal"""193 if not isinstance(other, V1beta2ResourceSlice):194 return False195 196 return self.to_dict() == other.to_dict()197 198 def __ne__(self, other):199 """Returns true if both objects are not equal"""200 if not isinstance(other, V1beta2ResourceSlice):201 return True202 203 return self.to_dict() != other.to_dict()204 