Class ObjectMeta.Builder
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.Builder
-
- Enclosing class:
- ObjectMeta
public static class ObjectMeta.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectMeta.Builder
addToFinalizers(java.lang.String addToFinalizers)
ObjectMeta.Builder
addToManagedFields(ManagedFieldsEntry addToManagedFields)
ObjectMeta.Builder
addToOwnerReferences(OwnerReference addToOwnerReferences)
ObjectMeta.Builder
annotations(java.util.Map<? extends java.lang.String,? extends java.lang.String> annotations)
ObjectMeta
build()
ObjectMeta.Builder
clearAnnotations()
ObjectMeta.Builder
clearFinalizers()
ObjectMeta.Builder
clearLabels()
ObjectMeta.Builder
clearManagedFields()
ObjectMeta.Builder
clearOwnerReferences()
ObjectMeta.Builder
creationTimestamp(java.time.OffsetDateTime creationTimestamp)
ObjectMeta.Builder
deletionGracePeriodSeconds(java.lang.Number deletionGracePeriodSeconds)
Number of seconds allowed for this object to gracefully terminate before it will be removed from the system.ObjectMeta.Builder
deletionTimestamp(java.time.OffsetDateTime deletionTimestamp)
ObjectMeta.Builder
finalizers(java.util.Collection<? extends java.lang.String> finalizers)
ObjectMeta.Builder
generateName(java.lang.String generateName)
GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided.ObjectMeta.Builder
generation(java.lang.Number generation)
A sequence number representing a specific generation of the desired state.ObjectMeta.Builder
labels(java.util.Map<? extends java.lang.String,? extends java.lang.String> labels)
ObjectMeta.Builder
managedFields(java.util.Collection<? extends ManagedFieldsEntry> managedFields)
ObjectMeta.Builder
name(java.lang.String name)
Name must be unique within a namespace.ObjectMeta.Builder
namespace(java.lang.String namespace)
Namespace defines the space within which each name must be unique.ObjectMeta.Builder
ownerReferences(java.util.Collection<? extends OwnerReference> ownerReferences)
ObjectMeta.Builder
putInAnnotations(java.lang.String putInAnnotationsKey, java.lang.String putInAnnotationsValue)
ObjectMeta.Builder
putInLabels(java.lang.String putInLabelsKey, java.lang.String putInLabelsValue)
ObjectMeta.Builder
resourceVersion(java.lang.String resourceVersion)
An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed.ObjectMeta.Builder
selfLink(java.lang.String selfLink)
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.java.lang.String
toString()
ObjectMeta.Builder
uid(java.lang.String uid)
UID is the unique in time and space value for this object.
-
-
-
Method Detail
-
putInAnnotations
public ObjectMeta.Builder putInAnnotations(java.lang.String putInAnnotationsKey, java.lang.String putInAnnotationsValue)
-
annotations
public ObjectMeta.Builder annotations(java.util.Map<? extends java.lang.String,? extends java.lang.String> annotations)
-
clearAnnotations
public ObjectMeta.Builder clearAnnotations()
-
creationTimestamp
public ObjectMeta.Builder creationTimestamp(java.time.OffsetDateTime creationTimestamp)
- Returns:
this
.
-
deletionGracePeriodSeconds
public ObjectMeta.Builder deletionGracePeriodSeconds(java.lang.Number deletionGracePeriodSeconds)
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.- Returns:
this
.
-
deletionTimestamp
public ObjectMeta.Builder deletionTimestamp(java.time.OffsetDateTime deletionTimestamp)
- Returns:
this
.
-
addToFinalizers
public ObjectMeta.Builder addToFinalizers(java.lang.String addToFinalizers)
-
finalizers
public ObjectMeta.Builder finalizers(java.util.Collection<? extends java.lang.String> finalizers)
-
clearFinalizers
public ObjectMeta.Builder clearFinalizers()
-
generateName
public ObjectMeta.Builder generateName(java.lang.String generateName)
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
- Returns:
this
.
-
generation
public ObjectMeta.Builder generation(java.lang.Number generation)
A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.- Returns:
this
.
-
putInLabels
public ObjectMeta.Builder putInLabels(java.lang.String putInLabelsKey, java.lang.String putInLabelsValue)
-
labels
public ObjectMeta.Builder labels(java.util.Map<? extends java.lang.String,? extends java.lang.String> labels)
-
clearLabels
public ObjectMeta.Builder clearLabels()
-
addToManagedFields
public ObjectMeta.Builder addToManagedFields(ManagedFieldsEntry addToManagedFields)
-
managedFields
public ObjectMeta.Builder managedFields(java.util.Collection<? extends ManagedFieldsEntry> managedFields)
-
clearManagedFields
public ObjectMeta.Builder clearManagedFields()
-
name
public ObjectMeta.Builder name(java.lang.String name)
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- Returns:
this
.
-
namespace
public ObjectMeta.Builder namespace(java.lang.String namespace)
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
- Returns:
this
.
-
addToOwnerReferences
public ObjectMeta.Builder addToOwnerReferences(OwnerReference addToOwnerReferences)
-
ownerReferences
public ObjectMeta.Builder ownerReferences(java.util.Collection<? extends OwnerReference> ownerReferences)
-
clearOwnerReferences
public ObjectMeta.Builder clearOwnerReferences()
-
resourceVersion
public ObjectMeta.Builder resourceVersion(java.lang.String resourceVersion)
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
- Returns:
this
.
-
selfLink
public ObjectMeta.Builder selfLink(java.lang.String selfLink)
Deprecated: selfLink is a legacy read-only field that is no longer populated by the system.- Returns:
this
.
-
uid
public ObjectMeta.Builder uid(java.lang.String uid)
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
- Returns:
this
.
-
build
public ObjectMeta build()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-