io.pinecone.proto.DescribeIndexStatsResponse Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: vector_service.proto
// Protobuf Java Version: 3.25.3
package io.pinecone.proto;
/**
*
* The response for the `describe_index_stats` operation.
*
*
* Protobuf type {@code DescribeIndexStatsResponse}
*/
public final class DescribeIndexStatsResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:DescribeIndexStatsResponse)
DescribeIndexStatsResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use DescribeIndexStatsResponse.newBuilder() to construct.
private DescribeIndexStatsResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DescribeIndexStatsResponse() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DescribeIndexStatsResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetNamespaces();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.pinecone.proto.DescribeIndexStatsResponse.class, io.pinecone.proto.DescribeIndexStatsResponse.Builder.class);
}
public static final int NAMESPACES_FIELD_NUMBER = 1;
private static final class NamespacesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, io.pinecone.proto.NamespaceSummary> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_NamespacesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
io.pinecone.proto.NamespaceSummary.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, io.pinecone.proto.NamespaceSummary> namespaces_;
private com.google.protobuf.MapField
internalGetNamespaces() {
if (namespaces_ == null) {
return com.google.protobuf.MapField.emptyMapField(
NamespacesDefaultEntryHolder.defaultEntry);
}
return namespaces_;
}
public int getNamespacesCount() {
return internalGetNamespaces().getMap().size();
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public boolean containsNamespaces(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetNamespaces().getMap().containsKey(key);
}
/**
* Use {@link #getNamespacesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getNamespaces() {
return getNamespacesMap();
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public java.util.Map getNamespacesMap() {
return internalGetNamespaces().getMap();
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public /* nullable */
io.pinecone.proto.NamespaceSummary getNamespacesOrDefault(
java.lang.String key,
/* nullable */
io.pinecone.proto.NamespaceSummary defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNamespaces().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public io.pinecone.proto.NamespaceSummary getNamespacesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetNamespaces().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int DIMENSION_FIELD_NUMBER = 2;
private int dimension_ = 0;
/**
*
* The dimension of the indexed vectors.
*
*
* uint32 dimension = 2;
* @return The dimension.
*/
@java.lang.Override
public int getDimension() {
return dimension_;
}
public static final int INDEX_FULLNESS_FIELD_NUMBER = 3;
private float indexFullness_ = 0F;
/**
*
* The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
*
*
* float index_fullness = 3;
* @return The indexFullness.
*/
@java.lang.Override
public float getIndexFullness() {
return indexFullness_;
}
public static final int TOTAL_VECTOR_COUNT_FIELD_NUMBER = 4;
private int totalVectorCount_ = 0;
/**
*
* The total number of vectors in the index, regardless of whether a metadata filter expression was passed
*
*
* uint32 total_vector_count = 4;
* @return The totalVectorCount.
*/
@java.lang.Override
public int getTotalVectorCount() {
return totalVectorCount_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetNamespaces(),
NamespacesDefaultEntryHolder.defaultEntry,
1);
if (dimension_ != 0) {
output.writeUInt32(2, dimension_);
}
if (java.lang.Float.floatToRawIntBits(indexFullness_) != 0) {
output.writeFloat(3, indexFullness_);
}
if (totalVectorCount_ != 0) {
output.writeUInt32(4, totalVectorCount_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetNamespaces().getMap().entrySet()) {
com.google.protobuf.MapEntry
namespaces__ = NamespacesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, namespaces__);
}
if (dimension_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, dimension_);
}
if (java.lang.Float.floatToRawIntBits(indexFullness_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, indexFullness_);
}
if (totalVectorCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(4, totalVectorCount_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.pinecone.proto.DescribeIndexStatsResponse)) {
return super.equals(obj);
}
io.pinecone.proto.DescribeIndexStatsResponse other = (io.pinecone.proto.DescribeIndexStatsResponse) obj;
if (!internalGetNamespaces().equals(
other.internalGetNamespaces())) return false;
if (getDimension()
!= other.getDimension()) return false;
if (java.lang.Float.floatToIntBits(getIndexFullness())
!= java.lang.Float.floatToIntBits(
other.getIndexFullness())) return false;
if (getTotalVectorCount()
!= other.getTotalVectorCount()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetNamespaces().getMap().isEmpty()) {
hash = (37 * hash) + NAMESPACES_FIELD_NUMBER;
hash = (53 * hash) + internalGetNamespaces().hashCode();
}
hash = (37 * hash) + DIMENSION_FIELD_NUMBER;
hash = (53 * hash) + getDimension();
hash = (37 * hash) + INDEX_FULLNESS_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getIndexFullness());
hash = (37 * hash) + TOTAL_VECTOR_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getTotalVectorCount();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.pinecone.proto.DescribeIndexStatsResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.pinecone.proto.DescribeIndexStatsResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* The response for the `describe_index_stats` operation.
*
*
* Protobuf type {@code DescribeIndexStatsResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:DescribeIndexStatsResponse)
io.pinecone.proto.DescribeIndexStatsResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetNamespaces();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 1:
return internalGetMutableNamespaces();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.pinecone.proto.DescribeIndexStatsResponse.class, io.pinecone.proto.DescribeIndexStatsResponse.Builder.class);
}
// Construct using io.pinecone.proto.DescribeIndexStatsResponse.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
internalGetMutableNamespaces().clear();
dimension_ = 0;
indexFullness_ = 0F;
totalVectorCount_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.pinecone.proto.VectorServiceOuterClass.internal_static_DescribeIndexStatsResponse_descriptor;
}
@java.lang.Override
public io.pinecone.proto.DescribeIndexStatsResponse getDefaultInstanceForType() {
return io.pinecone.proto.DescribeIndexStatsResponse.getDefaultInstance();
}
@java.lang.Override
public io.pinecone.proto.DescribeIndexStatsResponse build() {
io.pinecone.proto.DescribeIndexStatsResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.pinecone.proto.DescribeIndexStatsResponse buildPartial() {
io.pinecone.proto.DescribeIndexStatsResponse result = new io.pinecone.proto.DescribeIndexStatsResponse(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(io.pinecone.proto.DescribeIndexStatsResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.namespaces_ = internalGetNamespaces().build(NamespacesDefaultEntryHolder.defaultEntry);
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.dimension_ = dimension_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.indexFullness_ = indexFullness_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.totalVectorCount_ = totalVectorCount_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof io.pinecone.proto.DescribeIndexStatsResponse) {
return mergeFrom((io.pinecone.proto.DescribeIndexStatsResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.pinecone.proto.DescribeIndexStatsResponse other) {
if (other == io.pinecone.proto.DescribeIndexStatsResponse.getDefaultInstance()) return this;
internalGetMutableNamespaces().mergeFrom(
other.internalGetNamespaces());
bitField0_ |= 0x00000001;
if (other.getDimension() != 0) {
setDimension(other.getDimension());
}
if (other.getIndexFullness() != 0F) {
setIndexFullness(other.getIndexFullness());
}
if (other.getTotalVectorCount() != 0) {
setTotalVectorCount(other.getTotalVectorCount());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.MapEntry
namespaces__ = input.readMessage(
NamespacesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableNamespaces().ensureBuilderMap().put(
namespaces__.getKey(), namespaces__.getValue());
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
dimension_ = input.readUInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 29: {
indexFullness_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
} // case 29
case 32: {
totalVectorCount_ = input.readUInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private static final class NamespacesConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public io.pinecone.proto.NamespaceSummary build(io.pinecone.proto.NamespaceSummaryOrBuilder val) {
if (val instanceof io.pinecone.proto.NamespaceSummary) { return (io.pinecone.proto.NamespaceSummary) val; }
return ((io.pinecone.proto.NamespaceSummary.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return NamespacesDefaultEntryHolder.defaultEntry;
}
};
private static final NamespacesConverter namespacesConverter = new NamespacesConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, io.pinecone.proto.NamespaceSummaryOrBuilder, io.pinecone.proto.NamespaceSummary, io.pinecone.proto.NamespaceSummary.Builder> namespaces_;
private com.google.protobuf.MapFieldBuilder
internalGetNamespaces() {
if (namespaces_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(namespacesConverter);
}
return namespaces_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableNamespaces() {
if (namespaces_ == null) {
namespaces_ = new com.google.protobuf.MapFieldBuilder<>(namespacesConverter);
}
bitField0_ |= 0x00000001;
onChanged();
return namespaces_;
}
public int getNamespacesCount() {
return internalGetNamespaces().ensureBuilderMap().size();
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public boolean containsNamespaces(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetNamespaces().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getNamespacesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getNamespaces() {
return getNamespacesMap();
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public java.util.Map getNamespacesMap() {
return internalGetNamespaces().getImmutableMap();
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public /* nullable */
io.pinecone.proto.NamespaceSummary getNamespacesOrDefault(
java.lang.String key,
/* nullable */
io.pinecone.proto.NamespaceSummary defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableNamespaces().ensureBuilderMap();
return map.containsKey(key) ? namespacesConverter.build(map.get(key)) : defaultValue;
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
@java.lang.Override
public io.pinecone.proto.NamespaceSummary getNamespacesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableNamespaces().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return namespacesConverter.build(map.get(key));
}
public Builder clearNamespaces() {
bitField0_ = (bitField0_ & ~0x00000001);
internalGetMutableNamespaces().clear();
return this;
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
public Builder removeNamespaces(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableNamespaces().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableNamespaces() {
bitField0_ |= 0x00000001;
return internalGetMutableNamespaces().ensureMessageMap();
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
public Builder putNamespaces(
java.lang.String key,
io.pinecone.proto.NamespaceSummary value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableNamespaces().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00000001;
return this;
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
public Builder putAllNamespaces(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableNamespaces().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00000001;
return this;
}
/**
*
* A mapping for each namespace in the index from the namespace name to a
* summary of its contents. If a metadata filter expression is present, the
* summary will reflect only vectors matching that expression.
*
*
* map<string, .NamespaceSummary> namespaces = 1;
*/
public io.pinecone.proto.NamespaceSummary.Builder putNamespacesBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableNamespaces().ensureBuilderMap();
io.pinecone.proto.NamespaceSummaryOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = io.pinecone.proto.NamespaceSummary.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof io.pinecone.proto.NamespaceSummary) {
entry = ((io.pinecone.proto.NamespaceSummary) entry).toBuilder();
builderMap.put(key, entry);
}
return (io.pinecone.proto.NamespaceSummary.Builder) entry;
}
private int dimension_ ;
/**
*
* The dimension of the indexed vectors.
*
*
* uint32 dimension = 2;
* @return The dimension.
*/
@java.lang.Override
public int getDimension() {
return dimension_;
}
/**
*
* The dimension of the indexed vectors.
*
*
* uint32 dimension = 2;
* @param value The dimension to set.
* @return This builder for chaining.
*/
public Builder setDimension(int value) {
dimension_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The dimension of the indexed vectors.
*
*
* uint32 dimension = 2;
* @return This builder for chaining.
*/
public Builder clearDimension() {
bitField0_ = (bitField0_ & ~0x00000002);
dimension_ = 0;
onChanged();
return this;
}
private float indexFullness_ ;
/**
*
* The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
*
*
* float index_fullness = 3;
* @return The indexFullness.
*/
@java.lang.Override
public float getIndexFullness() {
return indexFullness_;
}
/**
*
* The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
*
*
* float index_fullness = 3;
* @param value The indexFullness to set.
* @return This builder for chaining.
*/
public Builder setIndexFullness(float value) {
indexFullness_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* The fullness of the index, regardless of whether a metadata filter expression was passed. The granularity of this metric is 10%.
*
*
* float index_fullness = 3;
* @return This builder for chaining.
*/
public Builder clearIndexFullness() {
bitField0_ = (bitField0_ & ~0x00000004);
indexFullness_ = 0F;
onChanged();
return this;
}
private int totalVectorCount_ ;
/**
*
* The total number of vectors in the index, regardless of whether a metadata filter expression was passed
*
*
* uint32 total_vector_count = 4;
* @return The totalVectorCount.
*/
@java.lang.Override
public int getTotalVectorCount() {
return totalVectorCount_;
}
/**
*
* The total number of vectors in the index, regardless of whether a metadata filter expression was passed
*
*
* uint32 total_vector_count = 4;
* @param value The totalVectorCount to set.
* @return This builder for chaining.
*/
public Builder setTotalVectorCount(int value) {
totalVectorCount_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* The total number of vectors in the index, regardless of whether a metadata filter expression was passed
*
*
* uint32 total_vector_count = 4;
* @return This builder for chaining.
*/
public Builder clearTotalVectorCount() {
bitField0_ = (bitField0_ & ~0x00000008);
totalVectorCount_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:DescribeIndexStatsResponse)
}
// @@protoc_insertion_point(class_scope:DescribeIndexStatsResponse)
private static final io.pinecone.proto.DescribeIndexStatsResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.pinecone.proto.DescribeIndexStatsResponse();
}
public static io.pinecone.proto.DescribeIndexStatsResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DescribeIndexStatsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.pinecone.proto.DescribeIndexStatsResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy