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

software.aws.awsprototypingsdk.cdkgraph.CdkGraphArtifact Maven / Gradle / Ivy

There is a newer version: 0.19.68
Show newest version
package software.aws.awsprototypingsdk.cdkgraph;

/**
 * (experimental) CdkGraph artifact definition.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:45:13.666Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.cdkgraph.$Module.class, fqn = "@aws-prototyping-sdk/cdk-graph.CdkGraphArtifact")
@software.amazon.jsii.Jsii.Proxy(CdkGraphArtifact.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface CdkGraphArtifact extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Filename of the artifact.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getFilename();

    /**
     * (experimental) Full path where artifact is stored.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getFilepath();

    /**
     * (experimental) The unique type of the artifact.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getId();

    /**
     * (experimental) The source of the artifact (such as plugin, or core system, etc).
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getSource();

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

    /**
     * @return a {@link Builder} of {@link CdkGraphArtifact}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link CdkGraphArtifact}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        java.lang.String filename;
        java.lang.String filepath;
        java.lang.String id;
        java.lang.String source;
        java.lang.String description;

        /**
         * Sets the value of {@link CdkGraphArtifact#getFilename}
         * @param filename Filename of the artifact. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder filename(java.lang.String filename) {
            this.filename = filename;
            return this;
        }

        /**
         * Sets the value of {@link CdkGraphArtifact#getFilepath}
         * @param filepath Full path where artifact is stored. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder filepath(java.lang.String filepath) {
            this.filepath = filepath;
            return this;
        }

        /**
         * Sets the value of {@link CdkGraphArtifact#getId}
         * @param id The unique type of the artifact. This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder id(java.lang.String id) {
            this.id = id;
            return this;
        }

        /**
         * Sets the value of {@link CdkGraphArtifact#getSource}
         * @param source The source of the artifact (such as plugin, or core system, etc). This parameter is required.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder source(java.lang.String source) {
            this.source = source;
            return this;
        }

        /**
         * Sets the value of {@link CdkGraphArtifact#getDescription}
         * @param description Description of artifact.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder description(java.lang.String description) {
            this.description = description;
            return this;
        }

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

    /**
     * An implementation for {@link CdkGraphArtifact}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CdkGraphArtifact {
        private final java.lang.String filename;
        private final java.lang.String filepath;
        private final java.lang.String id;
        private final java.lang.String source;
        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.filename = software.amazon.jsii.Kernel.get(this, "filename", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.filepath = software.amazon.jsii.Kernel.get(this, "filepath", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.id = software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
            this.source = software.amazon.jsii.Kernel.get(this, "source", software.amazon.jsii.NativeType.forClass(java.lang.String.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.filename = java.util.Objects.requireNonNull(builder.filename, "filename is required");
            this.filepath = java.util.Objects.requireNonNull(builder.filepath, "filepath is required");
            this.id = java.util.Objects.requireNonNull(builder.id, "id is required");
            this.source = java.util.Objects.requireNonNull(builder.source, "source is required");
            this.description = builder.description;
        }

        @Override
        public final java.lang.String getFilename() {
            return this.filename;
        }

        @Override
        public final java.lang.String getFilepath() {
            return this.filepath;
        }

        @Override
        public final java.lang.String getId() {
            return this.id;
        }

        @Override
        public final java.lang.String getSource() {
            return this.source;
        }

        @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("filename", om.valueToTree(this.getFilename()));
            data.set("filepath", om.valueToTree(this.getFilepath()));
            data.set("id", om.valueToTree(this.getId()));
            data.set("source", om.valueToTree(this.getSource()));
            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("@aws-prototyping-sdk/cdk-graph.CdkGraphArtifact"));
            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;

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

            if (!filename.equals(that.filename)) return false;
            if (!filepath.equals(that.filepath)) return false;
            if (!id.equals(that.id)) return false;
            if (!source.equals(that.source)) return false;
            return this.description != null ? this.description.equals(that.description) : that.description == null;
        }

        @Override
        public final int hashCode() {
            int result = this.filename.hashCode();
            result = 31 * result + (this.filepath.hashCode());
            result = 31 * result + (this.id.hashCode());
            result = 31 * result + (this.source.hashCode());
            result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy