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

software.amazon.awscdk.services.apprunner.alpha.SourceConfig Maven / Gradle / Ivy

There is a newer version: 2.173.2-alpha.0
Show newest version
package software.amazon.awscdk.services.apprunner.alpha;

/**
 * (experimental) Result of binding `Source` into a `Service`.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.40.0 (build 9713b9d)", date = "2021-10-27T10:32:43.154Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.SourceConfig")
@software.amazon.jsii.Jsii.Proxy(SourceConfig.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SourceConfig extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) The code repository configuration (mutually exclusive  with `imageRepository`).
     * 

* Default: - no code repository. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.CodeRepositoryProps getCodeRepository() { return null; } /** * (experimental) The ECR repository (required to grant the pull privileges for the iam role). *

* Default: - no ECR repository. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ecr.IRepository getEcrRepository() { return null; } /** * (experimental) The image repository configuration (mutually exclusive with `codeRepository`). *

* Default: - no image repository. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.apprunner.alpha.ImageRepository getImageRepository() { return null; } /** * @return a {@link Builder} of {@link SourceConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link SourceConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { private software.amazon.awscdk.services.apprunner.alpha.CodeRepositoryProps codeRepository; private software.amazon.awscdk.services.ecr.IRepository ecrRepository; private software.amazon.awscdk.services.apprunner.alpha.ImageRepository imageRepository; /** * Sets the value of {@link SourceConfig#getCodeRepository} * @param codeRepository The code repository configuration (mutually exclusive with `imageRepository`). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder codeRepository(software.amazon.awscdk.services.apprunner.alpha.CodeRepositoryProps codeRepository) { this.codeRepository = codeRepository; return this; } /** * Sets the value of {@link SourceConfig#getEcrRepository} * @param ecrRepository The ECR repository (required to grant the pull privileges for the iam role). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder ecrRepository(software.amazon.awscdk.services.ecr.IRepository ecrRepository) { this.ecrRepository = ecrRepository; return this; } /** * Sets the value of {@link SourceConfig#getImageRepository} * @param imageRepository The image repository configuration (mutually exclusive with `codeRepository`). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder imageRepository(software.amazon.awscdk.services.apprunner.alpha.ImageRepository imageRepository) { this.imageRepository = imageRepository; return this; } /** * Builds the configured instance. * @return a new instance of {@link SourceConfig} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public SourceConfig build() { return new Jsii$Proxy(codeRepository, ecrRepository, imageRepository); } } /** * An implementation for {@link SourceConfig} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SourceConfig { private final software.amazon.awscdk.services.apprunner.alpha.CodeRepositoryProps codeRepository; private final software.amazon.awscdk.services.ecr.IRepository ecrRepository; private final software.amazon.awscdk.services.apprunner.alpha.ImageRepository imageRepository; /** * 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.codeRepository = software.amazon.jsii.Kernel.get(this, "codeRepository", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.CodeRepositoryProps.class)); this.ecrRepository = software.amazon.jsii.Kernel.get(this, "ecrRepository", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecr.IRepository.class)); this.imageRepository = software.amazon.jsii.Kernel.get(this, "imageRepository", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.ImageRepository.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final software.amazon.awscdk.services.apprunner.alpha.CodeRepositoryProps codeRepository, final software.amazon.awscdk.services.ecr.IRepository ecrRepository, final software.amazon.awscdk.services.apprunner.alpha.ImageRepository imageRepository) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.codeRepository = codeRepository; this.ecrRepository = ecrRepository; this.imageRepository = imageRepository; } @Override public final software.amazon.awscdk.services.apprunner.alpha.CodeRepositoryProps getCodeRepository() { return this.codeRepository; } @Override public final software.amazon.awscdk.services.ecr.IRepository getEcrRepository() { return this.ecrRepository; } @Override public final software.amazon.awscdk.services.apprunner.alpha.ImageRepository getImageRepository() { return this.imageRepository; } @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.getCodeRepository() != null) { data.set("codeRepository", om.valueToTree(this.getCodeRepository())); } if (this.getEcrRepository() != null) { data.set("ecrRepository", om.valueToTree(this.getEcrRepository())); } if (this.getImageRepository() != null) { data.set("imageRepository", om.valueToTree(this.getImageRepository())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-apprunner-alpha.SourceConfig")); 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; SourceConfig.Jsii$Proxy that = (SourceConfig.Jsii$Proxy) o; if (this.codeRepository != null ? !this.codeRepository.equals(that.codeRepository) : that.codeRepository != null) return false; if (this.ecrRepository != null ? !this.ecrRepository.equals(that.ecrRepository) : that.ecrRepository != null) return false; return this.imageRepository != null ? this.imageRepository.equals(that.imageRepository) : that.imageRepository == null; } @Override public final int hashCode() { int result = this.codeRepository != null ? this.codeRepository.hashCode() : 0; result = 31 * result + (this.ecrRepository != null ? this.ecrRepository.hashCode() : 0); result = 31 * result + (this.imageRepository != null ? this.imageRepository.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy