
org.cdk8s.plus31.k8s.VolumeProjection Maven / Gradle / Ivy
package org.cdk8s.plus31.k8s;
/**
* Projection that may be projected along with other supported volume types.
*
* Exactly one of these fields must be set.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-11-15T12:15:25.190Z")
@software.amazon.jsii.Jsii(module = org.cdk8s.plus31.$Module.class, fqn = "cdk8s-plus-31.k8s.VolumeProjection")
@software.amazon.jsii.Jsii.Proxy(VolumeProjection.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface VolumeProjection extends software.amazon.jsii.JsiiSerializable {
/**
* ClusterTrustBundle allows a pod to access the .spec.trustBundle
field of ClusterTrustBundle objects in an auto-updating file.
*
* Alpha, gated by the ClusterTrustBundleProjection feature gate.
*
* ClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector.
*
* Kubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.ClusterTrustBundleProjection getClusterTrustBundle() {
return null;
}
/**
* configMap information about the configMap data to project.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.ConfigMapProjection getConfigMap() {
return null;
}
/**
* downwardAPI information about the downwardAPI data to project.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.DownwardApiProjection getDownwardApi() {
return null;
}
/**
* secret information about the secret data to project.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.SecretProjection getSecret() {
return null;
}
/**
* serviceAccountToken is information about the serviceAccountToken data to project.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.ServiceAccountTokenProjection getServiceAccountToken() {
return null;
}
/**
* @return a {@link Builder} of {@link VolumeProjection}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link VolumeProjection}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
org.cdk8s.plus31.k8s.ClusterTrustBundleProjection clusterTrustBundle;
org.cdk8s.plus31.k8s.ConfigMapProjection configMap;
org.cdk8s.plus31.k8s.DownwardApiProjection downwardApi;
org.cdk8s.plus31.k8s.SecretProjection secret;
org.cdk8s.plus31.k8s.ServiceAccountTokenProjection serviceAccountToken;
/**
* Sets the value of {@link VolumeProjection#getClusterTrustBundle}
* @param clusterTrustBundle ClusterTrustBundle allows a pod to access the .spec.trustBundle
field of ClusterTrustBundle objects in an auto-updating file.
* Alpha, gated by the ClusterTrustBundleProjection feature gate.
*
* ClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector.
*
* Kubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder clusterTrustBundle(org.cdk8s.plus31.k8s.ClusterTrustBundleProjection clusterTrustBundle) {
this.clusterTrustBundle = clusterTrustBundle;
return this;
}
/**
* Sets the value of {@link VolumeProjection#getConfigMap}
* @param configMap configMap information about the configMap data to project.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder configMap(org.cdk8s.plus31.k8s.ConfigMapProjection configMap) {
this.configMap = configMap;
return this;
}
/**
* Sets the value of {@link VolumeProjection#getDownwardApi}
* @param downwardApi downwardAPI information about the downwardAPI data to project.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder downwardApi(org.cdk8s.plus31.k8s.DownwardApiProjection downwardApi) {
this.downwardApi = downwardApi;
return this;
}
/**
* Sets the value of {@link VolumeProjection#getSecret}
* @param secret secret information about the secret data to project.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder secret(org.cdk8s.plus31.k8s.SecretProjection secret) {
this.secret = secret;
return this;
}
/**
* Sets the value of {@link VolumeProjection#getServiceAccountToken}
* @param serviceAccountToken serviceAccountToken is information about the serviceAccountToken data to project.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder serviceAccountToken(org.cdk8s.plus31.k8s.ServiceAccountTokenProjection serviceAccountToken) {
this.serviceAccountToken = serviceAccountToken;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link VolumeProjection}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public VolumeProjection build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link VolumeProjection}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements VolumeProjection {
private final org.cdk8s.plus31.k8s.ClusterTrustBundleProjection clusterTrustBundle;
private final org.cdk8s.plus31.k8s.ConfigMapProjection configMap;
private final org.cdk8s.plus31.k8s.DownwardApiProjection downwardApi;
private final org.cdk8s.plus31.k8s.SecretProjection secret;
private final org.cdk8s.plus31.k8s.ServiceAccountTokenProjection serviceAccountToken;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.clusterTrustBundle = software.amazon.jsii.Kernel.get(this, "clusterTrustBundle", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.k8s.ClusterTrustBundleProjection.class));
this.configMap = software.amazon.jsii.Kernel.get(this, "configMap", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.k8s.ConfigMapProjection.class));
this.downwardApi = software.amazon.jsii.Kernel.get(this, "downwardApi", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.k8s.DownwardApiProjection.class));
this.secret = software.amazon.jsii.Kernel.get(this, "secret", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.k8s.SecretProjection.class));
this.serviceAccountToken = software.amazon.jsii.Kernel.get(this, "serviceAccountToken", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.k8s.ServiceAccountTokenProjection.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.clusterTrustBundle = builder.clusterTrustBundle;
this.configMap = builder.configMap;
this.downwardApi = builder.downwardApi;
this.secret = builder.secret;
this.serviceAccountToken = builder.serviceAccountToken;
}
@Override
public final org.cdk8s.plus31.k8s.ClusterTrustBundleProjection getClusterTrustBundle() {
return this.clusterTrustBundle;
}
@Override
public final org.cdk8s.plus31.k8s.ConfigMapProjection getConfigMap() {
return this.configMap;
}
@Override
public final org.cdk8s.plus31.k8s.DownwardApiProjection getDownwardApi() {
return this.downwardApi;
}
@Override
public final org.cdk8s.plus31.k8s.SecretProjection getSecret() {
return this.secret;
}
@Override
public final org.cdk8s.plus31.k8s.ServiceAccountTokenProjection getServiceAccountToken() {
return this.serviceAccountToken;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getClusterTrustBundle() != null) {
data.set("clusterTrustBundle", om.valueToTree(this.getClusterTrustBundle()));
}
if (this.getConfigMap() != null) {
data.set("configMap", om.valueToTree(this.getConfigMap()));
}
if (this.getDownwardApi() != null) {
data.set("downwardApi", om.valueToTree(this.getDownwardApi()));
}
if (this.getSecret() != null) {
data.set("secret", om.valueToTree(this.getSecret()));
}
if (this.getServiceAccountToken() != null) {
data.set("serviceAccountToken", om.valueToTree(this.getServiceAccountToken()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk8s-plus-31.k8s.VolumeProjection"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
VolumeProjection.Jsii$Proxy that = (VolumeProjection.Jsii$Proxy) o;
if (this.clusterTrustBundle != null ? !this.clusterTrustBundle.equals(that.clusterTrustBundle) : that.clusterTrustBundle != null) return false;
if (this.configMap != null ? !this.configMap.equals(that.configMap) : that.configMap != null) return false;
if (this.downwardApi != null ? !this.downwardApi.equals(that.downwardApi) : that.downwardApi != null) return false;
if (this.secret != null ? !this.secret.equals(that.secret) : that.secret != null) return false;
return this.serviceAccountToken != null ? this.serviceAccountToken.equals(that.serviceAccountToken) : that.serviceAccountToken == null;
}
@Override
public final int hashCode() {
int result = this.clusterTrustBundle != null ? this.clusterTrustBundle.hashCode() : 0;
result = 31 * result + (this.configMap != null ? this.configMap.hashCode() : 0);
result = 31 * result + (this.downwardApi != null ? this.downwardApi.hashCode() : 0);
result = 31 * result + (this.secret != null ? this.secret.hashCode() : 0);
result = 31 * result + (this.serviceAccountToken != null ? this.serviceAccountToken.hashCode() : 0);
return result;
}
}
}