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

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

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

/**
 * (experimental) Properties of the CodeRepository.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.40.0 (build 9713b9d)", date = "2021-10-27T10:32:43.150Z")
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.apprunner.alpha.$Module.class, fqn = "@aws-cdk/aws-apprunner-alpha.CodeRepositoryProps")
@software.amazon.jsii.Jsii.Proxy(CodeRepositoryProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface CodeRepositoryProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Configuration for building and running the service from a source code repository.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.CodeConfiguration getCodeConfiguration();

    /**
     * (experimental) The App Runner connection for GitHub.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.GitHubConnection getConnection();

    /**
     * (experimental) The location of the repository that contains the source code.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getRepositoryUrl();

    /**
     * (experimental) The version that should be used within the source code repository.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.apprunner.alpha.SourceCodeVersion getSourceCodeVersion();

    /**
     * @return a {@link Builder} of {@link CodeRepositoryProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link CodeRepositoryProps}
     */
    @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.CodeConfiguration codeConfiguration;
        private software.amazon.awscdk.services.apprunner.alpha.GitHubConnection connection;
        private java.lang.String repositoryUrl;
        private software.amazon.awscdk.services.apprunner.alpha.SourceCodeVersion sourceCodeVersion;

        /**
         * Sets the value of {@link CodeRepositoryProps#getCodeConfiguration}
         * @param codeConfiguration Configuration for building and running the service from a source code repository. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder codeConfiguration(software.amazon.awscdk.services.apprunner.alpha.CodeConfiguration codeConfiguration) {
            this.codeConfiguration = codeConfiguration;
            return this;
        }

        /**
         * Sets the value of {@link CodeRepositoryProps#getConnection}
         * @param connection The App Runner connection for GitHub. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder connection(software.amazon.awscdk.services.apprunner.alpha.GitHubConnection connection) {
            this.connection = connection;
            return this;
        }

        /**
         * Sets the value of {@link CodeRepositoryProps#getRepositoryUrl}
         * @param repositoryUrl The location of the repository that contains the source code. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder repositoryUrl(java.lang.String repositoryUrl) {
            this.repositoryUrl = repositoryUrl;
            return this;
        }

        /**
         * Sets the value of {@link CodeRepositoryProps#getSourceCodeVersion}
         * @param sourceCodeVersion The version that should be used within the source code repository. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder sourceCodeVersion(software.amazon.awscdk.services.apprunner.alpha.SourceCodeVersion sourceCodeVersion) {
            this.sourceCodeVersion = sourceCodeVersion;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link CodeRepositoryProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @Override
        public CodeRepositoryProps build() {
            return new Jsii$Proxy(codeConfiguration, connection, repositoryUrl, sourceCodeVersion);
        }
    }

    /**
     * An implementation for {@link CodeRepositoryProps}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CodeRepositoryProps {
        private final software.amazon.awscdk.services.apprunner.alpha.CodeConfiguration codeConfiguration;
        private final software.amazon.awscdk.services.apprunner.alpha.GitHubConnection connection;
        private final java.lang.String repositoryUrl;
        private final software.amazon.awscdk.services.apprunner.alpha.SourceCodeVersion sourceCodeVersion;

        /**
         * 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.codeConfiguration = software.amazon.jsii.Kernel.get(this, "codeConfiguration", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.CodeConfiguration.class));
            this.connection = software.amazon.jsii.Kernel.get(this, "connection", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.GitHubConnection.class));
            this.repositoryUrl = software.amazon.jsii.Kernel.get(this, "repositoryUrl", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.sourceCodeVersion = software.amazon.jsii.Kernel.get(this, "sourceCodeVersion", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.apprunner.alpha.SourceCodeVersion.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.CodeConfiguration codeConfiguration, final software.amazon.awscdk.services.apprunner.alpha.GitHubConnection connection, final java.lang.String repositoryUrl, final software.amazon.awscdk.services.apprunner.alpha.SourceCodeVersion sourceCodeVersion) {
            super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
            this.codeConfiguration = java.util.Objects.requireNonNull(codeConfiguration, "codeConfiguration is required");
            this.connection = java.util.Objects.requireNonNull(connection, "connection is required");
            this.repositoryUrl = java.util.Objects.requireNonNull(repositoryUrl, "repositoryUrl is required");
            this.sourceCodeVersion = java.util.Objects.requireNonNull(sourceCodeVersion, "sourceCodeVersion is required");
        }

        @Override
        public final software.amazon.awscdk.services.apprunner.alpha.CodeConfiguration getCodeConfiguration() {
            return this.codeConfiguration;
        }

        @Override
        public final software.amazon.awscdk.services.apprunner.alpha.GitHubConnection getConnection() {
            return this.connection;
        }

        @Override
        public final java.lang.String getRepositoryUrl() {
            return this.repositoryUrl;
        }

        @Override
        public final software.amazon.awscdk.services.apprunner.alpha.SourceCodeVersion getSourceCodeVersion() {
            return this.sourceCodeVersion;
        }

        @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("codeConfiguration", om.valueToTree(this.getCodeConfiguration()));
            data.set("connection", om.valueToTree(this.getConnection()));
            data.set("repositoryUrl", om.valueToTree(this.getRepositoryUrl()));
            data.set("sourceCodeVersion", om.valueToTree(this.getSourceCodeVersion()));

            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.CodeRepositoryProps"));
            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;

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

            if (!codeConfiguration.equals(that.codeConfiguration)) return false;
            if (!connection.equals(that.connection)) return false;
            if (!repositoryUrl.equals(that.repositoryUrl)) return false;
            return this.sourceCodeVersion.equals(that.sourceCodeVersion);
        }

        @Override
        public final int hashCode() {
            int result = this.codeConfiguration.hashCode();
            result = 31 * result + (this.connection.hashCode());
            result = 31 * result + (this.repositoryUrl.hashCode());
            result = 31 * result + (this.sourceCodeVersion.hashCode());
            return result;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy