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 V1ServerAddressByClientCIDR(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 = {'client_cidr': 'str', 'server_address': 'str'} 31 32 attribute_map = { 33 'client_cidr': 'clientCIDR', 34 'server_address': 'serverAddress' 35 } 36 37 def __init__(self, client_cidr=None, server_address=None): 38 """ 39 V1ServerAddressByClientCIDR - a model defined in Swagger 40 """ 41 42 self._client_cidr = None 43 self._server_address = None 44 self.discriminator = None 45 46 self.client_cidr = client_cidr 47 self.server_address = server_address 48 49 @property 50 def client_cidr(self): 51 """ 52 Gets the client_cidr of this V1ServerAddressByClientCIDR. 53 The CIDR with which clients can match their IP to figure out the server 54 address that they should use. 55 56 :return: The client_cidr of this V1ServerAddressByClientCIDR. 57 :rtype: str 58 """ 59 return self._client_cidr 60 61 @client_cidr.setter 62 def client_cidr(self, client_cidr): 63 """ 64 Sets the client_cidr of this V1ServerAddressByClientCIDR. 65 The CIDR with which clients can match their IP to figure out the server 66 address that they should use. 67 68 :param client_cidr: The client_cidr of this V1ServerAddressByClientCIDR. 69 :type: str 70 """ 71 if client_cidr is None: 72 raise ValueError('Invalid value for `client_cidr`, must not be `None`') 73 74 self._client_cidr = client_cidr 75 76 @property 77 def server_address(self): 78 """ 79 Gets the server_address of this V1ServerAddressByClientCIDR. 80 Address of this server, suitable for a client that matches the above 81 CIDR. This can be a hostname, hostname:port, IP or IP:port. 82 83 :return: The server_address of this V1ServerAddressByClientCIDR. 84 :rtype: str 85 """ 86 return self._server_address 87 88 @server_address.setter 89 def server_address(self, server_address): 90 """ 91 Sets the server_address of this V1ServerAddressByClientCIDR. 92 Address of this server, suitable for a client that matches the above 93 CIDR. This can be a hostname, hostname:port, IP or IP:port. 94 95 :param server_address: The server_address of this 96 V1ServerAddressByClientCIDR. 97 :type: str 98 """ 99 if server_address is None: 100 raise ValueError('Invalid value for `server_address`, must not be `None`') 101 102 self._server_address = server_address 103 104 def to_dict(self): 105 """ 106 Returns the model properties as a dict 107 """ 108 result = {} 109 110 for attr, _ in iteritems(self.swagger_types): 111 value = getattr(self, attr) 112 if isinstance(value, list): 113 result[attr] = list( 114 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 115 elif hasattr(value, 'to_dict'): 116 result[attr] = value.to_dict() 117 elif isinstance(value, dict): 118 result[attr] = dict( 119 map( 120 lambda item: (item[0], item[1].to_dict()) 121 if hasattr(item[1], 'to_dict') else item, value.items())) 122 else: 123 result[attr] = value 124 125 return result 126 127 def to_str(self): 128 """ 129 Returns the string representation of the model 130 """ 131 return pformat(self.to_dict()) 132 133 def __repr__(self): 134 """ 135 For `print` and `pprint` 136 """ 137 return self.to_str() 138 139 def __eq__(self, other): 140 """ 141 Returns true if both objects are equal 142 """ 143 if not isinstance(other, V1ServerAddressByClientCIDR): 144 return False 145 146 return self.__dict__ == other.__dict__ 147 148 def __ne__(self, other): 149 """ 150 Returns true if both objects are not equal 151 """ 152 return not self == other 153