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

software.amazon.awscdk.services.dynamodb.LocalSecondaryIndexProps Maven / Gradle / Ivy

package software.amazon.awscdk.services.dynamodb;

@javax.annotation.Generated(value = "jsii-pacmak/0.7.12 (build 82990c5)", date = "2018-12-20T13:32:33.333Z")
public interface LocalSecondaryIndexProps extends software.amazon.jsii.JsiiSerializable, software.amazon.awscdk.services.dynamodb.SecondaryIndexProps {
    /**
     * The attribute of a sort key for the local secondary index.
     */
    software.amazon.awscdk.services.dynamodb.Attribute getSortKey();
    /**
     * The attribute of a sort key for the local secondary index.
     */
    void setSortKey(final software.amazon.awscdk.services.dynamodb.Attribute value);

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

    /**
     * A builder for {@link LocalSecondaryIndexProps}
     */
    final class Builder {
        private software.amazon.awscdk.services.dynamodb.Attribute _sortKey;
        private java.lang.String _indexName;
        @javax.annotation.Nullable
        private java.util.List _nonKeyAttributes;
        @javax.annotation.Nullable
        private software.amazon.awscdk.services.dynamodb.ProjectionType _projectionType;

        /**
         * Sets the value of SortKey
         * @param value The attribute of a sort key for the local secondary index.
         * @return {@code this}
         */
        public Builder withSortKey(final software.amazon.awscdk.services.dynamodb.Attribute value) {
            this._sortKey = java.util.Objects.requireNonNull(value, "sortKey is required");
            return this;
        }
        /**
         * Sets the value of IndexName
         * @param value The name of the secondary index.
         * @return {@code this}
         */
        public Builder withIndexName(final java.lang.String value) {
            this._indexName = java.util.Objects.requireNonNull(value, "indexName is required");
            return this;
        }
        /**
         * Sets the value of NonKeyAttributes
         * @param value The non-key attributes that are projected into the secondary index.
         * @return {@code this}
         */
        public Builder withNonKeyAttributes(@javax.annotation.Nullable final java.util.List value) {
            this._nonKeyAttributes = value;
            return this;
        }
        /**
         * Sets the value of ProjectionType
         * @param value The set of attributes that are projected into the secondary index.
         * @return {@code this}
         */
        public Builder withProjectionType(@javax.annotation.Nullable final software.amazon.awscdk.services.dynamodb.ProjectionType value) {
            this._projectionType = value;
            return this;
        }

        /**
         * Builds the configured instance.
         * @return a new instance of {@link LocalSecondaryIndexProps}
         * @throws NullPointerException if any required attribute was not provided
         */
        public LocalSecondaryIndexProps build() {
            return new LocalSecondaryIndexProps() {
                private software.amazon.awscdk.services.dynamodb.Attribute $sortKey = java.util.Objects.requireNonNull(_sortKey, "sortKey is required");
                private java.lang.String $indexName = java.util.Objects.requireNonNull(_indexName, "indexName is required");
                @javax.annotation.Nullable
                private java.util.List $nonKeyAttributes = _nonKeyAttributes;
                @javax.annotation.Nullable
                private software.amazon.awscdk.services.dynamodb.ProjectionType $projectionType = _projectionType;

                @Override
                public software.amazon.awscdk.services.dynamodb.Attribute getSortKey() {
                    return this.$sortKey;
                }

                @Override
                public void setSortKey(final software.amazon.awscdk.services.dynamodb.Attribute value) {
                    this.$sortKey = java.util.Objects.requireNonNull(value, "sortKey is required");
                }

                @Override
                public java.lang.String getIndexName() {
                    return this.$indexName;
                }

                @Override
                public void setIndexName(final java.lang.String value) {
                    this.$indexName = java.util.Objects.requireNonNull(value, "indexName is required");
                }

                @Override
                public java.util.List getNonKeyAttributes() {
                    return this.$nonKeyAttributes;
                }

                @Override
                public void setNonKeyAttributes(@javax.annotation.Nullable final java.util.List value) {
                    this.$nonKeyAttributes = value;
                }

                @Override
                public software.amazon.awscdk.services.dynamodb.ProjectionType getProjectionType() {
                    return this.$projectionType;
                }

                @Override
                public void setProjectionType(@javax.annotation.Nullable final software.amazon.awscdk.services.dynamodb.ProjectionType value) {
                    this.$projectionType = value;
                }

            };
        }
    }

    /**
     * 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.services.dynamodb.LocalSecondaryIndexProps {
        protected Jsii$Proxy(final software.amazon.jsii.JsiiObject.InitializationMode mode) {
            super(mode);
        }

        /**
         * The attribute of a sort key for the local secondary index.
         */
        @Override
        public software.amazon.awscdk.services.dynamodb.Attribute getSortKey() {
            return this.jsiiGet("sortKey", software.amazon.awscdk.services.dynamodb.Attribute.class);
        }

        /**
         * The attribute of a sort key for the local secondary index.
         */
        @Override
        public void setSortKey(final software.amazon.awscdk.services.dynamodb.Attribute value) {
            this.jsiiSet("sortKey", java.util.Objects.requireNonNull(value, "sortKey is required"));
        }

        /**
         * The name of the secondary index.
         */
        @Override
        public java.lang.String getIndexName() {
            return this.jsiiGet("indexName", java.lang.String.class);
        }

        /**
         * The name of the secondary index.
         */
        @Override
        public void setIndexName(final java.lang.String value) {
            this.jsiiSet("indexName", java.util.Objects.requireNonNull(value, "indexName is required"));
        }

        /**
         * The non-key attributes that are projected into the secondary index.
         * @default undefined
         */
        @Override
        @javax.annotation.Nullable
        public java.util.List getNonKeyAttributes() {
            return this.jsiiGet("nonKeyAttributes", java.util.List.class);
        }

        /**
         * The non-key attributes that are projected into the secondary index.
         * @default undefined
         */
        @Override
        public void setNonKeyAttributes(@javax.annotation.Nullable final java.util.List value) {
            this.jsiiSet("nonKeyAttributes", value);
        }

        /**
         * The set of attributes that are projected into the secondary index.
         * @default ALL
         */
        @Override
        @javax.annotation.Nullable
        public software.amazon.awscdk.services.dynamodb.ProjectionType getProjectionType() {
            return this.jsiiGet("projectionType", software.amazon.awscdk.services.dynamodb.ProjectionType.class);
        }

        /**
         * The set of attributes that are projected into the secondary index.
         * @default ALL
         */
        @Override
        public void setProjectionType(@javax.annotation.Nullable final software.amazon.awscdk.services.dynamodb.ProjectionType value) {
            this.jsiiSet("projectionType", value);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy