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

software.amazon.awscdk.OutgoingReference Maven / Gradle / Ivy

There is a newer version: 0.36.1
Show newest version
package software.amazon.awscdk;

@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:49:40.955Z")
public interface OutgoingReference extends software.amazon.jsii.JsiiSerializable {
    software.amazon.awscdk.Reference getReference();
    software.amazon.awscdk.IConstruct getSource();

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

    /**
     * A builder for {@link OutgoingReference}
     */
    final class Builder {
        private software.amazon.awscdk.Reference _reference;
        private software.amazon.awscdk.IConstruct _source;

        /**
         * Sets the value of Reference
         * @param value the value to be set
         * @return {@code this}
         */
        public Builder withReference(final software.amazon.awscdk.Reference value) {
            this._reference = java.util.Objects.requireNonNull(value, "reference is required");
            return this;
        }
        /**
         * Sets the value of Source
         * @param value the value to be set
         * @return {@code this}
         */
        public Builder withSource(final software.amazon.awscdk.IConstruct value) {
            this._source = java.util.Objects.requireNonNull(value, "source is required");
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link OutgoingReference}
         * @throws NullPointerException if any required attribute was not provided
         */
        public OutgoingReference build() {
            return new OutgoingReference() {
                private final software.amazon.awscdk.Reference $reference = java.util.Objects.requireNonNull(_reference, "reference is required");
                private final software.amazon.awscdk.IConstruct $source = java.util.Objects.requireNonNull(_source, "source is required");

                @Override
                public software.amazon.awscdk.Reference getReference() {
                    return this.$reference;
                }

                @Override
                public software.amazon.awscdk.IConstruct getSource() {
                    return this.$source;
                }

                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("reference", om.valueToTree(this.getReference()));
                    obj.set("source", om.valueToTree(this.getSource()));
                    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.OutgoingReference {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        @Override
        public software.amazon.awscdk.Reference getReference() {
            return this.jsiiGet("reference", software.amazon.awscdk.Reference.class);
        }

        @Override
        public software.amazon.awscdk.IConstruct getSource() {
            return this.jsiiGet("source", software.amazon.awscdk.IConstruct.class);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy