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 V1DaemonSetSpec(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 'revision_history_limit': 'int',38 'selector': 'V1LabelSelector',39 'template': 'V1PodTemplateSpec',40 'update_strategy': 'V1DaemonSetUpdateStrategy'41 }42 43 attribute_map = {44 'min_ready_seconds': 'minReadySeconds',45 'revision_history_limit': 'revisionHistoryLimit',46 'selector': 'selector',47 'template': 'template',48 'update_strategy': 'updateStrategy'49 }50 51 def __init__(self, min_ready_seconds=None, revision_history_limit=None, selector=None, template=None, update_strategy=None, local_vars_configuration=None): # noqa: E50152 """V1DaemonSetSpec - 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._min_ready_seconds = None58 self._revision_history_limit = None59 self._selector = None60 self._template = None61 self._update_strategy = None62 self.discriminator = None63 64 if min_ready_seconds is not None:65 self.min_ready_seconds = min_ready_seconds66 if revision_history_limit is not None:67 self.revision_history_limit = revision_history_limit68 self.selector = selector69 self.template = template70 if update_strategy is not None:71 self.update_strategy = update_strategy72 73 @property74 def min_ready_seconds(self):75 """Gets the min_ready_seconds of this V1DaemonSetSpec. # noqa: E50176 77 The minimum number of seconds for which a newly created DaemonSet 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: E50178 79 :return: The min_ready_seconds of this V1DaemonSetSpec. # noqa: E50180 :rtype: int81 """82 return self._min_ready_seconds83 84 @min_ready_seconds.setter85 def min_ready_seconds(self, min_ready_seconds):86 """Sets the min_ready_seconds of this V1DaemonSetSpec.87 88 The minimum number of seconds for which a newly created DaemonSet 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: E50189 90 :param min_ready_seconds: The min_ready_seconds of this V1DaemonSetSpec. # noqa: E50191 :type: int92 """93 94 self._min_ready_seconds = min_ready_seconds95 96 @property97 def revision_history_limit(self):98 """Gets the revision_history_limit of this V1DaemonSetSpec. # noqa: E50199 100 The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. # noqa: E501101 102 :return: The revision_history_limit of this V1DaemonSetSpec. # noqa: E501103 :rtype: int104 """105 return self._revision_history_limit106 107 @revision_history_limit.setter108 def revision_history_limit(self, revision_history_limit):109 """Sets the revision_history_limit of this V1DaemonSetSpec.110 111 The number of old history to retain to allow rollback. This is a pointer to distinguish between explicit zero and not specified. Defaults to 10. # noqa: E501112 113 :param revision_history_limit: The revision_history_limit of this V1DaemonSetSpec. # noqa: E501114 :type: int115 """116 117 self._revision_history_limit = revision_history_limit118 119 @property120 def selector(self):121 """Gets the selector of this V1DaemonSetSpec. # noqa: E501122 123 124 :return: The selector of this V1DaemonSetSpec. # noqa: E501125 :rtype: V1LabelSelector126 """127 return self._selector128 129 @selector.setter130 def selector(self, selector):131 """Sets the selector of this V1DaemonSetSpec.132 133 134 :param selector: The selector of this V1DaemonSetSpec. # noqa: E501135 :type: V1LabelSelector136 """137 if self.local_vars_configuration.client_side_validation and selector is None: # noqa: E501138 raise ValueError("Invalid value for `selector`, must not be `None`") # noqa: E501139 140 self._selector = selector141 142 @property143 def template(self):144 """Gets the template of this V1DaemonSetSpec. # noqa: E501145 146 147 :return: The template of this V1DaemonSetSpec. # noqa: E501148 :rtype: V1PodTemplateSpec149 """150 return self._template151 152 @template.setter153 def template(self, template):154 """Sets the template of this V1DaemonSetSpec.155 156 157 :param template: The template of this V1DaemonSetSpec. # noqa: E501158 :type: V1PodTemplateSpec159 """160 if self.local_vars_configuration.client_side_validation and template is None: # noqa: E501161 raise ValueError("Invalid value for `template`, must not be `None`") # noqa: E501162 163 self._template = template164 165 @property166 def update_strategy(self):167 """Gets the update_strategy of this V1DaemonSetSpec. # noqa: E501168 169 170 :return: The update_strategy of this V1DaemonSetSpec. # noqa: E501171 :rtype: V1DaemonSetUpdateStrategy172 """173 return self._update_strategy174 175 @update_strategy.setter176 def update_strategy(self, update_strategy):177 """Sets the update_strategy of this V1DaemonSetSpec.178 179 180 :param update_strategy: The update_strategy of this V1DaemonSetSpec. # noqa: E501181 :type: V1DaemonSetUpdateStrategy182 """183 184 self._update_strategy = update_strategy185 186 def to_dict(self):187 """Returns the model properties as a dict"""188 result = {}189 190 for attr, _ in six.iteritems(self.openapi_types):191 value = getattr(self, attr)192 if isinstance(value, list):193 result[attr] = list(map(194 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,195 value196 ))197 elif hasattr(value, "to_dict"):198 result[attr] = value.to_dict()199 elif isinstance(value, dict):200 result[attr] = dict(map(201 lambda item: (item[0], item[1].to_dict())202 if hasattr(item[1], "to_dict") else item,203 value.items()204 ))205 else:206 result[attr] = value207 208 return result209 210 def to_str(self):211 """Returns the string representation of the model"""212 return pprint.pformat(self.to_dict())213 214 def __repr__(self):215 """For `print` and `pprint`"""216 return self.to_str()217 218 def __eq__(self, other):219 """Returns true if both objects are equal"""220 if not isinstance(other, V1DaemonSetSpec):221 return False222 223 return self.to_dict() == other.to_dict()224 225 def __ne__(self, other):226 """Returns true if both objects are not equal"""227 if not isinstance(other, V1DaemonSetSpec):228 return True229 230 return self.to_dict() != other.to_dict()231 