
org.cdk8s.plus31.ContainerOpts Maven / Gradle / Ivy
package org.cdk8s.plus31;
/**
* Optional properties of a container.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.104.0 (build e79254c)", date = "2024-10-12T12:14:17.323Z")
@software.amazon.jsii.Jsii(module = org.cdk8s.plus31.$Module.class, fqn = "cdk8s-plus-31.ContainerOpts")
@software.amazon.jsii.Jsii.Proxy(ContainerOpts.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface ContainerOpts extends software.amazon.jsii.JsiiSerializable {
/**
* Arguments to the entrypoint. The docker image's CMD is used if command
is not provided.
*
* Variable references $(VAR_NAME) are expanded using the container's
* environment. If a variable cannot be resolved, the reference in the input
* string will be unchanged. The $(VAR_NAME) syntax can be escaped with a
* double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
* regardless of whether the variable exists or not.
*
* Cannot be updated.
*
* Default: []
*
* @see https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getArgs() {
return null;
}
/**
* Entrypoint array.
*
* Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment.
* If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME).
* Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated.
* More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
*
* Default: - The docker image's ENTRYPOINT.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getCommand() {
return null;
}
/**
* List of sources to populate environment variables in the container.
*
* When a key exists in multiple sources, the value associated with
* the last source will take precedence. Values defined by the envVariables
property
* with a duplicate key will take precedence.
*
* Default: - No sources.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getEnvFrom() {
return null;
}
/**
* Environment variables to set in the container.
*
* Default: - No environment variables.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.Map getEnvVariables() {
return null;
}
/**
* Image pull policy for this container.
*
* Default: ImagePullPolicy.ALWAYS
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.ImagePullPolicy getImagePullPolicy() {
return null;
}
/**
* Describes actions that the management system should take in response to container lifecycle events.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.ContainerLifecycle getLifecycle() {
return null;
}
/**
* Periodic probe of container liveness.
*
* Container will be restarted if the probe fails.
*
* Default: - no liveness probe is defined
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.Probe getLiveness() {
return null;
}
/**
* Name of the container specified as a DNS_LABEL.
*
* Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
*
* Default: 'main'
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getName() {
return null;
}
/**
* @deprecated
* - use
portNumber
.
*
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
default @org.jetbrains.annotations.Nullable java.lang.Number getPort() {
return null;
}
/**
* Number of port to expose on the pod's IP address.
*
* This must be a valid port number, 0 < x < 65536.
*
* This is a convinience property if all you need a single TCP numbered port.
* In case more advanced configuartion is required, use the ports
property.
*
* This port is added to the list of ports mentioned in the ports
property.
*
* Default: - Only the ports mentiond in the `ports` property are exposed.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Number getPortNumber() {
return null;
}
/**
* List of ports to expose from this container.
*
* Default: - Only the port mentioned in the `portNumber` property is exposed.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getPorts() {
return null;
}
/**
* Determines when the container is ready to serve traffic.
*
* Default: - no readiness probe is defined
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.Probe getReadiness() {
return null;
}
/**
* Compute resources (CPU and memory requests and limits) required by the container.
*
* Default: cpu:
* request: 1000 millis
* limit: 1500 millis
* memory:
* request: 512 mebibytes
* limit: 2048 mebibytes
*
* @see https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.ContainerResources getResources() {
return null;
}
/**
* Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
*
* Default: - no restart policy is defined and the pod restart policy is applied
*
* @see https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.ContainerRestartPolicy getRestartPolicy() {
return null;
}
/**
* SecurityContext defines the security options the container should be run with.
*
* If set, the fields override equivalent fields of the pod's security context.
*
* Default: ensureNonRoot: true
* privileged: false
* readOnlyRootFilesystem: true
* allowPrivilegeEscalation: false
* user: 25000
* group: 26000
*
* @see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.ContainerSecurityContextProps getSecurityContext() {
return null;
}
/**
* StartupProbe indicates that the Pod has successfully initialized.
*
* If specified, no other probes are executed until this completes successfully
*
* Default: - If a port is provided, then knocks on that port
* to determine when the container is ready for readiness and
* liveness probe checks.
* Otherwise, no startup probe is defined.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.Probe getStartup() {
return null;
}
/**
* Pod volumes to mount into the container's filesystem.
*
* Cannot be updated.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.util.List getVolumeMounts() {
return null;
}
/**
* Container's working directory.
*
* If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
*
* Default: - The container runtime's default.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.String getWorkingDir() {
return null;
}
/**
* @return a {@link Builder} of {@link ContainerOpts}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link ContainerOpts}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List args;
java.util.List command;
java.util.List envFrom;
java.util.Map envVariables;
org.cdk8s.plus31.ImagePullPolicy imagePullPolicy;
org.cdk8s.plus31.ContainerLifecycle lifecycle;
org.cdk8s.plus31.Probe liveness;
java.lang.String name;
java.lang.Number port;
java.lang.Number portNumber;
java.util.List ports;
org.cdk8s.plus31.Probe readiness;
org.cdk8s.plus31.ContainerResources resources;
org.cdk8s.plus31.ContainerRestartPolicy restartPolicy;
org.cdk8s.plus31.ContainerSecurityContextProps securityContext;
org.cdk8s.plus31.Probe startup;
java.util.List volumeMounts;
java.lang.String workingDir;
/**
* Sets the value of {@link ContainerOpts#getArgs}
* @param args Arguments to the entrypoint. The docker image's CMD is used if command
is not provided.
* Variable references $(VAR_NAME) are expanded using the container's
* environment. If a variable cannot be resolved, the reference in the input
* string will be unchanged. The $(VAR_NAME) syntax can be escaped with a
* double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
* regardless of whether the variable exists or not.
*
* Cannot be updated.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder args(java.util.List args) {
this.args = args;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getCommand}
* @param command Entrypoint array.
* Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment.
* If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME).
* Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated.
* More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder command(java.util.List command) {
this.command = command;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getEnvFrom}
* @param envFrom List of sources to populate environment variables in the container.
* When a key exists in multiple sources, the value associated with
* the last source will take precedence. Values defined by the envVariables
property
* with a duplicate key will take precedence.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder envFrom(java.util.List extends org.cdk8s.plus31.EnvFrom> envFrom) {
this.envFrom = (java.util.List)envFrom;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getEnvVariables}
* @param envVariables Environment variables to set in the container.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder envVariables(java.util.Map envVariables) {
this.envVariables = (java.util.Map)envVariables;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getImagePullPolicy}
* @param imagePullPolicy Image pull policy for this container.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder imagePullPolicy(org.cdk8s.plus31.ImagePullPolicy imagePullPolicy) {
this.imagePullPolicy = imagePullPolicy;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getLifecycle}
* @param lifecycle Describes actions that the management system should take in response to container lifecycle events.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder lifecycle(org.cdk8s.plus31.ContainerLifecycle lifecycle) {
this.lifecycle = lifecycle;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getLiveness}
* @param liveness Periodic probe of container liveness.
* Container will be restarted if the probe fails.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder liveness(org.cdk8s.plus31.Probe liveness) {
this.liveness = liveness;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getName}
* @param name Name of the container specified as a DNS_LABEL.
* Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder name(java.lang.String name) {
this.name = name;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getPort}
* @param port the value to be set.
* @return {@code this}
* @deprecated - use `portNumber`.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated)
@Deprecated
public Builder port(java.lang.Number port) {
this.port = port;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getPortNumber}
* @param portNumber Number of port to expose on the pod's IP address.
* This must be a valid port number, 0 < x < 65536.
*
* This is a convinience property if all you need a single TCP numbered port.
* In case more advanced configuartion is required, use the ports
property.
*
* This port is added to the list of ports mentioned in the ports
property.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder portNumber(java.lang.Number portNumber) {
this.portNumber = portNumber;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getPorts}
* @param ports List of ports to expose from this container.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder ports(java.util.List extends org.cdk8s.plus31.ContainerPort> ports) {
this.ports = (java.util.List)ports;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getReadiness}
* @param readiness Determines when the container is ready to serve traffic.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder readiness(org.cdk8s.plus31.Probe readiness) {
this.readiness = readiness;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getResources}
* @param resources Compute resources (CPU and memory requests and limits) required by the container.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder resources(org.cdk8s.plus31.ContainerResources resources) {
this.resources = resources;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getRestartPolicy}
* @param restartPolicy Kubelet will start init containers with restartPolicy=Always in the order with other init containers, but instead of waiting for its completion, it will wait for the container startup completion Currently, only accepted value is Always.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder restartPolicy(org.cdk8s.plus31.ContainerRestartPolicy restartPolicy) {
this.restartPolicy = restartPolicy;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getSecurityContext}
* @param securityContext SecurityContext defines the security options the container should be run with.
* If set, the fields override equivalent fields of the pod's security context.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder securityContext(org.cdk8s.plus31.ContainerSecurityContextProps securityContext) {
this.securityContext = securityContext;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getStartup}
* @param startup StartupProbe indicates that the Pod has successfully initialized.
* If specified, no other probes are executed until this completes successfully
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder startup(org.cdk8s.plus31.Probe startup) {
this.startup = startup;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getVolumeMounts}
* @param volumeMounts Pod volumes to mount into the container's filesystem.
* Cannot be updated.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder volumeMounts(java.util.List extends org.cdk8s.plus31.VolumeMount> volumeMounts) {
this.volumeMounts = (java.util.List)volumeMounts;
return this;
}
/**
* Sets the value of {@link ContainerOpts#getWorkingDir}
* @param workingDir Container's working directory.
* If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder workingDir(java.lang.String workingDir) {
this.workingDir = workingDir;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link ContainerOpts}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public ContainerOpts build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link ContainerOpts}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ContainerOpts {
private final java.util.List args;
private final java.util.List command;
private final java.util.List envFrom;
private final java.util.Map envVariables;
private final org.cdk8s.plus31.ImagePullPolicy imagePullPolicy;
private final org.cdk8s.plus31.ContainerLifecycle lifecycle;
private final org.cdk8s.plus31.Probe liveness;
private final java.lang.String name;
private final java.lang.Number port;
private final java.lang.Number portNumber;
private final java.util.List ports;
private final org.cdk8s.plus31.Probe readiness;
private final org.cdk8s.plus31.ContainerResources resources;
private final org.cdk8s.plus31.ContainerRestartPolicy restartPolicy;
private final org.cdk8s.plus31.ContainerSecurityContextProps securityContext;
private final org.cdk8s.plus31.Probe startup;
private final java.util.List volumeMounts;
private final java.lang.String workingDir;
/**
* 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.args = software.amazon.jsii.Kernel.get(this, "args", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.command = software.amazon.jsii.Kernel.get(this, "command", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.envFrom = software.amazon.jsii.Kernel.get(this, "envFrom", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.EnvFrom.class)));
this.envVariables = software.amazon.jsii.Kernel.get(this, "envVariables", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.EnvValue.class)));
this.imagePullPolicy = software.amazon.jsii.Kernel.get(this, "imagePullPolicy", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.ImagePullPolicy.class));
this.lifecycle = software.amazon.jsii.Kernel.get(this, "lifecycle", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.ContainerLifecycle.class));
this.liveness = software.amazon.jsii.Kernel.get(this, "liveness", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.Probe.class));
this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.port = software.amazon.jsii.Kernel.get(this, "port", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.portNumber = software.amazon.jsii.Kernel.get(this, "portNumber", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.ports = software.amazon.jsii.Kernel.get(this, "ports", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.ContainerPort.class)));
this.readiness = software.amazon.jsii.Kernel.get(this, "readiness", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.Probe.class));
this.resources = software.amazon.jsii.Kernel.get(this, "resources", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.ContainerResources.class));
this.restartPolicy = software.amazon.jsii.Kernel.get(this, "restartPolicy", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.ContainerRestartPolicy.class));
this.securityContext = software.amazon.jsii.Kernel.get(this, "securityContext", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.ContainerSecurityContextProps.class));
this.startup = software.amazon.jsii.Kernel.get(this, "startup", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.Probe.class));
this.volumeMounts = software.amazon.jsii.Kernel.get(this, "volumeMounts", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.VolumeMount.class)));
this.workingDir = software.amazon.jsii.Kernel.get(this, "workingDir", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.args = builder.args;
this.command = builder.command;
this.envFrom = (java.util.List)builder.envFrom;
this.envVariables = (java.util.Map)builder.envVariables;
this.imagePullPolicy = builder.imagePullPolicy;
this.lifecycle = builder.lifecycle;
this.liveness = builder.liveness;
this.name = builder.name;
this.port = builder.port;
this.portNumber = builder.portNumber;
this.ports = (java.util.List)builder.ports;
this.readiness = builder.readiness;
this.resources = builder.resources;
this.restartPolicy = builder.restartPolicy;
this.securityContext = builder.securityContext;
this.startup = builder.startup;
this.volumeMounts = (java.util.List)builder.volumeMounts;
this.workingDir = builder.workingDir;
}
@Override
public final java.util.List getArgs() {
return this.args;
}
@Override
public final java.util.List getCommand() {
return this.command;
}
@Override
public final java.util.List getEnvFrom() {
return this.envFrom;
}
@Override
public final java.util.Map getEnvVariables() {
return this.envVariables;
}
@Override
public final org.cdk8s.plus31.ImagePullPolicy getImagePullPolicy() {
return this.imagePullPolicy;
}
@Override
public final org.cdk8s.plus31.ContainerLifecycle getLifecycle() {
return this.lifecycle;
}
@Override
public final org.cdk8s.plus31.Probe getLiveness() {
return this.liveness;
}
@Override
public final java.lang.String getName() {
return this.name;
}
@Override
public final java.lang.Number getPort() {
return this.port;
}
@Override
public final java.lang.Number getPortNumber() {
return this.portNumber;
}
@Override
public final java.util.List getPorts() {
return this.ports;
}
@Override
public final org.cdk8s.plus31.Probe getReadiness() {
return this.readiness;
}
@Override
public final org.cdk8s.plus31.ContainerResources getResources() {
return this.resources;
}
@Override
public final org.cdk8s.plus31.ContainerRestartPolicy getRestartPolicy() {
return this.restartPolicy;
}
@Override
public final org.cdk8s.plus31.ContainerSecurityContextProps getSecurityContext() {
return this.securityContext;
}
@Override
public final org.cdk8s.plus31.Probe getStartup() {
return this.startup;
}
@Override
public final java.util.List getVolumeMounts() {
return this.volumeMounts;
}
@Override
public final java.lang.String getWorkingDir() {
return this.workingDir;
}
@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.getArgs() != null) {
data.set("args", om.valueToTree(this.getArgs()));
}
if (this.getCommand() != null) {
data.set("command", om.valueToTree(this.getCommand()));
}
if (this.getEnvFrom() != null) {
data.set("envFrom", om.valueToTree(this.getEnvFrom()));
}
if (this.getEnvVariables() != null) {
data.set("envVariables", om.valueToTree(this.getEnvVariables()));
}
if (this.getImagePullPolicy() != null) {
data.set("imagePullPolicy", om.valueToTree(this.getImagePullPolicy()));
}
if (this.getLifecycle() != null) {
data.set("lifecycle", om.valueToTree(this.getLifecycle()));
}
if (this.getLiveness() != null) {
data.set("liveness", om.valueToTree(this.getLiveness()));
}
if (this.getName() != null) {
data.set("name", om.valueToTree(this.getName()));
}
if (this.getPort() != null) {
data.set("port", om.valueToTree(this.getPort()));
}
if (this.getPortNumber() != null) {
data.set("portNumber", om.valueToTree(this.getPortNumber()));
}
if (this.getPorts() != null) {
data.set("ports", om.valueToTree(this.getPorts()));
}
if (this.getReadiness() != null) {
data.set("readiness", om.valueToTree(this.getReadiness()));
}
if (this.getResources() != null) {
data.set("resources", om.valueToTree(this.getResources()));
}
if (this.getRestartPolicy() != null) {
data.set("restartPolicy", om.valueToTree(this.getRestartPolicy()));
}
if (this.getSecurityContext() != null) {
data.set("securityContext", om.valueToTree(this.getSecurityContext()));
}
if (this.getStartup() != null) {
data.set("startup", om.valueToTree(this.getStartup()));
}
if (this.getVolumeMounts() != null) {
data.set("volumeMounts", om.valueToTree(this.getVolumeMounts()));
}
if (this.getWorkingDir() != null) {
data.set("workingDir", om.valueToTree(this.getWorkingDir()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk8s-plus-31.ContainerOpts"));
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;
ContainerOpts.Jsii$Proxy that = (ContainerOpts.Jsii$Proxy) o;
if (this.args != null ? !this.args.equals(that.args) : that.args != null) return false;
if (this.command != null ? !this.command.equals(that.command) : that.command != null) return false;
if (this.envFrom != null ? !this.envFrom.equals(that.envFrom) : that.envFrom != null) return false;
if (this.envVariables != null ? !this.envVariables.equals(that.envVariables) : that.envVariables != null) return false;
if (this.imagePullPolicy != null ? !this.imagePullPolicy.equals(that.imagePullPolicy) : that.imagePullPolicy != null) return false;
if (this.lifecycle != null ? !this.lifecycle.equals(that.lifecycle) : that.lifecycle != null) return false;
if (this.liveness != null ? !this.liveness.equals(that.liveness) : that.liveness != null) return false;
if (this.name != null ? !this.name.equals(that.name) : that.name != null) return false;
if (this.port != null ? !this.port.equals(that.port) : that.port != null) return false;
if (this.portNumber != null ? !this.portNumber.equals(that.portNumber) : that.portNumber != null) return false;
if (this.ports != null ? !this.ports.equals(that.ports) : that.ports != null) return false;
if (this.readiness != null ? !this.readiness.equals(that.readiness) : that.readiness != null) return false;
if (this.resources != null ? !this.resources.equals(that.resources) : that.resources != null) return false;
if (this.restartPolicy != null ? !this.restartPolicy.equals(that.restartPolicy) : that.restartPolicy != null) return false;
if (this.securityContext != null ? !this.securityContext.equals(that.securityContext) : that.securityContext != null) return false;
if (this.startup != null ? !this.startup.equals(that.startup) : that.startup != null) return false;
if (this.volumeMounts != null ? !this.volumeMounts.equals(that.volumeMounts) : that.volumeMounts != null) return false;
return this.workingDir != null ? this.workingDir.equals(that.workingDir) : that.workingDir == null;
}
@Override
public final int hashCode() {
int result = this.args != null ? this.args.hashCode() : 0;
result = 31 * result + (this.command != null ? this.command.hashCode() : 0);
result = 31 * result + (this.envFrom != null ? this.envFrom.hashCode() : 0);
result = 31 * result + (this.envVariables != null ? this.envVariables.hashCode() : 0);
result = 31 * result + (this.imagePullPolicy != null ? this.imagePullPolicy.hashCode() : 0);
result = 31 * result + (this.lifecycle != null ? this.lifecycle.hashCode() : 0);
result = 31 * result + (this.liveness != null ? this.liveness.hashCode() : 0);
result = 31 * result + (this.name != null ? this.name.hashCode() : 0);
result = 31 * result + (this.port != null ? this.port.hashCode() : 0);
result = 31 * result + (this.portNumber != null ? this.portNumber.hashCode() : 0);
result = 31 * result + (this.ports != null ? this.ports.hashCode() : 0);
result = 31 * result + (this.readiness != null ? this.readiness.hashCode() : 0);
result = 31 * result + (this.resources != null ? this.resources.hashCode() : 0);
result = 31 * result + (this.restartPolicy != null ? this.restartPolicy.hashCode() : 0);
result = 31 * result + (this.securityContext != null ? this.securityContext.hashCode() : 0);
result = 31 * result + (this.startup != null ? this.startup.hashCode() : 0);
result = 31 * result + (this.volumeMounts != null ? this.volumeMounts.hashCode() : 0);
result = 31 * result + (this.workingDir != null ? this.workingDir.hashCode() : 0);
return result;
}
}
}