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

io.github.cdklabs.projen.cdk.JsiiJavaTarget Maven / Gradle / Ivy

The newest version!
package io.github.cdklabs.projen.cdk;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-11-15T17:03:55.066Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.projen.$Module.class, fqn = "projen.cdk.JsiiJavaTarget")
@software.amazon.jsii.Jsii.Proxy(JsiiJavaTarget.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface JsiiJavaTarget extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.projen.release.MavenPublishOptions {

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getJavaPackage();

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getMavenArtifactId();

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getMavenGroupId();

    /**
     * @return a {@link Builder} of {@link JsiiJavaTarget}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link JsiiJavaTarget}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        java.lang.String javaPackage;
        java.lang.String mavenArtifactId;
        java.lang.String mavenGroupId;
        java.lang.String mavenEndpoint;
        java.lang.String mavenGpgPrivateKeyPassphrase;
        java.lang.String mavenGpgPrivateKeySecret;
        java.lang.String mavenPassword;
        java.lang.String mavenRepositoryUrl;
        java.lang.String mavenServerId;
        java.lang.String mavenStagingProfileId;
        java.lang.String mavenUsername;
        java.util.List postPublishSteps;
        java.util.List prePublishSteps;
        io.github.cdklabs.projen.github.workflows.Tools publishTools;

        /**
         * Sets the value of {@link JsiiJavaTarget#getJavaPackage}
         * @param javaPackage the value to be set. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder javaPackage(java.lang.String javaPackage) {
            this.javaPackage = javaPackage;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenArtifactId}
         * @param mavenArtifactId the value to be set. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenArtifactId(java.lang.String mavenArtifactId) {
            this.mavenArtifactId = mavenArtifactId;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenGroupId}
         * @param mavenGroupId the value to be set. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenGroupId(java.lang.String mavenGroupId) {
            this.mavenGroupId = mavenGroupId;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenEndpoint}
         * @param mavenEndpoint URL of Nexus repository.
         *                      if not set, defaults to https://oss.sonatype.org
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenEndpoint(java.lang.String mavenEndpoint) {
            this.mavenEndpoint = mavenEndpoint;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenGpgPrivateKeyPassphrase}
         * @param mavenGpgPrivateKeyPassphrase GitHub secret name which contains the GPG private key or file that includes it.
         *                                     This is used to sign your Maven packages. See instructions.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenGpgPrivateKeyPassphrase(java.lang.String mavenGpgPrivateKeyPassphrase) {
            this.mavenGpgPrivateKeyPassphrase = mavenGpgPrivateKeyPassphrase;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenGpgPrivateKeySecret}
         * @param mavenGpgPrivateKeySecret GitHub secret name which contains the GPG private key or file that includes it.
         *                                 This is used to sign your Maven
         *                                 packages. See instructions.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenGpgPrivateKeySecret(java.lang.String mavenGpgPrivateKeySecret) {
            this.mavenGpgPrivateKeySecret = mavenGpgPrivateKeySecret;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenPassword}
         * @param mavenPassword GitHub secret name which contains the Password for maven repository.
         *                      For Maven Central, you will need to Create JIRA account and then request a
         *                      new project (see links).
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenPassword(java.lang.String mavenPassword) {
            this.mavenPassword = mavenPassword;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenRepositoryUrl}
         * @param mavenRepositoryUrl Deployment repository when not deploying to Maven Central.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenRepositoryUrl(java.lang.String mavenRepositoryUrl) {
            this.mavenRepositoryUrl = mavenRepositoryUrl;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenServerId}
         * @param mavenServerId Used in maven settings for credential lookup (e.g. use github when publishing to GitHub).
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenServerId(java.lang.String mavenServerId) {
            this.mavenServerId = mavenServerId;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenStagingProfileId}
         * @param mavenStagingProfileId GitHub secret name which contains the Maven Central (sonatype) staging profile ID (e.g. 68a05363083174). Staging profile ID can be found in the URL of the "Releases" staging profile under "Staging Profiles" in https://oss.sonatype.org (e.g. https://oss.sonatype.org/#stagingProfiles;11a33451234521).
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenStagingProfileId(java.lang.String mavenStagingProfileId) {
            this.mavenStagingProfileId = mavenStagingProfileId;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getMavenUsername}
         * @param mavenUsername GitHub secret name which contains the Username for maven repository.
         *                      For Maven Central, you will need to Create JIRA account and then request a
         *                      new project (see links).
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder mavenUsername(java.lang.String mavenUsername) {
            this.mavenUsername = mavenUsername;
            return this;
        }

        /**
         * Sets the value of {@link JsiiJavaTarget#getPostPublishSteps}
         * @param postPublishSteps Steps to execute after executing the publishing command.
         *                         These can be used
         *                         to add/update the release artifacts ot any other tasks needed.
         *                         

* Note that when using this in publishToGitHubReleases this will override steps added via addGitHubPostPublishingSteps. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder postPublishSteps(java.util.List postPublishSteps) { this.postPublishSteps = (java.util.List)postPublishSteps; return this; } /** * Sets the value of {@link JsiiJavaTarget#getPrePublishSteps} * @param prePublishSteps Steps to execute before executing the publishing command. These can be used to prepare the artifact for publishing if needed. * These steps are executed after dist/ has been populated with the build * output. *

* Note that when using this in publishToGitHubReleases this will override steps added via addGitHubPrePublishingSteps. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder prePublishSteps(java.util.List prePublishSteps) { this.prePublishSteps = (java.util.List)prePublishSteps; return this; } /** * Sets the value of {@link JsiiJavaTarget#getPublishTools} * @param publishTools Additional tools to install in the publishing job. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder publishTools(io.github.cdklabs.projen.github.workflows.Tools publishTools) { this.publishTools = publishTools; return this; } /** * Builds the configured instance. * @return a new instance of {@link JsiiJavaTarget} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public JsiiJavaTarget build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link JsiiJavaTarget} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements JsiiJavaTarget { private final java.lang.String javaPackage; private final java.lang.String mavenArtifactId; private final java.lang.String mavenGroupId; private final java.lang.String mavenEndpoint; private final java.lang.String mavenGpgPrivateKeyPassphrase; private final java.lang.String mavenGpgPrivateKeySecret; private final java.lang.String mavenPassword; private final java.lang.String mavenRepositoryUrl; private final java.lang.String mavenServerId; private final java.lang.String mavenStagingProfileId; private final java.lang.String mavenUsername; private final java.util.List postPublishSteps; private final java.util.List prePublishSteps; private final io.github.cdklabs.projen.github.workflows.Tools publishTools; /** * 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.javaPackage = software.amazon.jsii.Kernel.get(this, "javaPackage", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenArtifactId = software.amazon.jsii.Kernel.get(this, "mavenArtifactId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenGroupId = software.amazon.jsii.Kernel.get(this, "mavenGroupId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenEndpoint = software.amazon.jsii.Kernel.get(this, "mavenEndpoint", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenGpgPrivateKeyPassphrase = software.amazon.jsii.Kernel.get(this, "mavenGpgPrivateKeyPassphrase", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenGpgPrivateKeySecret = software.amazon.jsii.Kernel.get(this, "mavenGpgPrivateKeySecret", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenPassword = software.amazon.jsii.Kernel.get(this, "mavenPassword", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenRepositoryUrl = software.amazon.jsii.Kernel.get(this, "mavenRepositoryUrl", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenServerId = software.amazon.jsii.Kernel.get(this, "mavenServerId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenStagingProfileId = software.amazon.jsii.Kernel.get(this, "mavenStagingProfileId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.mavenUsername = software.amazon.jsii.Kernel.get(this, "mavenUsername", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.postPublishSteps = software.amazon.jsii.Kernel.get(this, "postPublishSteps", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.projen.github.workflows.JobStep.class))); this.prePublishSteps = software.amazon.jsii.Kernel.get(this, "prePublishSteps", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(io.github.cdklabs.projen.github.workflows.JobStep.class))); this.publishTools = software.amazon.jsii.Kernel.get(this, "publishTools", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.projen.github.workflows.Tools.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.javaPackage = java.util.Objects.requireNonNull(builder.javaPackage, "javaPackage is required"); this.mavenArtifactId = java.util.Objects.requireNonNull(builder.mavenArtifactId, "mavenArtifactId is required"); this.mavenGroupId = java.util.Objects.requireNonNull(builder.mavenGroupId, "mavenGroupId is required"); this.mavenEndpoint = builder.mavenEndpoint; this.mavenGpgPrivateKeyPassphrase = builder.mavenGpgPrivateKeyPassphrase; this.mavenGpgPrivateKeySecret = builder.mavenGpgPrivateKeySecret; this.mavenPassword = builder.mavenPassword; this.mavenRepositoryUrl = builder.mavenRepositoryUrl; this.mavenServerId = builder.mavenServerId; this.mavenStagingProfileId = builder.mavenStagingProfileId; this.mavenUsername = builder.mavenUsername; this.postPublishSteps = (java.util.List)builder.postPublishSteps; this.prePublishSteps = (java.util.List)builder.prePublishSteps; this.publishTools = builder.publishTools; } @Override public final java.lang.String getJavaPackage() { return this.javaPackage; } @Override public final java.lang.String getMavenArtifactId() { return this.mavenArtifactId; } @Override public final java.lang.String getMavenGroupId() { return this.mavenGroupId; } @Override public final java.lang.String getMavenEndpoint() { return this.mavenEndpoint; } @Override public final java.lang.String getMavenGpgPrivateKeyPassphrase() { return this.mavenGpgPrivateKeyPassphrase; } @Override public final java.lang.String getMavenGpgPrivateKeySecret() { return this.mavenGpgPrivateKeySecret; } @Override public final java.lang.String getMavenPassword() { return this.mavenPassword; } @Override public final java.lang.String getMavenRepositoryUrl() { return this.mavenRepositoryUrl; } @Override public final java.lang.String getMavenServerId() { return this.mavenServerId; } @Override public final java.lang.String getMavenStagingProfileId() { return this.mavenStagingProfileId; } @Override public final java.lang.String getMavenUsername() { return this.mavenUsername; } @Override public final java.util.List getPostPublishSteps() { return this.postPublishSteps; } @Override public final java.util.List getPrePublishSteps() { return this.prePublishSteps; } @Override public final io.github.cdklabs.projen.github.workflows.Tools getPublishTools() { return this.publishTools; } @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("javaPackage", om.valueToTree(this.getJavaPackage())); data.set("mavenArtifactId", om.valueToTree(this.getMavenArtifactId())); data.set("mavenGroupId", om.valueToTree(this.getMavenGroupId())); if (this.getMavenEndpoint() != null) { data.set("mavenEndpoint", om.valueToTree(this.getMavenEndpoint())); } if (this.getMavenGpgPrivateKeyPassphrase() != null) { data.set("mavenGpgPrivateKeyPassphrase", om.valueToTree(this.getMavenGpgPrivateKeyPassphrase())); } if (this.getMavenGpgPrivateKeySecret() != null) { data.set("mavenGpgPrivateKeySecret", om.valueToTree(this.getMavenGpgPrivateKeySecret())); } if (this.getMavenPassword() != null) { data.set("mavenPassword", om.valueToTree(this.getMavenPassword())); } if (this.getMavenRepositoryUrl() != null) { data.set("mavenRepositoryUrl", om.valueToTree(this.getMavenRepositoryUrl())); } if (this.getMavenServerId() != null) { data.set("mavenServerId", om.valueToTree(this.getMavenServerId())); } if (this.getMavenStagingProfileId() != null) { data.set("mavenStagingProfileId", om.valueToTree(this.getMavenStagingProfileId())); } if (this.getMavenUsername() != null) { data.set("mavenUsername", om.valueToTree(this.getMavenUsername())); } if (this.getPostPublishSteps() != null) { data.set("postPublishSteps", om.valueToTree(this.getPostPublishSteps())); } if (this.getPrePublishSteps() != null) { data.set("prePublishSteps", om.valueToTree(this.getPrePublishSteps())); } if (this.getPublishTools() != null) { data.set("publishTools", om.valueToTree(this.getPublishTools())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("projen.cdk.JsiiJavaTarget")); 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; JsiiJavaTarget.Jsii$Proxy that = (JsiiJavaTarget.Jsii$Proxy) o; if (!javaPackage.equals(that.javaPackage)) return false; if (!mavenArtifactId.equals(that.mavenArtifactId)) return false; if (!mavenGroupId.equals(that.mavenGroupId)) return false; if (this.mavenEndpoint != null ? !this.mavenEndpoint.equals(that.mavenEndpoint) : that.mavenEndpoint != null) return false; if (this.mavenGpgPrivateKeyPassphrase != null ? !this.mavenGpgPrivateKeyPassphrase.equals(that.mavenGpgPrivateKeyPassphrase) : that.mavenGpgPrivateKeyPassphrase != null) return false; if (this.mavenGpgPrivateKeySecret != null ? !this.mavenGpgPrivateKeySecret.equals(that.mavenGpgPrivateKeySecret) : that.mavenGpgPrivateKeySecret != null) return false; if (this.mavenPassword != null ? !this.mavenPassword.equals(that.mavenPassword) : that.mavenPassword != null) return false; if (this.mavenRepositoryUrl != null ? !this.mavenRepositoryUrl.equals(that.mavenRepositoryUrl) : that.mavenRepositoryUrl != null) return false; if (this.mavenServerId != null ? !this.mavenServerId.equals(that.mavenServerId) : that.mavenServerId != null) return false; if (this.mavenStagingProfileId != null ? !this.mavenStagingProfileId.equals(that.mavenStagingProfileId) : that.mavenStagingProfileId != null) return false; if (this.mavenUsername != null ? !this.mavenUsername.equals(that.mavenUsername) : that.mavenUsername != null) return false; if (this.postPublishSteps != null ? !this.postPublishSteps.equals(that.postPublishSteps) : that.postPublishSteps != null) return false; if (this.prePublishSteps != null ? !this.prePublishSteps.equals(that.prePublishSteps) : that.prePublishSteps != null) return false; return this.publishTools != null ? this.publishTools.equals(that.publishTools) : that.publishTools == null; } @Override public final int hashCode() { int result = this.javaPackage.hashCode(); result = 31 * result + (this.mavenArtifactId.hashCode()); result = 31 * result + (this.mavenGroupId.hashCode()); result = 31 * result + (this.mavenEndpoint != null ? this.mavenEndpoint.hashCode() : 0); result = 31 * result + (this.mavenGpgPrivateKeyPassphrase != null ? this.mavenGpgPrivateKeyPassphrase.hashCode() : 0); result = 31 * result + (this.mavenGpgPrivateKeySecret != null ? this.mavenGpgPrivateKeySecret.hashCode() : 0); result = 31 * result + (this.mavenPassword != null ? this.mavenPassword.hashCode() : 0); result = 31 * result + (this.mavenRepositoryUrl != null ? this.mavenRepositoryUrl.hashCode() : 0); result = 31 * result + (this.mavenServerId != null ? this.mavenServerId.hashCode() : 0); result = 31 * result + (this.mavenStagingProfileId != null ? this.mavenStagingProfileId.hashCode() : 0); result = 31 * result + (this.mavenUsername != null ? this.mavenUsername.hashCode() : 0); result = 31 * result + (this.postPublishSteps != null ? this.postPublishSteps.hashCode() : 0); result = 31 * result + (this.prePublishSteps != null ? this.prePublishSteps.hashCode() : 0); result = 31 * result + (this.publishTools != null ? this.publishTools.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy