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 V1ComponentStatus(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 'conditions': 'list[V1ComponentCondition]',38 'kind': 'str',39 'metadata': 'V1ObjectMeta'40 }41 42 attribute_map = {43 'api_version': 'apiVersion',44 'conditions': 'conditions',45 'kind': 'kind',46 'metadata': 'metadata'47 }48 49 def __init__(self, api_version=None, conditions=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E50150 """V1ComponentStatus - 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._conditions = None57 self._kind = None58 self._metadata = None59 self.discriminator = None60 61 if api_version is not None:62 self.api_version = api_version63 if conditions is not None:64 self.conditions = conditions65 if kind is not None:66 self.kind = kind67 if metadata is not None:68 self.metadata = metadata69 70 @property71 def api_version(self):72 """Gets the api_version of this V1ComponentStatus. # noqa: E50173 74 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: E50175 76 :return: The api_version of this V1ComponentStatus. # noqa: E50177 :rtype: str78 """79 return self._api_version80 81 @api_version.setter82 def api_version(self, api_version):83 """Sets the api_version of this V1ComponentStatus.84 85 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: E50186 87 :param api_version: The api_version of this V1ComponentStatus. # noqa: E50188 :type: str89 """90 91 self._api_version = api_version92 93 @property94 def conditions(self):95 """Gets the conditions of this V1ComponentStatus. # noqa: E50196 97 List of component conditions observed # noqa: E50198 99 :return: The conditions of this V1ComponentStatus. # noqa: E501100 :rtype: list[V1ComponentCondition]101 """102 return self._conditions103 104 @conditions.setter105 def conditions(self, conditions):106 """Sets the conditions of this V1ComponentStatus.107 108 List of component conditions observed # noqa: E501109 110 :param conditions: The conditions of this V1ComponentStatus. # noqa: E501111 :type: list[V1ComponentCondition]112 """113 114 self._conditions = conditions115 116 @property117 def kind(self):118 """Gets the kind of this V1ComponentStatus. # noqa: E501119 120 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: E501121 122 :return: The kind of this V1ComponentStatus. # noqa: E501123 :rtype: str124 """125 return self._kind126 127 @kind.setter128 def kind(self, kind):129 """Sets the kind of this V1ComponentStatus.130 131 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: E501132 133 :param kind: The kind of this V1ComponentStatus. # noqa: E501134 :type: str135 """136 137 self._kind = kind138 139 @property140 def metadata(self):141 """Gets the metadata of this V1ComponentStatus. # noqa: E501142 143 144 :return: The metadata of this V1ComponentStatus. # noqa: E501145 :rtype: V1ObjectMeta146 """147 return self._metadata148 149 @metadata.setter150 def metadata(self, metadata):151 """Sets the metadata of this V1ComponentStatus.152 153 154 :param metadata: The metadata of this V1ComponentStatus. # noqa: E501155 :type: V1ObjectMeta156 """157 158 self._metadata = metadata159 160 def to_dict(self):161 """Returns the model properties as a dict"""162 result = {}163 164 for attr, _ in six.iteritems(self.openapi_types):165 value = getattr(self, attr)166 if isinstance(value, list):167 result[attr] = list(map(168 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,169 value170 ))171 elif hasattr(value, "to_dict"):172 result[attr] = value.to_dict()173 elif isinstance(value, dict):174 result[attr] = dict(map(175 lambda item: (item[0], item[1].to_dict())176 if hasattr(item[1], "to_dict") else item,177 value.items()178 ))179 else:180 result[attr] = value181 182 return result183 184 def to_str(self):185 """Returns the string representation of the model"""186 return pprint.pformat(self.to_dict())187 188 def __repr__(self):189 """For `print` and `pprint`"""190 return self.to_str()191 192 def __eq__(self, other):193 """Returns true if both objects are equal"""194 if not isinstance(other, V1ComponentStatus):195 return False196 197 return self.to_dict() == other.to_dict()198 199 def __ne__(self, other):200 """Returns true if both objects are not equal"""201 if not isinstance(other, V1ComponentStatus):202 return True203 204 return self.to_dict() != other.to_dict()205 