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

software.amazon.awscdk.services.codepipeline.actions.CodeCommitSourceActionProps Maven / Gradle / Ivy

package software.amazon.awscdk.services.codepipeline.actions;

/**
 * Construction properties of the {@link CodeCommitSourceAction CodeCommit source CodePipeline Action}.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.3 (build 6bbf743)", date = "2019-05-02T10:15:47.472Z")
public interface CodeCommitSourceActionProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.codepipeline.CommonActionProps {
    software.amazon.awscdk.services.codepipeline.Artifact getOutput();
    /**
     * The CodeCommit repository.
     */
    software.amazon.awscdk.services.codecommit.IRepository getRepository();
    /**
     * Default: 'master'
     */
    java.lang.String getBranch();
    /**
     * Whether AWS CodePipeline should poll for source changes. If this is `false`, the Pipeline will use CloudWatch Events to detect source changes instead.
     * 
     * Default: false
     */
    java.lang.Boolean getPollForSourceChanges();

    /**
     * @return a {@link Builder} of {@link CodeCommitSourceActionProps}
     */
    static Builder builder() {
        return new Builder();
    }

    /**
     * A builder for {@link CodeCommitSourceActionProps}
     */
    final class Builder {
        private software.amazon.awscdk.services.codepipeline.Artifact _output;
        private software.amazon.awscdk.services.codecommit.IRepository _repository;
        @javax.annotation.Nullable
        private java.lang.String _branch;
        @javax.annotation.Nullable
        private java.lang.Boolean _pollForSourceChanges;
        private java.lang.String _actionName;
        @javax.annotation.Nullable
        private java.lang.Number _runOrder;

        /**
         * Sets the value of Output
         * @param value the value to be set
         * @return {@code this}
         */
        public Builder withOutput(final software.amazon.awscdk.services.codepipeline.Artifact value) {
            this._output = java.util.Objects.requireNonNull(value, "output is required");
            return this;
        }
        /**
         * Sets the value of Repository
         * @param value The CodeCommit repository.
         * @return {@code this}
         */
        public Builder withRepository(final software.amazon.awscdk.services.codecommit.IRepository value) {
            this._repository = java.util.Objects.requireNonNull(value, "repository is required");
            return this;
        }
        /**
         * Sets the value of Branch
         * @param value the value to be set
         * @return {@code this}
         */
        public Builder withBranch(@javax.annotation.Nullable final java.lang.String value) {
            this._branch = value;
            return this;
        }
        /**
         * Sets the value of PollForSourceChanges
         * @param value Whether AWS CodePipeline should poll for source changes. If this is `false`, the Pipeline will use CloudWatch Events to detect source changes instead.
         * @return {@code this}
         */
        public Builder withPollForSourceChanges(@javax.annotation.Nullable final java.lang.Boolean value) {
            this._pollForSourceChanges = value;
            return this;
        }
        /**
         * Sets the value of ActionName
         * @param value The physical, human-readable name of the Action. Not that Action names must be unique within a single Stage.
         * @return {@code this}
         */
        public Builder withActionName(final java.lang.String value) {
            this._actionName = java.util.Objects.requireNonNull(value, "actionName is required");
            return this;
        }
        /**
         * Sets the value of RunOrder
         * @param value The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute.
         * @return {@code this}
         */
        public Builder withRunOrder(@javax.annotation.Nullable final java.lang.Number value) {
            this._runOrder = value;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link CodeCommitSourceActionProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        public CodeCommitSourceActionProps build() {
            return new CodeCommitSourceActionProps() {
                private final software.amazon.awscdk.services.codepipeline.Artifact $output = java.util.Objects.requireNonNull(_output, "output is required");
                private final software.amazon.awscdk.services.codecommit.IRepository $repository = java.util.Objects.requireNonNull(_repository, "repository is required");
                @javax.annotation.Nullable
                private final java.lang.String $branch = _branch;
                @javax.annotation.Nullable
                private final java.lang.Boolean $pollForSourceChanges = _pollForSourceChanges;
                private final java.lang.String $actionName = java.util.Objects.requireNonNull(_actionName, "actionName is required");
                @javax.annotation.Nullable
                private final java.lang.Number $runOrder = _runOrder;

                @Override
                public software.amazon.awscdk.services.codepipeline.Artifact getOutput() {
                    return this.$output;
                }

                @Override
                public software.amazon.awscdk.services.codecommit.IRepository getRepository() {
                    return this.$repository;
                }

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

                @Override
                public java.lang.Boolean getPollForSourceChanges() {
                    return this.$pollForSourceChanges;
                }

                @Override
                public java.lang.String getActionName() {
                    return this.$actionName;
                }

                @Override
                public java.lang.Number getRunOrder() {
                    return this.$runOrder;
                }

                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();
                    obj.set("output", om.valueToTree(this.getOutput()));
                    obj.set("repository", om.valueToTree(this.getRepository()));
                    obj.set("branch", om.valueToTree(this.getBranch()));
                    obj.set("pollForSourceChanges", om.valueToTree(this.getPollForSourceChanges()));
                    obj.set("actionName", om.valueToTree(this.getActionName()));
                    obj.set("runOrder", om.valueToTree(this.getRunOrder()));
                    return obj;
                }

            };
        }
    }

    /**
     * A proxy class which represents a concrete javascript instance of this type.
     */
    final static class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements software.amazon.awscdk.services.codepipeline.actions.CodeCommitSourceActionProps {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        @Override
        public software.amazon.awscdk.services.codepipeline.Artifact getOutput() {
            return this.jsiiGet("output", software.amazon.awscdk.services.codepipeline.Artifact.class);
        }

        /**
         * The CodeCommit repository.
         */
        @Override
        public software.amazon.awscdk.services.codecommit.IRepository getRepository() {
            return this.jsiiGet("repository", software.amazon.awscdk.services.codecommit.IRepository.class);
        }

        /**
         * Default: 'master'
         */
        @Override
        @javax.annotation.Nullable
        public java.lang.String getBranch() {
            return this.jsiiGet("branch", java.lang.String.class);
        }

        /**
         * Whether AWS CodePipeline should poll for source changes. If this is `false`, the Pipeline will use CloudWatch Events to detect source changes instead.
         * 
         * Default: false
         */
        @Override
        @javax.annotation.Nullable
        public java.lang.Boolean getPollForSourceChanges() {
            return this.jsiiGet("pollForSourceChanges", java.lang.Boolean.class);
        }

        /**
         * The physical, human-readable name of the Action. Not that Action names must be unique within a single Stage.
         */
        @Override
        public java.lang.String getActionName() {
            return this.jsiiGet("actionName", java.lang.String.class);
        }

        /**
         * The runOrder property for this Action. RunOrder determines the relative order in which multiple Actions in the same Stage execute.
         * 
         * Default: 1
         * 
         * @see https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html
         */
        @Override
        @javax.annotation.Nullable
        public java.lang.Number getRunOrder() {
            return this.jsiiGet("runOrder", java.lang.Number.class);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy