Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
grpc.control_client._CreateIndexRequest Maven / Gradle / Ivy
package grpc.control_client;
public final class _CreateIndexRequest extends
com.google.protobuf.GeneratedMessageV3 implements
_CreateIndexRequestOrBuilder {
private static final long serialVersionUID = 0 L;
private _CreateIndexRequest(com.google.protobuf.GeneratedMessageV3 .Builder builder) {
super (builder);
}
private _CreateIndexRequest() {
indexName_ = "" ;
}
@java .lang.Override
@SuppressWarnings ({"unused" })
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new _CreateIndexRequest();
}
public static final com.google.protobuf.Descriptors .Descriptor
getDescriptor() {
return grpc.control_client.Controlclient .internal_static_control_client__CreateIndexRequest_descriptor;
}
@java .lang.Override
protected com.google.protobuf.GeneratedMessageV3 .FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient .internal_static_control_client__CreateIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._CreateIndexRequest.class , grpc.control_client._CreateIndexRequest.Builder .class );
}
private int bitField0_;
public static final int INDEX_NAME_FIELD_NUMBER = 1 ;
@SuppressWarnings ("serial" )
private volatile java.lang.Object indexName_ = "" ;
@java .lang.Override
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
if (ref instanceof java.lang.String ) {
return (java.lang.String ) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString ) ref;
java.lang.String s = bs.toStringUtf8();
indexName_ = s;
return s;
}
}
@java .lang.Override
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof java.lang.String ) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString .copyFromUtf8(
(java.lang.String ) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString ) ref;
}
}
public static final int NUM_DIMENSIONS_FIELD_NUMBER = 2 ;
private long numDimensions_ = 0 L;
@java .lang.Override
public long getNumDimensions() {
return numDimensions_;
}
public static final int SIMILARITY_METRIC_FIELD_NUMBER = 3 ;
private grpc.control_client._SimilarityMetric similarityMetric_;
@java .lang.Override
public boolean hasSimilarityMetric() {
return ((bitField0_ & 0x00000001 ) != 0 );
}
@java .lang.Override
public grpc.control_client._SimilarityMetric getSimilarityMetric() {
return similarityMetric_ == null ? grpc.control_client._SimilarityMetric.getDefaultInstance() : similarityMetric_;
}
@java .lang.Override
public grpc.control_client._SimilarityMetricOrBuilder getSimilarityMetricOrBuilder() {
return similarityMetric_ == null ? grpc.control_client._SimilarityMetric.getDefaultInstance() : similarityMetric_;
}
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 {
if (!com.google.protobuf.GeneratedMessageV3 .isStringEmpty(indexName_)) {
com.google.protobuf.GeneratedMessageV3 .writeString(output, 1 , indexName_);
}
if (numDimensions_ != 0 L) {
output.writeUInt64(2 , numDimensions_);
}
if (((bitField0_ & 0x00000001 ) != 0 )) {
output.writeMessage(3 , getSimilarityMetric());
}
getUnknownFields().writeTo(output);
}
@java .lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1 ) return size;
size = 0 ;
if (!com.google.protobuf.GeneratedMessageV3 .isStringEmpty(indexName_)) {
size += com.google.protobuf.GeneratedMessageV3 .computeStringSize(1 , indexName_);
}
if (numDimensions_ != 0 L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2 , numDimensions_);
}
if (((bitField0_ & 0x00000001 ) != 0 )) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3 , getSimilarityMetric());
}
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 grpc.control_client._CreateIndexRequest)) {
return super .equals(obj);
}
grpc.control_client._CreateIndexRequest other = (grpc.control_client._CreateIndexRequest) obj;
if (!getIndexName()
.equals(other.getIndexName())) return false ;
if (getNumDimensions()
!= other.getNumDimensions()) return false ;
if (hasSimilarityMetric() != other.hasSimilarityMetric()) return false ;
if (hasSimilarityMetric()) {
if (!getSimilarityMetric()
.equals(other.getSimilarityMetric())) 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();
hash = (37 * hash) + INDEX_NAME_FIELD_NUMBER ;
hash = (53 * hash) + getIndexName().hashCode();
hash = (37 * hash) + NUM_DIMENSIONS_FIELD_NUMBER ;
hash = (53 * hash) + com.google.protobuf.Internal .hashLong(
getNumDimensions());
if (hasSimilarityMetric()) {
hash = (37 * hash) + SIMILARITY_METRIC_FIELD_NUMBER ;
hash = (53 * hash) + getSimilarityMetric().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.control_client._CreateIndexRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER .parseFrom(data);
}
public static grpc.control_client._CreateIndexRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER .parseFrom(data, extensionRegistry);
}
public static grpc.control_client._CreateIndexRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER .parseFrom(data);
}
public static grpc.control_client._CreateIndexRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER .parseFrom(data, extensionRegistry);
}
public static grpc.control_client._CreateIndexRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER .parseFrom(data);
}
public static grpc.control_client._CreateIndexRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER .parseFrom(data, extensionRegistry);
}
public static grpc.control_client._CreateIndexRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER , input);
}
public static grpc.control_client._CreateIndexRequest 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 grpc.control_client._CreateIndexRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER , input);
}
public static grpc.control_client._CreateIndexRequest 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 grpc.control_client._CreateIndexRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER , input);
}
public static grpc.control_client._CreateIndexRequest 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(grpc.control_client._CreateIndexRequest 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;
}
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3 .Builder implements
grpc.control_client._CreateIndexRequestOrBuilder {
public static final com.google.protobuf.Descriptors .Descriptor
getDescriptor() {
return grpc.control_client.Controlclient .internal_static_control_client__CreateIndexRequest_descriptor;
}
@java .lang.Override
protected com.google.protobuf.GeneratedMessageV3 .FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.control_client.Controlclient .internal_static_control_client__CreateIndexRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.control_client._CreateIndexRequest.class , grpc.control_client._CreateIndexRequest.Builder .class );
}
private Builder () {
maybeForceBuilderInitialization();
}
private Builder (
com.google.protobuf.GeneratedMessageV3 .BuilderParent parent) {
super (parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSimilarityMetricFieldBuilder();
}
}
@java .lang.Override
public Builder clear() {
super .clear();
bitField0_ = 0 ;
indexName_ = "" ;
numDimensions_ = 0 L;
similarityMetric_ = null ;
if (similarityMetricBuilder_ != null ) {
similarityMetricBuilder_.dispose();
similarityMetricBuilder_ = null ;
}
return this ;
}
@java .lang.Override
public com.google.protobuf.Descriptors .Descriptor
getDescriptorForType() {
return grpc.control_client.Controlclient .internal_static_control_client__CreateIndexRequest_descriptor;
}
@java .lang.Override
public grpc.control_client._CreateIndexRequest getDefaultInstanceForType() {
return grpc.control_client._CreateIndexRequest.getDefaultInstance();
}
@java .lang.Override
public grpc.control_client._CreateIndexRequest build() {
grpc.control_client._CreateIndexRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java .lang.Override
public grpc.control_client._CreateIndexRequest buildPartial() {
grpc.control_client._CreateIndexRequest result = new grpc.control_client._CreateIndexRequest(this );
if (bitField0_ != 0 ) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.control_client._CreateIndexRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001 ) != 0 )) {
result.indexName_ = indexName_;
}
if (((from_bitField0_ & 0x00000002 ) != 0 )) {
result.numDimensions_ = numDimensions_;
}
int to_bitField0_ = 0 ;
if (((from_bitField0_ & 0x00000004 ) != 0 )) {
result.similarityMetric_ = similarityMetricBuilder_ == null
? similarityMetric_
: similarityMetricBuilder_.build();
to_bitField0_ |= 0x00000001 ;
}
result.bitField0_ |= to_bitField0_;
}
@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 grpc.control_client._CreateIndexRequest) {
return mergeFrom((grpc.control_client._CreateIndexRequest)other);
} else {
super .mergeFrom(other);
return this ;
}
}
public Builder mergeFrom(grpc.control_client._CreateIndexRequest other) {
if (other == grpc.control_client._CreateIndexRequest.getDefaultInstance()) return this ;
if (!other.getIndexName().isEmpty()) {
indexName_ = other.indexName_;
bitField0_ |= 0x00000001 ;
onChanged();
}
if (other.getNumDimensions() != 0 L) {
setNumDimensions(other.getNumDimensions());
}
if (other.hasSimilarityMetric()) {
mergeSimilarityMetric(other.getSimilarityMetric());
}
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 : {
indexName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001 ;
break ;
}
case 16 : {
numDimensions_ = input.readUInt64();
bitField0_ |= 0x00000002 ;
break ;
}
case 26 : {
input.readMessage(
getSimilarityMetricFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000004 ;
break ;
}
default : {
if (!super .parseUnknownField(input, extensionRegistry, tag)) {
done = true ;
}
break ;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
}
return this ;
}
private int bitField0_;
private java.lang.Object indexName_ = "" ;
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
if (!(ref instanceof java.lang.String )) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString ) ref;
java.lang.String s = bs.toStringUtf8();
indexName_ = s;
return s;
} else {
return (java.lang.String ) ref;
}
}
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof String ) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString .copyFromUtf8(
(java.lang.String ) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString ) ref;
}
}
public Builder setIndexName(
java.lang.String value) {
if (value == null ) { throw new NullPointerException (); }
indexName_ = value;
bitField0_ |= 0x00000001 ;
onChanged();
return this ;
}
public Builder clearIndexName() {
indexName_ = getDefaultInstance().getIndexName();
bitField0_ = (bitField0_ & ~0x00000001 );
onChanged();
return this ;
}
public Builder setIndexNameBytes(
com.google.protobuf.ByteString value) {
if (value == null ) { throw new NullPointerException (); }
checkByteStringIsUtf8(value);
indexName_ = value;
bitField0_ |= 0x00000001 ;
onChanged();
return this ;
}
private long numDimensions_ ;
@java .lang.Override
public long getNumDimensions() {
return numDimensions_;
}
public Builder setNumDimensions(long value) {
numDimensions_ = value;
bitField0_ |= 0x00000002 ;
onChanged();
return this ;
}
public Builder clearNumDimensions() {
bitField0_ = (bitField0_ & ~0x00000002 );
numDimensions_ = 0 L;
onChanged();
return this ;
}
private grpc.control_client._SimilarityMetric similarityMetric_;
private com.google.protobuf.SingleFieldBuilderV3 <
grpc.control_client._SimilarityMetric, grpc.control_client._SimilarityMetric.Builder , grpc.control_client._SimilarityMetricOrBuilder> similarityMetricBuilder_;
public boolean hasSimilarityMetric() {
return ((bitField0_ & 0x00000004 ) != 0 );
}
public grpc.control_client._SimilarityMetric getSimilarityMetric() {
if (similarityMetricBuilder_ == null ) {
return similarityMetric_ == null ? grpc.control_client._SimilarityMetric.getDefaultInstance() : similarityMetric_;
} else {
return similarityMetricBuilder_.getMessage();
}
}
public Builder setSimilarityMetric(grpc.control_client._SimilarityMetric value) {
if (similarityMetricBuilder_ == null ) {
if (value == null ) {
throw new NullPointerException ();
}
similarityMetric_ = value;
} else {
similarityMetricBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004 ;
onChanged();
return this ;
}
public Builder setSimilarityMetric(
grpc.control_client._SimilarityMetric.Builder builderForValue) {
if (similarityMetricBuilder_ == null ) {
similarityMetric_ = builderForValue.build();
} else {
similarityMetricBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004 ;
onChanged();
return this ;
}
public Builder mergeSimilarityMetric(grpc.control_client._SimilarityMetric value) {
if (similarityMetricBuilder_ == null ) {
if (((bitField0_ & 0x00000004 ) != 0 ) &&
similarityMetric_ != null &&
similarityMetric_ != grpc.control_client._SimilarityMetric.getDefaultInstance()) {
getSimilarityMetricBuilder().mergeFrom(value);
} else {
similarityMetric_ = value;
}
} else {
similarityMetricBuilder_.mergeFrom(value);
}
if (similarityMetric_ != null ) {
bitField0_ |= 0x00000004 ;
onChanged();
}
return this ;
}
public Builder clearSimilarityMetric() {
bitField0_ = (bitField0_ & ~0x00000004 );
similarityMetric_ = null ;
if (similarityMetricBuilder_ != null ) {
similarityMetricBuilder_.dispose();
similarityMetricBuilder_ = null ;
}
onChanged();
return this ;
}
public grpc.control_client._SimilarityMetric.Builder getSimilarityMetricBuilder() {
bitField0_ |= 0x00000004 ;
onChanged();
return getSimilarityMetricFieldBuilder().getBuilder();
}
public grpc.control_client._SimilarityMetricOrBuilder getSimilarityMetricOrBuilder() {
if (similarityMetricBuilder_ != null ) {
return similarityMetricBuilder_.getMessageOrBuilder();
} else {
return similarityMetric_ == null ?
grpc.control_client._SimilarityMetric.getDefaultInstance() : similarityMetric_;
}
}
private com.google.protobuf.SingleFieldBuilderV3 <
grpc.control_client._SimilarityMetric, grpc.control_client._SimilarityMetric.Builder , grpc.control_client._SimilarityMetricOrBuilder>
getSimilarityMetricFieldBuilder() {
if (similarityMetricBuilder_ == null ) {
similarityMetricBuilder_ = new com.google.protobuf.SingleFieldBuilderV3 <
grpc.control_client._SimilarityMetric, grpc.control_client._SimilarityMetric.Builder , grpc.control_client._SimilarityMetricOrBuilder>(
getSimilarityMetric(),
getParentForChildren(),
isClean());
similarityMetric_ = null ;
}
return similarityMetricBuilder_;
}
@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);
}
}
private static final grpc.control_client._CreateIndexRequest DEFAULT_INSTANCE ;
static {
DEFAULT_INSTANCE = new grpc.control_client._CreateIndexRequest();
}
public static grpc.control_client._CreateIndexRequest getDefaultInstance() {
return DEFAULT_INSTANCE ;
}
private static final com.google.protobuf.Parser <_CreateIndexRequest>
PARSER = new com.google.protobuf.AbstractParser <_CreateIndexRequest>() {
@java .lang.Override
public _CreateIndexRequest 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 <_CreateIndexRequest> parser() {
return PARSER ;
}
@java .lang.Override
public com.google.protobuf.Parser <_CreateIndexRequest> getParserForType() {
return PARSER ;
}
@java .lang.Override
public grpc.control_client._CreateIndexRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE ;
}
}