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 ApiextensionsV1beta1ServiceReference(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 = {'name': 'str', 'namespace': 'str', 'path': 'str'} 31 32 attribute_map = {'name': 'name', 'namespace': 'namespace', 'path': 'path'} 33 34 def __init__(self, name=None, namespace=None, path=None): 35 """ 36 ApiextensionsV1beta1ServiceReference - a model defined in Swagger 37 """ 38 39 self._name = None 40 self._namespace = None 41 self._path = None 42 self.discriminator = None 43 44 self.name = name 45 self.namespace = namespace 46 if path is not None: 47 self.path = path 48 49 @property 50 def name(self): 51 """ 52 Gets the name of this ApiextensionsV1beta1ServiceReference. 53 `name` is the name of the service. Required 54 55 :return: The name of this ApiextensionsV1beta1ServiceReference. 56 :rtype: str 57 """ 58 return self._name 59 60 @name.setter 61 def name(self, name): 62 """ 63 Sets the name of this ApiextensionsV1beta1ServiceReference. 64 `name` is the name of the service. Required 65 66 :param name: The name of this ApiextensionsV1beta1ServiceReference. 67 :type: str 68 """ 69 if name is None: 70 raise ValueError('Invalid value for `name`, must not be `None`') 71 72 self._name = name 73 74 @property 75 def namespace(self): 76 """ 77 Gets the namespace of this ApiextensionsV1beta1ServiceReference. 78 `namespace` is the namespace of the service. Required 79 80 :return: The namespace of this ApiextensionsV1beta1ServiceReference. 81 :rtype: str 82 """ 83 return self._namespace 84 85 @namespace.setter 86 def namespace(self, namespace): 87 """ 88 Sets the namespace of this ApiextensionsV1beta1ServiceReference. 89 `namespace` is the namespace of the service. Required 90 91 :param namespace: The namespace of this 92 ApiextensionsV1beta1ServiceReference. 93 :type: str 94 """ 95 if namespace is None: 96 raise ValueError('Invalid value for `namespace`, must not be `None`') 97 98 self._namespace = namespace 99 100 @property 101 def path(self): 102 """ 103 Gets the path of this ApiextensionsV1beta1ServiceReference. 104 `path` is an optional URL path which will be sent in any request to this 105 service. 106 107 :return: The path of this ApiextensionsV1beta1ServiceReference. 108 :rtype: str 109 """ 110 return self._path 111 112 @path.setter 113 def path(self, path): 114 """ 115 Sets the path of this ApiextensionsV1beta1ServiceReference. 116 `path` is an optional URL path which will be sent in any request to this 117 service. 118 119 :param path: The path of this ApiextensionsV1beta1ServiceReference. 120 :type: str 121 """ 122 123 self._path = path 124 125 def to_dict(self): 126 """ 127 Returns the model properties as a dict 128 """ 129 result = {} 130 131 for attr, _ in iteritems(self.swagger_types): 132 value = getattr(self, attr) 133 if isinstance(value, list): 134 result[attr] = list( 135 map(lambda x: x.to_dict() if hasattr(x, 'to_dict') else x, value)) 136 elif hasattr(value, 'to_dict'): 137 result[attr] = value.to_dict() 138 elif isinstance(value, dict): 139 result[attr] = dict( 140 map( 141 lambda item: (item[0], item[1].to_dict()) 142 if hasattr(item[1], 'to_dict') else item, value.items())) 143 else: 144 result[attr] = value 145 146 return result 147 148 def to_str(self): 149 """ 150 Returns the string representation of the model 151 """ 152 return pformat(self.to_dict()) 153 154 def __repr__(self): 155 """ 156 For `print` and `pprint` 157 """ 158 return self.to_str() 159 160 def __eq__(self, other): 161 """ 162 Returns true if both objects are equal 163 """ 164 if not isinstance(other, ApiextensionsV1beta1ServiceReference): 165 return False 166 167 return self.__dict__ == other.__dict__ 168 169 def __ne__(self, other): 170 """ 171 Returns true if both objects are not equal 172 """ 173 return not self == other 174