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

software.amazon.awscdk.services.codebuild.DockerImageOptions Maven / Gradle / Ivy

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

/**
 * The options when creating a CodeBuild Docker build image using {@link LinuxBuildImage.fromDockerRegistry} or {@link WindowsBuildImage.fromDockerRegistry}.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.19.0 (build 7c562bc)", date = "2019-10-15T20:00:31.405Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface DockerImageOptions extends software.amazon.jsii.JsiiSerializable {

    /**
     * The credentials, stored in Secrets Manager, used for accessing the repository holding the image, if the repository is private.
     * 
     * Default: no credentials will be used (we assume the repository is public)
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    software.amazon.awscdk.services.secretsmanager.ISecret getSecretsManagerCredentials();

    /**
     * @return a {@link Builder} of {@link DockerImageOptions}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link DockerImageOptions}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static final class Builder {
        private software.amazon.awscdk.services.secretsmanager.ISecret secretsManagerCredentials;

        /**
         * Sets the value of SecretsManagerCredentials
         * @param secretsManagerCredentials The credentials, stored in Secrets Manager, used for accessing the repository holding the image, if the repository is private.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder secretsManagerCredentials(software.amazon.awscdk.services.secretsmanager.ISecret secretsManagerCredentials) {
            this.secretsManagerCredentials = secretsManagerCredentials;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link DockerImageOptions}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public DockerImageOptions build() {
            return new Jsii$Proxy(secretsManagerCredentials);
        }
    }

    /**
     * An implementation for {@link DockerImageOptions}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DockerImageOptions {
        private final software.amazon.awscdk.services.secretsmanager.ISecret secretsManagerCredentials;

        /**
         * 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(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
            this.setObjRef(objRef);
            this.secretsManagerCredentials = this.jsiiGet("secretsManagerCredentials", software.amazon.awscdk.services.secretsmanager.ISecret.class);
        }

        /**
         * Constructor that initializes the object based on literal property values passed by the {@link Builder}.
         */
        private Jsii$Proxy(software.amazon.awscdk.services.secretsmanager.ISecret secretsManagerCredentials) {
            super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
            this.secretsManagerCredentials = secretsManagerCredentials;
        }

        @Override
        public software.amazon.awscdk.services.secretsmanager.ISecret getSecretsManagerCredentials() {
            return this.secretsManagerCredentials;
        }

        @Override
        public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
            com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
            com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
            if (this.getSecretsManagerCredentials() != null) {
                obj.set("secretsManagerCredentials", om.valueToTree(this.getSecretsManagerCredentials()));
            }
            return obj;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            DockerImageOptions.Jsii$Proxy that = (DockerImageOptions.Jsii$Proxy) o;

            return this.secretsManagerCredentials != null ? this.secretsManagerCredentials.equals(that.secretsManagerCredentials) : that.secretsManagerCredentials == null;
        }

        @Override
        public int hashCode() {
            int result = this.secretsManagerCredentials != null ? this.secretsManagerCredentials.hashCode() : 0;
            return result;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy