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 V1CounterSet(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 'counters': 'dict(str, V1Counter)',37 'name': 'str'38 }39 40 attribute_map = {41 'counters': 'counters',42 'name': 'name'43 }44 45 def __init__(self, counters=None, name=None, local_vars_configuration=None): # noqa: E50146 """V1CounterSet - a model defined in OpenAPI""" # noqa: E50147 if local_vars_configuration is None:48 local_vars_configuration = Configuration()49 self.local_vars_configuration = local_vars_configuration50 51 self._counters = None52 self._name = None53 self.discriminator = None54 55 self.counters = counters56 self.name = name57 58 @property59 def counters(self):60 """Gets the counters of this V1CounterSet. # noqa: E50161 62 Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters is 32. # noqa: E50163 64 :return: The counters of this V1CounterSet. # noqa: E50165 :rtype: dict(str, V1Counter)66 """67 return self._counters68 69 @counters.setter70 def counters(self, counters):71 """Sets the counters of this V1CounterSet.72 73 Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters is 32. # noqa: E50174 75 :param counters: The counters of this V1CounterSet. # noqa: E50176 :type: dict(str, V1Counter)77 """78 if self.local_vars_configuration.client_side_validation and counters is None: # noqa: E50179 raise ValueError("Invalid value for `counters`, must not be `None`") # noqa: E50180 81 self._counters = counters82 83 @property84 def name(self):85 """Gets the name of this V1CounterSet. # noqa: E50186 87 Name defines the name of the counter set. It must be a DNS label. # noqa: E50188 89 :return: The name of this V1CounterSet. # noqa: E50190 :rtype: str91 """92 return self._name93 94 @name.setter95 def name(self, name):96 """Sets the name of this V1CounterSet.97 98 Name defines the name of the counter set. It must be a DNS label. # noqa: E50199 100 :param name: The name of this V1CounterSet. # noqa: E501101 :type: str102 """103 if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501104 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501105 106 self._name = name107 108 def to_dict(self):109 """Returns the model properties as a dict"""110 result = {}111 112 for attr, _ in six.iteritems(self.openapi_types):113 value = getattr(self, attr)114 if isinstance(value, list):115 result[attr] = list(map(116 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,117 value118 ))119 elif hasattr(value, "to_dict"):120 result[attr] = value.to_dict()121 elif isinstance(value, dict):122 result[attr] = dict(map(123 lambda item: (item[0], item[1].to_dict())124 if hasattr(item[1], "to_dict") else item,125 value.items()126 ))127 else:128 result[attr] = value129 130 return result131 132 def to_str(self):133 """Returns the string representation of the model"""134 return pprint.pformat(self.to_dict())135 136 def __repr__(self):137 """For `print` and `pprint`"""138 return self.to_str()139 140 def __eq__(self, other):141 """Returns true if both objects are equal"""142 if not isinstance(other, V1CounterSet):143 return False144 145 return self.to_dict() == other.to_dict()146 147 def __ne__(self, other):148 """Returns true if both objects are not equal"""149 if not isinstance(other, V1CounterSet):150 return True151 152 return self.to_dict() != other.to_dict()153 