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

software.aws.awsprototypingsdk.openapigateway.SmithyProjection Maven / Gradle / Ivy

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

/**
 * (experimental) A smithy build projection.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.82.0 (build 2d2ddd7)", date = "2023-08-15T05:38:04.790Z")
@software.amazon.jsii.Jsii(module = software.aws.awsprototypingsdk.openapigateway.$Module.class, fqn = "@aws-prototyping-sdk/open-api-gateway.SmithyProjection")
@software.amazon.jsii.Jsii.Proxy(SmithyProjection.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SmithyProjection extends software.amazon.jsii.JsiiSerializable, software.aws.awsprototypingsdk.openapigateway.SmithyCommon {

    /**
     * (experimental) Whether or not the projection is abstract.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.lang.Boolean getAbstractValue() {
        return null;
    }

    /**
     * (experimental) Transforms to apply to the projection.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    default @org.jetbrains.annotations.Nullable java.util.List getTransforms() {
        return null;
    }

    /**
     * @return a {@link Builder} of {@link SmithyProjection}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    static Builder builder() {
        return new Builder();
    }
    /**
     * A builder for {@link SmithyProjection}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    public static final class Builder implements software.amazon.jsii.Builder {
        java.lang.Boolean abstractValue;
        java.util.List transforms;
        java.util.List imports;
        java.util.Map> plugins;

        /**
         * Sets the value of {@link SmithyProjection#getAbstractValue}
         * @param abstractValue Whether or not the projection is abstract.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder abstractValue(java.lang.Boolean abstractValue) {
            this.abstractValue = abstractValue;
            return this;
        }

        /**
         * Sets the value of {@link SmithyProjection#getTransforms}
         * @param transforms Transforms to apply to the projection.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @SuppressWarnings("unchecked")
        public Builder transforms(java.util.List transforms) {
            this.transforms = (java.util.List)transforms;
            return this;
        }

        /**
         * Sets the value of {@link SmithyProjection#getImports}
         * @param imports List of imports.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        public Builder imports(java.util.List imports) {
            this.imports = imports;
            return this;
        }

        /**
         * Sets the value of {@link SmithyProjection#getPlugins}
         * @param plugins Plugins keyed by plugin id.
         * @return {@code this}
         */
        @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
        @SuppressWarnings("unchecked")
        public Builder plugins(java.util.Map> plugins) {
            this.plugins = (java.util.Map>)plugins;
            return this;
        }

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

    /**
     * An implementation for {@link SmithyProjection}
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @software.amazon.jsii.Internal
    final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SmithyProjection {
        private final java.lang.Boolean abstractValue;
        private final java.util.List transforms;
        private final java.util.List imports;
        private final java.util.Map> plugins;

        /**
         * 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.abstractValue = software.amazon.jsii.Kernel.get(this, "abstract", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
            this.transforms = software.amazon.jsii.Kernel.get(this, "transforms", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.aws.awsprototypingsdk.openapigateway.SmithyTransform.class)));
            this.imports = software.amazon.jsii.Kernel.get(this, "imports", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
            this.plugins = software.amazon.jsii.Kernel.get(this, "plugins", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.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.abstractValue = builder.abstractValue;
            this.transforms = (java.util.List)builder.transforms;
            this.imports = builder.imports;
            this.plugins = (java.util.Map>)builder.plugins;
        }

        @Override
        public final java.lang.Boolean getAbstractValue() {
            return this.abstractValue;
        }

        @Override
        public final java.util.List getTransforms() {
            return this.transforms;
        }

        @Override
        public final java.util.List getImports() {
            return this.imports;
        }

        @Override
        public final java.util.Map> getPlugins() {
            return this.plugins;
        }

        @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();

            if (this.getAbstractValue() != null) {
                data.set("abstract", om.valueToTree(this.getAbstractValue()));
            }
            if (this.getTransforms() != null) {
                data.set("transforms", om.valueToTree(this.getTransforms()));
            }
            if (this.getImports() != null) {
                data.set("imports", om.valueToTree(this.getImports()));
            }
            if (this.getPlugins() != null) {
                data.set("plugins", om.valueToTree(this.getPlugins()));
            }

            final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
            struct.set("fqn", om.valueToTree("@aws-prototyping-sdk/open-api-gateway.SmithyProjection"));
            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;

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

            if (this.abstractValue != null ? !this.abstractValue.equals(that.abstractValue) : that.abstractValue != null) return false;
            if (this.transforms != null ? !this.transforms.equals(that.transforms) : that.transforms != null) return false;
            if (this.imports != null ? !this.imports.equals(that.imports) : that.imports != null) return false;
            return this.plugins != null ? this.plugins.equals(that.plugins) : that.plugins == null;
        }

        @Override
        public final int hashCode() {
            int result = this.abstractValue != null ? this.abstractValue.hashCode() : 0;
            result = 31 * result + (this.transforms != null ? this.transforms.hashCode() : 0);
            result = 31 * result + (this.imports != null ? this.imports.hashCode() : 0);
            result = 31 * result + (this.plugins != null ? this.plugins.hashCode() : 0);
            return result;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy