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 V2ObjectMetricStatus(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 'current': 'V2MetricValueStatus',37 'described_object': 'V2CrossVersionObjectReference',38 'metric': 'V2MetricIdentifier'39 }40 41 attribute_map = {42 'current': 'current',43 'described_object': 'describedObject',44 'metric': 'metric'45 }46 47 def __init__(self, current=None, described_object=None, metric=None, local_vars_configuration=None): # noqa: E50148 """V2ObjectMetricStatus - 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._current = None54 self._described_object = None55 self._metric = None56 self.discriminator = None57 58 self.current = current59 self.described_object = described_object60 self.metric = metric61 62 @property63 def current(self):64 """Gets the current of this V2ObjectMetricStatus. # noqa: E50165 66 67 :return: The current of this V2ObjectMetricStatus. # noqa: E50168 :rtype: V2MetricValueStatus69 """70 return self._current71 72 @current.setter73 def current(self, current):74 """Sets the current of this V2ObjectMetricStatus.75 76 77 :param current: The current of this V2ObjectMetricStatus. # noqa: E50178 :type: V2MetricValueStatus79 """80 if self.local_vars_configuration.client_side_validation and current is None: # noqa: E50181 raise ValueError("Invalid value for `current`, must not be `None`") # noqa: E50182 83 self._current = current84 85 @property86 def described_object(self):87 """Gets the described_object of this V2ObjectMetricStatus. # noqa: E50188 89 90 :return: The described_object of this V2ObjectMetricStatus. # noqa: E50191 :rtype: V2CrossVersionObjectReference92 """93 return self._described_object94 95 @described_object.setter96 def described_object(self, described_object):97 """Sets the described_object of this V2ObjectMetricStatus.98 99 100 :param described_object: The described_object of this V2ObjectMetricStatus. # noqa: E501101 :type: V2CrossVersionObjectReference102 """103 if self.local_vars_configuration.client_side_validation and described_object is None: # noqa: E501104 raise ValueError("Invalid value for `described_object`, must not be `None`") # noqa: E501105 106 self._described_object = described_object107 108 @property109 def metric(self):110 """Gets the metric of this V2ObjectMetricStatus. # noqa: E501111 112 113 :return: The metric of this V2ObjectMetricStatus. # noqa: E501114 :rtype: V2MetricIdentifier115 """116 return self._metric117 118 @metric.setter119 def metric(self, metric):120 """Sets the metric of this V2ObjectMetricStatus.121 122 123 :param metric: The metric of this V2ObjectMetricStatus. # noqa: E501124 :type: V2MetricIdentifier125 """126 if self.local_vars_configuration.client_side_validation and metric is None: # noqa: E501127 raise ValueError("Invalid value for `metric`, must not be `None`") # noqa: E501128 129 self._metric = metric130 131 def to_dict(self):132 """Returns the model properties as a dict"""133 result = {}134 135 for attr, _ in six.iteritems(self.openapi_types):136 value = getattr(self, attr)137 if isinstance(value, list):138 result[attr] = list(map(139 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,140 value141 ))142 elif hasattr(value, "to_dict"):143 result[attr] = value.to_dict()144 elif isinstance(value, dict):145 result[attr] = dict(map(146 lambda item: (item[0], item[1].to_dict())147 if hasattr(item[1], "to_dict") else item,148 value.items()149 ))150 else:151 result[attr] = value152 153 return result154 155 def to_str(self):156 """Returns the string representation of the model"""157 return pprint.pformat(self.to_dict())158 159 def __repr__(self):160 """For `print` and `pprint`"""161 return self.to_str()162 163 def __eq__(self, other):164 """Returns true if both objects are equal"""165 if not isinstance(other, V2ObjectMetricStatus):166 return False167 168 return self.to_dict() == other.to_dict()169 170 def __ne__(self, other):171 """Returns true if both objects are not equal"""172 if not isinstance(other, V2ObjectMetricStatus):173 return True174 175 return self.to_dict() != other.to_dict()176 