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 V1RoleRef(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_group': 'str',37 'kind': 'str',38 'name': 'str'39 }40 41 attribute_map = {42 'api_group': 'apiGroup',43 'kind': 'kind',44 'name': 'name'45 }46 47 def __init__(self, api_group=None, kind=None, name=None, local_vars_configuration=None): # noqa: E50148 """V1RoleRef - 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._api_group = None54 self._kind = None55 self._name = None56 self.discriminator = None57 58 self.api_group = api_group59 self.kind = kind60 self.name = name61 62 @property63 def api_group(self):64 """Gets the api_group of this V1RoleRef. # noqa: E50165 66 APIGroup is the group for the resource being referenced # noqa: E50167 68 :return: The api_group of this V1RoleRef. # noqa: E50169 :rtype: str70 """71 return self._api_group72 73 @api_group.setter74 def api_group(self, api_group):75 """Sets the api_group of this V1RoleRef.76 77 APIGroup is the group for the resource being referenced # noqa: E50178 79 :param api_group: The api_group of this V1RoleRef. # noqa: E50180 :type: str81 """82 if self.local_vars_configuration.client_side_validation and api_group is None: # noqa: E50183 raise ValueError("Invalid value for `api_group`, must not be `None`") # noqa: E50184 85 self._api_group = api_group86 87 @property88 def kind(self):89 """Gets the kind of this V1RoleRef. # noqa: E50190 91 Kind is the type of resource being referenced # noqa: E50192 93 :return: The kind of this V1RoleRef. # noqa: E50194 :rtype: str95 """96 return self._kind97 98 @kind.setter99 def kind(self, kind):100 """Sets the kind of this V1RoleRef.101 102 Kind is the type of resource being referenced # noqa: E501103 104 :param kind: The kind of this V1RoleRef. # noqa: E501105 :type: str106 """107 if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501108 raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501109 110 self._kind = kind111 112 @property113 def name(self):114 """Gets the name of this V1RoleRef. # noqa: E501115 116 Name is the name of resource being referenced # noqa: E501117 118 :return: The name of this V1RoleRef. # noqa: E501119 :rtype: str120 """121 return self._name122 123 @name.setter124 def name(self, name):125 """Sets the name of this V1RoleRef.126 127 Name is the name of resource being referenced # noqa: E501128 129 :param name: The name of this V1RoleRef. # noqa: E501130 :type: str131 """132 if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501133 raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501134 135 self._name = name136 137 def to_dict(self):138 """Returns the model properties as a dict"""139 result = {}140 141 for attr, _ in six.iteritems(self.openapi_types):142 value = getattr(self, attr)143 if isinstance(value, list):144 result[attr] = list(map(145 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,146 value147 ))148 elif hasattr(value, "to_dict"):149 result[attr] = value.to_dict()150 elif isinstance(value, dict):151 result[attr] = dict(map(152 lambda item: (item[0], item[1].to_dict())153 if hasattr(item[1], "to_dict") else item,154 value.items()155 ))156 else:157 result[attr] = value158 159 return result160 161 def to_str(self):162 """Returns the string representation of the model"""163 return pprint.pformat(self.to_dict())164 165 def __repr__(self):166 """For `print` and `pprint`"""167 return self.to_str()168 169 def __eq__(self, other):170 """Returns true if both objects are equal"""171 if not isinstance(other, V1RoleRef):172 return False173 174 return self.to_dict() == other.to_dict()175 176 def __ne__(self, other):177 """Returns true if both objects are not equal"""178 if not isinstance(other, V1RoleRef):179 return True180 181 return self.to_dict() != other.to_dict()182 