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

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

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

/**
 * Properties for a Dynamic Reference.
 */
@javax.annotation.Generated(value = "jsii-pacmak/0.10.5 (build 46bc9b0)", date = "2019-05-06T20:49:40.945Z")
public interface DynamicReferenceProps extends software.amazon.jsii.JsiiSerializable {
    /**
     * The reference key of the dynamic reference.
     */
    java.lang.String getReferenceKey();
    /**
     * The service to retrieve the dynamic reference from.
     */
    software.amazon.awscdk.CfnDynamicReferenceService getService();

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

    /**
     * A builder for {@link DynamicReferenceProps}
     */
    final class Builder {
        private java.lang.String _referenceKey;
        private software.amazon.awscdk.CfnDynamicReferenceService _service;

        /**
         * Sets the value of ReferenceKey
         * @param value The reference key of the dynamic reference.
         * @return {@code this}
         */
        public Builder withReferenceKey(final java.lang.String value) {
            this._referenceKey = java.util.Objects.requireNonNull(value, "referenceKey is required");
            return this;
        }
        /**
         * Sets the value of Service
         * @param value The service to retrieve the dynamic reference from.
         * @return {@code this}
         */
        public Builder withService(final software.amazon.awscdk.CfnDynamicReferenceService value) {
            this._service = java.util.Objects.requireNonNull(value, "service is required");
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link DynamicReferenceProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        public DynamicReferenceProps build() {
            return new DynamicReferenceProps() {
                private final java.lang.String $referenceKey = java.util.Objects.requireNonNull(_referenceKey, "referenceKey is required");
                private final software.amazon.awscdk.CfnDynamicReferenceService $service = java.util.Objects.requireNonNull(_service, "service is required");

                @Override
                public java.lang.String getReferenceKey() {
                    return this.$referenceKey;
                }

                @Override
                public software.amazon.awscdk.CfnDynamicReferenceService getService() {
                    return this.$service;
                }

                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("referenceKey", om.valueToTree(this.getReferenceKey()));
                    obj.set("service", om.valueToTree(this.getService()));
                    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.DynamicReferenceProps {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        /**
         * The reference key of the dynamic reference.
         */
        @Override
        public java.lang.String getReferenceKey() {
            return this.jsiiGet("referenceKey", java.lang.String.class);
        }

        /**
         * The service to retrieve the dynamic reference from.
         */
        @Override
        public software.amazon.awscdk.CfnDynamicReferenceService getService() {
            return this.jsiiGet("service", software.amazon.awscdk.CfnDynamicReferenceService.class);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy