com.hubspot.chrome.devtools.client.core.indexeddb.ObjectStoreIndex Maven / Gradle / Ivy
package com.hubspot.chrome.devtools.client.core.indexeddb;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Object store index.
*/
public final class ObjectStoreIndex {
private String name;
private KeyPath keyPath;
private Boolean unique;
private Boolean multiEntry;
@JsonCreator
public ObjectStoreIndex(@JsonProperty("name") String name,
@JsonProperty("keyPath") KeyPath keyPath, @JsonProperty("unique") Boolean unique,
@JsonProperty("multiEntry") Boolean multiEntry) {
this.name = name;
this.keyPath = keyPath;
this.unique = unique;
this.multiEntry = multiEntry;
}
public String getName() {
return name;
}
public KeyPath getKeyPath() {
return keyPath;
}
public Boolean getUnique() {
return unique;
}
public Boolean getMultiEntry() {
return multiEntry;
}
public static ObjectStoreIndex.Builder builder() {
return new ObjectStoreIndex.Builder();
}
public static final class Builder {
private String name;
private KeyPath keyPath;
private Boolean unique;
private Boolean multiEntry;
private Builder() {
}
public ObjectStoreIndex.Builder setName(String name) {
this.name = name;
return this;
}
public ObjectStoreIndex.Builder setKeyPath(KeyPath keyPath) {
this.keyPath = keyPath;
return this;
}
public ObjectStoreIndex.Builder setUnique(Boolean unique) {
this.unique = unique;
return this;
}
public ObjectStoreIndex.Builder setMultiEntry(Boolean multiEntry) {
this.multiEntry = multiEntry;
return this;
}
public ObjectStoreIndex build() {
return new ObjectStoreIndex(name, keyPath, unique, multiEntry);
}
}
}