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 V1beta1MutatingWebhookConfiguration(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 'kind': 'str', 33 'metadata': 'V1ObjectMeta', 34 'webhooks': 'list[V1beta1Webhook]' 35 } 36 37 attribute_map = { 38 'api_version': 'apiVersion', 39 'kind': 'kind', 40 'metadata': 'metadata', 41 'webhooks': 'webhooks' 42 } 43 44 def __init__(self, api_version=None, kind=None, metadata=None, webhooks=None): 45 """ 46 V1beta1MutatingWebhookConfiguration - a model defined in Swagger 47 """ 48 49 self._api_version = None 50 self._kind = None 51 self._metadata = None 52 self._webhooks = None 53 self.discriminator = None 54 55 if api_version is not None: 56 self.api_version = api_version 57 if kind is not None: 58 self.kind = kind 59 if metadata is not None: 60 self.metadata = metadata 61 if webhooks is not None: 62 self.webhooks = webhooks 63 64 @property 65 def api_version(self): 66 """ 67 Gets the api_version of this V1beta1MutatingWebhookConfiguration. 68 APIVersion defines the versioned schema of this representation of an 69 object. Servers should convert recognized schemas to the latest internal 70 value, and may reject unrecognized values. More info: 71 https://git.k8s.io/community/contributors/devel/api-conventions.md#resources 72 73 :return: The api_version of this V1beta1MutatingWebhookConfiguration. 74 :rtype: str 75 """ 76 return self._api_version 77 78 @api_version.setter 79 def api_version(self, api_version): 80 """ 81 Sets the api_version of this V1beta1MutatingWebhookConfiguration. 82 APIVersion defines the versioned schema of this representation of an 83 object. Servers should convert recognized schemas to the latest internal 84 value, and may reject unrecognized values. More info: 85 https://git.k8s.io/community/contributors/devel/api-conventions.md#resources 86 87 :param api_version: The api_version of this 88 V1beta1MutatingWebhookConfiguration. 89 :type: str 90 """ 91 92 self._api_version = api_version 93 94 @property 95 def kind(self): 96 """ 97 Gets the kind of this V1beta1MutatingWebhookConfiguration. 98 Kind is a string value representing the REST resource this object 99 represents. Servers may infer this from the endpoint the client submits 100 requests to. Cannot be updated. In CamelCase. More info: 101 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 102 103 :return: The kind of this V1beta1MutatingWebhookConfiguration. 104 :rtype: str 105 """ 106 return self._kind 107 108 @kind.setter 109 def kind(self, kind): 110 """ 111 Sets the kind of this V1beta1MutatingWebhookConfiguration. 112 Kind is a string value representing the REST resource this object 113 represents. Servers may infer this from the endpoint the client submits 114 requests to. Cannot be updated. In CamelCase. More info: 115 https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds 116 117 :param kind: The kind of this V1beta1MutatingWebhookConfiguration. 118 :type: str 119 """ 120 121 self._kind = kind 122 123 @property 124 def metadata(self): 125 """ 126 Gets the metadata of this V1beta1MutatingWebhookConfiguration. 127 Standard object metadata; More info: 128 https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. 129 130 :return: The metadata of this V1beta1MutatingWebhookConfiguration. 131 :rtype: V1ObjectMeta 132 """ 133 return self._metadata 134 135 @metadata.setter 136 def metadata(self, metadata): 137 """ 138 Sets the metadata of this V1beta1MutatingWebhookConfiguration. 139 Standard object metadata; More info: 140 https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata. 141 142 :param metadata: The metadata of this 143 V1beta1MutatingWebhookConfiguration. 144 :type: V1ObjectMeta 145 """ 146 147 self._metadata = metadata 148 149 @property 150 def webhooks(self): 151 """ 152 Gets the webhooks of this V1beta1MutatingWebhookConfiguration. 153 Webhooks is a list of webhooks and the affected resources and 154 operations. 155 156 :return: The webhooks of this V1beta1MutatingWebhookConfiguration. 157 :rtype: list[V1beta1Webhook] 158 """ 159 return self._webhooks 160 161 @webhooks.setter 162 def webhooks(self, webhooks): 163 """ 164 Sets the webhooks of this V1beta1MutatingWebhookConfiguration. 165 Webhooks is a list of webhooks and the affected resources and 166 operations. 167 168 :param webhooks: The webhooks of this 169 V1beta1MutatingWebhookConfiguration. 170 :type: list[V1beta1Webhook] 171 """ 172 173 self._webhooks = webhooks 174 175 def to_dict(self): 176 """ 177 Returns the model properties as a dict 178 """ 179 result = {} 180 181 for attr, _ in iteritems(self.swagger_types): 182 value = getattr(self, attr) 183 if isinstance(value, list): 184 result[attr] = list( 185 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 186 elif hasattr(value, 'to_dict'): 187 result[attr] = value.to_dict() 188 elif isinstance(value, dict): 189 result[attr] = dict( 190 map( 191 lambda item: (item[0], item[1].to_dict()) 192 if hasattr(item[1], 'to_dict') else item, value.items())) 193 else: 194 result[attr] = value 195 196 return result 197 198 def to_str(self): 199 """ 200 Returns the string representation of the model 201 """ 202 return pformat(self.to_dict()) 203 204 def __repr__(self): 205 """ 206 For `print` and `pprint` 207 """ 208 return self.to_str() 209 210 def __eq__(self, other): 211 """ 212 Returns true if both objects are equal 213 """ 214 if not isinstance(other, V1beta1MutatingWebhookConfiguration): 215 return False 216 217 return self.__dict__ == other.__dict__ 218 219 def __ne__(self, other): 220 """ 221 Returns true if both objects are not equal 222 """ 223 return not self == other 224