
org.cdk8s.plus31.k8s.KubeConfigMap Maven / Gradle / Ivy
package org.cdk8s.plus31.k8s;
/**
* ConfigMap holds configuration data for pods to consume.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-11-15T12:15:24.999Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.cdk8s.plus31.$Module.class, fqn = "cdk8s-plus-31.k8s.KubeConfigMap")
public class KubeConfigMap extends org.cdk8s.ApiObject {
protected KubeConfigMap(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected KubeConfigMap(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
GVK = software.amazon.jsii.JsiiObject.jsiiStaticGet(org.cdk8s.plus31.k8s.KubeConfigMap.class, "GVK", software.amazon.jsii.NativeType.forClass(org.cdk8s.GroupVersionKind.class));
}
/**
* Defines a "io.k8s.api.core.v1.ConfigMap" API object.
*
* @param scope the scope in which to define this object. This parameter is required.
* @param id a scope-local name for the object. This parameter is required.
* @param props initialization props.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public KubeConfigMap(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.KubeConfigMapProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), props });
}
/**
* Defines a "io.k8s.api.core.v1.ConfigMap" API object.
*
* @param scope the scope in which to define this object. This parameter is required.
* @param id a scope-local name for the object. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public KubeConfigMap(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required") });
}
/**
* Renders a Kubernetes manifest for "io.k8s.api.core.v1.ConfigMap".
*
* This can be used to inline resource manifests inside other objects (e.g. as templates).
*
* @param props initialization props.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull java.lang.Object manifest(final @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.KubeConfigMapProps props) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.plus31.k8s.KubeConfigMap.class, "manifest", software.amazon.jsii.NativeType.forClass(java.lang.Object.class), new Object[] { props });
}
/**
* Renders a Kubernetes manifest for "io.k8s.api.core.v1.ConfigMap".
*
* This can be used to inline resource manifests inside other objects (e.g. as templates).
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull java.lang.Object manifest() {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(org.cdk8s.plus31.k8s.KubeConfigMap.class, "manifest", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Renders the object to Kubernetes JSON.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public @org.jetbrains.annotations.NotNull java.lang.Object toJson() {
return software.amazon.jsii.Kernel.call(this, "toJson", software.amazon.jsii.NativeType.forClass(java.lang.Object.class));
}
/**
* Returns the apiVersion and kind for "io.k8s.api.core.v1.ConfigMap".
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static org.cdk8s.GroupVersionKind GVK;
/**
* A fluent builder for {@link org.cdk8s.plus31.k8s.KubeConfigMap}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope the scope in which to define this object. This parameter is required.
* @param id a scope-local name for the object. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private org.cdk8s.plus31.k8s.KubeConfigMapProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
}
/**
* BinaryData contains the binary data.
*
* Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet.
*
* @return {@code this}
* @param binaryData BinaryData contains the binary data. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder binaryData(final java.util.Map binaryData) {
this.props().binaryData(binaryData);
return this;
}
/**
* Data contains the configuration data.
*
* Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process.
*
* @return {@code this}
* @param data Data contains the configuration data. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder data(final java.util.Map data) {
this.props().data(data);
return this;
}
/**
* Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified).
*
* If not set to true, the field can be modified at any time. Defaulted to nil.
*
* @return {@code this}
* @param immutable Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder immutable(final java.lang.Boolean immutable) {
this.props().immutable(immutable);
return this;
}
/**
* Standard object's metadata.
*
* More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*
* @return {@code this}
* @param metadata Standard object's metadata. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder metadata(final org.cdk8s.plus31.k8s.ObjectMeta metadata) {
this.props().metadata(metadata);
return this;
}
/**
* @return a newly built instance of {@link org.cdk8s.plus31.k8s.KubeConfigMap}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public org.cdk8s.plus31.k8s.KubeConfigMap build() {
return new org.cdk8s.plus31.k8s.KubeConfigMap(
this.scope,
this.id,
this.props != null ? this.props.build() : null
);
}
private org.cdk8s.plus31.k8s.KubeConfigMapProps.Builder props() {
if (this.props == null) {
this.props = new org.cdk8s.plus31.k8s.KubeConfigMapProps.Builder();
}
return this.props;
}
}
}