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 V1DeleteOptions(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 'dry_run': 'list[str]',38 'grace_period_seconds': 'int',39 'ignore_store_read_error_with_cluster_breaking_potential': 'bool',40 'kind': 'str',41 'orphan_dependents': 'bool',42 'preconditions': 'V1Preconditions',43 'propagation_policy': 'str'44 }45 46 attribute_map = {47 'api_version': 'apiVersion',48 'dry_run': 'dryRun',49 'grace_period_seconds': 'gracePeriodSeconds',50 'ignore_store_read_error_with_cluster_breaking_potential': 'ignoreStoreReadErrorWithClusterBreakingPotential',51 'kind': 'kind',52 'orphan_dependents': 'orphanDependents',53 'preconditions': 'preconditions',54 'propagation_policy': 'propagationPolicy'55 }56 57 def __init__(self, api_version=None, dry_run=None, grace_period_seconds=None, ignore_store_read_error_with_cluster_breaking_potential=None, kind=None, orphan_dependents=None, preconditions=None, propagation_policy=None, local_vars_configuration=None): # noqa: E50158 """V1DeleteOptions - 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._api_version = None64 self._dry_run = None65 self._grace_period_seconds = None66 self._ignore_store_read_error_with_cluster_breaking_potential = None67 self._kind = None68 self._orphan_dependents = None69 self._preconditions = None70 self._propagation_policy = None71 self.discriminator = None72 73 if api_version is not None:74 self.api_version = api_version75 if dry_run is not None:76 self.dry_run = dry_run77 if grace_period_seconds is not None:78 self.grace_period_seconds = grace_period_seconds79 if ignore_store_read_error_with_cluster_breaking_potential is not None:80 self.ignore_store_read_error_with_cluster_breaking_potential = ignore_store_read_error_with_cluster_breaking_potential81 if kind is not None:82 self.kind = kind83 if orphan_dependents is not None:84 self.orphan_dependents = orphan_dependents85 if preconditions is not None:86 self.preconditions = preconditions87 if propagation_policy is not None:88 self.propagation_policy = propagation_policy89 90 @property91 def api_version(self):92 """Gets the api_version of this V1DeleteOptions. # noqa: E50193 94 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: E50195 96 :return: The api_version of this V1DeleteOptions. # noqa: E50197 :rtype: str98 """99 return self._api_version100 101 @api_version.setter102 def api_version(self, api_version):103 """Sets the api_version of this V1DeleteOptions.104 105 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: E501106 107 :param api_version: The api_version of this V1DeleteOptions. # noqa: E501108 :type: str109 """110 111 self._api_version = api_version112 113 @property114 def dry_run(self):115 """Gets the dry_run of this V1DeleteOptions. # noqa: E501116 117 When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed # noqa: E501118 119 :return: The dry_run of this V1DeleteOptions. # noqa: E501120 :rtype: list[str]121 """122 return self._dry_run123 124 @dry_run.setter125 def dry_run(self, dry_run):126 """Sets the dry_run of this V1DeleteOptions.127 128 When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed # noqa: E501129 130 :param dry_run: The dry_run of this V1DeleteOptions. # noqa: E501131 :type: list[str]132 """133 134 self._dry_run = dry_run135 136 @property137 def grace_period_seconds(self):138 """Gets the grace_period_seconds of this V1DeleteOptions. # noqa: E501139 140 The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. # noqa: E501141 142 :return: The grace_period_seconds of this V1DeleteOptions. # noqa: E501143 :rtype: int144 """145 return self._grace_period_seconds146 147 @grace_period_seconds.setter148 def grace_period_seconds(self, grace_period_seconds):149 """Sets the grace_period_seconds of this V1DeleteOptions.150 151 The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. # noqa: E501152 153 :param grace_period_seconds: The grace_period_seconds of this V1DeleteOptions. # noqa: E501154 :type: int155 """156 157 self._grace_period_seconds = grace_period_seconds158 159 @property160 def ignore_store_read_error_with_cluster_breaking_potential(self):161 """Gets the ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions. # noqa: E501162 163 if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it # noqa: E501164 165 :return: The ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions. # noqa: E501166 :rtype: bool167 """168 return self._ignore_store_read_error_with_cluster_breaking_potential169 170 @ignore_store_read_error_with_cluster_breaking_potential.setter171 def ignore_store_read_error_with_cluster_breaking_potential(self, ignore_store_read_error_with_cluster_breaking_potential):172 """Sets the ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions.173 174 if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. A resource is considered corrupt if it can not be retrieved from the underlying storage successfully because of a) its data can not be transformed e.g. decryption failure, or b) it fails to decode into an object. NOTE: unsafe deletion ignores finalizer constraints, skips precondition checks, and removes the object from the storage. WARNING: This may potentially break the cluster if the workload associated with the resource being unsafe-deleted relies on normal deletion flow. Use only if you REALLY know what you are doing. The default value is false, and the user must opt in to enable it # noqa: E501175 176 :param ignore_store_read_error_with_cluster_breaking_potential: The ignore_store_read_error_with_cluster_breaking_potential of this V1DeleteOptions. # noqa: E501177 :type: bool178 """179 180 self._ignore_store_read_error_with_cluster_breaking_potential = ignore_store_read_error_with_cluster_breaking_potential181 182 @property183 def kind(self):184 """Gets the kind of this V1DeleteOptions. # noqa: E501185 186 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: E501187 188 :return: The kind of this V1DeleteOptions. # noqa: E501189 :rtype: str190 """191 return self._kind192 193 @kind.setter194 def kind(self, kind):195 """Sets the kind of this V1DeleteOptions.196 197 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: E501198 199 :param kind: The kind of this V1DeleteOptions. # noqa: E501200 :type: str201 """202 203 self._kind = kind204 205 @property206 def orphan_dependents(self):207 """Gets the orphan_dependents of this V1DeleteOptions. # noqa: E501208 209 Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. # noqa: E501210 211 :return: The orphan_dependents of this V1DeleteOptions. # noqa: E501212 :rtype: bool213 """214 return self._orphan_dependents215 216 @orphan_dependents.setter217 def orphan_dependents(self, orphan_dependents):218 """Sets the orphan_dependents of this V1DeleteOptions.219 220 Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. Should the dependent objects be orphaned. If true/false, the \"orphan\" finalizer will be added to/removed from the object's finalizers list. Either this field or PropagationPolicy may be set, but not both. # noqa: E501221 222 :param orphan_dependents: The orphan_dependents of this V1DeleteOptions. # noqa: E501223 :type: bool224 """225 226 self._orphan_dependents = orphan_dependents227 228 @property229 def preconditions(self):230 """Gets the preconditions of this V1DeleteOptions. # noqa: E501231 232 233 :return: The preconditions of this V1DeleteOptions. # noqa: E501234 :rtype: V1Preconditions235 """236 return self._preconditions237 238 @preconditions.setter239 def preconditions(self, preconditions):240 """Sets the preconditions of this V1DeleteOptions.241 242 243 :param preconditions: The preconditions of this V1DeleteOptions. # noqa: E501244 :type: V1Preconditions245 """246 247 self._preconditions = preconditions248 249 @property250 def propagation_policy(self):251 """Gets the propagation_policy of this V1DeleteOptions. # noqa: E501252 253 Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. # noqa: E501254 255 :return: The propagation_policy of this V1DeleteOptions. # noqa: E501256 :rtype: str257 """258 return self._propagation_policy259 260 @propagation_policy.setter261 def propagation_policy(self, propagation_policy):262 """Sets the propagation_policy of this V1DeleteOptions.263 264 Whether and how garbage collection will be performed. Either this field or OrphanDependents may be set, but not both. The default policy is decided by the existing finalizer set in the metadata.finalizers and the resource-specific default policy. Acceptable values are: 'Orphan' - orphan the dependents; 'Background' - allow the garbage collector to delete the dependents in the background; 'Foreground' - a cascading policy that deletes all dependents in the foreground. # noqa: E501265 266 :param propagation_policy: The propagation_policy of this V1DeleteOptions. # noqa: E501267 :type: str268 """269 270 self._propagation_policy = propagation_policy271 272 def to_dict(self):273 """Returns the model properties as a dict"""274 result = {}275 276 for attr, _ in six.iteritems(self.openapi_types):277 value = getattr(self, attr)278 if isinstance(value, list):279 result[attr] = list(map(280 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,281 value282 ))283 elif hasattr(value, "to_dict"):284 result[attr] = value.to_dict()285 elif isinstance(value, dict):286 result[attr] = dict(map(287 lambda item: (item[0], item[1].to_dict())288 if hasattr(item[1], "to_dict") else item,289 value.items()290 ))291 else:292 result[attr] = value293 294 return result295 296 def to_str(self):297 """Returns the string representation of the model"""298 return pprint.pformat(self.to_dict())299 300 def __repr__(self):301 """For `print` and `pprint`"""302 return self.to_str()303 304 def __eq__(self, other):305 """Returns true if both objects are equal"""306 if not isinstance(other, V1DeleteOptions):307 return False308 309 return self.to_dict() == other.to_dict()310 311 def __ne__(self, other):312 """Returns true if both objects are not equal"""313 if not isinstance(other, V1DeleteOptions):314 return True315 316 return self.to_dict() != other.to_dict()317 