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

io.github.cdklabs.cdk.cicd.wrapper.CodeStarConfig Maven / Gradle / Ivy

Go to download

This repository contains the infrastructure as code to wrap your AWS CDK project with CI/CD around it.

There is a newer version: 0.2.12
Show newest version
package io.github.cdklabs.cdk.cicd.wrapper;

/**
 * Configuration properties for the CodeStarConnectionConstruct.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-03T16:35:59.281Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.cicd.wrapper.$Module.class, fqn = "@cdklabs/cdk-cicd-wrapper.CodeStarConfig")
@software.amazon.jsii.Jsii.Proxy(CodeStarConfig.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CodeStarConfig extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.cdk.cicd.wrapper.RepositoryConfig {

    /**
     * The Amazon Resource Name (ARN) of the CodeStar connection.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getCodeStarConnectionArn();

    /**
     * @return a {@link Builder} of {@link CodeStarConfig}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link CodeStarConfig}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    public static final class Builder implements software.amazon.jsii.Builder {
        java.lang.String codeStarConnectionArn;
        java.lang.String branch;
        java.lang.String name;
        java.lang.String repositoryType;
        java.lang.Boolean codeBuildCloneOutput;
        java.lang.String description;

        /**
         * Sets the value of {@link CodeStarConfig#getCodeStarConnectionArn}
         * @param codeStarConnectionArn The Amazon Resource Name (ARN) of the CodeStar connection. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder codeStarConnectionArn(java.lang.String codeStarConnectionArn) {
            this.codeStarConnectionArn = codeStarConnectionArn;
            return this;
        }

        /**
         * Sets the value of {@link CodeStarConfig#getBranch}
         * @param branch The branch for the repository. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder branch(java.lang.String branch) {
            this.branch = branch;
            return this;
        }

        /**
         * Sets the value of {@link CodeStarConfig#getName}
         * @param name The name of the repository. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder name(java.lang.String name) {
            this.name = name;
            return this;
        }

        /**
         * Sets the value of {@link CodeStarConfig#getRepositoryType}
         * @param repositoryType The type of the repository. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder repositoryType(java.lang.String repositoryType) {
            this.repositoryType = repositoryType;
            return this;
        }

        /**
         * Sets the value of {@link CodeStarConfig#getCodeBuildCloneOutput}
         * @param codeBuildCloneOutput Enforce full clone for the repository.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder codeBuildCloneOutput(java.lang.Boolean codeBuildCloneOutput) {
            this.codeBuildCloneOutput = codeBuildCloneOutput;
            return this;
        }

        /**
         * Sets the value of {@link CodeStarConfig#getDescription}
         * @param description The description of the repository (optional).
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
        public Builder description(java.lang.String description) {
            this.description = description;
            return this;
        }

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

    /**
     * An implementation for {@link CodeStarConfig}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CodeStarConfig {
        private final java.lang.String codeStarConnectionArn;
        private final java.lang.String branch;
        private final java.lang.String name;
        private final java.lang.String repositoryType;
        private final java.lang.Boolean codeBuildCloneOutput;
        private final java.lang.String description;

        /**
         * 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.codeStarConnectionArn = software.amazon.jsii.Kernel.get(this, "codeStarConnectionArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.branch = software.amazon.jsii.Kernel.get(this, "branch", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.repositoryType = software.amazon.jsii.Kernel.get(this, "repositoryType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.codeBuildCloneOutput = software.amazon.jsii.Kernel.get(this, "codeBuildCloneOutput", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
            this.description = software.amazon.jsii.Kernel.get(this, "description", 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.codeStarConnectionArn = java.util.Objects.requireNonNull(builder.codeStarConnectionArn, "codeStarConnectionArn is required");
            this.branch = java.util.Objects.requireNonNull(builder.branch, "branch is required");
            this.name = java.util.Objects.requireNonNull(builder.name, "name is required");
            this.repositoryType = java.util.Objects.requireNonNull(builder.repositoryType, "repositoryType is required");
            this.codeBuildCloneOutput = builder.codeBuildCloneOutput;
            this.description = builder.description;
        }

        @Override
        public final java.lang.String getCodeStarConnectionArn() {
            return this.codeStarConnectionArn;
        }

        @Override
        public final java.lang.String getBranch() {
            return this.branch;
        }

        @Override
        public final java.lang.String getName() {
            return this.name;
        }

        @Override
        public final java.lang.String getRepositoryType() {
            return this.repositoryType;
        }

        @Override
        public final java.lang.Boolean getCodeBuildCloneOutput() {
            return this.codeBuildCloneOutput;
        }

        @Override
        public final java.lang.String getDescription() {
            return this.description;
        }

        @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("codeStarConnectionArn", om.valueToTree(this.getCodeStarConnectionArn()));
            data.set("branch", om.valueToTree(this.getBranch()));
            data.set("name", om.valueToTree(this.getName()));
            data.set("repositoryType", om.valueToTree(this.getRepositoryType()));
            if (this.getCodeBuildCloneOutput() != null) {
                data.set("codeBuildCloneOutput", om.valueToTree(this.getCodeBuildCloneOutput()));
            }
            if (this.getDescription() != null) {
                data.set("description", om.valueToTree(this.getDescription()));
            }

            final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
            struct.set("fqn", om.valueToTree("@cdklabs/cdk-cicd-wrapper.CodeStarConfig"));
            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;

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

            if (!codeStarConnectionArn.equals(that.codeStarConnectionArn)) return false;
            if (!branch.equals(that.branch)) return false;
            if (!name.equals(that.name)) return false;
            if (!repositoryType.equals(that.repositoryType)) return false;
            if (this.codeBuildCloneOutput != null ? !this.codeBuildCloneOutput.equals(that.codeBuildCloneOutput) : that.codeBuildCloneOutput != null) return false;
            return this.description != null ? this.description.equals(that.description) : that.description == null;
        }

        @Override
        public final int hashCode() {
            int result = this.codeStarConnectionArn.hashCode();
            result = 31 * result + (this.branch.hashCode());
            result = 31 * result + (this.name.hashCode());
            result = 31 * result + (this.repositoryType.hashCode());
            result = 31 * result + (this.codeBuildCloneOutput != null ? this.codeBuildCloneOutput.hashCode() : 0);
            result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy