Package org.cdk8s.plus25.k8s
Class ObjectReference.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.ObjectReference.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<ObjectReference>
- Enclosing interface:
- ObjectReference
@Stability(Stable) public static final class ObjectReference.Builder extends Object implements software.amazon.jsii.Builder<ObjectReference>
A builder forObjectReference
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectReference.BuilderapiVersion(String apiVersion)Sets the value ofObjectReference.getApiVersion()ObjectReferencebuild()Builds the configured instance.ObjectReference.BuilderfieldPath(String fieldPath)Sets the value ofObjectReference.getFieldPath()ObjectReference.Builderkind(String kind)Sets the value ofObjectReference.getKind()ObjectReference.Buildername(String name)Sets the value ofObjectReference.getName()ObjectReference.Buildernamespace(String namespace)Sets the value ofObjectReference.getNamespace()ObjectReference.BuilderresourceVersion(String resourceVersion)Sets the value ofObjectReference.getResourceVersion()ObjectReference.Builderuid(String uid)Sets the value ofObjectReference.getUid()
-
-
-
Method Detail
-
apiVersion
@Stability(Stable) public ObjectReference.Builder apiVersion(String apiVersion)
Sets the value ofObjectReference.getApiVersion()- Parameters:
apiVersion- API version of the referent.- Returns:
this
-
fieldPath
@Stability(Stable) public ObjectReference.Builder fieldPath(String fieldPath)
Sets the value ofObjectReference.getFieldPath()- Parameters:
fieldPath- If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.- Returns:
this
-
kind
@Stability(Stable) public ObjectReference.Builder kind(String kind)
Sets the value ofObjectReference.getKind()- Parameters:
kind- Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds- Returns:
this
-
name
@Stability(Stable) public ObjectReference.Builder name(String name)
Sets the value ofObjectReference.getName()- Parameters:
name- Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names- Returns:
this
-
namespace
@Stability(Stable) public ObjectReference.Builder namespace(String namespace)
Sets the value ofObjectReference.getNamespace()- Parameters:
namespace- Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/- Returns:
this
-
resourceVersion
@Stability(Stable) public ObjectReference.Builder resourceVersion(String resourceVersion)
Sets the value ofObjectReference.getResourceVersion()- Parameters:
resourceVersion- Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency- Returns:
this
-
uid
@Stability(Stable) public ObjectReference.Builder uid(String uid)
Sets the value ofObjectReference.getUid()- Parameters:
uid- UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids- Returns:
this
-
build
@Stability(Stable) public ObjectReference build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<ObjectReference>- Returns:
- a new instance of
ObjectReference - Throws:
NullPointerException- if any required attribute was not provided
-
-