1# coding: utf-8 2""" 3 Kubernetes 4 5 No description provided (generated by Swagger Codegen 6 https://github.com/swagger-api/swagger-codegen) 7 8 OpenAPI spec version: v1.14.4 9 10 Generated by: https://github.com/swagger-api/swagger-codegen.git 11""" 12 13from pprint import pformat 14from six import iteritems 15import re 16 17 18class V1ReplicaSetList(object): 19 """ 20 NOTE: This class is auto generated by the swagger code generator program. 21 Do not edit the class manually. 22 """ 23 """ 24 Attributes: 25 swagger_types (dict): The key is attribute name and the value is attribute 26 type. 27 attribute_map (dict): The key is attribute name and the value is json key 28 in definition. 29 """ 30 swagger_types = { 31 'api_version': 'str', 32 'items': 'list[V1ReplicaSet]', 33 'kind': 'str', 34 'metadata': 'V1ListMeta' 35 } 36 37 attribute_map = { 38 'api_version': 'apiVersion', 39 'items': 'items', 40 'kind': 'kind', 41 'metadata': 'metadata' 42 } 43 44 def __init__(self, api_version=None, items=None, kind=None, metadata=None): 45 """ 46 V1ReplicaSetList - a model defined in Swagger 47 """ 48 49 self._api_version = None 50 self._items = None 51 self._kind = None 52 self._metadata = None 53 self.discriminator = None 54 55 if api_version is not None: 56 self.api_version = api_version 57 self.items = items 58 if kind is not None: 59 self.kind = kind 60 if metadata is not None: 61 self.metadata = metadata 62 63 @property 64 def api_version(self): 65 """ 66 Gets the api_version of this V1ReplicaSetList. 67 APIVersion defines the versioned schema of this representation of an 68 object. Servers should convert recognized schemas to the latest internal 69 value, and may reject unrecognized values. More info: 70 https://git.k8s.io/community/contributors/devel/api-conventions.md#resources 71 72 :return: The api_version of this V1ReplicaSetList. 73 :rtype: str 74 """ 75 return self._api_version 76 77 @api_version.setter 78 def api_version(self, api_version): 79 """ 80 Sets the api_version of this V1ReplicaSetList. 81 APIVersion defines the versioned schema of this representation of an 82 object. Servers should convert recognized schemas to the latest internal 83 value, and may reject unrecognized values. More info: 84 https://git.k8s.io/community/contributors/devel/api-conventions.md#resources 85 86 :param api_version: The api_version of this V1ReplicaSetList. 87 :type: str 88 """ 89 90 self._api_version = api_version 91 92 @property 93 def items(self): 94 """ 95 Gets the items of this V1ReplicaSetList. 96 List of ReplicaSets. More info: 97 https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller 98 99 :return: The items of this V1ReplicaSetList. 100 :rtype: list[V1ReplicaSet] 101 """ 102 return self._items 103 104 @items.setter 105 def items(self, items): 106 """ 107 Sets the items of this V1ReplicaSetList. 108 List of ReplicaSets. More info: 109 https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller 110 111 :param items: The items of this V1ReplicaSetList. 112 :type: list[V1ReplicaSet] 113 """ 114 if items is None: 115 raise ValueError('Invalid value for `items`, must not be `None`') 116 117 self._items = items 118 119 @property 120 def kind(self): 121 """ 122 Gets the kind of this V1ReplicaSetList. 123 Kind is a string value representing the REST resource this object 124 represents. Servers may infer this from the endpoint the client submits 125 requests to. Cannot be updated. In CamelCase. More info: 126 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 127 128 :return: The kind of this V1ReplicaSetList. 129 :rtype: str 130 """ 131 return self._kind 132 133 @kind.setter 134 def kind(self, kind): 135 """ 136 Sets the kind of this V1ReplicaSetList. 137 Kind is a string value representing the REST resource this object 138 represents. Servers may infer this from the endpoint the client submits 139 requests to. Cannot be updated. In CamelCase. More info: 140 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 141 142 :param kind: The kind of this V1ReplicaSetList. 143 :type: str 144 """ 145 146 self._kind = kind 147 148 @property 149 def metadata(self): 150 """ 151 Gets the metadata of this V1ReplicaSetList. 152 Standard list metadata. More info: 153 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 154 155 :return: The metadata of this V1ReplicaSetList. 156 :rtype: V1ListMeta 157 """ 158 return self._metadata 159 160 @metadata.setter 161 def metadata(self, metadata): 162 """ 163 Sets the metadata of this V1ReplicaSetList. 164 Standard list metadata. More info: 165 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 166 167 :param metadata: The metadata of this V1ReplicaSetList. 168 :type: V1ListMeta 169 """ 170 171 self._metadata = metadata 172 173 def to_dict(self): 174 """ 175 Returns the model properties as a dict 176 """ 177 result = {} 178 179 for attr, _ in iteritems(self.swagger_types): 180 value = getattr(self, attr) 181 if isinstance(value, list): 182 result[attr] = list( 183 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 184 elif hasattr(value, 'to_dict'): 185 result[attr] = value.to_dict() 186 elif isinstance(value, dict): 187 result[attr] = dict( 188 map( 189 lambda item: (item[0], item[1].to_dict()) 190 if hasattr(item[1], 'to_dict') else item, value.items())) 191 else: 192 result[attr] = value 193 194 return result 195 196 def to_str(self): 197 """ 198 Returns the string representation of the model 199 """ 200 return pformat(self.to_dict()) 201 202 def __repr__(self): 203 """ 204 For `print` and `pprint` 205 """ 206 return self.to_str() 207 208 def __eq__(self, other): 209 """ 210 Returns true if both objects are equal 211 """ 212 if not isinstance(other, V1ReplicaSetList): 213 return False 214 215 return self.__dict__ == other.__dict__ 216 217 def __ne__(self, other): 218 """ 219 Returns true if both objects are not equal 220 """ 221 return not self == other 222