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

io.github.cdklabs.projen.cdk.JsiiDotNetTarget 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.064Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.projen.$Module.class, fqn = "projen.cdk.JsiiDotNetTarget")
@software.amazon.jsii.Jsii.Proxy(JsiiDotNetTarget.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface JsiiDotNetTarget extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.projen.release.NugetPublishOptions {

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

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

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.lang.String getIconUrl() {
        return null;
    }

    /**
     * @return a {@link Builder} of {@link JsiiDotNetTarget}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link JsiiDotNetTarget}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        java.lang.String dotNetNamespace;
        java.lang.String packageId;
        java.lang.String iconUrl;
        java.lang.String nugetApiKeySecret;
        java.lang.String nugetServer;
        java.util.List postPublishSteps;
        java.util.List prePublishSteps;
        io.github.cdklabs.projen.github.workflows.Tools publishTools;

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

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

        /**
         * Sets the value of {@link JsiiDotNetTarget#getIconUrl}
         * @param iconUrl the value to be set.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder iconUrl(java.lang.String iconUrl) {
            this.iconUrl = iconUrl;
            return this;
        }

        /**
         * Sets the value of {@link JsiiDotNetTarget#getNugetApiKeySecret}
         * @param nugetApiKeySecret GitHub secret which contains the API key for NuGet.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder nugetApiKeySecret(java.lang.String nugetApiKeySecret) {
            this.nugetApiKeySecret = nugetApiKeySecret;
            return this;
        }

        /**
         * Sets the value of {@link JsiiDotNetTarget#getNugetServer}
         * @param nugetServer NuGet Server URL (defaults to nuget.org).
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder nugetServer(java.lang.String nugetServer) {
            this.nugetServer = nugetServer;
            return this;
        }

        /**
         * Sets the value of {@link JsiiDotNetTarget#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 JsiiDotNetTarget#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 JsiiDotNetTarget#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 JsiiDotNetTarget} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public JsiiDotNetTarget build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link JsiiDotNetTarget} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements JsiiDotNetTarget { private final java.lang.String dotNetNamespace; private final java.lang.String packageId; private final java.lang.String iconUrl; private final java.lang.String nugetApiKeySecret; private final java.lang.String nugetServer; 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.dotNetNamespace = software.amazon.jsii.Kernel.get(this, "dotNetNamespace", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.packageId = software.amazon.jsii.Kernel.get(this, "packageId", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.iconUrl = software.amazon.jsii.Kernel.get(this, "iconUrl", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.nugetApiKeySecret = software.amazon.jsii.Kernel.get(this, "nugetApiKeySecret", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.nugetServer = software.amazon.jsii.Kernel.get(this, "nugetServer", 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.dotNetNamespace = java.util.Objects.requireNonNull(builder.dotNetNamespace, "dotNetNamespace is required"); this.packageId = java.util.Objects.requireNonNull(builder.packageId, "packageId is required"); this.iconUrl = builder.iconUrl; this.nugetApiKeySecret = builder.nugetApiKeySecret; this.nugetServer = builder.nugetServer; this.postPublishSteps = (java.util.List)builder.postPublishSteps; this.prePublishSteps = (java.util.List)builder.prePublishSteps; this.publishTools = builder.publishTools; } @Override public final java.lang.String getDotNetNamespace() { return this.dotNetNamespace; } @Override public final java.lang.String getPackageId() { return this.packageId; } @Override public final java.lang.String getIconUrl() { return this.iconUrl; } @Override public final java.lang.String getNugetApiKeySecret() { return this.nugetApiKeySecret; } @Override public final java.lang.String getNugetServer() { return this.nugetServer; } @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("dotNetNamespace", om.valueToTree(this.getDotNetNamespace())); data.set("packageId", om.valueToTree(this.getPackageId())); if (this.getIconUrl() != null) { data.set("iconUrl", om.valueToTree(this.getIconUrl())); } if (this.getNugetApiKeySecret() != null) { data.set("nugetApiKeySecret", om.valueToTree(this.getNugetApiKeySecret())); } if (this.getNugetServer() != null) { data.set("nugetServer", om.valueToTree(this.getNugetServer())); } 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.JsiiDotNetTarget")); 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; JsiiDotNetTarget.Jsii$Proxy that = (JsiiDotNetTarget.Jsii$Proxy) o; if (!dotNetNamespace.equals(that.dotNetNamespace)) return false; if (!packageId.equals(that.packageId)) return false; if (this.iconUrl != null ? !this.iconUrl.equals(that.iconUrl) : that.iconUrl != null) return false; if (this.nugetApiKeySecret != null ? !this.nugetApiKeySecret.equals(that.nugetApiKeySecret) : that.nugetApiKeySecret != null) return false; if (this.nugetServer != null ? !this.nugetServer.equals(that.nugetServer) : that.nugetServer != 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.dotNetNamespace.hashCode(); result = 31 * result + (this.packageId.hashCode()); result = 31 * result + (this.iconUrl != null ? this.iconUrl.hashCode() : 0); result = 31 * result + (this.nugetApiKeySecret != null ? this.nugetApiKeySecret.hashCode() : 0); result = 31 * result + (this.nugetServer != null ? this.nugetServer.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