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

com.distelli.persistence.IndexDescription Maven / Gradle / Ivy

There is a newer version: 3.8.16
Show newest version
// Generated by delombok at Mon Apr 01 13:15:17 PDT 2019
package com.distelli.persistence;

public class IndexDescription {
    private String indexName = null;
    private AttrDescription hashKey;
    private AttrDescription rangeKey;
    private IndexType indexType;
    private Long readCapacity;
    private Long writeCapacity;


    public static class IndexDescriptionBuilder {
        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        private String indexName;
        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        private AttrDescription hashKey;
        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        private AttrDescription rangeKey;
        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        private IndexType indexType;
        private Long readCapacity = 1L;
        private Long writeCapacity = 1L;

        public IndexDescriptionBuilder hashKey(String attrName, AttrType attrType) {
            return hashKey(AttrDescription.builder().attrName(attrName).attrType(attrType).build());
        }

        public IndexDescriptionBuilder hashKey(final AttrDescription hashKey) {
            this.hashKey = hashKey;
            return this;
        }

        public IndexDescriptionBuilder rangeKey(String attrName, AttrType attrType) {
            return rangeKey(AttrDescription.builder().attrName(attrName).attrType(attrType).build());
        }

        public IndexDescriptionBuilder indexName(String indexName) {
            if (IndexType.MAIN_INDEX == indexType) {
                indexType(IndexType.GLOBAL_SECONDARY_INDEX);
            }
            this.indexName = indexName;
            return this;
        }

        public IndexDescriptionBuilder rangeKey(final AttrDescription rangeKey) {
            this.rangeKey = rangeKey;
            return this;
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        IndexDescriptionBuilder() {
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public IndexDescriptionBuilder indexType(final IndexType indexType) {
            this.indexType = indexType;
            return this;
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public IndexDescriptionBuilder readCapacity(final Long readCapacity) {
            this.readCapacity = readCapacity;
            return this;
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public IndexDescriptionBuilder writeCapacity(final Long writeCapacity) {
            this.writeCapacity = writeCapacity;
            return this;
        }

        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public IndexDescription build() {
            return new IndexDescription(indexName, hashKey, rangeKey, indexType, readCapacity, writeCapacity);
        }

        @java.lang.Override
        @java.lang.SuppressWarnings("all")
        @javax.annotation.Generated("lombok")
        public java.lang.String toString() {
            return "IndexDescription.IndexDescriptionBuilder(indexName=" + this.indexName + ", hashKey=" + this.hashKey + ", rangeKey=" + this.rangeKey + ", indexType=" + this.indexType + ", readCapacity=" + this.readCapacity + ", writeCapacity=" + this.writeCapacity + ")";
        }
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    IndexDescription(final String indexName, final AttrDescription hashKey, final AttrDescription rangeKey, final IndexType indexType, final Long readCapacity, final Long writeCapacity) {
        this.indexName = indexName;
        this.hashKey = hashKey;
        this.rangeKey = rangeKey;
        this.indexType = indexType;
        this.readCapacity = readCapacity;
        this.writeCapacity = writeCapacity;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public static IndexDescriptionBuilder builder() {
        return new IndexDescriptionBuilder();
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public IndexDescriptionBuilder toBuilder() {
        return new IndexDescriptionBuilder().indexName(this.indexName).hashKey(this.hashKey).rangeKey(this.rangeKey).indexType(this.indexType).readCapacity(this.readCapacity).writeCapacity(this.writeCapacity);
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public String getIndexName() {
        return this.indexName;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public AttrDescription getHashKey() {
        return this.hashKey;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public AttrDescription getRangeKey() {
        return this.rangeKey;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public IndexType getIndexType() {
        return this.indexType;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public Long getReadCapacity() {
        return this.readCapacity;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public Long getWriteCapacity() {
        return this.writeCapacity;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public void setIndexName(final String indexName) {
        this.indexName = indexName;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public void setHashKey(final AttrDescription hashKey) {
        this.hashKey = hashKey;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public void setRangeKey(final AttrDescription rangeKey) {
        this.rangeKey = rangeKey;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public void setIndexType(final IndexType indexType) {
        this.indexType = indexType;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public void setReadCapacity(final Long readCapacity) {
        this.readCapacity = readCapacity;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public void setWriteCapacity(final Long writeCapacity) {
        this.writeCapacity = writeCapacity;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof IndexDescription)) return false;
        final IndexDescription other = (IndexDescription) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        final java.lang.Object this$indexName = this.getIndexName();
        final java.lang.Object other$indexName = other.getIndexName();
        if (this$indexName == null ? other$indexName != null : !this$indexName.equals(other$indexName)) return false;
        final java.lang.Object this$hashKey = this.getHashKey();
        final java.lang.Object other$hashKey = other.getHashKey();
        if (this$hashKey == null ? other$hashKey != null : !this$hashKey.equals(other$hashKey)) return false;
        final java.lang.Object this$rangeKey = this.getRangeKey();
        final java.lang.Object other$rangeKey = other.getRangeKey();
        if (this$rangeKey == null ? other$rangeKey != null : !this$rangeKey.equals(other$rangeKey)) return false;
        final java.lang.Object this$indexType = this.getIndexType();
        final java.lang.Object other$indexType = other.getIndexType();
        if (this$indexType == null ? other$indexType != null : !this$indexType.equals(other$indexType)) return false;
        final java.lang.Object this$readCapacity = this.getReadCapacity();
        final java.lang.Object other$readCapacity = other.getReadCapacity();
        if (this$readCapacity == null ? other$readCapacity != null : !this$readCapacity.equals(other$readCapacity)) return false;
        final java.lang.Object this$writeCapacity = this.getWriteCapacity();
        final java.lang.Object other$writeCapacity = other.getWriteCapacity();
        if (this$writeCapacity == null ? other$writeCapacity != null : !this$writeCapacity.equals(other$writeCapacity)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof IndexDescription;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final java.lang.Object $indexName = this.getIndexName();
        result = result * PRIME + ($indexName == null ? 43 : $indexName.hashCode());
        final java.lang.Object $hashKey = this.getHashKey();
        result = result * PRIME + ($hashKey == null ? 43 : $hashKey.hashCode());
        final java.lang.Object $rangeKey = this.getRangeKey();
        result = result * PRIME + ($rangeKey == null ? 43 : $rangeKey.hashCode());
        final java.lang.Object $indexType = this.getIndexType();
        result = result * PRIME + ($indexType == null ? 43 : $indexType.hashCode());
        final java.lang.Object $readCapacity = this.getReadCapacity();
        result = result * PRIME + ($readCapacity == null ? 43 : $readCapacity.hashCode());
        final java.lang.Object $writeCapacity = this.getWriteCapacity();
        result = result * PRIME + ($writeCapacity == null ? 43 : $writeCapacity.hashCode());
        return result;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @javax.annotation.Generated("lombok")
    public java.lang.String toString() {
        return "IndexDescription(indexName=" + this.getIndexName() + ", hashKey=" + this.getHashKey() + ", rangeKey=" + this.getRangeKey() + ", indexType=" + this.getIndexType() + ", readCapacity=" + this.getReadCapacity() + ", writeCapacity=" + this.getWriteCapacity() + ")";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy