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 V1AggregationRule(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 = {'cluster_role_selectors': 'list[V1LabelSelector]'} 31 32 attribute_map = {'cluster_role_selectors': 'clusterRoleSelectors'} 33 34 def __init__(self, cluster_role_selectors=None): 35 """ 36 V1AggregationRule - a model defined in Swagger 37 """ 38 39 self._cluster_role_selectors = None 40 self.discriminator = None 41 42 if cluster_role_selectors is not None: 43 self.cluster_role_selectors = cluster_role_selectors 44 45 @property 46 def cluster_role_selectors(self): 47 """ 48 Gets the cluster_role_selectors of this V1AggregationRule. 49 ClusterRoleSelectors holds a list of selectors which will be used to 50 find ClusterRoles and create the rules. If any of the selectors match, 51 then the ClusterRole's permissions will be added 52 53 :return: The cluster_role_selectors of this V1AggregationRule. 54 :rtype: list[V1LabelSelector] 55 """ 56 return self._cluster_role_selectors 57 58 @cluster_role_selectors.setter 59 def cluster_role_selectors(self, cluster_role_selectors): 60 """ 61 Sets the cluster_role_selectors of this V1AggregationRule. 62 ClusterRoleSelectors holds a list of selectors which will be used to 63 find ClusterRoles and create the rules. If any of the selectors match, 64 then the ClusterRole's permissions will be added 65 66 :param cluster_role_selectors: The cluster_role_selectors of this 67 V1AggregationRule. 68 :type: list[V1LabelSelector] 69 """ 70 71 self._cluster_role_selectors = cluster_role_selectors 72 73 def to_dict(self): 74 """ 75 Returns the model properties as a dict 76 """ 77 result = {} 78 79 for attr, _ in iteritems(self.swagger_types): 80 value = getattr(self, attr) 81 if isinstance(value, list): 82 result[attr] = list( 83 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 84 elif hasattr(value, 'to_dict'): 85 result[attr] = value.to_dict() 86 elif isinstance(value, dict): 87 result[attr] = dict( 88 map( 89 lambda item: (item[0], item[1].to_dict()) 90 if hasattr(item[1], 'to_dict') else item, value.items())) 91 else: 92 result[attr] = value 93 94 return result 95 96 def to_str(self): 97 """ 98 Returns the string representation of the model 99 """ 100 return pformat(self.to_dict()) 101 102 def __repr__(self): 103 """ 104 For `print` and `pprint` 105 """ 106 return self.to_str() 107 108 def __eq__(self, other): 109 """ 110 Returns true if both objects are equal 111 """ 112 if not isinstance(other, V1AggregationRule): 113 return False 114 115 return self.__dict__ == other.__dict__ 116 117 def __ne__(self, other): 118 """ 119 Returns true if both objects are not equal 120 """ 121 return not self == other 122