All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.ecs.MountPoint Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.ecs;

/**
 * The details of data volume mount points for a container.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.15.0 (build 585166b)", date = "2021-02-03T23:38:33.757Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.ecs.$Module.class, fqn = "@aws-cdk/aws-ecs.MountPoint")
@software.amazon.jsii.Jsii.Proxy(MountPoint.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface MountPoint extends software.amazon.jsii.JsiiSerializable {

    /**
     * The path on the container to mount the host volume at.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getContainerPath();

    /**
     * Specifies whether to give the container read-only access to the volume.
     * 

* If this value is true, the container has read-only access to the volume. * If this value is false, then the container can write to the volume. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.Boolean getReadOnly(); /** * The name of the volume to mount. *

* Must be a volume name referenced in the name parameter of task definition volume. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.String getSourceVolume(); /** * @return a {@link Builder} of {@link MountPoint} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link MountPoint} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { private java.lang.String containerPath; private java.lang.Boolean readOnly; private java.lang.String sourceVolume; /** * Sets the value of {@link MountPoint#getContainerPath} * @param containerPath The path on the container to mount the host volume at. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder containerPath(java.lang.String containerPath) { this.containerPath = containerPath; return this; } /** * Sets the value of {@link MountPoint#getReadOnly} * @param readOnly Specifies whether to give the container read-only access to the volume. This parameter is required. * If this value is true, the container has read-only access to the volume. * If this value is false, then the container can write to the volume. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder readOnly(java.lang.Boolean readOnly) { this.readOnly = readOnly; return this; } /** * Sets the value of {@link MountPoint#getSourceVolume} * @param sourceVolume The name of the volume to mount. This parameter is required. * Must be a volume name referenced in the name parameter of task definition volume. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder sourceVolume(java.lang.String sourceVolume) { this.sourceVolume = sourceVolume; return this; } /** * Builds the configured instance. * @return a new instance of {@link MountPoint} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public MountPoint build() { return new Jsii$Proxy(containerPath, readOnly, sourceVolume); } } /** * An implementation for {@link MountPoint} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements MountPoint { private final java.lang.String containerPath; private final java.lang.Boolean readOnly; private final java.lang.String sourceVolume; /** * 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.containerPath = software.amazon.jsii.Kernel.get(this, "containerPath", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.readOnly = software.amazon.jsii.Kernel.get(this, "readOnly", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.sourceVolume = software.amazon.jsii.Kernel.get(this, "sourceVolume", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final java.lang.String containerPath, final java.lang.Boolean readOnly, final java.lang.String sourceVolume) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.containerPath = java.util.Objects.requireNonNull(containerPath, "containerPath is required"); this.readOnly = java.util.Objects.requireNonNull(readOnly, "readOnly is required"); this.sourceVolume = java.util.Objects.requireNonNull(sourceVolume, "sourceVolume is required"); } @Override public final java.lang.String getContainerPath() { return this.containerPath; } @Override public final java.lang.Boolean getReadOnly() { return this.readOnly; } @Override public final java.lang.String getSourceVolume() { return this.sourceVolume; } @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(); data.set("containerPath", om.valueToTree(this.getContainerPath())); data.set("readOnly", om.valueToTree(this.getReadOnly())); data.set("sourceVolume", om.valueToTree(this.getSourceVolume())); final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-ecs.MountPoint")); 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; MountPoint.Jsii$Proxy that = (MountPoint.Jsii$Proxy) o; if (!containerPath.equals(that.containerPath)) return false; if (!readOnly.equals(that.readOnly)) return false; return this.sourceVolume.equals(that.sourceVolume); } @Override public final int hashCode() { int result = this.containerPath.hashCode(); result = 31 * result + (this.readOnly.hashCode()); result = 31 * result + (this.sourceVolume.hashCode()); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy