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 V1ObjectMeta(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 'annotations': 'dict(str, str)',37 'creation_timestamp': 'datetime',38 'deletion_grace_period_seconds': 'int',39 'deletion_timestamp': 'datetime',40 'finalizers': 'list[str]',41 'generate_name': 'str',42 'generation': 'int',43 'labels': 'dict(str, str)',44 'managed_fields': 'list[V1ManagedFieldsEntry]',45 'name': 'str',46 'namespace': 'str',47 'owner_references': 'list[V1OwnerReference]',48 'resource_version': 'str',49 'self_link': 'str',50 'uid': 'str'51 }52 53 attribute_map = {54 'annotations': 'annotations',55 'creation_timestamp': 'creationTimestamp',56 'deletion_grace_period_seconds': 'deletionGracePeriodSeconds',57 'deletion_timestamp': 'deletionTimestamp',58 'finalizers': 'finalizers',59 'generate_name': 'generateName',60 'generation': 'generation',61 'labels': 'labels',62 'managed_fields': 'managedFields',63 'name': 'name',64 'namespace': 'namespace',65 'owner_references': 'ownerReferences',66 'resource_version': 'resourceVersion',67 'self_link': 'selfLink',68 'uid': 'uid'69 }70 71 def __init__(self, annotations=None, creation_timestamp=None, deletion_grace_period_seconds=None, deletion_timestamp=None, finalizers=None, generate_name=None, generation=None, labels=None, managed_fields=None, name=None, namespace=None, owner_references=None, resource_version=None, self_link=None, uid=None, local_vars_configuration=None): # noqa: E50172 """V1ObjectMeta - a model defined in OpenAPI""" # noqa: E50173 if local_vars_configuration is None:74 local_vars_configuration = Configuration()75 self.local_vars_configuration = local_vars_configuration76 77 self._annotations = None78 self._creation_timestamp = None79 self._deletion_grace_period_seconds = None80 self._deletion_timestamp = None81 self._finalizers = None82 self._generate_name = None83 self._generation = None84 self._labels = None85 self._managed_fields = None86 self._name = None87 self._namespace = None88 self._owner_references = None89 self._resource_version = None90 self._self_link = None91 self._uid = None92 self.discriminator = None93 94 if annotations is not None:95 self.annotations = annotations96 if creation_timestamp is not None:97 self.creation_timestamp = creation_timestamp98 if deletion_grace_period_seconds is not None:99 self.deletion_grace_period_seconds = deletion_grace_period_seconds100 if deletion_timestamp is not None:101 self.deletion_timestamp = deletion_timestamp102 if finalizers is not None:103 self.finalizers = finalizers104 if generate_name is not None:105 self.generate_name = generate_name106 if generation is not None:107 self.generation = generation108 if labels is not None:109 self.labels = labels110 if managed_fields is not None:111 self.managed_fields = managed_fields112 if name is not None:113 self.name = name114 if namespace is not None:115 self.namespace = namespace116 if owner_references is not None:117 self.owner_references = owner_references118 if resource_version is not None:119 self.resource_version = resource_version120 if self_link is not None:121 self.self_link = self_link122 if uid is not None:123 self.uid = uid124 125 @property126 def annotations(self):127 """Gets the annotations of this V1ObjectMeta. # noqa: E501128 129 Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations # noqa: E501130 131 :return: The annotations of this V1ObjectMeta. # noqa: E501132 :rtype: dict(str, str)133 """134 return self._annotations135 136 @annotations.setter137 def annotations(self, annotations):138 """Sets the annotations of this V1ObjectMeta.139 140 Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations # noqa: E501141 142 :param annotations: The annotations of this V1ObjectMeta. # noqa: E501143 :type: dict(str, str)144 """145 146 self._annotations = annotations147 148 @property149 def creation_timestamp(self):150 """Gets the creation_timestamp of this V1ObjectMeta. # noqa: E501151 152 CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqa: E501153 154 :return: The creation_timestamp of this V1ObjectMeta. # noqa: E501155 :rtype: datetime156 """157 return self._creation_timestamp158 159 @creation_timestamp.setter160 def creation_timestamp(self, creation_timestamp):161 """Sets the creation_timestamp of this V1ObjectMeta.162 163 CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqa: E501164 165 :param creation_timestamp: The creation_timestamp of this V1ObjectMeta. # noqa: E501166 :type: datetime167 """168 169 self._creation_timestamp = creation_timestamp170 171 @property172 def deletion_grace_period_seconds(self):173 """Gets the deletion_grace_period_seconds of this V1ObjectMeta. # noqa: E501174 175 Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. # noqa: E501176 177 :return: The deletion_grace_period_seconds of this V1ObjectMeta. # noqa: E501178 :rtype: int179 """180 return self._deletion_grace_period_seconds181 182 @deletion_grace_period_seconds.setter183 def deletion_grace_period_seconds(self, deletion_grace_period_seconds):184 """Sets the deletion_grace_period_seconds of this V1ObjectMeta.185 186 Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only. # noqa: E501187 188 :param deletion_grace_period_seconds: The deletion_grace_period_seconds of this V1ObjectMeta. # noqa: E501189 :type: int190 """191 192 self._deletion_grace_period_seconds = deletion_grace_period_seconds193 194 @property195 def deletion_timestamp(self):196 """Gets the deletion_timestamp of this V1ObjectMeta. # noqa: E501197 198 DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqa: E501199 200 :return: The deletion_timestamp of this V1ObjectMeta. # noqa: E501201 :rtype: datetime202 """203 return self._deletion_timestamp204 205 @deletion_timestamp.setter206 def deletion_timestamp(self, deletion_timestamp):207 """Sets the deletion_timestamp of this V1ObjectMeta.208 209 DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata # noqa: E501210 211 :param deletion_timestamp: The deletion_timestamp of this V1ObjectMeta. # noqa: E501212 :type: datetime213 """214 215 self._deletion_timestamp = deletion_timestamp216 217 @property218 def finalizers(self):219 """Gets the finalizers of this V1ObjectMeta. # noqa: E501220 221 Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. # noqa: E501222 223 :return: The finalizers of this V1ObjectMeta. # noqa: E501224 :rtype: list[str]225 """226 return self._finalizers227 228 @finalizers.setter229 def finalizers(self, finalizers):230 """Sets the finalizers of this V1ObjectMeta.231 232 Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list. # noqa: E501233 234 :param finalizers: The finalizers of this V1ObjectMeta. # noqa: E501235 :type: list[str]236 """237 238 self._finalizers = finalizers239 240 @property241 def generate_name(self):242 """Gets the generate_name of this V1ObjectMeta. # noqa: E501243 244 GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will return a 409. Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency # noqa: E501245 246 :return: The generate_name of this V1ObjectMeta. # noqa: E501247 :rtype: str248 """249 return self._generate_name250 251 @generate_name.setter252 def generate_name(self, generate_name):253 """Sets the generate_name of this V1ObjectMeta.254 255 GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will return a 409. Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency # noqa: E501256 257 :param generate_name: The generate_name of this V1ObjectMeta. # noqa: E501258 :type: str259 """260 261 self._generate_name = generate_name262 263 @property264 def generation(self):265 """Gets the generation of this V1ObjectMeta. # noqa: E501266 267 A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. # noqa: E501268 269 :return: The generation of this V1ObjectMeta. # noqa: E501270 :rtype: int271 """272 return self._generation273 274 @generation.setter275 def generation(self, generation):276 """Sets the generation of this V1ObjectMeta.277 278 A sequence number representing a specific generation of the desired state. Populated by the system. Read-only. # noqa: E501279 280 :param generation: The generation of this V1ObjectMeta. # noqa: E501281 :type: int282 """283 284 self._generation = generation285 286 @property287 def labels(self):288 """Gets the labels of this V1ObjectMeta. # noqa: E501289 290 Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels # noqa: E501291 292 :return: The labels of this V1ObjectMeta. # noqa: E501293 :rtype: dict(str, str)294 """295 return self._labels296 297 @labels.setter298 def labels(self, labels):299 """Sets the labels of this V1ObjectMeta.300 301 Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels # noqa: E501302 303 :param labels: The labels of this V1ObjectMeta. # noqa: E501304 :type: dict(str, str)305 """306 307 self._labels = labels308 309 @property310 def managed_fields(self):311 """Gets the managed_fields of this V1ObjectMeta. # noqa: E501312 313 ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object. # noqa: E501314 315 :return: The managed_fields of this V1ObjectMeta. # noqa: E501316 :rtype: list[V1ManagedFieldsEntry]317 """318 return self._managed_fields319 320 @managed_fields.setter321 def managed_fields(self, managed_fields):322 """Sets the managed_fields of this V1ObjectMeta.323 324 ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object. # noqa: E501325 326 :param managed_fields: The managed_fields of this V1ObjectMeta. # noqa: E501327 :type: list[V1ManagedFieldsEntry]328 """329 330 self._managed_fields = managed_fields331 332 @property333 def name(self):334 """Gets the name of this V1ObjectMeta. # noqa: E501335 336 Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names # noqa: E501337 338 :return: The name of this V1ObjectMeta. # noqa: E501339 :rtype: str340 """341 return self._name342 343 @name.setter344 def name(self, name):345 """Sets the name of this V1ObjectMeta.346 347 Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names # noqa: E501348 349 :param name: The name of this V1ObjectMeta. # noqa: E501350 :type: str351 """352 353 self._name = name354 355 @property356 def namespace(self):357 """Gets the namespace of this V1ObjectMeta. # noqa: E501358 359 Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces # noqa: E501360 361 :return: The namespace of this V1ObjectMeta. # noqa: E501362 :rtype: str363 """364 return self._namespace365 366 @namespace.setter367 def namespace(self, namespace):368 """Sets the namespace of this V1ObjectMeta.369 370 Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty. Must be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces # noqa: E501371 372 :param namespace: The namespace of this V1ObjectMeta. # noqa: E501373 :type: str374 """375 376 self._namespace = namespace377 378 @property379 def owner_references(self):380 """Gets the owner_references of this V1ObjectMeta. # noqa: E501381 382 List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. # noqa: E501383 384 :return: The owner_references of this V1ObjectMeta. # noqa: E501385 :rtype: list[V1OwnerReference]386 """387 return self._owner_references388 389 @owner_references.setter390 def owner_references(self, owner_references):391 """Sets the owner_references of this V1ObjectMeta.392 393 List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller. # noqa: E501394 395 :param owner_references: The owner_references of this V1ObjectMeta. # noqa: E501396 :type: list[V1OwnerReference]397 """398 399 self._owner_references = owner_references400 401 @property402 def resource_version(self):403 """Gets the resource_version of this V1ObjectMeta. # noqa: E501404 405 An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency # noqa: E501406 407 :return: The resource_version of this V1ObjectMeta. # noqa: E501408 :rtype: str409 """410 return self._resource_version411 412 @resource_version.setter413 def resource_version(self, resource_version):414 """Sets the resource_version of this V1ObjectMeta.415 416 An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency # noqa: E501417 418 :param resource_version: The resource_version of this V1ObjectMeta. # noqa: E501419 :type: str420 """421 422 self._resource_version = resource_version423 424 @property425 def self_link(self):426 """Gets the self_link of this V1ObjectMeta. # noqa: E501427 428 Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. # noqa: E501429 430 :return: The self_link of this V1ObjectMeta. # noqa: E501431 :rtype: str432 """433 return self._self_link434 435 @self_link.setter436 def self_link(self, self_link):437 """Sets the self_link of this V1ObjectMeta.438 439 Deprecated: selfLink is a legacy read-only field that is no longer populated by the system. # noqa: E501440 441 :param self_link: The self_link of this V1ObjectMeta. # noqa: E501442 :type: str443 """444 445 self._self_link = self_link446 447 @property448 def uid(self):449 """Gets the uid of this V1ObjectMeta. # noqa: E501450 451 UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids # noqa: E501452 453 :return: The uid of this V1ObjectMeta. # noqa: E501454 :rtype: str455 """456 return self._uid457 458 @uid.setter459 def uid(self, uid):460 """Sets the uid of this V1ObjectMeta.461 462 UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids # noqa: E501463 464 :param uid: The uid of this V1ObjectMeta. # noqa: E501465 :type: str466 """467 468 self._uid = uid469 470 def to_dict(self):471 """Returns the model properties as a dict"""472 result = {}473 474 for attr, _ in six.iteritems(self.openapi_types):475 value = getattr(self, attr)476 if isinstance(value, list):477 result[attr] = list(map(478 lambda x: x.to_dict() if hasattr(x, "to_dict") else x,479 value480 ))481 elif hasattr(value, "to_dict"):482 result[attr] = value.to_dict()483 elif isinstance(value, dict):484 result[attr] = dict(map(485 lambda item: (item[0], item[1].to_dict())486 if hasattr(item[1], "to_dict") else item,487 value.items()488 ))489 else:490 result[attr] = value491 492 return result493 494 def to_str(self):495 """Returns the string representation of the model"""496 return pprint.pformat(self.to_dict())497 498 def __repr__(self):499 """For `print` and `pprint`"""500 return self.to_str()501 502 def __eq__(self, other):503 """Returns true if both objects are equal"""504 if not isinstance(other, V1ObjectMeta):505 return False506 507 return self.to_dict() == other.to_dict()508 509 def __ne__(self, other):510 """Returns true if both objects are not equal"""511 if not isinstance(other, V1ObjectMeta):512 return True513 514 return self.to_dict() != other.to_dict()515 