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 V1PodDisruptionBudget(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_version': 'str',37 'kind': 'str',38 'metadata': 'V1ObjectMeta',39 'spec': 'V1PodDisruptionBudgetSpec',40 'status': 'V1PodDisruptionBudgetStatus'41 }42 43 attribute_map = {44 'api_version': 'apiVersion',45 'kind': 'kind',46 'metadata': 'metadata',47 'spec': 'spec',48 'status': 'status'49 }50 51 def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E50152 """V1PodDisruptionBudget - a model defined in OpenAPI""" # noqa: E50153 if local_vars_configuration is None:54 local_vars_configuration = Configuration()55 self.local_vars_configuration = local_vars_configuration56 57 self._api_version = None58 self._kind = None59 self._metadata = None60 self._spec = None61 self._status = None62 self.discriminator = None63 64 if api_version is not None:65 self.api_version = api_version66 if kind is not None:67 self.kind = kind68 if metadata is not None:69 self.metadata = metadata70 if spec is not None:71 self.spec = spec72 if status is not None:73 self.status = status74 75 @property76 def api_version(self):77 """Gets the api_version of this V1PodDisruptionBudget. # noqa: E50178 79 APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E50180 81 :return: The api_version of this V1PodDisruptionBudget. # noqa: E50182 :rtype: str83 """84 return self._api_version85 86 @api_version.setter87 def api_version(self, api_version):88 """Sets the api_version of this V1PodDisruptionBudget.89 90 APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources # noqa: E50191 92 :param api_version: The api_version of this V1PodDisruptionBudget. # noqa: E50193 :type: str94 """95 96 self._api_version = api_version97 98 @property99 def kind(self):100 """Gets the kind of this V1PodDisruptionBudget. # noqa: E501101 102 Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501103 104 :return: The kind of this V1PodDisruptionBudget. # noqa: E501105 :rtype: str106 """107 return self._kind108 109 @kind.setter110 def kind(self, kind):111 """Sets the kind of this V1PodDisruptionBudget.112 113 Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds # noqa: E501114 115 :param kind: The kind of this V1PodDisruptionBudget. # noqa: E501116 :type: str117 """118 119 self._kind = kind120 121 @property122 def metadata(self):123 """Gets the metadata of this V1PodDisruptionBudget. # noqa: E501124 125 126 :return: The metadata of this V1PodDisruptionBudget. # noqa: E501127 :rtype: V1ObjectMeta128 """129 return self._metadata130 131 @metadata.setter132 def metadata(self, metadata):133 """Sets the metadata of this V1PodDisruptionBudget.134 135 136 :param metadata: The metadata of this V1PodDisruptionBudget. # noqa: E501137 :type: V1ObjectMeta138 """139 140 self._metadata = metadata141 142 @property143 def spec(self):144 """Gets the spec of this V1PodDisruptionBudget. # noqa: E501145 146 147 :return: The spec of this V1PodDisruptionBudget. # noqa: E501148 :rtype: V1PodDisruptionBudgetSpec149 """150 return self._spec151 152 @spec.setter153 def spec(self, spec):154 """Sets the spec of this V1PodDisruptionBudget.155 156 157 :param spec: The spec of this V1PodDisruptionBudget. # noqa: E501158 :type: V1PodDisruptionBudgetSpec159 """160 161 self._spec = spec162 163 @property164 def status(self):165 """Gets the status of this V1PodDisruptionBudget. # noqa: E501166 167 168 :return: The status of this V1PodDisruptionBudget. # noqa: E501169 :rtype: V1PodDisruptionBudgetStatus170 """171 return self._status172 173 @status.setter174 def status(self, status):175 """Sets the status of this V1PodDisruptionBudget.176 177 178 :param status: The status of this V1PodDisruptionBudget. # noqa: E501179 :type: V1PodDisruptionBudgetStatus180 """181 182 self._status = status183 184 def to_dict(self):185 """Returns the model properties as a dict"""186 result = {}187 188 for attr, _ in six.iteritems(self.openapi_types):189 value = getattr(self, attr)190 if isinstance(value, list):191 result[attr] = list(map(192 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,193 value194 ))195 elif hasattr(value, "to_dict"):196 result[attr] = value.to_dict()197 elif isinstance(value, dict):198 result[attr] = dict(map(199 lambda item: (item[0], item[1].to_dict())200 if hasattr(item[1], "to_dict") else item,201 value.items()202 ))203 else:204 result[attr] = value205 206 return result207 208 def to_str(self):209 """Returns the string representation of the model"""210 return pprint.pformat(self.to_dict())211 212 def __repr__(self):213 """For `print` and `pprint`"""214 return self.to_str()215 216 def __eq__(self, other):217 """Returns true if both objects are equal"""218 if not isinstance(other, V1PodDisruptionBudget):219 return False220 221 return self.to_dict() == other.to_dict()222 223 def __ne__(self, other):224 """Returns true if both objects are not equal"""225 if not isinstance(other, V1PodDisruptionBudget):226 return True227 228 return self.to_dict() != other.to_dict()229 