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

io.github.cdklabs.cdk.docker.image.deployment.DestinationConfig Maven / Gradle / Ivy

Go to download

This module allows you to copy docker image assets to a repository you control. This can be necessary if you want to build a Docker image in one CDK app and consume it in a different app or outside the CDK.

There is a newer version: 0.0.660
Show newest version
package io.github.cdklabs.cdk.docker.image.deployment;

/**
 * Destination information.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-26T00:26:53.806Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.docker.image.deployment.$Module.class, fqn = "cdk-docker-image-deployment.DestinationConfig")
@software.amazon.jsii.Jsii.Proxy(DestinationConfig.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface DestinationConfig extends software.amazon.jsii.JsiiSerializable {

    /**
     * The URI of the destination repository to deploy to.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getDestinationUri();

    /**
     * The login command and region.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.docker.image.deployment.LoginConfig getLoginConfig();

    /**
     * The tag of the deployed image.
     * 

* Default: - the tag of the source */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getDestinationTag() { return null; } /** * @return a {@link Builder} of {@link DestinationConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link DestinationConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String destinationUri; io.github.cdklabs.cdk.docker.image.deployment.LoginConfig loginConfig; java.lang.String destinationTag; /** * Sets the value of {@link DestinationConfig#getDestinationUri} * @param destinationUri The URI of the destination repository to deploy to. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder destinationUri(java.lang.String destinationUri) { this.destinationUri = destinationUri; return this; } /** * Sets the value of {@link DestinationConfig#getLoginConfig} * @param loginConfig The login command and region. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder loginConfig(io.github.cdklabs.cdk.docker.image.deployment.LoginConfig loginConfig) { this.loginConfig = loginConfig; return this; } /** * Sets the value of {@link DestinationConfig#getDestinationTag} * @param destinationTag The tag of the deployed image. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder destinationTag(java.lang.String destinationTag) { this.destinationTag = destinationTag; return this; } /** * Builds the configured instance. * @return a new instance of {@link DestinationConfig} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public DestinationConfig build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link DestinationConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DestinationConfig { private final java.lang.String destinationUri; private final io.github.cdklabs.cdk.docker.image.deployment.LoginConfig loginConfig; private final java.lang.String destinationTag; /** * 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.destinationUri = software.amazon.jsii.Kernel.get(this, "destinationUri", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.loginConfig = software.amazon.jsii.Kernel.get(this, "loginConfig", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.docker.image.deployment.LoginConfig.class)); this.destinationTag = software.amazon.jsii.Kernel.get(this, "destinationTag", 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 Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.destinationUri = java.util.Objects.requireNonNull(builder.destinationUri, "destinationUri is required"); this.loginConfig = java.util.Objects.requireNonNull(builder.loginConfig, "loginConfig is required"); this.destinationTag = builder.destinationTag; } @Override public final java.lang.String getDestinationUri() { return this.destinationUri; } @Override public final io.github.cdklabs.cdk.docker.image.deployment.LoginConfig getLoginConfig() { return this.loginConfig; } @Override public final java.lang.String getDestinationTag() { return this.destinationTag; } @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("destinationUri", om.valueToTree(this.getDestinationUri())); data.set("loginConfig", om.valueToTree(this.getLoginConfig())); if (this.getDestinationTag() != null) { data.set("destinationTag", om.valueToTree(this.getDestinationTag())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-docker-image-deployment.DestinationConfig")); 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; DestinationConfig.Jsii$Proxy that = (DestinationConfig.Jsii$Proxy) o; if (!destinationUri.equals(that.destinationUri)) return false; if (!loginConfig.equals(that.loginConfig)) return false; return this.destinationTag != null ? this.destinationTag.equals(that.destinationTag) : that.destinationTag == null; } @Override public final int hashCode() { int result = this.destinationUri.hashCode(); result = 31 * result + (this.loginConfig.hashCode()); result = 31 * result + (this.destinationTag != null ? this.destinationTag.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy