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 V1DeploymentSpec(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 'min_ready_seconds': 'int',37 'paused': 'bool',38 'progress_deadline_seconds': 'int',39 'replicas': 'int',40 'revision_history_limit': 'int',41 'selector': 'V1LabelSelector',42 'strategy': 'V1DeploymentStrategy',43 'template': 'V1PodTemplateSpec'44 }45 46 attribute_map = {47 'min_ready_seconds': 'minReadySeconds',48 'paused': 'paused',49 'progress_deadline_seconds': 'progressDeadlineSeconds',50 'replicas': 'replicas',51 'revision_history_limit': 'revisionHistoryLimit',52 'selector': 'selector',53 'strategy': 'strategy',54 'template': 'template'55 }56 57 def __init__(self, min_ready_seconds=None, paused=None, progress_deadline_seconds=None, replicas=None, revision_history_limit=None, selector=None, strategy=None, template=None, local_vars_configuration=None): # noqa: E50158 """V1DeploymentSpec - a model defined in OpenAPI""" # noqa: E50159 if local_vars_configuration is None:60 local_vars_configuration = Configuration()61 self.local_vars_configuration = local_vars_configuration62 63 self._min_ready_seconds = None64 self._paused = None65 self._progress_deadline_seconds = None66 self._replicas = None67 self._revision_history_limit = None68 self._selector = None69 self._strategy = None70 self._template = None71 self.discriminator = None72 73 if min_ready_seconds is not None:74 self.min_ready_seconds = min_ready_seconds75 if paused is not None:76 self.paused = paused77 if progress_deadline_seconds is not None:78 self.progress_deadline_seconds = progress_deadline_seconds79 if replicas is not None:80 self.replicas = replicas81 if revision_history_limit is not None:82 self.revision_history_limit = revision_history_limit83 self.selector = selector84 if strategy is not None:85 self.strategy = strategy86 self.template = template87 88 @property89 def min_ready_seconds(self):90 """Gets the min_ready_seconds of this V1DeploymentSpec. # noqa: E50191 92 Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) # noqa: E50193 94 :return: The min_ready_seconds of this V1DeploymentSpec. # noqa: E50195 :rtype: int96 """97 return self._min_ready_seconds98 99 @min_ready_seconds.setter100 def min_ready_seconds(self, min_ready_seconds):101 """Sets the min_ready_seconds of this V1DeploymentSpec.102 103 Minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready) # noqa: E501104 105 :param min_ready_seconds: The min_ready_seconds of this V1DeploymentSpec. # noqa: E501106 :type: int107 """108 109 self._min_ready_seconds = min_ready_seconds110 111 @property112 def paused(self):113 """Gets the paused of this V1DeploymentSpec. # noqa: E501114 115 Indicates that the deployment is paused. # noqa: E501116 117 :return: The paused of this V1DeploymentSpec. # noqa: E501118 :rtype: bool119 """120 return self._paused121 122 @paused.setter123 def paused(self, paused):124 """Sets the paused of this V1DeploymentSpec.125 126 Indicates that the deployment is paused. # noqa: E501127 128 :param paused: The paused of this V1DeploymentSpec. # noqa: E501129 :type: bool130 """131 132 self._paused = paused133 134 @property135 def progress_deadline_seconds(self):136 """Gets the progress_deadline_seconds of this V1DeploymentSpec. # noqa: E501137 138 The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. # noqa: E501139 140 :return: The progress_deadline_seconds of this V1DeploymentSpec. # noqa: E501141 :rtype: int142 """143 return self._progress_deadline_seconds144 145 @progress_deadline_seconds.setter146 def progress_deadline_seconds(self, progress_deadline_seconds):147 """Sets the progress_deadline_seconds of this V1DeploymentSpec.148 149 The maximum time in seconds for a deployment to make progress before it is considered to be failed. The deployment controller will continue to process failed deployments and a condition with a ProgressDeadlineExceeded reason will be surfaced in the deployment status. Note that progress will not be estimated during the time a deployment is paused. Defaults to 600s. # noqa: E501150 151 :param progress_deadline_seconds: The progress_deadline_seconds of this V1DeploymentSpec. # noqa: E501152 :type: int153 """154 155 self._progress_deadline_seconds = progress_deadline_seconds156 157 @property158 def replicas(self):159 """Gets the replicas of this V1DeploymentSpec. # noqa: E501160 161 Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. # noqa: E501162 163 :return: The replicas of this V1DeploymentSpec. # noqa: E501164 :rtype: int165 """166 return self._replicas167 168 @replicas.setter169 def replicas(self, replicas):170 """Sets the replicas of this V1DeploymentSpec.171 172 Number of desired pods. This is a pointer to distinguish between explicit zero and not specified. Defaults to 1. # noqa: E501173 174 :param replicas: The replicas of this V1DeploymentSpec. # noqa: E501175 :type: int176 """177 178 self._replicas = replicas179 180 @property181 def revision_history_limit(self):182 """Gets the revision_history_limit of this V1DeploymentSpec. # noqa: E501183 184 The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. # noqa: E501185 186 :return: The revision_history_limit of this V1DeploymentSpec. # noqa: E501187 :rtype: int188 """189 return self._revision_history_limit190 191 @revision_history_limit.setter192 def revision_history_limit(self, revision_history_limit):193 """Sets the revision_history_limit of this V1DeploymentSpec.194 195 The number of old ReplicaSets to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. # noqa: E501196 197 :param revision_history_limit: The revision_history_limit of this V1DeploymentSpec. # noqa: E501198 :type: int199 """200 201 self._revision_history_limit = revision_history_limit202 203 @property204 def selector(self):205 """Gets the selector of this V1DeploymentSpec. # noqa: E501206 207 208 :return: The selector of this V1DeploymentSpec. # noqa: E501209 :rtype: V1LabelSelector210 """211 return self._selector212 213 @selector.setter214 def selector(self, selector):215 """Sets the selector of this V1DeploymentSpec.216 217 218 :param selector: The selector of this V1DeploymentSpec. # noqa: E501219 :type: V1LabelSelector220 """221 if self.local_vars_configuration.client_side_validation and selector is None: # noqa: E501222 raise ValueError("Invalid value for `selector`, must not be `None`") # noqa: E501223 224 self._selector = selector225 226 @property227 def strategy(self):228 """Gets the strategy of this V1DeploymentSpec. # noqa: E501229 230 231 :return: The strategy of this V1DeploymentSpec. # noqa: E501232 :rtype: V1DeploymentStrategy233 """234 return self._strategy235 236 @strategy.setter237 def strategy(self, strategy):238 """Sets the strategy of this V1DeploymentSpec.239 240 241 :param strategy: The strategy of this V1DeploymentSpec. # noqa: E501242 :type: V1DeploymentStrategy243 """244 245 self._strategy = strategy246 247 @property248 def template(self):249 """Gets the template of this V1DeploymentSpec. # noqa: E501250 251 252 :return: The template of this V1DeploymentSpec. # noqa: E501253 :rtype: V1PodTemplateSpec254 """255 return self._template256 257 @template.setter258 def template(self, template):259 """Sets the template of this V1DeploymentSpec.260 261 262 :param template: The template of this V1DeploymentSpec. # noqa: E501263 :type: V1PodTemplateSpec264 """265 if self.local_vars_configuration.client_side_validation and template is None: # noqa: E501266 raise ValueError("Invalid value for `template`, must not be `None`") # noqa: E501267 268 self._template = template269 270 def to_dict(self):271 """Returns the model properties as a dict"""272 result = {}273 274 for attr, _ in six.iteritems(self.openapi_types):275 value = getattr(self, attr)276 if isinstance(value, list):277 result[attr] = list(map(278 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,279 value280 ))281 elif hasattr(value, "to_dict"):282 result[attr] = value.to_dict()283 elif isinstance(value, dict):284 result[attr] = dict(map(285 lambda item: (item[0], item[1].to_dict())286 if hasattr(item[1], "to_dict") else item,287 value.items()288 ))289 else:290 result[attr] = value291 292 return result293 294 def to_str(self):295 """Returns the string representation of the model"""296 return pprint.pformat(self.to_dict())297 298 def __repr__(self):299 """For `print` and `pprint`"""300 return self.to_str()301 302 def __eq__(self, other):303 """Returns true if both objects are equal"""304 if not isinstance(other, V1DeploymentSpec):305 return False306 307 return self.to_dict() == other.to_dict()308 309 def __ne__(self, other):310 """Returns true if both objects are not equal"""311 if not isinstance(other, V1DeploymentSpec):312 return True313 314 return self.to_dict() != other.to_dict()315 