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 V1APIServiceSpec(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 'ca_bundle': 'str',37 'group': 'str',38 'group_priority_minimum': 'int',39 'insecure_skip_tls_verify': 'bool',40 'service': 'ApiregistrationV1ServiceReference',41 'version': 'str',42 'version_priority': 'int'43 }44 45 attribute_map = {46 'ca_bundle': 'caBundle',47 'group': 'group',48 'group_priority_minimum': 'groupPriorityMinimum',49 'insecure_skip_tls_verify': 'insecureSkipTLSVerify',50 'service': 'service',51 'version': 'version',52 'version_priority': 'versionPriority'53 }54 55 def __init__(self, ca_bundle=None, group=None, group_priority_minimum=None, insecure_skip_tls_verify=None, service=None, version=None, version_priority=None, local_vars_configuration=None): # noqa: E50156 """V1APIServiceSpec - a model defined in OpenAPI""" # noqa: E50157 if local_vars_configuration is None:58 local_vars_configuration = Configuration()59 self.local_vars_configuration = local_vars_configuration60 61 self._ca_bundle = None62 self._group = None63 self._group_priority_minimum = None64 self._insecure_skip_tls_verify = None65 self._service = None66 self._version = None67 self._version_priority = None68 self.discriminator = None69 70 if ca_bundle is not None:71 self.ca_bundle = ca_bundle72 if group is not None:73 self.group = group74 self.group_priority_minimum = group_priority_minimum75 if insecure_skip_tls_verify is not None:76 self.insecure_skip_tls_verify = insecure_skip_tls_verify77 if service is not None:78 self.service = service79 if version is not None:80 self.version = version81 self.version_priority = version_priority82 83 @property84 def ca_bundle(self):85 """Gets the ca_bundle of this V1APIServiceSpec. # noqa: E50186 87 CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. # noqa: E50188 89 :return: The ca_bundle of this V1APIServiceSpec. # noqa: E50190 :rtype: str91 """92 return self._ca_bundle93 94 @ca_bundle.setter95 def ca_bundle(self, ca_bundle):96 """Sets the ca_bundle of this V1APIServiceSpec.97 98 CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. If unspecified, system trust roots on the apiserver are used. # noqa: E50199 100 :param ca_bundle: The ca_bundle of this V1APIServiceSpec. # noqa: E501101 :type: str102 """103 if (self.local_vars_configuration.client_side_validation and104 ca_bundle is not None and not re.search(r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', ca_bundle)): # noqa: E501105 raise ValueError(r"Invalid value for `ca_bundle`, must be a follow pattern or equal to `/^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/`") # noqa: E501106 107 self._ca_bundle = ca_bundle108 109 @property110 def group(self):111 """Gets the group of this V1APIServiceSpec. # noqa: E501112 113 Group is the API group name this server hosts # noqa: E501114 115 :return: The group of this V1APIServiceSpec. # noqa: E501116 :rtype: str117 """118 return self._group119 120 @group.setter121 def group(self, group):122 """Sets the group of this V1APIServiceSpec.123 124 Group is the API group name this server hosts # noqa: E501125 126 :param group: The group of this V1APIServiceSpec. # noqa: E501127 :type: str128 """129 130 self._group = group131 132 @property133 def group_priority_minimum(self):134 """Gets the group_priority_minimum of this V1APIServiceSpec. # noqa: E501135 136 GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s # noqa: E501137 138 :return: The group_priority_minimum of this V1APIServiceSpec. # noqa: E501139 :rtype: int140 """141 return self._group_priority_minimum142 143 @group_priority_minimum.setter144 def group_priority_minimum(self, group_priority_minimum):145 """Sets the group_priority_minimum of this V1APIServiceSpec.146 147 GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s # noqa: E501148 149 :param group_priority_minimum: The group_priority_minimum of this V1APIServiceSpec. # noqa: E501150 :type: int151 """152 if self.local_vars_configuration.client_side_validation and group_priority_minimum is None: # noqa: E501153 raise ValueError("Invalid value for `group_priority_minimum`, must not be `None`") # noqa: E501154 155 self._group_priority_minimum = group_priority_minimum156 157 @property158 def insecure_skip_tls_verify(self):159 """Gets the insecure_skip_tls_verify of this V1APIServiceSpec. # noqa: E501160 161 InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. # noqa: E501162 163 :return: The insecure_skip_tls_verify of this V1APIServiceSpec. # noqa: E501164 :rtype: bool165 """166 return self._insecure_skip_tls_verify167 168 @insecure_skip_tls_verify.setter169 def insecure_skip_tls_verify(self, insecure_skip_tls_verify):170 """Sets the insecure_skip_tls_verify of this V1APIServiceSpec.171 172 InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. This is strongly discouraged. You should use the CABundle instead. # noqa: E501173 174 :param insecure_skip_tls_verify: The insecure_skip_tls_verify of this V1APIServiceSpec. # noqa: E501175 :type: bool176 """177 178 self._insecure_skip_tls_verify = insecure_skip_tls_verify179 180 @property181 def service(self):182 """Gets the service of this V1APIServiceSpec. # noqa: E501183 184 185 :return: The service of this V1APIServiceSpec. # noqa: E501186 :rtype: ApiregistrationV1ServiceReference187 """188 return self._service189 190 @service.setter191 def service(self, service):192 """Sets the service of this V1APIServiceSpec.193 194 195 :param service: The service of this V1APIServiceSpec. # noqa: E501196 :type: ApiregistrationV1ServiceReference197 """198 199 self._service = service200 201 @property202 def version(self):203 """Gets the version of this V1APIServiceSpec. # noqa: E501204 205 Version is the API version this server hosts. For example, \"v1\" # noqa: E501206 207 :return: The version of this V1APIServiceSpec. # noqa: E501208 :rtype: str209 """210 return self._version211 212 @version.setter213 def version(self, version):214 """Sets the version of this V1APIServiceSpec.215 216 Version is the API version this server hosts. For example, \"v1\" # noqa: E501217 218 :param version: The version of this V1APIServiceSpec. # noqa: E501219 :type: str220 """221 222 self._version = version223 224 @property225 def version_priority(self):226 """Gets the version_priority of this V1APIServiceSpec. # noqa: E501227 228 VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. # noqa: E501229 230 :return: The version_priority of this V1APIServiceSpec. # noqa: E501231 :rtype: int232 """233 return self._version_priority234 235 @version_priority.setter236 def version_priority(self, version_priority):237 """Sets the version_priority of this V1APIServiceSpec.238 239 VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). Since it's inside of a group, the number can be small, probably in the 10s. In case of equal version priorities, the version string will be used to compute the order inside a group. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. # noqa: E501240 241 :param version_priority: The version_priority of this V1APIServiceSpec. # noqa: E501242 :type: int243 """244 if self.local_vars_configuration.client_side_validation and version_priority is None: # noqa: E501245 raise ValueError("Invalid value for `version_priority`, must not be `None`") # noqa: E501246 247 self._version_priority = version_priority248 249 def to_dict(self):250 """Returns the model properties as a dict"""251 result = {}252 253 for attr, _ in six.iteritems(self.openapi_types):254 value = getattr(self, attr)255 if isinstance(value, list):256 result[attr] = list(map(257 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,258 value259 ))260 elif hasattr(value, "to_dict"):261 result[attr] = value.to_dict()262 elif isinstance(value, dict):263 result[attr] = dict(map(264 lambda item: (item[0], item[1].to_dict())265 if hasattr(item[1], "to_dict") else item,266 value.items()267 ))268 else:269 result[attr] = value270 271 return result272 273 def to_str(self):274 """Returns the string representation of the model"""275 return pprint.pformat(self.to_dict())276 277 def __repr__(self):278 """For `print` and `pprint`"""279 return self.to_str()280 281 def __eq__(self, other):282 """Returns true if both objects are equal"""283 if not isinstance(other, V1APIServiceSpec):284 return False285 286 return self.to_dict() == other.to_dict()287 288 def __ne__(self, other):289 """Returns true if both objects are not equal"""290 if not isinstance(other, V1APIServiceSpec):291 return True292 293 return self.to_dict() != other.to_dict()294 